gemi 0.4.91 → 0.4.92

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 (41) hide show
  1. package/dist/app/App.d.ts.map +1 -1
  2. package/dist/app/index.js +1 -1
  3. package/dist/chunk-07ad6201a5864cd0.js +2 -0
  4. package/dist/chunk-156c827bf8d5029c.js +5 -0
  5. package/dist/chunk-2c5ecf8dc0a97aba.js +2 -0
  6. package/dist/chunk-542b3c90f0ff4ded.js +2 -0
  7. package/dist/chunk-63884944ac5ce0f0.js +2 -0
  8. package/dist/{chunk-201d67e6e22cc14b.js → chunk-6a2141dd4169ce0e.js} +1 -1
  9. package/dist/chunk-6b58f7c76c2a738c.js +2 -0
  10. package/dist/chunk-83938f41a5342f87.js +2 -0
  11. package/dist/chunk-880cfc21ce7cc2c6.js +2 -0
  12. package/dist/chunk-9d5c096c43928b37.js +1 -0
  13. package/dist/chunk-9dc5c9b7a885d0bc.js +9 -0
  14. package/dist/chunk-a1ef3b11adc01140.js +6 -0
  15. package/dist/chunk-ad396345e8e74292.js +2 -0
  16. package/dist/{chunk-fcd9eb76c67113d3.js → chunk-b13ef9b23e30af91.js} +1 -1
  17. package/dist/chunk-e1a4203ece554bc3.js +2 -0
  18. package/dist/chunk-e4a19367b5596f21.js +2 -0
  19. package/dist/chunk-fe8cfc6e6c3ce826.js +16 -0
  20. package/dist/client/ServerDataProvider.d.ts +5 -1
  21. package/dist/client/ServerDataProvider.d.ts.map +1 -1
  22. package/dist/client/i18n/I18nContext.d.ts.map +1 -1
  23. package/dist/client/index.js +13 -14
  24. package/dist/kernel/index.js +1 -1
  25. package/dist/services/index.js +10 -1
  26. package/package.json +1 -1
  27. package/dist/chunk-19790c50198f1898.js +0 -2
  28. package/dist/chunk-2b9b6009ebe271d3.js +0 -2
  29. package/dist/chunk-32d1342f9f8391c0.js +0 -2
  30. package/dist/chunk-3a6838d9e6866471.js +0 -2
  31. package/dist/chunk-7085d9454a422181.js +0 -2
  32. package/dist/chunk-809308720fc22418.js +0 -2
  33. package/dist/chunk-900bf3955cb1bbab.js +0 -2
  34. package/dist/chunk-931a005d4bb28ffe.js +0 -2
  35. package/dist/chunk-967cb54562e3d29b.js +0 -3
  36. package/dist/chunk-b94896500a1345bf.js +0 -2
  37. package/dist/chunk-bce765dc10669cd0.js +0 -6
  38. package/dist/chunk-bdac4694bbb37064.js +0 -1
  39. package/dist/chunk-c3c17a7115770391.js +0 -2
  40. package/dist/chunk-d1e1b959b1124e74.js +0 -18
  41. package/dist/chunk-f6a9cd06681eb0dc.js +0 -9
