gemi 0.4.71 → 0.4.72

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