gemi 0.4.53 → 0.4.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/app/index.js +1 -1
  2. package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
  3. package/dist/chunk-01ffccc19e8ef862.js +3 -0
  4. package/dist/chunk-16dbe3a15379140b.js +2 -0
  5. package/dist/chunk-2279c382943fca51.js +2 -0
  6. package/dist/chunk-2335866508ec8b1b.js +2 -0
  7. package/dist/chunk-2e34b856e195c353.js +2 -0
  8. package/dist/chunk-2e447b50094b2862.js +2 -0
  9. package/dist/chunk-40111275eef9f7b3.js +6 -0
  10. package/dist/chunk-40942fb138dcd780.js +9 -0
  11. package/dist/chunk-4f5b07a6a6fd5cc6.js +2 -0
  12. package/dist/chunk-52e76204b898931e.js +18 -0
  13. package/dist/chunk-53b7d6267c9172bc.js +2 -0
  14. package/dist/chunk-53c39aca36ece018.js +2 -0
  15. package/dist/chunk-545989119755857f.js +2 -0
  16. package/dist/chunk-56f6f8c2162dcf1c.js +2 -0
  17. package/dist/chunk-59980167a4c574b3.js +2 -0
  18. package/dist/chunk-77d1b26236f5feec.js +2 -0
  19. package/dist/chunk-795a1bd1d89efce1.js +2 -0
  20. package/dist/chunk-7fef11f59982b1f6.js +2 -0
  21. package/dist/chunk-a10ae1a06a28aaab.js +2 -0
  22. package/dist/chunk-a991fdce275f1256.js +2 -0
  23. package/dist/chunk-adb4e1e222eb1d20.js +2 -0
  24. package/dist/chunk-b97189ea9588db36.js +9 -0
  25. package/dist/chunk-ba051a98cd651063.js +1 -0
  26. package/dist/chunk-bdf4f2b1862899bb.js +2 -0
  27. package/dist/chunk-c83b39b7178003da.js +2 -0
  28. package/dist/chunk-cdfa2adeddc1a8e1.js +2 -0
  29. package/dist/chunk-d16ef78d852a6856.js +1 -0
  30. package/dist/chunk-d3033805e98482dc.js +6 -0
  31. package/dist/chunk-d43b3f444e738dd1.js +1 -0
  32. package/dist/chunk-dc23bfb4fd92e2f0.js +2 -0
  33. package/dist/chunk-de3ec02f9d17c2c9.js +2 -0
  34. package/dist/chunk-f0d3ed16a520ecf1.js +18 -0
  35. package/dist/chunk-f316793e4ec0f386.js +2 -0
  36. package/dist/chunk-f67aa3e46d73674e.js +2 -0
  37. package/dist/client/index.js +35 -17
  38. package/dist/client/useMutation.d.ts.map +1 -1
  39. package/dist/client/useQuery.d.ts +2 -2
  40. package/dist/client/useQuery.d.ts.map +1 -1
  41. package/dist/facades/index.js +1 -1
  42. package/dist/http/index.js +1 -1
  43. package/dist/kernel/index.js +2 -2
  44. package/dist/server/index.js +1 -1
  45. package/dist/storage/index.js +1 -10
  46. package/package.json +1 -1