@@ -0,0 +1,16 @@
1
+ import{B as h,C as Q} from"./chunk-24a86f8f5ddc0cbd.js";import{M as D6} from"./chunk-28694e5e949df0ff.js";import{Aa as _$,Ba as t2,Ca as d6,Da as k0,Ea as U8,Fa as G9,Ia as f0,Ja as a2,Ka as e2,La as W9,za as S} from"./chunk-156c827bf8d5029c.js";import{ob as $0} from"./chunk-6a2141dd4169ce0e.js";import{pb as Dw,qb as o} from"./chunk-9d5c096c43928b37.js";import{rb as s1} from"./chunk-880cfc21ce7cc2c6.js";import{xb as C$} from"./chunk-b13ef9b23e30af91.js";var S1=Q(($U)=>{var DM=function($){return $&&$.__esModule?$:{default:$}},_M=function(){if(x0>v0.length-16)hM.default.randomFillSync(v0),x0=0;return v0.slice(x0,x0+=16)};Object.defineProperty($U,"__esModule",{value:!0});$U.default=_M;var hM=DM(import.meta.require("crypto")),v0=new Uint8Array(256),x0=v0.length});var GU=Q((UU)=>{Object.defineProperty(UU,"__esModule",{value:!0});UU.default=void 0;var xM=/^(?:[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;UU.default=xM});var Q0=Q((WU)=>{var uM=function($){return $&&$.__esModule?$:{default:$}},yM=function($){return typeof $==="string"&&vM.default.test($)};Object.defineProperty(WU,"__esModule",{value:!0});WU.default=void 0;var vM=uM(GU()),dM=yM;WU.default=dM});var F0=Q((LU)=>{var gM=function($){return $&&$.__esModule?$:{default:$}},XU=function($,U=0){return V[$[U+0]]+V[$[U+1]]+V[$[U+2]]+V[$[U+3]]+"-"+V[$[U+4]]+V[$[U+5]]+"-"+V[$[U+6]]+V[$[U+7]]+"-"+V[$[U+8]]+V[$[U+9]]+"-"+V[$[U+10]]+V[$[U+11]]+V[$[U+12]]+V[$[U+13]]+V[$[U+14]]+V[$[U+15]]},sM=function($,U=0){const w=XU($,U);if(!pM.default(w))throw TypeError("Stringified UUID is invalid");return w};Object.defineProperty(LU,"__esModule",{value:!0});LU.default=void 0;LU.unsafeStringify=XU;var pM=gM(Q0()),V=[];for(let $=0;$<256;++$)V.push(($+256).toString(16).slice(1));var mM=sM;LU.default=mM});var EU=Q((IU)=>{var oM=function($){return $&&$.__esModule?$:{default:$}},iM=function($,U,w){let G=U&&w||0;const W=U||new Array(16);$=$||{};let M=$.node||fU,X=$.clockseq!==void 0?$.clockseq:j1;if(M==null||X==null){const Y=$.random||($.rng||lM.default)();if(M==null)M=fU=[Y[0]|1,Y[1],Y[2],Y[3],Y[4],Y[5]];if(X==null)X=j1=(Y[6]<<8|Y[7])&16383}let L=$.msecs!==void 0?$.msecs:Date.now(),Z=$.nsecs!==void 0?$.nsecs:b1+1;const f=L-k1+(Z-b1)/1e4;if(f<0&&$.clockseq===void 0)X=X+1&16383;if((f<0||L>k1)&&$.nsecs===void 0)Z=0;if(Z>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");k1=L,b1=Z,j1=X,L+=12219292800000;const I=((L&268435455)*1e4+Z)%4294967296;W[G++]=I>>>24&255,W[G++]=I>>>16&255,W[G++]=I>>>8&255,W[G++]=I&255;const R=L/4294967296*1e4&268435455;W[G++]=R>>>8&255,W[G++]=R&255,W[G++]=R>>>24&15|16,W[G++]=R>>>16&255,W[G++]=X>>>8|128,W[G++]=X&255;for(let Y=0;Y<6;++Y)W[G+Y]=M[Y];return U||rM.unsafeStringify(W)};Object.defineProperty(IU,"__esModule",{value:!0});IU.default=void 0;var lM=oM(S1()),rM=F0(),fU,j1,k1=0,b1=0,tM=iM;IU.default=tM});var h1=Q((YU)=>{var eM=function($){return $&&$.__esModule?$:{default:$}},$X=function($){if(!aM.default($))throw TypeError("Invalid UUID");let U;const w=new Uint8Array(16);return w[0]=(U=parseInt($.slice(0,8),16))>>>24,w[1]=U>>>16&255,w[2]=U>>>8&255,w[3]=U&255,w[4]=(U=parseInt($.slice(9,13),16))>>>8,w[5]=U&255,w[6]=(U=parseInt($.slice(14,18),16))>>>8,w[7]=U&255,w[8]=(U=parseInt($.slice(19,23),16))>>>8,w[9]=U&255,w[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,w[11]=U/4294967296&255,w[12]=U>>>24&255,w[13]=U>>>16&255,w[14]=U>>>8&255,w[15]=U&255,w};Object.defineProperty(YU,"__esModule",{value:!0});YU.default=void 0;var aM=eM(Q0()),UX=$X;YU.default=UX});var D1=Q((JU)=>{var WX=function($){return $&&$.__esModule?$:{default:$}},MX=function($){$=unescape(encodeURIComponent($));const U=[];for(let w=0;w<$.length;++w)U.push($.charCodeAt(w));return U},XX=function($,U,w){function G(W,M,X,L){var Z;if(typeof W==="string")W=MX(W);if(typeof M==="string")M=GX.default(M);if(((Z=M)===null||Z===void 0?void 0:Z.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+W.length);if(f.set(M),f.set(W,M.length),f=w(f),f[6]=f[6]&15|U,f[8]=f[8]&63|128,X){L=L||0;for(let I=0;I<16;++I)X[L+I]=f[I];return X}return wX.unsafeStringify(f)}try{G.name=$}catch(W){}return G.DNS=QU,G.URL=FU,G};Object.defineProperty(JU,"__esModule",{value:!0});JU.URL=JU.DNS=void 0;JU.default=XX;var wX=F0(),GX=WX(h1()),QU="6ba7b810-9dad-11d1-80b4-00c04fd430c8";JU.DNS=QU;var FU="6ba7b811-9dad-11d1-80b4-00c04fd430c8";JU.URL=FU});var BU=Q((KU)=>{var IX=function($){return $&&$.__esModule?$:{default:$}},RX=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return fX.default.createHash("md5").update($).digest()};Object.defineProperty(KU,"__esModule",{value:!0});KU.default=void 0;var fX=IX(import.meta.require("crypto")),EX=RX;KU.default=EX});var VU=Q((TU)=>{var OU=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(TU,"__esModule",{value:!0});TU.default=void 0;var YX=OU(D1()),zX=OU(BU()),QX=YX.default("v3",48,zX.default),FX=QX;TU.default=FX});var PU=Q((CU)=>{var AX=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(CU,"__esModule",{value:!0});CU.default=void 0;var JX=AX(import.meta.require("crypto")),KX={randomUUID:JX.default.randomUUID};CU.default=KX});var hU=Q((kU)=>{var jU=function($){return $&&$.__esModule?$:{default:$}},OX=function($,U,w){if(SU.default.randomUUID&&!U&&!$)return SU.default.randomUUID();$=$||{};const G=$.random||($.rng||qX.default)();if(G[6]=G[6]&15|64,G[8]=G[8]&63|128,U){w=w||0;for(let W=0;W<16;++W)U[w+W]=G[W];return U}return BX.unsafeStringify(G)};Object.defineProperty(kU,"__esModule",{value:!0});kU.default=void 0;var SU=jU(PU()),qX=jU(S1()),BX=F0(),TX=OX;kU.default=TX});var cU=Q((DU)=>{var VX=function($){return $&&$.__esModule?$:{default:$}},CX=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return HX.default.createHash("sha1").update($).digest()};Object.defineProperty(DU,"__esModule",{value:!0});DU.default=void 0;var HX=VX(import.meta.require("crypto")),NX=CX;DU.default=NX});var yU=Q((vU)=>{var xU=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(vU,"__esModule",{value:!0});vU.default=void 0;var PX=xU(D1()),SX=xU(cU()),jX=PX.default("v5",80,SX.default),kX=jX;vU.default=kX});var gU=Q((dU)=>{Object.defineProperty(dU,"__esModule",{value:!0});dU.default=void 0;var bX="00000000-0000-0000-0000-000000000000";dU.default=bX});var nU=Q((sU)=>{var DX=function($){return $&&$.__esModule?$:{default:$}},_X=function($){if(!hX.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(sU,"__esModule",{value:!0});sU.default=void 0;var hX=DX(Q0()),cX=_X;sU.default=cX});var _1=Q((b)=>{var u=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(b,"__esModule",{value:!0});Object.defineProperty(b,"NIL",{enumerable:!0,get:function(){return dX.default}});Object.defineProperty(b,"parse",{enumerable:!0,get:function(){return mX.default}});Object.defineProperty(b,"stringify",{enumerable:!0,get:function(){return sX.default}});Object.defineProperty(b,"v1",{enumerable:!0,get:function(){return xX.default}});Object.defineProperty(b,"v3",{enumerable:!0,get:function(){return vX.default}});Object.defineProperty(b,"v4",{enumerable:!0,get:function(){return uX.default}});Object.defineProperty(b,"v5",{enumerable:!0,get:function(){return yX.default}});Object.defineProperty(b,"validate",{enumerable:!0,get:function(){return gX.default}});Object.defineProperty(b,"version",{enumerable:!0,get:function(){return pX.default}});var xX=u(EU()),vX=u(VU()),uX=u(hU()),yX=u(yU()),dX=u(gU()),pX=u(nU()),gX=u(Q0()),sX=u(F0()),mX=u(h1())});var J0=Q((hI,aU)=>{var{defineProperty:u0,getOwnPropertyDescriptor:$L,getOwnPropertyNames:UL}=Object,wL=Object.prototype.hasOwnProperty,iU=($,U)=>u0($,"name",{value:U,configurable:!0}),GL=($,U)=>{for(var w in U)u0($,w,{get:U[w],enumerable:!0})},WL=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of UL(U))if(!wL.call($,W)&&W!==w)u0($,W,{get:()=>U[W],enumerable:!(G=$L(U,W))||G.enumerable})}return $},ML=($)=>WL(u0({},"__esModule",{value:!0}),$),tU={};GL(tU,{getSmithyContext:()=>XL,normalizeProvider:()=>LL});aU.exports=ML(tU);var oU=$0(),XL=iU(($)=>$[oU.SMITHY_CONTEXT_KEY]||($[oU.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),LL=iU(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var U0=Q((eU)=>{Object.defineProperty(eU,"__esModule",{value:!0});eU.getHomeDir=void 0;var ZL=import.meta.require("os"),fL=import.meta.require("path"),c1={},IL=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},RL=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:w,HOMEDRIVE:G=`C:${fL.sep}`}=process.env;if($)return $;if(U)return U;if(w)return`${G}${w}`;const W=IL();if(!c1[W])c1[W]=ZL.homedir();return c1[W]};eU.getHomeDir=RL});var x1=Q((Uw)=>{Object.defineProperty(Uw,"__esModule",{value:!0});Uw.getSSOTokenFilepath=void 0;var EL=import.meta.require("crypto"),YL=import.meta.require("path"),zL=U0(),QL=($)=>{const w=EL.createHash("sha1").update($).digest("hex");return YL.join(zL.getHomeDir(),".aws","sso","cache",`${w}.json`)};Uw.getSSOTokenFilepath=QL});var Mw=Q((Gw)=>{Object.defineProperty(Gw,"__esModule",{value:!0});Gw.getSSOTokenFromFile=void 0;var FL=import.meta.require("fs"),JL=x1(),{readFile:AL}=FL.promises,KL=async($)=>{const U=JL.getSSOTokenFilepath($),w=await AL(U,"utf8");return JSON.parse(w)};Gw.getSSOTokenFromFile=KL});var u1=Q((Xw)=>{Object.defineProperty(Xw,"__esModule",{value:!0});Xw.slurpFile=void 0;var qL=import.meta.require("fs"),{readFile:BL}=qL.promises,v1={},OL=($,U)=>{if(!v1[$]||(U===null||U===void 0?void 0:U.ignoreCache))v1[$]=BL($,"utf8");return v1[$]};Xw.slurpFile=OL});var g1=Q((vI,K0)=>{var{defineProperty:p0,getOwnPropertyDescriptor:TL,getOwnPropertyNames:HL}=Object,VL=Object.prototype.hasOwnProperty,j=($,U)=>p0($,"name",{value:U,configurable:!0}),CL=($,U)=>{for(var w in U)p0($,w,{get:U[w],enumerable:!0})},y1=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of HL(U))if(!VL.call($,W)&&W!==w)p0($,W,{get:()=>U[W],enumerable:!(G=TL(U,W))||G.enumerable})}return $},p1=($,U,w)=>(y1($,U,"default"),w&&y1(w,U,"default")),NL=($)=>y1(p0({},"__esModule",{value:!0}),$),A0={};CL(A0,{CONFIG_PREFIX_SEPARATOR:()=>l,DEFAULT_PROFILE:()=>Rw,ENV_PROFILE:()=>Iw,getProfileName:()=>PL,loadSharedConfigFiles:()=>Yw,loadSsoSessionData:()=>dL,parseKnownFiles:()=>gL});K0.exports=NL(A0);p1(A0,U0(),K0.exports);var Iw="AWS_PROFILE",Rw="default",PL=j(($)=>$.profile||process.env[Iw]||Rw,"getProfileName");p1(A0,x1(),K0.exports);p1(A0,Mw(),K0.exports);var y0=$0(),SL=j(($)=>Object.entries($).filter(([U])=>{const w=U.indexOf(l);if(w===-1)return!1;return Object.values(y0.IniSectionType).includes(U.substring(0,w))}).reduce((U,[w,G])=>{const W=w.indexOf(l),M=w.substring(0,W)===y0.IniSectionType.PROFILE?w.substring(W+1):w;return U[M]=G,U},{...$.default&&{default:$.default}}),"getConfigData"),d0=import.meta.require("path"),jL=U0(),kL="AWS_CONFIG_FILE",Ew=j(()=>process.env[kL]||d0.join(jL.getHomeDir(),".aws","config"),"getConfigFilepath"),bL=U0(),hL="AWS_SHARED_CREDENTIALS_FILE",DL=j(()=>process.env[hL]||d0.join(bL.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),_L=U0(),cL=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,xL=["__proto__","profile __proto__"],d1=j(($)=>{const U={};let w,G;for(let W of $.split(/\r?\n/)){const M=W.split(/(^|\s)[;#]/)[0].trim();if(M[0]==="["&&M[M.length-1]==="]"){w=void 0,G=void 0;const L=M.substring(1,M.length-1),Z=cL.exec(L);if(Z){const[,f,,I]=Z;if(Object.values(y0.IniSectionType).includes(f))w=[f,I].join(l)}else w=L;if(xL.includes(L))throw new Error(`Found invalid profile name "${L}"`)}else if(w){const L=M.indexOf("=");if(![0,-1].includes(L)){const[Z,f]=[M.substring(0,L).trim(),M.substring(L+1).trim()];if(f==="")G=Z;else{if(G&&W.trimStart()===W)G=void 0;U[w]=U[w]||{};const I=G?[G,Z].join(l):Z;U[w][I]=f}}}}return U},"parseIni"),Zw=u1(),fw=j(()=>({}),"swallowError"),l=".",Yw=j(async($={})=>{const{filepath:U=DL(),configFilepath:w=Ew()}=$,G=_L.getHomeDir();let M=U;if(U.startsWith("~/"))M=d0.join(G,U.slice(2));let X=w;if(w.startsWith("~/"))X=d0.join(G,w.slice(2));const L=await Promise.all([Zw.slurpFile(X,{ignoreCache:$.ignoreCache}).then(d1).then(SL).catch(fw),Zw.slurpFile(M,{ignoreCache:$.ignoreCache}).then(d1).catch(fw)]);return{configFile:L[0],credentialsFile:L[1]}},"loadSharedConfigFiles"),vL=j(($)=>Object.entries($).filter(([U])=>U.startsWith(y0.IniSectionType.SSO_SESSION+l)).reduce((U,[w,G])=>({...U,[w.substring(w.indexOf(l)+1)]:G}),{}),"getSsoSessionData"),uL=u1(),yL=j(()=>({}),"swallowError"),dL=j(async($={})=>uL.slurpFile($.configFilepath??Ew()).then(d1).then(vL).catch(yL),"loadSsoSessionData"),pL=j((...$)=>{const U={};for(let w of $)for(let[G,W]of Object.entries(w))if(U[G]!==void 0)Object.assign(U[G],W);else U[G]=W;return U},"mergeConfigFiles"),gL=j(async($)=>{const U=await Yw($);return pL(U.configFile,U.credentialsFile)},"parseKnownFiles")});var Jw=Q((uI,Fw)=>{var m1=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 $}},g0=Object.defineProperty,sL=Object.getOwnPropertyDescriptor,mL=Object.getOwnPropertyNames,nL=Object.prototype.hasOwnProperty,w0=($,U)=>g0($,"name",{value:U,configurable:!0}),lL=($,U)=>{for(var w in U)g0($,w,{get:U[w],enumerable:!0})},rL=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of mL(U))if(!nL.call($,W)&&W!==w)g0($,W,{get:()=>U[W],enumerable:!(G=sL(U,W))||G.enumerable})}return $},oL=($)=>rL(g0({},"__esModule",{value:!0}),$),Qw={};lL(Qw,{loadConfig:()=>$Z});Fw.exports=oL(Qw);var q0=s1();w0(m1,"getSelectorName");var iL=w0(($,U)=>async()=>{try{const w=$(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new q0.CredentialsProviderError(w.message||`Not found in ENV: ${m1($.toString())}`,{logger:U})}},"fromEnv"),zw=g1(),tL=w0(($,{preferredFile:U="config",...w}={})=>async()=>{const G=zw.getProfileName(w),{configFile:W,credentialsFile:M}=await zw.loadSharedConfigFiles(w),X=M[G]||{},L=W[G]||{},Z=U==="config"?{...X,...L}:{...L,...X};try{const I=$(Z,U==="config"?W:M);if(I===void 0)throw new Error;return I}catch(f){throw new q0.CredentialsProviderError(f.message||`Not found in config files w/ profile [${G}]: ${m1($.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),aL=w0(($)=>typeof $==="function","isFunction"),eL=w0(($)=>aL($)?async()=>await $():q0.fromStatic($),"fromStatic"),$Z=w0(({environmentVariableSelector:$,configFileSelector:U,default:w},G={})=>q0.memoize(q0.chain(iL($),tL(U,G),eL(w))),"loadConfig")});var Tw=Q((Bw)=>{Object.defineProperty(Bw,"__esModule",{value:!0});Bw.getEndpointUrlConfig=void 0;var Aw=g1(),Kw="AWS_ENDPOINT_URL",qw="endpoint_url",UZ=($)=>({environmentVariableSelector:(U)=>{const w=$.split(" ").map((M)=>M.toUpperCase()),G=U[[Kw,...w].join("_")];if(G)return G;const W=U[Kw];if(W)return W;return},configFileSelector:(U,w)=>{if(w&&U.services){const W=w[["services",U.services].join(Aw.CONFIG_PREFIX_SEPARATOR)];if(W){const M=$.split(" ").map((L)=>L.toLowerCase()),X=W[[M.join("_"),qw].join(Aw.CONFIG_PREFIX_SEPARATOR)];if(X)return X}}const G=U[qw];if(G)return G;return},default:void 0});Bw.getEndpointUrlConfig=UZ});var n1=Q((Hw)=>{Object.defineProperty(Hw,"__esModule",{value:!0});Hw.getEndpointFromConfig=void 0;var wZ=Jw(),GZ=Tw(),WZ=async($)=>wZ.loadConfig(GZ.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();Hw.getEndpointFromConfig=WZ});var r1=Q((pI,bw)=>{var kw=function($,U,w){return{applyToStack:(G)=>{G.add(Nw($,w),Sw),G.add(Pw($,U),jw)}}},s0=Object.defineProperty,MZ=Object.getOwnPropertyDescriptor,XZ=Object.getOwnPropertyNames,LZ=Object.prototype.hasOwnProperty,l1=($,U)=>s0($,"name",{value:U,configurable:!0}),ZZ=($,U)=>{for(var w in U)s0($,w,{get:U[w],enumerable:!0})},fZ=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of XZ(U))if(!LZ.call($,W)&&W!==w)s0($,W,{get:()=>U[W],enumerable:!(G=MZ(U,W))||G.enumerable})}return $},IZ=($)=>fZ(s0({},"__esModule",{value:!0}),$),Cw={};ZZ(Cw,{deserializerMiddleware:()=>Nw,deserializerMiddlewareOption:()=>Sw,getSerdePlugin:()=>kw,serializerMiddleware:()=>Pw,serializerMiddlewareOption:()=>jw});bw.exports=IZ(Cw);var Nw=l1(($,U)=>(w)=>async(G)=>{const{response:W}=await w(G);try{const M=await U(W,$);return{response:W,output:M}}catch(M){if(Object.defineProperty(M,"$response",{value:W}),!("$metadata"in M)){if(M.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof M.$responseBodyText!=="undefined"){if(M.$response)M.$response.body=M.$responseBodyText}}throw M}},"deserializerMiddleware"),Pw=l1(($,U)=>(w,G)=>async(W)=>{var M;const X=((M=G.endpointV2)==null?void 0:M.url)&&$.urlParser?async()=>$.urlParser(G.endpointV2.url):$.endpoint;if(!X)throw new Error("No valid endpoint provider available.");const L=await U(W.input,{...$,endpoint:X});return w({...W,request:L})},"serializerMiddleware"),Sw={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},jw={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};l1(kw,"getSerdePlugin")});var dw=Q((gI,yw)=>{var{defineProperty:n0,getOwnPropertyDescriptor:RZ,getOwnPropertyNames:EZ}=Object,YZ=Object.prototype.hasOwnProperty,D=($,U)=>n0($,"name",{value:U,configurable:!0}),zZ=($,U)=>{for(var w in U)n0($,w,{get:U[w],enumerable:!0})},QZ=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of EZ(U))if(!YZ.call($,W)&&W!==w)n0($,W,{get:()=>U[W],enumerable:!(G=RZ(U,W))||G.enumerable})}return $},FZ=($)=>QZ(n0({},"__esModule",{value:!0}),$),_w={};zZ(_w,{endpointMiddleware:()=>vw,endpointMiddlewareOptions:()=>uw,getEndpointFromInstructions:()=>cw,getEndpointPlugin:()=>CZ,resolveEndpointConfig:()=>PZ,resolveParams:()=>xw,toEndpointV1:()=>o1});yw.exports=FZ(_w);var JZ=D(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(OZ(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!BZ(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),AZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,KZ=/(\d+\.){3}\d+/,qZ=/\.\./,BZ=D(($)=>AZ.test($)&&!KZ.test($)&&!qZ.test($),"isDnsCompatibleBucketName"),OZ=D(($)=>{const[U,w,G,,,W]=$.split(":"),M=U==="arn"&&$.split(":").length>=6,X=Boolean(M&&w&&G&&W);if(M&&!X)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return X},"isArnBucketName"),TZ=D(($,U,w)=>{const G=D(async()=>{const W=w[$]??w[U];if(typeof W==="function")return W();return W},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const W=typeof w.credentials==="function"?await w.credentials():w.credentials;return(W==null?void 0:W.credentialScope)??(W==null?void 0:W.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const W=typeof w.credentials==="function"?await w.credentials():w.credentials;return(W==null?void 0:W.accountId)??(W==null?void 0:W.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const W=await G();if(W&&typeof W==="object"){if("url"in W)return W.url.href;if("hostname"in W){const{protocol:M,hostname:X,port:L,path:Z}=W;return`${M}//${X}${L?":"+L:""}${Z}`}}return W};return G},"createConfigValueProvider"),HZ=n1(),hw=Dw(),o1=D(($)=>{if(typeof $==="object"){if("url"in $)return hw.parseUrl($.url);return $}return hw.parseUrl($)},"toEndpointV1"),cw=D(async($,U,w,G)=>{if(!w.endpoint){let X;if(w.serviceConfiguredEndpoint)X=await w.serviceConfiguredEndpoint();else X=await HZ.getEndpointFromConfig(w.serviceId);if(X)w.endpoint=()=>Promise.resolve(o1(X))}const W=await xw($,U,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider(W,G)},"getEndpointFromInstructions"),xw=D(async($,U,w)=>{var G;const W={},M=((G=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:G.call(U))||{};for(let[X,L]of Object.entries(M))switch(L.type){case"staticContextParams":W[X]=L.value;break;case"contextParams":W[X]=$[L.name];break;case"clientContextParams":case"builtInParams":W[X]=await TZ(L.name,X,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(M).length===0)Object.assign(W,w);if(String(w.serviceId).toLowerCase()==="s3")await JZ(W);return W},"resolveParams"),m0=J0(),vw=D(({config:$,instructions:U})=>{return(w,G)=>async(W)=>{var M,X,L;const Z=await cw(W.input,{getEndpointParameterInstructions(){return U}},{...$},G);G.endpointV2=Z,G.authSchemes=(M=Z.properties)==null?void 0:M.authSchemes;const f=(X=G.authSchemes)==null?void 0:X[0];if(f){G.signing_region=f.signingRegion,G.signing_service=f.signingName;const I=m0.getSmithyContext(G),R=(L=I==null?void 0:I.selectedHttpAuthScheme)==null?void 0:L.httpAuthOption;if(R)R.signingProperties=Object.assign(R.signingProperties||{},{signing_region:f.signingRegion,signingRegion:f.signingRegion,signing_service:f.signingName,signingName:f.signingName,signingRegionSet:f.signingRegionSet},f.properties)}return w({...W})}},"endpointMiddleware"),VZ=r1(),uw={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:VZ.serializerMiddlewareOption.name},CZ=D(($,U)=>({applyToStack:(w)=>{w.addRelativeTo(vw({config:$,instructions:U}),uw)}}),"getEndpointPlugin"),NZ=n1(),PZ=D(($)=>{const U=$.tls??!0,{endpoint:w}=$,G=w!=null?async()=>o1(await m0.normalizeProvider(w)()):void 0,M={...$,endpoint:G,tls:U,isCustomEndpoint:!!w,useDualstackEndpoint:m0.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:m0.normalizeProvider($.useFipsEndpoint??!1)};let X=void 0;return M.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!X)X=NZ.getEndpointFromConfig($.serviceId);return X},M},"resolveEndpointConfig")});var r=Q((sI,mw)=>{var{defineProperty:l0,getOwnPropertyDescriptor:SZ,getOwnPropertyNames:jZ}=Object,kZ=Object.prototype.hasOwnProperty,G0=($,U)=>l0($,"name",{value:U,configurable:!0}),bZ=($,U)=>{for(var w in U)l0($,w,{get:U[w],enumerable:!0})},hZ=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of jZ(U))if(!kZ.call($,W)&&W!==w)l0($,W,{get:()=>U[W],enumerable:!(G=SZ(U,W))||G.enumerable})}return $},DZ=($)=>hZ(l0({},"__esModule",{value:!0}),$),pw={};bZ(pw,{isClockSkewCorrectedError:()=>gw,isClockSkewError:()=>dZ,isRetryableByTrait:()=>yZ,isServerError:()=>gZ,isThrottlingError:()=>pZ,isTransientError:()=>sw});mw.exports=DZ(pw);var _Z=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],cZ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],xZ=["TimeoutError","RequestTimeout","RequestTimeoutException"],vZ=[500,502,503,504],uZ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],yZ=G0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),dZ=G0(($)=>_Z.includes($.name),"isClockSkewError"),gw=G0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),pZ=G0(($)=>{var U,w;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||cZ.includes($.name)||((w=$.$retryable)==null?void 0:w.throttling)==!0},"isThrottlingError"),sw=G0(($)=>{var U;return gw($)||xZ.includes($.name)||uZ.includes(($==null?void 0:$.code)||"")||vZ.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),gZ=G0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const w=$.$metadata.httpStatusCode;if(500<=w&&w<=599&&!sw($))return!0;return!1}return!1},"isServerError")});var MG=Q((mI,WG)=>{var{defineProperty:r0,getOwnPropertyDescriptor:sZ,getOwnPropertyNames:mZ}=Object,nZ=Object.prototype.hasOwnProperty,_=($,U)=>r0($,"name",{value:U,configurable:!0}),lZ=($,U)=>{for(var w in U)r0($,w,{get:U[w],enumerable:!0})},rZ=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of mZ(U))if(!nZ.call($,W)&&W!==w)r0($,W,{get:()=>U[W],enumerable:!(G=sZ(U,W))||G.enumerable})}return $},oZ=($)=>rZ(r0({},"__esModule",{value:!0}),$),lw={};lZ(lw,{AdaptiveRetryStrategy:()=>U9,ConfiguredRetryStrategy:()=>w9,DEFAULT_MAX_ATTEMPTS:()=>i1,DEFAULT_RETRY_DELAY_BASE:()=>B0,DEFAULT_RETRY_MODE:()=>iZ,DefaultRateLimiter:()=>iw,INITIAL_RETRY_TOKENS:()=>t1,INVOCATION_ID_HEADER:()=>aZ,MAXIMUM_RETRY_DELAY:()=>a1,NO_RETRY_INCREMENT:()=>$G,REQUEST_HEADER:()=>eZ,RETRY_COST:()=>aw,RETRY_MODES:()=>rw,StandardRetryStrategy:()=>e1,THROTTLING_RETRY_DELAY_BASE:()=>tw,TIMEOUT_RETRY_COST:()=>ew});WG.exports=oZ(lw);var rw=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(rw||{}),i1=3,iZ="standard",tZ=r(),ow=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 w=this.getCurrentTimeInSeconds();this.lastThrottleTime=w,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 w=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,w))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const w=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=U}updateClientSendingRate(U){let w;if(this.updateMeasuredRate(),tZ.isThrottlingError(U)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(G)}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(),w=Math.floor(U*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){const G=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(U){return parseFloat(U.toFixed(8))}};_(ow,"DefaultRateLimiter");var iw=ow,B0=100,a1=20000,tw=500,t1=500,aw=5,ew=10,$G=1,aZ="amz-sdk-invocation-id",eZ="amz-sdk-request",$9=_(()=>{let $=B0;return{computeNextBackoffDelay:_((G)=>{return Math.floor(Math.min(a1,Math.random()*2**G*$))},"computeNextBackoffDelay"),setDelayBase:_((G)=>{$=G},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),nw=_(({retryDelay:$,retryCount:U,retryCost:w})=>{return{getRetryCount:_(()=>U,"getRetryCount"),getRetryDelay:_(()=>Math.min(a1,$),"getRetryDelay"),getRetryCost:_(()=>w,"getRetryCost")}},"createDefaultRetryToken"),UG=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=t1,this.retryBackoffStrategy=$9(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return nw({retryDelay:B0,retryCount:0})}async refreshRetryTokenForRetry(U,w){const G=await this.getMaxAttempts();if(this.shouldRetry(U,w,G)){const W=w.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?tw:B0);const M=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),X=w.retryAfterHint?Math.max(w.retryAfterHint.getTime()-Date.now()||0,M):M,L=this.getCapacityCost(W);return this.capacity-=L,nw({retryDelay:X,retryCount:U.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(t1,this.capacity+(U.getRetryCost()??$G))}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 ${i1}`),i1}}shouldRetry(U,w,G){return U.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(w.errorType)&&this.isRetryableError(w.errorType)}getCapacityCost(U){return U==="TRANSIENT"?ew:aw}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};_(UG,"StandardRetryStrategy");var e1=UG,wG=class ${constructor(U,w){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:G}=w??{};this.rateLimiter=G??new iw,this.standardRetryStrategy=new e1(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,w){return this.rateLimiter.updateClientSendingRate(w),this.standardRetryStrategy.refreshRetryTokenForRetry(U,w)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};_(wG,"AdaptiveRetryStrategy");var U9=wG,GG=class $ extends e1{constructor(U,w=B0){super(typeof U==="function"?U:async()=>U);if(typeof w==="number")this.computeNextBackoffDelay=()=>w;else this.computeNextBackoffDelay=w}async refreshRetryTokenForRetry(U,w){const G=await super.refreshRetryTokenForRetry(U,w);return G.getRetryDelay=()=>this.computeNextBackoffDelay(G.getRetryCount()),G}};_(GG,"ConfiguredRetryStrategy");var w9=GG});var L0=Q((nI,PG)=>{var KG=function($){const U=$.getUTCFullYear(),w=$.getUTCMonth(),G=$.getUTCDay(),W=$.getUTCDate(),M=$.getUTCHours(),X=$.getUTCMinutes(),L=$.getUTCSeconds(),Z=W<10?`0${W}`:`${W}`,f=M<10?`0${M}`:`${M}`,I=X<10?`0${X}`:`${X}`,R=L<10?`0${L}`:`${L}`;return`${b9[G]}, ${Z} ${I$[w]} ${U} ${f}:${I}:${R} GMT`},t0=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},R$=function($,U,w){let G,W,M;if(typeof U==="undefined"&&typeof w==="undefined")G={},M=$;else if(G=$,typeof U==="function")return W=U,M=w,R4(G,W,M);else M=U;for(let X of Object.keys(M)){if(!Array.isArray(M[X])){G[X]=M[X];continue}CG(G,null,M,X)}return G},NG=function($,U,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");const G=$.split(U);if(w===1)return G;const W=[];let M="";for(let X=0;X<G.length;X++){if(M==="")M=G[X];else M+=U+G[X];if((X+1)%w===0)W.push(M),M=""}if(M!=="")W.push(M);return W},a0=Object.defineProperty,M9=Object.getOwnPropertyDescriptor,X9=Object.getOwnPropertyNames,L9=Object.prototype.hasOwnProperty,E=($,U)=>a0($,"name",{value:U,configurable:!0}),Z9=($,U)=>{for(var w in U)a0($,w,{get:U[w],enumerable:!0})},f9=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of X9(U))if(!L9.call($,W)&&W!==w)a0($,W,{get:()=>U[W],enumerable:!(G=M9(U,W))||G.enumerable})}return $},I9=($)=>f9(a0({},"__esModule",{value:!0}),$),LG={};Z9(LG,{Client:()=>E9,Command:()=>EG,LazyJsonString:()=>Z4,NoOpLogger:()=>R9,SENSITIVE_STRING:()=>Q9,ServiceException:()=>i9,StringWrapper:()=>C0,_json:()=>X$,collectBody:()=>Y9,convertMap:()=>f4,createAggregatedClient:()=>F9,dateToUtcString:()=>KG,decorateServiceException:()=>BG,emitWarningIfUnsupportedVersion:()=>$4,expectBoolean:()=>A9,expectByte:()=>M$,expectFloat32:()=>o0,expectInt:()=>q9,expectInt32:()=>G$,expectLong:()=>H0,expectNonNull:()=>O9,expectNumber:()=>T0,expectObject:()=>zG,expectShort:()=>W$,expectString:()=>T9,expectUnion:()=>H9,extendedEncodeURIComponent:()=>t0,getArrayIfSingleItem:()=>L4,getDefaultClientConfiguration:()=>M4,getDefaultExtensionConfiguration:()=>TG,getValueFromTextNode:()=>HG,handleFloat:()=>N9,limitedParseDouble:()=>f$,limitedParseFloat:()=>P9,limitedParseFloat32:()=>S9,loadConfigsForDefaultMode:()=>e9,logger:()=>V0,map:()=>R$,parseBoolean:()=>J9,parseEpochTimestamp:()=>d9,parseRfc3339DateTime:()=>D9,parseRfc3339DateTimeWithOffset:()=>c9,parseRfc7231DateTime:()=>y9,resolveDefaultRuntimeConfig:()=>X4,resolvedPath:()=>z4,serializeDateTime:()=>F4,serializeFloat:()=>Q4,splitEvery:()=>NG,strictParseByte:()=>AG,strictParseDouble:()=>Z$,strictParseFloat:()=>V9,strictParseFloat32:()=>QG,strictParseInt:()=>j9,strictParseInt32:()=>k9,strictParseLong:()=>JG,strictParseShort:()=>W0,take:()=>I4,throwDefaultError:()=>OG,withBaseException:()=>t9});PG.exports=I9(LG);var ZG=class ${trace(){}debug(){}info(){}warn(){}error(){}};E(ZG,"NoOpLogger");var R9=ZG,fG=G9(),IG=class ${constructor(U){this.config=U,this.middlewareStack=fG.constructStack()}send(U,w,G){const W=typeof w!=="function"?w:void 0,M=typeof w==="function"?w:G,X=W===void 0&&this.config.cacheMiddleware===!0;let L;if(X){if(!this.handlers)this.handlers=new WeakMap;const Z=this.handlers;if(Z.has(U.constructor))L=Z.get(U.constructor);else L=U.resolveMiddleware(this.middlewareStack,this.config,W),Z.set(U.constructor,L)}else delete this.handlers,L=U.resolveMiddleware(this.middlewareStack,this.config,W);if(M)L(U).then((Z)=>M(null,Z.output),(Z)=>M(Z)).catch(()=>{});else return L(U).then((Z)=>Z.output)}destroy(){var U,w,G;(G=(w=(U=this.config)==null?void 0:U.requestHandler)==null?void 0:w.destroy)==null||G.call(w),delete this.handlers}};E(IG,"Client");var E9=IG,$$=W9(),Y9=E(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return $$.Uint8ArrayBlobAdapter.mutate($);if(!$)return $$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const w=U.streamCollector($);return $$.Uint8ArrayBlobAdapter.mutate(await w)},"collectBody"),w$=$0(),RG=class ${constructor(){this.middlewareStack=fG.constructStack()}static classBuilder(){return new z9}resolveMiddlewareWithContext(U,w,G,{middlewareFn:W,clientName:M,commandName:X,inputFilterSensitiveLog:L,outputFilterSensitiveLog:Z,smithyContext:f,additionalContext:I,CommandCtor:R}){for(let O of W.bind(this)(R,U,w,G))this.middlewareStack.use(O);const Y=U.concat(this.middlewareStack),{logger:z}=w,F={logger:z,clientName:M,commandName:X,inputFilterSensitiveLog:L,outputFilterSensitiveLog:Z,[w$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...f},...I},{requestHandler:J}=w;return Y.resolve((O)=>J.handle(O.request,G||{}),F)}};E(RG,"Command");var EG=RG,YG=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,w,G={}){return this._smithyContext={service:U,operation:w,...G},this}c(U={}){return this._additionalContext=U,this}n(U,w){return this._clientName=U,this._commandName=w,this}f(U=(G)=>G,w=(G)=>G){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=w,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const w=this;let G;return G=(U=class extends EG{constructor(...[W]){super();this.serialize=w._serializer,this.deserialize=w._deserializer,this.input=W??{},w._init(this)}static getEndpointParameterInstructions(){return w._ep}resolveMiddleware(W,M,X){return this.resolveMiddlewareWithContext(W,M,X,{CommandCtor:G,middlewareFn:w._middlewareFn,clientName:w._clientName,commandName:w._commandName,inputFilterSensitiveLog:w._inputFilterSensitiveLog,outputFilterSensitiveLog:w._outputFilterSensitiveLog,smithyContext:w._smithyContext,additionalContext:w._additionalContext})}},E(U,"CommandRef"),U)}};E(YG,"ClassBuilder");var z9=YG,Q9="***SensitiveInformation***",F9=E(($,U)=>{for(let w of Object.keys($)){const G=$[w],W=E(async function(X,L,Z){const f=new G(X);if(typeof L==="function")this.send(f,L);else if(typeof Z==="function"){if(typeof L!=="object")throw new Error(`Expected http options but got ${typeof L}`);this.send(f,L||{},Z)}else return this.send(f,L)},"methodImpl"),M=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");U.prototype[M]=W}},"createAggregatedClient"),J9=E(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),A9=E(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)V0.warn(i0(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")V0.warn(i0(`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"),T0=E(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))V0.warn(i0(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),K9=Math.ceil(340282346638528860000000000000000000000),o0=E(($)=>{const U=T0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>K9)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),H0=E(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),q9=H0,G$=E(($)=>L$($,32),"expectInt32"),W$=E(($)=>L$($,16),"expectShort"),M$=E(($)=>L$($,8),"expectByte"),L$=E(($,U)=>{const w=H0($);if(w!==void 0&&B9(w,U)!==w)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return w},"expectSizedInt"),B9=E(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),O9=E(($,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"),zG=E(($)=>{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"),T9=E(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return V0.warn(i0(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),H9=E(($)=>{if($===null||$===void 0)return;const U=zG($),w=Object.entries(U).filter(([,G])=>G!=null).map(([G])=>G);if(w.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(w.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${w} were not null.`);return U},"expectUnion"),Z$=E(($)=>{if(typeof $=="string")return T0(X0($));return T0($)},"strictParseDouble"),V9=Z$,QG=E(($)=>{if(typeof $=="string")return o0(X0($));return o0($)},"strictParseFloat32"),C9=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,X0=E(($)=>{const U=$.match(C9);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),f$=E(($)=>{if(typeof $=="string")return FG($);return T0($)},"limitedParseDouble"),N9=f$,P9=f$,S9=E(($)=>{if(typeof $=="string")return FG($);return o0($)},"limitedParseFloat32"),FG=E(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),JG=E(($)=>{if(typeof $==="string")return H0(X0($));return H0($)},"strictParseLong"),j9=JG,k9=E(($)=>{if(typeof $==="string")return G$(X0($));return G$($)},"strictParseInt32"),W0=E(($)=>{if(typeof $==="string")return W$(X0($));return W$($)},"strictParseShort"),AG=E(($)=>{if(typeof $==="string")return M$(X0($));return M$($)},"strictParseByte"),i0=E(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),V0={warn:console.warn},b9=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],I$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];E(KG,"dateToUtcString");var h9=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),D9=E(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=h9.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[w,G,W,M,X,L,Z,f]=U,I=W0(M0(G)),R=v(W,"month",1,12),Y=v(M,"day",1,31);return O0(I,R,Y,{hours:X,minutes:L,seconds:Z,fractionalMilliseconds:f})},"parseRfc3339DateTime"),_9=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),c9=E(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=_9.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[w,G,W,M,X,L,Z,f,I]=U,R=W0(M0(G)),Y=v(W,"month",1,12),z=v(M,"day",1,31),F=O0(R,Y,z,{hours:X,minutes:L,seconds:Z,fractionalMilliseconds:f});if(I.toUpperCase()!="Z")F.setTime(F.getTime()-o9(I));return F},"parseRfc3339DateTimeWithOffset"),x9=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$/),v9=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$/),u9=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})$/),y9=E(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=x9.exec($);if(U){const[w,G,W,M,X,L,Z,f]=U;return O0(W0(M0(M)),U$(W),v(G,"day",1,31),{hours:X,minutes:L,seconds:Z,fractionalMilliseconds:f})}if(U=v9.exec($),U){const[w,G,W,M,X,L,Z,f]=U;return s9(O0(p9(M),U$(W),v(G,"day",1,31),{hours:X,minutes:L,seconds:Z,fractionalMilliseconds:f}))}if(U=u9.exec($),U){const[w,G,W,M,X,L,Z,f]=U;return O0(W0(M0(f)),U$(G),v(W.trimLeft(),"day",1,31),{hours:M,minutes:X,seconds:L,fractionalMilliseconds:Z})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),d9=E(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=Z$($);else if(typeof $==="object"&&$.tag===1)U=$.value;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"),O0=E(($,U,w,G)=>{const W=U-1;return n9($,W,w),new Date(Date.UTC($,W,w,v(G.hours,"hour",0,23),v(G.minutes,"minute",0,59),v(G.seconds,"seconds",0,60),r9(G.fractionalMilliseconds)))},"buildDate"),p9=E(($)=>{const U=(new Date()).getUTCFullYear(),w=Math.floor(U/100)*100+W0(M0($));if(w<U)return w+100;return w},"parseTwoDigitYear"),g9=1576800000000,s9=E(($)=>{if($.getTime()-(new Date()).getTime()>g9)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),U$=E(($)=>{const U=I$.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),m9=[31,28,31,30,31,30,31,31,30,31,30,31],n9=E(($,U,w)=>{let G=m9[U];if(U===1&&l9($))G=29;if(w>G)throw new TypeError(`Invalid day for ${I$[U]} in ${$}: ${w}`)},"validateDayOfMonth"),l9=E(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),v=E(($,U,w,G)=>{const W=AG(M0($));if(W<w||W>G)throw new TypeError(`${U} must be between ${w} and ${G}, inclusive`);return W},"parseDateValue"),r9=E(($)=>{if($===null||$===void 0)return 0;return QG("0."+$)*1000},"parseMilliseconds"),o9=E(($)=>{const U=$[0];let w=1;if(U=="+")w=1;else if(U=="-")w=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const G=Number($.substring(1,3)),W=Number($.substring(4,6));return w*(G*60+W)*60*1000},"parseOffsetToMilliseconds"),M0=E(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),qG=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};E(qG,"ServiceException");var i9=qG,BG=E(($,U={})=>{Object.entries(U).filter(([,G])=>G!==void 0).forEach(([G,W])=>{if($[G]==null||$[G]==="")$[G]=W});const w=$.message||$.Message||"UnknownError";return $.message=w,delete $.Message,$},"decorateServiceException"),OG=E(({output:$,parsedBody:U,exceptionCtor:w,errorCode:G})=>{const W=a9($),M=W.httpStatusCode?W.httpStatusCode+"":void 0,X=new w({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||G||M||"UnknownError",$fault:"client",$metadata:W});throw BG(X,U)},"throwDefaultError"),t9=E(($)=>{return({output:U,parsedBody:w,errorCode:G})=>{OG({output:U,parsedBody:w,exceptionCtor:$,errorCode:G})}},"withBaseException"),a9=E(($)=>({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"),e9=E(($)=>{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"),XG=!1,$4=E(($)=>{if($&&!XG&&parseInt($.substring(1,$.indexOf(".")))<16)XG=!0},"emitWarningIfUnsupportedVersion"),U4=E(($)=>{const U=[];for(let w in w$.AlgorithmId){const G=w$.AlgorithmId[w];if($[G]===void 0)continue;U.push({algorithmId:()=>G,checksumConstructor:()=>$[G]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),w4=E(($)=>{const U={};return $.checksumAlgorithms().forEach((w)=>{U[w.algorithmId()]=w.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),G4=E(($)=>{let U=$.retryStrategy;return{setRetryStrategy(w){U=w},retryStrategy(){return U}}},"getRetryConfiguration"),W4=E(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),TG=E(($)=>{return{...U4($),...G4($)}},"getDefaultExtensionConfiguration"),M4=TG,X4=E(($)=>{return{...w4($),...W4($)}},"resolveDefaultRuntimeConfig");E(t0,"extendedEncodeURIComponent");var L4=E(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),HG=E(($)=>{for(let w in $)if($.hasOwnProperty(w)&&$[w]["#text"]!==void 0)$[w]=$[w]["#text"];else if(typeof $[w]==="object"&&$[w]!==null)$[w]=HG($[w]);return $},"getValueFromTextNode"),C0=E(function(){const $=Object.getPrototypeOf(this).constructor,w=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(w,$.prototype),w},"StringWrapper");C0.prototype=Object.create(String.prototype,{constructor:{value:C0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(C0,String);var VG=class $ extends C0{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))}};E(VG,"LazyJsonString");var Z4=VG;E(R$,"map");var f4=E(($)=>{const U={};for(let[w,G]of Object.entries($||{}))U[w]=[,G];return U},"convertMap"),I4=E(($,U)=>{const w={};for(let G in U)CG(w,$,U,G);return w},"take"),R4=E(($,U,w)=>{return R$($,Object.entries(w).reduce((G,[W,M])=>{if(Array.isArray(M))G[W]=M;else if(typeof M==="function")G[W]=[U,M()];else G[W]=[U,M];return G},{}))},"mapWithFilter"),CG=E(($,U,w,G)=>{if(U!==null){let X=w[G];if(typeof X==="function")X=[,X];const[L=E4,Z=Y4,f=G]=X;if(typeof L==="function"&&L(U[f])||typeof L!=="function"&&!!L)$[G]=Z(U[f]);return}let[W,M]=w[G];if(typeof M==="function"){let X;const L=W===void 0&&(X=M())!=null,Z=typeof W==="function"&&!!W(void 0)||typeof W!=="function"&&!!W;if(L)$[G]=X;else if(Z)$[G]=M()}else{const X=W===void 0&&M!=null,L=typeof W==="function"&&!!W(M)||typeof W!=="function"&&!!W;if(X||L)$[G]=M}},"applyInstruction"),E4=E(($)=>$!=null,"nonNullish"),Y4=E(($)=>$,"pass"),z4=E(($,U,w,G,W,M)=>{if(U!=null&&U[w]!==void 0){const X=G();if(X.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");$=$.replace(W,M?X.split("/").map((L)=>t0(L)).join("/"):t0(X))}else throw new Error("No value provided for input HTTP label: "+w+".");return $},"resolvedPath"),Q4=E(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),F4=E(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),X$=E(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(X$);if(typeof $==="object"){const U={};for(let w of Object.keys($)){if($[w]==null)continue;U[w]=X$($[w])}return U}return $},"_json");E(NG,"splitEvery")});var kG=Q((SG)=>{Object.defineProperty(SG,"__esModule",{value:!0});SG.isStreamingPayload=void 0;var J4=import.meta.require("stream"),A4=($)=>($===null||$===void 0?void 0:$.body)instanceof J4.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;SG.isStreamingPayload=A4});var oG=Q((oI,rG)=>{var{defineProperty:e0,getOwnPropertyDescriptor:K4,getOwnPropertyNames:q4}=Object,B4=Object.prototype.hasOwnProperty,T=($,U)=>e0($,"name",{value:U,configurable:!0}),O4=($,U)=>{for(var w in U)e0($,w,{get:U[w],enumerable:!0})},T4=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of q4(U))if(!B4.call($,W)&&W!==w)e0($,W,{get:()=>U[W],enumerable:!(G=K4(U,W))||G.enumerable})}return $},H4=($)=>T4(e0({},"__esModule",{value:!0}),$),hG={};O4(hG,{AdaptiveRetryStrategy:()=>N4,CONFIG_MAX_ATTEMPTS:()=>Y$,CONFIG_RETRY_MODE:()=>pG,ENV_MAX_ATTEMPTS:()=>E$,ENV_RETRY_MODE:()=>dG,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>P4,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>j4,StandardRetryStrategy:()=>uG,defaultDelayDecider:()=>_G,defaultRetryDecider:()=>cG,getOmitRetryHeadersPlugin:()=>k4,getRetryAfterHint:()=>lG,getRetryPlugin:()=>x4,omitRetryHeadersMiddleware:()=>gG,omitRetryHeadersMiddlewareOptions:()=>sG,resolveRetryConfig:()=>S4,retryMiddleware:()=>mG,retryMiddlewareOptions:()=>nG});rG.exports=H4(hG);var Z0=f0(),DG=_1(),q=MG(),V4=T(($,U)=>{const w=$,G=(U==null?void 0:U.noRetryIncrement)??q.NO_RETRY_INCREMENT,W=(U==null?void 0:U.retryCost)??q.RETRY_COST,M=(U==null?void 0:U.timeoutRetryCost)??q.TIMEOUT_RETRY_COST;let X=$;const L=T((R)=>R.name==="TimeoutError"?M:W,"getCapacityAmount"),Z=T((R)=>L(R)<=X,"hasRetryTokens");return Object.freeze({hasRetryTokens:Z,retrieveRetryTokens:T((R)=>{if(!Z(R))throw new Error("No retry token available");const Y=L(R);return X-=Y,Y},"retrieveRetryTokens"),releaseRetryTokens:T((R)=>{X+=R??G,X=Math.min(X,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),_G=T(($,U)=>Math.floor(Math.min(q.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),p=r(),cG=T(($)=>{if(!$)return!1;return p.isRetryableByTrait($)||p.isClockSkewError($)||p.isThrottlingError($)||p.isTransientError($)},"defaultRetryDecider"),xG=T(($)=>{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"),vG=class ${constructor(U,w){this.maxAttemptsProvider=U,this.mode=q.RETRY_MODES.STANDARD,this.retryDecider=(w==null?void 0:w.retryDecider)??cG,this.delayDecider=(w==null?void 0:w.delayDecider)??_G,this.retryQuota=(w==null?void 0:w.retryQuota)??V4(q.INITIAL_RETRY_TOKENS)}shouldRetry(U,w,G){return w<G&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(w){U=q.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,w,G){let W,M=0,X=0;const L=await this.getMaxAttempts(),{request:Z}=w;if(Z0.HttpRequest.isInstance(Z))Z.headers[q.INVOCATION_ID_HEADER]=DG.v4();while(!0)try{if(Z0.HttpRequest.isInstance(Z))Z.headers[q.REQUEST_HEADER]=`attempt=${M+1}; max=${L}`;if(G==null?void 0:G.beforeRequest)await G.beforeRequest();const{response:f,output:I}=await U(w);if(G==null?void 0:G.afterRequest)G.afterRequest(f);return this.retryQuota.releaseRetryTokens(W),I.$metadata.attempts=M+1,I.$metadata.totalRetryDelay=X,{response:f,output:I}}catch(f){const I=xG(f);if(M++,this.shouldRetry(I,M,L)){W=this.retryQuota.retrieveRetryTokens(I);const R=this.delayDecider(p.isThrottlingError(I)?q.THROTTLING_RETRY_DELAY_BASE:q.DEFAULT_RETRY_DELAY_BASE,M),Y=C4(I.$response),z=Math.max(Y||0,R);X+=z,await new Promise((F)=>setTimeout(F,z));continue}if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=M,I.$metadata.totalRetryDelay=X,I}}};T(vG,"StandardRetryStrategy");var uG=vG,C4=T(($)=>{if(!Z0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((M)=>M.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],G=Number(w);if(!Number.isNaN(G))return G*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),yG=class $ extends uG{constructor(U,w){const{rateLimiter:G,...W}=w??{};super(U,W);this.rateLimiter=G??new q.DefaultRateLimiter,this.mode=q.RETRY_MODES.ADAPTIVE}async retry(U,w){return super.retry(U,w,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(G)=>{this.rateLimiter.updateClientSendingRate(G)}})}};T(yG,"AdaptiveRetryStrategy");var N4=yG,bG=J0(),E$="AWS_MAX_ATTEMPTS",Y$="max_attempts",P4={environmentVariableSelector:($)=>{const U=$[E$];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Environment variable ${E$} mast be a number, got "${U}"`);return w},configFileSelector:($)=>{const U=$[Y$];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Shared config file entry ${Y$} mast be a number, got "${U}"`);return w},default:q.DEFAULT_MAX_ATTEMPTS},S4=T(($)=>{const{retryStrategy:U}=$,w=bG.normalizeProvider($.maxAttempts??q.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:w,retryStrategy:async()=>{if(U)return U;if(await bG.normalizeProvider($.retryMode)()===q.RETRY_MODES.ADAPTIVE)return new q.AdaptiveRetryStrategy(w);return new q.StandardRetryStrategy(w)}}},"resolveRetryConfig"),dG="AWS_RETRY_MODE",pG="retry_mode",j4={environmentVariableSelector:($)=>$[dG],configFileSelector:($)=>$[pG],default:q.DEFAULT_RETRY_MODE},gG=T(()=>($)=>async(U)=>{const{request:w}=U;if(Z0.HttpRequest.isInstance(w))delete w.headers[q.INVOCATION_ID_HEADER],delete w.headers[q.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),sG={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},k4=T(($)=>({applyToStack:(U)=>{U.addRelativeTo(gG(),sG)}}),"getOmitRetryHeadersPlugin"),b4=L0(),h4=kG(),mG=T(($)=>(U,w)=>async(G)=>{var W;let M=await $.retryStrategy();const X=await $.maxAttempts();if(D4(M)){M=M;let L=await M.acquireInitialRetryToken(w.partition_id),Z=new Error,f=0,I=0;const{request:R}=G,Y=Z0.HttpRequest.isInstance(R);if(Y)R.headers[q.INVOCATION_ID_HEADER]=DG.v4();while(!0)try{if(Y)R.headers[q.REQUEST_HEADER]=`attempt=${f+1}; max=${X}`;const{response:z,output:F}=await U(G);return M.recordSuccess(L),F.$metadata.attempts=f+1,F.$metadata.totalRetryDelay=I,{response:z,output:F}}catch(z){const F=_4(z);if(Z=xG(z),Y&&h4.isStreamingPayload(R))throw(W=w.logger instanceof b4.NoOpLogger?console:w.logger)==null||W.warn("An error was encountered in a non-retryable streaming request."),Z;try{L=await M.refreshRetryTokenForRetry(L,F)}catch(O){if(!Z.$metadata)Z.$metadata={};throw Z.$metadata.attempts=f+1,Z.$metadata.totalRetryDelay=I,Z}f=L.getRetryCount();const J=L.getRetryDelay();I+=J,await new Promise((O)=>setTimeout(O,J))}}else{if(M=M,M==null?void 0:M.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",M.mode]];return M.retry(U,G)}},"retryMiddleware"),D4=T(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),_4=T(($)=>{const U={error:$,errorType:c4($)},w=lG($.$response);if(w)U.retryAfterHint=w;return U},"getRetryErrorInfo"),c4=T(($)=>{if(p.isThrottlingError($))return"THROTTLING";if(p.isTransientError($))return"TRANSIENT";if(p.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),nG={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},x4=T(($)=>({applyToStack:(U)=>{U.add(mG($),nG)}}),"getRetryPlugin"),lG=T(($)=>{if(!Z0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((M)=>M.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],G=Number(w);if(!Number.isNaN(G))return new Date(G*1000);return new Date(w)},"getRetryAfterHint")});var Q$=Q((iI,zW)=>{var aG=function($){const U=new Map;for(let w of $)U.set(w.schemeId,w);return U},IW=function($,U){return new EW($,U)},YW=function($,U,w,G,W){return K(async function*M(X,L,...Z){let f=X.startingToken||void 0,I=!0,R;while(I){if(L[w]=f,W)L[W]=L[W]??X.pageSize;if(X.client instanceof $)R=await L2(U,X.client,L,...Z);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield R;const Y=f;f=Z2(R,G),I=!!(f&&(!X.stopOnSameToken||f!==Y))}return},"paginateOperation")},U1=Object.defineProperty,v4=Object.getOwnPropertyDescriptor,u4=Object.getOwnPropertyNames,y4=Object.prototype.hasOwnProperty,K=($,U)=>U1($,"name",{value:U,configurable:!0}),d4=($,U)=>{for(var w in U)U1($,w,{get:U[w],enumerable:!0})},p4=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of u4(U))if(!y4.call($,W)&&W!==w)U1($,W,{get:()=>U[W],enumerable:!(G=v4(U,W))||G.enumerable})}return $},g4=($)=>p4(U1({},"__esModule",{value:!0}),$),iG={};d4(iG,{DefaultIdentityProviderConfig:()=>a4,EXPIRATION_MS:()=>ZW,HttpApiKeyAuthSigner:()=>e4,HttpBearerAuthSigner:()=>$2,NoAuthSigner:()=>U2,RequestBuilder:()=>EW,createIsIdentityExpiredFunction:()=>LW,createPaginator:()=>YW,doesIdentityRequireRefresh:()=>fW,getHttpAuthSchemeEndpointRuleSetPlugin:()=>m4,getHttpAuthSchemePlugin:()=>l4,getHttpSigningPlugin:()=>t4,getSmithyContext:()=>W2,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>eG,httpAuthSchemeMiddleware:()=>z$,httpAuthSchemeMiddlewareOptions:()=>$W,httpSigningMiddleware:()=>UW,httpSigningMiddlewareOptions:()=>wW,isIdentityExpired:()=>w2,memoizeIdentityProvider:()=>G2,normalizeProvider:()=>M2,requestBuilder:()=>IW});zW.exports=g4(iG);var tG=J0();K(aG,"convertHttpAuthSchemesToMap");var z$=K(($,U)=>(w,G)=>async(W)=>{var M;const X=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,G,W.input)),L=aG($.httpAuthSchemes),Z=tG.getSmithyContext(G),f=[];for(let I of X){const R=L.get(I.schemeId);if(!R){f.push(`HttpAuthScheme \`${I.schemeId}\` was not enabled for this service.`);continue}const Y=R.identityProvider(await U.identityProviderConfigProvider($));if(!Y){f.push(`HttpAuthScheme \`${I.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:z={},signingProperties:F={}}=((M=I.propertiesExtractor)==null?void 0:M.call(I,$,G))||{};I.identityProperties=Object.assign(I.identityProperties||{},z),I.signingProperties=Object.assign(I.signingProperties||{},F),Z.selectedHttpAuthScheme={httpAuthOption:I,identity:await Y(I.identityProperties),signer:R.signer};break}if(!Z.selectedHttpAuthScheme)throw new Error(f.join("\n"));return w(W)},"httpAuthSchemeMiddleware"),s4=dw(),eG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:s4.endpointMiddlewareOptions.name},m4=K(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w})=>({applyToStack:(G)=>{G.addRelativeTo(z$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w}),eG)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),n4=r1(),$W={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:n4.serializerMiddlewareOption.name},l4=K(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w})=>({applyToStack:(G)=>{G.addRelativeTo(z$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w}),$W)}}),"getHttpAuthSchemePlugin"),w1=f0(),r4=K(($)=>(U)=>{throw U},"defaultErrorHandler"),o4=K(($,U)=>{},"defaultSuccessHandler"),UW=K(($)=>(U,w)=>async(G)=>{if(!w1.HttpRequest.isInstance(G.request))return U(G);const M=tG.getSmithyContext(w).selectedHttpAuthScheme;if(!M)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:X={}},identity:L,signer:Z}=M,f=await U({...G,request:await Z.sign(G.request,L,X)}).catch((Z.errorHandler||r4)(X));return(Z.successHandler||o4)(f.response,X),f},"httpSigningMiddleware"),i4=oG(),wW={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:i4.retryMiddlewareOptions.name},t4=K(($)=>({applyToStack:(U)=>{U.addRelativeTo(UW($),wW)}}),"getHttpSigningPlugin"),GW=class ${constructor(U){this.authSchemes=new Map;for(let[w,G]of Object.entries(U))if(G!==void 0)this.authSchemes.set(w,G)}getIdentityProvider(U){return this.authSchemes.get(U)}};K(GW,"DefaultIdentityProviderConfig");var a4=GW,$1=$0(),WW=class ${async sign(U,w,G){if(!G)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!G.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!G.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!w.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const W=w1.HttpRequest.clone(U);if(G.in===$1.HttpApiKeyAuthLocation.QUERY)W.query[G.name]=w.apiKey;else if(G.in===$1.HttpApiKeyAuthLocation.HEADER)W.headers[G.name]=G.scheme?`${G.scheme} ${w.apiKey}`:w.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+G.in+"`");return W}};K(WW,"HttpApiKeyAuthSigner");var e4=WW,MW=class ${async sign(U,w,G){const W=w1.HttpRequest.clone(U);if(!w.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return W.headers.Authorization=`Bearer ${w.token}`,W}};K(MW,"HttpBearerAuthSigner");var $2=MW,XW=class ${async sign(U,w,G){return U}};K(XW,"NoAuthSigner");var U2=XW,LW=K(($)=>(U)=>fW(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),ZW=300000,w2=LW(ZW),fW=K(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),G2=K(($,U,w)=>{if($===void 0)return;const G=typeof $!=="function"?async()=>Promise.resolve($):$;let W,M,X,L=!1;const Z=K(async(f)=>{if(!M)M=G(f);try{W=await M,X=!0,L=!1}finally{M=void 0}return W},"coalesceProvider");if(U===void 0)return async(f)=>{if(!X||(f==null?void 0:f.forceRefresh))W=await Z(f);return W};return async(f)=>{if(!X||(f==null?void 0:f.forceRefresh))W=await Z(f);if(L)return W;if(!w(W))return L=!0,W;if(U(W))return await Z(f),W;return W}},"memoizeIdentityProvider"),W2=K(($)=>$[$1.SMITHY_CONTEXT_KEY]||($[$1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),M2=K(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),X2=L0();K(IW,"requestBuilder");var RW=class ${constructor(U,w){this.input=U,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:w="https",port:G,path:W}=await this.context.endpoint();this.path=W;for(let M of this.resolvePathStack)M(this.path);return new w1.HttpRequest({protocol:w,hostname:this.hostname||U,port:G,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((w)=>{this.path=`${(w==null?void 0:w.endsWith("/"))?w.slice(0,-1):w||""}`+U}),this}p(U,w,G,W){return this.resolvePathStack.push((M)=>{this.path=X2.resolvedPath(M,this.input,U,w,G,W)}),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}};K(RW,"RequestBuilder");var EW=RW,L2=K(async($,U,w,...G)=>{return await U.send(new $(w),...G)},"makePagedClientRequest");K(YW,"createPaginator");var Z2=K(($,U)=>{let w=$;const G=U.split(".");for(let W of G){if(!w||typeof w!=="object")return;w=w[W]}return w},"get")});var M8=Q((LF,W8)=>{var{defineProperty:K1,getOwnPropertyDescriptor:g2,getOwnPropertyNames:s2}=Object,m2=Object.prototype.hasOwnProperty,n2=($,U)=>K1($,"name",{value:U,configurable:!0}),l2=($,U)=>{for(var w in U)K1($,w,{get:U[w],enumerable:!0})},r2=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of s2(U))if(!m2.call($,W)&&W!==w)K1($,W,{get:()=>U[W],enumerable:!(G=g2(U,W))||G.enumerable})}return $},o2=($)=>r2(K1({},"__esModule",{value:!0}),$),G8={};l2(G8,{emitWarningIfUnsupportedVersion:()=>i2});W8.exports=o2(G8);var w8=!1,i2=n2(($)=>{if($&&!w8&&parseInt($.substring(1,$.indexOf(".")))<18)w8=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
2
+ no longer support Node.js 16.x on January 6, 2025.
3
+
4
+ To continue receiving updates to AWS services, bug fixes, and security
5
+ updates please upgrade to a supported Node.js LTS version.
6
+
7
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var V8=Q((ZF,H8)=>{var y$=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},V1=Object.defineProperty,$5=Object.getOwnPropertyDescriptor,U5=Object.getOwnPropertyNames,w5=Object.prototype.hasOwnProperty,H=($,U)=>V1($,"name",{value:U,configurable:!0}),G5=($,U)=>{for(var w in U)V1($,w,{get:U[w],enumerable:!0})},W5=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of U5(U))if(!w5.call($,W)&&W!==w)V1($,W,{get:()=>U[W],enumerable:!(G=$5(U,W))||G.enumerable})}return $},M5=($)=>W5(V1({},"__esModule",{value:!0}),$),I8={};G5(I8,{SignatureV4:()=>k5,clearCredentialCache:()=>O5,createScope:()=>O1,getCanonicalHeaders:()=>u$,getCanonicalQuery:()=>A8,getPayloadHash:()=>H1,getSigningKey:()=>J8,moveHeadersToQuery:()=>O8,prepareRequest:()=>d$});H8.exports=M5(I8);var X8=J0(),c$=k0(),X5="X-Amz-Algorithm",L5="X-Amz-Credential",R8="X-Amz-Date",Z5="X-Amz-SignedHeaders",f5="X-Amz-Expires",E8="X-Amz-Signature",Y8="X-Amz-Security-Token",z8="authorization",Q8=R8.toLowerCase(),I5="date",R5=[z8,Q8,I5],E5=E8.toLowerCase(),v$="x-amz-content-sha256",Y5=Y8.toLowerCase(),z5={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},Q5=/^proxy-/,F5=/^sec-/,x$="AWS4-HMAC-SHA256",J5="AWS4-HMAC-SHA256-PAYLOAD",A5="UNSIGNED-PAYLOAD",K5=50,F8="aws4_request",q5=604800,m=e2(),B5=k0(),z0={},B1=[],O1=H(($,U,w)=>`${$}/${U}/${w}/${F8}`,"createScope"),J8=H(async($,U,w,G,W)=>{const M=await L8($,U.secretAccessKey,U.accessKeyId),X=`${w}:${G}:${W}:${m.toHex(M)}:${U.sessionToken}`;if(X in z0)return z0[X];B1.push(X);while(B1.length>K5)delete z0[B1.shift()];let L=`AWS4${U.secretAccessKey}`;for(let Z of[w,G,W,F8])L=await L8($,L,Z);return z0[X]=L},"getSigningKey"),O5=H(()=>{B1.length=0,Object.keys(z0).forEach(($)=>{delete z0[$]})},"clearCredentialCache"),L8=H(($,U,w)=>{const G=new $(U);return G.update(B5.toUint8Array(w)),G.digest()},"hmac"),u$=H(({headers:$},U,w)=>{const G={};for(let W of Object.keys($).sort()){if($[W]==null)continue;const M=W.toLowerCase();if(M in z5||(U==null?void 0:U.has(M))||Q5.test(M)||F5.test(M)){if(!w||w&&!w.has(M))continue}G[M]=$[W].trim().replace(/\s+/g," ")}return G},"getCanonicalHeaders"),T1=a2(),A8=H(({query:$={}})=>{const U=[],w={};for(let G of Object.keys($)){if(G.toLowerCase()===E5)continue;const W=T1.escapeUri(G);U.push(W);const M=$[G];if(typeof M==="string")w[W]=`${W}=${T1.escapeUri(M)}`;else if(Array.isArray(M))w[W]=M.slice(0).reduce((X,L)=>X.concat([`${W}=${T1.escapeUri(L)}`]),[]).sort().join("&")}return U.sort().map((G)=>w[G]).filter((G)=>G).join("&")},"getCanonicalQuery"),T5=t2(),H5=k0(),H1=H(async({headers:$,body:U},w)=>{for(let G of Object.keys($))if(G.toLowerCase()===v$)return $[G];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||T5.isArrayBuffer(U)){const G=new w;return G.update(H5.toUint8Array(U)),m.toHex(await G.digest())}return A5},"getPayloadHash"),Z8=k0(),K8=class ${format(U){const w=[];for(let M of Object.keys(U)){const X=Z8.fromUtf8(M);w.push(Uint8Array.from([X.byteLength]),X,this.formatHeaderValue(U[M]))}const G=new Uint8Array(w.reduce((M,X)=>M+X.byteLength,0));let W=0;for(let M of w)G.set(M,W),W+=M.byteLength;return G}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 w=new DataView(new ArrayBuffer(3));return w.setUint8(0,3),w.setInt16(1,U.value,!1),new Uint8Array(w.buffer);case"integer":const G=new DataView(new ArrayBuffer(5));return G.setUint8(0,4),G.setInt32(1,U.value,!1),new Uint8Array(G.buffer);case"long":const W=new Uint8Array(9);return W[0]=5,W.set(U.value.bytes,1),W;case"binary":const M=new DataView(new ArrayBuffer(3+U.value.byteLength));M.setUint8(0,6),M.setUint16(1,U.value.byteLength,!1);const X=new Uint8Array(M.buffer);return X.set(U.value,3),X;case"string":const L=Z8.fromUtf8(U.value),Z=new DataView(new ArrayBuffer(3+L.byteLength));Z.setUint8(0,7),Z.setUint16(1,L.byteLength,!1);const f=new Uint8Array(Z.buffer);return f.set(L,3),f;case"timestamp":const I=new Uint8Array(9);return I[0]=8,I.set(N5.fromNumber(U.value.valueOf()).bytes,1),I;case"uuid":if(!C5.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const R=new Uint8Array(17);return R[0]=9,R.set(m.fromHex(U.value.replace(/\-/g,"")),1),R}}};H(K8,"HeaderFormatter");var V5=K8,C5=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,q8=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 w=new Uint8Array(8);for(let G=7,W=Math.abs(Math.round(U));G>-1&&W>0;G--,W/=256)w[G]=W;if(U<0)y$(w);return new $(w)}valueOf(){const U=this.bytes.slice(0),w=U[0]&128;if(w)y$(U);return parseInt(m.toHex(U),16)*(w?-1:1)}toString(){return String(this.valueOf())}};H(q8,"Int64");var N5=q8;H(y$,"negate");var P5=H(($,U)=>{$=$.toLowerCase();for(let w of Object.keys(U))if($===w.toLowerCase())return!0;return!1},"hasHeader"),B8=f0(),O8=H(($,U={})=>{var w;const{headers:G,query:W={}}=B8.HttpRequest.clone($);for(let M of Object.keys(G)){const X=M.toLowerCase();if(X.slice(0,6)==="x-amz-"&&!((w=U.unhoistableHeaders)==null?void 0:w.has(X)))W[M]=G[M],delete G[M]}return{...$,headers:G,query:W}},"moveHeadersToQuery"),d$=H(($)=>{$=B8.HttpRequest.clone($);for(let U of Object.keys($.headers))if(R5.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),S5=H(($)=>j5($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),j5=H(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),T8=class ${constructor({applyChecksum:U,credentials:w,region:G,service:W,sha256:M,uriEscapePath:X=!0}){this.headerFormatter=new V5,this.service=W,this.sha256=M,this.uriEscapePath=X,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=X8.normalizeProvider(G),this.credentialProvider=X8.normalizeProvider(w)}async presign(U,w={}){const{signingDate:G=new Date,expiresIn:W=3600,unsignableHeaders:M,unhoistableHeaders:X,signableHeaders:L,signingRegion:Z,signingService:f}=w,I=await this.credentialProvider();this.validateResolvedCredentials(I);const R=Z??await this.regionProvider(),{longDate:Y,shortDate:z}=q1(G);if(W>q5)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const F=O1(z,R,f??this.service),J=O8(d$(U),{unhoistableHeaders:X});if(I.sessionToken)J.query[Y8]=I.sessionToken;J.query[X5]=x$,J.query[L5]=`${I.accessKeyId}/${F}`,J.query[R8]=Y,J.query[f5]=W.toString(10);const O=u$(J,M,L);return J.query[Z5]=f8(O),J.query[E8]=await this.getSignature(Y,F,this.getSigningKey(I,R,z,f),this.createCanonicalRequest(J,O,await H1(U,this.sha256))),J}async sign(U,w){if(typeof U==="string")return this.signString(U,w);else if(U.headers&&U.payload)return this.signEvent(U,w);else if(U.message)return this.signMessage(U,w);else return this.signRequest(U,w)}async signEvent({headers:U,payload:w},{signingDate:G=new Date,priorSignature:W,signingRegion:M,signingService:X}){const L=M??await this.regionProvider(),{shortDate:Z,longDate:f}=q1(G),I=O1(Z,L,X??this.service),R=await H1({headers:{},body:w},this.sha256),Y=new this.sha256;Y.update(U);const z=m.toHex(await Y.digest()),F=[J5,f,I,W,z,R].join("\n");return this.signString(F,{signingDate:G,signingRegion:L,signingService:X})}async signMessage(U,{signingDate:w=new Date,signingRegion:G,signingService:W}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:w,signingRegion:G,signingService:W,priorSignature:U.priorSignature}).then((X)=>{return{message:U.message,signature:X}})}async signString(U,{signingDate:w=new Date,signingRegion:G,signingService:W}={}){const M=await this.credentialProvider();this.validateResolvedCredentials(M);const X=G??await this.regionProvider(),{shortDate:L}=q1(w),Z=new this.sha256(await this.getSigningKey(M,X,L,W));return Z.update(c$.toUint8Array(U)),m.toHex(await Z.digest())}async signRequest(U,{signingDate:w=new Date,signableHeaders:G,unsignableHeaders:W,signingRegion:M,signingService:X}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const Z=M??await this.regionProvider(),f=d$(U),{longDate:I,shortDate:R}=q1(w),Y=O1(R,Z,X??this.service);if(f.headers[Q8]=I,L.sessionToken)f.headers[Y5]=L.sessionToken;const z=await H1(f,this.sha256);if(!P5(v$,f.headers)&&this.applyChecksum)f.headers[v$]=z;const F=u$(f,W,G),J=await this.getSignature(I,Y,this.getSigningKey(L,Z,R,X),this.createCanonicalRequest(f,F,z));return f.headers[z8]=`${x$} Credential=${L.accessKeyId}/${Y}, SignedHeaders=${f8(F)}, Signature=${J}`,f}createCanonicalRequest(U,w,G){const W=Object.keys(w).sort();return`${U.method}
8
+ ${this.getCanonicalPath(U)}
9
+ ${A8(U)}
10
+ ${W.map((M)=>`${M}:${w[M]}`).join("\n")}
11
+
12
+ ${W.join(";")}
13
+ ${G}`}async createStringToSign(U,w,G){const W=new this.sha256;W.update(c$.toUint8Array(G));const M=await W.digest();return`${x$}
14
+ ${U}
15
+ ${w}
16
+ ${m.toHex(M)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const w=[];for(let M of U.split("/")){if((M==null?void 0:M.length)===0)continue;if(M===".")continue;if(M==="..")w.pop();else w.push(M)}const G=`${(U==null?void 0:U.startsWith("/"))?"/":""}${w.join("/")}${w.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return T1.escapeUri(G).replace(/%2F/g,"/")}return U}async getSignature(U,w,G,W){const M=await this.createStringToSign(U,w,W),X=new this.sha256(await G);return X.update(c$.toUint8Array(M)),m.toHex(await X.digest())}getSigningKey(U,w,G,W){return J8(this.sha256,U,G,w,W||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")}};H(T8,"SignatureV4");var k5=T8,q1=H(($)=>{const U=S5($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),f8=H(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var _8=Q((fF,D8)=>{var{defineProperty:C1,getOwnPropertyDescriptor:b5,getOwnPropertyNames:h5}=Object,D5=Object.prototype.hasOwnProperty,N=($,U)=>C1($,"name",{value:U,configurable:!0}),_5=($,U)=>{for(var w in U)C1($,w,{get:U[w],enumerable:!0})},c5=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of h5(U))if(!D5.call($,W)&&W!==w)C1($,W,{get:()=>U[W],enumerable:!(G=b5(U,W))||G.enumerable})}return $},x5=($)=>c5(C1({},"__esModule",{value:!0}),$),j8={};_5(j8,{AWSSDKSigV4Signer:()=>d5,AwsSdkSigV4ASigner:()=>g5,AwsSdkSigV4Signer:()=>s$,NODE_SIGV4A_CONFIG_OPTIONS:()=>n5,resolveAWSSDKSigV4Config:()=>l5,resolveAwsSdkSigV4AConfig:()=>m5,resolveAwsSdkSigV4Config:()=>h8,validateSigningProperties:()=>g$});D8.exports=x5(j8);var v5=f0(),u5=f0(),C8=N(($)=>{var U,w;return u5.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((w=$.headers)==null?void 0:w.Date):void 0},"getDateHeader"),p$=N(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),y5=N(($,U)=>Math.abs(p$(U).getTime()-$)>=300000,"isClockSkewed"),N8=N(($,U)=>{const w=Date.parse($);if(y5(w,U))return w-Date.now();return U},"getUpdatedSystemClockOffset"),b0=N(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),g$=N(async($)=>{var U,w,G;const W=b0("context",$.context),M=b0("config",$.config),X=(G=(w=(U=W.endpointV2)==null?void 0:U.properties)==null?void 0:w.authSchemes)==null?void 0:G[0],Z=await b0("signer",M.signer)(X),f=$==null?void 0:$.signingRegion,I=$==null?void 0:$.signingRegionSet,R=$==null?void 0:$.signingName;return{config:M,signer:Z,signingRegion:f,signingRegionSet:I,signingName:R}},"validateSigningProperties"),k8=class ${async sign(U,w,G){var W;if(!v5.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const M=await g$(G),{config:X,signer:L}=M;let{signingRegion:Z,signingName:f}=M;const I=G.context;if(((W=I==null?void 0:I.authSchemes)==null?void 0:W.length)??0>1){const[Y,z]=I.authSchemes;if((Y==null?void 0:Y.name)==="sigv4a"&&(z==null?void 0:z.name)==="sigv4")Z=(z==null?void 0:z.signingRegion)??Z,f=(z==null?void 0:z.signingName)??f}return await L.sign(U,{signingDate:p$(X.systemClockOffset),signingRegion:Z,signingService:f})}errorHandler(U){return(w)=>{const G=w.ServerTime??C8(w.$response);if(G){const W=b0("config",U.config),M=W.systemClockOffset;if(W.systemClockOffset=N8(G,W.systemClockOffset),W.systemClockOffset!==M&&w.$metadata)w.$metadata.clockSkewCorrected=!0}throw w}}successHandler(U,w){const G=C8(U);if(G){const W=b0("config",w.config);W.systemClockOffset=N8(G,W.systemClockOffset)}}};N(k8,"AwsSdkSigV4Signer");var s$=k8,d5=s$,p5=f0(),b8=class $ extends s${async sign(U,w,G){var W;if(!p5.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:M,signer:X,signingRegion:L,signingRegionSet:Z,signingName:f}=await g$(G),R=(await((W=M.sigv4aSigningRegionSet)==null?void 0:W.call(M))??Z??[L]).join(",");return await X.sign(U,{signingDate:p$(M.systemClockOffset),signingRegion:R,signingService:f})}};N(b8,"AwsSdkSigV4ASigner");var g5=b8,s5=Q$(),P8=s1(),m5=N(($)=>{return $.sigv4aSigningRegionSet=s5.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),n5={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new P8.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 P8.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},a=Q$(),S8=V8(),h8=N(($)=>{let U;if($.credentials)U=a.memoizeIdentityProvider($.credentials,a.isIdentityExpired,a.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=a.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=N(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:w=!0,systemClockOffset:G=$.systemClockOffset||0,sha256:W}=$;let M;if($.signer)M=a.normalizeProvider($.signer);else if($.regionInfoProvider)M=N(()=>a.normalizeProvider($.region)().then(async(X)=>[await $.regionInfoProvider(X,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},X]).then(([X,L])=>{const{signingRegion:Z,signingService:f}=X;$.signingRegion=$.signingRegion||Z||L,$.signingName=$.signingName||f||$.serviceId;const I={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:W,uriEscapePath:w};return new($.signerConstructor||S8.SignatureV4)(I)}),"signer");else M=N(async(X)=>{X=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await a.normalizeProvider($.region)(),properties:{}},X);const{signingRegion:L,signingName:Z}=X;$.signingRegion=$.signingRegion||L,$.signingName=$.signingName||Z||$.serviceId;const f={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:W,uriEscapePath:w};return new($.signerConstructor||S8.SignatureV4)(f)},"signer");return{...$,systemClockOffset:G,signingEscapePath:w,credentials:U,signer:M}},"resolveAwsSdkSigV4Config"),l5=h8});var N1=Q((a5)=>{var r5=":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",c8="[: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]["+r5+"]*",o5=new RegExp("^"+c8+"$"),i5=function($,U){const w=[];let G=U.exec($);while(G){const W=[];W.startIndex=U.lastIndex-G[0].length;const M=G.length;for(let X=0;X<M;X++)W.push(G[X]);w.push(W),G=U.exec($)}return w},t5=function($){const U=o5.exec($);return!(U===null||typeof U==="undefined")};a5.isExist=function($){return typeof $!=="undefined"};a5.isEmptyObject=function($){return Object.keys($).length===0};a5.merge=function($,U,w){if(U){const G=Object.keys(U),W=G.length;for(let M=0;M<W;M++)if(w==="strict")$[G[M]]=[U[G[M]]];else $[G[M]]=U[G[M]]}};a5.getValue=function($){if(a5.isExist($))return $;else return""};a5.isName=t5;a5.getAllMatches=i5;a5.nameRegexp=c8});var n$=Q((zf)=>{var v8=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},u8=function($,U){const w=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const G=$.substr(w,U-w);if(U>5&&G==="xml")return B("InvalidXml","XML declaration allowed only at the start of the document.",C($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},y8=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 w=1;for(U+=8;U<$.length;U++)if($[U]==="<")w++;else if($[U]===">"){if(w--,w===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},Zf=function($,U){let w="",G="",W=!1;for(;U<$.length;U++){if($[U]===Xf||$[U]===Lf)if(G==="")G=$[U];else if(G!==$[U]);else G="";else if($[U]===">"){if(G===""){W=!0;break}}w+=$[U]}if(G!=="")return!1;return{value:w,index:U,tagClosed:W}},d8=function($,U){const w=m$.getAllMatches($,ff),G={};for(let W=0;W<w.length;W++){if(w[W][1].length===0)return B("InvalidAttr","Attribute '"+w[W][2]+"' has no space in starting.",h0(w[W]));else if(w[W][3]!==void 0&&w[W][4]===void 0)return B("InvalidAttr","Attribute '"+w[W][2]+"' is without value.",h0(w[W]));else if(w[W][3]===void 0&&!U.allowBooleanAttributes)return B("InvalidAttr","boolean attribute '"+w[W][2]+"' is not allowed.",h0(w[W]));const M=w[W][2];if(!Ef(M))return B("InvalidAttr","Attribute '"+M+"' is an invalid name.",h0(w[W]));if(!G.hasOwnProperty(M))G[M]=1;else return B("InvalidAttr","Attribute '"+M+"' is repeated.",h0(w[W]))}return!0},If=function($,U){let w=/\d/;if($[U]==="x")U++,w=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(w))break}return-1},Rf=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,If($,U);let w=0;for(;U<$.length;U++,w++){if($[U].match(/\w/)&&w<20)continue;if($[U]===";")break;return-1}return U},B=function($,U,w){return{err:{code:$,msg:U,line:w.line||w,col:w.col}}},Ef=function($){return m$.isName($)},Yf=function($){return m$.isName($)},C=function($,U){const w=$.substring(0,U).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}},h0=function($){return $.startIndex+$[1].length},m$=N1(),Mf={allowBooleanAttributes:!1,unpairedTags:[]};zf.validate=function($,U){U=Object.assign({},Mf,U);const w=[];let G=!1,W=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let M=0;M<$.length;M++)if($[M]==="<"&&$[M+1]==="?"){if(M+=2,M=u8($,M),M.err)return M}else if($[M]==="<"){let X=M;if(M++,$[M]==="!"){M=y8($,M);continue}else{let L=!1;if($[M]==="/")L=!0,M++;let Z="";for(;M<$.length&&$[M]!==">"&&$[M]!==" "&&$[M]!=="\t"&&$[M]!=="\n"&&$[M]!=="\r";M++)Z+=$[M];if(Z=Z.trim(),Z[Z.length-1]==="/")Z=Z.substring(0,Z.length-1),M--;if(!Yf(Z)){let R;if(Z.trim().length===0)R="Invalid space after '<'.";else R="Tag '"+Z+"' is an invalid name.";return B("InvalidTag",R,C($,M))}const f=Zf($,M);if(f===!1)return B("InvalidAttr","Attributes for '"+Z+"' have open quote.",C($,M));let I=f.value;if(M=f.index,I[I.length-1]==="/"){const R=M-I.length;I=I.substring(0,I.length-1);const Y=d8(I,U);if(Y===!0)G=!0;else return B(Y.err.code,Y.err.msg,C($,R+Y.err.line))}else if(L)if(!f.tagClosed)return B("InvalidTag","Closing tag '"+Z+"' doesn't have proper closing.",C($,M));else if(I.trim().length>0)return B("InvalidTag","Closing tag '"+Z+"' can't have attributes or invalid starting.",C($,X));else if(w.length===0)return B("InvalidTag","Closing tag '"+Z+"' has not been opened.",C($,X));else{const R=w.pop();if(Z!==R.tagName){let Y=C($,R.tagStartPos);return B("InvalidTag","Expected closing tag '"+R.tagName+"' (opened in line "+Y.line+", col "+Y.col+") instead of closing tag '"+Z+"'.",C($,X))}if(w.length==0)W=!0}else{const R=d8(I,U);if(R!==!0)return B(R.err.code,R.err.msg,C($,M-I.length+R.err.line));if(W===!0)return B("InvalidXml","Multiple possible root nodes found.",C($,M));else if(U.unpairedTags.indexOf(Z)!==-1);else w.push({tagName:Z,tagStartPos:X});G=!0}for(M++;M<$.length;M++)if($[M]==="<")if($[M+1]==="!"){M++,M=y8($,M);continue}else if($[M+1]==="?"){if(M=u8($,++M),M.err)return M}else break;else if($[M]==="&"){const R=Rf($,M);if(R==-1)return B("InvalidChar","char '&' is not expected.",C($,M));M=R}else if(W===!0&&!v8($[M]))return B("InvalidXml","Extra text at the end",C($,M));if($[M]==="<")M--}}else{if(v8($[M]))continue;return B("InvalidChar","char '"+$[M]+"' is not expected.",C($,M))}if(!G)return B("InvalidXml","Start tag expected.",1);else if(w.length==1)return B("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",C($,w[0].tagStartPos));else if(w.length>0)return B("InvalidXml","Invalid '"+JSON.stringify(w.map((M)=>M.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var Xf='"',Lf="'",ff=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var g8=Q((Jf)=>{var p8={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,w){return $}},Ff=function($){return Object.assign({},p8,$)};Jf.buildOptions=Ff;Jf.defaultOptions=p8});var n8=Q((YF,m8)=>{class s8{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})}}m8.exports=s8});var r8=Q((zF,l8)=>{var Bf=function($,U){const w={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let G=1,W=!1,M=!1,X="";for(;U<$.length;U++)if($[U]==="<"&&!M){if(W&&Hf($,U)){if(U+=7,[entityName,val,U]=Of($,U+1),val.indexOf("&")===-1)w[Pf(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(W&&Vf($,U))U+=8;else if(W&&Cf($,U))U+=8;else if(W&&Nf($,U))U+=9;else if(Tf)M=!0;else throw new Error("Invalid DOCTYPE");G++,X=""}else if($[U]===">"){if(M){if($[U-1]==="-"&&$[U-2]==="-")M=!1,G--}else G--;if(G===0)break}else if($[U]==="[")W=!0;else X+=$[U];if(G!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:U}},Of=function($,U){let w="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)w+=$[U];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");const G=$[U++];let W="";for(;U<$.length&&$[U]!==G;U++)W+=$[U];return[w,W,U]},Tf=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},Hf=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},Vf=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},Cf=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},Nf=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},Pf=function($){if(qf.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},qf=N1();l8.exports=Bf});var i8=Q((QF,o8)=>{var bf=function($,U={}){if(U=Object.assign({},kf,U),!$||typeof $!=="string")return $;let w=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(w))return $;else if(U.hex&&Sf.test(w))return Number.parseInt(w,16);else{const G=jf.exec(w);if(G){const W=G[1],M=G[2];let X=hf(G[3]);const L=G[4]||G[6];if(!U.leadingZeros&&M.length>0&&W&&w[2]!==".")return $;else if(!U.leadingZeros&&M.length>0&&!W&&w[1]!==".")return $;else{const Z=Number(w),f=""+Z;if(f.search(/[eE]/)!==-1)if(U.eNotation)return Z;else return $;else if(L)if(U.eNotation)return Z;else return $;else if(w.indexOf(".")!==-1)if(f==="0"&&X==="")return Z;else if(f===X)return Z;else if(W&&f==="-"+X)return Z;else return $;if(M)if(X===f)return Z;else if(W+X===f)return Z;else return $;if(w===f)return Z;else if(w===W+f)return Z;return $}}else return $}},hf=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},Sf=/^[-+]?0x[a-fA-F0-9]+$/,jf=/^([\-\+])?(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 kf={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};o8.exports=bf});var $M=Q((FF,e8)=>{var cf=function($){const U=Object.keys($);for(let w=0;w<U.length;w++){const G=U[w];this.lastEntities[G]={regex:new RegExp("&"+G+";","g"),val:$[G]}}},xf=function($,U,w,G,W,M,X){if($!==void 0){if(this.options.trimValues&&!G)$=$.trim();if($.length>0){if(!X)$=this.replaceEntitiesValue($);const L=this.options.tagValueProcessor(U,$,w,W,M);if(L===null||L===void 0)return $;else if(typeof L!==typeof $||L!==$)return L;else if(this.options.trimValues)return r$($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return r$($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},vf=function($){if(this.options.removeNSPrefix){const U=$.split(":"),w=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=w+U[1]}return $},yf=function($,U,w){if(!this.options.ignoreAttributes&&typeof $==="string"){const G=t8.getAllMatches($,uf),W=G.length,M={};for(let X=0;X<W;X++){const L=this.resolveNameSpace(G[X][1]);let Z=G[X][4],f=this.options.attributeNamePrefix+L;if(L.length){if(this.options.transformAttributeName)f=this.options.transformAttributeName(f);if(f==="__proto__")f="#__proto__";if(Z!==void 0){if(this.options.trimValues)Z=Z.trim();Z=this.replaceEntitiesValue(Z);const I=this.options.attributeValueProcessor(L,Z,U);if(I===null||I===void 0)M[f]=Z;else if(typeof I!==typeof Z||I!==Z)M[f]=I;else M[f]=r$(Z,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)M[f]=!0}}if(!Object.keys(M).length)return;if(this.options.attributesGroupName){const X={};return X[this.options.attributesGroupName]=M,X}return M}},pf=function($,U,w){const G=this.options.updateTag(U.tagname,w,U[":@"]);if(G===!1);else if(typeof G==="string")U.tagname=G,$.addChild(U);else $.addChild(U)},sf=function($,U,w,G){if($){if(G===void 0)G=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,w,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,G),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $},mf=function($,U,w){const G="*."+w;for(let W in $){const M=$[W];if(G===M||U===M)return!0}return!1},nf=function($,U,w=">"){let G,W="";for(let M=U;M<$.length;M++){let X=$[M];if(G){if(X===G)G=""}else if(X==='"'||X==="'")G=X;else if(X===w[0])if(w[1]){if($[M+1]===w[1])return{data:W,index:M}}else return{data:W,index:M};else if(X==="\t")X=" ";W+=X}},e=function($,U,w,G){const W=$.indexOf(U,w);if(W===-1)throw new Error(G);else return W+U.length-1},l$=function($,U,w,G=">"){const W=nf($,U+1,G);if(!W)return;let M=W.data;const X=W.index,L=M.search(/\s/);let Z=M,f=!0;if(L!==-1)Z=M.substring(0,L),M=M.substring(L+1).trimStart();const I=Z;if(w){const R=Z.indexOf(":");if(R!==-1)Z=Z.substr(R+1),f=Z!==W.data.substr(R+1)}return{tagName:Z,tagExp:M,closeIndex:X,attrExpPresent:f,rawTagName:I}},lf=function($,U,w){const G=w;let W=1;for(;w<$.length;w++)if($[w]==="<")if($[w+1]==="/"){const M=e($,">",w,`${U} is not closed`);if($.substring(w+2,M).trim()===U){if(W--,W===0)return{tagContent:$.substring(G,w),i:M}}w=M}else if($[w+1]==="?")w=e($,"?>",w+1,"StopNode is not closed.");else if($.substr(w+1,3)==="!--")w=e($,"-->",w+3,"StopNode is not closed.");else if($.substr(w+1,2)==="![")w=e($,"]]>",w,"StopNode is not closed.")-2;else{const M=l$($,w,">");if(M){if((M&&M.tagName)===U&&M.tagExp[M.tagExp.length-1]!=="/")W++;w=M.closeIndex}}},r$=function($,U,w){if(U&&typeof $==="string"){const G=$.trim();if(G==="true")return!0;else if(G==="false")return!1;else return _f($,w)}else if(t8.isExist($))return $;else return""},t8=N1(),D0=n8(),Df=r8(),_f=i8();class a8{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,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=cf,this.parseXml=df,this.parseTextData=xf,this.resolveNameSpace=vf,this.buildAttributesMap=yf,this.isItStopNode=mf,this.replaceEntitiesValue=gf,this.readStopNodeData=lf,this.saveTextToParentTag=sf,this.addChild=pf}}var uf=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),df=function($){$=$.replace(/\r\n?/g,"\n");const U=new D0("!xml");let w=U,G="",W="";for(let M=0;M<$.length;M++)if($[M]==="<")if($[M+1]==="/"){const L=e($,">",M,"Closing Tag is not closed.");let Z=$.substring(M+2,L).trim();if(this.options.removeNSPrefix){const R=Z.indexOf(":");if(R!==-1)Z=Z.substr(R+1)}if(this.options.transformTagName)Z=this.options.transformTagName(Z);if(w)G=this.saveTextToParentTag(G,w,W);const f=W.substring(W.lastIndexOf(".")+1);if(Z&&this.options.unpairedTags.indexOf(Z)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Z}>`);let I=0;if(f&&this.options.unpairedTags.indexOf(f)!==-1)I=W.lastIndexOf(".",W.lastIndexOf(".")-1),this.tagsNodeStack.pop();else I=W.lastIndexOf(".");W=W.substring(0,I),w=this.tagsNodeStack.pop(),G="",M=L}else if($[M+1]==="?"){let L=l$($,M,!1,"?>");if(!L)throw new Error("Pi Tag is not closed.");if(G=this.saveTextToParentTag(G,w,W),this.options.ignoreDeclaration&&L.tagName==="?xml"||this.options.ignorePiTags);else{const Z=new D0(L.tagName);if(Z.add(this.options.textNodeName,""),L.tagName!==L.tagExp&&L.attrExpPresent)Z[":@"]=this.buildAttributesMap(L.tagExp,W,L.tagName);this.addChild(w,Z,W)}M=L.closeIndex+1}else if($.substr(M+1,3)==="!--"){const L=e($,"-->",M+4,"Comment is not closed.");if(this.options.commentPropName){const Z=$.substring(M+4,L-2);G=this.saveTextToParentTag(G,w,W),w.add(this.options.commentPropName,[{[this.options.textNodeName]:Z}])}M=L}else if($.substr(M+1,2)==="!D"){const L=Df($,M);this.docTypeEntities=L.entities,M=L.i}else if($.substr(M+1,2)==="!["){const L=e($,"]]>",M,"CDATA is not closed.")-2,Z=$.substring(M+9,L);G=this.saveTextToParentTag(G,w,W);let f=this.parseTextData(Z,w.tagname,W,!0,!1,!0,!0);if(f==null)f="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:Z}]);else w.add(this.options.textNodeName,f);M=L+2}else{let L=l$($,M,this.options.removeNSPrefix),Z=L.tagName;const f=L.rawTagName;let{tagExp:I,attrExpPresent:R,closeIndex:Y}=L;if(this.options.transformTagName)Z=this.options.transformTagName(Z);if(w&&G){if(w.tagname!=="!xml")G=this.saveTextToParentTag(G,w,W,!1)}const z=w;if(z&&this.options.unpairedTags.indexOf(z.tagname)!==-1)w=this.tagsNodeStack.pop(),W=W.substring(0,W.lastIndexOf("."));if(Z!==U.tagname)W+=W?"."+Z:Z;if(this.isItStopNode(this.options.stopNodes,W,Z)){let F="";if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(Z[Z.length-1]==="/")Z=Z.substr(0,Z.length-1),W=W.substr(0,W.length-1),I=Z;else I=I.substr(0,I.length-1);M=L.closeIndex}else if(this.options.unpairedTags.indexOf(Z)!==-1)M=L.closeIndex;else{const O=this.readStopNodeData($,f,Y+1);if(!O)throw new Error(`Unexpected end of ${f}`);M=O.i,F=O.tagContent}const J=new D0(Z);if(Z!==I&&R)J[":@"]=this.buildAttributesMap(I,W,Z);if(F)F=this.parseTextData(F,Z,W,!0,R,!0,!0);W=W.substr(0,W.lastIndexOf(".")),J.add(this.options.textNodeName,F),this.addChild(w,J,W)}else{if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(Z[Z.length-1]==="/")Z=Z.substr(0,Z.length-1),W=W.substr(0,W.length-1),I=Z;else I=I.substr(0,I.length-1);if(this.options.transformTagName)Z=this.options.transformTagName(Z);const F=new D0(Z);if(Z!==I&&R)F[":@"]=this.buildAttributesMap(I,W,Z);this.addChild(w,F,W),W=W.substr(0,W.lastIndexOf("."))}else{const F=new D0(Z);if(this.tagsNodeStack.push(w),Z!==I&&R)F[":@"]=this.buildAttributesMap(I,W,Z);this.addChild(w,F,W),w=F}G="",M=Y}}else G+=$[M];return U.child},gf=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const w=this.docTypeEntities[U];$=$.replace(w.regx,w.val)}for(let U in this.lastEntities){const w=this.lastEntities[U];$=$.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const w=this.htmlEntities[U];$=$.replace(w.regex,w.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};e8.exports=a8});var wM=Q((ef)=>{var rf=function($,U){return UM($,U)},UM=function($,U,w){let G;const W={};for(let M=0;M<$.length;M++){const X=$[M],L=of(X);let Z="";if(w===void 0)Z=L;else Z=w+"."+L;if(L===U.textNodeName)if(G===void 0)G=X[L];else G+=""+X[L];else if(L===void 0)continue;else if(X[L]){let f=UM(X[L],U,Z);const I=af(f,U);if(X[":@"])tf(f,X[":@"],Z,U);else if(Object.keys(f).length===1&&f[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)f=f[U.textNodeName];else if(Object.keys(f).length===0)if(U.alwaysCreateTextNode)f[U.textNodeName]="";else f="";if(W[L]!==void 0&&W.hasOwnProperty(L)){if(!Array.isArray(W[L]))W[L]=[W[L]];W[L].push(f)}else if(U.isArray(L,Z,I))W[L]=[f];else W[L]=f}}if(typeof G==="string"){if(G.length>0)W[U.textNodeName]=G}else if(G!==void 0)W[U.textNodeName]=G;return W},of=function($){const U=Object.keys($);for(let w=0;w<U.length;w++){const G=U[w];if(G!==":@")return G}},tf=function($,U,w,G){if(U){const W=Object.keys(U),M=W.length;for(let X=0;X<M;X++){const L=W[X];if(G.isArray(L,w+"."+L,!0,!0))$[L]=[U[L]];else $[L]=U[L]}}},af=function($,U){const{textNodeName:w}=U,G=Object.keys($).length;if(G===0)return!0;if(G===1&&($[w]||typeof $[w]==="boolean"||$[w]===0))return!0;return!1};ef.prettify=rf});var MM=Q((AF,WM)=>{var{buildOptions:U6}=g8(),w6=$M(),{prettify:G6}=wM(),W6=n$();class GM{constructor($){this.externalEntities={},this.options=U6($)}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 W=W6.validate($,U);if(W!==!0)throw Error(`${W.err.msg}:${W.err.line}:${W.err.col}`)}const w=new w6(this.options);w.addExternalEntities(this.externalEntities);const G=w.parseXml($);if(this.options.preserveOrder||G===void 0)return G;else return G6(G,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}}WM.exports=GM});var IM=Q((KF,fM)=>{var M6=function($,U){let w="";if(U.format&&U.indentBy.length>0)w="\n";return LM($,U,"",w)},LM=function($,U,w,G){let W="",M=!1;for(let X=0;X<$.length;X++){const L=$[X],Z=X6(L);if(Z===void 0)continue;let f="";if(w.length===0)f=Z;else f=`${w}.${Z}`;if(Z===U.textNodeName){let F=L[Z];if(!L6(f,U))F=U.tagValueProcessor(Z,F),F=ZM(F,U);if(M)W+=G;W+=F,M=!1;continue}else if(Z===U.cdataPropName){if(M)W+=G;W+=`<![CDATA[${L[Z][0][U.textNodeName]}]]>`,M=!1;continue}else if(Z===U.commentPropName){W+=G+`<!--${L[Z][0][U.textNodeName]}-->`,M=!0;continue}else if(Z[0]==="?"){const F=XM(L[":@"],U),J=Z==="?xml"?"":G;let O=L[Z][0][U.textNodeName];O=O.length!==0?" "+O:"",W+=J+`<${Z}${O}${F}?>`,M=!0;continue}let I=G;if(I!=="")I+=U.indentBy;const R=XM(L[":@"],U),Y=G+`<${Z}${R}`,z=LM(L[Z],U,f,I);if(U.unpairedTags.indexOf(Z)!==-1)if(U.suppressUnpairedNode)W+=Y+">";else W+=Y+"/>";else if((!z||z.length===0)&&U.suppressEmptyNode)W+=Y+"/>";else if(z&&z.endsWith(">"))W+=Y+`>${z}${G}</${Z}>`;else{if(W+=Y+">",z&&G!==""&&(z.includes("/>")||z.includes("</")))W+=G+U.indentBy+z+G;else W+=z;W+=`</${Z}>`}M=!0}return W},X6=function($){const U=Object.keys($);for(let w=0;w<U.length;w++){const G=U[w];if(!$.hasOwnProperty(G))continue;if(G!==":@")return G}},XM=function($,U){let w="";if($&&!U.ignoreAttributes)for(let G in $){if(!$.hasOwnProperty(G))continue;let W=U.attributeValueProcessor(G,$[G]);if(W=ZM(W,U),W===!0&&U.suppressBooleanAttributes)w+=` ${G.substr(U.attributeNamePrefix.length)}`;else w+=` ${G.substr(U.attributeNamePrefix.length)}="${W}"`}return w},L6=function($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let w=$.substr($.lastIndexOf(".")+1);for(let G in U.stopNodes)if(U.stopNodes[G]===$||U.stopNodes[G]==="*."+w)return!0;return!1},ZM=function($,U){if($&&$.length>0&&U.processEntities)for(let w=0;w<U.entities.length;w++){const G=U.entities[w];$=$.replace(G.regex,G.val)}return $};fM.exports=M6});var EM=Q((qF,RM)=>{var n=function($){if(this.options=Object.assign({},f6,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=E6;if(this.processTextOrObjNode=I6,this.options.format)this.indentate=R6,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},I6=function($,U,w){const G=this.j2x($,w+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,G.attrStr,w);else return this.buildObjectNode(G.val,U,G.attrStr,w)},R6=function($){return this.options.indentBy.repeat($)},E6=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},Z6=IM(),f6={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};n.prototype.build=function($){if(this.options.preserveOrder)return Z6($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};n.prototype.j2x=function($,U){let w="",G="";for(let W in $){if(!Object.prototype.hasOwnProperty.call($,W))continue;if(typeof $[W]==="undefined"){if(this.isAttribute(W))G+=""}else if($[W]===null)if(this.isAttribute(W))G+="";else if(W[0]==="?")G+=this.indentate(U)+"<"+W+"?"+this.tagEndChar;else G+=this.indentate(U)+"<"+W+"/"+this.tagEndChar;else if($[W]instanceof Date)G+=this.buildTextValNode($[W],W,"",U);else if(typeof $[W]!=="object"){const M=this.isAttribute(W);if(M)w+=this.buildAttrPairStr(M,""+$[W]);else if(W===this.options.textNodeName){let X=this.options.tagValueProcessor(W,""+$[W]);G+=this.replaceEntitiesValue(X)}else G+=this.buildTextValNode($[W],W,"",U)}else if(Array.isArray($[W])){const M=$[W].length;let X="",L="";for(let Z=0;Z<M;Z++){const f=$[W][Z];if(typeof f==="undefined");else if(f===null)if(W[0]==="?")G+=this.indentate(U)+"<"+W+"?"+this.tagEndChar;else G+=this.indentate(U)+"<"+W+"/"+this.tagEndChar;else if(typeof f==="object")if(this.options.oneListGroup){const I=this.j2x(f,U+1);if(X+=I.val,this.options.attributesGroupName&&f.hasOwnProperty(this.options.attributesGroupName))L+=I.attrStr}else X+=this.processTextOrObjNode(f,W,U);else if(this.options.oneListGroup){let I=this.options.tagValueProcessor(W,f);I=this.replaceEntitiesValue(I),X+=I}else X+=this.buildTextValNode(f,W,"",U)}if(this.options.oneListGroup)X=this.buildObjectNode(X,W,L,U);G+=X}else if(this.options.attributesGroupName&&W===this.options.attributesGroupName){const M=Object.keys($[W]),X=M.length;for(let L=0;L<X;L++)w+=this.buildAttrPairStr(M[L],""+$[W][M[L]])}else G+=this.processTextOrObjNode($[W],W,U)}return{attrStr:w,val:G}};n.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};n.prototype.buildObjectNode=function($,U,w,G){if($==="")if(U[0]==="?")return this.indentate(G)+"<"+U+w+"?"+this.tagEndChar;else return this.indentate(G)+"<"+U+w+this.closeTag(U)+this.tagEndChar;else{let W="</"+U+this.tagEndChar,M="";if(U[0]==="?")M="?",W="";if((w||w==="")&&$.indexOf("<")===-1)return this.indentate(G)+"<"+U+w+M+">"+$+W;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&M.length===0)return this.indentate(G)+`<!--${$}-->`+this.newLine;else return this.indentate(G)+"<"+U+w+M+this.tagEndChar+$+this.indentate(G)+W}};n.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};n.prototype.buildTextValNode=function($,U,w,G){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(G)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(G)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(G)+"<"+U+w+"?"+this.tagEndChar;else{let W=this.options.tagValueProcessor(U,$);if(W=this.replaceEntitiesValue(W),W==="")return this.indentate(G)+"<"+U+w+this.closeTag(U)+this.tagEndChar;else return this.indentate(G)+"<"+U+w+">"+W+"</"+U+this.tagEndChar}};n.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const w=this.options.entities[U];$=$.replace(w.regex,w.val)}return $};RM.exports=n});var zM=Q((BF,YM)=>{var Y6=n$(),z6=MM(),Q6=EM();YM.exports={XMLParser:z6,XMLValidator:Y6,XMLBuilder:Q6}});var qM=Q((OF,KM)=>{var{defineProperty:P1,getOwnPropertyDescriptor:F6,getOwnPropertyNames:J6}=Object,A6=Object.prototype.hasOwnProperty,P=($,U)=>P1($,"name",{value:U,configurable:!0}),K6=($,U)=>{for(var w in U)P1($,w,{get:U[w],enumerable:!0})},q6=($,U,w,G)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of J6(U))if(!A6.call($,W)&&W!==w)P1($,W,{get:()=>U[W],enumerable:!(G=F6(U,W))||G.enumerable})}return $},B6=($)=>q6(P1({},"__esModule",{value:!0}),$),QM={};K6(QM,{_toBool:()=>T6,_toNum:()=>H6,_toStr:()=>O6,awsExpectUnion:()=>C6,loadRestJsonErrorCode:()=>S6,loadRestXmlErrorCode:()=>h6,parseJsonBody:()=>JM,parseJsonErrorBody:()=>P6,parseXmlBody:()=>AM,parseXmlErrorBody:()=>b6});KM.exports=B6(QM);var O6=P(($)=>{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"),T6=P(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const w=new Error(`Received string "${$}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return $!==""&&U!=="false"}return $},"_toBool"),H6=P(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const w=new Error(`Received string "${$}" where a number was expected.`);return w.name="Warning",console.warn(w),$}return U}return $},"_toNum"),V6=L0(),C6=P(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return V6.expectUnion($)},"awsExpectUnion"),N6=L0(),FM=P(($,U)=>N6.collectBody($,U).then((w)=>U.utf8Encoder(w)),"collectBodyString"),JM=P(($,U)=>FM($,U).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(G){if((G==null?void 0:G.name)==="SyntaxError")Object.defineProperty(G,"$responseBodyText",{value:w});throw G}return{}}),"parseJsonBody"),P6=P(async($,U)=>{const w=await JM($,U);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),S6=P(($,U)=>{const w=P((M,X)=>Object.keys(M).find((L)=>L.toLowerCase()===X.toLowerCase()),"findKey"),G=P((M)=>{let X=M;if(typeof X==="number")X=X.toString();if(X.indexOf(",")>=0)X=X.split(",")[0];if(X.indexOf(":")>=0)X=X.split(":")[0];if(X.indexOf("#")>=0)X=X.split("#")[1];return X},"sanitizeErrorCode"),W=w($.headers,"x-amzn-errortype");if(W!==void 0)return G($.headers[W]);if(U.code!==void 0)return G(U.code);if(U.__type!==void 0)return G(U.__type)},"loadRestJsonErrorCode"),j6=L0(),k6=zM(),AM=P(($,U)=>FM($,U).then((w)=>{if(w.length){const G=new k6.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Z,f)=>f.trim()===""&&f.includes("\n")?"":void 0});G.addEntity("#xD","\r"),G.addEntity("#10","\n");let W;try{W=G.parse(w,!0)}catch(Z){if(Z&&typeof Z==="object")Object.defineProperty(Z,"$responseBodyText",{value:w});throw Z}const M="#text",X=Object.keys(W)[0],L=W[X];if(L[M])L[X]=L[M],delete L[M];return j6.getValueFromTextNode(L)}return{}}),"parseXmlBody"),b6=P(async($,U)=>{const w=await AM($,U);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),h6=P(($,U)=>{var w;if(((w=U==null?void 0:U.Error)==null?void 0:w.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 _6=Q((_0)=>{Object.defineProperty(_0,"__esModule",{value:!0});var o$=D6();o$.__exportStar(M8(),_0);o$.__exportStar(_8(),_0);o$.__exportStar(qM(),_0)});var x=h(_1(),1),YI=x.default.v1,zI=x.default.v3,lU=x.default.v4,QI=x.default.v5,FI=x.default.NIL,JI=x.default.version,AI=x.default.validate,KI=x.default.stringify,qI=x.default.parse;function TI($){return $}var nX=($)=>(U)=>async(w)=>{if(!S.isInstance(w.request))return U(w);const{request:G}=w,{handlerProtocol:W=""}=$.requestHandler.metadata||{};if(W.indexOf("h2")>=0&&!G.headers[":authority"])delete G.headers.host,G.headers[":authority"]=G.hostname+(G.port?":"+G.port:"");else if(!G.headers.host){let M=G.hostname;if(G.port!=null)M+=`:${G.port}`;G.headers.host=M}return U(w)},lX={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},HI=($)=>({applyToStack:(U)=>{U.add(nX($),lX)}});var rX=()=>($,U)=>async(w)=>{try{const G=await $(w),{clientName:W,commandName:M,logger:X,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:Z,overrideOutputFilterSensitiveLog:f}=L,I=Z??U.inputFilterSensitiveLog,R=f??U.outputFilterSensitiveLog,{$metadata:Y,...z}=G.output;return X?.info?.({clientName:W,commandName:M,input:I(w.input),output:R(z),metadata:Y}),G}catch(G){const{clientName:W,commandName:M,logger:X,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:Z}=L,f=Z??U.inputFilterSensitiveLog;throw X?.error?.({clientName:W,commandName:M,input:f(w.input),error:G,metadata:G.$metadata}),G}},oX={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},CI=($)=>({applyToStack:(U)=>{U.add(rX(),oX)}});var rU="X-Amzn-Trace-Id",iX="AWS_LAMBDA_FUNCTION_NAME",tX="_X_AMZN_TRACE_ID",aX=($)=>(U)=>async(w)=>{const{request:G}=w;if(!S.isInstance(G)||$.runtime!=="node"||G.headers.hasOwnProperty(rU))return U(w);const W=process.env[iX],M=process.env[tX],X=(L)=>typeof L==="string"&&L.length>0;if(X(W)&&X(M))G.headers[rU]=M;return U({...w,request:G})},eX={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},kI=($)=>({applyToStack:(U)=>{U.add(aX($),eX)}});function tI($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class f2{constructor({size:$,params:U}){if(this.data=new Map,this.parameters=[],this.capacity=$??50,U)this.parameters=U}get($,U){const w=this.hash($);if(w===!1)return U();if(!this.data.has(w)){if(this.data.size>this.capacity+10){const G=this.data.keys();let W=0;while(!0){const{value:M,done:X}=G.next();if(this.data.delete(M),X||++W>10)break}}this.data.set(w,U())}return this.data.get(w)}size(){return this.data.size}hash($){let U="";const{parameters:w}=this;if(w.length===0)return!1;for(let G of w){const W=String($[G]??"");if(W.includes("|;"))return!1;U+=W+"|;"}return U}}var I2=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}$"),N0=($)=>I2.test($)||$.startsWith("[")&&$.endsWith("]");var R2=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),P0=($,U=!1)=>{if(!U)return R2.test($);const w=$.split(".");for(let G of w)if(!P0(G))return!1;return!0};var S0={};var y="endpoints";function k($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${k($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(k).join(", ")})`;return JSON.stringify($,null,2)}class A extends Error{constructor($){super($);this.name="EndpointError"}}var QW=($,U)=>$===U;var FW=($)=>{const U=$.split("."),w=[];for(let G of U){const W=G.indexOf("[");if(W!==-1){if(G.indexOf("]")!==G.length-1)throw new A(`Path: '${$}' does not end with ']'`);const M=G.slice(W+1,-1);if(Number.isNaN(parseInt(M)))throw new A(`Invalid array index: '${M}' in path: '${$}'`);if(W!==0)w.push(G.slice(0,W));w.push(M)}else w.push(G)}return w};var G1=($,U)=>FW(U).reduce((w,G)=>{if(typeof w!=="object")throw new A(`Index '${G}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(w))return w[parseInt(G)];return w[G]},$);var JW=($)=>$!=null;var AW=($)=>!$;var W1=h($0(),1);var F$={[W1.EndpointURLScheme.HTTP]:80,[W1.EndpointURLScheme.HTTPS]:443},KW=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:Y,port:z,protocol:F="",path:J="",query:O={}}=$,e$=new URL(`${F}//${Y}${z?`:${z}`:""}${J}`);return e$.search=Object.entries(O).map(([kM,bM])=>`${kM}=${bM}`).join("&"),e$}return new URL($)}catch(Y){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const w=U.href,{host:G,hostname:W,pathname:M,protocol:X,search:L}=U;if(L)return null;const Z=X.slice(0,-1);if(!Object.values(W1.EndpointURLScheme).includes(Z))return null;const f=N0(W),I=w.includes(`${G}:${F$[Z]}`)||typeof $==="string"&&$.includes(`${G}:${F$[Z]}`),R=`${G}${I?`:${F$[Z]}`:""}`;return{scheme:Z,authority:R,path:M,normalizedPath:M.endsWith("/")?M:`${M}/`,isIp:f}};var qW=($,U)=>$===U;var BW=($,U,w,G)=>{if(U>=w||$.length<w)return null;if(!G)return $.substring(U,w);return $.substring($.length-w,$.length-U)};var OW=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var TW={booleanEquals:QW,getAttr:G1,isSet:JW,isValidHostLabel:P0,not:AW,parseURL:KW,stringEquals:qW,substring:BW,uriEncode:OW};var M1=($,U)=>{const w=[],G={...U.endpointParams,...U.referenceRecord};let W=0;while(W<$.length){const M=$.indexOf("{",W);if(M===-1){w.push($.slice(W));break}w.push($.slice(W,M));const X=$.indexOf("}",M);if(X===-1){w.push($.slice(M));break}if($[M+1]==="{"&&$[X+1]==="}")w.push($.slice(M+1,X)),W=X+2;const L=$.substring(M+1,X);if(L.includes("#")){const[Z,f]=L.split("#");w.push(G1(G[Z],f))}else w.push(G[L]);W=X+1}return w.join("")};var HW=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var g=($,U,w)=>{if(typeof $==="string")return M1($,w);else if($.fn)return X1($,w);else if($.ref)return HW($,w);throw new A(`'${U}': ${String($)} is not a string, function or reference.`)};var X1=({fn:$,argv:U},w)=>{const G=U.map((M)=>["boolean","number"].includes(typeof M)?M:g(M,"arg",w)),W=$.split(".");if(W[0]in S0&&W[1]!=null)return S0[W[0]][W[1]](...G);return TW[$](...G)};var VW=({assign:$,...U},w)=>{if($&&$ in w.referenceRecord)throw new A(`'${$}' is already defined in Reference Record.`);const G=X1(U,w);return w.logger?.debug?.(`${y} evaluateCondition: ${k(U)} = ${k(G)}`),{result:G===""?!0:!!G,...$!=null&&{toAssign:{name:$,value:G}}}};var I0=($=[],U)=>{const w={};for(let G of $){const{result:W,toAssign:M}=VW(G,{...U,referenceRecord:{...U.referenceRecord,...w}});if(!W)return{result:W};if(M)w[M.name]=M.value,U.logger?.debug?.(`${y} assign: ${M.name} := ${k(M.value)}`)}return{result:!0,referenceRecord:w}};var CW=($,U)=>Object.entries($).reduce((w,[G,W])=>({...w,[G]:W.map((M)=>{const X=g(M,"Header value entry",U);if(typeof X!=="string")throw new A(`Header '${G}' value '${X}' is not a string`);return X})}),{});var J$=($,U)=>{if(Array.isArray($))return $.map((w)=>J$(w,U));switch(typeof $){case"string":return M1($,U);case"object":if($===null)throw new A(`Unexpected endpoint property: ${$}`);return L1($,U);case"boolean":return $;default:throw new A(`Unexpected endpoint property type: ${typeof $}`)}};var L1=($,U)=>Object.entries($).reduce((w,[G,W])=>({...w,[G]:J$(W,U)}),{});var NW=($,U)=>{const w=g($,"Endpoint URL",U);if(typeof w==="string")try{return new URL(w)}catch(G){throw console.error(`Failed to construct URL with ${w}`,G),G}throw new A(`Endpoint URL must be a string, got ${typeof w}`)};var PW=($,U)=>{const{conditions:w,endpoint:G}=$,{result:W,referenceRecord:M}=I0(w,U);if(!W)return;const X={...U,referenceRecord:{...U.referenceRecord,...M}},{url:L,properties:Z,headers:f}=G;return U.logger?.debug?.(`${y} Resolving endpoint from template: ${k(G)}`),{...f!=null&&{headers:CW(f,X)},...Z!=null&&{properties:L1(Z,X)},url:NW(L,X)}};var SW=($,U)=>{const{conditions:w,error:G}=$,{result:W,referenceRecord:M}=I0(w,U);if(!W)return;throw new A(g(G,"Error",{...U,referenceRecord:{...U.referenceRecord,...M}}))};var jW=($,U)=>{const{conditions:w,rules:G}=$,{result:W,referenceRecord:M}=I0(w,U);if(!W)return;return Z1(G,{...U,referenceRecord:{...U.referenceRecord,...M}})};var Z1=($,U)=>{for(let w of $)if(w.type==="endpoint"){const G=PW(w,U);if(G)return G}else if(w.type==="error")SW(w,U);else if(w.type==="tree"){const G=jW(w,U);if(G)return G}else throw new A(`Unknown endpoint rule: ${w}`);throw new A("Rules evaluation failed")};var E2=($,U)=>{const{endpointParams:w,logger:G}=U,{parameters:W,rules:M}=$;U.logger?.debug?.(`${y} Initial EndpointParams: ${k(w)}`);const X=Object.entries(W).filter(([,f])=>f.default!=null).map(([f,I])=>[f,I.default]);if(X.length>0)for(let[f,I]of X)w[f]=w[f]??I;const L=Object.entries(W).filter(([,f])=>f.required).map(([f])=>f);for(let f of L)if(w[f]==null)throw new A(`Missing required parameter: '${f}'`);const Z=Z1(M,{endpointParams:w,logger:G,referenceRecord:{}});return U.logger?.debug?.(`${y} Resolved endpoint: ${k(Z)}`),Z};var A$=($,U=!1)=>{if(U){for(let w of $.split("."))if(!A$(w))return!1;return!0}if(!P0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(N0($))return!1;return!0};var kW=($)=>{const U=$.split(":");if(U.length<6)return null;const[w,G,W,M,X,...L]=U;if(w!=="arn"||G===""||W===""||L.join(":")==="")return null;const Z=L.map((f)=>f.split("/")).flat();return{partition:G,service:W,region:M,accountId:X,resourceId:Z}};var bW={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|mx)\\-\\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)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"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 z2=bW,Q2="",hW=($)=>{const{partitions:U}=z2;for(let G of U){const{regions:W,outputs:M}=G;for(let[X,L]of Object.entries(W))if(X===$)return{...M,...L}}for(let G of U){const{regionRegex:W,outputs:M}=G;if(new RegExp(W).test($))return{...M}}const w=U.find((G)=>G.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}};var DW=()=>Q2;var F2={isVirtualHostableS3Bucket:A$,parseArn:kW,partition:hW};S0.aws=F2;var K$="user-agent",f1="x-amz-user-agent",q$=" ",I1="/",_W=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,cW=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,B$="-";var J2=($)=>(U,w)=>async(G)=>{const{request:W}=G;if(!S.isInstance(W))return U(G);const{headers:M}=W,X=w?.userAgent?.map(O$)||[],L=(await $.defaultUserAgentProvider()).map(O$),Z=$?.customUserAgent?.map(O$)||[],f=DW(),I=(f?[f]:[]).concat([...L,...X,...Z]).join(q$),R=[...L.filter((Y)=>Y.startsWith("aws-sdk-")),...Z].join(q$);if($.runtime!=="browser"){if(R)M[f1]=M[f1]?`${M[K$]} ${R}`:R;M[K$]=I}else M[f1]=I;return U({...G,request:W})},O$=($)=>{const U=$[0].split(I1).map((X)=>X.replace(_W,B$)).join(I1),w=$[1]?.replace(cW,B$),G=U.indexOf(I1),W=U.substring(0,G);let M=U.substring(G+1);if(W==="api")M=M.toLowerCase();return[W,M,w].filter((X)=>X&&X.length>0).reduce((X,L,Z)=>{switch(Z){case 0:return L;case 1:return`${X}/${L}`;default:return`${X}#${L}`}},"")},A2={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},bE=($)=>({applyToStack:(U)=>{U.add(J2($),A2)}});var R1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var T$=($)=>R1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var pE=($)=>{const{region:U,useFipsEndpoint:w}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return T$(U);const G=await U();return T$(G)},useFipsEndpoint:async()=>{const G=typeof U==="string"?U:await U();if(R1(G))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}};var R0=($,U,w)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${w} "${U}". Expected "true" or "false", got ${$[U]}.`)};var s;(function($){$.ENV="env",$.CONFIG="shared config entry"})(s||(s={}));var K2="AWS_USE_DUALSTACK_ENDPOINT",q2="use_dualstack_endpoint";var aE={environmentVariableSelector:($)=>R0($,K2,s.ENV),configFileSelector:($)=>R0($,q2,s.CONFIG),default:!1};var B2="AWS_USE_FIPS_ENDPOINT",O2="use_fips_endpoint";var UY={environmentVariableSelector:($)=>R0($,B2,s.ENV),configFileSelector:($)=>R0($,O2,s.CONFIG),default:!1};var H$=h($0(),1),xW=($)=>$[H$.SMITHY_CONTEXT_KEY]||($[H$.SMITHY_CONTEXT_KEY]={});var d=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var vW={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},qY={preferredFile:"credentials"};function T2($){return(U)=>async(w)=>{const G=w.request;if(S.isInstance(G)){const{body:W,headers:M}=G;if(W&&Object.keys(M).map((X)=>X.toLowerCase()).indexOf(uW)===-1)try{const X=$(W);G.headers={...G.headers,[uW]:String(X)}}catch(X){}}return U({...w,request:G})}}var uW="content-length",H2={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},lY=($)=>({applyToStack:(U)=>{U.add(T2($.bodyLengthChecker),H2)}});var yW=($,U)=>(w)=>async(G)=>{const{response:W}=await w(G);try{const M=await U(W,$);return{response:W,output:M}}catch(M){if(Object.defineProperty(M,"$response",{value:W}),!("$metadata"in M)){if(M.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof M.$responseBodyText!=="undefined"){if(M.$response)M.$response.body=M.$responseBodyText}}throw M}};var dW=($,U)=>(w,G)=>async(W)=>{const M=G.endpointV2?.url&&$.urlParser?async()=>$.urlParser(G.endpointV2.url):$.endpoint;if(!M)throw new Error("No valid endpoint provider available.");const X=await U(W.input,{...$,endpoint:M});return w({...W,request:X})};function eY($,U,w){return{applyToStack:(G)=>{G.add(yW($,w),V2),G.add(dW($,U),V$)}}}var V2={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},V$={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var pW=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(j2(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!S2(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},C2=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,N2=/(\d+\.){3}\d+/,P2=/\.\./;var S2=($)=>C2.test($)&&!N2.test($)&&!P2.test($),j2=($)=>{const[U,w,G,,,W]=$.split(":"),M=U==="arn"&&$.split(":").length>=6,X=Boolean(M&&w&&G&&W);if(M&&!X)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return X};var gW=($,U,w)=>{const G=async()=>{const W=w[$]??w[U];if(typeof W==="function")return W();return W};if($==="credentialScope"||U==="CredentialScope")return async()=>{const W=typeof w.credentials==="function"?await w.credentials():w.credentials;return W?.credentialScope??W?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const W=typeof w.credentials==="function"?await w.credentials():w.credentials;return W?.accountId??W?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const W=await G();if(W&&typeof W==="object"){if("url"in W)return W.url.href;if("hostname"in W){const{protocol:M,hostname:X,port:L,path:Z}=W;return`${M}//${X}${L?":"+L:""}${Z}`}}return W};return G};var sW="AWS_ENDPOINT_URL",mW="endpoint_url",nW=($)=>({environmentVariableSelector:(U)=>{const w=$.split(" ").map((M)=>M.toUpperCase()),G=U[[sW,...w].join("_")];if(G)return G;const W=U[sW];if(W)return W;return},configFileSelector:(U,w)=>{if(w&&U.services){const W=w[["services",U.services].join(C$)];if(W){const M=$.split(" ").map((L)=>L.toLowerCase()),X=W[[M.join("_"),mW].join(C$)];if(X)return X}}const G=U[mW];if(G)return G;return},default:void 0});var E1=async($)=>o(nW($??""))();var N$=h(Dw(),1),Y1=($)=>{if(typeof $==="object"){if("url"in $)return N$.parseUrl($.url);return $}return N$.parseUrl($)};var lW=async($,U,w,G)=>{if(!w.endpoint){let X;if(w.serviceConfiguredEndpoint)X=await w.serviceConfiguredEndpoint();else X=await E1(w.serviceId);if(X)w.endpoint=()=>Promise.resolve(Y1(X))}const W=await k2($,U,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider(W,G)},k2=async($,U,w)=>{const G={},W=U?.getEndpointParameterInstructions?.()||{};for(let[M,X]of Object.entries(W))switch(X.type){case"staticContextParams":G[M]=X.value;break;case"contextParams":G[M]=$[X.name];break;case"clientContextParams":case"builtInParams":G[M]=await gW(X.name,M,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(X))}if(Object.keys(W).length===0)Object.assign(G,w);if(String(w.serviceId).toLowerCase()==="s3")await pW(G);return G};var rW=({config:$,instructions:U})=>{return(w,G)=>async(W)=>{const M=await lW(W.input,{getEndpointParameterInstructions(){return U}},{...$},G);G.endpointV2=M,G.authSchemes=M.properties?.authSchemes;const X=G.authSchemes?.[0];if(X){G.signing_region=X.signingRegion,G.signing_service=X.signingName;const Z=xW(G)?.selectedHttpAuthScheme?.httpAuthOption;if(Z)Z.signingProperties=Object.assign(Z.signingProperties||{},{signing_region:X.signingRegion,signingRegion:X.signingRegion,signing_service:X.signingName,signingName:X.signingName,signingRegionSet:X.signingRegionSet},X.properties)}return w({...W})}};var b2={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:V$.name},Vz=($,U)=>({applyToStack:(w)=>{w.addRelativeTo(rW({config:$,instructions:U}),b2)}});var jz=($)=>{const U=$.tls??!0,{endpoint:w}=$,G=w!=null?async()=>Y1(await d(w)()):void 0,M={...$,endpoint:G,tls:U,isCustomEndpoint:!!w,useDualstackEndpoint:d($.useDualstackEndpoint??!1),useFipsEndpoint:d($.useFipsEndpoint??!1)};let X=void 0;return M.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!X)X=E1($.serviceId);return X},M};var c;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(c||(c={}));var i=3,oW=c.STANDARD;var iW=h(r(),1);class z1{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((w)=>setTimeout(w,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(),iW.isThrottlingError($)){const G=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=G,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(G),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(w)}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 w=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var t=100,j0=20000,P$=500,Q1=500,S$=5,j$=10,k$=1,F1="amz-sdk-invocation-id",J1="amz-sdk-request";var tW=()=>{let $=t;return{computeNextBackoffDelay:(G)=>{return Math.floor(Math.min(j0,Math.random()*2**G*$))},setDelayBase:(G)=>{$=G}}};var b$=({retryDelay:$,retryCount:U,retryCost:w})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(j0,$),getRetryCost:()=>w}};class E0{constructor($){this.maxAttempts=$,this.mode=c.STANDARD,this.capacity=Q1,this.retryBackoffStrategy=tW(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return b$({retryDelay:t,retryCount:0})}async refreshRetryTokenForRetry($,U){const w=await this.getMaxAttempts();if(this.shouldRetry($,U,w)){const G=U.errorType;this.retryBackoffStrategy.setDelayBase(G==="THROTTLING"?P$:t);const W=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),M=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,W):W,X=this.getCapacityCost(G);return this.capacity-=X,b$({retryDelay:M,retryCount:$.getRetryCount()+1,retryCost:X})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(Q1,this.capacity+($.getRetryCost()??k$))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${i}`),i}}shouldRetry($,U,w){return $.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?j$:S$}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class h${constructor($,U){this.maxAttemptsProvider=$,this.mode=c.ADAPTIVE;const{rateLimiter:w}=U??{};this.rateLimiter=w??new z1,this.standardRetryStrategy=new E0($)}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 aW="AWS_MAX_ATTEMPTS",eW="max_attempts",FQ={environmentVariableSelector:($)=>{const U=$[aW];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Environment variable ${aW} mast be a number, got "${U}"`);return w},configFileSelector:($)=>{const U=$[eW];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Shared config file entry ${eW} mast be a number, got "${U}"`);return w},default:i},JQ=($)=>{const{retryStrategy:U}=$,w=d($.maxAttempts??i);return{...$,maxAttempts:w,retryStrategy:async()=>{if(U)return U;if(await d($.retryMode)()===c.ADAPTIVE)return new h$(w);return new E0(w)}}},h2="AWS_RETRY_MODE",D2="retry_mode",AQ={environmentVariableSelector:($)=>$[h2],configFileSelector:($)=>$[D2],default:oW};var Y0=h(r(),1);import{Readable as _2} from"stream";var $8=($)=>$?.body instanceof _2||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var D$=($)=>{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 c2=($)=>(U,w)=>async(G)=>{let W=await $.retryStrategy();const M=await $.maxAttempts();if(x2(W)){W=W;let X=await W.acquireInitialRetryToken(w.partition_id),L=new Error,Z=0,f=0;const{request:I}=G,R=S.isInstance(I);if(R)I.headers[F1]=lU();while(!0)try{if(R)I.headers[J1]=`attempt=${Z+1}; max=${M}`;const{response:Y,output:z}=await U(G);return W.recordSuccess(X),z.$metadata.attempts=Z+1,z.$metadata.totalRetryDelay=f,{response:Y,output:z}}catch(Y){const z=v2(Y);if(L=D$(Y),R&&$8(I))throw(w.logger instanceof U8?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{X=await W.refreshRetryTokenForRetry(X,z)}catch(J){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=Z+1,L.$metadata.totalRetryDelay=f,L}Z=X.getRetryCount();const F=X.getRetryDelay();f+=F,await new Promise((J)=>setTimeout(J,F))}}else{if(W=W,W?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",W.mode]];return W.retry(U,G)}},x2=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",v2=($)=>{const U={error:$,errorType:u2($)},w=d2($.$response);if(w)U.retryAfterHint=w;return U},u2=($)=>{if(Y0.isThrottlingError($))return"THROTTLING";if(Y0.isTransientError($))return"TRANSIENT";if(Y0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},y2={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},SQ=($)=>({applyToStack:(U)=>{U.add(c2($),y2)}}),d2=($)=>{if(!_$.isInstance($))return;const U=Object.keys($.headers).find((M)=>M.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],G=Number(w);if(!Number.isNaN(G))return new Date(G*1000);return new Date(w)};var p2=h(r(),1);var A1=h(r(),1);import{platform as c6,release as x6} from"os";import{env as OM,versions as v6} from"process";var i$={isCrtAvailable:!1};var BM=()=>{if(i$.isCrtAvailable)return["md/crt-avail"];return null};var u6="AWS_SDK_UA_APP_ID",y6="sdk-ua-app-id",kF=({serviceId:$,clientVersion:U})=>{const w=[["aws-sdk-js",U],["ua","2.0"],[`os/${c6()}`,x6()],["lang/js"],["md/nodejs",`${v6.node}`]],G=BM();if(G)w.push(G);if($)w.push([`api/${$}`,U]);if(OM.AWS_EXECUTION_ENV)w.push([`exec-env/${OM.AWS_EXECUTION_ENV}`]);const W=o({environmentVariableSelector:(X)=>X[u6],configFileSelector:(X)=>X[y6],default:void 0})();let M=void 0;return async()=>{if(!M){const X=await W;M=X?[...w,[`app/${X}`]]:[...w]}return M}};var c0=h(d6(),1),HM=h(k0(),1);import{Buffer as p6} from"buffer";import{createHash as g6,createHmac as s6} from"crypto";var TM=function($,U){if(p6.isBuffer($))return $;if(typeof $==="string")return c0.fromString($,U);if(ArrayBuffer.isView($))return c0.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength);return c0.fromArrayBuffer($)};class m6{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(HM.toUint8Array(TM($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?s6(this.algorithmIdentifier,TM(this.secret)):g6(this.algorithmIdentifier)}}import{fstatSync as n6,lstatSync as l6} from"fs";var vF=($)=>{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 l6($.path).size;else if(typeof $.fd==="number")return n6($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var jM=h(s1(),1);var VM="AWS_EXECUTION_ENV",t$="AWS_REGION",a$="AWS_DEFAULT_REGION",CM="AWS_EC2_METADATA_DISABLED",NM=["in-region","cross-region","mobile","standard","legacy"],PM="/latest/meta-data/placement/region";var SM={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var rF=({region:$=o(vW),defaultsMode:U=o(SM)}={})=>jM.memoize(async()=>{const w=typeof U==="function"?await U():U;switch(w?.toLowerCase()){case"auto":return r6($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${NM.join(", ")}, got ${w}`)}}),r6=async($)=>{if($){const U=typeof $==="function"?await $():$,w=await o6();if(!w)return"standard";if(U===w)return"in-region";else return"cross-region"}return"standard"},o6=async()=>{if(process.env[VM]&&(process.env[t$]||process.env[a$]))return process.env[t$]??process.env[a$];if(!process.env[CM])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-e1a4203ece554bc3.js"),w=await $();return(await U({...w,path:PM})).toString()}catch($){}};var aF=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const w=$.region;if(typeof w==="string")return w;return w()};return{setRegion(w){U=w},region(){return U}}},eF=($)=>{return{region:$.region()}};export{lU as N,xW as O,d as P,TI as Q,HI as R,CI as S,kI as T,R0 as U,s as V,Q$ as W,tI as X,f2 as Y,S0 as Z,E2 as _,F2 as $,bE as aa,aE as ba,UY as ca,vW as da,qY as ea,pE as fa,lY as ga,k2 as ha,eY as ia,Vz as ja,jz as ka,oW as la,FQ as ma,JQ as na,AQ as oa,SQ as pa,_6 as qa,kF as ra,m6 as sa,vF as ta,rF as ua,aF as va,eF as wa};
@@ -14,7 +14,11 @@ export interface ServerDataContextValue {
14
14
  is404: boolean;
15
15
  searchParams: string;
16
16
  };
