@agentlang/lstudio 0.5.6 → 0.5.7

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 (68) hide show
  1. package/assets/AwsJson1_1Protocol-BPKAibNb.js +1 -0
  2. package/assets/AwsQueryProtocol-gcsdfhfo.js +1 -0
  3. package/assets/XmlShapeDeserializer-yfMUWnPw.js +1 -0
  4. package/assets/_commonjs-dynamic-modules-B90KZyeo-MqqgM5Sj.js +1 -0
  5. package/assets/_commonjs-dynamic-modules-D244begT.js +1 -0
  6. package/assets/aws-BDH7ihg3.js +1 -0
  7. package/assets/documentFetcher-DXduTBqD-jqdP0czN.js +67 -0
  8. package/assets/documentFetcher-Ds-FwFaK.js +8 -0
  9. package/assets/index-BTpRe6xv-w-5JgxLH.js +1 -0
  10. package/assets/index-BWkXARMt.js +1 -0
  11. package/assets/index-BhYX3qBc.js +1 -0
  12. package/assets/{index-BFv-M3PX.js → index-BvJIpPZM.js} +14 -14
  13. package/assets/{index-BT-B0wMw.js → index-Bxvbin5N.js} +1837 -10339
  14. package/assets/index-CDKpgEyj-tyrSWl01.js +8753 -0
  15. package/assets/index-CZHYN75I.css +1 -0
  16. package/assets/index-Cv6PsiG7.js +1 -0
  17. package/assets/{index-KGBiLwKE-Doz2tX9S.js → index-D9hvpHrT-D460pOJZ.js} +7 -7
  18. package/assets/index-DGSGqHDe.js +1 -0
  19. package/assets/index-DRgW1--O-Be3NpfgF.js +17 -0
  20. package/assets/index-Dk98TczE-BtSqF03o.js +1 -0
  21. package/assets/{index-DYmn2gQ6-CnjFa625.js → index-DuUQBJXO-gNsOEp1C.js} +1 -1
  22. package/assets/{index-BitrXVkV.js → index-DzXvkWz5.js} +1 -1
  23. package/assets/{index-CAsiSxeK.js → index-QhSmQuQt.js} +9 -9
  24. package/assets/index-_duzuPdC.js +15 -0
  25. package/assets/{index-D4z_hbl0-CD1MieBA.js → index-ruSRuF6L-BjzIBLlQ.js} +9 -9
  26. package/assets/index.browser-DC-BI9vG.js +5 -0
  27. package/assets/index.browser-yI_W1hK0-C1Oinehc.js +1 -0
  28. package/assets/loadCognitoIdentity-C6X581JO.js +1 -0
  29. package/assets/loadSts-BLVzhgX4.js +1 -0
  30. package/assets/noAuth-Cp7LDRaC.js +1 -0
  31. package/assets/{normalizeProvider-CtDY37Q6.js → normalizeProvider-Cd9_AiS_.js} +1 -1
  32. package/assets/pdf-parse.es-Bg6uvNNe-3L3fe-Mc.js +26 -0
  33. package/assets/pdf-parse.es-CO6QlkPs.js +26 -0
  34. package/assets/replService-CPKXCVUs.js +1 -0
  35. package/assets/sdk-stream-mixin.browser-Dycc9CbH.js +2 -0
  36. package/assets/{winston-DA9FnRtM.js → winston-BWsrMlta.js} +27 -27
  37. package/assets/{winston-fLGSL0tu.js → winston-BvOMKj10.js} +1 -1
  38. package/assets/winston-CnOlwptw-BXt6VwZK.js +1 -0
  39. package/assets/{winston-1qzyIKCb-DfRv1PO8.js → winston-Dk1WXlDf--OwDrr6q.js} +27 -27
  40. package/index.html +6 -12
  41. package/package.json +1 -1
  42. package/assets/__vite-browser-external-BDMct_Gn-FmFgRqLi.js +0 -1
  43. package/assets/__vite-browser-external-DLjrMatA.js +0 -1
  44. package/assets/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js +0 -1
  45. package/assets/_commonjs-dynamic-modules-DkOKMH7F.js +0 -1
  46. package/assets/index-69shuAsh-DF18H7zf.js +0 -1
  47. package/assets/index-6mr3sa6o.js +0 -1
  48. package/assets/index-B0dS78d1.js +0 -1
  49. package/assets/index-BJBOx-Z---hbiLl7B.js +0 -5
  50. package/assets/index-BXMy9UIl.js +0 -1
  51. package/assets/index-Bto-kj6R-C0A_3Pwb.js +0 -1
  52. package/assets/index-ChvoNxcO.js +0 -5
  53. package/assets/index-CpjrEQ_o.css +0 -1
  54. package/assets/index-DSosZ5sh-Ceejs_jv.js +0 -1
  55. package/assets/index-DTNuphFO-Bf5Ad1xs.js +0 -17
  56. package/assets/index-Dlh-KIx4.js +0 -1
  57. package/assets/index-DsIu-45t-Bejjlpz4.js +0 -6
  58. package/assets/index.browser-1cO3jWRU.js +0 -6
  59. package/assets/index.browser-BHPvGrwi-6Mh8eUw-.js +0 -1
  60. package/assets/inherits_browser-nmOknR35-Bp0mvRSL.js +0 -1
  61. package/assets/loadCognitoIdentity-DbqOiF04.js +0 -1
  62. package/assets/loadSts-D8r_UqTz.js +0 -1
  63. package/assets/replService-CZE13KTw.js +0 -1
  64. package/assets/resolveDefaultsModeConfig-BaVgVWbD.js +0 -15
  65. package/assets/util-B4ZV5RJW.js +0 -10
  66. package/assets/util-CNqBjtt6-GUXK7Yxz.js +0 -10
  67. package/assets/util-DZRIOW0Z-CproX86h.js +0 -1
  68. package/assets/winston-CtxF18qc-B_oJRj0X.js +0 -1
