gemi 0.4.84 → 0.4.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/app/App.d.ts +0 -1
  2. package/dist/app/App.d.ts.map +1 -1
  3. package/dist/app/index.js +77 -77
  4. package/dist/bin/index.js +1 -0
  5. package/dist/chunk-053cb1dc15795bf6.js +2 -0
  6. package/dist/{chunk-1fab30ab853c48cc.js → chunk-11fb3a27cf688340.js} +1 -1
  7. package/dist/chunk-226c55043768b2e1.js +18 -0
  8. package/dist/{chunk-8088e99dc2bb92e1.js → chunk-405c6731d3acd2cf.js} +1 -1
  9. package/dist/{chunk-8aa3e0e20e411d11.js → chunk-455e54a6493c2080.js} +1 -1
  10. package/dist/{chunk-d22136d39cf8465f.js → chunk-528ef084b2c9a2ba.js} +1 -1
  11. package/dist/{chunk-20ce79bc516cd80a.js → chunk-6a97611e6bd65152.js} +1 -1
  12. package/dist/{chunk-12b4f44a2beae19b.js → chunk-6f25a013d533d94d.js} +1 -1
  13. package/dist/{chunk-2cf271e24c26b0ee.js → chunk-7f6a8fc2d4d89153.js} +1 -1
  14. package/dist/{chunk-73eed146ee78f681.js → chunk-80e3ea835f0d9a37.js} +1 -1
  15. package/dist/chunk-84f49317085b7263.js +3 -0
  16. package/dist/{chunk-19b24eef6086eb6a.js → chunk-97235ad8ffab193d.js} +1 -1
  17. package/dist/{chunk-3c274565feb8b4f8.js → chunk-a690c0c26e034681.js} +1 -1
  18. package/dist/chunk-e62074b446091212.js +2 -0
  19. package/dist/chunk-e826a8ad5ae18bb0.js +2 -0
  20. package/dist/{chunk-933845e73519b4c5.js → chunk-ec612fe5cb5758ab.js} +2 -2
  21. package/dist/{chunk-f5daf38c43144399.js → chunk-f769e8cd95090a9d.js} +2 -2
  22. package/dist/kernel/index.js +1 -1
  23. package/dist/server/index.js +2 -2
  24. package/dist/services/index.js +1 -10
  25. package/package.json +1 -1
  26. package/dist/app/createFlatApiRoutes.d.ts +0 -12
  27. package/dist/app/createFlatApiRoutes.d.ts.map +0 -1
  28. package/dist/chunk-4488171fdbc139d7.js +0 -2
  29. package/dist/chunk-4ead4ddbe2b17543.js +0 -3
  30. package/dist/chunk-6ba4599c68fa415a.js +0 -2
  31. package/dist/chunk-a17cbcbbf2f5bb1a.js +0 -18
  32. package/dist/chunk-f1eb122aa5c746ea.js +0 -2
