gemi 0.4.67 → 0.4.68
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-00234eac874c2722.js +2 -0
- package/dist/chunk-0b7a7410fce0b12e.js +9 -0
- package/dist/chunk-119ffcaf1c463b8d.js +6 -0
- package/dist/chunk-1ad1795e55abfdb5.js +2 -0
- package/dist/chunk-32af3a3a1c95157f.js +2 -0
- package/dist/chunk-4e9167391dd0d15f.js +2 -0
- package/dist/chunk-59da8b8ab8add738.js +16 -0
- package/dist/chunk-77c89e3c8a03f91e.js +2 -0
- package/dist/chunk-85a1f8fb96fd9473.js +2 -0
- package/dist/chunk-89291b5eb2bbd0b4.js +2 -0
- package/dist/chunk-915c050c94553981.js +2 -0
- package/dist/chunk-afbf69daa7589a52.js +2 -0
- package/dist/chunk-c210f6ae6276ebe8.js +1 -0
- package/dist/chunk-de0784c3310db458.js +5 -0
- package/dist/chunk-e0ffb920c65ebf44.js +2 -0
- package/dist/chunk-e755f2c1c7ad3912.js +2 -0
- package/dist/server/index.js +1 -1
- package/dist/storage/index.js +1 -10
- package/dist/vite/{index-s0zduTTb.mjs → index-CMpQi8Ml.mjs} +9 -5
- package/dist/vite/index.mjs +1 -1
- package/dist/vite/{typescript-CZ-I7GwY.mjs → typescript-DximJlM5.mjs} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{y,z} from"./chunk-7ce930fe69575c87.js";import{E as _9} from"./chunk-d7c78cd1ab7dc7ed.js";import{H as S,I as c$,J as WW,K as L6,M as $Z,N as H1,O as Z0,P as fZ,Q as UZ,R as X6} from"./chunk-de0784c3310db458.js";import{lb as f0} from"./chunk-c7e2acfd5087fb30.js";import{mb as df,nb as o} from"./chunk-c210f6ae6276ebe8.js";import{ob as v1} from"./chunk-1ad1795e55abfdb5.js";import{ub as C$} from"./chunk-069fcad61c8841dc.js";var J0=z((Z5,Wf)=>{var{defineProperty:v0,getOwnPropertyDescriptor:r8,getOwnPropertyNames:m8}=Object,l8=Object.prototype.hasOwnProperty,wf=($,f)=>v0($,"name",{value:f,configurable:!0}),o8=($,f)=>{for(var U in f)v0($,U,{get:f[U],enumerable:!0})},i8=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of m8(f))if(!l8.call($,G)&&G!==U)v0($,G,{get:()=>f[G],enumerable:!(w=r8(f,G))||w.enumerable})}return $},t8=($)=>i8(v0({},"__esModule",{value:!0}),$),Gf={};o8(Gf,{getSmithyContext:()=>e8,normalizeProvider:()=>a8});Wf.exports=t8(Gf);var Uf=f0(),e8=wf(($)=>$[Uf.SMITHY_CONTEXT_KEY]||($[Uf.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),a8=wf(($)=>{if(typeof $==="function")return $;const f=Promise.resolve($);return()=>f},"normalizeProvider")});var U0=z((Ef)=>{Object.defineProperty(Ef,"__esModule",{value:!0});Ef.getHomeDir=void 0;var $E=import.meta.require("os"),fE=import.meta.require("path"),j1={},UE=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},wE=()=>{const{HOME:$,USERPROFILE:f,HOMEPATH:U,HOMEDRIVE:w=`C:${fE.sep}`}=process.env;if($)return $;if(f)return f;if(U)return`${w}${U}`;const G=UE();if(!j1[G])j1[G]=$E.homedir();return j1[G]};Ef.getHomeDir=wE});var b1=z((Xf)=>{Object.defineProperty(Xf,"__esModule",{value:!0});Xf.getSSOTokenFilepath=void 0;var GE=import.meta.require("crypto"),WE=import.meta.require("path"),EE=U0(),LE=($)=>{const U=GE.createHash("sha1").update($).digest("hex");return WE.join(EE.getHomeDir(),".aws","sso","cache",`${U}.json`)};Xf.getSSOTokenFilepath=LE});var If=z((Zf)=>{Object.defineProperty(Zf,"__esModule",{value:!0});Zf.getSSOTokenFromFile=void 0;var XE=import.meta.require("fs"),ME=b1(),{readFile:ZE}=XE.promises,YE=async($)=>{const f=ME.getSSOTokenFilepath($),U=await ZE(f,"utf8");return JSON.parse(U)};Zf.getSSOTokenFromFile=YE});var h1=z((Ff)=>{Object.defineProperty(Ff,"__esModule",{value:!0});Ff.slurpFile=void 0;var IE=import.meta.require("fs"),{readFile:FE}=IE.promises,k1={},RE=($,f)=>{if(!k1[$]||(f===null||f===void 0?void 0:f.ignoreCache))k1[$]=FE($,"utf8");return k1[$]};Ff.slurpFile=RE});var x1=z((z5,K0)=>{var{defineProperty:p0,getOwnPropertyDescriptor:zE,getOwnPropertyNames:QE}=Object,JE=Object.prototype.hasOwnProperty,j=($,f)=>p0($,"name",{value:f,configurable:!0}),AE=($,f)=>{for(var U in f)p0($,U,{get:f[U],enumerable:!0})},D1=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of QE(f))if(!JE.call($,G)&&G!==U)p0($,G,{get:()=>f[G],enumerable:!(w=zE(f,G))||w.enumerable})}return $},_1=($,f,U)=>(D1($,f,"default"),U&&D1(U,f,"default")),KE=($)=>D1(p0({},"__esModule",{value:!0}),$),A0={};AE(A0,{CONFIG_PREFIX_SEPARATOR:()=>m,DEFAULT_PROFILE:()=>Af,ENV_PROFILE:()=>Jf,getProfileName:()=>BE,loadSharedConfigFiles:()=>Bf,loadSsoSessionData:()=>hE,parseKnownFiles:()=>cE});K0.exports=KE(A0);_1(A0,U0(),K0.exports);var Jf="AWS_PROFILE",Af="default",BE=j(($)=>$.profile||process.env[Jf]||Af,"getProfileName");_1(A0,b1(),K0.exports);_1(A0,If(),K0.exports);var u0=f0(),OE=j(($)=>Object.entries($).filter(([f])=>{const U=f.indexOf(m);if(U===-1)return!1;return Object.values(u0.IniSectionType).includes(f.substring(0,U))}).reduce((f,[U,w])=>{const G=U.indexOf(m),W=U.substring(0,G)===u0.IniSectionType.PROFILE?U.substring(G+1):U;return f[W]=w,f},{...$.default&&{default:$.default}}),"getConfigData"),y0=import.meta.require("path"),qE=U0(),TE="AWS_CONFIG_FILE",Kf=j(()=>process.env[TE]||y0.join(qE.getHomeDir(),".aws","config"),"getConfigFilepath"),HE=U0(),VE="AWS_SHARED_CREDENTIALS_FILE",CE=j(()=>process.env[VE]||y0.join(HE.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),NE=U0(),PE=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,SE=["__proto__","profile __proto__"],c1=j(($)=>{const f={};let U,w;for(let G of $.split(/\r?\n/)){const W=G.split(/(^|\s)[;#]/)[0].trim();if(W[0]==="["&&W[W.length-1]==="]"){U=void 0,w=void 0;const L=W.substring(1,W.length-1),X=PE.exec(L);if(X){const[,M,,Z]=X;if(Object.values(u0.IniSectionType).includes(M))U=[M,Z].join(m)}else U=L;if(SE.includes(L))throw new Error(`Found invalid profile name "${L}"`)}else if(U){const L=W.indexOf("=");if(![0,-1].includes(L)){const[X,M]=[W.substring(0,L).trim(),W.substring(L+1).trim()];if(M==="")w=X;else{if(w&&G.trimStart()===G)w=void 0;f[U]=f[U]||{};const Z=w?[w,X].join(m):X;f[U][Z]=M}}}}return f},"parseIni"),zf=h1(),Qf=j(()=>({}),"swallowError"),m=".",Bf=j(async($={})=>{const{filepath:f=CE(),configFilepath:U=Kf()}=$,w=NE.getHomeDir();let W=f;if(f.startsWith("~/"))W=y0.join(w,f.slice(2));let E=U;if(U.startsWith("~/"))E=y0.join(w,U.slice(2));const L=await Promise.all([zf.slurpFile(E,{ignoreCache:$.ignoreCache}).then(c1).then(OE).catch(Qf),zf.slurpFile(W,{ignoreCache:$.ignoreCache}).then(c1).catch(Qf)]);return{configFile:L[0],credentialsFile:L[1]}},"loadSharedConfigFiles"),jE=j(($)=>Object.entries($).filter(([f])=>f.startsWith(u0.IniSectionType.SSO_SESSION+m)).reduce((f,[U,w])=>({...f,[U.substring(U.indexOf(m)+1)]:w}),{}),"getSsoSessionData"),bE=h1(),kE=j(()=>({}),"swallowError"),hE=j(async($={})=>bE.slurpFile($.configFilepath??Kf()).then(c1).then(jE).catch(kE),"loadSsoSessionData"),DE=j((...$)=>{const f={};for(let U of $)for(let[w,G]of Object.entries(U))if(f[w]!==void 0)Object.assign(f[w],G);else f[w]=G;return f},"mergeConfigFiles"),cE=j(async($)=>{const f=await Bf($);return DE(f.configFile,f.credentialsFile)},"parseKnownFiles")});var Hf=z((Q5,Tf)=>{var u1=function($){try{const f=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return f.delete("CONFIG"),f.delete("CONFIG_PREFIX_SEPARATOR"),f.delete("ENV"),[...f].join(", ")}catch(f){return $}},d0=Object.defineProperty,_E=Object.getOwnPropertyDescriptor,xE=Object.getOwnPropertyNames,vE=Object.prototype.hasOwnProperty,w0=($,f)=>d0($,"name",{value:f,configurable:!0}),uE=($,f)=>{for(var U in f)d0($,U,{get:f[U],enumerable:!0})},yE=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of xE(f))if(!vE.call($,G)&&G!==U)d0($,G,{get:()=>f[G],enumerable:!(w=_E(f,G))||w.enumerable})}return $},pE=($)=>yE(d0({},"__esModule",{value:!0}),$),qf={};uE(qf,{loadConfig:()=>rE});Tf.exports=pE(qf);var B0=v1();w0(u1,"getSelectorName");var dE=w0(($,f)=>async()=>{try{const U=$(process.env);if(U===void 0)throw new Error;return U}catch(U){throw new B0.CredentialsProviderError(U.message||`Not found in ENV: ${u1($.toString())}`,{logger:f})}},"fromEnv"),Of=x1(),gE=w0(($,{preferredFile:f="config",...U}={})=>async()=>{const w=Of.getProfileName(U),{configFile:G,credentialsFile:W}=await Of.loadSharedConfigFiles(U),E=W[w]||{},L=G[w]||{},X=f==="config"?{...E,...L}:{...L,...E};try{const Z=$(X,f==="config"?G:W);if(Z===void 0)throw new Error;return Z}catch(M){throw new B0.CredentialsProviderError(M.message||`Not found in config files w/ profile [${w}]: ${u1($.toString())}`,{logger:U.logger})}},"fromSharedConfigFiles"),sE=w0(($)=>typeof $==="function","isFunction"),nE=w0(($)=>sE($)?async()=>await $():B0.fromStatic($),"fromStatic"),rE=w0(({environmentVariableSelector:$,configFileSelector:f,default:U},w={})=>B0.memoize(B0.chain(dE($),gE(f,w),nE(U))),"loadConfig")});var jf=z((Pf)=>{Object.defineProperty(Pf,"__esModule",{value:!0});Pf.getEndpointUrlConfig=void 0;var Vf=x1(),Cf="AWS_ENDPOINT_URL",Nf="endpoint_url",mE=($)=>({environmentVariableSelector:(f)=>{const U=$.split(" ").map((W)=>W.toUpperCase()),w=f[[Cf,...U].join("_")];if(w)return w;const G=f[Cf];if(G)return G;return},configFileSelector:(f,U)=>{if(U&&f.services){const G=U[["services",f.services].join(Vf.CONFIG_PREFIX_SEPARATOR)];if(G){const W=$.split(" ").map((L)=>L.toLowerCase()),E=G[[W.join("_"),Nf].join(Vf.CONFIG_PREFIX_SEPARATOR)];if(E)return E}}const w=f[Nf];if(w)return w;return},default:void 0});Pf.getEndpointUrlConfig=mE});var hf=z((bf)=>{Object.defineProperty(bf,"__esModule",{value:!0});bf.getEndpointFromConfig=void 0;var lE=Hf(),oE=jf(),iE=async($)=>lE.loadConfig(oE.getEndpointUrlConfig($))();bf.getEndpointFromConfig=iE});var p1=z((K5,yf)=>{var uf=function($,f,U){return{applyToStack:(w)=>{w.add(cf($,U),xf),w.add(_f($,f),vf)}}},g0=Object.defineProperty,tE=Object.getOwnPropertyDescriptor,eE=Object.getOwnPropertyNames,aE=Object.prototype.hasOwnProperty,y1=($,f)=>g0($,"name",{value:f,configurable:!0}),$4=($,f)=>{for(var U in f)g0($,U,{get:f[U],enumerable:!0})},f4=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of eE(f))if(!aE.call($,G)&&G!==U)g0($,G,{get:()=>f[G],enumerable:!(w=tE(f,G))||w.enumerable})}return $},U4=($)=>f4(g0({},"__esModule",{value:!0}),$),Df={};$4(Df,{deserializerMiddleware:()=>cf,deserializerMiddlewareOption:()=>xf,getSerdePlugin:()=>uf,serializerMiddleware:()=>_f,serializerMiddlewareOption:()=>vf});yf.exports=U4(Df);var cf=y1(($,f)=>(U)=>async(w)=>{const{response:G}=await U(w);try{const W=await f(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"),_f=y1(($,f)=>(U,w)=>async(G)=>{var W;const E=((W=w.endpointV2)==null?void 0:W.url)&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!E)throw new Error("No valid endpoint provider available.");const L=await f(G.input,{...$,endpoint:E});return U({...G,request:L})},"serializerMiddleware"),xf={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},vf={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};y1(uf,"getSerdePlugin")});var of=z((B5,lf)=>{var{defineProperty:n0,getOwnPropertyDescriptor:w4,getOwnPropertyNames:G4}=Object,W4=Object.prototype.hasOwnProperty,k=($,f)=>n0($,"name",{value:f,configurable:!0}),E4=($,f)=>{for(var U in f)n0($,U,{get:f[U],enumerable:!0})},L4=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of G4(f))if(!W4.call($,G)&&G!==U)n0($,G,{get:()=>f[G],enumerable:!(w=w4(f,G))||w.enumerable})}return $},X4=($)=>L4(n0({},"__esModule",{value:!0}),$),gf={};E4(gf,{endpointMiddleware:()=>rf,endpointMiddlewareOptions:()=>mf,getEndpointFromInstructions:()=>sf,getEndpointPlugin:()=>A4,resolveEndpointConfig:()=>K4,resolveParams:()=>nf,toEndpointV1:()=>d1});lf.exports=X4(gf);var M4=k(async($)=>{const f=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=f.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(R4(f)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!F4(f)||f.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||f.toLowerCase()!==f||f.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),Z4=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Y4=/(\d+\.){3}\d+/,I4=/\.\./,F4=k(($)=>Z4.test($)&&!Y4.test($)&&!I4.test($),"isDnsCompatibleBucketName"),R4=k(($)=>{const[f,U,w,,,G]=$.split(":"),W=f==="arn"&&$.split(":").length>=6,E=Boolean(W&&U&&w&&G);if(W&&!E)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return E},"isArnBucketName"),z4=k(($,f,U)=>{const w=k(async()=>{const G=U[$]??U[f];if(typeof G==="function")return G();return G},"configProvider");if($==="credentialScope"||f==="CredentialScope")return async()=>{const G=typeof U.credentials==="function"?await U.credentials():U.credentials;return(G==null?void 0:G.credentialScope)??(G==null?void 0:G.CredentialScope)};if($==="accountId"||f==="AccountId")return async()=>{const G=typeof U.credentials==="function"?await U.credentials():U.credentials;return(G==null?void 0:G.accountId)??(G==null?void 0:G.AccountId)};if($==="endpoint"||f==="endpoint")return async()=>{const G=await w();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 w},"createConfigValueProvider"),Q4=hf(),pf=df(),d1=k(($)=>{if(typeof $==="object"){if("url"in $)return pf.parseUrl($.url);return $}return pf.parseUrl($)},"toEndpointV1"),sf=k(async($,f,U,w)=>{if(!U.endpoint){const E=await Q4.getEndpointFromConfig(U.serviceId||"");if(E)U.endpoint=()=>Promise.resolve(d1(E))}const G=await nf($,f,U);if(typeof U.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return U.endpointProvider(G,w)},"getEndpointFromInstructions"),nf=k(async($,f,U)=>{var w;const G={},W=((w=f==null?void 0:f.getEndpointParameterInstructions)==null?void 0:w.call(f))||{};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 z4(L.name,E,U)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(W).length===0)Object.assign(G,U);if(String(U.serviceId).toLowerCase()==="s3")await M4(G);return G},"resolveParams"),s0=J0(),rf=k(({config:$,instructions:f})=>{return(U,w)=>async(G)=>{var W,E,L;const X=await sf(G.input,{getEndpointParameterInstructions(){return f}},{...$},w);w.endpointV2=X,w.authSchemes=(W=X.properties)==null?void 0:W.authSchemes;const M=(E=w.authSchemes)==null?void 0:E[0];if(M){w.signing_region=M.signingRegion,w.signing_service=M.signingName;const Z=s0.getSmithyContext(w),Y=(L=Z==null?void 0:Z.selectedHttpAuthScheme)==null?void 0:L.httpAuthOption;if(Y)Y.signingProperties=Object.assign(Y.signingProperties||{},{signing_region:M.signingRegion,signingRegion:M.signingRegion,signing_service:M.signingName,signingName:M.signingName,signingRegionSet:M.signingRegionSet},M.properties)}return U({...G})}},"endpointMiddleware"),J4=p1(),mf={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:J4.serializerMiddlewareOption.name},A4=k(($,f)=>({applyToStack:(U)=>{U.addRelativeTo(rf({config:$,instructions:f}),mf)}}),"getEndpointPlugin"),K4=k(($)=>{const f=$.tls??!0,{endpoint:U}=$,w=U!=null?async()=>d1(await s0.normalizeProvider(U)()):void 0;return{...$,endpoint:w,tls:f,isCustomEndpoint:!!U,useDualstackEndpoint:s0.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:s0.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var g1=z((tf)=>{var O4=function($){return $&&$.__esModule?$:{default:$}},q4=function(){if(r0>m0.length-16)B4.default.randomFillSync(m0),r0=0;return m0.slice(r0,r0+=16)};Object.defineProperty(tf,"__esModule",{value:!0});tf.default=q4;var B4=O4(import.meta.require("crypto")),m0=new Uint8Array(256),r0=m0.length});var $U=z((ef)=>{Object.defineProperty(ef,"__esModule",{value:!0});ef.default=void 0;var H4=/^(?:[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;ef.default=H4});var O0=z((fU)=>{var C4=function($){return $&&$.__esModule?$:{default:$}},N4=function($){return typeof $==="string"&&V4.default.test($)};Object.defineProperty(fU,"__esModule",{value:!0});fU.default=void 0;var V4=C4($U()),P4=N4;fU.default=P4});var q0=z((GU)=>{var j4=function($){return $&&$.__esModule?$:{default:$}},wU=function($,f=0){return V[$[f+0]]+V[$[f+1]]+V[$[f+2]]+V[$[f+3]]+"-"+V[$[f+4]]+V[$[f+5]]+"-"+V[$[f+6]]+V[$[f+7]]+"-"+V[$[f+8]]+V[$[f+9]]+"-"+V[$[f+10]]+V[$[f+11]]+V[$[f+12]]+V[$[f+13]]+V[$[f+14]]+V[$[f+15]]},b4=function($,f=0){const U=wU($,f);if(!S4.default(U))throw TypeError("Stringified UUID is invalid");return U};Object.defineProperty(GU,"__esModule",{value:!0});GU.default=void 0;GU.unsafeStringify=wU;var S4=j4(O0()),V=[];for(let $=0;$<256;++$)V.push(($+256).toString(16).slice(1));var k4=b4;GU.default=k4});var MU=z((LU)=>{var _4=function($){return $&&$.__esModule?$:{default:$}},x4=function($,f,U){let w=f&&U||0;const G=f||new Array(16);$=$||{};let W=$.node||EU,E=$.clockseq!==void 0?$.clockseq:s1;if(W==null||E==null){const F=$.random||($.rng||D4.default)();if(W==null)W=EU=[F[0]|1,F[1],F[2],F[3],F[4],F[5]];if(E==null)E=s1=(F[6]<<8|F[7])&16383}let L=$.msecs!==void 0?$.msecs:Date.now(),X=$.nsecs!==void 0?$.nsecs:r1+1;const M=L-n1+(X-r1)/1e4;if(M<0&&$.clockseq===void 0)E=E+1&16383;if((M<0||L>n1)&&$.nsecs===void 0)X=0;if(X>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");n1=L,r1=X,s1=E,L+=12219292800000;const Z=((L&268435455)*1e4+X)%4294967296;G[w++]=Z>>>24&255,G[w++]=Z>>>16&255,G[w++]=Z>>>8&255,G[w++]=Z&255;const Y=L/4294967296*1e4&268435455;G[w++]=Y>>>8&255,G[w++]=Y&255,G[w++]=Y>>>24&15|16,G[w++]=Y>>>16&255,G[w++]=E>>>8|128,G[w++]=E&255;for(let F=0;F<6;++F)G[w+F]=W[F];return f||c4.unsafeStringify(G)};Object.defineProperty(LU,"__esModule",{value:!0});LU.default=void 0;var D4=_4(g1()),c4=q0(),EU,s1,n1=0,r1=0,v4=x4;LU.default=v4});var m1=z((ZU)=>{var y4=function($){return $&&$.__esModule?$:{default:$}},p4=function($){if(!u4.default($))throw TypeError("Invalid UUID");let f;const U=new Uint8Array(16);return U[0]=(f=parseInt($.slice(0,8),16))>>>24,U[1]=f>>>16&255,U[2]=f>>>8&255,U[3]=f&255,U[4]=(f=parseInt($.slice(9,13),16))>>>8,U[5]=f&255,U[6]=(f=parseInt($.slice(14,18),16))>>>8,U[7]=f&255,U[8]=(f=parseInt($.slice(19,23),16))>>>8,U[9]=f&255,U[10]=(f=parseInt($.slice(24,36),16))/1099511627776&255,U[11]=f/4294967296&255,U[12]=f>>>24&255,U[13]=f>>>16&255,U[14]=f>>>8&255,U[15]=f&255,U};Object.defineProperty(ZU,"__esModule",{value:!0});ZU.default=void 0;var u4=y4(O0()),d4=p4;ZU.default=d4});var l1=z((RU)=>{var n4=function($){return $&&$.__esModule?$:{default:$}},r4=function($){$=unescape(encodeURIComponent($));const f=[];for(let U=0;U<$.length;++U)f.push($.charCodeAt(U));return f},m4=function($,f,U){function w(G,W,E,L){var X;if(typeof G==="string")G=r4(G);if(typeof W==="string")W=s4.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 M=new Uint8Array(16+G.length);if(M.set(W),M.set(G,W.length),M=U(M),M[6]=M[6]&15|f,M[8]=M[8]&63|128,E){L=L||0;for(let Z=0;Z<16;++Z)E[L+Z]=M[Z];return E}return g4.unsafeStringify(M)}try{w.name=$}catch(G){}return w.DNS=IU,w.URL=FU,w};Object.defineProperty(RU,"__esModule",{value:!0});RU.URL=RU.DNS=void 0;RU.default=m4;var g4=q0(),s4=n4(m1()),IU="6ba7b810-9dad-11d1-80b4-00c04fd430c8";RU.DNS=IU;var FU="6ba7b811-9dad-11d1-80b4-00c04fd430c8";RU.URL=FU});var AU=z((QU)=>{var t4=function($){return $&&$.__esModule?$:{default:$}},e4=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return i4.default.createHash("md5").update($).digest()};Object.defineProperty(QU,"__esModule",{value:!0});QU.default=void 0;var i4=t4(import.meta.require("crypto")),a4=e4;QU.default=a4});var qU=z((BU)=>{var KU=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(BU,"__esModule",{value:!0});BU.default=void 0;var $L=KU(l1()),fL=KU(AU()),UL=$L.default("v3",48,fL.default),wL=UL;BU.default=wL});var VU=z((TU)=>{var WL=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(TU,"__esModule",{value:!0});TU.default=void 0;var GL=WL(import.meta.require("crypto")),EL={randomUUID:GL.default.randomUUID};TU.default=EL});var jU=z((PU)=>{var NU=function($){return $&&$.__esModule?$:{default:$}},ML=function($,f,U){if(CU.default.randomUUID&&!f&&!$)return CU.default.randomUUID();$=$||{};const w=$.random||($.rng||LL.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,f){U=U||0;for(let G=0;G<16;++G)f[U+G]=w[G];return f}return XL.unsafeStringify(w)};Object.defineProperty(PU,"__esModule",{value:!0});PU.default=void 0;var CU=NU(VU()),LL=NU(g1()),XL=q0(),ZL=ML;PU.default=ZL});var hU=z((bU)=>{var IL=function($){return $&&$.__esModule?$:{default:$}},FL=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return YL.default.createHash("sha1").update($).digest()};Object.defineProperty(bU,"__esModule",{value:!0});bU.default=void 0;var YL=IL(import.meta.require("crypto")),RL=FL;bU.default=RL});var xU=z((cU)=>{var DU=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(cU,"__esModule",{value:!0});cU.default=void 0;var zL=DU(l1()),QL=DU(hU()),JL=zL.default("v5",80,QL.default),AL=JL;cU.default=AL});var yU=z((vU)=>{Object.defineProperty(vU,"__esModule",{value:!0});vU.default=void 0;var KL="00000000-0000-0000-0000-000000000000";vU.default=KL});var gU=z((pU)=>{var OL=function($){return $&&$.__esModule?$:{default:$}},qL=function($){if(!BL.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(pU,"__esModule",{value:!0});pU.default=void 0;var BL=OL(O0()),TL=qL;pU.default=TL});var o1=z((h)=>{var v=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(h,"__esModule",{value:!0});Object.defineProperty(h,"NIL",{enumerable:!0,get:function(){return PL.default}});Object.defineProperty(h,"parse",{enumerable:!0,get:function(){return kL.default}});Object.defineProperty(h,"stringify",{enumerable:!0,get:function(){return bL.default}});Object.defineProperty(h,"v1",{enumerable:!0,get:function(){return HL.default}});Object.defineProperty(h,"v3",{enumerable:!0,get:function(){return VL.default}});Object.defineProperty(h,"v4",{enumerable:!0,get:function(){return CL.default}});Object.defineProperty(h,"v5",{enumerable:!0,get:function(){return NL.default}});Object.defineProperty(h,"validate",{enumerable:!0,get:function(){return jL.default}});Object.defineProperty(h,"version",{enumerable:!0,get:function(){return SL.default}});var HL=v(MU()),VL=v(qU()),CL=v(jU()),NL=v(xU()),PL=v(yU()),SL=v(gU()),jL=v(O0()),bL=v(q0()),kL=v(m1())});var l=z((x5,mU)=>{var{defineProperty:l0,getOwnPropertyDescriptor:hL,getOwnPropertyNames:DL}=Object,cL=Object.prototype.hasOwnProperty,G0=($,f)=>l0($,"name",{value:f,configurable:!0}),_L=($,f)=>{for(var U in f)l0($,U,{get:f[U],enumerable:!0})},xL=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of DL(f))if(!cL.call($,G)&&G!==U)l0($,G,{get:()=>f[G],enumerable:!(w=hL(f,G))||w.enumerable})}return $},vL=($)=>xL(l0({},"__esModule",{value:!0}),$),sU={};_L(sU,{isClockSkewCorrectedError:()=>nU,isClockSkewError:()=>nL,isRetryableByTrait:()=>sL,isServerError:()=>mL,isThrottlingError:()=>rL,isTransientError:()=>rU});mU.exports=vL(sU);var uL=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],yL=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],pL=["TimeoutError","RequestTimeout","RequestTimeoutException"],dL=[500,502,503,504],gL=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],sL=G0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),nL=G0(($)=>uL.includes($.name),"isClockSkewError"),nU=G0(($)=>{var f;return(f=$.$metadata)==null?void 0:f.clockSkewCorrected},"isClockSkewCorrectedError"),rL=G0(($)=>{var f,U;return((f=$.$metadata)==null?void 0:f.httpStatusCode)===429||yL.includes($.name)||((U=$.$retryable)==null?void 0:U.throttling)==!0},"isThrottlingError"),rU=G0(($)=>{var f;return nU($)||pL.includes($.name)||gL.includes(($==null?void 0:$.code)||"")||dL.includes(((f=$.$metadata)==null?void 0:f.httpStatusCode)||0)},"isTransientError"),mL=G0(($)=>{var f;if(((f=$.$metadata)==null?void 0:f.httpStatusCode)!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!rU($))return!0;return!1}return!1},"isServerError")});var Lw=z((v5,Ew)=>{var{defineProperty:o0,getOwnPropertyDescriptor:lL,getOwnPropertyNames:oL}=Object,iL=Object.prototype.hasOwnProperty,D=($,f)=>o0($,"name",{value:f,configurable:!0}),tL=($,f)=>{for(var U in f)o0($,U,{get:f[U],enumerable:!0})},eL=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of oL(f))if(!iL.call($,G)&&G!==U)o0($,G,{get:()=>f[G],enumerable:!(w=lL(f,G))||w.enumerable})}return $},aL=($)=>eL(o0({},"__esModule",{value:!0}),$),oU={};tL(oU,{AdaptiveRetryStrategy:()=>W6,ConfiguredRetryStrategy:()=>E6,DEFAULT_MAX_ATTEMPTS:()=>i1,DEFAULT_RETRY_DELAY_BASE:()=>T0,DEFAULT_RETRY_MODE:()=>$6,DefaultRateLimiter:()=>eU,INITIAL_RETRY_TOKENS:()=>t1,INVOCATION_ID_HEADER:()=>U6,MAXIMUM_RETRY_DELAY:()=>e1,NO_RETRY_INCREMENT:()=>Uw,REQUEST_HEADER:()=>w6,RETRY_COST:()=>$w,RETRY_MODES:()=>iU,StandardRetryStrategy:()=>a1,THROTTLING_RETRY_DELAY_BASE:()=>aU,TIMEOUT_RETRY_COST:()=>fw});Ew.exports=aL(oU);var iU=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(iU||{}),i1=3,$6="standard",f6=l(),tU=class ${constructor(f){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(f==null?void 0:f.beta)??0.7,this.minCapacity=(f==null?void 0:f.minCapacity)??1,this.minFillRate=(f==null?void 0:f.minFillRate)??0.5,this.scaleConstant=(f==null?void 0:f.scaleConstant)??0.4,this.smooth=(f==null?void 0:f.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(f){if(!this.enabled)return;if(this.refillTokenBucket(),f>this.currentCapacity){const U=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,U))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){const f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}const U=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=f}updateClientSendingRate(f){let U;if(this.updateMeasuredRate(),f6.isThrottlingError(f)){const G=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=G,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(G),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(f){return this.getPrecise(f*this.beta)}cubicSuccess(f){return this.getPrecise(this.scaleConstant*Math.pow(f-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(f){this.refillTokenBucket(),this.fillRate=Math.max(f,this.minFillRate),this.maxCapacity=Math.max(f,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const f=this.getCurrentTimeInSeconds(),U=Math.floor(f*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(f){return parseFloat(f.toFixed(8))}};D(tU,"DefaultRateLimiter");var eU=tU,T0=100,e1=20000,aU=500,t1=500,$w=5,fw=10,Uw=1,U6="amz-sdk-invocation-id",w6="amz-sdk-request",G6=D(()=>{let $=T0;return{computeNextBackoffDelay:D((w)=>{return Math.floor(Math.min(e1,Math.random()*2**w*$))},"computeNextBackoffDelay"),setDelayBase:D((w)=>{$=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),lU=D(({retryDelay:$,retryCount:f,retryCost:U})=>{return{getRetryCount:D(()=>f,"getRetryCount"),getRetryDelay:D(()=>Math.min(e1,$),"getRetryDelay"),getRetryCost:D(()=>U,"getRetryCost")}},"createDefaultRetryToken"),ww=class ${constructor(f){this.maxAttempts=f,this.mode="standard",this.capacity=t1,this.retryBackoffStrategy=G6(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return lU({retryDelay:T0,retryCount:0})}async refreshRetryTokenForRetry(f,U){const w=await this.getMaxAttempts();if(this.shouldRetry(f,U,w)){const G=U.errorType;this.retryBackoffStrategy.setDelayBase(G==="THROTTLING"?aU:T0);const W=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),E=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,W):W,L=this.getCapacityCost(G);return this.capacity-=L,lU({retryDelay:E,retryCount:f.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(t1,this.capacity+(f.getRetryCost()??Uw))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(f){return console.warn(`Max attempts provider could not resolve. Using default of ${i1}`),i1}}shouldRetry(f,U,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost(f){return f==="TRANSIENT"?fw:$w}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}};D(ww,"StandardRetryStrategy");var a1=ww,Gw=class ${constructor(f,U){this.maxAttemptsProvider=f,this.mode="adaptive";const{rateLimiter:w}=U??{};this.rateLimiter=w??new eU,this.standardRetryStrategy=new a1(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry(f,U)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}};D(Gw,"AdaptiveRetryStrategy");var W6=Gw,Ww=class $ extends a1{constructor(f,U=T0){super(typeof f==="function"?f:async()=>f);if(typeof U==="number")this.computeNextBackoffDelay=()=>U;else this.computeNextBackoffDelay=U}async refreshRetryTokenForRetry(f,U){const w=await super.refreshRetryTokenForRetry(f,U);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};D(Ww,"ConfiguredRetryStrategy");var E6=Ww});var X0=z((u5,jw)=>{var Ow=function($){const f=$.getUTCFullYear(),U=$.getUTCMonth(),w=$.getUTCDay(),G=$.getUTCDate(),W=$.getUTCHours(),E=$.getUTCMinutes(),L=$.getUTCSeconds(),X=G<10?`0${G}`:`${G}`,M=W<10?`0${W}`:`${W}`,Z=E<10?`0${E}`:`${E}`,Y=L<10?`0${L}`:`${L}`;return`${_6[w]}, ${X} ${Z$[U]} ${f} ${M}:${Z}:${Y} GMT`},e0=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(f){return"%"+f.charCodeAt(0).toString(16).toUpperCase()})},Y$=function($,f,U){let w,G,W;if(typeof f==="undefined"&&typeof U==="undefined")w={},W=$;else if(w=$,typeof f==="function")return G=f,W=U,zX(w,G,W);else W=f;for(let E of Object.keys(W)){if(!Array.isArray(W[E])){w[E]=W[E];continue}Pw(w,null,W,E)}return w},Sw=function($,f,U){if(U<=0||!Number.isInteger(U))throw new Error("Invalid number of delimiters ("+U+") for splitEvery.");const w=$.split(f);if(U===1)return w;const G=[];let W="";for(let E=0;E<w.length;E++){if(W==="")W=w[E];else W+=f+w[E];if((E+1)%U===0)G.push(W),W=""}if(W!=="")G.push(W);return G},a0=Object.defineProperty,M6=Object.getOwnPropertyDescriptor,Z6=Object.getOwnPropertyNames,Y6=Object.prototype.hasOwnProperty,I=($,f)=>a0($,"name",{value:f,configurable:!0}),I6=($,f)=>{for(var U in f)a0($,U,{get:f[U],enumerable:!0})},F6=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of Z6(f))if(!Y6.call($,G)&&G!==U)a0($,G,{get:()=>f[G],enumerable:!(w=M6(f,G))||w.enumerable})}return $},R6=($)=>F6(a0({},"__esModule",{value:!0}),$),Mw={};I6(Mw,{Client:()=>Q6,Command:()=>Rw,LazyJsonString:()=>IX,NoOpLogger:()=>z6,SENSITIVE_STRING:()=>K6,ServiceException:()=>$X,StringWrapper:()=>P0,_json:()=>E$,collectBody:()=>J6,convertMap:()=>FX,createAggregatedClient:()=>B6,dateToUtcString:()=>Ow,decorateServiceException:()=>Tw,emitWarningIfUnsupportedVersion:()=>GX,expectBoolean:()=>q6,expectByte:()=>W$,expectFloat32:()=>i0,expectInt:()=>H6,expectInt32:()=>w$,expectLong:()=>C0,expectNonNull:()=>C6,expectNumber:()=>V0,expectObject:()=>Qw,expectShort:()=>G$,expectString:()=>N6,expectUnion:()=>P6,extendedEncodeURIComponent:()=>e0,getArrayIfSingleItem:()=>YX,getDefaultClientConfiguration:()=>MX,getDefaultExtensionConfiguration:()=>Vw,getValueFromTextNode:()=>Cw,handleFloat:()=>b6,limitedParseDouble:()=>M$,limitedParseFloat:()=>k6,limitedParseFloat32:()=>h6,loadConfigsForDefaultMode:()=>wX,logger:()=>N0,map:()=>Y$,parseBoolean:()=>O6,parseEpochTimestamp:()=>n6,parseRfc3339DateTime:()=>v6,parseRfc3339DateTimeWithOffset:()=>y6,parseRfc7231DateTime:()=>s6,resolveDefaultRuntimeConfig:()=>ZX,resolvedPath:()=>AX,serializeDateTime:()=>BX,serializeFloat:()=>KX,splitEvery:()=>Sw,strictParseByte:()=>Bw,strictParseDouble:()=>X$,strictParseFloat:()=>S6,strictParseFloat32:()=>Jw,strictParseInt:()=>D6,strictParseInt32:()=>c6,strictParseLong:()=>Kw,strictParseShort:()=>W0,take:()=>RX,throwDefaultError:()=>Hw,withBaseException:()=>fX});jw.exports=R6(Mw);var Zw=class ${trace(){}debug(){}info(){}warn(){}error(){}};I(Zw,"NoOpLogger");var z6=Zw,Yw=L6(),Iw=class ${constructor(f){this.middlewareStack=Yw.constructStack(),this.config=f}send(f,U,w){const G=typeof U!=="function"?U:void 0,W=typeof U==="function"?U:w,E=f.resolveMiddleware(this.middlewareStack,this.config,G);if(W)E(f).then((L)=>W(null,L.output),(L)=>W(L)).catch(()=>{});else return E(f).then((L)=>L.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};I(Iw,"Client");var Q6=Iw,$$=X6(),J6=I(async($=new Uint8Array,f)=>{if($ instanceof Uint8Array)return $$.Uint8ArrayBlobAdapter.mutate($);if(!$)return $$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const U=f.streamCollector($);return $$.Uint8ArrayBlobAdapter.mutate(await U)},"collectBody"),U$=f0(),Fw=class ${constructor(){this.middlewareStack=Yw.constructStack()}static classBuilder(){return new A6}resolveMiddlewareWithContext(f,U,w,{middlewareFn:G,clientName:W,commandName:E,inputFilterSensitiveLog:L,outputFilterSensitiveLog:X,smithyContext:M,additionalContext:Z,CommandCtor:Y}){for(let q of G.bind(this)(Y,f,U,w))this.middlewareStack.use(q);const F=f.concat(this.middlewareStack),{logger:R}=U,Q={logger:R,clientName:W,commandName:E,inputFilterSensitiveLog:L,outputFilterSensitiveLog:X,[U$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...M},...Z},{requestHandler:J}=U;return F.resolve((q)=>J.handle(q.request,w||{}),Q)}};I(Fw,"Command");var Rw=Fw,zw=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(f)=>f,this._outputFilterSensitiveLog=(f)=>f,this._serializer=null,this._deserializer=null}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,U,w={}){return this._smithyContext={service:f,operation:U,...w},this}c(f={}){return this._additionalContext=f,this}n(f,U){return this._clientName=f,this._commandName=U,this}f(f=(w)=>w,U=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=U,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){var f;const U=this;let w;return w=(f=class extends Rw{constructor(...[G]){super();this.serialize=U._serializer,this.deserialize=U._deserializer,this.input=G??{},U._init(this)}static getEndpointParameterInstructions(){return U._ep}resolveMiddleware(G,W,E){return this.resolveMiddlewareWithContext(G,W,E,{CommandCtor:w,middlewareFn:U._middlewareFn,clientName:U._clientName,commandName:U._commandName,inputFilterSensitiveLog:U._inputFilterSensitiveLog,outputFilterSensitiveLog:U._outputFilterSensitiveLog,smithyContext:U._smithyContext,additionalContext:U._additionalContext})}},I(f,"CommandRef"),f)}};I(zw,"ClassBuilder");var A6=zw,K6="***SensitiveInformation***",B6=I(($,f)=>{for(let U of Object.keys($)){const w=$[U],G=I(async function(E,L,X){const M=new w(E);if(typeof L==="function")this.send(M,L);else if(typeof X==="function"){if(typeof L!=="object")throw new Error(`Expected http options but got ${typeof L}`);this.send(M,L||{},X)}else return this.send(M,L)},"methodImpl"),W=(U[0].toLowerCase()+U.slice(1)).replace(/Command$/,"");f.prototype[W]=G}},"createAggregatedClient"),O6=I(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),q6=I(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)N0.warn(t0(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const f=$.toLowerCase();if(f==="false"||f==="true")N0.warn(t0(`Expected boolean, got ${typeof $}: ${$}`));if(f==="false")return!1;if(f==="true")return!0}if(typeof $==="boolean")return $;throw new TypeError(`Expected boolean, got ${typeof $}: ${$}`)},"expectBoolean"),V0=I(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const f=parseFloat($);if(!Number.isNaN(f)){if(String(f)!==String($))N0.warn(t0(`Expected number but observed string: ${$}`));return f}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),T6=Math.ceil(340282346638528860000000000000000000000),i0=I(($)=>{const f=V0($);if(f!==void 0&&!Number.isNaN(f)&&f!==Infinity&&f!==(-Infinity)){if(Math.abs(f)>T6)throw new TypeError(`Expected 32-bit float, got ${$}`)}return f},"expectFloat32"),C0=I(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),H6=C0,w$=I(($)=>L$($,32),"expectInt32"),G$=I(($)=>L$($,16),"expectShort"),W$=I(($)=>L$($,8),"expectByte"),L$=I(($,f)=>{const U=C0($);if(U!==void 0&&V6(U,f)!==U)throw new TypeError(`Expected ${f}-bit integer, got ${$}`);return U},"expectSizedInt"),V6=I(($,f)=>{switch(f){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),C6=I(($,f)=>{if($===null||$===void 0){if(f)throw new TypeError(`Expected a non-null value for ${f}`);throw new TypeError("Expected a non-null value")}return $},"expectNonNull"),Qw=I(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;const f=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${f}: ${$}`)},"expectObject"),N6=I(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return N0.warn(t0(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),P6=I(($)=>{if($===null||$===void 0)return;const f=Qw($),U=Object.entries(f).filter(([,w])=>w!=null).map(([w])=>w);if(U.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(U.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${U} were not null.`);return f},"expectUnion"),X$=I(($)=>{if(typeof $=="string")return V0(L0($));return V0($)},"strictParseDouble"),S6=X$,Jw=I(($)=>{if(typeof $=="string")return i0(L0($));return i0($)},"strictParseFloat32"),j6=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,L0=I(($)=>{const f=$.match(j6);if(f===null||f[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),M$=I(($)=>{if(typeof $=="string")return Aw($);return V0($)},"limitedParseDouble"),b6=M$,k6=M$,h6=I(($)=>{if(typeof $=="string")return Aw($);return i0($)},"limitedParseFloat32"),Aw=I(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),Kw=I(($)=>{if(typeof $==="string")return C0(L0($));return C0($)},"strictParseLong"),D6=Kw,c6=I(($)=>{if(typeof $==="string")return w$(L0($));return w$($)},"strictParseInt32"),W0=I(($)=>{if(typeof $==="string")return G$(L0($));return G$($)},"strictParseShort"),Bw=I(($)=>{if(typeof $==="string")return W$(L0($));return W$($)},"strictParseByte"),t0=I(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((f)=>!f.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),N0={warn:console.warn},_6=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Z$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];I(Ow,"dateToUtcString");var x6=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),v6=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=x6.exec($);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[U,w,G,W,E,L,X,M]=f,Z=W0(E0(w)),Y=_(G,"month",1,12),F=_(W,"day",1,31);return H0(Z,Y,F,{hours:E,minutes:L,seconds:X,fractionalMilliseconds:M})},"parseRfc3339DateTime"),u6=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),y6=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=u6.exec($);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[U,w,G,W,E,L,X,M,Z]=f,Y=W0(E0(w)),F=_(G,"month",1,12),R=_(W,"day",1,31),Q=H0(Y,F,R,{hours:E,minutes:L,seconds:X,fractionalMilliseconds:M});if(Z.toUpperCase()!="Z")Q.setTime(Q.getTime()-a6(Z));return Q},"parseRfc3339DateTimeWithOffset"),p6=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$/),d6=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$/),g6=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})$/),s6=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let f=p6.exec($);if(f){const[U,w,G,W,E,L,X,M]=f;return H0(W0(E0(W)),f$(G),_(w,"day",1,31),{hours:E,minutes:L,seconds:X,fractionalMilliseconds:M})}if(f=d6.exec($),f){const[U,w,G,W,E,L,X,M]=f;return l6(H0(r6(W),f$(G),_(w,"day",1,31),{hours:E,minutes:L,seconds:X,fractionalMilliseconds:M}))}if(f=g6.exec($),f){const[U,w,G,W,E,L,X,M]=f;return H0(W0(E0(M)),f$(w),_(G.trimLeft(),"day",1,31),{hours:W,minutes:E,seconds:L,fractionalMilliseconds:X})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),n6=I(($)=>{if($===null||$===void 0)return;let f;if(typeof $==="number")f=$;else if(typeof $==="string")f=X$($);else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(f)||f===Infinity||f===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(f*1000))},"parseEpochTimestamp"),H0=I(($,f,U,w)=>{const G=f-1;return i6($,G,U),new Date(Date.UTC($,G,U,_(w.hours,"hour",0,23),_(w.minutes,"minute",0,59),_(w.seconds,"seconds",0,60),e6(w.fractionalMilliseconds)))},"buildDate"),r6=I(($)=>{const f=(new Date()).getUTCFullYear(),U=Math.floor(f/100)*100+W0(E0($));if(U<f)return U+100;return U},"parseTwoDigitYear"),m6=1576800000000,l6=I(($)=>{if($.getTime()-(new Date()).getTime()>m6)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),f$=I(($)=>{const f=Z$.indexOf($);if(f<0)throw new TypeError(`Invalid month: ${$}`);return f+1},"parseMonthByShortName"),o6=[31,28,31,30,31,30,31,31,30,31,30,31],i6=I(($,f,U)=>{let w=o6[f];if(f===1&&t6($))w=29;if(U>w)throw new TypeError(`Invalid day for ${Z$[f]} in ${$}: ${U}`)},"validateDayOfMonth"),t6=I(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),_=I(($,f,U,w)=>{const G=Bw(E0($));if(G<U||G>w)throw new TypeError(`${f} must be between ${U} and ${w}, inclusive`);return G},"parseDateValue"),e6=I(($)=>{if($===null||$===void 0)return 0;return Jw("0."+$)*1000},"parseMilliseconds"),a6=I(($)=>{const f=$[0];let U=1;if(f=="+")U=1;else if(f=="-")U=-1;else throw new TypeError(`Offset direction, ${f}, must be "+" or "-"`);const w=Number($.substring(1,3)),G=Number($.substring(4,6));return U*(w*60+G)*60*1000},"parseOffsetToMilliseconds"),E0=I(($)=>{let f=0;while(f<$.length-1&&$.charAt(f)==="0")f++;if(f===0)return $;return $.slice(f)},"stripLeadingZeroes"),qw=class $ extends Error{constructor(f){super(f.message);Object.setPrototypeOf(this,$.prototype),this.name=f.name,this.$fault=f.$fault,this.$metadata=f.$metadata}};I(qw,"ServiceException");var $X=qw,Tw=I(($,f={})=>{Object.entries(f).filter(([,w])=>w!==void 0).forEach(([w,G])=>{if($[w]==null||$[w]==="")$[w]=G});const U=$.message||$.Message||"UnknownError";return $.message=U,delete $.Message,$},"decorateServiceException"),Hw=I(({output:$,parsedBody:f,exceptionCtor:U,errorCode:w})=>{const G=UX($),W=G.httpStatusCode?G.httpStatusCode+"":void 0,E=new U({name:(f==null?void 0:f.code)||(f==null?void 0:f.Code)||w||W||"UnknownError",$fault:"client",$metadata:G});throw Tw(E,f)},"throwDefaultError"),fX=I(($)=>{return({output:f,parsedBody:U,errorCode:w})=>{Hw({output:f,parsedBody:U,exceptionCtor:$,errorCode:w})}},"withBaseException"),UX=I(($)=>({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"),wX=I(($)=>{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"),Xw=!1,GX=I(($)=>{if($&&!Xw&&parseInt($.substring(1,$.indexOf(".")))<16)Xw=!0},"emitWarningIfUnsupportedVersion"),WX=I(($)=>{const f=[];for(let U in U$.AlgorithmId){const w=U$.AlgorithmId[U];if($[w]===void 0)continue;f.push({algorithmId:()=>w,checksumConstructor:()=>$[w]})}return{_checksumAlgorithms:f,addChecksumAlgorithm(U){this._checksumAlgorithms.push(U)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),EX=I(($)=>{const f={};return $.checksumAlgorithms().forEach((U)=>{f[U.algorithmId()]=U.checksumConstructor()}),f},"resolveChecksumRuntimeConfig"),LX=I(($)=>{let f=$.retryStrategy;return{setRetryStrategy(U){f=U},retryStrategy(){return f}}},"getRetryConfiguration"),XX=I(($)=>{const f={};return f.retryStrategy=$.retryStrategy(),f},"resolveRetryRuntimeConfig"),Vw=I(($)=>{return{...WX($),...LX($)}},"getDefaultExtensionConfiguration"),MX=Vw,ZX=I(($)=>{return{...EX($),...XX($)}},"resolveDefaultRuntimeConfig");I(e0,"extendedEncodeURIComponent");var YX=I(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),Cw=I(($)=>{for(let U in $)if($.hasOwnProperty(U)&&$[U]["#text"]!==void 0)$[U]=$[U]["#text"];else if(typeof $[U]==="object"&&$[U]!==null)$[U]=Cw($[U]);return $},"getValueFromTextNode"),P0=I(function(){const $=Object.getPrototypeOf(this).constructor,U=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(U,$.prototype),U},"StringWrapper");P0.prototype=Object.create(String.prototype,{constructor:{value:P0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(P0,String);var Nw=class $ extends P0{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(f){if(f instanceof $)return f;else if(f instanceof String||typeof f==="string")return new $(f);return new $(JSON.stringify(f))}};I(Nw,"LazyJsonString");var IX=Nw;I(Y$,"map");var FX=I(($)=>{const f={};for(let[U,w]of Object.entries($||{}))f[U]=[,w];return f},"convertMap"),RX=I(($,f)=>{const U={};for(let w in f)Pw(U,$,f,w);return U},"take"),zX=I(($,f,U)=>{return Y$($,Object.entries(U).reduce((w,[G,W])=>{if(Array.isArray(W))w[G]=W;else if(typeof W==="function")w[G]=[f,W()];else w[G]=[f,W];return w},{}))},"mapWithFilter"),Pw=I(($,f,U,w)=>{if(f!==null){let E=U[w];if(typeof E==="function")E=[,E];const[L=QX,X=JX,M=w]=E;if(typeof L==="function"&&L(f[M])||typeof L!=="function"&&!!L)$[w]=X(f[M]);return}let[G,W]=U[w];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)$[w]=E;else if(X)$[w]=W()}else{const E=G===void 0&&W!=null,L=typeof G==="function"&&!!G(W)||typeof G!=="function"&&!!G;if(E||L)$[w]=W}},"applyInstruction"),QX=I(($)=>$!=null,"nonNullish"),JX=I(($)=>$,"pass"),AX=I(($,f,U,w,G,W)=>{if(f!=null&&f[U]!==void 0){const E=w();if(E.length<=0)throw new Error("Empty value provided for input HTTP label: "+U+".");$=$.replace(G,W?E.split("/").map((L)=>e0(L)).join("/"):e0(E))}else throw new Error("No value provided for input HTTP label: "+U+".");return $},"resolvedPath"),KX=I(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),BX=I(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),E$=I(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((f)=>f!=null).map(E$);if(typeof $==="object"){const f={};for(let U of Object.keys($)){if($[U]==null)continue;f[U]=E$($[U])}return f}return $},"_json");I(Sw,"splitEvery")});var hw=z((bw)=>{Object.defineProperty(bw,"__esModule",{value:!0});bw.isStreamingPayload=void 0;var OX=import.meta.require("stream"),qX=($)=>($===null||$===void 0?void 0:$.body)instanceof OX.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;bw.isStreamingPayload=qX});var tw=z((d5,iw)=>{var{defineProperty:$1,getOwnPropertyDescriptor:TX,getOwnPropertyNames:HX}=Object,VX=Object.prototype.hasOwnProperty,T=($,f)=>$1($,"name",{value:f,configurable:!0}),CX=($,f)=>{for(var U in f)$1($,U,{get:f[U],enumerable:!0})},NX=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of HX(f))if(!VX.call($,G)&&G!==U)$1($,G,{get:()=>f[G],enumerable:!(w=TX(f,G))||w.enumerable})}return $},PX=($)=>NX($1({},"__esModule",{value:!0}),$),cw={};CX(cw,{AdaptiveRetryStrategy:()=>bX,CONFIG_MAX_ATTEMPTS:()=>F$,CONFIG_RETRY_MODE:()=>sw,ENV_MAX_ATTEMPTS:()=>I$,ENV_RETRY_MODE:()=>gw,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>kX,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>DX,StandardRetryStrategy:()=>pw,defaultDelayDecider:()=>xw,defaultRetryDecider:()=>vw,getOmitRetryHeadersPlugin:()=>cX,getRetryAfterHint:()=>ow,getRetryPlugin:()=>pX,omitRetryHeadersMiddleware:()=>nw,omitRetryHeadersMiddlewareOptions:()=>rw,resolveRetryConfig:()=>hX,retryMiddleware:()=>mw,retryMiddlewareOptions:()=>lw});iw.exports=PX(cw);var M0=Z0(),_w=o1(),B=Lw(),SX=T(($,f)=>{const U=$,w=(f==null?void 0:f.noRetryIncrement)??B.NO_RETRY_INCREMENT,G=(f==null?void 0:f.retryCost)??B.RETRY_COST,W=(f==null?void 0:f.timeoutRetryCost)??B.TIMEOUT_RETRY_COST;let E=$;const L=T((Y)=>Y.name==="TimeoutError"?W:G,"getCapacityAmount"),X=T((Y)=>L(Y)<=E,"hasRetryTokens");return Object.freeze({hasRetryTokens:X,retrieveRetryTokens:T((Y)=>{if(!X(Y))throw new Error("No retry token available");const F=L(Y);return E-=F,F},"retrieveRetryTokens"),releaseRetryTokens:T((Y)=>{E+=Y??w,E=Math.min(E,U)},"releaseRetryTokens")})},"getDefaultRetryQuota"),xw=T(($,f)=>Math.floor(Math.min(B.MAXIMUM_RETRY_DELAY,Math.random()*2**f*$)),"defaultDelayDecider"),d=l(),vw=T(($)=>{if(!$)return!1;return d.isRetryableByTrait($)||d.isClockSkewError($)||d.isThrottlingError($)||d.isTransientError($)},"defaultRetryDecider"),uw=T(($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)},"asSdkError"),yw=class ${constructor(f,U){this.maxAttemptsProvider=f,this.mode=B.RETRY_MODES.STANDARD,this.retryDecider=(U==null?void 0:U.retryDecider)??vw,this.delayDecider=(U==null?void 0:U.delayDecider)??xw,this.retryQuota=(U==null?void 0:U.retryQuota)??SX(B.INITIAL_RETRY_TOKENS)}shouldRetry(f,U,w){return U<w&&this.retryDecider(f)&&this.retryQuota.hasRetryTokens(f)}async getMaxAttempts(){let f;try{f=await this.maxAttemptsProvider()}catch(U){f=B.DEFAULT_MAX_ATTEMPTS}return f}async retry(f,U,w){let G,W=0,E=0;const L=await this.getMaxAttempts(),{request:X}=U;if(M0.HttpRequest.isInstance(X))X.headers[B.INVOCATION_ID_HEADER]=_w.v4();while(!0)try{if(M0.HttpRequest.isInstance(X))X.headers[B.REQUEST_HEADER]=`attempt=${W+1}; max=${L}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:M,output:Z}=await f(U);if(w==null?void 0:w.afterRequest)w.afterRequest(M);return this.retryQuota.releaseRetryTokens(G),Z.$metadata.attempts=W+1,Z.$metadata.totalRetryDelay=E,{response:M,output:Z}}catch(M){const Z=uw(M);if(W++,this.shouldRetry(Z,W,L)){G=this.retryQuota.retrieveRetryTokens(Z);const Y=this.delayDecider(d.isThrottlingError(Z)?B.THROTTLING_RETRY_DELAY_BASE:B.DEFAULT_RETRY_DELAY_BASE,W),F=jX(Z.$response),R=Math.max(F||0,Y);E+=R,await new Promise((Q)=>setTimeout(Q,R));continue}if(!Z.$metadata)Z.$metadata={};throw Z.$metadata.attempts=W,Z.$metadata.totalRetryDelay=E,Z}}};T(yw,"StandardRetryStrategy");var pw=yw,jX=T(($)=>{if(!M0.HttpResponse.isInstance($))return;const f=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!f)return;const U=$.headers[f],w=Number(U);if(!Number.isNaN(w))return w*1000;return new Date(U).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),dw=class $ extends pw{constructor(f,U){const{rateLimiter:w,...G}=U??{};super(f,G);this.rateLimiter=w??new B.DefaultRateLimiter,this.mode=B.RETRY_MODES.ADAPTIVE}async retry(f,U){return super.retry(f,U,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};T(dw,"AdaptiveRetryStrategy");var bX=dw,Dw=J0(),I$="AWS_MAX_ATTEMPTS",F$="max_attempts",kX={environmentVariableSelector:($)=>{const f=$[I$];if(!f)return;const U=parseInt(f);if(Number.isNaN(U))throw new Error(`Environment variable ${I$} mast be a number, got "${f}"`);return U},configFileSelector:($)=>{const f=$[F$];if(!f)return;const U=parseInt(f);if(Number.isNaN(U))throw new Error(`Shared config file entry ${F$} mast be a number, got "${f}"`);return U},default:B.DEFAULT_MAX_ATTEMPTS},hX=T(($)=>{const{retryStrategy:f}=$,U=Dw.normalizeProvider($.maxAttempts??B.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:U,retryStrategy:async()=>{if(f)return f;if(await Dw.normalizeProvider($.retryMode)()===B.RETRY_MODES.ADAPTIVE)return new B.AdaptiveRetryStrategy(U);return new B.StandardRetryStrategy(U)}}},"resolveRetryConfig"),gw="AWS_RETRY_MODE",sw="retry_mode",DX={environmentVariableSelector:($)=>$[gw],configFileSelector:($)=>$[sw],default:B.DEFAULT_RETRY_MODE},nw=T(()=>($)=>async(f)=>{const{request:U}=f;if(M0.HttpRequest.isInstance(U))delete U.headers[B.INVOCATION_ID_HEADER],delete U.headers[B.REQUEST_HEADER];return $(f)},"omitRetryHeadersMiddleware"),rw={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},cX=T(($)=>({applyToStack:(f)=>{f.addRelativeTo(nw(),rw)}}),"getOmitRetryHeadersPlugin"),_X=X0(),xX=hw(),mw=T(($)=>(f,U)=>async(w)=>{var G;let W=await $.retryStrategy();const E=await $.maxAttempts();if(vX(W)){W=W;let L=await W.acquireInitialRetryToken(U.partition_id),X=new Error,M=0,Z=0;const{request:Y}=w,F=M0.HttpRequest.isInstance(Y);if(F)Y.headers[B.INVOCATION_ID_HEADER]=_w.v4();while(!0)try{if(F)Y.headers[B.REQUEST_HEADER]=`attempt=${M+1}; max=${E}`;const{response:R,output:Q}=await f(w);return W.recordSuccess(L),Q.$metadata.attempts=M+1,Q.$metadata.totalRetryDelay=Z,{response:R,output:Q}}catch(R){const Q=uX(R);if(X=uw(R),F&&xX.isStreamingPayload(Y))throw(G=U.logger instanceof _X.NoOpLogger?console:U.logger)==null||G.warn("An error was encountered in a non-retryable streaming request."),X;try{L=await W.refreshRetryTokenForRetry(L,Q)}catch(q){if(!X.$metadata)X.$metadata={};throw X.$metadata.attempts=M+1,X.$metadata.totalRetryDelay=Z,X}M=L.getRetryCount();const J=L.getRetryDelay();Z+=J,await new Promise((q)=>setTimeout(q,J))}}else{if(W=W,W==null?void 0:W.mode)U.userAgent=[...U.userAgent||[],["cfg/retry-mode",W.mode]];return W.retry(f,w)}},"retryMiddleware"),vX=T(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),uX=T(($)=>{const f={error:$,errorType:yX($)},U=ow($.$response);if(U)f.retryAfterHint=U;return f},"getRetryErrorInfo"),yX=T(($)=>{if(d.isThrottlingError($))return"THROTTLING";if(d.isTransientError($))return"TRANSIENT";if(d.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),lw={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},pX=T(($)=>({applyToStack:(f)=>{f.add(mw($),lw)}}),"getRetryPlugin"),ow=T(($)=>{if(!M0.HttpResponse.isInstance($))return;const f=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!f)return;const U=$.headers[f],w=Number(U);if(!Number.isNaN(w))return new Date(w*1000);return new Date(U)},"getRetryAfterHint")});var z$=z((g5,QG)=>{var $G=function($){const f=new Map;for(let U of $)f.set(U.schemeId,U);return f},IG=function($,f){return new RG($,f)},zG=function($,f,U,w,G){return K(async function*W(E,L,...X){let M=E.startingToken||void 0,Z=!0,Y;while(Z){if(L[U]=M,G)L[G]=L[G]??E.pageSize;if(E.client instanceof $)Y=await YM(f,E.client,L,...X);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield Y;const F=M;M=IM(Y,w),Z=!!(M&&(!E.stopOnSameToken||M!==F))}return},"paginateOperation")},U1=Object.defineProperty,dX=Object.getOwnPropertyDescriptor,gX=Object.getOwnPropertyNames,sX=Object.prototype.hasOwnProperty,K=($,f)=>U1($,"name",{value:f,configurable:!0}),nX=($,f)=>{for(var U in f)U1($,U,{get:f[U],enumerable:!0})},rX=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of gX(f))if(!sX.call($,G)&&G!==U)U1($,G,{get:()=>f[G],enumerable:!(w=dX(f,G))||w.enumerable})}return $},mX=($)=>rX(U1({},"__esModule",{value:!0}),$),ew={};nX(ew,{DefaultIdentityProviderConfig:()=>UM,EXPIRATION_MS:()=>ZG,HttpApiKeyAuthSigner:()=>wM,HttpBearerAuthSigner:()=>GM,NoAuthSigner:()=>WM,RequestBuilder:()=>RG,createIsIdentityExpiredFunction:()=>MG,createPaginator:()=>zG,doesIdentityRequireRefresh:()=>YG,getHttpAuthSchemeEndpointRuleSetPlugin:()=>oX,getHttpAuthSchemePlugin:()=>tX,getHttpSigningPlugin:()=>fM,getSmithyContext:()=>XM,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>fG,httpAuthSchemeMiddleware:()=>R$,httpAuthSchemeMiddlewareOptions:()=>UG,httpSigningMiddleware:()=>wG,httpSigningMiddlewareOptions:()=>GG,isIdentityExpired:()=>EM,memoizeIdentityProvider:()=>LM,normalizeProvider:()=>MM,requestBuilder:()=>IG});QG.exports=mX(ew);var aw=J0();K($G,"convertHttpAuthSchemesToMap");var R$=K(($,f)=>(U,w)=>async(G)=>{var W;const E=$.httpAuthSchemeProvider(await f.httpAuthSchemeParametersProvider($,w,G.input)),L=$G($.httpAuthSchemes),X=aw.getSmithyContext(w),M=[];for(let Z of E){const Y=L.get(Z.schemeId);if(!Y){M.push(`HttpAuthScheme \`${Z.schemeId}\` was not enabled for this service.`);continue}const F=Y.identityProvider(await f.identityProviderConfigProvider($));if(!F){M.push(`HttpAuthScheme \`${Z.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:R={},signingProperties:Q={}}=((W=Z.propertiesExtractor)==null?void 0:W.call(Z,$,w))||{};Z.identityProperties=Object.assign(Z.identityProperties||{},R),Z.signingProperties=Object.assign(Z.signingProperties||{},Q),X.selectedHttpAuthScheme={httpAuthOption:Z,identity:await F(Z.identityProperties),signer:Y.signer};break}if(!X.selectedHttpAuthScheme)throw new Error(M.join("\n"));return U(G)},"httpAuthSchemeMiddleware"),lX=of(),fG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:lX.endpointMiddlewareOptions.name},oX=K(($,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:U})=>({applyToStack:(w)=>{w.addRelativeTo(R$($,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:U}),fG)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),iX=p1(),UG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:iX.serializerMiddlewareOption.name},tX=K(($,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:U})=>({applyToStack:(w)=>{w.addRelativeTo(R$($,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:U}),UG)}}),"getHttpAuthSchemePlugin"),w1=Z0(),eX=K(($)=>(f)=>{throw f},"defaultErrorHandler"),aX=K(($,f)=>{},"defaultSuccessHandler"),wG=K(($)=>(f,U)=>async(w)=>{if(!w1.HttpRequest.isInstance(w.request))return f(w);const W=aw.getSmithyContext(U).selectedHttpAuthScheme;if(!W)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:E={}},identity:L,signer:X}=W,M=await f({...w,request:await X.sign(w.request,L,E)}).catch((X.errorHandler||eX)(E));return(X.successHandler||aX)(M.response,E),M},"httpSigningMiddleware"),$M=tw(),GG={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:$M.retryMiddlewareOptions.name},fM=K(($)=>({applyToStack:(f)=>{f.addRelativeTo(wG($),GG)}}),"getHttpSigningPlugin"),WG=class ${constructor(f){this.authSchemes=new Map;for(let[U,w]of Object.entries(f))if(w!==void 0)this.authSchemes.set(U,w)}getIdentityProvider(f){return this.authSchemes.get(f)}};K(WG,"DefaultIdentityProviderConfig");var UM=WG,f1=f0(),EG=class ${async sign(f,U,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!U.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const G=w1.HttpRequest.clone(f);if(w.in===f1.HttpApiKeyAuthLocation.QUERY)G.query[w.name]=U.apiKey;else if(w.in===f1.HttpApiKeyAuthLocation.HEADER)G.headers[w.name]=w.scheme?`${w.scheme} ${U.apiKey}`:U.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return G}};K(EG,"HttpApiKeyAuthSigner");var wM=EG,LG=class ${async sign(f,U,w){const G=w1.HttpRequest.clone(f);if(!U.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return G.headers.Authorization=`Bearer ${U.token}`,G}};K(LG,"HttpBearerAuthSigner");var GM=LG,XG=class ${async sign(f,U,w){return f}};K(XG,"NoAuthSigner");var WM=XG,MG=K(($)=>(f)=>YG(f)&&f.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),ZG=300000,EM=MG(ZG),YG=K(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),LM=K(($,f,U)=>{if($===void 0)return;const w=typeof $!=="function"?async()=>Promise.resolve($):$;let G,W,E,L=!1;const X=K(async(M)=>{if(!W)W=w(M);try{G=await W,E=!0,L=!1}finally{W=void 0}return G},"coalesceProvider");if(f===void 0)return async(M)=>{if(!E||(M==null?void 0:M.forceRefresh))G=await X(M);return G};return async(M)=>{if(!E||(M==null?void 0:M.forceRefresh))G=await X(M);if(L)return G;if(!U(G))return L=!0,G;if(f(G))return await X(M),G;return G}},"memoizeIdentityProvider"),XM=K(($)=>$[f1.SMITHY_CONTEXT_KEY]||($[f1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),MM=K(($)=>{if(typeof $==="function")return $;const f=Promise.resolve($);return()=>f},"normalizeProvider"),ZM=X0();K(IG,"requestBuilder");var FG=class ${constructor(f,U){this.input=f,this.context=U,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:f,protocol:U="https",port:w,path:G}=await this.context.endpoint();this.path=G;for(let W of this.resolvePathStack)W(this.path);return new w1.HttpRequest({protocol:U,hostname:this.hostname||f,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(f){return this.hostname=f,this}bp(f){return this.resolvePathStack.push((U)=>{this.path=`${(U==null?void 0:U.endsWith("/"))?U.slice(0,-1):U||""}`+f}),this}p(f,U,w,G){return this.resolvePathStack.push((W)=>{this.path=ZM.resolvedPath(W,this.input,f,U,w,G)}),this}h(f){return this.headers=f,this}q(f){return this.query=f,this}b(f){return this.body=f,this}m(f){return this.method=f,this}};K(FG,"RequestBuilder");var RG=FG,YM=K(async($,f,U,...w)=>{return await f.send(new $(U),...w)},"makePagedClientRequest");K(zG,"createPaginator");var IM=K(($,f)=>{let U=$;const w=f.split(".");for(let G of w){if(!U||typeof U!=="object")return;U=U[G]}return U},"get")});var MW=z((EQ,XW)=>{var{defineProperty:K1,getOwnPropertyDescriptor:rM,getOwnPropertyNames:mM}=Object,lM=Object.prototype.hasOwnProperty,oM=($,f)=>K1($,"name",{value:f,configurable:!0}),iM=($,f)=>{for(var U in f)K1($,U,{get:f[U],enumerable:!0})},tM=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of mM(f))if(!lM.call($,G)&&G!==U)K1($,G,{get:()=>f[G],enumerable:!(w=rM(f,G))||w.enumerable})}return $},eM=($)=>tM(K1({},"__esModule",{value:!0}),$),LW={};iM(LW,{emitWarningIfUnsupportedVersion:()=>aM});XW.exports=eM(LW);var EW=!1,aM=oM(($)=>{if($&&!EW&&parseInt($.substring(1,$.indexOf(".")))<18)EW=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
2
|
+
no longer support Node.js 16.x on January 6, 2025.
|
|
3
|
+
|
|
4
|
+
To continue receiving updates to AWS services, bug fixes, and security
|
|
5
|
+
updates please upgrade to a supported Node.js LTS version.
|
|
6
|
+
|
|
7
|
+
More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var SW=z((LQ,PW)=>{var y$=function($){for(let f=0;f<8;f++)$[f]^=255;for(let f=7;f>-1;f--)if($[f]++,$[f]!==0)break},V1=Object.defineProperty,wZ=Object.getOwnPropertyDescriptor,GZ=Object.getOwnPropertyNames,WZ=Object.prototype.hasOwnProperty,H=($,f)=>V1($,"name",{value:f,configurable:!0}),EZ=($,f)=>{for(var U in f)V1($,U,{get:f[U],enumerable:!0})},LZ=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of GZ(f))if(!WZ.call($,G)&&G!==U)V1($,G,{get:()=>f[G],enumerable:!(w=wZ(f,G))||w.enumerable})}return $},XZ=($)=>LZ(V1({},"__esModule",{value:!0}),$),RW={};EZ(RW,{SignatureV4:()=>DZ,clearCredentialCache:()=>VZ,createScope:()=>q1,getCanonicalHeaders:()=>u$,getCanonicalQuery:()=>qW,getPayloadHash:()=>T1,getSigningKey:()=>OW,moveHeadersToQuery:()=>CW,prepareRequest:()=>p$});PW.exports=XZ(RW);var ZW=J0(),_$=H1(),MZ="X-Amz-Algorithm",ZZ="X-Amz-Credential",zW="X-Amz-Date",YZ="X-Amz-SignedHeaders",IZ="X-Amz-Expires",QW="X-Amz-Signature",JW="X-Amz-Security-Token",AW="authorization",KW=zW.toLowerCase(),FZ="date",RZ=[AW,KW,FZ],zZ=QW.toLowerCase(),v$="x-amz-content-sha256",QZ=JW.toLowerCase(),JZ={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},AZ=/^proxy-/,KZ=/^sec-/,x$="AWS4-HMAC-SHA256",BZ="AWS4-HMAC-SHA256-PAYLOAD",OZ="UNSIGNED-PAYLOAD",qZ=50,BW="aws4_request",TZ=604800,n=UZ(),HZ=H1(),z0={},O1=[],q1=H(($,f,U)=>`${$}/${f}/${U}/${BW}`,"createScope"),OW=H(async($,f,U,w,G)=>{const W=await YW($,f.secretAccessKey,f.accessKeyId),E=`${U}:${w}:${G}:${n.toHex(W)}:${f.sessionToken}`;if(E in z0)return z0[E];O1.push(E);while(O1.length>qZ)delete z0[O1.shift()];let L=`AWS4${f.secretAccessKey}`;for(let X of[U,w,G,BW])L=await YW($,L,X);return z0[E]=L},"getSigningKey"),VZ=H(()=>{O1.length=0,Object.keys(z0).forEach(($)=>{delete z0[$]})},"clearCredentialCache"),YW=H(($,f,U)=>{const w=new $(f);return w.update(HZ.toUint8Array(U)),w.digest()},"hmac"),u$=H(({headers:$},f,U)=>{const w={};for(let G of Object.keys($).sort()){if($[G]==null)continue;const W=G.toLowerCase();if(W in JZ||(f==null?void 0:f.has(W))||AZ.test(W)||KZ.test(W)){if(!U||U&&!U.has(W))continue}w[W]=$[G].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),h0=fZ(),qW=H(({query:$={}})=>{const f=[],U={};for(let w of Object.keys($).sort()){if(w.toLowerCase()===zZ)continue;f.push(w);const G=$[w];if(typeof G==="string")U[w]=`${h0.escapeUri(w)}=${h0.escapeUri(G)}`;else if(Array.isArray(G))U[w]=G.slice(0).reduce((W,E)=>W.concat([`${h0.escapeUri(w)}=${h0.escapeUri(E)}`]),[]).sort().join("&")}return f.map((w)=>U[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),CZ=$Z(),NZ=H1(),T1=H(async({headers:$,body:f},U)=>{for(let w of Object.keys($))if(w.toLowerCase()===v$)return $[w];if(f==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof f==="string"||ArrayBuffer.isView(f)||CZ.isArrayBuffer(f)){const w=new U;return w.update(NZ.toUint8Array(f)),n.toHex(await w.digest())}return OZ},"getPayloadHash"),IW=H1(),TW=class ${format(f){const U=[];for(let W of Object.keys(f)){const E=IW.fromUtf8(W);U.push(Uint8Array.from([E.byteLength]),E,this.formatHeaderValue(f[W]))}const w=new Uint8Array(U.reduce((W,E)=>W+E.byteLength,0));let G=0;for(let W of U)w.set(W,G),G+=W.byteLength;return w}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":const U=new DataView(new ArrayBuffer(3));return U.setUint8(0,3),U.setInt16(1,f.value,!1),new Uint8Array(U.buffer);case"integer":const w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,f.value,!1),new Uint8Array(w.buffer);case"long":const G=new Uint8Array(9);return G[0]=5,G.set(f.value.bytes,1),G;case"binary":const W=new DataView(new ArrayBuffer(3+f.value.byteLength));W.setUint8(0,6),W.setUint16(1,f.value.byteLength,!1);const E=new Uint8Array(W.buffer);return E.set(f.value,3),E;case"string":const L=IW.fromUtf8(f.value),X=new DataView(new ArrayBuffer(3+L.byteLength));X.setUint8(0,7),X.setUint16(1,L.byteLength,!1);const M=new Uint8Array(X.buffer);return M.set(L,3),M;case"timestamp":const Z=new Uint8Array(9);return Z[0]=8,Z.set(jZ.fromNumber(f.value.valueOf()).bytes,1),Z;case"uuid":if(!SZ.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);const Y=new Uint8Array(17);return Y[0]=9,Y.set(n.fromHex(f.value.replace(/\-/g,"")),1),Y}}};H(TW,"HeaderFormatter");var PZ=TW,SZ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,HW=class ${constructor(f){if(this.bytes=f,f.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(f){if(f>9223372036854776000||f<-9223372036854776000)throw new Error(`${f} is too large (or, if negative, too small) to represent as an Int64`);const U=new Uint8Array(8);for(let w=7,G=Math.abs(Math.round(f));w>-1&&G>0;w--,G/=256)U[w]=G;if(f<0)y$(U);return new $(U)}valueOf(){const f=this.bytes.slice(0),U=f[0]&128;if(U)y$(f);return parseInt(n.toHex(f),16)*(U?-1:1)}toString(){return String(this.valueOf())}};H(HW,"Int64");var jZ=HW;H(y$,"negate");var bZ=H(($,f)=>{$=$.toLowerCase();for(let U of Object.keys(f))if($===U.toLowerCase())return!0;return!1},"hasHeader"),VW=Z0(),CW=H(($,f={})=>{var U;const{headers:w,query:G={}}=VW.HttpRequest.clone($);for(let W of Object.keys(w)){const E=W.toLowerCase();if(E.slice(0,6)==="x-amz-"&&!((U=f.unhoistableHeaders)==null?void 0:U.has(E)))G[W]=w[W],delete w[W]}return{...$,headers:w,query:G}},"moveHeadersToQuery"),p$=H(($)=>{$=VW.HttpRequest.clone($);for(let f of Object.keys($.headers))if(RZ.indexOf(f.toLowerCase())>-1)delete $.headers[f];return $},"prepareRequest"),kZ=H(($)=>hZ($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),hZ=H(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),NW=class ${constructor({applyChecksum:f,credentials:U,region:w,service:G,sha256:W,uriEscapePath:E=!0}){this.headerFormatter=new PZ,this.service=G,this.sha256=W,this.uriEscapePath=E,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=ZW.normalizeProvider(w),this.credentialProvider=ZW.normalizeProvider(U)}async presign(f,U={}){const{signingDate:w=new Date,expiresIn:G=3600,unsignableHeaders:W,unhoistableHeaders:E,signableHeaders:L,signingRegion:X,signingService:M}=U,Z=await this.credentialProvider();this.validateResolvedCredentials(Z);const Y=X??await this.regionProvider(),{longDate:F,shortDate:R}=B1(w);if(G>TZ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const Q=q1(R,Y,M??this.service),J=CW(p$(f),{unhoistableHeaders:E});if(Z.sessionToken)J.query[JW]=Z.sessionToken;J.query[MZ]=x$,J.query[ZZ]=`${Z.accessKeyId}/${Q}`,J.query[zW]=F,J.query[IZ]=G.toString(10);const q=u$(J,W,L);return J.query[YZ]=FW(q),J.query[QW]=await this.getSignature(F,Q,this.getSigningKey(Z,Y,R,M),this.createCanonicalRequest(J,q,await T1(f,this.sha256))),J}async sign(f,U){if(typeof f==="string")return this.signString(f,U);else if(f.headers&&f.payload)return this.signEvent(f,U);else if(f.message)return this.signMessage(f,U);else return this.signRequest(f,U)}async signEvent({headers:f,payload:U},{signingDate:w=new Date,priorSignature:G,signingRegion:W,signingService:E}){const L=W??await this.regionProvider(),{shortDate:X,longDate:M}=B1(w),Z=q1(X,L,E??this.service),Y=await T1({headers:{},body:U},this.sha256),F=new this.sha256;F.update(f);const R=n.toHex(await F.digest()),Q=[BZ,M,Z,G,R,Y].join("\n");return this.signString(Q,{signingDate:w,signingRegion:L,signingService:E})}async signMessage(f,{signingDate:U=new Date,signingRegion:w,signingService:G}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:U,signingRegion:w,signingService:G,priorSignature:f.priorSignature}).then((E)=>{return{message:f.message,signature:E}})}async signString(f,{signingDate:U=new Date,signingRegion:w,signingService:G}={}){const W=await this.credentialProvider();this.validateResolvedCredentials(W);const E=w??await this.regionProvider(),{shortDate:L}=B1(U),X=new this.sha256(await this.getSigningKey(W,E,L,G));return X.update(_$.toUint8Array(f)),n.toHex(await X.digest())}async signRequest(f,{signingDate:U=new Date,signableHeaders:w,unsignableHeaders:G,signingRegion:W,signingService:E}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const X=W??await this.regionProvider(),M=p$(f),{longDate:Z,shortDate:Y}=B1(U),F=q1(Y,X,E??this.service);if(M.headers[KW]=Z,L.sessionToken)M.headers[QZ]=L.sessionToken;const R=await T1(M,this.sha256);if(!bZ(v$,M.headers)&&this.applyChecksum)M.headers[v$]=R;const Q=u$(M,G,w),J=await this.getSignature(Z,F,this.getSigningKey(L,X,Y,E),this.createCanonicalRequest(M,Q,R));return M.headers[AW]=`${x$} Credential=${L.accessKeyId}/${F}, SignedHeaders=${FW(Q)}, Signature=${J}`,M}createCanonicalRequest(f,U,w){const G=Object.keys(U).sort();return`${f.method}
|
|
8
|
+
${this.getCanonicalPath(f)}
|
|
9
|
+
${qW(f)}
|
|
10
|
+
${G.map((W)=>`${W}:${U[W]}`).join("\n")}
|
|
11
|
+
|
|
12
|
+
${G.join(";")}
|
|
13
|
+
${w}`}async createStringToSign(f,U,w){const G=new this.sha256;G.update(_$.toUint8Array(w));const W=await G.digest();return`${x$}
|
|
14
|
+
${f}
|
|
15
|
+
${U}
|
|
16
|
+
${n.toHex(W)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){const U=[];for(let W of f.split("/")){if((W==null?void 0:W.length)===0)continue;if(W===".")continue;if(W==="..")U.pop();else U.push(W)}const w=`${(f==null?void 0:f.startsWith("/"))?"/":""}${U.join("/")}${U.length>0&&(f==null?void 0:f.endsWith("/"))?"/":""}`;return h0.escapeUri(w).replace(/%2F/g,"/")}return f}async getSignature(f,U,w,G){const W=await this.createStringToSign(f,U,G),E=new this.sha256(await w);return E.update(_$.toUint8Array(W)),n.toHex(await E.digest())}getSigningKey(f,U,w,G){return OW(this.sha256,f,w,U,G||this.service)}validateResolvedCredentials(f){if(typeof f!=="object"||typeof f.accessKeyId!=="string"||typeof f.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};H(NW,"SignatureV4");var DZ=NW,B1=H(($)=>{const f=kZ($).replace(/[\-:]/g,"");return{longDate:f,shortDate:f.slice(0,8)}},"formatDate"),FW=H(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var uW=z((XQ,vW)=>{var{defineProperty:C1,getOwnPropertyDescriptor:cZ,getOwnPropertyNames:_Z}=Object,xZ=Object.prototype.hasOwnProperty,N=($,f)=>C1($,"name",{value:f,configurable:!0}),vZ=($,f)=>{for(var U in f)C1($,U,{get:f[U],enumerable:!0})},uZ=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of _Z(f))if(!xZ.call($,G)&&G!==U)C1($,G,{get:()=>f[G],enumerable:!(w=cZ(f,G))||w.enumerable})}return $},yZ=($)=>uZ(C1({},"__esModule",{value:!0}),$),DW={};vZ(DW,{AWSSDKSigV4Signer:()=>sZ,AwsSdkSigV4ASigner:()=>rZ,AwsSdkSigV4Signer:()=>s$,NODE_SIGV4A_CONFIG_OPTIONS:()=>oZ,resolveAWSSDKSigV4Config:()=>iZ,resolveAwsSdkSigV4AConfig:()=>lZ,resolveAwsSdkSigV4Config:()=>xW,validateSigningProperties:()=>g$});vW.exports=yZ(DW);var pZ=Z0(),dZ=Z0(),jW=N(($)=>{var f,U;return dZ.HttpResponse.isInstance($)?((f=$.headers)==null?void 0:f.date)??((U=$.headers)==null?void 0:U.Date):void 0},"getDateHeader"),d$=N(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),gZ=N(($,f)=>Math.abs(d$(f).getTime()-$)>=300000,"isClockSkewed"),bW=N(($,f)=>{const U=Date.parse($);if(gZ(U,f))return U-Date.now();return f},"getUpdatedSystemClockOffset"),D0=N(($,f)=>{if(!f)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return f},"throwSigningPropertyError"),g$=N(async($)=>{var f,U,w;const G=D0("context",$.context),W=D0("config",$.config),E=(w=(U=(f=G.endpointV2)==null?void 0:f.properties)==null?void 0:U.authSchemes)==null?void 0:w[0],X=await D0("signer",W.signer)(E),M=$==null?void 0:$.signingRegion,Z=$==null?void 0:$.signingRegionSet,Y=$==null?void 0:$.signingName;return{config:W,signer:X,signingRegion:M,signingRegionSet:Z,signingName:Y}},"validateSigningProperties"),cW=class ${async sign(f,U,w){var G;if(!pZ.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const W=await g$(w),{config:E,signer:L}=W;let{signingRegion:X,signingName:M}=W;const Z=w.context;if(((G=Z==null?void 0:Z.authSchemes)==null?void 0:G.length)??0>1){const[F,R]=Z.authSchemes;if((F==null?void 0:F.name)==="sigv4a"&&(R==null?void 0:R.name)==="sigv4")X=(R==null?void 0:R.signingRegion)??X,M=(R==null?void 0:R.signingName)??M}return await L.sign(f,{signingDate:d$(E.systemClockOffset),signingRegion:X,signingService:M})}errorHandler(f){return(U)=>{const w=U.ServerTime??jW(U.$response);if(w){const G=D0("config",f.config),W=G.systemClockOffset;if(G.systemClockOffset=bW(w,G.systemClockOffset),G.systemClockOffset!==W&&U.$metadata)U.$metadata.clockSkewCorrected=!0}throw U}}successHandler(f,U){const w=jW(f);if(w){const G=D0("config",U.config);G.systemClockOffset=bW(w,G.systemClockOffset)}}};N(cW,"AwsSdkSigV4Signer");var s$=cW,sZ=s$,nZ=Z0(),_W=class $ extends s${async sign(f,U,w){var G;if(!nZ.HttpRequest.isInstance(f))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:M}=await g$(w),Y=(await((G=W.sigv4aSigningRegionSet)==null?void 0:G.call(W))??X??[L]).join(",");return await E.sign(f,{signingDate:d$(W.systemClockOffset),signingRegion:Y,signingService:M})}};N(_W,"AwsSdkSigV4ASigner");var rZ=_W,mZ=z$(),kW=v1(),lZ=N(($)=>{return $.sigv4aSigningRegionSet=mZ.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),oZ={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((f)=>f.trim());throw new kW.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((f)=>f.trim());throw new kW.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},e=z$(),hW=SW(),xW=N(($)=>{let f;if($.credentials)f=e.memoizeIdentityProvider($.credentials,e.isIdentityExpired,e.doesIdentityRequireRefresh);if(!f)if($.credentialDefaultProvider)f=e.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else f=N(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:U=!0,systemClockOffset:w=$.systemClockOffset||0,sha256:G}=$;let W;if($.signer)W=e.normalizeProvider($.signer);else if($.regionInfoProvider)W=N(()=>e.normalizeProvider($.region)().then(async(E)=>[await $.regionInfoProvider(E,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},E]).then(([E,L])=>{const{signingRegion:X,signingService:M}=E;$.signingRegion=$.signingRegion||X||L,$.signingName=$.signingName||M||$.serviceId;const Z={...$,credentials:f,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:U};return new($.signerConstructor||hW.SignatureV4)(Z)}),"signer");else W=N(async(E)=>{E=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await e.normalizeProvider($.region)(),properties:{}},E);const{signingRegion:L,signingName:X}=E;$.signingRegion=$.signingRegion||L,$.signingName=$.signingName||X||$.serviceId;const M={...$,credentials:f,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:U};return new($.signerConstructor||hW.SignatureV4)(M)},"signer");return{...$,systemClockOffset:w,signingEscapePath:U,credentials:f,signer:W}},"resolveAwsSdkSigV4Config"),iZ=xW});var N1=z((f2)=>{var tZ=":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",yW="[: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]["+tZ+"]*",eZ=new RegExp("^"+yW+"$"),aZ=function($,f){const U=[];let w=f.exec($);while(w){const G=[];G.startIndex=f.lastIndex-w[0].length;const W=w.length;for(let E=0;E<W;E++)G.push(w[E]);U.push(G),w=f.exec($)}return U},$2=function($){const f=eZ.exec($);return!(f===null||typeof f==="undefined")};f2.isExist=function($){return typeof $!=="undefined"};f2.isEmptyObject=function($){return Object.keys($).length===0};f2.merge=function($,f,U){if(f){const w=Object.keys(f),G=w.length;for(let W=0;W<G;W++)if(U==="strict")$[w[W]]=[f[w[W]]];else $[w[W]]=f[w[W]]}};f2.getValue=function($){if(f2.isExist($))return $;else return""};f2.isName=$2;f2.getAllMatches=aZ;f2.nameRegexp=yW});var r$=z((J2)=>{var dW=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},gW=function($,f){const U=f;for(;f<$.length;f++)if($[f]=="?"||$[f]==" "){const w=$.substr(U,f-U);if(f>5&&w==="xml")return O("InvalidXml","XML declaration allowed only at the start of the document.",C($,f));else if($[f]=="?"&&$[f+1]==">"){f++;break}else continue}return f},sW=function($,f){if($.length>f+5&&$[f+1]==="-"&&$[f+2]==="-"){for(f+=3;f<$.length;f++)if($[f]==="-"&&$[f+1]==="-"&&$[f+2]===">"){f+=2;break}}else if($.length>f+8&&$[f+1]==="D"&&$[f+2]==="O"&&$[f+3]==="C"&&$[f+4]==="T"&&$[f+5]==="Y"&&$[f+6]==="P"&&$[f+7]==="E"){let U=1;for(f+=8;f<$.length;f++)if($[f]==="<")U++;else if($[f]===">"){if(U--,U===0)break}}else if($.length>f+9&&$[f+1]==="["&&$[f+2]==="C"&&$[f+3]==="D"&&$[f+4]==="A"&&$[f+5]==="T"&&$[f+6]==="A"&&$[f+7]==="["){for(f+=8;f<$.length;f++)if($[f]==="]"&&$[f+1]==="]"&&$[f+2]===">"){f+=2;break}}return f},Y2=function($,f){let U="",w="",G=!1;for(;f<$.length;f++){if($[f]===M2||$[f]===Z2)if(w==="")w=$[f];else if(w!==$[f]);else w="";else if($[f]===">"){if(w===""){G=!0;break}}U+=$[f]}if(w!=="")return!1;return{value:U,index:f,tagClosed:G}},nW=function($,f){const U=n$.getAllMatches($,I2),w={};for(let G=0;G<U.length;G++){if(U[G][1].length===0)return O("InvalidAttr","Attribute '"+U[G][2]+"' has no space in starting.",c0(U[G]));else if(U[G][3]!==void 0&&U[G][4]===void 0)return O("InvalidAttr","Attribute '"+U[G][2]+"' is without value.",c0(U[G]));else if(U[G][3]===void 0&&!f.allowBooleanAttributes)return O("InvalidAttr","boolean attribute '"+U[G][2]+"' is not allowed.",c0(U[G]));const W=U[G][2];if(!z2(W))return O("InvalidAttr","Attribute '"+W+"' is an invalid name.",c0(U[G]));if(!w.hasOwnProperty(W))w[W]=1;else return O("InvalidAttr","Attribute '"+W+"' is repeated.",c0(U[G]))}return!0},F2=function($,f){let U=/\d/;if($[f]==="x")f++,U=/[\da-fA-F]/;for(;f<$.length;f++){if($[f]===";")return f;if(!$[f].match(U))break}return-1},R2=function($,f){if(f++,$[f]===";")return-1;if($[f]==="#")return f++,F2($,f);let U=0;for(;f<$.length;f++,U++){if($[f].match(/\w/)&&U<20)continue;if($[f]===";")break;return-1}return f},O=function($,f,U){return{err:{code:$,msg:f,line:U.line||U,col:U.col}}},z2=function($){return n$.isName($)},Q2=function($){return n$.isName($)},C=function($,f){const U=$.substring(0,f).split(/\r?\n/);return{line:U.length,col:U[U.length-1].length+1}},c0=function($){return $.startIndex+$[1].length},n$=N1(),X2={allowBooleanAttributes:!1,unpairedTags:[]};J2.validate=function($,f){f=Object.assign({},X2,f);const U=[];let w=!1,G=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let W=0;W<$.length;W++)if($[W]==="<"&&$[W+1]==="?"){if(W+=2,W=gW($,W),W.err)return W}else if($[W]==="<"){let E=W;if(W++,$[W]==="!"){W=sW($,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(!Q2(X)){let Y;if(X.trim().length===0)Y="Invalid space after '<'.";else Y="Tag '"+X+"' is an invalid name.";return O("InvalidTag",Y,C($,W))}const M=Y2($,W);if(M===!1)return O("InvalidAttr","Attributes for '"+X+"' have open quote.",C($,W));let Z=M.value;if(W=M.index,Z[Z.length-1]==="/"){const Y=W-Z.length;Z=Z.substring(0,Z.length-1);const F=nW(Z,f);if(F===!0)w=!0;else return O(F.err.code,F.err.msg,C($,Y+F.err.line))}else if(L)if(!M.tagClosed)return O("InvalidTag","Closing tag '"+X+"' doesn't have proper closing.",C($,W));else if(Z.trim().length>0)return O("InvalidTag","Closing tag '"+X+"' can't have attributes or invalid starting.",C($,E));else if(U.length===0)return O("InvalidTag","Closing tag '"+X+"' has not been opened.",C($,E));else{const Y=U.pop();if(X!==Y.tagName){let F=C($,Y.tagStartPos);return O("InvalidTag","Expected closing tag '"+Y.tagName+"' (opened in line "+F.line+", col "+F.col+") instead of closing tag '"+X+"'.",C($,E))}if(U.length==0)G=!0}else{const Y=nW(Z,f);if(Y!==!0)return O(Y.err.code,Y.err.msg,C($,W-Z.length+Y.err.line));if(G===!0)return O("InvalidXml","Multiple possible root nodes found.",C($,W));else if(f.unpairedTags.indexOf(X)!==-1);else U.push({tagName:X,tagStartPos:E});w=!0}for(W++;W<$.length;W++)if($[W]==="<")if($[W+1]==="!"){W++,W=sW($,W);continue}else if($[W+1]==="?"){if(W=gW($,++W),W.err)return W}else break;else if($[W]==="&"){const Y=R2($,W);if(Y==-1)return O("InvalidChar","char '&' is not expected.",C($,W));W=Y}else if(G===!0&&!dW($[W]))return O("InvalidXml","Extra text at the end",C($,W));if($[W]==="<")W--}}else{if(dW($[W]))continue;return O("InvalidChar","char '"+$[W]+"' is not expected.",C($,W))}if(!w)return O("InvalidXml","Start tag expected.",1);else if(U.length==1)return O("InvalidTag","Unclosed tag '"+U[0].tagName+"'.",C($,U[0].tagStartPos));else if(U.length>0)return O("InvalidXml","Invalid '"+JSON.stringify(U.map((W)=>W.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var M2='"',Z2="'",I2=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var mW=z((B2)=>{var rW={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($,f){return f},attributeValueProcessor:function($,f){return f},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,f,U){return $}},K2=function($){return Object.assign({},rW,$)};B2.buildOptions=K2;B2.defaultOptions=rW});var iW=z((IQ,oW)=>{class lW{constructor($){this.tagname=$,this.child=[],this[":@"]={}}add($,f){if($==="__proto__")$="#__proto__";this.child.push({[$]:f})}addChild($){if($.tagname==="__proto__")$.tagname="#__proto__";if($[":@"]&&Object.keys($[":@"]).length>0)this.child.push({[$.tagname]:$.child,[":@"]:$[":@"]});else this.child.push({[$.tagname]:$.child})}}oW.exports=lW});var eW=z((FQ,tW)=>{var H2=function($,f){const U={};if($[f+3]==="O"&&$[f+4]==="C"&&$[f+5]==="T"&&$[f+6]==="Y"&&$[f+7]==="P"&&$[f+8]==="E"){f=f+9;let w=1,G=!1,W=!1,E="";for(;f<$.length;f++)if($[f]==="<"&&!W){if(G&&N2($,f)){if(f+=7,[entityName,val,f]=V2($,f+1),val.indexOf("&")===-1)U[b2(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(G&&P2($,f))f+=8;else if(G&&S2($,f))f+=8;else if(G&&j2($,f))f+=9;else if(C2)W=!0;else throw new Error("Invalid DOCTYPE");w++,E=""}else if($[f]===">"){if(W){if($[f-1]==="-"&&$[f-2]==="-")W=!1,w--}else w--;if(w===0)break}else if($[f]==="[")G=!0;else E+=$[f];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:U,i:f}},V2=function($,f){let U="";for(;f<$.length&&($[f]!=="'"&&$[f]!=='"');f++)U+=$[f];if(U=U.trim(),U.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=$[f++];let G="";for(;f<$.length&&$[f]!==w;f++)G+=$[f];return[U,G,f]},C2=function($,f){if($[f+1]==="!"&&$[f+2]==="-"&&$[f+3]==="-")return!0;return!1},N2=function($,f){if($[f+1]==="!"&&$[f+2]==="E"&&$[f+3]==="N"&&$[f+4]==="T"&&$[f+5]==="I"&&$[f+6]==="T"&&$[f+7]==="Y")return!0;return!1},P2=function($,f){if($[f+1]==="!"&&$[f+2]==="E"&&$[f+3]==="L"&&$[f+4]==="E"&&$[f+5]==="M"&&$[f+6]==="E"&&$[f+7]==="N"&&$[f+8]==="T")return!0;return!1},S2=function($,f){if($[f+1]==="!"&&$[f+2]==="A"&&$[f+3]==="T"&&$[f+4]==="T"&&$[f+5]==="L"&&$[f+6]==="I"&&$[f+7]==="S"&&$[f+8]==="T")return!0;return!1},j2=function($,f){if($[f+1]==="!"&&$[f+2]==="N"&&$[f+3]==="O"&&$[f+4]==="T"&&$[f+5]==="A"&&$[f+6]==="T"&&$[f+7]==="I"&&$[f+8]==="O"&&$[f+9]==="N")return!0;return!1},b2=function($){if(T2.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},T2=N1();tW.exports=H2});var $8=z((RQ,aW)=>{var c2=function($,f={}){if(f=Object.assign({},D2,f),!$||typeof $!=="string")return $;let U=$.trim();if(f.skipLike!==void 0&&f.skipLike.test(U))return $;else if(f.hex&&k2.test(U))return Number.parseInt(U,16);else{const w=h2.exec(U);if(w){const G=w[1],W=w[2];let E=_2(w[3]);const L=w[4]||w[6];if(!f.leadingZeros&&W.length>0&&G&&U[2]!==".")return $;else if(!f.leadingZeros&&W.length>0&&!G&&U[1]!==".")return $;else{const X=Number(U),M=""+X;if(M.search(/[eE]/)!==-1)if(f.eNotation)return X;else return $;else if(L)if(f.eNotation)return X;else return $;else if(U.indexOf(".")!==-1)if(M==="0"&&E==="")return X;else if(M===E)return X;else if(G&&M==="-"+E)return X;else return $;if(W)if(E===M)return X;else if(G+E===M)return X;else return $;if(U===M)return X;else if(U===G+M)return X;return $}}else return $}},_2=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},k2=/^[-+]?0x[a-fA-F0-9]+$/,h2=/^([\-\+])?(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 D2={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};aW.exports=c2});var G8=z((zQ,w8)=>{var u2=function($){const f=Object.keys($);for(let U=0;U<f.length;U++){const w=f[U];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:$[w]}}},y2=function($,f,U,w,G,W,E){if($!==void 0){if(this.options.trimValues&&!w)$=$.trim();if($.length>0){if(!E)$=this.replaceEntitiesValue($);const L=this.options.tagValueProcessor(f,$,U,G,W);if(L===null||L===void 0)return $;else if(typeof L!==typeof $||L!==$)return L;else if(this.options.trimValues)return l$($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return l$($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},p2=function($){if(this.options.removeNSPrefix){const f=$.split(":"),U=$.charAt(0)==="/"?"/":"";if(f[0]==="xmlns")return"";if(f.length===2)$=U+f[1]}return $},g2=function($,f,U){if(!this.options.ignoreAttributes&&typeof $==="string"){const w=f8.getAllMatches($,d2),G=w.length,W={};for(let E=0;E<G;E++){const L=this.resolveNameSpace(w[E][1]);let X=w[E][4],M=this.options.attributeNamePrefix+L;if(L.length){if(this.options.transformAttributeName)M=this.options.transformAttributeName(M);if(M==="__proto__")M="#__proto__";if(X!==void 0){if(this.options.trimValues)X=X.trim();X=this.replaceEntitiesValue(X);const Z=this.options.attributeValueProcessor(L,X,f);if(Z===null||Z===void 0)W[M]=X;else if(typeof Z!==typeof X||Z!==X)W[M]=Z;else W[M]=l$(X,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)W[M]=!0}}if(!Object.keys(W).length)return;if(this.options.attributesGroupName){const E={};return E[this.options.attributesGroupName]=W,E}return W}},n2=function($,f,U){const w=this.options.updateTag(f.tagname,U,f[":@"]);if(w===!1);else if(typeof w==="string")f.tagname=w,$.addChild(f);else $.addChild(f)},m2=function($,f,U,w){if($){if(w===void 0)w=Object.keys(f.child).length===0;if($=this.parseTextData($,f.tagname,U,!1,f[":@"]?Object.keys(f[":@"]).length!==0:!1,w),$!==void 0&&$!=="")f.add(this.options.textNodeName,$);$=""}return $},l2=function($,f,U){const w="*."+U;for(let G in $){const W=$[G];if(w===W||f===W)return!0}return!1},o2=function($,f,U=">"){let w,G="";for(let W=f;W<$.length;W++){let E=$[W];if(w){if(E===w)w=""}else if(E==='"'||E==="'")w=E;else if(E===U[0])if(U[1]){if($[W+1]===U[1])return{data:G,index:W}}else return{data:G,index:W};else if(E==="\t")E=" ";G+=E}},a=function($,f,U,w){const G=$.indexOf(f,U);if(G===-1)throw new Error(w);else return G+f.length-1},m$=function($,f,U,w=">"){const G=o2($,f+1,w);if(!G)return;let W=G.data;const E=G.index,L=W.search(/\s/);let X=W,M=!0;if(L!==-1)X=W.substring(0,L),W=W.substring(L+1).trimStart();const Z=X;if(U){const Y=X.indexOf(":");if(Y!==-1)X=X.substr(Y+1),M=X!==G.data.substr(Y+1)}return{tagName:X,tagExp:W,closeIndex:E,attrExpPresent:M,rawTagName:Z}},i2=function($,f,U){const w=U;let G=1;for(;U<$.length;U++)if($[U]==="<")if($[U+1]==="/"){const W=a($,">",U,`${f} is not closed`);if($.substring(U+2,W).trim()===f){if(G--,G===0)return{tagContent:$.substring(w,U),i:W}}U=W}else if($[U+1]==="?")U=a($,"?>",U+1,"StopNode is not closed.");else if($.substr(U+1,3)==="!--")U=a($,"-->",U+3,"StopNode is not closed.");else if($.substr(U+1,2)==="![")U=a($,"]]>",U,"StopNode is not closed.")-2;else{const W=m$($,U,">");if(W){if((W&&W.tagName)===f&&W.tagExp[W.tagExp.length-1]!=="/")G++;U=W.closeIndex}}},l$=function($,f,U){if(f&&typeof $==="string"){const w=$.trim();if(w==="true")return!0;else if(w==="false")return!1;else return v2($,U)}else if(f8.isExist($))return $;else return""},f8=N1(),_0=iW(),x2=eW(),v2=$8();class U8{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:(f,U)=>String.fromCharCode(Number.parseInt(U,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(f,U)=>String.fromCharCode(Number.parseInt(U,16))}},this.addExternalEntities=u2,this.parseXml=s2,this.parseTextData=y2,this.resolveNameSpace=p2,this.buildAttributesMap=g2,this.isItStopNode=l2,this.replaceEntitiesValue=r2,this.readStopNodeData=i2,this.saveTextToParentTag=m2,this.addChild=n2}}var d2=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),s2=function($){$=$.replace(/\r\n?/g,"\n");const f=new _0("!xml");let U=f,w="",G="";for(let W=0;W<$.length;W++)if($[W]==="<")if($[W+1]==="/"){const L=a($,">",W,"Closing Tag is not closed.");let X=$.substring(W+2,L).trim();if(this.options.removeNSPrefix){const Y=X.indexOf(":");if(Y!==-1)X=X.substr(Y+1)}if(this.options.transformTagName)X=this.options.transformTagName(X);if(U)w=this.saveTextToParentTag(w,U,G);const M=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(M&&this.options.unpairedTags.indexOf(M)!==-1)Z=G.lastIndexOf(".",G.lastIndexOf(".")-1),this.tagsNodeStack.pop();else Z=G.lastIndexOf(".");G=G.substring(0,Z),U=this.tagsNodeStack.pop(),w="",W=L}else if($[W+1]==="?"){let L=m$($,W,!1,"?>");if(!L)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,U,G),this.options.ignoreDeclaration&&L.tagName==="?xml"||this.options.ignorePiTags);else{const X=new _0(L.tagName);if(X.add(this.options.textNodeName,""),L.tagName!==L.tagExp&&L.attrExpPresent)X[":@"]=this.buildAttributesMap(L.tagExp,G,L.tagName);this.addChild(U,X,G)}W=L.closeIndex+1}else if($.substr(W+1,3)==="!--"){const L=a($,"-->",W+4,"Comment is not closed.");if(this.options.commentPropName){const X=$.substring(W+4,L-2);w=this.saveTextToParentTag(w,U,G),U.add(this.options.commentPropName,[{[this.options.textNodeName]:X}])}W=L}else if($.substr(W+1,2)==="!D"){const L=x2($,W);this.docTypeEntities=L.entities,W=L.i}else if($.substr(W+1,2)==="!["){const L=a($,"]]>",W,"CDATA is not closed.")-2,X=$.substring(W+9,L);w=this.saveTextToParentTag(w,U,G);let M=this.parseTextData(X,U.tagname,G,!0,!1,!0,!0);if(M==null)M="";if(this.options.cdataPropName)U.add(this.options.cdataPropName,[{[this.options.textNodeName]:X}]);else U.add(this.options.textNodeName,M);W=L+2}else{let L=m$($,W,this.options.removeNSPrefix),X=L.tagName;const M=L.rawTagName;let{tagExp:Z,attrExpPresent:Y,closeIndex:F}=L;if(this.options.transformTagName)X=this.options.transformTagName(X);if(U&&w){if(U.tagname!=="!xml")w=this.saveTextToParentTag(w,U,G,!1)}const R=U;if(R&&this.options.unpairedTags.indexOf(R.tagname)!==-1)U=this.tagsNodeStack.pop(),G=G.substring(0,G.lastIndexOf("."));if(X!==f.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 q=this.readStopNodeData($,M,F+1);if(!q)throw new Error(`Unexpected end of ${M}`);W=q.i,Q=q.tagContent}const J=new _0(X);if(X!==Z&&Y)J[":@"]=this.buildAttributesMap(Z,G,X);if(Q)Q=this.parseTextData(Q,X,G,!0,Y,!0,!0);G=G.substr(0,G.lastIndexOf(".")),J.add(this.options.textNodeName,Q),this.addChild(U,J,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 _0(X);if(X!==Z&&Y)Q[":@"]=this.buildAttributesMap(Z,G,X);this.addChild(U,Q,G),G=G.substr(0,G.lastIndexOf("."))}else{const Q=new _0(X);if(this.tagsNodeStack.push(U),X!==Z&&Y)Q[":@"]=this.buildAttributesMap(Z,G,X);this.addChild(U,Q,G),U=Q}w="",W=F}}else w+=$[W];return f.child},r2=function($){if(this.options.processEntities){for(let f in this.docTypeEntities){const U=this.docTypeEntities[f];$=$.replace(U.regx,U.val)}for(let f in this.lastEntities){const U=this.lastEntities[f];$=$.replace(U.regex,U.val)}if(this.options.htmlEntities)for(let f in this.htmlEntities){const U=this.htmlEntities[f];$=$.replace(U.regex,U.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};w8.exports=U8});var E8=z((f9)=>{var t2=function($,f){return W8($,f)},W8=function($,f,U){let w;const G={};for(let W=0;W<$.length;W++){const E=$[W],L=e2(E);let X="";if(U===void 0)X=L;else X=U+"."+L;if(L===f.textNodeName)if(w===void 0)w=E[L];else w+=""+E[L];else if(L===void 0)continue;else if(E[L]){let M=W8(E[L],f,X);const Z=$9(M,f);if(E[":@"])a2(M,E[":@"],X,f);else if(Object.keys(M).length===1&&M[f.textNodeName]!==void 0&&!f.alwaysCreateTextNode)M=M[f.textNodeName];else if(Object.keys(M).length===0)if(f.alwaysCreateTextNode)M[f.textNodeName]="";else M="";if(G[L]!==void 0&&G.hasOwnProperty(L)){if(!Array.isArray(G[L]))G[L]=[G[L]];G[L].push(M)}else if(f.isArray(L,X,Z))G[L]=[M];else G[L]=M}}if(typeof w==="string"){if(w.length>0)G[f.textNodeName]=w}else if(w!==void 0)G[f.textNodeName]=w;return G},e2=function($){const f=Object.keys($);for(let U=0;U<f.length;U++){const w=f[U];if(w!==":@")return w}},a2=function($,f,U,w){if(f){const G=Object.keys(f),W=G.length;for(let E=0;E<W;E++){const L=G[E];if(w.isArray(L,U+"."+L,!0,!0))$[L]=[f[L]];else $[L]=f[L]}}},$9=function($,f){const{textNodeName:U}=f,w=Object.keys($).length;if(w===0)return!0;if(w===1&&($[U]||typeof $[U]==="boolean"||$[U]===0))return!0;return!1};f9.prettify=t2});var M8=z((JQ,X8)=>{var{buildOptions:w9}=mW(),G9=G8(),{prettify:W9}=E8(),E9=r$();class L8{constructor($){this.externalEntities={},this.options=w9($)}parse($,f){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(f){if(f===!0)f={};const G=E9.validate($,f);if(G!==!0)throw Error(`${G.err.msg}:${G.err.line}:${G.err.col}`)}const U=new G9(this.options);U.addExternalEntities(this.externalEntities);const w=U.parseXml($);if(this.options.preserveOrder||w===void 0)return w;else return W9(w,this.options)}addEntity($,f){if(f.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(f==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=f}}X8.exports=L8});var R8=z((AQ,F8)=>{var L9=function($,f){let U="";if(f.format&&f.indentBy.length>0)U="\n";return Y8($,f,"",U)},Y8=function($,f,U,w){let G="",W=!1;for(let E=0;E<$.length;E++){const L=$[E],X=X9(L);if(X===void 0)continue;let M="";if(U.length===0)M=X;else M=`${U}.${X}`;if(X===f.textNodeName){let Q=L[X];if(!M9(M,f))Q=f.tagValueProcessor(X,Q),Q=I8(Q,f);if(W)G+=w;G+=Q,W=!1;continue}else if(X===f.cdataPropName){if(W)G+=w;G+=`<![CDATA[${L[X][0][f.textNodeName]}]]>`,W=!1;continue}else if(X===f.commentPropName){G+=w+`<!--${L[X][0][f.textNodeName]}-->`,W=!0;continue}else if(X[0]==="?"){const Q=Z8(L[":@"],f),J=X==="?xml"?"":w;let q=L[X][0][f.textNodeName];q=q.length!==0?" "+q:"",G+=J+`<${X}${q}${Q}?>`,W=!0;continue}let Z=w;if(Z!=="")Z+=f.indentBy;const Y=Z8(L[":@"],f),F=w+`<${X}${Y}`,R=Y8(L[X],f,M,Z);if(f.unpairedTags.indexOf(X)!==-1)if(f.suppressUnpairedNode)G+=F+">";else G+=F+"/>";else if((!R||R.length===0)&&f.suppressEmptyNode)G+=F+"/>";else if(R&&R.endsWith(">"))G+=F+`>${R}${w}</${X}>`;else{if(G+=F+">",R&&w!==""&&(R.includes("/>")||R.includes("</")))G+=w+f.indentBy+R+w;else G+=R;G+=`</${X}>`}W=!0}return G},X9=function($){const f=Object.keys($);for(let U=0;U<f.length;U++){const w=f[U];if(!$.hasOwnProperty(w))continue;if(w!==":@")return w}},Z8=function($,f){let U="";if($&&!f.ignoreAttributes)for(let w in $){if(!$.hasOwnProperty(w))continue;let G=f.attributeValueProcessor(w,$[w]);if(G=I8(G,f),G===!0&&f.suppressBooleanAttributes)U+=` ${w.substr(f.attributeNamePrefix.length)}`;else U+=` ${w.substr(f.attributeNamePrefix.length)}="${G}"`}return U},M9=function($,f){$=$.substr(0,$.length-f.textNodeName.length-1);let U=$.substr($.lastIndexOf(".")+1);for(let w in f.stopNodes)if(f.stopNodes[w]===$||f.stopNodes[w]==="*."+U)return!0;return!1},I8=function($,f){if($&&$.length>0&&f.processEntities)for(let U=0;U<f.entities.length;U++){const w=f.entities[U];$=$.replace(w.regex,w.val)}return $};F8.exports=L9});var Q8=z((KQ,z8)=>{var r=function($){if(this.options=Object.assign({},Y9,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=R9;if(this.processTextOrObjNode=I9,this.options.format)this.indentate=F9,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},I9=function($,f,U){const w=this.j2x($,U+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],f,w.attrStr,U);else return this.buildObjectNode(w.val,f,w.attrStr,U)},F9=function($){return this.options.indentBy.repeat($)},R9=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},Z9=R8(),Y9={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,f){return f},attributeValueProcessor:function($,f){return f},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};r.prototype.build=function($){if(this.options.preserveOrder)return Z9($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};r.prototype.j2x=function($,f){let U="",w="";for(let G in $){if(!Object.prototype.hasOwnProperty.call($,G))continue;if(typeof $[G]==="undefined"){if(this.isAttribute(G))w+=""}else if($[G]===null)if(this.isAttribute(G))w+="";else if(G[0]==="?")w+=this.indentate(f)+"<"+G+"?"+this.tagEndChar;else w+=this.indentate(f)+"<"+G+"/"+this.tagEndChar;else if($[G]instanceof Date)w+=this.buildTextValNode($[G],G,"",f);else if(typeof $[G]!=="object"){const W=this.isAttribute(G);if(W)U+=this.buildAttrPairStr(W,""+$[G]);else if(G===this.options.textNodeName){let E=this.options.tagValueProcessor(G,""+$[G]);w+=this.replaceEntitiesValue(E)}else w+=this.buildTextValNode($[G],G,"",f)}else if(Array.isArray($[G])){const W=$[G].length;let E="",L="";for(let X=0;X<W;X++){const M=$[G][X];if(typeof M==="undefined");else if(M===null)if(G[0]==="?")w+=this.indentate(f)+"<"+G+"?"+this.tagEndChar;else w+=this.indentate(f)+"<"+G+"/"+this.tagEndChar;else if(typeof M==="object")if(this.options.oneListGroup){const Z=this.j2x(M,f+1);if(E+=Z.val,this.options.attributesGroupName&&M.hasOwnProperty(this.options.attributesGroupName))L+=Z.attrStr}else E+=this.processTextOrObjNode(M,G,f);else if(this.options.oneListGroup){let Z=this.options.tagValueProcessor(G,M);Z=this.replaceEntitiesValue(Z),E+=Z}else E+=this.buildTextValNode(M,G,"",f)}if(this.options.oneListGroup)E=this.buildObjectNode(E,G,L,f);w+=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++)U+=this.buildAttrPairStr(W[L],""+$[G][W[L]])}else w+=this.processTextOrObjNode($[G],G,f)}return{attrStr:U,val:w}};r.prototype.buildAttrPairStr=function($,f){if(f=this.options.attributeValueProcessor($,""+f),f=this.replaceEntitiesValue(f),this.options.suppressBooleanAttributes&&f==="true")return" "+$;else return" "+$+'="'+f+'"'};r.prototype.buildObjectNode=function($,f,U,w){if($==="")if(f[0]==="?")return this.indentate(w)+"<"+f+U+"?"+this.tagEndChar;else return this.indentate(w)+"<"+f+U+this.closeTag(f)+this.tagEndChar;else{let G="</"+f+this.tagEndChar,W="";if(f[0]==="?")W="?",G="";if((U||U==="")&&$.indexOf("<")===-1)return this.indentate(w)+"<"+f+U+W+">"+$+G;else if(this.options.commentPropName!==!1&&f===this.options.commentPropName&&W.length===0)return this.indentate(w)+`<!--${$}-->`+this.newLine;else return this.indentate(w)+"<"+f+U+W+this.tagEndChar+$+this.indentate(w)+G}};r.prototype.closeTag=function($){let f="";if(this.options.unpairedTags.indexOf($)!==-1){if(!this.options.suppressUnpairedNode)f="/"}else if(this.options.suppressEmptyNode)f="/";else f=`></${$}`;return f};r.prototype.buildTextValNode=function($,f,U,w){if(this.options.cdataPropName!==!1&&f===this.options.cdataPropName)return this.indentate(w)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&f===this.options.commentPropName)return this.indentate(w)+`<!--${$}-->`+this.newLine;else if(f[0]==="?")return this.indentate(w)+"<"+f+U+"?"+this.tagEndChar;else{let G=this.options.tagValueProcessor(f,$);if(G=this.replaceEntitiesValue(G),G==="")return this.indentate(w)+"<"+f+U+this.closeTag(f)+this.tagEndChar;else return this.indentate(w)+"<"+f+U+">"+G+"</"+f+this.tagEndChar}};r.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let f=0;f<this.options.entities.length;f++){const U=this.options.entities[f];$=$.replace(U.regex,U.val)}return $};z8.exports=r});var A8=z((BQ,J8)=>{var z9=r$(),Q9=M8(),J9=Q8();J8.exports={XMLParser:Q9,XMLValidator:z9,XMLBuilder:J9}});var H8=z((OQ,T8)=>{var{defineProperty:P1,getOwnPropertyDescriptor:A9,getOwnPropertyNames:K9}=Object,B9=Object.prototype.hasOwnProperty,P=($,f)=>P1($,"name",{value:f,configurable:!0}),O9=($,f)=>{for(var U in f)P1($,U,{get:f[U],enumerable:!0})},q9=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of K9(f))if(!B9.call($,G)&&G!==U)P1($,G,{get:()=>f[G],enumerable:!(w=A9(f,G))||w.enumerable})}return $},T9=($)=>q9(P1({},"__esModule",{value:!0}),$),K8={};O9(K8,{_toBool:()=>V9,_toNum:()=>C9,_toStr:()=>H9,awsExpectUnion:()=>P9,loadRestJsonErrorCode:()=>b9,loadRestXmlErrorCode:()=>c9,parseJsonBody:()=>O8,parseJsonErrorBody:()=>j9,parseXmlBody:()=>q8,parseXmlErrorBody:()=>D9});T8.exports=T9(K8);var H9=P(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){const f=new Error(`Received number ${$} where a string was expected.`);return f.name="Warning",console.warn(f),String($)}if(typeof $==="boolean"){const f=new Error(`Received boolean ${$} where a string was expected.`);return f.name="Warning",console.warn(f),String($)}return $},"_toStr"),V9=P(($)=>{if($==null)return $;if(typeof $==="string"){const f=$.toLowerCase();if($!==""&&f!=="false"&&f!=="true"){const U=new Error(`Received string "${$}" where a boolean was expected.`);U.name="Warning",console.warn(U)}return $!==""&&f!=="false"}return $},"_toBool"),C9=P(($)=>{if($==null)return $;if(typeof $==="string"){const f=Number($);if(f.toString()!==$){const U=new Error(`Received string "${$}" where a number was expected.`);return U.name="Warning",console.warn(U),$}return f}return $},"_toNum"),N9=X0(),P9=P(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return N9.expectUnion($)},"awsExpectUnion"),S9=X0(),B8=P(($,f)=>S9.collectBody($,f).then((U)=>f.utf8Encoder(U)),"collectBodyString"),O8=P(($,f)=>B8($,f).then((U)=>{if(U.length)try{return JSON.parse(U)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:U});throw w}return{}}),"parseJsonBody"),j9=P(async($,f)=>{const U=await O8($,f);return U.message=U.message??U.Message,U},"parseJsonErrorBody"),b9=P(($,f)=>{const U=P((W,E)=>Object.keys(W).find((L)=>L.toLowerCase()===E.toLowerCase()),"findKey"),w=P((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=U($.headers,"x-amzn-errortype");if(G!==void 0)return w($.headers[G]);if(f.code!==void 0)return w(f.code);if(f.__type!==void 0)return w(f.__type)},"loadRestJsonErrorCode"),k9=X0(),h9=A8(),q8=P(($,f)=>B8($,f).then((U)=>{if(U.length){const w=new h9.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(X,M)=>M.trim()===""&&M.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let G;try{G=w.parse(U,!0)}catch(X){if(X&&typeof X==="object")Object.defineProperty(X,"$responseBodyText",{value:U});throw X}const W="#text",E=Object.keys(G)[0],L=G[E];if(L[W])L[E]=L[W],delete L[W];return k9.getValueFromTextNode(L)}return{}}),"parseXmlBody"),D9=P(async($,f)=>{const U=await q8($,f);if(U.Error)U.Error.message=U.Error.message??U.Error.Message;return U},"parseXmlErrorBody"),c9=P(($,f)=>{var U;if(((U=f==null?void 0:f.Error)==null?void 0:U.Code)!==void 0)return f.Error.Code;if((f==null?void 0:f.Code)!==void 0)return f.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var x9=z((x0)=>{Object.defineProperty(x0,"__esModule",{value:!0});var o$=_9();o$.__exportStar(MW(),x0);o$.__exportStar(uW(),x0);o$.__exportStar(H8(),x0)});function $5($){return $}var v8=($)=>(f)=>async(U)=>{if(!S.isInstance(U.request))return f(U);const{request:w}=U,{handlerProtocol:G=""}=$.requestHandler.metadata||{};if(G.indexOf("h2")>=0&&!w.headers[":authority"])delete w.headers.host,w.headers[":authority"]=w.hostname+(w.port?":"+w.port:"");else if(!w.headers.host){let W=w.hostname;if(w.port!=null)W+=`:${w.port}`;w.headers.host=W}return f(U)},u8={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},f5=($)=>({applyToStack:(f)=>{f.add(v8($),u8)}});var y8=()=>($,f)=>async(U)=>{try{const w=await $(U),{clientName:G,commandName:W,logger:E,dynamoDbDocumentClientOptions:L={}}=f,{overrideInputFilterSensitiveLog:X,overrideOutputFilterSensitiveLog:M}=L,Z=X??f.inputFilterSensitiveLog,Y=M??f.outputFilterSensitiveLog,{$metadata:F,...R}=w.output;return E?.info?.({clientName:G,commandName:W,input:Z(U.input),output:Y(R),metadata:F}),w}catch(w){const{clientName:G,commandName:W,logger:E,dynamoDbDocumentClientOptions:L={}}=f,{overrideInputFilterSensitiveLog:X}=L,M=X??f.inputFilterSensitiveLog;throw E?.error?.({clientName:G,commandName:W,input:M(U.input),error:w,metadata:w.$metadata}),w}},p8={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},w5=($)=>({applyToStack:(f)=>{f.add(y8(),p8)}});var ff="X-Amzn-Trace-Id",d8="AWS_LAMBDA_FUNCTION_NAME",g8="_X_AMZN_TRACE_ID",s8=($)=>(f)=>async(U)=>{const{request:w}=U;if(!S.isInstance(w)||$.runtime!=="node"||w.headers.hasOwnProperty(ff))return f(U);const G=process.env[d8],W=process.env[g8],E=(L)=>typeof L==="string"&&L.length>0;if(E(G)&&E(W))w.headers[ff]=W;return f({...U,request:w})},n8={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},X5=($)=>({applyToStack:(f)=>{f.add(s8($),n8)}});function s5($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var FM=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}$"),S0=($)=>FM.test($)||$.startsWith("[")&&$.endsWith("]");var RM=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),j0=($,f=!1)=>{if(!f)return RM.test($);const U=$.split(".");for(let w of U)if(!j0(w))return!1;return!0};var b0={};var u="endpoints";function b($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${b($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(b).join(", ")})`;return JSON.stringify($,null,2)}class A extends Error{constructor($){super($);this.name="EndpointError"}}var JG=($,f)=>$===f;var AG=($)=>{const f=$.split("."),U=[];for(let w of f){const G=w.indexOf("[");if(G!==-1){if(w.indexOf("]")!==w.length-1)throw new A(`Path: '${$}' does not end with ']'`);const W=w.slice(G+1,-1);if(Number.isNaN(parseInt(W)))throw new A(`Invalid array index: '${W}' in path: '${$}'`);if(G!==0)U.push(w.slice(0,G));U.push(W)}else U.push(w)}return U};var G1=($,f)=>AG(f).reduce((U,w)=>{if(typeof U!=="object")throw new A(`Index '${w}' in '${f}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(U))return U[parseInt(w)];return U[w]},$);var KG=($)=>$!=null;var BG=($)=>!$;var W1=y(f0(),1);var Q$={[W1.EndpointURLScheme.HTTP]:80,[W1.EndpointURLScheme.HTTPS]:443},OG=($)=>{const f=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:F,port:R,protocol:Q="",path:J="",query:q={}}=$,$f=new URL(`${Q}//${F}${R?`:${R}`:""}${J}`);return $f.search=Object.entries(q).map(([_8,x8])=>`${_8}=${x8}`).join("&"),$f}return new URL($)}catch(F){return null}})();if(!f)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const U=f.href,{host:w,hostname:G,pathname:W,protocol:E,search:L}=f;if(L)return null;const X=E.slice(0,-1);if(!Object.values(W1.EndpointURLScheme).includes(X))return null;const M=S0(G),Z=U.includes(`${w}:${Q$[X]}`)||typeof $==="string"&&$.includes(`${w}:${Q$[X]}`),Y=`${w}${Z?`:${Q$[X]}`:""}`;return{scheme:X,authority:Y,path:W,normalizedPath:W.endsWith("/")?W:`${W}/`,isIp:M}};var qG=($,f)=>$===f;var TG=($,f,U,w)=>{if(f>=U||$.length<U)return null;if(!w)return $.substring(f,U);return $.substring($.length-U,$.length-f)};var HG=($)=>encodeURIComponent($).replace(/[!*'()]/g,(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`);var VG={booleanEquals:JG,getAttr:G1,isSet:KG,isValidHostLabel:j0,not:BG,parseURL:OG,stringEquals:qG,substring:TG,uriEncode:HG};var E1=($,f)=>{const U=[],w={...f.endpointParams,...f.referenceRecord};let G=0;while(G<$.length){const W=$.indexOf("{",G);if(W===-1){U.push($.slice(G));break}U.push($.slice(G,W));const E=$.indexOf("}",W);if(E===-1){U.push($.slice(W));break}if($[W+1]==="{"&&$[E+1]==="}")U.push($.slice(W+1,E)),G=E+2;const L=$.substring(W+1,E);if(L.includes("#")){const[X,M]=L.split("#");U.push(G1(w[X],M))}else U.push(w[L]);G=E+1}return U.join("")};var CG=({ref:$},f)=>{return{...f.endpointParams,...f.referenceRecord}[$]};var g=($,f,U)=>{if(typeof $==="string")return E1($,U);else if($.fn)return L1($,U);else if($.ref)return CG($,U);throw new A(`'${f}': ${String($)} is not a string, function or reference.`)};var L1=({fn:$,argv:f},U)=>{const w=f.map((W)=>["boolean","number"].includes(typeof W)?W:g(W,"arg",U)),G=$.split(".");if(G[0]in b0&&G[1]!=null)return b0[G[0]][G[1]](...w);return VG[$](...w)};var NG=({assign:$,...f},U)=>{if($&&$ in U.referenceRecord)throw new A(`'${$}' is already defined in Reference Record.`);const w=L1(f,U);return U.logger?.debug?.(`${u} evaluateCondition: ${b(f)} = ${b(w)}`),{result:w===""?!0:!!w,...$!=null&&{toAssign:{name:$,value:w}}}};var Y0=($=[],f)=>{const U={};for(let w of $){const{result:G,toAssign:W}=NG(w,{...f,referenceRecord:{...f.referenceRecord,...U}});if(!G)return{result:G};if(W)U[W.name]=W.value,f.logger?.debug?.(`${u} assign: ${W.name} := ${b(W.value)}`)}return{result:!0,referenceRecord:U}};var PG=($,f)=>Object.entries($).reduce((U,[w,G])=>({...U,[w]:G.map((W)=>{const E=g(W,"Header value entry",f);if(typeof E!=="string")throw new A(`Header '${w}' value '${E}' is not a string`);return E})}),{});var J$=($,f)=>{if(Array.isArray($))return $.map((U)=>J$(U,f));switch(typeof $){case"string":return E1($,f);case"object":if($===null)throw new A(`Unexpected endpoint property: ${$}`);return X1($,f);case"boolean":return $;default:throw new A(`Unexpected endpoint property type: ${typeof $}`)}};var X1=($,f)=>Object.entries($).reduce((U,[w,G])=>({...U,[w]:J$(G,f)}),{});var SG=($,f)=>{const U=g($,"Endpoint URL",f);if(typeof U==="string")try{return new URL(U)}catch(w){throw console.error(`Failed to construct URL with ${U}`,w),w}throw new A(`Endpoint URL must be a string, got ${typeof U}`)};var jG=($,f)=>{const{conditions:U,endpoint:w}=$,{result:G,referenceRecord:W}=Y0(U,f);if(!G)return;const E={...f,referenceRecord:{...f.referenceRecord,...W}},{url:L,properties:X,headers:M}=w;return f.logger?.debug?.(`${u} Resolving endpoint from template: ${b(w)}`),{...M!=null&&{headers:PG(M,E)},...X!=null&&{properties:X1(X,E)},url:SG(L,E)}};var bG=($,f)=>{const{conditions:U,error:w}=$,{result:G,referenceRecord:W}=Y0(U,f);if(!G)return;throw new A(g(w,"Error",{...f,referenceRecord:{...f.referenceRecord,...W}}))};var kG=($,f)=>{const{conditions:U,rules:w}=$,{result:G,referenceRecord:W}=Y0(U,f);if(!G)return;return M1(w,{...f,referenceRecord:{...f.referenceRecord,...W}})};var M1=($,f)=>{for(let U of $)if(U.type==="endpoint"){const w=jG(U,f);if(w)return w}else if(U.type==="error")bG(U,f);else if(U.type==="tree"){const w=kG(U,f);if(w)return w}else throw new A(`Unknown endpoint rule: ${U}`);throw new A("Rules evaluation failed")};var zM=($,f)=>{const{endpointParams:U,logger:w}=f,{parameters:G,rules:W}=$;f.logger?.debug?.(`${u} Initial EndpointParams: ${b(U)}`);const E=Object.entries(G).filter(([,M])=>M.default!=null).map(([M,Z])=>[M,Z.default]);if(E.length>0)for(let[M,Z]of E)U[M]=U[M]??Z;const L=Object.entries(G).filter(([,M])=>M.required).map(([M])=>M);for(let M of L)if(U[M]==null)throw new A(`Missing required parameter: '${M}'`);const X=M1(W,{endpointParams:U,logger:w,referenceRecord:{}});if(f.endpointParams?.Endpoint)try{const M=new URL(f.endpointParams.Endpoint),{protocol:Z,port:Y}=M;X.url.protocol=Z,X.url.port=Y}catch(M){}return f.logger?.debug?.(`${u} Resolved endpoint: ${b(X)}`),X};var A$=($,f=!1)=>{if(f){for(let U of $.split("."))if(!A$(U))return!1;return!0}if(!j0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(S0($))return!1;return!0};var hG=($)=>{const f=$.split(":");if(f.length<6)return null;const[U,w,G,W,E,...L]=f;if(U!=="arn"||w===""||G===""||L[0]==="")return null;return{partition:w,service:G,region:W,accountId:E,resourceId:L[0].includes("/")?L[0].split("/"):L}};var DG={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 JM=DG,AM="",cG=($)=>{const{partitions:f}=JM;for(let w of f){const{regions:G,outputs:W}=w;for(let[E,L]of Object.entries(G))if(E===$)return{...W,...L}}for(let w of f){const{regionRegex:G,outputs:W}=w;if(new RegExp(G).test($))return{...W}}const U=f.find((w)=>w.id==="aws");if(!U)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...U.outputs}};var _G=()=>AM;var KM={isVirtualHostableS3Bucket:A$,parseArn:hG,partition:cG};b0.aws=KM;var K$="user-agent",Z1="x-amz-user-agent",B$=" ",Y1="/",xG=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,vG=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,O$="-";var BM=($)=>(f,U)=>async(w)=>{const{request:G}=w;if(!S.isInstance(G))return f(w);const{headers:W}=G,E=U?.userAgent?.map(q$)||[],L=(await $.defaultUserAgentProvider()).map(q$),X=$?.customUserAgent?.map(q$)||[],M=_G(),Z=(M?[M]:[]).concat([...L,...E,...X]).join(B$),Y=[...L.filter((F)=>F.startsWith("aws-sdk-")),...X].join(B$);if($.runtime!=="browser"){if(Y)W[Z1]=W[Z1]?`${W[K$]} ${Y}`:Y;W[K$]=Z}else W[Z1]=Z;return f({...w,request:G})},q$=($)=>{const f=$[0].split(Y1).map((E)=>E.replace(xG,O$)).join(Y1),U=$[1]?.replace(vG,O$),w=f.indexOf(Y1),G=f.substring(0,w);let W=f.substring(w+1);if(G==="api")W=W.toLowerCase();return[G,W,U].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}`}},"")},OM={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},TF=($)=>({applyToStack:(f)=>{f.add(BM($),OM)}});var I1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var T$=($)=>I1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var hF=($)=>{const{region:f,useFipsEndpoint:U}=$;if(!f)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof f==="string")return T$(f);const w=await f();return T$(w)},useFipsEndpoint:async()=>{const w=typeof f==="string"?f:await f();if(I1(w))return!0;return typeof U!=="function"?Promise.resolve(!!U):U()}}};var I0=($,f,U)=>{if(!(f in $))return;if($[f]==="true")return!0;if($[f]==="false")return!1;throw new Error(`Cannot load ${U} "${f}". Expected "true" or "false", got ${$[f]}.`)};var s;(function($){$.ENV="env",$.CONFIG="shared config entry"})(s||(s={}));var qM="AWS_USE_DUALSTACK_ENDPOINT",TM="use_dualstack_endpoint";var gF={environmentVariableSelector:($)=>I0($,qM,s.ENV),configFileSelector:($)=>I0($,TM,s.CONFIG),default:!1};var HM="AWS_USE_FIPS_ENDPOINT",VM="use_fips_endpoint";var rF={environmentVariableSelector:($)=>I0($,HM,s.ENV),configFileSelector:($)=>I0($,VM,s.CONFIG),default:!1};var H$=y(f0(),1),uG=($)=>$[H$.SMITHY_CONTEXT_KEY]||($[H$.SMITHY_CONTEXT_KEY]={});var p=($)=>{if(typeof $==="function")return $;const f=Promise.resolve($);return()=>f};var yG={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},YR={preferredFile:"credentials"};function CM($){return(f)=>async(U)=>{const w=U.request;if(S.isInstance(w)){const{body:G,headers:W}=w;if(G&&Object.keys(W).map((E)=>E.toLowerCase()).indexOf(pG)===-1)try{const E=$(G);w.headers={...w.headers,[pG]:String(E)}}catch(E){}}return f({...U,request:w})}}var pG="content-length",NM={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},vR=($)=>({applyToStack:(f)=>{f.add(CM($.bodyLengthChecker),NM)}});var dG=($,f)=>(U)=>async(w)=>{const{response:G}=await U(w);try{const W=await f(G,$);return{response:G,output:W}}catch(W){if(Object.defineProperty(W,"$response",{value:G}),!("$metadata"in W)){if(W.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof W.$responseBodyText!=="undefined"){if(W.$response)W.$response.body=W.$responseBodyText}}throw W}};var gG=($,f)=>(U,w)=>async(G)=>{const W=w.endpointV2?.url&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!W)throw new Error("No valid endpoint provider available.");const E=await f(G.input,{...$,endpoint:W});return U({...G,request:E})};function sR($,f,U){return{applyToStack:(w)=>{w.add(dG($,U),PM),w.add(gG($,f),V$)}}}var PM={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},V$={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var sG=async($)=>{const f=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=f.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(hM(f)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!kM(f)||f.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||f.toLowerCase()!==f||f.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},SM=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,jM=/(\d+\.){3}\d+/,bM=/\.\./;var kM=($)=>SM.test($)&&!jM.test($)&&!bM.test($),hM=($)=>{const[f,U,w,,,G]=$.split(":"),W=f==="arn"&&$.split(":").length>=6,E=Boolean(W&&U&&w&&G);if(W&&!E)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return E};var nG=($,f,U)=>{const w=async()=>{const G=U[$]??U[f];if(typeof G==="function")return G();return G};if($==="credentialScope"||f==="CredentialScope")return async()=>{const G=typeof U.credentials==="function"?await U.credentials():U.credentials;return G?.credentialScope??G?.CredentialScope};if($==="accountId"||f==="AccountId")return async()=>{const G=typeof U.credentials==="function"?await U.credentials():U.credentials;return G?.accountId??G?.AccountId};if($==="endpoint"||f==="endpoint")return async()=>{const G=await w();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 w};var rG="AWS_ENDPOINT_URL",mG="endpoint_url",lG=($)=>({environmentVariableSelector:(f)=>{const U=$.split(" ").map((W)=>W.toUpperCase()),w=f[[rG,...U].join("_")];if(w)return w;const G=f[rG];if(G)return G;return},configFileSelector:(f,U)=>{if(U&&f.services){const G=U[["services",f.services].join(C$)];if(G){const W=$.split(" ").map((L)=>L.toLowerCase()),E=G[[W.join("_"),mG].join(C$)];if(E)return E}}const w=f[mG];if(w)return w;return},default:void 0});var oG=async($)=>o(lG($))();var N$=y(df(),1),F1=($)=>{if(typeof $==="object"){if("url"in $)return N$.parseUrl($.url);return $}return N$.parseUrl($)};var iG=async($,f,U,w)=>{if(!U.endpoint){const E=await oG(U.serviceId||"");if(E)U.endpoint=()=>Promise.resolve(F1(E))}const G=await DM($,f,U);if(typeof U.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return U.endpointProvider(G,w)},DM=async($,f,U)=>{const w={},G=f?.getEndpointParameterInstructions?.()||{};for(let[W,E]of Object.entries(G))switch(E.type){case"staticContextParams":w[W]=E.value;break;case"contextParams":w[W]=$[E.name];break;case"clientContextParams":case"builtInParams":w[W]=await nG(E.name,W,U)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys(G).length===0)Object.assign(w,U);if(String(U.serviceId).toLowerCase()==="s3")await sG(w);return w};var tG=({config:$,instructions:f})=>{return(U,w)=>async(G)=>{const W=await iG(G.input,{getEndpointParameterInstructions(){return f}},{...$},w);w.endpointV2=W,w.authSchemes=W.properties?.authSchemes;const E=w.authSchemes?.[0];if(E){w.signing_region=E.signingRegion,w.signing_service=E.signingName;const X=uG(w)?.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 U({...G})}};var cM={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:V$.name},Q7=($,f)=>({applyToStack:(U)=>{U.addRelativeTo(tG({config:$,instructions:f}),cM)}});var B7=($)=>{const f=$.tls??!0,{endpoint:U}=$,w=U!=null?async()=>F1(await p(U)()):void 0;return{...$,endpoint:w,tls:f,isCustomEndpoint:!!U,useDualstackEndpoint:p($.useDualstackEndpoint??!1),useFipsEndpoint:p($.useFipsEndpoint??!1)}};var x=y(o1(),1),b7=x.default.v1,k7=x.default.v3,eG=x.default.v4,h7=x.default.v5,D7=x.default.NIL,c7=x.default.version,_7=x.default.validate,x7=x.default.stringify,v7=x.default.parse;var c;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(c||(c={}));var i=3,aG=c.STANDARD;var $W=y(l(),1);class R1{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 f=this.getCurrentTimeInSeconds();this.lastThrottleTime=f,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 f=($-this.currentCapacity)/this.fillRate*1000;await new Promise((U)=>setTimeout(U,f))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const f=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+f),this.lastTimestamp=$}updateClientSendingRate($){let f;if(this.updateMeasuredRate(),$W.isThrottlingError($)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),f=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),f=this.cubicSuccess(this.getCurrentTimeInSeconds());const U=Math.min(f,2*this.measuredTxRate);this.updateTokenBucketRate(U)}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(),f=Math.floor($*2)/2;if(this.requestCount++,f>this.lastTxRateBucket){const U=this.requestCount/(f-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(U*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=f}}getPrecise($){return parseFloat($.toFixed(8))}}var t=100,k0=20000,P$=500,z1=500,S$=5,j$=10,b$=1,Q1="amz-sdk-invocation-id",J1="amz-sdk-request";var fW=()=>{let $=t;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(k0,Math.random()*2**w*$))},setDelayBase:(w)=>{$=w}}};var k$=({retryDelay:$,retryCount:f,retryCost:U})=>{return{getRetryCount:()=>f,getRetryDelay:()=>Math.min(k0,$),getRetryCost:()=>U}};class F0{constructor($){this.maxAttempts=$,this.mode=c.STANDARD,this.capacity=z1,this.retryBackoffStrategy=fW(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return k$({retryDelay:t,retryCount:0})}async refreshRetryTokenForRetry($,f){const U=await this.getMaxAttempts();if(this.shouldRetry($,f,U)){const w=f.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?P$:t);const G=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),W=f.retryAfterHint?Math.max(f.retryAfterHint.getTime()-Date.now()||0,G):G,E=this.getCapacityCost(w);return this.capacity-=E,k$({retryDelay:W,retryCount:$.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(z1,this.capacity+($.getRetryCost()??b$))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${i}`),i}}shouldRetry($,f,U){return $.getRetryCount()+1<U&&this.capacity>=this.getCapacityCost(f.errorType)&&this.isRetryableError(f.errorType)}getCapacityCost($){return $==="TRANSIENT"?j$:S$}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class h${constructor($,f){this.maxAttemptsProvider=$,this.mode=c.ADAPTIVE;const{rateLimiter:U}=f??{};this.rateLimiter=U??new R1,this.standardRetryStrategy=new F0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,f){return this.rateLimiter.updateClientSendingRate(f),this.standardRetryStrategy.refreshRetryTokenForRetry($,f)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var UW="AWS_MAX_ATTEMPTS",wW="max_attempts",zz={environmentVariableSelector:($)=>{const f=$[UW];if(!f)return;const U=parseInt(f);if(Number.isNaN(U))throw new Error(`Environment variable ${UW} mast be a number, got "${f}"`);return U},configFileSelector:($)=>{const f=$[wW];if(!f)return;const U=parseInt(f);if(Number.isNaN(U))throw new Error(`Shared config file entry ${wW} mast be a number, got "${f}"`);return U},default:i},Qz=($)=>{const{retryStrategy:f}=$,U=p($.maxAttempts??i);return{...$,maxAttempts:U,retryStrategy:async()=>{if(f)return f;if(await p($.retryMode)()===c.ADAPTIVE)return new h$(U);return new F0(U)}}},_M="AWS_RETRY_MODE",xM="retry_mode",Jz={environmentVariableSelector:($)=>$[_M],configFileSelector:($)=>$[xM],default:aG};var R0=y(l(),1);import{Readable as vM} from"stream";var GW=($)=>$?.body instanceof vM||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var D$=($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)};var uM=($)=>(f,U)=>async(w)=>{let G=await $.retryStrategy();const W=await $.maxAttempts();if(yM(G)){G=G;let E=await G.acquireInitialRetryToken(U.partition_id),L=new Error,X=0,M=0;const{request:Z}=w,Y=S.isInstance(Z);if(Y)Z.headers[Q1]=eG();while(!0)try{if(Y)Z.headers[J1]=`attempt=${X+1}; max=${W}`;const{response:F,output:R}=await f(w);return G.recordSuccess(E),R.$metadata.attempts=X+1,R.$metadata.totalRetryDelay=M,{response:F,output:R}}catch(F){const R=pM(F);if(L=D$(F),Y&&GW(Z))throw(U.logger instanceof WW?console:U.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{E=await G.refreshRetryTokenForRetry(E,R)}catch(J){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=X+1,L.$metadata.totalRetryDelay=M,L}X=E.getRetryCount();const Q=E.getRetryDelay();M+=Q,await new Promise((J)=>setTimeout(J,Q))}}else{if(G=G,G?.mode)U.userAgent=[...U.userAgent||[],["cfg/retry-mode",G.mode]];return G.retry(f,w)}},yM=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",pM=($)=>{const f={error:$,errorType:dM($)},U=sM($.$response);if(U)f.retryAfterHint=U;return f},dM=($)=>{if(R0.isThrottlingError($))return"THROTTLING";if(R0.isTransientError($))return"TRANSIENT";if(R0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},gM={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Pz=($)=>({applyToStack:(f)=>{f.add(uM($),gM)}}),sM=($)=>{if(!c$.isInstance($))return;const f=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!f)return;const U=$.headers[f],w=Number(U);if(!Number.isNaN(w))return new Date(w*1000);return new Date(U)};var nM=y(l(),1);var A1=y(l(),1);import{platform as v9,release as u9} from"os";import{env as C8,versions as y9} from"process";var i$={isCrtAvailable:!1};var V8=()=>{if(i$.isCrtAvailable)return["md/crt-avail"];return null};var p9="AWS_SDK_UA_APP_ID",d9="sdk-ua-app-id",jQ=({serviceId:$,clientVersion:f})=>{const U=[["aws-sdk-js",f],["ua","2.0"],[`os/${v9()}`,u9()],["lang/js"],["md/nodejs",`${y9.node}`]],w=V8();if(w)U.push(w);if($)U.push([`api/${$}`,f]);if(C8.AWS_EXECUTION_ENV)U.push([`exec-env/${C8.AWS_EXECUTION_ENV}`]);const G=o({environmentVariableSelector:(E)=>E[p9],configFileSelector:(E)=>E[d9],default:void 0})();let W=void 0;return async()=>{if(!W){const E=await G;W=E?[...U,[`app/${E}`]]:[...U]}return W}};var N8=($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]";import{Buffer as t$} from"buffer";var $0=($,f=0,U=$.byteLength-f)=>{if(!N8($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return t$.from($,f,U)},Q0=($,f)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return f?t$.from($,f):t$.from($)};var S1=($)=>{const f=Q0($,"utf8");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var P8=($)=>{if(typeof $==="string")return S1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)};var dQ=($)=>{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 $0($.buffer,$.byteOffset,$.byteLength).toString("utf8")};import{Buffer as g9} from"buffer";import{createHash as s9,createHmac as n9} from"crypto";var S8=function($,f){if(g9.isBuffer($))return $;if(typeof $==="string")return Q0($,f);if(ArrayBuffer.isView($))return $0($.buffer,$.byteOffset,$.byteLength);return $0($)};class r9{constructor($,f){this.algorithmIdentifier=$,this.secret=f,this.reset()}update($,f){this.hash.update(P8(S8($,f)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?n9(this.algorithmIdentifier,S8(this.secret)):s9(this.algorithmIdentifier)}}import{fstatSync as m9,lstatSync as l9} from"fs";var $J=($)=>{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 l9($.path).size;else if(typeof $.fd==="number")return m9($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var c8=y(v1(),1);var j8="AWS_EXECUTION_ENV",e$="AWS_REGION",a$="AWS_DEFAULT_REGION",b8="AWS_EC2_METADATA_DISABLED",k8=["in-region","cross-region","mobile","standard","legacy"],h8="/latest/meta-data/placement/region";var D8={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var ZJ=({region:$=o(yG),defaultsMode:f=o(D8)}={})=>c8.memoize(async()=>{const U=typeof f==="function"?await f():f;switch(U?.toLowerCase()){case"auto":return o9($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(U?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${k8.join(", ")}, got ${U}`)}}),o9=async($)=>{if($){const f=typeof $==="function"?await $():$,U=await i9();if(!U)return"standard";if(f===U)return"in-region";else return"cross-region"}return"standard"},i9=async()=>{if(process.env[j8]&&(process.env[e$]||process.env[a$]))return process.env[e$]??process.env[a$];if(!process.env[b8])try{const{getInstanceMetadataEndpoint:$,httpRequest:f}=await import("./chunk-e755f2c1c7ad3912.js"),U=await $();return(await f({...U,path:h8})).toString()}catch($){}};var RJ=($)=>{let f=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const U=$.region;if(typeof U==="string")return U;return U()};return{setRegion(U){f=U},region(){return f}}},zJ=($)=>{return{region:$.region()}};var e9=/^[A-Za-z0-9+/]*={0,2}$/,kJ=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!e9.exec($))throw new TypeError("Invalid base64 string.");const f=Q0($,"base64");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)};var _J=($)=>{let f;if(typeof $==="string")f=S1($);else f=$;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return $0(f.buffer,f.byteOffset,f.byteLength).toString("base64")};export{$5 as va,f5 as wa,w5 as xa,X5 as ya,SW as za,I0 as Aa,s as Ba,z$ as Ca,uG as Da,p as Ea,s5 as Fa,b0 as Ga,zM as Ha,KM as Ia,TF as Ja,gF as Ka,rF as La,yG as Ma,YR as Na,hF as Oa,vR as Pa,DM as Qa,sR as Ra,Q7 as Sa,B7 as Ta,aG as Ua,eG as Va,zz as Wa,Qz as Xa,Jz as Ya,Pz as Za,x9 as _a,jQ as $a,N8 as ab,S1 as bb,P8 as cb,dQ as db,r9 as eb,$J as fb,kJ as gb,_J as hb,ZJ as ib,RJ as jb,zJ as kb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{y as _} from"./chunk-7ce930fe69575c87.js";import"./chunk-c7e2acfd5087fb30.js";import{ob as y} from"./chunk-1ad1795e55abfdb5.js";import{rb as K,xb as S} from"./chunk-069fcad61c8841dc.js";var o=_(y(),1);import{exec as A} from"child_process";import{promisify as T} from"util";var i=(c,n,s)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){const t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let e=n.AccountId;if(!e&&s?.[c]?.aws_account_id)e=s[c].aws_account_id;return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...e&&{accountId:e}}};var x=async(c,n,s)=>{const e=n[c];if(n[c]){const t=e.credential_process;if(t!==void 0){const u=T(A);try{const{stdout:r}=await u(t);let w;try{w=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return i(c,w,n)}catch(r){throw new o.CredentialsProviderError(r.message,{logger:s})}}else throw new o.CredentialsProviderError(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o.CredentialsProviderError(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var b=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{b as fromProcess};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{y as l} from"./chunk-7ce930fe69575c87.js";import{ob as m} from"./chunk-1ad1795e55abfdb5.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-4e9167391dd0d15f.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 h} from"./chunk-7ce930fe69575c87.js";import"./chunk-c7e2acfd5087fb30.js";import{ob as _} from"./chunk-1ad1795e55abfdb5.js";import{rb as N,sb as W,tb as I,wb as v,xb as P} from"./chunk-069fcad61c8841dc.js";var T=h(_(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var u=h(_(),1);var K=300000,g="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var R={},b=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-afbf69daa7589a52.js");if(R[e])return R[e];const s=new r({region:e});return R[e]=s,s};var G=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-afbf69daa7589a52.js");return(await b(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var U=h(_(),1);var D=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new U.TokenProviderError(`Token is expired. ${g}`,!1)};var q=h(_(),1);var p=(e,r,s=!1)=>{if(typeof r==="undefined")throw new q.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${g}`,!1)};import{promises as B} from"fs";var{writeFile:Q}=B,j=(e,r)=>{const s=W(e),t=JSON.stringify(r,null,2);return Q(s,t)};var X=new Date(0),z=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await P(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);const i=t.sso_session,a=(await v(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);const{sso_start_url:l,sso_region:f}=a;let o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${g}`,!1)}p("accessToken",o.accessToken),p("expiresAt",o.expiresAt);const{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>K)return c;if(Date.now()-X.getTime()<30000)return D(c),c;p("clientId",o.clientId,!0),p("clientSecret",o.clientSecret,!0),p("refreshToken",o.refreshToken,!0);try{X.setTime(Date.now());const n=await G(o,f);p("accessToken",n.accessToken),p("expiresIn",n.expiresIn);const w=new Date(Date.now()+n.expiresIn*1000);try{await j(i,{...o,accessToken:n.accessToken,expiresAt:w.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:w}}catch(n){return D(c),c}};var k=h(_(),1);var y=!1,A=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:S,clientConfig:a,profile:l,logger:f})=>{let o;const E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const d=await z({profile:l})();o={accessToken:d.token,expiresAt:new Date(d.expiration).toISOString()}}catch(d){throw new k.CredentialsProviderError(d.message,{tryNextLink:y,logger:f})}else try{o=await I(e)}catch(d){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f});const{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-e0ffb920c65ebf44.js"),w=S||new c(Object.assign({},a??{},{region:a?.region??t}));let C;try{C=await w.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(d){throw new k.CredentialsProviderError(d,{tryNextLink:y,logger:f})}const{roleCredentials:{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:F,credentialScope:L,accountId:M}={}}=C;if(!m||!O||!$||!F)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:f});return{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:new Date(F),...L&&{credentialScope:L},...M&&{accountId:M}}};var J=h(_(),1),V=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:S}=e;if(!s||!t||!i||!S)throw new J.CredentialsProviderError('Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", '+`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:S}=e,{ssoClient:a}=e,l=N(e);if(!r&&!s&&!t&&!i&&!S){const o=(await P(e))[l];if(!o)throw new T.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!H(o))throw new T.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const m=(await v(e))[o.sso_session],O=` configurations in profile ${l} and sso-session ${o.sso_session}`;if(t&&t!==m.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==m.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=m.sso_region,o.sso_start_url=m.sso_start_url}const{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:w}=V(o,e.logger);return A({ssoStartUrl:E,ssoSession:w,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:l})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return A({ssoStartUrl:r,ssoSession:S,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:l})};export{V as validateSsoProfile,H as isSsoProfile,Ee as fromSSO};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{y as _} from"./chunk-7ce930fe69575c87.js";import{ob as S} from"./chunk-1ad1795e55abfdb5.js";var E=_(S(),1),p="AWS_ACCESS_KEY_ID",A="AWS_SECRET_ACCESS_KEY",C="AWS_SESSION_TOKEN",N="AWS_CREDENTIAL_EXPIRATION",I="AWS_CREDENTIAL_SCOPE",a="AWS_ACCOUNT_ID",i=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const o=process.env[p],r=process.env[A],n=process.env[C],s=process.env[N],t=process.env[I],c=process.env[a];if(o&&r)return{accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...c&&{accountId:c}};throw new E.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{i as fromEnv,C as ENV_SESSION,A as ENV_SECRET,p as ENV_KEY,N as ENV_EXPIRATION,I as ENV_CREDENTIAL_SCOPE,a as ENV_ACCOUNT_ID};export{p as t,A as u,i as v};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-915c050c94553981.js";import{y as k} from"./chunk-7ce930fe69575c87.js";import"./chunk-d7c78cd1ab7dc7ed.js";import{$ as h,F as ue,G as er,J as be,L as cr,T as E,U as t,V as Vr,X as _,Y as b,Z as j,_ as F,ga as Sr,ha as a,ia as jr,ja as Je,ka as Ve,la as rr,ma as sr,oa as d,pa as o,ra as I,sa as Qe,ta as Xe} from"./chunk-de0784c3310db458.js";import{$a as Ye,Ca as H,Da as ee,Ea as re,Fa as tr,Ga as Ie,Ha as Re,Ia as Pe,Ja as ar,Ka as We,La as fe,Ma as Ae,Na as Ke,Oa as mr,Pa as wr,Ra as S,Sa as $,Ta as kr,Ua as Me,Wa as Be,Xa as vr,Ya as Le,Za as Er,_a as q,bb as je,db as Fe,eb as Ze,fb as He,gb as De,hb as qe,ib as Ne,jb as ir,kb as lr,va as nr,wa as or,xa as dr,ya as yr} from"./chunk-59da8b8ab8add738.js";import"./chunk-c7e2acfd5087fb30.js";import{mb as Qr,nb as R} from"./chunk-c210f6ae6276ebe8.js";import"./chunk-1ad1795e55abfdb5.js";import{pb as Ce} from"./chunk-0b7a7410fce0b12e.js";import"./chunk-069fcad61c8841dc.js";var P=k(H(),1);var se=k(q(),1);var Mr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},Z=function(e){return{schemeId:"smithy.api#noAuth"}},ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Mr(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},v={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc 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-oidc","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-oidc"},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/credential-provider-node":"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",peerDependencies:{"@aws-sdk/client-sts":"^3.629.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-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var _e=k(q(),1);var Ue=k(q(),1),xe=k(H(),1);var ze=k(Qr(),1);var de={["required"]:!1,type:"String"},ye={["required"]:!0,default:!1,type:"Boolean"},ce={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Lr={version:"1.0",parameters:{Region:de,UseDualStack:ye,UseFIPS:ye,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ce]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ce,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:we,rules:[{conditions:[ae],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Lr;var Te=(e,s={})=>{return Re($e,{endpointParams:e,logger:s.logger})};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??De,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new Ue.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new xe.NoAuthSigner}],logger:e?.logger??new be,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??ze.parseUrl,utf8Decoder:e?.utf8Decoder??je,utf8Encoder:e?.utf8Encoder??Fe}};var pe=(e)=>{Ve(process.version);const s=Ne(e),r=()=>s().then(Je),i=Ge(e);return _e.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??He,credentialDefaultProvider:e?.credentialDefaultProvider??Ce,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ye({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Be),region:e?.region??R(Ae,Ke),requestHandler:Qe.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Le,default:async()=>(await r()).retryMode||Me}),sha256:e?.sha256??Ze.bind(null,"sha256"),streamCollector:e?.streamCollector??Xe,useDualstackEndpoint:e?.useDualstackEndpoint??R(We),useFipsEndpoint:e?.useFipsEndpoint??R(fe)}};var ge=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((T)=>T.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},Oe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var U=(e)=>e,hr=(e,s)=>{const r={...U(ir(e)),...U(rr(e)),...U(ue(e)),...U(ge(e))};return s.forEach((i)=>i.configure(r)),{...e,...lr(r),...sr(r),...er(r),...Oe(r)}};class N extends cr{constructor(...[e]){const s=pe(e||{}),r=ne(s),i=tr(r),l=vr(i),n=mr(l),T=nr(n),fr=kr(T),Ar=he(fr),u=hr(Ar,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(ar(this.config)),this.middlewareStack.use(Er(this.config)),this.middlewareStack.use(wr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Kr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Kr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class y extends Sr{constructor(e){super(e);Object.setPrototypeOf(this,y.prototype)}}class x extends y{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends y{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends y{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends y{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends y{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends y{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends y{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends y{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends y{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends y{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends y{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends y{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends y{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends y{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var $r=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Ir=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Rr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Pr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=k(q(),1),D=k(H(),1);var Fr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[ls]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Y=async(e,s)=>{const r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Yr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Zr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Hr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Nr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await _r(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Cr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Or(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await es(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await rs(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ss(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await is(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await ur(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await pr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await gr(r,s);default:const l=r.body;return Xr({output:e,parsedBody:l,errorCode:i})}},Xr=jr(y),Yr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new x({$metadata:c(e),...r});return a(n,e.body)},Zr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:c(e),...r});return a(n,e.body)},Hr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:c(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:c(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:c(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Q({$metadata:c(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:c(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new X({$metadata:c(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new L({$metadata:c(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:c(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:c(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:c(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:c(e),...r});return a(n,e.body)},c=(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 ls="aws_iam";class p extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f($r,Ir).ser(Fr).de(xr).build(){}class C extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Rr,Pr).ser(Dr).de(zr).build(){}class g extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Tr).ser(qr).de(Gr).build(){}class O extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(br,void 0).ser(Ur).de(Jr).build(){}var hs={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class Wr extends N{}Vr(hs,Wr);export{cr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,br as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,y as SSOOIDCServiceException,N as SSOOIDCClient,Wr as SSOOIDC,Tr as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Pr as CreateTokenWithIAMResponseFilterSensitiveLog,Rr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Ir as CreateTokenResponseFilterSensitiveLog,$r as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,E as $Command};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as h,z as G} from"./chunk-7ce930fe69575c87.js";import{ob as I} from"./chunk-1ad1795e55abfdb5.js";import{rb as H,vb as K} from"./chunk-069fcad61c8841dc.js";var t=G((r,j)=>{var T=function(c){const i={};if(c=c.replace(/^\?/,""),c)for(let n of c.split("&")){let[F,f=null]=n.split("=");if(F=decodeURIComponent(F),f)f=decodeURIComponent(f);if(!(F in i))i[F]=f;else if(Array.isArray(i[F]))i[F].push(f);else i[F]=[i[F],f]}return i},o=Object.defineProperty,M=Object.getOwnPropertyDescriptor,Q=Object.getOwnPropertyNames,U=Object.prototype.hasOwnProperty,O=(c,i)=>o(c,"name",{value:i,configurable:!0}),d=(c,i)=>{for(var n in i)o(c,n,{get:i[n],enumerable:!0})},v=(c,i,n,F)=>{if(i&&typeof i==="object"||typeof i==="function"){for(let f of Q(i))if(!U.call(c,f)&&f!==n)o(c,f,{get:()=>i[f],enumerable:!(F=M(i,f))||F.enumerable})}return c},J=(c)=>v(o({},"__esModule",{value:!0}),c),S={};d(S,{parseQueryString:()=>T});j.exports=J(S);O(T,"parseQueryString")});var a=G((y,Z)=>{var{defineProperty:w,getOwnPropertyDescriptor:x,getOwnPropertyNames:P}=Object,s=Object.prototype.hasOwnProperty,l=(c,i)=>w(c,"name",{value:i,configurable:!0}),m=(c,i)=>{for(var n in i)w(c,n,{get:i[n],enumerable:!0})},k=(c,i,n,F)=>{if(i&&typeof i==="object"||typeof i==="function"){for(let f of P(i))if(!s.call(c,f)&&f!==n)w(c,f,{get:()=>i[f],enumerable:!(F=x(i,f))||F.enumerable})}return c},q=(c)=>k(w({},"__esModule",{value:!0}),c),z={};m(z,{parseUrl:()=>X});Z.exports=q(z);var p=t(),X=l((c)=>{if(typeof c==="string")return X(new URL(c));const{hostname:i,pathname:n,port:F,protocol:f,search:E}=c;let N;if(E)N=p.parseQueryString(E);return{hostname:i,port:F?parseInt(F):void 0,protocol:f,path:n,query:N}},"parseUrl")});var R=h(I(),1);var b=h(I(),1);function C(c){try{const i=new Set(Array.from(c.match(/([A-Z_]){3,}/g)??[]));return i.delete("CONFIG"),i.delete("CONFIG_PREFIX_SEPARATOR"),i.delete("ENV"),[...i].join(", ")}catch(i){return c}}var B=(c,i)=>async()=>{try{const n=c(process.env);if(n===void 0)throw new Error;return n}catch(n){throw new b.CredentialsProviderError(n.message||`Not found in ENV: ${C(c.toString())}`,{logger:i})}};var L=h(I(),1);var V=(c,{preferredFile:i="config",...n}={})=>async()=>{const F=H(n),{configFile:f,credentialsFile:E}=await K(n),N=E[F]||{},$=f[F]||{},D=i==="config"?{...N,...$}:{...$,...N};try{const A=c(D,i==="config"?f:E);if(A===void 0)throw new Error;return A}catch(g){throw new L.CredentialsProviderError(g.message||`Not found in config files w/ profile [${F}]: ${C(c.toString())}`,{logger:n.logger})}};var W=h(I(),1),u=(c)=>typeof c==="function",Y=(c)=>u(c)?async()=>await c():W.fromStatic(c);var wi=({environmentVariableSelector:c,configFileSelector:i,default:n},F={})=>R.memoize(R.chain(B(c),V(i,F),Y(n)));export{a as mb,wi as nb};
|