-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
1 lines (1 loc) · 151 KB
/
main.js
1
(()=>{var e,t,r={198:(e,t,r)=>{"use strict";r.d(t,{I:()=>w});var n=r(967),s={name:"SHA-256"},i={name:"HMAC",hash:s},o=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const a={};function c(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:a}var u=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!(0,n.Kz)(e)){var t=(0,n.pP)(e),r=new Uint8Array(this.toHash.byteLength+t.byteLength);r.set(this.toHash,0),r.set(t,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return c().crypto.subtle.sign(i,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,n.Kz)(this.toHash)?Promise.resolve(o):Promise.resolve().then((function(){return c().crypto.subtle.digest(s,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,r){c().crypto.subtle.importKey("raw",(0,n.pP)(e.secret),i,!1,["sign"]).then(t,r)})),this.key.catch((function(){})))},e}(),d=r(635),l=64,p=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],f=Math.pow(2,53)-1,g=function(){function e(){this.state=Int32Array.from(h),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>f)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===l&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%l>=56){for(var n=this.bufferLength;n<l;n++)t.setUint8(n,0);this.hashBuffer(),this.bufferLength=0}for(n=this.bufferLength;n<56;n++)t.setUint8(n,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var s=new Uint8Array(32);for(n=0;n<8;n++)s[4*n]=this.state[n]>>>24&255,s[4*n+1]=this.state[n]>>>16&255,s[4*n+2]=this.state[n]>>>8&255,s[4*n+3]=this.state[n]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],n=t[1],s=t[2],i=t[3],o=t[4],a=t[5],c=t[6],u=t[7],d=0;d<l;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var h=this.temp[d-2],f=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,g=((h=this.temp[d-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[d]=(f+this.temp[d-7]|0)+(g+this.temp[d-16]|0)}var y=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(p[d]+this.temp[d]|0)|0)|0,m=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&n^r&s^n&s)|0;u=c,c=a,a=o,o=i+y|0,i=s,s=n,n=r,r=y+m|0}t[0]+=r,t[1]+=n,t[2]+=s,t[3]+=i,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),y=function(){function e(e){this.secret=e,this.hash=new g,this.reset()}return e.prototype.update=function(e){if(!(0,n.Kz)(e)&&!this.error)try{this.hash.update((0,n.pP)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,d.sH)(this,void 0,void 0,(function(){return(0,d.YH)(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new g,this.secret){this.outer=new g;var e=function(e){var t=(0,n.pP)(e);if(t.byteLength>l){var r=new g;r.update(t),t=r.digest()}var s=new Uint8Array(l);return s.set(t),s}(this.secret),t=new Uint8Array(l);t.set(e);for(var r=0;r<l;r++)e[r]^=54,t[r]^=92;for(this.hash.update(e),this.outer.update(t),r=0;r<e.byteLength;r++)e[r]=0}},e}(),m=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];var w=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&((t=e.crypto.subtle)&&m.every((function(e){return"function"==typeof t[e]})));var t}(c())?this.hash=new y(e):this.hash=new u(e)}return e.prototype.update=function(e,t){this.hash.update((0,n.pP)(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}()},967:(e,t,r)=>{"use strict";r.d(t,{pP:()=>s,Kz:()=>i,yl:()=>o,zB:()=>a});var n="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function s(e){return e instanceof Uint8Array?e:"string"==typeof e?n(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function i(e){return"string"==typeof e?0===e.length:0===e.byteLength}function o(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}function a(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}},636:(e,t,r)=>{"use strict";r.d(t,{D:()=>ie});var n=r(95),s=r(359),i=r(377),o=r(499),a=r(487),c=r(966),u=r(649),d=r(12),l=r(234),p=r(340),h=r(451),f=r(135);const g=async(e,t,r)=>({operation:(0,f.u)(t).operation,region:await(0,f.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),y=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t};var m=r(19);var w=r(198),b=r(391),v=r(957),S=r(423),E=r(795),P=r(323),M=r(228),x=r(641),A=r(302),T=r(637),R=r(792),O=r(652),C=r(875);const k="required",I="fn",$="argv",j="ref",F=!0,N="isSet",_="booleanEquals",U="error",D="endpoint",L="tree",B="PartitionResult",z={[k]:!1,type:"String"},q={[k]:!0,default:!1,type:"Boolean"},K={[j]:"Endpoint"},H={[I]:_,[$]:[{[j]:"UseFIPS"},!0]},V={[I]:_,[$]:[{[j]:"UseDualStack"},!0]},W={},G={[I]:"getAttr",[$]:[{[j]:B},"supportsFIPS"]},Q={[I]:_,[$]:[!0,{[I]:"getAttr",[$]:[{[j]:B},"supportsDualStack"]}]},Y=[H],J=[V],Z=[{[j]:"Region"}],X={version:"1.0",parameters:{Region:z,UseDualStack:q,UseFIPS:q,Endpoint:z},rules:[{conditions:[{[I]:N,[$]:[K]}],rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:U},{conditions:J,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:U},{endpoint:{url:K,properties:W,headers:W},type:D}],type:L},{conditions:[{[I]:N,[$]:Z}],rules:[{conditions:[{[I]:"aws.partition",[$]:Z,assign:B}],rules:[{conditions:[H,V],rules:[{conditions:[{[I]:_,[$]:[F,G]},Q],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:W,headers:W},type:D}],type:L},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:U}],type:L},{conditions:Y,rules:[{conditions:[{[I]:_,[$]:[G,F]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:W,headers:W},type:D}],type:L},{error:"FIPS is enabled but this partition does not support FIPS",type:U}],type:L},{conditions:J,rules:[{conditions:[Q],rules:[{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:W,headers:W},type:D}],type:L},{error:"DualStack is enabled but this partition does not support DualStack",type:U}],type:L},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:W,headers:W},type:D}],type:L}],type:L},{error:"Invalid Configuration: Missing Region",type:U}]},ee=(e,t={})=>(0,C.sO)(X,{endpointParams:e,logger:t.logger});C.mw.aws=O.UF;var te=r(246);var re=r(928),ne=r(479);const se=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const r=t.findIndex((t=>t.schemeId===e.schemeId));-1===r?t.push(e):t.splice(r,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){r=e},httpAuthSchemeProvider:()=>r,setCredentials(e){n=e},credentials:()=>n}};class ie extends p.Kj{constructor(...[e]){const t=(e=>{const t=(0,te.I)(e),r=()=>t().then(p.lT),n=(e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??A.E,base64Encoder:e?.base64Encoder??A.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ee,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??y,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new M.f},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new c.mR}],logger:e?.logger??new p.N4,serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??x.D,utf8Decoder:e?.utf8Decoder??T.a,utf8Encoder:e?.utf8Encoder??R.P}))(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??E.n,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,b.m)({serviceId:n.serviceId,clientVersion:"3.613.0"}),maxAttempts:e?.maxAttempts??P.Gz,region:e?.region??(0,S.B)("Region is missing"),requestHandler:v.NC.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||P.L0),sha256:e?.sha256??w.I,streamCollector:e?.streamCollector??v.kv,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(a.VW)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(a.Hj))}})(e||{}),r=(0,m.v)(t),f=(0,a.TD)(r),g=(0,d.Co)(f),O=(0,l.$z)(g),C=(0,n.OV)(O);var k;const I=((e,t)=>{const r={...(0,re.Rq)(e),...(0,p.xA)(e),...(0,ne.eS)(e),...se(e)};return t.forEach((e=>e.configure(r))),{...e,...(0,re.$3)(r),...(0,p.uv)(r),...(0,ne.jt)(r),...(n=r,{httpAuthSchemes:n.httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()})};var n})((k=(0,o.Dc)(C),{...(0,h.h)(k)}),e?.extensions||[]);super(I),this.config=I,this.middlewareStack.use((0,l.ey)(this.config)),this.middlewareStack.use((0,u.vK)(this.config)),this.middlewareStack.use((0,n.TC)(this.config)),this.middlewareStack.use((0,s.Y7)(this.config)),this.middlewareStack.use((0,i.n4)(this.config)),this.middlewareStack.use((0,o.sM)(this.config)),this.middlewareStack.use((0,c.wB)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,c.lW)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return g}getIdentityProviderConfigProvider(){return async e=>new c.h$({"aws.auth#sigv4":e.credentials})}}},19:(e,t,r)=>{"use strict";r.d(t,{S:()=>s,v:()=>n});const n=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),s={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}},228:(e,t,r)=>{"use strict";r.d(t,{f:()=>c});var n=r(479);const s=e=>new Date(Date.now()+e),i=e=>n.cS.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,o=(e,t)=>{const r=Date.parse(e);return((e,t)=>Math.abs(s(t).getTime()-e)>=3e5)(r,t)?r-Date.now():t},a=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class c{async sign(e,t,r){if(!n.Kd.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:o,signingRegion:c,signingName:u}=await(async e=>{const t=a("context",e.context),r=a("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],s=a("signer",r.signer),i=await s(n),o=e?.signingRegion,c=e?.signingName;return{config:r,signer:i,signingRegion:o,signingName:c}})(r);return await o.sign(e,{signingDate:s(i.systemClockOffset),signingRegion:c,signingService:u})}errorHandler(e){return t=>{const r=t.ServerTime??i(t.$response);if(r){const n=a("config",e.config),s=n.systemClockOffset;n.systemClockOffset=o(r,n.systemClockOffset),n.systemClockOffset!==s&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const r=i(e);if(r){const e=a("config",t.config);e.systemClockOffset=o(r,e.systemClockOffset)}}}},451:(e,t,r)=>{"use strict";r.d(t,{h:()=>B});var n=r(966),s=r(4),i=r(135),o=r(531),a=r(637);const c=e=>"string"==typeof e?(0,a.a)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),u="X-Amz-Date",d="X-Amz-Signature",l="X-Amz-Security-Token",p="authorization",h=u.toLowerCase(),f=[p,h,"date"],g=d.toLowerCase(),y="x-amz-content-sha256",m=l.toLowerCase(),w={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},b=/^proxy-/,v=/^sec-/,S="AWS4-HMAC-SHA256",E="AWS4-HMAC-SHA256-PAYLOAD",P="aws4_request",M={},x=[],A=(e,t,r)=>`${e}/${t}/${r}/${P}`,T=(e,t,r)=>{const n=new e(t);return n.update(c(r)),n.digest()},R=({headers:e},t,r)=>{const n={};for(const s of Object.keys(e).sort()){if(null==e[s])continue;const i=s.toLowerCase();(i in w||t?.has(i)||b.test(i)||v.test(i))&&(!r||r&&!r.has(i))||(n[i]=e[s].trim().replace(/\s+/g," "))}return n},O=async({headers:e,body:t},r)=>{for(const t of Object.keys(e))if(t.toLowerCase()===y)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(n=t,"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(n))){const e=new r;return e.update(c(t)),(0,s.n)(await e.digest())}var n;return"UNSIGNED-PAYLOAD"};class C{format(e){const t=[];for(const r of Object.keys(e)){const n=(0,a.a)(r);t.push(Uint8Array.from([n.byteLength]),n,this.formatHeaderValue(e[r]))}const r=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let n=0;for(const e of t)r.set(e,n),n+=e.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const c=(0,a.a)(e.value),u=new DataView(new ArrayBuffer(3+c.byteLength));u.setUint8(0,7),u.setUint16(1,c.byteLength,!1);const d=new Uint8Array(u.buffer);return d.set(c,3),d;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set($.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!I.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const p=new Uint8Array(17);return p[0]=9,p.set((0,s.a)(e.value.replace(/\-/g,"")),1),p}}}var k;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(k||(k={}));const I=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ${constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;return e<0&&j(t),new $(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&j(e),parseInt((0,s.n)(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function j(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const F=({headers:e,query:t,...r})=>({...r,headers:{...e},query:t?N(t):void 0}),N=e=>Object.keys(e).reduce(((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}}),{}),_=e=>{e="function"==typeof e.clone?e.clone():F(e);for(const t of Object.keys(e.headers))f.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e};class U{constructor({applyChecksum:e,credentials:t,region:r,service:n,sha256:s,uriEscapePath:o=!0}){this.headerFormatter=new C,this.service=n,this.sha256=s,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,i.t)(r),this.credentialProvider=(0,i.t)(t)}async presign(e,t={}){const{signingDate:r=new Date,expiresIn:n=3600,unsignableHeaders:s,unhoistableHeaders:i,signableHeaders:o,signingRegion:a,signingService:c}=t,p=await this.credentialProvider();this.validateResolvedCredentials(p);const h=a??await this.regionProvider(),{longDate:f,shortDate:g}=D(r);if(n>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const y=A(g,h,c??this.service),m=((e,t={})=>{const{headers:r,query:n={}}="function"==typeof e.clone?e.clone():F(e);for(const e of Object.keys(r)){const s=e.toLowerCase();"x-amz-"!==s.slice(0,6)||t.unhoistableHeaders?.has(s)||(n[e]=r[e],delete r[e])}return{...e,headers:r,query:n}})(_(e),{unhoistableHeaders:i});p.sessionToken&&(m.query[l]=p.sessionToken),m.query["X-Amz-Algorithm"]=S,m.query["X-Amz-Credential"]=`${p.accessKeyId}/${y}`,m.query[u]=f,m.query["X-Amz-Expires"]=n.toString(10);const w=R(m,s,o);return m.query["X-Amz-SignedHeaders"]=L(w),m.query[d]=await this.getSignature(f,y,this.getSigningKey(p,h,g,c),this.createCanonicalRequest(m,w,await O(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:r=new Date,priorSignature:n,signingRegion:i,signingService:o}){const a=i??await this.regionProvider(),{shortDate:c,longDate:u}=D(r),d=A(c,a,o??this.service),l=await O({headers:{},body:t},this.sha256),p=new this.sha256;p.update(e);const h=(0,s.n)(await p.digest()),f=[E,u,d,n,h,l].join("\n");return this.signString(f,{signingDate:r,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:r,signingService:n}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:r,signingService:n,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:r,signingService:n}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=r??await this.regionProvider(),{shortDate:a}=D(t),u=new this.sha256(await this.getSigningKey(i,o,a,n));return u.update(c(e)),(0,s.n)(await u.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:r,unsignableHeaders:n,signingRegion:s,signingService:i}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=s??await this.regionProvider(),c=_(e),{longDate:u,shortDate:d}=D(t),l=A(d,a,i??this.service);c.headers[h]=u,o.sessionToken&&(c.headers[m]=o.sessionToken);const f=await O(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1})(y,c.headers)&&this.applyChecksum&&(c.headers[y]=f);const g=R(c,n,r),w=await this.getSignature(u,l,this.getSigningKey(o,a,d,i),this.createCanonicalRequest(c,g,f));return c.headers[p]=`${S} Credential=${o.accessKeyId}/${l}, SignedHeaders=${L(g)}, Signature=${w}`,c}createCanonicalRequest(e,t,r){const n=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e).sort()){if(n.toLowerCase()===g)continue;t.push(n);const s=e[n];"string"==typeof s?r[n]=`${(0,o.o)(n)}=${(0,o.o)(s)}`:Array.isArray(s)&&(r[n]=s.slice(0).reduce(((e,t)=>e.concat([`${(0,o.o)(n)}=${(0,o.o)(t)}`])),[]).sort().join("&"))}return t.map((e=>r[e])).filter((e=>e)).join("&")})(e)}\n${n.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${n.join(";")}\n${r}`}async createStringToSign(e,t,r){const n=new this.sha256;n.update(c(r));const i=await n.digest();return`${S}\n${e}\n${t}\n${(0,s.n)(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const r of e.split("/"))0!==r?.length&&"."!==r&&(".."===r?t.pop():t.push(r));const r=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return(0,o.o)(r).replace(/%2F/g,"/")}return e}async getSignature(e,t,r,n){const i=await this.createStringToSign(e,t,n),o=new this.sha256(await r);return o.update(c(i)),(0,s.n)(await o.digest())}getSigningKey(e,t,r,n){return(async(e,t,r,n,i)=>{const o=await T(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${n}:${i}:${(0,s.n)(o)}:${t.sessionToken}`;if(a in M)return M[a];for(x.push(a);x.length>50;)delete M[x.shift()];let c=`AWS4${t.secretAccessKey}`;for(const t of[r,n,i,P])c=await T(e,c,t);return M[a]=c})(this.sha256,e,r,t,n||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const D=e=>{const t=(r=e,(e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e)(r).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var r;return{longDate:t,shortDate:t.slice(0,8)}},L=e=>Object.keys(e).sort().join(";"),B=e=>{let t;e.credentials&&(t=(0,n.K4)(e.credentials,n.OC,n.e)),t||(t=e.credentialDefaultProvider?(0,n.te)(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:r=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:i}=e;let o;return o=e.signer?(0,n.te)(e.signer):e.regionInfoProvider?()=>(0,n.te)(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,s])=>{const{signingRegion:o,signingService:a}=n;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r};return new(e.signerConstructor||U)(c)})):async s=>{const o=(s=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await(0,n.te)(e.region)(),properties:{}},s)).signingRegion,a=s.signingName;e.signingRegion=e.signingRegion||o,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r};return new(e.signerConstructor||U)(c)},{...e,systemClockOffset:s,signingEscapePath:r,credentials:t,signer:o}}},902:(e,t,r)=>{"use strict";r.d(t,{cJ:()=>o,Y2:()=>s,CG:()=>i});var n=r(340);const s=(e,t)=>((e,t)=>(0,n.Px)(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),i=async(e,t)=>{const r=await s(e,t);return r.message=r.message??r.Message,r},o=(e,t)=>{const r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},n=(s=e.headers,Object.keys(s).find((e=>e.toLowerCase()==="x-amzn-errortype".toLowerCase())));var s;return void 0!==n?r(e.headers[n]):void 0!==t.code?r(t.code):void 0!==t.__type?r(t.__type):void 0}},95:(e,t,r)=>{"use strict";r.d(t,{OV:()=>s,TC:()=>o});var n=r(479);function s(e){return e}const i={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},o=e=>({applyToStack:t=>{t.add((e=>t=>async r=>{if(!n.Kd.isInstance(r.request))return t(r);const{request:s}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let e=s.hostname;null!=s.port&&(e+=`:${s.port}`),s.headers.host=e}return t(r)})(e),i)}})},359:(e,t,r)=>{"use strict";r.d(t,{Y7:()=>s});const n={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},s=e=>({applyToStack:e=>{e.add(((e,t)=>async r=>{try{const n=await e(r),{clientName:s,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:p,...h}=n.output;return o?.info?.({clientName:s,commandName:i,input:d(r.input),output:l(h),metadata:p}),n}catch(e){const{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw i?.error?.({clientName:n,commandName:s,input:c(r.input),error:e,metadata:e.$metadata}),e}}),n)}})},377:(e,t,r)=>{"use strict";r.d(t,{n4:()=>o});var n=r(479);const s="X-Amzn-Trace-Id",i={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},o=e=>({applyToStack:t=>{t.add((e=>t=>async r=>{const{request:i}=r;if(!n.Kd.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(s))return t(r);const o=process.env.AWS_LAMBDA_FUNCTION_NAME,a=process.env._X_AMZN_TRACE_ID,c=e=>"string"==typeof e&&e.length>0;return c(o)&&c(a)&&(i.headers[s]=a),t({...r,request:i})})(e),i)}})},499:(e,t,r)=>{"use strict";function n(e){return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent}}r.d(t,{sM:()=>p,Dc:()=>n});var s=r(652),i=r(479);const o="user-agent",a="x-amz-user-agent",c=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,u=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,d=e=>{const t=e[0].split("/").map((e=>e.replace(c,"-"))).join("/"),r=e[1]?.replace(u,"-"),n=t.indexOf("/"),s=t.substring(0,n);let i=t.substring(n+1);return"api"===s&&(i=i.toLowerCase()),[s,i,r].filter((e=>e&&e.length>0)).reduce(((e,t,r)=>{switch(r){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},l={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},p=e=>({applyToStack:t=>{var r;t.add((r=e,(e,t)=>async n=>{const{request:c}=n;if(!i.Kd.isInstance(c))return e(n);const{headers:u}=c,l=t?.userAgent?.map(d)||[],p=(await r.defaultUserAgentProvider()).map(d),h=r?.customUserAgent?.map(d)||[],f=(0,s.vL)(),g=(f?[f]:[]).concat([...p,...l,...h]).join(" "),y=[...p.filter((e=>e.startsWith("aws-sdk-"))),...h].join(" ");return"browser"!==r.runtime?(y&&(u[a]=u[a]?`${u[o]} ${y}`:y),u[o]=g):u[a]=g,e({...n,request:c})}),l)}})},928:(e,t,r)=>{"use strict";r.d(t,{Rq:()=>n,$3:()=>s});const n=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},s=e=>({region:e.region()})},652:(e,t,r)=>{"use strict";r.d(t,{UF:()=>a,vL:()=>o});var n=r(875);const s=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!s(t))return!1;return!0}return!(!(0,n.X8)(e)||e.length<3||e.length>63||e!==e.toLowerCase()||(0,n.oX)(e))};let i=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}');const o=()=>"",a={isVirtualHostableS3Bucket:s,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[r,n,s,i,o,...a]=t;return"arn"!==r||""===n||""===s||""===a[0]?null:{partition:n,service:s,region:i,accountId:o,resourceId:a[0].includes("/")?a[0].split("/"):a}},partition:e=>{const{partitions:t}=i;for(const r of t){const{regions:t,outputs:n}=r;for(const[r,s]of Object.entries(t))if(r===e)return{...n,...s}}for(const r of t){const{regionRegex:t,outputs:n}=r;if(new RegExp(t).test(e))return{...n}}const r=t.find((e=>"aws"===e.id));if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}}};n.mw.aws=a},391:(e,t,r)=>{"use strict";r.d(t,{m:()=>i});var n=r(880),s=r.n(n);const i=({serviceId:e,clientVersion:t})=>async()=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?s().parse(window.navigator.userAgent):void 0,n=[["aws-sdk-js",t],["ua","2.0"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];return e&&n.push([`api/${e}`,t]),n}},487:(e,t,r)=>{"use strict";var n;r.d(t,{VW:()=>s,Hj:()=>i,TD:()=>c}),function(e){e.ENV="env",e.CONFIG="shared config entry"}(n||(n={}));const s=!1,i=!1;r(135);const o=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),a=e=>o(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,c=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return a(t);const e=await t();return a(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!o(e)||("function"!=typeof r?Promise.resolve(!!r):r())}}}},966:(e,t,r)=>{"use strict";r.d(t,{h$:()=>l,mR:()=>p,e:()=>f,wB:()=>i,lW:()=>d,OC:()=>h,K4:()=>g,te:()=>y,lI:()=>w}),r(523);var n=r(135);const s={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:r(12).ko.name},i=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:i=>{i.addRelativeTo(((e,t)=>(r,s)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,s,i.input)),a=function(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}(e.httpAuthSchemes),c=(0,n.u)(s),u=[];for(const r of o){const n=a.get(r.schemeId);if(!n){u.push(`HttpAuthScheme \`${r.schemeId}\` was not enabled for this service.`);continue}const i=n.identityProvider(await t.identityProviderConfigProvider(e));if(!i){u.push(`HttpAuthScheme \`${r.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:o={},signingProperties:d={}}=r.propertiesExtractor?.(e,s)||{};r.identityProperties=Object.assign(r.identityProperties||{},o),r.signingProperties=Object.assign(r.signingProperties||{},d),c.selectedHttpAuthScheme={httpAuthOption:r,identity:await i(r.identityProperties),signer:n.signer};break}if(!c.selectedHttpAuthScheme)throw new Error(u.join("\n"));return r(i)})(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),s)}});r(208).Ou.name;var o=r(479);const a=e=>e=>{throw e},c=(e,t)=>{},u={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:r(234).j7.name},d=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async r=>{if(!o.Kd.isInstance(r.request))return e(r);const s=(0,n.u)(t).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:u,signer:d}=s,l=await e({...r,request:await d.sign(r.request,u,i)}).catch((d.errorHandler||a)(i));return(d.successHandler||c)(l.response,i),l}),u)}});class l{constructor(e){this.authSchemes=new Map;for(const[t,r]of Object.entries(e))void 0!==r&&this.authSchemes.set(t,r)}getIdentityProvider(e){return this.authSchemes.get(e)}}class p{async sign(e,t,r){return e}}const h=e=>f(e)&&e.expiration.getTime()-Date.now()<3e5;const f=e=>void 0!==e.expiration,g=(e,t,r)=>{if(void 0===e)return;const n="function"!=typeof e?async()=>Promise.resolve(e):e;let s,i,o,a=!1;const c=async e=>{i||(i=n(e));try{s=await i,o=!0,a=!1}finally{i=void 0}return s};return void 0===t?async e=>(o&&!e?.forceRefresh||(s=await c(e)),s):async e=>(o&&!e?.forceRefresh||(s=await c(e)),a?s:r(s)?t(s)?(await c(e),s):s:(a=!0,s))},y=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};var m=r(340);function w(e,t){return new b(e,t)}class b{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:r,path:n}=await this.context.endpoint();this.path=n;for(const e of this.resolvePathStack)e(this.path);return new o.Kd({protocol:t,hostname:this.hostname||e,port:r,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,r,n){return this.resolvePathStack.push((s=>{this.path=(0,m.un)(s,this.input,e,t,r,n)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}},957:(e,t,r)=>{"use strict";r.d(t,{NC:()=>a,kv:()=>u});var n=r(479),s=r(531);function i(e=0){return new Promise(((t,r)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",r(t)}),e)}))}const o={supported:void 0};class a{static create(e){return"function"==typeof e?.handle?e:new a(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===o.supported&&(o.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const r=this.config.requestTimeout,a=!0===this.config.keepAlive,c=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let u=e.path;const d=function(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=(0,s.o)(r),Array.isArray(n))for(let e=0,i=n.length;e<i;e++)t.push(`${r}=${(0,s.o)(n[e])}`);else{let e=r;(n||"string"==typeof n)&&(e+=`=${(0,s.o)(n)}`),t.push(e)}}return t.join("&")}(e.query||{});d&&(u+=`?${d}`),e.fragment&&(u+=`#${e.fragment}`);let l="";null==e.username&&null==e.password||(l=`${e.username??""}:${e.password??""}@`);const{port:p,method:h}=e,f=`${e.protocol}//${l}${e.hostname}${p?`:${p}`:""}${u}`,g="GET"===h||"HEAD"===h?void 0:e.body,y={body:g,headers:new Headers(e.headers),method:h,credentials:c};g&&(y.duplex="half"),"undefined"!=typeof AbortController&&(y.signal=t),o.supported&&(y.keepalive=a);let m=null;const w=new Request(f,y),b=[fetch(w).then((e=>{const t=e.headers,r={};for(const e of t.entries())r[e[0]]=e[1];return null!=e.body?{response:new n.cS({headers:r,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new n.cS({headers:r,reason:e.statusText,statusCode:e.status,body:t})})))})),i(r)];return t&&b.push(new Promise(((e,r)=>{const n=()=>{const e=new Error("Request aborted");e.name="AbortError",r(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",n,{once:!0}),m=()=>e.removeEventListener("abort",n)}else t.onabort=n}))),Promise.race(b).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r=>(r[e]=t,r)))}httpHandlerConfigs(){return this.config??{}}}var c=r(302);const u=e=>"function"==typeof Blob&&e instanceof Blob?async function(e){const t=await function(e){return new Promise(((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(2!==n.readyState)return r(new Error("Reader aborted too early"));const e=n.result??"",s=e.indexOf(","),i=s>-1?s+1:e.length;t(e.substring(i))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)}))}(e),r=(0,c.E)(t);return new Uint8Array(r)}(e):async function(e){const t=[],r=e.getReader();let n=!1,s=0;for(;!n;){const{done:e,value:i}=await r.read();i&&(t.push(i),s+=i.length),n=e}const i=new Uint8Array(s);let o=0;for(const e of t)i.set(e,o),o+=e.length;return i}(e)},423:(e,t,r)=>{"use strict";r.d(t,{B:()=>n});const n=e=>()=>Promise.reject(e)},649:(e,t,r)=>{"use strict";r.d(t,{vK:()=>o});var n=r(479);const s="content-length",i={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},o=e=>({applyToStack:t=>{var r;t.add((r=e.bodyLengthChecker,e=>async t=>{const i=t.request;if(n.Kd.isInstance(i)){const{body:e,headers:t}=i;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(s))try{const t=r(e);i.headers={...i.headers,[s]:String(t)}}catch(e){}}return e({...t,request:i})}),i)}})},12:(e,t,r)=>{"use strict";r.d(t,{ko:()=>l,rD:()=>p,Co:()=>h});var n=r(135);const s=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,i=/(\d+\.){3}\d+/,o=/\.\./,a=(e,t,r)=>{const n=async()=>{const n=r[e]??r[t];return"function"==typeof n?n():n};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.credentialScope??e?.CredentialScope}:"endpoint"===e||"endpoint"===t?async()=>{const e=await n();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:r,port:n,path:s}=e;return`${t}//${r}${n?":"+n:""}${s}`}}return e}:n};var c=r(641);const u=e=>"object"==typeof e?"url"in e?(0,c.D)(e.url):e:(0,c.D)(e),d=async(e,t,r)=>{const n={},c=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(c))switch(s.type){case"staticContextParams":n[t]=s.value;break;case"contextParams":n[t]=e[s.name];break;case"clientContextParams":case"builtInParams":n[t]=await a(s.name,t,r)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(c).length&&Object.assign(n,r),"s3"===String(r.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),(e=>{const[t,r,n,,,s]=e.split(":"),i="arn"===t&&e.split(":").length>=6,o=Boolean(i&&r&&n&&s);if(i&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o})(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else r=t,(!s.test(r)||i.test(r)||o.test(r)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);var r;return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(n),n},l={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:r(208).Ou.name},p=(e,t)=>({applyToStack:r=>{r.addRelativeTo((({config:e,instructions:t})=>(r,s)=>async i=>{const o=await(async(e,t,r,n)=>{if(!r.endpoint){const e=await(async e=>{})(r.serviceId);e&&(r.endpoint=()=>Promise.resolve(u(e)))}const s=await d(e,t,r);if("function"!=typeof r.endpointProvider)throw new Error("config.endpointProvider is not set.");return r.endpointProvider(s,n)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},s);s.endpointV2=o,s.authSchemes=o.properties?.authSchemes;const a=s.authSchemes?.[0];if(a){s.signing_region=a.signingRegion,s.signing_service=a.signingName;const e=(0,n.u)(s),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...i})})({config:e,instructions:t}),l)}}),h=e=>{const t=e.tls??!0,{endpoint:r}=e,s=null!=r?async()=>u(await(0,n.t)(r)()):void 0,i=!!r;return{...e,endpoint:s,tls:t,isCustomEndpoint:i,useDualstackEndpoint:(0,n.t)(e.useDualstackEndpoint??!1),useFipsEndpoint:(0,n.t)(e.useFipsEndpoint??!1)}}},234:(e,t,r)=>{"use strict";r.d(t,{ey:()=>b,$z:()=>h,j7:()=>w});var n=r(323),s=r(479),i=r(542);const o={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let a;const c=new Uint8Array(16);function u(){if(!a&&(a="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!a))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(c)}const d=[];for(let e=0;e<256;++e)d.push((e+256).toString(16).slice(1));const l=function(e,t,r){if(o.randomUUID&&!t&&!e)return o.randomUUID();const n=(e=e||{}).random||(e.rng||u)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]}(n)};var p=r(135);n.Gz;const h=e=>{const{retryStrategy:t}=e,r=(0,p.t)(e.maxAttempts??n.Gz);return{...e,maxAttempts:r,retryStrategy:async()=>t||(await(0,p.t)(e.retryMode)()===n.cm.ADAPTIVE?new n.Y(r):new n.ru(r))}};n.L0;var f=r(340);const g=e=>e?.body instanceof ReadableStream,y=e=>{const t={error:e,errorType:m(e)},r=v(e.$response);return r&&(t.retryAfterHint=r),t},m=e=>(0,i.Qb)(e)?"THROTTLING":(0,i.bV)(e)?"TRANSIENT":(0,i.GQ)(e)?"SERVER_ERROR":"CLIENT_ERROR",w={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},b=e=>({applyToStack:t=>{t.add((e=>(t,r)=>async i=>{let o=await e.retryStrategy();const a=await e.maxAttempts();if(!(e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess)(o))return o?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",o.mode]]),o.retry(t,i);{let e=await o.acquireInitialRetryToken(r.partition_id),u=new Error,d=0,p=0;const{request:h}=i,m=s.Kd.isInstance(h);for(m&&(h.headers[n.l5]=l());;)try{m&&(h.headers[n.ok]=`attempt=${d+1}; max=${a}`);const{response:r,output:s}=await t(i);return o.recordSuccess(e),s.$metadata.attempts=d+1,s.$metadata.totalRetryDelay=p,{response:r,output:s}}catch(t){const n=y(t);if(u=(c=t)instanceof Error?c:c instanceof Object?Object.assign(new Error,c):"string"==typeof c?new Error(c):new Error(`AWS SDK error wrapper for ${c}`),m&&g(h))throw(r.logger instanceof f.N4?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),u;try{e=await o.refreshRetryTokenForRetry(e,n)}catch(e){throw u.$metadata||(u.$metadata={}),u.$metadata.attempts=d+1,u.$metadata.totalRetryDelay=p,u}d=e.getRetryCount();const s=e.getRetryDelay();p+=s,await new Promise((e=>setTimeout(e,s)))}}var c})(e),w)}}),v=e=>{if(!s.cS.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const r=e.headers[t],n=Number(r);return Number.isNaN(n)?new Date(r):new Date(1e3*n)}},208:(e,t,r)=>{"use strict";r.d(t,{TM:()=>a,Ou:()=>o});const n=(e,t)=>r=>async n=>{const{response:s}=await r(n);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}},s=(e,t)=>(r,n)=>async s=>{const i=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint;if(!i)throw new Error("No valid endpoint provider available.");const o=await t(s.input,{...e,endpoint:i});return r({...s,request:o})},i={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},o={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function a(e,t,r){return{applyToStack:a=>{a.add(n(e,r),i),a.add(s(e,t),o)}}}},55:(e,t,r)=>{"use strict";r.d(t,{C1:()=>s,Bj:()=>i});class n extends Error{constructor(e,t=!0){let r,s=!0;"boolean"==typeof t?(r=void 0,s=t):null!=t&&"object"==typeof t&&(r=t.logger,s=t.tryNextLink??!0),super(e),this.name="ProviderError",this.tryNextLink=s,Object.setPrototypeOf(this,n.prototype),r?.debug?.(`@smithy/property-provider ${s?"->":"(!)"} ${e}`)}static from(e,t=!0){return Object.assign(new this(e.message,t),e)}}class s extends n{constructor(e,t=!0){super(e,t),this.name="CredentialsProviderError",Object.setPrototypeOf(this,s.prototype)}}const i=(e,t,r)=>{let n,s,i,o=!1;const a=async()=>{s||(s=e());try{n=await s,i=!0,o=!1}finally{s=void 0}return n};return void 0===t?async e=>(i&&!e?.forceRefresh||(n=await a()),n):async e=>(i&&!e?.forceRefresh||(n=await a()),o?n:r&&!r(n)?(o=!0,n):t(n)?(await a(),n):n)}},479:(e,t,r)=>{"use strict";r.d(t,{Kd:()=>i,cS:()=>o,eS:()=>n,jt:()=>s});const n=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,r){t.updateHttpClientConfig(e,r)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},s=e=>({httpHandler:e.httpHandler()});r(523);class i{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){const e=new i({...this,headers:{...this.headers}});var t;return e.query&&(e.query=(t=e.query,Object.keys(t).reduce(((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}}),{}))),e}}class o{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}},542:(e,t,r)=>{"use strict";r.d(t,{h5:()=>u,S0:()=>c,GQ:()=>p,Qb:()=>d,bV:()=>l});const n=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],s=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],i=["TimeoutError","RequestTimeout","RequestTimeoutException"],o=[500,502,503,504],a=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],c=e=>void 0!==e.$retryable,u=e=>n.includes(e.name),d=e=>429===e.$metadata?.httpStatusCode||s.includes(e.name)||1==e.$retryable?.throttling,l=e=>(e=>e.$metadata?.clockSkewCorrected)(e)||i.includes(e.name)||a.includes(e?.code||"")||o.includes(e.$metadata?.httpStatusCode||0),p=e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!l(e)}return!1}},340:(e,t,r)=>{"use strict";r.d(t,{Kj:()=>u,uB:()=>y,N4:()=>n,$H:()=>w,TJ:()=>T,Ss:()=>W,Px:()=>f,Mw:()=>R,Y0:()=>v,r$:()=>b,lK:()=>S,xA:()=>N,lT:()=>k,Tj:()=>D,l3:()=>A,uv:()=>_,un:()=>V,s:()=>L,jr:()=>O});class n{trace(){}debug(){}info(){}warn(){}error(){}}const s=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const e of t)r.push(e);return r},i=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,o=()=>{let e=[],t=[],r=!1;const n=new Set,u=r=>(e.forEach((e=>{r.add(e.middleware,{...e})})),t.forEach((e=>{r.addRelativeTo(e.middleware,{...e})})),r.identifyOnResolve?.(p.identifyOnResolve()),r),d=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...d(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...d(e))})),t},l=(r=!1)=>{const n=[],o=[],u={};var l;return e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of s(t.name,t.aliases))u[e]=t;n.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of s(t.name,t.aliases))u[e]=t;o.push(t)})),o.forEach((e=>{if(e.toMiddleware){const t=u[e.toMiddleware];if(void 0===t){if(r)return;throw new Error(`${e.toMiddleware} is not found when adding ${i(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(l=n,l.sort(((e,t)=>a[t.step]-a[e.step]||c[t.priority||"normal"]-c[e.priority||"normal"]))).map(d).reduce(((e,t)=>(e.push(...t),e)),[])},p={add:(t,r={})=>{const{name:o,override:a,aliases:c}=r,u={step:"initialize",priority:"normal",middleware:t,...r},d=s(o,c);if(d.length>0){if(d.some((e=>n.has(e)))){if(!a)throw new Error(`Duplicate middleware name '${i(o,c)}'`);for(const t of d){const r=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===r)continue;const n=e[r];if(n.step!==u.step||u.priority!==n.priority)throw new Error(`"${i(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${i(o,c)}" middleware with ${u.priority} priority in ${u.step} step.`);e.splice(r,1)}}for(const e of d)n.add(e)}e.push(u)},addRelativeTo:(e,r)=>{const{name:o,override:a,aliases:c}=r,u={middleware:e,...r},d=s(o,c);if(d.length>0){if(d.some((e=>n.has(e)))){if(!a)throw new Error(`Duplicate middleware name '${i(o,c)}'`);for(const e of d){const r=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===r)continue;const n=t[r];if(n.toMiddleware!==u.toMiddleware||n.relation!==u.relation)throw new Error(`"${i(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${i(o,c)}" middleware ${u.relation} "${u.toMiddleware}" middleware.`);t.splice(r,1)}}for(const e of d)n.add(e)}t.push(u)},clone:()=>u(o()),use:e=>{e.applyToStack(p)},remove:r=>"string"==typeof r?(r=>{let i=!1;const o=e=>{const t=s(e.name,e.aliases);if(t.includes(r)){i=!0;for(const e of t)n.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(r):(r=>{let i=!1;const o=e=>{if(e.middleware===r){i=!0;for(const t of s(e.name,e.aliases))n.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(r),removeByTag:r=>{let i=!1;const o=e=>{const{tags:t,name:o,aliases:a}=e;if(t&&t.includes(r)){const e=s(o,a);for(const t of e)n.delete(t);return i=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),i},concat:e=>{const t=u(o());return t.use(e),t.identifyOnResolve(r||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:u,identify:()=>l(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return i(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(r=e),r),resolve:(e,t)=>{for(const r of l().map((e=>e.middleware)).reverse())e=r(e,t);return r&&console.log(p.identify()),e}};return p},a={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},c={high:3,normal:2,low:1};class u{constructor(e){this.middlewareStack=o(),this.config=e}send(e,t,r){const n="function"!=typeof t?t:void 0,s="function"==typeof t?t:r,i=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!s)return i(e).then((e=>e.output));i(e).then((e=>s(null,e.output)),(e=>s(e))).catch((()=>{}))}destroy(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()}}var d=r(302),l=r(792),p=r(637);class h extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?h.mutate((0,d.E)(e)):h.mutate((0,p.a)(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,h.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?(0,d.n)(e):(0,l.P)(e)}(this,e)}}r(957),r(4);const f=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return h.mutate(e);if(!e)return h.mutate(new Uint8Array);const r=t.streamCollector(e);return h.mutate(await r)};var g=r(523);class y{constructor(){this.middlewareStack=o()}static classBuilder(){return new m}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:s,commandName:i,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const s of n.bind(this)(d,e,t,r))this.middlewareStack.use(s);const l=e.concat(this.middlewareStack),{logger:p}=t,h={logger:p,clientName:s,commandName:i,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,[g.Vf]:{...c},...u},{requestHandler:f}=t;return l.resolve((e=>f.handle(e.request,r||{})),h)}}class m{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=(e=>e),t=(e=>e)){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends y{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(r,n,s){return this.resolveMiddlewareWithContext(r,n,s,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const w="***SensitiveInformation***",b=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&x.warn(M(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},v=(Math.ceil(2**127*(2-2**-23)),(e,t)=>{if(null==e){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e}),S=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return x.warn(M(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},E=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,P=e=>{const t=e.match(E);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},M=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),x={warn:console.warn},A=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else{if("string"!=typeof e)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=(e=>b("string"==typeof e?P(e):e))(e)}if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))};class T extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,T.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const R=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,r])=>{null!=e[t]&&""!==e[t]||(e[t]=r)}));const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},O=e=>({output:t,parsedBody:r,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{const s=C(e),i=s.httpStatusCode?s.httpStatusCode+"":void 0,o=new r({name:t?.code||t?.Code||n||i||"UnknownError",$fault:"client",$metadata:s});throw R(o,t)})({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})},C=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),k=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},I=e=>{const t=[];for(const r in g.dB){const n=g.dB[r];void 0!==e[n]&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},$=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},j=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},F=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},N=e=>({...I(e),...j(e)}),_=e=>({...$(e),...F(e)}),U=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};function D(e,t,r){let n,s,i;if(void 0===t&&void 0===r)n={},i=e;else{if(n=e,"function"==typeof t)return s=t,i=r,B(n,s,i);i=t}for(const e of Object.keys(i))Array.isArray(i[e])?z(n,null,i,e):n[e]=i[e];return n}U.prototype=Object.create(String.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(U,String);const L=(e,t)=>{const r={};for(const n in t)z(r,e,t,n);return r},B=(e,t,r)=>D(e,Object.entries(r).reduce(((e,[r,n])=>(Array.isArray(n)?e[r]=n:e[r]="function"==typeof n?[t,n()]:[t,n],e)),{})),z=(e,t,r,n)=>{if(null!==t){let s=r[n];"function"==typeof s&&(s=[,s]);const[i=q,o=K,a=n]=s;return void(("function"==typeof i&&i(t[a])||"function"!=typeof i&&i)&&(e[n]=o(t[a])))}let[s,i]=r[n];if("function"==typeof i){let t;const r=void 0===s&&null!=(t=i()),o="function"==typeof s&&!!s(void 0)||"function"!=typeof s&&!!s;r?e[n]=t:o&&(e[n]=i())}else{const t=void 0===s&&null!=i,r="function"==typeof s&&!!s(i)||"function"!=typeof s&&!!s;(t||r)&&(e[n]=i)}},q=e=>null!=e,K=e=>e;function H(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}const V=(e,t,r,n,s,i)=>{if(null==t||void 0===t[r])throw new Error("No value provided for input HTTP label: "+r+".");{const t=n();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+r+".");e=e.replace(s,i?t.split("/").map((e=>H(e))).join("/"):H(t))}return e},W=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(W);if("object"==typeof e){const t={};for(const r of Object.keys(e))null!=e[r]&&(t[r]=W(e[r]));return t}return e}},523:(e,t,r)=>{"use strict";var n,s,i,o,a;r.d(t,{dB:()=>o,Ue:()=>i,Vf:()=>c}),function(e){e.HEADER="header",e.QUERY="query"}(n||(n={})),function(e){e.HEADER="header",e.QUERY="query"}(s||(s={})),function(e){e.HTTP="http",e.HTTPS="https"}(i||(i={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(o||(o={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(a||(a={}));const c="__smithy_context";var u,d;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(u||(u={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(d||(d={}))},641:(e,t,r)=>{"use strict";r.d(t,{D:()=>n});const n=e=>{if("string"==typeof e)return n(new URL(e));const{hostname:t,pathname:r,port:s,protocol:i,search:o}=e;let a;return o&&(a=function(e){const t={};if(e=e.replace(/^\?/,""))for(const r of e.split("&")){let[e,n=null]=r.split("=");e=decodeURIComponent(e),n&&(n=decodeURIComponent(n)),e in t?Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]:t[e]=n}return t}(o)),{hostname:t,port:s?parseInt(s):void 0,protocol:i,path:r,query:a}}},302:(e,t,r)=>{"use strict";r.d(t,{E:()=>c,n:()=>d});const n={},s=new Array(64);for(let e=0,t="A".charCodeAt(0),r="Z".charCodeAt(0);e+t<=r;e++){const r=String.fromCharCode(e+t);n[r]=e,s[e]=r}for(let e=0,t="a".charCodeAt(0),r="z".charCodeAt(0);e+t<=r;e++){const r=String.fromCharCode(e+t),i=e+26;n[r]=i,s[i]=r}for(let e=0;e<10;e++){n[e.toString(10)]=e+52;const t=e.toString(10),r=e+52;n[t]=r,s[r]=t}n["+"]=62,s[62]="+",n["/"]=63,s[63]="/";const i=6,o=8,a=63,c=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const r=new ArrayBuffer(t),s=new DataView(r);for(let t=0;t<e.length;t+=4){let r=0,a=0;for(let s=t,o=t+3;s<=o;s++)if("="!==e[s]){if(!(e[s]in n))throw new TypeError(`Invalid character ${e[s]} in base64 string.`);r|=n[e[s]]<<(o-s)*i,a+=i}else r>>=i;const c=t/4*3;r>>=a%o;const u=Math.floor(a/o);for(let e=0;e<u;e++){const t=(u-e-1)*o;s.setUint8(c+e,(r&255<<t)>>t)}}return new Uint8Array(r)};var u=r(637);function d(e){let t;t="string"==typeof e?(0,u.a)(e):e;const r="object"==typeof t&&"number"==typeof t.length,n="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let c="";for(let e=0;e<t.length;e+=3){let r=0,n=0;for(let s=e,i=Math.min(e+3,t.length);s<i;s++)r|=t[s]<<(i-s-1)*o,n+=o;const u=Math.ceil(n/i);r<<=u*i-n;for(let e=1;e<=u;e++){const t=(u-e)*i;c+=s[(r&a<<t)>>t]}c+="==".slice(0,4-u)}return c}},795:(e,t,r)=>{"use strict";r.d(t,{n:()=>s});const n="function"==typeof TextEncoder?new TextEncoder:null,s=e=>{if("string"==typeof e){if(n)return n.encode(e).byteLength;let t=e.length;for(let r=t-1;r>=0;r--){const n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)}},246:(e,t,r)=>{"use strict";r.d(t,{I:()=>a});var n=r(55),s=r(880),i=r.n(s);const o=["in-region","cross-region","mobile","standard","legacy"],a=({defaultsMode:e}={})=>(0,n.Bj)((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(c()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${o.join(", ")}, got ${t}`)}})),c=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?i().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t}},875:(e,t,r)=>{"use strict";r.d(t,{mw:()=>a,oX:()=>s,X8:()=>o,sO:()=>R});const n=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),s=e=>n.test(e)||e.startsWith("[")&&e.endsWith("]"),i=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),o=(e,t=!1)=>{if(!t)return i.test(e);const r=e.split(".");for(const e of r)if(!o(e))return!1;return!0},a={},c="endpoints";function u(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${u(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(u).join(", ")})`:JSON.stringify(e,null,2)}class d extends Error{constructor(e){super(e),this.name="EndpointError"}}const l=(e,t)=>(e=>{const t=e.split("."),r=[];for(const n of t){const t=n.indexOf("[");if(-1!==t){if(n.indexOf("]")!==n.length-1)throw new d(`Path: '${e}' does not end with ']'`);const s=n.slice(t+1,-1);if(Number.isNaN(parseInt(s)))throw new d(`Invalid array index: '${s}' in path: '${e}'`);0!==t&&r.push(n.slice(0,t)),r.push(s)}else r.push(n)}return r})(t).reduce(((r,n)=>{if("object"!=typeof r)throw new d(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]}),e);var p=r(523);const h={[p.Ue.HTTP]:80,[p.Ue.HTTPS]:443},f={booleanEquals:(e,t)=>e===t,getAttr:l,isSet:e=>null!=e,isValidHostLabel:o,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:r,protocol:n="",path:s="",query:i={}}=e,o=new URL(`${n}//${t}${r?`:${r}`:""}${s}`);return o.search=Object.entries(i).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:n,hostname:i,pathname:o,protocol:a,search:c}=t;if(c)return null;const u=a.slice(0,-1);if(!Object.values(p.Ue).includes(u))return null;const d=s(i);return{scheme:u,authority:`${n}${r.includes(`${n}:${h[u]}`)||"string"==typeof e&&e.includes(`${n}:${h[u]}`)?`:${h[u]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:d}},stringEquals:(e,t)=>e===t,substring:(e,t,r,n)=>t>=r||e.length<r?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},g=(e,t)=>{const r=[],n={...t.endpointParams,...t.referenceRecord};let s=0;for(;s<e.length;){const t=e.indexOf("{",s);if(-1===t){r.push(e.slice(s));break}r.push(e.slice(s,t));const i=e.indexOf("}",t);if(-1===i){r.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[i+1]&&(r.push(e.slice(t+1,i)),s=i+2);const o=e.substring(t+1,i);if(o.includes("#")){const[e,t]=o.split("#");r.push(l(n[e],t))}else r.push(n[o]);s=i+1}return r.join("")},y=(e,t,r)=>{if("string"==typeof e)return g(e,r);if(e.fn)return m(e,r);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,r);throw new d(`'${t}': ${String(e)} is not a string, function or reference.`)},m=({fn:e,argv:t},r)=>{const n=t.map((e=>["boolean","number"].includes(typeof e)?e:y(e,"arg",r))),s=e.split(".");return s[0]in a&&null!=s[1]?a[s[0]][s[1]](...n):f[e](...n)},w=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new d(`'${e}' is already defined in Reference Record.`);const n=m(t,r);return r.logger?.debug?.(`${c} evaluateCondition: ${u(t)} = ${u(n)}`),{result:""===n||!!n,...null!=e&&{toAssign:{name:e,value:n}}}},b=(e=[],t)=>{const r={};for(const n of e){const{result:e,toAssign:s}=w(n,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!e)return{result:e};s&&(r[s.name]=s.value,t.logger?.debug?.(`${c} assign: ${s.name} := ${u(s.value)}`))}return{result:!0,referenceRecord:r}},v=(e,t)=>Object.entries(e).reduce(((e,[r,n])=>({...e,[r]:n.map((e=>{const n=y(e,"Header value entry",t);if("string"!=typeof n)throw new d(`Header '${r}' value '${n}' is not a string`);return n}))})),{}),S=(e,t)=>{if(Array.isArray(e))return e.map((e=>S(e,t)));switch(typeof e){case"string":return g(e,t);case"object":if(null===e)throw new d(`Unexpected endpoint property: ${e}`);return E(e,t);case"boolean":return e;default:throw new d("Unexpected endpoint property type: "+typeof e)}},E=(e,t)=>Object.entries(e).reduce(((e,[r,n])=>({...e,[r]:S(n,t)})),{}),P=(e,t)=>{const r=y(e,"Endpoint URL",t);if("string"==typeof r)try{return new URL(r)}catch(e){throw console.error(`Failed to construct URL with ${r}`,e),e}throw new d("Endpoint URL must be a string, got "+typeof r)},M=(e,t)=>{const{conditions:r,endpoint:n}=e,{result:s,referenceRecord:i}=b(r,t);if(!s)return;const o={...t,referenceRecord:{...t.referenceRecord,...i}},{url:a,properties:d,headers:l}=n;return t.logger?.debug?.(`${c} Resolving endpoint from template: ${u(n)}`),{...null!=l&&{headers:v(l,o)},...null!=d&&{properties:E(d,o)},url:P(a,o)}},x=(e,t)=>{const{conditions:r,error:n}=e,{result:s,referenceRecord:i}=b(r,t);if(s)throw new d(y(n,"Error",{...t,referenceRecord:{...t.referenceRecord,...i}}))},A=(e,t)=>{const{conditions:r,rules:n}=e,{result:s,referenceRecord:i}=b(r,t);if(s)return T(n,{...t,referenceRecord:{...t.referenceRecord,...i}})},T=(e,t)=>{for(const r of e)if("endpoint"===r.type){const e=M(r,t);if(e)return e}else if("error"===r.type)x(r,t);else{if("tree"!==r.type)throw new d(`Unknown endpoint rule: ${r}`);{const e=A(r,t);if(e)return e}}throw new d("Rules evaluation failed")},R=(e,t)=>{const{endpointParams:r,logger:n}=t,{parameters:s,rules:i}=e;t.logger?.debug?.(`${c} Initial EndpointParams: ${u(r)}`);const o=Object.entries(s).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)r[e]=r[e]??t;const a=Object.entries(s).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==r[e])throw new d(`Missing required parameter: '${e}'`);const l=T(i,{endpointParams:r,logger:n,referenceRecord:{}});if(t.endpointParams?.Endpoint)try{const e=new URL(t.endpointParams.Endpoint),{protocol:r,port:n}=e;l.url.protocol=r,l.url.port=n}catch(e){}return t.logger?.debug?.(`${c} Resolved endpoint: ${u(l)}`),l}},4:(e,t,r)=>{"use strict";r.d(t,{a:()=>i,n:()=>o});const n={},s={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),n[e]=t,s[t]=e}function i(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(!(n in s))throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`);t[r/2]=s[n]}return t}function o(e){let t="";for(let r=0;r<e.byteLength;r++)t+=n[e[r]];return t}},135:(e,t,r)=>{"use strict";r.d(t,{u:()=>s,t:()=>i});var n=r(523);const s=e=>e[n.Vf]||(e[n.Vf]={}),i=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t}},323:(e,t,r)=>{"use strict";var n;r.d(t,{Y:()=>b,Gz:()=>s,bp:()=>c,L0:()=>i,QJ:()=>a,Df:()=>l,l5:()=>g,G8:()=>u,XP:()=>f,ok:()=>y,XS:()=>p,cm:()=>n,ru:()=>w,jh:()=>d,Rn:()=>h}),function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(n||(n={}));const s=3,i=n.STANDARD;var o=r(542);class a{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),(0,o.Qb)(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const c=100,u=2e4,d=500,l=500,p=5,h=10,f=1,g="amz-sdk-invocation-id",y="amz-sdk-request",m=({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(u,e),getRetryCost:()=>r});class w{constructor(e){this.maxAttempts=e,this.mode=n.STANDARD,this.capacity=l,this.retryBackoffStrategy=(()=>{let e=c;return{computeNextBackoffDelay:t=>Math.floor(Math.min(u,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return m({retryDelay:c,retryCount:0})}async refreshRetryTokenForRetry(e,t){const r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){const r=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===r?d:c);const n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,i=this.getCapacityCost(r);return this.capacity-=i,m({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(l,this.capacity+(e.getRetryCost()??f))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${s}`),s}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?h:p}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class b{constructor(e,t){this.maxAttemptsProvider=e,this.mode=n.ADAPTIVE;const{rateLimiter:r}=t??{};this.rateLimiter=r??new a,this.standardRetryStrategy=new w(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}},531:(e,t,r)=>{"use strict";r.d(t,{o:()=>n});const n=e=>encodeURIComponent(e).replace(/[!'()*]/g,s),s=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`},637:(e,t,r)=>{"use strict";r.d(t,{a:()=>n});const n=e=>(new TextEncoder).encode(e)},792:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});const n=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)}},880:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(n,s,function(t){return e[t]}.bind(null,s));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),s=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var s=e.getVersionPrecision(t),i=e.getVersionPrecision(r),o=Math.max(s,i),a=0,c=e.map([t,r],(function(t){var r=o-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(a=o-Math.min(s,i)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var s=e[r];if(t(s,r))return s}},e.assign=function(e){for(var t,r,n=e,s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(i));var a=function(){var e=i[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=i.length;t<r;t+=1)a();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=s,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,s=(n=r(91))&&n.__esModule?n:{default:n},i=r(18);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(){}var t,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new s.default(e,t)},e.parse=function(e){return new s.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return i.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return i.ENGINE_MAP}},{key:"OS_MAP",get:function(){return i.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return i.PLATFORMS_MAP}}],null&&o(t.prototype,null),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=c(r(92)),s=c(r(93)),i=c(r(94)),o=c(r(95)),a=c(r(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,s={},i=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(s[t]=o,i+=1):"object"==typeof o&&(r[t]=o,n+=1)})),n>0){var o=Object.keys(r),c=a.default.find(o,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(r[c]);if(void 0!==u)return u}var d=a.default.find(o,(function(e){return t.isPlatform(e)}));if(d){var l=this.satisfies(r[d]);if(void 0!==l)return l}}if(i>0){var p=Object.keys(s),h=a.default.find(p,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(s[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),s=a.default.getBrowserTypeByAlias(n);return t&&s&&(n=s.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,s=this.getBrowserVersion();if("string"==typeof s)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(a.default.compareVersions(s,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,s=(n=r(17))&&n.__esModule?n:{default:n},i=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=s.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=s.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=s.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=s.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=s.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=s.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=s.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=s.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=s.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=s.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=s.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=s.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=s.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=s.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=s.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=s.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=s.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=s.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=s.default.getFirstMatch(i,e)||s.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=s.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=s.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=s.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=s.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=s.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=s.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=s.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=s.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=s.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=s.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:s.default.getFirstMatch(t,e),version:s.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,s=(n=r(17))&&n.__esModule?n:{default:n},i=r(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=s.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=s.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=s.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=s.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},r=s.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=s.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=s.default.getMacOSVersionName(t),n={name:i.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=s.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=s.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=s.default.getAndroidVersionName(t),n={name:i.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=s.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:i.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=s.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||s.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||s.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=s.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=s.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=s.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,s=(n=r(17))&&n.__esModule?n:{default:n},i=r(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=s.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=s.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,s=(n=r(17))&&n.__esModule?n:{default:n},i=r(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=s.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},r=s.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:i.ENGINE_MAP.Presto},r=s.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:i.ENGINE_MAP.Gecko},r=s.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},r=s.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=o,e.exports=t.default}})},635:(e,t,r)=>{"use strict";function n(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))}function s(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(s=2&a[0]?n.return:a[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;switch(n=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function i(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}r.d(t,{Ju:()=>i,YH:()=>s,sH:()=>n}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e].call(i.exports,i,i.exports,s),i.exports}s.m=r,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,r)=>(s.f[r](e,t),t)),[])),s.u=e=>e+".js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="message-translator-tool:",s.l=(r,n,i,o)=>{if(e[r])e[r].push(n);else{var a,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),d=0;d<u.length;d++){var l=u[d];if(l.getAttribute("src")==r||l.getAttribute("data-webpack")==t+i){a=l;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",t+i),a.src=r),e[r]=[n];var p=(t,n)=>{a.onerror=a.onload=null,clearTimeout(h);var s=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach((e=>e(n))),t)return t(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),c&&document.head.appendChild(a)}},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{var e={792:0};s.f.j=(t,r)=>{var n=s.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,s)=>n=e[t]=[r,s]));r.push(n[2]=i);var o=s.p+s.u(t),a=new Error;s.l(o,(r=>{if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,n[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[o,a,c]=r,u=0;if(o.some((t=>0!==e[t]))){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);c&&c(s)}for(t&&t(r);u<o.length;u++)i=o[u],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=self.webpackChunkmessage_translator_tool=self.webpackChunkmessage_translator_tool||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e=s(12),t=s(208),r=s(340);const n={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class i extends r.TJ{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}}class o extends i{constructor(e){super({name:"InvalidParameterValueException",$fault:"client",...e}),this.name="InvalidParameterValueException",this.$fault="client",Object.setPrototypeOf(this,o.prototype),this.Type=e.Type}}class a extends i{constructor(e){super({name:"PolicyLengthExceededException",$fault:"client",...e}),this.name="PolicyLengthExceededException",this.$fault="client",Object.setPrototypeOf(this,a.prototype),this.Type=e.Type}}class c extends i{constructor(e){super({name:"PreconditionFailedException",$fault:"client",...e}),this.name="PreconditionFailedException",this.$fault="client",Object.setPrototypeOf(this,c.prototype),this.Type=e.Type}}class u extends i{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,u.prototype),this.Type=e.Type}}class d extends i{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,d.prototype),this.Type=e.Type,this.Message=e.Message}}class l extends i{constructor(e){super({name:"ServiceException",$fault:"server",...e}),this.name="ServiceException",this.$fault="server",Object.setPrototypeOf(this,l.prototype),this.Type=e.Type,this.Message=e.Message}}class p extends i{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,p.prototype),this.retryAfterSeconds=e.retryAfterSeconds,this.Type=e.Type,this.Reason=e.Reason}}class h extends i{constructor(e){super({name:"CodeSigningConfigNotFoundException",$fault:"client",...e}),this.name="CodeSigningConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,h.prototype),this.Type=e.Type,this.Message=e.Message}}class f extends i{constructor(e){super({name:"CodeStorageExceededException",$fault:"client",...e}),this.name="CodeStorageExceededException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.Type=e.Type}}class g extends i{constructor(e){super({name:"CodeVerificationFailedException",$fault:"client",...e}),this.name="CodeVerificationFailedException",this.$fault="client",Object.setPrototypeOf(this,g.prototype),this.Type=e.Type,this.Message=e.Message}}class y extends i{constructor(e){super({name:"InvalidCodeSignatureException",$fault:"client",...e}),this.name="InvalidCodeSignatureException",this.$fault="client",Object.setPrototypeOf(this,y.prototype),this.Type=e.Type,this.Message=e.Message}}class m extends i{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,m.prototype),this.Type=e.Type,this.Message=e.Message}}class w extends i{constructor(e){super({name:"ProvisionedConcurrencyConfigNotFoundException",$fault:"client",...e}),this.name="ProvisionedConcurrencyConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,w.prototype),this.Type=e.Type}}class b extends i{constructor(e){super({name:"EC2AccessDeniedException",$fault:"server",...e}),this.name="EC2AccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,b.prototype),this.Type=e.Type,this.Message=e.Message}}class v extends i{constructor(e){super({name:"EC2ThrottledException",$fault:"server",...e}),this.name="EC2ThrottledException",this.$fault="server",Object.setPrototypeOf(this,v.prototype),this.Type=e.Type,this.Message=e.Message}}class S extends i{constructor(e){super({name:"EC2UnexpectedException",$fault:"server",...e}),this.name="EC2UnexpectedException",this.$fault="server",Object.setPrototypeOf(this,S.prototype),this.Type=e.Type,this.Message=e.Message,this.EC2ErrorCode=e.EC2ErrorCode}}class E extends i{constructor(e){super({name:"EFSIOException",$fault:"client",...e}),this.name="EFSIOException",this.$fault="client",Object.setPrototypeOf(this,E.prototype),this.Type=e.Type,this.Message=e.Message}}class P extends i{constructor(e){super({name:"EFSMountConnectivityException",$fault:"client",...e}),this.name="EFSMountConnectivityException",this.$fault="client",Object.setPrototypeOf(this,P.prototype),this.Type=e.Type,this.Message=e.Message}}class M extends i{constructor(e){super({name:"EFSMountFailureException",$fault:"client",...e}),this.name="EFSMountFailureException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.Type=e.Type,this.Message=e.Message}}class x extends i{constructor(e){super({name:"EFSMountTimeoutException",$fault:"client",...e}),this.name="EFSMountTimeoutException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.Type=e.Type,this.Message=e.Message}}class A extends i{constructor(e){super({name:"ENILimitReachedException",$fault:"server",...e}),this.name="ENILimitReachedException",this.$fault="server",Object.setPrototypeOf(this,A.prototype),this.Type=e.Type,this.Message=e.Message}}class T extends i{constructor(e){super({name:"InvalidRequestContentException",$fault:"client",...e}),this.name="InvalidRequestContentException",this.$fault="client",Object.setPrototypeOf(this,T.prototype),this.Type=e.Type}}class R extends i{constructor(e){super({name:"InvalidRuntimeException",$fault:"server",...e}),this.name="InvalidRuntimeException",this.$fault="server",Object.setPrototypeOf(this,R.prototype),this.Type=e.Type,this.Message=e.Message}}class O extends i{constructor(e){super({name:"InvalidSecurityGroupIDException",$fault:"server",...e}),this.name="InvalidSecurityGroupIDException",this.$fault="server",Object.setPrototypeOf(this,O.prototype),this.Type=e.Type,this.Message=e.Message}}class C extends i{constructor(e){super({name:"InvalidSubnetIDException",$fault:"server",...e}),this.name="InvalidSubnetIDException",this.$fault="server",Object.setPrototypeOf(this,C.prototype),this.Type=e.Type,this.Message=e.Message}}class k extends i{constructor(e){super({name:"InvalidZipFileException",$fault:"server",...e}),this.name="InvalidZipFileException",this.$fault="server",Object.setPrototypeOf(this,k.prototype),this.Type=e.Type,this.Message=e.Message}}class I extends i{constructor(e){super({name:"KMSAccessDeniedException",$fault:"server",...e}),this.name="KMSAccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,I.prototype),this.Type=e.Type,this.Message=e.Message}}class $ extends i{constructor(e){super({name:"KMSDisabledException",$fault:"server",...e}),this.name="KMSDisabledException",this.$fault="server",Object.setPrototypeOf(this,$.prototype),this.Type=e.Type,this.Message=e.Message}}class j extends i{constructor(e){super({name:"KMSInvalidStateException",$fault:"server",...e}),this.name="KMSInvalidStateException",this.$fault="server",Object.setPrototypeOf(this,j.prototype),this.Type=e.Type,this.Message=e.Message}}class F extends i{constructor(e){super({name:"KMSNotFoundException",$fault:"server",...e}),this.name="KMSNotFoundException",this.$fault="server",Object.setPrototypeOf(this,F.prototype),this.Type=e.Type,this.Message=e.Message}}class N extends i{constructor(e){super({name:"RecursiveInvocationException",$fault:"client",...e}),this.name="RecursiveInvocationException",this.$fault="client",Object.setPrototypeOf(this,N.prototype),this.Type=e.Type,this.Message=e.Message}}class _ extends i{constructor(e){super({name:"RequestTooLargeException",$fault:"client",...e}),this.name="RequestTooLargeException",this.$fault="client",Object.setPrototypeOf(this,_.prototype),this.Type=e.Type}}class U extends i{constructor(e){super({name:"ResourceNotReadyException",$fault:"server",...e}),this.name="ResourceNotReadyException",this.$fault="server",Object.setPrototypeOf(this,U.prototype),this.Type=e.Type}}class D extends i{constructor(e){super({name:"SnapStartException",$fault:"client",...e}),this.name="SnapStartException",this.$fault="client",Object.setPrototypeOf(this,D.prototype),this.Type=e.Type,this.Message=e.Message}}class L extends i{constructor(e){super({name:"SnapStartNotReadyException",$fault:"client",...e}),this.name="SnapStartNotReadyException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.Type=e.Type,this.Message=e.Message}}class B extends i{constructor(e){super({name:"SnapStartTimeoutException",$fault:"client",...e}),this.name="SnapStartTimeoutException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.Type=e.Type,this.Message=e.Message}}class z extends i{constructor(e){super({name:"SubnetIPAddressLimitReachedException",$fault:"server",...e}),this.name="SubnetIPAddressLimitReachedException",this.$fault="server",Object.setPrototypeOf(this,z.prototype),this.Type=e.Type,this.Message=e.Message}}class q extends i{constructor(e){super({name:"UnsupportedMediaTypeException",$fault:"client",...e}),this.name="UnsupportedMediaTypeException",this.$fault="client",Object.setPrototypeOf(this,q.prototype),this.Type=e.Type}}var K;!function(e){e.visit=(e,t)=>void 0!==e.PayloadChunk?t.PayloadChunk(e.PayloadChunk):void 0!==e.InvokeComplete?t.InvokeComplete(e.InvokeComplete):t._(e.$unknown[0],e.$unknown[1])}(K||(K={}));const H=e=>({...e,...e.Payload&&{Payload:r.$H}}),V=e=>({...e,...e.Payload&&{Payload:r.$H}});var W=s(902),G=s(966);const Q=async(e,t)=>{const n=(0,G.lI)(e,t),s=(0,r.Tj)({},Ue,{"content-type":"application/octet-stream",[Je]:e[ze],[Xe]:e[Ke],[Ge]:e[De]});n.bp("/2015-03-31/functions/{FunctionName}/invocations"),n.p("FunctionName",(()=>e.FunctionName),"{FunctionName}",!1);const i=(0,r.Tj)({[He]:[,e[He]]});let o;return void 0!==e.Payload&&(o=e.Payload),n.m("POST").h(s).q(i).b(o),n.build()},Y=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return J(e,t);const n=(0,r.Tj)({$metadata:_e(e),[Be]:[,e.headers[Ye]],[qe]:[,e.headers[Ze]],[Le]:[,e.headers[Qe]]}),s=await(0,r.Px)(e.body,t);return n.Payload=s,(0,r.Tj)(n,{StatusCode:[,e.statusCode]}),n},J=async(e,t)=>{const r={...e,body:await(0,W.CG)(e.body,t)},n=(0,W.cJ)(e,r.body);switch(n){case"InvalidParameterValueException":case"com.amazonaws.lambda#InvalidParameterValueException":throw await le(r,t);case"PolicyLengthExceededException":case"com.amazonaws.lambda#PolicyLengthExceededException":throw await Se(r,t);case"PreconditionFailedException":case"com.amazonaws.lambda#PreconditionFailedException":throw await Ee(r,t);case"ResourceConflictException":case"com.amazonaws.lambda#ResourceConflictException":throw await Ae(r,t);case"ResourceNotFoundException":case"com.amazonaws.lambda#ResourceNotFoundException":throw await Re(r,t);case"ServiceException":case"com.amazonaws.lambda#ServiceException":throw await Ce(r,t);case"TooManyRequestsException":case"com.amazonaws.lambda#TooManyRequestsException":throw await Fe(r,t);case"CodeSigningConfigNotFoundException":case"com.amazonaws.lambda#CodeSigningConfigNotFoundException":throw await X(r,t);case"CodeStorageExceededException":case"com.amazonaws.lambda#CodeStorageExceededException":throw await ee(r,t);case"CodeVerificationFailedException":case"com.amazonaws.lambda#CodeVerificationFailedException":throw await te(r,t);case"InvalidCodeSignatureException":case"com.amazonaws.lambda#InvalidCodeSignatureException":throw await de(r,t);case"ResourceInUseException":case"com.amazonaws.lambda#ResourceInUseException":throw await Te(r,t);case"ProvisionedConcurrencyConfigNotFoundException":case"com.amazonaws.lambda#ProvisionedConcurrencyConfigNotFoundException":throw await Pe(r,t);case"EC2AccessDeniedException":case"com.amazonaws.lambda#EC2AccessDeniedException":throw await re(r,t);case"EC2ThrottledException":case"com.amazonaws.lambda#EC2ThrottledException":throw await ne(r,t);case"EC2UnexpectedException":case"com.amazonaws.lambda#EC2UnexpectedException":throw await se(r,t);case"EFSIOException":case"com.amazonaws.lambda#EFSIOException":throw await ie(r,t);case"EFSMountConnectivityException":case"com.amazonaws.lambda#EFSMountConnectivityException":throw await oe(r,t);case"EFSMountFailureException":case"com.amazonaws.lambda#EFSMountFailureException":throw await ae(r,t);case"EFSMountTimeoutException":case"com.amazonaws.lambda#EFSMountTimeoutException":throw await ce(r,t);case"ENILimitReachedException":case"com.amazonaws.lambda#ENILimitReachedException":throw await ue(r,t);case"InvalidRequestContentException":case"com.amazonaws.lambda#InvalidRequestContentException":throw await pe(r,t);case"InvalidRuntimeException":case"com.amazonaws.lambda#InvalidRuntimeException":throw await he(r,t);case"InvalidSecurityGroupIDException":case"com.amazonaws.lambda#InvalidSecurityGroupIDException":throw await fe(r,t);case"InvalidSubnetIDException":case"com.amazonaws.lambda#InvalidSubnetIDException":throw await ge(r,t);case"InvalidZipFileException":case"com.amazonaws.lambda#InvalidZipFileException":throw await ye(r,t);case"KMSAccessDeniedException":case"com.amazonaws.lambda#KMSAccessDeniedException":throw await me(r,t);case"KMSDisabledException":case"com.amazonaws.lambda#KMSDisabledException":throw await we(r,t);case"KMSInvalidStateException":case"com.amazonaws.lambda#KMSInvalidStateException":throw await be(r,t);case"KMSNotFoundException":case"com.amazonaws.lambda#KMSNotFoundException":throw await ve(r,t);case"RecursiveInvocationException":case"com.amazonaws.lambda#RecursiveInvocationException":throw await Me(r,t);case"RequestTooLargeException":case"com.amazonaws.lambda#RequestTooLargeException":throw await xe(r,t);case"ResourceNotReadyException":case"com.amazonaws.lambda#ResourceNotReadyException":throw await Oe(r,t);case"SnapStartException":case"com.amazonaws.lambda#SnapStartException":throw await ke(r,t);case"SnapStartNotReadyException":case"com.amazonaws.lambda#SnapStartNotReadyException":throw await Ie(r,t);case"SnapStartTimeoutException":case"com.amazonaws.lambda#SnapStartTimeoutException":throw await $e(r,t);case"SubnetIPAddressLimitReachedException":case"com.amazonaws.lambda#SubnetIPAddressLimitReachedException":throw await je(r,t);case"UnsupportedMediaTypeException":case"com.amazonaws.lambda#UnsupportedMediaTypeException":throw await Ne(r,t);default:const s=r.body;return Z({output:e,parsedBody:s,errorCode:n})}},Z=(0,r.jr)(i),X=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new h({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},ee=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Type:r.lK,message:r.lK});Object.assign(n,i);const o=new f({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},te=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new g({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},re=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new b({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},ne=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new v({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},se=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{EC2ErrorCode:r.lK,Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new S({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},ie=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new E({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},oe=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new P({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},ae=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new M({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},ce=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new x({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},ue=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new A({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},de=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new y({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},le=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Type:r.lK,message:r.lK});Object.assign(n,i);const a=new o({$metadata:_e(e),...n});return(0,r.Mw)(a,e.body)},pe=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Type:r.lK,message:r.lK});Object.assign(n,i);const o=new T({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},he=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new R({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},fe=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new O({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},ge=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new C({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},ye=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new k({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},me=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new I({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},we=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new $({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},be=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new j({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},ve=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new F({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Se=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Type:r.lK,message:r.lK});Object.assign(n,i);const o=new a({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Ee=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Type:r.lK,message:r.lK});Object.assign(n,i);const o=new c({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Pe=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Type:r.lK,message:r.lK});Object.assign(n,i);const o=new w({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Me=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new N({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},xe=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Type:r.lK,message:r.lK});Object.assign(n,i);const o=new _({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Ae=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Type:r.lK,message:r.lK});Object.assign(n,i);const o=new u({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Te=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new m({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Re=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new d({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Oe=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Type:r.lK,message:r.lK});Object.assign(n,i);const o=new U({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Ce=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new l({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},ke=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new D({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Ie=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new L({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},$e=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new B({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},je=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Message:r.lK,Type:r.lK});Object.assign(n,i);const o=new z({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Fe=async(e,t)=>{const n=(0,r.Tj)({[Ve]:[,e.headers[We]]}),s=e.body,i=(0,r.s)(s,{Reason:r.lK,Type:r.lK,message:r.lK});Object.assign(n,i);const o=new p({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},Ne=async(e,t)=>{const n=(0,r.Tj)({}),s=e.body,i=(0,r.s)(s,{Type:r.lK,message:r.lK});Object.assign(n,i);const o=new q({$metadata:_e(e),...n});return(0,r.Mw)(o,e.body)},_e=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Ue=e=>!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size),De="ClientContext",Le="ExecutedVersion",Be="FunctionError",ze="InvocationType",qe="LogResult",Ke="LogType",He="Qualifier",Ve="retryAfterSeconds",We="retry-after",Ge="x-amz-client-context",Qe="x-amz-executed-version",Ye="x-amz-function-error",Je="x-amz-invocation-type",Ze="x-amz-log-result",Xe="x-amz-log-type";class et extends(r.uB.classBuilder().ep({...n}).m((function(r,n,s,i){return[(0,t.TM)(s,this.serialize,this.deserialize),(0,e.rD)(s,r.getEndpointParameterInstructions())]})).s("AWSGirApiService","Invoke",{}).n("LambdaClient","InvokeCommand").f(H,V).ser(Q).de(Y).build()){}var tt=s(95),rt=s(359),nt=s(377),st=s(499),it=s(487),ot=s(649),at=s(234),ct=s(451),ut=s(135);const dt=async(e,t,r)=>({operation:(0,ut.u)(t).operation,region:await(0,ut.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),lt=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"lambda",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t};var pt=s(198),ht=s(391),ft=s(635),gt=s(967);!function(){function e(){this.crc32=new mt}e.prototype.update=function(e){(0,gt.Kz)(e)||this.crc32.update((0,gt.pP)(e))},e.prototype.digest=function(){return(0,ft.sH)(this,void 0,void 0,(function(){return(0,ft.YH)(this,(function(e){return[2,(0,gt.yl)(this.crc32.digest())]}))}))},e.prototype.reset=function(){this.crc32=new mt}}();var yt,mt=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var n=(0,ft.Ju)(e),s=n.next();!s.done;s=n.next()){var i=s.value;this.checksum=this.checksum>>>8^wt[255&(this.checksum^i)]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),wt=(0,gt.zB)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),bt=s(4);class vt{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;return e<0&&St(t),new vt(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&St(e),parseInt((0,bt.n)(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function St(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class Et{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const r of Object.keys(e)){const n=this.fromUtf8(r);t.push(Uint8Array.from([n.byteLength]),n,this.formatHeaderValue(e[r]))}const r=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let n=0;for(const e of t)r.set(e,n),n+=e.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);const i=new Uint8Array(s.buffer);return i.set(e.value,3),i;case"string":const o=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(vt.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!It.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set((0,bt.a)(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let r=0;for(;r<e.byteLength;){const n=e.getUint8(r++),s=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,n));switch(r+=n,e.getUint8(r++)){case 0:t[s]={type:Pt,value:!0};break;case 1:t[s]={type:Pt,value:!1};break;case 2:t[s]={type:Mt,value:e.getInt8(r++)};break;case 3:t[s]={type:xt,value:e.getInt16(r,!1)},r+=2;break;case 4:t[s]={type:At,value:e.getInt32(r,!1)},r+=4;break;case 5:t[s]={type:Tt,value:new vt(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:const n=e.getUint16(r,!1);r+=2,t[s]={type:Rt,value:new Uint8Array(e.buffer,e.byteOffset+r,n)},r+=n;break;case 7:const i=e.getUint16(r,!1);r+=2,t[s]={type:Ot,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,i))},r+=i;break;case 8:t[s]={type:Ct,value:new Date(new vt(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[s]={type:kt,value:`${(0,bt.n)(o.subarray(0,4))}-${(0,bt.n)(o.subarray(4,6))}-${(0,bt.n)(o.subarray(6,8))}-${(0,bt.n)(o.subarray(8,10))}-${(0,bt.n)(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(yt||(yt={}));const Pt="boolean",Mt="byte",xt="short",At="integer",Tt="long",Rt="binary",Ot="string",Ct="timestamp",kt="uuid",It=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class $t{constructor(e,t){this.headerMarshaller=new Et(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const r=this.headerMarshaller.format(e),n=r.byteLength+t.byteLength+16,s=new Uint8Array(n),i=new DataView(s.buffer,s.byteOffset,s.byteLength),o=new mt;return i.setUint32(0,n,!1),i.setUint32(4,r.byteLength,!1),i.setUint32(8,o.update(s.subarray(0,8)).digest(),!1),s.set(r,12),s.set(t,r.byteLength+12),i.setUint32(n-4,o.update(s.subarray(8,n-4)).digest(),!1),s}decode(e){const{headers:t,body:r}=function({byteLength:e,byteOffset:t,buffer:r}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const n=new DataView(r,t,e),s=n.getUint32(0,!1);if(e!==s)throw new Error("Reported message length does not match received message length");const i=n.getUint32(4,!1),o=n.getUint32(8,!1),a=n.getUint32(e-4,!1),c=(new mt).update(new Uint8Array(r,t,8));if(o!==c.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(r,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(r,t+8+4,i),body:new Uint8Array(r,t+8+4+i,s-i-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:r}}formatHeaders(e){return this.headerMarshaller.format(e)}}class jt{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Ft{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Nt{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class _t{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Ut(e,t){return async function(r){const{value:n}=r.headers[":message-type"];if("error"===n){const e=new Error(r.headers[":error-message"].value||"UnknownError");throw e.name=r.headers[":error-code"].value,e}if("exception"===n){const n=r.headers[":exception-type"].value,s={[n]:r},i=await e(s);if(i.$unknown){const e=new Error(t(r.body));throw e.name=n,e}throw i[n]}if("event"===n){const t={[r.headers[":event-type"].value]:r},n=await e(t);if(n.$unknown)return;return n}throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}class Dt{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new $t(e,t),this.utfEncoder=e}deserialize(e,t){const r=function(e){let t=0,r=0,n=null,s=null;const i=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,r=4,n=new Uint8Array(e),new DataView(n.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await o.next();if(a){if(!t)return;if(t!==r)throw new Error("Truncated event message received.");return void(yield n)}const c=e.length;let u=0;for(;u<c;){if(!n){const t=c-u;s||(s=new Uint8Array(4));const n=Math.min(4-r,t);if(s.set(e.slice(u,u+n),r),r+=n,u+=n,r<4)break;i(new DataView(s.buffer).getUint32(0,!1)),s=null}const o=Math.min(t-r,c-u);n.set(e.slice(u,u+o),r),r+=o,u+=o,t&&t===r&&(yield n,n=null,t=0,r=0)}}}}}(e);return new Nt({messageStream:new jt({inputStream:r,decoder:this.eventStreamCodec}),deserializer:Ut(t,this.utfEncoder)})}serialize(e,t){return new Ft({messageStream:new _t({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class Lt{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Dt({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const r=Bt(e)?(n=e,{[Symbol.asyncIterator]:async function*(){const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)return;yield r}}finally{e.releaseLock()}}}):e;var n;return this.universalMarshaller.deserialize(r,t)}serialize(e,t){const r=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:r,value:n}=await t.next();if(r)return e.close();e.enqueue(n)}})})(r):r}}const Bt=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,zt=e=>new Lt(e);var qt=s(957),Kt=s(423),Ht=s(795),Vt=s(323),Wt=s(228),Gt=s(641),Qt=s(302),Yt=s(637),Jt=s(792),Zt=s(652),Xt=s(875);const er="required",tr="fn",rr="argv",nr="ref",sr=!0,ir="isSet",or="booleanEquals",ar="error",cr="endpoint",ur="tree",dr="PartitionResult",lr={[er]:!1,type:"String"},pr={[er]:!0,default:!1,type:"Boolean"},hr={[nr]:"Endpoint"},fr={[tr]:or,[rr]:[{[nr]:"UseFIPS"},!0]},gr={[tr]:or,[rr]:[{[nr]:"UseDualStack"},!0]},yr={},mr={[tr]:"getAttr",[rr]:[{[nr]:dr},"supportsFIPS"]},wr={[tr]:or,[rr]:[!0,{[tr]:"getAttr",[rr]:[{[nr]:dr},"supportsDualStack"]}]},br=[fr],vr=[gr],Sr=[{[nr]:"Region"}],Er={version:"1.0",parameters:{Region:lr,UseDualStack:pr,UseFIPS:pr,Endpoint:lr},rules:[{conditions:[{[tr]:ir,[rr]:[hr]}],rules:[{conditions:br,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ar},{conditions:vr,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ar},{endpoint:{url:hr,properties:yr,headers:yr},type:cr}],type:ur},{conditions:[{[tr]:ir,[rr]:Sr}],rules:[{conditions:[{[tr]:"aws.partition",[rr]:Sr,assign:dr}],rules:[{conditions:[fr,gr],rules:[{conditions:[{[tr]:or,[rr]:[sr,mr]},wr],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yr,headers:yr},type:cr}],type:ur},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ar}],type:ur},{conditions:br,rules:[{conditions:[{[tr]:or,[rr]:[mr,sr]}],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}",properties:yr,headers:yr},type:cr}],type:ur},{error:"FIPS is enabled but this partition does not support FIPS",type:ar}],type:ur},{conditions:vr,rules:[{conditions:[wr],rules:[{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yr,headers:yr},type:cr}],type:ur},{error:"DualStack is enabled but this partition does not support DualStack",type:ar}],type:ur},{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dnsSuffix}",properties:yr,headers:yr},type:cr}],type:ur}],type:ur},{error:"Invalid Configuration: Missing Region",type:ar}]},Pr=(e,t={})=>(0,Xt.sO)(Er,{endpointParams:e,logger:t.logger});Xt.mw.aws=Zt.UF;var Mr=s(246);var xr=s(928),Ar=s(479);const Tr=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const r=t.findIndex((t=>t.schemeId===e.schemeId));-1===r?t.push(e):t.splice(r,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){r=e},httpAuthSchemeProvider:()=>r,setCredentials(e){n=e},credentials:()=>n}};class Rr extends r.Kj{constructor(...[t]){const n=(e=>{const t=(0,Mr.I)(e),n=()=>t().then(r.lT),s=(e=>({apiVersion:"2015-03-31",base64Decoder:e?.base64Decoder??Qt.E,base64Encoder:e?.base64Encoder??Qt.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Pr,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??lt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Wt.f}],logger:e?.logger??new r.N4,serviceId:e?.serviceId??"Lambda",urlParser:e?.urlParser??Gt.D,utf8Decoder:e?.utf8Decoder??Yt.a,utf8Encoder:e?.utf8Encoder??Jt.P}))(e);return{...s,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ht.n,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,ht.m)({serviceId:s.serviceId,clientVersion:"3.613.0"}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??zt,maxAttempts:e?.maxAttempts??Vt.Gz,region:e?.region??(0,Kt.B)("Region is missing"),requestHandler:qt.NC.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Vt.L0),sha256:e?.sha256??pt.I,streamCollector:e?.streamCollector??qt.kv,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(it.VW)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(it.Hj))}})(t||{}),s=(i=n,{...i,useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"lambda"});var i;const o=(0,it.TD)(s),a=(0,e.Co)(o),c=(0,at.$z)(a),u=(0,tt.OV)(c);var d,l;const p=((e,t)=>{const n={...(0,xr.Rq)(e),...(0,r.xA)(e),...(0,Ar.eS)(e),...Tr(e)};return t.forEach((e=>e.configure(n))),{...e,...(0,xr.$3)(n),...(0,r.uv)(n),...(0,Ar.jt)(n),...(s=n,{httpAuthSchemes:s.httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()})};var s})((l=(d=(0,st.Dc)(u),{...d,eventStreamMarshaller:d.eventStreamSerdeProvider(d)}),{...(0,ct.h)(l)}),t?.extensions||[]);super(p),this.config=p,this.middlewareStack.use((0,at.ey)(this.config)),this.middlewareStack.use((0,ot.vK)(this.config)),this.middlewareStack.use((0,tt.TC)(this.config)),this.middlewareStack.use((0,rt.Y7)(this.config)),this.middlewareStack.use((0,nt.n4)(this.config)),this.middlewareStack.use((0,st.sM)(this.config)),this.middlewareStack.use((0,G.wB)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,G.lW)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return dt}getIdentityProviderConfigProvider(){return async e=>new G.h$({"aws.auth#sigv4":e.credentials})}}var Or=s(55);function Cr(e){return Promise.all(Object.keys(e).reduce(((t,r)=>{const n=e[r];return"string"==typeof n?t.push([r,n]):t.push(n().then((e=>[r,e]))),t}),[])).then((e=>e.reduce(((e,[t,r])=>(e[t]=r,e)),{})))}function kr(e){throw new Or.C1("Response from Amazon Cognito contained no access key ID",{logger:e})}function Ir(e){throw new Or.C1("Response from Amazon Cognito contained no credentials",{logger:e})}function $r(e){throw new Or.C1("Response from Amazon Cognito contained no secret key",{logger:e})}const jr="IdentityIds";class Fr{constructor(e="aws:cognito-identity-ids"){this.dbName=e}getItem(e){return this.withObjectStore("readonly",(t=>{const r=t.get(e);return new Promise((e=>{r.onerror=()=>e(null),r.onsuccess=()=>e(r.result?r.result.value:null)}))})).catch((()=>null))}removeItem(e){return this.withObjectStore("readwrite",(t=>{const r=t.delete(e);return new Promise(((e,t)=>{r.onerror=()=>t(r.error),r.onsuccess=()=>e()}))}))}setItem(e,t){return this.withObjectStore("readwrite",(r=>{const n=r.put({id:e,value:t});return new Promise(((e,t)=>{n.onerror=()=>t(n.error),n.onsuccess=()=>e()}))}))}getDb(){const e=self.indexedDB.open(this.dbName,1);return new Promise(((t,r)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{r(e.error)},e.onblocked=()=>{r(new Error("Unable to access DB"))},e.onupgradeneeded=()=>{const t=e.result;t.onerror=()=>{r(new Error("Failed to create object store"))},t.createObjectStore(jr,{keyPath:"id"})}}))}withObjectStore(e,t){return this.getDb().then((r=>{const n=r.transaction(jr,e);return n.oncomplete=()=>r.close(),new Promise(((e,r)=>{n.onerror=()=>r(n.error),e(t(n.objectStore(jr)))})).catch((e=>{throw r.close(),e}))}))}}const Nr=new class{constructor(e={}){this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}};function _r(){return"object"==typeof self&&self.indexedDB?new Fr:"object"==typeof window&&window.localStorage?window.localStorage:Nr}function Ur(e){throw new Or.C1("Response from Amazon Cognito contained no identity ID",{logger:e})}const Dr="us-east-2",Lr=new Rr({region:Dr,credentials:function({accountId:e,cache:t=_r(),client:r,clientConfig:n,customRoleArn:i,identityPoolId:o,logins:a,userIdentifier:c=(a&&0!==Object.keys(a).length?void 0:"ANONYMOUS"),logger:u,parentClientConfig:d}){u?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const l=c?`aws:cognito-identity-credentials:${o}:${c}`:void 0;let p=async()=>{const{GetIdCommand:c,CognitoIdentityClient:h}=await s.e(207).then(s.bind(s,207)),f=r??new h(Object.assign({},n??{},{region:n?.region??d?.region}));let g=l&&await t.getItem(l);if(!g){const{IdentityId:r=Ur(u)}=await f.send(new c({AccountId:e,IdentityPoolId:o,Logins:a?await Cr(a):void 0}));g=r,l&&Promise.resolve(t.setItem(l,g)).catch((()=>{}))}var y;return y={client:f,customRoleArn:i,logins:a,identityId:g},p=async()=>{y.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:e,CognitoIdentityClient:t}=await s.e(207).then(s.bind(s,207)),{Credentials:{AccessKeyId:r=kr(y.logger),Expiration:n,SecretKey:i=$r(y.logger),SessionToken:o}=Ir(y.logger)}=await(y.client??new t(Object.assign({},y.clientConfig??{},{region:y.clientConfig?.region??y.parentClientConfig?.region}))).send(new e({CustomRoleArn:y.customRoleArn,IdentityId:y.identityId,Logins:y.logins?await Cr(y.logins):void 0}));return{identityId:y.identityId,accessKeyId:r,secretAccessKey:i,sessionToken:o,expiration:n}},p()};return()=>p().catch((async e=>{throw l&&Promise.resolve(t.removeItem(l)).catch((()=>{})),e}))}({client:new(s(636).D)({region:Dr}),identityPoolId:"us-east-2:641f472a-f2fe-426d-9fc8-c93c5708c529"})});window.translateQuote=function(e,t){const r={FunctionName:"MessageTranslatorTool",Payload:JSON.stringify({messageId:e,quote:t})};try{return Lr.send(new et(r)).then((e=>JSON.parse((new TextDecoder).decode(e.Payload)))).catch((e=>{console.log("Lambda failure, resp",e)}))}catch(e){console.log("Error",e)}}})()})();