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