17
- i18n: Translations;
17
+ i18n: {
18
+ dictionary: Translations;
19
+ currentLocale: string;
20
+ supportedLocales: string[];
21
+ };
18
22
  componentTree: ComponentTree;
19
23
  auth: {
20
24
  user: User;
@@ -1 +1 @@
1
- {"version":3,"file":"ServerDataProvider.d.ts","sourceRoot":"","sources":["../../client/ServerDataProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAEnD,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEhC,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAC/C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACrC,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC5B,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,OAAO,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,IAAI,EAAE,YAAY,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI,CAAC;KACZ,CAAC;CACH;AAED,eAAO,MAAM,iBAAiB,iDAA8C,CAAC;AAE7E,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,sBAAsB,CAAC;CAChC;AAED,eAAO,MAAM,kBAAkB,UACtB,iBAAiB,CAAC,uBAAuB,CAAC,4CAgBlD,CAAC"}
1
+ {"version":3,"file":"ServerDataProvider.d.ts","sourceRoot":"","sources":["../../client/ServerDataProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAEnD,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEhC,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAC/C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACrC,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC5B,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,OAAO,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,IAAI,EAAE;QACJ,UAAU,EAAE,YAAY,CAAC;QACzB,aAAa,EAAE,MAAM,CAAC;QACtB,gBAAgB,EAAE,MAAM,EAAE,CAAC;KAC5B,CAAC;IACF,aAAa,EAAE,aAAa,CAAC;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI,CAAC;KACZ,CAAC;CACH;AAED,eAAO,MAAM,iBAAiB,iDAA8C,CAAC;AAE7E,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,sBAAsB,CAAC;CAChC;AAED,eAAO,MAAM,kBAAkB,UACtB,iBAAiB,CAAC,uBAAuB,CAAC,4CAgBlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"I18nContext.d.ts","sourceRoot":"","sources":["../../../client/i18n/I18nContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,OAAO,CAAC;AAGf,KAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/C,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAE7D,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gBAAgB,EAAE,CAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,KACjE,IAAI,CAAC;IACV,YAAY,EAAE,iBAAiB,CAAC;IAChC,iBAAiB,EAAE,CACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,2CAAwC,CAAC;AAEjE,UAAU,iBAAiB;CAAG;AAE9B,MAAM,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAE1E,eAAO,MAAM,YAAY,UAAW,iBAAiB,CAAC,iBAAiB,CAAC,4CAyFvE,CAAC"}
1
+ {"version":3,"file":"I18nContext.d.ts","sourceRoot":"","sources":["../../../client/i18n/I18nContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,OAAO,CAAC;AAGf,KAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/C,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAE7D,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gBAAgB,EAAE,CAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,KACjE,IAAI,CAAC;IACV,YAAY,EAAE,iBAAiB,CAAC;IAChC,iBAAiB,EAAE,CACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,2CAAwC,CAAC;AAEjE,UAAU,iBAAiB;CAAG;AAE9B,MAAM,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAE1E,eAAO,MAAM,YAAY,UAAW,iBAAiB,CAAC,iBAAiB,CAAC,4CAuFvE,CAAC"}
@@ -1548,16 +1548,15 @@ class ProgressManager {
1548
1548
  const I18nContext = createContext({});
1549
1549
  const I18nProvider = (props) => {
1550
1550
  const { i18n } = useContext(ServerDataContext);
1551
- const locale = Object.keys(i18n)[0];
1552
- const [currentLocale, setCurrentLocale] = useState(locale);
1551
+ const [currentLocale, setCurrentLocale] = useState(i18n.currentLocale);
1553
1552
  const [dictionary] = useState(() => {
1554
1553
  const dictionary2 = /* @__PURE__ */ new Map();
1555
- for (const [locale2, value] of Object.entries(i18n)) {
1554
+ for (const [locale, value] of Object.entries(i18n.dictionary)) {
1556
1555
  const scopes = /* @__PURE__ */ new Map();
1557
1556
  for (const [scope, translations] of Object.entries(value)) {
1558
1557
  scopes.set(scope, translations);
1559
1558
  }
1560
- dictionary2.set(locale2, scopes);
1559
+ dictionary2.set(locale, scopes);
1561
1560
  }
1562
1561
  return dictionary2;
1563
1562
  });
@@ -1568,11 +1567,11 @@ const I18nProvider = (props) => {
1568
1567
  return Object.fromEntries(dictionary.get(currentLocale).entries());
1569
1568
  });
1570
1569
  function updateDictionary(translations) {
1571
- for (const [locale2, value] of Object.entries(translations)) {
1572
- if (!dictionary.has(locale2)) {
1573
- dictionary.set(locale2, /* @__PURE__ */ new Map());
1570
+ for (const [locale, value] of Object.entries(translations)) {
1571
+ if (!dictionary.has(locale)) {
1572
+ dictionary.set(locale, /* @__PURE__ */ new Map());
1574
1573
  }
1575
- const scopes = dictionary.get(locale2);
1574
+ const scopes = dictionary.get(locale);
1576
1575
  for (const [scope, translations2] of Object.entries(value)) {
1577
1576
  if (!scopes.has(scope)) {
1578
1577
  scopes.set(scope, {});
@@ -1584,20 +1583,20 @@ const I18nProvider = (props) => {
1584
1583
  Object.fromEntries(dictionary.get(currentLocale).entries())
1585
1584
  );
1586
1585
  }
1587
- const changeLocale = (locale2) => {
1588
- if (dictionary.has(locale2)) {
1589
- setCurrentLocale(locale2);
1586
+ const changeLocale = (locale) => {
1587
+ if (dictionary.has(locale)) {
1588
+ setCurrentLocale(locale);
1590
1589
  setCurrentTranslations(
1591
- Object.fromEntries(dictionary.get(locale2).entries())
1590
+ Object.fromEntries(dictionary.get(locale).entries())
1592
1591
  );
1593
1592
  }
1594
1593
  };
1595
- const fetchTranslations = async (pathname, locale2, signal) => {
1594
+ const fetchTranslations = async (pathname, locale, signal) => {
1596
1595
  if (Object.keys(i18n).length === 0) {
1597
1596
  return;
1598
1597
  }
1599
1598
  const response = await fetch(
1600
- `/api/__gemi__/services/i18n/translations?scope=${pathname}&locale=${locale2 || currentLocale}`,
1599
+ `/api/__gemi__/services/i18n/translations?scope=${pathname}&locale=${locale || currentLocale}`,
1601
1600
  {
1602
1601
  signal
1603
1602
  }