@@ -0,0 +1,5 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-C6X581JO.js","assets/index-_duzuPdC.js","assets/normalizeProvider-Cd9_AiS_.js","assets/preload-helper-BlTxHScW.js","assets/index-Bxvbin5N.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-CDKpgEyj-tyrSWl01.js","assets/index.browser-yI_W1hK0-C1Oinehc.js","assets/index-6mKfgpcs-DsgiI2lM.js","assets/_commonjsHelpers-B4e78b8K-W3E8ocG7.js","assets/_commonjs-dynamic-modules-B90KZyeo-MqqgM5Sj.js","assets/_commonjs-dynamic-modules-D244begT.js","assets/index-CZHYN75I.css","assets/AwsJson1_1Protocol-BPKAibNb.js","assets/noAuth-Cp7LDRaC.js","assets/loadSts-BLVzhgX4.js","assets/AwsQueryProtocol-gcsdfhfo.js","assets/XmlShapeDeserializer-yfMUWnPw.js","assets/index-DGSGqHDe.js"])))=>i.map(i=>d[i]);
2
+ import{_ as S}from"./preload-helper-BlTxHScW.js";import{H as O,h as R,F as E,n as _}from"./normalizeProvider-Cd9_AiS_.js";import{s as N}from"./sdk-stream-mixin.browser-Dycc9CbH.js";class b extends Error{name="ProviderError";tryNextLink;constructor(t,o=!0){let n,r=!0;typeof o=="boolean"?(n=void 0,r=o):o!=null&&typeof o=="object"&&(n=o.logger,r=o.tryNextLink??!0),super(t),this.tryNextLink=r,Object.setPrototypeOf(this,b.prototype),n?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,o=!0){return Object.assign(new this(t.message,o),t)}}class d extends b{name="CredentialsProviderError";constructor(t,o=!0){super(t,o),Object.setPrototypeOf(this,d.prototype)}}function k(e){return Promise.all(Object.keys(e).reduce((t,o)=>{const n=e[o];return typeof n=="string"?t.push([o,n]):t.push(n().then(r=>[o,r])),t},[])).then(t=>t.reduce((o,[n,r])=>(o[n]=r,o),{}))}function v(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:o,CognitoIdentityClient:n}=await S(async()=>{const{GetCredentialsForIdentityCommand:a,CognitoIdentityClient:f}=await import("./loadCognitoIdentity-C6X581JO.js");return{GetCredentialsForIdentityCommand:a,CognitoIdentityClient:f}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])),r=a=>e.clientConfig?.[a]??e.parentClientConfig?.[a]??t?.callerClientConfig?.[a],{Credentials:{AccessKeyId:i=K(e.logger),Expiration:s,SecretKey:l=x(e.logger),SessionToken:u}=D(e.logger)}=await(e.client??new n(Object.assign({},e.clientConfig??{},{region:r("region"),profile:r("profile"),userAgentAppId:r("userAgentAppId")}))).send(new o({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await k(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:i,secretAccessKey:l,sessionToken:u,expiration:s}}}function K(e){throw new d("Response from Amazon Cognito contained no access key ID",{logger:e})}function D(e){throw new d("Response from Amazon Cognito contained no credentials",{logger:e})}function x(e){throw new d("Response from Amazon Cognito contained no secret key",{logger:e})}const A="IdentityIds";class H{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",o=>{const n=o.get(t);return new Promise(r=>{n.onerror=()=>r(null),n.onsuccess=()=>r(n.result?n.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",o=>{const n=o.delete(t);return new Promise((r,i)=>{n.onerror=()=>i(n.error),n.onsuccess=()=>r()})})}setItem(t,o){return this.withObjectStore("readwrite",n=>{const r=n.put({id:t,value:o});return new Promise((i,s)=>{r.onerror=()=>s(r.error),r.onsuccess=()=>i()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((o,n)=>{t.onsuccess=()=>{o(t.result)},t.onerror=()=>{n(t.error)},t.onblocked=()=>{n(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const r=t.result;r.onerror=()=>{n(new Error("Failed to create object store"))},r.createObjectStore(A,{keyPath:"id"})}})}withObjectStore(t,o){return this.getDb().then(n=>{const r=n.transaction(A,t);return r.oncomplete=()=>n.close(),new Promise((i,s)=>{r.onerror=()=>s(r.error),i(o(r.objectStore(A)))}).catch(i=>{throw n.close(),i})})}}class j{store;constructor(t={}){this.store=t}getItem(t){return t in this.store?this.store[t]:null}removeItem(t){delete this.store[t]}setItem(t,o){this.store[t]=o}}const q=new j;function L(){return typeof self=="object"&&self.indexedDB?new H:typeof window=="object"&&window.localStorage?window.localStorage:q}function $({accountId:e,cache:t=L(),client:o,clientConfig:n,customRoleArn:r,identityPoolId:i,logins:s,userIdentifier:l=!s||Object.keys(s).length===0?"ANONYMOUS":void 0,logger:u,parentClientConfig:a}){u?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const f=l?`aws:cognito-identity-credentials:${i}:${l}`:void 0;let c=async w=>{const{GetIdCommand:g,CognitoIdentityClient:h}=await S(async()=>{const{GetIdCommand:m,CognitoIdentityClient:P}=await import("./loadCognitoIdentity-C6X581JO.js");return{GetIdCommand:m,CognitoIdentityClient:P}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])),y=m=>n?.[m]??a?.[m]??w?.callerClientConfig?.[m],p=o??new h(Object.assign({},n??{},{region:y("region"),profile:y("profile"),userAgentAppId:y("userAgentAppId")}));let C=f&&await t.getItem(f);if(!C){const{IdentityId:m=M(u)}=await p.send(new g({AccountId:e,IdentityPoolId:i,Logins:s?await k(s):void 0}));C=m,f&&Promise.resolve(t.setItem(f,C)).catch(()=>{})}return c=v({client:p,customRoleArn:r,logins:s,identityId:C}),c(w)};return w=>c(w).catch(async g=>{throw f&&Promise.resolve(t.removeItem(f)).catch(()=>{}),g})}function M(e){throw new d("Response from Amazon Cognito contained no identity ID",{logger:e})}const ee=e=>v({...e}),te=e=>$({...e}),W="169.254.170.2",z="169.254.170.23",F="[fd00:ec2::23]",U=(e,t)=>{if(e.protocol!=="https:"&&!(e.hostname===W||e.hostname===z||e.hostname===F)){if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const o=e.hostname.split("."),n=r=>{const i=parseInt(r,10);return 0<=i&&i<=255};if(o[0]==="127"&&n(o[1])&&n(o[2])&&n(o[3])&&o.length===4)return}throw new d(`URL not accepted. It must either be HTTPS or match one of the following:
3
+ - loopback CIDR 127.0.0.0/8 or [::1/128]
4
+ - ECS container host 169.254.170.2
5
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:t})}};function G(e){return new O({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[o,n])=>(t[o]=n,t),{}),fragment:e.hash})}async function B(e,t){const n=await N(e.body).transformToString();if(e.statusCode===200){const r=JSON.parse(n);if(typeof r.AccessKeyId!="string"||typeof r.SecretAccessKey!="string"||typeof r.Token!="string"||typeof r.Expiration!="string")throw new d("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.Token,expiration:R(r.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let r={};try{r=JSON.parse(n)}catch{}throw Object.assign(new d(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:r.Code,Message:r.Message})}throw new d(`Server responded with status: ${e.statusCode}`,{logger:t})}const V=(e,t,o)=>async()=>{for(let n=0;n<t;++n)try{return await e()}catch{await new Promise(i=>setTimeout(i,o))}return await e()},ne=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t;const o=e.credentialsFullUri;if(o)t=o;else throw new d("No HTTP credential provider host provided.",{logger:e.logger});const n=new URL(t);U(n,e.logger);const r=new E;return V(async()=>{const i=G(n);e.authorizationToken&&(i.headers.Authorization=e.authorizationToken);const s=await r.handle(i);return B(s.response)},e.maxRetries??3,e.timeout??1e3)},J="us-east-1",re=(e,t,o)=>{let n;return async(r={})=>{const{callerClientConfig:i}=r,s=e.clientConfig?.profile??i?.profile,l=e.logger??i?.logger;l?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const u={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(u?.SerialNumber){if(!e.mfaCodeProvider)throw new d("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:l});u.TokenCode=await e.mfaCodeProvider(u?.SerialNumber)}const{AssumeRoleCommand:a,STSClient:f}=await S(async()=>{const{AssumeRoleCommand:w,STSClient:g}=await import("./loadSts-BLVzhgX4.js");return{AssumeRoleCommand:w,STSClient:g}},__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,11,12,16,17,14]));if(!n){const w=typeof t=="function"?t():void 0,g=[e.masterCredentials,e.clientConfig?.credentials,void i?.credentials,i?.credentialDefaultProvider?.(),w];let h="STS client default credentials";if(g[0])h="options.masterCredentials";else if(g[1])h="options.clientConfig.credentials";else{if(g[2])throw h="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");g[3]?h="caller client's credentialDefaultProvider":g[4]&&(h="AWS SDK default credentials")}const y=[e.clientConfig?.region,i?.region,await o?.({profile:s}),J];let p="default partition's default region";y[0]?p="options.clientConfig.region":y[1]?p="caller client's region":y[2]&&(p="file or env region");const C=[T(e.clientConfig?.requestHandler),T(i?.requestHandler)];let m="STS default requestHandler";C[0]?m="options.clientConfig.requestHandler":C[1]&&(m="caller client's requestHandler"),l?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${p}=${await _(I(y))()}, ${h}, ${m}.`),n=new f({userAgentAppId:i?.userAgentAppId,...e.clientConfig,credentials:I(g),logger:l,profile:s,region:I(y),requestHandler:I(C)})}if(e.clientPlugins)for(const w of e.clientPlugins)n.middlewareStack.use(w);const{Credentials:c}=await n.send(new a(u));if(!c||!c.AccessKeyId||!c.SecretAccessKey)throw new d(`Invalid response from STS.assumeRole call with role ${u.RoleArn}`,{logger:l});return{accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.SessionToken,expiration:c.Expiration,credentialScope:c.CredentialScope}}},T=e=>e?.metadata?.handlerProtocol==="h2"?void 0:e,I=e=>{for(const t of e)if(t!==void 0)return t},Y=e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:n,webIdentityToken:r,providerId:i,policyArns:s,policy:l,durationSeconds:u}=e;let{roleAssumerWithWebIdentity:a}=e;if(!a){const{getDefaultRoleAssumerWithWebIdentity:f}=await S(async()=>{const{getDefaultRoleAssumerWithWebIdentity:c}=await import("./index-DGSGqHDe.js");return{getDefaultRoleAssumerWithWebIdentity:c}},__vite__mapDeps([18,1,2,3,4,5,6,7,8,9,10,11,12,16,17,14]));a=f({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return a({RoleArn:o,RoleSessionName:n??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:r,ProviderId:i,PolicyArns:s,Policy:l,DurationSeconds:u})},oe=e=>Y({...e});export{ee as fromCognitoIdentity,te as fromCognitoIdentityPool,ne as fromHttp,re as fromTemporaryCredentials,oe as fromWebToken};
@@ -0,0 +1 @@
1
+ function g(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var p={exports:{}},e=p.exports={},r,n;function f(){throw new Error("setTimeout has not been defined")}function h(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?r=setTimeout:r=f}catch{r=f}try{typeof clearTimeout=="function"?n=clearTimeout:n=h}catch{n=h}})();function m(t){if(r===setTimeout)return setTimeout(t,0);if((r===f||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch{try{return r.call(null,t,0)}catch{return r.call(this,t,0)}}}function y(t){if(n===clearTimeout)return clearTimeout(t);if((n===h||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch{try{return n.call(null,t)}catch{return n.call(this,t)}}}var o=[],s=!1,c,l=-1;function v(){!s||!c||(s=!1,c.length?o=c.concat(o):l=-1,o.length&&d())}function d(){if(!s){var t=m(v);s=!0;for(var i=o.length;i;){for(c=o,o=[];++l<i;)c&&c[l].run();l=-1,i=o.length}c=null,s=!1,y(t)}}e.nextTick=function(t){var i=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)i[a-1]=arguments[a];o.push(new T(t,i)),o.length===1&&!s&&m(d)};function T(t,i){this.fun=t,this.array=i}T.prototype.run=function(){this.fun.apply(null,this.array)};e.title="browser";e.browser=!0;e.env={};e.argv=[];e.version="";e.versions={};function u(){}e.on=u;e.addListener=u;e.once=u;e.off=u;e.removeListener=u;e.removeAllListeners=u;e.emit=u;e.prependListener=u;e.prependOnceListener=u;e.listeners=function(t){return[]};e.binding=function(t){throw new Error("process.binding is not supported")};e.cwd=function(){return"/"};e.chdir=function(t){throw new Error("process.chdir is not supported")};e.umask=function(){return 0};var w=p.exports;const b=g(w),_=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{_ as i,b as p};
@@ -0,0 +1 @@
1
+ import{r as he,n as Q,h as Se,i as Ee,e as ye,f as ee,E as Ie,j as Pe,p as ve,k as xe,A as we,l as Ae,m as Ce,D as be,o as Re,q as ke,s as De,t as _e,u as Fe,w as Oe,x as $e,y as Ue,z as Ge,B as Te,C as Me,F as He,G as Le,I as Ne,J as ze,K as je,M as We,O as Be,Q as qe,R as Ke,V as Ve,W as Je,X as Ze,Y as Xe,Z as Ye,_ as Qe,$ as et,a0 as tt,a1 as ot,a2 as st,T as p,a3 as te,a4 as oe}from"./index-_duzuPdC.js";import{t as it,f as nt,a as rt,c as at,s as ct,F as ut}from"./normalizeProvider-Cd9_AiS_.js";import{A as pt}from"./AwsJson1_1Protocol-BPKAibNb.js";import{N as dt}from"./noAuth-Cp7LDRaC.js";import"./preload-helper-BlTxHScW.js";import"./index-Bxvbin5N.js";import"./_commonjsHelpers-D6-XlEtG.js";import"node:fs/promises";import"node:path";import"crypto";import"node:assert";import"./index-CDKpgEyj-tyrSWl01.js";import"./index.browser-yI_W1hK0-C1Oinehc.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"fs/promises";import"path";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./_commonjs-dynamic-modules-B90KZyeo-MqqgM5Sj.js";import"fs";import"./_commonjs-dynamic-modules-D244begT.js";const lt=async(e,t,s)=>({operation:Se(t).operation,region:await Q(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function gt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function A(e){return{schemeId:"smithy.api#noAuth"}}const ft=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":{t.push(A());break}case"GetId":{t.push(A());break}case"GetOpenIdToken":{t.push(A());break}case"UnlinkIdentity":{t.push(A());break}default:t.push(gt(e))}return t},mt=e=>{const t=he(e);return Object.assign(t,{authSchemePreference:Q(e.authSchemePreference??[])})},ht=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),se={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},St="3.974.0",Et={version:St},ie=(e,t=!1)=>{if(t){for(const s of e.split("."))if(!ie(s))return!1;return!0}return!(!Ee(e)||e.length<3||e.length>63||e!==e.toLowerCase()||ye(e))},z=":",yt="/",It=e=>{const t=e.split(z);if(t.length<6)return null;const[s,i,r,g,E,...y]=t;if(s!=="arn"||i===""||r===""||y.join(z)==="")return null;const C=y.map(b=>b.split(yt)).flat();return{partition:i,service:r,region:g,accountId:E,resourceId:C}},Pt=[{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|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"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)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws 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)"},"mx-central-1":{description:"Mexico (Central)"},"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-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],vt={partitions:Pt};let xt=vt;const wt=e=>{const{partitions:t}=xt;for(const i of t){const{regions:r,outputs:g}=i;for(const[E,y]of Object.entries(r))if(E===e)return{...g,...y}}for(const i of t){const{regionRegex:r,outputs:g}=i;if(new RegExp(r).test(e))return{...g}}const s=t.find(i=>i.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},ne={isVirtualHostableS3Bucket:ie,parseArn:It,partition:wt};ee.aws=ne;const re="required",a="fn",c="argv",P="ref",j=!0,W="isSet",w="booleanEquals",I="error",f="endpoint",S="tree",R="PartitionResult",k="getAttr",v="stringEquals",B={[re]:!1,type:"string"},q={[re]:!0,default:!1,type:"boolean"},K={[P]:"Endpoint"},ae={[a]:w,[c]:[{[P]:"UseFIPS"},!0]},ce={[a]:w,[c]:[{[P]:"UseDualStack"},!0]},n={},x={[P]:"Region"},V={[a]:k,[c]:[{[P]:R},"supportsFIPS"]},ue={[P]:R},J={[a]:w,[c]:[!0,{[a]:k,[c]:[ue,"supportsDualStack"]}]},Z=[ae],X=[ce],Y=[x],At={parameters:{Region:B,UseDualStack:q,UseFIPS:q,Endpoint:B},rules:[{conditions:[{[a]:W,[c]:[K]}],rules:[{conditions:Z,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:I},{conditions:X,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:I},{endpoint:{url:K,properties:n,headers:n},type:f}],type:S},{conditions:[{[a]:W,[c]:Y}],rules:[{conditions:[{[a]:"aws.partition",[c]:Y,assign:R}],rules:[{conditions:[ae,ce],rules:[{conditions:[{[a]:w,[c]:[j,V]},J],rules:[{conditions:[{[a]:v,[c]:[x,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:n,headers:n},type:f},{conditions:[{[a]:v,[c]:[x,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:n,headers:n},type:f},{conditions:[{[a]:v,[c]:[x,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:n,headers:n},type:f},{conditions:[{[a]:v,[c]:[x,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:n,headers:n},type:f},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:f}],type:S},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:I}],type:S},{conditions:Z,rules:[{conditions:[{[a]:w,[c]:[V,j]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:f}],type:S},{error:"FIPS is enabled but this partition does not support FIPS",type:I}],type:S},{conditions:X,rules:[{conditions:[J],rules:[{conditions:[{[a]:v,[c]:["aws",{[a]:k,[c]:[ue,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:n,headers:n},type:f},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:f}],type:S},{error:"DualStack is enabled but this partition does not support DualStack",type:I}],type:S},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:f}],type:S}],type:S},{error:"Invalid Configuration: Missing Region",type:I}]},Ct=At,bt=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Rt=(e,t={})=>bt.get(e,()=>Pe(Ct,{endpointParams:e,logger:t.logger}));ee.aws=ne;const kt=e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??at,base64Encoder:e?.base64Encoder??rt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Rt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ft,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new we},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new dt}],logger:e?.logger??new xe,protocol:e?.protocol??pt,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??ve,utf8Decoder:e?.utf8Decoder??nt,utf8Encoder:e?.utf8Encoder??it}),Dt=e=>{const t=Ae(e),s=()=>t().then($e),i=kt(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??_e,credentialDefaultProvider:e?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??De({serviceId:i.serviceId,clientVersion:Et.version}),maxAttempts:e?.maxAttempts??ke,region:e?.region??Re("Region is missing"),requestHandler:ut.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||be),sha256:e?.sha256??Ce,streamCollector:e?.streamCollector??ct,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Oe)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Fe))}},_t=e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(r){const g=t.findIndex(E=>E.schemeId===r.schemeId);g===-1?t.push(r):t.splice(g,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){s=r},httpAuthSchemeProvider(){return s},setCredentials(r){i=r},credentials(){return i}}},Ft=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Ot=(e,t)=>{const s=Object.assign(Ue(e),Ge(e),Te(e),_t(e));return t.forEach(i=>i.configure(s)),Object.assign(e,Me(s),He(s),Le(s),Ft(s))};class Zo extends Ne{config;constructor(...[t]){const s=Dt(t||{});super(s),this.initConfig=s;const i=ht(s),r=ze(i),g=je(r),E=We(g),y=tt(E),C=Be(y),b=mt(C),fe=Ot(b,t?.extensions||[]);this.config=fe,this.middlewareStack.use(qe(this.config)),this.middlewareStack.use(Ke(this.config)),this.middlewareStack.use(Ve(this.config)),this.middlewareStack.use(Je(this.config)),this.middlewareStack.use(Ze(this.config)),this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(Ye(this.config)),this.middlewareStack.use(Qe(this.config,{httpAuthSchemeParametersProvider:lt,identityProviderConfigProvider:async me=>new ot({"aws.auth#sigv4":me.credentials})})),this.middlewareStack.use(et(this.config))}destroy(){super.destroy()}}class u extends st{constructor(t){super(t),Object.setPrototypeOf(this,u.prototype)}}class D extends u{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,D.prototype)}}class _ extends u{name="InvalidParameterException";$fault="client";constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,_.prototype)}}class F extends u{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,F.prototype)}}class O extends u{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,O.prototype)}}class $ extends u{name="ResourceConflictException";$fault="client";constructor(t){super({name:"ResourceConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,$.prototype)}}class U extends u{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,U.prototype)}}class G extends u{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,G.prototype)}}class T extends u{name="ExternalServiceException";$fault="client";constructor(t){super({name:"ExternalServiceException",$fault:"client",...t}),Object.setPrototypeOf(this,T.prototype)}}class M extends u{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,M.prototype)}}class H extends u{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(t){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...t}),Object.setPrototypeOf(this,H.prototype)}}class L extends u{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,L.prototype)}}const $t="AccountId",Ut="AccessKeyId",pe="Credentials",Gt="ConcurrentModificationException",Tt="CustomRoleArn",Mt="DeveloperUserAlreadyRegisteredException",Ht="Expiration",Lt="ExternalServiceException",Nt="GetCredentialsForIdentity",zt="GetCredentialsForIdentityInput",jt="GetCredentialsForIdentityResponse",Wt="GetId",Bt="GetIdInput",qt="GetIdResponse",Kt="InternalErrorException",N="IdentityId",Vt="InvalidIdentityPoolConfigurationException",Jt="InvalidParameterException",Zt="IdentityPoolId",Xt="IdentityProviderToken",de="Logins",Yt="LimitExceededException",Qt="LoginsMap",eo="NotAuthorizedException",to="ResourceConflictException",oo="ResourceNotFoundException",so="SecretKey",io="SecretKeyString",no="SessionToken",ro="TooManyRequestsException",m="client",d="error",h="httpError",l="message",ao="server",le="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",o="com.amazonaws.cognitoidentity";var co=[0,o,Xt,8,0],uo=[0,o,io,8,0],po=[-3,o,Gt,{[d]:m,[h]:400},[l],[0]];p.for(o).registerError(po,L);var lo=[3,o,pe,0,[Ut,so,no,Ht],[0,[()=>uo,0],0,4]],go=[-3,o,Mt,{[d]:m,[h]:400},[l],[0]];p.for(o).registerError(go,H);var fo=[-3,o,Lt,{[d]:m,[h]:400},[l],[0]];p.for(o).registerError(fo,T);var mo=[3,o,zt,0,[N,de,Tt],[0,[()=>ge,0],0],1],ho=[3,o,jt,0,[N,pe],[0,[()=>lo,0]]],So=[3,o,Bt,0,[Zt,$t,de],[0,0,[()=>ge,0]],1],Eo=[3,o,qt,0,[N],[0]],yo=[-3,o,Kt,{[d]:ao},[l],[0]];p.for(o).registerError(yo,D);var Io=[-3,o,Vt,{[d]:m,[h]:400},[l],[0]];p.for(o).registerError(Io,M);var Po=[-3,o,Jt,{[d]:m,[h]:400},[l],[0]];p.for(o).registerError(Po,_);var vo=[-3,o,Yt,{[d]:m,[h]:400},[l],[0]];p.for(o).registerError(vo,F);var xo=[-3,o,eo,{[d]:m,[h]:403},[l],[0]];p.for(o).registerError(xo,O);var wo=[-3,o,to,{[d]:m,[h]:409},[l],[0]];p.for(o).registerError(wo,$);var Ao=[-3,o,oo,{[d]:m,[h]:404},[l],[0]];p.for(o).registerError(Ao,G);var Co=[-3,o,ro,{[d]:m,[h]:429},[l],[0]];p.for(o).registerError(Co,U);var bo=[-3,le,"CognitoIdentityServiceException",0,[],[]];p.for(le).registerError(bo,u);var ge=[2,o,Qt,0,[0,0],[()=>co,0]],Ro=[9,o,Nt,0,()=>mo,()=>ho],ko=[9,o,Wt,0,()=>So,()=>Eo];class Xo extends te.classBuilder().ep(se).m(function(t,s,i,r){return[oe(i,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Ro).build(){}class Yo extends te.classBuilder().ep(se).m(function(t,s,i,r){return[oe(i,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(ko).build(){}export{Zo as CognitoIdentityClient,Xo as GetCredentialsForIdentityCommand,Yo as GetIdCommand};
@@ -0,0 +1 @@
1
+ import{r as Pe,n as X,h as Ee,i as we,e as ve,f as Y,E as Ae,j as xe,p as ye,k as Re,A as Ie,l as be,m as De,D as Ce,o as Te,q as _e,s as ke,t as Ue,u as Oe,w as $e,x as Fe,y as He,z as Le,B as Me,C as je,F as Ne,G as Ge,I as ze,J as We,K as Ke,M as Ve,O as Be,Q as qe,R as Qe,V as Je,W as Ze,X as Xe,Y as Ye,Z as et,_ as tt,$ as st,a0 as ot,a1 as it,a2 as nt,T as P,a3 as rt,a4 as at}from"./index-_duzuPdC.js";import{A as ct}from"./AwsQueryProtocol-gcsdfhfo.js";import{t as ut,f as pt,a as dt,c as lt,s as gt,F as mt}from"./normalizeProvider-Cd9_AiS_.js";import{N as ft}from"./noAuth-Cp7LDRaC.js";import"./preload-helper-BlTxHScW.js";import"./index-Bxvbin5N.js";import"./_commonjsHelpers-D6-XlEtG.js";import"node:fs/promises";import"node:path";import"crypto";import"node:assert";import"./index-CDKpgEyj-tyrSWl01.js";import"./index.browser-yI_W1hK0-C1Oinehc.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"fs/promises";import"path";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./_commonjs-dynamic-modules-B90KZyeo-MqqgM5Sj.js";import"fs";import"./_commonjs-dynamic-modules-D244begT.js";import"./XmlShapeDeserializer-yfMUWnPw.js";const ht=async(e,t,n)=>({operation:Ee(t).operation,region:await X(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function St(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function Pt(e){return{schemeId:"smithy.api#noAuth"}}const Et=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(Pt());break}default:t.push(St(e))}return t},wt=e=>Object.assign(e,{stsClientCtor:Nt}),vt=e=>{const t=wt(e),n=Pe(t);return Object.assign(n,{authSchemePreference:X(e.authSchemePreference??[])})},At=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),xt={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},yt="3.975.0",Rt={version:yt},ee=(e,t=!1)=>{if(t){for(const n of e.split("."))if(!ee(n))return!1;return!0}return!(!we(e)||e.length<3||e.length>63||e!==e.toLowerCase()||ve(e))},j=":",It="/",bt=e=>{const t=e.split(j);if(t.length<6)return null;const[n,c,u,m,w,...I]=t;if(n!=="arn"||c===""||u===""||I.join(j)==="")return null;const D=I.map(C=>C.split(It)).flat();return{partition:c,service:u,region:m,accountId:w,resourceId:D}},Dt=[{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|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"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)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws 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)"},"mx-central-1":{description:"Mexico (Central)"},"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-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Ct={partitions:Dt};let Tt=Ct;const _t=e=>{const{partitions:t}=Tt;for(const c of t){const{regions:u,outputs:m}=c;for(const[w,I]of Object.entries(u))if(w===e)return{...m,...I}}for(const c of t){const{regionRegex:u,outputs:m}=c;if(new RegExp(u).test(e))return{...m}}const n=t.find(c=>c.id==="aws");if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},te={isVirtualHostableS3Bucket:ee,parseArn:bt,partition:_t};Y.aws=te;const se="required",s="type",o="fn",i="argv",E="ref",N=!1,T=!0,S="booleanEquals",p="stringEquals",oe="sigv4",ie="sts",ne="us-east-1",a="endpoint",G="https://sts.{Region}.{PartitionResult#dnsSuffix}",f="tree",b="error",k="getAttr",z={[se]:!1,[s]:"string"},_={[se]:!0,default:!1,[s]:"boolean"},re={[E]:"Endpoint"},W={[o]:"isSet",[i]:[{[E]:"Region"}]},d={[E]:"Region"},K={[o]:"aws.partition",[i]:[d],assign:"PartitionResult"},ae={[E]:"UseFIPS"},ce={[E]:"UseDualStack"},l={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:oe,signingName:ie,signingRegion:ne}]},headers:{}},g={},V={conditions:[{[o]:p,[i]:[d,"aws-global"]}],[a]:l,[s]:a},ue={[o]:S,[i]:[ae,!0]},pe={[o]:S,[i]:[ce,!0]},B={[o]:k,[i]:[{[E]:"PartitionResult"},"supportsFIPS"]},de={[E]:"PartitionResult"},q={[o]:S,[i]:[!0,{[o]:k,[i]:[de,"supportsDualStack"]}]},Q=[{[o]:"isSet",[i]:[re]}],J=[ue],Z=[pe],kt={parameters:{Region:z,UseDualStack:_,UseFIPS:_,Endpoint:z,UseGlobalEndpoint:_},rules:[{conditions:[{[o]:S,[i]:[{[E]:"UseGlobalEndpoint"},T]},{[o]:"not",[i]:Q},W,K,{[o]:S,[i]:[ae,N]},{[o]:S,[i]:[ce,N]}],rules:[{conditions:[{[o]:p,[i]:[d,"ap-northeast-1"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"ap-south-1"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"ap-southeast-1"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"ap-southeast-2"]}],endpoint:l,[s]:a},V,{conditions:[{[o]:p,[i]:[d,"ca-central-1"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"eu-central-1"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"eu-north-1"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"eu-west-1"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"eu-west-2"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"eu-west-3"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"sa-east-1"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,ne]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"us-east-2"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"us-west-1"]}],endpoint:l,[s]:a},{conditions:[{[o]:p,[i]:[d,"us-west-2"]}],endpoint:l,[s]:a},{endpoint:{url:G,properties:{authSchemes:[{name:oe,signingName:ie,signingRegion:"{Region}"}]},headers:g},[s]:a}],[s]:f},{conditions:Q,rules:[{conditions:J,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[s]:b},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[s]:b},{endpoint:{url:re,properties:g,headers:g},[s]:a}],[s]:f},{conditions:[W],rules:[{conditions:[K],rules:[{conditions:[ue,pe],rules:[{conditions:[{[o]:S,[i]:[T,B]},q],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},[s]:a}],[s]:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[s]:b}],[s]:f},{conditions:J,rules:[{conditions:[{[o]:S,[i]:[B,T]}],rules:[{conditions:[{[o]:p,[i]:[{[o]:k,[i]:[de,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:g,headers:g},[s]:a},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:g,headers:g},[s]:a}],[s]:f},{error:"FIPS is enabled but this partition does not support FIPS",[s]:b}],[s]:f},{conditions:Z,rules:[{conditions:[q],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},[s]:a}],[s]:f},{error:"DualStack is enabled but this partition does not support DualStack",[s]:b}],[s]:f},V,{endpoint:{url:G,properties:g,headers:g},[s]:a}],[s]:f}],[s]:f},{error:"Invalid Configuration: Missing Region",[s]:b}]},Ut=kt,Ot=new Ae({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),$t=(e,t={})=>Ot.get(e,()=>xe(Ut,{endpointParams:e,logger:t.logger}));Y.aws=te;const Ft=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??lt,base64Encoder:e?.base64Encoder??dt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??$t,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Et,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Ie},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ft}],logger:e?.logger??new Re,protocol:e?.protocol??ct,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??ye,utf8Decoder:e?.utf8Decoder??pt,utf8Encoder:e?.utf8Encoder??ut}),Ht=e=>{const t=be(e),n=()=>t().then(Fe),c=Ft(e);return{...c,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ue,credentialDefaultProvider:e?.credentialDefaultProvider??(u=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ke({serviceId:c.serviceId,clientVersion:Rt.version}),maxAttempts:e?.maxAttempts??_e,region:e?.region??Te("Region is missing"),requestHandler:mt.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Ce),sha256:e?.sha256??De,streamCollector:e?.streamCollector??gt,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve($e)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Oe))}},Lt=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,c=e.credentials;return{setHttpAuthScheme(u){const m=t.findIndex(w=>w.schemeId===u.schemeId);m===-1?t.push(u):t.splice(m,1,u)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(u){n=u},httpAuthSchemeProvider(){return n},setCredentials(u){c=u},credentials(){return c}}},Mt=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),jt=(e,t)=>{const n=Object.assign(He(e),Le(e),Me(e),Lt(e));return t.forEach(c=>c.configure(n)),Object.assign(e,je(n),Ne(n),Ge(n),Mt(n))};class Nt extends ze{config;constructor(...[t]){const n=Ht(t||{});super(n),this.initConfig=n;const c=At(n),u=We(c),m=Ke(u),w=Ve(m),I=ot(w),D=Be(I),C=vt(D),he=jt(C,t?.extensions||[]);this.config=he,this.middlewareStack.use(qe(this.config)),this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Je(this.config)),this.middlewareStack.use(Ze(this.config)),this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(Ye(this.config)),this.middlewareStack.use(et(this.config)),this.middlewareStack.use(tt(this.config,{httpAuthSchemeParametersProvider:ht,identityProviderConfigProvider:async Se=>new it({"aws.auth#sigv4":Se.credentials})})),this.middlewareStack.use(st(this.config))}destroy(){super.destroy()}}class h extends nt{constructor(t){super(t),Object.setPrototypeOf(this,h.prototype)}}class U extends h{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,U.prototype)}}class O extends h{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,O.prototype)}}class $ extends h{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,$.prototype)}}class F extends h{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,F.prototype)}}class H extends h{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,H.prototype)}}class L extends h{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,L.prototype)}}class M extends h{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,M.prototype)}}const Gt="Arn",zt="AccessKeyId",Wt="AssumeRole",Kt="AssumedRoleId",Vt="AssumeRoleRequest",Bt="AssumeRoleResponse",le="AssumedRoleUser",ge="Credentials",qt="ContextAssertion",Qt="DurationSeconds",Jt="Expiration",Zt="ExternalId",Xt="ExpiredTokenException",Yt="IDPCommunicationErrorException",es="IDPRejectedClaimException",ts="InvalidIdentityTokenException",ss="Key",os="MalformedPolicyDocumentException",is="Policy",ns="PolicyArns",rs="ProviderArn",as="ProvidedContexts",cs="ProvidedContextsListType",us="ProvidedContext",ps="PolicyDescriptorType",ds="PackedPolicySize",ls="PackedPolicyTooLargeException",gs="RoleArn",ms="RegionDisabledException",fs="RoleSessionName",hs="SecretAccessKey",me="SourceIdentity",Ss="SerialNumber",Ps="SessionToken",Es="Tags",ws="TokenCode",vs="TransitiveTagKeys",As="Tag",xs="Value",ys="arn",Rs="accessKeySecretType",v="awsQueryError",A="client",x="error",y="httpError",R="message",Is="policyDescriptorListType",fe="smithy.ts.sdk.synthetic.com.amazonaws.sts",bs="tagListType",r="com.amazonaws.sts";var Ds=[0,r,Rs,8,0],Cs=[3,r,le,0,[Kt,Gt],[0,0],2],Ts=[3,r,Vt,0,[gs,fs,ns,is,Qt,Es,vs,Zt,Ss,ws,me,as],[0,0,()=>Ws,0,1,()=>Vs,64,0,0,0,0,()=>Ks],2],_s=[3,r,Bt,0,[ge,le,ds,me],[[()=>ks,0],()=>Cs,1,0]],ks=[3,r,ge,0,[zt,hs,Ps,Jt],[0,[()=>Ds,0],0,4],4],Us=[-3,r,Xt,{[v]:["ExpiredTokenException",400],[x]:A,[y]:400},[R],[0]];P.for(r).registerError(Us,U);var Os=[-3,r,Yt,{[v]:["IDPCommunicationError",400],[x]:A,[y]:400},[R],[0]];P.for(r).registerError(Os,M);var $s=[-3,r,es,{[v]:["IDPRejectedClaim",403],[x]:A,[y]:403},[R],[0]];P.for(r).registerError($s,H);var Fs=[-3,r,ts,{[v]:["InvalidIdentityToken",400],[x]:A,[y]:400},[R],[0]];P.for(r).registerError(Fs,L);var Hs=[-3,r,os,{[v]:["MalformedPolicyDocument",400],[x]:A,[y]:400},[R],[0]];P.for(r).registerError(Hs,O);var Ls=[-3,r,ls,{[v]:["PackedPolicyTooLarge",400],[x]:A,[y]:400},[R],[0]];P.for(r).registerError(Ls,$);var Ms=[3,r,ps,0,[ys],[0]],js=[3,r,us,0,[rs,qt],[0,0]],Ns=[-3,r,ms,{[v]:["RegionDisabledException",403],[x]:A,[y]:403},[R],[0]];P.for(r).registerError(Ns,F);var Gs=[3,r,As,0,[ss,xs],[0,0],2],zs=[-3,fe,"STSServiceException",0,[],[]];P.for(fe).registerError(zs,h);var Ws=[1,r,Is,0,()=>Ms],Ks=[1,r,cs,0,()=>js],Vs=[1,r,bs,0,()=>Gs],Bs=[9,r,Wt,0,()=>Ts,()=>_s];class ho extends rt.classBuilder().ep(xt).m(function(t,n,c,u){return[at(c,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Bs).build(){}export{ho as AssumeRoleCommand,Nt as STSClient};
@@ -0,0 +1 @@
1
+ import{H as g,N as y,c as b}from"./index-_duzuPdC.js";import{H as z}from"./normalizeProvider-Cd9_AiS_.js";class q extends g{async serializeRequest(i,r,e){const s=this.serializer,n={},a={},d=await e.endpoint(),t=y.of(i?.input),m=t.getSchema();let f;const o=new z({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:n,headers:a,body:void 0});d&&(this.updateServiceEndpoint(o,d),this.setHostPrefix(o,i,r));const c={...r};if(r){const h=t.getEventStreamMember();if(h){if(c[h]){const u={};for(const[l,S]of t.structIterator())l!==h&&c[l]&&(s.write(S,c[l]),u[l]=s.flush());f=await this.serializeEventStream({eventStream:c[h],requestSchema:t,initialRequest:u})}}else s.write(m,c),f=s.flush()}return o.headers=a,o.query=n,o.body=f,o.method="POST",o}async deserializeResponse(i,r,e){const s=this.deserializer,n=y.of(i.output),a={};if(e.statusCode>=300){const t=await b(e.body,r);throw t.byteLength>0&&Object.assign(a,await s.read(15,t)),await this.handleError(i,r,e,a,this.deserializeMetadata(e)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const t in e.headers){const m=e.headers[t];delete e.headers[t],e.headers[t.toLowerCase()]=m}const d=n.getEventStreamMember();if(d)a[d]=await this.deserializeEventStream({response:e,responseSchema:n,initialResponseContainer:a});else{const t=await b(e.body,r);t.byteLength>0&&Object.assign(a,await s.read(n,t))}return a.$metadata=this.deserializeMetadata(e),a}}class R{async sign(i,r,e){return i}}export{R as N,q as R};
@@ -1,3 +1,3 @@
1
1
  class U{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const r=new U({...t,headers:{...t.headers}});return r.query&&(r.query=V(r.query)),r}static isInstance(t){if(!t)return!1;const r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return U.clone(this)}}function V(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class B{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const M=e=>encodeURIComponent(e).replace(/[!'()*]/g,X),X=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function z(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=M(r),Array.isArray(n))for(let o=0,i=n.length;o<i;o++)t.push(`${r}=${M(n[o])}`);else{let o=r;(n||typeof n=="string")&&(o+=`=${M(n)}`),t.push(o)}}return t.join("&")}function P(e,t){return new Request(e,t)}function Z(e=0){return new Promise((t,r)=>{e&&setTimeout(()=>{const n=new Error(`Request did not complete within ${e} ms`);n.name="TimeoutError",r(n)},e)})}const I={supported:void 0};class J{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new J(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),I.supported===void 0&&(I.supported=typeof Request<"u"&&"keepalive"in P("https://[::1]"))}destroy(){}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const o=n??this.config.requestTimeout,i=this.config.keepAlive===!0,c=this.config.credentials;if(r?.aborted){const u=new Error("Request aborted");return u.name="AbortError",Promise.reject(u)}let a=t.path;const d=z(t.query||{});d&&(a+=`?${d}`),t.fragment&&(a+=`#${t.fragment}`);let s="";if(t.username!=null||t.password!=null){const u=t.username??"",T=t.password??"";s=`${u}:${T}@`}const{port:f,method:y}=t,w=`${t.protocol}//${s}${t.hostname}${f?`:${f}`:""}${a}`,C=y==="GET"||y==="HEAD"?void 0:t.body,h={body:C,headers:new Headers(t.headers),method:y,credentials:c};this.config?.cache&&(h.cache=this.config.cache),C&&(h.duplex="half"),typeof AbortController<"u"&&(h.signal=r),I.supported&&(h.keepalive=i),typeof this.config.requestInit=="function"&&Object.assign(h,this.config.requestInit(t));let O=()=>{};const G=P(w,h),L=[fetch(G).then(u=>{const T=u.headers,g={};for(const x of T.entries())g[x[0]]=x[1];return u.body!=null?{response:new B({headers:g,reason:u.statusText,statusCode:u.status,body:u.body})}:u.blob().then(x=>({response:new B({headers:g,reason:u.statusText,statusCode:u.status,body:x})}))}),Z(o)];return r&&L.push(new Promise((u,T)=>{const g=()=>{const m=new Error("Request aborted");m.name="AbortError",T(m)};if(typeof r.addEventListener=="function"){const m=r;m.addEventListener("abort",g,{once:!0}),O=()=>m.removeEventListener("abort",g)}else r.onabort=g})),Promise.race(L).finally(O)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}}const Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k=Object.entries(Y).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),Q=Y.split(""),p=6,E=8,K=63,v=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const r=new ArrayBuffer(t),n=new DataView(r);for(let o=0;o<e.length;o+=4){let i=0,c=0;for(let s=o,f=o+3;s<=f;s++)if(e[s]!=="="){if(!(e[s]in k))throw new TypeError(`Invalid character ${e[s]} in base64 string.`);i|=k[e[s]]<<(f-s)*p,c+=p}else i>>=p;const a=o/4*3;i>>=c%E;const d=Math.floor(c/E);for(let s=0;s<d;s++){const f=(d-s-1)*E;n.setUint8(a+s,(i&255<<f)>>f)}}return new Uint8Array(r)},ee=e=>new TextEncoder().encode(e),Me=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function Ie(e){let t;typeof e=="string"?t=ee(e):t=e;const r=typeof t=="object"&&typeof t.length=="number",n=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let o="";for(let i=0;i<t.length;i+=3){let c=0,a=0;for(let s=i,f=Math.min(i+3,t.length);s<f;s++)c|=t[s]<<(f-s-1)*E,a+=E;const d=Math.ceil(a/p);c<<=d*p-a;for(let s=1;s<=d;s++){const f=(d-s)*p;o+=Q[(c&K<<f)>>f]}o+="==".slice(0,4-d)}return o}const Re=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):te(e):re(e);async function te(e){const t=await ne(e),r=v(t);return new Uint8Array(r)}async function re(e){const t=[],r=e.getReader();let n=!1,o=0;for(;!n;){const{done:a,value:d}=await r.read();d&&(t.push(d),o+=d.length),n=a}const i=new Uint8Array(o);let c=0;for(const a of t)i.set(a,c),c+=a.length;return i}function ne(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const o=n.result??"",i=o.indexOf(","),c=i>-1?i+1:o.length;t(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}const W={},D={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),W[e]=t,D[t]=e}function Ue(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(n in D)t[r/2]=D[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function De(e){let t="";for(let r=0;r<e.byteLength;r++)t+=W[e[r]];return t}const F=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&he.warn(ue(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},oe=Math.ceil(2**127*(2-2**-23)),H=e=>{const t=F(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>oe)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},se=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},j=e=>q(e,16),_=e=>q(e,8),q=(e,t)=>{const r=se(e);if(r!==void 0&&ie(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},ie=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},ce=e=>F(typeof e=="string"?A(e):e),ae=e=>H(typeof e=="string"?A(e):e),de=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,A=e=>{const t=e.match(de);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},$=e=>j(typeof e=="string"?A(e):e),fe=e=>_(typeof e=="string"?A(e):e),ue=e=>String(new TypeError(e).stack||e).split(`
2
2
  `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
3
- `),he={warn:console.warn},le=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Fe(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),i=e.getUTCHours(),c=e.getUTCMinutes(),a=e.getUTCSeconds(),d=o<10?`0${o}`:`${o}`,s=i<10?`0${i}`:`${i}`,f=c<10?`0${c}`:`${c}`,y=a<10?`0${a}`:`${a}`;return`${le[n]}, ${d} ${N[r]} ${t} ${s}:${f}:${y} GMT`}const ye=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ne=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ye.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,i,c,a,d,s]=t,f=$(b(n)),y=l(o,"month",1,12),w=l(i,"day",1,31);return S(f,y,w,{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s})},ge=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Oe=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ge.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,i,c,a,d,s,f]=t,y=$(b(n)),w=l(o,"month",1,12),C=l(i,"day",1,31),h=S(y,w,C,{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s});return f.toUpperCase()!="Z"&&h.setTime(h.getTime()-Ae(f)),h},me=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$/),pe=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$/),be=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})$/),Le=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=me.exec(e);if(t){const[r,n,o,i,c,a,d,s]=t;return S($(b(i)),R(o),l(n,"day",1,31),{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s})}if(t=pe.exec(e),t){const[r,n,o,i,c,a,d,s]=t;return Ee(S(we(i),R(o),l(n,"day",1,31),{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s}))}if(t=be.exec(e),t){const[r,n,o,i,c,a,d,s]=t;return S($(b(s)),R(n),l(o.trimLeft(),"day",1,31),{hours:i,minutes:c,seconds:a,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},Be=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=ce(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},S=(e,t,r,n)=>{const o=t-1;return $e(e,o,r),new Date(Date.UTC(e,o,r,l(n.hours,"hour",0,23),l(n.minutes,"minute",0,59),l(n.seconds,"seconds",0,60),xe(n.fractionalMilliseconds)))},we=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+$(b(e));return r<t?r+100:r},Te=50*365*24*60*60*1e3,Ee=e=>e.getTime()-new Date().getTime()>Te?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,R=e=>{const t=N.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Se=[31,28,31,30,31,30,31,31,30,31,30,31],$e=(e,t,r)=>{let n=Se[t];if(t===1&&Ce(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${N[t]} in ${e}: ${r}`)},Ce=e=>e%4===0&&(e%100!==0||e%400===0),l=(e,t,r,n)=>{const o=fe(b(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},xe=e=>e==null?0:ae("0."+e)*1e3,Ae=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1e3},b=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},Pe=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t};export{J as F,U as H,De as a,Me as b,B as c,Be as d,Le as e,v as f,Oe as g,Fe as h,ee as i,Ue as j,M as k,Pe as n,Ne as p,Re as s,Ie as t};
3
+ `),he={warn:console.warn},le=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Fe(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),i=e.getUTCHours(),c=e.getUTCMinutes(),a=e.getUTCSeconds(),d=o<10?`0${o}`:`${o}`,s=i<10?`0${i}`:`${i}`,f=c<10?`0${c}`:`${c}`,y=a<10?`0${a}`:`${a}`;return`${le[n]}, ${d} ${N[r]} ${t} ${s}:${f}:${y} GMT`}const ye=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ne=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ye.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,i,c,a,d,s]=t,f=$(b(n)),y=l(o,"month",1,12),w=l(i,"day",1,31);return S(f,y,w,{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s})},ge=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Oe=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ge.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,i,c,a,d,s,f]=t,y=$(b(n)),w=l(o,"month",1,12),C=l(i,"day",1,31),h=S(y,w,C,{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s});return f.toUpperCase()!="Z"&&h.setTime(h.getTime()-Ae(f)),h},me=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$/),pe=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$/),be=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})$/),Le=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=me.exec(e);if(t){const[r,n,o,i,c,a,d,s]=t;return S($(b(i)),R(o),l(n,"day",1,31),{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s})}if(t=pe.exec(e),t){const[r,n,o,i,c,a,d,s]=t;return Ee(S(we(i),R(o),l(n,"day",1,31),{hours:c,minutes:a,seconds:d,fractionalMilliseconds:s}))}if(t=be.exec(e),t){const[r,n,o,i,c,a,d,s]=t;return S($(b(s)),R(n),l(o.trimLeft(),"day",1,31),{hours:i,minutes:c,seconds:a,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},Be=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=ce(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},S=(e,t,r,n)=>{const o=t-1;return $e(e,o,r),new Date(Date.UTC(e,o,r,l(n.hours,"hour",0,23),l(n.minutes,"minute",0,59),l(n.seconds,"seconds",0,60),xe(n.fractionalMilliseconds)))},we=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+$(b(e));return r<t?r+100:r},Te=50*365*24*60*60*1e3,Ee=e=>e.getTime()-new Date().getTime()>Te?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,R=e=>{const t=N.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Se=[31,28,31,30,31,30,31,31,30,31,30,31],$e=(e,t,r)=>{let n=Se[t];if(t===1&&Ce(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${N[t]} in ${e}: ${r}`)},Ce=e=>e%4===0&&(e%100!==0||e%400===0),l=(e,t,r,n)=>{const o=fe(b(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},xe=e=>e==null?0:ae("0."+e)*1e3,Ae=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1e3},b=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},Pe=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t};export{J as F,U as H,Ie as a,De as b,v as c,Fe as d,Le as e,ee as f,Oe as g,Ne as h,B as i,Ue as j,M as k,Pe as n,Be as p,Re as s,Me as t};