@@ -0,0 +1,18 @@
1
+ import{B as Q0,C as V} from"./chunk-24a86f8f5ddc0cbd.js";import{M as h3} from"./chunk-ff8cd8fd047cfee5.js";import{Aa as cU,Ba as IX,Ea as eU,Fa as vY,Ia as cY,za as c} from"./chunk-84f49317085b7263.js";import{tb as z0} from"./chunk-6a97611e6bd65152.js";import{ub as R0,vb as PU} from"./chunk-ec612fe5cb5758ab.js";import{Bb as pY} from"./chunk-80e3ea835f0d9a37.js";import{Hb as jU} from"./chunk-405c6731d3acd2cf.js";var I$=V((GG)=>{var mY=function($){return $&&$.__esModule?$:{default:$}},nY=function(){if(Y1>L1.length-16)sY.default.randomFillSync(L1),Y1=0;return L1.slice(Y1,Y1+=16)};Object.defineProperty(GG,"__esModule",{value:!0});GG.default=nY;var sY=mY(import.meta.require("crypto")),L1=new Uint8Array(256),Y1=L1.length});var XG=V((WG)=>{Object.defineProperty(WG,"__esModule",{value:!0});WG.default=void 0;var rY=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;WG.default=rY});var x0=V((YG)=>{var aY=function($){return $&&$.__esModule?$:{default:$}},tY=function($){return typeof $==="string"&&oY.default.test($)};Object.defineProperty(YG,"__esModule",{value:!0});YG.default=void 0;var oY=aY(XG()),eY=tY;YG.default=eY});var v0=V((QG)=>{var UL=function($){return $&&$.__esModule?$:{default:$}},FG=function($,U=0){return D[$[U+0]]+D[$[U+1]]+D[$[U+2]]+D[$[U+3]]+"-"+D[$[U+4]]+D[$[U+5]]+"-"+D[$[U+6]]+D[$[U+7]]+"-"+D[$[U+8]]+D[$[U+9]]+"-"+D[$[U+10]]+D[$[U+11]]+D[$[U+12]]+D[$[U+13]]+D[$[U+14]]+D[$[U+15]]},GL=function($,U=0){const G=FG($,U);if(!$L.default(G))throw TypeError("Stringified UUID is invalid");return G};Object.defineProperty(QG,"__esModule",{value:!0});QG.default=void 0;QG.unsafeStringify=FG;var $L=UL(x0()),D=[];for(let $=0;$<256;++$)D.push(($+256).toString(16).slice(1));var WL=GL;QG.default=WL});var KG=V((JG)=>{var LL=function($){return $&&$.__esModule?$:{default:$}},FL=function($,U,G){let W=U&&G||0;const Z=U||new Array(16);$=$||{};let X=$.node||wG,Y=$.clockseq!==void 0?$.clockseq:K$;if(X==null||Y==null){const J=$.random||($.rng||XL.default)();if(X==null)X=wG=[J[0]|1,J[1],J[2],J[3],J[4],J[5]];if(Y==null)Y=K$=(J[6]<<8|J[7])&16383}let L=$.msecs!==void 0?$.msecs:Date.now(),F=$.nsecs!==void 0?$.nsecs:V$+1;const Q=L-M$+(F-V$)/1e4;if(Q<0&&$.clockseq===void 0)Y=Y+1&16383;if((Q<0||L>M$)&&$.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");M$=L,V$=F,K$=Y,L+=12219292800000;const z=((L&268435455)*1e4+F)%4294967296;Z[W++]=z>>>24&255,Z[W++]=z>>>16&255,Z[W++]=z>>>8&255,Z[W++]=z&255;const w=L/4294967296*1e4&268435455;Z[W++]=w>>>8&255,Z[W++]=w&255,Z[W++]=w>>>24&15|16,Z[W++]=w>>>16&255,Z[W++]=Y>>>8|128,Z[W++]=Y&255;for(let J=0;J<6;++J)Z[W+J]=X[J];return U||YL.unsafeStringify(Z)};Object.defineProperty(JG,"__esModule",{value:!0});JG.default=void 0;var XL=LL(I$()),YL=v0(),wG,K$,M$=0,V$=0,QL=FL;JG.default=QL});var R$=V((MG)=>{var wL=function($){return $&&$.__esModule?$:{default:$}},JL=function($){if(!zL.default($))throw TypeError("Invalid UUID");let U;const G=new Uint8Array(16);return G[0]=(U=parseInt($.slice(0,8),16))>>>24,G[1]=U>>>16&255,G[2]=U>>>8&255,G[3]=U&255,G[4]=(U=parseInt($.slice(9,13),16))>>>8,G[5]=U&255,G[6]=(U=parseInt($.slice(14,18),16))>>>8,G[7]=U&255,G[8]=(U=parseInt($.slice(19,23),16))>>>8,G[9]=U&255,G[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,G[11]=U/4294967296&255,G[12]=U>>>24&255,G[13]=U>>>16&255,G[14]=U>>>8&255,G[15]=U&255,G};Object.defineProperty(MG,"__esModule",{value:!0});MG.default=void 0;var zL=wL(x0()),IL=JL;MG.default=IL});var B$=V((EG)=>{var VL=function($){return $&&$.__esModule?$:{default:$}},RL=function($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U},BL=function($,U,G){function W(Z,X,Y,L){var F;if(typeof Z==="string")Z=RL(Z);if(typeof X==="string")X=ML.default(X);if(((F=X)===null||F===void 0?void 0:F.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let Q=new Uint8Array(16+Z.length);if(Q.set(X),Q.set(Z,X.length),Q=G(Q),Q[6]=Q[6]&15|U,Q[8]=Q[8]&63|128,Y){L=L||0;for(let z=0;z<16;++z)Y[L+z]=Q[z];return Y}return KL.unsafeStringify(Q)}try{W.name=$}catch(Z){}return W.DNS=RG,W.URL=BG,W};Object.defineProperty(EG,"__esModule",{value:!0});EG.URL=EG.DNS=void 0;EG.default=BL;var KL=v0(),ML=VL(R$()),RG="6ba7b810-9dad-11d1-80b4-00c04fd430c8";EG.DNS=RG;var BG="6ba7b811-9dad-11d1-80b4-00c04fd430c8";EG.URL=BG});var OG=V((HG)=>{var TL=function($){return $&&$.__esModule?$:{default:$}},OL=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return HL.default.createHash("md5").update($).digest()};Object.defineProperty(HG,"__esModule",{value:!0});HG.default=void 0;var HL=TL(import.meta.require("crypto")),CL=OL;HG.default=CL});var NG=V((fG)=>{var CG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(fG,"__esModule",{value:!0});fG.default=void 0;var fL=CG(B$()),qL=CG(OG()),NL=fL.default("v3",48,qL.default),jL=NL;fG.default=jL});var SG=V((jG)=>{var SL=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(jG,"__esModule",{value:!0});jG.default=void 0;var PL=SL(import.meta.require("crypto")),bL={randomUUID:PL.default.randomUUID};jG.default=bL});var xG=V((kG)=>{var DG=function($){return $&&$.__esModule?$:{default:$}},hL=function($,U,G){if(bG.default.randomUUID&&!U&&!$)return bG.default.randomUUID();$=$||{};const W=$.random||($.rng||DL.default)();if(W[6]=W[6]&15|64,W[8]=W[8]&63|128,U){G=G||0;for(let Z=0;Z<16;++Z)U[G+Z]=W[Z];return U}return kL.unsafeStringify(W)};Object.defineProperty(kG,"__esModule",{value:!0});kG.default=void 0;var bG=DG(SG()),DL=DG(I$()),kL=v0(),xL=hL;kG.default=xL});var yG=V((vG)=>{var cL=function($){return $&&$.__esModule?$:{default:$}},yL=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return vL.default.createHash("sha1").update($).digest()};Object.defineProperty(vG,"__esModule",{value:!0});vG.default=void 0;var vL=cL(import.meta.require("crypto")),uL=yL;vG.default=uL});var dG=V((_G)=>{var uG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(_G,"__esModule",{value:!0});_G.default=void 0;var _L=uG(B$()),gL=uG(yG()),dL=_L.default("v5",80,gL.default),pL=dL;_G.default=pL});var sG=V((pG)=>{Object.defineProperty(pG,"__esModule",{value:!0});pG.default=void 0;var lL="00000000-0000-0000-0000-000000000000";pG.default=lL});var iG=V((mG)=>{var mL=function($){return $&&$.__esModule?$:{default:$}},nL=function($){if(!sL.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(mG,"__esModule",{value:!0});mG.default=void 0;var sL=mL(x0()),iL=nL;mG.default=iL});var E$=V((d)=>{var i=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(d,"__esModule",{value:!0});Object.defineProperty(d,"NIL",{enumerable:!0,get:function(){return eL.default}});Object.defineProperty(d,"parse",{enumerable:!0,get:function(){return W2.default}});Object.defineProperty(d,"stringify",{enumerable:!0,get:function(){return G2.default}});Object.defineProperty(d,"v1",{enumerable:!0,get:function(){return rL.default}});Object.defineProperty(d,"v3",{enumerable:!0,get:function(){return oL.default}});Object.defineProperty(d,"v4",{enumerable:!0,get:function(){return aL.default}});Object.defineProperty(d,"v5",{enumerable:!0,get:function(){return tL.default}});Object.defineProperty(d,"validate",{enumerable:!0,get:function(){return U2.default}});Object.defineProperty(d,"version",{enumerable:!0,get:function(){return $2.default}});var rL=i(KG()),oL=i(NG()),aL=i(xG()),tL=i(dG()),eL=i(sG()),$2=i(iG()),U2=i(x0()),G2=i(v0()),W2=i(R$())});var c0=V((DK,$8)=>{var{defineProperty:F1,getOwnPropertyDescriptor:J2,getOwnPropertyNames:I2}=Object,K2=Object.prototype.hasOwnProperty,tG=($,U)=>F1($,"name",{value:U,configurable:!0}),M2=($,U)=>{for(var G in U)F1($,G,{get:U[G],enumerable:!0})},V2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of I2(U))if(!K2.call($,Z)&&Z!==G)F1($,Z,{get:()=>U[Z],enumerable:!(W=J2(U,Z))||W.enumerable})}return $},R2=($)=>V2(F1({},"__esModule",{value:!0}),$),eG={};M2(eG,{getSmithyContext:()=>B2,normalizeProvider:()=>E2});$8.exports=R2(eG);var aG=z0(),B2=tG(($)=>$[aG.SMITHY_CONTEXT_KEY]||($[aG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),E2=tG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var A$=V((kK,X8)=>{var{defineProperty:Q1,getOwnPropertyDescriptor:A2,getOwnPropertyNames:H2}=Object,T2=Object.prototype.hasOwnProperty,w0=($,U)=>Q1($,"name",{value:U,configurable:!0}),O2=($,U)=>{for(var G in U)Q1($,G,{get:U[G],enumerable:!0})},C2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of H2(U))if(!T2.call($,Z)&&Z!==G)Q1($,Z,{get:()=>U[Z],enumerable:!(W=A2(U,Z))||W.enumerable})}return $},f2=($)=>C2(Q1({},"__esModule",{value:!0}),$),U8={};O2(U8,{CredentialsProviderError:()=>q2,ProviderError:()=>z1,TokenProviderError:()=>N2,chain:()=>j2,fromStatic:()=>P2,memoize:()=>S2});X8.exports=f2(U8);var G8=class $ extends Error{constructor(U,G=!0){var W;let Z,X=!0;if(typeof G==="boolean")Z=void 0,X=G;else if(G!=null&&typeof G==="object")Z=G.logger,X=G.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=X,Object.setPrototypeOf(this,$.prototype),(W=Z==null?void 0:Z.debug)==null||W.call(Z,`@smithy/property-provider ${X?"->":"(!)"} ${U}`)}static from(U,G=!0){return Object.assign(new this(U.message,G),U)}};w0(G8,"ProviderError");var z1=G8,W8=class $ extends z1{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};w0(W8,"CredentialsProviderError");var q2=W8,Z8=class $ extends z1{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};w0(Z8,"TokenProviderError");var N2=Z8,j2=w0((...$)=>async()=>{if($.length===0)throw new z1("No providers in chain");let U;for(let G of $)try{return await G()}catch(W){if(U=W,W==null?void 0:W.tryNextLink)continue;throw W}throw U},"chain"),P2=w0(($)=>()=>Promise.resolve($),"fromStatic"),S2=w0(($,U,G)=>{let W,Z,X,Y=!1;const L=w0(async()=>{if(!Z)Z=$();try{W=await Z,X=!0,Y=!1}finally{Z=void 0}return W},"coalesceProvider");if(U===void 0)return async(F)=>{if(!X||(F==null?void 0:F.forceRefresh))W=await L();return W};return async(F)=>{if(!X||(F==null?void 0:F.forceRefresh))W=await L();if(Y)return W;if(G&&!G(W))return Y=!0,W;if(U(W))return await L(),W;return W}},"memoize")});var T0=V((Y8)=>{Object.defineProperty(Y8,"__esModule",{value:!0});Y8.getHomeDir=void 0;var b2=import.meta.require("os"),D2=import.meta.require("path"),H$={},k2=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},h2=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${D2.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const Z=k2();if(!H$[Z])H$[Z]=b2.homedir();return H$[Z]};Y8.getHomeDir=h2});var T$=V((F8)=>{Object.defineProperty(F8,"__esModule",{value:!0});F8.getSSOTokenFilepath=void 0;var x2=import.meta.require("crypto"),v2=import.meta.require("path"),c2=T0(),y2=($)=>{const G=x2.createHash("sha1").update($).digest("hex");return v2.join(c2.getHomeDir(),".aws","sso","cache",`${G}.json`)};F8.getSSOTokenFilepath=y2});var J8=V((z8)=>{Object.defineProperty(z8,"__esModule",{value:!0});z8.getSSOTokenFromFile=void 0;var u2=import.meta.require("fs"),_2=T$(),{readFile:g2}=u2.promises,d2=async($)=>{const U=_2.getSSOTokenFilepath($),G=await g2(U,"utf8");return JSON.parse(G)};z8.getSSOTokenFromFile=d2});var C$=V((I8)=>{Object.defineProperty(I8,"__esModule",{value:!0});I8.slurpFile=void 0;var p2=import.meta.require("fs"),{readFile:l2}=p2.promises,O$={},s2=($,U)=>{if(!O$[$]||(U===null||U===void 0?void 0:U.ignoreCache))O$[$]=l2($,"utf8");return O$[$]};I8.slurpFile=s2});var j$=V((yK,u0)=>{var{defineProperty:I1,getOwnPropertyDescriptor:m2,getOwnPropertyNames:n2}=Object,i2=Object.prototype.hasOwnProperty,y=($,U)=>I1($,"name",{value:U,configurable:!0}),r2=($,U)=>{for(var G in U)I1($,G,{get:U[G],enumerable:!0})},f$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of n2(U))if(!i2.call($,Z)&&Z!==G)I1($,Z,{get:()=>U[Z],enumerable:!(W=m2(U,Z))||W.enumerable})}return $},N$=($,U,G)=>(f$($,U,"default"),G&&f$(G,U,"default")),o2=($)=>f$(I1({},"__esModule",{value:!0}),$),y0={};r2(y0,{CONFIG_PREFIX_SEPARATOR:()=>J0,DEFAULT_PROFILE:()=>B8,ENV_PROFILE:()=>R8,getProfileName:()=>a2,loadSharedConfigFiles:()=>A8,loadSsoSessionData:()=>z5,parseKnownFiles:()=>J5});u0.exports=o2(y0);N$(y0,T0(),u0.exports);var R8="AWS_PROFILE",B8="default",a2=y(($)=>$.profile||process.env[R8]||B8,"getProfileName");N$(y0,T$(),u0.exports);N$(y0,J8(),u0.exports);var w1=z0(),t2=y(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(J0);if(G===-1)return!1;return Object.values(w1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const Z=G.indexOf(J0),X=G.substring(0,Z)===w1.IniSectionType.PROFILE?G.substring(Z+1):G;return U[X]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),J1=import.meta.require("path"),e2=T0(),$5="AWS_CONFIG_FILE",E8=y(()=>process.env[$5]||J1.join(e2.getHomeDir(),".aws","config"),"getConfigFilepath"),U5=T0(),G5="AWS_SHARED_CREDENTIALS_FILE",W5=y(()=>process.env[G5]||J1.join(U5.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),Z5=T0(),X5=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Y5=["__proto__","profile __proto__"],q$=y(($)=>{const U={};let G,W;for(let Z of $.split(/\r?\n/)){const X=Z.split(/(^|\s)[;#]/)[0].trim();if(X[0]==="["&&X[X.length-1]==="]"){G=void 0,W=void 0;const L=X.substring(1,X.length-1),F=X5.exec(L);if(F){const[,Q,,z]=F;if(Object.values(w1.IniSectionType).includes(Q))G=[Q,z].join(J0)}else G=L;if(Y5.includes(L))throw new Error(`Found invalid profile name "${L}"`)}else if(G){const L=X.indexOf("=");if(![0,-1].includes(L)){const[F,Q]=[X.substring(0,L).trim(),X.substring(L+1).trim()];if(Q==="")W=F;else{if(W&&Z.trimStart()===Z)W=void 0;U[G]=U[G]||{};const z=W?[W,F].join(J0):F;U[G][z]=Q}}}}return U},"parseIni"),M8=C$(),V8=y(()=>({}),"swallowError"),J0=".",A8=y(async($={})=>{const{filepath:U=W5(),configFilepath:G=E8()}=$,W=Z5.getHomeDir();let X=U;if(U.startsWith("~/"))X=J1.join(W,U.slice(2));let Y=G;if(G.startsWith("~/"))Y=J1.join(W,G.slice(2));const L=await Promise.all([M8.slurpFile(Y,{ignoreCache:$.ignoreCache}).then(q$).then(t2).catch(V8),M8.slurpFile(X,{ignoreCache:$.ignoreCache}).then(q$).catch(V8)]);return{configFile:L[0],credentialsFile:L[1]}},"loadSharedConfigFiles"),L5=y(($)=>Object.entries($).filter(([U])=>U.startsWith(w1.IniSectionType.SSO_SESSION+J0)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(J0)+1)]:W}),{}),"getSsoSessionData"),F5=C$(),Q5=y(()=>({}),"swallowError"),z5=y(async($={})=>F5.slurpFile($.configFilepath??E8()).then(q$).then(L5).catch(Q5),"loadSsoSessionData"),w5=y((...$)=>{const U={};for(let G of $)for(let[W,Z]of Object.entries(G))if(U[W]!==void 0)Object.assign(U[W],Z);else U[W]=Z;return U},"mergeConfigFiles"),J5=y(async($)=>{const U=await A8($);return w5(U.configFile,U.credentialsFile)},"parseKnownFiles")});var C8=V((uK,O8)=>{var P$=function($){try{const U=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return U.delete("CONFIG"),U.delete("CONFIG_PREFIX_SEPARATOR"),U.delete("ENV"),[...U].join(", ")}catch(U){return $}},K1=Object.defineProperty,I5=Object.getOwnPropertyDescriptor,K5=Object.getOwnPropertyNames,M5=Object.prototype.hasOwnProperty,O0=($,U)=>K1($,"name",{value:U,configurable:!0}),V5=($,U)=>{for(var G in U)K1($,G,{get:U[G],enumerable:!0})},R5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of K5(U))if(!M5.call($,Z)&&Z!==G)K1($,Z,{get:()=>U[Z],enumerable:!(W=I5(U,Z))||W.enumerable})}return $},B5=($)=>R5(K1({},"__esModule",{value:!0}),$),T8={};V5(T8,{loadConfig:()=>O5});O8.exports=B5(T8);var _0=A$();O0(P$,"getSelectorName");var E5=O0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new _0.CredentialsProviderError(G.message||`Not found in ENV: ${P$($.toString())}`,{logger:U})}},"fromEnv"),H8=j$(),A5=O0(($,{preferredFile:U="config",...G}={})=>async()=>{const W=H8.getProfileName(G),{configFile:Z,credentialsFile:X}=await H8.loadSharedConfigFiles(G),Y=X[W]||{},L=Z[W]||{},F=U==="config"?{...Y,...L}:{...L,...Y};try{const z=$(F,U==="config"?Z:X);if(z===void 0)throw new Error;return z}catch(Q){throw new _0.CredentialsProviderError(Q.message||`Not found in config files w/ profile [${W}]: ${P$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),H5=O0(($)=>typeof $==="function","isFunction"),T5=O0(($)=>H5($)?async()=>await $():_0.fromStatic($),"fromStatic"),O5=O0(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>_0.memoize(_0.chain(E5($),A5(U,W),T5(G))),"loadConfig")});var S8=V((j8)=>{Object.defineProperty(j8,"__esModule",{value:!0});j8.getEndpointUrlConfig=void 0;var f8=j$(),q8="AWS_ENDPOINT_URL",N8="endpoint_url",C5=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((X)=>X.toUpperCase()),W=U[[q8,...G].join("_")];if(W)return W;const Z=U[q8];if(Z)return Z;return},configFileSelector:(U,G)=>{if(G&&U.services){const Z=G[["services",U.services].join(f8.CONFIG_PREFIX_SEPARATOR)];if(Z){const X=$.split(" ").map((L)=>L.toLowerCase()),Y=Z[[X.join("_"),N8].join(f8.CONFIG_PREFIX_SEPARATOR)];if(Y)return Y}}const W=U[N8];if(W)return W;return},default:void 0});j8.getEndpointUrlConfig=C5});var k8=V((b8)=>{Object.defineProperty(b8,"__esModule",{value:!0});b8.getEndpointFromConfig=void 0;var f5=C8(),q5=S8(),N5=async($)=>f5.loadConfig(q5.getEndpointUrlConfig($))();b8.getEndpointFromConfig=N5});var c8=V((dK,v8)=>{var x8=function($){const U={};if($=$.replace(/^\?/,""),$)for(let G of $.split("&")){let[W,Z=null]=G.split("=");if(W=decodeURIComponent(W),Z)Z=decodeURIComponent(Z);if(!(W in U))U[W]=Z;else if(Array.isArray(U[W]))U[W].push(Z);else U[W]=[U[W],Z]}return U},M1=Object.defineProperty,j5=Object.getOwnPropertyDescriptor,P5=Object.getOwnPropertyNames,S5=Object.prototype.hasOwnProperty,b5=($,U)=>M1($,"name",{value:U,configurable:!0}),D5=($,U)=>{for(var G in U)M1($,G,{get:U[G],enumerable:!0})},k5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of P5(U))if(!S5.call($,Z)&&Z!==G)M1($,Z,{get:()=>U[Z],enumerable:!(W=j5(U,Z))||W.enumerable})}return $},h5=($)=>k5(M1({},"__esModule",{value:!0}),$),h8={};D5(h8,{parseQueryString:()=>x8});v8.exports=h5(h8);b5(x8,"parseQueryString")});var g8=V((pK,_8)=>{var{defineProperty:V1,getOwnPropertyDescriptor:x5,getOwnPropertyNames:v5}=Object,c5=Object.prototype.hasOwnProperty,y5=($,U)=>V1($,"name",{value:U,configurable:!0}),u5=($,U)=>{for(var G in U)V1($,G,{get:U[G],enumerable:!0})},_5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of v5(U))if(!c5.call($,Z)&&Z!==G)V1($,Z,{get:()=>U[Z],enumerable:!(W=x5(U,Z))||W.enumerable})}return $},g5=($)=>_5(V1({},"__esModule",{value:!0}),$),y8={};u5(y8,{parseUrl:()=>u8});_8.exports=g5(y8);var d5=c8(),u8=y5(($)=>{if(typeof $==="string")return u8(new URL($));const{hostname:U,pathname:G,port:W,protocol:Z,search:X}=$;let Y;if(X)Y=d5.parseQueryString(X);return{hostname:U,port:W?parseInt(W):void 0,protocol:Z,path:G,query:Y}},"parseUrl")});var b$=V((lK,i8)=>{var n8=function($,U,G){return{applyToStack:(W)=>{W.add(p8($,G),s8),W.add(l8($,U),m8)}}},R1=Object.defineProperty,p5=Object.getOwnPropertyDescriptor,l5=Object.getOwnPropertyNames,s5=Object.prototype.hasOwnProperty,S$=($,U)=>R1($,"name",{value:U,configurable:!0}),m5=($,U)=>{for(var G in U)R1($,G,{get:U[G],enumerable:!0})},n5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of l5(U))if(!s5.call($,Z)&&Z!==G)R1($,Z,{get:()=>U[Z],enumerable:!(W=p5(U,Z))||W.enumerable})}return $},i5=($)=>n5(R1({},"__esModule",{value:!0}),$),d8={};m5(d8,{deserializerMiddleware:()=>p8,deserializerMiddlewareOption:()=>s8,getSerdePlugin:()=>n8,serializerMiddleware:()=>l8,serializerMiddlewareOption:()=>m8});i8.exports=i5(d8);var p8=S$(($,U)=>(G)=>async(W)=>{const{response:Z}=await G(W);try{const X=await U(Z,$);return{response:Z,output:X}}catch(X){if(Object.defineProperty(X,"$response",{value:Z}),!("$metadata"in X)){if(X.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof X.$responseBodyText!=="undefined"){if(X.$response)X.$response.body=X.$responseBodyText}}throw X}},"deserializerMiddleware"),l8=S$(($,U)=>(G,W)=>async(Z)=>{var X;const Y=((X=W.endpointV2)==null?void 0:X.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!Y)throw new Error("No valid endpoint provider available.");const L=await U(Z.input,{...$,endpoint:Y});return G({...Z,request:L})},"serializerMiddleware"),s8={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},m8={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};S$(n8,"getSerdePlugin")});var G4=V((sK,U4)=>{var{defineProperty:E1,getOwnPropertyDescriptor:r5,getOwnPropertyNames:o5}=Object,a5=Object.prototype.hasOwnProperty,p=($,U)=>E1($,"name",{value:U,configurable:!0}),t5=($,U)=>{for(var G in U)E1($,G,{get:U[G],enumerable:!0})},e5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of o5(U))if(!a5.call($,Z)&&Z!==G)E1($,Z,{get:()=>U[Z],enumerable:!(W=r5(U,Z))||W.enumerable})}return $},$9=($)=>e5(E1({},"__esModule",{value:!0}),$),o8={};t5(o8,{endpointMiddleware:()=>e8,endpointMiddlewareOptions:()=>$4,getEndpointFromInstructions:()=>a8,getEndpointPlugin:()=>z9,resolveEndpointConfig:()=>w9,resolveParams:()=>t8,toEndpointV1:()=>D$});U4.exports=$9(o8);var U9=p(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Y9(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!X9(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),G9=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,W9=/(\d+\.){3}\d+/,Z9=/\.\./,X9=p(($)=>G9.test($)&&!W9.test($)&&!Z9.test($),"isDnsCompatibleBucketName"),Y9=p(($)=>{const[U,G,W,,,Z]=$.split(":"),X=U==="arn"&&$.split(":").length>=6,Y=Boolean(X&&G&&W&&Z);if(X&&!Y)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Y},"isArnBucketName"),L9=p(($,U,G)=>{const W=p(async()=>{const Z=G[$]??G[U];if(typeof Z==="function")return Z();return Z},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return(Z==null?void 0:Z.credentialScope)??(Z==null?void 0:Z.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return(Z==null?void 0:Z.accountId)??(Z==null?void 0:Z.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const Z=await W();if(Z&&typeof Z==="object"){if("url"in Z)return Z.url.href;if("hostname"in Z){const{protocol:X,hostname:Y,port:L,path:F}=Z;return`${X}//${Y}${L?":"+L:""}${F}`}}return Z};return W},"createConfigValueProvider"),F9=k8(),r8=g8(),D$=p(($)=>{if(typeof $==="object"){if("url"in $)return r8.parseUrl($.url);return $}return r8.parseUrl($)},"toEndpointV1"),a8=p(async($,U,G,W)=>{if(!G.endpoint){const Y=await F9.getEndpointFromConfig(G.serviceId||"");if(Y)G.endpoint=()=>Promise.resolve(D$(Y))}const Z=await t8($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(Z,W)},"getEndpointFromInstructions"),t8=p(async($,U,G)=>{var W;const Z={},X=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[Y,L]of Object.entries(X))switch(L.type){case"staticContextParams":Z[Y]=L.value;break;case"contextParams":Z[Y]=$[L.name];break;case"clientContextParams":case"builtInParams":Z[Y]=await L9(L.name,Y,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(X).length===0)Object.assign(Z,G);if(String(G.serviceId).toLowerCase()==="s3")await U9(Z);return Z},"resolveParams"),B1=c0(),e8=p(({config:$,instructions:U})=>{return(G,W)=>async(Z)=>{var X,Y,L;const F=await a8(Z.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=F,W.authSchemes=(X=F.properties)==null?void 0:X.authSchemes;const Q=(Y=W.authSchemes)==null?void 0:Y[0];if(Q){W.signing_region=Q.signingRegion,W.signing_service=Q.signingName;const z=B1.getSmithyContext(W),w=(L=z==null?void 0:z.selectedHttpAuthScheme)==null?void 0:L.httpAuthOption;if(w)w.signingProperties=Object.assign(w.signingProperties||{},{signing_region:Q.signingRegion,signingRegion:Q.signingRegion,signing_service:Q.signingName,signingName:Q.signingName,signingRegionSet:Q.signingRegionSet},Q.properties)}return G({...Z})}},"endpointMiddleware"),Q9=b$(),$4={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Q9.serializerMiddlewareOption.name},z9=p(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(e8({config:$,instructions:U}),$4)}}),"getEndpointPlugin"),w9=p(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>D$(await B1.normalizeProvider(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:B1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:B1.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var r=V((mK,w4)=>{var F4=function($){return Object.keys($).reduce((U,G)=>{const W=$[G];return{...U,[G]:Array.isArray(W)?[...W]:W}},{})},z4=function($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)},A1=Object.defineProperty,J9=Object.getOwnPropertyDescriptor,I9=Object.getOwnPropertyNames,K9=Object.prototype.hasOwnProperty,$0=($,U)=>A1($,"name",{value:U,configurable:!0}),M9=($,U)=>{for(var G in U)A1($,G,{get:U[G],enumerable:!0})},V9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of I9(U))if(!K9.call($,Z)&&Z!==G)A1($,Z,{get:()=>U[Z],enumerable:!(W=J9(U,Z))||W.enumerable})}return $},R9=($)=>V9(A1({},"__esModule",{value:!0}),$),W4={};M9(W4,{Field:()=>A9,Fields:()=>H9,HttpRequest:()=>T9,HttpResponse:()=>O9,IHttpRequest:()=>Z4.HttpRequest,getHttpHandlerExtensionConfiguration:()=>B9,isValidHostname:()=>z4,resolveHttpHandlerRuntimeConfig:()=>E9});w4.exports=R9(W4);var B9=$0(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),E9=$0(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),Z4=z0(),X4=class ${constructor({name:U,kind:G=Z4.FieldPosition.HEADER,values:W=[]}){this.name=U,this.kind=G,this.values=W}add(U){this.values.push(U)}set(U){this.values=U}remove(U){this.values=this.values.filter((G)=>G!==U)}toString(){return this.values.map((U)=>U.includes(",")||U.includes(" ")?`"${U}"`:U).join(", ")}get(){return this.values}};$0(X4,"Field");var A9=X4,Y4=class ${constructor({fields:U=[],encoding:G="utf-8"}){this.entries={},U.forEach(this.setField.bind(this)),this.encoding=G}setField(U){this.entries[U.name.toLowerCase()]=U}getField(U){return this.entries[U.toLowerCase()]}removeField(U){delete this.entries[U.toLowerCase()]}getByType(U){return Object.values(this.entries).filter((G)=>G.kind===U)}};$0(Y4,"Fields");var H9=Y4,L4=class ${constructor(U){this.method=U.method||"GET",this.hostname=U.hostname||"localhost",this.port=U.port,this.query=U.query||{},this.headers=U.headers||{},this.body=U.body,this.protocol=U.protocol?U.protocol.slice(-1)!==":"?`${U.protocol}:`:U.protocol:"https:",this.path=U.path?U.path.charAt(0)!=="/"?`/${U.path}`:U.path:"/",this.username=U.username,this.password=U.password,this.fragment=U.fragment}static clone(U){const G=new $({...U,headers:{...U.headers}});if(G.query)G.query=F4(G.query);return G}static isInstance(U){if(!U)return!1;const G=U;return"method"in G&&"protocol"in G&&"hostname"in G&&"path"in G&&typeof G.query==="object"&&typeof G.headers==="object"}clone(){return $.clone(this)}};$0(L4,"HttpRequest");var T9=L4;$0(F4,"cloneQuery");var Q4=class ${constructor(U){this.statusCode=U.statusCode,this.reason=U.reason,this.headers=U.headers||{},this.body=U.body}static isInstance(U){if(!U)return!1;const G=U;return typeof G.statusCode==="number"&&typeof G.headers==="object"}};$0(Q4,"HttpResponse");var O9=Q4;$0(z4,"isValidHostname")});var I0=V((nK,M4)=>{var{defineProperty:H1,getOwnPropertyDescriptor:C9,getOwnPropertyNames:f9}=Object,q9=Object.prototype.hasOwnProperty,C0=($,U)=>H1($,"name",{value:U,configurable:!0}),N9=($,U)=>{for(var G in U)H1($,G,{get:U[G],enumerable:!0})},j9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of f9(U))if(!q9.call($,Z)&&Z!==G)H1($,Z,{get:()=>U[Z],enumerable:!(W=C9(U,Z))||W.enumerable})}return $},P9=($)=>j9(H1({},"__esModule",{value:!0}),$),J4={};N9(J4,{isClockSkewCorrectedError:()=>I4,isClockSkewError:()=>v9,isRetryableByTrait:()=>x9,isServerError:()=>y9,isThrottlingError:()=>c9,isTransientError:()=>K4});M4.exports=P9(J4);var S9=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],b9=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],D9=["TimeoutError","RequestTimeout","RequestTimeoutException"],k9=[500,502,503,504],h9=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],x9=C0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),v9=C0(($)=>S9.includes($.name),"isClockSkewError"),I4=C0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),c9=C0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||b9.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),K4=C0(($)=>{var U;return I4($)||D9.includes($.name)||h9.includes(($==null?void 0:$.code)||"")||k9.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),y9=C0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!K4($))return!0;return!1}return!1},"isServerError")});var P4=V((iK,j4)=>{var{defineProperty:T1,getOwnPropertyDescriptor:u9,getOwnPropertyNames:_9}=Object,g9=Object.prototype.hasOwnProperty,l=($,U)=>T1($,"name",{value:U,configurable:!0}),d9=($,U)=>{for(var G in U)T1($,G,{get:U[G],enumerable:!0})},p9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of _9(U))if(!g9.call($,Z)&&Z!==G)T1($,Z,{get:()=>U[Z],enumerable:!(W=u9(U,Z))||W.enumerable})}return $},l9=($)=>p9(T1({},"__esModule",{value:!0}),$),R4={};d9(R4,{AdaptiveRetryStrategy:()=>o9,ConfiguredRetryStrategy:()=>a9,DEFAULT_MAX_ATTEMPTS:()=>k$,DEFAULT_RETRY_DELAY_BASE:()=>g0,DEFAULT_RETRY_MODE:()=>s9,DefaultRateLimiter:()=>A4,INITIAL_RETRY_TOKENS:()=>h$,INVOCATION_ID_HEADER:()=>n9,MAXIMUM_RETRY_DELAY:()=>x$,NO_RETRY_INCREMENT:()=>C4,REQUEST_HEADER:()=>i9,RETRY_COST:()=>T4,RETRY_MODES:()=>B4,StandardRetryStrategy:()=>v$,THROTTLING_RETRY_DELAY_BASE:()=>H4,TIMEOUT_RETRY_COST:()=>O4});j4.exports=l9(R4);var B4=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(B4||{}),k$=3,s9="standard",m9=I0(),E4=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;const G=this.getCurrentTimeInSeconds();this.lastThrottleTime=G,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){const G=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>setTimeout(W,G))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const G=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+G),this.lastTimestamp=U}updateClientSendingRate(U){let G;if(this.updateMeasuredRate(),m9.isThrottlingError(U)){const Z=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=Z,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(Z),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());const W=Math.min(G,2*this.measuredTxRate);this.updateTokenBucketRate(W)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){const W=this.requestCount/(G-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(W*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=G}}getPrecise(U){return parseFloat(U.toFixed(8))}};l(E4,"DefaultRateLimiter");var A4=E4,g0=100,x$=20000,H4=500,h$=500,T4=5,O4=10,C4=1,n9="amz-sdk-invocation-id",i9="amz-sdk-request",r9=l(()=>{let $=g0;return{computeNextBackoffDelay:l((W)=>{return Math.floor(Math.min(x$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:l((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),V4=l(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:l(()=>U,"getRetryCount"),getRetryDelay:l(()=>Math.min(x$,$),"getRetryDelay"),getRetryCost:l(()=>G,"getRetryCost")}},"createDefaultRetryToken"),f4=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=h$,this.retryBackoffStrategy=r9(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return V4({retryDelay:g0,retryCount:0})}async refreshRetryTokenForRetry(U,G){const W=await this.getMaxAttempts();if(this.shouldRetry(U,G,W)){const Z=G.errorType;this.retryBackoffStrategy.setDelayBase(Z==="THROTTLING"?H4:g0);const X=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),Y=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,X):X,L=this.getCapacityCost(Z);return this.capacity-=L,V4({retryDelay:Y,retryCount:U.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(h$,this.capacity+(U.getRetryCost()??C4))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(U){return console.warn(`Max attempts provider could not resolve. Using default of ${k$}`),k$}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?O4:T4}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};l(f4,"StandardRetryStrategy");var v$=f4,q4=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new A4,this.standardRetryStrategy=new v$(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,G){return this.rateLimiter.updateClientSendingRate(G),this.standardRetryStrategy.refreshRetryTokenForRetry(U,G)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};l(q4,"AdaptiveRetryStrategy");var o9=q4,N4=class $ extends v${constructor(U,G=g0){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){const W=await super.refreshRetryTokenForRetry(U,G);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};l(N4,"ConfiguredRetryStrategy");var a9=N4});var h4=V((rK,k4)=>{var{defineProperty:O1,getOwnPropertyDescriptor:t9,getOwnPropertyNames:e9}=Object,$F=Object.prototype.hasOwnProperty,u=($,U)=>O1($,"name",{value:U,configurable:!0}),UF=($,U)=>{for(var G in U)O1($,G,{get:U[G],enumerable:!0})},GF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of e9(U))if(!$F.call($,Z)&&Z!==G)O1($,Z,{get:()=>U[Z],enumerable:!(W=t9(U,Z))||W.enumerable})}return $},WF=($)=>GF(O1({},"__esModule",{value:!0}),$),D4={};UF(D4,{constructStack:()=>c$});k4.exports=WF(D4);var K0=u(($,U)=>{const G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),U0=u(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),c$=u(()=>{let $=[],U=[],G=!1;const W=new Set,Z=u((w)=>w.sort((J,I)=>S4[I.step]-S4[J.step]||b4[I.priority||"normal"]-b4[J.priority||"normal"]),"sort"),X=u((w)=>{let J=!1;const I=u((M)=>{const A=K0(M.name,M.aliases);if(A.includes(w)){J=!0;for(let R of A)W.delete(R);return!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),J},"removeByName"),Y=u((w)=>{let J=!1;const I=u((M)=>{if(M.middleware===w){J=!0;for(let A of K0(M.name,M.aliases))W.delete(A);return!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),J},"removeByReference"),L=u((w)=>{var J;return $.forEach((I)=>{w.add(I.middleware,{...I})}),U.forEach((I)=>{w.addRelativeTo(I.middleware,{...I})}),(J=w.identifyOnResolve)==null||J.call(w,z.identifyOnResolve()),w},"cloneTo"),F=u((w)=>{const J=[];return w.before.forEach((I)=>{if(I.before.length===0&&I.after.length===0)J.push(I);else J.push(...F(I))}),J.push(w),w.after.reverse().forEach((I)=>{if(I.before.length===0&&I.after.length===0)J.push(I);else J.push(...F(I))}),J},"expandRelativeMiddlewareList"),Q=u((w=!1)=>{const J=[],I=[],M={};return $.forEach((R)=>{const E={...R,before:[],after:[]};for(let B of K0(E.name,E.aliases))M[B]=E;J.push(E)}),U.forEach((R)=>{const E={...R,before:[],after:[]};for(let B of K0(E.name,E.aliases))M[B]=E;I.push(E)}),I.forEach((R)=>{if(R.toMiddleware){const E=M[R.toMiddleware];if(E===void 0){if(w)return;throw new Error(`${R.toMiddleware} is not found when adding ${U0(R.name,R.aliases)} middleware ${R.relation} ${R.toMiddleware}`)}if(R.relation==="after")E.after.push(R);if(R.relation==="before")E.before.push(R)}}),Z(J).map(F).reduce((R,E)=>{return R.push(...E),R},[])},"getMiddlewareList"),z={add:(w,J={})=>{const{name:I,override:M,aliases:A}=J,R={step:"initialize",priority:"normal",middleware:w,...J},E=K0(I,A);if(E.length>0){if(E.some((B)=>W.has(B))){if(!M)throw new Error(`Duplicate middleware name '${U0(I,A)}'`);for(let B of E){const H=$.findIndex((b)=>{var e;return b.name===B||((e=b.aliases)==null?void 0:e.some((F0)=>F0===B))});if(H===-1)continue;const T=$[H];if(T.step!==R.step||R.priority!==T.priority)throw new Error(`"${U0(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${U0(I,A)}" middleware with ${R.priority} priority in ${R.step} step.`);$.splice(H,1)}}for(let B of E)W.add(B)}$.push(R)},addRelativeTo:(w,J)=>{const{name:I,override:M,aliases:A}=J,R={middleware:w,...J},E=K0(I,A);if(E.length>0){if(E.some((B)=>W.has(B))){if(!M)throw new Error(`Duplicate middleware name '${U0(I,A)}'`);for(let B of E){const H=U.findIndex((b)=>{var e;return b.name===B||((e=b.aliases)==null?void 0:e.some((F0)=>F0===B))});if(H===-1)continue;const T=U[H];if(T.toMiddleware!==R.toMiddleware||T.relation!==R.relation)throw new Error(`"${U0(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${U0(I,A)}" middleware ${R.relation} "${R.toMiddleware}" middleware.`);U.splice(H,1)}}for(let B of E)W.add(B)}U.push(R)},clone:()=>L(c$()),use:(w)=>{w.applyToStack(z)},remove:(w)=>{if(typeof w==="string")return X(w);else return Y(w)},removeByTag:(w)=>{let J=!1;const I=u((M)=>{const{tags:A,name:R,aliases:E}=M;if(A&&A.includes(w)){const B=K0(R,E);for(let H of B)W.delete(H);return J=!0,!1}return!0},"filterCb");return $=$.filter(I),U=U.filter(I),J},concat:(w)=>{var J;const I=L(c$());return I.use(w),I.identifyOnResolve(G||I.identifyOnResolve()||(((J=w.identifyOnResolve)==null?void 0:J.call(w))??!1)),I},applyToStack:L,identify:()=>{return Q(!0).map((w)=>{const J=w.step??w.relation+" "+w.toMiddleware;return U0(w.name,w.aliases)+" - "+J})},identifyOnResolve(w){if(typeof w==="boolean")G=w;return G},resolve:(w,J)=>{for(let I of Q().map((M)=>M.middleware).reverse())w=I(w,J);if(G)console.log(z.identify());return w}};return z},"constructStack"),S4={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},b4={high:3,normal:2,low:1}});var y$=V((oK,v4)=>{var{defineProperty:C1,getOwnPropertyDescriptor:ZF,getOwnPropertyNames:XF}=Object,YF=Object.prototype.hasOwnProperty,LF=($,U)=>C1($,"name",{value:U,configurable:!0}),FF=($,U)=>{for(var G in U)C1($,G,{get:U[G],enumerable:!0})},QF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of XF(U))if(!YF.call($,Z)&&Z!==G)C1($,Z,{get:()=>U[Z],enumerable:!(W=ZF(U,Z))||W.enumerable})}return $},zF=($)=>QF(C1({},"__esModule",{value:!0}),$),x4={};FF(x4,{isArrayBuffer:()=>wF});v4.exports=zF(x4);var wF=LF(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var d0=V((aK,u4)=>{var{defineProperty:f1,getOwnPropertyDescriptor:JF,getOwnPropertyNames:IF}=Object,KF=Object.prototype.hasOwnProperty,c4=($,U)=>f1($,"name",{value:U,configurable:!0}),MF=($,U)=>{for(var G in U)f1($,G,{get:U[G],enumerable:!0})},VF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of IF(U))if(!KF.call($,Z)&&Z!==G)f1($,Z,{get:()=>U[Z],enumerable:!(W=JF(U,Z))||W.enumerable})}return $},RF=($)=>VF(f1({},"__esModule",{value:!0}),$),y4={};MF(y4,{fromArrayBuffer:()=>EF,fromString:()=>AF});u4.exports=RF(y4);var BF=y$(),u$=import.meta.require("buffer"),EF=c4(($,U=0,G=$.byteLength-U)=>{if(!BF.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return u$.Buffer.from($,U,G)},"fromArrayBuffer"),AF=c4(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?u$.Buffer.from($,U):u$.Buffer.from($)},"fromString")});var d4=V((_4)=>{Object.defineProperty(_4,"__esModule",{value:!0});_4.fromBase64=void 0;var HF=d0(),TF=/^[A-Za-z0-9+/]*={0,2}$/,OF=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!TF.exec($))throw new TypeError("Invalid base64 string.");const U=HF.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};_4.fromBase64=OF});var G0=V((eK,m4)=>{var{defineProperty:q1,getOwnPropertyDescriptor:CF,getOwnPropertyNames:fF}=Object,qF=Object.prototype.hasOwnProperty,_$=($,U)=>q1($,"name",{value:U,configurable:!0}),NF=($,U)=>{for(var G in U)q1($,G,{get:U[G],enumerable:!0})},jF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of fF(U))if(!qF.call($,Z)&&Z!==G)q1($,Z,{get:()=>U[Z],enumerable:!(W=CF(U,Z))||W.enumerable})}return $},PF=($)=>jF(q1({},"__esModule",{value:!0}),$),p4={};NF(p4,{fromUtf8:()=>s4,toUint8Array:()=>SF,toUtf8:()=>bF});m4.exports=PF(p4);var l4=d0(),s4=_$(($)=>{const U=l4.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),SF=_$(($)=>{if(typeof $==="string")return s4($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),bF=_$(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return l4.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var r4=V((n4)=>{Object.defineProperty(n4,"__esModule",{value:!0});n4.toBase64=void 0;var DF=d0(),kF=G0(),hF=($)=>{let U;if(typeof $==="string")U=kF.fromUtf8($);else U=$;if(typeof U!=="object"||typeof U.byteOffset!=="number"||typeof U.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return DF.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};n4.toBase64=hF});var j1=V((UM,N1)=>{var{defineProperty:o4,getOwnPropertyDescriptor:xF,getOwnPropertyNames:vF}=Object,cF=Object.prototype.hasOwnProperty,g$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of vF(U))if(!cF.call($,Z)&&Z!==G)o4($,Z,{get:()=>U[Z],enumerable:!(W=xF(U,Z))||W.enumerable})}return $},a4=($,U,G)=>(g$($,U,"default"),G&&g$(G,U,"default")),yF=($)=>g$(o4({},"__esModule",{value:!0}),$),d$={};N1.exports=yF(d$);a4(d$,d4(),N1.exports);a4(d$,r4(),N1.exports)});var $6=V((t4)=>{Object.defineProperty(t4,"__esModule",{value:!0});t4.getAwsChunkedEncodingStream=void 0;var uF=import.meta.require("stream"),_F=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:Z,checksumLocationName:X,streamHasher:Y}=U,L=G!==void 0&&Z!==void 0&&X!==void 0&&Y!==void 0,F=L?Y(Z,$):void 0,Q=new uF.Readable({read:()=>{}});return $.on("data",(z)=>{const w=W(z)||0;Q.push(`${w.toString(16)}\r\n`),Q.push(z),Q.push("\r\n")}),$.on("end",async()=>{if(Q.push("0\r\n"),L){const z=G(await F);Q.push(`${X}:${z}\r\n`),Q.push("\r\n")}Q.push(null)}),Q};t4.getAwsChunkedEncodingStream=_F});var l$=V((WM,W6)=>{var{defineProperty:P1,getOwnPropertyDescriptor:gF,getOwnPropertyNames:dF}=Object,pF=Object.prototype.hasOwnProperty,p$=($,U)=>P1($,"name",{value:U,configurable:!0}),lF=($,U)=>{for(var G in U)P1($,G,{get:U[G],enumerable:!0})},sF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of dF(U))if(!pF.call($,Z)&&Z!==G)P1($,Z,{get:()=>U[Z],enumerable:!(W=gF(U,Z))||W.enumerable})}return $},mF=($)=>sF(P1({},"__esModule",{value:!0}),$),U6={};lF(U6,{escapeUri:()=>G6,escapeUriPath:()=>iF});W6.exports=mF(U6);var G6=p$(($)=>encodeURIComponent($).replace(/[!'()*]/g,nF),"escapeUri"),nF=p$(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),iF=p$(($)=>$.split("/").map(G6).join("/"),"escapeUriPath")});var m$=V((ZM,Y6)=>{var X6=function($){const U=[];for(let G of Object.keys($).sort()){const W=$[G];if(G=s$.escapeUri(G),Array.isArray(W))for(let Z=0,X=W.length;Z<X;Z++)U.push(`${G}=${s$.escapeUri(W[Z])}`);else{let Z=G;if(W||typeof W==="string")Z+=`=${s$.escapeUri(W)}`;U.push(Z)}}return U.join("&")},S1=Object.defineProperty,rF=Object.getOwnPropertyDescriptor,oF=Object.getOwnPropertyNames,aF=Object.prototype.hasOwnProperty,tF=($,U)=>S1($,"name",{value:U,configurable:!0}),eF=($,U)=>{for(var G in U)S1($,G,{get:U[G],enumerable:!0})},$Q=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of oF(U))if(!aF.call($,Z)&&Z!==G)S1($,Z,{get:()=>U[Z],enumerable:!(W=rF(U,Z))||W.enumerable})}return $},UQ=($)=>$Q(S1({},"__esModule",{value:!0}),$),Z6={};eF(Z6,{buildQueryString:()=>X6});Y6.exports=UQ(Z6);var s$=l$();tF(X6,"buildQueryString")});var O6=V((XM,T6)=>{async function r$($,U,G=L6){const W=U.headers??{},Z=W.Expect||W.expect;let X=-1,Y=!1;if(Z==="100-continue")await Promise.race([new Promise((L)=>{X=Number(setTimeout(L,Math.max(L6,G)))}),new Promise((L)=>{$.on("continue",()=>{clearTimeout(X),L()}),$.on("error",()=>{Y=!0,clearTimeout(X),L()})})]);if(!Y)M6($,U.body)}var M6=function($,U){if(U instanceof K6.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}const G=U;if(typeof G==="object"&&G.buffer&&typeof G.byteOffset==="number"&&typeof G.byteLength==="number"){$.end(Buffer.from(G.buffer,G.byteOffset,G.byteLength));return}$.end(Buffer.from(U));return}$.end()};async function H6($){const U=[],G=$.getReader();let W=!1,Z=0;while(!W){const{done:L,value:F}=await G.read();if(F)U.push(F),Z+=F.length;W=L}const X=new Uint8Array(Z);let Y=0;for(let L of U)X.set(L,Y),Y+=L.length;return X}var{create:GQ,defineProperty:p0,getOwnPropertyDescriptor:WQ,getOwnPropertyNames:ZQ,getPrototypeOf:XQ}=Object,YQ=Object.prototype.hasOwnProperty,N=($,U)=>p0($,"name",{value:U,configurable:!0}),LQ=($,U)=>{for(var G in U)p0($,G,{get:U[G],enumerable:!0})},Q6=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of ZQ(U))if(!YQ.call($,Z)&&Z!==G)p0($,Z,{get:()=>U[Z],enumerable:!(W=WQ(U,Z))||W.enumerable})}return $},FQ=($,U,G)=>(G=$!=null?GQ(XQ($)):{},Q6(U||!$||!$.__esModule?p0(G,"default",{value:$,enumerable:!0}):G,$)),QQ=($)=>Q6(p0({},"__esModule",{value:!0}),$),z6={};LQ(z6,{DEFAULT_REQUEST_TIMEOUT:()=>KQ,NodeHttp2Handler:()=>EQ,NodeHttpHandler:()=>MQ,streamCollector:()=>HQ});T6.exports=QQ(z6);var w6=r(),J6=m$(),n$=import.meta.require("http"),i$=import.meta.require("https"),zQ=["ECONNRESET","EPIPE","ETIMEDOUT"],I6=N(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),wQ=N(($,U,G=0)=>{if(!G)return;const W=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G);$.on("socket",(Z)=>{if(Z.connecting)Z.on("connect",()=>{clearTimeout(W)});else clearTimeout(W)})},"setConnectionTimeout"),JQ=N(($,{keepAlive:U,keepAliveMsecs:G})=>{if(U!==!0)return;$.on("socket",(W)=>{W.setKeepAlive(U,G||0)})},"setSocketKeepAlive"),IQ=N(($,U,G=0)=>{$.setTimeout(G,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),K6=import.meta.require("stream"),L6=1000;N(r$,"writeRequestBody");N(M6,"writeBody");var KQ=0,V6=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((Z)=>{G(this.resolveDefaultConfig(Z))}).catch(W);else G(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,G,W=console){var Z,X,Y;const{sockets:L,requests:F,maxSockets:Q}=U;if(typeof Q!=="number"||Q===Infinity)return G;const z=15000;if(Date.now()-z<G)return G;if(L&&F)for(let w in L){const J=((Z=L[w])==null?void 0:Z.length)??0,I=((X=F[w])==null?void 0:X.length)??0;if(J>=Q&&I>=2*Q)return(Y=W==null?void 0:W.warn)==null||Y.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${J} and ${I} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){const{requestTimeout:G,connectionTimeout:W,socketTimeout:Z,httpAgent:X,httpsAgent:Y}=U||{};return{connectionTimeout:W,requestTimeout:G??Z,httpAgent:(()=>{if(X instanceof n$.Agent||typeof(X==null?void 0:X.destroy)==="function")return X;return new n$.Agent({keepAlive:!0,maxSockets:50,...X})})(),httpsAgent:(()=>{if(Y instanceof i$.Agent||typeof(Y==null?void 0:Y.destroy)==="function")return Y;return new i$.Agent({keepAlive:!0,maxSockets:50,...Y})})(),logger:console}}destroy(){var U,G,W,Z;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(Z=(W=this.config)==null?void 0:W.httpsAgent)==null||Z.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;let W;return new Promise((Z,X)=>{let Y=void 0;const L=N(async(B)=>{await Y,clearTimeout(W),Z(B)},"resolve"),F=N(async(B)=>{await Y,clearTimeout(W),X(B)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const B=new Error("Request aborted");B.name="AbortError",F(B);return}const Q=U.protocol==="https:",z=Q?this.config.httpsAgent:this.config.httpAgent;W=setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(z,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const w=J6.buildQueryString(U.query||{});let J=void 0;if(U.username!=null||U.password!=null){const B=U.username??"",H=U.password??"";J=`${B}:${H}`}let I=U.path;if(w)I+=`?${w}`;if(U.fragment)I+=`#${U.fragment}`;const M={headers:U.headers,host:U.hostname,method:U.method,path:I,port:U.port,agent:z,auth:J},R=(Q?i$.request:n$.request)(M,(B)=>{const H=new w6.HttpResponse({statusCode:B.statusCode||-1,reason:B.statusMessage,headers:I6(B.headers),body:B});L({response:H})});if(R.on("error",(B)=>{if(zQ.includes(B.code))F(Object.assign(B,{name:"TimeoutError"}));else F(B)}),wQ(R,F,this.config.connectionTimeout),IQ(R,F,this.config.requestTimeout),G){const B=N(()=>{R.destroy();const H=new Error("Request aborted");H.name="AbortError",F(H)},"onAbort");if(typeof G.addEventListener==="function"){const H=G;H.addEventListener("abort",B,{once:!0}),R.once("close",()=>H.removeEventListener("abort",B))}else G.onabort=B}const E=M.agent;if(typeof E==="object"&&"keepAlive"in E)JQ(R,{keepAlive:E.keepAlive,keepAliveMsecs:E.keepAliveMsecs});Y=r$(R,U,this.config.requestTimeout).catch((B)=>{return clearTimeout(W),X(B)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};N(V6,"NodeHttpHandler");var MQ=V6,F6=import.meta.require("http2"),VQ=FQ(import.meta.require("http2")),R6=class ${constructor(U){this.sessions=[],this.sessions=U??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(U){this.sessions.push(U)}contains(U){return this.sessions.includes(U)}remove(U){this.sessions=this.sessions.filter((G)=>G!==U)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(U){for(let G of this.sessions)if(G===U){if(!G.destroyed)G.destroy()}}};N(R6,"NodeHttp2ConnectionPool");var RQ=R6,B6=class ${constructor(U){if(this.sessionCache=new Map,this.config=U,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(U,G){const W=this.getUrlString(U),Z=this.sessionCache.get(W);if(Z){const F=Z.poll();if(F&&!this.config.disableConcurrency)return F}const X=VQ.default.connect(W);if(this.config.maxConcurrency)X.settings({maxConcurrentStreams:this.config.maxConcurrency},(F)=>{if(F)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});X.unref();const Y=N(()=>{X.destroy(),this.deleteSession(W,X)},"destroySessionCb");if(X.on("goaway",Y),X.on("error",Y),X.on("frameError",Y),X.on("close",()=>this.deleteSession(W,X)),G.requestTimeout)X.setTimeout(G.requestTimeout,Y);const L=this.sessionCache.get(W)||new RQ;return L.offerLast(X),this.sessionCache.set(W,L),X}deleteSession(U,G){const W=this.sessionCache.get(U);if(!W)return;if(!W.contains(G))return;W.remove(G),this.sessionCache.set(U,W)}release(U,G){var W;const Z=this.getUrlString(U);(W=this.sessionCache.get(Z))==null||W.offerLast(G)}destroy(){for(let[U,G]of this.sessionCache){for(let W of G){if(!W.destroyed)W.destroy();G.remove(W)}this.sessionCache.delete(U)}}setMaxConcurrentStreams(U){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=U}setDisableConcurrentStreams(U){this.config.disableConcurrency=U}getUrlString(U){return U.destination.toString()}};N(B6,"NodeHttp2ConnectionManager");var BQ=B6,E6=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new BQ({}),this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((Z)=>{G(Z||{})}).catch(W);else G(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:W,disableConcurrentStreams:Z}=this.config;return new Promise((X,Y)=>{var L;let F=!1,Q=void 0;const z=N(async(q)=>{await Q,X(q)},"resolve"),w=N(async(q)=>{await Q,Y(q)},"reject");if(G==null?void 0:G.aborted){F=!0;const q=new Error("Request aborted");q.name="AbortError",w(q);return}const{hostname:J,method:I,port:M,protocol:A,query:R}=U;let E="";if(U.username!=null||U.password!=null){const q=U.username??"",g=U.password??"";E=`${q}:${g}@`}const B=`${A}//${E}${J}${M?`:${M}`:""}`,H={destination:new URL(B)},T=this.connectionManager.lease(H,{requestTimeout:(L=this.config)==null?void 0:L.sessionTimeout,disableConcurrentStreams:Z||!1}),b=N((q)=>{if(Z)this.destroySession(T);F=!0,w(q)},"rejectWithDestroy"),e=J6.buildQueryString(R||{});let F0=U.path;if(e)F0+=`?${e}`;if(U.fragment)F0+=`#${U.fragment}`;const v=T.request({...U.headers,[F6.constants.HTTP2_HEADER_PATH]:F0,[F6.constants.HTTP2_HEADER_METHOD]:I});if(T.ref(),v.on("response",(q)=>{const g=new w6.HttpResponse({statusCode:q[":status"]||-1,headers:I6(q),body:v});if(F=!0,z({response:g}),Z)T.close(),this.connectionManager.deleteSession(B,T)}),W)v.setTimeout(W,()=>{v.close();const q=new Error(`Stream timed out because of no activity for ${W} ms`);q.name="TimeoutError",b(q)});if(G){const q=N(()=>{v.close();const g=new Error("Request aborted");g.name="AbortError",b(g)},"onAbort");if(typeof G.addEventListener==="function"){const g=G;g.addEventListener("abort",q,{once:!0}),v.once("close",()=>g.removeEventListener("abort",q))}else G.onabort=q}v.on("frameError",(q,g,lY)=>{b(new Error(`Frame type id ${q} in stream id ${lY} has failed with code ${g}.`))}),v.on("error",b),v.on("aborted",()=>{b(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${v.rstCode}.`))}),v.on("close",()=>{if(T.unref(),Z)T.destroy();if(!F)b(new Error("Unexpected error: http2 request did not get a response"))}),Q=r$(v,U,W)})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};N(E6,"NodeHttp2Handler");var EQ=E6,A6=class $ extends K6.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};N(A6,"Collector");var AQ=A6,HQ=N(($)=>{if(TQ($))return H6($);return new Promise((U,G)=>{const W=new AQ;$.pipe(W),$.on("error",(Z)=>{W.end(),G(Z)}),W.on("error",G),W.on("finish",function(){const Z=new Uint8Array(Buffer.concat(this.bufferedBytes));U(Z)})})},"streamCollector"),TQ=N(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");N(H6,"collectReadableStream")});var D6=V((YM,b6)=>{var q6=function($=0){return new Promise((U,G)=>{if($)setTimeout(()=>{const W=new Error(`Request did not complete within ${$} ms`);W.name="TimeoutError",G(W)},$)})};async function j6($){const U=await S6($),G=bQ.fromBase64(U);return new Uint8Array(G)}async function P6($){const U=[],G=$.getReader();let W=!1,Z=0;while(!W){const{done:L,value:F}=await G.read();if(F)U.push(F),Z+=F.length;W=L}const X=new Uint8Array(Z);let Y=0;for(let L of U)X.set(L,Y),Y+=L.length;return X}var S6=function($){return new Promise((U,G)=>{const W=new FileReader;W.onloadend=()=>{if(W.readyState!==2)return G(new Error("Reader aborted too early"));const Z=W.result??"",X=Z.indexOf(","),Y=X>-1?X+1:Z.length;U(Z.substring(Y))},W.onabort=()=>G(new Error("Read aborted")),W.onerror=()=>G(W.error),W.readAsDataURL($)})},D1=Object.defineProperty,OQ=Object.getOwnPropertyDescriptor,CQ=Object.getOwnPropertyNames,fQ=Object.prototype.hasOwnProperty,o=($,U)=>D1($,"name",{value:U,configurable:!0}),qQ=($,U)=>{for(var G in U)D1($,G,{get:U[G],enumerable:!0})},NQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of CQ(U))if(!fQ.call($,Z)&&Z!==G)D1($,Z,{get:()=>U[Z],enumerable:!(W=OQ(U,Z))||W.enumerable})}return $},jQ=($)=>NQ(D1({},"__esModule",{value:!0}),$),f6={};qQ(f6,{FetchHttpHandler:()=>SQ,keepAliveSupport:()=>b1,streamCollector:()=>DQ});b6.exports=jQ(f6);var C6=r(),PQ=m$();o(q6,"requestTimeout");var b1={supported:void 0},N6=class ${static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}constructor(U){if(typeof U==="function")this.configProvider=U().then((G)=>G||{});else this.config=U??{},this.configProvider=Promise.resolve(this.config);if(b1.supported===void 0)b1.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;const W=this.config.requestTimeout,Z=this.config.keepAlive===!0,X=this.config.credentials;if(G==null?void 0:G.aborted){const E=new Error("Request aborted");return E.name="AbortError",Promise.reject(E)}let Y=U.path;const L=PQ.buildQueryString(U.query||{});if(L)Y+=`?${L}`;if(U.fragment)Y+=`#${U.fragment}`;let F="";if(U.username!=null||U.password!=null){const E=U.username??"",B=U.password??"";F=`${E}:${B}@`}const{port:Q,method:z}=U,w=`${U.protocol}//${F}${U.hostname}${Q?`:${Q}`:""}${Y}`,J=z==="GET"||z==="HEAD"?void 0:U.body,I={body:J,headers:new Headers(U.headers),method:z,credentials:X};if(J)I.duplex="half";if(typeof AbortController!=="undefined")I.signal=G;if(b1.supported)I.keepalive=Z;let M=o(()=>{},"removeSignalEventListener");const A=new Request(w,I),R=[fetch(A).then((E)=>{const B=E.headers,H={};for(let b of B.entries())H[b[0]]=b[1];if(E.body==null)return E.blob().then((b)=>({response:new C6.HttpResponse({headers:H,reason:E.statusText,statusCode:E.status,body:b})}));return{response:new C6.HttpResponse({headers:H,reason:E.statusText,statusCode:E.status,body:E.body})}}),q6(W)];if(G)R.push(new Promise((E,B)=>{const H=o(()=>{const T=new Error("Request aborted");T.name="AbortError",B(T)},"onAbort");if(typeof G.addEventListener==="function"){const T=G;T.addEventListener("abort",H,{once:!0}),M=o(()=>T.removeEventListener("abort",H),"removeSignalEventListener")}else G.onabort=H}));return Promise.race(R).finally(M)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};o(N6,"FetchHttpHandler");var SQ=N6,bQ=j1(),DQ=o(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return j6($);return P6($)},"streamCollector");o(j6,"collectBlob");o(P6,"collectStream");o(S6,"readToBase64")});var a$=V((LM,y6)=>{var v6=function($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const U=new Uint8Array($.length/2);for(let G=0;G<$.length;G+=2){const W=$.slice(G,G+2).toLowerCase();if(W in o$)U[G/2]=o$[W];else throw new Error(`Cannot decode unrecognized sequence ${W} as hexadecimal`)}return U},c6=function($){let U="";for(let G=0;G<$.byteLength;G++)U+=x6[$[G]];return U},k1=Object.defineProperty,kQ=Object.getOwnPropertyDescriptor,hQ=Object.getOwnPropertyNames,xQ=Object.prototype.hasOwnProperty,k6=($,U)=>k1($,"name",{value:U,configurable:!0}),vQ=($,U)=>{for(var G in U)k1($,G,{get:U[G],enumerable:!0})},cQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of hQ(U))if(!xQ.call($,Z)&&Z!==G)k1($,Z,{get:()=>U[Z],enumerable:!(W=kQ(U,Z))||W.enumerable})}return $},yQ=($)=>cQ(k1({},"__esModule",{value:!0}),$),h6={};vQ(h6,{fromHex:()=>v6,toHex:()=>c6});y6.exports=yQ(h6);var x6={},o$={};for(let $=0;$<256;$++){let U=$.toString(16).toLowerCase();if(U.length===1)U=`0${U}`;x6[$]=U,o$[U]=$}k6(v6,"fromHex");k6(c6,"toHex")});var l0=V((u6)=>{Object.defineProperty(u6,"__esModule",{value:!0});u6.isReadableStream=void 0;var uQ=($)=>{var U;return typeof ReadableStream==="function"&&(((U=$===null||$===void 0?void 0:$.constructor)===null||U===void 0?void 0:U.name)===ReadableStream.name||$ instanceof ReadableStream)};u6.isReadableStream=uQ});var m6=V((l6)=>{Object.defineProperty(l6,"__esModule",{value:!0});l6.sdkStreamMixin=void 0;var _Q=D6(),gQ=j1(),dQ=a$(),pQ=G0(),g6=l0(),d6="The stream has already been transformed.",lQ=($)=>{var U,G;if(!p6($)&&!g6.isReadableStream($)){const Y=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${Y}`)}let W=!1;const Z=async()=>{if(W)throw new Error(d6);return W=!0,await _Q.streamCollector($)},X=(Y)=>{if(typeof Y.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return Y.stream()};return Object.assign($,{transformToByteArray:Z,transformToString:async(Y)=>{const L=await Z();if(Y==="base64")return gQ.toBase64(L);else if(Y==="hex")return dQ.toHex(L);else if(Y===void 0||Y==="utf8"||Y==="utf-8")return pQ.toUtf8(L);else if(typeof TextDecoder==="function")return new TextDecoder(Y).decode(L);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(d6);if(W=!0,p6($))return X($);else if(g6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};l6.sdkStreamMixin=lQ;var p6=($)=>typeof Blob==="function"&&$ instanceof Blob});var o6=V((i6)=>{Object.defineProperty(i6,"__esModule",{value:!0});i6.sdkStreamMixin=void 0;var sQ=O6(),mQ=d0(),t$=import.meta.require("stream"),nQ=import.meta.require("util"),iQ=m6(),n6="The stream has already been transformed.",rQ=($)=>{var U,G;if(!($ instanceof t$.Readable))try{return iQ.sdkStreamMixin($)}catch(X){const Y=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${Y}`)}let W=!1;const Z=async()=>{if(W)throw new Error(n6);return W=!0,await sQ.streamCollector($)};return Object.assign($,{transformToByteArray:Z,transformToString:async(X)=>{const Y=await Z();if(X===void 0||Buffer.isEncoding(X))return mQ.fromArrayBuffer(Y.buffer,Y.byteOffset,Y.byteLength).toString(X);else return new nQ.TextDecoder(X).decode(Y)},transformToWebStream:()=>{if(W)throw new Error(n6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof t$.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return W=!0,t$.Readable.toWeb($)}})};i6.sdkStreamMixin=rQ});var e6=V((a6)=>{async function oQ($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(a6,"__esModule",{value:!0});a6.splitStream=void 0;a6.splitStream=oQ});var WW=V((UW)=>{async function eQ($){if(tQ.isReadableStream($))return aQ.splitStream($);const U=new $W.PassThrough,G=new $W.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(UW,"__esModule",{value:!0});UW.splitStream=void 0;var $W=import.meta.require("stream"),aQ=e6(),tQ=l0();UW.splitStream=eQ});var YW=V((ZW)=>{async function $7($,U){var G;let W=0;const Z=[],X=$.getReader();let Y=!1;while(!Y){const{done:Q,value:z}=await X.read();if(z)Z.push(z),W+=(G=z===null||z===void 0?void 0:z.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;Y=Q}X.releaseLock();const L=new Uint8Array(Math.min(U,W));let F=0;for(let Q of Z){if(Q.byteLength>L.byteLength-F){L.set(Q.subarray(0,L.byteLength-F),F);break}else L.set(Q,F);F+=Q.length}return L}Object.defineProperty(ZW,"__esModule",{value:!0});ZW.headStream=void 0;ZW.headStream=$7});var zW=V((FW)=>{Object.defineProperty(FW,"__esModule",{value:!0});FW.headStream=void 0;var U7=import.meta.require("stream"),G7=YW(),W7=l0(),Z7=($,U)=>{if(W7.isReadableStream($))return G7.headStream($,U);return new Promise((G,W)=>{const Z=new LW;Z.limit=U,$.pipe(Z),$.on("error",(X)=>{Z.end(),W(X)}),Z.on("error",W),Z.on("finish",function(){const X=new Uint8Array(Buffer.concat(this.buffers));G(X)})})};FW.headStream=Z7;class LW extends U7.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write($,U,G){var W;if(this.buffers.push($),this.bytesBuffered+=(W=$.byteLength)!==null&&W!==void 0?W:0,this.bytesBuffered>=this.limit){const Z=this.bytesBuffered-this.limit,X=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=X.subarray(0,X.byteLength-Z),this.emit("finish")}G()}}});var VW=V((MM,V0)=>{var IW=function($,U="utf-8"){if(U==="base64")return wW.toBase64($);return JW.toUtf8($)},KW=function($,U){if(U==="base64")return $U.mutate(wW.fromBase64($));return $U.mutate(JW.fromUtf8($))},h1=Object.defineProperty,X7=Object.getOwnPropertyDescriptor,Y7=Object.getOwnPropertyNames,L7=Object.prototype.hasOwnProperty,UU=($,U)=>h1($,"name",{value:U,configurable:!0}),F7=($,U)=>{for(var G in U)h1($,G,{get:U[G],enumerable:!0})},e$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of Y7(U))if(!L7.call($,Z)&&Z!==G)h1($,Z,{get:()=>U[Z],enumerable:!(W=X7(U,Z))||W.enumerable})}return $},s0=($,U,G)=>(e$($,U,"default"),G&&e$(G,U,"default")),Q7=($)=>e$(h1({},"__esModule",{value:!0}),$),M0={};F7(M0,{Uint8ArrayBlobAdapter:()=>$U});V0.exports=Q7(M0);var wW=j1(),JW=G0();UU(IW,"transformToString");UU(KW,"transformFromString");var MW=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return KW(U,G);default:throw new Error(`Unsupported conversion from ${typeof U} to Uint8ArrayBlobAdapter.`)}}static mutate(U){return Object.setPrototypeOf(U,$.prototype),U}transformToString(U="utf-8"){return IW(this,U)}};UU(MW,"Uint8ArrayBlobAdapter");var $U=MW;s0(M0,$6(),V0.exports);s0(M0,o6(),V0.exports);s0(M0,WW(),V0.exports);s0(M0,zW(),V0.exports);s0(M0,l0(),V0.exports)});var j0=V((VM,uW)=>{var SW=function($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),Z=$.getUTCDate(),X=$.getUTCHours(),Y=$.getUTCMinutes(),L=$.getUTCSeconds(),F=Z<10?`0${Z}`:`${Z}`,Q=X<10?`0${X}`:`${X}`,z=Y<10?`0${Y}`:`${Y}`,w=L<10?`0${L}`:`${L}`;return`${c7[W]}, ${F} ${JU[G]} ${U} ${Q}:${z}:${w} GMT`},c1=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},IU=function($,U,G){let W,Z,X;if(typeof U==="undefined"&&typeof G==="undefined")W={},X=$;else if(W=$,typeof U==="function")return Z=U,X=G,Vz(W,Z,X);else X=U;for(let Y of Object.keys(X)){if(!Array.isArray(X[Y])){W[Y]=X[Y];continue}cW(W,null,X,Y)}return W},yW=function($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");const W=$.split(U);if(G===1)return W;const Z=[];let X="";for(let Y=0;Y<W.length;Y++){if(X==="")X=W[Y];else X+=U+W[Y];if((Y+1)%G===0)Z.push(X),X=""}if(X!=="")Z.push(X);return Z},y1=Object.defineProperty,z7=Object.getOwnPropertyDescriptor,w7=Object.getOwnPropertyNames,J7=Object.prototype.hasOwnProperty,K=($,U)=>y1($,"name",{value:U,configurable:!0}),I7=($,U)=>{for(var G in U)y1($,G,{get:U[G],enumerable:!0})},K7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of w7(U))if(!J7.call($,Z)&&Z!==G)y1($,Z,{get:()=>U[Z],enumerable:!(W=z7(U,Z))||W.enumerable})}return $},M7=($)=>K7(y1({},"__esModule",{value:!0}),$),BW={};I7(BW,{Client:()=>R7,Command:()=>OW,LazyJsonString:()=>Iz,NoOpLogger:()=>V7,SENSITIVE_STRING:()=>A7,ServiceException:()=>Uz,StringWrapper:()=>o0,_json:()=>FU,collectBody:()=>B7,convertMap:()=>Kz,createAggregatedClient:()=>H7,dateToUtcString:()=>SW,decorateServiceException:()=>DW,emitWarningIfUnsupportedVersion:()=>Xz,expectBoolean:()=>O7,expectByte:()=>LU,expectFloat32:()=>x1,expectInt:()=>f7,expectInt32:()=>XU,expectLong:()=>i0,expectNonNull:()=>N7,expectNumber:()=>n0,expectObject:()=>fW,expectShort:()=>YU,expectString:()=>j7,expectUnion:()=>P7,extendedEncodeURIComponent:()=>c1,getArrayIfSingleItem:()=>Jz,getDefaultClientConfiguration:()=>zz,getDefaultExtensionConfiguration:()=>hW,getValueFromTextNode:()=>xW,handleFloat:()=>D7,limitedParseDouble:()=>wU,limitedParseFloat:()=>k7,limitedParseFloat32:()=>h7,loadConfigsForDefaultMode:()=>Zz,logger:()=>r0,map:()=>IU,parseBoolean:()=>T7,parseEpochTimestamp:()=>m7,parseRfc3339DateTime:()=>u7,parseRfc3339DateTimeWithOffset:()=>g7,parseRfc7231DateTime:()=>s7,resolveDefaultRuntimeConfig:()=>wz,resolvedPath:()=>Ez,serializeDateTime:()=>Hz,serializeFloat:()=>Az,splitEvery:()=>yW,strictParseByte:()=>PW,strictParseDouble:()=>zU,strictParseFloat:()=>S7,strictParseFloat32:()=>qW,strictParseInt:()=>x7,strictParseInt32:()=>v7,strictParseLong:()=>jW,strictParseShort:()=>f0,take:()=>Mz,throwDefaultError:()=>kW,withBaseException:()=>Gz});uW.exports=M7(BW);var EW=class ${trace(){}debug(){}info(){}warn(){}error(){}};K(EW,"NoOpLogger");var V7=EW,AW=h4(),HW=class ${constructor(U){this.middlewareStack=AW.constructStack(),this.config=U}send(U,G,W){const Z=typeof G!=="function"?G:void 0,X=typeof G==="function"?G:W,Y=U.resolveMiddleware(this.middlewareStack,this.config,Z);if(X)Y(U).then((L)=>X(null,L.output),(L)=>X(L)).catch(()=>{});else return Y(U).then((L)=>L.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};K(HW,"Client");var R7=HW,GU=VW(),B7=K(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return GU.Uint8ArrayBlobAdapter.mutate($);if(!$)return GU.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return GU.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),ZU=z0(),TW=class ${constructor(){this.middlewareStack=AW.constructStack()}static classBuilder(){return new E7}resolveMiddlewareWithContext(U,G,W,{middlewareFn:Z,clientName:X,commandName:Y,inputFilterSensitiveLog:L,outputFilterSensitiveLog:F,smithyContext:Q,additionalContext:z,CommandCtor:w}){for(let R of Z.bind(this)(w,U,G,W))this.middlewareStack.use(R);const J=U.concat(this.middlewareStack),{logger:I}=G,M={logger:I,clientName:X,commandName:Y,inputFilterSensitiveLog:L,outputFilterSensitiveLog:F,[ZU.SMITHY_CONTEXT_KEY]:{commandInstance:this,...Q},...z},{requestHandler:A}=G;return J.resolve((R)=>A.handle(R.request,W||{}),M)}};K(TW,"Command");var OW=TW,CW=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,G,W={}){return this._smithyContext={service:U,operation:G,...W},this}c(U={}){return this._additionalContext=U,this}n(U,G){return this._clientName=U,this._commandName=G,this}f(U=(W)=>W,G=(W)=>W){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=G,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const G=this;let W;return W=(U=class extends OW{constructor(...[Z]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=Z??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(Z,X,Y){return this.resolveMiddlewareWithContext(Z,X,Y,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},K(U,"CommandRef"),U)}};K(CW,"ClassBuilder");var E7=CW,A7="***SensitiveInformation***",H7=K(($,U)=>{for(let G of Object.keys($)){const W=$[G],Z=K(async function(Y,L,F){const Q=new W(Y);if(typeof L==="function")this.send(Q,L);else if(typeof F==="function"){if(typeof L!=="object")throw new Error(`Expected http options but got ${typeof L}`);this.send(Q,L||{},F)}else return this.send(Q,L)},"methodImpl"),X=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[X]=Z}},"createAggregatedClient"),T7=K(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),O7=K(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)r0.warn(v1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")r0.warn(v1(`Expected boolean, got ${typeof $}: ${$}`));if(U==="false")return!1;if(U==="true")return!0}if(typeof $==="boolean")return $;throw new TypeError(`Expected boolean, got ${typeof $}: ${$}`)},"expectBoolean"),n0=K(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))r0.warn(v1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),C7=Math.ceil(340282346638528860000000000000000000000),x1=K(($)=>{const U=n0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>C7)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),i0=K(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),f7=i0,XU=K(($)=>QU($,32),"expectInt32"),YU=K(($)=>QU($,16),"expectShort"),LU=K(($)=>QU($,8),"expectByte"),QU=K(($,U)=>{const G=i0($);if(G!==void 0&&q7(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),q7=K(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),N7=K(($,U)=>{if($===null||$===void 0){if(U)throw new TypeError(`Expected a non-null value for ${U}`);throw new TypeError("Expected a non-null value")}return $},"expectNonNull"),fW=K(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;const U=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${U}: ${$}`)},"expectObject"),j7=K(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return r0.warn(v1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),P7=K(($)=>{if($===null||$===void 0)return;const U=fW($),G=Object.entries(U).filter(([,W])=>W!=null).map(([W])=>W);if(G.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(G.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${G} were not null.`);return U},"expectUnion"),zU=K(($)=>{if(typeof $=="string")return n0(N0($));return n0($)},"strictParseDouble"),S7=zU,qW=K(($)=>{if(typeof $=="string")return x1(N0($));return x1($)},"strictParseFloat32"),b7=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,N0=K(($)=>{const U=$.match(b7);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),wU=K(($)=>{if(typeof $=="string")return NW($);return n0($)},"limitedParseDouble"),D7=wU,k7=wU,h7=K(($)=>{if(typeof $=="string")return NW($);return x1($)},"limitedParseFloat32"),NW=K(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),jW=K(($)=>{if(typeof $==="string")return i0(N0($));return i0($)},"strictParseLong"),x7=jW,v7=K(($)=>{if(typeof $==="string")return XU(N0($));return XU($)},"strictParseInt32"),f0=K(($)=>{if(typeof $==="string")return YU(N0($));return YU($)},"strictParseShort"),PW=K(($)=>{if(typeof $==="string")return LU(N0($));return LU($)},"strictParseByte"),v1=K(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),r0={warn:console.warn},c7=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],JU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];K(SW,"dateToUtcString");var y7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),u7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=y7.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,Z,X,Y,L,F,Q]=U,z=f0(q0(W)),w=n(Z,"month",1,12),J=n(X,"day",1,31);return m0(z,w,J,{hours:Y,minutes:L,seconds:F,fractionalMilliseconds:Q})},"parseRfc3339DateTime"),_7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),g7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=_7.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,Z,X,Y,L,F,Q,z]=U,w=f0(q0(W)),J=n(Z,"month",1,12),I=n(X,"day",1,31),M=m0(w,J,I,{hours:Y,minutes:L,seconds:F,fractionalMilliseconds:Q});if(z.toUpperCase()!="Z")M.setTime(M.getTime()-$z(z));return M},"parseRfc3339DateTimeWithOffset"),d7=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),p7=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),l7=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),s7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=d7.exec($);if(U){const[G,W,Z,X,Y,L,F,Q]=U;return m0(f0(q0(X)),WU(Z),n(W,"day",1,31),{hours:Y,minutes:L,seconds:F,fractionalMilliseconds:Q})}if(U=p7.exec($),U){const[G,W,Z,X,Y,L,F,Q]=U;return r7(m0(n7(X),WU(Z),n(W,"day",1,31),{hours:Y,minutes:L,seconds:F,fractionalMilliseconds:Q}))}if(U=l7.exec($),U){const[G,W,Z,X,Y,L,F,Q]=U;return m0(f0(q0(Q)),WU(W),n(Z.trimLeft(),"day",1,31),{hours:X,minutes:Y,seconds:L,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),m7=K(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=zU($);else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(U)||U===Infinity||U===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),m0=K(($,U,G,W)=>{const Z=U-1;return a7($,Z,G),new Date(Date.UTC($,Z,G,n(W.hours,"hour",0,23),n(W.minutes,"minute",0,59),n(W.seconds,"seconds",0,60),e7(W.fractionalMilliseconds)))},"buildDate"),n7=K(($)=>{const U=(new Date()).getUTCFullYear(),G=Math.floor(U/100)*100+f0(q0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),i7=1576800000000,r7=K(($)=>{if($.getTime()-(new Date()).getTime()>i7)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),WU=K(($)=>{const U=JU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),o7=[31,28,31,30,31,30,31,31,30,31,30,31],a7=K(($,U,G)=>{let W=o7[U];if(U===1&&t7($))W=29;if(G>W)throw new TypeError(`Invalid day for ${JU[U]} in ${$}: ${G}`)},"validateDayOfMonth"),t7=K(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),n=K(($,U,G,W)=>{const Z=PW(q0($));if(Z<G||Z>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return Z},"parseDateValue"),e7=K(($)=>{if($===null||$===void 0)return 0;return qW("0."+$)*1000},"parseMilliseconds"),$z=K(($)=>{const U=$[0];let G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const W=Number($.substring(1,3)),Z=Number($.substring(4,6));return G*(W*60+Z)*60*1000},"parseOffsetToMilliseconds"),q0=K(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),bW=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};K(bW,"ServiceException");var Uz=bW,DW=K(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,Z])=>{if($[W]==null||$[W]==="")$[W]=Z});const G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),kW=K(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const Z=Wz($),X=Z.httpStatusCode?Z.httpStatusCode+"":void 0,Y=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||X||"UnknownError",$fault:"client",$metadata:Z});throw DW(Y,U)},"throwDefaultError"),Gz=K(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{kW({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),Wz=K(($)=>({httpStatusCode:$.statusCode,requestId:$.headers["x-amzn-requestid"]??$.headers["x-amzn-request-id"]??$.headers["x-amz-request-id"],extendedRequestId:$.headers["x-amz-id-2"],cfId:$.headers["x-amz-cf-id"]}),"deserializeMetadata"),Zz=K(($)=>{switch($){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),RW=!1,Xz=K(($)=>{if($&&!RW&&parseInt($.substring(1,$.indexOf(".")))<16)RW=!0},"emitWarningIfUnsupportedVersion"),Yz=K(($)=>{const U=[];for(let G in ZU.AlgorithmId){const W=ZU.AlgorithmId[G];if($[W]===void 0)continue;U.push({algorithmId:()=>W,checksumConstructor:()=>$[W]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(G){this._checksumAlgorithms.push(G)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Lz=K(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),Fz=K(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),Qz=K(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),hW=K(($)=>{return{...Yz($),...Fz($)}},"getDefaultExtensionConfiguration"),zz=hW,wz=K(($)=>{return{...Lz($),...Qz($)}},"resolveDefaultRuntimeConfig");K(c1,"extendedEncodeURIComponent");var Jz=K(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),xW=K(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=xW($[G]);return $},"getValueFromTextNode"),o0=K(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");o0.prototype=Object.create(String.prototype,{constructor:{value:o0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(o0,String);var vW=class $ extends o0{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(U){if(U instanceof $)return U;else if(U instanceof String||typeof U==="string")return new $(U);return new $(JSON.stringify(U))}};K(vW,"LazyJsonString");var Iz=vW;K(IU,"map");var Kz=K(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),Mz=K(($,U)=>{const G={};for(let W in U)cW(G,$,U,W);return G},"take"),Vz=K(($,U,G)=>{return IU($,Object.entries(G).reduce((W,[Z,X])=>{if(Array.isArray(X))W[Z]=X;else if(typeof X==="function")W[Z]=[U,X()];else W[Z]=[U,X];return W},{}))},"mapWithFilter"),cW=K(($,U,G,W)=>{if(U!==null){let Y=G[W];if(typeof Y==="function")Y=[,Y];const[L=Rz,F=Bz,Q=W]=Y;if(typeof L==="function"&&L(U[Q])||typeof L!=="function"&&!!L)$[W]=F(U[Q]);return}let[Z,X]=G[W];if(typeof X==="function"){let Y;const L=Z===void 0&&(Y=X())!=null,F=typeof Z==="function"&&!!Z(void 0)||typeof Z!=="function"&&!!Z;if(L)$[W]=Y;else if(F)$[W]=X()}else{const Y=Z===void 0&&X!=null,L=typeof Z==="function"&&!!Z(X)||typeof Z!=="function"&&!!Z;if(Y||L)$[W]=X}},"applyInstruction"),Rz=K(($)=>$!=null,"nonNullish"),Bz=K(($)=>$,"pass"),Ez=K(($,U,G,W,Z,X)=>{if(U!=null&&U[G]!==void 0){const Y=W();if(Y.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(Z,X?Y.split("/").map((L)=>c1(L)).join("/"):c1(Y))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),Az=K(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),Hz=K(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),FU=K(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(FU);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=FU($[G])}return U}return $},"_json");K(yW,"splitEvery")});var dW=V((_W)=>{Object.defineProperty(_W,"__esModule",{value:!0});_W.isStreamingPayload=void 0;var Tz=import.meta.require("stream"),Oz=($)=>($===null||$===void 0?void 0:$.body)instanceof Tz.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;_W.isStreamingPayload=Oz});var YZ=V((EM,XZ)=>{var{defineProperty:u1,getOwnPropertyDescriptor:Cz,getOwnPropertyNames:fz}=Object,qz=Object.prototype.hasOwnProperty,P=($,U)=>u1($,"name",{value:U,configurable:!0}),Nz=($,U)=>{for(var G in U)u1($,G,{get:U[G],enumerable:!0})},jz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of fz(U))if(!qz.call($,Z)&&Z!==G)u1($,Z,{get:()=>U[Z],enumerable:!(W=Cz(U,Z))||W.enumerable})}return $},Pz=($)=>jz(u1({},"__esModule",{value:!0}),$),lW={};Nz(lW,{AdaptiveRetryStrategy:()=>Dz,CONFIG_MAX_ATTEMPTS:()=>MU,CONFIG_RETRY_MODE:()=>eW,ENV_MAX_ATTEMPTS:()=>KU,ENV_RETRY_MODE:()=>tW,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>kz,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>xz,StandardRetryStrategy:()=>oW,defaultDelayDecider:()=>mW,defaultRetryDecider:()=>nW,getOmitRetryHeadersPlugin:()=>vz,getRetryAfterHint:()=>ZZ,getRetryPlugin:()=>dz,omitRetryHeadersMiddleware:()=>$Z,omitRetryHeadersMiddlewareOptions:()=>UZ,resolveRetryConfig:()=>hz,retryMiddleware:()=>GZ,retryMiddlewareOptions:()=>WZ});XZ.exports=Pz(lW);var P0=r(),sW=E$(),f=P4(),Sz=P(($,U)=>{const G=$,W=(U==null?void 0:U.noRetryIncrement)??f.NO_RETRY_INCREMENT,Z=(U==null?void 0:U.retryCost)??f.RETRY_COST,X=(U==null?void 0:U.timeoutRetryCost)??f.TIMEOUT_RETRY_COST;let Y=$;const L=P((w)=>w.name==="TimeoutError"?X:Z,"getCapacityAmount"),F=P((w)=>L(w)<=Y,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:P((w)=>{if(!F(w))throw new Error("No retry token available");const J=L(w);return Y-=J,J},"retrieveRetryTokens"),releaseRetryTokens:P((w)=>{Y+=w??W,Y=Math.min(Y,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),mW=P(($,U)=>Math.floor(Math.min(f.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),W0=I0(),nW=P(($)=>{if(!$)return!1;return W0.isRetryableByTrait($)||W0.isClockSkewError($)||W0.isThrottlingError($)||W0.isTransientError($)},"defaultRetryDecider"),iW=P(($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)},"asSdkError"),rW=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=f.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??nW,this.delayDecider=(G==null?void 0:G.delayDecider)??mW,this.retryQuota=(G==null?void 0:G.retryQuota)??Sz(f.INITIAL_RETRY_TOKENS)}shouldRetry(U,G,W){return G<W&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(G){U=f.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let Z,X=0,Y=0;const L=await this.getMaxAttempts(),{request:F}=G;if(P0.HttpRequest.isInstance(F))F.headers[f.INVOCATION_ID_HEADER]=sW.v4();while(!0)try{if(P0.HttpRequest.isInstance(F))F.headers[f.REQUEST_HEADER]=`attempt=${X+1}; max=${L}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:Q,output:z}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(Q);return this.retryQuota.releaseRetryTokens(Z),z.$metadata.attempts=X+1,z.$metadata.totalRetryDelay=Y,{response:Q,output:z}}catch(Q){const z=iW(Q);if(X++,this.shouldRetry(z,X,L)){Z=this.retryQuota.retrieveRetryTokens(z);const w=this.delayDecider(W0.isThrottlingError(z)?f.THROTTLING_RETRY_DELAY_BASE:f.DEFAULT_RETRY_DELAY_BASE,X),J=bz(z.$response),I=Math.max(J||0,w);Y+=I,await new Promise((M)=>setTimeout(M,I));continue}if(!z.$metadata)z.$metadata={};throw z.$metadata.attempts=X,z.$metadata.totalRetryDelay=Y,z}}};P(rW,"StandardRetryStrategy");var oW=rW,bz=P(($)=>{if(!P0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return W*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),aW=class $ extends oW{constructor(U,G){const{rateLimiter:W,...Z}=G??{};super(U,Z);this.rateLimiter=W??new f.DefaultRateLimiter,this.mode=f.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};P(aW,"AdaptiveRetryStrategy");var Dz=aW,pW=c0(),KU="AWS_MAX_ATTEMPTS",MU="max_attempts",kz={environmentVariableSelector:($)=>{const U=$[KU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${KU} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[MU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${MU} mast be a number, got "${U}"`);return G},default:f.DEFAULT_MAX_ATTEMPTS},hz=P(($)=>{const{retryStrategy:U}=$,G=pW.normalizeProvider($.maxAttempts??f.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await pW.normalizeProvider($.retryMode)()===f.RETRY_MODES.ADAPTIVE)return new f.AdaptiveRetryStrategy(G);return new f.StandardRetryStrategy(G)}}},"resolveRetryConfig"),tW="AWS_RETRY_MODE",eW="retry_mode",xz={environmentVariableSelector:($)=>$[tW],configFileSelector:($)=>$[eW],default:f.DEFAULT_RETRY_MODE},$Z=P(()=>($)=>async(U)=>{const{request:G}=U;if(P0.HttpRequest.isInstance(G))delete G.headers[f.INVOCATION_ID_HEADER],delete G.headers[f.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),UZ={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},vz=P(($)=>({applyToStack:(U)=>{U.addRelativeTo($Z(),UZ)}}),"getOmitRetryHeadersPlugin"),cz=j0(),yz=dW(),GZ=P(($)=>(U,G)=>async(W)=>{var Z;let X=await $.retryStrategy();const Y=await $.maxAttempts();if(uz(X)){X=X;let L=await X.acquireInitialRetryToken(G.partition_id),F=new Error,Q=0,z=0;const{request:w}=W,J=P0.HttpRequest.isInstance(w);if(J)w.headers[f.INVOCATION_ID_HEADER]=sW.v4();while(!0)try{if(J)w.headers[f.REQUEST_HEADER]=`attempt=${Q+1}; max=${Y}`;const{response:I,output:M}=await U(W);return X.recordSuccess(L),M.$metadata.attempts=Q+1,M.$metadata.totalRetryDelay=z,{response:I,output:M}}catch(I){const M=_z(I);if(F=iW(I),J&&yz.isStreamingPayload(w))throw(Z=G.logger instanceof cz.NoOpLogger?console:G.logger)==null||Z.warn("An error was encountered in a non-retryable streaming request."),F;try{L=await X.refreshRetryTokenForRetry(L,M)}catch(R){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=Q+1,F.$metadata.totalRetryDelay=z,F}Q=L.getRetryCount();const A=L.getRetryDelay();z+=A,await new Promise((R)=>setTimeout(R,A))}}else{if(X=X,X==null?void 0:X.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},"retryMiddleware"),uz=P(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),_z=P(($)=>{const U={error:$,errorType:gz($)},G=ZZ($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),gz=P(($)=>{if(W0.isThrottlingError($))return"THROTTLING";if(W0.isTransientError($))return"TRANSIENT";if(W0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),WZ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},dz=P(($)=>({applyToStack:(U)=>{U.add(GZ($),WZ)}}),"getRetryPlugin"),ZZ=P(($)=>{if(!P0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)},"getRetryAfterHint")});var RU=V((AM,fZ)=>{var QZ=function($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U},HZ=function($,U){return new OZ($,U)},CZ=function($,U,G,W,Z){return C(async function*X(Y,L,...F){let Q=Y.startingToken||void 0,z=!0,w;while(z){if(L[G]=Q,Z)L[Z]=L[Z]??Y.pageSize;if(Y.client instanceof $)w=await Jw(U,Y.client,L,...F);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield w;const J=Q;Q=Iw(w,W),z=!!(Q&&(!Y.stopOnSameToken||Q!==J))}return},"paginateOperation")},g1=Object.defineProperty,pz=Object.getOwnPropertyDescriptor,lz=Object.getOwnPropertyNames,sz=Object.prototype.hasOwnProperty,C=($,U)=>g1($,"name",{value:U,configurable:!0}),mz=($,U)=>{for(var G in U)g1($,G,{get:U[G],enumerable:!0})},nz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of lz(U))if(!sz.call($,Z)&&Z!==G)g1($,Z,{get:()=>U[Z],enumerable:!(W=pz(U,Z))||W.enumerable})}return $},iz=($)=>nz(g1({},"__esModule",{value:!0}),$),LZ={};mz(LZ,{DefaultIdentityProviderConfig:()=>Ww,EXPIRATION_MS:()=>EZ,HttpApiKeyAuthSigner:()=>Zw,HttpBearerAuthSigner:()=>Xw,NoAuthSigner:()=>Yw,RequestBuilder:()=>OZ,createIsIdentityExpiredFunction:()=>BZ,createPaginator:()=>CZ,doesIdentityRequireRefresh:()=>AZ,getHttpAuthSchemeEndpointRuleSetPlugin:()=>oz,getHttpAuthSchemePlugin:()=>tz,getHttpSigningPlugin:()=>Gw,getSmithyContext:()=>Qw,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>zZ,httpAuthSchemeMiddleware:()=>VU,httpAuthSchemeMiddlewareOptions:()=>wZ,httpSigningMiddleware:()=>JZ,httpSigningMiddlewareOptions:()=>IZ,isIdentityExpired:()=>Lw,memoizeIdentityProvider:()=>Fw,normalizeProvider:()=>zw,requestBuilder:()=>HZ});fZ.exports=iz(LZ);var FZ=c0();C(QZ,"convertHttpAuthSchemesToMap");var VU=C(($,U)=>(G,W)=>async(Z)=>{var X;const Y=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,Z.input)),L=QZ($.httpAuthSchemes),F=FZ.getSmithyContext(W),Q=[];for(let z of Y){const w=L.get(z.schemeId);if(!w){Q.push(`HttpAuthScheme \`${z.schemeId}\` was not enabled for this service.`);continue}const J=w.identityProvider(await U.identityProviderConfigProvider($));if(!J){Q.push(`HttpAuthScheme \`${z.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:I={},signingProperties:M={}}=((X=z.propertiesExtractor)==null?void 0:X.call(z,$,W))||{};z.identityProperties=Object.assign(z.identityProperties||{},I),z.signingProperties=Object.assign(z.signingProperties||{},M),F.selectedHttpAuthScheme={httpAuthOption:z,identity:await J(z.identityProperties),signer:w.signer};break}if(!F.selectedHttpAuthScheme)throw new Error(Q.join("\n"));return G(Z)},"httpAuthSchemeMiddleware"),rz=G4(),zZ={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:rz.endpointMiddlewareOptions.name},oz=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(VU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),zZ)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),az=b$(),wZ={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:az.serializerMiddlewareOption.name},tz=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(VU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),wZ)}}),"getHttpAuthSchemePlugin"),d1=r(),ez=C(($)=>(U)=>{throw U},"defaultErrorHandler"),$w=C(($,U)=>{},"defaultSuccessHandler"),JZ=C(($)=>(U,G)=>async(W)=>{if(!d1.HttpRequest.isInstance(W.request))return U(W);const X=FZ.getSmithyContext(G).selectedHttpAuthScheme;if(!X)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:Y={}},identity:L,signer:F}=X,Q=await U({...W,request:await F.sign(W.request,L,Y)}).catch((F.errorHandler||ez)(Y));return(F.successHandler||$w)(Q.response,Y),Q},"httpSigningMiddleware"),Uw=YZ(),IZ={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:Uw.retryMiddlewareOptions.name},Gw=C(($)=>({applyToStack:(U)=>{U.addRelativeTo(JZ($),IZ)}}),"getHttpSigningPlugin"),KZ=class ${constructor(U){this.authSchemes=new Map;for(let[G,W]of Object.entries(U))if(W!==void 0)this.authSchemes.set(G,W)}getIdentityProvider(U){return this.authSchemes.get(U)}};C(KZ,"DefaultIdentityProviderConfig");var Ww=KZ,_1=z0(),MZ=class ${async sign(U,G,W){if(!W)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!W.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!W.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!G.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const Z=d1.HttpRequest.clone(U);if(W.in===_1.HttpApiKeyAuthLocation.QUERY)Z.query[W.name]=G.apiKey;else if(W.in===_1.HttpApiKeyAuthLocation.HEADER)Z.headers[W.name]=W.scheme?`${W.scheme} ${G.apiKey}`:G.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+W.in+"`");return Z}};C(MZ,"HttpApiKeyAuthSigner");var Zw=MZ,VZ=class ${async sign(U,G,W){const Z=d1.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return Z.headers.Authorization=`Bearer ${G.token}`,Z}};C(VZ,"HttpBearerAuthSigner");var Xw=VZ,RZ=class ${async sign(U,G,W){return U}};C(RZ,"NoAuthSigner");var Yw=RZ,BZ=C(($)=>(U)=>AZ(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),EZ=300000,Lw=BZ(EZ),AZ=C(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),Fw=C(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let Z,X,Y,L=!1;const F=C(async(Q)=>{if(!X)X=W(Q);try{Z=await X,Y=!0,L=!1}finally{X=void 0}return Z},"coalesceProvider");if(U===void 0)return async(Q)=>{if(!Y||(Q==null?void 0:Q.forceRefresh))Z=await F(Q);return Z};return async(Q)=>{if(!Y||(Q==null?void 0:Q.forceRefresh))Z=await F(Q);if(L)return Z;if(!G(Z))return L=!0,Z;if(U(Z))return await F(Q),Z;return Z}},"memoizeIdentityProvider"),Qw=C(($)=>$[_1.SMITHY_CONTEXT_KEY]||($[_1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),zw=C(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),ww=j0();C(HZ,"requestBuilder");var TZ=class ${constructor(U,G){this.input=U,this.context=G,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:G="https",port:W,path:Z}=await this.context.endpoint();this.path=Z;for(let X of this.resolvePathStack)X(this.path);return new d1.HttpRequest({protocol:G,hostname:this.hostname||U,port:W,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((G)=>{this.path=`${(G==null?void 0:G.endsWith("/"))?G.slice(0,-1):G||""}`+U}),this}p(U,G,W,Z){return this.resolvePathStack.push((X)=>{this.path=ww.resolvedPath(X,this.input,U,G,W,Z)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};C(TZ,"RequestBuilder");var OZ=TZ,Jw=C(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");C(CZ,"createPaginator");var Iw=C(($,U)=>{let G=$;const W=U.split(".");for(let Z of W){if(!G||typeof G!=="object")return;G=G[Z]}return G},"get")});var RX=V((PH,VX)=>{var{defineProperty:Z$,getOwnPropertyDescriptor:nw,getOwnPropertyNames:iw}=Object,rw=Object.prototype.hasOwnProperty,ow=($,U)=>Z$($,"name",{value:U,configurable:!0}),aw=($,U)=>{for(var G in U)Z$($,G,{get:U[G],enumerable:!0})},tw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of iw(U))if(!rw.call($,Z)&&Z!==G)Z$($,Z,{get:()=>U[Z],enumerable:!(W=nw(U,Z))||W.enumerable})}return $},ew=($)=>tw(Z$({},"__esModule",{value:!0}),$),MX={};aw(MX,{emitWarningIfUnsupportedVersion:()=>$J});VX.exports=ew(MX);var KX=!1,$J=ow(($)=>{if($&&!KX&&parseInt($.substring(1,$.indexOf(".")))<18)KX=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
4
+ no longer support Node.js 16.x on January 6, 2025.
5
+
6
+ To continue receiving updates to AWS services, bug fixes, and security
7
+ updates please upgrade to a supported Node.js LTS version.
8
+
9
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var cX=V((SH,vX)=>{var dU=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},Q$=Object.defineProperty,UJ=Object.getOwnPropertyDescriptor,GJ=Object.getOwnPropertyNames,WJ=Object.prototype.hasOwnProperty,S=($,U)=>Q$($,"name",{value:U,configurable:!0}),ZJ=($,U)=>{for(var G in U)Q$($,G,{get:U[G],enumerable:!0})},XJ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of GJ(U))if(!WJ.call($,Z)&&Z!==G)Q$($,Z,{get:()=>U[Z],enumerable:!(W=UJ(U,Z))||W.enumerable})}return $},YJ=($)=>XJ(Q$({},"__esModule",{value:!0}),$),TX={};ZJ(TX,{SignatureV4:()=>DJ,clearCredentialCache:()=>OJ,createScope:()=>L$,getCanonicalHeaders:()=>gU,getCanonicalQuery:()=>SX,getPayloadHash:()=>F$,getSigningKey:()=>PX,moveHeadersToQuery:()=>hX,prepareRequest:()=>pU});vX.exports=YJ(TX);var BX=c0(),yU=G0(),LJ="X-Amz-Algorithm",FJ="X-Amz-Credential",OX="X-Amz-Date",QJ="X-Amz-SignedHeaders",zJ="X-Amz-Expires",CX="X-Amz-Signature",fX="X-Amz-Security-Token",qX="authorization",NX=OX.toLowerCase(),wJ="date",JJ=[qX,NX,wJ],IJ=CX.toLowerCase(),_U="x-amz-content-sha256",KJ=fX.toLowerCase(),MJ={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},VJ=/^proxy-/,RJ=/^sec-/,uU="AWS4-HMAC-SHA256",BJ="AWS4-HMAC-SHA256-PAYLOAD",EJ="UNSIGNED-PAYLOAD",AJ=50,jX="aws4_request",HJ=604800,Y0=a$(),TJ=G0(),h0={},Y$=[],L$=S(($,U,G)=>`${$}/${U}/${G}/${jX}`,"createScope"),PX=S(async($,U,G,W,Z)=>{const X=await EX($,U.secretAccessKey,U.accessKeyId),Y=`${G}:${W}:${Z}:${Y0.toHex(X)}:${U.sessionToken}`;if(Y in h0)return h0[Y];Y$.push(Y);while(Y$.length>AJ)delete h0[Y$.shift()];let L=`AWS4${U.secretAccessKey}`;for(let F of[G,W,Z,jX])L=await EX($,L,F);return h0[Y]=L},"getSigningKey"),OJ=S(()=>{Y$.length=0,Object.keys(h0).forEach(($)=>{delete h0[$]})},"clearCredentialCache"),EX=S(($,U,G)=>{const W=new $(U);return W.update(TJ.toUint8Array(G)),W.digest()},"hmac"),gU=S(({headers:$},U,G)=>{const W={};for(let Z of Object.keys($).sort()){if($[Z]==null)continue;const X=Z.toLowerCase();if(X in MJ||(U==null?void 0:U.has(X))||VJ.test(X)||RJ.test(X)){if(!G||G&&!G.has(X))continue}W[X]=$[Z].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),U1=l$(),SX=S(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($).sort()){if(W.toLowerCase()===IJ)continue;U.push(W);const Z=$[W];if(typeof Z==="string")G[W]=`${U1.escapeUri(W)}=${U1.escapeUri(Z)}`;else if(Array.isArray(Z))G[W]=Z.slice(0).reduce((X,Y)=>X.concat([`${U1.escapeUri(W)}=${U1.escapeUri(Y)}`]),[]).sort().join("&")}return U.map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),CJ=y$(),fJ=G0(),F$=S(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===_U)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||CJ.isArrayBuffer(U)){const W=new G;return W.update(fJ.toUint8Array(U)),Y0.toHex(await W.digest())}return EJ},"getPayloadHash"),AX=G0(),bX=class ${format(U){const G=[];for(let X of Object.keys(U)){const Y=AX.fromUtf8(X);G.push(Uint8Array.from([Y.byteLength]),Y,this.formatHeaderValue(U[X]))}const W=new Uint8Array(G.reduce((X,Y)=>X+Y.byteLength,0));let Z=0;for(let X of G)W.set(X,Z),Z+=X.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":const W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":const Z=new Uint8Array(9);return Z[0]=5,Z.set(U.value.bytes,1),Z;case"binary":const X=new DataView(new ArrayBuffer(3+U.value.byteLength));X.setUint8(0,6),X.setUint16(1,U.value.byteLength,!1);const Y=new Uint8Array(X.buffer);return Y.set(U.value,3),Y;case"string":const L=AX.fromUtf8(U.value),F=new DataView(new ArrayBuffer(3+L.byteLength));F.setUint8(0,7),F.setUint16(1,L.byteLength,!1);const Q=new Uint8Array(F.buffer);return Q.set(L,3),Q;case"timestamp":const z=new Uint8Array(9);return z[0]=8,z.set(jJ.fromNumber(U.value.valueOf()).bytes,1),z;case"uuid":if(!NJ.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const w=new Uint8Array(17);return w[0]=9,w.set(Y0.fromHex(U.value.replace(/\-/g,"")),1),w}}};S(bX,"HeaderFormatter");var qJ=bX,NJ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,DX=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const G=new Uint8Array(8);for(let W=7,Z=Math.abs(Math.round(U));W>-1&&Z>0;W--,Z/=256)G[W]=Z;if(U<0)dU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)dU(U);return parseInt(Y0.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};S(DX,"Int64");var jJ=DX;S(dU,"negate");var PJ=S(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),kX=r(),hX=S(($,U={})=>{var G;const{headers:W,query:Z={}}=kX.HttpRequest.clone($);for(let X of Object.keys(W)){const Y=X.toLowerCase();if(Y.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(Y)))Z[X]=W[X],delete W[X]}return{...$,headers:W,query:Z}},"moveHeadersToQuery"),pU=S(($)=>{$=kX.HttpRequest.clone($);for(let U of Object.keys($.headers))if(JJ.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),SJ=S(($)=>bJ($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),bJ=S(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),xX=class ${constructor({applyChecksum:U,credentials:G,region:W,service:Z,sha256:X,uriEscapePath:Y=!0}){this.headerFormatter=new qJ,this.service=Z,this.sha256=X,this.uriEscapePath=Y,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=BX.normalizeProvider(W),this.credentialProvider=BX.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:Z=3600,unsignableHeaders:X,unhoistableHeaders:Y,signableHeaders:L,signingRegion:F,signingService:Q}=G,z=await this.credentialProvider();this.validateResolvedCredentials(z);const w=F??await this.regionProvider(),{longDate:J,shortDate:I}=X$(W);if(Z>HJ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const M=L$(I,w,Q??this.service),A=hX(pU(U),{unhoistableHeaders:Y});if(z.sessionToken)A.query[fX]=z.sessionToken;A.query[LJ]=uU,A.query[FJ]=`${z.accessKeyId}/${M}`,A.query[OX]=J,A.query[zJ]=Z.toString(10);const R=gU(A,X,L);return A.query[QJ]=HX(R),A.query[CX]=await this.getSignature(J,M,this.getSigningKey(z,w,I,Q),this.createCanonicalRequest(A,R,await F$(U,this.sha256))),A}async sign(U,G){if(typeof U==="string")return this.signString(U,G);else if(U.headers&&U.payload)return this.signEvent(U,G);else if(U.message)return this.signMessage(U,G);else return this.signRequest(U,G)}async signEvent({headers:U,payload:G},{signingDate:W=new Date,priorSignature:Z,signingRegion:X,signingService:Y}){const L=X??await this.regionProvider(),{shortDate:F,longDate:Q}=X$(W),z=L$(F,L,Y??this.service),w=await F$({headers:{},body:G},this.sha256),J=new this.sha256;J.update(U);const I=Y0.toHex(await J.digest()),M=[BJ,Q,z,Z,I,w].join("\n");return this.signString(M,{signingDate:W,signingRegion:L,signingService:Y})}async signMessage(U,{signingDate:G=new Date,signingRegion:W,signingService:Z}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:W,signingService:Z,priorSignature:U.priorSignature}).then((Y)=>{return{message:U.message,signature:Y}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:Z}={}){const X=await this.credentialProvider();this.validateResolvedCredentials(X);const Y=W??await this.regionProvider(),{shortDate:L}=X$(G),F=new this.sha256(await this.getSigningKey(X,Y,L,Z));return F.update(yU.toUint8Array(U)),Y0.toHex(await F.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:Z,signingRegion:X,signingService:Y}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const F=X??await this.regionProvider(),Q=pU(U),{longDate:z,shortDate:w}=X$(G),J=L$(w,F,Y??this.service);if(Q.headers[NX]=z,L.sessionToken)Q.headers[KJ]=L.sessionToken;const I=await F$(Q,this.sha256);if(!PJ(_U,Q.headers)&&this.applyChecksum)Q.headers[_U]=I;const M=gU(Q,Z,W),A=await this.getSignature(z,J,this.getSigningKey(L,F,w,Y),this.createCanonicalRequest(Q,M,I));return Q.headers[qX]=`${uU} Credential=${L.accessKeyId}/${J}, SignedHeaders=${HX(M)}, Signature=${A}`,Q}createCanonicalRequest(U,G,W){const Z=Object.keys(G).sort();return`${U.method}
10
+ ${this.getCanonicalPath(U)}
11
+ ${SX(U)}
12
+ ${Z.map((X)=>`${X}:${G[X]}`).join("\n")}
13
+
14
+ ${Z.join(";")}
15
+ ${W}`}async createStringToSign(U,G,W){const Z=new this.sha256;Z.update(yU.toUint8Array(W));const X=await Z.digest();return`${uU}
16
+ ${U}
17
+ ${G}
18
+ ${Y0.toHex(X)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const G=[];for(let X of U.split("/")){if((X==null?void 0:X.length)===0)continue;if(X===".")continue;if(X==="..")G.pop();else G.push(X)}const W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return U1.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,Z){const X=await this.createStringToSign(U,G,Z),Y=new this.sha256(await W);return Y.update(yU.toUint8Array(X)),Y0.toHex(await Y.digest())}getSigningKey(U,G,W,Z){return PX(this.sha256,U,W,G,Z||this.service)}validateResolvedCredentials(U){if(typeof U!=="object"||typeof U.accessKeyId!=="string"||typeof U.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};S(xX,"SignatureV4");var DJ=xX,X$=S(($)=>{const U=SJ($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),HX=S(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var nX=V((bH,mX)=>{var{defineProperty:z$,getOwnPropertyDescriptor:kJ,getOwnPropertyNames:hJ}=Object,xJ=Object.prototype.hasOwnProperty,h=($,U)=>z$($,"name",{value:U,configurable:!0}),vJ=($,U)=>{for(var G in U)z$($,G,{get:U[G],enumerable:!0})},cJ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of hJ(U))if(!xJ.call($,Z)&&Z!==G)z$($,Z,{get:()=>U[Z],enumerable:!(W=kJ(U,Z))||W.enumerable})}return $},yJ=($)=>cJ(z$({},"__esModule",{value:!0}),$),dX={};vJ(dX,{AWSSDKSigV4Signer:()=>dJ,AwsSdkSigV4ASigner:()=>lJ,AwsSdkSigV4Signer:()=>mU,NODE_SIGV4A_CONFIG_OPTIONS:()=>nJ,resolveAWSSDKSigV4Config:()=>iJ,resolveAwsSdkSigV4AConfig:()=>mJ,resolveAwsSdkSigV4Config:()=>sX,validateSigningProperties:()=>sU});mX.exports=yJ(dX);var uJ=r(),_J=r(),yX=h(($)=>{var U,G;return _J.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),lU=h(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),gJ=h(($,U)=>Math.abs(lU(U).getTime()-$)>=300000,"isClockSkewed"),uX=h(($,U)=>{const G=Date.parse($);if(gJ(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),G1=h(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),sU=h(async($)=>{var U,G,W;const Z=G1("context",$.context),X=G1("config",$.config),Y=(W=(G=(U=Z.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],F=await G1("signer",X.signer)(Y),Q=$==null?void 0:$.signingRegion,z=$==null?void 0:$.signingRegionSet,w=$==null?void 0:$.signingName;return{config:X,signer:F,signingRegion:Q,signingRegionSet:z,signingName:w}},"validateSigningProperties"),pX=class ${async sign(U,G,W){var Z;if(!uJ.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const X=await sU(W),{config:Y,signer:L}=X;let{signingRegion:F,signingName:Q}=X;const z=W.context;if(((Z=z==null?void 0:z.authSchemes)==null?void 0:Z.length)??0>1){const[J,I]=z.authSchemes;if((J==null?void 0:J.name)==="sigv4a"&&(I==null?void 0:I.name)==="sigv4")F=(I==null?void 0:I.signingRegion)??F,Q=(I==null?void 0:I.signingName)??Q}return await L.sign(U,{signingDate:lU(Y.systemClockOffset),signingRegion:F,signingService:Q})}errorHandler(U){return(G)=>{const W=G.ServerTime??yX(G.$response);if(W){const Z=G1("config",U.config),X=Z.systemClockOffset;if(Z.systemClockOffset=uX(W,Z.systemClockOffset),Z.systemClockOffset!==X&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=yX(U);if(W){const Z=G1("config",G.config);Z.systemClockOffset=uX(W,Z.systemClockOffset)}}};h(pX,"AwsSdkSigV4Signer");var mU=pX,dJ=mU,pJ=r(),lX=class $ extends mU{async sign(U,G,W){var Z;if(!pJ.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:X,signer:Y,signingRegion:L,signingRegionSet:F,signingName:Q}=await sU(W),w=(await((Z=X.sigv4aSigningRegionSet)==null?void 0:Z.call(X))??F??[L]).join(",");return await Y.sign(U,{signingDate:lU(X.systemClockOffset),signingRegion:w,signingService:Q})}};h(lX,"AwsSdkSigV4ASigner");var lJ=lX,sJ=RU(),_X=A$(),mJ=h(($)=>{return $.sigv4aSigningRegionSet=sJ.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),nJ={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new _X.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector($){if($.sigv4a_signing_region_set)return($.sigv4a_signing_region_set??"").split(",").map((U)=>U.trim());throw new _X.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},A0=RU(),gX=cX(),sX=h(($)=>{let U;if($.credentials)U=A0.memoizeIdentityProvider($.credentials,A0.isIdentityExpired,A0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=A0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=h(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:Z}=$;let X;if($.signer)X=A0.normalizeProvider($.signer);else if($.regionInfoProvider)X=h(()=>A0.normalizeProvider($.region)().then(async(Y)=>[await $.regionInfoProvider(Y,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},Y]).then(([Y,L])=>{const{signingRegion:F,signingService:Q}=Y;$.signingRegion=$.signingRegion||F||L,$.signingName=$.signingName||Q||$.serviceId;const z={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:Z,uriEscapePath:G};return new($.signerConstructor||gX.SignatureV4)(z)}),"signer");else X=h(async(Y)=>{Y=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await A0.normalizeProvider($.region)(),properties:{}},Y);const{signingRegion:L,signingName:F}=Y;$.signingRegion=$.signingRegion||L,$.signingName=$.signingName||F||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:Z,uriEscapePath:G};return new($.signerConstructor||gX.SignatureV4)(Q)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:X}},"resolveAwsSdkSigV4Config"),iJ=sX});var w$=V((eJ)=>{var rJ=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",iX="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+rJ+"]*",oJ=new RegExp("^"+iX+"$"),aJ=function($,U){const G=[];let W=U.exec($);while(W){const Z=[];Z.startIndex=U.lastIndex-W[0].length;const X=W.length;for(let Y=0;Y<X;Y++)Z.push(W[Y]);G.push(Z),W=U.exec($)}return G},tJ=function($){const U=oJ.exec($);return!(U===null||typeof U==="undefined")};eJ.isExist=function($){return typeof $!=="undefined"};eJ.isEmptyObject=function($){return Object.keys($).length===0};eJ.merge=function($,U,G){if(U){const W=Object.keys(U),Z=W.length;for(let X=0;X<Z;X++)if(G==="strict")$[W[X]]=[U[W[X]]];else $[W[X]]=U[W[X]]}};eJ.getValue=function($){if(eJ.isExist($))return $;else return""};eJ.isName=tJ;eJ.getAllMatches=aJ;eJ.nameRegexp=iX});var iU=V((MI)=>{var oX=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},aX=function($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(G,U-G);if(U>5&&W==="xml")return j("InvalidXml","XML declaration allowed only at the start of the document.",k($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},tX=function($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let G=1;for(U+=8;U<$.length;U++)if($[U]==="<")G++;else if($[U]===">"){if(G--,G===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U},QI=function($,U){let G="",W="",Z=!1;for(;U<$.length;U++){if($[U]===LI||$[U]===FI)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){Z=!0;break}}G+=$[U]}if(W!=="")return!1;return{value:G,index:U,tagClosed:Z}},eX=function($,U){const G=nU.getAllMatches($,zI),W={};for(let Z=0;Z<G.length;Z++){if(G[Z][1].length===0)return j("InvalidAttr","Attribute '"+G[Z][2]+"' has no space in starting.",W1(G[Z]));else if(G[Z][3]!==void 0&&G[Z][4]===void 0)return j("InvalidAttr","Attribute '"+G[Z][2]+"' is without value.",W1(G[Z]));else if(G[Z][3]===void 0&&!U.allowBooleanAttributes)return j("InvalidAttr","boolean attribute '"+G[Z][2]+"' is not allowed.",W1(G[Z]));const X=G[Z][2];if(!II(X))return j("InvalidAttr","Attribute '"+X+"' is an invalid name.",W1(G[Z]));if(!W.hasOwnProperty(X))W[X]=1;else return j("InvalidAttr","Attribute '"+X+"' is repeated.",W1(G[Z]))}return!0},wI=function($,U){let G=/\d/;if($[U]==="x")U++,G=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(G))break}return-1},JI=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,wI($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U},j=function($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}},II=function($){return nU.isName($)},KI=function($){return nU.isName($)},k=function($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}},W1=function($){return $.startIndex+$[1].length},nU=w$(),YI={allowBooleanAttributes:!1,unpairedTags:[]};MI.validate=function($,U){U=Object.assign({},YI,U);const G=[];let W=!1,Z=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let X=0;X<$.length;X++)if($[X]==="<"&&$[X+1]==="?"){if(X+=2,X=aX($,X),X.err)return X}else if($[X]==="<"){let Y=X;if(X++,$[X]==="!"){X=tX($,X);continue}else{let L=!1;if($[X]==="/")L=!0,X++;let F="";for(;X<$.length&&$[X]!==">"&&$[X]!==" "&&$[X]!=="\t"&&$[X]!=="\n"&&$[X]!=="\r";X++)F+=$[X];if(F=F.trim(),F[F.length-1]==="/")F=F.substring(0,F.length-1),X--;if(!KI(F)){let w;if(F.trim().length===0)w="Invalid space after '<'.";else w="Tag '"+F+"' is an invalid name.";return j("InvalidTag",w,k($,X))}const Q=QI($,X);if(Q===!1)return j("InvalidAttr","Attributes for '"+F+"' have open quote.",k($,X));let z=Q.value;if(X=Q.index,z[z.length-1]==="/"){const w=X-z.length;z=z.substring(0,z.length-1);const J=eX(z,U);if(J===!0)W=!0;else return j(J.err.code,J.err.msg,k($,w+J.err.line))}else if(L)if(!Q.tagClosed)return j("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",k($,X));else if(z.trim().length>0)return j("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",k($,Y));else if(G.length===0)return j("InvalidTag","Closing tag '"+F+"' has not been opened.",k($,Y));else{const w=G.pop();if(F!==w.tagName){let J=k($,w.tagStartPos);return j("InvalidTag","Expected closing tag '"+w.tagName+"' (opened in line "+J.line+", col "+J.col+") instead of closing tag '"+F+"'.",k($,Y))}if(G.length==0)Z=!0}else{const w=eX(z,U);if(w!==!0)return j(w.err.code,w.err.msg,k($,X-z.length+w.err.line));if(Z===!0)return j("InvalidXml","Multiple possible root nodes found.",k($,X));else if(U.unpairedTags.indexOf(F)!==-1);else G.push({tagName:F,tagStartPos:Y});W=!0}for(X++;X<$.length;X++)if($[X]==="<")if($[X+1]==="!"){X++,X=tX($,X);continue}else if($[X+1]==="?"){if(X=aX($,++X),X.err)return X}else break;else if($[X]==="&"){const w=JI($,X);if(w==-1)return j("InvalidChar","char '&' is not expected.",k($,X));X=w}else if(Z===!0&&!oX($[X]))return j("InvalidXml","Extra text at the end",k($,X));if($[X]==="<")X--}}else{if(oX($[X]))continue;return j("InvalidChar","char '"+$[X]+"' is not expected.",k($,X))}if(!W)return j("InvalidXml","Start tag expected.",1);else if(G.length==1)return j("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",k($,G[0].tagStartPos));else if(G.length>0)return j("InvalidXml","Invalid '"+JSON.stringify(G.map((X)=>X.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var LI='"',FI="'",zI=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var UY=V((BI)=>{var $Y={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,U,G){return $}},RI=function($){return Object.assign({},$Y,$)};BI.buildOptions=RI;BI.defaultOptions=$Y});var ZY=V((xH,WY)=>{class GY{constructor($){this.tagname=$,this.child=[],this[":@"]={}}add($,U){if($==="__proto__")$="#__proto__";this.child.push({[$]:U})}addChild($){if($.tagname==="__proto__")$.tagname="#__proto__";if($[":@"]&&Object.keys($[":@"]).length>0)this.child.push({[$.tagname]:$.child,[":@"]:$[":@"]});else this.child.push({[$.tagname]:$.child})}}WY.exports=GY});var YY=V((vH,XY)=>{var TI=function($,U){const G={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let W=1,Z=!1,X=!1,Y="";for(;U<$.length;U++)if($[U]==="<"&&!X){if(Z&&fI($,U)){if(U+=7,[entityName,val,U]=OI($,U+1),val.indexOf("&")===-1)G[PI(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(Z&&qI($,U))U+=8;else if(Z&&NI($,U))U+=8;else if(Z&&jI($,U))U+=9;else if(CI)X=!0;else throw new Error("Invalid DOCTYPE");W++,Y=""}else if($[U]===">"){if(X){if($[U-1]==="-"&&$[U-2]==="-")X=!1,W--}else W--;if(W===0)break}else if($[U]==="[")Z=!0;else Y+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}},OI=function($,U){let G="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)G+=$[U];if(G=G.trim(),G.indexOf(" ")!==-1)throw new Error("External entites are not supported");const W=$[U++];let Z="";for(;U<$.length&&$[U]!==W;U++)Z+=$[U];return[G,Z,U]},CI=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},fI=function($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="N"&&$[U+4]==="T"&&$[U+5]==="I"&&$[U+6]==="T"&&$[U+7]==="Y")return!0;return!1},qI=function($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="L"&&$[U+4]==="E"&&$[U+5]==="M"&&$[U+6]==="E"&&$[U+7]==="N"&&$[U+8]==="T")return!0;return!1},NI=function($,U){if($[U+1]==="!"&&$[U+2]==="A"&&$[U+3]==="T"&&$[U+4]==="T"&&$[U+5]==="L"&&$[U+6]==="I"&&$[U+7]==="S"&&$[U+8]==="T")return!0;return!1},jI=function($,U){if($[U+1]==="!"&&$[U+2]==="N"&&$[U+3]==="O"&&$[U+4]==="T"&&$[U+5]==="A"&&$[U+6]==="T"&&$[U+7]==="I"&&$[U+8]==="O"&&$[U+9]==="N")return!0;return!1},PI=function($){if(HI.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},HI=w$();XY.exports=TI});var FY=V((cH,LY)=>{var kI=function($,U={}){if(U=Object.assign({},DI,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&SI.test(G))return Number.parseInt(G,16);else{const W=bI.exec(G);if(W){const Z=W[1],X=W[2];let Y=hI(W[3]);const L=W[4]||W[6];if(!U.leadingZeros&&X.length>0&&Z&&G[2]!==".")return $;else if(!U.leadingZeros&&X.length>0&&!Z&&G[1]!==".")return $;else{const F=Number(G),Q=""+F;if(Q.search(/[eE]/)!==-1)if(U.eNotation)return F;else return $;else if(L)if(U.eNotation)return F;else return $;else if(G.indexOf(".")!==-1)if(Q==="0"&&Y==="")return F;else if(Q===Y)return F;else if(Z&&Q==="-"+Y)return F;else return $;if(X)if(Y===Q)return F;else if(Z+Y===Q)return F;else return $;if(G===Q)return F;else if(G===Z+Q)return F;return $}}else return $}},hI=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},SI=/^[-+]?0x[a-fA-F0-9]+$/,bI=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var DI={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};LY.exports=kI});var JY=V((yH,wY)=>{var cI=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}},yI=function($,U,G,W,Z,X,Y){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!Y)$=this.replaceEntitiesValue($);const L=this.options.tagValueProcessor(U,$,G,Z,X);if(L===null||L===void 0)return $;else if(typeof L!==typeof $||L!==$)return L;else if(this.options.trimValues)return oU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return oU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},uI=function($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $},gI=function($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=QY.getAllMatches($,_I),Z=W.length,X={};for(let Y=0;Y<Z;Y++){const L=this.resolveNameSpace(W[Y][1]);let F=W[Y][4],Q=this.options.attributeNamePrefix+L;if(L.length){if(this.options.transformAttributeName)Q=this.options.transformAttributeName(Q);if(Q==="__proto__")Q="#__proto__";if(F!==void 0){if(this.options.trimValues)F=F.trim();F=this.replaceEntitiesValue(F);const z=this.options.attributeValueProcessor(L,F,U);if(z===null||z===void 0)X[Q]=F;else if(typeof z!==typeof F||z!==F)X[Q]=z;else X[Q]=oU(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)X[Q]=!0}}if(!Object.keys(X).length)return;if(this.options.attributesGroupName){const Y={};return Y[this.options.attributesGroupName]=X,Y}return X}},pI=function($,U,G){const W=this.options.updateTag(U.tagname,G,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)},sI=function($,U,G,W){if($){if(W===void 0)W=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,G,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,W),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $},mI=function($,U,G){const W="*."+G;for(let Z in $){const X=$[Z];if(W===X||U===X)return!0}return!1},nI=function($,U,G=">"){let W,Z="";for(let X=U;X<$.length;X++){let Y=$[X];if(W){if(Y===W)W=""}else if(Y==='"'||Y==="'")W=Y;else if(Y===G[0])if(G[1]){if($[X+1]===G[1])return{data:Z,index:X}}else return{data:Z,index:X};else if(Y==="\t")Y=" ";Z+=Y}},H0=function($,U,G,W){const Z=$.indexOf(U,G);if(Z===-1)throw new Error(W);else return Z+U.length-1},rU=function($,U,G,W=">"){const Z=nI($,U+1,W);if(!Z)return;let X=Z.data;const Y=Z.index,L=X.search(/\s/);let F=X,Q=!0;if(L!==-1)F=X.substring(0,L),X=X.substring(L+1).trimStart();const z=F;if(G){const w=F.indexOf(":");if(w!==-1)F=F.substr(w+1),Q=F!==Z.data.substr(w+1)}return{tagName:F,tagExp:X,closeIndex:Y,attrExpPresent:Q,rawTagName:z}},iI=function($,U,G){const W=G;let Z=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const X=H0($,">",G,`${U} is not closed`);if($.substring(G+2,X).trim()===U){if(Z--,Z===0)return{tagContent:$.substring(W,G),i:X}}G=X}else if($[G+1]==="?")G=H0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=H0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=H0($,"]]>",G,"StopNode is not closed.")-2;else{const X=rU($,G,">");if(X){if((X&&X.tagName)===U&&X.tagExp[X.tagExp.length-1]!=="/")Z++;G=X.closeIndex}}},oU=function($,U,G){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return vI($,G)}else if(QY.isExist($))return $;else return""},QY=w$(),Z1=ZY(),xI=YY(),vI=FY();class zY{constructor($){this.options=$,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,16))}},this.addExternalEntities=cI,this.parseXml=dI,this.parseTextData=yI,this.resolveNameSpace=uI,this.buildAttributesMap=gI,this.isItStopNode=mI,this.replaceEntitiesValue=lI,this.readStopNodeData=iI,this.saveTextToParentTag=sI,this.addChild=pI}}var _I=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),dI=function($){$=$.replace(/\r\n?/g,"\n");const U=new Z1("!xml");let G=U,W="",Z="";for(let X=0;X<$.length;X++)if($[X]==="<")if($[X+1]==="/"){const L=H0($,">",X,"Closing Tag is not closed.");let F=$.substring(X+2,L).trim();if(this.options.removeNSPrefix){const w=F.indexOf(":");if(w!==-1)F=F.substr(w+1)}if(this.options.transformTagName)F=this.options.transformTagName(F);if(G)W=this.saveTextToParentTag(W,G,Z);const Q=Z.substring(Z.lastIndexOf(".")+1);if(F&&this.options.unpairedTags.indexOf(F)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${F}>`);let z=0;if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)z=Z.lastIndexOf(".",Z.lastIndexOf(".")-1),this.tagsNodeStack.pop();else z=Z.lastIndexOf(".");Z=Z.substring(0,z),G=this.tagsNodeStack.pop(),W="",X=L}else if($[X+1]==="?"){let L=rU($,X,!1,"?>");if(!L)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,Z),this.options.ignoreDeclaration&&L.tagName==="?xml"||this.options.ignorePiTags);else{const F=new Z1(L.tagName);if(F.add(this.options.textNodeName,""),L.tagName!==L.tagExp&&L.attrExpPresent)F[":@"]=this.buildAttributesMap(L.tagExp,Z,L.tagName);this.addChild(G,F,Z)}X=L.closeIndex+1}else if($.substr(X+1,3)==="!--"){const L=H0($,"-->",X+4,"Comment is not closed.");if(this.options.commentPropName){const F=$.substring(X+4,L-2);W=this.saveTextToParentTag(W,G,Z),G.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}X=L}else if($.substr(X+1,2)==="!D"){const L=xI($,X);this.docTypeEntities=L.entities,X=L.i}else if($.substr(X+1,2)==="!["){const L=H0($,"]]>",X,"CDATA is not closed.")-2,F=$.substring(X+9,L);W=this.saveTextToParentTag(W,G,Z);let Q=this.parseTextData(F,G.tagname,Z,!0,!1,!0,!0);if(Q==null)Q="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:F}]);else G.add(this.options.textNodeName,Q);X=L+2}else{let L=rU($,X,this.options.removeNSPrefix),F=L.tagName;const Q=L.rawTagName;let{tagExp:z,attrExpPresent:w,closeIndex:J}=L;if(this.options.transformTagName)F=this.options.transformTagName(F);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,Z,!1)}const I=G;if(I&&this.options.unpairedTags.indexOf(I.tagname)!==-1)G=this.tagsNodeStack.pop(),Z=Z.substring(0,Z.lastIndexOf("."));if(F!==U.tagname)Z+=Z?"."+F:F;if(this.isItStopNode(this.options.stopNodes,Z,F)){let M="";if(z.length>0&&z.lastIndexOf("/")===z.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),Z=Z.substr(0,Z.length-1),z=F;else z=z.substr(0,z.length-1);X=L.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)X=L.closeIndex;else{const R=this.readStopNodeData($,Q,J+1);if(!R)throw new Error(`Unexpected end of ${Q}`);X=R.i,M=R.tagContent}const A=new Z1(F);if(F!==z&&w)A[":@"]=this.buildAttributesMap(z,Z,F);if(M)M=this.parseTextData(M,F,Z,!0,w,!0,!0);Z=Z.substr(0,Z.lastIndexOf(".")),A.add(this.options.textNodeName,M),this.addChild(G,A,Z)}else{if(z.length>0&&z.lastIndexOf("/")===z.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),Z=Z.substr(0,Z.length-1),z=F;else z=z.substr(0,z.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);const M=new Z1(F);if(F!==z&&w)M[":@"]=this.buildAttributesMap(z,Z,F);this.addChild(G,M,Z),Z=Z.substr(0,Z.lastIndexOf("."))}else{const M=new Z1(F);if(this.tagsNodeStack.push(G),F!==z&&w)M[":@"]=this.buildAttributesMap(z,Z,F);this.addChild(G,M,Z),G=M}W="",X=J}}else W+=$[X];return U.child},lI=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const G=this.docTypeEntities[U];$=$.replace(G.regx,G.val)}for(let U in this.lastEntities){const G=this.lastEntities[U];$=$.replace(G.regex,G.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const G=this.htmlEntities[U];$=$.replace(G.regex,G.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};wY.exports=zY});var KY=V((eI)=>{var rI=function($,U){return IY($,U)},IY=function($,U,G){let W;const Z={};for(let X=0;X<$.length;X++){const Y=$[X],L=oI(Y);let F="";if(G===void 0)F=L;else F=G+"."+L;if(L===U.textNodeName)if(W===void 0)W=Y[L];else W+=""+Y[L];else if(L===void 0)continue;else if(Y[L]){let Q=IY(Y[L],U,F);const z=tI(Q,U);if(Y[":@"])aI(Q,Y[":@"],F,U);else if(Object.keys(Q).length===1&&Q[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)Q=Q[U.textNodeName];else if(Object.keys(Q).length===0)if(U.alwaysCreateTextNode)Q[U.textNodeName]="";else Q="";if(Z[L]!==void 0&&Z.hasOwnProperty(L)){if(!Array.isArray(Z[L]))Z[L]=[Z[L]];Z[L].push(Q)}else if(U.isArray(L,F,z))Z[L]=[Q];else Z[L]=Q}}if(typeof W==="string"){if(W.length>0)Z[U.textNodeName]=W}else if(W!==void 0)Z[U.textNodeName]=W;return Z},oI=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}},aI=function($,U,G,W){if(U){const Z=Object.keys(U),X=Z.length;for(let Y=0;Y<X;Y++){const L=Z[Y];if(W.isArray(L,G+"."+L,!0,!0))$[L]=[U[L]];else $[L]=U[L]}}},tI=function($,U){const{textNodeName:G}=U,W=Object.keys($).length;if(W===0)return!0;if(W===1&&($[G]||typeof $[G]==="boolean"||$[G]===0))return!0;return!1};eI.prettify=rI});var RY=V((_H,VY)=>{var{buildOptions:U3}=UY(),G3=JY(),{prettify:W3}=KY(),Z3=iU();class MY{constructor($){this.externalEntities={},this.options=U3($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};const Z=Z3.validate($,U);if(Z!==!0)throw Error(`${Z.err.msg}:${Z.err.line}:${Z.err.col}`)}const G=new G3(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return W3(W,this.options)}addEntity($,U){if(U.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if($.indexOf("&")!==-1||$.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}VY.exports=MY});var TY=V((gH,HY)=>{var X3=function($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return EY($,U,"",G)},EY=function($,U,G,W){let Z="",X=!1;for(let Y=0;Y<$.length;Y++){const L=$[Y],F=Y3(L);if(F===void 0)continue;let Q="";if(G.length===0)Q=F;else Q=`${G}.${F}`;if(F===U.textNodeName){let M=L[F];if(!L3(Q,U))M=U.tagValueProcessor(F,M),M=AY(M,U);if(X)Z+=W;Z+=M,X=!1;continue}else if(F===U.cdataPropName){if(X)Z+=W;Z+=`<![CDATA[${L[F][0][U.textNodeName]}]]>`,X=!1;continue}else if(F===U.commentPropName){Z+=W+`<!--${L[F][0][U.textNodeName]}-->`,X=!0;continue}else if(F[0]==="?"){const M=BY(L[":@"],U),A=F==="?xml"?"":W;let R=L[F][0][U.textNodeName];R=R.length!==0?" "+R:"",Z+=A+`<${F}${R}${M}?>`,X=!0;continue}let z=W;if(z!=="")z+=U.indentBy;const w=BY(L[":@"],U),J=W+`<${F}${w}`,I=EY(L[F],U,Q,z);if(U.unpairedTags.indexOf(F)!==-1)if(U.suppressUnpairedNode)Z+=J+">";else Z+=J+"/>";else if((!I||I.length===0)&&U.suppressEmptyNode)Z+=J+"/>";else if(I&&I.endsWith(">"))Z+=J+`>${I}${W}</${F}>`;else{if(Z+=J+">",I&&W!==""&&(I.includes("/>")||I.includes("</")))Z+=W+U.indentBy+I+W;else Z+=I;Z+=`</${F}>`}X=!0}return Z},Y3=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}},BY=function($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let Z=U.attributeValueProcessor(W,$[W]);if(Z=AY(Z,U),Z===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${Z}"`}return G},L3=function($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let G=$.substr($.lastIndexOf(".")+1);for(let W in U.stopNodes)if(U.stopNodes[W]===$||U.stopNodes[W]==="*."+G)return!0;return!1},AY=function($,U){if($&&$.length>0&&U.processEntities)for(let G=0;G<U.entities.length;G++){const W=U.entities[G];$=$.replace(W.regex,W.val)}return $};HY.exports=X3});var CY=V((dH,OY)=>{var L0=function($){if(this.options=Object.assign({},Q3,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=J3;if(this.processTextOrObjNode=z3,this.options.format)this.indentate=w3,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},z3=function($,U,G){const W=this.j2x($,G+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,W.attrStr,G);else return this.buildObjectNode(W.val,U,W.attrStr,G)},w3=function($){return this.options.indentBy.repeat($)},J3=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},F3=TY(),Q3={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};L0.prototype.build=function($){if(this.options.preserveOrder)return F3($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};L0.prototype.j2x=function($,U){let G="",W="";for(let Z in $){if(!Object.prototype.hasOwnProperty.call($,Z))continue;if(typeof $[Z]==="undefined"){if(this.isAttribute(Z))W+=""}else if($[Z]===null)if(this.isAttribute(Z))W+="";else if(Z[0]==="?")W+=this.indentate(U)+"<"+Z+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+Z+"/"+this.tagEndChar;else if($[Z]instanceof Date)W+=this.buildTextValNode($[Z],Z,"",U);else if(typeof $[Z]!=="object"){const X=this.isAttribute(Z);if(X)G+=this.buildAttrPairStr(X,""+$[Z]);else if(Z===this.options.textNodeName){let Y=this.options.tagValueProcessor(Z,""+$[Z]);W+=this.replaceEntitiesValue(Y)}else W+=this.buildTextValNode($[Z],Z,"",U)}else if(Array.isArray($[Z])){const X=$[Z].length;let Y="",L="";for(let F=0;F<X;F++){const Q=$[Z][F];if(typeof Q==="undefined");else if(Q===null)if(Z[0]==="?")W+=this.indentate(U)+"<"+Z+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+Z+"/"+this.tagEndChar;else if(typeof Q==="object")if(this.options.oneListGroup){const z=this.j2x(Q,U+1);if(Y+=z.val,this.options.attributesGroupName&&Q.hasOwnProperty(this.options.attributesGroupName))L+=z.attrStr}else Y+=this.processTextOrObjNode(Q,Z,U);else if(this.options.oneListGroup){let z=this.options.tagValueProcessor(Z,Q);z=this.replaceEntitiesValue(z),Y+=z}else Y+=this.buildTextValNode(Q,Z,"",U)}if(this.options.oneListGroup)Y=this.buildObjectNode(Y,Z,L,U);W+=Y}else if(this.options.attributesGroupName&&Z===this.options.attributesGroupName){const X=Object.keys($[Z]),Y=X.length;for(let L=0;L<Y;L++)G+=this.buildAttrPairStr(X[L],""+$[Z][X[L]])}else W+=this.processTextOrObjNode($[Z],Z,U)}return{attrStr:G,val:W}};L0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};L0.prototype.buildObjectNode=function($,U,G,W){if($==="")if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else{let Z="</"+U+this.tagEndChar,X="";if(U[0]==="?")X="?",Z="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+G+X+">"+$+Z;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&X.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+G+X+this.tagEndChar+$+this.indentate(W)+Z}};L0.prototype.closeTag=function($){let U="";if(this.options.unpairedTags.indexOf($)!==-1){if(!this.options.suppressUnpairedNode)U="/"}else if(this.options.suppressEmptyNode)U="/";else U=`></${$}`;return U};L0.prototype.buildTextValNode=function($,U,G,W){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(W)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(W)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else{let Z=this.options.tagValueProcessor(U,$);if(Z=this.replaceEntitiesValue(Z),Z==="")return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+G+">"+Z+"</"+U+this.tagEndChar}};L0.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};OY.exports=L0});var qY=V((pH,fY)=>{var I3=iU(),K3=RY(),M3=CY();fY.exports={XMLParser:K3,XMLValidator:I3,XMLBuilder:M3}});var DY=V((lH,bY)=>{var{defineProperty:J$,getOwnPropertyDescriptor:V3,getOwnPropertyNames:R3}=Object,B3=Object.prototype.hasOwnProperty,x=($,U)=>J$($,"name",{value:U,configurable:!0}),E3=($,U)=>{for(var G in U)J$($,G,{get:U[G],enumerable:!0})},A3=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of R3(U))if(!B3.call($,Z)&&Z!==G)J$($,Z,{get:()=>U[Z],enumerable:!(W=V3(U,Z))||W.enumerable})}return $},H3=($)=>A3(J$({},"__esModule",{value:!0}),$),NY={};E3(NY,{_toBool:()=>O3,_toNum:()=>C3,_toStr:()=>T3,awsExpectUnion:()=>q3,loadRestJsonErrorCode:()=>P3,loadRestXmlErrorCode:()=>k3,parseJsonBody:()=>PY,parseJsonErrorBody:()=>j3,parseXmlBody:()=>SY,parseXmlErrorBody:()=>D3});bY.exports=H3(NY);var T3=x(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){const U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){const U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),O3=x(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const G=new Error(`Received string "${$}" where a boolean was expected.`);G.name="Warning",console.warn(G)}return $!==""&&U!=="false"}return $},"_toBool"),C3=x(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const G=new Error(`Received string "${$}" where a number was expected.`);return G.name="Warning",console.warn(G),$}return U}return $},"_toNum"),f3=j0(),q3=x(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return f3.expectUnion($)},"awsExpectUnion"),N3=j0(),jY=x(($,U)=>N3.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),PY=x(($,U)=>jY($,U).then((G)=>{if(G.length)try{return JSON.parse(G)}catch(W){if((W==null?void 0:W.name)==="SyntaxError")Object.defineProperty(W,"$responseBodyText",{value:G});throw W}return{}}),"parseJsonBody"),j3=x(async($,U)=>{const G=await PY($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),P3=x(($,U)=>{const G=x((X,Y)=>Object.keys(X).find((L)=>L.toLowerCase()===Y.toLowerCase()),"findKey"),W=x((X)=>{let Y=X;if(typeof Y==="number")Y=Y.toString();if(Y.indexOf(",")>=0)Y=Y.split(",")[0];if(Y.indexOf(":")>=0)Y=Y.split(":")[0];if(Y.indexOf("#")>=0)Y=Y.split("#")[1];return Y},"sanitizeErrorCode"),Z=G($.headers,"x-amzn-errortype");if(Z!==void 0)return W($.headers[Z]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),S3=j0(),b3=qY(),SY=x(($,U)=>jY($,U).then((G)=>{if(G.length){const W=new b3.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(F,Q)=>Q.trim()===""&&Q.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let Z;try{Z=W.parse(G,!0)}catch(F){if(F&&typeof F==="object")Object.defineProperty(F,"$responseBodyText",{value:G});throw F}const X="#text",Y=Object.keys(Z)[0],L=Z[Y];if(L[X])L[Y]=L[X],delete L[X];return S3.getValueFromTextNode(L)}return{}}),"parseXmlBody"),D3=x(async($,U)=>{const G=await SY($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),k3=x(($,U)=>{var G;if(((G=U==null?void 0:U.Error)==null?void 0:G.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var x3=V((X1)=>{Object.defineProperty(X1,"__esModule",{value:!0});var aU=h3();aU.__exportStar(RX(),X1);aU.__exportStar(nX(),X1);aU.__exportStar(DY(),X1)});var m=Q0(E$(),1),JK=m.default.v1,IK=m.default.v3,rG=m.default.v4,KK=m.default.v5,MK=m.default.NIL,VK=m.default.version,RK=m.default.validate,BK=m.default.stringify,EK=m.default.parse;function TK($){return $}var Z2=($)=>(U)=>async(G)=>{if(!c.isInstance(G.request))return U(G);const{request:W}=G,{handlerProtocol:Z=""}=$.requestHandler.metadata||{};if(Z.indexOf("h2")>=0&&!W.headers[":authority"])delete W.headers.host,W.headers[":authority"]=W.hostname+(W.port?":"+W.port:"");else if(!W.headers.host){let X=W.hostname;if(W.port!=null)X+=`:${W.port}`;W.headers.host=X}return U(G)},X2={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},OK=($)=>({applyToStack:(U)=>{U.add(Z2($),X2)}});var Y2=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:Z,commandName:X,logger:Y,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:Q}=L,z=F??U.inputFilterSensitiveLog,w=Q??U.outputFilterSensitiveLog,{$metadata:J,...I}=W.output;return Y?.info?.({clientName:Z,commandName:X,input:z(G.input),output:w(I),metadata:J}),W}catch(W){const{clientName:Z,commandName:X,logger:Y,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:F}=L,Q=F??U.inputFilterSensitiveLog;throw Y?.error?.({clientName:Z,commandName:X,input:Q(G.input),error:W,metadata:W.$metadata}),W}},L2={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},fK=($)=>({applyToStack:(U)=>{U.add(Y2(),L2)}});var oG="X-Amzn-Trace-Id",F2="AWS_LAMBDA_FUNCTION_NAME",Q2="_X_AMZN_TRACE_ID",z2=($)=>(U)=>async(G)=>{const{request:W}=G;if(!c.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(oG))return U(G);const Z=process.env[F2],X=process.env[Q2],Y=(L)=>typeof L==="string"&&L.length>0;if(Y(Z)&&Y(X))W.headers[oG]=X;return U({...G,request:W})},w2={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},SK=($)=>({applyToStack:(U)=>{U.add(z2($),w2)}});function HM($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var Kw=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}$"),a0=($)=>Kw.test($)||$.startsWith("[")&&$.endsWith("]");var Mw=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),t0=($,U=!1)=>{if(!U)return Mw.test($);const G=$.split(".");for(let W of G)if(!t0(W))return!1;return!0};var e0={};var a="endpoints";function _($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${_($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(_).join(", ")})`;return JSON.stringify($,null,2)}class O extends Error{constructor($){super($);this.name="EndpointError"}}var qZ=($,U)=>$===U;var NZ=($)=>{const U=$.split("."),G=[];for(let W of U){const Z=W.indexOf("[");if(Z!==-1){if(W.indexOf("]")!==W.length-1)throw new O(`Path: '${$}' does not end with ']'`);const X=W.slice(Z+1,-1);if(Number.isNaN(parseInt(X)))throw new O(`Invalid array index: '${X}' in path: '${$}'`);if(Z!==0)G.push(W.slice(0,Z));G.push(X)}else G.push(W)}return G};var p1=($,U)=>NZ(U).reduce((G,W)=>{if(typeof G!=="object")throw new O(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var jZ=($)=>$!=null;var PZ=($)=>!$;var l1=Q0(z0(),1);var BU={[l1.EndpointURLScheme.HTTP]:80,[l1.EndpointURLScheme.HTTPS]:443},SZ=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:J,port:I,protocol:M="",path:A="",query:R={}}=$,E=new URL(`${M}//${J}${I?`:${I}`:""}${A}`);return E.search=Object.entries(R).map(([B,H])=>`${B}=${H}`).join("&"),E}return new URL($)}catch(J){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:W,hostname:Z,pathname:X,protocol:Y,search:L}=U;if(L)return null;const F=Y.slice(0,-1);if(!Object.values(l1.EndpointURLScheme).includes(F))return null;const Q=a0(Z),z=G.includes(`${W}:${BU[F]}`)||typeof $==="string"&&$.includes(`${W}:${BU[F]}`),w=`${W}${z?`:${BU[F]}`:""}`;return{scheme:F,authority:w,path:X,normalizedPath:X.endsWith("/")?X:`${X}/`,isIp:Q}};var bZ=($,U)=>$===U;var DZ=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var kZ=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var hZ={booleanEquals:qZ,getAttr:p1,isSet:jZ,isValidHostLabel:t0,not:PZ,parseURL:SZ,stringEquals:bZ,substring:DZ,uriEncode:kZ};var s1=($,U)=>{const G=[],W={...U.endpointParams,...U.referenceRecord};let Z=0;while(Z<$.length){const X=$.indexOf("{",Z);if(X===-1){G.push($.slice(Z));break}G.push($.slice(Z,X));const Y=$.indexOf("}",X);if(Y===-1){G.push($.slice(X));break}if($[X+1]==="{"&&$[Y+1]==="}")G.push($.slice(X+1,Y)),Z=Y+2;const L=$.substring(X+1,Y);if(L.includes("#")){const[F,Q]=L.split("#");G.push(p1(W[F],Q))}else G.push(W[L]);Z=Y+1}return G.join("")};var xZ=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var Z0=($,U,G)=>{if(typeof $==="string")return s1($,G);else if($.fn)return m1($,G);else if($.ref)return xZ($,G);throw new O(`'${U}': ${String($)} is not a string, function or reference.`)};var m1=({fn:$,argv:U},G)=>{const W=U.map((X)=>["boolean","number"].includes(typeof X)?X:Z0(X,"arg",G)),Z=$.split(".");if(Z[0]in e0&&Z[1]!=null)return e0[Z[0]][Z[1]](...W);return hZ[$](...W)};var vZ=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new O(`'${$}' is already defined in Reference Record.`);const W=m1(U,G);return G.logger?.debug?.(`${a} evaluateCondition: ${_(U)} = ${_(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var S0=($=[],U)=>{const G={};for(let W of $){const{result:Z,toAssign:X}=vZ(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!Z)return{result:Z};if(X)G[X.name]=X.value,U.logger?.debug?.(`${a} assign: ${X.name} := ${_(X.value)}`)}return{result:!0,referenceRecord:G}};var cZ=($,U)=>Object.entries($).reduce((G,[W,Z])=>({...G,[W]:Z.map((X)=>{const Y=Z0(X,"Header value entry",U);if(typeof Y!=="string")throw new O(`Header '${W}' value '${Y}' is not a string`);return Y})}),{});var EU=($,U)=>{if(Array.isArray($))return $.map((G)=>EU(G,U));switch(typeof $){case"string":return s1($,U);case"object":if($===null)throw new O(`Unexpected endpoint property: ${$}`);return n1($,U);case"boolean":return $;default:throw new O(`Unexpected endpoint property type: ${typeof $}`)}};var n1=($,U)=>Object.entries($).reduce((G,[W,Z])=>({...G,[W]:EU(Z,U)}),{});var yZ=($,U)=>{const G=Z0($,"Endpoint URL",U);if(typeof G==="string")try{return new URL(G)}catch(W){throw console.error(`Failed to construct URL with ${G}`,W),W}throw new O(`Endpoint URL must be a string, got ${typeof G}`)};var uZ=($,U)=>{const{conditions:G,endpoint:W}=$,{result:Z,referenceRecord:X}=S0(G,U);if(!Z)return;const Y={...U,referenceRecord:{...U.referenceRecord,...X}},{url:L,properties:F,headers:Q}=W;return U.logger?.debug?.(`${a} Resolving endpoint from template: ${_(W)}`),{...Q!=null&&{headers:cZ(Q,Y)},...F!=null&&{properties:n1(F,Y)},url:yZ(L,Y)}};var _Z=($,U)=>{const{conditions:G,error:W}=$,{result:Z,referenceRecord:X}=S0(G,U);if(!Z)return;throw new O(Z0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...X}}))};var gZ=($,U)=>{const{conditions:G,rules:W}=$,{result:Z,referenceRecord:X}=S0(G,U);if(!Z)return;return i1(W,{...U,referenceRecord:{...U.referenceRecord,...X}})};var i1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const W=uZ(G,U);if(W)return W}else if(G.type==="error")_Z(G,U);else if(G.type==="tree"){const W=gZ(G,U);if(W)return W}else throw new O(`Unknown endpoint rule: ${G}`);throw new O("Rules evaluation failed")};var Vw=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:Z,rules:X}=$;U.logger?.debug?.(`${a} Initial EndpointParams: ${_(G)}`);const Y=Object.entries(Z).filter(([,Q])=>Q.default!=null).map(([Q,z])=>[Q,z.default]);if(Y.length>0)for(let[Q,z]of Y)G[Q]=G[Q]??z;const L=Object.entries(Z).filter(([,Q])=>Q.required).map(([Q])=>Q);for(let Q of L)if(G[Q]==null)throw new O(`Missing required parameter: '${Q}'`);const F=i1(X,{endpointParams:G,logger:W,referenceRecord:{}});if(U.endpointParams?.Endpoint)try{const Q=new URL(U.endpointParams.Endpoint),{protocol:z,port:w}=Q;F.url.protocol=z,F.url.port=w}catch(Q){}return U.logger?.debug?.(`${a} Resolved endpoint: ${_(F)}`),F};var AU=($,U=!1)=>{if(U){for(let G of $.split("."))if(!AU(G))return!1;return!0}if(!t0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(a0($))return!1;return!0};var dZ=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,Z,X,Y,...L]=U;if(G!=="arn"||W===""||Z===""||L[0]==="")return null;return{partition:W,service:Z,region:X,accountId:Y,resourceId:L[0].includes("/")?L[0].split("/"):L}};var pZ={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},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:!0,supportsFIPS:!0},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:!0,supportsFIPS:!0},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:!1,supportsFIPS:!0},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:!1,supportsFIPS:!0},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:!1,supportsFIPS:!0},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:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var Bw=pZ,Ew="",lZ=($)=>{const{partitions:U}=Bw;for(let W of U){const{regions:Z,outputs:X}=W;for(let[Y,L]of Object.entries(Z))if(Y===$)return{...X,...L}}for(let W of U){const{regionRegex:Z,outputs:X}=W;if(new RegExp(Z).test($))return{...X}}const G=U.find((W)=>W.id==="aws");if(!G)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...G.outputs}};var sZ=()=>Ew;var Aw={isVirtualHostableS3Bucket:AU,parseArn:dZ,partition:lZ};e0.aws=Aw;var HU="user-agent",r1="x-amz-user-agent",TU=" ",o1="/",mZ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,nZ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,OU="-";var Hw=($)=>(U,G)=>async(W)=>{const{request:Z}=W;if(!c.isInstance(Z))return U(W);const{headers:X}=Z,Y=G?.userAgent?.map(CU)||[],L=(await $.defaultUserAgentProvider()).map(CU),F=$?.customUserAgent?.map(CU)||[],Q=sZ(),z=(Q?[Q]:[]).concat([...L,...Y,...F]).join(TU),w=[...L.filter((J)=>J.startsWith("aws-sdk-")),...F].join(TU);if($.runtime!=="browser"){if(w)X[r1]=X[r1]?`${X[HU]} ${w}`:w;X[HU]=z}else X[r1]=z;return U({...W,request:Z})},CU=($)=>{const U=$[0].split(o1).map((Y)=>Y.replace(mZ,OU)).join(o1),G=$[1]?.replace(nZ,OU),W=U.indexOf(o1),Z=U.substring(0,W);let X=U.substring(W+1);if(Z==="api")X=X.toLowerCase();return[Z,X,G].filter((Y)=>Y&&Y.length>0).reduce((Y,L,F)=>{switch(F){case 0:return L;case 1:return`${Y}/${L}`;default:return`${Y}#${L}`}},"")},Tw={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},$B=($)=>({applyToStack:(U)=>{U.add(Hw($),Tw)}});var a1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var fU=($)=>a1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var zB=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return fU(U);const W=await U();return fU(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(a1(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var b0=($,U,G)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${G} "${U}". Expected "true" or "false", got ${$[U]}.`)};var X0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(X0||(X0={}));var Ow="AWS_USE_DUALSTACK_ENDPOINT",Cw="use_dualstack_endpoint";var AB={environmentVariableSelector:($)=>b0($,Ow,X0.ENV),configFileSelector:($)=>b0($,Cw,X0.CONFIG),default:!1};var fw="AWS_USE_FIPS_ENDPOINT",qw="use_fips_endpoint";var OB={environmentVariableSelector:($)=>b0($,fw,X0.ENV),configFileSelector:($)=>b0($,qw,X0.CONFIG),default:!1};var qU=Q0(z0(),1),iZ=($)=>$[qU.SMITHY_CONTEXT_KEY]||($[qU.SMITHY_CONTEXT_KEY]={});var t=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var rZ={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},dB={preferredFile:"credentials"};function Nw($){return(U)=>async(G)=>{const W=G.request;if(c.isInstance(W)){const{body:Z,headers:X}=W;if(Z&&Object.keys(X).map((Y)=>Y.toLowerCase()).indexOf(oZ)===-1)try{const Y=$(Z);W.headers={...W.headers,[oZ]:String(Y)}}catch(Y){}}return U({...G,request:W})}}var oZ="content-length",jw={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ME=($)=>({applyToStack:(U)=>{U.add(Nw($.bodyLengthChecker),jw)}});var aZ=($,U)=>(G)=>async(W)=>{const{response:Z}=await G(W);try{const X=await U(Z,$);return{response:Z,output:X}}catch(X){if(Object.defineProperty(X,"$response",{value:Z}),!("$metadata"in X)){if(X.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof X.$responseBodyText!=="undefined"){if(X.$response)X.$response.body=X.$responseBodyText}}throw X}};var tZ=($,U)=>(G,W)=>async(Z)=>{const X=W.endpointV2?.url&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!X)throw new Error("No valid endpoint provider available.");const Y=await U(Z.input,{...$,endpoint:X});return G({...Z,request:Y})};function HE($,U,G){return{applyToStack:(W)=>{W.add(aZ($,G),Pw),W.add(tZ($,U),NU)}}}var Pw={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},NU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var eZ=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(hw(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!kw(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},Sw=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,bw=/(\d+\.){3}\d+/,Dw=/\.\./;var kw=($)=>Sw.test($)&&!bw.test($)&&!Dw.test($),hw=($)=>{const[U,G,W,,,Z]=$.split(":"),X=U==="arn"&&$.split(":").length>=6,Y=Boolean(X&&G&&W&&Z);if(X&&!Y)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Y};var $X=($,U,G)=>{const W=async()=>{const Z=G[$]??G[U];if(typeof Z==="function")return Z();return Z};if($==="credentialScope"||U==="CredentialScope")return async()=>{const Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return Z?.credentialScope??Z?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return Z?.accountId??Z?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const Z=await W();if(Z&&typeof Z==="object"){if("url"in Z)return Z.url.href;if("hostname"in Z){const{protocol:X,hostname:Y,port:L,path:F}=Z;return`${X}//${Y}${L?":"+L:""}${F}`}}return Z};return W};var UX="AWS_ENDPOINT_URL",GX="endpoint_url",WX=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((X)=>X.toUpperCase()),W=U[[UX,...G].join("_")];if(W)return W;const Z=U[UX];if(Z)return Z;return},configFileSelector:(U,G)=>{if(G&&U.services){const Z=G[["services",U.services].join(jU)];if(Z){const X=$.split(" ").map((L)=>L.toLowerCase()),Y=Z[[X.join("_"),GX].join(jU)];if(Y)return Y}}const W=U[GX];if(W)return W;return},default:void 0});var ZX=async($)=>R0(WX($))();var t1=($)=>{if(typeof $==="object"){if("url"in $)return PU($.url);return $}return PU($)};var XX=async($,U,G,W)=>{if(!G.endpoint){const Y=await ZX(G.serviceId||"");if(Y)G.endpoint=()=>Promise.resolve(t1(Y))}const Z=await xw($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(Z,W)},xw=async($,U,G)=>{const W={},Z=U?.getEndpointParameterInstructions?.()||{};for(let[X,Y]of Object.entries(Z))switch(Y.type){case"staticContextParams":W[X]=Y.value;break;case"contextParams":W[X]=$[Y.name];break;case"clientContextParams":case"builtInParams":W[X]=await $X(Y.name,X,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Y))}if(Object.keys(Z).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await eZ(W);return W};var YX=({config:$,instructions:U})=>{return(G,W)=>async(Z)=>{const X=await XX(Z.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=X,W.authSchemes=X.properties?.authSchemes;const Y=W.authSchemes?.[0];if(Y){W.signing_region=Y.signingRegion,W.signing_service=Y.signingName;const F=iZ(W)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:Y.signingRegion,signingRegion:Y.signingRegion,signing_service:Y.signingName,signingName:Y.signingName,signingRegionSet:Y.signingRegionSet},Y.properties)}return G({...Z})}};var vw={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:NU.name},iE=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(YX({config:$,instructions:U}),vw)}});var tE=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>t1(await t(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:t($.useDualstackEndpoint??!1),useFipsEndpoint:t($.useFipsEndpoint??!1)}};var s;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(s||(s={}));var B0=3,LX=s.STANDARD;var FX=Q0(I0(),1);class e1{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),FX.isThrottlingError($)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(G)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const G=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var E0=100,$1=20000,SU=500,$$=500,bU=5,DU=10,kU=1,U$="amz-sdk-invocation-id",G$="amz-sdk-request";var QX=()=>{let $=E0;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min($1,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var hU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min($1,$),getRetryCost:()=>G}};class D0{constructor($){this.maxAttempts=$,this.mode=s.STANDARD,this.capacity=$$,this.retryBackoffStrategy=QX(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return hU({retryDelay:E0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?SU:E0);const Z=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),X=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,Z):Z,Y=this.getCapacityCost(W);return this.capacity-=Y,hU({retryDelay:X,retryCount:$.getRetryCount()+1,retryCost:Y})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max($$,this.capacity+($.getRetryCost()??kU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${B0}`),B0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?DU:bU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class xU{constructor($,U){this.maxAttemptsProvider=$,this.mode=s.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new e1,this.standardRetryStrategy=new D0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry($,U)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var zX="AWS_MAX_ATTEMPTS",wX="max_attempts",yA={environmentVariableSelector:($)=>{const U=$[zX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${zX} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[wX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${wX} mast be a number, got "${U}"`);return G},default:B0},uA=($)=>{const{retryStrategy:U}=$,G=t($.maxAttempts??B0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await t($.retryMode)()===s.ADAPTIVE)return new xU(G);return new D0(G)}}},cw="AWS_RETRY_MODE",yw="retry_mode",_A={environmentVariableSelector:($)=>$[cw],configFileSelector:($)=>$[yw],default:LX};var k0=Q0(I0(),1);import{Readable as uw} from"stream";var JX=($)=>$?.body instanceof uw||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var vU=($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)};var _w=($)=>(U,G)=>async(W)=>{let Z=await $.retryStrategy();const X=await $.maxAttempts();if(gw(Z)){Z=Z;let Y=await Z.acquireInitialRetryToken(G.partition_id),L=new Error,F=0,Q=0;const{request:z}=W,w=c.isInstance(z);if(w)z.headers[U$]=rG();while(!0)try{if(w)z.headers[G$]=`attempt=${F+1}; max=${X}`;const{response:J,output:I}=await U(W);return Z.recordSuccess(Y),I.$metadata.attempts=F+1,I.$metadata.totalRetryDelay=Q,{response:J,output:I}}catch(J){const I=dw(J);if(L=vU(J),w&&JX(z))throw(G.logger instanceof IX?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{Y=await Z.refreshRetryTokenForRetry(Y,I)}catch(A){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=F+1,L.$metadata.totalRetryDelay=Q,L}F=Y.getRetryCount();const M=Y.getRetryDelay();Q+=M,await new Promise((A)=>setTimeout(A,M))}}else{if(Z=Z,Z?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",Z.mode]];return Z.retry(U,W)}},gw=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",dw=($)=>{const U={error:$,errorType:pw($)},G=sw($.$response);if(G)U.retryAfterHint=G;return U},pw=($)=>{if(k0.isThrottlingError($))return"THROTTLING";if(k0.isTransientError($))return"TRANSIENT";if(k0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},lw={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},aA=($)=>({applyToStack:(U)=>{U.add(_w($),lw)}}),sw=($)=>{if(!cU.isInstance($))return;const U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)};var mw=Q0(I0(),1);var W$=Q0(I0(),1);import{platform as v3,release as c3} from"os";import{env as hY,versions as y3} from"process";var tU={isCrtAvailable:!1};var kY=()=>{if(tU.isCrtAvailable)return["md/crt-avail"];return null};var u3="AWS_SDK_UA_APP_ID",_3="sdk-ua-app-id",eH=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${v3()}`,c3()],["lang/js"],["md/nodejs",`${y3.node}`]],W=kY();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(hY.AWS_EXECUTION_ENV)G.push([`exec-env/${hY.AWS_EXECUTION_ENV}`]);const Z=R0({environmentVariableSelector:(Y)=>Y[u3],configFileSelector:(Y)=>Y[_3],default:void 0})();let X=void 0;return async()=>{if(!X){const Y=await Z;X=Y?[...G,[`app/${Y}`]]:[...G]}return X}};import{Buffer as g3} from"buffer";import{createHash as d3,createHmac as p3} from"crypto";var xY=function($,U){if(g3.isBuffer($))return $;if(typeof $==="string")return vY($,U);if(ArrayBuffer.isView($))return eU($.buffer,$.byteOffset,$.byteLength);return eU($)};class l3{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(cY(xY($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?p3(this.algorithmIdentifier,xY(this.secret)):d3(this.algorithmIdentifier)}}import{fstatSync as s3,lstatSync as m3} from"fs";var FT=($)=>{if(!$)return 0;if(typeof $==="string")return Buffer.byteLength($);else if(typeof $.byteLength==="number")return $.byteLength;else if(typeof $.size==="number")return $.size;else if(typeof $.start==="number"&&typeof $.end==="number")return $.end+1-$.start;else if(typeof $.path==="string"||Buffer.isBuffer($.path))return m3($.path).size;else if(typeof $.fd==="number")return s3($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var yY="AWS_EXECUTION_ENV",$G="AWS_REGION",UG="AWS_DEFAULT_REGION",uY="AWS_EC2_METADATA_DISABLED",_Y=["in-region","cross-region","mobile","standard","legacy"],gY="/latest/meta-data/placement/region";var dY={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var ET=({region:$=R0(rZ),defaultsMode:U=R0(dY)}={})=>pY(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return n3($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(G?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${_Y.join(", ")}, got ${G}`)}}),n3=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await i3();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},i3=async()=>{if(process.env[yY]&&(process.env[$G]||process.env[UG]))return process.env[$G]??process.env[UG];if(!process.env[uY])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-11fb3a27cf688340.js"),G=await $();return(await U({...G,path:gY})).toString()}catch($){}};var OT=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const G=$.region;if(typeof G==="string")return G;return G()};return{setRegion(G){U=G},region(){return U}}},CT=($)=>{return{region:$.region()}};export{rG as N,TK as O,OK as P,fK as Q,SK as R,cX as S,b0 as T,X0 as U,RU as V,iZ as W,t as X,HM as Y,e0 as Z,Vw as _,Aw as $,$B as aa,AB as ba,OB as ca,rZ as da,dB as ea,zB as fa,ME as ga,xw as ha,HE as ia,iE as ja,tE as ka,LX as la,yA as ma,uA as na,_A as oa,aA as pa,x3 as qa,eH as ra,l3 as sa,FT as ta,ET as ua,OT as va,CT as wa};
@@ -1 +1 @@
1
- import{B as x} from"./chunk-24a86f8f5ddc0cbd.js";import{rb as S} from"./chunk-20ce79bc516cd80a.js";var q="AWS_PROFILE";var B=(o)=>o.profile||process.env["AWS_PROFILE"]||"default";import{join as b} from"path";import{homedir as N} from"os";import{sep as L} from"path";var d={},w=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{const{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${L}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;const i=w();if(!d[i])d[i]=N();return d[i]};var v="AWS_CONFIG_FILE",g=()=>process.env[v]||b(f(),".aws","config");var D=x(S(),1);import{join as I} from"path";var h=x(S(),1);var O=(o)=>Object.entries(o).filter(([e])=>{const t=e.indexOf(c);if(t===-1)return!1;return Object.values(h.IniSectionType).includes(e.substring(0,t))}).reduce((e,[t,r])=>{const i=t.indexOf(c),s=t.substring(0,i)===h.IniSectionType.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as j} from"path";var y="AWS_SHARED_CREDENTIALS_FILE",_=()=>process.env[y]||j(f(),".aws","credentials");var C=x(S(),1);var $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,G=["__proto__","profile __proto__"],a=(o)=>{const e={};let t,r;for(let i of o.split(/\r?\n/)){const s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;const n=s.substring(1,s.length-1),m=$.exec(n);if(m){const[,p,,F]=m;if(Object.values(C.IniSectionType).includes(p))t=[p,F].join(c)}else t=n;if(G.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){const n=s.indexOf("=");if(![0,-1].includes(n)){const[m,p]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(p==="")r=m;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};const F=r?[r,m].join(c):m;e[t][F]=p}}}}return e};import{promises as W} from"fs";var{readFile:K}=W,E={},l=(o,e)=>{if(!E[o]||e?.ignoreCache)E[o]=K(o,"utf8");return E[o]};var P=()=>({}),c=".",R=async(o={})=>{const{filepath:e=_(),configFilepath:t=g()}=o,r=f();let s=e;if(e.startsWith("~/"))s=I(r,e.slice(2));let u=t;if(t.startsWith("~/"))u=I(r,t.slice(2));const n=await Promise.all([l(u,{ignoreCache:o.ignoreCache}).then(a).then(O).catch(P),l(s,{ignoreCache:o.ignoreCache}).then(a).catch(P)]);return{configFile:n[0],credentialsFile:n[1]}};var T=(o)=>Object.entries(o).filter(([e])=>e.startsWith(D.IniSectionType.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var V=()=>({}),Pe=async(o={})=>l(o.configFilepath??g()).then(a).then(T).catch(V);var A=(...o)=>{const e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var He=async(o)=>{const e=await R(o);return A(e.configFile,e.credentialsFile)};import{createHash as U} from"crypto";import{join as X} from"path";var H=(o)=>{const t=U("sha1").update(o).digest("hex");return X(f(),".aws","sso","cache",`${t}.json`)};import{promises as k} from"fs";var{readFile:M}=k,$e=async(o)=>{const e=H(o),t=await M(e,"utf8");return JSON.parse(t)};export{q as Bb,B as Cb,H as Db,$e as Eb,c as Fb,R as Gb,Pe as Hb,He as Ib};
1
+ import{B as x} from"./chunk-24a86f8f5ddc0cbd.js";import{tb as S} from"./chunk-6a97611e6bd65152.js";var q="AWS_PROFILE";var B=(o)=>o.profile||process.env["AWS_PROFILE"]||"default";import{join as b} from"path";import{homedir as N} from"os";import{sep as L} from"path";var d={},w=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{const{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${L}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;const i=w();if(!d[i])d[i]=N();return d[i]};var v="AWS_CONFIG_FILE",g=()=>process.env[v]||b(f(),".aws","config");var D=x(S(),1);import{join as I} from"path";var h=x(S(),1);var O=(o)=>Object.entries(o).filter(([e])=>{const t=e.indexOf(c);if(t===-1)return!1;return Object.values(h.IniSectionType).includes(e.substring(0,t))}).reduce((e,[t,r])=>{const i=t.indexOf(c),s=t.substring(0,i)===h.IniSectionType.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as j} from"path";var y="AWS_SHARED_CREDENTIALS_FILE",_=()=>process.env[y]||j(f(),".aws","credentials");var C=x(S(),1);var $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,G=["__proto__","profile __proto__"],a=(o)=>{const e={};let t,r;for(let i of o.split(/\r?\n/)){const s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;const n=s.substring(1,s.length-1),m=$.exec(n);if(m){const[,p,,F]=m;if(Object.values(C.IniSectionType).includes(p))t=[p,F].join(c)}else t=n;if(G.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){const n=s.indexOf("=");if(![0,-1].includes(n)){const[m,p]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(p==="")r=m;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};const F=r?[r,m].join(c):m;e[t][F]=p}}}}return e};import{promises as W} from"fs";var{readFile:K}=W,E={},l=(o,e)=>{if(!E[o]||e?.ignoreCache)E[o]=K(o,"utf8");return E[o]};var P=()=>({}),c=".",R=async(o={})=>{const{filepath:e=_(),configFilepath:t=g()}=o,r=f();let s=e;if(e.startsWith("~/"))s=I(r,e.slice(2));let u=t;if(t.startsWith("~/"))u=I(r,t.slice(2));const n=await Promise.all([l(u,{ignoreCache:o.ignoreCache}).then(a).then(O).catch(P),l(s,{ignoreCache:o.ignoreCache}).then(a).catch(P)]);return{configFile:n[0],credentialsFile:n[1]}};var T=(o)=>Object.entries(o).filter(([e])=>e.startsWith(D.IniSectionType.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var V=()=>({}),Pe=async(o={})=>l(o.configFilepath??g()).then(a).then(T).catch(V);var A=(...o)=>{const e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var He=async(o)=>{const e=await R(o);return A(e.configFile,e.credentialsFile)};import{createHash as U} from"crypto";import{join as X} from"path";var H=(o)=>{const t=U("sha1").update(o).digest("hex");return X(f(),".aws","sso","cache",`${t}.json`)};import{promises as k} from"fs";var{readFile:M}=k,$e=async(o)=>{const e=H(o),t=await M(e,"utf8");return JSON.parse(t)};export{q as Db,B as Eb,H as Fb,$e as Gb,c as Hb,R as Ib,Pe as Jb,He as Kb};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-20ce79bc516cd80a.js";import{vb as o} from"./chunk-73eed146ee78f681.js";import{Cb as K,Ib as S} from"./chunk-8088e99dc2bb92e1.js";import{exec as _} from"child_process";import{promisify as y} from"util";var i=(c,n,s)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){const t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let e=n.AccountId;if(!e&&s?.[c]?.aws_account_id)e=s[c].aws_account_id;return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...e&&{accountId:e}}};var x=async(c,n,s)=>{const e=n[c];if(n[c]){const t=e.credential_process;if(t!==void 0){const u=y(_);try{const{stdout:r}=await u(t);let w;try{w=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return i(c,w,n)}catch(r){throw new o(r.message,{logger:s})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var $=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{$ as fromProcess};
2
+ import"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-6a97611e6bd65152.js";import{xb as o} from"./chunk-80e3ea835f0d9a37.js";import{Eb as K,Kb as S} from"./chunk-405c6731d3acd2cf.js";import{exec as _} from"child_process";import{promisify as y} from"util";var i=(c,n,s)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){const t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let e=n.AccountId;if(!e&&s?.[c]?.aws_account_id)e=s[c].aws_account_id;return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...e&&{accountId:e}}};var x=async(c,n,s)=>{const e=n[c];if(n[c]){const t=e.credential_process;if(t!==void 0){const u=y(_);try{const{stdout:r}=await u(t);let w;try{w=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return i(c,w,n)}catch(r){throw new o(r.message,{logger:s})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var $=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{$ as fromProcess};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-24a86f8f5ddc0cbd.js";import{vb as E} from"./chunk-73eed146ee78f681.js";import{readFileSync as l} from"fs";var t=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:c,policyArns:i,policy:_,durationSeconds:N}=e;let{roleAssumerWithWebIdentity:s}=e;if(!s){const{getDefaultRoleAssumerWithWebIdentity:d}=await import("./chunk-f1eb122aa5c746ea.js");s=d({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return s({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:c,PolicyArns:i,Policy:_,DurationSeconds:N})};var m="AWS_WEB_IDENTITY_TOKEN_FILE",S="AWS_ROLE_ARN",p="AWS_ROLE_SESSION_NAME",A=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[m],r=e?.roleArn??process.env[S],n=e?.roleSessionName??process.env[p];if(!o||!r)throw new E("Web identity configuration not specified",{logger:e.logger});return t({...e,webIdentityToken:l(o,{encoding:"ascii"}),roleArn:r,roleSessionName:n})()};export{t as fromWebToken,A as fromTokenFile};
2
+ import"./chunk-24a86f8f5ddc0cbd.js";import{xb as E} from"./chunk-80e3ea835f0d9a37.js";import{readFileSync as l} from"fs";var t=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:c,policyArns:i,policy:_,durationSeconds:N}=e;let{roleAssumerWithWebIdentity:s}=e;if(!s){const{getDefaultRoleAssumerWithWebIdentity:d}=await import("./chunk-053cb1dc15795bf6.js");s=d({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return s({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:c,PolicyArns:i,Policy:_,DurationSeconds:N})};var m="AWS_WEB_IDENTITY_TOKEN_FILE",S="AWS_ROLE_ARN",p="AWS_ROLE_SESSION_NAME",A=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[m],r=e?.roleArn??process.env[S],n=e?.roleSessionName??process.env[p];if(!o||!r)throw new E("Web identity configuration not specified",{logger:e.logger});return t({...e,webIdentityToken:l(o,{encoding:"ascii"}),roleArn:r,roleSessionName:n})()};export{t as fromWebToken,A as fromTokenFile};
@@ -1,2 +1,2 @@
1
1
  import{C as D} from"./chunk-24a86f8f5ddc0cbd.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{const j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{_checksumAlgorithms:j,addChecksumAlgorithm(z){this._checksumAlgorithms.push(z)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),F=Q((b)=>{const j={};return b.checksumAlgorithms().forEach((z)=>{j[z.algorithmId()]=z.checksumConstructor()}),j},"resolveChecksumRuntimeConfig"),T=Q((b)=>{return{...E(b)}},"getDefaultClientConfiguration"),k=Q((b)=>{return{...F(b)}},"resolveDefaultRuntimeConfig"),M=((b)=>{return b[b.HEADER=0]="HEADER",b[b.TRAILER=1]="TRAILER",b})(M||{}),R="__smithy_context",N=((b)=>{return b.PROFILE="profile",b.SSO_SESSION="sso-session",b.SERVICES="services",b})(N||{}),Y=((b)=>{return b.HTTP_0_9="http/0.9",b.HTTP_1_0="http/1.0",b.TDS_8_0="tds/8.0",b})(Y||{})});
2
- export{S as rb};
2
+ export{S as tb};