@agentlang/lstudio 0.2.3 → 0.2.5

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.
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DjgOAzh3.js","assets/normalizeProvider-EC8cbfMc.js"])))=>i.map(i=>d[i]);
2
- import{f as J,a as xt,d as It,t as _t,i as te,H as x,n as z,g as M,j as Ot,k as X}from"./normalizeProvider-EC8cbfMc.js";import{_ as Mt}from"./preload-helper-BlTxHScW.js";import{_ as Pt,j as kt}from"./index-KfLUFT2R.js";const $t=(t,e,r)=>{let s,n,i,a=!1;const c=async()=>{n||(n=t());try{s=await n,i=!0,a=!1}finally{n=void 0}return s};return async o=>((!i||o?.forceRefresh)&&(s=await c()),s)},Nn=t=>({setHttpHandler(e){t.httpHandler=e},httpHandler(){return t.httpHandler},updateHttpClientConfig(e,r){t.httpHandler?.updateHttpClientConfig(e,r)},httpHandlerConfigs(){return t.httpHandler.httpHandlerConfigs()}}),Dn=t=>({httpHandler:t.httpHandler()});var F;(function(t){t.HTTP="http",t.HTTPS="https"})(F||(F={}));var Z;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(Z||(Z={}));const ge="__smithy_context",j=t=>typeof t=="string"?J(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),O=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const s of e)r.push(s);return r},I=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,ee=()=>{let t=[],e=[],r=!1;const s=new Set,n=u=>u.sort((l,f)=>Ie[f.step]-Ie[l.step]||_e[f.priority||"normal"]-_e[l.priority||"normal"]),i=u=>{let l=!1;const f=m=>{const g=O(m.name,m.aliases);if(g.includes(u)){l=!0;for(const p of g)s.delete(p);return!1}return!0};return t=t.filter(f),e=e.filter(f),l},a=u=>{let l=!1;const f=m=>{if(m.middleware===u){l=!0;for(const g of O(m.name,m.aliases))s.delete(g);return!1}return!0};return t=t.filter(f),e=e.filter(f),l},c=u=>(t.forEach(l=>{u.add(l.middleware,{...l})}),e.forEach(l=>{u.addRelativeTo(l.middleware,{...l})}),u.identifyOnResolve?.(h.identifyOnResolve()),u),o=u=>{const l=[];return u.before.forEach(f=>{f.before.length===0&&f.after.length===0?l.push(f):l.push(...o(f))}),l.push(u),u.after.reverse().forEach(f=>{f.before.length===0&&f.after.length===0?l.push(f):l.push(...o(f))}),l},d=(u=!1)=>{const l=[],f=[],m={};return t.forEach(p=>{const y={...p,before:[],after:[]};for(const w of O(y.name,y.aliases))m[w]=y;l.push(y)}),e.forEach(p=>{const y={...p,before:[],after:[]};for(const w of O(y.name,y.aliases))m[w]=y;f.push(y)}),f.forEach(p=>{if(p.toMiddleware){const y=m[p.toMiddleware];if(y===void 0){if(u)return;throw new Error(`${p.toMiddleware} is not found when adding ${I(p.name,p.aliases)} middleware ${p.relation} ${p.toMiddleware}`)}p.relation==="after"&&y.after.push(p),p.relation==="before"&&y.before.push(p)}}),n(l).map(o).reduce((p,y)=>(p.push(...y),p),[])},h={add:(u,l={})=>{const{name:f,override:m,aliases:g}=l,p={step:"initialize",priority:"normal",middleware:u,...l},y=O(f,g);if(y.length>0){if(y.some(w=>s.has(w))){if(!m)throw new Error(`Duplicate middleware name '${I(f,g)}'`);for(const w of y){const T=t.findIndex(D=>D.name===w||D.aliases?.some(ne=>ne===w));if(T===-1)continue;const E=t[T];if(E.step!==p.step||p.priority!==E.priority)throw new Error(`"${I(E.name,E.aliases)}" middleware with ${E.priority} priority in ${E.step} step cannot be overridden by "${I(f,g)}" middleware with ${p.priority} priority in ${p.step} step.`);t.splice(T,1)}}for(const w of y)s.add(w)}t.push(p)},addRelativeTo:(u,l)=>{const{name:f,override:m,aliases:g}=l,p={middleware:u,...l},y=O(f,g);if(y.length>0){if(y.some(w=>s.has(w))){if(!m)throw new Error(`Duplicate middleware name '${I(f,g)}'`);for(const w of y){const T=e.findIndex(D=>D.name===w||D.aliases?.some(ne=>ne===w));if(T===-1)continue;const E=e[T];if(E.toMiddleware!==p.toMiddleware||E.relation!==p.relation)throw new Error(`"${I(E.name,E.aliases)}" middleware ${E.relation} "${E.toMiddleware}" middleware cannot be overridden by "${I(f,g)}" middleware ${p.relation} "${p.toMiddleware}" middleware.`);e.splice(T,1)}}for(const w of y)s.add(w)}e.push(p)},clone:()=>c(ee()),use:u=>{u.applyToStack(h)},remove:u=>typeof u=="string"?i(u):a(u),removeByTag:u=>{let l=!1;const f=m=>{const{tags:g,name:p,aliases:y}=m;if(g&&g.includes(u)){const w=O(p,y);for(const T of w)s.delete(T);return l=!0,!1}return!0};return t=t.filter(f),e=e.filter(f),l},concat:u=>{const l=c(ee());return l.use(u),l.identifyOnResolve(r||l.identifyOnResolve()||(u.identifyOnResolve?.()??!1)),l},applyToStack:c,identify:()=>d(!0).map(u=>{const l=u.step??u.relation+" "+u.toMiddleware;return I(u.name,u.aliases)+" - "+l}),identifyOnResolve(u){return typeof u=="boolean"&&(r=u),r},resolve:(u,l)=>{for(const f of d().map(m=>m.middleware).reverse())u=f(u,l);return r&&console.log(h.identify()),u}};return h},Ie={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},_e={high:3,normal:2,low:1};class Un{config;middlewareStack=ee();initConfig;handlers;constructor(e){this.config=e;const{protocol:r,protocolSettings:s}=e;s&&typeof r=="function"&&(e.protocol=new r(s))}send(e,r,s){const n=typeof r!="function"?r:void 0,i=typeof r=="function"?r:s,a=n===void 0&&this.config.cacheMiddleware===!0;let c;if(a){this.handlers||(this.handlers=new WeakMap);const o=this.handlers;o.has(e.constructor)?c=o.get(e.constructor):(c=e.resolveMiddleware(this.middlewareStack,this.config,n),o.set(e.constructor,c))}else delete this.handlers,c=e.resolveMiddleware(this.middlewareStack,this.config,n);if(i)c(e).then(o=>i(null,o.output),o=>i(o)).catch(()=>{});else return c(e).then(o=>o.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class P extends Uint8Array{static fromString(e,r="utf-8"){if(typeof e=="string")return r==="base64"?P.mutate(xt(e)):P.mutate(J(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,P.prototype),e}transformToString(e="utf-8"){return e==="base64"?It(this):_t(this)}}const Oe=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return P.mutate(t);if(!t)return P.mutate(new Uint8Array);const r=e.streamCollector(t);return P.mutate(await r)},ie=t=>typeof t=="function"?t():t,G=t=>t[ge]||(t[ge]={}),k=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Ze=(t,e,r,s,n)=>({name:e,namespace:t,traits:r,input:s,output:n}),Nt=t=>(e,r)=>async s=>{const{response:n}=await e(s),{operationSchema:i}=G(r),[,a,c,o,d,h]=i??[];try{const u=await t.protocol.deserializeResponse(Ze(a,c,o,d,h),{...t,...r},n);return{response:n,output:u}}catch(u){if(Object.defineProperty(u,"$response",{value:n,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in u)){const l="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{u.message+=`
2
+ import{f as J,a as xt,d as It,t as _t,i as te,H as x,n as z,g as M,j as Ot,k as X}from"./normalizeProvider-EC8cbfMc.js";import{_ as Mt}from"./preload-helper-BlTxHScW.js";import{_ as Pt,j as kt}from"./index-Cdypq0le.js";const $t=(t,e,r)=>{let s,n,i,a=!1;const c=async()=>{n||(n=t());try{s=await n,i=!0,a=!1}finally{n=void 0}return s};return async o=>((!i||o?.forceRefresh)&&(s=await c()),s)},Nn=t=>({setHttpHandler(e){t.httpHandler=e},httpHandler(){return t.httpHandler},updateHttpClientConfig(e,r){t.httpHandler?.updateHttpClientConfig(e,r)},httpHandlerConfigs(){return t.httpHandler.httpHandlerConfigs()}}),Dn=t=>({httpHandler:t.httpHandler()});var F;(function(t){t.HTTP="http",t.HTTPS="https"})(F||(F={}));var Z;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(Z||(Z={}));const ge="__smithy_context",j=t=>typeof t=="string"?J(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),O=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const s of e)r.push(s);return r},I=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,ee=()=>{let t=[],e=[],r=!1;const s=new Set,n=u=>u.sort((l,f)=>Ie[f.step]-Ie[l.step]||_e[f.priority||"normal"]-_e[l.priority||"normal"]),i=u=>{let l=!1;const f=m=>{const g=O(m.name,m.aliases);if(g.includes(u)){l=!0;for(const p of g)s.delete(p);return!1}return!0};return t=t.filter(f),e=e.filter(f),l},a=u=>{let l=!1;const f=m=>{if(m.middleware===u){l=!0;for(const g of O(m.name,m.aliases))s.delete(g);return!1}return!0};return t=t.filter(f),e=e.filter(f),l},c=u=>(t.forEach(l=>{u.add(l.middleware,{...l})}),e.forEach(l=>{u.addRelativeTo(l.middleware,{...l})}),u.identifyOnResolve?.(h.identifyOnResolve()),u),o=u=>{const l=[];return u.before.forEach(f=>{f.before.length===0&&f.after.length===0?l.push(f):l.push(...o(f))}),l.push(u),u.after.reverse().forEach(f=>{f.before.length===0&&f.after.length===0?l.push(f):l.push(...o(f))}),l},d=(u=!1)=>{const l=[],f=[],m={};return t.forEach(p=>{const y={...p,before:[],after:[]};for(const w of O(y.name,y.aliases))m[w]=y;l.push(y)}),e.forEach(p=>{const y={...p,before:[],after:[]};for(const w of O(y.name,y.aliases))m[w]=y;f.push(y)}),f.forEach(p=>{if(p.toMiddleware){const y=m[p.toMiddleware];if(y===void 0){if(u)return;throw new Error(`${p.toMiddleware} is not found when adding ${I(p.name,p.aliases)} middleware ${p.relation} ${p.toMiddleware}`)}p.relation==="after"&&y.after.push(p),p.relation==="before"&&y.before.push(p)}}),n(l).map(o).reduce((p,y)=>(p.push(...y),p),[])},h={add:(u,l={})=>{const{name:f,override:m,aliases:g}=l,p={step:"initialize",priority:"normal",middleware:u,...l},y=O(f,g);if(y.length>0){if(y.some(w=>s.has(w))){if(!m)throw new Error(`Duplicate middleware name '${I(f,g)}'`);for(const w of y){const T=t.findIndex(D=>D.name===w||D.aliases?.some(ne=>ne===w));if(T===-1)continue;const E=t[T];if(E.step!==p.step||p.priority!==E.priority)throw new Error(`"${I(E.name,E.aliases)}" middleware with ${E.priority} priority in ${E.step} step cannot be overridden by "${I(f,g)}" middleware with ${p.priority} priority in ${p.step} step.`);t.splice(T,1)}}for(const w of y)s.add(w)}t.push(p)},addRelativeTo:(u,l)=>{const{name:f,override:m,aliases:g}=l,p={middleware:u,...l},y=O(f,g);if(y.length>0){if(y.some(w=>s.has(w))){if(!m)throw new Error(`Duplicate middleware name '${I(f,g)}'`);for(const w of y){const T=e.findIndex(D=>D.name===w||D.aliases?.some(ne=>ne===w));if(T===-1)continue;const E=e[T];if(E.toMiddleware!==p.toMiddleware||E.relation!==p.relation)throw new Error(`"${I(E.name,E.aliases)}" middleware ${E.relation} "${E.toMiddleware}" middleware cannot be overridden by "${I(f,g)}" middleware ${p.relation} "${p.toMiddleware}" middleware.`);e.splice(T,1)}}for(const w of y)s.add(w)}e.push(p)},clone:()=>c(ee()),use:u=>{u.applyToStack(h)},remove:u=>typeof u=="string"?i(u):a(u),removeByTag:u=>{let l=!1;const f=m=>{const{tags:g,name:p,aliases:y}=m;if(g&&g.includes(u)){const w=O(p,y);for(const T of w)s.delete(T);return l=!0,!1}return!0};return t=t.filter(f),e=e.filter(f),l},concat:u=>{const l=c(ee());return l.use(u),l.identifyOnResolve(r||l.identifyOnResolve()||(u.identifyOnResolve?.()??!1)),l},applyToStack:c,identify:()=>d(!0).map(u=>{const l=u.step??u.relation+" "+u.toMiddleware;return I(u.name,u.aliases)+" - "+l}),identifyOnResolve(u){return typeof u=="boolean"&&(r=u),r},resolve:(u,l)=>{for(const f of d().map(m=>m.middleware).reverse())u=f(u,l);return r&&console.log(h.identify()),u}};return h},Ie={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},_e={high:3,normal:2,low:1};class Un{config;middlewareStack=ee();initConfig;handlers;constructor(e){this.config=e;const{protocol:r,protocolSettings:s}=e;s&&typeof r=="function"&&(e.protocol=new r(s))}send(e,r,s){const n=typeof r!="function"?r:void 0,i=typeof r=="function"?r:s,a=n===void 0&&this.config.cacheMiddleware===!0;let c;if(a){this.handlers||(this.handlers=new WeakMap);const o=this.handlers;o.has(e.constructor)?c=o.get(e.constructor):(c=e.resolveMiddleware(this.middlewareStack,this.config,n),o.set(e.constructor,c))}else delete this.handlers,c=e.resolveMiddleware(this.middlewareStack,this.config,n);if(i)c(e).then(o=>i(null,o.output),o=>i(o)).catch(()=>{});else return c(e).then(o=>o.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class P extends Uint8Array{static fromString(e,r="utf-8"){if(typeof e=="string")return r==="base64"?P.mutate(xt(e)):P.mutate(J(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,P.prototype),e}transformToString(e="utf-8"){return e==="base64"?It(this):_t(this)}}const Oe=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return P.mutate(t);if(!t)return P.mutate(new Uint8Array);const r=e.streamCollector(t);return P.mutate(await r)},ie=t=>typeof t=="function"?t():t,G=t=>t[ge]||(t[ge]={}),k=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Ze=(t,e,r,s,n)=>({name:e,namespace:t,traits:r,input:s,output:n}),Nt=t=>(e,r)=>async s=>{const{response:n}=await e(s),{operationSchema:i}=G(r),[,a,c,o,d,h]=i??[];try{const u=await t.protocol.deserializeResponse(Ze(a,c,o,d,h),{...t,...r},n);return{response:n,output:u}}catch(u){if(Object.defineProperty(u,"$response",{value:n,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in u)){const l="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{u.message+=`
3
3
  `+l}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(l):r.logger?.warn?.(l)}typeof u.$responseBodyText<"u"&&u.$response&&(u.$response.body=u.$responseBodyText);try{if(te.isInstance(n)){const{headers:f={}}=n,m=Object.entries(f);u.$metadata={httpStatusCode:n.statusCode,requestId:ae(/^x-[\w-]+-request-?id$/,m),extendedRequestId:ae(/^x-[\w-]+-id-2$/,m),cfId:ae(/^x-[\w-]+-cf-id$/,m)}}}catch{}}throw u}},ae=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],Dt=t=>(e,r)=>async s=>{const{operationSchema:n}=G(r),[,i,a,c,o,d]=n??[],h=r.endpointV2?.url&&t.urlParser?async()=>t.urlParser(r.endpointV2.url):t.endpoint,u=await t.protocol.serializeRequest(Ze(i,a,c,o,d),s.input,{...t,...r,endpoint:h});return e({...s,request:u})},Ut={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Lt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ln(t){return{applyToStack:e=>{e.add(Dt(t),Lt),e.add(Nt(t),Ut),t.protocol.setSerdeContext(t)}}}function L(t){if(typeof t=="object")return t;t=t|0;const e={};let r=0;for(const s of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(t>>r++&1)===1&&(e[s]=1);return e}class b{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=b.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,r){this.ref=e,this.memberName=r;const s=[];let n=e,i=e;for(this._isMemberSchema=!1;oe(n);)s.push(n[1]),n=n[0],i=ie(n),this._isMemberSchema=!0;if(s.length>0){this.memberTraits={};for(let a=s.length-1;a>=0;--a){const c=s[a];Object.assign(this.memberTraits,L(c))}}else this.memberTraits=0;if(i instanceof b){const a=this.memberTraits;Object.assign(this,i),this.memberTraits=Object.assign({},a,i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??i.memberName;return}if(this.schema=ie(i),Ht(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(i),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:r}static of(e){const r=ie(e);if(r instanceof b)return r;if(oe(r)){const[s,n]=r;if(s instanceof b)return Object.assign(s.getMergedTraits(),L(n)),s;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new b(r)}getSchema(){const e=this.schema;return e[0]===0?e[4]:e}getName(e=!1){const{name:r}=this;return!e&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return typeof e=="number"?e>=64&&e<128:e[0]===1}isMapSchema(){const e=this.getSchema();return typeof e=="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){const r=this.getSchema()[0];return r===3||r===-3||r===4}isUnionSchema(){return this.getSchema()[0]===4}isBlobSchema(){const e=this.getSchema();return e===21||e===42}isTimestampSchema(){const e=this.getSchema();return typeof e=="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){const e=i=>(i&4)===4||!!i?.idempotencyToken,{normalizedTraits:r,traits:s,memberTraits:n}=this;return e(r)||e(s)||e(n)}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return L(this.memberTraits)}getOwnTraits(){return L(this.traits)}getKeySchema(){const[e,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const s=this.getSchema(),n=e?15:s[4]??0;return U([n,0],"key")}getValueSchema(){const e=this.getSchema(),[r,s,n]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i=typeof e=="number"?63&e:e&&typeof e=="object"&&(s||n)?e[3+e[0]]:r?15:void 0;if(i!=null)return U([i,0],s?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const r=this.getSchema();if(this.isStructSchema()&&r[4].includes(e)){const s=r[4].indexOf(e),n=r[5][s];return U(oe(n)?n:[n,0],e)}if(this.isDocumentSchema())return U([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[r,s]of this.structIterator())e[r]=s}catch{}return e}getEventStreamMember(){if(this.isStructSchema()){for(const[e,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return e}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema();for(let r=0;r<e[4].length;++r)yield[e[4][r],U([e[5][r],0],e[4][r])]}}function U(t,e){if(t instanceof b)return Object.assign(t,{memberName:e,_isMemberSchema:!0});const r=b;return new r(t,e)}const oe=t=>Array.isArray(t)&&t.length===2,Ht=t=>Array.isArray(t)&&t.length>=5;class C{namespace;schemas;exceptions;static registries=new Map;constructor(e,r=new Map,s=new Map){this.namespace=e,this.schemas=r,this.exceptions=s}static for(e){return C.registries.has(e)||C.registries.set(e,new C(e)),C.registries.get(e)}register(e,r){const s=this.normalizeShapeId(e);C.for(s.split("#")[0]).schemas.set(s,r)}getSchema(e){const r=this.normalizeShapeId(e);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(e,r){const s=e,n=C.for(s[1]);n.schemas.set(s[1]+"#"+s[2],s),n.exceptions.set(s,r)}getErrorCtor(e){const r=e;return C.for(r[1]).exceptions.get(r)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,r,s]=e,n=r+"#"+s;if(n.startsWith("smithy.ts.sdk.synthetic.")&&n.endsWith("ServiceException"))return e}}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}const Me=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),S=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0")),zt=()=>{if(Me)return Me();const t=new Uint8Array(16);return crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128,S[t[0]]+S[t[1]]+S[t[2]]+S[t[3]]+"-"+S[t[4]]+S[t[5]]+"-"+S[t[6]]+S[t[7]]+"-"+S[t[8]]+S[t[9]]+"-"+S[t[10]]+S[t[11]]+S[t[12]]+S[t[13]]+S[t[14]]+S[t[15]]},$=function(e){return Object.assign(new String(e),{deserializeJSON(){return JSON.parse(String(e))},toString(){return String(e)},toJSON(){return String(e)}})};$.from=t=>t&&typeof t=="object"&&(t instanceof $||"deserializeJSON"in t)?t:typeof t=="string"||Object.getPrototypeOf(t)===String.prototype?$(String(t)):$(JSON.stringify(t));$.fromObject=$.from;const Pe=/^-?\d*(\.\d+)?$/;class et{string;type;constructor(e,r){if(this.string=e,this.type=r,!Pe.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!="object")return!1;const r=e;return et.prototype.isPrototypeOf(e)||r.type==="bigDecimal"&&Pe.test(r.string)}}class Bt{serdeContext;setSerdeContext(e){this.serdeContext=e}}class Ft extends Bt{options;constructor(e){super(),this.options=e}getRequestType(){return x}getResponseType(){return te}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,r){if("url"in r){e.protocol=r.url.protocol,e.hostname=r.url.hostname,e.port=r.url.port?Number(r.url.port):void 0,e.path=r.url.pathname,e.fragment=r.url.hash||void 0,e.username=r.url.username||void 0,e.password=r.url.password||void 0,e.query||(e.query={});for(const[s,n]of r.url.searchParams.entries())e.query[s]=n;return e}else return e.protocol=r.protocol,e.hostname=r.hostname,e.port=r.port?Number(r.port):void 0,e.path=r.path,e.query={...r.query},e}setHostPrefix(e,r,s){const n=b.of(r.input),i=L(r.traits??{});if(i.endpoint){let a=i.endpoint?.[0];if(typeof a=="string"){const c=[...n.structIterator()].filter(([,o])=>o.getMergedTraits().hostLabel);for(const[o]of c){const d=s[o];if(typeof d!="string")throw new Error(`@smithy/core/schema - ${o} in input must be a string as hostLabel.`);a=a.replace(`{${o}}`,d)}e.hostname=a+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:e,requestSchema:r,initialRequest:s}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:r,initialRequest:s})}async deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:s}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:s})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await Mt(async()=>{const{EventStreamSerde:r}=await import("./index-DjgOAzh3.js");return{EventStreamSerde:r}},__vite__mapDeps([0,1]));return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,r,s,n,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class Hn extends Ft{async serializeRequest(e,r,s){const n=this.serializer,i={},a={},c=await s.endpoint(),o=b.of(e?.input),d=o.getSchema();let h;const u=new x({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:i,headers:a,body:void 0});c&&(this.updateServiceEndpoint(u,c),this.setHostPrefix(u,e,r));const l={...r};if(r){const f=o.getEventStreamMember();if(f){if(l[f]){const m={};for(const[g,p]of o.structIterator())g!==f&&l[g]&&(n.write(p,l[g]),m[g]=n.flush());h=await this.serializeEventStream({eventStream:l[f],requestSchema:o,initialRequest:m})}}else n.write(d,l),h=n.flush()}return u.headers=a,u.query=i,u.body=h,u.method="POST",u}async deserializeResponse(e,r,s){const n=this.deserializer,i=b.of(e.output),a={};if(s.statusCode>=300){const o=await Oe(s.body,r);throw o.byteLength>0&&Object.assign(a,await n.read(15,o)),await this.handleError(e,r,s,a,this.deserializeMetadata(s)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const o in s.headers){const d=s.headers[o];delete s.headers[o],s.headers[o.toLowerCase()]=d}const c=i.getEventStreamMember();if(c)a[c]=await this.deserializeEventStream({response:s,responseSchema:i,initialResponseContainer:a});else{const o=await Oe(s.body,r);o.byteLength>0&&Object.assign(a,await n.read(i,o))}return a.$metadata=this.deserializeMetadata(s),a}}function zn(t,e){if(e.timestampFormat.useTrait&&t.isTimestampSchema()&&(t.getSchema()===5||t.getSchema()===6||t.getSchema()===7))return t.getSchema();const{httpLabel:r,httpPrefixHeaders:s,httpHeader:n,httpQuery:i}=t.getMergedTraits();return(e.httpBindings?typeof s=="string"||n?6:i||r?5:void 0:void 0)??e.timestampFormat.default}const ce="***SensitiveInformation***";function ye(t,e){if(e==null)return e;const r=b.of(t);if(r.getMergedTraits().sensitive)return ce;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return ce}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return ce}else if(r.isStructSchema()&&typeof e=="object"){const s=e,n={};for(const[i,a]of r.structIterator())s[i]!=null&&(n[i]=ye(a,s[i]));return n}return e}class jt{middlewareStack=ee();schema;static classBuilder(){return new qt}resolveMiddlewareWithContext(e,r,s,{middlewareFn:n,clientName:i,commandName:a,inputFilterSensitiveLog:c,outputFilterSensitiveLog:o,smithyContext:d,additionalContext:h,CommandCtor:u}){for(const p of n.bind(this)(u,e,r,s))this.middlewareStack.use(p);const l=e.concat(this.middlewareStack),{logger:f}=r,m={logger:f,clientName:i,commandName:a,inputFilterSensitiveLog:c,outputFilterSensitiveLog:o,[ge]:{commandInstance:this,...d},...h},{requestHandler:g}=r;return l.resolve(p=>g.handle(p.request,s||{}),m)}}class qt{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,r,s={}){return this._smithyContext={service:e,operation:r,...s},this}c(e={}){return this._additionalContext=e,this}n(e,r){return this._clientName=e,this._commandName=r,this}f(e=s=>s,r=s=>s){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=r,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let r;return r=class extends jt{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[s]){super(),this.input=s??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(s,n,i){const a=e._operationSchema,c=a?.[4]??a?.input,o=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(s,n,i,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(a?ye.bind(null,c):d=>d),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(a?ye.bind(null,o):d=>d),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}class H extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const r=e;return H.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;const r=e;return this===H?H.isInstance(e):H.isInstance(e)?r.name&&this.name?this.prototype.isPrototypeOf(e)||r.name===this.name:this.prototype.isPrototypeOf(e):!1}}const ke=(t,e={})=>{Object.entries(e).filter(([,s])=>s!==void 0).forEach(([s,n])=>{(t[s]==null||t[s]==="")&&(t[s]=n)});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},Bn=t=>{switch(t){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:3e4};default:return{}}},Vt=t=>{const e=[];for(const r in Z){const s=Z[r];t[s]!==void 0&&e.push({algorithmId:()=>s,checksumConstructor:()=>t[s]})}return{addChecksumAlgorithm(r){e.push(r)},checksumAlgorithms(){return e}}},Gt=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},Wt=t=>({setRetryStrategy(e){t.retryStrategy=e},retryStrategy(){return t.retryStrategy}}),Kt=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},Fn=t=>Object.assign(Vt(t),Wt(t)),jn=t=>Object.assign(Gt(t),Kt(t));class Xt{trace(){}debug(){}info(){}warn(){}error(){}}const Qt=(t,e)=>{if(!e||e.length===0)return t;const r=[];for(const s of e)for(const n of t)n.schemeId.split("#")[1]===s&&r.push(n);for(const s of t)r.find(({schemeId:n})=>n===s.schemeId)||r.push(s);return r};function Yt(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const Jt=(t,e)=>(r,s)=>async n=>{const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,s,n.input)),a=t.authSchemePreference?await t.authSchemePreference():[],c=Qt(i,a),o=Yt(t.httpAuthSchemes),d=G(s),h=[];for(const u of c){const l=o.get(u.schemeId);if(!l){h.push(`HttpAuthScheme \`${u.schemeId}\` was not enabled for this service.`);continue}const f=l.identityProvider(await e.identityProviderConfigProvider(t));if(!f){h.push(`HttpAuthScheme \`${u.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:m={},signingProperties:g={}}=u.propertiesExtractor?.(t,s)||{};u.identityProperties=Object.assign(u.identityProperties||{},m),u.signingProperties=Object.assign(u.signingProperties||{},g),d.selectedHttpAuthScheme={httpAuthOption:u,identity:await f(u.identityProperties),signer:l.signer};break}if(!d.selectedHttpAuthScheme)throw new Error(h.join(`
4
4
  `));return r(n)},Zt={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},qn=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:s=>{s.addRelativeTo(Jt(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Zt)}}),er={name:"serializerMiddleware"},tr=t=>e=>{throw e},rr=(t,e)=>{},sr=t=>(e,r)=>async s=>{if(!x.isInstance(s.request))return e(s);const i=G(r).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:c,signer:o}=i,d=await e({...s,request:await o.sign(s.request,c,a)}).catch((o.errorHandler||tr)(a));return(o.successHandler||rr)(d.response,a),d},nr={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Vn=t=>({applyToStack:e=>{e.addRelativeTo(sr(),nr)}});function ir(t,e,r){t.__smithy_context?t.__smithy_context.features||(t.__smithy_context.features={}):t.__smithy_context={features:{}},t.__smithy_context.features[e]=r}class Gn{authSchemes=new Map;constructor(e){for(const[r,s]of Object.entries(e))s!==void 0&&this.authSchemes.set(r,s)}getIdentityProvider(e){return this.authSchemes.get(e)}}class Wn{async sign(e,r,s){return e}}const ar=t=>function(r){return tt(r)&&r.expiration.getTime()-Date.now()<t},or=3e5,cr=ar(or),tt=t=>t.expiration!==void 0,ur=(t,e,r)=>{if(t===void 0)return;const s=typeof t!="function"?async()=>Promise.resolve(t):t;let n,i,a,c=!1;const o=async d=>{i||(i=s(d));try{n=await i,a=!0,c=!1}finally{i=void 0}return n};return e===void 0?async d=>((!a||d?.forceRefresh)&&(n=await o(d)),n):async d=>((!a||d?.forceRefresh)&&(n=await o(d)),c?n:r(n)?(e(n)&&await o(d),n):(c=!0,n))};function Kn(t){return t}const dr=t=>e=>async r=>{if(!x.isInstance(r.request))return e(r);const{request:s}=r,{handlerProtocol:n=""}=t.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let i=s.hostname;s.port!=null&&(i+=`:${s.port}`),s.headers.host=i}return e(r)},lr={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Xn=t=>({applyToStack:e=>{e.add(dr(t),lr)}}),fr=()=>(t,e)=>async r=>{try{const s=await t(r),{clientName:n,commandName:i,logger:a,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:o,overrideOutputFilterSensitiveLog:d}=c,h=o??e.inputFilterSensitiveLog,u=d??e.outputFilterSensitiveLog,{$metadata:l,...f}=s.output;return a?.info?.({clientName:n,commandName:i,input:h(r.input),output:u(f),metadata:l}),s}catch(s){const{clientName:n,commandName:i,logger:a,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:o}=c,d=o??e.inputFilterSensitiveLog;throw a?.error?.({clientName:n,commandName:i,input:d(r.input),error:s,metadata:s.$metadata}),s}},hr={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Qn=t=>({applyToStack:e=>{e.add(fr(),hr)}}),pr={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},mr=()=>t=>async e=>t(e),Yn=t=>({applyToStack:e=>{e.add(mr(),pr)}}),gr=void 0;function yr(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Jn(t){const e=z(t.userAgentAppId??gr),{customUserAgent:r}=t;return Object.assign(t,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const s=await e();if(!yr(s)){const n=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof s!="string"?n?.warn("userAgentAppId must be a string or undefined."):s.length>50&&n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s}})}class Zn{capacity;data=new Map;parameters=[];constructor({size:e,params:r}){this.capacity=e??50,r&&(this.parameters=r)}get(e,r){const s=this.hash(e);if(s===!1)return r();if(!this.data.has(s)){if(this.data.size>this.capacity+10){const n=this.data.keys();let i=0;for(;;){const{value:a,done:c}=n.next();if(this.data.delete(a),c||++i>10)break}}this.data.set(s,r())}return this.data.get(s)}size(){return this.data.size}hash(e){let r="";const{parameters:s}=this;if(s.length===0)return!1;for(const n of s){const i=String(e[n]??"");if(i.includes("|;"))return!1;r+=i+"|;"}return r}}const wr=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),rt=t=>wr.test(t)||t.startsWith("[")&&t.endsWith("]"),Sr=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),re=(t,e=!1)=>{if(!e)return Sr.test(t);const r=t.split(".");for(const s of r)if(!re(s))return!1;return!0},we={},q="endpoints";function _(t){return typeof t!="object"||t==null?t:"ref"in t?`$${_(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(_).join(", ")})`:JSON.stringify(t,null,2)}class R extends Error{constructor(e){super(e),this.name="EndpointError"}}const br=(t,e)=>t===e,Er=t=>{const e=t.split("."),r=[];for(const s of e){const n=s.indexOf("[");if(n!==-1){if(s.indexOf("]")!==s.length-1)throw new R(`Path: '${t}' does not end with ']'`);const i=s.slice(n+1,-1);if(Number.isNaN(parseInt(i)))throw new R(`Invalid array index: '${i}' in path: '${t}'`);n!==0&&r.push(s.slice(0,n)),r.push(i)}else r.push(s)}return r},st=(t,e)=>Er(e).reduce((r,s)=>{if(typeof r!="object")throw new R(`Index '${s}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(r)?r[parseInt(s)]:r[s]},t),Rr=t=>t!=null,vr=t=>!t,ue={[F.HTTP]:80,[F.HTTPS]:443},Tr=t=>{const e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){const{hostname:l,port:f,protocol:m="",path:g="",query:p={}}=t,y=new URL(`${m}//${l}${f?`:${f}`:""}${g}`);return y.search=Object.entries(p).map(([w,T])=>`${w}=${T}`).join("&"),y}return new URL(t)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(t)} as a whatwg URL.`),null;const r=e.href,{host:s,hostname:n,pathname:i,protocol:a,search:c}=e;if(c)return null;const o=a.slice(0,-1);if(!Object.values(F).includes(o))return null;const d=rt(n),h=r.includes(`${s}:${ue[o]}`)||typeof t=="string"&&t.includes(`${s}:${ue[o]}`),u=`${s}${h?`:${ue[o]}`:""}`;return{scheme:o,authority:u,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:d}},Ar=(t,e)=>t===e,Cr=(t,e,r,s)=>e>=r||t.length<r?null:s?t.substring(t.length-r,t.length-e):t.substring(e,r),xr=t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Ir={booleanEquals:br,getAttr:st,isSet:Rr,isValidHostLabel:re,not:vr,parseURL:Tr,stringEquals:Ar,substring:Cr,uriEncode:xr},nt=(t,e)=>{const r=[],s={...e.endpointParams,...e.referenceRecord};let n=0;for(;n<t.length;){const i=t.indexOf("{",n);if(i===-1){r.push(t.slice(n));break}r.push(t.slice(n,i));const a=t.indexOf("}",i);if(a===-1){r.push(t.slice(i));break}t[i+1]==="{"&&t[a+1]==="}"&&(r.push(t.slice(i+1,a)),n=a+2);const c=t.substring(i+1,a);if(c.includes("#")){const[o,d]=c.split("#");r.push(st(s[o],d))}else r.push(s[c]);n=a+1}return r.join("")},_r=({ref:t},e)=>({...e.endpointParams,...e.referenceRecord})[t],se=(t,e,r)=>{if(typeof t=="string")return nt(t,r);if(t.fn)return at.callFunction(t,r);if(t.ref)return _r(t,r);throw new R(`'${e}': ${String(t)} is not a string, function or reference.`)},it=({fn:t,argv:e},r)=>{const s=e.map(i=>["boolean","number"].includes(typeof i)?i:at.evaluateExpression(i,"arg",r)),n=t.split(".");return n[0]in we&&n[1]!=null?we[n[0]][n[1]](...s):Ir[t](...s)},at={evaluateExpression:se,callFunction:it},Or=({assign:t,...e},r)=>{if(t&&t in r.referenceRecord)throw new R(`'${t}' is already defined in Reference Record.`);const s=it(e,r);return r.logger?.debug?.(`${q} evaluateCondition: ${_(e)} = ${_(s)}`),{result:s===""?!0:!!s,...t!=null&&{toAssign:{name:t,value:s}}}},Te=(t=[],e)=>{const r={};for(const s of t){const{result:n,toAssign:i}=Or(s,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!n)return{result:n};i&&(r[i.name]=i.value,e.logger?.debug?.(`${q} assign: ${i.name} := ${_(i.value)}`))}return{result:!0,referenceRecord:r}},Mr=(t,e)=>Object.entries(t).reduce((r,[s,n])=>({...r,[s]:n.map(i=>{const a=se(i,"Header value entry",e);if(typeof a!="string")throw new R(`Header '${s}' value '${a}' is not a string`);return a})}),{}),ot=(t,e)=>Object.entries(t).reduce((r,[s,n])=>({...r,[s]:ut.getEndpointProperty(n,e)}),{}),ct=(t,e)=>{if(Array.isArray(t))return t.map(r=>ct(r,e));switch(typeof t){case"string":return nt(t,e);case"object":if(t===null)throw new R(`Unexpected endpoint property: ${t}`);return ut.getEndpointProperties(t,e);case"boolean":return t;default:throw new R(`Unexpected endpoint property type: ${typeof t}`)}},ut={getEndpointProperty:ct,getEndpointProperties:ot},Pr=(t,e)=>{const r=se(t,"Endpoint URL",e);if(typeof r=="string")try{return new URL(r)}catch(s){throw console.error(`Failed to construct URL with ${r}`,s),s}throw new R(`Endpoint URL must be a string, got ${typeof r}`)},kr=(t,e)=>{const{conditions:r,endpoint:s}=t,{result:n,referenceRecord:i}=Te(r,e);if(!n)return;const a={...e,referenceRecord:{...e.referenceRecord,...i}},{url:c,properties:o,headers:d}=s;return e.logger?.debug?.(`${q} Resolving endpoint from template: ${_(s)}`),{...d!=null&&{headers:Mr(d,a)},...o!=null&&{properties:ot(o,a)},url:Pr(c,a)}},$r=(t,e)=>{const{conditions:r,error:s}=t,{result:n,referenceRecord:i}=Te(r,e);if(n)throw new R(se(s,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},dt=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const s=kr(r,e);if(s)return s}else if(r.type==="error")$r(r,e);else if(r.type==="tree"){const s=lt.evaluateTreeRule(r,e);if(s)return s}else throw new R(`Unknown endpoint rule: ${r}`);throw new R("Rules evaluation failed")},Nr=(t,e)=>{const{conditions:r,rules:s}=t,{result:n,referenceRecord:i}=Te(r,e);if(n)return lt.evaluateRules(s,{...e,referenceRecord:{...e.referenceRecord,...i}})},lt={evaluateRules:dt,evaluateTreeRule:Nr},ei=(t,e)=>{const{endpointParams:r,logger:s}=e,{parameters:n,rules:i}=t;e.logger?.debug?.(`${q} Initial EndpointParams: ${_(r)}`);const a=Object.entries(n).filter(([,d])=>d.default!=null).map(([d,h])=>[d,h.default]);if(a.length>0)for(const[d,h]of a)r[d]=r[d]??h;const c=Object.entries(n).filter(([,d])=>d.required).map(([d])=>d);for(const d of c)if(r[d]==null)throw new R(`Missing required parameter: '${d}'`);const o=dt(i,{endpointParams:r,logger:s,referenceRecord:{}});return e.logger?.debug?.(`${q} Resolved endpoint: ${_(o)}`),o},ft=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!ft(r))return!1;return!0}return!(!re(t)||t.length<3||t.length>63||t!==t.toLowerCase()||rt(t))},$e=":",Dr="/",Ur=t=>{const e=t.split($e);if(e.length<6)return null;const[r,s,n,i,a,...c]=e;if(r!=="arn"||s===""||n===""||c.join($e)==="")return null;const o=c.map(d=>d.split(Dr)).flat();return{partition:s,service:n,region:i,accountId:a,resourceId:o}},Lr=[{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:"EU (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)"}}}],Hr={partitions:Lr};let zr=Hr;const Br=t=>{const{partitions:e}=zr;for(const s of e){const{regions:n,outputs:i}=s;for(const[a,c]of Object.entries(n))if(a===t)return{...i,...c}}for(const s of e){const{regionRegex:n,outputs:i}=s;if(new RegExp(n).test(t))return{...i}}const r=e.find(s=>s.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},Fr={isVirtualHostableS3Bucket:ft,parseArn:Ur,partition:Br};we.aws=Fr;function jr(t){const e={};if(t=t.replace(/^\?/,""),t)for(const r of t.split("&")){let[s,n=null]=r.split("=");s=decodeURIComponent(s),n&&(n=decodeURIComponent(n)),s in e?Array.isArray(e[s])?e[s].push(n):e[s]=[e[s],n]:e[s]=n}return e}const Se=t=>{if(typeof t=="string")return Se(new URL(t));const{hostname:e,pathname:r,port:s,protocol:n,search:i}=t;let a;return i&&(a=jr(i)),{hostname:e,port:s?parseInt(s):void 0,protocol:n,path:r,query:a}};function qr(t,e,r){return t.$source||(t.$source={}),t.$source[e]=r,t}function A(t,e,r){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=r}const Ne=t=>te.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,ht=t=>new Date(Date.now()+t),Vr=(t,e)=>Math.abs(ht(e).getTime()-t)>=3e5,De=(t,e)=>{const r=Date.parse(t);return Vr(r,e)?r-Date.now():e},B=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},Gr=async t=>{const e=B("context",t.context),r=B("config",t.config),s=e.endpointV2?.properties?.authSchemes?.[0],i=await B("signer",r.signer)(s),a=t?.signingRegion,c=t?.signingRegionSet,o=t?.signingName;return{config:r,signer:i,signingRegion:a,signingRegionSet:c,signingName:o}};class ti{async sign(e,r,s){if(!x.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await Gr(s),{config:i,signer:a}=n;let{signingRegion:c,signingName:o}=n;const d=s.context;if(d?.authSchemes?.length??!1){const[u,l]=d.authSchemes;u?.name==="sigv4a"&&l?.name==="sigv4"&&(c=l?.signingRegion??c,o=l?.signingName??o)}return await a.sign(e,{signingDate:ht(i.systemClockOffset),signingRegion:c,signingService:o})}errorHandler(e){return r=>{const s=r.ServerTime??Ne(r.$response);if(s){const n=B("config",e.config),i=n.systemClockOffset;n.systemClockOffset=De(s,n.systemClockOffset),n.systemClockOffset!==i&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(e,r){const s=Ne(e);if(s){const n=B("config",r.config);n.systemClockOffset=De(s,n.systemClockOffset)}}}const Wr="X-Amz-Algorithm",Kr="X-Amz-Credential",pt="X-Amz-Date",Xr="X-Amz-SignedHeaders",Qr="X-Amz-Expires",mt="X-Amz-Signature",gt="X-Amz-Security-Token",yt="authorization",wt=pt.toLowerCase(),Yr="date",Jr=[yt,wt,Yr],Zr=mt.toLowerCase(),be="x-amz-content-sha256",es=gt.toLowerCase(),ts={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},rs=/^proxy-/,ss=/^sec-/,de="AWS4-HMAC-SHA256",ns="AWS4-HMAC-SHA256-PAYLOAD",is="UNSIGNED-PAYLOAD",as=50,St="aws4_request",os=3600*24*7,W={},le=[],fe=(t,e,r)=>`${t}/${e}/${r}/${St}`,cs=async(t,e,r,s,n)=>{const i=await Ue(t,e.secretAccessKey,e.accessKeyId),a=`${r}:${s}:${n}:${M(i)}:${e.sessionToken}`;if(a in W)return W[a];for(le.push(a);le.length>as;)delete W[le.shift()];let c=`AWS4${e.secretAccessKey}`;for(const o of[r,s,n,St])c=await Ue(t,c,o);return W[a]=c},Ue=(t,e,r)=>{const s=new t(e);return s.update(j(r)),s.digest()},Le=({headers:t},e,r)=>{const s={};for(const n of Object.keys(t).sort()){if(t[n]==null)continue;const i=n.toLowerCase();(i in ts||e?.has(i)||rs.test(i)||ss.test(i))&&(!r||r&&!r.has(i))||(s[i]=t[n].trim().replace(/\s+/g," "))}return s},us=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",he=async({headers:t,body:e},r)=>{for(const s of Object.keys(t))if(s.toLowerCase()===be)return t[s];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||us(e)){const s=new r;return s.update(j(e)),M(await s.digest())}return is};class ds{format(e){const r=[];for(const i of Object.keys(e)){const a=J(i);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[i]))}const s=new Uint8Array(r.reduce((i,a)=>i+a.byteLength,0));let n=0;for(const i of r)s.set(i,n),n+=i.byteLength;return s}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,e.value,!1),new Uint8Array(r.buffer);case"integer":const s=new DataView(new ArrayBuffer(5));return s.setUint8(0,4),s.setInt32(1,e.value,!1),new Uint8Array(s.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(i.buffer);return a.set(e.value,3),a;case"string":const c=J(e.value),o=new DataView(new ArrayBuffer(3+c.byteLength));o.setUint8(0,7),o.setUint16(1,c.byteLength,!1);const d=new Uint8Array(o.buffer);return d.set(c,3),d;case"timestamp":const h=new Uint8Array(9);return h[0]=8,h.set(Ae.fromNumber(e.value.valueOf()).bytes,1),h;case"uuid":if(!ls.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(Ot(e.value.replace(/\-/g,"")),1),u}}}var He;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(He||(He={}));const ls=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ae{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let s=7,n=Math.abs(Math.round(e));s>-1&&n>0;s--,n/=256)r[s]=n;return e<0&&ze(r),new Ae(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&ze(e),parseInt(M(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function ze(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const fs=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},hs=(t,e={})=>{const{headers:r,query:s={}}=x.clone(t);for(const n of Object.keys(r)){const i=n.toLowerCase();(i.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(i)||e.hoistableHeaders?.has(i))&&(s[n]=r[n],delete r[n])}return{...t,headers:r,query:s}},Be=t=>{t=x.clone(t);for(const e of Object.keys(t.headers))Jr.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},ps=({query:t={}})=>{const e=[],r={};for(const s of Object.keys(t)){if(s.toLowerCase()===Zr)continue;const n=X(s);e.push(n);const i=t[s];typeof i=="string"?r[n]=`${n}=${X(i)}`:Array.isArray(i)&&(r[n]=i.slice(0).reduce((a,c)=>a.concat([`${n}=${X(c)}`]),[]).sort().join("&"))}return e.sort().map(s=>r[s]).filter(s=>s).join("&")},ms=t=>gs(t).toISOString().replace(/\.\d{3}Z$/,"Z"),gs=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class ys{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:r,region:s,service:n,sha256:i,uriEscapePath:a=!0}){this.service=n,this.sha256=i,this.uriEscapePath=a,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=k(s),this.credentialProvider=k(r)}createCanonicalRequest(e,r,s){const n=Object.keys(r).sort();return`${e.method}
5
5
  ${this.getCanonicalPath(e)}
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-CVCxF6wR.js","assets/index-Bdy7oQ1C.js","assets/normalizeProvider-EC8cbfMc.js","assets/preload-helper-BlTxHScW.js","assets/index-KfLUFT2R.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-ChvoNxcO.js","assets/__vite-browser-external-DLjrMatA.js","assets/inherits_browser-nmOknR35-Bp0mvRSL.js","assets/index-6mKfgpcs-DsgiI2lM.js","assets/_commonjsHelpers-B4e78b8K-W3E8ocG7.js","assets/index-DsIu-45t-Bejjlpz4.js","assets/index-DSosZ5sh-Ceejs_jv.js","assets/index-69shuAsh-DF18H7zf.js","assets/index-BJBOx-Z---hbiLl7B.js","assets/index.browser-BHPvGrwi-6Mh8eUw-.js","assets/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js","assets/_commonjs-dynamic-modules-B7n8ZNar.js","assets/index--S8Abk3Y.css","assets/AwsJson1_1Protocol-DqThCwVi.js","assets/loadSts-CIaNyXtH.js","assets/index-FnucrqzJ.js"])))=>i.map(i=>d[i]);
2
- import{_ as I}from"./preload-helper-BlTxHScW.js";import{d as O,g as N,t as x,s as D,H as K,h as H,F as j,n as q}from"./normalizeProvider-EC8cbfMc.js";class A extends Error{name="ProviderError";tryNextLink;constructor(t,o=!0){let r,n=!0;typeof o=="boolean"?(r=void 0,n=o):o!=null&&typeof o=="object"&&(r=o.logger,n=o.tryNextLink??!0),super(t),this.tryNextLink=n,Object.setPrototypeOf(this,A.prototype),r?.debug?.(`@smithy/property-provider ${n?"->":"(!)"} ${t}`)}static from(t,o=!0){return Object.assign(new this(t.message,o),t)}}class l extends A{name="CredentialsProviderError";constructor(t,o=!0){super(t,o),Object.setPrototypeOf(this,l.prototype)}}function _(e){return Promise.all(Object.keys(e).reduce((t,o)=>{const r=e[o];return typeof r=="string"?t.push([o,r]):t.push(r().then(n=>[o,n])),t},[])).then(t=>t.reduce((o,[r,n])=>(o[r]=n,o),{}))}function k(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:o,CognitoIdentityClient:r}=await I(async()=>{const{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}=await import("./loadCognitoIdentity-CVCxF6wR.js");return{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),n=c=>e.clientConfig?.[c]??e.parentClientConfig?.[c]??t?.callerClientConfig?.[c],{Credentials:{AccessKeyId:s=L(e.logger),Expiration:i,SecretKey:d=M(e.logger),SessionToken:u}=$(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:n("region"),profile:n("profile"),userAgentAppId:n("userAgentAppId")}))).send(new o({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await _(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:d,sessionToken:u,expiration:i}}}function L(e){throw new l("Response from Amazon Cognito contained no access key ID",{logger:e})}function $(e){throw new l("Response from Amazon Cognito contained no credentials",{logger:e})}function M(e){throw new l("Response from Amazon Cognito contained no secret key",{logger:e})}const b="IdentityIds";class B{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",o=>{const r=o.get(t);return new Promise(n=>{r.onerror=()=>n(null),r.onsuccess=()=>n(r.result?r.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",o=>{const r=o.delete(t);return new Promise((n,s)=>{r.onerror=()=>s(r.error),r.onsuccess=()=>n()})})}setItem(t,o){return this.withObjectStore("readwrite",r=>{const n=r.put({id:t,value:o});return new Promise((s,i)=>{n.onerror=()=>i(n.error),n.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((o,r)=>{t.onsuccess=()=>{o(t.result)},t.onerror=()=>{r(t.error)},t.onblocked=()=>{r(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const n=t.result;n.onerror=()=>{r(new Error("Failed to create object store"))},n.createObjectStore(b,{keyPath:"id"})}})}withObjectStore(t,o){return this.getDb().then(r=>{const n=r.transaction(b,t);return n.oncomplete=()=>r.close(),new Promise((s,i)=>{n.onerror=()=>i(n.error),s(o(n.objectStore(b)))}).catch(s=>{throw r.close(),s})})}}class W{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 U=new W;function F(){return typeof self=="object"&&self.indexedDB?new B:typeof window=="object"&&window.localStorage?window.localStorage:U}function z({accountId:e,cache:t=F(),client:o,clientConfig:r,customRoleArn:n,identityPoolId:s,logins:i,userIdentifier:d=!i||Object.keys(i).length===0?"ANONYMOUS":void 0,logger:u,parentClientConfig:c}){u?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const f=d?`aws:cognito-identity-credentials:${s}:${d}`:void 0;let a=async w=>{const{GetIdCommand:m,CognitoIdentityClient:y}=await I(async()=>{const{GetIdCommand:g,CognitoIdentityClient:P}=await import("./loadCognitoIdentity-CVCxF6wR.js");return{GetIdCommand:g,CognitoIdentityClient:P}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),h=g=>r?.[g]??c?.[g]??w?.callerClientConfig?.[g],C=o??new y(Object.assign({},r??{},{region:h("region"),profile:h("profile"),userAgentAppId:h("userAgentAppId")}));let p=f&&await t.getItem(f);if(!p){const{IdentityId:g=G(u)}=await C.send(new m({AccountId:e,IdentityPoolId:s,Logins:i?await _(i):void 0}));p=g,f&&Promise.resolve(t.setItem(f,p)).catch(()=>{})}return a=k({client:C,customRoleArn:n,logins:i,identityId:p}),a(w)};return w=>a(w).catch(async m=>{throw f&&Promise.resolve(t.removeItem(f)).catch(()=>{}),m})}function G(e){throw new l("Response from Amazon Cognito contained no identity ID",{logger:e})}const ie=e=>k({...e}),ae=e=>z({...e}),V="169.254.170.2",J="169.254.170.23",Y="[fd00:ec2::23]",Q=(e,t)=>{if(e.protocol!=="https:"&&!(e.hostname===V||e.hostname===J||e.hostname===Y)){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("."),r=n=>{const s=parseInt(n,10);return 0<=s&&s<=255};if(o[0]==="127"&&r(o[1])&&r(o[2])&&r(o[3])&&o.length===4)return}throw new l(`URL not accepted. It must either be HTTPS or match one of the following:
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-C_bi1t9F.js","assets/index-Lo_XIkxp.js","assets/normalizeProvider-EC8cbfMc.js","assets/preload-helper-BlTxHScW.js","assets/index-Cdypq0le.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-ChvoNxcO.js","assets/__vite-browser-external-DLjrMatA.js","assets/inherits_browser-nmOknR35-Bp0mvRSL.js","assets/index-6mKfgpcs-DsgiI2lM.js","assets/_commonjsHelpers-B4e78b8K-W3E8ocG7.js","assets/index-DsIu-45t-Bejjlpz4.js","assets/index-DSosZ5sh-Ceejs_jv.js","assets/index-69shuAsh-DF18H7zf.js","assets/index-BJBOx-Z---hbiLl7B.js","assets/index.browser-BHPvGrwi-6Mh8eUw-.js","assets/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js","assets/_commonjs-dynamic-modules-B7n8ZNar.js","assets/index-BXzEORYS.css","assets/AwsJson1_1Protocol-1sL8GPmz.js","assets/loadSts-D_V03_bI.js","assets/index-DnN6Dyoy.js"])))=>i.map(i=>d[i]);
2
+ import{_ as I}from"./preload-helper-BlTxHScW.js";import{d as O,g as N,t as x,s as D,H as K,h as H,F as j,n as q}from"./normalizeProvider-EC8cbfMc.js";class A extends Error{name="ProviderError";tryNextLink;constructor(t,o=!0){let r,n=!0;typeof o=="boolean"?(r=void 0,n=o):o!=null&&typeof o=="object"&&(r=o.logger,n=o.tryNextLink??!0),super(t),this.tryNextLink=n,Object.setPrototypeOf(this,A.prototype),r?.debug?.(`@smithy/property-provider ${n?"->":"(!)"} ${t}`)}static from(t,o=!0){return Object.assign(new this(t.message,o),t)}}class l extends A{name="CredentialsProviderError";constructor(t,o=!0){super(t,o),Object.setPrototypeOf(this,l.prototype)}}function _(e){return Promise.all(Object.keys(e).reduce((t,o)=>{const r=e[o];return typeof r=="string"?t.push([o,r]):t.push(r().then(n=>[o,n])),t},[])).then(t=>t.reduce((o,[r,n])=>(o[r]=n,o),{}))}function k(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:o,CognitoIdentityClient:r}=await I(async()=>{const{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}=await import("./loadCognitoIdentity-C_bi1t9F.js");return{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),n=c=>e.clientConfig?.[c]??e.parentClientConfig?.[c]??t?.callerClientConfig?.[c],{Credentials:{AccessKeyId:s=L(e.logger),Expiration:i,SecretKey:d=M(e.logger),SessionToken:u}=$(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:n("region"),profile:n("profile"),userAgentAppId:n("userAgentAppId")}))).send(new o({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await _(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:d,sessionToken:u,expiration:i}}}function L(e){throw new l("Response from Amazon Cognito contained no access key ID",{logger:e})}function $(e){throw new l("Response from Amazon Cognito contained no credentials",{logger:e})}function M(e){throw new l("Response from Amazon Cognito contained no secret key",{logger:e})}const b="IdentityIds";class B{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",o=>{const r=o.get(t);return new Promise(n=>{r.onerror=()=>n(null),r.onsuccess=()=>n(r.result?r.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",o=>{const r=o.delete(t);return new Promise((n,s)=>{r.onerror=()=>s(r.error),r.onsuccess=()=>n()})})}setItem(t,o){return this.withObjectStore("readwrite",r=>{const n=r.put({id:t,value:o});return new Promise((s,i)=>{n.onerror=()=>i(n.error),n.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((o,r)=>{t.onsuccess=()=>{o(t.result)},t.onerror=()=>{r(t.error)},t.onblocked=()=>{r(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const n=t.result;n.onerror=()=>{r(new Error("Failed to create object store"))},n.createObjectStore(b,{keyPath:"id"})}})}withObjectStore(t,o){return this.getDb().then(r=>{const n=r.transaction(b,t);return n.oncomplete=()=>r.close(),new Promise((s,i)=>{n.onerror=()=>i(n.error),s(o(n.objectStore(b)))}).catch(s=>{throw r.close(),s})})}}class W{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 U=new W;function F(){return typeof self=="object"&&self.indexedDB?new B:typeof window=="object"&&window.localStorage?window.localStorage:U}function z({accountId:e,cache:t=F(),client:o,clientConfig:r,customRoleArn:n,identityPoolId:s,logins:i,userIdentifier:d=!i||Object.keys(i).length===0?"ANONYMOUS":void 0,logger:u,parentClientConfig:c}){u?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const f=d?`aws:cognito-identity-credentials:${s}:${d}`:void 0;let a=async w=>{const{GetIdCommand:m,CognitoIdentityClient:y}=await I(async()=>{const{GetIdCommand:g,CognitoIdentityClient:P}=await import("./loadCognitoIdentity-C_bi1t9F.js");return{GetIdCommand:g,CognitoIdentityClient:P}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),h=g=>r?.[g]??c?.[g]??w?.callerClientConfig?.[g],C=o??new y(Object.assign({},r??{},{region:h("region"),profile:h("profile"),userAgentAppId:h("userAgentAppId")}));let p=f&&await t.getItem(f);if(!p){const{IdentityId:g=G(u)}=await C.send(new m({AccountId:e,IdentityPoolId:s,Logins:i?await _(i):void 0}));p=g,f&&Promise.resolve(t.setItem(f,p)).catch(()=>{})}return a=k({client:C,customRoleArn:n,logins:i,identityId:p}),a(w)};return w=>a(w).catch(async m=>{throw f&&Promise.resolve(t.removeItem(f)).catch(()=>{}),m})}function G(e){throw new l("Response from Amazon Cognito contained no identity ID",{logger:e})}const ie=e=>k({...e}),ae=e=>z({...e}),V="169.254.170.2",J="169.254.170.23",Y="[fd00:ec2::23]",Q=(e,t)=>{if(e.protocol!=="https:"&&!(e.hostname===V||e.hostname===J||e.hostname===Y)){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("."),r=n=>{const s=parseInt(n,10);return 0<=s&&s<=255};if(o[0]==="127"&&r(o[1])&&r(o[2])&&r(o[3])&&o.length===4)return}throw new l(`URL not accepted. It must either be HTTPS or match one of the following:
3
3
  - loopback CIDR 127.0.0.0/8 or [::1/128]
4
4
  - ECS container host 169.254.170.2
5
5
  - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:t})}},T=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),R="The stream has already been transformed.",X=e=>{if(!v(e)&&!T(e)){const n=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${n}`)}let t=!1;const o=async()=>{if(t)throw new Error(R);return t=!0,await D(e)},r=n=>{if(typeof n.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
6
- If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return n.stream()};return Object.assign(e,{transformToByteArray:o,transformToString:async n=>{const s=await o();if(n==="base64")return O(s);if(n==="hex")return N(s);if(n===void 0||n==="utf8"||n==="utf-8")return x(s);if(typeof TextDecoder=="function")return new TextDecoder(n).decode(s);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(R);if(t=!0,v(e))return r(e);if(T(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},v=e=>typeof Blob=="function"&&e instanceof Blob;function Z(e){return new K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[o,r])=>(t[o]=r,t),{}),fragment:e.hash})}async function ee(e,t){const r=await X(e.body).transformToString();if(e.statusCode===200){const n=JSON.parse(r);if(typeof n.AccessKeyId!="string"||typeof n.SecretAccessKey!="string"||typeof n.Token!="string"||typeof n.Expiration!="string")throw new l("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:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,sessionToken:n.Token,expiration:H(n.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let n={};try{n=JSON.parse(r)}catch{}throw Object.assign(new l(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:n.Code,Message:n.Message})}throw new l(`Server responded with status: ${e.statusCode}`,{logger:t})}const te=(e,t,o)=>async()=>{for(let r=0;r<t;++r)try{return await e()}catch{await new Promise(s=>setTimeout(s,o))}return await e()},ce=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t;const o=e.credentialsFullUri;if(o)t=o;else throw new l("No HTTP credential provider host provided.",{logger:e.logger});const r=new URL(t);Q(r,e.logger);const n=new j;return te(async()=>{const s=Z(r);e.authorizationToken&&(s.headers.Authorization=e.authorizationToken);const i=await n.handle(s);return ee(i.response)},e.maxRetries??3,e.timeout??1e3)},ne="us-east-1",le=(e,t,o)=>{let r;return async(n={})=>{const{callerClientConfig:s}=n,i=e.clientConfig?.profile??s?.profile,d=e.logger??s?.logger;d?.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 l("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:d});u.TokenCode=await e.mfaCodeProvider(u?.SerialNumber)}const{AssumeRoleCommand:c,STSClient:f}=await I(async()=>{const{AssumeRoleCommand:w,STSClient:m}=await import("./loadSts-CIaNyXtH.js").then(y=>y.v);return{AssumeRoleCommand:w,STSClient:m}},__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));if(!r){const w=typeof t=="function"?t():void 0,m=[e.masterCredentials,e.clientConfig?.credentials,void s?.credentials,s?.credentialDefaultProvider?.(),w];let y="STS client default credentials";if(m[0])y="options.masterCredentials";else if(m[1])y="options.clientConfig.credentials";else{if(m[2])throw y="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");m[3]?y="caller client's credentialDefaultProvider":m[4]&&(y="AWS SDK default credentials")}const h=[e.clientConfig?.region,s?.region,await o?.({profile:i}),ne];let C="default partition's default region";h[0]?C="options.clientConfig.region":h[1]?C="caller client's region":h[2]&&(C="file or env region");const p=[E(e.clientConfig?.requestHandler),E(s?.requestHandler)];let g="STS default requestHandler";p[0]?g="options.clientConfig.requestHandler":p[1]&&(g="caller client's requestHandler"),d?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${C}=${await q(S(h))()}, ${y}, ${g}.`),r=new f({userAgentAppId:s?.userAgentAppId,...e.clientConfig,credentials:S(m),logger:d,profile:i,region:S(h),requestHandler:S(p)})}if(e.clientPlugins)for(const w of e.clientPlugins)r.middlewareStack.use(w);const{Credentials:a}=await r.send(new c(u));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new l(`Invalid response from STS.assumeRole call with role ${u.RoleArn}`,{logger:d});return{accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,credentialScope:a.CredentialScope}}},E=e=>e?.metadata?.handlerProtocol==="h2"?void 0:e,S=e=>{for(const t of e)if(t!==void 0)return t},re=e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:s,policyArns:i,policy:d,durationSeconds:u}=e;let{roleAssumerWithWebIdentity:c}=e;if(!c){const{getDefaultRoleAssumerWithWebIdentity:f}=await I(async()=>{const{getDefaultRoleAssumerWithWebIdentity:a}=await import("./index-FnucrqzJ.js");return{getDefaultRoleAssumerWithWebIdentity:a}},__vite__mapDeps([21,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));c=f({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return c({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:s,PolicyArns:i,Policy:d,DurationSeconds:u})},de=e=>re({...e});export{ie as fromCognitoIdentity,ae as fromCognitoIdentityPool,ce as fromHttp,le as fromTemporaryCredentials,de as fromWebToken};
6
+ If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return n.stream()};return Object.assign(e,{transformToByteArray:o,transformToString:async n=>{const s=await o();if(n==="base64")return O(s);if(n==="hex")return N(s);if(n===void 0||n==="utf8"||n==="utf-8")return x(s);if(typeof TextDecoder=="function")return new TextDecoder(n).decode(s);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(R);if(t=!0,v(e))return r(e);if(T(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},v=e=>typeof Blob=="function"&&e instanceof Blob;function Z(e){return new K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[o,r])=>(t[o]=r,t),{}),fragment:e.hash})}async function ee(e,t){const r=await X(e.body).transformToString();if(e.statusCode===200){const n=JSON.parse(r);if(typeof n.AccessKeyId!="string"||typeof n.SecretAccessKey!="string"||typeof n.Token!="string"||typeof n.Expiration!="string")throw new l("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:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,sessionToken:n.Token,expiration:H(n.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let n={};try{n=JSON.parse(r)}catch{}throw Object.assign(new l(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:n.Code,Message:n.Message})}throw new l(`Server responded with status: ${e.statusCode}`,{logger:t})}const te=(e,t,o)=>async()=>{for(let r=0;r<t;++r)try{return await e()}catch{await new Promise(s=>setTimeout(s,o))}return await e()},ce=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t;const o=e.credentialsFullUri;if(o)t=o;else throw new l("No HTTP credential provider host provided.",{logger:e.logger});const r=new URL(t);Q(r,e.logger);const n=new j;return te(async()=>{const s=Z(r);e.authorizationToken&&(s.headers.Authorization=e.authorizationToken);const i=await n.handle(s);return ee(i.response)},e.maxRetries??3,e.timeout??1e3)},ne="us-east-1",le=(e,t,o)=>{let r;return async(n={})=>{const{callerClientConfig:s}=n,i=e.clientConfig?.profile??s?.profile,d=e.logger??s?.logger;d?.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 l("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:d});u.TokenCode=await e.mfaCodeProvider(u?.SerialNumber)}const{AssumeRoleCommand:c,STSClient:f}=await I(async()=>{const{AssumeRoleCommand:w,STSClient:m}=await import("./loadSts-D_V03_bI.js").then(y=>y.v);return{AssumeRoleCommand:w,STSClient:m}},__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));if(!r){const w=typeof t=="function"?t():void 0,m=[e.masterCredentials,e.clientConfig?.credentials,void s?.credentials,s?.credentialDefaultProvider?.(),w];let y="STS client default credentials";if(m[0])y="options.masterCredentials";else if(m[1])y="options.clientConfig.credentials";else{if(m[2])throw y="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");m[3]?y="caller client's credentialDefaultProvider":m[4]&&(y="AWS SDK default credentials")}const h=[e.clientConfig?.region,s?.region,await o?.({profile:i}),ne];let C="default partition's default region";h[0]?C="options.clientConfig.region":h[1]?C="caller client's region":h[2]&&(C="file or env region");const p=[E(e.clientConfig?.requestHandler),E(s?.requestHandler)];let g="STS default requestHandler";p[0]?g="options.clientConfig.requestHandler":p[1]&&(g="caller client's requestHandler"),d?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${C}=${await q(S(h))()}, ${y}, ${g}.`),r=new f({userAgentAppId:s?.userAgentAppId,...e.clientConfig,credentials:S(m),logger:d,profile:i,region:S(h),requestHandler:S(p)})}if(e.clientPlugins)for(const w of e.clientPlugins)r.middlewareStack.use(w);const{Credentials:a}=await r.send(new c(u));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new l(`Invalid response from STS.assumeRole call with role ${u.RoleArn}`,{logger:d});return{accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,credentialScope:a.CredentialScope}}},E=e=>e?.metadata?.handlerProtocol==="h2"?void 0:e,S=e=>{for(const t of e)if(t!==void 0)return t},re=e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:s,policyArns:i,policy:d,durationSeconds:u}=e;let{roleAssumerWithWebIdentity:c}=e;if(!c){const{getDefaultRoleAssumerWithWebIdentity:f}=await I(async()=>{const{getDefaultRoleAssumerWithWebIdentity:a}=await import("./index-DnN6Dyoy.js");return{getDefaultRoleAssumerWithWebIdentity:a}},__vite__mapDeps([21,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));c=f({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return c({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:s,PolicyArns:i,Policy:d,DurationSeconds:u})},de=e=>re({...e});export{ie as fromCognitoIdentity,ae as fromCognitoIdentityPool,ce as fromHttp,le as fromTemporaryCredentials,de as fromWebToken};
@@ -1 +1 @@
1
- import{r as le,n as J,i as ge,E as me,j as he,k as ye,l as Ee,p as fe,m as Ie,A as ve,o as Pe,q as Se,t as xe,D as Ce,u as Ae,w as Re,x as _e,y as we,z as be,B as De,F as Fe,G as $e,H as ke,I as Oe,J as Ue,K as Ge,M as He,a as Te,O as Me,Q as Le,V as Ne,W as je,X as ze,Y as qe,Z as Ke,_ as Be,$ as Ve,a0 as We,a1 as Je,a2 as Xe,a3 as Ye,a4 as Qe,a5 as Ze,a6 as et,T as p,C as X,g as Y}from"./index-Bdy7oQ1C.js";import{t as tt,f as ot,d as nt,a as rt,s as st,F as it}from"./normalizeProvider-EC8cbfMc.js";import{A as at}from"./AwsJson1_1Protocol-DqThCwVi.js";import"./preload-helper-BlTxHScW.js";import"./index-KfLUFT2R.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";const ct=async(e,t,n)=>({operation:ge(t).operation,region:await J(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function dt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function x(e){return{schemeId:"smithy.api#noAuth"}}const pt=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":{t.push(x());break}case"GetId":{t.push(x());break}case"GetOpenIdToken":{t.push(x());break}case"UnlinkIdentity":{t.push(x());break}default:t.push(dt(e))}return t},ut=e=>{const t=le(e);return Object.assign(t,{authSchemePreference:J(e.authSchemePreference??[])})},lt=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Q={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},gt="3.958.0",mt={version:gt},Z="required",s="fn",i="argv",f="ref",M=!0,L="isSet",P="booleanEquals",E="error",g="endpoint",y="tree",A="PartitionResult",R="getAttr",I="stringEquals",N={[Z]:!1,type:"string"},j={[Z]:!0,default:!1,type:"boolean"},z={[f]:"Endpoint"},ee={[s]:P,[i]:[{[f]:"UseFIPS"},!0]},te={[s]:P,[i]:[{[f]:"UseDualStack"},!0]},r={},v={[f]:"Region"},q={[s]:R,[i]:[{[f]:A},"supportsFIPS"]},oe={[f]:A},K={[s]:P,[i]:[!0,{[s]:R,[i]:[oe,"supportsDualStack"]}]},B=[ee],V=[te],W=[v],ht={parameters:{Region:N,UseDualStack:j,UseFIPS:j,Endpoint:N},rules:[{conditions:[{[s]:L,[i]:[z]}],rules:[{conditions:B,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:E},{conditions:V,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:E},{endpoint:{url:z,properties:r,headers:r},type:g}],type:y},{conditions:[{[s]:L,[i]:W}],rules:[{conditions:[{[s]:"aws.partition",[i]:W,assign:A}],rules:[{conditions:[ee,te],rules:[{conditions:[{[s]:P,[i]:[M,q]},K],rules:[{conditions:[{[s]:I,[i]:[v,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:r,headers:r},type:g},{conditions:[{[s]:I,[i]:[v,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:r,headers:r},type:g},{conditions:[{[s]:I,[i]:[v,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:r,headers:r},type:g},{conditions:[{[s]:I,[i]:[v,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:r,headers:r},type:g},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:r,headers:r},type:g}],type:y},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:E}],type:y},{conditions:B,rules:[{conditions:[{[s]:P,[i]:[q,M]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:r,headers:r},type:g}],type:y},{error:"FIPS is enabled but this partition does not support FIPS",type:E}],type:y},{conditions:V,rules:[{conditions:[K],rules:[{conditions:[{[s]:I,[i]:["aws",{[s]:R,[i]:[oe,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:r,headers:r},type:g},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:r,headers:r},type:g}],type:y},{error:"DualStack is enabled but this partition does not support DualStack",type:E}],type:y},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:r,headers:r},type:g}],type:y}],type:y},{error:"Invalid Configuration: Missing Region",type:E}]},yt=ht,Et=new me({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ft=(e,t={})=>Et.get(e,()=>he(yt,{endpointParams:e,logger:t.logger}));Ee.aws=ye;const It=e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??rt,base64Encoder:e?.base64Encoder??nt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ft,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??pt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new ve},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Pe}],logger:e?.logger??new Ie,protocol:e?.protocol??at,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??fe,utf8Decoder:e?.utf8Decoder??ot,utf8Encoder:e?.utf8Encoder??tt}),vt=e=>{const t=Se(e),n=()=>t().then(Fe),c=It(e);return{...c,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??we,credentialDefaultProvider:e?.credentialDefaultProvider??(d=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??_e({serviceId:c.serviceId,clientVersion:mt.version}),maxAttempts:e?.maxAttempts??Re,region:e?.region??Ae("Region is missing"),requestHandler:it.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Ce),sha256:e?.sha256??xe,streamCollector:e?.streamCollector??st,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(De)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(be))}},Pt=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,c=e.credentials;return{setHttpAuthScheme(d){const S=t.findIndex(C=>C.schemeId===d.schemeId);S===-1?t.push(d):t.splice(S,1,d)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(d){n=d},httpAuthSchemeProvider(){return n},setCredentials(d){c=d},credentials(){return c}}},St=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),xt=(e,t)=>{const n=Object.assign($e(e),ke(e),Oe(e),Pt(e));return t.forEach(c=>c.configure(n)),Object.assign(e,Ue(n),Ge(n),He(n),St(n))};class To extends Te{config;constructor(...[t]){const n=vt(t||{});super(n),this.initConfig=n;const c=lt(n),d=Me(c),S=Le(d),C=Ne(S),ae=Qe(C),ce=je(ae),de=ut(ce),pe=xt(de,t?.extensions||[]);this.config=pe,this.middlewareStack.use(ze(this.config)),this.middlewareStack.use(qe(this.config)),this.middlewareStack.use(Ke(this.config)),this.middlewareStack.use(Be(this.config)),this.middlewareStack.use(Ve(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Je(this.config)),this.middlewareStack.use(Xe(this.config,{httpAuthSchemeParametersProvider:ct,identityProviderConfigProvider:async ue=>new Ze({"aws.auth#sigv4":ue.credentials})})),this.middlewareStack.use(Ye(this.config))}destroy(){super.destroy()}}class a extends et{constructor(t){super(t),Object.setPrototypeOf(this,a.prototype)}}class _ extends a{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,_.prototype)}}class w extends a{name="InvalidParameterException";$fault="client";constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,w.prototype)}}class b extends a{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,b.prototype)}}class D extends a{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,D.prototype)}}class F extends a{name="ResourceConflictException";$fault="client";constructor(t){super({name:"ResourceConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,F.prototype)}}class $ extends a{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,$.prototype)}}class k extends a{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,k.prototype)}}class O extends a{name="ExternalServiceException";$fault="client";constructor(t){super({name:"ExternalServiceException",$fault:"client",...t}),Object.setPrototypeOf(this,O.prototype)}}class U extends a{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,U.prototype)}}class G extends a{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(t){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...t}),Object.setPrototypeOf(this,G.prototype)}}class H extends a{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,H.prototype)}}const Ct="AccountId",At="AccessKeyId",ne="Credentials",Rt="ConcurrentModificationException",_t="CustomRoleArn",wt="DeveloperUserAlreadyRegisteredException",bt="Expiration",Dt="ExternalServiceException",Ft="GetCredentialsForIdentity",$t="GetCredentialsForIdentityInput",kt="GetCredentialsForIdentityResponse",Ot="GetId",Ut="GetIdInput",Gt="GetIdResponse",Ht="InternalErrorException",T="IdentityId",Tt="InvalidIdentityPoolConfigurationException",Mt="InvalidParameterException",Lt="IdentityPoolId",Nt="IdentityProviderToken",re="Logins",jt="LimitExceededException",zt="LoginsMap",qt="NotAuthorizedException",Kt="ResourceConflictException",Bt="ResourceNotFoundException",Vt="SecretKey",Wt="SecretKeyString",Jt="SessionToken",Xt="TooManyRequestsException",m="client",u="error",h="httpError",l="message",Yt="server",se="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",o="com.amazonaws.cognitoidentity";var Qt=[0,o,Nt,8,0],Zt=[0,o,Wt,8,0],eo=[-3,o,Rt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(eo,H);var to=[3,o,ne,0,[At,Vt,Jt,bt],[0,[()=>Zt,0],0,4]],oo=[-3,o,wt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(oo,G);var no=[-3,o,Dt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(no,O);var ro=[3,o,$t,0,[T,re,_t],[0,[()=>ie,0],0]],so=[3,o,kt,0,[T,ne],[0,[()=>to,0]]],io=[3,o,Ut,0,[Ct,Lt,re],[0,0,[()=>ie,0]]],ao=[3,o,Gt,0,[T],[0]],co=[-3,o,Ht,{[u]:Yt},[l],[0]];p.for(o).registerError(co,_);var po=[-3,o,Tt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(po,U);var uo=[-3,o,Mt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(uo,w);var lo=[-3,o,jt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(lo,b);var go=[-3,o,qt,{[u]:m,[h]:403},[l],[0]];p.for(o).registerError(go,D);var mo=[-3,o,Kt,{[u]:m,[h]:409},[l],[0]];p.for(o).registerError(mo,F);var ho=[-3,o,Bt,{[u]:m,[h]:404},[l],[0]];p.for(o).registerError(ho,k);var yo=[-3,o,Xt,{[u]:m,[h]:429},[l],[0]];p.for(o).registerError(yo,$);var Eo=[-3,se,"CognitoIdentityServiceException",0,[],[]];p.for(se).registerError(Eo,a);var ie=[2,o,zt,0,[0,0],[()=>Qt,0]],fo=[9,o,Ft,0,()=>ro,()=>so],Io=[9,o,Ot,0,()=>io,()=>ao];class Mo extends X.classBuilder().ep(Q).m(function(t,n,c,d){return[Y(c,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(fo).build(){}class Lo extends X.classBuilder().ep(Q).m(function(t,n,c,d){return[Y(c,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Io).build(){}export{To as CognitoIdentityClient,Mo as GetCredentialsForIdentityCommand,Lo as GetIdCommand};
1
+ import{r as le,n as J,i as ge,E as me,j as he,k as ye,l as Ee,p as fe,m as Ie,A as ve,o as Pe,q as Se,t as xe,D as Ce,u as Ae,w as Re,x as _e,y as we,z as be,B as De,F as Fe,G as $e,H as ke,I as Oe,J as Ue,K as Ge,M as He,a as Te,O as Me,Q as Le,V as Ne,W as je,X as ze,Y as qe,Z as Ke,_ as Be,$ as Ve,a0 as We,a1 as Je,a2 as Xe,a3 as Ye,a4 as Qe,a5 as Ze,a6 as et,T as p,C as X,g as Y}from"./index-Lo_XIkxp.js";import{t as tt,f as ot,d as nt,a as rt,s as st,F as it}from"./normalizeProvider-EC8cbfMc.js";import{A as at}from"./AwsJson1_1Protocol-1sL8GPmz.js";import"./preload-helper-BlTxHScW.js";import"./index-Cdypq0le.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";const ct=async(e,t,n)=>({operation:ge(t).operation,region:await J(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function dt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function x(e){return{schemeId:"smithy.api#noAuth"}}const pt=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":{t.push(x());break}case"GetId":{t.push(x());break}case"GetOpenIdToken":{t.push(x());break}case"UnlinkIdentity":{t.push(x());break}default:t.push(dt(e))}return t},ut=e=>{const t=le(e);return Object.assign(t,{authSchemePreference:J(e.authSchemePreference??[])})},lt=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Q={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},gt="3.958.0",mt={version:gt},Z="required",s="fn",i="argv",f="ref",M=!0,L="isSet",P="booleanEquals",E="error",g="endpoint",y="tree",A="PartitionResult",R="getAttr",I="stringEquals",N={[Z]:!1,type:"string"},j={[Z]:!0,default:!1,type:"boolean"},z={[f]:"Endpoint"},ee={[s]:P,[i]:[{[f]:"UseFIPS"},!0]},te={[s]:P,[i]:[{[f]:"UseDualStack"},!0]},r={},v={[f]:"Region"},q={[s]:R,[i]:[{[f]:A},"supportsFIPS"]},oe={[f]:A},K={[s]:P,[i]:[!0,{[s]:R,[i]:[oe,"supportsDualStack"]}]},B=[ee],V=[te],W=[v],ht={parameters:{Region:N,UseDualStack:j,UseFIPS:j,Endpoint:N},rules:[{conditions:[{[s]:L,[i]:[z]}],rules:[{conditions:B,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:E},{conditions:V,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:E},{endpoint:{url:z,properties:r,headers:r},type:g}],type:y},{conditions:[{[s]:L,[i]:W}],rules:[{conditions:[{[s]:"aws.partition",[i]:W,assign:A}],rules:[{conditions:[ee,te],rules:[{conditions:[{[s]:P,[i]:[M,q]},K],rules:[{conditions:[{[s]:I,[i]:[v,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:r,headers:r},type:g},{conditions:[{[s]:I,[i]:[v,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:r,headers:r},type:g},{conditions:[{[s]:I,[i]:[v,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:r,headers:r},type:g},{conditions:[{[s]:I,[i]:[v,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:r,headers:r},type:g},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:r,headers:r},type:g}],type:y},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:E}],type:y},{conditions:B,rules:[{conditions:[{[s]:P,[i]:[q,M]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:r,headers:r},type:g}],type:y},{error:"FIPS is enabled but this partition does not support FIPS",type:E}],type:y},{conditions:V,rules:[{conditions:[K],rules:[{conditions:[{[s]:I,[i]:["aws",{[s]:R,[i]:[oe,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:r,headers:r},type:g},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:r,headers:r},type:g}],type:y},{error:"DualStack is enabled but this partition does not support DualStack",type:E}],type:y},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:r,headers:r},type:g}],type:y}],type:y},{error:"Invalid Configuration: Missing Region",type:E}]},yt=ht,Et=new me({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ft=(e,t={})=>Et.get(e,()=>he(yt,{endpointParams:e,logger:t.logger}));Ee.aws=ye;const It=e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??rt,base64Encoder:e?.base64Encoder??nt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ft,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??pt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new ve},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Pe}],logger:e?.logger??new Ie,protocol:e?.protocol??at,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??fe,utf8Decoder:e?.utf8Decoder??ot,utf8Encoder:e?.utf8Encoder??tt}),vt=e=>{const t=Se(e),n=()=>t().then(Fe),c=It(e);return{...c,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??we,credentialDefaultProvider:e?.credentialDefaultProvider??(d=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??_e({serviceId:c.serviceId,clientVersion:mt.version}),maxAttempts:e?.maxAttempts??Re,region:e?.region??Ae("Region is missing"),requestHandler:it.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Ce),sha256:e?.sha256??xe,streamCollector:e?.streamCollector??st,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(De)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(be))}},Pt=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,c=e.credentials;return{setHttpAuthScheme(d){const S=t.findIndex(C=>C.schemeId===d.schemeId);S===-1?t.push(d):t.splice(S,1,d)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(d){n=d},httpAuthSchemeProvider(){return n},setCredentials(d){c=d},credentials(){return c}}},St=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),xt=(e,t)=>{const n=Object.assign($e(e),ke(e),Oe(e),Pt(e));return t.forEach(c=>c.configure(n)),Object.assign(e,Ue(n),Ge(n),He(n),St(n))};class To extends Te{config;constructor(...[t]){const n=vt(t||{});super(n),this.initConfig=n;const c=lt(n),d=Me(c),S=Le(d),C=Ne(S),ae=Qe(C),ce=je(ae),de=ut(ce),pe=xt(de,t?.extensions||[]);this.config=pe,this.middlewareStack.use(ze(this.config)),this.middlewareStack.use(qe(this.config)),this.middlewareStack.use(Ke(this.config)),this.middlewareStack.use(Be(this.config)),this.middlewareStack.use(Ve(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Je(this.config)),this.middlewareStack.use(Xe(this.config,{httpAuthSchemeParametersProvider:ct,identityProviderConfigProvider:async ue=>new Ze({"aws.auth#sigv4":ue.credentials})})),this.middlewareStack.use(Ye(this.config))}destroy(){super.destroy()}}class a extends et{constructor(t){super(t),Object.setPrototypeOf(this,a.prototype)}}class _ extends a{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,_.prototype)}}class w extends a{name="InvalidParameterException";$fault="client";constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,w.prototype)}}class b extends a{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,b.prototype)}}class D extends a{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,D.prototype)}}class F extends a{name="ResourceConflictException";$fault="client";constructor(t){super({name:"ResourceConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,F.prototype)}}class $ extends a{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,$.prototype)}}class k extends a{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,k.prototype)}}class O extends a{name="ExternalServiceException";$fault="client";constructor(t){super({name:"ExternalServiceException",$fault:"client",...t}),Object.setPrototypeOf(this,O.prototype)}}class U extends a{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,U.prototype)}}class G extends a{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(t){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...t}),Object.setPrototypeOf(this,G.prototype)}}class H extends a{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,H.prototype)}}const Ct="AccountId",At="AccessKeyId",ne="Credentials",Rt="ConcurrentModificationException",_t="CustomRoleArn",wt="DeveloperUserAlreadyRegisteredException",bt="Expiration",Dt="ExternalServiceException",Ft="GetCredentialsForIdentity",$t="GetCredentialsForIdentityInput",kt="GetCredentialsForIdentityResponse",Ot="GetId",Ut="GetIdInput",Gt="GetIdResponse",Ht="InternalErrorException",T="IdentityId",Tt="InvalidIdentityPoolConfigurationException",Mt="InvalidParameterException",Lt="IdentityPoolId",Nt="IdentityProviderToken",re="Logins",jt="LimitExceededException",zt="LoginsMap",qt="NotAuthorizedException",Kt="ResourceConflictException",Bt="ResourceNotFoundException",Vt="SecretKey",Wt="SecretKeyString",Jt="SessionToken",Xt="TooManyRequestsException",m="client",u="error",h="httpError",l="message",Yt="server",se="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",o="com.amazonaws.cognitoidentity";var Qt=[0,o,Nt,8,0],Zt=[0,o,Wt,8,0],eo=[-3,o,Rt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(eo,H);var to=[3,o,ne,0,[At,Vt,Jt,bt],[0,[()=>Zt,0],0,4]],oo=[-3,o,wt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(oo,G);var no=[-3,o,Dt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(no,O);var ro=[3,o,$t,0,[T,re,_t],[0,[()=>ie,0],0]],so=[3,o,kt,0,[T,ne],[0,[()=>to,0]]],io=[3,o,Ut,0,[Ct,Lt,re],[0,0,[()=>ie,0]]],ao=[3,o,Gt,0,[T],[0]],co=[-3,o,Ht,{[u]:Yt},[l],[0]];p.for(o).registerError(co,_);var po=[-3,o,Tt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(po,U);var uo=[-3,o,Mt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(uo,w);var lo=[-3,o,jt,{[u]:m,[h]:400},[l],[0]];p.for(o).registerError(lo,b);var go=[-3,o,qt,{[u]:m,[h]:403},[l],[0]];p.for(o).registerError(go,D);var mo=[-3,o,Kt,{[u]:m,[h]:409},[l],[0]];p.for(o).registerError(mo,F);var ho=[-3,o,Bt,{[u]:m,[h]:404},[l],[0]];p.for(o).registerError(ho,k);var yo=[-3,o,Xt,{[u]:m,[h]:429},[l],[0]];p.for(o).registerError(yo,$);var Eo=[-3,se,"CognitoIdentityServiceException",0,[],[]];p.for(se).registerError(Eo,a);var ie=[2,o,zt,0,[0,0],[()=>Qt,0]],fo=[9,o,Ft,0,()=>ro,()=>so],Io=[9,o,Ot,0,()=>io,()=>ao];class Mo extends X.classBuilder().ep(Q).m(function(t,n,c,d){return[Y(c,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(fo).build(){}class Lo extends X.classBuilder().ep(Q).m(function(t,n,c,d){return[Y(c,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Io).build(){}export{To as CognitoIdentityClient,Mo as GetCredentialsForIdentityCommand,Lo as GetIdCommand};
@@ -1 +1 @@
1
- import{a7 as qe,b as F,e as Se,L as Ge,N as Ee,S as be,U as Je,v as Xe,f as Ze,R as Ye,P as et,h as tt,c as oe,T as C,r as st,n as we,i as rt,E as nt,j as ot,k as it,l as at,p as ct,m as dt,A as ut,o as lt,q as mt,t as ht,D as pt,u as ft,w as gt,x as yt,y as St,z as Et,B as bt,F as wt,G as Pt,H as Tt,I as At,J as xt,K as Ct,M as Rt,a as Dt,O as It,Q as _t,V as Nt,W as $t,X as kt,Y as vt,Z as Mt,_ as Ft,$ as Ot,a0 as Ut,a1 as zt,a2 as Lt,a3 as jt,a4 as Wt,a5 as Kt,a6 as Vt,C as Ht,g as Bt}from"./index-Bdy7oQ1C.js";import{a as j,t as W,d as Pe,e as Qt,f as qt,s as Gt,F as Jt}from"./normalizeProvider-EC8cbfMc.js";function ie(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const K="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",V="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",H="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Te="(\\d?\\d)",Ae="(\\d{4})",Xt=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),Zt=new RegExp(`^${K}, ${Te} ${V} ${Ae} ${H} GMT$`),Yt=new RegExp(`^${K}, ${Te}-${V}-(\\d\\d) ${H} GMT$`),es=new RegExp(`^${K} ${V} ( [1-9]|\\d\\d) ${H} ${Ae}$`),ts=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ss=r=>{if(r==null)return;let t=NaN;if(typeof r=="number")t=r;else if(typeof r=="string"){if(!/^-?\d*\.?\d+$/.test(r))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(r)}else typeof r=="object"&&r.tag===1&&(t=r.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},rs=r=>{if(r==null)return;if(typeof r!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=Xt.exec(r);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${r}`);const[,e,s,n,o,i,a,,c,d]=t;x(s,1,12),x(n,1,31),x(o,0,23),x(i,0,59),x(a,0,60);const l=new Date(Date.UTC(Number(e),Number(s)-1,Number(n),Number(o),Number(i),Number(a),Number(c)?Math.round(parseFloat(`0.${c}`)*1e3):0));if(l.setUTCFullYear(Number(e)),d.toUpperCase()!="Z"){const[,f,w,E]=/([+-])(\d\d):(\d\d)/.exec(d)||[void 0,"+",0,0],R=f==="-"?1:-1;l.setTime(l.getTime()+R*(Number(w)*60*60*1e3+Number(E)*60*1e3))}return l},ns=r=>{if(r==null)return;if(typeof r!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,e,s,n,o,i,a,c;if((c=Zt.exec(r))?[,t,e,s,n,o,i,a]=c:(c=Yt.exec(r))?([,t,e,s,n,o,i,a]=c,s=(Number(s)+1900).toString()):(c=es.exec(r))&&([,e,t,n,o,i,a,s]=c),s&&i){const d=Date.UTC(Number(s),ts.indexOf(e),Number(t),Number(n),Number(o),Number(i),a?Math.round(parseFloat(`0.${a}`)*1e3):0);x(t,1,31),x(n,0,23),x(o,0,59),x(i,0,60);const l=new Date(d);return l.setUTCFullYear(Number(s)),l}throw new TypeError(`Invalid RFC7231 date-time value ${r}.`)};function x(r,t,e){const s=Number(r);if(s<t||s>e)throw new Error(`Value ${s} out of range [${t}, ${e}]`)}const os=r=>{const t=r.length,e=[];let s=!1,n,o=0;for(let i=0;i<t;++i){const a=r[i];switch(a){case'"':n!=="\\"&&(s=!s);break;case",":s||(e.push(r.slice(o,i)),o=i+1);break}n=a}return e.push(r.slice(o)),e.map(i=>{i=i.trim();const a=i.length;return a<2?i:(i[0]==='"'&&i[a-1]==='"'&&(i=i.slice(1,a-1)),i.replace(/\\"/g,'"'))})};class is extends qe{settings;constructor(t){super(),this.settings=t}read(t,e){const s=F.of(t);if(s.isListSchema())return os(e).map(n=>this.read(s.getValueSchema(),n));if(s.isBlobSchema())return(this.serdeContext?.base64Decoder??j)(e);if(s.isTimestampSchema())switch(Se(s,this.settings)){case 5:return rs(e);case 6:return ns(e);case 7:return ss(e);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",e),new Date(e)}if(s.isStringSchema()){const n=s.getMergedTraits().mediaType;let o=e;if(n)return s.getMergedTraits().httpHeader&&(o=this.base64ToUtf8(o)),(n==="application/json"||n.endsWith("+json"))&&(o=Ge.from(o)),o}return s.isNumericSchema()?Number(e):s.isBigIntegerSchema()?BigInt(e):s.isBigDecimalSchema()?new Ee(e,"bigDecimal"):s.isBooleanSchema()?String(e).toLowerCase()==="true":e}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??W)((this.serdeContext?.base64Decoder??j)(t))}}const xe=r=>{const t="#text";for(const e in r)r.hasOwnProperty(e)&&r[e][t]!==void 0?r[e]=r[e][t]:typeof r[e]=="object"&&r[e]!==null&&(r[e]=xe(r[e]));return r};let U;function as(r){U||(U=new DOMParser);const t=U.parseFromString(r,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const e=s=>{if(s.nodeType===Node.TEXT_NODE&&s.textContent?.trim())return s.textContent;if(s.nodeType===Node.ELEMENT_NODE){const n=s;if(n.attributes.length===0&&n.childNodes.length===0)return"";const o={},i=Array.from(n.attributes);for(const c of i)o[`${c.name}`]=c.value;const a=Array.from(n.childNodes);for(const c of a){const d=e(c);if(d!=null){const l=c.nodeName;if(a.length===1&&i.length===0&&l==="#text")return d;o[l]?Array.isArray(o[l])?o[l].push(d):o[l]=[o[l],d]:o[l]=d}else if(a.length===1&&i.length===0)return n.textContent}return o}return null};return{[t.documentElement.nodeName]:e(t.documentElement)}}class cs extends be{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new is(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,e,s){const n=F.of(t),o=n.getMemberSchemas();if(n.isStructSchema()&&n.isMemberSchema()&&!!Object.values(o).find(d=>!!d.getMemberTraits().eventPayload)){const d={},l=Object.keys(o)[0];return o[l].isBlobSchema()?d[l]=e:d[l]=this.read(o[l],e),d}const a=(this.serdeContext?.utf8Encoder??W)(e),c=this.parseXml(a);return this.readSchema(t,s?c[s]:c)}readSchema(t,e){const s=F.of(t);if(s.isUnitSchema())return;const n=s.getMergedTraits();if(s.isListSchema()&&!Array.isArray(e))return this.readSchema(s,[e]);if(e==null)return e;if(typeof e=="object"){const o=!!n.sparse,i=!!n.xmlFlattened;if(s.isListSchema()){const c=s.getValueSchema(),d=[],l=c.getMergedTraits().xmlName??"member",f=i?e:(e[0]??e)[l],w=Array.isArray(f)?f:[f];for(const E of w)(E!=null||o)&&d.push(this.readSchema(c,E));return d}const a={};if(s.isMapSchema()){const c=s.getKeySchema(),d=s.getValueSchema();let l;i?l=Array.isArray(e)?e:[e]:l=Array.isArray(e.entry)?e.entry:[e.entry];const f=c.getMergedTraits().xmlName??"key",w=d.getMergedTraits().xmlName??"value";for(const E of l){const R=E[f],O=E[w];(O!=null||o)&&(a[R]=this.readSchema(d,O))}return a}if(s.isStructSchema()){const c=s.isUnionSchema();let d;c&&(d=new Je(e,a));for(const[l,f]of s.structIterator()){const w=f.getMergedTraits(),E=w.httpPayload?w.xmlName??f.getName():f.getMemberTraits().xmlName??l;c&&d.mark(E),e[E]!=null&&(a[l]=this.readSchema(f,e[E]))}return c&&d.writeUnknown(),a}if(s.isDocumentSchema())return e;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${s.getName(!0)}`)}return s.isListSchema()?[]:s.isMapSchema()||s.isStructSchema()?{}:this.stringDeserializer.read(s,e)}parseXml(t){if(t.length){let e;try{e=as(t)}catch(i){throw i&&typeof i=="object"&&Object.defineProperty(i,"$responseBodyText",{value:t}),i}const s="#text",n=Object.keys(e)[0],o=e[n];return o[s]&&(o[n]=o[s],delete o[s]),xe(o)}return{}}}class ds extends be{settings;buffer;constructor(t){super(),this.settings=t}write(t,e,s=""){this.buffer===void 0&&(this.buffer="");const n=F.of(t);if(s&&!s.endsWith(".")&&(s+="."),n.isBlobSchema())(typeof e=="string"||e instanceof Uint8Array)&&(this.writeKey(s),this.writeValue((this.serdeContext?.base64Encoder??Pe)(e)));else if(n.isBooleanSchema()||n.isNumericSchema()||n.isStringSchema())e!=null?(this.writeKey(s),this.writeValue(String(e))):n.isIdempotencyToken()&&(this.writeKey(s),this.writeValue(Xe()));else if(n.isBigIntegerSchema())e!=null&&(this.writeKey(s),this.writeValue(String(e)));else if(n.isBigDecimalSchema())e!=null&&(this.writeKey(s),this.writeValue(e instanceof Ee?e.string:String(e)));else if(n.isTimestampSchema()){if(e instanceof Date)switch(this.writeKey(s),Se(n,this.settings)){case 5:this.writeValue(e.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(Qt(e));break;case 7:this.writeValue(String(e.getTime()/1e3));break}}else if(n.isDocumentSchema())Array.isArray(e)?this.write(79,e,s):e instanceof Date?this.write(4,e,s):e instanceof Uint8Array?this.write(21,e,s):e&&typeof e=="object"?this.write(143,e,s):(this.writeKey(s),this.writeValue(String(e)));else if(n.isListSchema()){if(Array.isArray(e))if(e.length===0)this.settings.serializeEmptyLists&&(this.writeKey(s),this.writeValue(""));else{const o=n.getValueSchema(),i=this.settings.flattenLists||n.getMergedTraits().xmlFlattened;let a=1;for(const c of e){if(c==null)continue;const d=this.getKey("member",o.getMergedTraits().xmlName),l=i?`${s}${a}`:`${s}${d}.${a}`;this.write(o,c,l),++a}}}else if(n.isMapSchema()){if(e&&typeof e=="object"){const o=n.getKeySchema(),i=n.getValueSchema(),a=n.getMergedTraits().xmlFlattened;let c=1;for(const[d,l]of Object.entries(e)){if(l==null)continue;const f=this.getKey("key",o.getMergedTraits().xmlName),w=a?`${s}${c}.${f}`:`${s}entry.${c}.${f}`,E=this.getKey("value",i.getMergedTraits().xmlName),R=a?`${s}${c}.${E}`:`${s}entry.${c}.${E}`;this.write(o,d,w),this.write(i,l,R),++c}}}else if(n.isStructSchema()){if(e&&typeof e=="object"){let o=!1;for(const[i,a]of Ze(n,e)){if(e[i]==null&&!a.isIdempotencyToken())continue;const c=this.getKey(i,a.getMergedTraits().xmlName),d=`${s}${c}`;this.write(a,e[i],d),o=!0}if(!o&&n.isUnionSchema()){const{$unknown:i}=e;if(Array.isArray(i)){const[a,c]=i,d=`${s}${a}`;this.write(15,c,d)}}}}else if(!n.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${n.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,e){const s=e??t;return this.settings.capitalizeKeys?s[0].toUpperCase()+s.slice(1):s}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${ie(t)}=`}writeValue(t){this.buffer+=ie(t)}}class us extends Ye{options;serializer;deserializer;mixin=new et;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const e={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new ds(e),this.deserializer=new cs(e)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,e,s){const n=await super.serializeRequest(t,e,s);n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":"application/x-www-form-urlencoded"}),(tt(t.input)==="unit"||!n.body)&&(n.body="");const o=t.name.split("#")[1]??t.name;return n.body=`Action=${o}&Version=${this.options.version}`+n.body,n.body.endsWith("&")&&(n.body=n.body.slice(-1)),n}async deserializeResponse(t,e,s){const n=this.deserializer,o=F.of(t.output),i={};if(s.statusCode>=300){const f=await oe(s.body,e);f.byteLength>0&&Object.assign(i,await n.read(15,f)),await this.handleError(t,e,s,i,this.deserializeMetadata(s))}for(const f in s.headers){const w=s.headers[f];delete s.headers[f],s.headers[f.toLowerCase()]=w}const a=t.name.split("#")[1]??t.name,c=o.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,d=await oe(s.body,e);return d.byteLength>0&&Object.assign(i,await n.read(o,d,c)),{$metadata:this.deserializeMetadata(s),...i}}useNestedResult(){return!0}async handleError(t,e,s,n,o){const i=this.loadQueryErrorCode(s,n)??"Unknown",a=this.loadQueryError(n),c=this.loadQueryErrorMessage(n);a.message=c,a.Error={Type:a.Type,Code:a.Code,Message:c};const{errorSchema:d,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,s,a,o,this.mixin.findQueryCompatibleError),f=F.of(d),w=C.for(d[1]).getErrorCtor(d)??Error,E=new w(c),R={Type:a.Error.Type,Code:a.Error.Code,Error:a.Error};for(const[O,re]of f.structIterator()){const ne=re.getMergedTraits().xmlName??O,Qe=a[ne]??n[ne];R[O]=this.deserializer.readSchema(re,Qe)}throw this.mixin.decorateServiceException(Object.assign(E,l,{$fault:f.getMergedTraits().error,message:c},R),n)}loadQueryErrorCode(t,e){const s=(e.Errors?.[0]?.Error??e.Errors?.Error??e.Error)?.Code;if(s!==void 0)return s;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const e=this.loadQueryError(t);return e?.message??e?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const ls=async(r,t,e)=>({operation:rt(t).operation,region:await we(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function ms(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:r.region},propertiesExtractor:(t,e)=>({signingProperties:{config:t,context:e}})}}function hs(r){return{schemeId:"smithy.api#noAuth"}}const ps=r=>{const t=[];switch(r.operation){case"AssumeRoleWithWebIdentity":{t.push(hs());break}default:t.push(ms(r))}return t},fs=r=>Object.assign(r,{stsClientCtor:Fe}),gs=r=>{const t=fs(r),e=st(t);return Object.assign(e,{authSchemePreference:we(r.authSchemePreference??[])})},ys=r=>Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Ss={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"}},Es="3.958.0",bs={version:Es},Ce="required",u="type",m="fn",h="argv",I="ref",ae=!1,z=!0,D="booleanEquals",y="stringEquals",Re="sigv4",De="sts",Ie="us-east-1",g="endpoint",ce="https://sts.{Region}.{PartitionResult#dnsSuffix}",T="tree",M="error",B="getAttr",de={[Ce]:!1,[u]:"string"},L={[Ce]:!0,default:!1,[u]:"boolean"},_e={[I]:"Endpoint"},ue={[m]:"isSet",[h]:[{[I]:"Region"}]},S={[I]:"Region"},le={[m]:"aws.partition",[h]:[S],assign:"PartitionResult"},Ne={[I]:"UseFIPS"},$e={[I]:"UseDualStack"},b={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:Re,signingName:De,signingRegion:Ie}]},headers:{}},P={},me={conditions:[{[m]:y,[h]:[S,"aws-global"]}],[g]:b,[u]:g},ke={[m]:D,[h]:[Ne,!0]},ve={[m]:D,[h]:[$e,!0]},he={[m]:B,[h]:[{[I]:"PartitionResult"},"supportsFIPS"]},Me={[I]:"PartitionResult"},pe={[m]:D,[h]:[!0,{[m]:B,[h]:[Me,"supportsDualStack"]}]},fe=[{[m]:"isSet",[h]:[_e]}],ge=[ke],ye=[ve],ws={parameters:{Region:de,UseDualStack:L,UseFIPS:L,Endpoint:de,UseGlobalEndpoint:L},rules:[{conditions:[{[m]:D,[h]:[{[I]:"UseGlobalEndpoint"},z]},{[m]:"not",[h]:fe},ue,le,{[m]:D,[h]:[Ne,ae]},{[m]:D,[h]:[$e,ae]}],rules:[{conditions:[{[m]:y,[h]:[S,"ap-northeast-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"ap-south-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"ap-southeast-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"ap-southeast-2"]}],endpoint:b,[u]:g},me,{conditions:[{[m]:y,[h]:[S,"ca-central-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"eu-central-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"eu-north-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"eu-west-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"eu-west-2"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"eu-west-3"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"sa-east-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,Ie]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"us-east-2"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"us-west-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"us-west-2"]}],endpoint:b,[u]:g},{endpoint:{url:ce,properties:{authSchemes:[{name:Re,signingName:De,signingRegion:"{Region}"}]},headers:P},[u]:g}],[u]:T},{conditions:fe,rules:[{conditions:ge,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[u]:M},{conditions:ye,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[u]:M},{endpoint:{url:_e,properties:P,headers:P},[u]:g}],[u]:T},{conditions:[ue],rules:[{conditions:[le],rules:[{conditions:[ke,ve],rules:[{conditions:[{[m]:D,[h]:[z,he]},pe],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},[u]:g}],[u]:T},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[u]:M}],[u]:T},{conditions:ge,rules:[{conditions:[{[m]:D,[h]:[he,z]}],rules:[{conditions:[{[m]:y,[h]:[{[m]:B,[h]:[Me,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:P,headers:P},[u]:g},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},[u]:g}],[u]:T},{error:"FIPS is enabled but this partition does not support FIPS",[u]:M}],[u]:T},{conditions:ye,rules:[{conditions:[pe],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},[u]:g}],[u]:T},{error:"DualStack is enabled but this partition does not support DualStack",[u]:M}],[u]:T},me,{endpoint:{url:ce,properties:P,headers:P},[u]:g}],[u]:T}],[u]:T},{error:"Invalid Configuration: Missing Region",[u]:M}]},Ps=ws,Ts=new nt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),As=(r,t={})=>Ts.get(r,()=>ot(Ps,{endpointParams:r,logger:t.logger}));at.aws=it;const xs=r=>({apiVersion:"2011-06-15",base64Decoder:r?.base64Decoder??j,base64Encoder:r?.base64Encoder??Pe,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??As,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??ps,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new ut},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new lt}],logger:r?.logger??new dt,protocol:r?.protocol??us,protocolSettings:r?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:r?.serviceId??"STS",urlParser:r?.urlParser??ct,utf8Decoder:r?.utf8Decoder??qt,utf8Encoder:r?.utf8Encoder??W}),Cs=r=>{const t=mt(r),e=()=>t().then(wt),s=xs(r);return{...s,...r,runtime:"browser",defaultsMode:t,bodyLengthChecker:r?.bodyLengthChecker??St,credentialDefaultProvider:r?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:r?.defaultUserAgentProvider??yt({serviceId:s.serviceId,clientVersion:bs.version}),maxAttempts:r?.maxAttempts??gt,region:r?.region??ft("Region is missing"),requestHandler:Jt.create(r?.requestHandler??e),retryMode:r?.retryMode??(async()=>(await e()).retryMode||pt),sha256:r?.sha256??ht,streamCollector:r?.streamCollector??Gt,useDualstackEndpoint:r?.useDualstackEndpoint??(()=>Promise.resolve(bt)),useFipsEndpoint:r?.useFipsEndpoint??(()=>Promise.resolve(Et))}},Rs=r=>{const t=r.httpAuthSchemes;let e=r.httpAuthSchemeProvider,s=r.credentials;return{setHttpAuthScheme(n){const o=t.findIndex(i=>i.schemeId===n.schemeId);o===-1?t.push(n):t.splice(o,1,n)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(n){e=n},httpAuthSchemeProvider(){return e},setCredentials(n){s=n},credentials(){return s}}},Ds=r=>({httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}),Is=(r,t)=>{const e=Object.assign(Pt(r),Tt(r),At(r),Rs(r));return t.forEach(s=>s.configure(e)),Object.assign(r,xt(e),Ct(e),Rt(e),Ds(e))};class Fe extends Dt{config;constructor(...[t]){const e=Cs(t||{});super(e),this.initConfig=e;const s=ys(e),n=It(s),o=_t(n),i=Nt(o),a=Wt(i),c=$t(a),d=gs(c),l=Is(d,t?.extensions||[]);this.config=l,this.middlewareStack.use(kt(this.config)),this.middlewareStack.use(vt(this.config)),this.middlewareStack.use(Mt(this.config)),this.middlewareStack.use(Ft(this.config)),this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Ut(this.config)),this.middlewareStack.use(zt(this.config)),this.middlewareStack.use(Lt(this.config,{httpAuthSchemeParametersProvider:ls,identityProviderConfigProvider:async f=>new Kt({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(jt(this.config))}destroy(){super.destroy()}}class A extends Vt{constructor(t){super(t),Object.setPrototypeOf(this,A.prototype)}}class Q extends A{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Q.prototype)}}class q extends A{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,q.prototype)}}class G extends A{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,G.prototype)}}class J extends A{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,J.prototype)}}class X extends A{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,X.prototype)}}class Z extends A{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Z.prototype)}}class Y extends A{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,Y.prototype)}}const _s="Arn",Ns="AccessKeyId",$s="AssumeRole",ks="AssumedRoleId",vs="AssumeRoleRequest",Ms="AssumeRoleResponse",ee="AssumedRoleUser",Fs="AssumeRoleWithWebIdentity",Os="AssumeRoleWithWebIdentityRequest",Us="AssumeRoleWithWebIdentityResponse",zs="Audience",te="Credentials",Ls="ContextAssertion",Oe="DurationSeconds",js="Expiration",Ws="ExternalId",Ks="ExpiredTokenException",Vs="IDPCommunicationErrorException",Hs="IDPRejectedClaimException",Bs="InvalidIdentityTokenException",Qs="Key",qs="MalformedPolicyDocumentException",Ue="Policy",ze="PolicyArns",Gs="ProviderArn",Js="ProvidedContexts",Xs="ProvidedContextsListType",Zs="ProvidedContext",Ys="PolicyDescriptorType",er="ProviderId",Le="PackedPolicySize",tr="PackedPolicyTooLargeException",sr="Provider",je="RoleArn",rr="RegionDisabledException",We="RoleSessionName",nr="SecretAccessKey",or="SubjectFromWebIdentityToken",se="SourceIdentity",ir="SerialNumber",ar="SessionToken",cr="Tags",dr="TokenCode",ur="TransitiveTagKeys",lr="Tag",mr="Value",hr="WebIdentityToken",pr="arn",fr="accessKeySecretType",_="awsQueryError",N="client",gr="clientTokenType",$="error",k="httpError",v="message",yr="policyDescriptorListType",Ke="smithy.ts.sdk.synthetic.com.amazonaws.sts",Sr="tagListType",p="com.amazonaws.sts";var Er=[0,p,fr,8,0],br=[0,p,gr,8,0],Ve=[3,p,ee,0,[ks,_s],[0,0]],wr=[3,p,vs,0,[je,We,ze,Ue,Oe,cr,ur,Ws,ir,dr,se,Js],[0,0,()=>Be,0,1,()=>Or,64,0,0,0,0,()=>Fr]],Pr=[3,p,Ms,0,[te,ee,Le,se],[[()=>He,0],()=>Ve,1,0]],Tr=[3,p,Os,0,[je,We,hr,er,ze,Ue,Oe],[0,0,[()=>br,0],0,()=>Be,0,1]],Ar=[3,p,Us,0,[te,or,ee,Le,sr,zs,se],[[()=>He,0],0,()=>Ve,1,0,0,0]],He=[3,p,te,0,[Ns,nr,ar,js],[0,[()=>Er,0],0,4]],xr=[-3,p,Ks,{[_]:["ExpiredTokenException",400],[$]:N,[k]:400},[v],[0]];C.for(p).registerError(xr,Q);var Cr=[-3,p,Vs,{[_]:["IDPCommunicationError",400],[$]:N,[k]:400},[v],[0]];C.for(p).registerError(Cr,Y);var Rr=[-3,p,Hs,{[_]:["IDPRejectedClaim",403],[$]:N,[k]:403},[v],[0]];C.for(p).registerError(Rr,X);var Dr=[-3,p,Bs,{[_]:["InvalidIdentityToken",400],[$]:N,[k]:400},[v],[0]];C.for(p).registerError(Dr,Z);var Ir=[-3,p,qs,{[_]:["MalformedPolicyDocument",400],[$]:N,[k]:400},[v],[0]];C.for(p).registerError(Ir,q);var _r=[-3,p,tr,{[_]:["PackedPolicyTooLarge",400],[$]:N,[k]:400},[v],[0]];C.for(p).registerError(_r,G);var Nr=[3,p,Ys,0,[pr],[0]],$r=[3,p,Zs,0,[Gs,Ls],[0,0]],kr=[-3,p,rr,{[_]:["RegionDisabledException",403],[$]:N,[k]:403},[v],[0]];C.for(p).registerError(kr,J);var vr=[3,p,lr,0,[Qs,mr],[0,0]],Mr=[-3,Ke,"STSServiceException",0,[],[]];C.for(Ke).registerError(Mr,A);var Be=[1,p,yr,0,()=>Nr],Fr=[1,p,Xs,0,()=>$r],Or=[1,p,Sr,0,()=>vr],Ur=[9,p,$s,0,()=>wr,()=>Pr],Wr=[9,p,Fs,0,()=>Tr,()=>Ar];class zr extends Ht.classBuilder().ep(Ss).m(function(t,e,s,n){return[Bt(s,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Ur).build(){}const Kr=Object.freeze(Object.defineProperty({__proto__:null,AssumeRoleCommand:zr,STSClient:Fe},Symbol.toStringTag,{value:"Module"}));export{Wr as A,He as C,xr as E,Cr as I,Ir as M,_r as P,kr as R,Fe as S,vr as T,A as a,zr as b,Ss as c,Ve as d,wr as e,Pr as f,Tr as g,Ar as h,Rr as i,Dr as j,Nr as k,$r as l,Mr as m,Ur as n,Q as o,q as p,G as q,J as r,X as s,Z as t,Y as u,Kr as v};
1
+ import{a7 as qe,b as F,e as Se,L as Ge,N as Ee,S as be,U as Je,v as Xe,f as Ze,R as Ye,P as et,h as tt,c as oe,T as C,r as st,n as we,i as rt,E as nt,j as ot,k as it,l as at,p as ct,m as dt,A as ut,o as lt,q as mt,t as ht,D as pt,u as ft,w as gt,x as yt,y as St,z as Et,B as bt,F as wt,G as Pt,H as Tt,I as At,J as xt,K as Ct,M as Rt,a as Dt,O as It,Q as _t,V as Nt,W as $t,X as kt,Y as vt,Z as Mt,_ as Ft,$ as Ot,a0 as Ut,a1 as zt,a2 as Lt,a3 as jt,a4 as Wt,a5 as Kt,a6 as Vt,C as Ht,g as Bt}from"./index-Lo_XIkxp.js";import{a as j,t as W,d as Pe,e as Qt,f as qt,s as Gt,F as Jt}from"./normalizeProvider-EC8cbfMc.js";function ie(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const K="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",V="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",H="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Te="(\\d?\\d)",Ae="(\\d{4})",Xt=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),Zt=new RegExp(`^${K}, ${Te} ${V} ${Ae} ${H} GMT$`),Yt=new RegExp(`^${K}, ${Te}-${V}-(\\d\\d) ${H} GMT$`),es=new RegExp(`^${K} ${V} ( [1-9]|\\d\\d) ${H} ${Ae}$`),ts=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ss=r=>{if(r==null)return;let t=NaN;if(typeof r=="number")t=r;else if(typeof r=="string"){if(!/^-?\d*\.?\d+$/.test(r))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(r)}else typeof r=="object"&&r.tag===1&&(t=r.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},rs=r=>{if(r==null)return;if(typeof r!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=Xt.exec(r);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${r}`);const[,e,s,n,o,i,a,,c,d]=t;x(s,1,12),x(n,1,31),x(o,0,23),x(i,0,59),x(a,0,60);const l=new Date(Date.UTC(Number(e),Number(s)-1,Number(n),Number(o),Number(i),Number(a),Number(c)?Math.round(parseFloat(`0.${c}`)*1e3):0));if(l.setUTCFullYear(Number(e)),d.toUpperCase()!="Z"){const[,f,w,E]=/([+-])(\d\d):(\d\d)/.exec(d)||[void 0,"+",0,0],R=f==="-"?1:-1;l.setTime(l.getTime()+R*(Number(w)*60*60*1e3+Number(E)*60*1e3))}return l},ns=r=>{if(r==null)return;if(typeof r!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,e,s,n,o,i,a,c;if((c=Zt.exec(r))?[,t,e,s,n,o,i,a]=c:(c=Yt.exec(r))?([,t,e,s,n,o,i,a]=c,s=(Number(s)+1900).toString()):(c=es.exec(r))&&([,e,t,n,o,i,a,s]=c),s&&i){const d=Date.UTC(Number(s),ts.indexOf(e),Number(t),Number(n),Number(o),Number(i),a?Math.round(parseFloat(`0.${a}`)*1e3):0);x(t,1,31),x(n,0,23),x(o,0,59),x(i,0,60);const l=new Date(d);return l.setUTCFullYear(Number(s)),l}throw new TypeError(`Invalid RFC7231 date-time value ${r}.`)};function x(r,t,e){const s=Number(r);if(s<t||s>e)throw new Error(`Value ${s} out of range [${t}, ${e}]`)}const os=r=>{const t=r.length,e=[];let s=!1,n,o=0;for(let i=0;i<t;++i){const a=r[i];switch(a){case'"':n!=="\\"&&(s=!s);break;case",":s||(e.push(r.slice(o,i)),o=i+1);break}n=a}return e.push(r.slice(o)),e.map(i=>{i=i.trim();const a=i.length;return a<2?i:(i[0]==='"'&&i[a-1]==='"'&&(i=i.slice(1,a-1)),i.replace(/\\"/g,'"'))})};class is extends qe{settings;constructor(t){super(),this.settings=t}read(t,e){const s=F.of(t);if(s.isListSchema())return os(e).map(n=>this.read(s.getValueSchema(),n));if(s.isBlobSchema())return(this.serdeContext?.base64Decoder??j)(e);if(s.isTimestampSchema())switch(Se(s,this.settings)){case 5:return rs(e);case 6:return ns(e);case 7:return ss(e);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",e),new Date(e)}if(s.isStringSchema()){const n=s.getMergedTraits().mediaType;let o=e;if(n)return s.getMergedTraits().httpHeader&&(o=this.base64ToUtf8(o)),(n==="application/json"||n.endsWith("+json"))&&(o=Ge.from(o)),o}return s.isNumericSchema()?Number(e):s.isBigIntegerSchema()?BigInt(e):s.isBigDecimalSchema()?new Ee(e,"bigDecimal"):s.isBooleanSchema()?String(e).toLowerCase()==="true":e}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??W)((this.serdeContext?.base64Decoder??j)(t))}}const xe=r=>{const t="#text";for(const e in r)r.hasOwnProperty(e)&&r[e][t]!==void 0?r[e]=r[e][t]:typeof r[e]=="object"&&r[e]!==null&&(r[e]=xe(r[e]));return r};let U;function as(r){U||(U=new DOMParser);const t=U.parseFromString(r,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const e=s=>{if(s.nodeType===Node.TEXT_NODE&&s.textContent?.trim())return s.textContent;if(s.nodeType===Node.ELEMENT_NODE){const n=s;if(n.attributes.length===0&&n.childNodes.length===0)return"";const o={},i=Array.from(n.attributes);for(const c of i)o[`${c.name}`]=c.value;const a=Array.from(n.childNodes);for(const c of a){const d=e(c);if(d!=null){const l=c.nodeName;if(a.length===1&&i.length===0&&l==="#text")return d;o[l]?Array.isArray(o[l])?o[l].push(d):o[l]=[o[l],d]:o[l]=d}else if(a.length===1&&i.length===0)return n.textContent}return o}return null};return{[t.documentElement.nodeName]:e(t.documentElement)}}class cs extends be{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new is(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,e,s){const n=F.of(t),o=n.getMemberSchemas();if(n.isStructSchema()&&n.isMemberSchema()&&!!Object.values(o).find(d=>!!d.getMemberTraits().eventPayload)){const d={},l=Object.keys(o)[0];return o[l].isBlobSchema()?d[l]=e:d[l]=this.read(o[l],e),d}const a=(this.serdeContext?.utf8Encoder??W)(e),c=this.parseXml(a);return this.readSchema(t,s?c[s]:c)}readSchema(t,e){const s=F.of(t);if(s.isUnitSchema())return;const n=s.getMergedTraits();if(s.isListSchema()&&!Array.isArray(e))return this.readSchema(s,[e]);if(e==null)return e;if(typeof e=="object"){const o=!!n.sparse,i=!!n.xmlFlattened;if(s.isListSchema()){const c=s.getValueSchema(),d=[],l=c.getMergedTraits().xmlName??"member",f=i?e:(e[0]??e)[l],w=Array.isArray(f)?f:[f];for(const E of w)(E!=null||o)&&d.push(this.readSchema(c,E));return d}const a={};if(s.isMapSchema()){const c=s.getKeySchema(),d=s.getValueSchema();let l;i?l=Array.isArray(e)?e:[e]:l=Array.isArray(e.entry)?e.entry:[e.entry];const f=c.getMergedTraits().xmlName??"key",w=d.getMergedTraits().xmlName??"value";for(const E of l){const R=E[f],O=E[w];(O!=null||o)&&(a[R]=this.readSchema(d,O))}return a}if(s.isStructSchema()){const c=s.isUnionSchema();let d;c&&(d=new Je(e,a));for(const[l,f]of s.structIterator()){const w=f.getMergedTraits(),E=w.httpPayload?w.xmlName??f.getName():f.getMemberTraits().xmlName??l;c&&d.mark(E),e[E]!=null&&(a[l]=this.readSchema(f,e[E]))}return c&&d.writeUnknown(),a}if(s.isDocumentSchema())return e;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${s.getName(!0)}`)}return s.isListSchema()?[]:s.isMapSchema()||s.isStructSchema()?{}:this.stringDeserializer.read(s,e)}parseXml(t){if(t.length){let e;try{e=as(t)}catch(i){throw i&&typeof i=="object"&&Object.defineProperty(i,"$responseBodyText",{value:t}),i}const s="#text",n=Object.keys(e)[0],o=e[n];return o[s]&&(o[n]=o[s],delete o[s]),xe(o)}return{}}}class ds extends be{settings;buffer;constructor(t){super(),this.settings=t}write(t,e,s=""){this.buffer===void 0&&(this.buffer="");const n=F.of(t);if(s&&!s.endsWith(".")&&(s+="."),n.isBlobSchema())(typeof e=="string"||e instanceof Uint8Array)&&(this.writeKey(s),this.writeValue((this.serdeContext?.base64Encoder??Pe)(e)));else if(n.isBooleanSchema()||n.isNumericSchema()||n.isStringSchema())e!=null?(this.writeKey(s),this.writeValue(String(e))):n.isIdempotencyToken()&&(this.writeKey(s),this.writeValue(Xe()));else if(n.isBigIntegerSchema())e!=null&&(this.writeKey(s),this.writeValue(String(e)));else if(n.isBigDecimalSchema())e!=null&&(this.writeKey(s),this.writeValue(e instanceof Ee?e.string:String(e)));else if(n.isTimestampSchema()){if(e instanceof Date)switch(this.writeKey(s),Se(n,this.settings)){case 5:this.writeValue(e.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(Qt(e));break;case 7:this.writeValue(String(e.getTime()/1e3));break}}else if(n.isDocumentSchema())Array.isArray(e)?this.write(79,e,s):e instanceof Date?this.write(4,e,s):e instanceof Uint8Array?this.write(21,e,s):e&&typeof e=="object"?this.write(143,e,s):(this.writeKey(s),this.writeValue(String(e)));else if(n.isListSchema()){if(Array.isArray(e))if(e.length===0)this.settings.serializeEmptyLists&&(this.writeKey(s),this.writeValue(""));else{const o=n.getValueSchema(),i=this.settings.flattenLists||n.getMergedTraits().xmlFlattened;let a=1;for(const c of e){if(c==null)continue;const d=this.getKey("member",o.getMergedTraits().xmlName),l=i?`${s}${a}`:`${s}${d}.${a}`;this.write(o,c,l),++a}}}else if(n.isMapSchema()){if(e&&typeof e=="object"){const o=n.getKeySchema(),i=n.getValueSchema(),a=n.getMergedTraits().xmlFlattened;let c=1;for(const[d,l]of Object.entries(e)){if(l==null)continue;const f=this.getKey("key",o.getMergedTraits().xmlName),w=a?`${s}${c}.${f}`:`${s}entry.${c}.${f}`,E=this.getKey("value",i.getMergedTraits().xmlName),R=a?`${s}${c}.${E}`:`${s}entry.${c}.${E}`;this.write(o,d,w),this.write(i,l,R),++c}}}else if(n.isStructSchema()){if(e&&typeof e=="object"){let o=!1;for(const[i,a]of Ze(n,e)){if(e[i]==null&&!a.isIdempotencyToken())continue;const c=this.getKey(i,a.getMergedTraits().xmlName),d=`${s}${c}`;this.write(a,e[i],d),o=!0}if(!o&&n.isUnionSchema()){const{$unknown:i}=e;if(Array.isArray(i)){const[a,c]=i,d=`${s}${a}`;this.write(15,c,d)}}}}else if(!n.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${n.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,e){const s=e??t;return this.settings.capitalizeKeys?s[0].toUpperCase()+s.slice(1):s}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${ie(t)}=`}writeValue(t){this.buffer+=ie(t)}}class us extends Ye{options;serializer;deserializer;mixin=new et;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const e={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new ds(e),this.deserializer=new cs(e)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,e,s){const n=await super.serializeRequest(t,e,s);n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":"application/x-www-form-urlencoded"}),(tt(t.input)==="unit"||!n.body)&&(n.body="");const o=t.name.split("#")[1]??t.name;return n.body=`Action=${o}&Version=${this.options.version}`+n.body,n.body.endsWith("&")&&(n.body=n.body.slice(-1)),n}async deserializeResponse(t,e,s){const n=this.deserializer,o=F.of(t.output),i={};if(s.statusCode>=300){const f=await oe(s.body,e);f.byteLength>0&&Object.assign(i,await n.read(15,f)),await this.handleError(t,e,s,i,this.deserializeMetadata(s))}for(const f in s.headers){const w=s.headers[f];delete s.headers[f],s.headers[f.toLowerCase()]=w}const a=t.name.split("#")[1]??t.name,c=o.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,d=await oe(s.body,e);return d.byteLength>0&&Object.assign(i,await n.read(o,d,c)),{$metadata:this.deserializeMetadata(s),...i}}useNestedResult(){return!0}async handleError(t,e,s,n,o){const i=this.loadQueryErrorCode(s,n)??"Unknown",a=this.loadQueryError(n),c=this.loadQueryErrorMessage(n);a.message=c,a.Error={Type:a.Type,Code:a.Code,Message:c};const{errorSchema:d,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,s,a,o,this.mixin.findQueryCompatibleError),f=F.of(d),w=C.for(d[1]).getErrorCtor(d)??Error,E=new w(c),R={Type:a.Error.Type,Code:a.Error.Code,Error:a.Error};for(const[O,re]of f.structIterator()){const ne=re.getMergedTraits().xmlName??O,Qe=a[ne]??n[ne];R[O]=this.deserializer.readSchema(re,Qe)}throw this.mixin.decorateServiceException(Object.assign(E,l,{$fault:f.getMergedTraits().error,message:c},R),n)}loadQueryErrorCode(t,e){const s=(e.Errors?.[0]?.Error??e.Errors?.Error??e.Error)?.Code;if(s!==void 0)return s;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const e=this.loadQueryError(t);return e?.message??e?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const ls=async(r,t,e)=>({operation:rt(t).operation,region:await we(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function ms(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:r.region},propertiesExtractor:(t,e)=>({signingProperties:{config:t,context:e}})}}function hs(r){return{schemeId:"smithy.api#noAuth"}}const ps=r=>{const t=[];switch(r.operation){case"AssumeRoleWithWebIdentity":{t.push(hs());break}default:t.push(ms(r))}return t},fs=r=>Object.assign(r,{stsClientCtor:Fe}),gs=r=>{const t=fs(r),e=st(t);return Object.assign(e,{authSchemePreference:we(r.authSchemePreference??[])})},ys=r=>Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Ss={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"}},Es="3.958.0",bs={version:Es},Ce="required",u="type",m="fn",h="argv",I="ref",ae=!1,z=!0,D="booleanEquals",y="stringEquals",Re="sigv4",De="sts",Ie="us-east-1",g="endpoint",ce="https://sts.{Region}.{PartitionResult#dnsSuffix}",T="tree",M="error",B="getAttr",de={[Ce]:!1,[u]:"string"},L={[Ce]:!0,default:!1,[u]:"boolean"},_e={[I]:"Endpoint"},ue={[m]:"isSet",[h]:[{[I]:"Region"}]},S={[I]:"Region"},le={[m]:"aws.partition",[h]:[S],assign:"PartitionResult"},Ne={[I]:"UseFIPS"},$e={[I]:"UseDualStack"},b={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:Re,signingName:De,signingRegion:Ie}]},headers:{}},P={},me={conditions:[{[m]:y,[h]:[S,"aws-global"]}],[g]:b,[u]:g},ke={[m]:D,[h]:[Ne,!0]},ve={[m]:D,[h]:[$e,!0]},he={[m]:B,[h]:[{[I]:"PartitionResult"},"supportsFIPS"]},Me={[I]:"PartitionResult"},pe={[m]:D,[h]:[!0,{[m]:B,[h]:[Me,"supportsDualStack"]}]},fe=[{[m]:"isSet",[h]:[_e]}],ge=[ke],ye=[ve],ws={parameters:{Region:de,UseDualStack:L,UseFIPS:L,Endpoint:de,UseGlobalEndpoint:L},rules:[{conditions:[{[m]:D,[h]:[{[I]:"UseGlobalEndpoint"},z]},{[m]:"not",[h]:fe},ue,le,{[m]:D,[h]:[Ne,ae]},{[m]:D,[h]:[$e,ae]}],rules:[{conditions:[{[m]:y,[h]:[S,"ap-northeast-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"ap-south-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"ap-southeast-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"ap-southeast-2"]}],endpoint:b,[u]:g},me,{conditions:[{[m]:y,[h]:[S,"ca-central-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"eu-central-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"eu-north-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"eu-west-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"eu-west-2"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"eu-west-3"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"sa-east-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,Ie]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"us-east-2"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"us-west-1"]}],endpoint:b,[u]:g},{conditions:[{[m]:y,[h]:[S,"us-west-2"]}],endpoint:b,[u]:g},{endpoint:{url:ce,properties:{authSchemes:[{name:Re,signingName:De,signingRegion:"{Region}"}]},headers:P},[u]:g}],[u]:T},{conditions:fe,rules:[{conditions:ge,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[u]:M},{conditions:ye,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[u]:M},{endpoint:{url:_e,properties:P,headers:P},[u]:g}],[u]:T},{conditions:[ue],rules:[{conditions:[le],rules:[{conditions:[ke,ve],rules:[{conditions:[{[m]:D,[h]:[z,he]},pe],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},[u]:g}],[u]:T},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[u]:M}],[u]:T},{conditions:ge,rules:[{conditions:[{[m]:D,[h]:[he,z]}],rules:[{conditions:[{[m]:y,[h]:[{[m]:B,[h]:[Me,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:P,headers:P},[u]:g},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},[u]:g}],[u]:T},{error:"FIPS is enabled but this partition does not support FIPS",[u]:M}],[u]:T},{conditions:ye,rules:[{conditions:[pe],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},[u]:g}],[u]:T},{error:"DualStack is enabled but this partition does not support DualStack",[u]:M}],[u]:T},me,{endpoint:{url:ce,properties:P,headers:P},[u]:g}],[u]:T}],[u]:T},{error:"Invalid Configuration: Missing Region",[u]:M}]},Ps=ws,Ts=new nt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),As=(r,t={})=>Ts.get(r,()=>ot(Ps,{endpointParams:r,logger:t.logger}));at.aws=it;const xs=r=>({apiVersion:"2011-06-15",base64Decoder:r?.base64Decoder??j,base64Encoder:r?.base64Encoder??Pe,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??As,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??ps,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new ut},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new lt}],logger:r?.logger??new dt,protocol:r?.protocol??us,protocolSettings:r?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:r?.serviceId??"STS",urlParser:r?.urlParser??ct,utf8Decoder:r?.utf8Decoder??qt,utf8Encoder:r?.utf8Encoder??W}),Cs=r=>{const t=mt(r),e=()=>t().then(wt),s=xs(r);return{...s,...r,runtime:"browser",defaultsMode:t,bodyLengthChecker:r?.bodyLengthChecker??St,credentialDefaultProvider:r?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:r?.defaultUserAgentProvider??yt({serviceId:s.serviceId,clientVersion:bs.version}),maxAttempts:r?.maxAttempts??gt,region:r?.region??ft("Region is missing"),requestHandler:Jt.create(r?.requestHandler??e),retryMode:r?.retryMode??(async()=>(await e()).retryMode||pt),sha256:r?.sha256??ht,streamCollector:r?.streamCollector??Gt,useDualstackEndpoint:r?.useDualstackEndpoint??(()=>Promise.resolve(bt)),useFipsEndpoint:r?.useFipsEndpoint??(()=>Promise.resolve(Et))}},Rs=r=>{const t=r.httpAuthSchemes;let e=r.httpAuthSchemeProvider,s=r.credentials;return{setHttpAuthScheme(n){const o=t.findIndex(i=>i.schemeId===n.schemeId);o===-1?t.push(n):t.splice(o,1,n)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(n){e=n},httpAuthSchemeProvider(){return e},setCredentials(n){s=n},credentials(){return s}}},Ds=r=>({httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}),Is=(r,t)=>{const e=Object.assign(Pt(r),Tt(r),At(r),Rs(r));return t.forEach(s=>s.configure(e)),Object.assign(r,xt(e),Ct(e),Rt(e),Ds(e))};class Fe extends Dt{config;constructor(...[t]){const e=Cs(t||{});super(e),this.initConfig=e;const s=ys(e),n=It(s),o=_t(n),i=Nt(o),a=Wt(i),c=$t(a),d=gs(c),l=Is(d,t?.extensions||[]);this.config=l,this.middlewareStack.use(kt(this.config)),this.middlewareStack.use(vt(this.config)),this.middlewareStack.use(Mt(this.config)),this.middlewareStack.use(Ft(this.config)),this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Ut(this.config)),this.middlewareStack.use(zt(this.config)),this.middlewareStack.use(Lt(this.config,{httpAuthSchemeParametersProvider:ls,identityProviderConfigProvider:async f=>new Kt({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(jt(this.config))}destroy(){super.destroy()}}class A extends Vt{constructor(t){super(t),Object.setPrototypeOf(this,A.prototype)}}class Q extends A{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Q.prototype)}}class q extends A{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,q.prototype)}}class G extends A{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,G.prototype)}}class J extends A{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,J.prototype)}}class X extends A{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,X.prototype)}}class Z extends A{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Z.prototype)}}class Y extends A{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,Y.prototype)}}const _s="Arn",Ns="AccessKeyId",$s="AssumeRole",ks="AssumedRoleId",vs="AssumeRoleRequest",Ms="AssumeRoleResponse",ee="AssumedRoleUser",Fs="AssumeRoleWithWebIdentity",Os="AssumeRoleWithWebIdentityRequest",Us="AssumeRoleWithWebIdentityResponse",zs="Audience",te="Credentials",Ls="ContextAssertion",Oe="DurationSeconds",js="Expiration",Ws="ExternalId",Ks="ExpiredTokenException",Vs="IDPCommunicationErrorException",Hs="IDPRejectedClaimException",Bs="InvalidIdentityTokenException",Qs="Key",qs="MalformedPolicyDocumentException",Ue="Policy",ze="PolicyArns",Gs="ProviderArn",Js="ProvidedContexts",Xs="ProvidedContextsListType",Zs="ProvidedContext",Ys="PolicyDescriptorType",er="ProviderId",Le="PackedPolicySize",tr="PackedPolicyTooLargeException",sr="Provider",je="RoleArn",rr="RegionDisabledException",We="RoleSessionName",nr="SecretAccessKey",or="SubjectFromWebIdentityToken",se="SourceIdentity",ir="SerialNumber",ar="SessionToken",cr="Tags",dr="TokenCode",ur="TransitiveTagKeys",lr="Tag",mr="Value",hr="WebIdentityToken",pr="arn",fr="accessKeySecretType",_="awsQueryError",N="client",gr="clientTokenType",$="error",k="httpError",v="message",yr="policyDescriptorListType",Ke="smithy.ts.sdk.synthetic.com.amazonaws.sts",Sr="tagListType",p="com.amazonaws.sts";var Er=[0,p,fr,8,0],br=[0,p,gr,8,0],Ve=[3,p,ee,0,[ks,_s],[0,0]],wr=[3,p,vs,0,[je,We,ze,Ue,Oe,cr,ur,Ws,ir,dr,se,Js],[0,0,()=>Be,0,1,()=>Or,64,0,0,0,0,()=>Fr]],Pr=[3,p,Ms,0,[te,ee,Le,se],[[()=>He,0],()=>Ve,1,0]],Tr=[3,p,Os,0,[je,We,hr,er,ze,Ue,Oe],[0,0,[()=>br,0],0,()=>Be,0,1]],Ar=[3,p,Us,0,[te,or,ee,Le,sr,zs,se],[[()=>He,0],0,()=>Ve,1,0,0,0]],He=[3,p,te,0,[Ns,nr,ar,js],[0,[()=>Er,0],0,4]],xr=[-3,p,Ks,{[_]:["ExpiredTokenException",400],[$]:N,[k]:400},[v],[0]];C.for(p).registerError(xr,Q);var Cr=[-3,p,Vs,{[_]:["IDPCommunicationError",400],[$]:N,[k]:400},[v],[0]];C.for(p).registerError(Cr,Y);var Rr=[-3,p,Hs,{[_]:["IDPRejectedClaim",403],[$]:N,[k]:403},[v],[0]];C.for(p).registerError(Rr,X);var Dr=[-3,p,Bs,{[_]:["InvalidIdentityToken",400],[$]:N,[k]:400},[v],[0]];C.for(p).registerError(Dr,Z);var Ir=[-3,p,qs,{[_]:["MalformedPolicyDocument",400],[$]:N,[k]:400},[v],[0]];C.for(p).registerError(Ir,q);var _r=[-3,p,tr,{[_]:["PackedPolicyTooLarge",400],[$]:N,[k]:400},[v],[0]];C.for(p).registerError(_r,G);var Nr=[3,p,Ys,0,[pr],[0]],$r=[3,p,Zs,0,[Gs,Ls],[0,0]],kr=[-3,p,rr,{[_]:["RegionDisabledException",403],[$]:N,[k]:403},[v],[0]];C.for(p).registerError(kr,J);var vr=[3,p,lr,0,[Qs,mr],[0,0]],Mr=[-3,Ke,"STSServiceException",0,[],[]];C.for(Ke).registerError(Mr,A);var Be=[1,p,yr,0,()=>Nr],Fr=[1,p,Xs,0,()=>$r],Or=[1,p,Sr,0,()=>vr],Ur=[9,p,$s,0,()=>wr,()=>Pr],Wr=[9,p,Fs,0,()=>Tr,()=>Ar];class zr extends Ht.classBuilder().ep(Ss).m(function(t,e,s,n){return[Bt(s,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Ur).build(){}const Kr=Object.freeze(Object.defineProperty({__proto__:null,AssumeRoleCommand:zr,STSClient:Fe},Symbol.toStringTag,{value:"Module"}));export{Wr as A,He as C,xr as E,Cr as I,Ir as M,_r as P,kr as R,Fe as S,vr as T,A as a,zr as b,Ss as c,Ve as d,wr as e,Pr as f,Tr as g,Ar as h,Rr as i,Dr as j,Nr as k,$r as l,Mr as m,Ur as n,Q as o,q as p,G as q,J as r,X as s,Z as t,Y as u,Kr as v};
@@ -1 +1 @@
1
- import{r as o}from"./index-KfLUFT2R.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./preload-helper-BlTxHScW.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";export{o as default};
1
+ import{r as o}from"./index-Cdypq0le.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./preload-helper-BlTxHScW.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";export{o as default};
@@ -1,4 +1,4 @@
1
- import{a as sr,b as X,c as wr,d as jr,e as Or,f as vr,g as Br,h as Tr,i as Ir}from"./index-KfLUFT2R.js";var er={},nr={},tr,cr;function Pr(){if(cr)return tr;cr=1;var i=sr()(),p=X(),h=p("Object.prototype.toString"),l=function(u){return i&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:h(u)==="[object Arguments]"},g=function(u){return l(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&h(u)!=="[object Array]"&&"callee"in u&&h(u.callee)==="[object Function]"},d=(function(){return l(arguments)})();return l.isLegacyArguments=g,tr=d?l:g,tr}var ir,yr;function Er(){if(yr)return ir;yr=1;var i=X(),p=sr()(),h=jr(),l=wr(),g;if(p){var d=i("RegExp.prototype.exec"),A={},u=function(){throw A},m={toString:u,valueOf:u};typeof Symbol.toPrimitive=="symbol"&&(m[Symbol.toPrimitive]=u),g=function(S){if(!S||typeof S!="object")return!1;var I=l(S,"lastIndex"),B=I&&h(I,"value");if(!B)return!1;try{d(S,m)}catch(F){return F===A}}}else{var O=i("Object.prototype.toString"),k="[object RegExp]";g=function(S){return!S||typeof S!="object"&&typeof S!="function"?!1:O(S)===k}}return ir=g,ir}var or,lr;function kr(){if(lr)return or;lr=1;var i=X(),p=Er(),h=i("RegExp.prototype.exec"),l=Or();return or=function(d){if(!p(d))throw new l("`regex` must be a RegExp");return function(u){return h(d,u)!==null}},or}var fr,pr;function Fr(){if(pr)return fr;pr=1;const i=function*(){}.constructor;return fr=()=>i,fr}var ur,gr;function Rr(){if(gr)return ur;gr=1;var i=X(),p=kr(),h=p(/^\s*(?:function)?\*/),l=sr()(),g=vr(),d=i("Object.prototype.toString"),A=i("Function.prototype.toString"),u=Fr();return ur=function(O){if(typeof O!="function")return!1;if(h(A(O)))return!0;if(!l){var k=d(O);return k==="[object GeneratorFunction]"}if(!g)return!1;var j=u();return j&&g(O)===j.prototype},ur}var dr;function Dr(){return dr||(dr=1,(function(i){var p=Pr(),h=Rr(),l=Tr(),g=Br();function d(n){return n.call.bind(n)}var A=typeof BigInt<"u",u=typeof Symbol<"u",m=d(Object.prototype.toString),O=d(Number.prototype.valueOf),k=d(String.prototype.valueOf),j=d(Boolean.prototype.valueOf);if(A)var S=d(BigInt.prototype.valueOf);if(u)var I=d(Symbol.prototype.valueOf);function B(n,Sr){if(typeof n!="object")return!1;try{return Sr(n),!0}catch{return!1}}i.isArgumentsObject=p,i.isGeneratorFunction=h,i.isTypedArray=g;function F(n){return typeof Promise<"u"&&n instanceof Promise||n!==null&&typeof n=="object"&&typeof n.then=="function"&&typeof n.catch=="function"}i.isPromise=F;function Y(n){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(n):g(n)||r(n)}i.isArrayBufferView=Y;function H(n){return l(n)==="Uint8Array"}i.isUint8Array=H;function C(n){return l(n)==="Uint8ClampedArray"}i.isUint8ClampedArray=C;function U(n){return l(n)==="Uint16Array"}i.isUint16Array=U;function x(n){return l(n)==="Uint32Array"}i.isUint32Array=x;function J(n){return l(n)==="Int8Array"}i.isInt8Array=J;function q(n){return l(n)==="Int16Array"}i.isInt16Array=q;function $(n){return l(n)==="Int32Array"}i.isInt32Array=$;function T(n){return l(n)==="Float32Array"}i.isFloat32Array=T;function R(n){return l(n)==="Float64Array"}i.isFloat64Array=R;function P(n){return l(n)==="BigInt64Array"}i.isBigInt64Array=P;function M(n){return l(n)==="BigUint64Array"}i.isBigUint64Array=M;function v(n){return m(n)==="[object Map]"}v.working=typeof Map<"u"&&v(new Map);function z(n){return typeof Map>"u"?!1:v.working?v(n):n instanceof Map}i.isMap=z;function G(n){return m(n)==="[object Set]"}G.working=typeof Set<"u"&&G(new Set);function V(n){return typeof Set>"u"?!1:G.working?G(n):n instanceof Set}i.isSet=V;function E(n){return m(n)==="[object WeakMap]"}E.working=typeof WeakMap<"u"&&E(new WeakMap);function rr(n){return typeof WeakMap>"u"?!1:E.working?E(n):n instanceof WeakMap}i.isWeakMap=rr;function _(n){return m(n)==="[object WeakSet]"}_.working=typeof WeakSet<"u"&&_(new WeakSet);function L(n){return _(n)}i.isWeakSet=L;function w(n){return m(n)==="[object ArrayBuffer]"}w.working=typeof ArrayBuffer<"u"&&w(new ArrayBuffer);function Z(n){return typeof ArrayBuffer>"u"?!1:w.working?w(n):n instanceof ArrayBuffer}i.isArrayBuffer=Z;function N(n){return m(n)==="[object DataView]"}N.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&N(new DataView(new ArrayBuffer(1),0,1));function r(n){return typeof DataView>"u"?!1:N.working?N(n):n instanceof DataView}i.isDataView=r;var e=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function t(n){return m(n)==="[object SharedArrayBuffer]"}function o(n){return typeof e>"u"?!1:(typeof t.working>"u"&&(t.working=t(new e)),t.working?t(n):n instanceof e)}i.isSharedArrayBuffer=o;function s(n){return m(n)==="[object AsyncFunction]"}i.isAsyncFunction=s;function c(n){return m(n)==="[object Map Iterator]"}i.isMapIterator=c;function f(n){return m(n)==="[object Set Iterator]"}i.isSetIterator=f;function a(n){return m(n)==="[object Generator]"}i.isGeneratorObject=a;function y(n){return m(n)==="[object WebAssembly.Module]"}i.isWebAssemblyCompiledModule=y;function b(n){return B(n,O)}i.isNumberObject=b;function D(n){return B(n,k)}i.isStringObject=D;function K(n){return B(n,j)}i.isBooleanObject=K;function W(n){return A&&B(n,S)}i.isBigIntObject=W;function Q(n){return u&&B(n,I)}i.isSymbolObject=Q;function hr(n){return b(n)||D(n)||K(n)||W(n)||Q(n)}i.isBoxedPrimitive=hr;function Ar(n){return typeof Uint8Array<"u"&&(Z(n)||o(n))}i.isAnyArrayBuffer=Ar,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(n){Object.defineProperty(i,n,{enumerable:!1,value:function(){throw new Error(n+" is not supported in userland")}})})})(nr)),nr}var ar,mr;function Ur(){return mr||(mr=1,ar=function(p){return p&&typeof p=="object"&&typeof p.copy=="function"&&typeof p.fill=="function"&&typeof p.readUInt8=="function"}),ar}var br;function zr(){return br||(br=1,(function(i){var p={},h=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),o={},s=0;s<t.length;s++)o[t[s]]=Object.getOwnPropertyDescriptor(e,t[s]);return o},l=/%[sdj%]/g;i.format=function(r){if(!q(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(u(arguments[t]));return e.join(" ")}for(var t=1,o=arguments,s=o.length,c=String(r).replace(l,function(a){if(a==="%%")return"%";if(t>=s)return a;switch(a){case"%s":return String(o[t++]);case"%d":return Number(o[t++]);case"%j":try{return JSON.stringify(o[t++])}catch{return"[Circular]"}default:return a}}),f=o[t];t<s;f=o[++t])U(f)||!P(f)?c+=" "+f:c+=" "+u(f);return c},i.deprecate=function(r,e){if(typeof process<"u"&&process.noDeprecation===!0)return r;if(typeof process>"u")return function(){return i.deprecate(r,e).apply(this,arguments)};var t=!1;function o(){if(!t){if(process.throwDeprecation)throw new Error(e);process.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return o};var g={},d=/^$/;if(p.NODE_DEBUG){var A=p.NODE_DEBUG;A=A.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),d=new RegExp("^"+A+"$","i")}i.debuglog=function(r){if(r=r.toUpperCase(),!g[r])if(d.test(r)){var e=process.pid;g[r]=function(){var t=i.format.apply(i,arguments);console.error("%s %d: %s",r,e,t)}}else g[r]=function(){};return g[r]};function u(r,e){var t={seen:[],stylize:O};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),C(e)?t.showHidden=e:e&&i._extend(t,e),T(t.showHidden)&&(t.showHidden=!1),T(t.depth)&&(t.depth=2),T(t.colors)&&(t.colors=!1),T(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=m),j(t,r,t.depth)}i.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function m(r,e){var t=u.styles[e];return t?"\x1B["+u.colors[t][0]+"m"+r+"\x1B["+u.colors[t][1]+"m":r}function O(r,e){return r}function k(r){var e={};return r.forEach(function(t,o){e[t]=!0}),e}function j(r,e,t){if(r.customInspect&&e&&z(e.inspect)&&e.inspect!==i.inspect&&!(e.constructor&&e.constructor.prototype===e)){var o=e.inspect(t,r);return q(o)||(o=j(r,o,t)),o}var s=S(r,e);if(s)return s;var c=Object.keys(e),f=k(c);if(r.showHidden&&(c=Object.getOwnPropertyNames(e)),v(e)&&(c.indexOf("message")>=0||c.indexOf("description")>=0))return I(e);if(c.length===0){if(z(e)){var a=e.name?": "+e.name:"";return r.stylize("[Function"+a+"]","special")}if(R(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(M(e))return r.stylize(Date.prototype.toString.call(e),"date");if(v(e))return I(e)}var y="",b=!1,D=["{","}"];if(H(e)&&(b=!0,D=["[","]"]),z(e)){var K=e.name?": "+e.name:"";y=" [Function"+K+"]"}if(R(e)&&(y=" "+RegExp.prototype.toString.call(e)),M(e)&&(y=" "+Date.prototype.toUTCString.call(e)),v(e)&&(y=" "+I(e)),c.length===0&&(!b||e.length==0))return D[0]+y+D[1];if(t<0)return R(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var W;return b?W=B(r,e,t,f,c):W=c.map(function(Q){return F(r,e,t,f,Q,b)}),r.seen.pop(),Y(W,y,D)}function S(r,e){if(T(e))return r.stylize("undefined","undefined");if(q(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(J(e))return r.stylize(""+e,"number");if(C(e))return r.stylize(""+e,"boolean");if(U(e))return r.stylize("null","null")}function I(r){return"["+Error.prototype.toString.call(r)+"]"}function B(r,e,t,o,s){for(var c=[],f=0,a=e.length;f<a;++f)L(e,String(f))?c.push(F(r,e,t,o,String(f),!0)):c.push("");return s.forEach(function(y){y.match(/^\d+$/)||c.push(F(r,e,t,o,y,!0))}),c}function F(r,e,t,o,s,c){var f,a,y;if(y=Object.getOwnPropertyDescriptor(e,s)||{value:e[s]},y.get?y.set?a=r.stylize("[Getter/Setter]","special"):a=r.stylize("[Getter]","special"):y.set&&(a=r.stylize("[Setter]","special")),L(o,s)||(f="["+s+"]"),a||(r.seen.indexOf(y.value)<0?(U(t)?a=j(r,y.value,null):a=j(r,y.value,t-1),a.indexOf(`
1
+ import{a as sr,b as X,c as wr,d as jr,e as Or,f as vr,g as Br,h as Tr,i as Ir}from"./index-Cdypq0le.js";var er={},nr={},tr,cr;function Pr(){if(cr)return tr;cr=1;var i=sr()(),p=X(),h=p("Object.prototype.toString"),l=function(u){return i&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:h(u)==="[object Arguments]"},g=function(u){return l(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&h(u)!=="[object Array]"&&"callee"in u&&h(u.callee)==="[object Function]"},d=(function(){return l(arguments)})();return l.isLegacyArguments=g,tr=d?l:g,tr}var ir,yr;function Er(){if(yr)return ir;yr=1;var i=X(),p=sr()(),h=jr(),l=wr(),g;if(p){var d=i("RegExp.prototype.exec"),A={},u=function(){throw A},m={toString:u,valueOf:u};typeof Symbol.toPrimitive=="symbol"&&(m[Symbol.toPrimitive]=u),g=function(S){if(!S||typeof S!="object")return!1;var I=l(S,"lastIndex"),B=I&&h(I,"value");if(!B)return!1;try{d(S,m)}catch(F){return F===A}}}else{var O=i("Object.prototype.toString"),k="[object RegExp]";g=function(S){return!S||typeof S!="object"&&typeof S!="function"?!1:O(S)===k}}return ir=g,ir}var or,lr;function kr(){if(lr)return or;lr=1;var i=X(),p=Er(),h=i("RegExp.prototype.exec"),l=Or();return or=function(d){if(!p(d))throw new l("`regex` must be a RegExp");return function(u){return h(d,u)!==null}},or}var fr,pr;function Fr(){if(pr)return fr;pr=1;const i=function*(){}.constructor;return fr=()=>i,fr}var ur,gr;function Rr(){if(gr)return ur;gr=1;var i=X(),p=kr(),h=p(/^\s*(?:function)?\*/),l=sr()(),g=vr(),d=i("Object.prototype.toString"),A=i("Function.prototype.toString"),u=Fr();return ur=function(O){if(typeof O!="function")return!1;if(h(A(O)))return!0;if(!l){var k=d(O);return k==="[object GeneratorFunction]"}if(!g)return!1;var j=u();return j&&g(O)===j.prototype},ur}var dr;function Dr(){return dr||(dr=1,(function(i){var p=Pr(),h=Rr(),l=Tr(),g=Br();function d(n){return n.call.bind(n)}var A=typeof BigInt<"u",u=typeof Symbol<"u",m=d(Object.prototype.toString),O=d(Number.prototype.valueOf),k=d(String.prototype.valueOf),j=d(Boolean.prototype.valueOf);if(A)var S=d(BigInt.prototype.valueOf);if(u)var I=d(Symbol.prototype.valueOf);function B(n,Sr){if(typeof n!="object")return!1;try{return Sr(n),!0}catch{return!1}}i.isArgumentsObject=p,i.isGeneratorFunction=h,i.isTypedArray=g;function F(n){return typeof Promise<"u"&&n instanceof Promise||n!==null&&typeof n=="object"&&typeof n.then=="function"&&typeof n.catch=="function"}i.isPromise=F;function Y(n){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(n):g(n)||r(n)}i.isArrayBufferView=Y;function H(n){return l(n)==="Uint8Array"}i.isUint8Array=H;function C(n){return l(n)==="Uint8ClampedArray"}i.isUint8ClampedArray=C;function U(n){return l(n)==="Uint16Array"}i.isUint16Array=U;function x(n){return l(n)==="Uint32Array"}i.isUint32Array=x;function J(n){return l(n)==="Int8Array"}i.isInt8Array=J;function q(n){return l(n)==="Int16Array"}i.isInt16Array=q;function $(n){return l(n)==="Int32Array"}i.isInt32Array=$;function T(n){return l(n)==="Float32Array"}i.isFloat32Array=T;function R(n){return l(n)==="Float64Array"}i.isFloat64Array=R;function P(n){return l(n)==="BigInt64Array"}i.isBigInt64Array=P;function M(n){return l(n)==="BigUint64Array"}i.isBigUint64Array=M;function v(n){return m(n)==="[object Map]"}v.working=typeof Map<"u"&&v(new Map);function z(n){return typeof Map>"u"?!1:v.working?v(n):n instanceof Map}i.isMap=z;function G(n){return m(n)==="[object Set]"}G.working=typeof Set<"u"&&G(new Set);function V(n){return typeof Set>"u"?!1:G.working?G(n):n instanceof Set}i.isSet=V;function E(n){return m(n)==="[object WeakMap]"}E.working=typeof WeakMap<"u"&&E(new WeakMap);function rr(n){return typeof WeakMap>"u"?!1:E.working?E(n):n instanceof WeakMap}i.isWeakMap=rr;function _(n){return m(n)==="[object WeakSet]"}_.working=typeof WeakSet<"u"&&_(new WeakSet);function L(n){return _(n)}i.isWeakSet=L;function w(n){return m(n)==="[object ArrayBuffer]"}w.working=typeof ArrayBuffer<"u"&&w(new ArrayBuffer);function Z(n){return typeof ArrayBuffer>"u"?!1:w.working?w(n):n instanceof ArrayBuffer}i.isArrayBuffer=Z;function N(n){return m(n)==="[object DataView]"}N.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&N(new DataView(new ArrayBuffer(1),0,1));function r(n){return typeof DataView>"u"?!1:N.working?N(n):n instanceof DataView}i.isDataView=r;var e=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function t(n){return m(n)==="[object SharedArrayBuffer]"}function o(n){return typeof e>"u"?!1:(typeof t.working>"u"&&(t.working=t(new e)),t.working?t(n):n instanceof e)}i.isSharedArrayBuffer=o;function s(n){return m(n)==="[object AsyncFunction]"}i.isAsyncFunction=s;function c(n){return m(n)==="[object Map Iterator]"}i.isMapIterator=c;function f(n){return m(n)==="[object Set Iterator]"}i.isSetIterator=f;function a(n){return m(n)==="[object Generator]"}i.isGeneratorObject=a;function y(n){return m(n)==="[object WebAssembly.Module]"}i.isWebAssemblyCompiledModule=y;function b(n){return B(n,O)}i.isNumberObject=b;function D(n){return B(n,k)}i.isStringObject=D;function K(n){return B(n,j)}i.isBooleanObject=K;function W(n){return A&&B(n,S)}i.isBigIntObject=W;function Q(n){return u&&B(n,I)}i.isSymbolObject=Q;function hr(n){return b(n)||D(n)||K(n)||W(n)||Q(n)}i.isBoxedPrimitive=hr;function Ar(n){return typeof Uint8Array<"u"&&(Z(n)||o(n))}i.isAnyArrayBuffer=Ar,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(n){Object.defineProperty(i,n,{enumerable:!1,value:function(){throw new Error(n+" is not supported in userland")}})})})(nr)),nr}var ar,mr;function Ur(){return mr||(mr=1,ar=function(p){return p&&typeof p=="object"&&typeof p.copy=="function"&&typeof p.fill=="function"&&typeof p.readUInt8=="function"}),ar}var br;function zr(){return br||(br=1,(function(i){var p={},h=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),o={},s=0;s<t.length;s++)o[t[s]]=Object.getOwnPropertyDescriptor(e,t[s]);return o},l=/%[sdj%]/g;i.format=function(r){if(!q(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(u(arguments[t]));return e.join(" ")}for(var t=1,o=arguments,s=o.length,c=String(r).replace(l,function(a){if(a==="%%")return"%";if(t>=s)return a;switch(a){case"%s":return String(o[t++]);case"%d":return Number(o[t++]);case"%j":try{return JSON.stringify(o[t++])}catch{return"[Circular]"}default:return a}}),f=o[t];t<s;f=o[++t])U(f)||!P(f)?c+=" "+f:c+=" "+u(f);return c},i.deprecate=function(r,e){if(typeof process<"u"&&process.noDeprecation===!0)return r;if(typeof process>"u")return function(){return i.deprecate(r,e).apply(this,arguments)};var t=!1;function o(){if(!t){if(process.throwDeprecation)throw new Error(e);process.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return o};var g={},d=/^$/;if(p.NODE_DEBUG){var A=p.NODE_DEBUG;A=A.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),d=new RegExp("^"+A+"$","i")}i.debuglog=function(r){if(r=r.toUpperCase(),!g[r])if(d.test(r)){var e=process.pid;g[r]=function(){var t=i.format.apply(i,arguments);console.error("%s %d: %s",r,e,t)}}else g[r]=function(){};return g[r]};function u(r,e){var t={seen:[],stylize:O};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),C(e)?t.showHidden=e:e&&i._extend(t,e),T(t.showHidden)&&(t.showHidden=!1),T(t.depth)&&(t.depth=2),T(t.colors)&&(t.colors=!1),T(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=m),j(t,r,t.depth)}i.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function m(r,e){var t=u.styles[e];return t?"\x1B["+u.colors[t][0]+"m"+r+"\x1B["+u.colors[t][1]+"m":r}function O(r,e){return r}function k(r){var e={};return r.forEach(function(t,o){e[t]=!0}),e}function j(r,e,t){if(r.customInspect&&e&&z(e.inspect)&&e.inspect!==i.inspect&&!(e.constructor&&e.constructor.prototype===e)){var o=e.inspect(t,r);return q(o)||(o=j(r,o,t)),o}var s=S(r,e);if(s)return s;var c=Object.keys(e),f=k(c);if(r.showHidden&&(c=Object.getOwnPropertyNames(e)),v(e)&&(c.indexOf("message")>=0||c.indexOf("description")>=0))return I(e);if(c.length===0){if(z(e)){var a=e.name?": "+e.name:"";return r.stylize("[Function"+a+"]","special")}if(R(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(M(e))return r.stylize(Date.prototype.toString.call(e),"date");if(v(e))return I(e)}var y="",b=!1,D=["{","}"];if(H(e)&&(b=!0,D=["[","]"]),z(e)){var K=e.name?": "+e.name:"";y=" [Function"+K+"]"}if(R(e)&&(y=" "+RegExp.prototype.toString.call(e)),M(e)&&(y=" "+Date.prototype.toUTCString.call(e)),v(e)&&(y=" "+I(e)),c.length===0&&(!b||e.length==0))return D[0]+y+D[1];if(t<0)return R(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var W;return b?W=B(r,e,t,f,c):W=c.map(function(Q){return F(r,e,t,f,Q,b)}),r.seen.pop(),Y(W,y,D)}function S(r,e){if(T(e))return r.stylize("undefined","undefined");if(q(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(J(e))return r.stylize(""+e,"number");if(C(e))return r.stylize(""+e,"boolean");if(U(e))return r.stylize("null","null")}function I(r){return"["+Error.prototype.toString.call(r)+"]"}function B(r,e,t,o,s){for(var c=[],f=0,a=e.length;f<a;++f)L(e,String(f))?c.push(F(r,e,t,o,String(f),!0)):c.push("");return s.forEach(function(y){y.match(/^\d+$/)||c.push(F(r,e,t,o,y,!0))}),c}function F(r,e,t,o,s,c){var f,a,y;if(y=Object.getOwnPropertyDescriptor(e,s)||{value:e[s]},y.get?y.set?a=r.stylize("[Getter/Setter]","special"):a=r.stylize("[Getter]","special"):y.set&&(a=r.stylize("[Setter]","special")),L(o,s)||(f="["+s+"]"),a||(r.seen.indexOf(y.value)<0?(U(t)?a=j(r,y.value,null):a=j(r,y.value,t-1),a.indexOf(`
2
2
  `)>-1&&(c?a=a.split(`
3
3
  `).map(function(b){return" "+b}).join(`
4
4
  `).slice(2):a=`
@@ -1,4 +1,4 @@
1
- import{g as ga}from"./_commonjsHelpers-D6-XlEtG.js";import{r as va}from"./util-CLXELMCc.js";import{E as U,L as me}from"./inherits_browser-nmOknR35-Bp0mvRSL.js";import{c as ae}from"./__vite-browser-external-DLjrMatA.js";import{D as wa,S as je,L as _a}from"./index-DsIu-45t-Bejjlpz4.js";import{l as Sa,u as ce}from"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import{Y as Cr}from"./index-6mKfgpcs-DsgiI2lM.js";var ja=va();const se=ga(ja);var Yr={},Fe={},Ue,$r;function ie(){if($r)return Ue;$r=1;function t(S){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t(S)}function i(S,a,l){return Object.defineProperty(S,"prototype",{writable:!1}),S}function v(S,a){if(!(S instanceof a))throw new TypeError("Cannot call a class as a function")}function O(S,a,l){return a=_(a),m(S,g()?Reflect.construct(a,l||[],_(S).constructor):a.apply(S,l))}function m(S,a){if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h(S)}function h(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function d(S,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(a&&a.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),Object.defineProperty(S,"prototype",{writable:!1}),a&&R(S,a)}function u(S){var a=typeof Map=="function"?new Map:void 0;return u=function(l){if(l===null||!P(l))return l;if(typeof l!="function")throw new TypeError("Super expression must either be null or a function");if(a!==void 0){if(a.has(l))return a.get(l);a.set(l,s)}function s(){return o(l,arguments,_(this).constructor)}return s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),R(s,l)},u(S)}function o(S,a,l){if(g())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,a);var c=new(S.bind.apply(S,s));return l&&R(c,l.prototype),c}function g(){try{var S=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g=function(){return!!S})()}function P(S){try{return Function.toString.call(S).indexOf("[native code]")!==-1}catch{return typeof S=="function"}}function R(S,a){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,s){return l.__proto__=s,l},R(S,a)}function _(S){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},_(S)}var w=(function(S){function a(l){var s;return v(this,a),s=O(this,a,[`Format functions must be synchronous taking a two arguments: (info, opts)
1
+ import{g as ga}from"./_commonjsHelpers-D6-XlEtG.js";import{r as va}from"./util-dDeaEvHH.js";import{E as U,L as me}from"./inherits_browser-nmOknR35-Bp0mvRSL.js";import{c as ae}from"./__vite-browser-external-DLjrMatA.js";import{D as wa,S as je,L as _a}from"./index-DsIu-45t-Bejjlpz4.js";import{l as Sa,u as ce}from"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import{Y as Cr}from"./index-6mKfgpcs-DsgiI2lM.js";var ja=va();const se=ga(ja);var Yr={},Fe={},Ue,$r;function ie(){if($r)return Ue;$r=1;function t(S){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t(S)}function i(S,a,l){return Object.defineProperty(S,"prototype",{writable:!1}),S}function v(S,a){if(!(S instanceof a))throw new TypeError("Cannot call a class as a function")}function O(S,a,l){return a=_(a),m(S,g()?Reflect.construct(a,l||[],_(S).constructor):a.apply(S,l))}function m(S,a){if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h(S)}function h(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function d(S,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(a&&a.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),Object.defineProperty(S,"prototype",{writable:!1}),a&&R(S,a)}function u(S){var a=typeof Map=="function"?new Map:void 0;return u=function(l){if(l===null||!P(l))return l;if(typeof l!="function")throw new TypeError("Super expression must either be null or a function");if(a!==void 0){if(a.has(l))return a.get(l);a.set(l,s)}function s(){return o(l,arguments,_(this).constructor)}return s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),R(s,l)},u(S)}function o(S,a,l){if(g())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,a);var c=new(S.bind.apply(S,s));return l&&R(c,l.prototype),c}function g(){try{var S=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g=function(){return!!S})()}function P(S){try{return Function.toString.call(S).indexOf("[native code]")!==-1}catch{return typeof S=="function"}}function R(S,a){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,s){return l.__proto__=s,l},R(S,a)}function _(S){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},_(S)}var w=(function(S){function a(l){var s;return v(this,a),s=O(this,a,[`Format functions must be synchronous taking a two arguments: (info, opts)
2
2
  Found: `.concat(l.toString().split(`
3
3
  `)[0],`
4
4
  `)]),Error.captureStackTrace(s,a),s}return d(a,S),i(a)})(u(Error));return Ue=function(S){if(S.length>2)throw new w(S);function a(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=s}a.prototype.transform=S;function l(s){return new a(s)}return l.Format=a,l},Ue}var ke={exports:{}},Gr={exports:{}},Hr={exports:{}},Vr={exports:{}},Ur;function xa(){return Ur||(Ur=1,(function(t){var i={};t.exports=i;var v={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(v).forEach(function(O){var m=v[O],h=i[O]=[];h.open="\x1B["+m[0]+"m",h.close="\x1B["+m[1]+"m"})})(Vr)),Vr.exports}var Jr,Kr;function Ea(){return Kr||(Kr=1,Jr=function(t,i){i=i||U.argv||[];var v=i.indexOf("--"),O=/^-{1,2}/.test(t)?"":"--",m=i.indexOf(O+t);return m!==-1&&(v===-1?!0:m<v)}),Jr}var Je,Zr;function Ma(){if(Zr)return Je;Zr=1;var t=ae,i=Ea(),v=U.env,O=void 0;i("no-color")||i("no-colors")||i("color=false")?O=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(O=!0),"FORCE_COLOR"in v&&(O=v.FORCE_COLOR.length===0||parseInt(v.FORCE_COLOR,10)!==0);function m(u){return u===0?!1:{level:u,hasBasic:!0,has256:u>=2,has16m:u>=3}}function h(u){if(O===!1)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(u&&!u.isTTY&&O!==!0)return 0;var o=O?1:0;if(U.platform==="win32"){var g=t.release().split(".");return Number(U.versions.node.split(".")[0])>=8&&Number(g[0])>=10&&Number(g[2])>=10586?Number(g[2])>=14931?3:2:1}if("CI"in v)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(R){return R in v})||v.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in v)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(v.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in v){var P=parseInt((v.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(v.TERM_PROGRAM){case"iTerm.app":return P>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(v.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(v.TERM)||"COLORTERM"in v?1:(v.TERM,o)}function d(u){var o=h(u);return m(o)}return Je={supportsColor:d,stdout:d(U.stdout),stderr:d(U.stderr)},Je}var Qr={exports:{}},Xr;function Oa(){return Xr||(Xr=1,(function(t){t.exports=function(i,v){var O="";i=i||"Run the trap, drop the bass",i=i.split("");var m={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return i.forEach(function(h){h=h.toLowerCase();var d=m[h]||[" "],u=Math.floor(Math.random()*d.length);typeof m[h]<"u"?O+=m[h][u]:O+=h}),O}})(Qr)),Qr.exports}var en={exports:{}},tn;function Pa(){return tn||(tn=1,(function(t){t.exports=function(i,v){i=i||" he is here ";var O={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},m=[].concat(O.up,O.down,O.mid);function h(o){var g=Math.floor(Math.random()*o);return g}function d(o){var g=!1;return m.filter(function(P){g=P===o}),g}function u(o,g){var P="",R,_;g=g||{},g.up=typeof g.up<"u"?g.up:!0,g.mid=typeof g.mid<"u"?g.mid:!0,g.down=typeof g.down<"u"?g.down:!0,g.size=typeof g.size<"u"?g.size:"maxi",o=o.split("");for(_ in o)if(!d(_)){switch(P=P+o[_],R={up:0,down:0,mid:0},g.size){case"mini":R.up=h(8),R.mid=h(2),R.down=h(8);break;case"maxi":R.up=h(16)+3,R.mid=h(4)+1,R.down=h(64)+3;break;default:R.up=h(8)+1,R.mid=h(6)/2,R.down=h(8)+1;break}var w=["up","mid","down"];for(var S in w)for(var a=w[S],l=0;l<=R[a];l++)g[a]&&(P=P+O[a][h(O[a].length)])}return P}return u(i,v)}})(en)),en.exports}var rn={exports:{}},nn;function ka(){return nn||(nn=1,(function(t){t.exports=function(i){return function(v,O,m){if(v===" ")return v;switch(O%3){case 0:return i.red(v);case 1:return i.white(v);case 2:return i.blue(v)}}}})(rn)),rn.exports}var on={exports:{}},an;function Ra(){return an||(an=1,(function(t){t.exports=function(i){return function(v,O,m){return O%2===0?v:i.inverse(v)}}})(on)),on.exports}var sn={exports:{}},un;function Ta(){return un||(un=1,(function(t){t.exports=function(i){var v=["red","yellow","green","blue","magenta"];return function(O,m,h){return O===" "?O:i[v[m++%v.length]](O)}}})(sn)),sn.exports}var ln={exports:{}},cn;function La(){return cn||(cn=1,(function(t){t.exports=function(i){var v=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(O,m,h){return O===" "?O:i[v[Math.round(Math.random()*(v.length-2))]](O)}}})(ln)),ln.exports}var fn;function Ca(){return fn||(fn=1,(function(t){var i={};t.exports=i,i.themes={};var v=se,O=i.styles=xa(),m=Object.defineProperties,h=new RegExp(/[\r\n]+/g);i.supportsColor=Ma().supportsColor,typeof i.enabled>"u"&&(i.enabled=i.supportsColor()!==!1),i.enable=function(){i.enabled=!0},i.disable=function(){i.enabled=!1},i.stripColors=i.strip=function(a){return(""+a).replace(/\x1B\[\d+m/g,"")},i.stylize=function(a,l){if(!i.enabled)return a+"";var s=O[l];return!s&&l in i?i[l](a):s.open+a+s.close};var d=/[|\\{}()[\]^$+*?.]/g,u=function(a){if(typeof a!="string")throw new TypeError("Expected a string");return a.replace(d,"\\$&")};function o(a){var l=function s(){return R.apply(s,arguments)};return l._styles=a,l.__proto__=P,l}var g=(function(){var a={};return O.grey=O.gray,Object.keys(O).forEach(function(l){O[l].closeRe=new RegExp(u(O[l].close),"g"),a[l]={get:function(){return o(this._styles.concat(l))}}}),a})(),P=m(function(){},g);function R(){var a=Array.prototype.slice.call(arguments),l=a.map(function(x){return x!=null&&x.constructor===String?x:v.inspect(x)}).join(" ");if(!i.enabled||!l)return l;for(var s=l.indexOf(`
@@ -1,4 +1,4 @@
1
- import{r as ve}from"./util-CLXELMCc.js";import{k as Qo,l as Se,m as Xo,i as ye}from"./index-KfLUFT2R.js";import{a as ea,c as fe}from"./_commonjsHelpers-D6-XlEtG.js";import{r as re}from"./_commonjs-dynamic-modules-B7n8ZNar.js";var gt={},De={},mt,tn;function ae(){if(tn)return mt;tn=1;function e(h){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},e(h)}function u(h,s,f){return Object.defineProperty(h,"prototype",{writable:!1}),h}function m(h,s){if(!(h instanceof s))throw new TypeError("Cannot call a class as a function")}function R(h,s,f){return s=y(s),g(h,v()?Reflect.construct(s,f||[],y(h).constructor):s.apply(h,f))}function g(h,s){if(s&&(e(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c(h)}function c(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function p(h,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(s&&s.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),s&&O(h,s)}function a(h){var s=typeof Map=="function"?new Map:void 0;return a=function(o){if(o===null||!b(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(s!==void 0){if(s.has(o))return s.get(o);s.set(o,n)}function n(){return i(o,arguments,y(this).constructor)}return n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),O(n,o)},a(h)}function i(h,s,f){if(v())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,s);var n=new(h.bind.apply(h,o));return f&&O(n,f.prototype),n}function v(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v=function(){return!!h})()}function b(h){try{return Function.toString.call(h).indexOf("[native code]")!==-1}catch{return typeof h=="function"}}function O(h,s){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,o){return f.__proto__=o,f},O(h,s)}function y(h){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},y(h)}var E=(function(h){function s(f){var o;return m(this,s),o=R(this,s,[`Format functions must be synchronous taking a two arguments: (info, opts)
1
+ import{r as ve}from"./util-dDeaEvHH.js";import{k as Qo,l as Se,m as Xo,i as ye}from"./index-Cdypq0le.js";import{a as ea,c as fe}from"./_commonjsHelpers-D6-XlEtG.js";import{r as re}from"./_commonjs-dynamic-modules-B7n8ZNar.js";var gt={},De={},mt,tn;function ae(){if(tn)return mt;tn=1;function e(h){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},e(h)}function u(h,s,f){return Object.defineProperty(h,"prototype",{writable:!1}),h}function m(h,s){if(!(h instanceof s))throw new TypeError("Cannot call a class as a function")}function R(h,s,f){return s=y(s),g(h,v()?Reflect.construct(s,f||[],y(h).constructor):s.apply(h,f))}function g(h,s){if(s&&(e(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c(h)}function c(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function p(h,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(s&&s.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),s&&O(h,s)}function a(h){var s=typeof Map=="function"?new Map:void 0;return a=function(o){if(o===null||!b(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(s!==void 0){if(s.has(o))return s.get(o);s.set(o,n)}function n(){return i(o,arguments,y(this).constructor)}return n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),O(n,o)},a(h)}function i(h,s,f){if(v())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,s);var n=new(h.bind.apply(h,o));return f&&O(n,f.prototype),n}function v(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v=function(){return!!h})()}function b(h){try{return Function.toString.call(h).indexOf("[native code]")!==-1}catch{return typeof h=="function"}}function O(h,s){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,o){return f.__proto__=o,f},O(h,s)}function y(h){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},y(h)}var E=(function(h){function s(f){var o;return m(this,s),o=R(this,s,[`Format functions must be synchronous taking a two arguments: (info, opts)
2
2
  Found: `.concat(f.toString().split(`
3
3
  `)[0],`
4
4
  `)]),Error.captureStackTrace(o,s),o}return p(s,h),u(s)})(a(Error));return mt=function(h){if(h.length>2)throw new E(h);function s(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=o}s.prototype.transform=h;function f(o){return new s(o)}return f.Format=s,f},mt}var je={exports:{}},bt={exports:{}},_t={exports:{}},wt={exports:{}},rn;function ta(){return rn||(rn=1,(function(e){var u={};e.exports=u;var m={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(m).forEach(function(R){var g=m[R],c=u[R]=[];c.open="\x1B["+g[0]+"m",c.close="\x1B["+g[1]+"m"})})(wt)),wt.exports}var St,nn;function ra(){return nn||(nn=1,St=function(e,u){u=u||process.argv||[];var m=u.indexOf("--"),R=/^-{1,2}/.test(e)?"":"--",g=u.indexOf(R+e);return g!==-1&&(m===-1?!0:g<m)}),St}var Et,on;function na(){if(on)return Et;on=1;var e={},u=ra(),m=e,R=void 0;u("no-color")||u("no-colors")||u("color=false")?R=!1:(u("color")||u("colors")||u("color=true")||u("color=always"))&&(R=!0),"FORCE_COLOR"in m&&(R=m.FORCE_COLOR.length===0||parseInt(m.FORCE_COLOR,10)!==0);function g(a){return a===0?!1:{level:a,hasBasic:!0,has256:a>=2,has16m:a>=3}}function c(a){if(R===!1)return 0;if(u("color=16m")||u("color=full")||u("color=truecolor"))return 3;if(u("color=256"))return 2;if(a&&!a.isTTY&&R!==!0)return 0;var i=R?1:0;if("CI"in m)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(b){return b in m})||m.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in m)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(m.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in m){var v=parseInt((m.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(m.TERM_PROGRAM){case"iTerm.app":return v>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(m.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(m.TERM)||"COLORTERM"in m?1:(m.TERM==="dumb",i)}function p(a){var i=c(a);return g(i)}return Et={supportsColor:p,stdout:p(process.stdout),stderr:p(process.stderr)},Et}var Rt={exports:{}},an;function ia(){return an||(an=1,(function(e){e.exports=function(m,R){var g="";m=m||"Run the trap, drop the bass",m=m.split("");var c={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return m.forEach(function(p){p=p.toLowerCase();var a=c[p]||[" "],i=Math.floor(Math.random()*a.length);typeof c[p]<"u"?g+=c[p][i]:g+=p}),g}})(Rt)),Rt.exports}var Ot={exports:{}},un;function oa(){return un||(un=1,(function(e){e.exports=function(m,R){m=m||" he is here ";var g={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},c=[].concat(g.up,g.down,g.mid);function p(v){var b=Math.floor(Math.random()*v);return b}function a(v){var b=!1;return c.filter(function(O){b=O===v}),b}function i(v,b){var O="",y,E;b=b||{},b.up=typeof b.up<"u"?b.up:!0,b.mid=typeof b.mid<"u"?b.mid:!0,b.down=typeof b.down<"u"?b.down:!0,b.size=typeof b.size<"u"?b.size:"maxi",v=v.split("");for(E in v)if(!a(E)){switch(O=O+v[E],y={up:0,down:0,mid:0},b.size){case"mini":y.up=p(8),y.mid=p(2),y.down=p(8);break;case"maxi":y.up=p(16)+3,y.mid=p(4)+1,y.down=p(64)+3;break;default:y.up=p(8)+1,y.mid=p(6)/2,y.down=p(8)+1;break}var h=["up","mid","down"];for(var s in h)for(var f=h[s],o=0;o<=y[f];o++)b[f]&&(O=O+g[f][p(g[f].length)])}return O}return i(m,R)}})(Ot)),Ot.exports}var Pt={exports:{}},sn;function aa(){return sn||(sn=1,(function(e){e.exports=function(u){return function(m,R,g){if(m===" ")return m;switch(R%3){case 0:return u.red(m);case 1:return u.white(m);case 2:return u.blue(m)}}}})(Pt)),Pt.exports}var Tt={exports:{}},fn;function ua(){return fn||(fn=1,(function(e){e.exports=function(u){return function(m,R,g){return R%2===0?m:u.inverse(m)}}})(Tt)),Tt.exports}var jt={exports:{}},ln;function sa(){return ln||(ln=1,(function(e){e.exports=function(u){var m=["red","yellow","green","blue","magenta"];return function(R,g,c){return R===" "?R:u[m[g++%m.length]](R)}}})(jt)),jt.exports}var Mt={exports:{}},cn;function fa(){return cn||(cn=1,(function(e){e.exports=function(u){var m=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(R,g,c){return R===" "?R:u[m[Math.round(Math.random()*(m.length-2))]](R)}}})(Mt)),Mt.exports}var dn;function la(){return dn||(dn=1,(function(e){var u={};e.exports=u,u.themes={};var m=ve(),R=u.styles=ta(),g=Object.defineProperties,c=new RegExp(/[\r\n]+/g);u.supportsColor=na().supportsColor,typeof u.enabled>"u"&&(u.enabled=u.supportsColor()!==!1),u.enable=function(){u.enabled=!0},u.disable=function(){u.enabled=!1},u.stripColors=u.strip=function(s){return(""+s).replace(/\x1B\[\d+m/g,"")},u.stylize=function(f,o){if(!u.enabled)return f+"";var n=R[o];return!n&&o in u?u[o](f):n.open+f+n.close};var p=/[|\\{}()[\]^$+*?.]/g,a=function(s){if(typeof s!="string")throw new TypeError("Expected a string");return s.replace(p,"\\$&")};function i(s){var f=function o(){return O.apply(o,arguments)};return f._styles=s,f.__proto__=b,f}var v=(function(){var s={};return R.grey=R.gray,Object.keys(R).forEach(function(f){R[f].closeRe=new RegExp(a(R[f].close),"g"),s[f]={get:function(){return i(this._styles.concat(f))}}}),s})(),b=g(function(){},v);function O(){var s=Array.prototype.slice.call(arguments),f=s.map(function(_){return _!=null&&_.constructor===String?_:m.inspect(_)}).join(" ");if(!u.enabled||!f)return f;for(var o=f.indexOf(`