gemi 0.4.65 → 0.4.66
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.
- package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
- package/dist/bin/index.js +7 -6
- package/dist/chunk-02118fc60206588d.js +2 -0
- package/dist/chunk-0de36a7e51fbd11b.js +9 -0
- package/dist/chunk-0e125593337a68aa.js +18 -0
- package/dist/chunk-136896e8038083a1.js +2 -0
- package/dist/chunk-14e60554a2e78f4a.js +2 -0
- package/dist/chunk-1b3b7c2c9ae041ca.js +2 -0
- package/dist/chunk-1d6e287ca9c14fef.js +1 -1
- package/dist/chunk-21b1f7ac5f75cd26.js +2 -0
- package/dist/chunk-25dd80c6d9144f89.js +1 -1
- package/dist/chunk-285299d784985340.js +3 -0
- package/dist/chunk-2a0e8565f874d787.js +18 -0
- package/dist/chunk-2a5b4dfab2e26e21.js +1 -0
- package/dist/chunk-30f854fb2ba73268.js +2 -0
- package/dist/chunk-361f806684fe532e.js +6 -0
- package/dist/chunk-3f1eaa4b49aa9a15.js +3 -0
- package/dist/chunk-42aa6e3d42149620.js +1 -1
- package/dist/chunk-432bbd1d38ff3b52.js +2 -0
- package/dist/chunk-543013123141745c.js +1 -1
- package/dist/chunk-65cd4d128b79bd93.js +2 -0
- package/dist/chunk-699957e6eb705a81.js +2 -0
- package/dist/chunk-6c345dba15e1c3f2.js +2 -0
- package/dist/chunk-6f78f2a54491595d.js +2 -0
- package/dist/chunk-733688c7851fffd1.js +2 -0
- package/dist/chunk-7898dd7609f163e8.js +2 -0
- package/dist/chunk-78ab7bcbe6104c5f.js +2 -0
- package/dist/chunk-7dfb17814922ade0.js +2 -0
- package/dist/chunk-82f72dfc6e27be04.js +1 -0
- package/dist/chunk-8884e59809021f5f.js +2 -0
- package/dist/chunk-8b40d6a498f8bf81.js +2 -0
- package/dist/chunk-8c8c8fd3646b76a1.js +2 -0
- package/dist/chunk-a004fce37a0f5a65.js +2 -0
- package/dist/chunk-a14516ac5e6f78aa.js +1 -0
- package/dist/chunk-a1efc60864e65ef2.js +1 -0
- package/dist/chunk-a35eb04f0c7c9944.js +2 -0
- package/dist/chunk-a4b231bf6d911e01.js +2 -0
- package/dist/chunk-a885dc5561caa8e0.js +3 -0
- package/dist/chunk-b13cfa16a8a18324.js +3 -0
- package/dist/chunk-b3e27ec4b56a20ac.js +2 -0
- package/dist/chunk-b7c4dc1136fcaeb7.js +2 -0
- package/dist/chunk-bdc34785363e3f34.js +2 -0
- package/dist/chunk-bffb8d677e1424a9.js +6 -0
- package/dist/chunk-c6d988f5928a4df1.js +1 -1
- package/dist/chunk-c7e2acfd5087fb30.js +2 -0
- package/dist/chunk-cf7dde2ab1be3a3c.js +1 -0
- package/dist/chunk-cf8b1c7a4e9fc32d.js +18 -0
- package/dist/chunk-d03b02d5f8128f13.js +2 -0
- package/dist/chunk-d27588325ae2c0f3.js +2 -0
- package/dist/chunk-d37757ffee07b05f.js +6 -0
- package/dist/chunk-d3b4a3c778c23705.js +2 -0
- package/dist/chunk-d3e039d010842a3f.js +2 -0
- package/dist/chunk-d7c78cd1ab7dc7ed.js +2 -0
- package/dist/chunk-d850d83873a89e2b.js +18 -0
- package/dist/chunk-d93a6531661d56b5.js +9 -0
- package/dist/chunk-d950bbcb684a11ef.js +2 -0
- package/dist/chunk-dac0e2ef13060d02.js +1 -0
- package/dist/chunk-dac9276e506d125d.js +2 -0
- package/dist/chunk-db2270bbca7854fe.js +2 -0
- package/dist/chunk-e06fbc8e70a88f07.js +2 -0
- package/dist/chunk-e8159722d49ad044.js +1 -1
- package/dist/chunk-ed589d4e4c575de7.js +1 -1
- package/dist/chunk-eea1d6f60a6875d5.js +2 -0
- package/dist/chunk-eeb3b193701aec43.js +1 -0
- package/dist/chunk-f1dfc76a05462dde.js +2 -0
- package/dist/chunk-f25e3644c98f64a7.js +2 -0
- package/dist/chunk-f404a785b581d029.js +2 -0
- package/dist/chunk-f5a531a49e7591bd.js +2 -0
- package/dist/chunk-f69bcbd7998553cb.js +2 -0
- package/dist/chunk-f8ad65b3a07ce3c4.js +6 -0
- package/dist/chunk-ff1bbce70d726bc6.js +9 -0
- package/dist/client/ClientRouterContext.d.ts +0 -1
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/HttpReload.d.ts +2 -0
- package/dist/client/HttpReload.d.ts.map +1 -0
- package/dist/client/Mutation.d.ts +3 -3
- package/dist/client/Mutation.d.ts.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +179 -157
- package/dist/client/useMutation.d.ts +11 -2
- package/dist/client/useMutation.d.ts.map +1 -1
- package/dist/client/useNavigate.d.ts.map +1 -1
- package/dist/client/useParams.d.ts +2 -0
- package/dist/client/useParams.d.ts.map +1 -0
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/HttpRequest.d.ts +1 -1
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/I18nServiceContainer.d.ts +2 -5
- package/dist/http/I18nServiceContainer.d.ts.map +1 -1
- package/dist/http/ViewRouter.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/server/index.js +3 -3
- package/dist/storage/index.js +1 -1
- package/dist/vite/index-M61-SALR.mjs +20030 -0
- package/dist/vite/index.mjs +4 -0
- package/dist/vite/typescript-puyfmcra.mjs +14089 -0
- package/package.json +7 -10
- package/dist/vite/index.js +0 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{y as EU,z as M} from"./chunk-7ce930fe69575c87.js";import{E as NR} from"./chunk-d7c78cd1ab7dc7ed.js";import{H as c,I as vU,J as IX,M as tU,N as xL,Q as vL} from"./chunk-a885dc5561caa8e0.js";import{mb as Q0} from"./chunk-65cd4d128b79bd93.js";import{nb as R5,ob as K0,pb as jU} from"./chunk-30f854fb2ba73268.js";import{vb as NU} from"./chunk-a1efc60864e65ef2.js";import{Eb as gL} from"./chunk-a14516ac5e6f78aa.js";var b0=M(($K,XG)=>{var{defineProperty:Z1,getOwnPropertyDescriptor:tL,getOwnPropertyNames:eL}=Object,$Y=Object.prototype.hasOwnProperty,WG=($,U)=>Z1($,"name",{value:U,configurable:!0}),UY=($,U)=>{for(var G in U)Z1($,G,{get:U[G],enumerable:!0})},GY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of eL(U))if(!$Y.call($,Z)&&Z!==G)Z1($,Z,{get:()=>U[Z],enumerable:!(W=tL(U,Z))||W.enumerable})}return $},WY=($)=>GY(Z1({},"__esModule",{value:!0}),$),ZG={};UY(ZG,{getSmithyContext:()=>ZY,normalizeProvider:()=>XY});XG.exports=WY(ZG);var GG=Q0(),ZY=WG(($)=>$[GG.SMITHY_CONTEXT_KEY]||($[GG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),XY=WG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var w$=M((UK,wG)=>{var{defineProperty:X1,getOwnPropertyDescriptor:LY,getOwnPropertyNames:YY}=Object,FY=Object.prototype.hasOwnProperty,w0=($,U)=>X1($,"name",{value:U,configurable:!0}),QY=($,U)=>{for(var G in U)X1($,G,{get:U[G],enumerable:!0})},wY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of YY(U))if(!FY.call($,Z)&&Z!==G)X1($,Z,{get:()=>U[Z],enumerable:!(W=LY(U,Z))||W.enumerable})}return $},zY=($)=>wY(X1({},"__esModule",{value:!0}),$),LG={};QY(LG,{CredentialsProviderError:()=>IY,ProviderError:()=>L1,TokenProviderError:()=>JY,chain:()=>RY,fromStatic:()=>KY,memoize:()=>MY});wG.exports=zY(LG);var YG=class $ extends Error{constructor(U,G=!0){var W;let Z,X=!0;if(typeof G==="boolean")Z=void 0,X=G;else if(G!=null&&typeof G==="object")Z=G.logger,X=G.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=X,Object.setPrototypeOf(this,$.prototype),(W=Z==null?void 0:Z.debug)==null||W.call(Z,`@smithy/property-provider ${X?"->":"(!)"} ${U}`)}static from(U,G=!0){return Object.assign(new this(U.message,G),U)}};w0(YG,"ProviderError");var L1=YG,FG=class $ extends L1{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};w0(FG,"CredentialsProviderError");var IY=FG,QG=class $ extends L1{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};w0(QG,"TokenProviderError");var JY=QG,RY=w0((...$)=>async()=>{if($.length===0)throw new L1("No providers in chain");let U;for(let G of $)try{return await G()}catch(W){if(U=W,W==null?void 0:W.tryNextLink)continue;throw W}throw U},"chain"),KY=w0(($)=>()=>Promise.resolve($),"fromStatic"),MY=w0(($,U,G)=>{let W,Z,X,L=!1;const Y=w0(async()=>{if(!Z)Z=$();try{W=await Z,X=!0,L=!1}finally{Z=void 0}return W},"coalesceProvider");if(U===void 0)return async(F)=>{if(!X||(F==null?void 0:F.forceRefresh))W=await Y();return W};return async(F)=>{if(!X||(F==null?void 0:F.forceRefresh))W=await Y();if(L)return W;if(G&&!G(W))return L=!0,W;if(U(W))return await Y(),W;return W}},"memoize")});var T0=M((zG)=>{Object.defineProperty(zG,"__esModule",{value:!0});zG.getHomeDir=void 0;var EY=import.meta.require("os"),VY=import.meta.require("path"),z$={},BY=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},TY=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${VY.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const Z=BY();if(!z$[Z])z$[Z]=EY.homedir();return z$[Z]};zG.getHomeDir=TY});var I$=M((JG)=>{Object.defineProperty(JG,"__esModule",{value:!0});JG.getSSOTokenFilepath=void 0;var AY=import.meta.require("crypto"),HY=import.meta.require("path"),OY=T0(),CY=($)=>{const G=AY.createHash("sha1").update($).digest("hex");return HY.join(OY.getHomeDir(),".aws","sso","cache",`${G}.json`)};JG.getSSOTokenFilepath=CY});var EG=M((KG)=>{Object.defineProperty(KG,"__esModule",{value:!0});KG.getSSOTokenFromFile=void 0;var qY=import.meta.require("fs"),fY=I$(),{readFile:NY}=qY.promises,jY=async($)=>{const U=fY.getSSOTokenFilepath($),G=await NY(U,"utf8");return JSON.parse(G)};KG.getSSOTokenFromFile=jY});var R$=M((VG)=>{Object.defineProperty(VG,"__esModule",{value:!0});VG.slurpFile=void 0;var PY=import.meta.require("fs"),{readFile:SY}=PY.promises,J$={},DY=($,U)=>{if(!J$[$]||(U===null||U===void 0?void 0:U.ignoreCache))J$[$]=SY($,"utf8");return J$[$]};VG.slurpFile=DY});var V$=M((LK,x0)=>{var{defineProperty:Q1,getOwnPropertyDescriptor:kY,getOwnPropertyNames:bY}=Object,hY=Object.prototype.hasOwnProperty,y=($,U)=>Q1($,"name",{value:U,configurable:!0}),xY=($,U)=>{for(var G in U)Q1($,G,{get:U[G],enumerable:!0})},K$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of bY(U))if(!hY.call($,Z)&&Z!==G)Q1($,Z,{get:()=>U[Z],enumerable:!(W=kY(U,Z))||W.enumerable})}return $},E$=($,U,G)=>(K$($,U,"default"),G&&K$(G,U,"default")),vY=($)=>K$(Q1({},"__esModule",{value:!0}),$),h0={};xY(h0,{CONFIG_PREFIX_SEPARATOR:()=>z0,DEFAULT_PROFILE:()=>OG,ENV_PROFILE:()=>HG,getProfileName:()=>cY,loadSharedConfigFiles:()=>qG,loadSsoSessionData:()=>oY,parseKnownFiles:()=>tY});x0.exports=vY(h0);E$(h0,T0(),x0.exports);var HG="AWS_PROFILE",OG="default",cY=y(($)=>$.profile||process.env[HG]||OG,"getProfileName");E$(h0,I$(),x0.exports);E$(h0,EG(),x0.exports);var Y1=Q0(),yY=y(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(z0);if(G===-1)return!1;return Object.values(Y1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const Z=G.indexOf(z0),X=G.substring(0,Z)===Y1.IniSectionType.PROFILE?G.substring(Z+1):G;return U[X]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),F1=import.meta.require("path"),uY=T0(),_Y="AWS_CONFIG_FILE",CG=y(()=>process.env[_Y]||F1.join(uY.getHomeDir(),".aws","config"),"getConfigFilepath"),dY=T0(),gY="AWS_SHARED_CREDENTIALS_FILE",pY=y(()=>process.env[gY]||F1.join(dY.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),lY=T0(),sY=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,mY=["__proto__","profile __proto__"],M$=y(($)=>{const U={};let G,W;for(let Z of $.split(/\r?\n/)){const X=Z.split(/(^|\s)[;#]/)[0].trim();if(X[0]==="["&&X[X.length-1]==="]"){G=void 0,W=void 0;const Y=X.substring(1,X.length-1),F=sY.exec(Y);if(F){const[,Q,,w]=F;if(Object.values(Y1.IniSectionType).includes(Q))G=[Q,w].join(z0)}else G=Y;if(mY.includes(Y))throw new Error(`Found invalid profile name "${Y}"`)}else if(G){const Y=X.indexOf("=");if(![0,-1].includes(Y)){const[F,Q]=[X.substring(0,Y).trim(),X.substring(Y+1).trim()];if(Q==="")W=F;else{if(W&&Z.trimStart()===Z)W=void 0;U[G]=U[G]||{};const w=W?[W,F].join(z0):F;U[G][w]=Q}}}}return U},"parseIni"),TG=R$(),AG=y(()=>({}),"swallowError"),z0=".",qG=y(async($={})=>{const{filepath:U=pY(),configFilepath:G=CG()}=$,W=lY.getHomeDir();let X=U;if(U.startsWith("~/"))X=F1.join(W,U.slice(2));let L=G;if(G.startsWith("~/"))L=F1.join(W,G.slice(2));const Y=await Promise.all([TG.slurpFile(L,{ignoreCache:$.ignoreCache}).then(M$).then(yY).catch(AG),TG.slurpFile(X,{ignoreCache:$.ignoreCache}).then(M$).catch(AG)]);return{configFile:Y[0],credentialsFile:Y[1]}},"loadSharedConfigFiles"),nY=y(($)=>Object.entries($).filter(([U])=>U.startsWith(Y1.IniSectionType.SSO_SESSION+z0)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(z0)+1)]:W}),{}),"getSsoSessionData"),iY=R$(),rY=y(()=>({}),"swallowError"),oY=y(async($={})=>iY.slurpFile($.configFilepath??CG()).then(M$).then(nY).catch(rY),"loadSsoSessionData"),aY=y((...$)=>{const U={};for(let G of $)for(let[W,Z]of Object.entries(G))if(U[W]!==void 0)Object.assign(U[W],Z);else U[W]=Z;return U},"mergeConfigFiles"),tY=y(async($)=>{const U=await qG($);return aY(U.configFile,U.credentialsFile)},"parseKnownFiles")});var PG=M((YK,jG)=>{var B$=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 $}},w1=Object.defineProperty,eY=Object.getOwnPropertyDescriptor,$5=Object.getOwnPropertyNames,U5=Object.prototype.hasOwnProperty,A0=($,U)=>w1($,"name",{value:U,configurable:!0}),G5=($,U)=>{for(var G in U)w1($,G,{get:U[G],enumerable:!0})},W5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of $5(U))if(!U5.call($,Z)&&Z!==G)w1($,Z,{get:()=>U[Z],enumerable:!(W=eY(U,Z))||W.enumerable})}return $},Z5=($)=>W5(w1({},"__esModule",{value:!0}),$),NG={};G5(NG,{loadConfig:()=>Q5});jG.exports=Z5(NG);var v0=w$();A0(B$,"getSelectorName");var X5=A0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new v0.CredentialsProviderError(G.message||`Not found in ENV: ${B$($.toString())}`,{logger:U})}},"fromEnv"),fG=V$(),L5=A0(($,{preferredFile:U="config",...G}={})=>async()=>{const W=fG.getProfileName(G),{configFile:Z,credentialsFile:X}=await fG.loadSharedConfigFiles(G),L=X[W]||{},Y=Z[W]||{},F=U==="config"?{...L,...Y}:{...Y,...L};try{const w=$(F,U==="config"?Z:X);if(w===void 0)throw new Error;return w}catch(Q){throw new v0.CredentialsProviderError(Q.message||`Not found in config files w/ profile [${W}]: ${B$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),Y5=A0(($)=>typeof $==="function","isFunction"),F5=A0(($)=>Y5($)?async()=>await $():v0.fromStatic($),"fromStatic"),Q5=A0(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>v0.memoize(v0.chain(X5($),L5(U,W),F5(G))),"loadConfig")});var xG=M((bG)=>{Object.defineProperty(bG,"__esModule",{value:!0});bG.getEndpointUrlConfig=void 0;var SG=V$(),DG="AWS_ENDPOINT_URL",kG="endpoint_url",w5=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((X)=>X.toUpperCase()),W=U[[DG,...G].join("_")];if(W)return W;const Z=U[DG];if(Z)return Z;return},configFileSelector:(U,G)=>{if(G&&U.services){const Z=G[["services",U.services].join(SG.CONFIG_PREFIX_SEPARATOR)];if(Z){const X=$.split(" ").map((Y)=>Y.toLowerCase()),L=Z[[X.join("_"),kG].join(SG.CONFIG_PREFIX_SEPARATOR)];if(L)return L}}const W=U[kG];if(W)return W;return},default:void 0});bG.getEndpointUrlConfig=w5});var yG=M((vG)=>{Object.defineProperty(vG,"__esModule",{value:!0});vG.getEndpointFromConfig=void 0;var z5=PG(),I5=xG(),J5=async($)=>z5.loadConfig(I5.getEndpointUrlConfig($))();vG.getEndpointFromConfig=J5});var gG=M((wK,dG)=>{var{defineProperty:z1,getOwnPropertyDescriptor:K5,getOwnPropertyNames:M5}=Object,E5=Object.prototype.hasOwnProperty,V5=($,U)=>z1($,"name",{value:U,configurable:!0}),B5=($,U)=>{for(var G in U)z1($,G,{get:U[G],enumerable:!0})},T5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of M5(U))if(!E5.call($,Z)&&Z!==G)z1($,Z,{get:()=>U[Z],enumerable:!(W=K5(U,Z))||W.enumerable})}return $},A5=($)=>T5(z1({},"__esModule",{value:!0}),$),uG={};B5(uG,{parseUrl:()=>_G});dG.exports=A5(uG);var H5=R5(),_G=V5(($)=>{if(typeof $==="string")return _G(new URL($));const{hostname:U,pathname:G,port:W,protocol:Z,search:X}=$;let L;if(X)L=H5.parseQueryString(X);return{hostname:U,port:W?parseInt(W):void 0,protocol:Z,path:G,query:L}},"parseUrl")});var A$=M((zK,rG)=>{var iG=function($,U,G){return{applyToStack:(W)=>{W.add(lG($,G),mG),W.add(sG($,U),nG)}}},I1=Object.defineProperty,O5=Object.getOwnPropertyDescriptor,C5=Object.getOwnPropertyNames,q5=Object.prototype.hasOwnProperty,T$=($,U)=>I1($,"name",{value:U,configurable:!0}),f5=($,U)=>{for(var G in U)I1($,G,{get:U[G],enumerable:!0})},N5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of C5(U))if(!q5.call($,Z)&&Z!==G)I1($,Z,{get:()=>U[Z],enumerable:!(W=O5(U,Z))||W.enumerable})}return $},j5=($)=>N5(I1({},"__esModule",{value:!0}),$),pG={};f5(pG,{deserializerMiddleware:()=>lG,deserializerMiddlewareOption:()=>mG,getSerdePlugin:()=>iG,serializerMiddleware:()=>sG,serializerMiddlewareOption:()=>nG});rG.exports=j5(pG);var lG=T$(($,U)=>(G)=>async(W)=>{const{response:Z}=await G(W);try{const X=await U(Z,$);return{response:Z,output:X}}catch(X){if(Object.defineProperty(X,"$response",{value:Z}),!("$metadata"in X)){if(X.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof X.$responseBodyText!=="undefined"){if(X.$response)X.$response.body=X.$responseBodyText}}throw X}},"deserializerMiddleware"),sG=T$(($,U)=>(G,W)=>async(Z)=>{var X;const L=((X=W.endpointV2)==null?void 0:X.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");const Y=await U(Z.input,{...$,endpoint:L});return G({...Z,request:Y})},"serializerMiddleware"),mG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},nG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};T$(iG,"getSerdePlugin")});var W8=M((IK,G8)=>{var{defineProperty:R1,getOwnPropertyDescriptor:P5,getOwnPropertyNames:S5}=Object,D5=Object.prototype.hasOwnProperty,g=($,U)=>R1($,"name",{value:U,configurable:!0}),k5=($,U)=>{for(var G in U)R1($,G,{get:U[G],enumerable:!0})},b5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of S5(U))if(!D5.call($,Z)&&Z!==G)R1($,Z,{get:()=>U[Z],enumerable:!(W=P5(U,Z))||W.enumerable})}return $},h5=($)=>b5(R1({},"__esModule",{value:!0}),$),aG={};k5(aG,{endpointMiddleware:()=>$8,endpointMiddlewareOptions:()=>U8,getEndpointFromInstructions:()=>tG,getEndpointPlugin:()=>l5,resolveEndpointConfig:()=>s5,resolveParams:()=>eG,toEndpointV1:()=>H$});G8.exports=h5(aG);var x5=g(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(_5(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!u5(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),v5=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,c5=/(\d+\.){3}\d+/,y5=/\.\./,u5=g(($)=>v5.test($)&&!c5.test($)&&!y5.test($),"isDnsCompatibleBucketName"),_5=g(($)=>{const[U,G,W,,,Z]=$.split(":"),X=U==="arn"&&$.split(":").length>=6,L=Boolean(X&&G&&W&&Z);if(X&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L},"isArnBucketName"),d5=g(($,U,G)=>{const W=g(async()=>{const Z=G[$]??G[U];if(typeof Z==="function")return Z();return Z},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return(Z==null?void 0:Z.credentialScope)??(Z==null?void 0:Z.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return(Z==null?void 0:Z.accountId)??(Z==null?void 0:Z.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const Z=await W();if(Z&&typeof Z==="object"){if("url"in Z)return Z.url.href;if("hostname"in Z){const{protocol:X,hostname:L,port:Y,path:F}=Z;return`${X}//${L}${Y?":"+Y:""}${F}`}}return Z};return W},"createConfigValueProvider"),g5=yG(),oG=gG(),H$=g(($)=>{if(typeof $==="object"){if("url"in $)return oG.parseUrl($.url);return $}return oG.parseUrl($)},"toEndpointV1"),tG=g(async($,U,G,W)=>{if(!G.endpoint){const L=await g5.getEndpointFromConfig(G.serviceId||"");if(L)G.endpoint=()=>Promise.resolve(H$(L))}const Z=await eG($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(Z,W)},"getEndpointFromInstructions"),eG=g(async($,U,G)=>{var W;const Z={},X=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[L,Y]of Object.entries(X))switch(Y.type){case"staticContextParams":Z[L]=Y.value;break;case"contextParams":Z[L]=$[Y.name];break;case"clientContextParams":case"builtInParams":Z[L]=await d5(Y.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Y))}if(Object.keys(X).length===0)Object.assign(Z,G);if(String(G.serviceId).toLowerCase()==="s3")await x5(Z);return Z},"resolveParams"),J1=b0(),$8=g(({config:$,instructions:U})=>{return(G,W)=>async(Z)=>{var X,L,Y;const F=await tG(Z.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=F,W.authSchemes=(X=F.properties)==null?void 0:X.authSchemes;const Q=(L=W.authSchemes)==null?void 0:L[0];if(Q){W.signing_region=Q.signingRegion,W.signing_service=Q.signingName;const w=J1.getSmithyContext(W),z=(Y=w==null?void 0:w.selectedHttpAuthScheme)==null?void 0:Y.httpAuthOption;if(z)z.signingProperties=Object.assign(z.signingProperties||{},{signing_region:Q.signingRegion,signingRegion:Q.signingRegion,signing_service:Q.signingName,signingName:Q.signingName,signingRegionSet:Q.signingRegionSet},Q.properties)}return G({...Z})}},"endpointMiddleware"),p5=A$(),U8={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:p5.serializerMiddlewareOption.name},l5=g(($,U)=>({applyToStack:(G)=>{G.addRelativeTo($8({config:$,instructions:U}),U8)}}),"getEndpointPlugin"),s5=g(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>H$(await J1.normalizeProvider(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:J1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:J1.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var i=M((JK,I8)=>{var Q8=function($){return Object.keys($).reduce((U,G)=>{const W=$[G];return{...U,[G]:Array.isArray(W)?[...W]:W}},{})},z8=function($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)},K1=Object.defineProperty,m5=Object.getOwnPropertyDescriptor,n5=Object.getOwnPropertyNames,i5=Object.prototype.hasOwnProperty,$0=($,U)=>K1($,"name",{value:U,configurable:!0}),r5=($,U)=>{for(var G in U)K1($,G,{get:U[G],enumerable:!0})},o5=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of n5(U))if(!i5.call($,Z)&&Z!==G)K1($,Z,{get:()=>U[Z],enumerable:!(W=m5(U,Z))||W.enumerable})}return $},a5=($)=>o5(K1({},"__esModule",{value:!0}),$),Z8={};r5(Z8,{Field:()=>$2,Fields:()=>U2,HttpRequest:()=>G2,HttpResponse:()=>W2,IHttpRequest:()=>X8.HttpRequest,getHttpHandlerExtensionConfiguration:()=>t5,isValidHostname:()=>z8,resolveHttpHandlerRuntimeConfig:()=>e5});I8.exports=a5(Z8);var t5=$0(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),e5=$0(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),X8=Q0(),L8=class ${constructor({name:U,kind:G=X8.FieldPosition.HEADER,values:W=[]}){this.name=U,this.kind=G,this.values=W}add(U){this.values.push(U)}set(U){this.values=U}remove(U){this.values=this.values.filter((G)=>G!==U)}toString(){return this.values.map((U)=>U.includes(",")||U.includes(" ")?`"${U}"`:U).join(", ")}get(){return this.values}};$0(L8,"Field");var $2=L8,Y8=class ${constructor({fields:U=[],encoding:G="utf-8"}){this.entries={},U.forEach(this.setField.bind(this)),this.encoding=G}setField(U){this.entries[U.name.toLowerCase()]=U}getField(U){return this.entries[U.toLowerCase()]}removeField(U){delete this.entries[U.toLowerCase()]}getByType(U){return Object.values(this.entries).filter((G)=>G.kind===U)}};$0(Y8,"Fields");var U2=Y8,F8=class ${constructor(U){this.method=U.method||"GET",this.hostname=U.hostname||"localhost",this.port=U.port,this.query=U.query||{},this.headers=U.headers||{},this.body=U.body,this.protocol=U.protocol?U.protocol.slice(-1)!==":"?`${U.protocol}:`:U.protocol:"https:",this.path=U.path?U.path.charAt(0)!=="/"?`/${U.path}`:U.path:"/",this.username=U.username,this.password=U.password,this.fragment=U.fragment}static clone(U){const G=new $({...U,headers:{...U.headers}});if(G.query)G.query=Q8(G.query);return G}static isInstance(U){if(!U)return!1;const G=U;return"method"in G&&"protocol"in G&&"hostname"in G&&"path"in G&&typeof G.query==="object"&&typeof G.headers==="object"}clone(){return $.clone(this)}};$0(F8,"HttpRequest");var G2=F8;$0(Q8,"cloneQuery");var w8=class ${constructor(U){this.statusCode=U.statusCode,this.reason=U.reason,this.headers=U.headers||{},this.body=U.body}static isInstance(U){if(!U)return!1;const G=U;return typeof G.statusCode==="number"&&typeof G.headers==="object"}};$0(w8,"HttpResponse");var W2=w8;$0(z8,"isValidHostname")});var O$=M((J8)=>{var X2=function($){return $&&$.__esModule?$:{default:$}},L2=function(){if(M1>E1.length-16)Z2.default.randomFillSync(E1),M1=0;return E1.slice(M1,M1+=16)};Object.defineProperty(J8,"__esModule",{value:!0});J8.default=L2;var Z2=X2(import.meta.require("crypto")),E1=new Uint8Array(256),M1=E1.length});var M8=M((R8)=>{Object.defineProperty(R8,"__esModule",{value:!0});R8.default=void 0;var F2=/^(?:[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;R8.default=F2});var c0=M((E8)=>{var w2=function($){return $&&$.__esModule?$:{default:$}},z2=function($){return typeof $==="string"&&Q2.default.test($)};Object.defineProperty(E8,"__esModule",{value:!0});E8.default=void 0;var Q2=w2(M8()),I2=z2;E8.default=I2});var y0=M((T8)=>{var R2=function($){return $&&$.__esModule?$:{default:$}},B8=function($,U=0){return k[$[U+0]]+k[$[U+1]]+k[$[U+2]]+k[$[U+3]]+"-"+k[$[U+4]]+k[$[U+5]]+"-"+k[$[U+6]]+k[$[U+7]]+"-"+k[$[U+8]]+k[$[U+9]]+"-"+k[$[U+10]]+k[$[U+11]]+k[$[U+12]]+k[$[U+13]]+k[$[U+14]]+k[$[U+15]]},K2=function($,U=0){const G=B8($,U);if(!J2.default(G))throw TypeError("Stringified UUID is invalid");return G};Object.defineProperty(T8,"__esModule",{value:!0});T8.default=void 0;T8.unsafeStringify=B8;var J2=R2(c0()),k=[];for(let $=0;$<256;++$)k.push(($+256).toString(16).slice(1));var M2=K2;T8.default=M2});var q8=M((O8)=>{var T2=function($){return $&&$.__esModule?$:{default:$}},A2=function($,U,G){let W=U&&G||0;const Z=U||new Array(16);$=$||{};let X=$.node||H8,L=$.clockseq!==void 0?$.clockseq:C$;if(X==null||L==null){const I=$.random||($.rng||V2.default)();if(X==null)X=H8=[I[0]|1,I[1],I[2],I[3],I[4],I[5]];if(L==null)L=C$=(I[6]<<8|I[7])&16383}let Y=$.msecs!==void 0?$.msecs:Date.now(),F=$.nsecs!==void 0?$.nsecs:f$+1;const Q=Y-q$+(F-f$)/1e4;if(Q<0&&$.clockseq===void 0)L=L+1&16383;if((Q<0||Y>q$)&&$.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");q$=Y,f$=F,C$=L,Y+=12219292800000;const w=((Y&268435455)*1e4+F)%4294967296;Z[W++]=w>>>24&255,Z[W++]=w>>>16&255,Z[W++]=w>>>8&255,Z[W++]=w&255;const z=Y/4294967296*1e4&268435455;Z[W++]=z>>>8&255,Z[W++]=z&255,Z[W++]=z>>>24&15|16,Z[W++]=z>>>16&255,Z[W++]=L>>>8|128,Z[W++]=L&255;for(let I=0;I<6;++I)Z[W+I]=X[I];return U||B2.unsafeStringify(Z)};Object.defineProperty(O8,"__esModule",{value:!0});O8.default=void 0;var V2=T2(O$()),B2=y0(),H8,C$,q$=0,f$=0,H2=A2;O8.default=H2});var N$=M((f8)=>{var C2=function($){return $&&$.__esModule?$:{default:$}},q2=function($){if(!O2.default($))throw TypeError("Invalid UUID");let U;const G=new Uint8Array(16);return G[0]=(U=parseInt($.slice(0,8),16))>>>24,G[1]=U>>>16&255,G[2]=U>>>8&255,G[3]=U&255,G[4]=(U=parseInt($.slice(9,13),16))>>>8,G[5]=U&255,G[6]=(U=parseInt($.slice(14,18),16))>>>8,G[7]=U&255,G[8]=(U=parseInt($.slice(19,23),16))>>>8,G[9]=U&255,G[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,G[11]=U/4294967296&255,G[12]=U>>>24&255,G[13]=U>>>16&255,G[14]=U>>>8&255,G[15]=U&255,G};Object.defineProperty(f8,"__esModule",{value:!0});f8.default=void 0;var O2=C2(c0()),f2=q2;f8.default=f2});var j$=M((S8)=>{var P2=function($){return $&&$.__esModule?$:{default:$}},S2=function($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U},D2=function($,U,G){function W(Z,X,L,Y){var F;if(typeof Z==="string")Z=S2(Z);if(typeof X==="string")X=j2.default(X);if(((F=X)===null||F===void 0?void 0:F.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let Q=new Uint8Array(16+Z.length);if(Q.set(X),Q.set(Z,X.length),Q=G(Q),Q[6]=Q[6]&15|U,Q[8]=Q[8]&63|128,L){Y=Y||0;for(let w=0;w<16;++w)L[Y+w]=Q[w];return L}return N2.unsafeStringify(Q)}try{W.name=$}catch(Z){}return W.DNS=j8,W.URL=P8,W};Object.defineProperty(S8,"__esModule",{value:!0});S8.URL=S8.DNS=void 0;S8.default=D2;var N2=y0(),j2=P2(N$()),j8="6ba7b810-9dad-11d1-80b4-00c04fd430c8";S8.DNS=j8;var P8="6ba7b811-9dad-11d1-80b4-00c04fd430c8";S8.URL=P8});var h8=M((k8)=>{var x2=function($){return $&&$.__esModule?$:{default:$}},v2=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return h2.default.createHash("md5").update($).digest()};Object.defineProperty(k8,"__esModule",{value:!0});k8.default=void 0;var h2=x2(import.meta.require("crypto")),c2=v2;k8.default=c2});var y8=M((v8)=>{var x8=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(v8,"__esModule",{value:!0});v8.default=void 0;var y2=x8(j$()),u2=x8(h8()),_2=y2.default("v3",48,u2.default),d2=_2;v8.default=d2});var d8=M((u8)=>{var p2=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(u8,"__esModule",{value:!0});u8.default=void 0;var g2=p2(import.meta.require("crypto")),l2={randomUUID:g2.default.randomUUID};u8.default=l2});var m8=M((l8)=>{var p8=function($){return $&&$.__esModule?$:{default:$}},n2=function($,U,G){if(g8.default.randomUUID&&!U&&!$)return g8.default.randomUUID();$=$||{};const W=$.random||($.rng||s2.default)();if(W[6]=W[6]&15|64,W[8]=W[8]&63|128,U){G=G||0;for(let Z=0;Z<16;++Z)U[G+Z]=W[Z];return U}return m2.unsafeStringify(W)};Object.defineProperty(l8,"__esModule",{value:!0});l8.default=void 0;var g8=p8(d8()),s2=p8(O$()),m2=y0(),i2=n2;l8.default=i2});var r8=M((n8)=>{var o2=function($){return $&&$.__esModule?$:{default:$}},a2=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return r2.default.createHash("sha1").update($).digest()};Object.defineProperty(n8,"__esModule",{value:!0});n8.default=void 0;var r2=o2(import.meta.require("crypto")),t2=a2;n8.default=t2});var e8=M((a8)=>{var o8=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(a8,"__esModule",{value:!0});a8.default=void 0;var e2=o8(j$()),$9=o8(r8()),U9=e2.default("v5",80,$9.default),G9=U9;a8.default=G9});var G4=M(($4)=>{Object.defineProperty($4,"__esModule",{value:!0});$4.default=void 0;var W9="00000000-0000-0000-0000-000000000000";$4.default=W9});var X4=M((W4)=>{var X9=function($){return $&&$.__esModule?$:{default:$}},L9=function($){if(!Z9.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(W4,"__esModule",{value:!0});W4.default=void 0;var Z9=X9(c0()),Y9=L9;W4.default=Y9});var P$=M((p)=>{var r=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(p,"__esModule",{value:!0});Object.defineProperty(p,"NIL",{enumerable:!0,get:function(){return I9.default}});Object.defineProperty(p,"parse",{enumerable:!0,get:function(){return M9.default}});Object.defineProperty(p,"stringify",{enumerable:!0,get:function(){return K9.default}});Object.defineProperty(p,"v1",{enumerable:!0,get:function(){return F9.default}});Object.defineProperty(p,"v3",{enumerable:!0,get:function(){return Q9.default}});Object.defineProperty(p,"v4",{enumerable:!0,get:function(){return w9.default}});Object.defineProperty(p,"v5",{enumerable:!0,get:function(){return z9.default}});Object.defineProperty(p,"validate",{enumerable:!0,get:function(){return R9.default}});Object.defineProperty(p,"version",{enumerable:!0,get:function(){return J9.default}});var F9=r(q8()),Q9=r(y8()),w9=r(m8()),z9=r(e8()),I9=r(G4()),J9=r(X4()),R9=r(c0()),K9=r(y0()),M9=r(N$())});var S$=M((SK,Q4)=>{var{defineProperty:V1,getOwnPropertyDescriptor:E9,getOwnPropertyNames:V9}=Object,B9=Object.prototype.hasOwnProperty,H0=($,U)=>V1($,"name",{value:U,configurable:!0}),T9=($,U)=>{for(var G in U)V1($,G,{get:U[G],enumerable:!0})},A9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of V9(U))if(!B9.call($,Z)&&Z!==G)V1($,Z,{get:()=>U[Z],enumerable:!(W=E9(U,Z))||W.enumerable})}return $},H9=($)=>A9(V1({},"__esModule",{value:!0}),$),L4={};T9(L4,{isClockSkewCorrectedError:()=>Y4,isClockSkewError:()=>P9,isRetryableByTrait:()=>j9,isServerError:()=>D9,isThrottlingError:()=>S9,isTransientError:()=>F4});Q4.exports=H9(L4);var O9=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],C9=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],q9=["TimeoutError","RequestTimeout","RequestTimeoutException"],f9=[500,502,503,504],N9=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],j9=H0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),P9=H0(($)=>O9.includes($.name),"isClockSkewError"),Y4=H0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),S9=H0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||C9.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),F4=H0(($)=>{var U;return Y4($)||q9.includes($.name)||N9.includes(($==null?void 0:$.code)||"")||f9.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),D9=H0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!F4($))return!0;return!1}return!1},"isServerError")});var O4=M((DK,H4)=>{var{defineProperty:B1,getOwnPropertyDescriptor:k9,getOwnPropertyNames:b9}=Object,h9=Object.prototype.hasOwnProperty,l=($,U)=>B1($,"name",{value:U,configurable:!0}),x9=($,U)=>{for(var G in U)B1($,G,{get:U[G],enumerable:!0})},v9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of b9(U))if(!h9.call($,Z)&&Z!==G)B1($,Z,{get:()=>U[Z],enumerable:!(W=k9(U,Z))||W.enumerable})}return $},c9=($)=>v9(B1({},"__esModule",{value:!0}),$),z4={};x9(z4,{AdaptiveRetryStrategy:()=>p9,ConfiguredRetryStrategy:()=>l9,DEFAULT_MAX_ATTEMPTS:()=>D$,DEFAULT_RETRY_DELAY_BASE:()=>u0,DEFAULT_RETRY_MODE:()=>y9,DefaultRateLimiter:()=>R4,INITIAL_RETRY_TOKENS:()=>k$,INVOCATION_ID_HEADER:()=>_9,MAXIMUM_RETRY_DELAY:()=>b$,NO_RETRY_INCREMENT:()=>V4,REQUEST_HEADER:()=>d9,RETRY_COST:()=>M4,RETRY_MODES:()=>I4,StandardRetryStrategy:()=>h$,THROTTLING_RETRY_DELAY_BASE:()=>K4,TIMEOUT_RETRY_COST:()=>E4});H4.exports=c9(z4);var I4=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(I4||{}),D$=3,y9="standard",u9=S$(),J4=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;const G=this.getCurrentTimeInSeconds();this.lastThrottleTime=G,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){const G=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>setTimeout(W,G))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const G=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+G),this.lastTimestamp=U}updateClientSendingRate(U){let G;if(this.updateMeasuredRate(),u9.isThrottlingError(U)){const Z=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=Z,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(Z),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());const W=Math.min(G,2*this.measuredTxRate);this.updateTokenBucketRate(W)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){const W=this.requestCount/(G-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(W*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=G}}getPrecise(U){return parseFloat(U.toFixed(8))}};l(J4,"DefaultRateLimiter");var R4=J4,u0=100,b$=20000,K4=500,k$=500,M4=5,E4=10,V4=1,_9="amz-sdk-invocation-id",d9="amz-sdk-request",g9=l(()=>{let $=u0;return{computeNextBackoffDelay:l((W)=>{return Math.floor(Math.min(b$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:l((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),w4=l(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:l(()=>U,"getRetryCount"),getRetryDelay:l(()=>Math.min(b$,$),"getRetryDelay"),getRetryCost:l(()=>G,"getRetryCost")}},"createDefaultRetryToken"),B4=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=k$,this.retryBackoffStrategy=g9(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return w4({retryDelay:u0,retryCount:0})}async refreshRetryTokenForRetry(U,G){const W=await this.getMaxAttempts();if(this.shouldRetry(U,G,W)){const Z=G.errorType;this.retryBackoffStrategy.setDelayBase(Z==="THROTTLING"?K4:u0);const X=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),L=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,X):X,Y=this.getCapacityCost(Z);return this.capacity-=Y,w4({retryDelay:L,retryCount:U.getRetryCount()+1,retryCost:Y})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(k$,this.capacity+(U.getRetryCost()??V4))}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 ${D$}`),D$}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?E4:M4}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};l(B4,"StandardRetryStrategy");var h$=B4,T4=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new R4,this.standardRetryStrategy=new h$(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,G){return this.rateLimiter.updateClientSendingRate(G),this.standardRetryStrategy.refreshRetryTokenForRetry(U,G)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};l(T4,"AdaptiveRetryStrategy");var p9=T4,A4=class $ extends h${constructor(U,G=u0){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){const W=await super.refreshRetryTokenForRetry(U,G);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};l(A4,"ConfiguredRetryStrategy");var l9=A4});var j4=M((kK,N4)=>{var{defineProperty:T1,getOwnPropertyDescriptor:s9,getOwnPropertyNames:m9}=Object,n9=Object.prototype.hasOwnProperty,u=($,U)=>T1($,"name",{value:U,configurable:!0}),i9=($,U)=>{for(var G in U)T1($,G,{get:U[G],enumerable:!0})},r9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of m9(U))if(!n9.call($,Z)&&Z!==G)T1($,Z,{get:()=>U[Z],enumerable:!(W=s9(U,Z))||W.enumerable})}return $},o9=($)=>r9(T1({},"__esModule",{value:!0}),$),f4={};i9(f4,{constructStack:()=>x$});N4.exports=o9(f4);var I0=u(($,U)=>{const G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),U0=u(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),x$=u(()=>{let $=[],U=[],G=!1;const W=new Set,Z=u((z)=>z.sort((I,J)=>C4[J.step]-C4[I.step]||q4[J.priority||"normal"]-q4[I.priority||"normal"]),"sort"),X=u((z)=>{let I=!1;const J=u((K)=>{const T=I0(K.name,K.aliases);if(T.includes(z)){I=!0;for(let E of T)W.delete(E);return!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),I},"removeByName"),L=u((z)=>{let I=!1;const J=u((K)=>{if(K.middleware===z){I=!0;for(let T of I0(K.name,K.aliases))W.delete(T);return!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),I},"removeByReference"),Y=u((z)=>{var I;return $.forEach((J)=>{z.add(J.middleware,{...J})}),U.forEach((J)=>{z.addRelativeTo(J.middleware,{...J})}),(I=z.identifyOnResolve)==null||I.call(z,w.identifyOnResolve()),z},"cloneTo"),F=u((z)=>{const I=[];return z.before.forEach((J)=>{if(J.before.length===0&&J.after.length===0)I.push(J);else I.push(...F(J))}),I.push(z),z.after.reverse().forEach((J)=>{if(J.before.length===0&&J.after.length===0)I.push(J);else I.push(...F(J))}),I},"expandRelativeMiddlewareList"),Q=u((z=!1)=>{const I=[],J=[],K={};return $.forEach((E)=>{const B={...E,before:[],after:[]};for(let V of I0(B.name,B.aliases))K[V]=B;I.push(B)}),U.forEach((E)=>{const B={...E,before:[],after:[]};for(let V of I0(B.name,B.aliases))K[V]=B;J.push(B)}),J.forEach((E)=>{if(E.toMiddleware){const B=K[E.toMiddleware];if(B===void 0){if(z)return;throw new Error(`${E.toMiddleware} is not found when adding ${U0(E.name,E.aliases)} middleware ${E.relation} ${E.toMiddleware}`)}if(E.relation==="after")B.after.push(E);if(E.relation==="before")B.before.push(E)}}),Z(I).map(F).reduce((E,B)=>{return E.push(...B),E},[])},"getMiddlewareList"),w={add:(z,I={})=>{const{name:J,override:K,aliases:T}=I,E={step:"initialize",priority:"normal",middleware:z,...I},B=I0(J,T);if(B.length>0){if(B.some((V)=>W.has(V))){if(!K)throw new Error(`Duplicate middleware name '${U0(J,T)}'`);for(let V of B){const A=$.findIndex((D)=>{var e;return D.name===V||((e=D.aliases)==null?void 0:e.some((F0)=>F0===V))});if(A===-1)continue;const H=$[A];if(H.step!==E.step||E.priority!==H.priority)throw new Error(`"${U0(H.name,H.aliases)}" middleware with ${H.priority} priority in ${H.step} step cannot be overridden by "${U0(J,T)}" middleware with ${E.priority} priority in ${E.step} step.`);$.splice(A,1)}}for(let V of B)W.add(V)}$.push(E)},addRelativeTo:(z,I)=>{const{name:J,override:K,aliases:T}=I,E={middleware:z,...I},B=I0(J,T);if(B.length>0){if(B.some((V)=>W.has(V))){if(!K)throw new Error(`Duplicate middleware name '${U0(J,T)}'`);for(let V of B){const A=U.findIndex((D)=>{var e;return D.name===V||((e=D.aliases)==null?void 0:e.some((F0)=>F0===V))});if(A===-1)continue;const H=U[A];if(H.toMiddleware!==E.toMiddleware||H.relation!==E.relation)throw new Error(`"${U0(H.name,H.aliases)}" middleware ${H.relation} "${H.toMiddleware}" middleware cannot be overridden by "${U0(J,T)}" middleware ${E.relation} "${E.toMiddleware}" middleware.`);U.splice(A,1)}}for(let V of B)W.add(V)}U.push(E)},clone:()=>Y(x$()),use:(z)=>{z.applyToStack(w)},remove:(z)=>{if(typeof z==="string")return X(z);else return L(z)},removeByTag:(z)=>{let I=!1;const J=u((K)=>{const{tags:T,name:E,aliases:B}=K;if(T&&T.includes(z)){const V=I0(E,B);for(let A of V)W.delete(A);return I=!0,!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),I},concat:(z)=>{var I;const J=Y(x$());return J.use(z),J.identifyOnResolve(G||J.identifyOnResolve()||(((I=z.identifyOnResolve)==null?void 0:I.call(z))??!1)),J},applyToStack:Y,identify:()=>{return Q(!0).map((z)=>{const I=z.step??z.relation+" "+z.toMiddleware;return U0(z.name,z.aliases)+" - "+I})},identifyOnResolve(z){if(typeof z==="boolean")G=z;return G},resolve:(z,I)=>{for(let J of Q().map((K)=>K.middleware).reverse())z=J(z,I);if(G)console.log(w.identify());return z}};return w},"constructStack"),C4={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},q4={high:3,normal:2,low:1}});var v$=M((bK,S4)=>{var{defineProperty:A1,getOwnPropertyDescriptor:a9,getOwnPropertyNames:t9}=Object,e9=Object.prototype.hasOwnProperty,$F=($,U)=>A1($,"name",{value:U,configurable:!0}),UF=($,U)=>{for(var G in U)A1($,G,{get:U[G],enumerable:!0})},GF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of t9(U))if(!e9.call($,Z)&&Z!==G)A1($,Z,{get:()=>U[Z],enumerable:!(W=a9(U,Z))||W.enumerable})}return $},WF=($)=>GF(A1({},"__esModule",{value:!0}),$),P4={};UF(P4,{isArrayBuffer:()=>ZF});S4.exports=WF(P4);var ZF=$F(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var _0=M((hK,b4)=>{var{defineProperty:H1,getOwnPropertyDescriptor:XF,getOwnPropertyNames:LF}=Object,YF=Object.prototype.hasOwnProperty,D4=($,U)=>H1($,"name",{value:U,configurable:!0}),FF=($,U)=>{for(var G in U)H1($,G,{get:U[G],enumerable:!0})},QF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of LF(U))if(!YF.call($,Z)&&Z!==G)H1($,Z,{get:()=>U[Z],enumerable:!(W=XF(U,Z))||W.enumerable})}return $},wF=($)=>QF(H1({},"__esModule",{value:!0}),$),k4={};FF(k4,{fromArrayBuffer:()=>IF,fromString:()=>JF});b4.exports=wF(k4);var zF=v$(),c$=import.meta.require("buffer"),IF=D4(($,U=0,G=$.byteLength-U)=>{if(!zF.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return c$.Buffer.from($,U,G)},"fromArrayBuffer"),JF=D4(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?c$.Buffer.from($,U):c$.Buffer.from($)},"fromString")});var v4=M((h4)=>{Object.defineProperty(h4,"__esModule",{value:!0});h4.fromBase64=void 0;var RF=_0(),KF=/^[A-Za-z0-9+/]*={0,2}$/,MF=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!KF.exec($))throw new TypeError("Invalid base64 string.");const U=RF.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};h4.fromBase64=MF});var G0=M((vK,_4)=>{var{defineProperty:O1,getOwnPropertyDescriptor:EF,getOwnPropertyNames:VF}=Object,BF=Object.prototype.hasOwnProperty,y$=($,U)=>O1($,"name",{value:U,configurable:!0}),TF=($,U)=>{for(var G in U)O1($,G,{get:U[G],enumerable:!0})},AF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of VF(U))if(!BF.call($,Z)&&Z!==G)O1($,Z,{get:()=>U[Z],enumerable:!(W=EF(U,Z))||W.enumerable})}return $},HF=($)=>AF(O1({},"__esModule",{value:!0}),$),c4={};TF(c4,{fromUtf8:()=>u4,toUint8Array:()=>OF,toUtf8:()=>CF});_4.exports=HF(c4);var y4=_0(),u4=y$(($)=>{const U=y4.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),OF=y$(($)=>{if(typeof $==="string")return u4($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),CF=y$(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return y4.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var p4=M((d4)=>{Object.defineProperty(d4,"__esModule",{value:!0});d4.toBase64=void 0;var qF=_0(),fF=G0(),NF=($)=>{let U;if(typeof $==="string")U=fF.fromUtf8($);else U=$;if(typeof U!=="object"||typeof U.byteOffset!=="number"||typeof U.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return qF.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};d4.toBase64=NF});var q1=M((yK,C1)=>{var{defineProperty:l4,getOwnPropertyDescriptor:jF,getOwnPropertyNames:PF}=Object,SF=Object.prototype.hasOwnProperty,u$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of PF(U))if(!SF.call($,Z)&&Z!==G)l4($,Z,{get:()=>U[Z],enumerable:!(W=jF(U,Z))||W.enumerable})}return $},s4=($,U,G)=>(u$($,U,"default"),G&&u$(G,U,"default")),DF=($)=>u$(l4({},"__esModule",{value:!0}),$),_$={};C1.exports=DF(_$);s4(_$,v4(),C1.exports);s4(_$,p4(),C1.exports)});var i4=M((m4)=>{Object.defineProperty(m4,"__esModule",{value:!0});m4.getAwsChunkedEncodingStream=void 0;var kF=import.meta.require("stream"),bF=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:Z,checksumLocationName:X,streamHasher:L}=U,Y=G!==void 0&&Z!==void 0&&X!==void 0&&L!==void 0,F=Y?L(Z,$):void 0,Q=new kF.Readable({read:()=>{}});return $.on("data",(w)=>{const z=W(w)||0;Q.push(`${z.toString(16)}\r\n`),Q.push(w),Q.push("\r\n")}),$.on("end",async()=>{if(Q.push("0\r\n"),Y){const w=G(await F);Q.push(`${X}:${w}\r\n`),Q.push("\r\n")}Q.push(null)}),Q};m4.getAwsChunkedEncodingStream=bF});var g$=M((_K,a4)=>{var{defineProperty:f1,getOwnPropertyDescriptor:hF,getOwnPropertyNames:xF}=Object,vF=Object.prototype.hasOwnProperty,d$=($,U)=>f1($,"name",{value:U,configurable:!0}),cF=($,U)=>{for(var G in U)f1($,G,{get:U[G],enumerable:!0})},yF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of xF(U))if(!vF.call($,Z)&&Z!==G)f1($,Z,{get:()=>U[Z],enumerable:!(W=hF(U,Z))||W.enumerable})}return $},uF=($)=>yF(f1({},"__esModule",{value:!0}),$),r4={};cF(r4,{escapeUri:()=>o4,escapeUriPath:()=>dF});a4.exports=uF(r4);var o4=d$(($)=>encodeURIComponent($).replace(/[!'()*]/g,_F),"escapeUri"),_F=d$(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),dF=d$(($)=>$.split("/").map(o4).join("/"),"escapeUriPath")});var l$=M((dK,$6)=>{var e4=function($){const U=[];for(let G of Object.keys($).sort()){const W=$[G];if(G=p$.escapeUri(G),Array.isArray(W))for(let Z=0,X=W.length;Z<X;Z++)U.push(`${G}=${p$.escapeUri(W[Z])}`);else{let Z=G;if(W||typeof W==="string")Z+=`=${p$.escapeUri(W)}`;U.push(Z)}}return U.join("&")},N1=Object.defineProperty,gF=Object.getOwnPropertyDescriptor,pF=Object.getOwnPropertyNames,lF=Object.prototype.hasOwnProperty,sF=($,U)=>N1($,"name",{value:U,configurable:!0}),mF=($,U)=>{for(var G in U)N1($,G,{get:U[G],enumerable:!0})},nF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of pF(U))if(!lF.call($,Z)&&Z!==G)N1($,Z,{get:()=>U[Z],enumerable:!(W=gF(U,Z))||W.enumerable})}return $},iF=($)=>nF(N1({},"__esModule",{value:!0}),$),t4={};mF(t4,{buildQueryString:()=>e4});$6.exports=iF(t4);var p$=g$();sF(e4,"buildQueryString")});var E6=M((gK,M6)=>{async function n$($,U,G=U6){const W=U.headers??{},Z=W.Expect||W.expect;let X=-1,L=!1;if(Z==="100-continue")await Promise.race([new Promise((Y)=>{X=Number(setTimeout(Y,Math.max(U6,G)))}),new Promise((Y)=>{$.on("continue",()=>{clearTimeout(X),Y()}),$.on("error",()=>{L=!0,clearTimeout(X),Y()})})]);if(!L)Q6($,U.body)}var Q6=function($,U){if(U instanceof F6.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}const G=U;if(typeof G==="object"&&G.buffer&&typeof G.byteOffset==="number"&&typeof G.byteLength==="number"){$.end(Buffer.from(G.buffer,G.byteOffset,G.byteLength));return}$.end(Buffer.from(U));return}$.end()};async function K6($){const U=[],G=$.getReader();let W=!1,Z=0;while(!W){const{done:Y,value:F}=await G.read();if(F)U.push(F),Z+=F.length;W=Y}const X=new Uint8Array(Z);let L=0;for(let Y of U)X.set(Y,L),L+=Y.length;return X}var{create:rF,defineProperty:d0,getOwnPropertyDescriptor:oF,getOwnPropertyNames:aF,getPrototypeOf:tF}=Object,eF=Object.prototype.hasOwnProperty,N=($,U)=>d0($,"name",{value:U,configurable:!0}),$Q=($,U)=>{for(var G in U)d0($,G,{get:U[G],enumerable:!0})},W6=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of aF(U))if(!eF.call($,Z)&&Z!==G)d0($,Z,{get:()=>U[Z],enumerable:!(W=oF(U,Z))||W.enumerable})}return $},UQ=($,U,G)=>(G=$!=null?rF(tF($)):{},W6(U||!$||!$.__esModule?d0(G,"default",{value:$,enumerable:!0}):G,$)),GQ=($)=>W6(d0({},"__esModule",{value:!0}),$),Z6={};$Q(Z6,{DEFAULT_REQUEST_TIMEOUT:()=>YQ,NodeHttp2Handler:()=>IQ,NodeHttpHandler:()=>FQ,streamCollector:()=>RQ});M6.exports=GQ(Z6);var X6=i(),L6=l$(),s$=import.meta.require("http"),m$=import.meta.require("https"),WQ=["ECONNRESET","EPIPE","ETIMEDOUT"],Y6=N(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),ZQ=N(($,U,G=0)=>{if(!G)return;const W=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G);$.on("socket",(Z)=>{if(Z.connecting)Z.on("connect",()=>{clearTimeout(W)});else clearTimeout(W)})},"setConnectionTimeout"),XQ=N(($,{keepAlive:U,keepAliveMsecs:G})=>{if(U!==!0)return;$.on("socket",(W)=>{W.setKeepAlive(U,G||0)})},"setSocketKeepAlive"),LQ=N(($,U,G=0)=>{$.setTimeout(G,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),F6=import.meta.require("stream"),U6=1000;N(n$,"writeRequestBody");N(Q6,"writeBody");var YQ=0,w6=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((Z)=>{G(this.resolveDefaultConfig(Z))}).catch(W);else G(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,G,W=console){var Z,X,L;const{sockets:Y,requests:F,maxSockets:Q}=U;if(typeof Q!=="number"||Q===Infinity)return G;const w=15000;if(Date.now()-w<G)return G;if(Y&&F)for(let z in Y){const I=((Z=Y[z])==null?void 0:Z.length)??0,J=((X=F[z])==null?void 0:X.length)??0;if(I>=Q&&J>=2*Q)return(L=W==null?void 0:W.warn)==null||L.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${I} and ${J} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){const{requestTimeout:G,connectionTimeout:W,socketTimeout:Z,httpAgent:X,httpsAgent:L}=U||{};return{connectionTimeout:W,requestTimeout:G??Z,httpAgent:(()=>{if(X instanceof s$.Agent||typeof(X==null?void 0:X.destroy)==="function")return X;return new s$.Agent({keepAlive:!0,maxSockets:50,...X})})(),httpsAgent:(()=>{if(L instanceof m$.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new m$.Agent({keepAlive:!0,maxSockets:50,...L})})(),logger:console}}destroy(){var U,G,W,Z;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(Z=(W=this.config)==null?void 0:W.httpsAgent)==null||Z.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;let W;return new Promise((Z,X)=>{let L=void 0;const Y=N(async(V)=>{await L,clearTimeout(W),Z(V)},"resolve"),F=N(async(V)=>{await L,clearTimeout(W),X(V)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const V=new Error("Request aborted");V.name="AbortError",F(V);return}const Q=U.protocol==="https:",w=Q?this.config.httpsAgent:this.config.httpAgent;W=setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(w,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const z=L6.buildQueryString(U.query||{});let I=void 0;if(U.username!=null||U.password!=null){const V=U.username??"",A=U.password??"";I=`${V}:${A}`}let J=U.path;if(z)J+=`?${z}`;if(U.fragment)J+=`#${U.fragment}`;const K={headers:U.headers,host:U.hostname,method:U.method,path:J,port:U.port,agent:w,auth:I},E=(Q?m$.request:s$.request)(K,(V)=>{const A=new X6.HttpResponse({statusCode:V.statusCode||-1,reason:V.statusMessage,headers:Y6(V.headers),body:V});Y({response:A})});if(E.on("error",(V)=>{if(WQ.includes(V.code))F(Object.assign(V,{name:"TimeoutError"}));else F(V)}),ZQ(E,F,this.config.connectionTimeout),LQ(E,F,this.config.requestTimeout),G){const V=N(()=>{E.destroy();const A=new Error("Request aborted");A.name="AbortError",F(A)},"onAbort");if(typeof G.addEventListener==="function"){const A=G;A.addEventListener("abort",V,{once:!0}),E.once("close",()=>A.removeEventListener("abort",V))}else G.onabort=V}const B=K.agent;if(typeof B==="object"&&"keepAlive"in B)XQ(E,{keepAlive:B.keepAlive,keepAliveMsecs:B.keepAliveMsecs});L=n$(E,U,this.config.requestTimeout).catch((V)=>{return clearTimeout(W),X(V)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};N(w6,"NodeHttpHandler");var FQ=w6,G6=import.meta.require("http2"),QQ=UQ(import.meta.require("http2")),z6=class ${constructor(U){this.sessions=[],this.sessions=U??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(U){this.sessions.push(U)}contains(U){return this.sessions.includes(U)}remove(U){this.sessions=this.sessions.filter((G)=>G!==U)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(U){for(let G of this.sessions)if(G===U){if(!G.destroyed)G.destroy()}}};N(z6,"NodeHttp2ConnectionPool");var wQ=z6,I6=class ${constructor(U){if(this.sessionCache=new Map,this.config=U,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(U,G){const W=this.getUrlString(U),Z=this.sessionCache.get(W);if(Z){const F=Z.poll();if(F&&!this.config.disableConcurrency)return F}const X=QQ.default.connect(W);if(this.config.maxConcurrency)X.settings({maxConcurrentStreams:this.config.maxConcurrency},(F)=>{if(F)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});X.unref();const L=N(()=>{X.destroy(),this.deleteSession(W,X)},"destroySessionCb");if(X.on("goaway",L),X.on("error",L),X.on("frameError",L),X.on("close",()=>this.deleteSession(W,X)),G.requestTimeout)X.setTimeout(G.requestTimeout,L);const Y=this.sessionCache.get(W)||new wQ;return Y.offerLast(X),this.sessionCache.set(W,Y),X}deleteSession(U,G){const W=this.sessionCache.get(U);if(!W)return;if(!W.contains(G))return;W.remove(G),this.sessionCache.set(U,W)}release(U,G){var W;const Z=this.getUrlString(U);(W=this.sessionCache.get(Z))==null||W.offerLast(G)}destroy(){for(let[U,G]of this.sessionCache){for(let W of G){if(!W.destroyed)W.destroy();G.remove(W)}this.sessionCache.delete(U)}}setMaxConcurrentStreams(U){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=U}setDisableConcurrentStreams(U){this.config.disableConcurrency=U}getUrlString(U){return U.destination.toString()}};N(I6,"NodeHttp2ConnectionManager");var zQ=I6,J6=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new zQ({}),this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((Z)=>{G(Z||{})}).catch(W);else G(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:W,disableConcurrentStreams:Z}=this.config;return new Promise((X,L)=>{var Y;let F=!1,Q=void 0;const w=N(async(f)=>{await Q,X(f)},"resolve"),z=N(async(f)=>{await Q,L(f)},"reject");if(G==null?void 0:G.aborted){F=!0;const f=new Error("Request aborted");f.name="AbortError",z(f);return}const{hostname:I,method:J,port:K,protocol:T,query:E}=U;let B="";if(U.username!=null||U.password!=null){const f=U.username??"",d=U.password??"";B=`${f}:${d}@`}const V=`${T}//${B}${I}${K?`:${K}`:""}`,A={destination:new URL(V)},H=this.connectionManager.lease(A,{requestTimeout:(Y=this.config)==null?void 0:Y.sessionTimeout,disableConcurrentStreams:Z||!1}),D=N((f)=>{if(Z)this.destroySession(H);F=!0,z(f)},"rejectWithDestroy"),e=L6.buildQueryString(E||{});let F0=U.path;if(e)F0+=`?${e}`;if(U.fragment)F0+=`#${U.fragment}`;const v=H.request({...U.headers,[G6.constants.HTTP2_HEADER_PATH]:F0,[G6.constants.HTTP2_HEADER_METHOD]:J});if(H.ref(),v.on("response",(f)=>{const d=new X6.HttpResponse({statusCode:f[":status"]||-1,headers:Y6(f),body:v});if(F=!0,w({response:d}),Z)H.close(),this.connectionManager.deleteSession(V,H)}),W)v.setTimeout(W,()=>{v.close();const f=new Error(`Stream timed out because of no activity for ${W} ms`);f.name="TimeoutError",D(f)});if(G){const f=N(()=>{v.close();const d=new Error("Request aborted");d.name="AbortError",D(d)},"onAbort");if(typeof G.addEventListener==="function"){const d=G;d.addEventListener("abort",f,{once:!0}),v.once("close",()=>d.removeEventListener("abort",f))}else G.onabort=f}v.on("frameError",(f,d,pL)=>{D(new Error(`Frame type id ${f} in stream id ${pL} has failed with code ${d}.`))}),v.on("error",D),v.on("aborted",()=>{D(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${v.rstCode}.`))}),v.on("close",()=>{if(H.unref(),Z)H.destroy();if(!F)D(new Error("Unexpected error: http2 request did not get a response"))}),Q=n$(v,U,W)})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};N(J6,"NodeHttp2Handler");var IQ=J6,R6=class $ extends F6.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};N(R6,"Collector");var JQ=R6,RQ=N(($)=>{if(KQ($))return K6($);return new Promise((U,G)=>{const W=new JQ;$.pipe(W),$.on("error",(Z)=>{W.end(),G(Z)}),W.on("error",G),W.on("finish",function(){const Z=new Uint8Array(Buffer.concat(this.bufferedBytes));U(Z)})})},"streamCollector"),KQ=N(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");N(K6,"collectReadableStream")});var f6=M((pK,q6)=>{var T6=function($=0){return new Promise((U,G)=>{if($)setTimeout(()=>{const W=new Error(`Request did not complete within ${$} ms`);W.name="TimeoutError",G(W)},$)})};async function H6($){const U=await C6($),G=CQ.fromBase64(U);return new Uint8Array(G)}async function O6($){const U=[],G=$.getReader();let W=!1,Z=0;while(!W){const{done:Y,value:F}=await G.read();if(F)U.push(F),Z+=F.length;W=Y}const X=new Uint8Array(Z);let L=0;for(let Y of U)X.set(Y,L),L+=Y.length;return X}var C6=function($){return new Promise((U,G)=>{const W=new FileReader;W.onloadend=()=>{if(W.readyState!==2)return G(new Error("Reader aborted too early"));const Z=W.result??"",X=Z.indexOf(","),L=X>-1?X+1:Z.length;U(Z.substring(L))},W.onabort=()=>G(new Error("Read aborted")),W.onerror=()=>G(W.error),W.readAsDataURL($)})},P1=Object.defineProperty,MQ=Object.getOwnPropertyDescriptor,EQ=Object.getOwnPropertyNames,VQ=Object.prototype.hasOwnProperty,o=($,U)=>P1($,"name",{value:U,configurable:!0}),BQ=($,U)=>{for(var G in U)P1($,G,{get:U[G],enumerable:!0})},TQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of EQ(U))if(!VQ.call($,Z)&&Z!==G)P1($,Z,{get:()=>U[Z],enumerable:!(W=MQ(U,Z))||W.enumerable})}return $},AQ=($)=>TQ(P1({},"__esModule",{value:!0}),$),B6={};BQ(B6,{FetchHttpHandler:()=>OQ,keepAliveSupport:()=>j1,streamCollector:()=>qQ});q6.exports=AQ(B6);var V6=i(),HQ=l$();o(T6,"requestTimeout");var j1={supported:void 0},A6=class ${static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}constructor(U){if(typeof U==="function")this.configProvider=U().then((G)=>G||{});else this.config=U??{},this.configProvider=Promise.resolve(this.config);if(j1.supported===void 0)j1.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;const W=this.config.requestTimeout,Z=this.config.keepAlive===!0,X=this.config.credentials;if(G==null?void 0:G.aborted){const B=new Error("Request aborted");return B.name="AbortError",Promise.reject(B)}let L=U.path;const Y=HQ.buildQueryString(U.query||{});if(Y)L+=`?${Y}`;if(U.fragment)L+=`#${U.fragment}`;let F="";if(U.username!=null||U.password!=null){const B=U.username??"",V=U.password??"";F=`${B}:${V}@`}const{port:Q,method:w}=U,z=`${U.protocol}//${F}${U.hostname}${Q?`:${Q}`:""}${L}`,I=w==="GET"||w==="HEAD"?void 0:U.body,J={body:I,headers:new Headers(U.headers),method:w,credentials:X};if(I)J.duplex="half";if(typeof AbortController!=="undefined")J.signal=G;if(j1.supported)J.keepalive=Z;let K=o(()=>{},"removeSignalEventListener");const T=new Request(z,J),E=[fetch(T).then((B)=>{const V=B.headers,A={};for(let D of V.entries())A[D[0]]=D[1];if(B.body==null)return B.blob().then((D)=>({response:new V6.HttpResponse({headers:A,reason:B.statusText,statusCode:B.status,body:D})}));return{response:new V6.HttpResponse({headers:A,reason:B.statusText,statusCode:B.status,body:B.body})}}),T6(W)];if(G)E.push(new Promise((B,V)=>{const A=o(()=>{const H=new Error("Request aborted");H.name="AbortError",V(H)},"onAbort");if(typeof G.addEventListener==="function"){const H=G;H.addEventListener("abort",A,{once:!0}),K=o(()=>H.removeEventListener("abort",A),"removeSignalEventListener")}else G.onabort=A}));return Promise.race(E).finally(K)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};o(A6,"FetchHttpHandler");var OQ=A6,CQ=q1(),qQ=o(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return H6($);return O6($)},"streamCollector");o(H6,"collectBlob");o(O6,"collectStream");o(C6,"readToBase64")});var r$=M((lK,k6)=>{var S6=function($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const U=new Uint8Array($.length/2);for(let G=0;G<$.length;G+=2){const W=$.slice(G,G+2).toLowerCase();if(W in i$)U[G/2]=i$[W];else throw new Error(`Cannot decode unrecognized sequence ${W} as hexadecimal`)}return U},D6=function($){let U="";for(let G=0;G<$.byteLength;G++)U+=P6[$[G]];return U},S1=Object.defineProperty,fQ=Object.getOwnPropertyDescriptor,NQ=Object.getOwnPropertyNames,jQ=Object.prototype.hasOwnProperty,N6=($,U)=>S1($,"name",{value:U,configurable:!0}),PQ=($,U)=>{for(var G in U)S1($,G,{get:U[G],enumerable:!0})},SQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of NQ(U))if(!jQ.call($,Z)&&Z!==G)S1($,Z,{get:()=>U[Z],enumerable:!(W=fQ(U,Z))||W.enumerable})}return $},DQ=($)=>SQ(S1({},"__esModule",{value:!0}),$),j6={};PQ(j6,{fromHex:()=>S6,toHex:()=>D6});k6.exports=DQ(j6);var P6={},i$={};for(let $=0;$<256;$++){let U=$.toString(16).toLowerCase();if(U.length===1)U=`0${U}`;P6[$]=U,i$[U]=$}N6(S6,"fromHex");N6(D6,"toHex")});var g0=M((b6)=>{Object.defineProperty(b6,"__esModule",{value:!0});b6.isReadableStream=void 0;var kQ=($)=>{var U;return typeof ReadableStream==="function"&&(((U=$===null||$===void 0?void 0:$.constructor)===null||U===void 0?void 0:U.name)===ReadableStream.name||$ instanceof ReadableStream)};b6.isReadableStream=kQ});var _6=M((y6)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.sdkStreamMixin=void 0;var bQ=f6(),hQ=q1(),xQ=r$(),vQ=G0(),x6=g0(),v6="The stream has already been transformed.",cQ=($)=>{var U,G;if(!c6($)&&!x6.isReadableStream($)){const L=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${L}`)}let W=!1;const Z=async()=>{if(W)throw new Error(v6);return W=!0,await bQ.streamCollector($)},X=(L)=>{if(typeof L.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return L.stream()};return Object.assign($,{transformToByteArray:Z,transformToString:async(L)=>{const Y=await Z();if(L==="base64")return hQ.toBase64(Y);else if(L==="hex")return xQ.toHex(Y);else if(L===void 0||L==="utf8"||L==="utf-8")return vQ.toUtf8(Y);else if(typeof TextDecoder==="function")return new TextDecoder(L).decode(Y);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(v6);if(W=!0,c6($))return X($);else if(x6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};y6.sdkStreamMixin=cQ;var c6=($)=>typeof Blob==="function"&&$ instanceof Blob});var l6=M((g6)=>{Object.defineProperty(g6,"__esModule",{value:!0});g6.sdkStreamMixin=void 0;var yQ=E6(),uQ=_0(),o$=import.meta.require("stream"),_Q=import.meta.require("util"),dQ=_6(),d6="The stream has already been transformed.",gQ=($)=>{var U,G;if(!($ instanceof o$.Readable))try{return dQ.sdkStreamMixin($)}catch(X){const L=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${L}`)}let W=!1;const Z=async()=>{if(W)throw new Error(d6);return W=!0,await yQ.streamCollector($)};return Object.assign($,{transformToByteArray:Z,transformToString:async(X)=>{const L=await Z();if(X===void 0||Buffer.isEncoding(X))return uQ.fromArrayBuffer(L.buffer,L.byteOffset,L.byteLength).toString(X);else return new _Q.TextDecoder(X).decode(L)},transformToWebStream:()=>{if(W)throw new Error(d6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof o$.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return W=!0,o$.Readable.toWeb($)}})};g6.sdkStreamMixin=gQ});var n6=M((s6)=>{async function pQ($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(s6,"__esModule",{value:!0});s6.splitStream=void 0;s6.splitStream=pQ});var a6=M((r6)=>{async function mQ($){if(sQ.isReadableStream($))return lQ.splitStream($);const U=new i6.PassThrough,G=new i6.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(r6,"__esModule",{value:!0});r6.splitStream=void 0;var i6=import.meta.require("stream"),lQ=n6(),sQ=g0();r6.splitStream=mQ});var $W=M((t6)=>{async function nQ($,U){var G;let W=0;const Z=[],X=$.getReader();let L=!1;while(!L){const{done:Q,value:w}=await X.read();if(w)Z.push(w),W+=(G=w===null||w===void 0?void 0:w.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;L=Q}X.releaseLock();const Y=new Uint8Array(Math.min(U,W));let F=0;for(let Q of Z){if(Q.byteLength>Y.byteLength-F){Y.set(Q.subarray(0,Y.byteLength-F),F);break}else Y.set(Q,F);F+=Q.length}return Y}Object.defineProperty(t6,"__esModule",{value:!0});t6.headStream=void 0;t6.headStream=nQ});var ZW=M((GW)=>{Object.defineProperty(GW,"__esModule",{value:!0});GW.headStream=void 0;var iQ=import.meta.require("stream"),rQ=$W(),oQ=g0(),aQ=($,U)=>{if(oQ.isReadableStream($))return rQ.headStream($,U);return new Promise((G,W)=>{const Z=new UW;Z.limit=U,$.pipe(Z),$.on("error",(X)=>{Z.end(),W(X)}),Z.on("error",W),Z.on("finish",function(){const X=new Uint8Array(Buffer.concat(this.buffers));G(X)})})};GW.headStream=aQ;class UW extends iQ.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write($,U,G){var W;if(this.buffers.push($),this.bytesBuffered+=(W=$.byteLength)!==null&&W!==void 0?W:0,this.bytesBuffered>=this.limit){const Z=this.bytesBuffered-this.limit,X=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=X.subarray(0,X.byteLength-Z),this.emit("finish")}G()}}});var wW=M((tK,R0)=>{var YW=function($,U="utf-8"){if(U==="base64")return XW.toBase64($);return LW.toUtf8($)},FW=function($,U){if(U==="base64")return t$.mutate(XW.fromBase64($));return t$.mutate(LW.fromUtf8($))},D1=Object.defineProperty,tQ=Object.getOwnPropertyDescriptor,eQ=Object.getOwnPropertyNames,$w=Object.prototype.hasOwnProperty,e$=($,U)=>D1($,"name",{value:U,configurable:!0}),Uw=($,U)=>{for(var G in U)D1($,G,{get:U[G],enumerable:!0})},a$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of eQ(U))if(!$w.call($,Z)&&Z!==G)D1($,Z,{get:()=>U[Z],enumerable:!(W=tQ(U,Z))||W.enumerable})}return $},p0=($,U,G)=>(a$($,U,"default"),G&&a$(G,U,"default")),Gw=($)=>a$(D1({},"__esModule",{value:!0}),$),J0={};Uw(J0,{Uint8ArrayBlobAdapter:()=>t$});R0.exports=Gw(J0);var XW=q1(),LW=G0();e$(YW,"transformToString");e$(FW,"transformFromString");var QW=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return FW(U,G);default:throw new Error(`Unsupported conversion from ${typeof U} to Uint8ArrayBlobAdapter.`)}}static mutate(U){return Object.setPrototypeOf(U,$.prototype),U}transformToString(U="utf-8"){return YW(this,U)}};e$(QW,"Uint8ArrayBlobAdapter");var t$=QW;p0(J0,i4(),R0.exports);p0(J0,l6(),R0.exports);p0(J0,a6(),R0.exports);p0(J0,ZW(),R0.exports);p0(J0,g0(),R0.exports)});var f0=M((eK,bW)=>{var CW=function($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),Z=$.getUTCDate(),X=$.getUTCHours(),L=$.getUTCMinutes(),Y=$.getUTCSeconds(),F=Z<10?`0${Z}`:`${Z}`,Q=X<10?`0${X}`:`${X}`,w=L<10?`0${L}`:`${L}`,z=Y<10?`0${Y}`:`${Y}`;return`${Sw[W]}, ${F} ${wU[G]} ${U} ${Q}:${w}:${z} GMT`},h1=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},zU=function($,U,G){let W,Z,X;if(typeof U==="undefined"&&typeof G==="undefined")W={},X=$;else if(W=$,typeof U==="function")return Z=U,X=G,Q7(W,Z,X);else X=U;for(let L of Object.keys(X)){if(!Array.isArray(X[L])){W[L]=X[L];continue}DW(W,null,X,L)}return W},kW=function($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");const W=$.split(U);if(G===1)return W;const Z=[];let X="";for(let L=0;L<W.length;L++){if(X==="")X=W[L];else X+=U+W[L];if((L+1)%G===0)Z.push(X),X=""}if(X!=="")Z.push(X);return Z},x1=Object.defineProperty,Ww=Object.getOwnPropertyDescriptor,Zw=Object.getOwnPropertyNames,Xw=Object.prototype.hasOwnProperty,R=($,U)=>x1($,"name",{value:U,configurable:!0}),Lw=($,U)=>{for(var G in U)x1($,G,{get:U[G],enumerable:!0})},Yw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of Zw(U))if(!Xw.call($,Z)&&Z!==G)x1($,Z,{get:()=>U[Z],enumerable:!(W=Ww(U,Z))||W.enumerable})}return $},Fw=($)=>Yw(x1({},"__esModule",{value:!0}),$),IW={};Lw(IW,{Client:()=>ww,Command:()=>EW,LazyJsonString:()=>L7,NoOpLogger:()=>Qw,SENSITIVE_STRING:()=>Jw,ServiceException:()=>iw,StringWrapper:()=>i0,_json:()=>LU,collectBody:()=>zw,convertMap:()=>Y7,createAggregatedClient:()=>Rw,dateToUtcString:()=>CW,decorateServiceException:()=>fW,emitWarningIfUnsupportedVersion:()=>tw,expectBoolean:()=>Mw,expectByte:()=>XU,expectFloat32:()=>k1,expectInt:()=>Vw,expectInt32:()=>WU,expectLong:()=>m0,expectNonNull:()=>Tw,expectNumber:()=>s0,expectObject:()=>BW,expectShort:()=>ZU,expectString:()=>Aw,expectUnion:()=>Hw,extendedEncodeURIComponent:()=>h1,getArrayIfSingleItem:()=>X7,getDefaultClientConfiguration:()=>W7,getDefaultExtensionConfiguration:()=>jW,getValueFromTextNode:()=>PW,handleFloat:()=>qw,limitedParseDouble:()=>QU,limitedParseFloat:()=>fw,limitedParseFloat32:()=>Nw,loadConfigsForDefaultMode:()=>aw,logger:()=>n0,map:()=>zU,parseBoolean:()=>Kw,parseEpochTimestamp:()=>uw,parseRfc3339DateTime:()=>kw,parseRfc3339DateTimeWithOffset:()=>hw,parseRfc7231DateTime:()=>yw,resolveDefaultRuntimeConfig:()=>Z7,resolvedPath:()=>I7,serializeDateTime:()=>R7,serializeFloat:()=>J7,splitEvery:()=>kW,strictParseByte:()=>OW,strictParseDouble:()=>FU,strictParseFloat:()=>Ow,strictParseFloat32:()=>TW,strictParseInt:()=>jw,strictParseInt32:()=>Pw,strictParseLong:()=>HW,strictParseShort:()=>O0,take:()=>F7,throwDefaultError:()=>NW,withBaseException:()=>rw});bW.exports=Fw(IW);var JW=class ${trace(){}debug(){}info(){}warn(){}error(){}};R(JW,"NoOpLogger");var Qw=JW,RW=j4(),KW=class ${constructor(U){this.middlewareStack=RW.constructStack(),this.config=U}send(U,G,W){const Z=typeof G!=="function"?G:void 0,X=typeof G==="function"?G:W,L=U.resolveMiddleware(this.middlewareStack,this.config,Z);if(X)L(U).then((Y)=>X(null,Y.output),(Y)=>X(Y)).catch(()=>{});else return L(U).then((Y)=>Y.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};R(KW,"Client");var ww=KW,$U=wW(),zw=R(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return $U.Uint8ArrayBlobAdapter.mutate($);if(!$)return $U.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return $U.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),GU=Q0(),MW=class ${constructor(){this.middlewareStack=RW.constructStack()}static classBuilder(){return new Iw}resolveMiddlewareWithContext(U,G,W,{middlewareFn:Z,clientName:X,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:F,smithyContext:Q,additionalContext:w,CommandCtor:z}){for(let E of Z.bind(this)(z,U,G,W))this.middlewareStack.use(E);const I=U.concat(this.middlewareStack),{logger:J}=G,K={logger:J,clientName:X,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:F,[GU.SMITHY_CONTEXT_KEY]:{commandInstance:this,...Q},...w},{requestHandler:T}=G;return I.resolve((E)=>T.handle(E.request,W||{}),K)}};R(MW,"Command");var EW=MW,VW=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,G,W={}){return this._smithyContext={service:U,operation:G,...W},this}c(U={}){return this._additionalContext=U,this}n(U,G){return this._clientName=U,this._commandName=G,this}f(U=(W)=>W,G=(W)=>W){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=G,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const G=this;let W;return W=(U=class extends EW{constructor(...[Z]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=Z??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(Z,X,L){return this.resolveMiddlewareWithContext(Z,X,L,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},R(U,"CommandRef"),U)}};R(VW,"ClassBuilder");var Iw=VW,Jw="***SensitiveInformation***",Rw=R(($,U)=>{for(let G of Object.keys($)){const W=$[G],Z=R(async function(L,Y,F){const Q=new W(L);if(typeof Y==="function")this.send(Q,Y);else if(typeof F==="function"){if(typeof Y!=="object")throw new Error(`Expected http options but got ${typeof Y}`);this.send(Q,Y||{},F)}else return this.send(Q,Y)},"methodImpl"),X=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[X]=Z}},"createAggregatedClient"),Kw=R(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),Mw=R(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)n0.warn(b1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")n0.warn(b1(`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"),s0=R(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))n0.warn(b1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),Ew=Math.ceil(340282346638528860000000000000000000000),k1=R(($)=>{const U=s0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>Ew)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),m0=R(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),Vw=m0,WU=R(($)=>YU($,32),"expectInt32"),ZU=R(($)=>YU($,16),"expectShort"),XU=R(($)=>YU($,8),"expectByte"),YU=R(($,U)=>{const G=m0($);if(G!==void 0&&Bw(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),Bw=R(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),Tw=R(($,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"),BW=R(($)=>{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"),Aw=R(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return n0.warn(b1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),Hw=R(($)=>{if($===null||$===void 0)return;const U=BW($),G=Object.entries(U).filter(([,W])=>W!=null).map(([W])=>W);if(G.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(G.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${G} were not null.`);return U},"expectUnion"),FU=R(($)=>{if(typeof $=="string")return s0(q0($));return s0($)},"strictParseDouble"),Ow=FU,TW=R(($)=>{if(typeof $=="string")return k1(q0($));return k1($)},"strictParseFloat32"),Cw=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,q0=R(($)=>{const U=$.match(Cw);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),QU=R(($)=>{if(typeof $=="string")return AW($);return s0($)},"limitedParseDouble"),qw=QU,fw=QU,Nw=R(($)=>{if(typeof $=="string")return AW($);return k1($)},"limitedParseFloat32"),AW=R(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),HW=R(($)=>{if(typeof $==="string")return m0(q0($));return m0($)},"strictParseLong"),jw=HW,Pw=R(($)=>{if(typeof $==="string")return WU(q0($));return WU($)},"strictParseInt32"),O0=R(($)=>{if(typeof $==="string")return ZU(q0($));return ZU($)},"strictParseShort"),OW=R(($)=>{if(typeof $==="string")return XU(q0($));return XU($)},"strictParseByte"),b1=R(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),n0={warn:console.warn},Sw=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];R(CW,"dateToUtcString");var Dw=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),kw=R(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=Dw.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,Z,X,L,Y,F,Q]=U,w=O0(C0(W)),z=m(Z,"month",1,12),I=m(X,"day",1,31);return l0(w,z,I,{hours:L,minutes:Y,seconds:F,fractionalMilliseconds:Q})},"parseRfc3339DateTime"),bw=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),hw=R(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=bw.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,Z,X,L,Y,F,Q,w]=U,z=O0(C0(W)),I=m(Z,"month",1,12),J=m(X,"day",1,31),K=l0(z,I,J,{hours:L,minutes:Y,seconds:F,fractionalMilliseconds:Q});if(w.toUpperCase()!="Z")K.setTime(K.getTime()-nw(w));return K},"parseRfc3339DateTimeWithOffset"),xw=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$/),vw=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$/),cw=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})$/),yw=R(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=xw.exec($);if(U){const[G,W,Z,X,L,Y,F,Q]=U;return l0(O0(C0(X)),UU(Z),m(W,"day",1,31),{hours:L,minutes:Y,seconds:F,fractionalMilliseconds:Q})}if(U=vw.exec($),U){const[G,W,Z,X,L,Y,F,Q]=U;return gw(l0(_w(X),UU(Z),m(W,"day",1,31),{hours:L,minutes:Y,seconds:F,fractionalMilliseconds:Q}))}if(U=cw.exec($),U){const[G,W,Z,X,L,Y,F,Q]=U;return l0(O0(C0(Q)),UU(W),m(Z.trimLeft(),"day",1,31),{hours:X,minutes:L,seconds:Y,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),uw=R(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=FU($);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"),l0=R(($,U,G,W)=>{const Z=U-1;return lw($,Z,G),new Date(Date.UTC($,Z,G,m(W.hours,"hour",0,23),m(W.minutes,"minute",0,59),m(W.seconds,"seconds",0,60),mw(W.fractionalMilliseconds)))},"buildDate"),_w=R(($)=>{const U=(new Date()).getUTCFullYear(),G=Math.floor(U/100)*100+O0(C0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),dw=1576800000000,gw=R(($)=>{if($.getTime()-(new Date()).getTime()>dw)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),UU=R(($)=>{const U=wU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),pw=[31,28,31,30,31,30,31,31,30,31,30,31],lw=R(($,U,G)=>{let W=pw[U];if(U===1&&sw($))W=29;if(G>W)throw new TypeError(`Invalid day for ${wU[U]} in ${$}: ${G}`)},"validateDayOfMonth"),sw=R(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),m=R(($,U,G,W)=>{const Z=OW(C0($));if(Z<G||Z>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return Z},"parseDateValue"),mw=R(($)=>{if($===null||$===void 0)return 0;return TW("0."+$)*1000},"parseMilliseconds"),nw=R(($)=>{const U=$[0];let G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const W=Number($.substring(1,3)),Z=Number($.substring(4,6));return G*(W*60+Z)*60*1000},"parseOffsetToMilliseconds"),C0=R(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),qW=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};R(qW,"ServiceException");var iw=qW,fW=R(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,Z])=>{if($[W]==null||$[W]==="")$[W]=Z});const G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),NW=R(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const Z=ow($),X=Z.httpStatusCode?Z.httpStatusCode+"":void 0,L=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||X||"UnknownError",$fault:"client",$metadata:Z});throw fW(L,U)},"throwDefaultError"),rw=R(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{NW({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),ow=R(($)=>({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"),aw=R(($)=>{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"),zW=!1,tw=R(($)=>{if($&&!zW&&parseInt($.substring(1,$.indexOf(".")))<16)zW=!0},"emitWarningIfUnsupportedVersion"),ew=R(($)=>{const U=[];for(let G in GU.AlgorithmId){const W=GU.AlgorithmId[G];if($[W]===void 0)continue;U.push({algorithmId:()=>W,checksumConstructor:()=>$[W]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(G){this._checksumAlgorithms.push(G)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),$7=R(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),U7=R(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),G7=R(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),jW=R(($)=>{return{...ew($),...U7($)}},"getDefaultExtensionConfiguration"),W7=jW,Z7=R(($)=>{return{...$7($),...G7($)}},"resolveDefaultRuntimeConfig");R(h1,"extendedEncodeURIComponent");var X7=R(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),PW=R(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=PW($[G]);return $},"getValueFromTextNode"),i0=R(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");i0.prototype=Object.create(String.prototype,{constructor:{value:i0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(i0,String);var SW=class $ extends i0{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))}};R(SW,"LazyJsonString");var L7=SW;R(zU,"map");var Y7=R(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),F7=R(($,U)=>{const G={};for(let W in U)DW(G,$,U,W);return G},"take"),Q7=R(($,U,G)=>{return zU($,Object.entries(G).reduce((W,[Z,X])=>{if(Array.isArray(X))W[Z]=X;else if(typeof X==="function")W[Z]=[U,X()];else W[Z]=[U,X];return W},{}))},"mapWithFilter"),DW=R(($,U,G,W)=>{if(U!==null){let L=G[W];if(typeof L==="function")L=[,L];const[Y=w7,F=z7,Q=W]=L;if(typeof Y==="function"&&Y(U[Q])||typeof Y!=="function"&&!!Y)$[W]=F(U[Q]);return}let[Z,X]=G[W];if(typeof X==="function"){let L;const Y=Z===void 0&&(L=X())!=null,F=typeof Z==="function"&&!!Z(void 0)||typeof Z!=="function"&&!!Z;if(Y)$[W]=L;else if(F)$[W]=X()}else{const L=Z===void 0&&X!=null,Y=typeof Z==="function"&&!!Z(X)||typeof Z!=="function"&&!!Z;if(L||Y)$[W]=X}},"applyInstruction"),w7=R(($)=>$!=null,"nonNullish"),z7=R(($)=>$,"pass"),I7=R(($,U,G,W,Z,X)=>{if(U!=null&&U[G]!==void 0){const L=W();if(L.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(Z,X?L.split("/").map((Y)=>h1(Y)).join("/"):h1(L))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),J7=R(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),R7=R(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),LU=R(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(LU);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=LU($[G])}return U}return $},"_json");R(kW,"splitEvery")});var vW=M((hW)=>{Object.defineProperty(hW,"__esModule",{value:!0});hW.isStreamingPayload=void 0;var K7=import.meta.require("stream"),M7=($)=>($===null||$===void 0?void 0:$.body)instanceof K7.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;hW.isStreamingPayload=M7});var $Z=M((G3,eW)=>{var{defineProperty:v1,getOwnPropertyDescriptor:E7,getOwnPropertyNames:V7}=Object,B7=Object.prototype.hasOwnProperty,P=($,U)=>v1($,"name",{value:U,configurable:!0}),T7=($,U)=>{for(var G in U)v1($,G,{get:U[G],enumerable:!0})},A7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of V7(U))if(!B7.call($,Z)&&Z!==G)v1($,Z,{get:()=>U[Z],enumerable:!(W=E7(U,Z))||W.enumerable})}return $},H7=($)=>A7(v1({},"__esModule",{value:!0}),$),yW={};T7(yW,{AdaptiveRetryStrategy:()=>q7,CONFIG_MAX_ATTEMPTS:()=>JU,CONFIG_RETRY_MODE:()=>nW,ENV_MAX_ATTEMPTS:()=>IU,ENV_RETRY_MODE:()=>mW,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>f7,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>j7,StandardRetryStrategy:()=>lW,defaultDelayDecider:()=>_W,defaultRetryDecider:()=>dW,getOmitRetryHeadersPlugin:()=>P7,getRetryAfterHint:()=>tW,getRetryPlugin:()=>x7,omitRetryHeadersMiddleware:()=>iW,omitRetryHeadersMiddlewareOptions:()=>rW,resolveRetryConfig:()=>N7,retryMiddleware:()=>oW,retryMiddlewareOptions:()=>aW});eW.exports=H7(yW);var N0=i(),uW=P$(),q=O4(),O7=P(($,U)=>{const G=$,W=(U==null?void 0:U.noRetryIncrement)??q.NO_RETRY_INCREMENT,Z=(U==null?void 0:U.retryCost)??q.RETRY_COST,X=(U==null?void 0:U.timeoutRetryCost)??q.TIMEOUT_RETRY_COST;let L=$;const Y=P((z)=>z.name==="TimeoutError"?X:Z,"getCapacityAmount"),F=P((z)=>Y(z)<=L,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:P((z)=>{if(!F(z))throw new Error("No retry token available");const I=Y(z);return L-=I,I},"retrieveRetryTokens"),releaseRetryTokens:P((z)=>{L+=z??W,L=Math.min(L,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),_W=P(($,U)=>Math.floor(Math.min(q.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),W0=S$(),dW=P(($)=>{if(!$)return!1;return W0.isRetryableByTrait($)||W0.isClockSkewError($)||W0.isThrottlingError($)||W0.isTransientError($)},"defaultRetryDecider"),gW=P(($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)},"asSdkError"),pW=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=q.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??dW,this.delayDecider=(G==null?void 0:G.delayDecider)??_W,this.retryQuota=(G==null?void 0:G.retryQuota)??O7(q.INITIAL_RETRY_TOKENS)}shouldRetry(U,G,W){return G<W&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(G){U=q.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let Z,X=0,L=0;const Y=await this.getMaxAttempts(),{request:F}=G;if(N0.HttpRequest.isInstance(F))F.headers[q.INVOCATION_ID_HEADER]=uW.v4();while(!0)try{if(N0.HttpRequest.isInstance(F))F.headers[q.REQUEST_HEADER]=`attempt=${X+1}; max=${Y}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:Q,output:w}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(Q);return this.retryQuota.releaseRetryTokens(Z),w.$metadata.attempts=X+1,w.$metadata.totalRetryDelay=L,{response:Q,output:w}}catch(Q){const w=gW(Q);if(X++,this.shouldRetry(w,X,Y)){Z=this.retryQuota.retrieveRetryTokens(w);const z=this.delayDecider(W0.isThrottlingError(w)?q.THROTTLING_RETRY_DELAY_BASE:q.DEFAULT_RETRY_DELAY_BASE,X),I=C7(w.$response),J=Math.max(I||0,z);L+=J,await new Promise((K)=>setTimeout(K,J));continue}if(!w.$metadata)w.$metadata={};throw w.$metadata.attempts=X,w.$metadata.totalRetryDelay=L,w}}};P(pW,"StandardRetryStrategy");var lW=pW,C7=P(($)=>{if(!N0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return W*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),sW=class $ extends lW{constructor(U,G){const{rateLimiter:W,...Z}=G??{};super(U,Z);this.rateLimiter=W??new q.DefaultRateLimiter,this.mode=q.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};P(sW,"AdaptiveRetryStrategy");var q7=sW,cW=b0(),IU="AWS_MAX_ATTEMPTS",JU="max_attempts",f7={environmentVariableSelector:($)=>{const U=$[IU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${IU} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[JU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${JU} mast be a number, got "${U}"`);return G},default:q.DEFAULT_MAX_ATTEMPTS},N7=P(($)=>{const{retryStrategy:U}=$,G=cW.normalizeProvider($.maxAttempts??q.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await cW.normalizeProvider($.retryMode)()===q.RETRY_MODES.ADAPTIVE)return new q.AdaptiveRetryStrategy(G);return new q.StandardRetryStrategy(G)}}},"resolveRetryConfig"),mW="AWS_RETRY_MODE",nW="retry_mode",j7={environmentVariableSelector:($)=>$[mW],configFileSelector:($)=>$[nW],default:q.DEFAULT_RETRY_MODE},iW=P(()=>($)=>async(U)=>{const{request:G}=U;if(N0.HttpRequest.isInstance(G))delete G.headers[q.INVOCATION_ID_HEADER],delete G.headers[q.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),rW={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},P7=P(($)=>({applyToStack:(U)=>{U.addRelativeTo(iW(),rW)}}),"getOmitRetryHeadersPlugin"),S7=f0(),D7=vW(),oW=P(($)=>(U,G)=>async(W)=>{var Z;let X=await $.retryStrategy();const L=await $.maxAttempts();if(k7(X)){X=X;let Y=await X.acquireInitialRetryToken(G.partition_id),F=new Error,Q=0,w=0;const{request:z}=W,I=N0.HttpRequest.isInstance(z);if(I)z.headers[q.INVOCATION_ID_HEADER]=uW.v4();while(!0)try{if(I)z.headers[q.REQUEST_HEADER]=`attempt=${Q+1}; max=${L}`;const{response:J,output:K}=await U(W);return X.recordSuccess(Y),K.$metadata.attempts=Q+1,K.$metadata.totalRetryDelay=w,{response:J,output:K}}catch(J){const K=b7(J);if(F=gW(J),I&&D7.isStreamingPayload(z))throw(Z=G.logger instanceof S7.NoOpLogger?console:G.logger)==null||Z.warn("An error was encountered in a non-retryable streaming request."),F;try{Y=await X.refreshRetryTokenForRetry(Y,K)}catch(E){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=Q+1,F.$metadata.totalRetryDelay=w,F}Q=Y.getRetryCount();const T=Y.getRetryDelay();w+=T,await new Promise((E)=>setTimeout(E,T))}}else{if(X=X,X==null?void 0:X.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},"retryMiddleware"),k7=P(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),b7=P(($)=>{const U={error:$,errorType:h7($)},G=tW($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),h7=P(($)=>{if(W0.isThrottlingError($))return"THROTTLING";if(W0.isTransientError($))return"TRANSIENT";if(W0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),aW={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},x7=P(($)=>({applyToStack:(U)=>{U.add(oW($),aW)}}),"getRetryPlugin"),tW=P(($)=>{if(!N0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)},"getRetryAfterHint")});var KU=M((W3,BZ)=>{var WZ=function($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U},KZ=function($,U){return new EZ($,U)},VZ=function($,U,G,W,Z){return C(async function*X(L,Y,...F){let Q=L.startingToken||void 0,w=!0,z;while(w){if(Y[G]=Q,Z)Y[Z]=Y[Z]??L.pageSize;if(L.client instanceof $)z=await Xz(U,L.client,Y,...F);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield z;const I=Q;Q=Lz(z,W),w=!!(Q&&(!L.stopOnSameToken||Q!==I))}return},"paginateOperation")},y1=Object.defineProperty,v7=Object.getOwnPropertyDescriptor,c7=Object.getOwnPropertyNames,y7=Object.prototype.hasOwnProperty,C=($,U)=>y1($,"name",{value:U,configurable:!0}),u7=($,U)=>{for(var G in U)y1($,G,{get:U[G],enumerable:!0})},_7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of c7(U))if(!y7.call($,Z)&&Z!==G)y1($,Z,{get:()=>U[Z],enumerable:!(W=v7(U,Z))||W.enumerable})}return $},d7=($)=>_7(y1({},"__esModule",{value:!0}),$),UZ={};u7(UZ,{DefaultIdentityProviderConfig:()=>o7,EXPIRATION_MS:()=>JZ,HttpApiKeyAuthSigner:()=>a7,HttpBearerAuthSigner:()=>t7,NoAuthSigner:()=>e7,RequestBuilder:()=>EZ,createIsIdentityExpiredFunction:()=>IZ,createPaginator:()=>VZ,doesIdentityRequireRefresh:()=>RZ,getHttpAuthSchemeEndpointRuleSetPlugin:()=>p7,getHttpAuthSchemePlugin:()=>s7,getHttpSigningPlugin:()=>r7,getSmithyContext:()=>Gz,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>ZZ,httpAuthSchemeMiddleware:()=>RU,httpAuthSchemeMiddlewareOptions:()=>XZ,httpSigningMiddleware:()=>LZ,httpSigningMiddlewareOptions:()=>YZ,isIdentityExpired:()=>$z,memoizeIdentityProvider:()=>Uz,normalizeProvider:()=>Wz,requestBuilder:()=>KZ});BZ.exports=d7(UZ);var GZ=b0();C(WZ,"convertHttpAuthSchemesToMap");var RU=C(($,U)=>(G,W)=>async(Z)=>{var X;const L=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,Z.input)),Y=WZ($.httpAuthSchemes),F=GZ.getSmithyContext(W),Q=[];for(let w of L){const z=Y.get(w.schemeId);if(!z){Q.push(`HttpAuthScheme \`${w.schemeId}\` was not enabled for this service.`);continue}const I=z.identityProvider(await U.identityProviderConfigProvider($));if(!I){Q.push(`HttpAuthScheme \`${w.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:J={},signingProperties:K={}}=((X=w.propertiesExtractor)==null?void 0:X.call(w,$,W))||{};w.identityProperties=Object.assign(w.identityProperties||{},J),w.signingProperties=Object.assign(w.signingProperties||{},K),F.selectedHttpAuthScheme={httpAuthOption:w,identity:await I(w.identityProperties),signer:z.signer};break}if(!F.selectedHttpAuthScheme)throw new Error(Q.join("\n"));return G(Z)},"httpAuthSchemeMiddleware"),g7=W8(),ZZ={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:g7.endpointMiddlewareOptions.name},p7=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(RU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),ZZ)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),l7=A$(),XZ={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:l7.serializerMiddlewareOption.name},s7=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(RU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),XZ)}}),"getHttpAuthSchemePlugin"),u1=i(),m7=C(($)=>(U)=>{throw U},"defaultErrorHandler"),n7=C(($,U)=>{},"defaultSuccessHandler"),LZ=C(($)=>(U,G)=>async(W)=>{if(!u1.HttpRequest.isInstance(W.request))return U(W);const X=GZ.getSmithyContext(G).selectedHttpAuthScheme;if(!X)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:L={}},identity:Y,signer:F}=X,Q=await U({...W,request:await F.sign(W.request,Y,L)}).catch((F.errorHandler||m7)(L));return(F.successHandler||n7)(Q.response,L),Q},"httpSigningMiddleware"),i7=$Z(),YZ={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:i7.retryMiddlewareOptions.name},r7=C(($)=>({applyToStack:(U)=>{U.addRelativeTo(LZ($),YZ)}}),"getHttpSigningPlugin"),FZ=class ${constructor(U){this.authSchemes=new Map;for(let[G,W]of Object.entries(U))if(W!==void 0)this.authSchemes.set(G,W)}getIdentityProvider(U){return this.authSchemes.get(U)}};C(FZ,"DefaultIdentityProviderConfig");var o7=FZ,c1=Q0(),QZ=class ${async sign(U,G,W){if(!W)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!W.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!W.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!G.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const Z=u1.HttpRequest.clone(U);if(W.in===c1.HttpApiKeyAuthLocation.QUERY)Z.query[W.name]=G.apiKey;else if(W.in===c1.HttpApiKeyAuthLocation.HEADER)Z.headers[W.name]=W.scheme?`${W.scheme} ${G.apiKey}`:G.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+W.in+"`");return Z}};C(QZ,"HttpApiKeyAuthSigner");var a7=QZ,wZ=class ${async sign(U,G,W){const Z=u1.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return Z.headers.Authorization=`Bearer ${G.token}`,Z}};C(wZ,"HttpBearerAuthSigner");var t7=wZ,zZ=class ${async sign(U,G,W){return U}};C(zZ,"NoAuthSigner");var e7=zZ,IZ=C(($)=>(U)=>RZ(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),JZ=300000,$z=IZ(JZ),RZ=C(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),Uz=C(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let Z,X,L,Y=!1;const F=C(async(Q)=>{if(!X)X=W(Q);try{Z=await X,L=!0,Y=!1}finally{X=void 0}return Z},"coalesceProvider");if(U===void 0)return async(Q)=>{if(!L||(Q==null?void 0:Q.forceRefresh))Z=await F(Q);return Z};return async(Q)=>{if(!L||(Q==null?void 0:Q.forceRefresh))Z=await F(Q);if(Y)return Z;if(!G(Z))return Y=!0,Z;if(U(Z))return await F(Q),Z;return Z}},"memoizeIdentityProvider"),Gz=C(($)=>$[c1.SMITHY_CONTEXT_KEY]||($[c1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Wz=C(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),Zz=f0();C(KZ,"requestBuilder");var MZ=class ${constructor(U,G){this.input=U,this.context=G,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:G="https",port:W,path:Z}=await this.context.endpoint();this.path=Z;for(let X of this.resolvePathStack)X(this.path);return new u1.HttpRequest({protocol:G,hostname:this.hostname||U,port:W,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((G)=>{this.path=`${(G==null?void 0:G.endsWith("/"))?G.slice(0,-1):G||""}`+U}),this}p(U,G,W,Z){return this.resolvePathStack.push((X)=>{this.path=Zz.resolvedPath(X,this.input,U,G,W,Z)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};C(MZ,"RequestBuilder");var EZ=MZ,Xz=C(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");C(VZ,"createPaginator");var Lz=C(($,U)=>{let G=$;const W=U.split(".");for(let Z of W){if(!G||typeof G!=="object")return;G=G[Z]}return G},"get")});var MX=M((DA,KX)=>{var{defineProperty:U$,getOwnPropertyDescriptor:_z,getOwnPropertyNames:dz}=Object,gz=Object.prototype.hasOwnProperty,pz=($,U)=>U$($,"name",{value:U,configurable:!0}),lz=($,U)=>{for(var G in U)U$($,G,{get:U[G],enumerable:!0})},sz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of dz(U))if(!gz.call($,Z)&&Z!==G)U$($,Z,{get:()=>U[Z],enumerable:!(W=_z(U,Z))||W.enumerable})}return $},mz=($)=>sz(U$({},"__esModule",{value:!0}),$),RX={};lz(RX,{emitWarningIfUnsupportedVersion:()=>nz});KX.exports=mz(RX);var JX=!1,nz=pz(($)=>{if($&&!JX&&parseInt($.substring(1,$.indexOf(".")))<18)JX=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
4
|
+
no longer support Node.js 16.x on January 6, 2025.
|
|
5
|
+
|
|
6
|
+
To continue receiving updates to AWS services, bug fixes, and security
|
|
7
|
+
updates please upgrade to a supported Node.js LTS version.
|
|
8
|
+
|
|
9
|
+
More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var vX=M((kA,xX)=>{var dU=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},L$=Object.defineProperty,iz=Object.getOwnPropertyDescriptor,rz=Object.getOwnPropertyNames,oz=Object.prototype.hasOwnProperty,S=($,U)=>L$($,"name",{value:U,configurable:!0}),az=($,U)=>{for(var G in U)L$($,G,{get:U[G],enumerable:!0})},tz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of rz(U))if(!oz.call($,Z)&&Z!==G)L$($,Z,{get:()=>U[Z],enumerable:!(W=iz(U,Z))||W.enumerable})}return $},ez=($)=>tz(L$({},"__esModule",{value:!0}),$),AX={};az(AX,{SignatureV4:()=>qI,clearCredentialCache:()=>MI,createScope:()=>Z$,getCanonicalHeaders:()=>_U,getCanonicalQuery:()=>PX,getPayloadHash:()=>X$,getSigningKey:()=>jX,moveHeadersToQuery:()=>bX,prepareRequest:()=>gU});xX.exports=ez(AX);var EX=b0(),cU=G0(),$I="X-Amz-Algorithm",UI="X-Amz-Credential",HX="X-Amz-Date",GI="X-Amz-SignedHeaders",WI="X-Amz-Expires",OX="X-Amz-Signature",CX="X-Amz-Security-Token",qX="authorization",fX=HX.toLowerCase(),ZI="date",XI=[qX,fX,ZI],LI=OX.toLowerCase(),uU="x-amz-content-sha256",YI=CX.toLowerCase(),FI={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},QI=/^proxy-/,wI=/^sec-/,yU="AWS4-HMAC-SHA256",zI="AWS4-HMAC-SHA256-PAYLOAD",II="UNSIGNED-PAYLOAD",JI=50,NX="aws4_request",RI=604800,L0=r$(),KI=G0(),k0={},W$=[],Z$=S(($,U,G)=>`${$}/${U}/${G}/${NX}`,"createScope"),jX=S(async($,U,G,W,Z)=>{const X=await VX($,U.secretAccessKey,U.accessKeyId),L=`${G}:${W}:${Z}:${L0.toHex(X)}:${U.sessionToken}`;if(L in k0)return k0[L];W$.push(L);while(W$.length>JI)delete k0[W$.shift()];let Y=`AWS4${U.secretAccessKey}`;for(let F of[G,W,Z,NX])Y=await VX($,Y,F);return k0[L]=Y},"getSigningKey"),MI=S(()=>{W$.length=0,Object.keys(k0).forEach(($)=>{delete k0[$]})},"clearCredentialCache"),VX=S(($,U,G)=>{const W=new $(U);return W.update(KI.toUint8Array(G)),W.digest()},"hmac"),_U=S(({headers:$},U,G)=>{const W={};for(let Z of Object.keys($).sort()){if($[Z]==null)continue;const X=Z.toLowerCase();if(X in FI||(U==null?void 0:U.has(X))||QI.test(X)||wI.test(X)){if(!G||G&&!G.has(X))continue}W[X]=$[Z].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),e0=g$(),PX=S(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($).sort()){if(W.toLowerCase()===LI)continue;U.push(W);const Z=$[W];if(typeof Z==="string")G[W]=`${e0.escapeUri(W)}=${e0.escapeUri(Z)}`;else if(Array.isArray(Z))G[W]=Z.slice(0).reduce((X,L)=>X.concat([`${e0.escapeUri(W)}=${e0.escapeUri(L)}`]),[]).sort().join("&")}return U.map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),EI=v$(),VI=G0(),X$=S(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===uU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||EI.isArrayBuffer(U)){const W=new G;return W.update(VI.toUint8Array(U)),L0.toHex(await W.digest())}return II},"getPayloadHash"),BX=G0(),SX=class ${format(U){const G=[];for(let X of Object.keys(U)){const L=BX.fromUtf8(X);G.push(Uint8Array.from([L.byteLength]),L,this.formatHeaderValue(U[X]))}const W=new Uint8Array(G.reduce((X,L)=>X+L.byteLength,0));let Z=0;for(let X of G)W.set(X,Z),Z+=X.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":const W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":const Z=new Uint8Array(9);return Z[0]=5,Z.set(U.value.bytes,1),Z;case"binary":const X=new DataView(new ArrayBuffer(3+U.value.byteLength));X.setUint8(0,6),X.setUint16(1,U.value.byteLength,!1);const L=new Uint8Array(X.buffer);return L.set(U.value,3),L;case"string":const Y=BX.fromUtf8(U.value),F=new DataView(new ArrayBuffer(3+Y.byteLength));F.setUint8(0,7),F.setUint16(1,Y.byteLength,!1);const Q=new Uint8Array(F.buffer);return Q.set(Y,3),Q;case"timestamp":const w=new Uint8Array(9);return w[0]=8,w.set(AI.fromNumber(U.value.valueOf()).bytes,1),w;case"uuid":if(!TI.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const z=new Uint8Array(17);return z[0]=9,z.set(L0.fromHex(U.value.replace(/\-/g,"")),1),z}}};S(SX,"HeaderFormatter");var BI=SX,TI=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,DX=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const G=new Uint8Array(8);for(let W=7,Z=Math.abs(Math.round(U));W>-1&&Z>0;W--,Z/=256)G[W]=Z;if(U<0)dU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)dU(U);return parseInt(L0.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};S(DX,"Int64");var AI=DX;S(dU,"negate");var HI=S(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),kX=i(),bX=S(($,U={})=>{var G;const{headers:W,query:Z={}}=kX.HttpRequest.clone($);for(let X of Object.keys(W)){const L=X.toLowerCase();if(L.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(L)))Z[X]=W[X],delete W[X]}return{...$,headers:W,query:Z}},"moveHeadersToQuery"),gU=S(($)=>{$=kX.HttpRequest.clone($);for(let U of Object.keys($.headers))if(XI.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),OI=S(($)=>CI($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),CI=S(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),hX=class ${constructor({applyChecksum:U,credentials:G,region:W,service:Z,sha256:X,uriEscapePath:L=!0}){this.headerFormatter=new BI,this.service=Z,this.sha256=X,this.uriEscapePath=L,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=EX.normalizeProvider(W),this.credentialProvider=EX.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:Z=3600,unsignableHeaders:X,unhoistableHeaders:L,signableHeaders:Y,signingRegion:F,signingService:Q}=G,w=await this.credentialProvider();this.validateResolvedCredentials(w);const z=F??await this.regionProvider(),{longDate:I,shortDate:J}=G$(W);if(Z>RI)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const K=Z$(J,z,Q??this.service),T=bX(gU(U),{unhoistableHeaders:L});if(w.sessionToken)T.query[CX]=w.sessionToken;T.query[$I]=yU,T.query[UI]=`${w.accessKeyId}/${K}`,T.query[HX]=I,T.query[WI]=Z.toString(10);const E=_U(T,X,Y);return T.query[GI]=TX(E),T.query[OX]=await this.getSignature(I,K,this.getSigningKey(w,z,J,Q),this.createCanonicalRequest(T,E,await X$(U,this.sha256))),T}async sign(U,G){if(typeof U==="string")return this.signString(U,G);else if(U.headers&&U.payload)return this.signEvent(U,G);else if(U.message)return this.signMessage(U,G);else return this.signRequest(U,G)}async signEvent({headers:U,payload:G},{signingDate:W=new Date,priorSignature:Z,signingRegion:X,signingService:L}){const Y=X??await this.regionProvider(),{shortDate:F,longDate:Q}=G$(W),w=Z$(F,Y,L??this.service),z=await X$({headers:{},body:G},this.sha256),I=new this.sha256;I.update(U);const J=L0.toHex(await I.digest()),K=[zI,Q,w,Z,J,z].join("\n");return this.signString(K,{signingDate:W,signingRegion:Y,signingService:L})}async signMessage(U,{signingDate:G=new Date,signingRegion:W,signingService:Z}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:W,signingService:Z,priorSignature:U.priorSignature}).then((L)=>{return{message:U.message,signature:L}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:Z}={}){const X=await this.credentialProvider();this.validateResolvedCredentials(X);const L=W??await this.regionProvider(),{shortDate:Y}=G$(G),F=new this.sha256(await this.getSigningKey(X,L,Y,Z));return F.update(cU.toUint8Array(U)),L0.toHex(await F.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:Z,signingRegion:X,signingService:L}={}){const Y=await this.credentialProvider();this.validateResolvedCredentials(Y);const F=X??await this.regionProvider(),Q=gU(U),{longDate:w,shortDate:z}=G$(G),I=Z$(z,F,L??this.service);if(Q.headers[fX]=w,Y.sessionToken)Q.headers[YI]=Y.sessionToken;const J=await X$(Q,this.sha256);if(!HI(uU,Q.headers)&&this.applyChecksum)Q.headers[uU]=J;const K=_U(Q,Z,W),T=await this.getSignature(w,I,this.getSigningKey(Y,F,z,L),this.createCanonicalRequest(Q,K,J));return Q.headers[qX]=`${yU} Credential=${Y.accessKeyId}/${I}, SignedHeaders=${TX(K)}, Signature=${T}`,Q}createCanonicalRequest(U,G,W){const Z=Object.keys(G).sort();return`${U.method}
|
|
10
|
+
${this.getCanonicalPath(U)}
|
|
11
|
+
${PX(U)}
|
|
12
|
+
${Z.map((X)=>`${X}:${G[X]}`).join("\n")}
|
|
13
|
+
|
|
14
|
+
${Z.join(";")}
|
|
15
|
+
${W}`}async createStringToSign(U,G,W){const Z=new this.sha256;Z.update(cU.toUint8Array(W));const X=await Z.digest();return`${yU}
|
|
16
|
+
${U}
|
|
17
|
+
${G}
|
|
18
|
+
${L0.toHex(X)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const G=[];for(let X of U.split("/")){if((X==null?void 0:X.length)===0)continue;if(X===".")continue;if(X==="..")G.pop();else G.push(X)}const W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return e0.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,Z){const X=await this.createStringToSign(U,G,Z),L=new this.sha256(await W);return L.update(cU.toUint8Array(X)),L0.toHex(await L.digest())}getSigningKey(U,G,W,Z){return jX(this.sha256,U,W,G,Z||this.service)}validateResolvedCredentials(U){if(typeof U!=="object"||typeof U.accessKeyId!=="string"||typeof U.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};S(hX,"SignatureV4");var qI=hX,G$=S(($)=>{const U=OI($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),TX=S(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var mX=M((bA,sX)=>{var{defineProperty:Y$,getOwnPropertyDescriptor:fI,getOwnPropertyNames:NI}=Object,jI=Object.prototype.hasOwnProperty,h=($,U)=>Y$($,"name",{value:U,configurable:!0}),PI=($,U)=>{for(var G in U)Y$($,G,{get:U[G],enumerable:!0})},SI=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of NI(U))if(!jI.call($,Z)&&Z!==G)Y$($,Z,{get:()=>U[Z],enumerable:!(W=fI(U,Z))||W.enumerable})}return $},DI=($)=>SI(Y$({},"__esModule",{value:!0}),$),dX={};PI(dX,{AWSSDKSigV4Signer:()=>xI,AwsSdkSigV4ASigner:()=>cI,AwsSdkSigV4Signer:()=>sU,NODE_SIGV4A_CONFIG_OPTIONS:()=>_I,resolveAWSSDKSigV4Config:()=>dI,resolveAwsSdkSigV4AConfig:()=>uI,resolveAwsSdkSigV4Config:()=>lX,validateSigningProperties:()=>lU});sX.exports=DI(dX);var kI=i(),bI=i(),cX=h(($)=>{var U,G;return bI.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),pU=h(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),hI=h(($,U)=>Math.abs(pU(U).getTime()-$)>=300000,"isClockSkewed"),yX=h(($,U)=>{const G=Date.parse($);if(hI(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),$1=h(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),lU=h(async($)=>{var U,G,W;const Z=$1("context",$.context),X=$1("config",$.config),L=(W=(G=(U=Z.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],F=await $1("signer",X.signer)(L),Q=$==null?void 0:$.signingRegion,w=$==null?void 0:$.signingRegionSet,z=$==null?void 0:$.signingName;return{config:X,signer:F,signingRegion:Q,signingRegionSet:w,signingName:z}},"validateSigningProperties"),gX=class ${async sign(U,G,W){var Z;if(!kI.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const X=await lU(W),{config:L,signer:Y}=X;let{signingRegion:F,signingName:Q}=X;const w=W.context;if(((Z=w==null?void 0:w.authSchemes)==null?void 0:Z.length)??0>1){const[I,J]=w.authSchemes;if((I==null?void 0:I.name)==="sigv4a"&&(J==null?void 0:J.name)==="sigv4")F=(J==null?void 0:J.signingRegion)??F,Q=(J==null?void 0:J.signingName)??Q}return await Y.sign(U,{signingDate:pU(L.systemClockOffset),signingRegion:F,signingService:Q})}errorHandler(U){return(G)=>{const W=G.ServerTime??cX(G.$response);if(W){const Z=$1("config",U.config),X=Z.systemClockOffset;if(Z.systemClockOffset=yX(W,Z.systemClockOffset),Z.systemClockOffset!==X&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=cX(U);if(W){const Z=$1("config",G.config);Z.systemClockOffset=yX(W,Z.systemClockOffset)}}};h(gX,"AwsSdkSigV4Signer");var sU=gX,xI=sU,vI=i(),pX=class $ extends sU{async sign(U,G,W){var Z;if(!vI.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:X,signer:L,signingRegion:Y,signingRegionSet:F,signingName:Q}=await lU(W),z=(await((Z=X.sigv4aSigningRegionSet)==null?void 0:Z.call(X))??F??[Y]).join(",");return await L.sign(U,{signingDate:pU(X.systemClockOffset),signingRegion:z,signingService:Q})}};h(pX,"AwsSdkSigV4ASigner");var cI=pX,yI=KU(),uX=w$(),uI=h(($)=>{return $.sigv4aSigningRegionSet=yI.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),_I={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new uX.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 uX.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},V0=KU(),_X=vX(),lX=h(($)=>{let U;if($.credentials)U=V0.memoizeIdentityProvider($.credentials,V0.isIdentityExpired,V0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=V0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=h(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:Z}=$;let X;if($.signer)X=V0.normalizeProvider($.signer);else if($.regionInfoProvider)X=h(()=>V0.normalizeProvider($.region)().then(async(L)=>[await $.regionInfoProvider(L,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},L]).then(([L,Y])=>{const{signingRegion:F,signingService:Q}=L;$.signingRegion=$.signingRegion||F||Y,$.signingName=$.signingName||Q||$.serviceId;const w={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:Z,uriEscapePath:G};return new($.signerConstructor||_X.SignatureV4)(w)}),"signer");else X=h(async(L)=>{L=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await V0.normalizeProvider($.region)(),properties:{}},L);const{signingRegion:Y,signingName:F}=L;$.signingRegion=$.signingRegion||Y,$.signingName=$.signingName||F||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:Z,uriEscapePath:G};return new($.signerConstructor||_X.SignatureV4)(Q)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:X}},"resolveAwsSdkSigV4Config"),dI=lX});var F$=M((mI)=>{var gI=":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",nX="[: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]["+gI+"]*",pI=new RegExp("^"+nX+"$"),lI=function($,U){const G=[];let W=U.exec($);while(W){const Z=[];Z.startIndex=U.lastIndex-W[0].length;const X=W.length;for(let L=0;L<X;L++)Z.push(W[L]);G.push(Z),W=U.exec($)}return G},sI=function($){const U=pI.exec($);return!(U===null||typeof U==="undefined")};mI.isExist=function($){return typeof $!=="undefined"};mI.isEmptyObject=function($){return Object.keys($).length===0};mI.merge=function($,U,G){if(U){const W=Object.keys(U),Z=W.length;for(let X=0;X<Z;X++)if(G==="strict")$[W[X]]=[U[W[X]]];else $[W[X]]=U[W[X]]}};mI.getValue=function($){if(mI.isExist($))return $;else return""};mI.isName=sI;mI.getAllMatches=lI;mI.nameRegexp=nX});var nU=M((FJ)=>{var rX=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},oX=function($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(G,U-G);if(U>5&&W==="xml")return j("InvalidXml","XML declaration allowed only at the start of the document.",b($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},aX=function($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let G=1;for(U+=8;U<$.length;U++)if($[U]==="<")G++;else if($[U]===">"){if(G--,G===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U},GJ=function($,U){let G="",W="",Z=!1;for(;U<$.length;U++){if($[U]===$J||$[U]===UJ)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){Z=!0;break}}G+=$[U]}if(W!=="")return!1;return{value:G,index:U,tagClosed:Z}},tX=function($,U){const G=mU.getAllMatches($,WJ),W={};for(let Z=0;Z<G.length;Z++){if(G[Z][1].length===0)return j("InvalidAttr","Attribute '"+G[Z][2]+"' has no space in starting.",U1(G[Z]));else if(G[Z][3]!==void 0&&G[Z][4]===void 0)return j("InvalidAttr","Attribute '"+G[Z][2]+"' is without value.",U1(G[Z]));else if(G[Z][3]===void 0&&!U.allowBooleanAttributes)return j("InvalidAttr","boolean attribute '"+G[Z][2]+"' is not allowed.",U1(G[Z]));const X=G[Z][2];if(!LJ(X))return j("InvalidAttr","Attribute '"+X+"' is an invalid name.",U1(G[Z]));if(!W.hasOwnProperty(X))W[X]=1;else return j("InvalidAttr","Attribute '"+X+"' is repeated.",U1(G[Z]))}return!0},ZJ=function($,U){let G=/\d/;if($[U]==="x")U++,G=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(G))break}return-1},XJ=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,ZJ($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U},j=function($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}},LJ=function($){return mU.isName($)},YJ=function($){return mU.isName($)},b=function($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}},U1=function($){return $.startIndex+$[1].length},mU=F$(),eI={allowBooleanAttributes:!1,unpairedTags:[]};FJ.validate=function($,U){U=Object.assign({},eI,U);const G=[];let W=!1,Z=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let X=0;X<$.length;X++)if($[X]==="<"&&$[X+1]==="?"){if(X+=2,X=oX($,X),X.err)return X}else if($[X]==="<"){let L=X;if(X++,$[X]==="!"){X=aX($,X);continue}else{let Y=!1;if($[X]==="/")Y=!0,X++;let F="";for(;X<$.length&&$[X]!==">"&&$[X]!==" "&&$[X]!=="\t"&&$[X]!=="\n"&&$[X]!=="\r";X++)F+=$[X];if(F=F.trim(),F[F.length-1]==="/")F=F.substring(0,F.length-1),X--;if(!YJ(F)){let z;if(F.trim().length===0)z="Invalid space after '<'.";else z="Tag '"+F+"' is an invalid name.";return j("InvalidTag",z,b($,X))}const Q=GJ($,X);if(Q===!1)return j("InvalidAttr","Attributes for '"+F+"' have open quote.",b($,X));let w=Q.value;if(X=Q.index,w[w.length-1]==="/"){const z=X-w.length;w=w.substring(0,w.length-1);const I=tX(w,U);if(I===!0)W=!0;else return j(I.err.code,I.err.msg,b($,z+I.err.line))}else if(Y)if(!Q.tagClosed)return j("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",b($,X));else if(w.trim().length>0)return j("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",b($,L));else if(G.length===0)return j("InvalidTag","Closing tag '"+F+"' has not been opened.",b($,L));else{const z=G.pop();if(F!==z.tagName){let I=b($,z.tagStartPos);return j("InvalidTag","Expected closing tag '"+z.tagName+"' (opened in line "+I.line+", col "+I.col+") instead of closing tag '"+F+"'.",b($,L))}if(G.length==0)Z=!0}else{const z=tX(w,U);if(z!==!0)return j(z.err.code,z.err.msg,b($,X-w.length+z.err.line));if(Z===!0)return j("InvalidXml","Multiple possible root nodes found.",b($,X));else if(U.unpairedTags.indexOf(F)!==-1);else G.push({tagName:F,tagStartPos:L});W=!0}for(X++;X<$.length;X++)if($[X]==="<")if($[X+1]==="!"){X++,X=aX($,X);continue}else if($[X+1]==="?"){if(X=oX($,++X),X.err)return X}else break;else if($[X]==="&"){const z=XJ($,X);if(z==-1)return j("InvalidChar","char '&' is not expected.",b($,X));X=z}else if(Z===!0&&!rX($[X]))return j("InvalidXml","Extra text at the end",b($,X));if($[X]==="<")X--}}else{if(rX($[X]))continue;return j("InvalidChar","char '"+$[X]+"' is not expected.",b($,X))}if(!W)return j("InvalidXml","Start tag expected.",1);else if(G.length==1)return j("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",b($,G[0].tagStartPos));else if(G.length>0)return j("InvalidXml","Invalid '"+JSON.stringify(G.map((X)=>X.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var $J='"',UJ="'",WJ=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var $L=M((zJ)=>{var eX={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,U,G){return $}},wJ=function($){return Object.assign({},eX,$)};zJ.buildOptions=wJ;zJ.defaultOptions=eX});var WL=M((cA,GL)=>{class UL{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})}}GL.exports=UL});var XL=M((yA,ZL)=>{var KJ=function($,U){const G={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let W=1,Z=!1,X=!1,L="";for(;U<$.length;U++)if($[U]==="<"&&!X){if(Z&&VJ($,U)){if(U+=7,[entityName,val,U]=MJ($,U+1),val.indexOf("&")===-1)G[HJ(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(Z&&BJ($,U))U+=8;else if(Z&&TJ($,U))U+=8;else if(Z&&AJ($,U))U+=9;else if(EJ)X=!0;else throw new Error("Invalid DOCTYPE");W++,L=""}else if($[U]===">"){if(X){if($[U-1]==="-"&&$[U-2]==="-")X=!1,W--}else W--;if(W===0)break}else if($[U]==="[")Z=!0;else L+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}},MJ=function($,U){let G="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)G+=$[U];if(G=G.trim(),G.indexOf(" ")!==-1)throw new Error("External entites are not supported");const W=$[U++];let Z="";for(;U<$.length&&$[U]!==W;U++)Z+=$[U];return[G,Z,U]},EJ=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},VJ=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},BJ=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},TJ=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},AJ=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},HJ=function($){if(RJ.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},RJ=F$();ZL.exports=KJ});var YL=M((uA,LL)=>{var fJ=function($,U={}){if(U=Object.assign({},qJ,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&OJ.test(G))return Number.parseInt(G,16);else{const W=CJ.exec(G);if(W){const Z=W[1],X=W[2];let L=NJ(W[3]);const Y=W[4]||W[6];if(!U.leadingZeros&&X.length>0&&Z&&G[2]!==".")return $;else if(!U.leadingZeros&&X.length>0&&!Z&&G[1]!==".")return $;else{const F=Number(G),Q=""+F;if(Q.search(/[eE]/)!==-1)if(U.eNotation)return F;else return $;else if(Y)if(U.eNotation)return F;else return $;else if(G.indexOf(".")!==-1)if(Q==="0"&&L==="")return F;else if(Q===L)return F;else if(Z&&Q==="-"+L)return F;else return $;if(X)if(L===Q)return F;else if(Z+L===Q)return F;else return $;if(G===Q)return F;else if(G===Z+Q)return F;return $}}else return $}},NJ=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},OJ=/^[-+]?0x[a-fA-F0-9]+$/,CJ=/^([\-\+])?(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 qJ={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};LL.exports=fJ});var zL=M((_A,wL)=>{var SJ=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}},DJ=function($,U,G,W,Z,X,L){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!L)$=this.replaceEntitiesValue($);const Y=this.options.tagValueProcessor(U,$,G,Z,X);if(Y===null||Y===void 0)return $;else if(typeof Y!==typeof $||Y!==$)return Y;else if(this.options.trimValues)return rU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return rU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},kJ=function($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $},hJ=function($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=FL.getAllMatches($,bJ),Z=W.length,X={};for(let L=0;L<Z;L++){const Y=this.resolveNameSpace(W[L][1]);let F=W[L][4],Q=this.options.attributeNamePrefix+Y;if(Y.length){if(this.options.transformAttributeName)Q=this.options.transformAttributeName(Q);if(Q==="__proto__")Q="#__proto__";if(F!==void 0){if(this.options.trimValues)F=F.trim();F=this.replaceEntitiesValue(F);const w=this.options.attributeValueProcessor(Y,F,U);if(w===null||w===void 0)X[Q]=F;else if(typeof w!==typeof F||w!==F)X[Q]=w;else X[Q]=rU(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)X[Q]=!0}}if(!Object.keys(X).length)return;if(this.options.attributesGroupName){const L={};return L[this.options.attributesGroupName]=X,L}return X}},vJ=function($,U,G){const W=this.options.updateTag(U.tagname,G,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)},yJ=function($,U,G,W){if($){if(W===void 0)W=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,G,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,W),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $},uJ=function($,U,G){const W="*."+G;for(let Z in $){const X=$[Z];if(W===X||U===X)return!0}return!1},_J=function($,U,G=">"){let W,Z="";for(let X=U;X<$.length;X++){let L=$[X];if(W){if(L===W)W=""}else if(L==='"'||L==="'")W=L;else if(L===G[0])if(G[1]){if($[X+1]===G[1])return{data:Z,index:X}}else return{data:Z,index:X};else if(L==="\t")L=" ";Z+=L}},B0=function($,U,G,W){const Z=$.indexOf(U,G);if(Z===-1)throw new Error(W);else return Z+U.length-1},iU=function($,U,G,W=">"){const Z=_J($,U+1,W);if(!Z)return;let X=Z.data;const L=Z.index,Y=X.search(/\s/);let F=X,Q=!0;if(Y!==-1)F=X.substring(0,Y),X=X.substring(Y+1).trimStart();const w=F;if(G){const z=F.indexOf(":");if(z!==-1)F=F.substr(z+1),Q=F!==Z.data.substr(z+1)}return{tagName:F,tagExp:X,closeIndex:L,attrExpPresent:Q,rawTagName:w}},dJ=function($,U,G){const W=G;let Z=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const X=B0($,">",G,`${U} is not closed`);if($.substring(G+2,X).trim()===U){if(Z--,Z===0)return{tagContent:$.substring(W,G),i:X}}G=X}else if($[G+1]==="?")G=B0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=B0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=B0($,"]]>",G,"StopNode is not closed.")-2;else{const X=iU($,G,">");if(X){if((X&&X.tagName)===U&&X.tagExp[X.tagExp.length-1]!=="/")Z++;G=X.closeIndex}}},rU=function($,U,G){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return PJ($,G)}else if(FL.isExist($))return $;else return""},FL=F$(),G1=WL(),jJ=XL(),PJ=YL();class QL{constructor($){this.options=$,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,16))}},this.addExternalEntities=SJ,this.parseXml=xJ,this.parseTextData=DJ,this.resolveNameSpace=kJ,this.buildAttributesMap=hJ,this.isItStopNode=uJ,this.replaceEntitiesValue=cJ,this.readStopNodeData=dJ,this.saveTextToParentTag=yJ,this.addChild=vJ}}var bJ=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),xJ=function($){$=$.replace(/\r\n?/g,"\n");const U=new G1("!xml");let G=U,W="",Z="";for(let X=0;X<$.length;X++)if($[X]==="<")if($[X+1]==="/"){const Y=B0($,">",X,"Closing Tag is not closed.");let F=$.substring(X+2,Y).trim();if(this.options.removeNSPrefix){const z=F.indexOf(":");if(z!==-1)F=F.substr(z+1)}if(this.options.transformTagName)F=this.options.transformTagName(F);if(G)W=this.saveTextToParentTag(W,G,Z);const Q=Z.substring(Z.lastIndexOf(".")+1);if(F&&this.options.unpairedTags.indexOf(F)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${F}>`);let w=0;if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)w=Z.lastIndexOf(".",Z.lastIndexOf(".")-1),this.tagsNodeStack.pop();else w=Z.lastIndexOf(".");Z=Z.substring(0,w),G=this.tagsNodeStack.pop(),W="",X=Y}else if($[X+1]==="?"){let Y=iU($,X,!1,"?>");if(!Y)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,Z),this.options.ignoreDeclaration&&Y.tagName==="?xml"||this.options.ignorePiTags);else{const F=new G1(Y.tagName);if(F.add(this.options.textNodeName,""),Y.tagName!==Y.tagExp&&Y.attrExpPresent)F[":@"]=this.buildAttributesMap(Y.tagExp,Z,Y.tagName);this.addChild(G,F,Z)}X=Y.closeIndex+1}else if($.substr(X+1,3)==="!--"){const Y=B0($,"-->",X+4,"Comment is not closed.");if(this.options.commentPropName){const F=$.substring(X+4,Y-2);W=this.saveTextToParentTag(W,G,Z),G.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}X=Y}else if($.substr(X+1,2)==="!D"){const Y=jJ($,X);this.docTypeEntities=Y.entities,X=Y.i}else if($.substr(X+1,2)==="!["){const Y=B0($,"]]>",X,"CDATA is not closed.")-2,F=$.substring(X+9,Y);W=this.saveTextToParentTag(W,G,Z);let Q=this.parseTextData(F,G.tagname,Z,!0,!1,!0,!0);if(Q==null)Q="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:F}]);else G.add(this.options.textNodeName,Q);X=Y+2}else{let Y=iU($,X,this.options.removeNSPrefix),F=Y.tagName;const Q=Y.rawTagName;let{tagExp:w,attrExpPresent:z,closeIndex:I}=Y;if(this.options.transformTagName)F=this.options.transformTagName(F);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,Z,!1)}const J=G;if(J&&this.options.unpairedTags.indexOf(J.tagname)!==-1)G=this.tagsNodeStack.pop(),Z=Z.substring(0,Z.lastIndexOf("."));if(F!==U.tagname)Z+=Z?"."+F:F;if(this.isItStopNode(this.options.stopNodes,Z,F)){let K="";if(w.length>0&&w.lastIndexOf("/")===w.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),Z=Z.substr(0,Z.length-1),w=F;else w=w.substr(0,w.length-1);X=Y.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)X=Y.closeIndex;else{const E=this.readStopNodeData($,Q,I+1);if(!E)throw new Error(`Unexpected end of ${Q}`);X=E.i,K=E.tagContent}const T=new G1(F);if(F!==w&&z)T[":@"]=this.buildAttributesMap(w,Z,F);if(K)K=this.parseTextData(K,F,Z,!0,z,!0,!0);Z=Z.substr(0,Z.lastIndexOf(".")),T.add(this.options.textNodeName,K),this.addChild(G,T,Z)}else{if(w.length>0&&w.lastIndexOf("/")===w.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),Z=Z.substr(0,Z.length-1),w=F;else w=w.substr(0,w.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);const K=new G1(F);if(F!==w&&z)K[":@"]=this.buildAttributesMap(w,Z,F);this.addChild(G,K,Z),Z=Z.substr(0,Z.lastIndexOf("."))}else{const K=new G1(F);if(this.tagsNodeStack.push(G),F!==w&&z)K[":@"]=this.buildAttributesMap(w,Z,F);this.addChild(G,K,Z),G=K}W="",X=I}}else W+=$[X];return U.child},cJ=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const G=this.docTypeEntities[U];$=$.replace(G.regx,G.val)}for(let U in this.lastEntities){const G=this.lastEntities[U];$=$.replace(G.regex,G.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const G=this.htmlEntities[U];$=$.replace(G.regex,G.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};wL.exports=QL});var JL=M((mJ)=>{var gJ=function($,U){return IL($,U)},IL=function($,U,G){let W;const Z={};for(let X=0;X<$.length;X++){const L=$[X],Y=pJ(L);let F="";if(G===void 0)F=Y;else F=G+"."+Y;if(Y===U.textNodeName)if(W===void 0)W=L[Y];else W+=""+L[Y];else if(Y===void 0)continue;else if(L[Y]){let Q=IL(L[Y],U,F);const w=sJ(Q,U);if(L[":@"])lJ(Q,L[":@"],F,U);else if(Object.keys(Q).length===1&&Q[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)Q=Q[U.textNodeName];else if(Object.keys(Q).length===0)if(U.alwaysCreateTextNode)Q[U.textNodeName]="";else Q="";if(Z[Y]!==void 0&&Z.hasOwnProperty(Y)){if(!Array.isArray(Z[Y]))Z[Y]=[Z[Y]];Z[Y].push(Q)}else if(U.isArray(Y,F,w))Z[Y]=[Q];else Z[Y]=Q}}if(typeof W==="string"){if(W.length>0)Z[U.textNodeName]=W}else if(W!==void 0)Z[U.textNodeName]=W;return Z},pJ=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}},lJ=function($,U,G,W){if(U){const Z=Object.keys(U),X=Z.length;for(let L=0;L<X;L++){const Y=Z[L];if(W.isArray(Y,G+"."+Y,!0,!0))$[Y]=[U[Y]];else $[Y]=U[Y]}}},sJ=function($,U){const{textNodeName:G}=U,W=Object.keys($).length;if(W===0)return!0;if(W===1&&($[G]||typeof $[G]==="boolean"||$[G]===0))return!0;return!1};mJ.prettify=gJ});var ML=M((gA,KL)=>{var{buildOptions:iJ}=$L(),rJ=zL(),{prettify:oJ}=JL(),aJ=nU();class RL{constructor($){this.externalEntities={},this.options=iJ($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};const Z=aJ.validate($,U);if(Z!==!0)throw Error(`${Z.err.msg}:${Z.err.line}:${Z.err.col}`)}const G=new rJ(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return oJ(W,this.options)}addEntity($,U){if(U.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if($.indexOf("&")!==-1||$.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}KL.exports=RL});var AL=M((pA,TL)=>{var tJ=function($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return VL($,U,"",G)},VL=function($,U,G,W){let Z="",X=!1;for(let L=0;L<$.length;L++){const Y=$[L],F=eJ(Y);if(F===void 0)continue;let Q="";if(G.length===0)Q=F;else Q=`${G}.${F}`;if(F===U.textNodeName){let K=Y[F];if(!$R(Q,U))K=U.tagValueProcessor(F,K),K=BL(K,U);if(X)Z+=W;Z+=K,X=!1;continue}else if(F===U.cdataPropName){if(X)Z+=W;Z+=`<![CDATA[${Y[F][0][U.textNodeName]}]]>`,X=!1;continue}else if(F===U.commentPropName){Z+=W+`<!--${Y[F][0][U.textNodeName]}-->`,X=!0;continue}else if(F[0]==="?"){const K=EL(Y[":@"],U),T=F==="?xml"?"":W;let E=Y[F][0][U.textNodeName];E=E.length!==0?" "+E:"",Z+=T+`<${F}${E}${K}?>`,X=!0;continue}let w=W;if(w!=="")w+=U.indentBy;const z=EL(Y[":@"],U),I=W+`<${F}${z}`,J=VL(Y[F],U,Q,w);if(U.unpairedTags.indexOf(F)!==-1)if(U.suppressUnpairedNode)Z+=I+">";else Z+=I+"/>";else if((!J||J.length===0)&&U.suppressEmptyNode)Z+=I+"/>";else if(J&&J.endsWith(">"))Z+=I+`>${J}${W}</${F}>`;else{if(Z+=I+">",J&&W!==""&&(J.includes("/>")||J.includes("</")))Z+=W+U.indentBy+J+W;else Z+=J;Z+=`</${F}>`}X=!0}return Z},eJ=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}},EL=function($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let Z=U.attributeValueProcessor(W,$[W]);if(Z=BL(Z,U),Z===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${Z}"`}return G},$R=function($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let G=$.substr($.lastIndexOf(".")+1);for(let W in U.stopNodes)if(U.stopNodes[W]===$||U.stopNodes[W]==="*."+G)return!0;return!1},BL=function($,U){if($&&$.length>0&&U.processEntities)for(let G=0;G<U.entities.length;G++){const W=U.entities[G];$=$.replace(W.regex,W.val)}return $};TL.exports=tJ});var OL=M((lA,HL)=>{var Y0=function($){if(this.options=Object.assign({},GR,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=XR;if(this.processTextOrObjNode=WR,this.options.format)this.indentate=ZR,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},WR=function($,U,G){const W=this.j2x($,G+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,W.attrStr,G);else return this.buildObjectNode(W.val,U,W.attrStr,G)},ZR=function($){return this.options.indentBy.repeat($)},XR=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},UR=AL(),GR={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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("\'","g"),val:"'"},{regex:new RegExp("\"","g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};Y0.prototype.build=function($){if(this.options.preserveOrder)return UR($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};Y0.prototype.j2x=function($,U){let G="",W="";for(let Z in $){if(!Object.prototype.hasOwnProperty.call($,Z))continue;if(typeof $[Z]==="undefined"){if(this.isAttribute(Z))W+=""}else if($[Z]===null)if(this.isAttribute(Z))W+="";else if(Z[0]==="?")W+=this.indentate(U)+"<"+Z+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+Z+"/"+this.tagEndChar;else if($[Z]instanceof Date)W+=this.buildTextValNode($[Z],Z,"",U);else if(typeof $[Z]!=="object"){const X=this.isAttribute(Z);if(X)G+=this.buildAttrPairStr(X,""+$[Z]);else if(Z===this.options.textNodeName){let L=this.options.tagValueProcessor(Z,""+$[Z]);W+=this.replaceEntitiesValue(L)}else W+=this.buildTextValNode($[Z],Z,"",U)}else if(Array.isArray($[Z])){const X=$[Z].length;let L="",Y="";for(let F=0;F<X;F++){const Q=$[Z][F];if(typeof Q==="undefined");else if(Q===null)if(Z[0]==="?")W+=this.indentate(U)+"<"+Z+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+Z+"/"+this.tagEndChar;else if(typeof Q==="object")if(this.options.oneListGroup){const w=this.j2x(Q,U+1);if(L+=w.val,this.options.attributesGroupName&&Q.hasOwnProperty(this.options.attributesGroupName))Y+=w.attrStr}else L+=this.processTextOrObjNode(Q,Z,U);else if(this.options.oneListGroup){let w=this.options.tagValueProcessor(Z,Q);w=this.replaceEntitiesValue(w),L+=w}else L+=this.buildTextValNode(Q,Z,"",U)}if(this.options.oneListGroup)L=this.buildObjectNode(L,Z,Y,U);W+=L}else if(this.options.attributesGroupName&&Z===this.options.attributesGroupName){const X=Object.keys($[Z]),L=X.length;for(let Y=0;Y<L;Y++)G+=this.buildAttrPairStr(X[Y],""+$[Z][X[Y]])}else W+=this.processTextOrObjNode($[Z],Z,U)}return{attrStr:G,val:W}};Y0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};Y0.prototype.buildObjectNode=function($,U,G,W){if($==="")if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else{let Z="</"+U+this.tagEndChar,X="";if(U[0]==="?")X="?",Z="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+G+X+">"+$+Z;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&X.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+G+X+this.tagEndChar+$+this.indentate(W)+Z}};Y0.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};Y0.prototype.buildTextValNode=function($,U,G,W){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(W)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(W)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else{let Z=this.options.tagValueProcessor(U,$);if(Z=this.replaceEntitiesValue(Z),Z==="")return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+G+">"+Z+"</"+U+this.tagEndChar}};Y0.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};HL.exports=Y0});var qL=M((sA,CL)=>{var LR=nU(),YR=ML(),FR=OL();CL.exports={XMLParser:YR,XMLValidator:LR,XMLBuilder:FR}});var DL=M((mA,SL)=>{var{defineProperty:Q$,getOwnPropertyDescriptor:QR,getOwnPropertyNames:wR}=Object,zR=Object.prototype.hasOwnProperty,x=($,U)=>Q$($,"name",{value:U,configurable:!0}),IR=($,U)=>{for(var G in U)Q$($,G,{get:U[G],enumerable:!0})},JR=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of wR(U))if(!zR.call($,Z)&&Z!==G)Q$($,Z,{get:()=>U[Z],enumerable:!(W=QR(U,Z))||W.enumerable})}return $},RR=($)=>JR(Q$({},"__esModule",{value:!0}),$),fL={};IR(fL,{_toBool:()=>MR,_toNum:()=>ER,_toStr:()=>KR,awsExpectUnion:()=>BR,loadRestJsonErrorCode:()=>HR,loadRestXmlErrorCode:()=>fR,parseJsonBody:()=>jL,parseJsonErrorBody:()=>AR,parseXmlBody:()=>PL,parseXmlErrorBody:()=>qR});SL.exports=RR(fL);var KR=x(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){const U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){const U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),MR=x(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const G=new Error(`Received string "${$}" where a boolean was expected.`);G.name="Warning",console.warn(G)}return $!==""&&U!=="false"}return $},"_toBool"),ER=x(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const G=new Error(`Received string "${$}" where a number was expected.`);return G.name="Warning",console.warn(G),$}return U}return $},"_toNum"),VR=f0(),BR=x(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return VR.expectUnion($)},"awsExpectUnion"),TR=f0(),NL=x(($,U)=>TR.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),jL=x(($,U)=>NL($,U).then((G)=>{if(G.length)try{return JSON.parse(G)}catch(W){if((W==null?void 0:W.name)==="SyntaxError")Object.defineProperty(W,"$responseBodyText",{value:G});throw W}return{}}),"parseJsonBody"),AR=x(async($,U)=>{const G=await jL($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),HR=x(($,U)=>{const G=x((X,L)=>Object.keys(X).find((Y)=>Y.toLowerCase()===L.toLowerCase()),"findKey"),W=x((X)=>{let L=X;if(typeof L==="number")L=L.toString();if(L.indexOf(",")>=0)L=L.split(",")[0];if(L.indexOf(":")>=0)L=L.split(":")[0];if(L.indexOf("#")>=0)L=L.split("#")[1];return L},"sanitizeErrorCode"),Z=G($.headers,"x-amzn-errortype");if(Z!==void 0)return W($.headers[Z]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),OR=f0(),CR=qL(),PL=x(($,U)=>NL($,U).then((G)=>{if(G.length){const W=new CR.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(F,Q)=>Q.trim()===""&&Q.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let Z;try{Z=W.parse(G,!0)}catch(F){if(F&&typeof F==="object")Object.defineProperty(F,"$responseBodyText",{value:G});throw F}const X="#text",L=Object.keys(Z)[0],Y=Z[L];if(Y[X])Y[L]=Y[X],delete Y[X];return OR.getValueFromTextNode(Y)}return{}}),"parseXmlBody"),qR=x(async($,U)=>{const G=await PL($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),fR=x(($,U)=>{var G;if(((G=U==null?void 0:U.Error)==null?void 0:G.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var jR=M((W1)=>{Object.defineProperty(W1,"__esModule",{value:!0});var oU=NR();oU.__exportStar(MX(),W1);oU.__exportStar(mX(),W1);oU.__exportStar(DL(),W1)});function lR($){return $}var lL=($)=>(U)=>async(G)=>{if(!c.isInstance(G.request))return U(G);const{request:W}=G,{handlerProtocol:Z=""}=$.requestHandler.metadata||{};if(Z.indexOf("h2")>=0&&!W.headers[":authority"])delete W.headers.host,W.headers[":authority"]=W.hostname+(W.port?":"+W.port:"");else if(!W.headers.host){let X=W.hostname;if(W.port!=null)X+=`:${W.port}`;W.headers.host=X}return U(G)},sL={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},sR=($)=>({applyToStack:(U)=>{U.add(lL($),sL)}});var mL=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:Z,commandName:X,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:Q}=Y,w=F??U.inputFilterSensitiveLog,z=Q??U.outputFilterSensitiveLog,{$metadata:I,...J}=W.output;return L?.info?.({clientName:Z,commandName:X,input:w(G.input),output:z(J),metadata:I}),W}catch(W){const{clientName:Z,commandName:X,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:F}=Y,Q=F??U.inputFilterSensitiveLog;throw L?.error?.({clientName:Z,commandName:X,input:Q(G.input),error:W,metadata:W.$metadata}),W}},nL={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},nR=($)=>({applyToStack:(U)=>{U.add(mL(),nL)}});var UG="X-Amzn-Trace-Id",iL="AWS_LAMBDA_FUNCTION_NAME",rL="_X_AMZN_TRACE_ID",oL=($)=>(U)=>async(G)=>{const{request:W}=G;if(!c.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(UG))return U(G);const Z=process.env[iL],X=process.env[rL],L=(Y)=>typeof Y==="string"&&Y.length>0;if(L(Z)&&L(X))W.headers[UG]=X;return U({...G,request:W})},aL={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},tR=($)=>({applyToStack:(U)=>{U.add(oL($),aL)}});function Z3($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var Yz=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}$"),r0=($)=>Yz.test($)||$.startsWith("[")&&$.endsWith("]");var Fz=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),o0=($,U=!1)=>{if(!U)return Fz.test($);const G=$.split(".");for(let W of G)if(!o0(W))return!1;return!0};var a0={};var a="endpoints";function _($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${_($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(_).join(", ")})`;return JSON.stringify($,null,2)}class O extends Error{constructor($){super($);this.name="EndpointError"}}var TZ=($,U)=>$===U;var AZ=($)=>{const U=$.split("."),G=[];for(let W of U){const Z=W.indexOf("[");if(Z!==-1){if(W.indexOf("]")!==W.length-1)throw new O(`Path: '${$}' does not end with ']'`);const X=W.slice(Z+1,-1);if(Number.isNaN(parseInt(X)))throw new O(`Invalid array index: '${X}' in path: '${$}'`);if(Z!==0)G.push(W.slice(0,Z));G.push(X)}else G.push(W)}return G};var _1=($,U)=>AZ(U).reduce((G,W)=>{if(typeof G!=="object")throw new O(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var HZ=($)=>$!=null;var OZ=($)=>!$;var d1=EU(Q0(),1);var MU={[d1.EndpointURLScheme.HTTP]:80,[d1.EndpointURLScheme.HTTPS]:443},CZ=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:I,port:J,protocol:K="",path:T="",query:E={}}=$,B=new URL(`${K}//${I}${J?`:${J}`:""}${T}`);return B.search=Object.entries(E).map(([V,A])=>`${V}=${A}`).join("&"),B}return new URL($)}catch(I){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:W,hostname:Z,pathname:X,protocol:L,search:Y}=U;if(Y)return null;const F=L.slice(0,-1);if(!Object.values(d1.EndpointURLScheme).includes(F))return null;const Q=r0(Z),w=G.includes(`${W}:${MU[F]}`)||typeof $==="string"&&$.includes(`${W}:${MU[F]}`),z=`${W}${w?`:${MU[F]}`:""}`;return{scheme:F,authority:z,path:X,normalizedPath:X.endsWith("/")?X:`${X}/`,isIp:Q}};var qZ=($,U)=>$===U;var fZ=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var NZ=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var jZ={booleanEquals:TZ,getAttr:_1,isSet:HZ,isValidHostLabel:o0,not:OZ,parseURL:CZ,stringEquals:qZ,substring:fZ,uriEncode:NZ};var g1=($,U)=>{const G=[],W={...U.endpointParams,...U.referenceRecord};let Z=0;while(Z<$.length){const X=$.indexOf("{",Z);if(X===-1){G.push($.slice(Z));break}G.push($.slice(Z,X));const L=$.indexOf("}",X);if(L===-1){G.push($.slice(X));break}if($[X+1]==="{"&&$[L+1]==="}")G.push($.slice(X+1,L)),Z=L+2;const Y=$.substring(X+1,L);if(Y.includes("#")){const[F,Q]=Y.split("#");G.push(_1(W[F],Q))}else G.push(W[Y]);Z=L+1}return G.join("")};var PZ=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var Z0=($,U,G)=>{if(typeof $==="string")return g1($,G);else if($.fn)return p1($,G);else if($.ref)return PZ($,G);throw new O(`'${U}': ${String($)} is not a string, function or reference.`)};var p1=({fn:$,argv:U},G)=>{const W=U.map((X)=>["boolean","number"].includes(typeof X)?X:Z0(X,"arg",G)),Z=$.split(".");if(Z[0]in a0&&Z[1]!=null)return a0[Z[0]][Z[1]](...W);return jZ[$](...W)};var SZ=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new O(`'${$}' is already defined in Reference Record.`);const W=p1(U,G);return G.logger?.debug?.(`${a} evaluateCondition: ${_(U)} = ${_(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var j0=($=[],U)=>{const G={};for(let W of $){const{result:Z,toAssign:X}=SZ(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!Z)return{result:Z};if(X)G[X.name]=X.value,U.logger?.debug?.(`${a} assign: ${X.name} := ${_(X.value)}`)}return{result:!0,referenceRecord:G}};var DZ=($,U)=>Object.entries($).reduce((G,[W,Z])=>({...G,[W]:Z.map((X)=>{const L=Z0(X,"Header value entry",U);if(typeof L!=="string")throw new O(`Header '${W}' value '${L}' is not a string`);return L})}),{});var VU=($,U)=>{if(Array.isArray($))return $.map((G)=>VU(G,U));switch(typeof $){case"string":return g1($,U);case"object":if($===null)throw new O(`Unexpected endpoint property: ${$}`);return l1($,U);case"boolean":return $;default:throw new O(`Unexpected endpoint property type: ${typeof $}`)}};var l1=($,U)=>Object.entries($).reduce((G,[W,Z])=>({...G,[W]:VU(Z,U)}),{});var kZ=($,U)=>{const G=Z0($,"Endpoint URL",U);if(typeof G==="string")try{return new URL(G)}catch(W){throw console.error(`Failed to construct URL with ${G}`,W),W}throw new O(`Endpoint URL must be a string, got ${typeof G}`)};var bZ=($,U)=>{const{conditions:G,endpoint:W}=$,{result:Z,referenceRecord:X}=j0(G,U);if(!Z)return;const L={...U,referenceRecord:{...U.referenceRecord,...X}},{url:Y,properties:F,headers:Q}=W;return U.logger?.debug?.(`${a} Resolving endpoint from template: ${_(W)}`),{...Q!=null&&{headers:DZ(Q,L)},...F!=null&&{properties:l1(F,L)},url:kZ(Y,L)}};var hZ=($,U)=>{const{conditions:G,error:W}=$,{result:Z,referenceRecord:X}=j0(G,U);if(!Z)return;throw new O(Z0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...X}}))};var xZ=($,U)=>{const{conditions:G,rules:W}=$,{result:Z,referenceRecord:X}=j0(G,U);if(!Z)return;return s1(W,{...U,referenceRecord:{...U.referenceRecord,...X}})};var s1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const W=bZ(G,U);if(W)return W}else if(G.type==="error")hZ(G,U);else if(G.type==="tree"){const W=xZ(G,U);if(W)return W}else throw new O(`Unknown endpoint rule: ${G}`);throw new O("Rules evaluation failed")};var Qz=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:Z,rules:X}=$;U.logger?.debug?.(`${a} Initial EndpointParams: ${_(G)}`);const L=Object.entries(Z).filter(([,Q])=>Q.default!=null).map(([Q,w])=>[Q,w.default]);if(L.length>0)for(let[Q,w]of L)G[Q]=G[Q]??w;const Y=Object.entries(Z).filter(([,Q])=>Q.required).map(([Q])=>Q);for(let Q of Y)if(G[Q]==null)throw new O(`Missing required parameter: '${Q}'`);const F=s1(X,{endpointParams:G,logger:W,referenceRecord:{}});if(U.endpointParams?.Endpoint)try{const Q=new URL(U.endpointParams.Endpoint),{protocol:w,port:z}=Q;F.url.protocol=w,F.url.port=z}catch(Q){}return U.logger?.debug?.(`${a} Resolved endpoint: ${_(F)}`),F};var BU=($,U=!1)=>{if(U){for(let G of $.split("."))if(!BU(G))return!1;return!0}if(!o0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(r0($))return!1;return!0};var vZ=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,Z,X,L,...Y]=U;if(G!=="arn"||W===""||Z===""||Y[0]==="")return null;return{partition:W,service:Z,region:X,accountId:L,resourceId:Y[0].includes("/")?Y[0].split("/"):Y}};var cZ={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var zz=cZ,Iz="",yZ=($)=>{const{partitions:U}=zz;for(let W of U){const{regions:Z,outputs:X}=W;for(let[L,Y]of Object.entries(Z))if(L===$)return{...X,...Y}}for(let W of U){const{regionRegex:Z,outputs:X}=W;if(new RegExp(Z).test($))return{...X}}const G=U.find((W)=>W.id==="aws");if(!G)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...G.outputs}};var uZ=()=>Iz;var Jz={isVirtualHostableS3Bucket:BU,parseArn:vZ,partition:yZ};a0.aws=Jz;var TU="user-agent",m1="x-amz-user-agent",AU=" ",n1="/",_Z=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,dZ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,HU="-";var Rz=($)=>(U,G)=>async(W)=>{const{request:Z}=W;if(!c.isInstance(Z))return U(W);const{headers:X}=Z,L=G?.userAgent?.map(OU)||[],Y=(await $.defaultUserAgentProvider()).map(OU),F=$?.customUserAgent?.map(OU)||[],Q=uZ(),w=(Q?[Q]:[]).concat([...Y,...L,...F]).join(AU),z=[...Y.filter((I)=>I.startsWith("aws-sdk-")),...F].join(AU);if($.runtime!=="browser"){if(z)X[m1]=X[m1]?`${X[TU]} ${z}`:z;X[TU]=w}else X[m1]=w;return U({...W,request:Z})},OU=($)=>{const U=$[0].split(n1).map((L)=>L.replace(_Z,HU)).join(n1),G=$[1]?.replace(dZ,HU),W=U.indexOf(n1),Z=U.substring(0,W);let X=U.substring(W+1);if(Z==="api")X=X.toLowerCase();return[Z,X,G].filter((L)=>L&&L.length>0).reduce((L,Y,F)=>{switch(F){case 0:return Y;case 1:return`${L}/${Y}`;default:return`${L}#${Y}`}},"")},Kz={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},cE=($)=>({applyToStack:(U)=>{U.add(Rz($),Kz)}});var i1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var CU=($)=>i1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var nE=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return CU(U);const W=await U();return CU(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(i1(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var P0=($,U,G)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${G} "${U}". Expected "true" or "false", got ${$[U]}.`)};var X0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(X0||(X0={}));var Mz="AWS_USE_DUALSTACK_ENDPOINT",Ez="use_dualstack_endpoint";var WV={environmentVariableSelector:($)=>P0($,Mz,X0.ENV),configFileSelector:($)=>P0($,Ez,X0.CONFIG),default:!1};var Vz="AWS_USE_FIPS_ENDPOINT",Bz="use_fips_endpoint";var LV={environmentVariableSelector:($)=>P0($,Vz,X0.ENV),configFileSelector:($)=>P0($,Bz,X0.CONFIG),default:!1};var qU=EU(Q0(),1),gZ=($)=>$[qU.SMITHY_CONTEXT_KEY]||($[qU.SMITHY_CONTEXT_KEY]={});var t=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var pZ={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},qV={preferredFile:"credentials"};function Tz($){return(U)=>async(G)=>{const W=G.request;if(c.isInstance(W)){const{body:Z,headers:X}=W;if(Z&&Object.keys(X).map((L)=>L.toLowerCase()).indexOf(lZ)===-1)try{const L=$(Z);W.headers={...W.headers,[lZ]:String(L)}}catch(L){}}return U({...G,request:W})}}var lZ="content-length",Az={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},tV=($)=>({applyToStack:(U)=>{U.add(Tz($.bodyLengthChecker),Az)}});var sZ=($,U)=>(G)=>async(W)=>{const{response:Z}=await G(W);try{const X=await U(Z,$);return{response:Z,output:X}}catch(X){if(Object.defineProperty(X,"$response",{value:Z}),!("$metadata"in X)){if(X.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof X.$responseBodyText!=="undefined"){if(X.$response)X.$response.body=X.$responseBodyText}}throw X}};var mZ=($,U)=>(G,W)=>async(Z)=>{const X=W.endpointV2?.url&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!X)throw new Error("No valid endpoint provider available.");const L=await U(Z.input,{...$,endpoint:X});return G({...Z,request:L})};function ZB($,U,G){return{applyToStack:(W)=>{W.add(sZ($,G),Hz),W.add(mZ($,U),fU)}}}var Hz={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},fU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var nZ=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Nz(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!fz(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},Oz=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Cz=/(\d+\.){3}\d+/,qz=/\.\./;var fz=($)=>Oz.test($)&&!Cz.test($)&&!qz.test($),Nz=($)=>{const[U,G,W,,,Z]=$.split(":"),X=U==="arn"&&$.split(":").length>=6,L=Boolean(X&&G&&W&&Z);if(X&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L};var iZ=($,U,G)=>{const W=async()=>{const Z=G[$]??G[U];if(typeof Z==="function")return Z();return Z};if($==="credentialScope"||U==="CredentialScope")return async()=>{const Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return Z?.credentialScope??Z?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return Z?.accountId??Z?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const Z=await W();if(Z&&typeof Z==="object"){if("url"in Z)return Z.url.href;if("hostname"in Z){const{protocol:X,hostname:L,port:Y,path:F}=Z;return`${X}//${L}${Y?":"+Y:""}${F}`}}return Z};return W};var rZ="AWS_ENDPOINT_URL",oZ="endpoint_url",aZ=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((X)=>X.toUpperCase()),W=U[[rZ,...G].join("_")];if(W)return W;const Z=U[rZ];if(Z)return Z;return},configFileSelector:(U,G)=>{if(G&&U.services){const Z=G[["services",U.services].join(NU)];if(Z){const X=$.split(" ").map((Y)=>Y.toLowerCase()),L=Z[[X.join("_"),oZ].join(NU)];if(L)return L}}const W=U[oZ];if(W)return W;return},default:void 0});var tZ=async($)=>K0(aZ($))();var r1=($)=>{if(typeof $==="object"){if("url"in $)return jU($.url);return $}return jU($)};var eZ=async($,U,G,W)=>{if(!G.endpoint){const L=await tZ(G.serviceId||"");if(L)G.endpoint=()=>Promise.resolve(r1(L))}const Z=await jz($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(Z,W)},jz=async($,U,G)=>{const W={},Z=U?.getEndpointParameterInstructions?.()||{};for(let[X,L]of Object.entries(Z))switch(L.type){case"staticContextParams":W[X]=L.value;break;case"contextParams":W[X]=$[L.name];break;case"clientContextParams":case"builtInParams":W[X]=await iZ(L.name,X,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(Z).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await nZ(W);return W};var $X=({config:$,instructions:U})=>{return(G,W)=>async(Z)=>{const X=await eZ(Z.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=X,W.authSchemes=X.properties?.authSchemes;const L=W.authSchemes?.[0];if(L){W.signing_region=L.signingRegion,W.signing_service=L.signingName;const F=gZ(W)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return G({...Z})}};var Pz={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:fU.name},DB=($,U)=>({applyToStack:(G)=>{G.addRelativeTo($X({config:$,instructions:U}),Pz)}});var xB=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>r1(await t(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:t($.useDualstackEndpoint??!1),useFipsEndpoint:t($.useFipsEndpoint??!1)}};var n=EU(P$(),1),mB=n.default.v1,nB=n.default.v3,UX=n.default.v4,iB=n.default.v5,rB=n.default.NIL,oB=n.default.version,aB=n.default.validate,tB=n.default.stringify,eB=n.default.parse;var s;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(s||(s={}));var M0=3,GX=s.STANDARD;var WX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],ZX=["TimeoutError","RequestTimeout","RequestTimeoutException"],XX=[500,502,503,504],LX=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var Sz=($)=>$.$metadata?.clockSkewCorrected,S0=($)=>$.$metadata?.httpStatusCode===429||WX.includes($.name)||$.$retryable?.throttling==!0,o1=($)=>Sz($)||ZX.includes($.name)||LX.includes($?.code||"")||XX.includes($.$metadata?.httpStatusCode||0),YX=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!o1($))return!0;return!1}return!1};class a1{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),S0($)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(G)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const G=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var E0=100,t0=20000,PU=500,t1=500,SU=5,DU=10,kU=1,e1="amz-sdk-invocation-id",$$="amz-sdk-request";var FX=()=>{let $=E0;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(t0,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var bU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(t0,$),getRetryCost:()=>G}};class D0{constructor($){this.maxAttempts=$,this.mode=s.STANDARD,this.capacity=t1,this.retryBackoffStrategy=FX(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return bU({retryDelay:E0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?PU:E0);const Z=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),X=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,Z):Z,L=this.getCapacityCost(W);return this.capacity-=L,bU({retryDelay:X,retryCount:$.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(t1,this.capacity+($.getRetryCost()??kU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${M0}`),M0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?DU:SU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class hU{constructor($,U){this.maxAttemptsProvider=$,this.mode=s.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new a1,this.standardRetryStrategy=new D0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry($,U)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var QX="AWS_MAX_ATTEMPTS",wX="max_attempts",xT={environmentVariableSelector:($)=>{const U=$[QX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${QX} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[wX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${wX} mast be a number, got "${U}"`);return G},default:M0},vT=($)=>{const{retryStrategy:U}=$,G=t($.maxAttempts??M0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await t($.retryMode)()===s.ADAPTIVE)return new hU(G);return new D0(G)}}},Dz="AWS_RETRY_MODE",kz="retry_mode",cT={environmentVariableSelector:($)=>$[Dz],configFileSelector:($)=>$[kz],default:GX};import{Readable as bz} from"stream";var zX=($)=>$?.body instanceof bz||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var xU=($)=>{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 hz=($)=>(U,G)=>async(W)=>{let Z=await $.retryStrategy();const X=await $.maxAttempts();if(xz(Z)){Z=Z;let L=await Z.acquireInitialRetryToken(G.partition_id),Y=new Error,F=0,Q=0;const{request:w}=W,z=c.isInstance(w);if(z)w.headers[e1]=UX();while(!0)try{if(z)w.headers[$$]=`attempt=${F+1}; max=${X}`;const{response:I,output:J}=await U(W);return Z.recordSuccess(L),J.$metadata.attempts=F+1,J.$metadata.totalRetryDelay=Q,{response:I,output:J}}catch(I){const J=vz(I);if(Y=xU(I),z&&zX(w))throw(G.logger instanceof IX?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),Y;try{L=await Z.refreshRetryTokenForRetry(L,J)}catch(T){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=F+1,Y.$metadata.totalRetryDelay=Q,Y}F=L.getRetryCount();const K=L.getRetryDelay();Q+=K,await new Promise((T)=>setTimeout(T,K))}}else{if(Z=Z,Z?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",Z.mode]];return Z.retry(U,W)}},xz=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",vz=($)=>{const U={error:$,errorType:cz($)},G=uz($.$response);if(G)U.retryAfterHint=G;return U},cz=($)=>{if(S0($))return"THROTTLING";if(o1($))return"TRANSIENT";if(YX($))return"SERVER_ERROR";return"CLIENT_ERROR"},yz={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},rT=($)=>({applyToStack:(U)=>{U.add(hz($),yz)}}),uz=($)=>{if(!vU.isInstance($))return;const U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)};import{platform as PR,release as SR} from"os";import{env as bL,versions as DR} from"process";var aU={isCrtAvailable:!1};var kL=()=>{if(aU.isCrtAvailable)return["md/crt-avail"];return null};var kR="AWS_SDK_UA_APP_ID",bR="sdk-ua-app-id",UH=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${PR()}`,SR()],["lang/js"],["md/nodejs",`${DR.node}`]],W=kL();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(bL.AWS_EXECUTION_ENV)G.push([`exec-env/${bL.AWS_EXECUTION_ENV}`]);const Z=K0({environmentVariableSelector:(L)=>L[kR],configFileSelector:(L)=>L[bR],default:void 0})();let X=void 0;return async()=>{if(!X){const L=await Z;X=L?[...G,[`app/${L}`]]:[...G]}return X}};import{Buffer as hR} from"buffer";import{createHash as xR,createHmac as vR} from"crypto";var hL=function($,U){if(hR.isBuffer($))return $;if(typeof $==="string")return xL($,U);if(ArrayBuffer.isView($))return tU($.buffer,$.byteOffset,$.byteLength);return tU($)};class cR{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(vL(hL($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?vR(this.algorithmIdentifier,hL(this.secret)):xR(this.algorithmIdentifier)}}import{fstatSync as yR,lstatSync as uR} from"fs";var wH=($)=>{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 uR($.path).size;else if(typeof $.fd==="number")return yR($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var cL="AWS_EXECUTION_ENV",eU="AWS_REGION",$G="AWS_DEFAULT_REGION",yL="AWS_EC2_METADATA_DISABLED",uL=["in-region","cross-region","mobile","standard","legacy"],_L="/latest/meta-data/placement/region";var dL={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var AH=({region:$=K0(pZ),defaultsMode:U=K0(dL)}={})=>gL(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return _R($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(G?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${uL.join(", ")}, got ${G}`)}}),_R=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await dR();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},dR=async()=>{if(process.env[cL]&&(process.env[eU]||process.env[$G]))return process.env[eU]??process.env[$G];if(!process.env[yL])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-f5a531a49e7591bd.js"),G=await $();return(await U({...G,path:_L})).toString()}catch($){}};var qH=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const G=$.region;if(typeof G==="string")return G;return G()};return{setRegion(G){U=G},region(){return U}}},fH=($)=>{return{region:$.region()}};export{lR as Da,sR as Ea,nR as Fa,tR as Ga,gZ as Ha,t as Ia,P0 as Ja,X0 as Ka,KU as La,Z3 as Ma,a0 as Na,Qz as Oa,Jz as Pa,cE as Qa,WV as Ra,LV as Sa,pZ as Ta,qV as Ua,nE as Va,tV as Wa,jz as Xa,ZB as Ya,DB as Za,xB as _a,GX as $a,UX as ab,xT as bb,vT as cb,cT as db,rT as eb,jR as fb,UH as gb,cR as hb,wH as ib,AH as jb,qH as kb,fH as lb};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{t as $,u as w,v as z} from"./chunk-78ab7bcbe6104c5f.js";import{rb as Z} from"./chunk-a1efc60864e65ef2.js";import{Ab as q,Cb as G,Eb as Y} from"./chunk-a14516ac5e6f78aa.js";var H="AWS_EC2_METADATA_DISABLED",Q=async(b)=>{const{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:x,fromContainerMetadata:y,fromInstanceMetadata:J}=await import("./chunk-f5a531a49e7591bd.js");if(process.env[x]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:K}=await import("./chunk-bffb8d677e1424a9.js");return G(K(b),y(b))}if(process.env[H])return async()=>{throw new q("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),J(b)};var X=!1,W=(b={})=>Y(G(async()=>{if(b.profile??process.env[Z]){if(process.env[$]&&process.env[w]){if(!X)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
2
|
+
Multiple credential sources detected:
|
|
3
|
+
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
4
|
+
This SDK will proceed with the AWS_PROFILE value.
|
|
5
|
+
|
|
6
|
+
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
7
|
+
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
8
|
+
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
9
|
+
`),X=!0}throw new q("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),z(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:j,ssoAccountId:x,ssoRegion:y,ssoRoleName:J,ssoSession:K}=b;if(!j&&!x&&!y&&!J&&!K)throw new q("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});const{fromSSO:B}=await import("./chunk-8884e59809021f5f.js");return B(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:j}=await import("./chunk-a35eb04f0c7c9944.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:j}=await import("./chunk-1b3b7c2c9ae041ca.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:j}=await import("./chunk-a004fce37a0f5a65.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Q(b))()},async()=>{throw new q("Could not load credentials from any providers",{tryNextLink:!1,logger:b.logger})}),v,k),k=(b)=>b?.expiration!==void 0,v=(b)=>b?.expiration!==void 0&&b.expiration.getTime()-Date.now()<300000;export{W as qb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{rb as s,tb as y,ub as u,vb as C} from"./chunk-2a5b4dfab2e26e21.js";import{Cb as g,yb as d} from"./chunk-eeb3b193701aec43.js";function c(o){try{const r=new Set(Array.from(o.match(/([A-Z_]){3,}/g)??[]));return r.delete("CONFIG"),r.delete("CONFIG_PREFIX_SEPARATOR"),r.delete("ENV"),[...r].join(", ")}catch(r){return o}}var l=(o,r)=>async()=>{try{const t=o(process.env);if(t===void 0)throw new Error;return t}catch(t){throw new s(t.message||`Not found in ENV: ${c(o.toString())}`,{logger:r})}};var h=(o,{preferredFile:r="config",...t}={})=>async()=>{const e=d(t),{configFile:n,credentialsFile:i}=await g(t),f=i[e]||{},m=n[e]||{},S=r==="config"?{...f,...m}:{...m,...f};try{const p=o(S,r==="config"?n:i);if(p===void 0)throw new Error;return p}catch(a){throw new s(a.message||`Not found in config files w/ profile [${e}]: ${c(o.toString())}`,{logger:t.logger})}};var E=(o)=>typeof o==="function",w=(o)=>E(o)?async()=>await o():u(o);var k=({environmentVariableSelector:o,configFileSelector:r,default:t},e={})=>C(y(l(o),h(r,e),w(t)));function F(o){const r={};if(o=o.replace(/^\?/,""),o)for(let t of o.split("&")){let[e,n=null]=t.split("=");if(e=decodeURIComponent(e),n)n=decodeURIComponent(n);if(!(e in r))r[e]=n;else if(Array.isArray(r[e]))r[e].push(n);else r[e]=[r[e],n]}return r}var N=(o)=>{if(typeof o==="string")return N(new URL(o));const{hostname:r,pathname:t,port:e,protocol:n,search:i}=o;let f;if(i)f=F(i);return{hostname:r,port:e?parseInt(e):void 0,protocol:n,path:t,query:f}};
|
|
2
|
+
export{k as ob,N as pb};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as x} from"./chunk-7ce930fe69575c87.js";import{nb as S} from"./chunk-14e60554a2e78f4a.js";var q="AWS_PROFILE";var B=(o)=>o.profile||process.env["AWS_PROFILE"]||"default";import{join as b} from"path";import{homedir as N} from"os";import{sep as L} from"path";var d={},w=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{const{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${L}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;const i=w();if(!d[i])d[i]=N();return d[i]};var v="AWS_CONFIG_FILE",g=()=>process.env[v]||b(f(),".aws","config");var D=x(S(),1);import{join as I} from"path";var h=x(S(),1);var O=(o)=>Object.entries(o).filter(([e])=>{const t=e.indexOf(c);if(t===-1)return!1;return Object.values(h.IniSectionType).includes(e.substring(0,t))}).reduce((e,[t,r])=>{const i=t.indexOf(c),s=t.substring(0,i)===h.IniSectionType.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as j} from"path";var y="AWS_SHARED_CREDENTIALS_FILE",_=()=>process.env[y]||j(f(),".aws","credentials");var C=x(S(),1);var $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,G=["__proto__","profile __proto__"],a=(o)=>{const e={};let t,r;for(let i of o.split(/\r?\n/)){const s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;const n=s.substring(1,s.length-1),m=$.exec(n);if(m){const[,p,,F]=m;if(Object.values(C.IniSectionType).includes(p))t=[p,F].join(c)}else t=n;if(G.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){const n=s.indexOf("=");if(![0,-1].includes(n)){const[m,p]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(p==="")r=m;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};const F=r?[r,m].join(c):m;e[t][F]=p}}}}return e};import{promises as W} from"fs";var{readFile:K}=W,E={},l=(o,e)=>{if(!E[o]||e?.ignoreCache)E[o]=K(o,"utf8");return E[o]};var P=()=>({}),c=".",R=async(o={})=>{const{filepath:e=_(),configFilepath:t=g()}=o,r=f();let s=e;if(e.startsWith("~/"))s=I(r,e.slice(2));let u=t;if(t.startsWith("~/"))u=I(r,t.slice(2));const n=await Promise.all([l(u,{ignoreCache:o.ignoreCache}).then(a).then(O).catch(P),l(s,{ignoreCache:o.ignoreCache}).then(a).catch(P)]);return{configFile:n[0],credentialsFile:n[1]}};var T=(o)=>Object.entries(o).filter(([e])=>e.startsWith(D.IniSectionType.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var V=()=>({}),Pe=async(o={})=>l(o.configFilepath??g()).then(a).then(T).catch(V);var A=(...o)=>{const e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var He=async(o)=>{const e=await R(o);return A(e.configFile,e.credentialsFile)};import{createHash as U} from"crypto";import{join as X} from"path";var H=(o)=>{const t=U("sha1").update(o).digest("hex");return X(f(),".aws","sso","cache",`${t}.json`)};import{promises as k} from"fs";var{readFile:M}=k,$e=async(o)=>{const e=H(o),t=await M(e,"utf8");return JSON.parse(t)};export{q as sb,B as tb,H as ub,$e as vb,c as wb,R as xb,Pe as yb,He as zb};
|