gemi 0.4.81 → 0.4.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/chunk-111f0589f69a05b1.js +1 -0
  2. package/dist/{chunk-f6a80fc55311e0c8.js → chunk-40944e185c025271.js} +1 -1
  3. package/dist/chunk-5b8fb522ae72415c.js +2 -0
  4. package/dist/chunk-8f3b5c5ff77a538d.js +5 -0
  5. package/dist/{chunk-25ee58bc6072bd58.js → chunk-90bbf6a9e83613c5.js} +1 -1
  6. package/dist/{chunk-d16ef78d852a6856.js → chunk-91b6ef5e24ab5b68.js} +1 -1
  7. package/dist/{chunk-c27a654eada9167e.js → chunk-97dc0038c2c61747.js} +1 -1
  8. package/dist/chunk-aead527dfd7392c4.js +16 -0
  9. package/dist/chunk-b42d49e516e08f8f.js +6 -0
  10. package/dist/{chunk-0ddb821fe8124f54.js → chunk-b88d77955168b486.js} +2 -2
  11. package/dist/{chunk-2335866508ec8b1b.js → chunk-b8d464c89c783b71.js} +1 -1
  12. package/dist/chunk-cfc36fa4387e9969.js +2 -0
  13. package/dist/chunk-e5d43a7ba83f74df.js +2 -0
  14. package/dist/{chunk-63c98893e07b1644.js → chunk-e78e6f198869b6d2.js} +1 -1
  15. package/dist/chunk-ecc1d0c7ff25f19f.js +1 -0
  16. package/dist/chunk-f44ef133dae89ec6.js +2 -0
  17. package/dist/chunk-f6546172b47b47d2.js +1 -0
  18. package/dist/client/index.js +13 -3
  19. package/dist/client/useQuery.d.ts.map +1 -1
  20. package/dist/kernel/index.js +1 -1
  21. package/dist/services/index.js +1 -10
  22. package/package.json +1 -1
  23. package/dist/chunk-2fd968b1b4418bfa.js +0 -18
  24. package/dist/chunk-38315b1e3dd78ca7.js +0 -2
  25. package/dist/chunk-63e9bc71922dbe80.js +0 -1
  26. package/dist/chunk-92bab268a3007d3d.js +0 -2
  27. package/dist/chunk-958e406572d457ca.js +0 -2
  28. package/dist/chunk-b99af11a56fdd395.js +0 -2
  29. package/dist/chunk-c6ab6f8e07a028ac.js +0 -6
  30. package/dist/chunk-d16cfcc9dd3ac869.js +0 -2
  31. package/dist/chunk-da07ce723d8218db.js +0 -3
  32. package/dist/chunk-df08a797b672bf3b.js +0 -2