@@ -0,0 +1,18 @@
1
+ import{y as zU,z as K} from"./chunk-7ce930fe69575c87.js";import{C as x,D as kU,E as W6,H as tU,I as wX,L as GX,P as rf,S as SW} from"./chunk-c85fc7168a708cb6.js";import{ib as F0} from"./chunk-09dd89e1046786a5.js";import{jb as c2,kb as z0,lb as qU} from"./chunk-f67aa3e46d73674e.js";import{rb as CU} from"./chunk-ffe161a589b4c44b.js";import{Ab as FX} from"./chunk-d16ef78d852a6856.js";var k0=K((Lz,fw)=>{var{defineProperty:W1,getOwnPropertyDescriptor:MX,getOwnPropertyNames:OX}=Object,AX=Object.prototype.hasOwnProperty,ww=($,U)=>W1($,"name",{value:U,configurable:!0}),BX=($,U)=>{for(var w in U)W1($,w,{get:U[w],enumerable:!0})},VX=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of OX(U))if(!AX.call($,G)&&G!==w)W1($,G,{get:()=>U[G],enumerable:!(f=MX(U,G))||f.enumerable})}return $},HX=($)=>VX(W1({},"__esModule",{value:!0}),$),Gw={};BX(Gw,{getSmithyContext:()=>CX,normalizeProvider:()=>qX});fw.exports=HX(Gw);var Uw=F0(),CX=ww(($)=>$[Uw.SMITHY_CONTEXT_KEY]||($[Uw.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),qX=ww(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var R$=K((Xz,Fw)=>{var{defineProperty:L1,getOwnPropertyDescriptor:NX,getOwnPropertyNames:jX}=Object,PX=Object.prototype.hasOwnProperty,E0=($,U)=>L1($,"name",{value:U,configurable:!0}),SX=($,U)=>{for(var w in U)L1($,w,{get:U[w],enumerable:!0})},bX=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of jX(U))if(!PX.call($,G)&&G!==w)L1($,G,{get:()=>U[G],enumerable:!(f=NX(U,G))||f.enumerable})}return $},hX=($)=>bX(L1({},"__esModule",{value:!0}),$),Ww={};SX(Ww,{CredentialsProviderError:()=>DX,ProviderError:()=>X1,TokenProviderError:()=>kX,chain:()=>cX,fromStatic:()=>vX,memoize:()=>xX});Fw.exports=hX(Ww);var Lw=class $ extends Error{constructor(U,w=!0){var f;let G,W=!0;if(typeof w==="boolean")G=void 0,W=w;else if(w!=null&&typeof w==="object")G=w.logger,W=w.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=W,Object.setPrototypeOf(this,$.prototype),(f=G==null?void 0:G.debug)==null||f.call(G,`@smithy/property-provider ${W?"->":"(!)"} ${U}`)}static from(U,w=!0){return Object.assign(new this(U.message,w),U)}};E0(Lw,"ProviderError");var X1=Lw,Xw=class $ extends X1{constructor(U,w=!0){super(U,w);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};E0(Xw,"CredentialsProviderError");var DX=Xw,Zw=class $ extends X1{constructor(U,w=!0){super(U,w);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};E0(Zw,"TokenProviderError");var kX=Zw,cX=E0((...$)=>async()=>{if($.length===0)throw new X1("No providers in chain");let U;for(let w of $)try{return await w()}catch(f){if(U=f,f==null?void 0:f.tryNextLink)continue;throw f}throw U},"chain"),vX=E0(($)=>()=>Promise.resolve($),"fromStatic"),xX=E0(($,U,w)=>{let f,G,W,L=!1;const X=E0(async()=>{if(!G)G=$();try{f=await G,W=!0,L=!1}finally{G=void 0}return f},"coalesceProvider");if(U===void 0)return async(Z)=>{if(!W||(Z==null?void 0:Z.forceRefresh))f=await X();return f};return async(Z)=>{if(!W||(Z==null?void 0:Z.forceRefresh))f=await X();if(L)return f;if(w&&!w(f))return L=!0,f;if(U(f))return await X(),f;return f}},"memoize")});var O0=K((Ew)=>{Object.defineProperty(Ew,"__esModule",{value:!0});Ew.getHomeDir=void 0;var uX=import.meta.require("os"),yX=import.meta.require("path"),Y$={},_X=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},dX=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:w,HOMEDRIVE:f=`C:${yX.sep}`}=process.env;if($)return $;if(U)return U;if(w)return`${f}${w}`;const G=_X();if(!Y$[G])Y$[G]=uX.homedir();return Y$[G]};Ew.getHomeDir=dX});var Q$=K((Rw)=>{Object.defineProperty(Rw,"__esModule",{value:!0});Rw.getSSOTokenFilepath=void 0;var pX=import.meta.require("crypto"),gX=import.meta.require("path"),lX=O0(),nX=($)=>{const w=pX.createHash("sha1").update($).digest("hex");return gX.join(lX.getHomeDir(),".aws","sso","cache",`${w}.json`)};Rw.getSSOTokenFilepath=nX});var Jw=K((Qw)=>{Object.defineProperty(Qw,"__esModule",{value:!0});Qw.getSSOTokenFromFile=void 0;var sX=import.meta.require("fs"),mX=Q$(),{readFile:iX}=sX.promises,rX=async($)=>{const U=mX.getSSOTokenFilepath($),w=await iX(U,"utf8");return JSON.parse(w)};Qw.getSSOTokenFromFile=rX});var J$=K((Tw)=>{Object.defineProperty(Tw,"__esModule",{value:!0});Tw.slurpFile=void 0;var oX=import.meta.require("fs"),{readFile:tX}=oX.promises,z$={},aX=($,U)=>{if(!z$[$]||(U===null||U===void 0?void 0:U.ignoreCache))z$[$]=tX($,"utf8");return z$[$]};Tw.slurpFile=aX});var O$=K((Rz,v0)=>{var{defineProperty:E1,getOwnPropertyDescriptor:eX,getOwnPropertyNames:$2}=Object,U2=Object.prototype.hasOwnProperty,u=($,U)=>E1($,"name",{value:U,configurable:!0}),w2=($,U)=>{for(var w in U)E1($,w,{get:U[w],enumerable:!0})},T$=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of $2(U))if(!U2.call($,G)&&G!==w)E1($,G,{get:()=>U[G],enumerable:!(f=eX(U,G))||f.enumerable})}return $},M$=($,U,w)=>(T$($,U,"default"),w&&T$(w,U,"default")),G2=($)=>T$(E1({},"__esModule",{value:!0}),$),c0={};w2(c0,{CONFIG_PREFIX_SEPARATOR:()=>I0,DEFAULT_PROFILE:()=>Bw,ENV_PROFILE:()=>Aw,getProfileName:()=>f2,loadSharedConfigFiles:()=>Hw,loadSsoSessionData:()=>T2,parseKnownFiles:()=>M2});v0.exports=G2(c0);M$(c0,O0(),v0.exports);var Aw="AWS_PROFILE",Bw="default",f2=u(($)=>$.profile||process.env[Aw]||Bw,"getProfileName");M$(c0,Q$(),v0.exports);M$(c0,Jw(),v0.exports);var Z1=F0(),W2=u(($)=>Object.entries($).filter(([U])=>{const w=U.indexOf(I0);if(w===-1)return!1;return Object.values(Z1.IniSectionType).includes(U.substring(0,w))}).reduce((U,[w,f])=>{const G=w.indexOf(I0),W=w.substring(0,G)===Z1.IniSectionType.PROFILE?w.substring(G+1):w;return U[W]=f,U},{...$.default&&{default:$.default}}),"getConfigData"),F1=import.meta.require("path"),L2=O0(),X2="AWS_CONFIG_FILE",Vw=u(()=>process.env[X2]||F1.join(L2.getHomeDir(),".aws","config"),"getConfigFilepath"),Z2=O0(),F2="AWS_SHARED_CREDENTIALS_FILE",E2=u(()=>process.env[F2]||F1.join(Z2.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),I2=O0(),R2=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Y2=["__proto__","profile __proto__"],K$=u(($)=>{const U={};let w,f;for(let G of $.split(/\r?\n/)){const W=G.split(/(^|\s)[;#]/)[0].trim();if(W[0]==="["&&W[W.length-1]==="]"){w=void 0,f=void 0;const X=W.substring(1,W.length-1),Z=R2.exec(X);if(Z){const[,F,,E]=Z;if(Object.values(Z1.IniSectionType).includes(F))w=[F,E].join(I0)}else w=X;if(Y2.includes(X))throw new Error(`Found invalid profile name "${X}"`)}else if(w){const X=W.indexOf("=");if(![0,-1].includes(X)){const[Z,F]=[W.substring(0,X).trim(),W.substring(X+1).trim()];if(F==="")f=Z;else{if(f&&G.trimStart()===G)f=void 0;U[w]=U[w]||{};const E=f?[f,Z].join(I0):Z;U[w][E]=F}}}}return U},"parseIni"),Mw=J$(),Ow=u(()=>({}),"swallowError"),I0=".",Hw=u(async($={})=>{const{filepath:U=E2(),configFilepath:w=Vw()}=$,f=I2.getHomeDir();let W=U;if(U.startsWith("~/"))W=F1.join(f,U.slice(2));let L=w;if(w.startsWith("~/"))L=F1.join(f,w.slice(2));const X=await Promise.all([Mw.slurpFile(L,{ignoreCache:$.ignoreCache}).then(K$).then(W2).catch(Ow),Mw.slurpFile(W,{ignoreCache:$.ignoreCache}).then(K$).catch(Ow)]);return{configFile:X[0],credentialsFile:X[1]}},"loadSharedConfigFiles"),Q2=u(($)=>Object.entries($).filter(([U])=>U.startsWith(Z1.IniSectionType.SSO_SESSION+I0)).reduce((U,[w,f])=>({...U,[w.substring(w.indexOf(I0)+1)]:f}),{}),"getSsoSessionData"),z2=J$(),J2=u(()=>({}),"swallowError"),T2=u(async($={})=>z2.slurpFile($.configFilepath??Vw()).then(K$).then(Q2).catch(J2),"loadSsoSessionData"),K2=u((...$)=>{const U={};for(let w of $)for(let[f,G]of Object.entries(w))if(U[f]!==void 0)Object.assign(U[f],G);else U[f]=G;return U},"mergeConfigFiles"),M2=u(async($)=>{const U=await Hw($);return K2(U.configFile,U.credentialsFile)},"parseKnownFiles")});var jw=K((Yz,Nw)=>{var A$=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 $}},I1=Object.defineProperty,O2=Object.getOwnPropertyDescriptor,A2=Object.getOwnPropertyNames,B2=Object.prototype.hasOwnProperty,A0=($,U)=>I1($,"name",{value:U,configurable:!0}),V2=($,U)=>{for(var w in U)I1($,w,{get:U[w],enumerable:!0})},H2=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of A2(U))if(!B2.call($,G)&&G!==w)I1($,G,{get:()=>U[G],enumerable:!(f=O2(U,G))||f.enumerable})}return $},C2=($)=>H2(I1({},"__esModule",{value:!0}),$),qw={};V2(qw,{loadConfig:()=>S2});Nw.exports=C2(qw);var x0=R$();A0(A$,"getSelectorName");var q2=A0(($,U)=>async()=>{try{const w=$(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new x0.CredentialsProviderError(w.message||`Not found in ENV: ${A$($.toString())}`,{logger:U})}},"fromEnv"),Cw=O$(),N2=A0(($,{preferredFile:U="config",...w}={})=>async()=>{const f=Cw.getProfileName(w),{configFile:G,credentialsFile:W}=await Cw.loadSharedConfigFiles(w),L=W[f]||{},X=G[f]||{},Z=U==="config"?{...L,...X}:{...X,...L};try{const E=$(Z,U==="config"?G:W);if(E===void 0)throw new Error;return E}catch(F){throw new x0.CredentialsProviderError(F.message||`Not found in config files w/ profile [${f}]: ${A$($.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),j2=A0(($)=>typeof $==="function","isFunction"),P2=A0(($)=>j2($)?async()=>await $():x0.fromStatic($),"fromStatic"),S2=A0(({environmentVariableSelector:$,configFileSelector:U,default:w},f={})=>x0.memoize(x0.chain(q2($),N2(U,f),P2(w))),"loadConfig")});var kw=K((hw)=>{Object.defineProperty(hw,"__esModule",{value:!0});hw.getEndpointUrlConfig=void 0;var Pw=O$(),Sw="AWS_ENDPOINT_URL",bw="endpoint_url",b2=($)=>({environmentVariableSelector:(U)=>{const w=$.split(" ").map((W)=>W.toUpperCase()),f=U[[Sw,...w].join("_")];if(f)return f;const G=U[Sw];if(G)return G;return},configFileSelector:(U,w)=>{if(w&&U.services){const G=w[["services",U.services].join(Pw.CONFIG_PREFIX_SEPARATOR)];if(G){const W=$.split(" ").map((X)=>X.toLowerCase()),L=G[[W.join("_"),bw].join(Pw.CONFIG_PREFIX_SEPARATOR)];if(L)return L}}const f=U[bw];if(f)return f;return},default:void 0});hw.getEndpointUrlConfig=b2});var xw=K((cw)=>{Object.defineProperty(cw,"__esModule",{value:!0});cw.getEndpointFromConfig=void 0;var h2=jw(),D2=kw(),k2=async($)=>h2.loadConfig(D2.getEndpointUrlConfig($))();cw.getEndpointFromConfig=k2});var dw=K((Jz,_w)=>{var{defineProperty:R1,getOwnPropertyDescriptor:v2,getOwnPropertyNames:x2}=Object,u2=Object.prototype.hasOwnProperty,y2=($,U)=>R1($,"name",{value:U,configurable:!0}),_2=($,U)=>{for(var w in U)R1($,w,{get:U[w],enumerable:!0})},d2=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of x2(U))if(!u2.call($,G)&&G!==w)R1($,G,{get:()=>U[G],enumerable:!(f=v2(U,G))||f.enumerable})}return $},p2=($)=>d2(R1({},"__esModule",{value:!0}),$),uw={};_2(uw,{parseUrl:()=>yw});_w.exports=p2(uw);var g2=c2(),yw=y2(($)=>{if(typeof $==="string")return yw(new URL($));const{hostname:U,pathname:w,port:f,protocol:G,search:W}=$;let L;if(W)L=g2.parseQueryString(W);return{hostname:U,port:f?parseInt(f):void 0,protocol:G,path:w,query:L}},"parseUrl")});var V$=K((Tz,iw)=>{var mw=function($,U,w){return{applyToStack:(f)=>{f.add(gw($,w),nw),f.add(lw($,U),sw)}}},Y1=Object.defineProperty,l2=Object.getOwnPropertyDescriptor,n2=Object.getOwnPropertyNames,s2=Object.prototype.hasOwnProperty,B$=($,U)=>Y1($,"name",{value:U,configurable:!0}),m2=($,U)=>{for(var w in U)Y1($,w,{get:U[w],enumerable:!0})},i2=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of n2(U))if(!s2.call($,G)&&G!==w)Y1($,G,{get:()=>U[G],enumerable:!(f=l2(U,G))||f.enumerable})}return $},r2=($)=>i2(Y1({},"__esModule",{value:!0}),$),pw={};m2(pw,{deserializerMiddleware:()=>gw,deserializerMiddlewareOption:()=>nw,getSerdePlugin:()=>mw,serializerMiddleware:()=>lw,serializerMiddlewareOption:()=>sw});iw.exports=r2(pw);var gw=B$(($,U)=>(w)=>async(f)=>{const{response:G}=await w(f);try{const W=await U(G,$);return{response:G,output:W}}catch(W){if(Object.defineProperty(W,"$response",{value:G}),!("$metadata"in W)){if(W.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof W.$responseBodyText!=="undefined"){if(W.$response)W.$response.body=W.$responseBodyText}}throw W}},"deserializerMiddleware"),lw=B$(($,U)=>(w,f)=>async(G)=>{var W;const L=((W=f.endpointV2)==null?void 0:W.url)&&$.urlParser?async()=>$.urlParser(f.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");const X=await U(G.input,{...$,endpoint:L});return w({...G,request:X})},"serializerMiddleware"),nw={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},sw={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};B$(mw,"getSerdePlugin")});var wG=K((Kz,UG)=>{var{defineProperty:z1,getOwnPropertyDescriptor:o2,getOwnPropertyNames:t2}=Object,a2=Object.prototype.hasOwnProperty,p=($,U)=>z1($,"name",{value:U,configurable:!0}),e2=($,U)=>{for(var w in U)z1($,w,{get:U[w],enumerable:!0})},$Z=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of t2(U))if(!a2.call($,G)&&G!==w)z1($,G,{get:()=>U[G],enumerable:!(f=o2(U,G))||f.enumerable})}return $},UZ=($)=>$Z(z1({},"__esModule",{value:!0}),$),ow={};e2(ow,{endpointMiddleware:()=>ew,endpointMiddlewareOptions:()=>$G,getEndpointFromInstructions:()=>tw,getEndpointPlugin:()=>IZ,resolveEndpointConfig:()=>RZ,resolveParams:()=>aw,toEndpointV1:()=>H$});UG.exports=UZ(ow);var wZ=p(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(XZ(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!LZ(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),GZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,fZ=/(\d+\.){3}\d+/,WZ=/\.\./,LZ=p(($)=>GZ.test($)&&!fZ.test($)&&!WZ.test($),"isDnsCompatibleBucketName"),XZ=p(($)=>{const[U,w,f,,,G]=$.split(":"),W=U==="arn"&&$.split(":").length>=6,L=Boolean(W&&w&&f&&G);if(W&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L},"isArnBucketName"),ZZ=p(($,U,w)=>{const f=p(async()=>{const G=w[$]??w[U];if(typeof G==="function")return G();return G},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return(G==null?void 0:G.credentialScope)??(G==null?void 0:G.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return(G==null?void 0:G.accountId)??(G==null?void 0:G.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const G=await f();if(G&&typeof G==="object"){if("url"in G)return G.url.href;if("hostname"in G){const{protocol:W,hostname:L,port:X,path:Z}=G;return`${W}//${L}${X?":"+X:""}${Z}`}}return G};return f},"createConfigValueProvider"),FZ=xw(),rw=dw(),H$=p(($)=>{if(typeof $==="object"){if("url"in $)return rw.parseUrl($.url);return $}return rw.parseUrl($)},"toEndpointV1"),tw=p(async($,U,w,f)=>{if(!w.endpoint){const L=await FZ.getEndpointFromConfig(w.serviceId||"");if(L)w.endpoint=()=>Promise.resolve(H$(L))}const G=await aw($,U,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider(G,f)},"getEndpointFromInstructions"),aw=p(async($,U,w)=>{var f;const G={},W=((f=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:f.call(U))||{};for(let[L,X]of Object.entries(W))switch(X.type){case"staticContextParams":G[L]=X.value;break;case"contextParams":G[L]=$[X.name];break;case"clientContextParams":case"builtInParams":G[L]=await ZZ(X.name,L,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(X))}if(Object.keys(W).length===0)Object.assign(G,w);if(String(w.serviceId).toLowerCase()==="s3")await wZ(G);return G},"resolveParams"),Q1=k0(),ew=p(({config:$,instructions:U})=>{return(w,f)=>async(G)=>{var W,L,X;const Z=await tw(G.input,{getEndpointParameterInstructions(){return U}},{...$},f);f.endpointV2=Z,f.authSchemes=(W=Z.properties)==null?void 0:W.authSchemes;const F=(L=f.authSchemes)==null?void 0:L[0];if(F){f.signing_region=F.signingRegion,f.signing_service=F.signingName;const E=Q1.getSmithyContext(f),I=(X=E==null?void 0:E.selectedHttpAuthScheme)==null?void 0:X.httpAuthOption;if(I)I.signingProperties=Object.assign(I.signingProperties||{},{signing_region:F.signingRegion,signingRegion:F.signingRegion,signing_service:F.signingName,signingName:F.signingName,signingRegionSet:F.signingRegionSet},F.properties)}return w({...G})}},"endpointMiddleware"),EZ=V$(),$G={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:EZ.serializerMiddlewareOption.name},IZ=p(($,U)=>({applyToStack:(w)=>{w.addRelativeTo(ew({config:$,instructions:U}),$G)}}),"getEndpointPlugin"),RZ=p(($)=>{const U=$.tls??!0,{endpoint:w}=$,f=w!=null?async()=>H$(await Q1.normalizeProvider(w)()):void 0;return{...$,endpoint:f,tls:U,isCustomEndpoint:!!w,useDualstackEndpoint:Q1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:Q1.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var i=K((Mz,IG)=>{var ZG=function($){return Object.keys($).reduce((U,w)=>{const f=$[w];return{...U,[w]:Array.isArray(f)?[...f]:f}},{})},EG=function($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)},J1=Object.defineProperty,YZ=Object.getOwnPropertyDescriptor,QZ=Object.getOwnPropertyNames,zZ=Object.prototype.hasOwnProperty,$0=($,U)=>J1($,"name",{value:U,configurable:!0}),JZ=($,U)=>{for(var w in U)J1($,w,{get:U[w],enumerable:!0})},TZ=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of QZ(U))if(!zZ.call($,G)&&G!==w)J1($,G,{get:()=>U[G],enumerable:!(f=YZ(U,G))||f.enumerable})}return $},KZ=($)=>TZ(J1({},"__esModule",{value:!0}),$),GG={};JZ(GG,{Field:()=>AZ,Fields:()=>BZ,HttpRequest:()=>VZ,HttpResponse:()=>HZ,IHttpRequest:()=>fG.HttpRequest,getHttpHandlerExtensionConfiguration:()=>MZ,isValidHostname:()=>EG,resolveHttpHandlerRuntimeConfig:()=>OZ});IG.exports=KZ(GG);var MZ=$0(($)=>{let U=$.httpHandler;return{setHttpHandler(w){U=w},httpHandler(){return U},updateHttpClientConfig(w,f){U.updateHttpClientConfig(w,f)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),OZ=$0(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),fG=F0(),WG=class ${constructor({name:U,kind:w=fG.FieldPosition.HEADER,values:f=[]}){this.name=U,this.kind=w,this.values=f}add(U){this.values.push(U)}set(U){this.values=U}remove(U){this.values=this.values.filter((w)=>w!==U)}toString(){return this.values.map((U)=>U.includes(",")||U.includes(" ")?`"${U}"`:U).join(", ")}get(){return this.values}};$0(WG,"Field");var AZ=WG,LG=class ${constructor({fields:U=[],encoding:w="utf-8"}){this.entries={},U.forEach(this.setField.bind(this)),this.encoding=w}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((w)=>w.kind===U)}};$0(LG,"Fields");var BZ=LG,XG=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 w=new $({...U,headers:{...U.headers}});if(w.query)w.query=ZG(w.query);return w}static isInstance(U){if(!U)return!1;const w=U;return"method"in w&&"protocol"in w&&"hostname"in w&&"path"in w&&typeof w.query==="object"&&typeof w.headers==="object"}clone(){return $.clone(this)}};$0(XG,"HttpRequest");var VZ=XG;$0(ZG,"cloneQuery");var FG=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 w=U;return typeof w.statusCode==="number"&&typeof w.headers==="object"}};$0(FG,"HttpResponse");var HZ=FG;$0(EG,"isValidHostname")});var C$=K((RG)=>{var qZ=function($){return $&&$.__esModule?$:{default:$}},NZ=function(){if(T1>K1.length-16)CZ.default.randomFillSync(K1),T1=0;return K1.slice(T1,T1+=16)};Object.defineProperty(RG,"__esModule",{value:!0});RG.default=NZ;var CZ=qZ(import.meta.require("crypto")),K1=new Uint8Array(256),T1=K1.length});var zG=K((YG)=>{Object.defineProperty(YG,"__esModule",{value:!0});YG.default=void 0;var PZ=/^(?:[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;YG.default=PZ});var u0=K((JG)=>{var bZ=function($){return $&&$.__esModule?$:{default:$}},hZ=function($){return typeof $==="string"&&SZ.default.test($)};Object.defineProperty(JG,"__esModule",{value:!0});JG.default=void 0;var SZ=bZ(zG()),DZ=hZ;JG.default=DZ});var y0=K((MG)=>{var cZ=function($){return $&&$.__esModule?$:{default:$}},KG=function($,U=0){return h[$[U+0]]+h[$[U+1]]+h[$[U+2]]+h[$[U+3]]+"-"+h[$[U+4]]+h[$[U+5]]+"-"+h[$[U+6]]+h[$[U+7]]+"-"+h[$[U+8]]+h[$[U+9]]+"-"+h[$[U+10]]+h[$[U+11]]+h[$[U+12]]+h[$[U+13]]+h[$[U+14]]+h[$[U+15]]},vZ=function($,U=0){const w=KG($,U);if(!kZ.default(w))throw TypeError("Stringified UUID is invalid");return w};Object.defineProperty(MG,"__esModule",{value:!0});MG.default=void 0;MG.unsafeStringify=KG;var kZ=cZ(u0()),h=[];for(let $=0;$<256;++$)h.push(($+256).toString(16).slice(1));var xZ=vZ;MG.default=xZ});var HG=K((BG)=>{var dZ=function($){return $&&$.__esModule?$:{default:$}},pZ=function($,U,w){let f=U&&w||0;const G=U||new Array(16);$=$||{};let W=$.node||AG,L=$.clockseq!==void 0?$.clockseq:q$;if(W==null||L==null){const Y=$.random||($.rng||yZ.default)();if(W==null)W=AG=[Y[0]|1,Y[1],Y[2],Y[3],Y[4],Y[5]];if(L==null)L=q$=(Y[6]<<8|Y[7])&16383}let X=$.msecs!==void 0?$.msecs:Date.now(),Z=$.nsecs!==void 0?$.nsecs:j$+1;const F=X-N$+(Z-j$)/1e4;if(F<0&&$.clockseq===void 0)L=L+1&16383;if((F<0||X>N$)&&$.nsecs===void 0)Z=0;if(Z>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");N$=X,j$=Z,q$=L,X+=12219292800000;const E=((X&268435455)*1e4+Z)%4294967296;G[f++]=E>>>24&255,G[f++]=E>>>16&255,G[f++]=E>>>8&255,G[f++]=E&255;const I=X/4294967296*1e4&268435455;G[f++]=I>>>8&255,G[f++]=I&255,G[f++]=I>>>24&15|16,G[f++]=I>>>16&255,G[f++]=L>>>8|128,G[f++]=L&255;for(let Y=0;Y<6;++Y)G[f+Y]=W[Y];return U||_Z.unsafeStringify(G)};Object.defineProperty(BG,"__esModule",{value:!0});BG.default=void 0;var yZ=dZ(C$()),_Z=y0(),AG,q$,N$=0,j$=0,gZ=pZ;BG.default=gZ});var P$=K((CG)=>{var nZ=function($){return $&&$.__esModule?$:{default:$}},sZ=function($){if(!lZ.default($))throw TypeError("Invalid UUID");let U;const w=new Uint8Array(16);return w[0]=(U=parseInt($.slice(0,8),16))>>>24,w[1]=U>>>16&255,w[2]=U>>>8&255,w[3]=U&255,w[4]=(U=parseInt($.slice(9,13),16))>>>8,w[5]=U&255,w[6]=(U=parseInt($.slice(14,18),16))>>>8,w[7]=U&255,w[8]=(U=parseInt($.slice(19,23),16))>>>8,w[9]=U&255,w[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,w[11]=U/4294967296&255,w[12]=U>>>24&255,w[13]=U>>>16&255,w[14]=U>>>8&255,w[15]=U&255,w};Object.defineProperty(CG,"__esModule",{value:!0});CG.default=void 0;var lZ=nZ(u0()),mZ=sZ;CG.default=mZ});var S$=K((PG)=>{var oZ=function($){return $&&$.__esModule?$:{default:$}},tZ=function($){$=unescape(encodeURIComponent($));const U=[];for(let w=0;w<$.length;++w)U.push($.charCodeAt(w));return U},aZ=function($,U,w){function f(G,W,L,X){var Z;if(typeof G==="string")G=tZ(G);if(typeof W==="string")W=rZ.default(W);if(((Z=W)===null||Z===void 0?void 0:Z.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let F=new Uint8Array(16+G.length);if(F.set(W),F.set(G,W.length),F=w(F),F[6]=F[6]&15|U,F[8]=F[8]&63|128,L){X=X||0;for(let E=0;E<16;++E)L[X+E]=F[E];return L}return iZ.unsafeStringify(F)}try{f.name=$}catch(G){}return f.DNS=NG,f.URL=jG,f};Object.defineProperty(PG,"__esModule",{value:!0});PG.URL=PG.DNS=void 0;PG.default=aZ;var iZ=y0(),rZ=oZ(P$()),NG="6ba7b810-9dad-11d1-80b4-00c04fd430c8";PG.DNS=NG;var jG="6ba7b811-9dad-11d1-80b4-00c04fd430c8";PG.URL=jG});var DG=K((bG)=>{var wF=function($){return $&&$.__esModule?$:{default:$}},GF=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return UF.default.createHash("md5").update($).digest()};Object.defineProperty(bG,"__esModule",{value:!0});bG.default=void 0;var UF=wF(import.meta.require("crypto")),fF=GF;bG.default=fF});var xG=K((cG)=>{var kG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(cG,"__esModule",{value:!0});cG.default=void 0;var WF=kG(S$()),LF=kG(DG()),XF=WF.default("v3",48,LF.default),ZF=XF;cG.default=ZF});var _G=K((uG)=>{var EF=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(uG,"__esModule",{value:!0});uG.default=void 0;var FF=EF(import.meta.require("crypto")),IF={randomUUID:FF.default.randomUUID};uG.default=IF});var nG=K((gG)=>{var pG=function($){return $&&$.__esModule?$:{default:$}},QF=function($,U,w){if(dG.default.randomUUID&&!U&&!$)return dG.default.randomUUID();$=$||{};const f=$.random||($.rng||RF.default)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,U){w=w||0;for(let G=0;G<16;++G)U[w+G]=f[G];return U}return YF.unsafeStringify(f)};Object.defineProperty(gG,"__esModule",{value:!0});gG.default=void 0;var dG=pG(_G()),RF=pG(C$()),YF=y0(),zF=QF;gG.default=zF});var iG=K((sG)=>{var TF=function($){return $&&$.__esModule?$:{default:$}},KF=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return JF.default.createHash("sha1").update($).digest()};Object.defineProperty(sG,"__esModule",{value:!0});sG.default=void 0;var JF=TF(import.meta.require("crypto")),MF=KF;sG.default=MF});var aG=K((oG)=>{var rG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(oG,"__esModule",{value:!0});oG.default=void 0;var OF=rG(S$()),AF=rG(iG()),BF=OF.default("v5",80,AF.default),VF=BF;oG.default=VF});var Uf=K((eG)=>{Object.defineProperty(eG,"__esModule",{value:!0});eG.default=void 0;var HF="00000000-0000-0000-0000-000000000000";eG.default=HF});var ff=K((wf)=>{var qF=function($){return $&&$.__esModule?$:{default:$}},NF=function($){if(!CF.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(wf,"__esModule",{value:!0});wf.default=void 0;var CF=qF(u0()),jF=NF;wf.default=jF});var b$=K((g)=>{var r=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(g,"__esModule",{value:!0});Object.defineProperty(g,"NIL",{enumerable:!0,get:function(){return DF.default}});Object.defineProperty(g,"parse",{enumerable:!0,get:function(){return xF.default}});Object.defineProperty(g,"stringify",{enumerable:!0,get:function(){return vF.default}});Object.defineProperty(g,"v1",{enumerable:!0,get:function(){return PF.default}});Object.defineProperty(g,"v3",{enumerable:!0,get:function(){return SF.default}});Object.defineProperty(g,"v4",{enumerable:!0,get:function(){return bF.default}});Object.defineProperty(g,"v5",{enumerable:!0,get:function(){return hF.default}});Object.defineProperty(g,"validate",{enumerable:!0,get:function(){return cF.default}});Object.defineProperty(g,"version",{enumerable:!0,get:function(){return kF.default}});var PF=r(HG()),SF=r(xG()),bF=r(nG()),hF=r(aG()),DF=r(Uf()),kF=r(ff()),cF=r(u0()),vF=r(y0()),xF=r(P$())});var h$=K((vz,Zf)=>{var{defineProperty:M1,getOwnPropertyDescriptor:uF,getOwnPropertyNames:yF}=Object,_F=Object.prototype.hasOwnProperty,B0=($,U)=>M1($,"name",{value:U,configurable:!0}),dF=($,U)=>{for(var w in U)M1($,w,{get:U[w],enumerable:!0})},pF=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of yF(U))if(!_F.call($,G)&&G!==w)M1($,G,{get:()=>U[G],enumerable:!(f=uF(U,G))||f.enumerable})}return $},gF=($)=>pF(M1({},"__esModule",{value:!0}),$),Wf={};dF(Wf,{isClockSkewCorrectedError:()=>Lf,isClockSkewError:()=>oF,isRetryableByTrait:()=>rF,isServerError:()=>aF,isThrottlingError:()=>tF,isTransientError:()=>Xf});Zf.exports=gF(Wf);var lF=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],nF=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],sF=["TimeoutError","RequestTimeout","RequestTimeoutException"],mF=[500,502,503,504],iF=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],rF=B0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),oF=B0(($)=>lF.includes($.name),"isClockSkewError"),Lf=B0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),tF=B0(($)=>{var U,w;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||nF.includes($.name)||((w=$.$retryable)==null?void 0:w.throttling)==!0},"isThrottlingError"),Xf=B0(($)=>{var U;return Lf($)||sF.includes($.name)||iF.includes(($==null?void 0:$.code)||"")||mF.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),aF=B0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const w=$.$metadata.httpStatusCode;if(500<=w&&w<=599&&!Xf($))return!0;return!1}return!1},"isServerError")});var Bf=K((xz,Af)=>{var{defineProperty:O1,getOwnPropertyDescriptor:eF,getOwnPropertyNames:$E}=Object,UE=Object.prototype.hasOwnProperty,l=($,U)=>O1($,"name",{value:U,configurable:!0}),wE=($,U)=>{for(var w in U)O1($,w,{get:U[w],enumerable:!0})},GE=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of $E(U))if(!UE.call($,G)&&G!==w)O1($,G,{get:()=>U[G],enumerable:!(f=eF(U,G))||f.enumerable})}return $},fE=($)=>GE(O1({},"__esModule",{value:!0}),$),Ef={};wE(Ef,{AdaptiveRetryStrategy:()=>EE,ConfiguredRetryStrategy:()=>IE,DEFAULT_MAX_ATTEMPTS:()=>D$,DEFAULT_RETRY_DELAY_BASE:()=>_0,DEFAULT_RETRY_MODE:()=>WE,DefaultRateLimiter:()=>Yf,INITIAL_RETRY_TOKENS:()=>k$,INVOCATION_ID_HEADER:()=>XE,MAXIMUM_RETRY_DELAY:()=>c$,NO_RETRY_INCREMENT:()=>Tf,REQUEST_HEADER:()=>ZE,RETRY_COST:()=>zf,RETRY_MODES:()=>If,StandardRetryStrategy:()=>v$,THROTTLING_RETRY_DELAY_BASE:()=>Qf,TIMEOUT_RETRY_COST:()=>Jf});Af.exports=fE(Ef);var If=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(If||{}),D$=3,WE="standard",LE=h$(),Rf=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;const w=this.getCurrentTimeInSeconds();this.lastThrottleTime=w,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){const w=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((f)=>setTimeout(f,w))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const w=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=U}updateClientSendingRate(U){let w;if(this.updateMeasuredRate(),LE.isThrottlingError(U)){const G=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=G,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle(G),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());const f=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(f)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const U=this.getCurrentTimeInSeconds(),w=Math.floor(U*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){const f=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(f*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(U){return parseFloat(U.toFixed(8))}};l(Rf,"DefaultRateLimiter");var Yf=Rf,_0=100,c$=20000,Qf=500,k$=500,zf=5,Jf=10,Tf=1,XE="amz-sdk-invocation-id",ZE="amz-sdk-request",FE=l(()=>{let $=_0;return{computeNextBackoffDelay:l((f)=>{return Math.floor(Math.min(c$,Math.random()*2**f*$))},"computeNextBackoffDelay"),setDelayBase:l((f)=>{$=f},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),Ff=l(({retryDelay:$,retryCount:U,retryCost:w})=>{return{getRetryCount:l(()=>U,"getRetryCount"),getRetryDelay:l(()=>Math.min(c$,$),"getRetryDelay"),getRetryCost:l(()=>w,"getRetryCost")}},"createDefaultRetryToken"),Kf=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=k$,this.retryBackoffStrategy=FE(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return Ff({retryDelay:_0,retryCount:0})}async refreshRetryTokenForRetry(U,w){const f=await this.getMaxAttempts();if(this.shouldRetry(U,w,f)){const G=w.errorType;this.retryBackoffStrategy.setDelayBase(G==="THROTTLING"?Qf:_0);const W=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),L=w.retryAfterHint?Math.max(w.retryAfterHint.getTime()-Date.now()||0,W):W,X=this.getCapacityCost(G);return this.capacity-=X,Ff({retryDelay:L,retryCount:U.getRetryCount()+1,retryCost:X})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(k$,this.capacity+(U.getRetryCost()??Tf))}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,w,f){return U.getRetryCount()+1<f&&this.capacity>=this.getCapacityCost(w.errorType)&&this.isRetryableError(w.errorType)}getCapacityCost(U){return U==="TRANSIENT"?Jf:zf}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};l(Kf,"StandardRetryStrategy");var v$=Kf,Mf=class ${constructor(U,w){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:f}=w??{};this.rateLimiter=f??new Yf,this.standardRetryStrategy=new v$(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,w){return this.rateLimiter.updateClientSendingRate(w),this.standardRetryStrategy.refreshRetryTokenForRetry(U,w)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};l(Mf,"AdaptiveRetryStrategy");var EE=Mf,Of=class $ extends v${constructor(U,w=_0){super(typeof U==="function"?U:async()=>U);if(typeof w==="number")this.computeNextBackoffDelay=()=>w;else this.computeNextBackoffDelay=w}async refreshRetryTokenForRetry(U,w){const f=await super.refreshRetryTokenForRetry(U,w);return f.getRetryDelay=()=>this.computeNextBackoffDelay(f.getRetryCount()),f}};l(Of,"ConfiguredRetryStrategy");var IE=Of});var Nf=K((uz,qf)=>{var{defineProperty:A1,getOwnPropertyDescriptor:RE,getOwnPropertyNames:YE}=Object,QE=Object.prototype.hasOwnProperty,y=($,U)=>A1($,"name",{value:U,configurable:!0}),zE=($,U)=>{for(var w in U)A1($,w,{get:U[w],enumerable:!0})},JE=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of YE(U))if(!QE.call($,G)&&G!==w)A1($,G,{get:()=>U[G],enumerable:!(f=RE(U,G))||f.enumerable})}return $},TE=($)=>JE(A1({},"__esModule",{value:!0}),$),Cf={};zE(Cf,{constructStack:()=>x$});qf.exports=TE(Cf);var R0=y(($,U)=>{const w=[];if($)w.push($);if(U)for(let f of U)w.push(f);return w},"getAllAliases"),U0=y(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),x$=y(()=>{let $=[],U=[],w=!1;const f=new Set,G=y((I)=>I.sort((Y,R)=>Vf[R.step]-Vf[Y.step]||Hf[R.priority||"normal"]-Hf[Y.priority||"normal"]),"sort"),W=y((I)=>{let Y=!1;const R=y((Q)=>{const O=R0(Q.name,Q.aliases);if(O.includes(I)){Y=!0;for(let T of O)f.delete(T);return!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),Y},"removeByName"),L=y((I)=>{let Y=!1;const R=y((Q)=>{if(Q.middleware===I){Y=!0;for(let O of R0(Q.name,Q.aliases))f.delete(O);return!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),Y},"removeByReference"),X=y((I)=>{var Y;return $.forEach((R)=>{I.add(R.middleware,{...R})}),U.forEach((R)=>{I.addRelativeTo(R.middleware,{...R})}),(Y=I.identifyOnResolve)==null||Y.call(I,E.identifyOnResolve()),I},"cloneTo"),Z=y((I)=>{const Y=[];return I.before.forEach((R)=>{if(R.before.length===0&&R.after.length===0)Y.push(R);else Y.push(...Z(R))}),Y.push(I),I.after.reverse().forEach((R)=>{if(R.before.length===0&&R.after.length===0)Y.push(R);else Y.push(...Z(R))}),Y},"expandRelativeMiddlewareList"),F=y((I=!1)=>{const Y=[],R=[],Q={};return $.forEach((T)=>{const z={...T,before:[],after:[]};for(let M of R0(z.name,z.aliases))Q[M]=z;Y.push(z)}),U.forEach((T)=>{const z={...T,before:[],after:[]};for(let M of R0(z.name,z.aliases))Q[M]=z;R.push(z)}),R.forEach((T)=>{if(T.toMiddleware){const z=Q[T.toMiddleware];if(z===void 0){if(I)return;throw new Error(`${T.toMiddleware} is not found when adding ${U0(T.name,T.aliases)} middleware ${T.relation} ${T.toMiddleware}`)}if(T.relation==="after")z.after.push(T);if(T.relation==="before")z.before.push(T)}}),G(Y).map(Z).reduce((T,z)=>{return T.push(...z),T},[])},"getMiddlewareList"),E={add:(I,Y={})=>{const{name:R,override:Q,aliases:O}=Y,T={step:"initialize",priority:"normal",middleware:I,...Y},z=R0(R,O);if(z.length>0){if(z.some((M)=>f.has(M))){if(!Q)throw new Error(`Duplicate middleware name '${U0(R,O)}'`);for(let M of z){const A=$.findIndex((V)=>{var e;return V.name===M||((e=V.aliases)==null?void 0:e.some((Z0)=>Z0===M))});if(A===-1)continue;const B=$[A];if(B.step!==T.step||T.priority!==B.priority)throw new Error(`"${U0(B.name,B.aliases)}" middleware with ${B.priority} priority in ${B.step} step cannot be overridden by "${U0(R,O)}" middleware with ${T.priority} priority in ${T.step} step.`);$.splice(A,1)}}for(let M of z)f.add(M)}$.push(T)},addRelativeTo:(I,Y)=>{const{name:R,override:Q,aliases:O}=Y,T={middleware:I,...Y},z=R0(R,O);if(z.length>0){if(z.some((M)=>f.has(M))){if(!Q)throw new Error(`Duplicate middleware name '${U0(R,O)}'`);for(let M of z){const A=U.findIndex((V)=>{var e;return V.name===M||((e=V.aliases)==null?void 0:e.some((Z0)=>Z0===M))});if(A===-1)continue;const B=U[A];if(B.toMiddleware!==T.toMiddleware||B.relation!==T.relation)throw new Error(`"${U0(B.name,B.aliases)}" middleware ${B.relation} "${B.toMiddleware}" middleware cannot be overridden by "${U0(R,O)}" middleware ${T.relation} "${T.toMiddleware}" middleware.`);U.splice(A,1)}}for(let M of z)f.add(M)}U.push(T)},clone:()=>X(x$()),use:(I)=>{I.applyToStack(E)},remove:(I)=>{if(typeof I==="string")return W(I);else return L(I)},removeByTag:(I)=>{let Y=!1;const R=y((Q)=>{const{tags:O,name:T,aliases:z}=Q;if(O&&O.includes(I)){const M=R0(T,z);for(let A of M)f.delete(A);return Y=!0,!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),Y},concat:(I)=>{var Y;const R=X(x$());return R.use(I),R.identifyOnResolve(w||R.identifyOnResolve()||(((Y=I.identifyOnResolve)==null?void 0:Y.call(I))??!1)),R},applyToStack:X,identify:()=>{return F(!0).map((I)=>{const Y=I.step??I.relation+" "+I.toMiddleware;return U0(I.name,I.aliases)+" - "+Y})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,Y)=>{for(let R of F().map((Q)=>Q.middleware).reverse())I=R(I,Y);if(w)console.log(E.identify());return I}};return E},"constructStack"),Vf={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Hf={high:3,normal:2,low:1}});var u$=K((yz,Pf)=>{var{defineProperty:B1,getOwnPropertyDescriptor:KE,getOwnPropertyNames:ME}=Object,OE=Object.prototype.hasOwnProperty,AE=($,U)=>B1($,"name",{value:U,configurable:!0}),BE=($,U)=>{for(var w in U)B1($,w,{get:U[w],enumerable:!0})},VE=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of ME(U))if(!OE.call($,G)&&G!==w)B1($,G,{get:()=>U[G],enumerable:!(f=KE(U,G))||f.enumerable})}return $},HE=($)=>VE(B1({},"__esModule",{value:!0}),$),jf={};BE(jf,{isArrayBuffer:()=>CE});Pf.exports=HE(jf);var CE=AE(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var d0=K((_z,hf)=>{var{defineProperty:V1,getOwnPropertyDescriptor:qE,getOwnPropertyNames:NE}=Object,jE=Object.prototype.hasOwnProperty,Sf=($,U)=>V1($,"name",{value:U,configurable:!0}),PE=($,U)=>{for(var w in U)V1($,w,{get:U[w],enumerable:!0})},SE=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of NE(U))if(!jE.call($,G)&&G!==w)V1($,G,{get:()=>U[G],enumerable:!(f=qE(U,G))||f.enumerable})}return $},bE=($)=>SE(V1({},"__esModule",{value:!0}),$),bf={};PE(bf,{fromArrayBuffer:()=>DE,fromString:()=>kE});hf.exports=bE(bf);var hE=u$(),y$=import.meta.require("buffer"),DE=Sf(($,U=0,w=$.byteLength-U)=>{if(!hE.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return y$.Buffer.from($,U,w)},"fromArrayBuffer"),kE=Sf(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?y$.Buffer.from($,U):y$.Buffer.from($)},"fromString")});var cf=K((Df)=>{Object.defineProperty(Df,"__esModule",{value:!0});Df.fromBase64=void 0;var cE=d0(),vE=/^[A-Za-z0-9+/]*={0,2}$/,xE=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!vE.exec($))throw new TypeError("Invalid base64 string.");const U=cE.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};Df.fromBase64=xE});var w0=K((pz,yf)=>{var{defineProperty:H1,getOwnPropertyDescriptor:uE,getOwnPropertyNames:yE}=Object,_E=Object.prototype.hasOwnProperty,_$=($,U)=>H1($,"name",{value:U,configurable:!0}),dE=($,U)=>{for(var w in U)H1($,w,{get:U[w],enumerable:!0})},pE=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of yE(U))if(!_E.call($,G)&&G!==w)H1($,G,{get:()=>U[G],enumerable:!(f=uE(U,G))||f.enumerable})}return $},gE=($)=>pE(H1({},"__esModule",{value:!0}),$),vf={};dE(vf,{fromUtf8:()=>uf,toUint8Array:()=>lE,toUtf8:()=>nE});yf.exports=gE(vf);var xf=d0(),uf=_$(($)=>{const U=xf.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),lE=_$(($)=>{if(typeof $==="string")return uf($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),nE=_$(($)=>{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 xf.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var pf=K((_f)=>{Object.defineProperty(_f,"__esModule",{value:!0});_f.toBase64=void 0;var sE=d0(),mE=w0(),iE=($)=>{let U;if(typeof $==="string")U=mE.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 sE.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};_f.toBase64=iE});var q1=K((lz,C1)=>{var{defineProperty:gf,getOwnPropertyDescriptor:rE,getOwnPropertyNames:oE}=Object,tE=Object.prototype.hasOwnProperty,d$=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of oE(U))if(!tE.call($,G)&&G!==w)gf($,G,{get:()=>U[G],enumerable:!(f=rE(U,G))||f.enumerable})}return $},lf=($,U,w)=>(d$($,U,"default"),w&&d$(w,U,"default")),aE=($)=>d$(gf({},"__esModule",{value:!0}),$),p$={};C1.exports=aE(p$);lf(p$,cf(),C1.exports);lf(p$,pf(),C1.exports)});var mf=K((nf)=>{Object.defineProperty(nf,"__esModule",{value:!0});nf.getAwsChunkedEncodingStream=void 0;var eE=import.meta.require("stream"),$I=($,U)=>{const{base64Encoder:w,bodyLengthChecker:f,checksumAlgorithmFn:G,checksumLocationName:W,streamHasher:L}=U,X=w!==void 0&&G!==void 0&&W!==void 0&&L!==void 0,Z=X?L(G,$):void 0,F=new eE.Readable({read:()=>{}});return $.on("data",(E)=>{const I=f(E)||0;F.push(`${I.toString(16)}\r\n`),F.push(E),F.push("\r\n")}),$.on("end",async()=>{if(F.push("0\r\n"),X){const E=w(await Z);F.push(`${W}:${E}\r\n`),F.push("\r\n")}F.push(null)}),F};nf.getAwsChunkedEncodingStream=$I});var l$=K((sz,af)=>{var tf=function($){const U=[];for(let w of Object.keys($).sort()){const f=$[w];if(w=g$.escapeUri(w),Array.isArray(f))for(let G=0,W=f.length;G<W;G++)U.push(`${w}=${g$.escapeUri(f[G])}`);else{let G=w;if(f||typeof f==="string")G+=`=${g$.escapeUri(f)}`;U.push(G)}}return U.join("&")},N1=Object.defineProperty,UI=Object.getOwnPropertyDescriptor,wI=Object.getOwnPropertyNames,GI=Object.prototype.hasOwnProperty,fI=($,U)=>N1($,"name",{value:U,configurable:!0}),WI=($,U)=>{for(var w in U)N1($,w,{get:U[w],enumerable:!0})},LI=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of wI(U))if(!GI.call($,G)&&G!==w)N1($,G,{get:()=>U[G],enumerable:!(f=UI(U,G))||f.enumerable})}return $},XI=($)=>LI(N1({},"__esModule",{value:!0}),$),of={};WI(of,{buildQueryString:()=>tf});af.exports=XI(of);var g$=rf();fI(tf,"buildQueryString")});var zW=K((mz,QW)=>{async function m$($,U,w=ef){const f=U.headers??{},G=f.Expect||f.expect;let W=-1,L=!1;if(G==="100-continue")await Promise.race([new Promise((X)=>{W=Number(setTimeout(X,Math.max(ef,w)))}),new Promise((X)=>{$.on("continue",()=>{clearTimeout(W),X()}),$.on("error",()=>{L=!0,clearTimeout(W),X()})})]);if(!L)XW($,U.body)}var XW=function($,U){if(U instanceof LW.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}const w=U;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){$.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}$.end(Buffer.from(U));return}$.end()};async function YW($){const U=[],w=$.getReader();let f=!1,G=0;while(!f){const{done:X,value:Z}=await w.read();if(Z)U.push(Z),G+=Z.length;f=X}const W=new Uint8Array(G);let L=0;for(let X of U)W.set(X,L),L+=X.length;return W}var{create:ZI,defineProperty:p0,getOwnPropertyDescriptor:FI,getOwnPropertyNames:EI,getPrototypeOf:II}=Object,RI=Object.prototype.hasOwnProperty,j=($,U)=>p0($,"name",{value:U,configurable:!0}),YI=($,U)=>{for(var w in U)p0($,w,{get:U[w],enumerable:!0})},UW=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of EI(U))if(!RI.call($,G)&&G!==w)p0($,G,{get:()=>U[G],enumerable:!(f=FI(U,G))||f.enumerable})}return $},QI=($,U,w)=>(w=$!=null?ZI(II($)):{},UW(U||!$||!$.__esModule?p0(w,"default",{value:$,enumerable:!0}):w,$)),zI=($)=>UW(p0({},"__esModule",{value:!0}),$),wW={};YI(wW,{DEFAULT_REQUEST_TIMEOUT:()=>OI,NodeHttp2Handler:()=>CI,NodeHttpHandler:()=>AI,streamCollector:()=>NI});QW.exports=zI(wW);var GW=i(),fW=l$(),n$=import.meta.require("http"),s$=import.meta.require("https"),JI=["ECONNRESET","EPIPE","ETIMEDOUT"],WW=j(($)=>{const U={};for(let w of Object.keys($)){const f=$[w];U[w]=Array.isArray(f)?f.join(","):f}return U},"getTransformedHeaders"),TI=j(($,U,w=0)=>{if(!w)return;const f=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w);$.on("socket",(G)=>{if(G.connecting)G.on("connect",()=>{clearTimeout(f)});else clearTimeout(f)})},"setConnectionTimeout"),KI=j(($,{keepAlive:U,keepAliveMsecs:w})=>{if(U!==!0)return;$.on("socket",(f)=>{f.setKeepAlive(U,w||0)})},"setSocketKeepAlive"),MI=j(($,U,w=0)=>{$.setTimeout(w,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),LW=import.meta.require("stream"),ef=1000;j(m$,"writeRequestBody");j(XW,"writeBody");var OI=0,ZW=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((w,f)=>{if(typeof U==="function")U().then((G)=>{w(this.resolveDefaultConfig(G))}).catch(f);else w(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,w,f=console){var G,W,L;const{sockets:X,requests:Z,maxSockets:F}=U;if(typeof F!=="number"||F===Infinity)return w;const E=15000;if(Date.now()-E<w)return w;if(X&&Z)for(let I in X){const Y=((G=X[I])==null?void 0:G.length)??0,R=((W=Z[I])==null?void 0:W.length)??0;if(Y>=F&&R>=2*F)return(L=f==null?void 0:f.warn)==null||L.call(f,`@smithy/node-http-handler:WARN - socket usage at capacity=${Y} and ${R} 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 w}resolveDefaultConfig(U){const{requestTimeout:w,connectionTimeout:f,socketTimeout:G,httpAgent:W,httpsAgent:L}=U||{};return{connectionTimeout:f,requestTimeout:w??G,httpAgent:(()=>{if(W instanceof n$.Agent||typeof(W==null?void 0:W.destroy)==="function")return W;return new n$.Agent({keepAlive:!0,maxSockets:50,...W})})(),httpsAgent:(()=>{if(L instanceof s$.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new s$.Agent({keepAlive:!0,maxSockets:50,...L})})(),logger:console}}destroy(){var U,w,f,G;(w=(U=this.config)==null?void 0:U.httpAgent)==null||w.destroy(),(G=(f=this.config)==null?void 0:f.httpsAgent)==null||G.destroy()}async handle(U,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;let f;return new Promise((G,W)=>{let L=void 0;const X=j(async(M)=>{await L,clearTimeout(f),G(M)},"resolve"),Z=j(async(M)=>{await L,clearTimeout(f),W(M)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(w==null?void 0:w.aborted){const M=new Error("Request aborted");M.name="AbortError",Z(M);return}const F=U.protocol==="https:",E=F?this.config.httpsAgent:this.config.httpAgent;f=setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(E,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const I=fW.buildQueryString(U.query||{});let Y=void 0;if(U.username!=null||U.password!=null){const M=U.username??"",A=U.password??"";Y=`${M}:${A}`}let R=U.path;if(I)R+=`?${I}`;if(U.fragment)R+=`#${U.fragment}`;const Q={headers:U.headers,host:U.hostname,method:U.method,path:R,port:U.port,agent:E,auth:Y},T=(F?s$.request:n$.request)(Q,(M)=>{const A=new GW.HttpResponse({statusCode:M.statusCode||-1,reason:M.statusMessage,headers:WW(M.headers),body:M});X({response:A})});if(T.on("error",(M)=>{if(JI.includes(M.code))Z(Object.assign(M,{name:"TimeoutError"}));else Z(M)}),TI(T,Z,this.config.connectionTimeout),MI(T,Z,this.config.requestTimeout),w){const M=j(()=>{T.destroy();const A=new Error("Request aborted");A.name="AbortError",Z(A)},"onAbort");if(typeof w.addEventListener==="function"){const A=w;A.addEventListener("abort",M,{once:!0}),T.once("close",()=>A.removeEventListener("abort",M))}else w.onabort=M}const z=Q.agent;if(typeof z==="object"&&"keepAlive"in z)KI(T,{keepAlive:z.keepAlive,keepAliveMsecs:z.keepAliveMsecs});L=m$(T,U,this.config.requestTimeout).catch((M)=>{return clearTimeout(f),W(M)})})}updateHttpClientConfig(U,w){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[U]:w}})}httpHandlerConfigs(){return this.config??{}}};j(ZW,"NodeHttpHandler");var AI=ZW,$W=import.meta.require("http2"),BI=QI(import.meta.require("http2")),FW=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((w)=>w!==U)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(U){for(let w of this.sessions)if(w===U){if(!w.destroyed)w.destroy()}}};j(FW,"NodeHttp2ConnectionPool");var VI=FW,EW=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,w){const f=this.getUrlString(U),G=this.sessionCache.get(f);if(G){const Z=G.poll();if(Z&&!this.config.disableConcurrency)return Z}const W=BI.default.connect(f);if(this.config.maxConcurrency)W.settings({maxConcurrentStreams:this.config.maxConcurrency},(Z)=>{if(Z)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});W.unref();const L=j(()=>{W.destroy(),this.deleteSession(f,W)},"destroySessionCb");if(W.on("goaway",L),W.on("error",L),W.on("frameError",L),W.on("close",()=>this.deleteSession(f,W)),w.requestTimeout)W.setTimeout(w.requestTimeout,L);const X=this.sessionCache.get(f)||new VI;return X.offerLast(W),this.sessionCache.set(f,X),W}deleteSession(U,w){const f=this.sessionCache.get(U);if(!f)return;if(!f.contains(w))return;f.remove(w),this.sessionCache.set(U,f)}release(U,w){var f;const G=this.getUrlString(U);(f=this.sessionCache.get(G))==null||f.offerLast(w)}destroy(){for(let[U,w]of this.sessionCache){for(let f of w){if(!f.destroyed)f.destroy();w.remove(f)}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()}};j(EW,"NodeHttp2ConnectionManager");var HI=EW,IW=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new HI({}),this.configProvider=new Promise((w,f)=>{if(typeof U==="function")U().then((G)=>{w(G||{})}).catch(f);else w(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:w}={}){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:f,disableConcurrentStreams:G}=this.config;return new Promise((W,L)=>{var X;let Z=!1,F=void 0;const E=j(async(N)=>{await F,W(N)},"resolve"),I=j(async(N)=>{await F,L(N)},"reject");if(w==null?void 0:w.aborted){Z=!0;const N=new Error("Request aborted");N.name="AbortError",I(N);return}const{hostname:Y,method:R,port:Q,protocol:O,query:T}=U;let z="";if(U.username!=null||U.password!=null){const N=U.username??"",d=U.password??"";z=`${N}:${d}@`}const M=`${O}//${z}${Y}${Q?`:${Q}`:""}`,A={destination:new URL(M)},B=this.connectionManager.lease(A,{requestTimeout:(X=this.config)==null?void 0:X.sessionTimeout,disableConcurrentStreams:G||!1}),V=j((N)=>{if(G)this.destroySession(B);Z=!0,I(N)},"rejectWithDestroy"),e=fW.buildQueryString(T||{});let Z0=U.path;if(e)Z0+=`?${e}`;if(U.fragment)Z0+=`#${U.fragment}`;const v=B.request({...U.headers,[$W.constants.HTTP2_HEADER_PATH]:Z0,[$W.constants.HTTP2_HEADER_METHOD]:R});if(B.ref(),v.on("response",(N)=>{const d=new GW.HttpResponse({statusCode:N[":status"]||-1,headers:WW(N),body:v});if(Z=!0,E({response:d}),G)B.close(),this.connectionManager.deleteSession(M,B)}),f)v.setTimeout(f,()=>{v.close();const N=new Error(`Stream timed out because of no activity for ${f} ms`);N.name="TimeoutError",V(N)});if(w){const N=j(()=>{v.close();const d=new Error("Request aborted");d.name="AbortError",V(d)},"onAbort");if(typeof w.addEventListener==="function"){const d=w;d.addEventListener("abort",N,{once:!0}),v.once("close",()=>d.removeEventListener("abort",N))}else w.onabort=N}v.on("frameError",(N,d,EX)=>{V(new Error(`Frame type id ${N} in stream id ${EX} has failed with code ${d}.`))}),v.on("error",V),v.on("aborted",()=>{V(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${v.rstCode}.`))}),v.on("close",()=>{if(B.unref(),G)B.destroy();if(!Z)V(new Error("Unexpected error: http2 request did not get a response"))}),F=m$(v,U,f)})}updateHttpClientConfig(U,w){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[U]:w}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};j(IW,"NodeHttp2Handler");var CI=IW,RW=class $ extends LW.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,w,f){this.bufferedBytes.push(U),f()}};j(RW,"Collector");var qI=RW,NI=j(($)=>{if(jI($))return YW($);return new Promise((U,w)=>{const f=new qI;$.pipe(f),$.on("error",(G)=>{f.end(),w(G)}),f.on("error",w),f.on("finish",function(){const G=new Uint8Array(Buffer.concat(this.bufferedBytes));U(G)})})},"streamCollector"),jI=j(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");j(YW,"collectReadableStream")});var HW=K((iz,VW)=>{var KW=function($=0){return new Promise((U,w)=>{if($)setTimeout(()=>{const f=new Error(`Request did not complete within ${$} ms`);f.name="TimeoutError",w(f)},$)})};async function OW($){const U=await BW($),w=xI.fromBase64(U);return new Uint8Array(w)}async function AW($){const U=[],w=$.getReader();let f=!1,G=0;while(!f){const{done:X,value:Z}=await w.read();if(Z)U.push(Z),G+=Z.length;f=X}const W=new Uint8Array(G);let L=0;for(let X of U)W.set(X,L),L+=X.length;return W}var BW=function($){return new Promise((U,w)=>{const f=new FileReader;f.onloadend=()=>{if(f.readyState!==2)return w(new Error("Reader aborted too early"));const G=f.result??"",W=G.indexOf(","),L=W>-1?W+1:G.length;U(G.substring(L))},f.onabort=()=>w(new Error("Read aborted")),f.onerror=()=>w(f.error),f.readAsDataURL($)})},P1=Object.defineProperty,PI=Object.getOwnPropertyDescriptor,SI=Object.getOwnPropertyNames,bI=Object.prototype.hasOwnProperty,o=($,U)=>P1($,"name",{value:U,configurable:!0}),hI=($,U)=>{for(var w in U)P1($,w,{get:U[w],enumerable:!0})},DI=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of SI(U))if(!bI.call($,G)&&G!==w)P1($,G,{get:()=>U[G],enumerable:!(f=PI(U,G))||f.enumerable})}return $},kI=($)=>DI(P1({},"__esModule",{value:!0}),$),TW={};hI(TW,{FetchHttpHandler:()=>vI,keepAliveSupport:()=>j1,streamCollector:()=>uI});VW.exports=kI(TW);var JW=i(),cI=l$();o(KW,"requestTimeout");var j1={supported:void 0},MW=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((w)=>w||{});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:w}={}){if(!this.config)this.config=await this.configProvider;const f=this.config.requestTimeout,G=this.config.keepAlive===!0,W=this.config.credentials;if(w==null?void 0:w.aborted){const z=new Error("Request aborted");return z.name="AbortError",Promise.reject(z)}let L=U.path;const X=cI.buildQueryString(U.query||{});if(X)L+=`?${X}`;if(U.fragment)L+=`#${U.fragment}`;let Z="";if(U.username!=null||U.password!=null){const z=U.username??"",M=U.password??"";Z=`${z}:${M}@`}const{port:F,method:E}=U,I=`${U.protocol}//${Z}${U.hostname}${F?`:${F}`:""}${L}`,Y=E==="GET"||E==="HEAD"?void 0:U.body,R={body:Y,headers:new Headers(U.headers),method:E,credentials:W};if(Y)R.duplex="half";if(typeof AbortController!=="undefined")R.signal=w;if(j1.supported)R.keepalive=G;let Q=o(()=>{},"removeSignalEventListener");const O=new Request(I,R),T=[fetch(O).then((z)=>{const M=z.headers,A={};for(let V of M.entries())A[V[0]]=V[1];if(z.body==null)return z.blob().then((V)=>({response:new JW.HttpResponse({headers:A,reason:z.statusText,statusCode:z.status,body:V})}));return{response:new JW.HttpResponse({headers:A,reason:z.statusText,statusCode:z.status,body:z.body})}}),KW(f)];if(w)T.push(new Promise((z,M)=>{const A=o(()=>{const B=new Error("Request aborted");B.name="AbortError",M(B)},"onAbort");if(typeof w.addEventListener==="function"){const B=w;B.addEventListener("abort",A,{once:!0}),Q=o(()=>B.removeEventListener("abort",A),"removeSignalEventListener")}else w.onabort=A}));return Promise.race(T).finally(Q)}updateHttpClientConfig(U,w){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return f[U]=w,f})}httpHandlerConfigs(){return this.config??{}}};o(MW,"FetchHttpHandler");var vI=MW,xI=q1(),uI=o(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return OW($);return AW($)},"streamCollector");o(OW,"collectBlob");o(AW,"collectStream");o(BW,"readToBase64")});var g0=K((CW)=>{Object.defineProperty(CW,"__esModule",{value:!0});CW.isReadableStream=void 0;var yI=($)=>{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)};CW.isReadableStream=yI});var DW=K((bW)=>{Object.defineProperty(bW,"__esModule",{value:!0});bW.sdkStreamMixin=void 0;var _I=HW(),dI=q1(),pI=SW(),gI=w0(),NW=g0(),jW="The stream has already been transformed.",lI=($)=>{var U,w;if(!PW($)&&!NW.isReadableStream($)){const L=((w=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||w===void 0?void 0:w.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${L}`)}let f=!1;const G=async()=>{if(f)throw new Error(jW);return f=!0,await _I.streamCollector($)},W=(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:G,transformToString:async(L)=>{const X=await G();if(L==="base64")return dI.toBase64(X);else if(L==="hex")return pI.toHex(X);else if(L===void 0||L==="utf8"||L==="utf-8")return gI.toUtf8(X);else if(typeof TextDecoder==="function")return new TextDecoder(L).decode(X);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(f)throw new Error(jW);if(f=!0,PW($))return W($);else if(NW.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};bW.sdkStreamMixin=lI;var PW=($)=>typeof Blob==="function"&&$ instanceof Blob});var xW=K((cW)=>{Object.defineProperty(cW,"__esModule",{value:!0});cW.sdkStreamMixin=void 0;var nI=zW(),sI=d0(),i$=import.meta.require("stream"),mI=import.meta.require("util"),iI=DW(),kW="The stream has already been transformed.",rI=($)=>{var U,w;if(!($ instanceof i$.Readable))try{return iI.sdkStreamMixin($)}catch(W){const L=((w=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||w===void 0?void 0:w.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${L}`)}let f=!1;const G=async()=>{if(f)throw new Error(kW);return f=!0,await nI.streamCollector($)};return Object.assign($,{transformToByteArray:G,transformToString:async(W)=>{const L=await G();if(W===void 0||Buffer.isEncoding(W))return sI.fromArrayBuffer(L.buffer,L.byteOffset,L.byteLength).toString(W);else return new mI.TextDecoder(W).decode(L)},transformToWebStream:()=>{if(f)throw new Error(kW);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof i$.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 f=!0,i$.Readable.toWeb($)}})};cW.sdkStreamMixin=rI});var _W=K((uW)=>{async function oI($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(uW,"__esModule",{value:!0});uW.splitStream=void 0;uW.splitStream=oI});var lW=K((pW)=>{async function eI($){if(aI.isReadableStream($))return tI.splitStream($);const U=new dW.PassThrough,w=new dW.PassThrough;return $.pipe(U),$.pipe(w),[U,w]}Object.defineProperty(pW,"__esModule",{value:!0});pW.splitStream=void 0;var dW=import.meta.require("stream"),tI=_W(),aI=g0();pW.splitStream=eI});var mW=K((nW)=>{async function $R($,U){var w;let f=0;const G=[],W=$.getReader();let L=!1;while(!L){const{done:F,value:E}=await W.read();if(E)G.push(E),f+=(w=E===null||E===void 0?void 0:E.byteLength)!==null&&w!==void 0?w:0;if(f>=U)break;L=F}W.releaseLock();const X=new Uint8Array(Math.min(U,f));let Z=0;for(let F of G){if(F.byteLength>X.byteLength-Z){X.set(F.subarray(0,X.byteLength-Z),Z);break}else X.set(F,Z);Z+=F.length}return X}Object.defineProperty(nW,"__esModule",{value:!0});nW.headStream=void 0;nW.headStream=$R});var tW=K((rW)=>{Object.defineProperty(rW,"__esModule",{value:!0});rW.headStream=void 0;var UR=import.meta.require("stream"),wR=mW(),GR=g0(),fR=($,U)=>{if(GR.isReadableStream($))return wR.headStream($,U);return new Promise((w,f)=>{const G=new iW;G.limit=U,$.pipe(G),$.on("error",(W)=>{G.end(),f(W)}),G.on("error",f),G.on("finish",function(){const W=new Uint8Array(Buffer.concat(this.buffers));w(W)})})};rW.headStream=fR;class iW extends UR.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write($,U,w){var f;if(this.buffers.push($),this.bytesBuffered+=(f=$.byteLength)!==null&&f!==void 0?f:0,this.bytesBuffered>=this.limit){const G=this.bytesBuffered-this.limit,W=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=W.subarray(0,W.byteLength-G),this.emit("finish")}w()}}});var G8=K((wJ,Q0)=>{var $8=function($,U="utf-8"){if(U==="base64")return aW.toBase64($);return eW.toUtf8($)},U8=function($,U){if(U==="base64")return o$.mutate(aW.fromBase64($));return o$.mutate(eW.fromUtf8($))},S1=Object.defineProperty,WR=Object.getOwnPropertyDescriptor,LR=Object.getOwnPropertyNames,XR=Object.prototype.hasOwnProperty,t$=($,U)=>S1($,"name",{value:U,configurable:!0}),ZR=($,U)=>{for(var w in U)S1($,w,{get:U[w],enumerable:!0})},r$=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of LR(U))if(!XR.call($,G)&&G!==w)S1($,G,{get:()=>U[G],enumerable:!(f=WR(U,G))||f.enumerable})}return $},l0=($,U,w)=>(r$($,U,"default"),w&&r$(w,U,"default")),FR=($)=>r$(S1({},"__esModule",{value:!0}),$),Y0={};ZR(Y0,{Uint8ArrayBlobAdapter:()=>o$});Q0.exports=FR(Y0);var aW=q1(),eW=w0();t$($8,"transformToString");t$(U8,"transformFromString");var w8=class $ extends Uint8Array{static fromString(U,w="utf-8"){switch(typeof U){case"string":return U8(U,w);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 $8(this,U)}};t$(w8,"Uint8ArrayBlobAdapter");var o$=w8;l0(Y0,mf(),Q0.exports);l0(Y0,xW(),Q0.exports);l0(Y0,lW(),Q0.exports);l0(Y0,tW(),Q0.exports);l0(Y0,g0(),Q0.exports)});var q0=K((GJ,q8)=>{var T8=function($){const U=$.getUTCFullYear(),w=$.getUTCMonth(),f=$.getUTCDay(),G=$.getUTCDate(),W=$.getUTCHours(),L=$.getUTCMinutes(),X=$.getUTCSeconds(),Z=G<10?`0${G}`:`${G}`,F=W<10?`0${W}`:`${W}`,E=L<10?`0${L}`:`${L}`,I=X<10?`0${X}`:`${X}`;return`${xR[f]}, ${Z} ${ZU[w]} ${U} ${F}:${E}:${I} GMT`},D1=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},FU=function($,U,w){let f,G,W;if(typeof U==="undefined"&&typeof w==="undefined")f={},W=$;else if(f=$,typeof U==="function")return G=U,W=w,JY(f,G,W);else W=U;for(let L of Object.keys(W)){if(!Array.isArray(W[L])){f[L]=W[L];continue}H8(f,null,W,L)}return f},C8=function($,U,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");const f=$.split(U);if(w===1)return f;const G=[];let W="";for(let L=0;L<f.length;L++){if(W==="")W=f[L];else W+=U+f[L];if((L+1)%w===0)G.push(W),W=""}if(W!=="")G.push(W);return G},k1=Object.defineProperty,ER=Object.getOwnPropertyDescriptor,IR=Object.getOwnPropertyNames,RR=Object.prototype.hasOwnProperty,J=($,U)=>k1($,"name",{value:U,configurable:!0}),YR=($,U)=>{for(var w in U)k1($,w,{get:U[w],enumerable:!0})},QR=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of IR(U))if(!RR.call($,G)&&G!==w)k1($,G,{get:()=>U[G],enumerable:!(f=ER(U,G))||f.enumerable})}return $},zR=($)=>QR(k1({},"__esModule",{value:!0}),$),W8={};YR(W8,{Client:()=>TR,Command:()=>E8,LazyJsonString:()=>YY,NoOpLogger:()=>JR,SENSITIVE_STRING:()=>OR,ServiceException:()=>UY,StringWrapper:()=>r0,_json:()=>fU,collectBody:()=>KR,convertMap:()=>QY,createAggregatedClient:()=>AR,dateToUtcString:()=>T8,decorateServiceException:()=>M8,emitWarningIfUnsupportedVersion:()=>WY,expectBoolean:()=>VR,expectByte:()=>GU,expectFloat32:()=>b1,expectInt:()=>CR,expectInt32:()=>UU,expectLong:()=>m0,expectNonNull:()=>NR,expectNumber:()=>s0,expectObject:()=>R8,expectShort:()=>wU,expectString:()=>jR,expectUnion:()=>PR,extendedEncodeURIComponent:()=>D1,getArrayIfSingleItem:()=>RY,getDefaultClientConfiguration:()=>EY,getDefaultExtensionConfiguration:()=>A8,getValueFromTextNode:()=>B8,handleFloat:()=>hR,limitedParseDouble:()=>XU,limitedParseFloat:()=>DR,limitedParseFloat32:()=>kR,loadConfigsForDefaultMode:()=>fY,logger:()=>i0,map:()=>FU,parseBoolean:()=>BR,parseEpochTimestamp:()=>sR,parseRfc3339DateTime:()=>yR,parseRfc3339DateTimeWithOffset:()=>dR,parseRfc7231DateTime:()=>nR,resolveDefaultRuntimeConfig:()=>IY,resolvedPath:()=>MY,serializeDateTime:()=>AY,serializeFloat:()=>OY,splitEvery:()=>C8,strictParseByte:()=>J8,strictParseDouble:()=>LU,strictParseFloat:()=>SR,strictParseFloat32:()=>Y8,strictParseInt:()=>cR,strictParseInt32:()=>vR,strictParseLong:()=>z8,strictParseShort:()=>V0,take:()=>zY,throwDefaultError:()=>O8,withBaseException:()=>wY});q8.exports=zR(W8);var L8=class ${trace(){}debug(){}info(){}warn(){}error(){}};J(L8,"NoOpLogger");var JR=L8,X8=Nf(),Z8=class ${constructor(U){this.middlewareStack=X8.constructStack(),this.config=U}send(U,w,f){const G=typeof w!=="function"?w:void 0,W=typeof w==="function"?w:f,L=U.resolveMiddleware(this.middlewareStack,this.config,G);if(W)L(U).then((X)=>W(null,X.output),(X)=>W(X)).catch(()=>{});else return L(U).then((X)=>X.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};J(Z8,"Client");var TR=Z8,a$=G8(),KR=J(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return a$.Uint8ArrayBlobAdapter.mutate($);if(!$)return a$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const w=U.streamCollector($);return a$.Uint8ArrayBlobAdapter.mutate(await w)},"collectBody"),$U=F0(),F8=class ${constructor(){this.middlewareStack=X8.constructStack()}static classBuilder(){return new MR}resolveMiddlewareWithContext(U,w,f,{middlewareFn:G,clientName:W,commandName:L,inputFilterSensitiveLog:X,outputFilterSensitiveLog:Z,smithyContext:F,additionalContext:E,CommandCtor:I}){for(let T of G.bind(this)(I,U,w,f))this.middlewareStack.use(T);const Y=U.concat(this.middlewareStack),{logger:R}=w,Q={logger:R,clientName:W,commandName:L,inputFilterSensitiveLog:X,outputFilterSensitiveLog:Z,[$U.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...E},{requestHandler:O}=w;return Y.resolve((T)=>O.handle(T.request,f||{}),Q)}};J(F8,"Command");var E8=F8,I8=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,w,f={}){return this._smithyContext={service:U,operation:w,...f},this}c(U={}){return this._additionalContext=U,this}n(U,w){return this._clientName=U,this._commandName=w,this}f(U=(f)=>f,w=(f)=>f){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=w,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const w=this;let f;return f=(U=class extends E8{constructor(...[G]){super();this.serialize=w._serializer,this.deserialize=w._deserializer,this.input=G??{},w._init(this)}static getEndpointParameterInstructions(){return w._ep}resolveMiddleware(G,W,L){return this.resolveMiddlewareWithContext(G,W,L,{CommandCtor:f,middlewareFn:w._middlewareFn,clientName:w._clientName,commandName:w._commandName,inputFilterSensitiveLog:w._inputFilterSensitiveLog,outputFilterSensitiveLog:w._outputFilterSensitiveLog,smithyContext:w._smithyContext,additionalContext:w._additionalContext})}},J(U,"CommandRef"),U)}};J(I8,"ClassBuilder");var MR=I8,OR="***SensitiveInformation***",AR=J(($,U)=>{for(let w of Object.keys($)){const f=$[w],G=J(async function(L,X,Z){const F=new f(L);if(typeof X==="function")this.send(F,X);else if(typeof Z==="function"){if(typeof X!=="object")throw new Error(`Expected http options but got ${typeof X}`);this.send(F,X||{},Z)}else return this.send(F,X)},"methodImpl"),W=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");U.prototype[W]=G}},"createAggregatedClient"),BR=J(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),VR=J(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)i0.warn(h1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")i0.warn(h1(`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=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))i0.warn(h1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),HR=Math.ceil(340282346638528860000000000000000000000),b1=J(($)=>{const U=s0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>HR)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),m0=J(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),CR=m0,UU=J(($)=>WU($,32),"expectInt32"),wU=J(($)=>WU($,16),"expectShort"),GU=J(($)=>WU($,8),"expectByte"),WU=J(($,U)=>{const w=m0($);if(w!==void 0&&qR(w,U)!==w)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return w},"expectSizedInt"),qR=J(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),NR=J(($,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"),R8=J(($)=>{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"),jR=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return i0.warn(h1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),PR=J(($)=>{if($===null||$===void 0)return;const U=R8($),w=Object.entries(U).filter(([,f])=>f!=null).map(([f])=>f);if(w.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(w.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${w} were not null.`);return U},"expectUnion"),LU=J(($)=>{if(typeof $=="string")return s0(C0($));return s0($)},"strictParseDouble"),SR=LU,Y8=J(($)=>{if(typeof $=="string")return b1(C0($));return b1($)},"strictParseFloat32"),bR=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,C0=J(($)=>{const U=$.match(bR);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),XU=J(($)=>{if(typeof $=="string")return Q8($);return s0($)},"limitedParseDouble"),hR=XU,DR=XU,kR=J(($)=>{if(typeof $=="string")return Q8($);return b1($)},"limitedParseFloat32"),Q8=J(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),z8=J(($)=>{if(typeof $==="string")return m0(C0($));return m0($)},"strictParseLong"),cR=z8,vR=J(($)=>{if(typeof $==="string")return UU(C0($));return UU($)},"strictParseInt32"),V0=J(($)=>{if(typeof $==="string")return wU(C0($));return wU($)},"strictParseShort"),J8=J(($)=>{if(typeof $==="string")return GU(C0($));return GU($)},"strictParseByte"),h1=J(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),i0={warn:console.warn},xR=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ZU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];J(T8,"dateToUtcString");var uR=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),yR=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=uR.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[w,f,G,W,L,X,Z,F]=U,E=V0(H0(f)),I=s(G,"month",1,12),Y=s(W,"day",1,31);return n0(E,I,Y,{hours:L,minutes:X,seconds:Z,fractionalMilliseconds:F})},"parseRfc3339DateTime"),_R=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),dR=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=_R.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[w,f,G,W,L,X,Z,F,E]=U,I=V0(H0(f)),Y=s(G,"month",1,12),R=s(W,"day",1,31),Q=n0(I,Y,R,{hours:L,minutes:X,seconds:Z,fractionalMilliseconds:F});if(E.toUpperCase()!="Z")Q.setTime(Q.getTime()-$Y(E));return Q},"parseRfc3339DateTimeWithOffset"),pR=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$/),gR=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$/),lR=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})$/),nR=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=pR.exec($);if(U){const[w,f,G,W,L,X,Z,F]=U;return n0(V0(H0(W)),e$(G),s(f,"day",1,31),{hours:L,minutes:X,seconds:Z,fractionalMilliseconds:F})}if(U=gR.exec($),U){const[w,f,G,W,L,X,Z,F]=U;return rR(n0(mR(W),e$(G),s(f,"day",1,31),{hours:L,minutes:X,seconds:Z,fractionalMilliseconds:F}))}if(U=lR.exec($),U){const[w,f,G,W,L,X,Z,F]=U;return n0(V0(H0(F)),e$(f),s(G.trimLeft(),"day",1,31),{hours:W,minutes:L,seconds:X,fractionalMilliseconds:Z})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),sR=J(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=LU($);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"),n0=J(($,U,w,f)=>{const G=U-1;return tR($,G,w),new Date(Date.UTC($,G,w,s(f.hours,"hour",0,23),s(f.minutes,"minute",0,59),s(f.seconds,"seconds",0,60),eR(f.fractionalMilliseconds)))},"buildDate"),mR=J(($)=>{const U=(new Date()).getUTCFullYear(),w=Math.floor(U/100)*100+V0(H0($));if(w<U)return w+100;return w},"parseTwoDigitYear"),iR=1576800000000,rR=J(($)=>{if($.getTime()-(new Date()).getTime()>iR)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),e$=J(($)=>{const U=ZU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),oR=[31,28,31,30,31,30,31,31,30,31,30,31],tR=J(($,U,w)=>{let f=oR[U];if(U===1&&aR($))f=29;if(w>f)throw new TypeError(`Invalid day for ${ZU[U]} in ${$}: ${w}`)},"validateDayOfMonth"),aR=J(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),s=J(($,U,w,f)=>{const G=J8(H0($));if(G<w||G>f)throw new TypeError(`${U} must be between ${w} and ${f}, inclusive`);return G},"parseDateValue"),eR=J(($)=>{if($===null||$===void 0)return 0;return Y8("0."+$)*1000},"parseMilliseconds"),$Y=J(($)=>{const U=$[0];let w=1;if(U=="+")w=1;else if(U=="-")w=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const f=Number($.substring(1,3)),G=Number($.substring(4,6));return w*(f*60+G)*60*1000},"parseOffsetToMilliseconds"),H0=J(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),K8=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};J(K8,"ServiceException");var UY=K8,M8=J(($,U={})=>{Object.entries(U).filter(([,f])=>f!==void 0).forEach(([f,G])=>{if($[f]==null||$[f]==="")$[f]=G});const w=$.message||$.Message||"UnknownError";return $.message=w,delete $.Message,$},"decorateServiceException"),O8=J(({output:$,parsedBody:U,exceptionCtor:w,errorCode:f})=>{const G=GY($),W=G.httpStatusCode?G.httpStatusCode+"":void 0,L=new w({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||f||W||"UnknownError",$fault:"client",$metadata:G});throw M8(L,U)},"throwDefaultError"),wY=J(($)=>{return({output:U,parsedBody:w,errorCode:f})=>{O8({output:U,parsedBody:w,exceptionCtor:$,errorCode:f})}},"withBaseException"),GY=J(($)=>({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"),fY=J(($)=>{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"),f8=!1,WY=J(($)=>{if($&&!f8&&parseInt($.substring(1,$.indexOf(".")))<16)f8=!0},"emitWarningIfUnsupportedVersion"),LY=J(($)=>{const U=[];for(let w in $U.AlgorithmId){const f=$U.AlgorithmId[w];if($[f]===void 0)continue;U.push({algorithmId:()=>f,checksumConstructor:()=>$[f]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),XY=J(($)=>{const U={};return $.checksumAlgorithms().forEach((w)=>{U[w.algorithmId()]=w.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),ZY=J(($)=>{let U=$.retryStrategy;return{setRetryStrategy(w){U=w},retryStrategy(){return U}}},"getRetryConfiguration"),FY=J(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),A8=J(($)=>{return{...LY($),...ZY($)}},"getDefaultExtensionConfiguration"),EY=A8,IY=J(($)=>{return{...XY($),...FY($)}},"resolveDefaultRuntimeConfig");J(D1,"extendedEncodeURIComponent");var RY=J(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),B8=J(($)=>{for(let w in $)if($.hasOwnProperty(w)&&$[w]["#text"]!==void 0)$[w]=$[w]["#text"];else if(typeof $[w]==="object"&&$[w]!==null)$[w]=B8($[w]);return $},"getValueFromTextNode"),r0=J(function(){const $=Object.getPrototypeOf(this).constructor,w=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(w,$.prototype),w},"StringWrapper");r0.prototype=Object.create(String.prototype,{constructor:{value:r0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(r0,String);var V8=class $ extends r0{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))}};J(V8,"LazyJsonString");var YY=V8;J(FU,"map");var QY=J(($)=>{const U={};for(let[w,f]of Object.entries($||{}))U[w]=[,f];return U},"convertMap"),zY=J(($,U)=>{const w={};for(let f in U)H8(w,$,U,f);return w},"take"),JY=J(($,U,w)=>{return FU($,Object.entries(w).reduce((f,[G,W])=>{if(Array.isArray(W))f[G]=W;else if(typeof W==="function")f[G]=[U,W()];else f[G]=[U,W];return f},{}))},"mapWithFilter"),H8=J(($,U,w,f)=>{if(U!==null){let L=w[f];if(typeof L==="function")L=[,L];const[X=TY,Z=KY,F=f]=L;if(typeof X==="function"&&X(U[F])||typeof X!=="function"&&!!X)$[f]=Z(U[F]);return}let[G,W]=w[f];if(typeof W==="function"){let L;const X=G===void 0&&(L=W())!=null,Z=typeof G==="function"&&!!G(void 0)||typeof G!=="function"&&!!G;if(X)$[f]=L;else if(Z)$[f]=W()}else{const L=G===void 0&&W!=null,X=typeof G==="function"&&!!G(W)||typeof G!=="function"&&!!G;if(L||X)$[f]=W}},"applyInstruction"),TY=J(($)=>$!=null,"nonNullish"),KY=J(($)=>$,"pass"),MY=J(($,U,w,f,G,W)=>{if(U!=null&&U[w]!==void 0){const L=f();if(L.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");$=$.replace(G,W?L.split("/").map((X)=>D1(X)).join("/"):D1(L))}else throw new Error("No value provided for input HTTP label: "+w+".");return $},"resolvedPath"),OY=J(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),AY=J(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),fU=J(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(fU);if(typeof $==="object"){const U={};for(let w of Object.keys($)){if($[w]==null)continue;U[w]=fU($[w])}return U}return $},"_json");J(C8,"splitEvery")});var P8=K((N8)=>{Object.defineProperty(N8,"__esModule",{value:!0});N8.isStreamingPayload=void 0;var BY=import.meta.require("stream"),VY=($)=>($===null||$===void 0?void 0:$.body)instanceof BY.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;N8.isStreamingPayload=VY});var m8=K((LJ,s8)=>{var{defineProperty:c1,getOwnPropertyDescriptor:HY,getOwnPropertyNames:CY}=Object,qY=Object.prototype.hasOwnProperty,S=($,U)=>c1($,"name",{value:U,configurable:!0}),NY=($,U)=>{for(var w in U)c1($,w,{get:U[w],enumerable:!0})},jY=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of CY(U))if(!qY.call($,G)&&G!==w)c1($,G,{get:()=>U[G],enumerable:!(f=HY(U,G))||f.enumerable})}return $},PY=($)=>jY(c1({},"__esModule",{value:!0}),$),b8={};NY(b8,{AdaptiveRetryStrategy:()=>hY,CONFIG_MAX_ATTEMPTS:()=>IU,CONFIG_RETRY_MODE:()=>_8,ENV_MAX_ATTEMPTS:()=>EU,ENV_RETRY_MODE:()=>y8,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>DY,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>cY,StandardRetryStrategy:()=>x8,defaultDelayDecider:()=>D8,defaultRetryDecider:()=>k8,getOmitRetryHeadersPlugin:()=>vY,getRetryAfterHint:()=>n8,getRetryPlugin:()=>pY,omitRetryHeadersMiddleware:()=>d8,omitRetryHeadersMiddlewareOptions:()=>p8,resolveRetryConfig:()=>kY,retryMiddleware:()=>g8,retryMiddlewareOptions:()=>l8});s8.exports=PY(b8);var N0=i(),h8=b$(),q=Bf(),SY=S(($,U)=>{const w=$,f=(U==null?void 0:U.noRetryIncrement)??q.NO_RETRY_INCREMENT,G=(U==null?void 0:U.retryCost)??q.RETRY_COST,W=(U==null?void 0:U.timeoutRetryCost)??q.TIMEOUT_RETRY_COST;let L=$;const X=S((I)=>I.name==="TimeoutError"?W:G,"getCapacityAmount"),Z=S((I)=>X(I)<=L,"hasRetryTokens");return Object.freeze({hasRetryTokens:Z,retrieveRetryTokens:S((I)=>{if(!Z(I))throw new Error("No retry token available");const Y=X(I);return L-=Y,Y},"retrieveRetryTokens"),releaseRetryTokens:S((I)=>{L+=I??f,L=Math.min(L,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),D8=S(($,U)=>Math.floor(Math.min(q.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),G0=h$(),k8=S(($)=>{if(!$)return!1;return G0.isRetryableByTrait($)||G0.isClockSkewError($)||G0.isThrottlingError($)||G0.isTransientError($)},"defaultRetryDecider"),c8=S(($)=>{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"),v8=class ${constructor(U,w){this.maxAttemptsProvider=U,this.mode=q.RETRY_MODES.STANDARD,this.retryDecider=(w==null?void 0:w.retryDecider)??k8,this.delayDecider=(w==null?void 0:w.delayDecider)??D8,this.retryQuota=(w==null?void 0:w.retryQuota)??SY(q.INITIAL_RETRY_TOKENS)}shouldRetry(U,w,f){return w<f&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(w){U=q.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,w,f){let G,W=0,L=0;const X=await this.getMaxAttempts(),{request:Z}=w;if(N0.HttpRequest.isInstance(Z))Z.headers[q.INVOCATION_ID_HEADER]=h8.v4();while(!0)try{if(N0.HttpRequest.isInstance(Z))Z.headers[q.REQUEST_HEADER]=`attempt=${W+1}; max=${X}`;if(f==null?void 0:f.beforeRequest)await f.beforeRequest();const{response:F,output:E}=await U(w);if(f==null?void 0:f.afterRequest)f.afterRequest(F);return this.retryQuota.releaseRetryTokens(G),E.$metadata.attempts=W+1,E.$metadata.totalRetryDelay=L,{response:F,output:E}}catch(F){const E=c8(F);if(W++,this.shouldRetry(E,W,X)){G=this.retryQuota.retrieveRetryTokens(E);const I=this.delayDecider(G0.isThrottlingError(E)?q.THROTTLING_RETRY_DELAY_BASE:q.DEFAULT_RETRY_DELAY_BASE,W),Y=bY(E.$response),R=Math.max(Y||0,I);L+=R,await new Promise((Q)=>setTimeout(Q,R));continue}if(!E.$metadata)E.$metadata={};throw E.$metadata.attempts=W,E.$metadata.totalRetryDelay=L,E}}};S(v8,"StandardRetryStrategy");var x8=v8,bY=S(($)=>{if(!N0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],f=Number(w);if(!Number.isNaN(f))return f*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),u8=class $ extends x8{constructor(U,w){const{rateLimiter:f,...G}=w??{};super(U,G);this.rateLimiter=f??new q.DefaultRateLimiter,this.mode=q.RETRY_MODES.ADAPTIVE}async retry(U,w){return super.retry(U,w,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(f)=>{this.rateLimiter.updateClientSendingRate(f)}})}};S(u8,"AdaptiveRetryStrategy");var hY=u8,S8=k0(),EU="AWS_MAX_ATTEMPTS",IU="max_attempts",DY={environmentVariableSelector:($)=>{const U=$[EU];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Environment variable ${EU} mast be a number, got "${U}"`);return w},configFileSelector:($)=>{const U=$[IU];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Shared config file entry ${IU} mast be a number, got "${U}"`);return w},default:q.DEFAULT_MAX_ATTEMPTS},kY=S(($)=>{const{retryStrategy:U}=$,w=S8.normalizeProvider($.maxAttempts??q.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:w,retryStrategy:async()=>{if(U)return U;if(await S8.normalizeProvider($.retryMode)()===q.RETRY_MODES.ADAPTIVE)return new q.AdaptiveRetryStrategy(w);return new q.StandardRetryStrategy(w)}}},"resolveRetryConfig"),y8="AWS_RETRY_MODE",_8="retry_mode",cY={environmentVariableSelector:($)=>$[y8],configFileSelector:($)=>$[_8],default:q.DEFAULT_RETRY_MODE},d8=S(()=>($)=>async(U)=>{const{request:w}=U;if(N0.HttpRequest.isInstance(w))delete w.headers[q.INVOCATION_ID_HEADER],delete w.headers[q.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),p8={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},vY=S(($)=>({applyToStack:(U)=>{U.addRelativeTo(d8(),p8)}}),"getOmitRetryHeadersPlugin"),xY=q0(),uY=P8(),g8=S(($)=>(U,w)=>async(f)=>{var G;let W=await $.retryStrategy();const L=await $.maxAttempts();if(yY(W)){W=W;let X=await W.acquireInitialRetryToken(w.partition_id),Z=new Error,F=0,E=0;const{request:I}=f,Y=N0.HttpRequest.isInstance(I);if(Y)I.headers[q.INVOCATION_ID_HEADER]=h8.v4();while(!0)try{if(Y)I.headers[q.REQUEST_HEADER]=`attempt=${F+1}; max=${L}`;const{response:R,output:Q}=await U(f);return W.recordSuccess(X),Q.$metadata.attempts=F+1,Q.$metadata.totalRetryDelay=E,{response:R,output:Q}}catch(R){const Q=_Y(R);if(Z=c8(R),Y&&uY.isStreamingPayload(I))throw(G=w.logger instanceof xY.NoOpLogger?console:w.logger)==null||G.warn("An error was encountered in a non-retryable streaming request."),Z;try{X=await W.refreshRetryTokenForRetry(X,Q)}catch(T){if(!Z.$metadata)Z.$metadata={};throw Z.$metadata.attempts=F+1,Z.$metadata.totalRetryDelay=E,Z}F=X.getRetryCount();const O=X.getRetryDelay();E+=O,await new Promise((T)=>setTimeout(T,O))}}else{if(W=W,W==null?void 0:W.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",W.mode]];return W.retry(U,f)}},"retryMiddleware"),yY=S(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),_Y=S(($)=>{const U={error:$,errorType:dY($)},w=n8($.$response);if(w)U.retryAfterHint=w;return U},"getRetryErrorInfo"),dY=S(($)=>{if(G0.isThrottlingError($))return"THROTTLING";if(G0.isTransientError($))return"TRANSIENT";if(G0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),l8={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},pY=S(($)=>({applyToStack:(U)=>{U.add(g8($),l8)}}),"getRetryPlugin"),n8=S(($)=>{if(!N0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],f=Number(w);if(!Number.isNaN(f))return new Date(f*1000);return new Date(w)},"getRetryAfterHint")});var YU=K((XJ,R4)=>{var o8=function($){const U=new Map;for(let w of $)U.set(w.schemeId,w);return U},Z4=function($,U){return new E4($,U)},I4=function($,U,w,f,G){return C(async function*W(L,X,...Z){let F=L.startingToken||void 0,E=!0,I;while(E){if(X[w]=F,G)X[G]=X[G]??L.pageSize;if(L.client instanceof $)I=await R5(U,L.client,X,...Z);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield I;const Y=F;F=Y5(I,f),E=!!(F&&(!L.stopOnSameToken||F!==Y))}return},"paginateOperation")},x1=Object.defineProperty,gY=Object.getOwnPropertyDescriptor,lY=Object.getOwnPropertyNames,nY=Object.prototype.hasOwnProperty,C=($,U)=>x1($,"name",{value:U,configurable:!0}),sY=($,U)=>{for(var w in U)x1($,w,{get:U[w],enumerable:!0})},mY=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of lY(U))if(!nY.call($,G)&&G!==w)x1($,G,{get:()=>U[G],enumerable:!(f=gY(U,G))||f.enumerable})}return $},iY=($)=>mY(x1({},"__esModule",{value:!0}),$),i8={};sY(i8,{DefaultIdentityProviderConfig:()=>G5,EXPIRATION_MS:()=>L4,HttpApiKeyAuthSigner:()=>f5,HttpBearerAuthSigner:()=>W5,NoAuthSigner:()=>L5,RequestBuilder:()=>E4,createIsIdentityExpiredFunction:()=>W4,createPaginator:()=>I4,doesIdentityRequireRefresh:()=>X4,getHttpAuthSchemeEndpointRuleSetPlugin:()=>oY,getHttpAuthSchemePlugin:()=>aY,getHttpSigningPlugin:()=>w5,getSmithyContext:()=>F5,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>t8,httpAuthSchemeMiddleware:()=>RU,httpAuthSchemeMiddlewareOptions:()=>a8,httpSigningMiddleware:()=>e8,httpSigningMiddlewareOptions:()=>$4,isIdentityExpired:()=>X5,memoizeIdentityProvider:()=>Z5,normalizeProvider:()=>E5,requestBuilder:()=>Z4});R4.exports=iY(i8);var r8=k0();C(o8,"convertHttpAuthSchemesToMap");var RU=C(($,U)=>(w,f)=>async(G)=>{var W;const L=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,f,G.input)),X=o8($.httpAuthSchemes),Z=r8.getSmithyContext(f),F=[];for(let E of L){const I=X.get(E.schemeId);if(!I){F.push(`HttpAuthScheme \`${E.schemeId}\` was not enabled for this service.`);continue}const Y=I.identityProvider(await U.identityProviderConfigProvider($));if(!Y){F.push(`HttpAuthScheme \`${E.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:R={},signingProperties:Q={}}=((W=E.propertiesExtractor)==null?void 0:W.call(E,$,f))||{};E.identityProperties=Object.assign(E.identityProperties||{},R),E.signingProperties=Object.assign(E.signingProperties||{},Q),Z.selectedHttpAuthScheme={httpAuthOption:E,identity:await Y(E.identityProperties),signer:I.signer};break}if(!Z.selectedHttpAuthScheme)throw new Error(F.join("\n"));return w(G)},"httpAuthSchemeMiddleware"),rY=wG(),t8={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:rY.endpointMiddlewareOptions.name},oY=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w})=>({applyToStack:(f)=>{f.addRelativeTo(RU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w}),t8)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),tY=V$(),a8={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:tY.serializerMiddlewareOption.name},aY=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w})=>({applyToStack:(f)=>{f.addRelativeTo(RU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w}),a8)}}),"getHttpAuthSchemePlugin"),u1=i(),eY=C(($)=>(U)=>{throw U},"defaultErrorHandler"),$5=C(($,U)=>{},"defaultSuccessHandler"),e8=C(($)=>(U,w)=>async(f)=>{if(!u1.HttpRequest.isInstance(f.request))return U(f);const W=r8.getSmithyContext(w).selectedHttpAuthScheme;if(!W)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:L={}},identity:X,signer:Z}=W,F=await U({...f,request:await Z.sign(f.request,X,L)}).catch((Z.errorHandler||eY)(L));return(Z.successHandler||$5)(F.response,L),F},"httpSigningMiddleware"),U5=m8(),$4={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:U5.retryMiddlewareOptions.name},w5=C(($)=>({applyToStack:(U)=>{U.addRelativeTo(e8($),$4)}}),"getHttpSigningPlugin"),U4=class ${constructor(U){this.authSchemes=new Map;for(let[w,f]of Object.entries(U))if(f!==void 0)this.authSchemes.set(w,f)}getIdentityProvider(U){return this.authSchemes.get(U)}};C(U4,"DefaultIdentityProviderConfig");var G5=U4,v1=F0(),w4=class ${async sign(U,w,f){if(!f)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!f.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!f.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!w.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const G=u1.HttpRequest.clone(U);if(f.in===v1.HttpApiKeyAuthLocation.QUERY)G.query[f.name]=w.apiKey;else if(f.in===v1.HttpApiKeyAuthLocation.HEADER)G.headers[f.name]=f.scheme?`${f.scheme} ${w.apiKey}`:w.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+f.in+"`");return G}};C(w4,"HttpApiKeyAuthSigner");var f5=w4,G4=class ${async sign(U,w,f){const G=u1.HttpRequest.clone(U);if(!w.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return G.headers.Authorization=`Bearer ${w.token}`,G}};C(G4,"HttpBearerAuthSigner");var W5=G4,f4=class ${async sign(U,w,f){return U}};C(f4,"NoAuthSigner");var L5=f4,W4=C(($)=>(U)=>X4(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),L4=300000,X5=W4(L4),X4=C(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),Z5=C(($,U,w)=>{if($===void 0)return;const f=typeof $!=="function"?async()=>Promise.resolve($):$;let G,W,L,X=!1;const Z=C(async(F)=>{if(!W)W=f(F);try{G=await W,L=!0,X=!1}finally{W=void 0}return G},"coalesceProvider");if(U===void 0)return async(F)=>{if(!L||(F==null?void 0:F.forceRefresh))G=await Z(F);return G};return async(F)=>{if(!L||(F==null?void 0:F.forceRefresh))G=await Z(F);if(X)return G;if(!w(G))return X=!0,G;if(U(G))return await Z(F),G;return G}},"memoizeIdentityProvider"),F5=C(($)=>$[v1.SMITHY_CONTEXT_KEY]||($[v1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),E5=C(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),I5=q0();C(Z4,"requestBuilder");var F4=class ${constructor(U,w){this.input=U,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:w="https",port:f,path:G}=await this.context.endpoint();this.path=G;for(let W of this.resolvePathStack)W(this.path);return new u1.HttpRequest({protocol:w,hostname:this.hostname||U,port:f,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((w)=>{this.path=`${(w==null?void 0:w.endsWith("/"))?w.slice(0,-1):w||""}`+U}),this}p(U,w,f,G){return this.resolvePathStack.push((W)=>{this.path=I5.resolvedPath(W,this.input,U,w,f,G)}),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(F4,"RequestBuilder");var E4=F4,R5=C(async($,U,w,...f)=>{return await U.send(new $(w),...f)},"makePagedClientRequest");C(I4,"createPaginator");var Y5=C(($,U)=>{let w=$;const f=U.split(".");for(let G of f){if(!w||typeof w!=="object")return;w=w[G]}return w},"get")});var D6=K((cA,w$)=>{var L6,X6,Z6,F6,E6,I6,R6,Y6,Q6,z6,J6,T6,K6,$$,cU,M6,O6,A6,h0,B6,V6,H6,C6,q6,N6,j6,P6,S6,U$,b6,h6;(function($){var U=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(f){$(w(U,w(f)))});else if(typeof w$==="object"&&typeof cA==="object")$(w(U,w(cA)));else $(w(U));function w(f,G){if(f!==U)if(typeof Object.create==="function")Object.defineProperty(f,"__esModule",{value:!0});else f.__esModule=!0;return function(W,L){return f[W]=G?G(W,L):L}}})(function($){var U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,W){G.__proto__=W}||function(G,W){for(var L in W)if(Object.prototype.hasOwnProperty.call(W,L))G[L]=W[L]};L6=function(G,W){if(typeof W!=="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");U(G,W);function L(){this.constructor=G}G.prototype=W===null?Object.create(W):(L.prototype=W.prototype,new L)},X6=Object.assign||function(G){for(var W,L=1,X=arguments.length;L<X;L++){W=arguments[L];for(var Z in W)if(Object.prototype.hasOwnProperty.call(W,Z))G[Z]=W[Z]}return G},Z6=function(G,W){var L={};for(var X in G)if(Object.prototype.hasOwnProperty.call(G,X)&&W.indexOf(X)<0)L[X]=G[X];if(G!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Z=0,X=Object.getOwnPropertySymbols(G);Z<X.length;Z++)if(W.indexOf(X[Z])<0&&Object.prototype.propertyIsEnumerable.call(G,X[Z]))L[X[Z]]=G[X[Z]]}return L},F6=function(G,W,L,X){var Z=arguments.length,F=Z<3?W:X===null?X=Object.getOwnPropertyDescriptor(W,L):X,E;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")F=Reflect.decorate(G,W,L,X);else for(var I=G.length-1;I>=0;I--)if(E=G[I])F=(Z<3?E(F):Z>3?E(W,L,F):E(W,L))||F;return Z>3&&F&&Object.defineProperty(W,L,F),F},E6=function(G,W){return function(L,X){W(L,X,G)}},I6=function(G,W,L,X,Z,F){function E(V){if(V!==void 0&&typeof V!=="function")throw new TypeError("Function expected");return V}var I=X.kind,Y=I==="getter"?"get":I==="setter"?"set":"value",R=!W&&G?X.static?G:G.prototype:null,Q=W||(R?Object.getOwnPropertyDescriptor(R,X.name):{}),O,T=!1;for(var z=L.length-1;z>=0;z--){var M={};for(var A in X)M[A]=A==="access"?{}:X[A];for(var A in X.access)M.access[A]=X.access[A];M.addInitializer=function(V){if(T)throw new TypeError("Cannot add initializers after decoration has completed");F.push(E(V||null))};var B=L[z](I==="accessor"?{get:Q.get,set:Q.set}:Q[Y],M);if(I==="accessor"){if(B===void 0)continue;if(B===null||typeof B!=="object")throw new TypeError("Object expected");if(O=E(B.get))Q.get=O;if(O=E(B.set))Q.set=O;if(O=E(B.init))Z.unshift(O)}else if(O=E(B))if(I==="field")Z.unshift(O);else Q[Y]=O}if(R)Object.defineProperty(R,X.name,Q);T=!0},R6=function(G,W,L){var X=arguments.length>2;for(var Z=0;Z<W.length;Z++)L=X?W[Z].call(G,L):W[Z].call(G);return X?L:void 0},Y6=function(G){return typeof G==="symbol"?G:"".concat(G)},Q6=function(G,W,L){if(typeof W==="symbol")W=W.description?"[".concat(W.description,"]"):"";return Object.defineProperty(G,"name",{configurable:!0,value:L?"".concat(L," ",W):W})},z6=function(G,W){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(G,W)},J6=function(G,W,L,X){function Z(F){return F instanceof L?F:new L(function(E){E(F)})}return new(L||(L=Promise))(function(F,E){function I(Q){try{R(X.next(Q))}catch(O){E(O)}}function Y(Q){try{R(X.throw(Q))}catch(O){E(O)}}function R(Q){Q.done?F(Q.value):Z(Q.value).then(I,Y)}R((X=X.apply(G,W||[])).next())})},T6=function(G,W){var L={label:0,sent:function(){if(F[0]&1)throw F[1];return F[1]},trys:[],ops:[]},X,Z,F,E;return E={next:I(0),throw:I(1),return:I(2)},typeof Symbol==="function"&&(E[Symbol.iterator]=function(){return this}),E;function I(R){return function(Q){return Y([R,Q])}}function Y(R){if(X)throw new TypeError("Generator is already executing.");while(E&&(E=0,R[0]&&(L=0)),L)try{if(X=1,Z&&(F=R[0]&2?Z.return:R[0]?Z.throw||((F=Z.return)&&F.call(Z),0):Z.next)&&!(F=F.call(Z,R[1])).done)return F;if(Z=0,F)R=[R[0]&2,F.value];switch(R[0]){case 0:case 1:F=R;break;case 4:return L.label++,{value:R[1],done:!1};case 5:L.label++,Z=R[1],R=[0];continue;case 7:R=L.ops.pop(),L.trys.pop();continue;default:if((F=L.trys,!(F=F.length>0&&F[F.length-1]))&&(R[0]===6||R[0]===2)){L=0;continue}if(R[0]===3&&(!F||R[1]>F[0]&&R[1]<F[3])){L.label=R[1];break}if(R[0]===6&&L.label<F[1]){L.label=F[1],F=R;break}if(F&&L.label<F[2]){L.label=F[2],L.ops.push(R);break}if(F[2])L.ops.pop();L.trys.pop();continue}R=W.call(G,L)}catch(Q){R=[6,Q],Z=0}finally{X=F=0}if(R[0]&5)throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}},K6=function(G,W){for(var L in G)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(W,L))U$(W,G,L)},U$=Object.create?function(G,W,L,X){if(X===void 0)X=L;var Z=Object.getOwnPropertyDescriptor(W,L);if(!Z||("get"in Z?!W.__esModule:Z.writable||Z.configurable))Z={enumerable:!0,get:function(){return W[L]}};Object.defineProperty(G,X,Z)}:function(G,W,L,X){if(X===void 0)X=L;G[X]=W[L]},$$=function(G){var W=typeof Symbol==="function"&&Symbol.iterator,L=W&&G[W],X=0;if(L)return L.call(G);if(G&&typeof G.length==="number")return{next:function(){if(G&&X>=G.length)G=void 0;return{value:G&&G[X++],done:!G}}};throw new TypeError(W?"Object is not iterable.":"Symbol.iterator is not defined.")},cU=function(G,W){var L=typeof Symbol==="function"&&G[Symbol.iterator];if(!L)return G;var X=L.call(G),Z,F=[],E;try{while((W===void 0||W-- >0)&&!(Z=X.next()).done)F.push(Z.value)}catch(I){E={error:I}}finally{try{if(Z&&!Z.done&&(L=X.return))L.call(X)}finally{if(E)throw E.error}}return F},M6=function(){for(var G=[],W=0;W<arguments.length;W++)G=G.concat(cU(arguments[W]));return G},O6=function(){for(var G=0,W=0,L=arguments.length;W<L;W++)G+=arguments[W].length;for(var X=Array(G),Z=0,W=0;W<L;W++)for(var F=arguments[W],E=0,I=F.length;E<I;E++,Z++)X[Z]=F[E];return X},A6=function(G,W,L){if(L||arguments.length===2){for(var X=0,Z=W.length,F;X<Z;X++)if(F||!(X in W)){if(!F)F=Array.prototype.slice.call(W,0,X);F[X]=W[X]}}return G.concat(F||Array.prototype.slice.call(W))},h0=function(G){return this instanceof h0?(this.v=G,this):new h0(G)},B6=function(G,W,L){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var X=L.apply(G,W||[]),Z,F=[];return Z={},I("next"),I("throw"),I("return",E),Z[Symbol.asyncIterator]=function(){return this},Z;function E(z){return function(M){return Promise.resolve(M).then(z,O)}}function I(z,M){if(X[z]){if(Z[z]=function(A){return new Promise(function(B,V){F.push([z,A,B,V])>1||Y(z,A)})},M)Z[z]=M(Z[z])}}function Y(z,M){try{R(X[z](M))}catch(A){T(F[0][3],A)}}function R(z){z.value instanceof h0?Promise.resolve(z.value.v).then(Q,O):T(F[0][2],z)}function Q(z){Y("next",z)}function O(z){Y("throw",z)}function T(z,M){if(z(M),F.shift(),F.length)Y(F[0][0],F[0][1])}},V6=function(G){var W,L;return W={},X("next"),X("throw",function(Z){throw Z}),X("return"),W[Symbol.iterator]=function(){return this},W;function X(Z,F){W[Z]=G[Z]?function(E){return(L=!L)?{value:h0(G[Z](E)),done:!1}:F?F(E):E}:F}},H6=function(G){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var W=G[Symbol.asyncIterator],L;return W?W.call(G):(G=typeof $$==="function"?$$(G):G[Symbol.iterator](),L={},X("next"),X("throw"),X("return"),L[Symbol.asyncIterator]=function(){return this},L);function X(F){L[F]=G[F]&&function(E){return new Promise(function(I,Y){E=G[F](E),Z(I,Y,E.done,E.value)})}}function Z(F,E,I,Y){Promise.resolve(Y).then(function(R){F({value:R,done:I})},E)}},C6=function(G,W){if(Object.defineProperty)Object.defineProperty(G,"raw",{value:W});else G.raw=W;return G};var w=Object.create?function(G,W){Object.defineProperty(G,"default",{enumerable:!0,value:W})}:function(G,W){G.default=W};q6=function(G){if(G&&G.__esModule)return G;var W={};if(G!=null){for(var L in G)if(L!=="default"&&Object.prototype.hasOwnProperty.call(G,L))U$(W,G,L)}return w(W,G),W},N6=function(G){return G&&G.__esModule?G:{default:G}},j6=function(G,W,L,X){if(L==="a"&&!X)throw new TypeError("Private accessor was defined without a getter");if(typeof W==="function"?G!==W||!X:!W.has(G))throw new TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?X:L==="a"?X.call(G):X?X.value:W.get(G)},P6=function(G,W,L,X,Z){if(X==="m")throw new TypeError("Private method is not writable");if(X==="a"&&!Z)throw new TypeError("Private accessor was defined without a setter");if(typeof W==="function"?G!==W||!Z:!W.has(G))throw new TypeError("Cannot write private member to an object whose class did not declare it");return X==="a"?Z.call(G,L):Z?Z.value=L:W.set(G,L),L},S6=function(G,W){if(W===null||typeof W!=="object"&&typeof W!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof G==="function"?W===G:G.has(W)},b6=function(G,W,L){if(W!==null&&W!==void 0){if(typeof W!=="object"&&typeof W!=="function")throw new TypeError("Object expected.");var X,Z;if(L){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");X=W[Symbol.asyncDispose]}if(X===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(X=W[Symbol.dispose],L)Z=X}if(typeof X!=="function")throw new TypeError("Object not disposable.");if(Z)X=function(){try{Z.call(this)}catch(F){return Promise.reject(F)}};G.stack.push({value:W,dispose:X,async:L})}else if(L)G.stack.push({async:!0});return W};var f=typeof SuppressedError==="function"?SuppressedError:function(G,W,L){var X=new Error(L);return X.name="SuppressedError",X.error=G,X.suppressed=W,X};h6=function(G){function W(X){G.error=G.hasError?new f(X,G.error,"An error was suppressed during disposal."):X,G.hasError=!0}function L(){while(G.stack.length){var X=G.stack.pop();try{var Z=X.dispose&&X.dispose.call(X.value);if(X.async)return Promise.resolve(Z).then(L,function(F){return W(F),L()})}catch(F){W(F)}}if(G.hasError)throw G.error}return L()},$("__extends",L6),$("__assign",X6),$("__rest",Z6),$("__decorate",F6),$("__param",E6),$("__esDecorate",I6),$("__runInitializers",R6),$("__propKey",Y6),$("__setFunctionName",Q6),$("__metadata",z6),$("__awaiter",J6),$("__generator",T6),$("__exportStar",K6),$("__createBinding",U$),$("__values",$$),$("__read",cU),$("__spread",M6),$("__spreadArrays",O6),$("__spreadArray",A6),$("__await",h0),$("__asyncGenerator",B6),$("__asyncDelegator",V6),$("__asyncValues",H6),$("__makeTemplateObject",C6),$("__importStar",q6),$("__importDefault",N6),$("__classPrivateFieldGet",j6),$("__classPrivateFieldSet",P6),$("__classPrivateFieldIn",S6),$("__addDisposableResource",b6),$("__disposeResources",h6)})});var x6=K((vA,v6)=>{var{defineProperty:G$,getOwnPropertyDescriptor:m5,getOwnPropertyNames:i5}=Object,r5=Object.prototype.hasOwnProperty,o5=($,U)=>G$($,"name",{value:U,configurable:!0}),t5=($,U)=>{for(var w in U)G$($,w,{get:U[w],enumerable:!0})},a5=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of i5(U))if(!r5.call($,G)&&G!==w)G$($,G,{get:()=>U[G],enumerable:!(f=m5(U,G))||f.enumerable})}return $},e5=($)=>a5(G$({},"__esModule",{value:!0}),$),c6={};t5(c6,{emitWarningIfUnsupportedVersion:()=>$9});v6.exports=e5(c6);var k6=!1,$9=o5(($)=>{if($&&!k6&&parseInt($.substring(1,$.indexOf(".")))<18)k6=!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 GL=K((xA,wL)=>{var _U=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},Z$=Object.defineProperty,U9=Object.getOwnPropertyDescriptor,w9=Object.getOwnPropertyNames,G9=Object.prototype.hasOwnProperty,b=($,U)=>Z$($,"name",{value:U,configurable:!0}),f9=($,U)=>{for(var w in U)Z$($,w,{get:U[w],enumerable:!0})},W9=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of w9(U))if(!G9.call($,G)&&G!==w)Z$($,G,{get:()=>U[G],enumerable:!(f=U9(U,G))||f.enumerable})}return $},L9=($)=>W9(Z$({},"__esModule",{value:!0}),$),p6={};f9(p6,{SignatureV4:()=>h9,clearCredentialCache:()=>V9,createScope:()=>L$,getCanonicalHeaders:()=>yU,getCanonicalQuery:()=>o6,getPayloadHash:()=>X$,getSigningKey:()=>r6,moveHeadersToQuery:()=>$L,prepareRequest:()=>dU});wL.exports=L9(p6);var u6=k0(),vU=w0(),X9="X-Amz-Algorithm",Z9="X-Amz-Credential",g6="X-Amz-Date",F9="X-Amz-SignedHeaders",E9="X-Amz-Expires",l6="X-Amz-Signature",n6="X-Amz-Security-Token",s6="authorization",m6=g6.toLowerCase(),I9="date",R9=[s6,m6,I9],Y9=l6.toLowerCase(),uU="x-amz-content-sha256",Q9=n6.toLowerCase(),z9={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},J9=/^proxy-/,T9=/^sec-/,xU="AWS4-HMAC-SHA256",K9="AWS4-HMAC-SHA256-PAYLOAD",M9="UNSIGNED-PAYLOAD",O9=50,i6="aws4_request",A9=604800,L0=SW(),B9=w0(),D0={},W$=[],L$=b(($,U,w)=>`${$}/${U}/${w}/${i6}`,"createScope"),r6=b(async($,U,w,f,G)=>{const W=await y6($,U.secretAccessKey,U.accessKeyId),L=`${w}:${f}:${G}:${L0.toHex(W)}:${U.sessionToken}`;if(L in D0)return D0[L];W$.push(L);while(W$.length>O9)delete D0[W$.shift()];let X=`AWS4${U.secretAccessKey}`;for(let Z of[w,f,G,i6])X=await y6($,X,Z);return D0[L]=X},"getSigningKey"),V9=b(()=>{W$.length=0,Object.keys(D0).forEach(($)=>{delete D0[$]})},"clearCredentialCache"),y6=b(($,U,w)=>{const f=new $(U);return f.update(B9.toUint8Array(w)),f.digest()},"hmac"),yU=b(({headers:$},U,w)=>{const f={};for(let G of Object.keys($).sort()){if($[G]==null)continue;const W=G.toLowerCase();if(W in z9||(U==null?void 0:U.has(W))||J9.test(W)||T9.test(W)){if(!w||w&&!w.has(W))continue}f[W]=$[G].trim().replace(/\s+/g," ")}return f},"getCanonicalHeaders"),$1=rf(),o6=b(({query:$={}})=>{const U=[],w={};for(let f of Object.keys($).sort()){if(f.toLowerCase()===Y9)continue;U.push(f);const G=$[f];if(typeof G==="string")w[f]=`${$1.escapeUri(f)}=${$1.escapeUri(G)}`;else if(Array.isArray(G))w[f]=G.slice(0).reduce((W,L)=>W.concat([`${$1.escapeUri(f)}=${$1.escapeUri(L)}`]),[]).sort().join("&")}return U.map((f)=>w[f]).filter((f)=>f).join("&")},"getCanonicalQuery"),H9=u$(),C9=w0(),X$=b(async({headers:$,body:U},w)=>{for(let f of Object.keys($))if(f.toLowerCase()===uU)return $[f];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||H9.isArrayBuffer(U)){const f=new w;return f.update(C9.toUint8Array(U)),L0.toHex(await f.digest())}return M9},"getPayloadHash"),_6=w0(),t6=class ${format(U){const w=[];for(let W of Object.keys(U)){const L=_6.fromUtf8(W);w.push(Uint8Array.from([L.byteLength]),L,this.formatHeaderValue(U[W]))}const f=new Uint8Array(w.reduce((W,L)=>W+L.byteLength,0));let G=0;for(let W of w)f.set(W,G),G+=W.byteLength;return f}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const w=new DataView(new ArrayBuffer(3));return w.setUint8(0,3),w.setInt16(1,U.value,!1),new Uint8Array(w.buffer);case"integer":const f=new DataView(new ArrayBuffer(5));return f.setUint8(0,4),f.setInt32(1,U.value,!1),new Uint8Array(f.buffer);case"long":const G=new Uint8Array(9);return G[0]=5,G.set(U.value.bytes,1),G;case"binary":const W=new DataView(new ArrayBuffer(3+U.value.byteLength));W.setUint8(0,6),W.setUint16(1,U.value.byteLength,!1);const L=new Uint8Array(W.buffer);return L.set(U.value,3),L;case"string":const X=_6.fromUtf8(U.value),Z=new DataView(new ArrayBuffer(3+X.byteLength));Z.setUint8(0,7),Z.setUint16(1,X.byteLength,!1);const F=new Uint8Array(Z.buffer);return F.set(X,3),F;case"timestamp":const E=new Uint8Array(9);return E[0]=8,E.set(j9.fromNumber(U.value.valueOf()).bytes,1),E;case"uuid":if(!N9.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const I=new Uint8Array(17);return I[0]=9,I.set(L0.fromHex(U.value.replace(/\-/g,"")),1),I}}};b(t6,"HeaderFormatter");var q9=t6,N9=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,a6=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const w=new Uint8Array(8);for(let f=7,G=Math.abs(Math.round(U));f>-1&&G>0;f--,G/=256)w[f]=G;if(U<0)_U(w);return new $(w)}valueOf(){const U=this.bytes.slice(0),w=U[0]&128;if(w)_U(U);return parseInt(L0.toHex(U),16)*(w?-1:1)}toString(){return String(this.valueOf())}};b(a6,"Int64");var j9=a6;b(_U,"negate");var P9=b(($,U)=>{$=$.toLowerCase();for(let w of Object.keys(U))if($===w.toLowerCase())return!0;return!1},"hasHeader"),e6=i(),$L=b(($,U={})=>{var w;const{headers:f,query:G={}}=e6.HttpRequest.clone($);for(let W of Object.keys(f)){const L=W.toLowerCase();if(L.slice(0,6)==="x-amz-"&&!((w=U.unhoistableHeaders)==null?void 0:w.has(L)))G[W]=f[W],delete f[W]}return{...$,headers:f,query:G}},"moveHeadersToQuery"),dU=b(($)=>{$=e6.HttpRequest.clone($);for(let U of Object.keys($.headers))if(R9.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),S9=b(($)=>b9($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),b9=b(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),UL=class ${constructor({applyChecksum:U,credentials:w,region:f,service:G,sha256:W,uriEscapePath:L=!0}){this.headerFormatter=new q9,this.service=G,this.sha256=W,this.uriEscapePath=L,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=u6.normalizeProvider(f),this.credentialProvider=u6.normalizeProvider(w)}async presign(U,w={}){const{signingDate:f=new Date,expiresIn:G=3600,unsignableHeaders:W,unhoistableHeaders:L,signableHeaders:X,signingRegion:Z,signingService:F}=w,E=await this.credentialProvider();this.validateResolvedCredentials(E);const I=Z??await this.regionProvider(),{longDate:Y,shortDate:R}=f$(f);if(G>A9)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const Q=L$(R,I,F??this.service),O=$L(dU(U),{unhoistableHeaders:L});if(E.sessionToken)O.query[n6]=E.sessionToken;O.query[X9]=xU,O.query[Z9]=`${E.accessKeyId}/${Q}`,O.query[g6]=Y,O.query[E9]=G.toString(10);const T=yU(O,W,X);return O.query[F9]=d6(T),O.query[l6]=await this.getSignature(Y,Q,this.getSigningKey(E,I,R,F),this.createCanonicalRequest(O,T,await X$(U,this.sha256))),O}async sign(U,w){if(typeof U==="string")return this.signString(U,w);else if(U.headers&&U.payload)return this.signEvent(U,w);else if(U.message)return this.signMessage(U,w);else return this.signRequest(U,w)}async signEvent({headers:U,payload:w},{signingDate:f=new Date,priorSignature:G,signingRegion:W,signingService:L}){const X=W??await this.regionProvider(),{shortDate:Z,longDate:F}=f$(f),E=L$(Z,X,L??this.service),I=await X$({headers:{},body:w},this.sha256),Y=new this.sha256;Y.update(U);const R=L0.toHex(await Y.digest()),Q=[K9,F,E,G,R,I].join("\n");return this.signString(Q,{signingDate:f,signingRegion:X,signingService:L})}async signMessage(U,{signingDate:w=new Date,signingRegion:f,signingService:G}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:w,signingRegion:f,signingService:G,priorSignature:U.priorSignature}).then((L)=>{return{message:U.message,signature:L}})}async signString(U,{signingDate:w=new Date,signingRegion:f,signingService:G}={}){const W=await this.credentialProvider();this.validateResolvedCredentials(W);const L=f??await this.regionProvider(),{shortDate:X}=f$(w),Z=new this.sha256(await this.getSigningKey(W,L,X,G));return Z.update(vU.toUint8Array(U)),L0.toHex(await Z.digest())}async signRequest(U,{signingDate:w=new Date,signableHeaders:f,unsignableHeaders:G,signingRegion:W,signingService:L}={}){const X=await this.credentialProvider();this.validateResolvedCredentials(X);const Z=W??await this.regionProvider(),F=dU(U),{longDate:E,shortDate:I}=f$(w),Y=L$(I,Z,L??this.service);if(F.headers[m6]=E,X.sessionToken)F.headers[Q9]=X.sessionToken;const R=await X$(F,this.sha256);if(!P9(uU,F.headers)&&this.applyChecksum)F.headers[uU]=R;const Q=yU(F,G,f),O=await this.getSignature(E,Y,this.getSigningKey(X,Z,I,L),this.createCanonicalRequest(F,Q,R));return F.headers[s6]=`${xU} Credential=${X.accessKeyId}/${Y}, SignedHeaders=${d6(Q)}, Signature=${O}`,F}createCanonicalRequest(U,w,f){const G=Object.keys(w).sort();return`${U.method}
10
+ ${this.getCanonicalPath(U)}
11
+ ${o6(U)}
12
+ ${G.map((W)=>`${W}:${w[W]}`).join("\n")}
13
+
14
+ ${G.join(";")}
15
+ ${f}`}async createStringToSign(U,w,f){const G=new this.sha256;G.update(vU.toUint8Array(f));const W=await G.digest();return`${xU}
16
+ ${U}
17
+ ${w}
18
+ ${L0.toHex(W)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const w=[];for(let W of U.split("/")){if((W==null?void 0:W.length)===0)continue;if(W===".")continue;if(W==="..")w.pop();else w.push(W)}const f=`${(U==null?void 0:U.startsWith("/"))?"/":""}${w.join("/")}${w.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return $1.escapeUri(f).replace(/%2F/g,"/")}return U}async getSignature(U,w,f,G){const W=await this.createStringToSign(U,w,G),L=new this.sha256(await f);return L.update(vU.toUint8Array(W)),L0.toHex(await L.digest())}getSigningKey(U,w,f,G){return r6(this.sha256,U,f,w,G||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")}};b(UL,"SignatureV4");var h9=UL,f$=b(($)=>{const U=S9($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),d6=b(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var YL=K((uA,RL)=>{var{defineProperty:F$,getOwnPropertyDescriptor:D9,getOwnPropertyNames:k9}=Object,c9=Object.prototype.hasOwnProperty,k=($,U)=>F$($,"name",{value:U,configurable:!0}),v9=($,U)=>{for(var w in U)F$($,w,{get:U[w],enumerable:!0})},x9=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of k9(U))if(!c9.call($,G)&&G!==w)F$($,G,{get:()=>U[G],enumerable:!(f=D9(U,G))||f.enumerable})}return $},u9=($)=>x9(F$({},"__esModule",{value:!0}),$),ZL={};v9(ZL,{AWSSDKSigV4Signer:()=>p9,AwsSdkSigV4ASigner:()=>l9,AwsSdkSigV4Signer:()=>lU,NODE_SIGV4A_CONFIG_OPTIONS:()=>m9,resolveAWSSDKSigV4Config:()=>i9,resolveAwsSdkSigV4AConfig:()=>s9,resolveAwsSdkSigV4Config:()=>IL,validateSigningProperties:()=>gU});RL.exports=u9(ZL);var y9=i(),_9=i(),fL=k(($)=>{var U,w;return _9.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((w=$.headers)==null?void 0:w.Date):void 0},"getDateHeader"),pU=k(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),d9=k(($,U)=>Math.abs(pU(U).getTime()-$)>=300000,"isClockSkewed"),WL=k(($,U)=>{const w=Date.parse($);if(d9(w,U))return w-Date.now();return U},"getUpdatedSystemClockOffset"),U1=k(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),gU=k(async($)=>{var U,w,f;const G=U1("context",$.context),W=U1("config",$.config),L=(f=(w=(U=G.endpointV2)==null?void 0:U.properties)==null?void 0:w.authSchemes)==null?void 0:f[0],Z=await U1("signer",W.signer)(L),F=$==null?void 0:$.signingRegion,E=$==null?void 0:$.signingRegionSet,I=$==null?void 0:$.signingName;return{config:W,signer:Z,signingRegion:F,signingRegionSet:E,signingName:I}},"validateSigningProperties"),FL=class ${async sign(U,w,f){var G;if(!y9.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const W=await gU(f),{config:L,signer:X}=W;let{signingRegion:Z,signingName:F}=W;const E=f.context;if(((G=E==null?void 0:E.authSchemes)==null?void 0:G.length)??0>1){const[Y,R]=E.authSchemes;if((Y==null?void 0:Y.name)==="sigv4a"&&(R==null?void 0:R.name)==="sigv4")Z=(R==null?void 0:R.signingRegion)??Z,F=(R==null?void 0:R.signingName)??F}return await X.sign(U,{signingDate:pU(L.systemClockOffset),signingRegion:Z,signingService:F})}errorHandler(U){return(w)=>{const f=w.ServerTime??fL(w.$response);if(f){const G=U1("config",U.config),W=G.systemClockOffset;if(G.systemClockOffset=WL(f,G.systemClockOffset),G.systemClockOffset!==W&&w.$metadata)w.$metadata.clockSkewCorrected=!0}throw w}}successHandler(U,w){const f=fL(U);if(f){const G=U1("config",w.config);G.systemClockOffset=WL(f,G.systemClockOffset)}}};k(FL,"AwsSdkSigV4Signer");var lU=FL,p9=lU,g9=i(),EL=class $ extends lU{async sign(U,w,f){var G;if(!g9.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:W,signer:L,signingRegion:X,signingRegionSet:Z,signingName:F}=await gU(f),I=(await((G=W.sigv4aSigningRegionSet)==null?void 0:G.call(W))??Z??[X]).join(",");return await L.sign(U,{signingDate:pU(W.systemClockOffset),signingRegion:I,signingService:F})}};k(EL,"AwsSdkSigV4ASigner");var l9=EL,n9=YU(),LL=R$(),s9=k(($)=>{return $.sigv4aSigningRegionSet=n9.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),m9={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new LL.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 LL.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},K0=YU(),XL=GL(),IL=k(($)=>{let U;if($.credentials)U=K0.memoizeIdentityProvider($.credentials,K0.isIdentityExpired,K0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=K0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=k(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:w=!0,systemClockOffset:f=$.systemClockOffset||0,sha256:G}=$;let W;if($.signer)W=K0.normalizeProvider($.signer);else if($.regionInfoProvider)W=k(()=>K0.normalizeProvider($.region)().then(async(L)=>[await $.regionInfoProvider(L,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},L]).then(([L,X])=>{const{signingRegion:Z,signingService:F}=L;$.signingRegion=$.signingRegion||Z||X,$.signingName=$.signingName||F||$.serviceId;const E={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:w};return new($.signerConstructor||XL.SignatureV4)(E)}),"signer");else W=k(async(L)=>{L=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await K0.normalizeProvider($.region)(),properties:{}},L);const{signingRegion:X,signingName:Z}=L;$.signingRegion=$.signingRegion||X,$.signingName=$.signingName||Z||$.serviceId;const F={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:w};return new($.signerConstructor||XL.SignatureV4)(F)},"signer");return{...$,systemClockOffset:f,signingEscapePath:w,credentials:U,signer:W}},"resolveAwsSdkSigV4Config"),i9=IL});var E$=K((e9)=>{var r9=":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",QL="[: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]["+r9+"]*",o9=new RegExp("^"+QL+"$"),t9=function($,U){const w=[];let f=U.exec($);while(f){const G=[];G.startIndex=U.lastIndex-f[0].length;const W=f.length;for(let L=0;L<W;L++)G.push(f[L]);w.push(G),f=U.exec($)}return w},a9=function($){const U=o9.exec($);return!(U===null||typeof U==="undefined")};e9.isExist=function($){return typeof $!=="undefined"};e9.isEmptyObject=function($){return Object.keys($).length===0};e9.merge=function($,U,w){if(U){const f=Object.keys(U),G=f.length;for(let W=0;W<G;W++)if(w==="strict")$[f[W]]=[U[f[W]]];else $[f[W]]=U[f[W]]}};e9.getValue=function($){if(e9.isExist($))return $;else return""};e9.isName=a9;e9.getAllMatches=t9;e9.nameRegexp=QL});var sU=K((zQ)=>{var JL=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},TL=function($,U){const w=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const f=$.substr(w,U-w);if(U>5&&f==="xml")return P("InvalidXml","XML declaration allowed only at the start of the document.",D($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},KL=function($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let w=1;for(U+=8;U<$.length;U++)if($[U]==="<")w++;else if($[U]===">"){if(w--,w===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U},FQ=function($,U){let w="",f="",G=!1;for(;U<$.length;U++){if($[U]===XQ||$[U]===ZQ)if(f==="")f=$[U];else if(f!==$[U]);else f="";else if($[U]===">"){if(f===""){G=!0;break}}w+=$[U]}if(f!=="")return!1;return{value:w,index:U,tagClosed:G}},ML=function($,U){const w=nU.getAllMatches($,EQ),f={};for(let G=0;G<w.length;G++){if(w[G][1].length===0)return P("InvalidAttr","Attribute '"+w[G][2]+"' has no space in starting.",w1(w[G]));else if(w[G][3]!==void 0&&w[G][4]===void 0)return P("InvalidAttr","Attribute '"+w[G][2]+"' is without value.",w1(w[G]));else if(w[G][3]===void 0&&!U.allowBooleanAttributes)return P("InvalidAttr","boolean attribute '"+w[G][2]+"' is not allowed.",w1(w[G]));const W=w[G][2];if(!YQ(W))return P("InvalidAttr","Attribute '"+W+"' is an invalid name.",w1(w[G]));if(!f.hasOwnProperty(W))f[W]=1;else return P("InvalidAttr","Attribute '"+W+"' is repeated.",w1(w[G]))}return!0},IQ=function($,U){let w=/\d/;if($[U]==="x")U++,w=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(w))break}return-1},RQ=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,IQ($,U);let w=0;for(;U<$.length;U++,w++){if($[U].match(/\w/)&&w<20)continue;if($[U]===";")break;return-1}return U},P=function($,U,w){return{err:{code:$,msg:U,line:w.line||w,col:w.col}}},YQ=function($){return nU.isName($)},QQ=function($){return nU.isName($)},D=function($,U){const w=$.substring(0,U).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}},w1=function($){return $.startIndex+$[1].length},nU=E$(),LQ={allowBooleanAttributes:!1,unpairedTags:[]};zQ.validate=function($,U){U=Object.assign({},LQ,U);const w=[];let f=!1,G=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let W=0;W<$.length;W++)if($[W]==="<"&&$[W+1]==="?"){if(W+=2,W=TL($,W),W.err)return W}else if($[W]==="<"){let L=W;if(W++,$[W]==="!"){W=KL($,W);continue}else{let X=!1;if($[W]==="/")X=!0,W++;let Z="";for(;W<$.length&&$[W]!==">"&&$[W]!==" "&&$[W]!=="\t"&&$[W]!=="\n"&&$[W]!=="\r";W++)Z+=$[W];if(Z=Z.trim(),Z[Z.length-1]==="/")Z=Z.substring(0,Z.length-1),W--;if(!QQ(Z)){let I;if(Z.trim().length===0)I="Invalid space after '<'.";else I="Tag '"+Z+"' is an invalid name.";return P("InvalidTag",I,D($,W))}const F=FQ($,W);if(F===!1)return P("InvalidAttr","Attributes for '"+Z+"' have open quote.",D($,W));let E=F.value;if(W=F.index,E[E.length-1]==="/"){const I=W-E.length;E=E.substring(0,E.length-1);const Y=ML(E,U);if(Y===!0)f=!0;else return P(Y.err.code,Y.err.msg,D($,I+Y.err.line))}else if(X)if(!F.tagClosed)return P("InvalidTag","Closing tag '"+Z+"' doesn't have proper closing.",D($,W));else if(E.trim().length>0)return P("InvalidTag","Closing tag '"+Z+"' can't have attributes or invalid starting.",D($,L));else if(w.length===0)return P("InvalidTag","Closing tag '"+Z+"' has not been opened.",D($,L));else{const I=w.pop();if(Z!==I.tagName){let Y=D($,I.tagStartPos);return P("InvalidTag","Expected closing tag '"+I.tagName+"' (opened in line "+Y.line+", col "+Y.col+") instead of closing tag '"+Z+"'.",D($,L))}if(w.length==0)G=!0}else{const I=ML(E,U);if(I!==!0)return P(I.err.code,I.err.msg,D($,W-E.length+I.err.line));if(G===!0)return P("InvalidXml","Multiple possible root nodes found.",D($,W));else if(U.unpairedTags.indexOf(Z)!==-1);else w.push({tagName:Z,tagStartPos:L});f=!0}for(W++;W<$.length;W++)if($[W]==="<")if($[W+1]==="!"){W++,W=KL($,W);continue}else if($[W+1]==="?"){if(W=TL($,++W),W.err)return W}else break;else if($[W]==="&"){const I=RQ($,W);if(I==-1)return P("InvalidChar","char '&' is not expected.",D($,W));W=I}else if(G===!0&&!JL($[W]))return P("InvalidXml","Extra text at the end",D($,W));if($[W]==="<")W--}}else{if(JL($[W]))continue;return P("InvalidChar","char '"+$[W]+"' is not expected.",D($,W))}if(!f)return P("InvalidXml","Start tag expected.",1);else if(w.length==1)return P("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",D($,w[0].tagStartPos));else if(w.length>0)return P("InvalidXml","Invalid '"+JSON.stringify(w.map((W)=>W.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var XQ='"',ZQ="'",EQ=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var AL=K((KQ)=>{var OL={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,U,w){return $}},TQ=function($){return Object.assign({},OL,$)};KQ.buildOptions=TQ;KQ.defaultOptions=OL});var HL=K((pA,VL)=>{class BL{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})}}VL.exports=BL});var qL=K((gA,CL)=>{var BQ=function($,U){const w={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let f=1,G=!1,W=!1,L="";for(;U<$.length;U++)if($[U]==="<"&&!W){if(G&&CQ($,U)){if(U+=7,[entityName,val,U]=VQ($,U+1),val.indexOf("&")===-1)w[PQ(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(G&&qQ($,U))U+=8;else if(G&&NQ($,U))U+=8;else if(G&&jQ($,U))U+=9;else if(HQ)W=!0;else throw new Error("Invalid DOCTYPE");f++,L=""}else if($[U]===">"){if(W){if($[U-1]==="-"&&$[U-2]==="-")W=!1,f--}else f--;if(f===0)break}else if($[U]==="[")G=!0;else L+=$[U];if(f!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:U}},VQ=function($,U){let w="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)w+=$[U];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");const f=$[U++];let G="";for(;U<$.length&&$[U]!==f;U++)G+=$[U];return[w,G,U]},HQ=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},CQ=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},qQ=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},NQ=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},jQ=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},PQ=function($){if(AQ.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},AQ=E$();CL.exports=BQ});var jL=K((lA,NL)=>{var DQ=function($,U={}){if(U=Object.assign({},hQ,U),!$||typeof $!=="string")return $;let w=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(w))return $;else if(U.hex&&SQ.test(w))return Number.parseInt(w,16);else{const f=bQ.exec(w);if(f){const G=f[1],W=f[2];let L=kQ(f[3]);const X=f[4]||f[6];if(!U.leadingZeros&&W.length>0&&G&&w[2]!==".")return $;else if(!U.leadingZeros&&W.length>0&&!G&&w[1]!==".")return $;else{const Z=Number(w),F=""+Z;if(F.search(/[eE]/)!==-1)if(U.eNotation)return Z;else return $;else if(X)if(U.eNotation)return Z;else return $;else if(w.indexOf(".")!==-1)if(F==="0"&&L==="")return Z;else if(F===L)return Z;else if(G&&F==="-"+L)return Z;else return $;if(W)if(L===F)return Z;else if(G+L===F)return Z;else return $;if(w===F)return Z;else if(w===G+F)return Z;return $}}else return $}},kQ=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},SQ=/^[-+]?0x[a-fA-F0-9]+$/,bQ=/^([\-\+])?(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 hQ={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};NL.exports=DQ});var hL=K((nA,bL)=>{var xQ=function($){const U=Object.keys($);for(let w=0;w<U.length;w++){const f=U[w];this.lastEntities[f]={regex:new RegExp("&"+f+";","g"),val:$[f]}}},uQ=function($,U,w,f,G,W,L){if($!==void 0){if(this.options.trimValues&&!f)$=$.trim();if($.length>0){if(!L)$=this.replaceEntitiesValue($);const X=this.options.tagValueProcessor(U,$,w,G,W);if(X===null||X===void 0)return $;else if(typeof X!==typeof $||X!==$)return X;else if(this.options.trimValues)return iU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return iU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},yQ=function($){if(this.options.removeNSPrefix){const U=$.split(":"),w=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=w+U[1]}return $},dQ=function($,U,w){if(!this.options.ignoreAttributes&&typeof $==="string"){const f=PL.getAllMatches($,_Q),G=f.length,W={};for(let L=0;L<G;L++){const X=this.resolveNameSpace(f[L][1]);let Z=f[L][4],F=this.options.attributeNamePrefix+X;if(X.length){if(this.options.transformAttributeName)F=this.options.transformAttributeName(F);if(F==="__proto__")F="#__proto__";if(Z!==void 0){if(this.options.trimValues)Z=Z.trim();Z=this.replaceEntitiesValue(Z);const E=this.options.attributeValueProcessor(X,Z,U);if(E===null||E===void 0)W[F]=Z;else if(typeof E!==typeof Z||E!==Z)W[F]=E;else W[F]=iU(Z,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)W[F]=!0}}if(!Object.keys(W).length)return;if(this.options.attributesGroupName){const L={};return L[this.options.attributesGroupName]=W,L}return W}},gQ=function($,U,w){const f=this.options.updateTag(U.tagname,w,U[":@"]);if(f===!1);else if(typeof f==="string")U.tagname=f,$.addChild(U);else $.addChild(U)},nQ=function($,U,w,f){if($){if(f===void 0)f=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,w,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,f),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $},sQ=function($,U,w){const f="*."+w;for(let G in $){const W=$[G];if(f===W||U===W)return!0}return!1},mQ=function($,U,w=">"){let f,G="";for(let W=U;W<$.length;W++){let L=$[W];if(f){if(L===f)f=""}else if(L==='"'||L==="'")f=L;else if(L===w[0])if(w[1]){if($[W+1]===w[1])return{data:G,index:W}}else return{data:G,index:W};else if(L==="\t")L=" ";G+=L}},M0=function($,U,w,f){const G=$.indexOf(U,w);if(G===-1)throw new Error(f);else return G+U.length-1},mU=function($,U,w,f=">"){const G=mQ($,U+1,f);if(!G)return;let W=G.data;const L=G.index,X=W.search(/\s/);let Z=W,F=!0;if(X!==-1)Z=W.substring(0,X),W=W.substring(X+1).trimStart();const E=Z;if(w){const I=Z.indexOf(":");if(I!==-1)Z=Z.substr(I+1),F=Z!==G.data.substr(I+1)}return{tagName:Z,tagExp:W,closeIndex:L,attrExpPresent:F,rawTagName:E}},iQ=function($,U,w){const f=w;let G=1;for(;w<$.length;w++)if($[w]==="<")if($[w+1]==="/"){const W=M0($,">",w,`${U} is not closed`);if($.substring(w+2,W).trim()===U){if(G--,G===0)return{tagContent:$.substring(f,w),i:W}}w=W}else if($[w+1]==="?")w=M0($,"?>",w+1,"StopNode is not closed.");else if($.substr(w+1,3)==="!--")w=M0($,"-->",w+3,"StopNode is not closed.");else if($.substr(w+1,2)==="![")w=M0($,"]]>",w,"StopNode is not closed.")-2;else{const W=mU($,w,">");if(W){if((W&&W.tagName)===U&&W.tagExp[W.tagExp.length-1]!=="/")G++;w=W.closeIndex}}},iU=function($,U,w){if(U&&typeof $==="string"){const f=$.trim();if(f==="true")return!0;else if(f==="false")return!1;else return vQ($,w)}else if(PL.isExist($))return $;else return""},PL=E$(),G1=HL(),cQ=qL(),vQ=jL();class SL{constructor($){this.options=$,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(U,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=xQ,this.parseXml=pQ,this.parseTextData=uQ,this.resolveNameSpace=yQ,this.buildAttributesMap=dQ,this.isItStopNode=sQ,this.replaceEntitiesValue=lQ,this.readStopNodeData=iQ,this.saveTextToParentTag=nQ,this.addChild=gQ}}var _Q=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),pQ=function($){$=$.replace(/\r\n?/g,"\n");const U=new G1("!xml");let w=U,f="",G="";for(let W=0;W<$.length;W++)if($[W]==="<")if($[W+1]==="/"){const X=M0($,">",W,"Closing Tag is not closed.");let Z=$.substring(W+2,X).trim();if(this.options.removeNSPrefix){const I=Z.indexOf(":");if(I!==-1)Z=Z.substr(I+1)}if(this.options.transformTagName)Z=this.options.transformTagName(Z);if(w)f=this.saveTextToParentTag(f,w,G);const F=G.substring(G.lastIndexOf(".")+1);if(Z&&this.options.unpairedTags.indexOf(Z)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Z}>`);let E=0;if(F&&this.options.unpairedTags.indexOf(F)!==-1)E=G.lastIndexOf(".",G.lastIndexOf(".")-1),this.tagsNodeStack.pop();else E=G.lastIndexOf(".");G=G.substring(0,E),w=this.tagsNodeStack.pop(),f="",W=X}else if($[W+1]==="?"){let X=mU($,W,!1,"?>");if(!X)throw new Error("Pi Tag is not closed.");if(f=this.saveTextToParentTag(f,w,G),this.options.ignoreDeclaration&&X.tagName==="?xml"||this.options.ignorePiTags);else{const Z=new G1(X.tagName);if(Z.add(this.options.textNodeName,""),X.tagName!==X.tagExp&&X.attrExpPresent)Z[":@"]=this.buildAttributesMap(X.tagExp,G,X.tagName);this.addChild(w,Z,G)}W=X.closeIndex+1}else if($.substr(W+1,3)==="!--"){const X=M0($,"-->",W+4,"Comment is not closed.");if(this.options.commentPropName){const Z=$.substring(W+4,X-2);f=this.saveTextToParentTag(f,w,G),w.add(this.options.commentPropName,[{[this.options.textNodeName]:Z}])}W=X}else if($.substr(W+1,2)==="!D"){const X=cQ($,W);this.docTypeEntities=X.entities,W=X.i}else if($.substr(W+1,2)==="!["){const X=M0($,"]]>",W,"CDATA is not closed.")-2,Z=$.substring(W+9,X);f=this.saveTextToParentTag(f,w,G);let F=this.parseTextData(Z,w.tagname,G,!0,!1,!0,!0);if(F==null)F="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:Z}]);else w.add(this.options.textNodeName,F);W=X+2}else{let X=mU($,W,this.options.removeNSPrefix),Z=X.tagName;const F=X.rawTagName;let{tagExp:E,attrExpPresent:I,closeIndex:Y}=X;if(this.options.transformTagName)Z=this.options.transformTagName(Z);if(w&&f){if(w.tagname!=="!xml")f=this.saveTextToParentTag(f,w,G,!1)}const R=w;if(R&&this.options.unpairedTags.indexOf(R.tagname)!==-1)w=this.tagsNodeStack.pop(),G=G.substring(0,G.lastIndexOf("."));if(Z!==U.tagname)G+=G?"."+Z:Z;if(this.isItStopNode(this.options.stopNodes,G,Z)){let Q="";if(E.length>0&&E.lastIndexOf("/")===E.length-1){if(Z[Z.length-1]==="/")Z=Z.substr(0,Z.length-1),G=G.substr(0,G.length-1),E=Z;else E=E.substr(0,E.length-1);W=X.closeIndex}else if(this.options.unpairedTags.indexOf(Z)!==-1)W=X.closeIndex;else{const T=this.readStopNodeData($,F,Y+1);if(!T)throw new Error(`Unexpected end of ${F}`);W=T.i,Q=T.tagContent}const O=new G1(Z);if(Z!==E&&I)O[":@"]=this.buildAttributesMap(E,G,Z);if(Q)Q=this.parseTextData(Q,Z,G,!0,I,!0,!0);G=G.substr(0,G.lastIndexOf(".")),O.add(this.options.textNodeName,Q),this.addChild(w,O,G)}else{if(E.length>0&&E.lastIndexOf("/")===E.length-1){if(Z[Z.length-1]==="/")Z=Z.substr(0,Z.length-1),G=G.substr(0,G.length-1),E=Z;else E=E.substr(0,E.length-1);if(this.options.transformTagName)Z=this.options.transformTagName(Z);const Q=new G1(Z);if(Z!==E&&I)Q[":@"]=this.buildAttributesMap(E,G,Z);this.addChild(w,Q,G),G=G.substr(0,G.lastIndexOf("."))}else{const Q=new G1(Z);if(this.tagsNodeStack.push(w),Z!==E&&I)Q[":@"]=this.buildAttributesMap(E,G,Z);this.addChild(w,Q,G),w=Q}f="",W=Y}}else f+=$[W];return U.child},lQ=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const w=this.docTypeEntities[U];$=$.replace(w.regx,w.val)}for(let U in this.lastEntities){const w=this.lastEntities[U];$=$.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const w=this.htmlEntities[U];$=$.replace(w.regex,w.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};bL.exports=SL});var kL=K((eQ)=>{var rQ=function($,U){return DL($,U)},DL=function($,U,w){let f;const G={};for(let W=0;W<$.length;W++){const L=$[W],X=oQ(L);let Z="";if(w===void 0)Z=X;else Z=w+"."+X;if(X===U.textNodeName)if(f===void 0)f=L[X];else f+=""+L[X];else if(X===void 0)continue;else if(L[X]){let F=DL(L[X],U,Z);const E=aQ(F,U);if(L[":@"])tQ(F,L[":@"],Z,U);else if(Object.keys(F).length===1&&F[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)F=F[U.textNodeName];else if(Object.keys(F).length===0)if(U.alwaysCreateTextNode)F[U.textNodeName]="";else F="";if(G[X]!==void 0&&G.hasOwnProperty(X)){if(!Array.isArray(G[X]))G[X]=[G[X]];G[X].push(F)}else if(U.isArray(X,Z,E))G[X]=[F];else G[X]=F}}if(typeof f==="string"){if(f.length>0)G[U.textNodeName]=f}else if(f!==void 0)G[U.textNodeName]=f;return G},oQ=function($){const U=Object.keys($);for(let w=0;w<U.length;w++){const f=U[w];if(f!==":@")return f}},tQ=function($,U,w,f){if(U){const G=Object.keys(U),W=G.length;for(let L=0;L<W;L++){const X=G[L];if(f.isArray(X,w+"."+X,!0,!0))$[X]=[U[X]];else $[X]=U[X]}}},aQ=function($,U){const{textNodeName:w}=U,f=Object.keys($).length;if(f===0)return!0;if(f===1&&($[w]||typeof $[w]==="boolean"||$[w]===0))return!0;return!1};eQ.prettify=rQ});var xL=K((mA,vL)=>{var{buildOptions:U7}=AL(),w7=hL(),{prettify:G7}=kL(),f7=sU();class cL{constructor($){this.externalEntities={},this.options=U7($)}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 G=f7.validate($,U);if(G!==!0)throw Error(`${G.err.msg}:${G.err.line}:${G.err.col}`)}const w=new w7(this.options);w.addExternalEntities(this.externalEntities);const f=w.parseXml($);if(this.options.preserveOrder||f===void 0)return f;else return G7(f,this.options)}addEntity($,U){if(U.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if($.indexOf("&")!==-1||$.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}vL.exports=cL});var pL=K((iA,dL)=>{var W7=function($,U){let w="";if(U.format&&U.indentBy.length>0)w="\n";return yL($,U,"",w)},yL=function($,U,w,f){let G="",W=!1;for(let L=0;L<$.length;L++){const X=$[L],Z=L7(X);if(Z===void 0)continue;let F="";if(w.length===0)F=Z;else F=`${w}.${Z}`;if(Z===U.textNodeName){let Q=X[Z];if(!X7(F,U))Q=U.tagValueProcessor(Z,Q),Q=_L(Q,U);if(W)G+=f;G+=Q,W=!1;continue}else if(Z===U.cdataPropName){if(W)G+=f;G+=`<![CDATA[${X[Z][0][U.textNodeName]}]]>`,W=!1;continue}else if(Z===U.commentPropName){G+=f+`<!--${X[Z][0][U.textNodeName]}-->`,W=!0;continue}else if(Z[0]==="?"){const Q=uL(X[":@"],U),O=Z==="?xml"?"":f;let T=X[Z][0][U.textNodeName];T=T.length!==0?" "+T:"",G+=O+`<${Z}${T}${Q}?>`,W=!0;continue}let E=f;if(E!=="")E+=U.indentBy;const I=uL(X[":@"],U),Y=f+`<${Z}${I}`,R=yL(X[Z],U,F,E);if(U.unpairedTags.indexOf(Z)!==-1)if(U.suppressUnpairedNode)G+=Y+">";else G+=Y+"/>";else if((!R||R.length===0)&&U.suppressEmptyNode)G+=Y+"/>";else if(R&&R.endsWith(">"))G+=Y+`>${R}${f}</${Z}>`;else{if(G+=Y+">",R&&f!==""&&(R.includes("/>")||R.includes("</")))G+=f+U.indentBy+R+f;else G+=R;G+=`</${Z}>`}W=!0}return G},L7=function($){const U=Object.keys($);for(let w=0;w<U.length;w++){const f=U[w];if(!$.hasOwnProperty(f))continue;if(f!==":@")return f}},uL=function($,U){let w="";if($&&!U.ignoreAttributes)for(let f in $){if(!$.hasOwnProperty(f))continue;let G=U.attributeValueProcessor(f,$[f]);if(G=_L(G,U),G===!0&&U.suppressBooleanAttributes)w+=` ${f.substr(U.attributeNamePrefix.length)}`;else w+=` ${f.substr(U.attributeNamePrefix.length)}="${G}"`}return w},X7=function($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let w=$.substr($.lastIndexOf(".")+1);for(let f in U.stopNodes)if(U.stopNodes[f]===$||U.stopNodes[f]==="*."+w)return!0;return!1},_L=function($,U){if($&&$.length>0&&U.processEntities)for(let w=0;w<U.entities.length;w++){const f=U.entities[w];$=$.replace(f.regex,f.val)}return $};dL.exports=W7});var lL=K((rA,gL)=>{var X0=function($){if(this.options=Object.assign({},F7,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=R7;if(this.processTextOrObjNode=E7,this.options.format)this.indentate=I7,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},E7=function($,U,w){const f=this.j2x($,w+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,f.attrStr,w);else return this.buildObjectNode(f.val,U,f.attrStr,w)},I7=function($){return this.options.indentBy.repeat($)},R7=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},Z7=pL(),F7={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};X0.prototype.build=function($){if(this.options.preserveOrder)return Z7($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};X0.prototype.j2x=function($,U){let w="",f="";for(let G in $){if(!Object.prototype.hasOwnProperty.call($,G))continue;if(typeof $[G]==="undefined"){if(this.isAttribute(G))f+=""}else if($[G]===null)if(this.isAttribute(G))f+="";else if(G[0]==="?")f+=this.indentate(U)+"<"+G+"?"+this.tagEndChar;else f+=this.indentate(U)+"<"+G+"/"+this.tagEndChar;else if($[G]instanceof Date)f+=this.buildTextValNode($[G],G,"",U);else if(typeof $[G]!=="object"){const W=this.isAttribute(G);if(W)w+=this.buildAttrPairStr(W,""+$[G]);else if(G===this.options.textNodeName){let L=this.options.tagValueProcessor(G,""+$[G]);f+=this.replaceEntitiesValue(L)}else f+=this.buildTextValNode($[G],G,"",U)}else if(Array.isArray($[G])){const W=$[G].length;let L="",X="";for(let Z=0;Z<W;Z++){const F=$[G][Z];if(typeof F==="undefined");else if(F===null)if(G[0]==="?")f+=this.indentate(U)+"<"+G+"?"+this.tagEndChar;else f+=this.indentate(U)+"<"+G+"/"+this.tagEndChar;else if(typeof F==="object")if(this.options.oneListGroup){const E=this.j2x(F,U+1);if(L+=E.val,this.options.attributesGroupName&&F.hasOwnProperty(this.options.attributesGroupName))X+=E.attrStr}else L+=this.processTextOrObjNode(F,G,U);else if(this.options.oneListGroup){let E=this.options.tagValueProcessor(G,F);E=this.replaceEntitiesValue(E),L+=E}else L+=this.buildTextValNode(F,G,"",U)}if(this.options.oneListGroup)L=this.buildObjectNode(L,G,X,U);f+=L}else if(this.options.attributesGroupName&&G===this.options.attributesGroupName){const W=Object.keys($[G]),L=W.length;for(let X=0;X<L;X++)w+=this.buildAttrPairStr(W[X],""+$[G][W[X]])}else f+=this.processTextOrObjNode($[G],G,U)}return{attrStr:w,val:f}};X0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};X0.prototype.buildObjectNode=function($,U,w,f){if($==="")if(U[0]==="?")return this.indentate(f)+"<"+U+w+"?"+this.tagEndChar;else return this.indentate(f)+"<"+U+w+this.closeTag(U)+this.tagEndChar;else{let G="</"+U+this.tagEndChar,W="";if(U[0]==="?")W="?",G="";if((w||w==="")&&$.indexOf("<")===-1)return this.indentate(f)+"<"+U+w+W+">"+$+G;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&W.length===0)return this.indentate(f)+`<!--${$}-->`+this.newLine;else return this.indentate(f)+"<"+U+w+W+this.tagEndChar+$+this.indentate(f)+G}};X0.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};X0.prototype.buildTextValNode=function($,U,w,f){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(f)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(f)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(f)+"<"+U+w+"?"+this.tagEndChar;else{let G=this.options.tagValueProcessor(U,$);if(G=this.replaceEntitiesValue(G),G==="")return this.indentate(f)+"<"+U+w+this.closeTag(U)+this.tagEndChar;else return this.indentate(f)+"<"+U+w+">"+G+"</"+U+this.tagEndChar}};X0.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const w=this.options.entities[U];$=$.replace(w.regex,w.val)}return $};gL.exports=X0});var sL=K((oA,nL)=>{var Y7=sU(),Q7=xL(),z7=lL();nL.exports={XMLParser:Q7,XMLValidator:Y7,XMLBuilder:z7}});var aL=K((tA,tL)=>{var{defineProperty:I$,getOwnPropertyDescriptor:J7,getOwnPropertyNames:T7}=Object,K7=Object.prototype.hasOwnProperty,c=($,U)=>I$($,"name",{value:U,configurable:!0}),M7=($,U)=>{for(var w in U)I$($,w,{get:U[w],enumerable:!0})},O7=($,U,w,f)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of T7(U))if(!K7.call($,G)&&G!==w)I$($,G,{get:()=>U[G],enumerable:!(f=J7(U,G))||f.enumerable})}return $},A7=($)=>O7(I$({},"__esModule",{value:!0}),$),mL={};M7(mL,{_toBool:()=>V7,_toNum:()=>H7,_toStr:()=>B7,awsExpectUnion:()=>q7,loadRestJsonErrorCode:()=>P7,loadRestXmlErrorCode:()=>D7,parseJsonBody:()=>rL,parseJsonErrorBody:()=>j7,parseXmlBody:()=>oL,parseXmlErrorBody:()=>h7});tL.exports=A7(mL);var B7=c(($)=>{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"),V7=c(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const w=new Error(`Received string "${$}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return $!==""&&U!=="false"}return $},"_toBool"),H7=c(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const w=new Error(`Received string "${$}" where a number was expected.`);return w.name="Warning",console.warn(w),$}return U}return $},"_toNum"),C7=q0(),q7=c(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return C7.expectUnion($)},"awsExpectUnion"),N7=q0(),iL=c(($,U)=>N7.collectBody($,U).then((w)=>U.utf8Encoder(w)),"collectBodyString"),rL=c(($,U)=>iL($,U).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(f){if((f==null?void 0:f.name)==="SyntaxError")Object.defineProperty(f,"$responseBodyText",{value:w});throw f}return{}}),"parseJsonBody"),j7=c(async($,U)=>{const w=await rL($,U);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),P7=c(($,U)=>{const w=c((W,L)=>Object.keys(W).find((X)=>X.toLowerCase()===L.toLowerCase()),"findKey"),f=c((W)=>{let L=W;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"),G=w($.headers,"x-amzn-errortype");if(G!==void 0)return f($.headers[G]);if(U.code!==void 0)return f(U.code);if(U.__type!==void 0)return f(U.__type)},"loadRestJsonErrorCode"),S7=q0(),b7=sL(),oL=c(($,U)=>iL($,U).then((w)=>{if(w.length){const f=new b7.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Z,F)=>F.trim()===""&&F.includes("\n")?"":void 0});f.addEntity("#xD","\r"),f.addEntity("#10","\n");let G;try{G=f.parse(w,!0)}catch(Z){if(Z&&typeof Z==="object")Object.defineProperty(Z,"$responseBodyText",{value:w});throw Z}const W="#text",L=Object.keys(G)[0],X=G[L];if(X[W])X[L]=X[W],delete X[W];return S7.getValueFromTextNode(X)}return{}}),"parseXmlBody"),h7=c(async($,U)=>{const w=await oL($,U);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),D7=c(($,U)=>{var w;if(((w=U==null?void 0:U.Error)==null?void 0:w.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var k7=K((f1)=>{Object.defineProperty(f1,"__esModule",{value:!0});var rU=D6();rU.__exportStar(x6(),f1);rU.__exportStar(YL(),f1);rU.__exportStar(aL(),f1)});function o7($){return $}var IX=($)=>(U)=>async(w)=>{if(!x.isInstance(w.request))return U(w);const{request:f}=w,{handlerProtocol:G=""}=$.requestHandler.metadata||{};if(G.indexOf("h2")>=0&&!f.headers[":authority"])delete f.headers.host,f.headers[":authority"]=f.hostname+(f.port?":"+f.port:"");else if(!f.headers.host){let W=f.hostname;if(f.port!=null)W+=`:${f.port}`;f.headers.host=W}return U(w)},RX={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},t7=($)=>({applyToStack:(U)=>{U.add(IX($),RX)}});var YX=()=>($,U)=>async(w)=>{try{const f=await $(w),{clientName:G,commandName:W,logger:L,dynamoDbDocumentClientOptions:X={}}=U,{overrideInputFilterSensitiveLog:Z,overrideOutputFilterSensitiveLog:F}=X,E=Z??U.inputFilterSensitiveLog,I=F??U.outputFilterSensitiveLog,{$metadata:Y,...R}=f.output;return L?.info?.({clientName:G,commandName:W,input:E(w.input),output:I(R),metadata:Y}),f}catch(f){const{clientName:G,commandName:W,logger:L,dynamoDbDocumentClientOptions:X={}}=U,{overrideInputFilterSensitiveLog:Z}=X,F=Z??U.inputFilterSensitiveLog;throw L?.error?.({clientName:G,commandName:W,input:F(w.input),error:f,metadata:f.$metadata}),f}},QX={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},e7=($)=>({applyToStack:(U)=>{U.add(YX(),QX)}});var $w="X-Amzn-Trace-Id",zX="AWS_LAMBDA_FUNCTION_NAME",JX="_X_AMZN_TRACE_ID",TX=($)=>(U)=>async(w)=>{const{request:f}=w;if(!x.isInstance(f)||$.runtime!=="node"||f.headers.hasOwnProperty($w))return U(w);const G=process.env[zX],W=process.env[JX],L=(X)=>typeof X==="string"&&X.length>0;if(L(G)&&L(W))f.headers[$w]=W;return U({...w,request:f})},KX={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},fz=($)=>({applyToStack:(U)=>{U.add(TX($),KX)}});function ZJ($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var Q5=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}$"),o0=($)=>Q5.test($)||$.startsWith("[")&&$.endsWith("]");var z5=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),t0=($,U=!1)=>{if(!U)return z5.test($);const w=$.split(".");for(let f of w)if(!t0(f))return!1;return!0};var a0={};var t="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 H extends Error{constructor($){super($);this.name="EndpointError"}}var Y4=($,U)=>$===U;var Q4=($)=>{const U=$.split("."),w=[];for(let f of U){const G=f.indexOf("[");if(G!==-1){if(f.indexOf("]")!==f.length-1)throw new H(`Path: '${$}' does not end with ']'`);const W=f.slice(G+1,-1);if(Number.isNaN(parseInt(W)))throw new H(`Invalid array index: '${W}' in path: '${$}'`);if(G!==0)w.push(f.slice(0,G));w.push(W)}else w.push(f)}return w};var y1=($,U)=>Q4(U).reduce((w,f)=>{if(typeof w!=="object")throw new H(`Index '${f}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(w))return w[parseInt(f)];return w[f]},$);var z4=($)=>$!=null;var J4=($)=>!$;var _1=zU(F0(),1);var QU={[_1.EndpointURLScheme.HTTP]:80,[_1.EndpointURLScheme.HTTPS]:443},T4=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:Y,port:R,protocol:Q="",path:O="",query:T={}}=$,z=new URL(`${Q}//${Y}${R?`:${R}`:""}${O}`);return z.search=Object.entries(T).map(([M,A])=>`${M}=${A}`).join("&"),z}return new URL($)}catch(Y){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const w=U.href,{host:f,hostname:G,pathname:W,protocol:L,search:X}=U;if(X)return null;const Z=L.slice(0,-1);if(!Object.values(_1.EndpointURLScheme).includes(Z))return null;const F=o0(G),E=w.includes(`${f}:${QU[Z]}`)||typeof $==="string"&&$.includes(`${f}:${QU[Z]}`),I=`${f}${E?`:${QU[Z]}`:""}`;return{scheme:Z,authority:I,path:W,normalizedPath:W.endsWith("/")?W:`${W}/`,isIp:F}};var K4=($,U)=>$===U;var M4=($,U,w,f)=>{if(U>=w||$.length<w)return null;if(!f)return $.substring(U,w);return $.substring($.length-w,$.length-U)};var O4=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var A4={booleanEquals:Y4,getAttr:y1,isSet:z4,isValidHostLabel:t0,not:J4,parseURL:T4,stringEquals:K4,substring:M4,uriEncode:O4};var d1=($,U)=>{const w=[],f={...U.endpointParams,...U.referenceRecord};let G=0;while(G<$.length){const W=$.indexOf("{",G);if(W===-1){w.push($.slice(G));break}w.push($.slice(G,W));const L=$.indexOf("}",W);if(L===-1){w.push($.slice(W));break}if($[W+1]==="{"&&$[L+1]==="}")w.push($.slice(W+1,L)),G=L+2;const X=$.substring(W+1,L);if(X.includes("#")){const[Z,F]=X.split("#");w.push(y1(f[Z],F))}else w.push(f[X]);G=L+1}return w.join("")};var B4=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var f0=($,U,w)=>{if(typeof $==="string")return d1($,w);else if($.fn)return p1($,w);else if($.ref)return B4($,w);throw new H(`'${U}': ${String($)} is not a string, function or reference.`)};var p1=({fn:$,argv:U},w)=>{const f=U.map((W)=>["boolean","number"].includes(typeof W)?W:f0(W,"arg",w)),G=$.split(".");if(G[0]in a0&&G[1]!=null)return a0[G[0]][G[1]](...f);return A4[$](...f)};var V4=({assign:$,...U},w)=>{if($&&$ in w.referenceRecord)throw new H(`'${$}' is already defined in Reference Record.`);const f=p1(U,w);return w.logger?.debug?.(`${t} evaluateCondition: ${_(U)} = ${_(f)}`),{result:f===""?!0:!!f,...$!=null&&{toAssign:{name:$,value:f}}}};var j0=($=[],U)=>{const w={};for(let f of $){const{result:G,toAssign:W}=V4(f,{...U,referenceRecord:{...U.referenceRecord,...w}});if(!G)return{result:G};if(W)w[W.name]=W.value,U.logger?.debug?.(`${t} assign: ${W.name} := ${_(W.value)}`)}return{result:!0,referenceRecord:w}};var H4=($,U)=>Object.entries($).reduce((w,[f,G])=>({...w,[f]:G.map((W)=>{const L=f0(W,"Header value entry",U);if(typeof L!=="string")throw new H(`Header '${f}' value '${L}' is not a string`);return L})}),{});var JU=($,U)=>{if(Array.isArray($))return $.map((w)=>JU(w,U));switch(typeof $){case"string":return d1($,U);case"object":if($===null)throw new H(`Unexpected endpoint property: ${$}`);return g1($,U);case"boolean":return $;default:throw new H(`Unexpected endpoint property type: ${typeof $}`)}};var g1=($,U)=>Object.entries($).reduce((w,[f,G])=>({...w,[f]:JU(G,U)}),{});var C4=($,U)=>{const w=f0($,"Endpoint URL",U);if(typeof w==="string")try{return new URL(w)}catch(f){throw console.error(`Failed to construct URL with ${w}`,f),f}throw new H(`Endpoint URL must be a string, got ${typeof w}`)};var q4=($,U)=>{const{conditions:w,endpoint:f}=$,{result:G,referenceRecord:W}=j0(w,U);if(!G)return;const L={...U,referenceRecord:{...U.referenceRecord,...W}},{url:X,properties:Z,headers:F}=f;return U.logger?.debug?.(`${t} Resolving endpoint from template: ${_(f)}`),{...F!=null&&{headers:H4(F,L)},...Z!=null&&{properties:g1(Z,L)},url:C4(X,L)}};var N4=($,U)=>{const{conditions:w,error:f}=$,{result:G,referenceRecord:W}=j0(w,U);if(!G)return;throw new H(f0(f,"Error",{...U,referenceRecord:{...U.referenceRecord,...W}}))};var j4=($,U)=>{const{conditions:w,rules:f}=$,{result:G,referenceRecord:W}=j0(w,U);if(!G)return;return l1(f,{...U,referenceRecord:{...U.referenceRecord,...W}})};var l1=($,U)=>{for(let w of $)if(w.type==="endpoint"){const f=q4(w,U);if(f)return f}else if(w.type==="error")N4(w,U);else if(w.type==="tree"){const f=j4(w,U);if(f)return f}else throw new H(`Unknown endpoint rule: ${w}`);throw new H("Rules evaluation failed")};var J5=($,U)=>{const{endpointParams:w,logger:f}=U,{parameters:G,rules:W}=$;U.logger?.debug?.(`${t} Initial EndpointParams: ${_(w)}`);const L=Object.entries(G).filter(([,F])=>F.default!=null).map(([F,E])=>[F,E.default]);if(L.length>0)for(let[F,E]of L)w[F]=w[F]??E;const X=Object.entries(G).filter(([,F])=>F.required).map(([F])=>F);for(let F of X)if(w[F]==null)throw new H(`Missing required parameter: '${F}'`);const Z=l1(W,{endpointParams:w,logger:f,referenceRecord:{}});if(U.endpointParams?.Endpoint)try{const F=new URL(U.endpointParams.Endpoint),{protocol:E,port:I}=F;Z.url.protocol=E,Z.url.port=I}catch(F){}return U.logger?.debug?.(`${t} Resolved endpoint: ${_(Z)}`),Z};var TU=($,U=!1)=>{if(U){for(let w of $.split("."))if(!TU(w))return!1;return!0}if(!t0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(o0($))return!1;return!0};var P4=($)=>{const U=$.split(":");if(U.length<6)return null;const[w,f,G,W,L,...X]=U;if(w!=="arn"||f===""||G===""||X[0]==="")return null;return{partition:f,service:G,region:W,accountId:L,resourceId:X[0].includes("/")?X[0].split("/"):X}};var S4={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 K5=S4,M5="",b4=($)=>{const{partitions:U}=K5;for(let f of U){const{regions:G,outputs:W}=f;for(let[L,X]of Object.entries(G))if(L===$)return{...W,...X}}for(let f of U){const{regionRegex:G,outputs:W}=f;if(new RegExp(G).test($))return{...W}}const w=U.find((f)=>f.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}};var h4=()=>M5;var O5={isVirtualHostableS3Bucket:TU,parseArn:P4,partition:b4};a0.aws=O5;var KU="user-agent",n1="x-amz-user-agent",MU=" ",s1="/",D4=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,k4=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,OU="-";var A5=($)=>(U,w)=>async(f)=>{const{request:G}=f;if(!x.isInstance(G))return U(f);const{headers:W}=G,L=w?.userAgent?.map(AU)||[],X=(await $.defaultUserAgentProvider()).map(AU),Z=$?.customUserAgent?.map(AU)||[],F=h4(),E=(F?[F]:[]).concat([...X,...L,...Z]).join(MU),I=[...X.filter((Y)=>Y.startsWith("aws-sdk-")),...Z].join(MU);if($.runtime!=="browser"){if(I)W[n1]=W[n1]?`${W[KU]} ${I}`:I;W[KU]=E}else W[n1]=E;return U({...f,request:G})},AU=($)=>{const U=$[0].split(s1).map((L)=>L.replace(D4,OU)).join(s1),w=$[1]?.replace(k4,OU),f=U.indexOf(s1),G=U.substring(0,f);let W=U.substring(f+1);if(G==="api")W=W.toLowerCase();return[G,W,w].filter((L)=>L&&L.length>0).reduce((L,X,Z)=>{switch(Z){case 0:return X;case 1:return`${L}/${X}`;default:return`${L}#${X}`}},"")},B5={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},dK=($)=>({applyToStack:(U)=>{U.add(A5($),B5)}});var m1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var BU=($)=>m1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var tK=($)=>{const{region:U,useFipsEndpoint:w}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return BU(U);const f=await U();return BU(f)},useFipsEndpoint:async()=>{const f=typeof U==="string"?U:await U();if(m1(f))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}};var P0=($,U,w)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${w} "${U}". Expected "true" or "false", got ${$[U]}.`)};var W0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(W0||(W0={}));var V5="AWS_USE_DUALSTACK_ENDPOINT",H5="use_dualstack_endpoint";var XM={environmentVariableSelector:($)=>P0($,V5,W0.ENV),configFileSelector:($)=>P0($,H5,W0.CONFIG),default:!1};var C5="AWS_USE_FIPS_ENDPOINT",q5="use_fips_endpoint";var EM={environmentVariableSelector:($)=>P0($,C5,W0.ENV),configFileSelector:($)=>P0($,q5,W0.CONFIG),default:!1};var VU=zU(F0(),1),c4=($)=>$[VU.SMITHY_CONTEXT_KEY]||($[VU.SMITHY_CONTEXT_KEY]={});var a=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var v4={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},PM={preferredFile:"credentials"};function N5($){return(U)=>async(w)=>{const f=w.request;if(x.isInstance(f)){const{body:G,headers:W}=f;if(G&&Object.keys(W).map((L)=>L.toLowerCase()).indexOf(x4)===-1)try{const L=$(G);f.headers={...f.headers,[x4]:String(L)}}catch(L){}}return U({...w,request:f})}}var x4="content-length",j5={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},w3=($)=>({applyToStack:(U)=>{U.add(N5($.bodyLengthChecker),j5)}});var u4=($,U)=>(w)=>async(f)=>{const{response:G}=await w(f);try{const W=await U(G,$);return{response:G,output:W}}catch(W){if(Object.defineProperty(W,"$response",{value:G}),!("$metadata"in W)){if(W.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof W.$responseBodyText!=="undefined"){if(W.$response)W.$response.body=W.$responseBodyText}}throw W}};var y4=($,U)=>(w,f)=>async(G)=>{const W=f.endpointV2?.url&&$.urlParser?async()=>$.urlParser(f.endpointV2.url):$.endpoint;if(!W)throw new Error("No valid endpoint provider available.");const L=await U(G.input,{...$,endpoint:W});return w({...G,request:L})};function Z3($,U,w){return{applyToStack:(f)=>{f.add(u4($,w),P5),f.add(y4($,U),HU)}}}var P5={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},HU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var _4=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(k5(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!D5(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},S5=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,b5=/(\d+\.){3}\d+/,h5=/\.\./;var D5=($)=>S5.test($)&&!b5.test($)&&!h5.test($),k5=($)=>{const[U,w,f,,,G]=$.split(":"),W=U==="arn"&&$.split(":").length>=6,L=Boolean(W&&w&&f&&G);if(W&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L};var d4=($,U,w)=>{const f=async()=>{const G=w[$]??w[U];if(typeof G==="function")return G();return G};if($==="credentialScope"||U==="CredentialScope")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return G?.credentialScope??G?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return G?.accountId??G?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const G=await f();if(G&&typeof G==="object"){if("url"in G)return G.url.href;if("hostname"in G){const{protocol:W,hostname:L,port:X,path:Z}=G;return`${W}//${L}${X?":"+X:""}${Z}`}}return G};return f};var p4="AWS_ENDPOINT_URL",g4="endpoint_url",l4=($)=>({environmentVariableSelector:(U)=>{const w=$.split(" ").map((W)=>W.toUpperCase()),f=U[[p4,...w].join("_")];if(f)return f;const G=U[p4];if(G)return G;return},configFileSelector:(U,w)=>{if(w&&U.services){const G=w[["services",U.services].join(CU)];if(G){const W=$.split(" ").map((X)=>X.toLowerCase()),L=G[[W.join("_"),g4].join(CU)];if(L)return L}}const f=U[g4];if(f)return f;return},default:void 0});var n4=async($)=>z0(l4($))();var i1=($)=>{if(typeof $==="object"){if("url"in $)return qU($.url);return $}return qU($)};var s4=async($,U,w,f)=>{if(!w.endpoint){const L=await n4(w.serviceId||"");if(L)w.endpoint=()=>Promise.resolve(i1(L))}const G=await c5($,U,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider(G,f)},c5=async($,U,w)=>{const f={},G=U?.getEndpointParameterInstructions?.()||{};for(let[W,L]of Object.entries(G))switch(L.type){case"staticContextParams":f[W]=L.value;break;case"contextParams":f[W]=$[L.name];break;case"clientContextParams":case"builtInParams":f[W]=await d4(L.name,W,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(G).length===0)Object.assign(f,w);if(String(w.serviceId).toLowerCase()==="s3")await _4(f);return f};var m4=({config:$,instructions:U})=>{return(w,f)=>async(G)=>{const W=await s4(G.input,{getEndpointParameterInstructions(){return U}},{...$},f);f.endpointV2=W,f.authSchemes=W.properties?.authSchemes;const L=f.authSchemes?.[0];if(L){f.signing_region=L.signingRegion,f.signing_service=L.signingName;const Z=c4(f)?.selectedHttpAuthScheme?.httpAuthOption;if(Z)Z.signingProperties=Object.assign(Z.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return w({...G})}};var v5={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:HU.name},c3=($,U)=>({applyToStack:(w)=>{w.addRelativeTo(m4({config:$,instructions:U}),v5)}});var y3=($)=>{const U=$.tls??!0,{endpoint:w}=$,f=w!=null?async()=>i1(await a(w)()):void 0;return{...$,endpoint:f,tls:U,isCustomEndpoint:!!w,useDualstackEndpoint:a($.useDualstackEndpoint??!1),useFipsEndpoint:a($.useFipsEndpoint??!1)}};var m=zU(b$(),1),o3=m.default.v1,t3=m.default.v3,i4=m.default.v4,a3=m.default.v5,e3=m.default.NIL,$O=m.default.version,UO=m.default.validate,wO=m.default.stringify,GO=m.default.parse;var n;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(n||(n={}));var J0=3,r4=n.STANDARD;var o4=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],t4=["TimeoutError","RequestTimeout","RequestTimeoutException"],a4=[500,502,503,504],e4=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var x5=($)=>$.$metadata?.clockSkewCorrected,S0=($)=>$.$metadata?.httpStatusCode===429||o4.includes($.name)||$.$retryable?.throttling==!0,r1=($)=>x5($)||t4.includes($.name)||e4.includes($?.code||"")||a4.includes($.$metadata?.httpStatusCode||0),$6=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!r1($))return!0;return!1}return!1};class o1{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),S0($)){const f=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=f,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(f),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const w=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var T0=100,e0=20000,NU=500,t1=500,jU=5,PU=10,SU=1,a1="amz-sdk-invocation-id",e1="amz-sdk-request";var U6=()=>{let $=T0;return{computeNextBackoffDelay:(f)=>{return Math.floor(Math.min(e0,Math.random()*2**f*$))},setDelayBase:(f)=>{$=f}}};var bU=({retryDelay:$,retryCount:U,retryCost:w})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(e0,$),getRetryCost:()=>w}};class b0{constructor($){this.maxAttempts=$,this.mode=n.STANDARD,this.capacity=t1,this.retryBackoffStrategy=U6(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return bU({retryDelay:T0,retryCount:0})}async refreshRetryTokenForRetry($,U){const w=await this.getMaxAttempts();if(this.shouldRetry($,U,w)){const f=U.errorType;this.retryBackoffStrategy.setDelayBase(f==="THROTTLING"?NU:T0);const G=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),W=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,G):G,L=this.getCapacityCost(f);return this.capacity-=L,bU({retryDelay:W,retryCount:$.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(t1,this.capacity+($.getRetryCost()??SU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${J0}`),J0}}shouldRetry($,U,w){return $.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?PU:jU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class hU{constructor($,U){this.maxAttemptsProvider=$,this.mode=n.ADAPTIVE;const{rateLimiter:w}=U??{};this.rateLimiter=w??new o1,this.standardRetryStrategy=new b0($)}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 w6="AWS_MAX_ATTEMPTS",G6="max_attempts",yO={environmentVariableSelector:($)=>{const U=$[w6];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Environment variable ${w6} mast be a number, got "${U}"`);return w},configFileSelector:($)=>{const U=$[G6];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Shared config file entry ${G6} mast be a number, got "${U}"`);return w},default:J0},_O=($)=>{const{retryStrategy:U}=$,w=a($.maxAttempts??J0);return{...$,maxAttempts:w,retryStrategy:async()=>{if(U)return U;if(await a($.retryMode)()===n.ADAPTIVE)return new hU(w);return new b0(w)}}},u5="AWS_RETRY_MODE",y5="retry_mode",dO={environmentVariableSelector:($)=>$[u5],configFileSelector:($)=>$[y5],default:r4};import{Readable as _5} from"stream";var f6=($)=>$?.body instanceof _5||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var DU=($)=>{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 d5=($)=>(U,w)=>async(f)=>{let G=await $.retryStrategy();const W=await $.maxAttempts();if(p5(G)){G=G;let L=await G.acquireInitialRetryToken(w.partition_id),X=new Error,Z=0,F=0;const{request:E}=f,I=x.isInstance(E);if(I)E.headers[a1]=i4();while(!0)try{if(I)E.headers[e1]=`attempt=${Z+1}; max=${W}`;const{response:Y,output:R}=await U(f);return G.recordSuccess(L),R.$metadata.attempts=Z+1,R.$metadata.totalRetryDelay=F,{response:Y,output:R}}catch(Y){const R=g5(Y);if(X=DU(Y),I&&f6(E))throw(w.logger instanceof W6?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),X;try{L=await G.refreshRetryTokenForRetry(L,R)}catch(O){if(!X.$metadata)X.$metadata={};throw X.$metadata.attempts=Z+1,X.$metadata.totalRetryDelay=F,X}Z=L.getRetryCount();const Q=L.getRetryDelay();F+=Q,await new Promise((O)=>setTimeout(O,Q))}}else{if(G=G,G?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",G.mode]];return G.retry(U,f)}},p5=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",g5=($)=>{const U={error:$,errorType:l5($)},w=s5($.$response);if(w)U.retryAfterHint=w;return U},l5=($)=>{if(S0($))return"THROTTLING";if(r1($))return"TRANSIENT";if($6($))return"SERVER_ERROR";return"CLIENT_ERROR"},n5={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},eO=($)=>({applyToStack:(U)=>{U.add(d5($),n5)}}),s5=($)=>{if(!kU.isInstance($))return;const U=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],f=Number(w);if(!Number.isNaN(f))return new Date(f*1000);return new Date(w)};import{platform as c7,release as v7} from"os";import{env as $X,versions as x7} from"process";var oU={isCrtAvailable:!1};var eL=()=>{if(oU.isCrtAvailable)return["md/crt-avail"];return null};var u7="AWS_SDK_UA_APP_ID",y7="sdk-ua-app-id",LB=({serviceId:$,clientVersion:U})=>{const w=[["aws-sdk-js",U],["ua","2.0"],[`os/${c7()}`,v7()],["lang/js"],["md/nodejs",`${x7.node}`]],f=eL();if(f)w.push(f);if($)w.push([`api/${$}`,U]);if($X.AWS_EXECUTION_ENV)w.push([`exec-env/${$X.AWS_EXECUTION_ENV}`]);const G=z0({environmentVariableSelector:(L)=>L[u7],configFileSelector:(L)=>L[y7],default:void 0})();let W=void 0;return async()=>{if(!W){const L=await G;W=L?[...w,[`app/${L}`]]:[...w]}return W}};import{Buffer as _7} from"buffer";import{createHash as d7,createHmac as p7} from"crypto";var UX=function($,U){if(_7.isBuffer($))return $;if(typeof $==="string")return wX($,U);if(ArrayBuffer.isView($))return tU($.buffer,$.byteOffset,$.byteLength);return tU($)};class g7{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(GX(UX($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?p7(this.algorithmIdentifier,UX(this.secret)):d7(this.algorithmIdentifier)}}import{fstatSync as l7,lstatSync as n7} from"fs";var zB=($)=>{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 n7($.path).size;else if(typeof $.fd==="number")return l7($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var fX="AWS_EXECUTION_ENV",aU="AWS_REGION",eU="AWS_DEFAULT_REGION",WX="AWS_EC2_METADATA_DISABLED",LX=["in-region","cross-region","mobile","standard","legacy"],XX="/latest/meta-data/placement/region";var ZX={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var qB=({region:$=z0(v4),defaultsMode:U=z0(ZX)}={})=>FX(async()=>{const w=typeof U==="function"?await U():U;switch(w?.toLowerCase()){case"auto":return s7($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${LX.join(", ")}, got ${w}`)}}),s7=async($)=>{if($){const U=typeof $==="function"?await $():$,w=await m7();if(!w)return"standard";if(U===w)return"in-region";else return"cross-region"}return"standard"},m7=async()=>{if(process.env[fX]&&(process.env[aU]||process.env[eU]))return process.env[aU]??process.env[eU];if(!process.env[WX])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-56f6f8c2162dcf1c.js"),w=await $();return(await U({...w,path:XX})).toString()}catch($){}};var SB=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const w=$.region;if(typeof w==="string")return w;return w()};return{setRegion(w){U=w},region(){return U}}},bB=($)=>{return{region:$.region()}};export{o7 as xa,t7 as ya,e7 as za,fz as Aa,GL as Ba,P0 as Ca,W0 as Da,YU as Ea,c4 as Fa,a as Ga,ZJ as Ha,a0 as Ia,J5 as Ja,O5 as Ka,dK as La,XM as Ma,EM as Na,v4 as Oa,PM as Pa,tK as Qa,w3 as Ra,c5 as Sa,Z3 as Ta,c3 as Ua,y3 as Va,r4 as Wa,i4 as Xa,yO as Ya,_O as Za,dO as _a,eO as $a,D6 as ab,k7 as bb,LB as cb,g7 as db,zB as eb,qB as fb,SB as gb,bB as hb};
@@ -0,0 +1,2 @@
1
+ var et=function(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)},F=function(t,e=!1){let s=[],i=0;for(;i<t.length;){let a=t[i],u=function(o){if(!e)throw new TypeError(o);s.push({type:"INVALID_CHAR",index:i,value:t[i++]})};if(a==="*"){s.push({type:"ASTERISK",index:i,value:t[i++]});continue}if(a==="+"||a==="?"){s.push({type:"OTHER_MODIFIER",index:i,value:t[i++]});continue}if(a==="\\"){s.push({type:"ESCAPED_CHAR",index:i++,value:t[i++]});continue}if(a==="{"){s.push({type:"OPEN",index:i,value:t[i++]});continue}if(a==="}"){s.push({type:"CLOSE",index:i,value:t[i++]});continue}if(a===":"){let o="",r=i+1;for(;r<t.length;){let h=t.substr(r,1);if(r===i+1&&Y.test(h)||r!==i+1&&tt.test(h)){o+=t[r++];continue}break}if(!o){u(`Missing parameter name at ${i}`);continue}s.push({type:"NAME",index:i,value:o}),i=r;continue}if(a==="("){let o=1,r="",h=i+1,n=!1;if(t[h]==="?"){u(`Pattern cannot start with "?" at ${h}`);continue}for(;h<t.length;){if(!et(t[h],!1)){u(`Invalid character '${t[h]}' at ${h}.`),n=!0;break}if(t[h]==="\\"){r+=t[h++]+t[h++];continue}if(t[h]===")"){if(o--,o===0){h++;break}}else if(t[h]==="("&&(o++,t[h+1]!=="?")){u(`Capturing groups are not allowed at ${h}`),n=!0;break}r+=t[h++]}if(n)continue;if(o){u(`Unbalanced pattern at ${i}`);continue}if(!r){u(`Missing pattern at ${i}`);continue}s.push({type:"REGEX",index:i,value:r}),i=h;continue}s.push({type:"CHAR",index:i,value:t[i++]})}return s.push({type:"END",index:i,value:""}),s},M=function(t,e={}){let s=F(t);e.delimiter??="/#?",e.prefixes??="./";let i=`[^${d(e.delimiter)}]+?`,a=[],u=0,o=0,r="",h=new Set,n=(p)=>{if(o<s.length&&s[o].type===p)return s[o++].value},f=()=>n("OTHER_MODIFIER")??n("ASTERISK"),w=(p)=>{let c=n(p);if(c!==void 0)return c;let{type:l,index:R}=s[o];throw new TypeError(`Unexpected ${l} at ${R}, expected ${p}`)},E=()=>{let p="",c;for(;c=n("CHAR")??n("ESCAPED_CHAR");)p+=c;return p},Q=(p)=>p,T=e.encodePart||Q,U="",O=(p)=>{U+=p},I=()=>{U.length&&(a.push(new P(3,"","",T(U),"",3)),U="")},_=(p,c,l,R,v)=>{let g=3;switch(v){case"?":g=1;break;case"*":g=0;break;case"+":g=2;break}if(!c&&!l&&g===3){O(p);return}if(I(),!c&&!l){if(!p)return;a.push(new P(3,"","",T(p),"",g));return}let m;l?l==="*"?m=D:m=l:m=i;let C=2;m===i?(C=1,m=""):m===D&&(C=0,m="");let b;if(c?b=c:l&&(b=u++),h.has(b))throw new TypeError(`Duplicate name '${b}'.`);h.add(b),a.push(new P(C,b,T(p),m,T(R),g))};for(;o<s.length;){let p=n("CHAR"),c=n("NAME"),l=n("REGEX");if(!c&&!l&&(l=n("ASTERISK")),c||l){let v=p??"";e.prefixes.indexOf(v)===-1&&(O(v),v=""),I();let g=f();_(v,c,l,"",g);continue}let R=p??n("ESCAPED_CHAR");if(R){O(R);continue}if(n("OPEN")){let v=E(),g=n("NAME"),m=n("REGEX");!g&&!m&&(m=n("ASTERISK"));let C=E();w("CLOSE");let b=f();_(v,g,m,C,b);continue}I(),w("END")}return a},d=function(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")},j=function(t){return t&&t.ignoreCase?"ui":"u"},st=function(t,e,s){return W(M(t,s),e,s)},k=function(t){switch(t){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}},W=function(t,e,s={}){s.delimiter??="/#?",s.prefixes??="./",s.sensitive??=!1,s.strict??=!1,s.end??=!0,s.start??=!0,s.endsWith="";let i=s.start?"^":"";for(let r of t){if(r.type===3){r.modifier===3?i+=d(r.value):i+=`(?:${d(r.value)})${k(r.modifier)}`;continue}e&&e.push(r.name);let h=`[^${d(s.delimiter)}]+?`,n=r.value;if(r.type===1?n=h:r.type===0&&(n=D),!r.prefix.length&&!r.suffix.length){r.modifier===3||r.modifier===1?i+=`(${n})${k(r.modifier)}`:i+=`((?:${n})${k(r.modifier)})`;continue}if(r.modifier===3||r.modifier===1){i+=`(?:${d(r.prefix)}(${n})${d(r.suffix)})`,i+=k(r.modifier);continue}i+=`(?:${d(r.prefix)}`,i+=`((?:${n})(?:`,i+=d(r.suffix),i+=d(r.prefix),i+=`(?:${n}))*)${d(r.suffix)})`,r.modifier===0&&(i+="?")}let a=`[${d(s.endsWith)}]|\$`,u=`[${d(s.delimiter)}]`;if(s.end)return s.strict||(i+=`${u}?`),s.endsWith.length?i+=`(?=${a})`:i+="$",new RegExp(i,j(s));s.strict||(i+=`(?:${u}(?=${a}))?`);let o=!1;if(t.length){let r=t[t.length-1];r.type===3&&r.modifier===3&&(o=s.delimiter.indexOf(r)>-1)}return o||(i+=`(?=${u}|${a})`),new RegExp(i,j(s))},nt=function(t,e){return t.length?t[0]==="/"?!0:!e||t.length<2?!1:(t[0]=="\\"||t[0]=="{")&&t[1]=="/":!1},G=function(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t},ot=function(t,e){return t.endsWith(e)?t.substr(0,t.length-e.length):t},K=function(t){return!t||t.length<2?!1:t[0]==="["||(t[0]==="\\"||t[0]==="{")&&t[1]==="["},V=function(t){if(!t)return!0;for(let e of X)if(t.test(e))return!0;return!1},ht=function(t,e){if(t=G(t,"#"),e||t==="")return t;let s=new URL("https://example.com");return s.hash=t,s.hash?s.hash.substring(1,s.hash.length):""},at=function(t,e){if(t=G(t,"?"),e||t==="")return t;let s=new URL("https://example.com");return s.search=t,s.search?s.search.substring(1,s.search.length):""},ut=function(t,e){return e||t===""?t:K(t)?q(t):Z(t)},pt=function(t,e){if(e||t==="")return t;let s=new URL("https://example.com");return s.password=t,s.password},ct=function(t,e){if(e||t==="")return t;let s=new URL("https://example.com");return s.username=t,s.username},ft=function(t,e,s){if(s||t==="")return t;if(e&&!X.includes(e))return new URL(`${e}:${t}`).pathname;let i=t[0]=="/";return t=new URL(i?t:"/-"+t,"https://example.com").pathname,i||(t=t.substring(2,t.length)),t},lt=function(t,e,s){return z(e)===t&&(t=""),s||t===""?t:B(t)},mt=function(t,e){return t=ot(t,":"),e||t===""?t:N(t)},z=function(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}},N=function(t){if(t==="")return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)},dt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.username=t,e.username},gt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.password=t,e.password},Z=function(t){if(t==="")return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);let e=new URL("https://example.com");return e.hostname=t,e.hostname},q=function(t){if(t==="")return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()},B=function(t){if(t===""||/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)},wt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.pathname=t[0]!=="/"?"/-"+t:t,t[0]!=="/"?e.pathname.substring(2,e.pathname.length):e.pathname},yt=function(t){return t===""?t:new URL(`data:${t}`).pathname},vt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)},bt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)},H=function(t,e){if(typeof t!="string")throw new TypeError("parameter 1 is not of type 'string'.");let s=new URL(t,e);return{protocol:s.protocol.substring(0,s.protocol.length-1),username:s.username,password:s.password,hostname:s.hostname,port:s.port,pathname:s.pathname,search:s.search!==""?s.search.substring(1,s.search.length):void 0,hash:s.hash!==""?s.hash.substring(1,s.hash.length):void 0}},y=function(t,e){return e?A(t):t},L=function(t,e,s){let i;if(typeof e.baseURL=="string")try{i=new URL(e.baseURL),e.protocol===void 0&&(t.protocol=y(i.protocol.substring(0,i.protocol.length-1),s)),!s&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&(t.username=y(i.username,s)),!s&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&e.password===void 0&&(t.password=y(i.password,s)),e.protocol===void 0&&e.hostname===void 0&&(t.hostname=y(i.hostname,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&(t.port=y(i.port,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&(t.pathname=y(i.pathname,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&(t.search=y(i.search.substring(1,i.search.length),s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&e.hash===void 0&&(t.hash=y(i.hash.substring(1,i.hash.length),s))}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if(typeof e.protocol=="string"&&(t.protocol=mt(e.protocol,s)),typeof e.username=="string"&&(t.username=ct(e.username,s)),typeof e.password=="string"&&(t.password=pt(e.password,s)),typeof e.hostname=="string"&&(t.hostname=ut(e.hostname,s)),typeof e.port=="string"&&(t.port=lt(e.port,t.protocol,s)),typeof e.pathname=="string"){if(t.pathname=e.pathname,i&&!nt(t.pathname,s)){let a=i.pathname.lastIndexOf("/");a>=0&&(t.pathname=y(i.pathname.substring(0,a+1),s)+t.pathname)}t.pathname=ft(t.pathname,t.protocol,s)}return typeof e.search=="string"&&(t.search=at(e.search,s)),typeof e.hash=="string"&&(t.hash=ht(e.hash,s)),t},A=function(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")},$t=function(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")},Et=function(t,e){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let s=".*",i=`[^${$t(e.delimiter)}]+?`,a=/[$_\u200C\u200D\p{ID_Continue}]/u,u="";for(let o=0;o<t.length;++o){let r=t[o];if(r.type===3){if(r.modifier===3){u+=A(r.value);continue}u+=`{${A(r.value)}}${k(r.modifier)}`;continue}let h=r.hasCustomName(),n=!!r.suffix.length||!!r.prefix.length&&(r.prefix.length!==1||!e.prefixes.includes(r.prefix)),f=o>0?t[o-1]:null,w=o<t.length-1?t[o+1]:null;if(!n&&h&&r.type===1&&r.modifier===3&&w&&!w.prefix.length&&!w.suffix.length)if(w.type===3){let E=w.value.length>0?w.value[0]:"";n=a.test(E)}else n=!w.hasCustomName();if(!n&&!r.prefix.length&&f&&f.type===3){let E=f.value[f.value.length-1];n=e.prefixes.includes(E)}n&&(u+="{"),u+=A(r.prefix),h&&(u+=`:${r.name}`),r.type===2?u+=`(${r.value})`:r.type===1?h||(u+=`(${i})`):r.type===0&&(!h&&(!f||f.type===3||f.modifier!==3||n||r.prefix!=="")?u+="*":u+=`(${s})`),r.type===1&&h&&r.suffix.length&&a.test(r.suffix[0])&&(u+="\\"),u+=A(r.suffix),n&&(u+="}"),r.modifier!==3&&(u+=k(r.modifier))}return u},P=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(t,e,s,i,a,u){this.type=t,this.name=e,this.prefix=s,this.value=i,this.suffix=a,this.modifier=u}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},Y=/[$_\p{ID_Start}]/u,tt=/[$_\u200C\u200D\p{ID_Continue}]/u,D=".*",$={delimiter:"",prefixes:"",sensitive:!0,strict:!0},rt={delimiter:".",prefixes:"",sensitive:!0,strict:!0},it={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0},X=["ftp","file","http","https","ws","wss"],xt=class{#n;#r=[];#e={};#t=0;#i=1;#u=0;#h=0;#l=0;#m=0;#d=!1;constructor(t){this.#n=t}get result(){return this.#e}parse(){for(this.#r=F(this.#n,!0);this.#t<this.#r.length;this.#t+=this.#i){if(this.#i=1,this.#r[this.#t].type==="END"){if(this.#h===0){this.#v(),this.#p()?this.#s(9,1):this.#c()?this.#s(8,1):this.#s(7,0);continue}else if(this.#h===2){this.#f(5);continue}this.#s(10,0);break}if(this.#l>0)if(this.#C())this.#l-=1;else continue;if(this.#k()){this.#l+=1;continue}switch(this.#h){case 0:this.#b()&&this.#f(1);break;case 1:if(this.#b()){this.#P();let t=7,e=1;this.#$()?(t=2,e=3):this.#d&&(t=2),this.#s(t,e)}break;case 2:this.#w()?this.#f(3):(this.#y()||this.#c()||this.#p())&&this.#f(5);break;case 3:this.#E()?this.#s(4,1):this.#w()&&this.#s(5,1);break;case 4:this.#w()&&this.#s(5,1);break;case 5:this.#L()?this.#m+=1:this.#A()&&(this.#m-=1),this.#R()&&!this.#m?this.#s(6,1):this.#y()?this.#s(7,0):this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 6:this.#y()?this.#s(7,0):this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 7:this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 8:this.#p()&&this.#s(9,1);break;case 9:break;case 10:break}}this.#e.hostname!==void 0&&this.#e.port===void 0&&(this.#e.port="")}#s(t,e){switch(this.#h){case 0:break;case 1:this.#e.protocol=this.#a();break;case 2:break;case 3:this.#e.username=this.#a();break;case 4:this.#e.password=this.#a();break;case 5:this.#e.hostname=this.#a();break;case 6:this.#e.port=this.#a();break;case 7:this.#e.pathname=this.#a();break;case 8:this.#e.search=this.#a();break;case 9:this.#e.hash=this.#a();break;case 10:break}this.#h!==0&&t!==10&&([1,2,3,4].includes(this.#h)&&[6,7,8,9].includes(t)&&(this.#e.hostname??=""),[1,2,3,4,5,6].includes(this.#h)&&[8,9].includes(t)&&(this.#e.pathname??=this.#d?"/":""),[1,2,3,4,5,6,7].includes(this.#h)&&t===9&&(this.#e.search??="")),this.#x(t,e)}#x(t,e){this.#h=t,this.#u=this.#t+e,this.#t+=e,this.#i=0}#v(){this.#t=this.#u,this.#i=0}#f(t){this.#v(),this.#h=t}#g(t){return t<0&&(t=this.#r.length-t),t<this.#r.length?this.#r[t]:this.#r[this.#r.length-1]}#o(t,e){let s=this.#g(t);return s.value===e&&(s.type==="CHAR"||s.type==="ESCAPED_CHAR"||s.type==="INVALID_CHAR")}#b(){return this.#o(this.#t,":")}#$(){return this.#o(this.#t+1,"/")&&this.#o(this.#t+2,"/")}#w(){return this.#o(this.#t,"@")}#E(){return this.#o(this.#t,":")}#R(){return this.#o(this.#t,":")}#y(){return this.#o(this.#t,"/")}#c(){if(this.#o(this.#t,"?"))return!0;if(this.#r[this.#t].value!=="?")return!1;let t=this.#g(this.#t-1);return t.type!=="NAME"&&t.type!=="REGEX"&&t.type!=="CLOSE"&&t.type!=="ASTERISK"}#p(){return this.#o(this.#t,"#")}#k(){return this.#r[this.#t].type=="OPEN"}#C(){return this.#r[this.#t].type=="CLOSE"}#L(){return this.#o(this.#t,"[")}#A(){return this.#o(this.#t,"]")}#a(){let t=this.#r[this.#t],e=this.#g(this.#u).index;return this.#n.substring(e,t.index)}#P(){let t={};Object.assign(t,$),t.encodePart=N;let e=st(this.#a(),void 0,t);this.#d=V(e)}},S=["protocol","username","password","hostname","port","pathname","search","hash"],x="*",J=class{#n;#r={};#e={};#t={};#i={};#u=!1;constructor(t={},e,s){try{let i;if(typeof e=="string"?i=e:s=e,typeof t=="string"){let r=new xt(t);if(r.parse(),t=r.result,i===void 0&&typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=i}else{if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(i)throw new TypeError("parameter 1 is not of type 'string'.")}typeof s>"u"&&(s={ignoreCase:!1});let a={ignoreCase:s.ignoreCase===!0},u={pathname:x,protocol:x,username:x,password:x,hostname:x,port:x,search:x,hash:x};this.#n=L(u,t,!0),z(this.#n.protocol)===this.#n.port&&(this.#n.port="");let o;for(o of S){if(!(o in this.#n))continue;let r={},h=this.#n[o];switch(this.#e[o]=[],o){case"protocol":Object.assign(r,$),r.encodePart=N;break;case"username":Object.assign(r,$),r.encodePart=dt;break;case"password":Object.assign(r,$),r.encodePart=gt;break;case"hostname":Object.assign(r,rt),K(h)?r.encodePart=q:r.encodePart=Z;break;case"port":Object.assign(r,$),r.encodePart=B;break;case"pathname":V(this.#r.protocol)?(Object.assign(r,it,a),r.encodePart=wt):(Object.assign(r,$,a),r.encodePart=yt);break;case"search":Object.assign(r,$,a),r.encodePart=vt;break;case"hash":Object.assign(r,$,a),r.encodePart=bt;break}try{this.#i[o]=M(h,r),this.#r[o]=W(this.#i[o],this.#e[o],r),this.#t[o]=Et(this.#i[o],r),this.#u=this.#u||this.#i[o].some((n)=>n.type===2)}catch{throw new TypeError(`invalid ${o} pattern '${this.#n[o]}'.`)}}}catch(i){throw new TypeError(`Failed to construct 'URLPattern': ${i.message}`)}}test(t={},e){let s={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return!1;try{typeof t=="object"?s=L(s,t,!1):s=L(s,H(t,e),!1)}catch{return!1}let i;for(i of S)if(!this.#r[i].exec(s[i]))return!1;return!0}exec(t={},e){let s={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return;try{typeof t=="object"?s=L(s,t,!1):s=L(s,H(t,e),!1)}catch{return null}let i={};e?i.inputs=[t,e]:i.inputs=[t];let a;for(a of S){let u=this.#r[a].exec(s[a]);if(!u)return null;let o={};for(let[r,h]of this.#e[a].entries())if(typeof h=="string"||typeof h=="number"){let n=u[r+1];o[h]=n}i[a]={input:s[a]??"",groups:o}}return i}static compareComponent(t,e,s){let i=(r,h)=>{for(let n of["type","modifier","prefix","value","suffix"]){if(r[n]<h[n])return-1;if(r[n]===h[n])continue;return 1}return 0},a=new P(3,"","","","",3),u=new P(0,"","","","",3),o=(r,h)=>{let n=0;for(;n<Math.min(r.length,h.length);++n){let f=i(r[n],h[n]);if(f)return f}return r.length===h.length?0:i(r[n]??a,h[n]??a)};return!e.#t[t]&&!s.#t[t]?0:e.#t[t]&&!s.#t[t]?o(e.#i[t],[u]):!e.#t[t]&&s.#t[t]?o([u],s.#i[t]):o(e.#i[t],s.#i[t])}get protocol(){return this.#t.protocol}get username(){return this.#t.username}get password(){return this.#t.password}get hostname(){return this.#t.hostname}get port(){return this.#t.port}get pathname(){return this.#t.pathname}get search(){return this.#t.search}get hash(){return this.#t.hash}get hasRegExpGroups(){return this.#u}};if(!globalThis.URLPattern)globalThis.URLPattern=J;function Tt(t){const e=t.toString(),s=new Bun.CryptoHasher("sha1");return s.update(e),s.digest("hex")}
2
+ export{J as x,Tt as y};