@@ -0,0 +1 @@
1
+ import{yb as m} from"./chunk-f6546172b47b47d2.js";var U="AWS_PROFILE";var X=(o)=>o.profile||process.env["AWS_PROFILE"]||"default";import{join as H} from"path";import{homedir as D} from"os";import{sep as T} from"path";var h={},A=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{const{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${T}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;const i=A();if(!h[i])h[i]=D();return h[i]};var N="AWS_CONFIG_FILE",u=()=>process.env[N]||H(f(),".aws","config");import{join as O} from"path";var S=(o)=>Object.entries(o).filter(([e])=>{const t=e.indexOf(c);if(t===-1)return!1;return Object.values(m).includes(e.substring(0,t))}).reduce((e,[t,r])=>{const i=t.indexOf(c),s=t.substring(0,i)===m.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as L} from"path";var w="AWS_SHARED_CREDENTIALS_FILE",E=()=>process.env[w]||L(f(),".aws","credentials");var b=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,v=["__proto__","profile __proto__"],l=(o)=>{const e={};let t,r;for(let i of o.split(/\r?\n/)){const s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;const n=s.substring(1,s.length-1),p=b.exec(n);if(p){const[,a,,d]=p;if(Object.values(m).includes(a))t=[a,d].join(c)}else t=n;if(v.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){const n=s.indexOf("=");if(![0,-1].includes(n)){const[p,a]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(a==="")r=p;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};const d=r?[r,p].join(c):p;e[t][d]=a}}}}return e};import{promises as j} from"fs";var{readFile:y}=j,x={},g=(o,e)=>{if(!x[o]||e?.ignoreCache)x[o]=y(o,"utf8");return x[o]};var _=()=>({}),c=".",C=async(o={})=>{const{filepath:e=E(),configFilepath:t=u()}=o,r=f();let s=e;if(e.startsWith("~/"))s=O(r,e.slice(2));let F=t;if(t.startsWith("~/"))F=O(r,t.slice(2));const n=await Promise.all([g(F,{ignoreCache:o.ignoreCache}).then(l).then(S).catch(_),g(s,{ignoreCache:o.ignoreCache}).then(l).catch(_)]);return{configFile:n[0],credentialsFile:n[1]}};var I=(o)=>Object.entries(o).filter(([e])=>e.startsWith(m.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var $=()=>({}),Ie=async(o={})=>g(o.configFilepath??u()).then(l).then(I).catch($);var P=(...o)=>{const e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var Ae=async(o)=>{const e=await C(o);return P(e.configFile,e.credentialsFile)};import{createHash as G} from"crypto";import{join as W} from"path";var R=(o)=>{const t=G("sha1").update(o).digest("hex");return W(f(),".aws","sso","cache",`${t}.json`)};import{promises as K} from"fs";var{readFile:V}=K,ye=async(o)=>{const e=R(o),t=await V(e,"utf8");return JSON.parse(t)};export{U as Ab,X as Bb,R as Cb,ye as Db,c as Eb,C as Fb,Ie as Gb,Ae as Hb};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-b99af11a56fdd395.js";import{wb as o} from"./chunk-d16ef78d852a6856.js";import{Db as K,Jb as S} from"./chunk-63e9bc71922dbe80.js";import{exec as _} from"child_process";import{promisify as y} 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=y(_);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(r.message,{logger:s})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var $=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{$ as fromProcess};
2
+ import"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-f6546172b47b47d2.js";import{Bb as K,Hb as S} from"./chunk-111f0589f69a05b1.js";import{Jb as o} from"./chunk-91b6ef5e24ab5b68.js";import{exec as _} from"child_process";import{promisify as y} 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=y(_);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(r.message,{logger:s})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var $=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{$ as fromProcess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{B as r} from"./chunk-24a86f8f5ddc0cbd.js";import{tb as d,ub as v} from"./chunk-ecc1d0c7ff25f19f.js";import"./chunk-f6546172b47b47d2.js";import"./chunk-111f0589f69a05b1.js";import{Ib as z,Jb as y} from"./chunk-91b6ef5e24ab5b68.js";import{parse as p} from"url";import{Buffer as M} from"buffer";import{request as k} from"http";function u(c){return new Promise((I,x)=>{const T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new z("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new z("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{const{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new z("Error response received from instance metadata service"),{statusCode:O})),T.destroy();const E=[];N.on("data",(w)=>{E.push(w)}),N.on("end",()=>{I(M.concat(E)),T.destroy()})}),T.end()})}var K=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",_=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var Sc=1000,fc=0,D=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var Q="AWS_CONTAINER_CREDENTIALS_FULL_URI",X="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",zc=(c={})=>{const{timeout:I,maxRetries:x}=D(c);return()=>m(async()=>{const T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!K(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return _(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await u({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[X])return{hostname:a,path:process.env[X]};if(process.env[Q]){const I=p(process.env[Q]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y("The container metadata credential provider cannot be used unless"+` the ${X} or ${Q} environment`+" variable is set",{tryNextLink:!1,logger:c})};class G extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,G.prototype)}}var B=r(d(),1);var A;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(A||(A={}));var H={environmentVariableSelector:(c)=>c["AWS_EC2_METADATA_SERVICE_ENDPOINT"],configFileSelector:(c)=>c["ec2_metadata_service_endpoint"],default:void 0};var f;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(f||(f={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:f.IPv4};var Z=async()=>B.parseUrl(await e()||await i()),e=async()=>v(H)(),i=async()=>{const c=await v(q)();switch(c){case f.IPv4:return A.IPv4;case f.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}.`+` Select from ${Object.values(f)}`)}};var L=(c,I)=>{const x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these "+`credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: `+"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html");const N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{const x=I?.logger||console;let T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",cc="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",sc=(c={})=>U(Ic(c),{logger:c.logger}),Ic=(c={})=>{let I=!1;const{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=D(c),E=async(w,$)=>{if(I||$.headers?.[F]==null){let h=!1,Y=!1;const R=await v({environmentVariableSelector:(S)=>{const j=S[W];if(Y=!!j&&j!=="false",j===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{const j=S[t];return h=!!j&&j!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){const S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new G(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}const V=(await m(async()=>{let h;try{h=await Nc($)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await xc(V,$,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{const w=await Z();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(O,{...w,timeout:N});else{let $;try{$=(await Tc({...w,timeout:N})).toString()}catch(J){if(J?.statusCode===400)throw Object.assign(J,{message:"EC2 Metadata token request returned error"});else if(J.message==="TimeoutError"||[403,404,405].includes(J.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(O,{...w,timeout:N})}return E(O,{...w,headers:{[F]:$},timeout:N})}}},Tc=async(c)=>u({...c,path:cc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Nc=async(c)=>(await u({...c,path:P})).toString(),xc=async(c,I,x)=>{const T=JSON.parse((await u({...I,path:P+c})).toString());if(!K(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return _(T)};export{D as providerConfigFromInit,u as httpRequest,Z as getInstanceMetadataEndpoint,sc as fromInstanceMetadata,zc as fromContainerMetadata,A as Endpoint,X as ENV_CMDS_RELATIVE_URI,Q as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,Sc as DEFAULT_TIMEOUT,fc as DEFAULT_MAX_RETRIES};
@@ -0,0 +1,5 @@
1
+ import{B as l,C as Y} from"./chunk-24a86f8f5ddc0cbd.js";import{wb as Sn,xb as en} from"./chunk-f6546172b47b47d2.js";var Fn=Y((Or,ln)=>{var{defineProperty:v,getOwnPropertyDescriptor:Qf,getOwnPropertyNames:Lf}=Object,Mf=Object.prototype.hasOwnProperty,G=(n,c)=>v(n,"name",{value:c,configurable:!0}),Xf=(n,c)=>{for(var t in c)v(n,t,{get:c[t],enumerable:!0})},Jf=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Lf(c))if(!Mf.call(n,h)&&h!==t)v(n,h,{get:()=>c[h],enumerable:!(f=Qf(c,h))||f.enumerable})}return n},Kf=(n)=>Jf(v({},"__esModule",{value:!0}),n),vn={};Xf(vn,{constructStack:()=>Tn});ln.exports=Kf(vn);var b=G((n,c)=>{const t=[];if(n)t.push(n);if(c)for(let f of c)t.push(f);return t},"getAllAliases"),J=G((n,c)=>{return`${n||"anonymous"}${c&&c.length>0?` (a.k.a. ${c.join(",")})`:""}`},"getMiddlewareNameWithAliases"),Tn=G(()=>{let n=[],c=[],t=!1;const f=new Set,h=G(($)=>$.sort((C,x)=>On[x.step]-On[C.step]||kn[x.priority||"normal"]-kn[C.priority||"normal"]),"sort"),i=G(($)=>{let C=!1;const x=G((D)=>{const N=b(D.name,D.aliases);if(N.includes($)){C=!0;for(let E of N)f.delete(E);return!1}return!0},"filterCb");return n=n.filter(x),c=c.filter(x),C},"removeByName"),r=G(($)=>{let C=!1;const x=G((D)=>{if(D.middleware===$){C=!0;for(let N of b(D.name,D.aliases))f.delete(N);return!1}return!0},"filterCb");return n=n.filter(x),c=c.filter(x),C},"removeByReference"),s=G(($)=>{var C;return n.forEach((x)=>{$.add(x.middleware,{...x})}),c.forEach((x)=>{$.addRelativeTo(x.middleware,{...x})}),(C=$.identifyOnResolve)==null||C.call($,U.identifyOnResolve()),$},"cloneTo"),u=G(($)=>{const C=[];return $.before.forEach((x)=>{if(x.before.length===0&&x.after.length===0)C.push(x);else C.push(...u(x))}),C.push($),$.after.reverse().forEach((x)=>{if(x.before.length===0&&x.after.length===0)C.push(x);else C.push(...u(x))}),C},"expandRelativeMiddlewareList"),F=G(($=!1)=>{const C=[],x=[],D={};return n.forEach((E)=>{const w={...E,before:[],after:[]};for(let T of b(w.name,w.aliases))D[T]=w;C.push(w)}),c.forEach((E)=>{const w={...E,before:[],after:[]};for(let T of b(w.name,w.aliases))D[T]=w;x.push(w)}),x.forEach((E)=>{if(E.toMiddleware){const w=D[E.toMiddleware];if(w===void 0){if($)return;throw new Error(`${E.toMiddleware} is not found when adding ${J(E.name,E.aliases)} middleware ${E.relation} ${E.toMiddleware}`)}if(E.relation==="after")w.after.push(E);if(E.relation==="before")w.before.push(E)}}),h(C).map(u).reduce((E,w)=>{return E.push(...w),E},[])},"getMiddlewareList"),U={add:($,C={})=>{const{name:x,override:D,aliases:N}=C,E={step:"initialize",priority:"normal",middleware:$,...C},w=b(x,N);if(w.length>0){if(w.some((T)=>f.has(T))){if(!D)throw new Error(`Duplicate middleware name '${J(x,N)}'`);for(let T of w){const y=n.findIndex((Z)=>{var X;return Z.name===T||((X=Z.aliases)==null?void 0:X.some((W)=>W===T))});if(y===-1)continue;const I=n[y];if(I.step!==E.step||E.priority!==I.priority)throw new Error(`"${J(I.name,I.aliases)}" middleware with ${I.priority} priority in ${I.step} step cannot be overridden by "${J(x,N)}" middleware with ${E.priority} priority in ${E.step} step.`);n.splice(y,1)}}for(let T of w)f.add(T)}n.push(E)},addRelativeTo:($,C)=>{const{name:x,override:D,aliases:N}=C,E={middleware:$,...C},w=b(x,N);if(w.length>0){if(w.some((T)=>f.has(T))){if(!D)throw new Error(`Duplicate middleware name '${J(x,N)}'`);for(let T of w){const y=c.findIndex((Z)=>{var X;return Z.name===T||((X=Z.aliases)==null?void 0:X.some((W)=>W===T))});if(y===-1)continue;const I=c[y];if(I.toMiddleware!==E.toMiddleware||I.relation!==E.relation)throw new Error(`"${J(I.name,I.aliases)}" middleware ${I.relation} "${I.toMiddleware}" middleware cannot be overridden by "${J(x,N)}" middleware ${E.relation} "${E.toMiddleware}" middleware.`);c.splice(y,1)}}for(let T of w)f.add(T)}c.push(E)},clone:()=>s(Tn()),use:($)=>{$.applyToStack(U)},remove:($)=>{if(typeof $==="string")return i($);else return r($)},removeByTag:($)=>{let C=!1;const x=G((D)=>{const{tags:N,name:E,aliases:w}=D;if(N&&N.includes($)){const T=b(E,w);for(let y of T)f.delete(y);return C=!0,!1}return!0},"filterCb");return n=n.filter(x),c=c.filter(x),C},concat:($)=>{var C;const x=s(Tn());return x.use($),x.identifyOnResolve(t||x.identifyOnResolve()||(((C=$.identifyOnResolve)==null?void 0:C.call($))??!1)),x},applyToStack:s,identify:()=>{return F(!0).map(($)=>{const C=$.step??$.relation+" "+$.toMiddleware;return J($.name,$.aliases)+" - "+C})},identifyOnResolve($){if(typeof $==="boolean")t=$;return t},resolve:($,C)=>{for(let x of F().map((D)=>D.middleware).reverse())$=x($,C);if(t)console.log(U.identify());return $}};return U},"constructStack"),On={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},kn={high:3,normal:2,low:1}});var tc=Y((ns,cc)=>{var{defineProperty:o,getOwnPropertyDescriptor:Sf,getOwnPropertyNames:Bf}=Object,jf=Object.prototype.hasOwnProperty,gf=(n,c)=>o(n,"name",{value:c,configurable:!0}),Rf=(n,c)=>{for(var t in c)o(n,t,{get:c[t],enumerable:!0})},Af=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Bf(c))if(!jf.call(n,h)&&h!==t)o(n,h,{get:()=>c[h],enumerable:!(f=Sf(c,h))||f.enumerable})}return n},Hf=(n)=>Af(o({},"__esModule",{value:!0}),n),nc={};Rf(nc,{isArrayBuffer:()=>Pf});cc.exports=Hf(nc);var Pf=gf((n)=>typeof ArrayBuffer==="function"&&n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]","isArrayBuffer")});var R=Y((cs,ic)=>{var{defineProperty:e,getOwnPropertyDescriptor:Of,getOwnPropertyNames:kf}=Object,vf=Object.prototype.hasOwnProperty,fc=(n,c)=>e(n,"name",{value:c,configurable:!0}),lf=(n,c)=>{for(var t in c)e(n,t,{get:c[t],enumerable:!0})},of=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of kf(c))if(!vf.call(n,h)&&h!==t)e(n,h,{get:()=>c[h],enumerable:!(f=Of(c,h))||f.enumerable})}return n},ef=(n)=>of(e({},"__esModule",{value:!0}),n),hc={};lf(hc,{fromArrayBuffer:()=>qf,fromString:()=>af});ic.exports=ef(hc);var pf=tc(),Cn=import.meta.require("buffer"),qf=fc((n,c=0,t=n.byteLength-c)=>{if(!pf.isArrayBuffer(n))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof n} (${n})`);return Cn.Buffer.from(n,c,t)},"fromArrayBuffer"),af=fc((n,c)=>{if(typeof n!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof n} (${n})`);return c?Cn.Buffer.from(n,c):Cn.Buffer.from(n)},"fromString")});var uc=Y((rc)=>{Object.defineProperty(rc,"__esModule",{value:!0});rc.fromBase64=void 0;var mf=R(),_f=/^[A-Za-z0-9+/]*={0,2}$/,nh=(n)=>{if(n.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!_f.exec(n))throw new TypeError("Invalid base64 string.");const c=mf.fromString(n,"base64");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength)};rc.fromBase64=nh});var q=Y((fs,Tc)=>{var{defineProperty:p,getOwnPropertyDescriptor:ch,getOwnPropertyNames:th}=Object,fh=Object.prototype.hasOwnProperty,En=(n,c)=>p(n,"name",{value:c,configurable:!0}),hh=(n,c)=>{for(var t in c)p(n,t,{get:c[t],enumerable:!0})},ih=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of th(c))if(!fh.call(n,h)&&h!==t)p(n,h,{get:()=>c[h],enumerable:!(f=ch(c,h))||f.enumerable})}return n},rh=(n)=>ih(p({},"__esModule",{value:!0}),n),wc={};hh(wc,{fromUtf8:()=>xc,toUint8Array:()=>sh,toUtf8:()=>uh});Tc.exports=rh(wc);var $c=R(),xc=En((n)=>{const c=$c.fromString(n,"utf8");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),sh=En((n)=>{if(typeof n==="string")return xc(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(n)},"toUint8Array"),uh=En((n)=>{if(typeof n==="string")return n;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return $c.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("utf8")},"toUtf8")});var Ec=Y((Fc)=>{Object.defineProperty(Fc,"__esModule",{value:!0});Fc.toBase64=void 0;var wh=R(),$h=q(),xh=(n)=>{let c;if(typeof n==="string")c=$h.fromUtf8(n);else c=n;if(typeof c!=="object"||typeof c.byteOffset!=="number"||typeof c.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return wh.fromArrayBuffer(c.buffer,c.byteOffset,c.byteLength).toString("base64")};Fc.toBase64=xh});var m=Y((is,a)=>{var{defineProperty:Uc,getOwnPropertyDescriptor:Th,getOwnPropertyNames:Fh}=Object,Ch=Object.prototype.hasOwnProperty,Un=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Fh(c))if(!Ch.call(n,h)&&h!==t)Uc(n,h,{get:()=>c[h],enumerable:!(f=Th(c,h))||f.enumerable})}return n},Dc=(n,c,t)=>(Un(n,c,"default"),t&&Un(t,c,"default")),Eh=(n)=>Un(Uc({},"__esModule",{value:!0}),n),Dn={};a.exports=Eh(Dn);Dc(Dn,uc(),a.exports);Dc(Dn,Ec(),a.exports)});var Ic=Y((Nc)=>{Object.defineProperty(Nc,"__esModule",{value:!0});Nc.getAwsChunkedEncodingStream=void 0;var Uh=import.meta.require("stream"),Dh=(n,c)=>{const{base64Encoder:t,bodyLengthChecker:f,checksumAlgorithmFn:h,checksumLocationName:i,streamHasher:r}=c,s=t!==void 0&&h!==void 0&&i!==void 0&&r!==void 0,u=s?r(h,n):void 0,F=new Uh.Readable({read:()=>{}});return n.on("data",(U)=>{const $=f(U)||0;F.push(`${$.toString(16)}\r\n`),F.push(U),F.push("\r\n")}),n.on("end",async()=>{if(F.push("0\r\n"),s){const U=t(await u);F.push(`${i}:${U}\r\n`),F.push("\r\n")}F.push(null)}),F};Nc.getAwsChunkedEncodingStream=Dh});var Xc=Y((ss,Mc)=>{var{defineProperty:_,getOwnPropertyDescriptor:Nh,getOwnPropertyNames:yh}=Object,Ih=Object.prototype.hasOwnProperty,nn=(n,c)=>_(n,"name",{value:c,configurable:!0}),Yh=(n,c)=>{for(var t in c)_(n,t,{get:c[t],enumerable:!0})},dh=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of yh(c))if(!Ih.call(n,h)&&h!==t)_(n,h,{get:()=>c[h],enumerable:!(f=Nh(c,h))||f.enumerable})}return n},zh=(n)=>dh(_({},"__esModule",{value:!0}),n),Yc={};Yh(Yc,{AlgorithmId:()=>Vc,EndpointURLScheme:()=>Zc,FieldPosition:()=>Gc,HttpApiKeyAuthLocation:()=>zc,HttpAuthLocation:()=>dc,IniSectionType:()=>Qc,RequestHandlerProtocol:()=>Lc,SMITHY_CONTEXT_KEY:()=>Lh,getDefaultClientConfiguration:()=>Gh,resolveDefaultRuntimeConfig:()=>Qh});Mc.exports=zh(Yc);var dc=((n)=>{return n.HEADER="header",n.QUERY="query",n})(dc||{}),zc=((n)=>{return n.HEADER="header",n.QUERY="query",n})(zc||{}),Zc=((n)=>{return n.HTTP="http",n.HTTPS="https",n})(Zc||{}),Vc=((n)=>{return n.MD5="md5",n.CRC32="crc32",n.CRC32C="crc32c",n.SHA1="sha1",n.SHA256="sha256",n})(Vc||{}),Zh=nn((n)=>{const c=[];if(n.sha256!==void 0)c.push({algorithmId:()=>"sha256",checksumConstructor:()=>n.sha256});if(n.md5!=null)c.push({algorithmId:()=>"md5",checksumConstructor:()=>n.md5});return{_checksumAlgorithms:c,addChecksumAlgorithm(t){this._checksumAlgorithms.push(t)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Vh=nn((n)=>{const c={};return n.checksumAlgorithms().forEach((t)=>{c[t.algorithmId()]=t.checksumConstructor()}),c},"resolveChecksumRuntimeConfig"),Gh=nn((n)=>{return{...Zh(n)}},"getDefaultClientConfiguration"),Qh=nn((n)=>{return{...Vh(n)}},"resolveDefaultRuntimeConfig"),Gc=((n)=>{return n[n.HEADER=0]="HEADER",n[n.TRAILER=1]="TRAILER",n})(Gc||{}),Lh="__smithy_context",Qc=((n)=>{return n.PROFILE="profile",n.SSO_SESSION="sso-session",n.SERVICES="services",n})(Qc||{}),Lc=((n)=>{return n.HTTP_0_9="http/0.9",n.HTTP_1_0="http/1.0",n.TDS_8_0="tds/8.0",n})(Lc||{})});var Nn=Y((us,Rc)=>{var Bc=function(n){return Object.keys(n).reduce((c,t)=>{const f=n[t];return{...c,[t]:Array.isArray(f)?[...f]:f}},{})},gc=function(n){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(n)},cn=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,Xh=Object.getOwnPropertyNames,Jh=Object.prototype.hasOwnProperty,K=(n,c)=>cn(n,"name",{value:c,configurable:!0}),Kh=(n,c)=>{for(var t in c)cn(n,t,{get:c[t],enumerable:!0})},Wh=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Xh(c))if(!Jh.call(n,h)&&h!==t)cn(n,h,{get:()=>c[h],enumerable:!(f=Mh(c,h))||f.enumerable})}return n},bh=(n)=>Wh(cn({},"__esModule",{value:!0}),n),Jc={};Kh(Jc,{Field:()=>jh,Fields:()=>gh,HttpRequest:()=>Rh,HttpResponse:()=>Ah,IHttpRequest:()=>Kc.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Sh,isValidHostname:()=>gc,resolveHttpHandlerRuntimeConfig:()=>Bh});Rc.exports=bh(Jc);var Sh=K((n)=>{let c=n.httpHandler;return{setHttpHandler(t){c=t},httpHandler(){return c},updateHttpClientConfig(t,f){c.updateHttpClientConfig(t,f)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Bh=K((n)=>{return{httpHandler:n.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),Kc=Xc(),Wc=class n{constructor({name:c,kind:t=Kc.FieldPosition.HEADER,values:f=[]}){this.name=c,this.kind=t,this.values=f}add(c){this.values.push(c)}set(c){this.values=c}remove(c){this.values=this.values.filter((t)=>t!==c)}toString(){return this.values.map((c)=>c.includes(",")||c.includes(" ")?`"${c}"`:c).join(", ")}get(){return this.values}};K(Wc,"Field");var jh=Wc,bc=class n{constructor({fields:c=[],encoding:t="utf-8"}){this.entries={},c.forEach(this.setField.bind(this)),this.encoding=t}setField(c){this.entries[c.name.toLowerCase()]=c}getField(c){return this.entries[c.toLowerCase()]}removeField(c){delete this.entries[c.toLowerCase()]}getByType(c){return Object.values(this.entries).filter((t)=>t.kind===c)}};K(bc,"Fields");var gh=bc,Sc=class n{constructor(c){this.method=c.method||"GET",this.hostname=c.hostname||"localhost",this.port=c.port,this.query=c.query||{},this.headers=c.headers||{},this.body=c.body,this.protocol=c.protocol?c.protocol.slice(-1)!==":"?`${c.protocol}:`:c.protocol:"https:",this.path=c.path?c.path.charAt(0)!=="/"?`/${c.path}`:c.path:"/",this.username=c.username,this.password=c.password,this.fragment=c.fragment}static clone(c){const t=new n({...c,headers:{...c.headers}});if(t.query)t.query=Bc(t.query);return t}static isInstance(c){if(!c)return!1;const t=c;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return n.clone(this)}};K(Sc,"HttpRequest");var Rh=Sc;K(Bc,"cloneQuery");var jc=class n{constructor(c){this.statusCode=c.statusCode,this.reason=c.reason,this.headers=c.headers||{},this.body=c.body}static isInstance(c){if(!c)return!1;const t=c;return typeof t.statusCode==="number"&&typeof t.headers==="object"}};K(jc,"HttpResponse");var Ah=jc;K(gc,"isValidHostname")});var In=Y((ws,Pc)=>{var{defineProperty:tn,getOwnPropertyDescriptor:Hh,getOwnPropertyNames:Ph}=Object,Oh=Object.prototype.hasOwnProperty,yn=(n,c)=>tn(n,"name",{value:c,configurable:!0}),kh=(n,c)=>{for(var t in c)tn(n,t,{get:c[t],enumerable:!0})},vh=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Ph(c))if(!Oh.call(n,h)&&h!==t)tn(n,h,{get:()=>c[h],enumerable:!(f=Hh(c,h))||f.enumerable})}return n},lh=(n)=>vh(tn({},"__esModule",{value:!0}),n),Ac={};kh(Ac,{escapeUri:()=>Hc,escapeUriPath:()=>eh});Pc.exports=lh(Ac);var Hc=yn((n)=>encodeURIComponent(n).replace(/[!'()*]/g,oh),"escapeUri"),oh=yn((n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),eh=yn((n)=>n.split("/").map(Hc).join("/"),"escapeUriPath")});var dn=Y(($s,vc)=>{var kc=function(n){const c=[];for(let t of Object.keys(n).sort()){const f=n[t];if(t=Yn.escapeUri(t),Array.isArray(f))for(let h=0,i=f.length;h<i;h++)c.push(`${t}=${Yn.escapeUri(f[h])}`);else{let h=t;if(f||typeof f==="string")h+=`=${Yn.escapeUri(f)}`;c.push(h)}}return c.join("&")},fn=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,qh=Object.getOwnPropertyNames,ah=Object.prototype.hasOwnProperty,mh=(n,c)=>fn(n,"name",{value:c,configurable:!0}),_h=(n,c)=>{for(var t in c)fn(n,t,{get:c[t],enumerable:!0})},ni=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of qh(c))if(!ah.call(n,h)&&h!==t)fn(n,h,{get:()=>c[h],enumerable:!(f=ph(c,h))||f.enumerable})}return n},ci=(n)=>ni(fn({},"__esModule",{value:!0}),n),Oc={};_h(Oc,{buildQueryString:()=>kc});vc.exports=ci(Oc);var Yn=In();mh(kc,"buildQueryString")});var ut=Y((xs,st)=>{async function Vn(n,c,t=lc){const f=c.headers??{},h=f.Expect||f.expect;let i=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{i=Number(setTimeout(s,Math.max(lc,t)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(i),s()}),n.on("error",()=>{r=!0,clearTimeout(i),s()})})]);if(!r)nt(n,c.body)}var nt=function(n,c){if(c instanceof _c.Readable){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}const t=c;if(typeof t==="object"&&t.buffer&&typeof t.byteOffset==="number"&&typeof t.byteLength==="number"){n.end(Buffer.from(t.buffer,t.byteOffset,t.byteLength));return}n.end(Buffer.from(c));return}n.end()};async function rt(n){const c=[],t=n.getReader();let f=!1,h=0;while(!f){const{done:s,value:u}=await t.read();if(u)c.push(u),h+=u.length;f=s}const i=new Uint8Array(h);let r=0;for(let s of c)i.set(s,r),r+=s.length;return i}var{create:ti,defineProperty:A,getOwnPropertyDescriptor:fi,getOwnPropertyNames:hi,getPrototypeOf:ii}=Object,ri=Object.prototype.hasOwnProperty,z=(n,c)=>A(n,"name",{value:c,configurable:!0}),si=(n,c)=>{for(var t in c)A(n,t,{get:c[t],enumerable:!0})},ec=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of hi(c))if(!ri.call(n,h)&&h!==t)A(n,h,{get:()=>c[h],enumerable:!(f=fi(c,h))||f.enumerable})}return n},ui=(n,c,t)=>(t=n!=null?ti(ii(n)):{},ec(c||!n||!n.__esModule?A(t,"default",{value:n,enumerable:!0}):t,n)),wi=(n)=>ec(A({},"__esModule",{value:!0}),n),pc={};si(pc,{DEFAULT_REQUEST_TIMEOUT:()=>Ci,NodeHttp2Handler:()=>yi,NodeHttpHandler:()=>Ei,streamCollector:()=>Yi});st.exports=wi(pc);var qc=Nn(),ac=dn(),zn=import.meta.require("http"),Zn=import.meta.require("https"),$i=["ECONNRESET","EPIPE","ETIMEDOUT"],mc=z((n)=>{const c={};for(let t of Object.keys(n)){const f=n[t];c[t]=Array.isArray(f)?f.join(","):f}return c},"getTransformedHeaders"),xi=z((n,c,t=0)=>{if(!t)return;const f=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${t} ms`),{name:"TimeoutError"}))},t);n.on("socket",(h)=>{if(h.connecting)h.on("connect",()=>{clearTimeout(f)});else clearTimeout(f)})},"setConnectionTimeout"),Ti=z((n,{keepAlive:c,keepAliveMsecs:t})=>{if(c!==!0)return;n.on("socket",(f)=>{f.setKeepAlive(c,t||0)})},"setSocketKeepAlive"),Fi=z((n,c,t=0)=>{n.setTimeout(t,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${t} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),_c=import.meta.require("stream"),lc=1000;z(Vn,"writeRequestBody");z(nt,"writeBody");var Ci=0,ct=class n{constructor(c){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,f)=>{if(typeof c==="function")c().then((h)=>{t(this.resolveDefaultConfig(h))}).catch(f);else t(this.resolveDefaultConfig(c))})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}static checkSocketUsage(c,t,f=console){var h,i,r;const{sockets:s,requests:u,maxSockets:F}=c;if(typeof F!=="number"||F===Infinity)return t;const U=15000;if(Date.now()-U<t)return t;if(s&&u)for(let $ in s){const C=((h=s[$])==null?void 0:h.length)??0,x=((i=u[$])==null?void 0:i.length)??0;if(C>=F&&x>=2*F)return(r=f==null?void 0:f.warn)==null||r.call(f,`@smithy/node-http-handler:WARN - socket usage at capacity=${C} and ${x} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}resolveDefaultConfig(c){const{requestTimeout:t,connectionTimeout:f,socketTimeout:h,httpAgent:i,httpsAgent:r}=c||{};return{connectionTimeout:f,requestTimeout:t??h,httpAgent:(()=>{if(i instanceof zn.Agent||typeof(i==null?void 0:i.destroy)==="function")return i;return new zn.Agent({keepAlive:!0,maxSockets:50,...i})})(),httpsAgent:(()=>{if(r instanceof Zn.Agent||typeof(r==null?void 0:r.destroy)==="function")return r;return new Zn.Agent({keepAlive:!0,maxSockets:50,...r})})(),logger:console}}destroy(){var c,t,f,h;(t=(c=this.config)==null?void 0:c.httpAgent)==null||t.destroy(),(h=(f=this.config)==null?void 0:f.httpsAgent)==null||h.destroy()}async handle(c,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;let f;return new Promise((h,i)=>{let r=void 0;const s=z(async(T)=>{await r,clearTimeout(f),h(T)},"resolve"),u=z(async(T)=>{await r,clearTimeout(f),i(T)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t==null?void 0:t.aborted){const T=new Error("Request aborted");T.name="AbortError",u(T);return}const F=c.protocol==="https:",U=F?this.config.httpsAgent:this.config.httpAgent;f=setTimeout(()=>{this.socketWarningTimestamp=n.checkSocketUsage(U,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const $=ac.buildQueryString(c.query||{});let C=void 0;if(c.username!=null||c.password!=null){const T=c.username??"",y=c.password??"";C=`${T}:${y}`}let x=c.path;if($)x+=`?${$}`;if(c.fragment)x+=`#${c.fragment}`;const D={headers:c.headers,host:c.hostname,method:c.method,path:x,port:c.port,agent:U,auth:C},E=(F?Zn.request:zn.request)(D,(T)=>{const y=new qc.HttpResponse({statusCode:T.statusCode||-1,reason:T.statusMessage,headers:mc(T.headers),body:T});s({response:y})});if(E.on("error",(T)=>{if($i.includes(T.code))u(Object.assign(T,{name:"TimeoutError"}));else u(T)}),xi(E,u,this.config.connectionTimeout),Fi(E,u,this.config.requestTimeout),t){const T=z(()=>{E.destroy();const y=new Error("Request aborted");y.name="AbortError",u(y)},"onAbort");if(typeof t.addEventListener==="function"){const y=t;y.addEventListener("abort",T,{once:!0}),E.once("close",()=>y.removeEventListener("abort",T))}else t.onabort=T}const w=D.agent;if(typeof w==="object"&&"keepAlive"in w)Ti(E,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs});r=Vn(E,c,this.config.requestTimeout).catch((T)=>{return clearTimeout(f),i(T)})})}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[c]:t}})}httpHandlerConfigs(){return this.config??{}}};z(ct,"NodeHttpHandler");var Ei=ct,oc=import.meta.require("http2"),Ui=ui(import.meta.require("http2")),tt=class n{constructor(c){this.sessions=[],this.sessions=c??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(c){this.sessions.push(c)}contains(c){return this.sessions.includes(c)}remove(c){this.sessions=this.sessions.filter((t)=>t!==c)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(c){for(let t of this.sessions)if(t===c){if(!t.destroyed)t.destroy()}}};z(tt,"NodeHttp2ConnectionPool");var Di=tt,ft=class n{constructor(c){if(this.sessionCache=new Map,this.config=c,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(c,t){const f=this.getUrlString(c),h=this.sessionCache.get(f);if(h){const u=h.poll();if(u&&!this.config.disableConcurrency)return u}const i=Ui.default.connect(f);if(this.config.maxConcurrency)i.settings({maxConcurrentStreams:this.config.maxConcurrency},(u)=>{if(u)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+c.destination.toString())});i.unref();const r=z(()=>{i.destroy(),this.deleteSession(f,i)},"destroySessionCb");if(i.on("goaway",r),i.on("error",r),i.on("frameError",r),i.on("close",()=>this.deleteSession(f,i)),t.requestTimeout)i.setTimeout(t.requestTimeout,r);const s=this.sessionCache.get(f)||new Di;return s.offerLast(i),this.sessionCache.set(f,s),i}deleteSession(c,t){const f=this.sessionCache.get(c);if(!f)return;if(!f.contains(t))return;f.remove(t),this.sessionCache.set(c,f)}release(c,t){var f;const h=this.getUrlString(c);(f=this.sessionCache.get(h))==null||f.offerLast(t)}destroy(){for(let[c,t]of this.sessionCache){for(let f of t){if(!f.destroyed)f.destroy();t.remove(f)}this.sessionCache.delete(c)}}setMaxConcurrentStreams(c){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=c}setDisableConcurrentStreams(c){this.config.disableConcurrency=c}getUrlString(c){return c.destination.toString()}};z(ft,"NodeHttp2ConnectionManager");var Ni=ft,ht=class n{constructor(c){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Ni({}),this.configProvider=new Promise((t,f)=>{if(typeof c==="function")c().then((h)=>{t(h||{})}).catch(f);else t(c||{})})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}destroy(){this.connectionManager.destroy()}async handle(c,{abortSignal:t}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:f,disableConcurrentStreams:h}=this.config;return new Promise((i,r)=>{var s;let u=!1,F=void 0;const U=z(async(d)=>{await F,i(d)},"resolve"),$=z(async(d)=>{await F,r(d)},"reject");if(t==null?void 0:t.aborted){u=!0;const d=new Error("Request aborted");d.name="AbortError",$(d);return}const{hostname:C,method:x,port:D,protocol:N,query:E}=c;let w="";if(c.username!=null||c.password!=null){const d=c.username??"",Q=c.password??"";w=`${d}:${Q}@`}const T=`${N}//${w}${C}${D?`:${D}`:""}`,y={destination:new URL(T)},I=this.connectionManager.lease(y,{requestTimeout:(s=this.config)==null?void 0:s.sessionTimeout,disableConcurrentStreams:h||!1}),Z=z((d)=>{if(h)this.destroySession(I);u=!0,$(d)},"rejectWithDestroy"),X=ac.buildQueryString(E||{});let W=c.path;if(X)W+=`?${X}`;if(c.fragment)W+=`#${c.fragment}`;const V=I.request({...c.headers,[oc.constants.HTTP2_HEADER_PATH]:W,[oc.constants.HTTP2_HEADER_METHOD]:x});if(I.ref(),V.on("response",(d)=>{const Q=new qc.HttpResponse({statusCode:d[":status"]||-1,headers:mc(d),body:V});if(u=!0,U({response:Q}),h)I.close(),this.connectionManager.deleteSession(T,I)}),f)V.setTimeout(f,()=>{V.close();const d=new Error(`Stream timed out because of no activity for ${f} ms`);d.name="TimeoutError",Z(d)});if(t){const d=z(()=>{V.close();const Q=new Error("Request aborted");Q.name="AbortError",Z(Q)},"onAbort");if(typeof t.addEventListener==="function"){const Q=t;Q.addEventListener("abort",d,{once:!0}),V.once("close",()=>Q.removeEventListener("abort",d))}else t.onabort=d}V.on("frameError",(d,Q,Gf)=>{Z(new Error(`Frame type id ${d} in stream id ${Gf} has failed with code ${Q}.`))}),V.on("error",Z),V.on("aborted",()=>{Z(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${V.rstCode}.`))}),V.on("close",()=>{if(I.unref(),h)I.destroy();if(!u)Z(new Error("Unexpected error: http2 request did not get a response"))}),F=Vn(V,c,f)})}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[c]:t}})}httpHandlerConfigs(){return this.config??{}}destroySession(c){if(!c.destroyed)c.destroy()}};z(ht,"NodeHttp2Handler");var yi=ht,it=class n extends _c.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(c,t,f){this.bufferedBytes.push(c),f()}};z(it,"Collector");var Ii=it,Yi=z((n)=>{if(di(n))return rt(n);return new Promise((c,t)=>{const f=new Ii;n.pipe(f),n.on("error",(h)=>{f.end(),t(h)}),f.on("error",t),f.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},"streamCollector"),di=z((n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream,"isReadableStreamInstance");z(rt,"collectReadableStream")});var Dt=Y((Ts,Ut)=>{var xt=function(n=0){return new Promise((c,t)=>{if(n)setTimeout(()=>{const f=new Error(`Request did not complete within ${n} ms`);f.name="TimeoutError",t(f)},n)})};async function Ft(n){const c=await Et(n),t=Ji.fromBase64(c);return new Uint8Array(t)}async function Ct(n){const c=[],t=n.getReader();let f=!1,h=0;while(!f){const{done:s,value:u}=await t.read();if(u)c.push(u),h+=u.length;f=s}const i=new Uint8Array(h);let r=0;for(let s of c)i.set(s,r),r+=s.length;return i}var Et=function(n){return new Promise((c,t)=>{const f=new FileReader;f.onloadend=()=>{if(f.readyState!==2)return t(new Error("Reader aborted too early"));const h=f.result??"",i=h.indexOf(","),r=i>-1?i+1:h.length;c(h.substring(r))},f.onabort=()=>t(new Error("Read aborted")),f.onerror=()=>t(f.error),f.readAsDataURL(n)})},rn=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,Zi=Object.getOwnPropertyNames,Vi=Object.prototype.hasOwnProperty,M=(n,c)=>rn(n,"name",{value:c,configurable:!0}),Gi=(n,c)=>{for(var t in c)rn(n,t,{get:c[t],enumerable:!0})},Qi=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Zi(c))if(!Vi.call(n,h)&&h!==t)rn(n,h,{get:()=>c[h],enumerable:!(f=zi(c,h))||f.enumerable})}return n},Li=(n)=>Qi(rn({},"__esModule",{value:!0}),n),$t={};Gi($t,{FetchHttpHandler:()=>Xi,keepAliveSupport:()=>hn,streamCollector:()=>Ki});Ut.exports=Li($t);var wt=Nn(),Mi=dn();M(xt,"requestTimeout");var hn={supported:void 0},Tt=class n{static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}constructor(c){if(typeof c==="function")this.configProvider=c().then((t)=>t||{});else this.config=c??{},this.configProvider=Promise.resolve(this.config);if(hn.supported===void 0)hn.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(c,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;const f=this.config.requestTimeout,h=this.config.keepAlive===!0,i=this.config.credentials;if(t==null?void 0:t.aborted){const w=new Error("Request aborted");return w.name="AbortError",Promise.reject(w)}let r=c.path;const s=Mi.buildQueryString(c.query||{});if(s)r+=`?${s}`;if(c.fragment)r+=`#${c.fragment}`;let u="";if(c.username!=null||c.password!=null){const w=c.username??"",T=c.password??"";u=`${w}:${T}@`}const{port:F,method:U}=c,$=`${c.protocol}//${u}${c.hostname}${F?`:${F}`:""}${r}`,C=U==="GET"||U==="HEAD"?void 0:c.body,x={body:C,headers:new Headers(c.headers),method:U,credentials:i};if(C)x.duplex="half";if(typeof AbortController!=="undefined")x.signal=t;if(hn.supported)x.keepalive=h;let D=M(()=>{},"removeSignalEventListener");const N=new Request($,x),E=[fetch(N).then((w)=>{const T=w.headers,y={};for(let Z of T.entries())y[Z[0]]=Z[1];if(w.body==null)return w.blob().then((Z)=>({response:new wt.HttpResponse({headers:y,reason:w.statusText,statusCode:w.status,body:Z})}));return{response:new wt.HttpResponse({headers:y,reason:w.statusText,statusCode:w.status,body:w.body})}}),xt(f)];if(t)E.push(new Promise((w,T)=>{const y=M(()=>{const I=new Error("Request aborted");I.name="AbortError",T(I)},"onAbort");if(typeof t.addEventListener==="function"){const I=t;I.addEventListener("abort",y,{once:!0}),D=M(()=>I.removeEventListener("abort",y),"removeSignalEventListener")}else t.onabort=y}));return Promise.race(E).finally(D)}updateHttpClientConfig(c,t){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return f[c]=t,f})}httpHandlerConfigs(){return this.config??{}}};M(Tt,"FetchHttpHandler");var Xi=Tt,Ji=m(),Ki=M((n)=>{if(typeof Blob==="function"&&n instanceof Blob)return Ft(n);return Ct(n)},"streamCollector");M(Ft,"collectBlob");M(Ct,"collectStream");M(Et,"readToBase64")});var Zt=Y((Fs,zt)=>{var Yt=function(n){if(n.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const c=new Uint8Array(n.length/2);for(let t=0;t<n.length;t+=2){const f=n.slice(t,t+2).toLowerCase();if(f in Gn)c[t/2]=Gn[f];else throw new Error(`Cannot decode unrecognized sequence ${f} as hexadecimal`)}return c},dt=function(n){let c="";for(let t=0;t<n.byteLength;t++)c+=It[n[t]];return c},sn=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,bi=Object.getOwnPropertyNames,Si=Object.prototype.hasOwnProperty,Nt=(n,c)=>sn(n,"name",{value:c,configurable:!0}),Bi=(n,c)=>{for(var t in c)sn(n,t,{get:c[t],enumerable:!0})},ji=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of bi(c))if(!Si.call(n,h)&&h!==t)sn(n,h,{get:()=>c[h],enumerable:!(f=Wi(c,h))||f.enumerable})}return n},gi=(n)=>ji(sn({},"__esModule",{value:!0}),n),yt={};Bi(yt,{fromHex:()=>Yt,toHex:()=>dt});zt.exports=gi(yt);var It={},Gn={};for(let n=0;n<256;n++){let c=n.toString(16).toLowerCase();if(c.length===1)c=`0${c}`;It[n]=c,Gn[c]=n}Nt(Yt,"fromHex");Nt(dt,"toHex")});var H=Y((Vt)=>{Object.defineProperty(Vt,"__esModule",{value:!0});Vt.isReadableStream=void 0;var Ri=(n)=>{var c;return typeof ReadableStream==="function"&&(((c=n===null||n===void 0?void 0:n.constructor)===null||c===void 0?void 0:c.name)===ReadableStream.name||n instanceof ReadableStream)};Vt.isReadableStream=Ri});var Kt=Y((Xt)=>{Object.defineProperty(Xt,"__esModule",{value:!0});Xt.sdkStreamMixin=void 0;var Ai=Dt(),Hi=m(),Pi=Zt(),Oi=q(),Qt=H(),Lt="The stream has already been transformed.",ki=(n)=>{var c,t;if(!Mt(n)&&!Qt.isReadableStream(n)){const r=((t=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||t===void 0?void 0:t.name)||n;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let f=!1;const h=async()=>{if(f)throw new Error(Lt);return f=!0,await Ai.streamCollector(n)},i=(r)=>{if(typeof r.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return r.stream()};return Object.assign(n,{transformToByteArray:h,transformToString:async(r)=>{const s=await h();if(r==="base64")return Hi.toBase64(s);else if(r==="hex")return Pi.toHex(s);else if(r===void 0||r==="utf8"||r==="utf-8")return Oi.toUtf8(s);else if(typeof TextDecoder==="function")return new TextDecoder(r).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(f)throw new Error(Lt);if(f=!0,Mt(n))return i(n);else if(Qt.isReadableStream(n))return n;else throw new Error(`Cannot transform payload to web stream, got ${n}`)}})};Xt.sdkStreamMixin=ki;var Mt=(n)=>typeof Blob==="function"&&n instanceof Blob});var Bt=Y((bt)=>{Object.defineProperty(bt,"__esModule",{value:!0});bt.sdkStreamMixin=void 0;var vi=ut(),li=R(),Qn=import.meta.require("stream"),oi=import.meta.require("util"),ei=Kt(),Wt="The stream has already been transformed.",pi=(n)=>{var c,t;if(!(n instanceof Qn.Readable))try{return ei.sdkStreamMixin(n)}catch(i){const r=((t=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||t===void 0?void 0:t.name)||n;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${r}`)}let f=!1;const h=async()=>{if(f)throw new Error(Wt);return f=!0,await vi.streamCollector(n)};return Object.assign(n,{transformToByteArray:h,transformToString:async(i)=>{const r=await h();if(i===void 0||Buffer.isEncoding(i))return li.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString(i);else return new oi.TextDecoder(i).decode(r)},transformToWebStream:()=>{if(f)throw new Error(Wt);if(n.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Qn.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return f=!0,Qn.Readable.toWeb(n)}})};bt.sdkStreamMixin=pi});var Rt=Y((jt)=>{async function qi(n){if(typeof n.stream==="function")n=n.stream();return n.tee()}Object.defineProperty(jt,"__esModule",{value:!0});jt.splitStream=void 0;jt.splitStream=qi});var Ot=Y((Ht)=>{async function _i(n){if(mi.isReadableStream(n))return ai.splitStream(n);const c=new At.PassThrough,t=new At.PassThrough;return n.pipe(c),n.pipe(t),[c,t]}Object.defineProperty(Ht,"__esModule",{value:!0});Ht.splitStream=void 0;var At=import.meta.require("stream"),ai=Rt(),mi=H();Ht.splitStream=_i});var lt=Y((kt)=>{async function nr(n,c){var t;let f=0;const h=[],i=n.getReader();let r=!1;while(!r){const{done:F,value:U}=await i.read();if(U)h.push(U),f+=(t=U===null||U===void 0?void 0:U.byteLength)!==null&&t!==void 0?t:0;if(f>=c)break;r=F}i.releaseLock();const s=new Uint8Array(Math.min(c,f));let u=0;for(let F of h){if(F.byteLength>s.byteLength-u){s.set(F.subarray(0,s.byteLength-u),u);break}else s.set(F,u);u+=F.length}return s}Object.defineProperty(kt,"__esModule",{value:!0});kt.headStream=void 0;kt.headStream=nr});var qt=Y((et)=>{Object.defineProperty(et,"__esModule",{value:!0});et.headStream=void 0;var cr=import.meta.require("stream"),tr=lt(),fr=H(),hr=(n,c)=>{if(fr.isReadableStream(n))return tr.headStream(n,c);return new Promise((t,f)=>{const h=new ot;h.limit=c,n.pipe(h),n.on("error",(i)=>{h.end(),f(i)}),h.on("error",f),h.on("finish",function(){const i=new Uint8Array(Buffer.concat(this.buffers));t(i)})})};et.headStream=hr;class ot extends cr.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(n,c,t){var f;if(this.buffers.push(n),this.bytesBuffered+=(f=n.byteLength)!==null&&f!==void 0?f:0,this.bytesBuffered>=this.limit){const h=this.bytesBuffered-this.limit,i=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=i.subarray(0,i.byteLength-h),this.emit("finish")}t()}}});var tf=Y((Ys,B)=>{var _t=function(n,c="utf-8"){if(c==="base64")return at.toBase64(n);return mt.toUtf8(n)},nf=function(n,c){if(c==="base64")return Mn.mutate(at.fromBase64(n));return Mn.mutate(mt.fromUtf8(n))},un=Object.defineProperty,ir=Object.getOwnPropertyDescriptor,rr=Object.getOwnPropertyNames,sr=Object.prototype.hasOwnProperty,Xn=(n,c)=>un(n,"name",{value:c,configurable:!0}),ur=(n,c)=>{for(var t in c)un(n,t,{get:c[t],enumerable:!0})},Ln=(n,c,t,f)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of rr(c))if(!sr.call(n,h)&&h!==t)un(n,h,{get:()=>c[h],enumerable:!(f=ir(c,h))||f.enumerable})}return n},P=(n,c,t)=>(Ln(n,c,"default"),t&&Ln(t,c,"default")),wr=(n)=>Ln(un({},"__esModule",{value:!0}),n),S={};ur(S,{Uint8ArrayBlobAdapter:()=>Mn});B.exports=wr(S);var at=m(),mt=q();Xn(_t,"transformToString");Xn(nf,"transformFromString");var cf=class n extends Uint8Array{static fromString(c,t="utf-8"){switch(typeof c){case"string":return nf(c,t);default:throw new Error(`Unsupported conversion from ${typeof c} to Uint8ArrayBlobAdapter.`)}}static mutate(c){return Object.setPrototypeOf(c,n.prototype),c}transformToString(c="utf-8"){return _t(this,c)}};Xn(cf,"Uint8ArrayBlobAdapter");var Mn=cf;P(S,Ic(),B.exports);P(S,Bt(),B.exports);P(S,Ot(),B.exports);P(S,qt(),B.exports);P(S,H(),B.exports)});var on=l(Fn(),1);class Wf{constructor(n){this.middlewareStack=on.constructStack(),this.config=n}send(n,c,t){const f=typeof c!=="function"?c:void 0,h=typeof c==="function"?c:t,i=n.resolveMiddleware(this.middlewareStack,this.config,f);if(h)i(n).then((r)=>h(null,r.output),(r)=>h(r)).catch(()=>{});else return i(n).then((r)=>r.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var pn=l(Fn(),1);class qn{constructor(){this.middlewareStack=pn.constructStack()}static classBuilder(){return new an}resolveMiddlewareWithContext(n,c,t,{middlewareFn:f,clientName:h,commandName:i,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,smithyContext:u,additionalContext:F,CommandCtor:U}){for(let N of f.bind(this)(U,n,c,t))this.middlewareStack.use(N);const $=n.concat(this.middlewareStack),{logger:C}=c,x={logger:C,clientName:h,commandName:i,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,[en]:{commandInstance:this,...u},...F},{requestHandler:D}=c;return $.resolve((N)=>D.handle(N.request,t||{}),x)}}class an{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(n)=>n,this._outputFilterSensitiveLog=(n)=>n,this._serializer=null,this._deserializer=null}init(n){this._init=n}ep(n){return this._ep=n,this}m(n){return this._middlewareFn=n,this}s(n,c,t={}){return this._smithyContext={service:n,operation:c,...t},this}c(n={}){return this._additionalContext=n,this}n(n,c){return this._clientName=n,this._commandName=c,this}f(n=(t)=>t,c=(t)=>t){return this._inputFilterSensitiveLog=n,this._outputFilterSensitiveLog=c,this}ser(n){return this._serializer=n,this}de(n){return this._deserializer=n,this}build(){const n=this;let c;return c=class extends qn{static getEndpointParameterInstructions(){return n._ep}constructor(...[t]){super();this.serialize=n._serializer,this.deserialize=n._deserializer,this.input=t??{},n._init(this)}resolveMiddleware(t,f,h){return this.resolveMiddlewareWithContext(t,f,h,{CommandCtor:c,middlewareFn:n._middlewareFn,clientName:n._clientName,commandName:n._commandName,inputFilterSensitiveLog:n._inputFilterSensitiveLog,outputFilterSensitiveLog:n._outputFilterSensitiveLog,smithyContext:n._smithyContext,additionalContext:n._additionalContext})}}}}var er="***SensitiveInformation***";var qr=(n,c)=>{for(let t of Object.keys(n)){const f=n[t],h=async function(r,s,u){const F=new f(r);if(typeof s==="function")this.send(F,s);else if(typeof u==="function"){if(typeof s!=="object")throw new Error(`Expected http options but got ${typeof s}`);this.send(F,s||{},u)}else return this.send(F,s)},i=(t[0].toLowerCase()+t.slice(1)).replace(/Command$/,"");c.prototype[i]=h}};class mn extends Error{constructor(n){super(n.message);Object.setPrototypeOf(this,mn.prototype),this.name=n.name,this.$fault=n.$fault,this.$metadata=n.$metadata}}var _n=(n,c={})=>{Object.entries(c).filter(([,f])=>f!==void 0).forEach(([f,h])=>{if(n[f]==null||n[f]==="")n[f]=h});const t=n.message||n.Message||"UnknownError";return n.message=t,delete n.Message,n};class bf{trace(){}debug(){}info(){}warn(){}error(){}}var wn=l(tf(),1),ds=async(n=new Uint8Array,c)=>{if(n instanceof Uint8Array)return wn.Uint8ArrayBlobAdapter.mutate(n);if(!n)return wn.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const t=c.streamCollector(n);return wn.Uint8ArrayBlobAdapter.mutate(await t)};var Zs=(n)=>{switch(n){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${n}"`)}};var $r=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string"){const c=parseFloat(n);if(!Number.isNaN(c)){if(String(c)!==String(n))xf.warn($f(`Expected number but observed string: ${n}`));return c}}if(typeof n==="number")return n;throw new TypeError(`Expected number, got ${typeof n}: ${n}`)},xr=Math.ceil(340282346638528860000000000000000000000),ff=(n)=>{const c=$r(n);if(c!==void 0&&!Number.isNaN(c)&&c!==Infinity&&c!==(-Infinity)){if(Math.abs(c)>xr)throw new TypeError(`Expected 32-bit float, got ${n}`)}return c},Jn=(n)=>{if(n===null||n===void 0)return;if(Number.isInteger(n)&&!Number.isNaN(n))return n;throw new TypeError(`Expected integer, got ${typeof n}: ${n}`)};var hf=(n)=>Kn(n,32),rf=(n)=>Kn(n,16),sf=(n)=>Kn(n,8),Kn=(n,c)=>{const t=Jn(n);if(t!==void 0&&Tr(t,c)!==t)throw new TypeError(`Expected ${c}-bit integer, got ${n}`);return t},Tr=(n,c)=>{switch(c){case 32:return Int32Array.of(n)[0];case 16:return Int16Array.of(n)[0];case 8:return Int8Array.of(n)[0]}},Vs=(n,c)=>{if(n===null||n===void 0){if(c)throw new TypeError(`Expected a non-null value for ${c}`);throw new TypeError("Expected a non-null value")}return n},Gs=(n)=>{if(n===null||n===void 0)return;if(typeof n==="object"&&!Array.isArray(n))return n;const c=Array.isArray(n)?"array":typeof n;throw new TypeError(`Expected object, got ${c}: ${n}`)},Qs=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string")return n;if(["boolean","number","bigint"].includes(typeof n))return xf.warn($f(`Expected string, got ${typeof n}: ${n}`)),String(n);throw new TypeError(`Expected string, got ${typeof n}: ${n}`)};var uf=(n)=>{if(typeof n=="string")return ff(O(n));return ff(n)},Fr=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,O=(n)=>{const c=n.match(Fr);if(c===null||c[0].length!==n.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(n)};var Ls=(n)=>{if(typeof n==="string")return Jn(O(n));return Jn(n)};var Ms=(n)=>{if(typeof n==="string")return hf(O(n));return hf(n)},j=(n)=>{if(typeof n==="string")return rf(O(n));return rf(n)},wf=(n)=>{if(typeof n==="string")return sf(O(n));return sf(n)},$f=(n)=>{return String(new TypeError(n).stack||n).split("\n").slice(0,5).filter((c)=>!c.includes("stackTraceWarning")).join("\n")},xf={warn:console.warn};function Ws(n){const c=n.getUTCFullYear(),t=n.getUTCMonth(),f=n.getUTCDay(),h=n.getUTCDate(),i=n.getUTCHours(),r=n.getUTCMinutes(),s=n.getUTCSeconds(),u=h<10?`0${h}`:`${h}`,F=i<10?`0${i}`:`${i}`,U=r<10?`0${r}`:`${r}`,$=s<10?`0${s}`:`${s}`;return`${Cr[f]}, ${u} ${bn[t]} ${c} ${F}:${U}:${$} GMT`}var Cr=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],bn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Er=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),bs=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const c=Er.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");const[t,f,h,i,r,s,u,F]=c,U=j(g(f)),$=L(h,"month",1,12),C=L(i,"day",1,31);return k(U,$,C,{hours:r,minutes:s,seconds:u,fractionalMilliseconds:F})},Ur=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Ss=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const c=Ur.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");const[t,f,h,i,r,s,u,F,U]=c,$=j(g(f)),C=L(h,"month",1,12),x=L(i,"day",1,31),D=k($,C,x,{hours:r,minutes:s,seconds:u,fractionalMilliseconds:F});if(U.toUpperCase()!="Z")D.setTime(D.getTime()-Qr(U));return D},Dr=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$/),Nr=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$/),yr=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})$/),Bs=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let c=Dr.exec(n);if(c){const[t,f,h,i,r,s,u,F]=c;return k(j(g(i)),Wn(h),L(f,"day",1,31),{hours:r,minutes:s,seconds:u,fractionalMilliseconds:F})}if(c=Nr.exec(n),c){const[t,f,h,i,r,s,u,F]=c;return dr(k(Ir(i),Wn(h),L(f,"day",1,31),{hours:r,minutes:s,seconds:u,fractionalMilliseconds:F}))}if(c=yr.exec(n),c){const[t,f,h,i,r,s,u,F]=c;return k(j(g(F)),Wn(f),L(h.trimLeft(),"day",1,31),{hours:i,minutes:r,seconds:s,fractionalMilliseconds:u})}throw new TypeError("Invalid RFC-7231 date-time value")};var k=(n,c,t,f)=>{const h=c-1;return Zr(n,h,t),new Date(Date.UTC(n,h,t,L(f.hours,"hour",0,23),L(f.minutes,"minute",0,59),L(f.seconds,"seconds",0,60),Gr(f.fractionalMilliseconds)))},Ir=(n)=>{const c=(new Date()).getUTCFullYear(),t=Math.floor(c/100)*100+j(g(n));if(t<c)return t+100;return t},Yr=1576800000000,dr=(n)=>{if(n.getTime()-(new Date()).getTime()>Yr)return new Date(Date.UTC(n.getUTCFullYear()-100,n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()));return n},Wn=(n)=>{const c=bn.indexOf(n);if(c<0)throw new TypeError(`Invalid month: ${n}`);return c+1},zr=[31,28,31,30,31,30,31,31,30,31,30,31],Zr=(n,c,t)=>{let f=zr[c];if(c===1&&Vr(n))f=29;if(t>f)throw new TypeError(`Invalid day for ${bn[c]} in ${n}: ${t}`)},Vr=(n)=>{return n%4===0&&(n%100!==0||n%400===0)},L=(n,c,t,f)=>{const h=wf(g(n));if(h<t||h>f)throw new TypeError(`${c} must be between ${t} and ${f}, inclusive`);return h},Gr=(n)=>{if(n===null||n===void 0)return 0;return uf("0."+n)*1000},Qr=(n)=>{const c=n[0];let t=1;if(c=="+")t=1;else if(c=="-")t=-1;else throw new TypeError(`Offset direction, ${c}, must be "+" or "-"`);const f=Number(n.substring(1,3)),h=Number(n.substring(4,6));return t*(f*60+h)*60*1000},g=(n)=>{let c=0;while(c<n.length-1&&n.charAt(c)==="0")c++;if(c===0)return n;return n.slice(c)};var Lr=({output:n,parsedBody:c,exceptionCtor:t,errorCode:f})=>{const h=Mr(n),i=h.httpStatusCode?h.httpStatusCode+"":void 0,r=new t({name:c?.code||c?.Code||f||i||"UnknownError",$fault:"client",$metadata:h});throw _n(r,c)},Rs=(n)=>{return({output:c,parsedBody:t,errorCode:f})=>{Lr({output:c,parsedBody:t,exceptionCtor:n,errorCode:f})}},Mr=(n)=>({httpStatusCode:n.statusCode,requestId:n.headers["x-amzn-requestid"]??n.headers["x-amzn-request-id"]??n.headers["x-amz-request-id"],extendedRequestId:n.headers["x-amz-id-2"],cfId:n.headers["x-amz-cf-id"]});var Hs=(n)=>{switch(n){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{}}};var Tf=!1,Os=(n)=>{if(n&&!Tf&&parseInt(n.substring(1,n.indexOf(".")))<16)Tf=!0};var Ff=(n)=>{const c=[];for(let t in Sn){const f=Sn[t];if(n[f]===void 0)continue;c.push({algorithmId:()=>f,checksumConstructor:()=>n[f]})}return{_checksumAlgorithms:c,addChecksumAlgorithm(t){this._checksumAlgorithms.push(t)},checksumAlgorithms(){return this._checksumAlgorithms}}},Cf=(n)=>{const c={};return n.checksumAlgorithms().forEach((t)=>{c[t.algorithmId()]=t.checksumConstructor()}),c};var Ef=(n)=>{let c=n.retryStrategy;return{setRetryStrategy(t){c=t},retryStrategy(){return c}}},Uf=(n)=>{const c={};return c.retryStrategy=n.retryStrategy(),c};var qs=(n)=>{return{...Ff(n),...Ef(n)}};var as=(n)=>{return{...Cf(n),...Uf(n)}};function Xr(n){return encodeURIComponent(n).replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16).toUpperCase()})}var Bn=function(){const n=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,n.prototype),t};Bn.prototype=Object.create(String.prototype,{constructor:{value:Bn,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Bn,String);function Jr(n,c,t){let f,h,i;if(typeof c==="undefined"&&typeof t==="undefined")f={},i=n;else if(f=n,typeof c==="function")return h=c,i=t,Kr(f,h,i);else i=c;for(let r of Object.keys(i)){if(!Array.isArray(i[r])){f[r]=i[r];continue}Df(f,null,i,r)}return f}var i0=(n,c)=>{const t={};for(let f in c)Df(t,n,c,f);return t},Kr=(n,c,t)=>{return Jr(n,Object.entries(t).reduce((f,[h,i])=>{if(Array.isArray(i))f[h]=i;else if(typeof i==="function")f[h]=[c,i()];else f[h]=[c,i];return f},{}))},Df=(n,c,t,f)=>{if(c!==null){let r=t[f];if(typeof r==="function")r=[,r];const[s=Wr,u=br,F=f]=r;if(typeof s==="function"&&s(c[F])||typeof s!=="function"&&!!s)n[f]=u(c[F]);return}let[h,i]=t[f];if(typeof i==="function"){let r;const s=h===void 0&&(r=i())!=null,u=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(s)n[f]=r;else if(u)n[f]=i()}else{const r=h===void 0&&i!=null,s=typeof h==="function"&&!!h(i)||typeof h!=="function"&&!!h;if(r||s)n[f]=i}},Wr=(n)=>n!=null,br=(n)=>n;var w0=(n)=>n.toISOString().replace(".000Z","Z");var Nf=(n)=>{if(n==null)return{};if(Array.isArray(n))return n.filter((c)=>c!=null).map(Nf);if(typeof n==="object"){const c={};for(let t of Object.keys(n)){if(n[t]==null)continue;c[t]=Nf(n[t])}return c}return n};var B0=(n)=>{let c=n.httpHandler;return{setHttpHandler(t){c=t},httpHandler(){return c},updateHttpClientConfig(t,f){c.updateHttpClientConfig(t,f)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},j0=(n)=>{return{httpHandler:n.httpHandler()}};var Sr=function(n){return Object.keys(n).reduce((c,t)=>{const f=n[t];return{...c,[t]:Array.isArray(f)?[...f]:f}},{})};class jn{constructor(n){this.method=n.method||"GET",this.hostname=n.hostname||"localhost",this.port=n.port,this.query=n.query||{},this.headers=n.headers||{},this.body=n.body,this.protocol=n.protocol?n.protocol.slice(-1)!==":"?`${n.protocol}:`:n.protocol:"https:",this.path=n.path?n.path.charAt(0)!=="/"?`/${n.path}`:n.path:"/",this.username=n.username,this.password=n.password,this.fragment=n.fragment}static clone(n){const c=new jn({...n,headers:{...n.headers}});if(c.query)c.query=Sr(c.query);return c}static isInstance(n){if(!n)return!1;const c=n;return"method"in c&&"protocol"in c&&"hostname"in c&&"path"in c&&typeof c.query==="object"&&typeof c.headers==="object"}clone(){return jn.clone(this)}}class $n{constructor(n){this.statusCode=n.statusCode,this.reason=n.reason,this.headers=n.headers||{},this.body=n.body}static isInstance(n){if(!n)return!1;const c=n;return typeof c.statusCode==="number"&&typeof c.headers==="object"}}var xn=l(In(),1);function gn(n){const c=[];for(let t of Object.keys(n).sort()){const f=n[t];if(t=xn.escapeUri(t),Array.isArray(f))for(let h=0,i=f.length;h<i;h++)c.push(`${t}=${xn.escapeUri(f[h])}`);else{let h=t;if(f||typeof f==="string")h+=`=${xn.escapeUri(f)}`;c.push(h)}}return c.join("&")}import{Agent as Zf,request as gr} from"http";import{Agent as Vf,request as Rr} from"https";var yf=["ECONNRESET","EPIPE","ETIMEDOUT"];var Rn=(n)=>{const c={};for(let t of Object.keys(n)){const f=n[t];c[t]=Array.isArray(f)?f.join(","):f}return c};var If=(n,c,t=0)=>{if(!t)return;const f=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${t} ms`),{name:"TimeoutError"}))},t);n.on("socket",(h)=>{if(h.connecting)h.on("connect",()=>{clearTimeout(f)});else clearTimeout(f)})};var Yf=(n,{keepAlive:c,keepAliveMsecs:t})=>{if(c!==!0)return;n.on("socket",(f)=>{f.setKeepAlive(c,t||0)})};var df=(n,c,t=0)=>{n.setTimeout(t,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${t} ms`),{name:"TimeoutError"}))})};import{Readable as Br} from"stream";async function An(n,c,t=zf){const f=c.headers??{},h=f.Expect||f.expect;let i=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{i=Number(setTimeout(s,Math.max(zf,t)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(i),s()}),n.on("error",()=>{r=!0,clearTimeout(i),s()})})]);if(!r)jr(n,c.body)}var jr=function(n,c){if(c instanceof Br){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}const t=c;if(typeof t==="object"&&t.buffer&&typeof t.byteOffset==="number"&&typeof t.byteLength==="number"){n.end(Buffer.from(t.buffer,t.byteOffset,t.byteLength));return}n.end(Buffer.from(c));return}n.end()},zf=1000;class Hn{static create(n){if(typeof n?.handle==="function")return n;return new Hn(n)}static checkSocketUsage(n,c,t=console){const{sockets:f,requests:h,maxSockets:i}=n;if(typeof i!=="number"||i===Infinity)return c;const r=15000;if(Date.now()-r<c)return c;if(f&&h)for(let s in f){const u=f[s]?.length??0,F=h[s]?.length??0;if(u>=i&&F>=2*i)return t?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${u} and ${F} additional requests are enqueued.
4
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
5
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return c}constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((c,t)=>{if(typeof n==="function")n().then((f)=>{c(this.resolveDefaultConfig(f))}).catch(t);else c(this.resolveDefaultConfig(n))})}resolveDefaultConfig(n){const{requestTimeout:c,connectionTimeout:t,socketTimeout:f,httpAgent:h,httpsAgent:i}=n||{};return{connectionTimeout:t,requestTimeout:c??f,httpAgent:(()=>{if(h instanceof Zf||typeof h?.destroy==="function")return h;return new Zf({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(i instanceof Vf||typeof i?.destroy==="function")return i;return new Vf({keepAlive:!0,maxSockets:50,...i})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(n,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;let t;return new Promise((f,h)=>{let i=void 0;const r=async(w)=>{await i,clearTimeout(t),f(w)},s=async(w)=>{await i,clearTimeout(t),h(w)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(c?.aborted){const w=new Error("Request aborted");w.name="AbortError",s(w);return}const u=n.protocol==="https:",F=u?this.config.httpsAgent:this.config.httpAgent;t=setTimeout(()=>{this.socketWarningTimestamp=Hn.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const U=gn(n.query||{});let $=void 0;if(n.username!=null||n.password!=null){const w=n.username??"",T=n.password??"";$=`${w}:${T}`}let C=n.path;if(U)C+=`?${U}`;if(n.fragment)C+=`#${n.fragment}`;const x={headers:n.headers,host:n.hostname,method:n.method,path:C,port:n.port,agent:F,auth:$},N=(u?Rr:gr)(x,(w)=>{const T=new $n({statusCode:w.statusCode||-1,reason:w.statusMessage,headers:Rn(w.headers),body:w});r({response:T})});if(N.on("error",(w)=>{if(yf.includes(w.code))s(Object.assign(w,{name:"TimeoutError"}));else s(w)}),If(N,s,this.config.connectionTimeout),df(N,s,this.config.requestTimeout),c){const w=()=>{N.destroy();const T=new Error("Request aborted");T.name="AbortError",s(T)};if(typeof c.addEventListener==="function"){const T=c;T.addEventListener("abort",w,{once:!0}),N.once("close",()=>T.removeEventListener("abort",w))}else c.onabort=w}const E=x.agent;if(typeof E==="object"&&"keepAlive"in E)Yf(N,{keepAlive:E.keepAlive,keepAliveMsecs:E.keepAliveMsecs});i=An(N,n,this.config.requestTimeout).catch((w)=>{return clearTimeout(t),h(w)})})}updateHttpClientConfig(n,c){this.config=void 0,this.configProvider=this.configProvider.then((t)=>{return{...t,[n]:c}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as Ar} from"stream";class Pn extends Ar{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,c,t){this.bufferedBytes.push(n),t()}}async function Pr(n){const c=[],t=n.getReader();let f=!1,h=0;while(!f){const{done:s,value:u}=await t.read();if(u)c.push(u),h+=u.length;f=s}const i=new Uint8Array(h);let r=0;for(let s of c)i.set(s,r),r+=s.length;return i}var Bu=(n)=>{if(Hr(n))return Pr(n);return new Promise((c,t)=>{const f=new Pn;n.pipe(f),n.on("error",(h)=>{f.end(),t(h)}),f.on("error",t),f.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},Hr=(n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream;export{B0 as Da,j0 as Ea,jn as Fa,$n as Ga,bf as Ha,Fn as Ia,Wf as Ja,tc as Ka,q as La,Xc as Ma,Nn as Na,In as Oa,Zt as Pa,tf as Qa,ds as Ra,qn as Sa,er as Ta,qr as Ua,Zs as Va,Jn as Wa,hf as Xa,Vs as Ya,Gs as Za,Qs as _a,Ls as $a,Ms as ab,Ws as bb,bs as cb,Ss as db,Bs as eb,mn as fb,_n as gb,Rs as hb,Hs as ib,Os as jb,qs as kb,as as lb,Xr as mb,Jr as nb,i0 as ob,w0 as pb,Nf as qb,Hn as rb,Bu as sb};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-24a86f8f5ddc0cbd.js";import{wb as E} from"./chunk-d16ef78d852a6856.js";var _="AWS_ACCESS_KEY_ID",S="AWS_SECRET_ACCESS_KEY",p="AWS_SESSION_TOKEN",A="AWS_CREDENTIAL_EXPIRATION",C="AWS_CREDENTIAL_SCOPE",N="AWS_ACCOUNT_ID",a=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const o=process.env[_],r=process.env[S],n=process.env[p],s=process.env[A],t=process.env[C],c=process.env[N];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("Unable to find environment variable credentials.",{logger:e?.logger})};export{a as fromEnv,p as ENV_SESSION,S as ENV_SECRET,_ as ENV_KEY,A as ENV_EXPIRATION,C as ENV_CREDENTIAL_SCOPE,N as ENV_ACCOUNT_ID};export{_ as u,S as v,a as w};
2
+ import"./chunk-24a86f8f5ddc0cbd.js";import{Jb as E} from"./chunk-91b6ef5e24ab5b68.js";var _="AWS_ACCESS_KEY_ID",S="AWS_SECRET_ACCESS_KEY",p="AWS_SESSION_TOKEN",A="AWS_CREDENTIAL_EXPIRATION",C="AWS_CREDENTIAL_SCOPE",N="AWS_ACCOUNT_ID",a=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const o=process.env[_],r=process.env[S],n=process.env[p],s=process.env[A],t=process.env[C],c=process.env[N];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("Unable to find environment variable credentials.",{logger:e?.logger})};export{a as fromEnv,p as ENV_SESSION,S as ENV_SECRET,_ as ENV_KEY,A as ENV_EXPIRATION,C as ENV_CREDENTIAL_SCOPE,N as ENV_ACCOUNT_ID};export{_ as u,S as v,a as w};
@@ -1 +1 @@
1
- class n extends Error{constructor(t,e=!0){let o,r=!0;if(typeof e==="boolean")o=void 0,r=e;else if(e!=null&&typeof e==="object")o=e.logger,r=e.tryNextLink??!0;super(t);this.name="ProviderError",this.tryNextLink=r,Object.setPrototypeOf(this,n.prototype),o?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,e=!0){return Object.assign(new this(t.message,e),t)}}class u extends n{constructor(t,e=!0){super(t,e);this.name="CredentialsProviderError",Object.setPrototypeOf(this,u.prototype)}}class l extends n{constructor(t,e=!0){super(t,e);this.name="TokenProviderError",Object.setPrototypeOf(this,l.prototype)}}var v=(...t)=>async()=>{if(t.length===0)throw new n("No providers in chain");let e;for(let o of t)try{return await o()}catch(r){if(e=r,r?.tryNextLink)continue;throw r}throw e};var w=(t)=>()=>Promise.resolve(t);var b=(t,e,o)=>{let r,i,s,f=!1;const a=async()=>{if(!i)i=t();try{r=await i,s=!0,f=!1}finally{i=void 0}return r};if(e===void 0)return async(c)=>{if(!s||c?.forceRefresh)r=await a();return r};return async(c)=>{if(!s||c?.forceRefresh)r=await a();if(f)return r;if(o&&!o(r))return f=!0,r;if(e(r))return await a(),r;return r}};export{n as vb,u as wb,l as xb,v as yb,w as zb,b as Ab};
1
+ class n extends Error{constructor(t,e=!0){let o,r=!0;if(typeof e==="boolean")o=void 0,r=e;else if(e!=null&&typeof e==="object")o=e.logger,r=e.tryNextLink??!0;super(t);this.name="ProviderError",this.tryNextLink=r,Object.setPrototypeOf(this,n.prototype),o?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,e=!0){return Object.assign(new this(t.message,e),t)}}class u extends n{constructor(t,e=!0){super(t,e);this.name="CredentialsProviderError",Object.setPrototypeOf(this,u.prototype)}}class l extends n{constructor(t,e=!0){super(t,e);this.name="TokenProviderError",Object.setPrototypeOf(this,l.prototype)}}var v=(...t)=>async()=>{if(t.length===0)throw new n("No providers in chain");let e;for(let o of t)try{return await o()}catch(r){if(e=r,r?.tryNextLink)continue;throw r}throw e};var w=(t)=>()=>Promise.resolve(t);var b=(t,e,o)=>{let r,i,s,f=!1;const a=async()=>{if(!i)i=t();try{r=await i,s=!0,f=!1}finally{i=void 0}return r};if(e===void 0)return async(c)=>{if(!s||c?.forceRefresh)r=await a();return r};return async(c)=>{if(!s||c?.forceRefresh)r=await a();if(f)return r;if(o&&!o(r))return f=!0,r;if(e(r))return await a(),r;return r}};export{n as Ib,u as Jb,l as Kb,v as Lb,w as Mb,b as Nb};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-b99af11a56fdd395.js";import{wb as c,yb as m} from"./chunk-d16ef78d852a6856.js";import{Db as l,Jb as S} from"./chunk-63e9bc71922dbe80.js";var w=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-c6ab6f8e07a028ac.js"),{fromContainerMetadata:d}=await import("./chunk-958e406572d457ca.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),m(n(t??{}),d(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-958e406572d457ca.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-25ee58bc6072bd58.js");return n(t)}};if(e in i)return i[e];else throw new c(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var y=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(h(e,{profile:s,logger:r})||D(e,{profile:s,logger:r}))},h=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},D=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},C=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:R}=await import("./chunk-d16cfcc9dd3ac869.js");r.roleAssumer=R({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new c("Detected a cycle attempting to resolve credentials for profile"+` ${l(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const d=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await w(t.credential_source,e,r.logger)(r))(),u={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:f}=t;if(f){if(!r.mfaCodeProvider)throw new c(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});u.SerialNumber=f,u.TokenCode=await r.mfaCodeProvider(f)}const $=await d;return r.roleAssumer($,u)};var P=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",v=async(e,s)=>import("./chunk-f6a80fc55311e0c8.js").then(({fromProcess:r})=>r({...e,profile:s})());var x=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-63c98893e07b1644.js");return r({profile:e,logger:s.logger})()},b=(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 _=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,a=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var A=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,k=async(e,s)=>import("./chunk-2335866508ec8b1b.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&_(t))return a(t,r);if(y(t,{profile:e,logger:r.logger}))return C(e,s,r,i);if(_(t))return a(t,r);if(A(t))return k(t,r);if(P(t))return v(r,e);if(b(t))return await x(e,r);throw new c(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var H=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await S(e);return o(l(e),s,e)};export{H as fromIni};
2
+ import"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-f6546172b47b47d2.js";import{Bb as l,Hb as S} from"./chunk-111f0589f69a05b1.js";import{Jb as c,Lb as m} from"./chunk-91b6ef5e24ab5b68.js";var w=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-b42d49e516e08f8f.js"),{fromContainerMetadata:d}=await import("./chunk-5b8fb522ae72415c.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),m(n(t??{}),d(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-5b8fb522ae72415c.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-90bbf6a9e83613c5.js");return n(t)}};if(e in i)return i[e];else throw new c(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var y=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(h(e,{profile:s,logger:r})||D(e,{profile:s,logger:r}))},h=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},D=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},C=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:R}=await import("./chunk-f44ef133dae89ec6.js");r.roleAssumer=R({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new c("Detected a cycle attempting to resolve credentials for profile"+` ${l(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const d=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await w(t.credential_source,e,r.logger)(r))(),u={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:f}=t;if(f){if(!r.mfaCodeProvider)throw new c(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});u.SerialNumber=f,u.TokenCode=await r.mfaCodeProvider(f)}const $=await d;return r.roleAssumer($,u)};var P=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",v=async(e,s)=>import("./chunk-40944e185c025271.js").then(({fromProcess:r})=>r({...e,profile:s})());var x=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-e78e6f198869b6d2.js");return r({profile:e,logger:s.logger})()},b=(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 _=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,a=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var A=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,k=async(e,s)=>import("./chunk-b8d464c89c783b71.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&_(t))return a(t,r);if(y(t,{profile:e,logger:r.logger}))return C(e,s,r,i);if(_(t))return a(t,r);if(A(t))return k(t,r);if(P(t))return v(r,e);if(b(t))return await x(e,r);throw new c(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var H=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await S(e);return o(l(e),s,e)};export{H as fromIni};