@agentlang/lstudio 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -0
- package/dist/assets/index-BQyk5g4a.js +1 -0
- package/{assets/index-BTT5ny1x.js → dist/assets/index-BUSNaVGD.js} +1 -1
- package/{assets/index-Co3vdAJe.js → dist/assets/index-Blq0zS4y.js} +2290 -16276
- package/dist/assets/index-Bto-kj6R-C0A_3Pwb.js +1 -0
- package/dist/assets/index-C2yyIBKa.js +1 -0
- package/{assets/index-CZyH7rAI-yNipxqK_.js → dist/assets/index-Cgd01XOu-DZ3EXoBB.js} +2 -2
- package/dist/assets/index-DUWxxpyn.css +1 -0
- package/dist/assets/index-KGBiLwKE-Doz2tX9S.js +58 -0
- package/dist/assets/index.browser-BHPvGrwi-6Mh8eUw-.js +1 -0
- package/dist/assets/index.browser-BPEAfrzQ.js +6 -0
- package/dist/assets/inherits_browser-nmOknR35-Bp0mvRSL.js +1 -0
- package/dist/assets/loadCognitoIdentity-CoQHYqh2.js +1 -0
- package/{assets/loadSts-DMCb081s.js → dist/assets/loadSts-C4WH6vaF.js} +1 -1
- package/dist/assets/replService-8VoTmR2P.js +1 -0
- package/dist/assets/util-CNqBjtt6-GUXK7Yxz.js +10 -0
- package/dist/assets/util-DZRIOW0Z-CproX86h.js +1 -0
- package/dist/assets/winston-D0VJZ3P8-x1CFZMA0.js +1 -0
- package/{assets/winston-CtcDki1r-tmxR7nDg.js → dist/assets/winston-D1zwHYTY-CkaOApIk.js} +27 -27
- package/{index.html → dist/index.html} +5 -10
- package/dist/package.json +19 -0
- package/package.json +21 -18
- package/assets/__vite-browser-external-CoxO8HJt-D7Ct-6yo.js +0 -1
- package/assets/__vite-browser-external-CoxO8HJt-YbutIfMq-D7Ct-6yo.js +0 -1
- package/assets/_commonjsHelpers-38a7CZ6X-BfEUBFWa-BEFu9Otg.js +0 -1
- package/assets/_commonjsHelpers-38a7CZ6X-W3E8ocG7.js +0 -1
- package/assets/index-B1NQshiH.js +0 -1
- package/assets/index-CNLtnwcG-CT9Tl0QI.js +0 -20
- package/assets/index-CNLtnwcG-HJoxiQBn-DSWPwCKS.js +0 -20
- package/assets/index-CUtIwvTY-Dla_hTy0.js +0 -58
- package/assets/index-Cgq2oNtK.js +0 -1
- package/assets/index-D5v913EJ-CsbEilVn.js +0 -1
- package/assets/index-DGQM-tVy-4NRC-u1U.js +0 -1
- package/assets/index-VamKv2HZ--hbiLl7B.js +0 -5
- package/assets/index-VamKv2HZ-CaraMydH-D75zmpPt.js +0 -5
- package/assets/index-x3OTdjFX.css +0 -1
- package/assets/index-xuotMAFm-B-PTrwYx.js +0 -1
- package/assets/index.browser-B70rfuZo.js +0 -6
- package/assets/inherits_browser-BPb0V7-q-C7Z2MfVc.js +0 -1
- package/assets/loadCognitoIdentity-BJn2-7kg.js +0 -1
- package/assets/replService-Cb5nIeeC.js +0 -1
- package/assets/util-ByC4ZISM-BeKX2g97.js +0 -1
- package/assets/util-Di1GNq-L-D-kgTTr0.js +0 -10
- package/assets/winston-Bb5ONwX_-B86ttl8E.js +0 -1
- package/assets/winston-Bb5ONwX_-ziOUC-cl-v-kyB29h.js +0 -1
- package/assets/winston-BvKfy0iJ-CwnGwJ9X.js +0 -51
- package/assets/winston-BvKfy0iJ-DkFo4NVo-UY_jirKN.js +0 -51
- package/assets/winston-CLh__iui-Dz2dJhwh.js +0 -1
- /package/{assets → dist/assets}/__vite-browser-external-BDMct_Gn-FmFgRqLi.js +0 -0
- /package/{assets → dist/assets}/__vite-browser-external-DJy8wZt7.js +0 -0
- /package/{assets → dist/assets}/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js +0 -0
- /package/{assets → dist/assets}/_commonjs-dynamic-modules-TDtrdbi3.js +0 -0
- /package/{assets → dist/assets}/_commonjsHelpers-B4e78b8K-W3E8ocG7.js +0 -0
- /package/{assets → dist/assets}/_commonjsHelpers-D6-XlEtG.js +0 -0
- /package/{assets → dist/assets}/artificial-intelligence.png +0 -0
- /package/{assets → dist/assets}/auth.png +0 -0
- /package/{assets → dist/assets}/bg-gradient.png +0 -0
- /package/{assets → dist/assets}/favicon.ico +0 -0
- /package/{assets → dist/assets}/fractl-logo-small.png +0 -0
- /package/{assets → dist/assets}/index-69shuAsh-DF18H7zf.js +0 -0
- /package/{assets → dist/assets}/index-6mKfgpcs-DsgiI2lM.js +0 -0
- /package/{assets → dist/assets}/index-BJBOx-Z---hbiLl7B.js +0 -0
- /package/{assets → dist/assets}/index-BOLaQ9_Z.js +0 -0
- /package/{assets → dist/assets}/index-BfpeqTCw.js +0 -0
- /package/{assets → dist/assets}/index-BoNKy6Ic.js +0 -0
- /package/{assets → dist/assets}/index-ChvoNxcO.js +0 -0
- /package/{assets → dist/assets}/index-D1jV2j2Y.js +0 -0
- /package/{assets → dist/assets}/index-DIt05veo.js +0 -0
- /package/{assets → dist/assets}/index-DSosZ5sh-Ceejs_jv.js +0 -0
- /package/{assets → dist/assets}/index-DdrtU5Ny-B6H3P3T_.js +0 -0
- /package/{assets → dist/assets}/index-DsIu-45t-Bejjlpz4.js +0 -0
- /package/{assets → dist/assets}/index-Dy4QD7s1-DSfoLCzX.js +0 -0
- /package/{assets → dist/assets}/index-Ynim4IDh.js +0 -0
- /package/{assets → dist/assets}/inherits_browser-5Fj3Mjxs.js +0 -0
- /package/{assets → dist/assets}/normalizeProvider-BrOPyH3l.js +0 -0
- /package/{assets → dist/assets}/preload-helper-BlTxHScW.js +0 -0
- /package/{assets → dist/assets}/util-qaS8mbUT.js +0 -0
- /package/{assets → dist/assets}/winston-D8lBg2T-.js +0 -0
- /package/{assets → dist/assets}/winston-DaXMbKRs.js +0 -0
- /package/{fonts → dist/fonts}/red-hat.tff +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import{l as Pe,u as Le}from"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import{I as xt,k as Nt}from"./index-DSosZ5sh-Ceejs_jv.js";import{g as me}from"./index.browser-BHPvGrwi-6Mh8eUw-.js";import{r as Kt}from"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import{Y as we}from"./index-6mKfgpcs-DsgiI2lM.js";/*!
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/var jn=(function(){function o(e){var n=e||{},s=n.ValidationData,a=n.Username,c=n.Password,f=n.AuthParameters,g=n.ClientMetadata;this.validationData=s||{},this.authParameters=f||{},this.clientMetadata=g||{},this.username=a,this.password=c}var r=o.prototype;return r.getUsername=function(){return this.username},r.getPassword=function(){return this.password},r.getValidationData=function(){return this.validationData},r.getAuthParameters=function(){return this.authParameters},r.getClientMetadata=function(){return this.clientMetadata},o})(),qe={},Ae,je;function Vt(){if(je)return Ae;je=1;var o={}.toString;return Ae=Array.isArray||function(r){return o.call(r)=="[object Array]"},Ae}/*!
|
|
5
|
+
* The buffer module from node.js, for the browser.
|
|
6
|
+
*
|
|
7
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
|
8
|
+
* @license MIT
|
|
9
|
+
*/var He;function Lt(){return He||(He=1,(function(o){var r=xt(),e=Nt(),n=Vt();o.Buffer=f,o.SlowBuffer=T,o.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=Le.TYPED_ARRAY_SUPPORT!==void 0?Le.TYPED_ARRAY_SUPPORT:s(),o.kMaxLength=a();function s(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},t.foo()===42&&typeof t.subarray=="function"&&t.subarray(1,1).byteLength===0}catch{return!1}}function a(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(t,i){if(a()<i)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(i),t.__proto__=f.prototype):(t===null&&(t=new f(i)),t.length=i),t}function f(t,i,u){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(t,i,u);if(typeof t=="number"){if(typeof i=="string")throw new Error("If encoding is specified then the first argument must be a string");return y(this,t)}return g(this,t,i,u)}f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t};function g(t,i,u,h){if(typeof i=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer?U(t,i,u,h):typeof i=="string"?S(t,i,u):A(t,i)}f.from=function(t,i,u){return g(null,t,i,u)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0}));function l(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,i,u,h){return l(i),i<=0?c(t,i):u!==void 0?typeof h=="string"?c(t,i).fill(u,h):c(t,i).fill(u):c(t,i)}f.alloc=function(t,i,u){return d(null,t,i,u)};function y(t,i){if(l(i),t=c(t,i<0?0:E(i)|0),!f.TYPED_ARRAY_SUPPORT)for(var u=0;u<i;++u)t[u]=0;return t}f.allocUnsafe=function(t){return y(null,t)},f.allocUnsafeSlow=function(t){return y(null,t)};function S(t,i,u){if((typeof u!="string"||u==="")&&(u="utf8"),!f.isEncoding(u))throw new TypeError('"encoding" must be a valid string encoding');var h=B(i,u)|0;t=c(t,h);var p=t.write(i,u);return p!==h&&(t=t.slice(0,p)),t}function w(t,i){var u=i.length<0?0:E(i.length)|0;t=c(t,u);for(var h=0;h<u;h+=1)t[h]=i[h]&255;return t}function U(t,i,u,h){if(i.byteLength,u<0||i.byteLength<u)throw new RangeError("'offset' is out of bounds");if(i.byteLength<u+(h||0))throw new RangeError("'length' is out of bounds");return u===void 0&&h===void 0?i=new Uint8Array(i):h===void 0?i=new Uint8Array(i,u):i=new Uint8Array(i,u,h),f.TYPED_ARRAY_SUPPORT?(t=i,t.__proto__=f.prototype):t=w(t,i),t}function A(t,i){if(f.isBuffer(i)){var u=E(i.length)|0;return t=c(t,u),t.length===0||i.copy(t,0,0,u),t}if(i){if(typeof ArrayBuffer<"u"&&i.buffer instanceof ArrayBuffer||"length"in i)return typeof i.length!="number"||Mt(i.length)?c(t,0):w(t,i);if(i.type==="Buffer"&&n(i.data))return w(t,i.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function E(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return t|0}function T(t){return+t!=t&&(t=0),f.alloc(+t)}f.isBuffer=function(t){return!!(t!=null&&t._isBuffer)},f.compare=function(t,i){if(!f.isBuffer(t)||!f.isBuffer(i))throw new TypeError("Arguments must be Buffers");if(t===i)return 0;for(var u=t.length,h=i.length,p=0,v=Math.min(u,h);p<v;++p)if(t[p]!==i[p]){u=t[p],h=i[p];break}return u<h?-1:h<u?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,i){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var u;if(i===void 0)for(i=0,u=0;u<t.length;++u)i+=t[u].length;var h=f.allocUnsafe(i),p=0;for(u=0;u<t.length;++u){var v=t[u];if(!f.isBuffer(v))throw new TypeError('"list" argument must be an Array of Buffers');v.copy(h,p),p+=v.length}return h};function B(t,i){if(f.isBuffer(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var u=t.length;if(u===0)return 0;for(var h=!1;;)switch(i){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":case void 0:return pe(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return Ne(t).length;default:if(h)return pe(t).length;i=(""+i).toLowerCase(),h=!0}}f.byteLength=B;function q(t,i,u){var h=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,i>>>=0,u<=i))return"";for(t||(t="utf8");;)switch(t){case"hex":return bt(this,i,u);case"utf8":case"utf-8":return he(this,i,u);case"ascii":return Dt(this,i,u);case"latin1":case"binary":return It(this,i,u);case"base64":return X(this,i,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _t(this,i,u);default:if(h)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),h=!0}}f.prototype._isBuffer=!0;function M(t,i,u){var h=t[i];t[i]=t[u],t[u]=h}f.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<t;i+=2)M(this,i,i+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<t;i+=4)M(this,i,i+3),M(this,i+1,i+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<t;i+=8)M(this,i,i+7),M(this,i+1,i+6),M(this,i+2,i+5),M(this,i+3,i+4);return this},f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?he(this,0,t):q.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0},f.prototype.inspect=function(){var t="",i=o.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,i,u,h,p){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(i===void 0&&(i=0),u===void 0&&(u=t?t.length:0),h===void 0&&(h=0),p===void 0&&(p=this.length),i<0||u>t.length||h<0||p>this.length)throw new RangeError("out of range index");if(h>=p&&i>=u)return 0;if(h>=p)return-1;if(i>=u)return 1;if(i>>>=0,u>>>=0,h>>>=0,p>>>=0,this===t)return 0;for(var v=p-h,C=u-i,D=Math.min(v,C),R=this.slice(h,p),b=t.slice(i,u),_=0;_<D;++_)if(R[_]!==b[_]){v=R[_],C=b[_];break}return v<C?-1:C<v?1:0};function Y(t,i,u,h,p){if(t.length===0)return-1;if(typeof u=="string"?(h=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,isNaN(u)&&(u=p?0:t.length-1),u<0&&(u=t.length+u),u>=t.length){if(p)return-1;u=t.length-1}else if(u<0)if(p)u=0;else return-1;if(typeof i=="string"&&(i=f.from(i,h)),f.isBuffer(i))return i.length===0?-1:W(t,i,u,h,p);if(typeof i=="number")return i=i&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?p?Uint8Array.prototype.indexOf.call(t,i,u):Uint8Array.prototype.lastIndexOf.call(t,i,u):W(t,[i],u,h,p);throw new TypeError("val must be string, number or Buffer")}function W(t,i,u,h,p){var v=1,C=t.length,D=i.length;if(h!==void 0&&(h=String(h).toLowerCase(),h==="ucs2"||h==="ucs-2"||h==="utf16le"||h==="utf-16le")){if(t.length<2||i.length<2)return-1;v=2,C/=2,D/=2,u/=2}function R(Ke,Ve){return v===1?Ke[Ve]:Ke.readUInt16BE(Ve*v)}var b;if(p){var _=-1;for(b=u;b<C;b++)if(R(t,b)===R(i,_===-1?0:b-_)){if(_===-1&&(_=b),b-_+1===D)return _*v}else _!==-1&&(b-=b-_),_=-1}else for(u+D>C&&(u=C-D),b=u;b>=0;b--){for(var k=!0,ve=0;ve<D;ve++)if(R(t,b+ve)!==R(i,ve)){k=!1;break}if(k)return b}return-1}f.prototype.includes=function(t,i,u){return this.indexOf(t,i,u)!==-1},f.prototype.indexOf=function(t,i,u){return Y(this,t,i,u,!0)},f.prototype.lastIndexOf=function(t,i,u){return Y(this,t,i,u,!1)};function L(t,i,u,h){u=Number(u)||0;var p=t.length-u;h?(h=Number(h),h>p&&(h=p)):h=p;var v=i.length;if(v%2!==0)throw new TypeError("Invalid hex string");h>v/2&&(h=v/2);for(var C=0;C<h;++C){var D=parseInt(i.substr(C*2,2),16);if(isNaN(D))return C;t[u+C]=D}return C}function x(t,i,u,h){return de(pe(i,t.length-u),t,u,h)}function j(t,i,u,h){return de(Bt(i),t,u,h)}function Z(t,i,u,h){return j(t,i,u,h)}function G(t,i,u,h){return de(Ne(i),t,u,h)}function z(t,i,u,h){return de(Ft(i,t.length-u),t,u,h)}f.prototype.write=function(t,i,u,h){if(i===void 0)h="utf8",u=this.length,i=0;else if(u===void 0&&typeof i=="string")h=i,u=this.length,i=0;else if(isFinite(i))i=i|0,isFinite(u)?(u=u|0,h===void 0&&(h="utf8")):(h=u,u=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var p=this.length-i;if((u===void 0||u>p)&&(u=p),t.length>0&&(u<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");h||(h="utf8");for(var v=!1;;)switch(h){case"hex":return L(this,t,i,u);case"utf8":case"utf-8":return x(this,t,i,u);case"ascii":return j(this,t,i,u);case"latin1":case"binary":return Z(this,t,i,u);case"base64":return G(this,t,i,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,t,i,u);default:if(v)throw new TypeError("Unknown encoding: "+h);h=(""+h).toLowerCase(),v=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(t,i,u){return i===0&&u===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(i,u))}function he(t,i,u){u=Math.min(t.length,u);for(var h=[],p=i;p<u;){var v=t[p],C=null,D=v>239?4:v>223?3:v>191?2:1;if(p+D<=u){var R,b,_,k;switch(D){case 1:v<128&&(C=v);break;case 2:R=t[p+1],(R&192)===128&&(k=(v&31)<<6|R&63,k>127&&(C=k));break;case 3:R=t[p+1],b=t[p+2],(R&192)===128&&(b&192)===128&&(k=(v&15)<<12|(R&63)<<6|b&63,k>2047&&(k<55296||k>57343)&&(C=k));break;case 4:R=t[p+1],b=t[p+2],_=t[p+3],(R&192)===128&&(b&192)===128&&(_&192)===128&&(k=(v&15)<<18|(R&63)<<12|(b&63)<<6|_&63,k>65535&&k<1114112&&(C=k))}}C===null?(C=65533,D=1):C>65535&&(C-=65536,h.push(C>>>10&1023|55296),C=56320|C&1023),h.push(C),p+=D}return Tt(h)}var Be=4096;function Tt(t){var i=t.length;if(i<=Be)return String.fromCharCode.apply(String,t);for(var u="",h=0;h<i;)u+=String.fromCharCode.apply(String,t.slice(h,h+=Be));return u}function Dt(t,i,u){var h="";u=Math.min(t.length,u);for(var p=i;p<u;++p)h+=String.fromCharCode(t[p]&127);return h}function It(t,i,u){var h="";u=Math.min(t.length,u);for(var p=i;p<u;++p)h+=String.fromCharCode(t[p]);return h}function bt(t,i,u){var h=t.length;(!i||i<0)&&(i=0),(!u||u<0||u>h)&&(u=h);for(var p="",v=i;v<u;++v)p+=Ot(t[v]);return p}function _t(t,i,u){for(var h=t.slice(i,u),p="",v=0;v<h.length;v+=2)p+=String.fromCharCode(h[v]+h[v+1]*256);return p}f.prototype.slice=function(t,i){var u=this.length;t=~~t,i=i===void 0?u:~~i,t<0?(t+=u,t<0&&(t=0)):t>u&&(t=u),i<0?(i+=u,i<0&&(i=0)):i>u&&(i=u),i<t&&(i=t);var h;if(f.TYPED_ARRAY_SUPPORT)h=this.subarray(t,i),h.__proto__=f.prototype;else{var p=i-t;h=new f(p,void 0);for(var v=0;v<p;++v)h[v]=this[v+t]}return h};function P(t,i,u){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+i>u)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function(t,i,u){t=t|0,i=i|0,u||P(t,i,this.length);for(var h=this[t],p=1,v=0;++v<i&&(p*=256);)h+=this[t+v]*p;return h},f.prototype.readUIntBE=function(t,i,u){t=t|0,i=i|0,u||P(t,i,this.length);for(var h=this[t+--i],p=1;i>0&&(p*=256);)h+=this[t+--i]*p;return h},f.prototype.readUInt8=function(t,i){return i||P(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,i){return i||P(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,i){return i||P(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,i){return i||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},f.prototype.readUInt32BE=function(t,i){return i||P(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,i,u){t=t|0,i=i|0,u||P(t,i,this.length);for(var h=this[t],p=1,v=0;++v<i&&(p*=256);)h+=this[t+v]*p;return p*=128,h>=p&&(h-=Math.pow(2,8*i)),h},f.prototype.readIntBE=function(t,i,u){t=t|0,i=i|0,u||P(t,i,this.length);for(var h=i,p=1,v=this[t+--h];h>0&&(p*=256);)v+=this[t+--h]*p;return p*=128,v>=p&&(v-=Math.pow(2,8*i)),v},f.prototype.readInt8=function(t,i){return i||P(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},f.prototype.readInt16LE=function(t,i){i||P(t,2,this.length);var u=this[t]|this[t+1]<<8;return u&32768?u|4294901760:u},f.prototype.readInt16BE=function(t,i){i||P(t,2,this.length);var u=this[t+1]|this[t]<<8;return u&32768?u|4294901760:u},f.prototype.readInt32LE=function(t,i){return i||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,i){return i||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,i){return i||P(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,i){return i||P(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,i){return i||P(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,i){return i||P(t,8,this.length),e.read(this,t,!1,52,8)};function F(t,i,u,h,p,v){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>p||i<v)throw new RangeError('"value" argument is out of bounds');if(u+h>t.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function(t,i,u,h){if(t=+t,i=i|0,u=u|0,!h){var p=Math.pow(2,8*u)-1;F(this,t,i,u,p,0)}var v=1,C=0;for(this[i]=t&255;++C<u&&(v*=256);)this[i+C]=t/v&255;return i+u},f.prototype.writeUIntBE=function(t,i,u,h){if(t=+t,i=i|0,u=u|0,!h){var p=Math.pow(2,8*u)-1;F(this,t,i,u,p,0)}var v=u-1,C=1;for(this[i+v]=t&255;--v>=0&&(C*=256);)this[i+v]=t/C&255;return i+u},f.prototype.writeUInt8=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[i]=t&255,i+1};function le(t,i,u,h){i<0&&(i=65535+i+1);for(var p=0,v=Math.min(t.length-u,2);p<v;++p)t[u+p]=(i&255<<8*(h?p:1-p))>>>(h?p:1-p)*8}f.prototype.writeUInt16LE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[i]=t&255,this[i+1]=t>>>8):le(this,t,i,!0),i+2},f.prototype.writeUInt16BE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[i]=t>>>8,this[i+1]=t&255):le(this,t,i,!1),i+2};function ge(t,i,u,h){i<0&&(i=4294967295+i+1);for(var p=0,v=Math.min(t.length-u,4);p<v;++p)t[u+p]=i>>>(h?p:3-p)*8&255}f.prototype.writeUInt32LE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=t&255):ge(this,t,i,!0),i+4},f.prototype.writeUInt32BE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255):ge(this,t,i,!1),i+4},f.prototype.writeIntLE=function(t,i,u,h){if(t=+t,i=i|0,!h){var p=Math.pow(2,8*u-1);F(this,t,i,u,p-1,-p)}var v=0,C=1,D=0;for(this[i]=t&255;++v<u&&(C*=256);)t<0&&D===0&&this[i+v-1]!==0&&(D=1),this[i+v]=(t/C>>0)-D&255;return i+u},f.prototype.writeIntBE=function(t,i,u,h){if(t=+t,i=i|0,!h){var p=Math.pow(2,8*u-1);F(this,t,i,u,p-1,-p)}var v=u-1,C=1,D=0;for(this[i+v]=t&255;--v>=0&&(C*=256);)t<0&&D===0&&this[i+v+1]!==0&&(D=1),this[i+v]=(t/C>>0)-D&255;return i+u},f.prototype.writeInt8=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[i]=t&255,i+1},f.prototype.writeInt16LE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[i]=t&255,this[i+1]=t>>>8):le(this,t,i,!0),i+2},f.prototype.writeInt16BE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[i]=t>>>8,this[i+1]=t&255):le(this,t,i,!1),i+2},f.prototype.writeInt32LE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[i]=t&255,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24):ge(this,t,i,!0),i+4},f.prototype.writeInt32BE=function(t,i,u){return t=+t,i=i|0,u||F(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255):ge(this,t,i,!1),i+4};function Fe(t,i,u,h,p,v){if(u+h>t.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function Me(t,i,u,h,p){return p||Fe(t,i,u,4),e.write(t,i,u,h,23,4),u+4}f.prototype.writeFloatLE=function(t,i,u){return Me(this,t,i,!0,u)},f.prototype.writeFloatBE=function(t,i,u){return Me(this,t,i,!1,u)};function xe(t,i,u,h,p){return p||Fe(t,i,u,8),e.write(t,i,u,h,52,8),u+8}f.prototype.writeDoubleLE=function(t,i,u){return xe(this,t,i,!0,u)},f.prototype.writeDoubleBE=function(t,i,u){return xe(this,t,i,!1,u)},f.prototype.copy=function(t,i,u,h){if(u||(u=0),!h&&h!==0&&(h=this.length),i>=t.length&&(i=t.length),i||(i=0),h>0&&h<u&&(h=u),h===u||t.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(u<0||u>=this.length)throw new RangeError("sourceStart out of bounds");if(h<0)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),t.length-i<h-u&&(h=t.length-i+u);var p=h-u,v;if(this===t&&u<i&&i<h)for(v=p-1;v>=0;--v)t[v+i]=this[v+u];else if(p<1e3||!f.TYPED_ARRAY_SUPPORT)for(v=0;v<p;++v)t[v+i]=this[v+u];else Uint8Array.prototype.set.call(t,this.subarray(u,u+p),i);return p},f.prototype.fill=function(t,i,u,h){if(typeof t=="string"){if(typeof i=="string"?(h=i,i=0,u=this.length):typeof u=="string"&&(h=u,u=this.length),t.length===1){var p=t.charCodeAt(0);p<256&&(t=p)}if(h!==void 0&&typeof h!="string")throw new TypeError("encoding must be a string");if(typeof h=="string"&&!f.isEncoding(h))throw new TypeError("Unknown encoding: "+h)}else typeof t=="number"&&(t=t&255);if(i<0||this.length<i||this.length<u)throw new RangeError("Out of range index");if(u<=i)return this;i=i>>>0,u=u===void 0?this.length:u>>>0,t||(t=0);var v;if(typeof t=="number")for(v=i;v<u;++v)this[v]=t;else{var C=f.isBuffer(t)?t:pe(new f(t,h).toString()),D=C.length;for(v=0;v<u-i;++v)this[v+i]=C[v%D]}return this};var Pt=/[^+\/0-9A-Za-z-_]/g;function Rt(t){if(t=kt(t).replace(Pt,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function kt(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Ot(t){return t<16?"0"+t.toString(16):t.toString(16)}function pe(t,i){i=i||1/0;for(var u,h=t.length,p=null,v=[],C=0;C<h;++C){if(u=t.charCodeAt(C),u>55295&&u<57344){if(!p){if(u>56319){(i-=3)>-1&&v.push(239,191,189);continue}else if(C+1===h){(i-=3)>-1&&v.push(239,191,189);continue}p=u;continue}if(u<56320){(i-=3)>-1&&v.push(239,191,189),p=u;continue}u=(p-55296<<10|u-56320)+65536}else p&&(i-=3)>-1&&v.push(239,191,189);if(p=null,u<128){if((i-=1)<0)break;v.push(u)}else if(u<2048){if((i-=2)<0)break;v.push(u>>6|192,u&63|128)}else if(u<65536){if((i-=3)<0)break;v.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((i-=4)<0)break;v.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return v}function Bt(t){for(var i=[],u=0;u<t.length;++u)i.push(t.charCodeAt(u)&255);return i}function Ft(t,i){for(var u,h,p,v=[],C=0;C<t.length&&!((i-=2)<0);++C)u=t.charCodeAt(C),h=u>>8,p=u%256,v.push(p),v.push(h);return v}function Ne(t){return r.toByteArray(Rt(t))}function de(t,i,u,h){for(var p=0;p<h&&!(p+u>=i.length||p>=t.length);++p)i[p+u]=t[p];return p}function Mt(t){return t!==t}})(qe)),qe}var I=Lt(),K;typeof window<"u"&&window.crypto&&(K=window.crypto);!K&&typeof window<"u"&&window.msCrypto&&(K=window.msCrypto);!K&&typeof me<"u"&&me.crypto&&(K=me.crypto);if(!K&&typeof Kt=="function")try{K=require("crypto")}catch{}function qt(){if(K){if(typeof K.getRandomValues=="function")try{return K.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof K.randomBytes=="function")try{return K.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")}function jt(o){for(var r=o.words,e=o.sigBytes,n=[],s=0;s<e;s++){var a=r[s>>>2]>>>24-s%4*8&255;n.push((a>>>4).toString(16)),n.push((a&15).toString(16))}return n.join("")}var Ht=(function(){function o(e,n){e=this.words=e||[],n!=null?this.sigBytes=n:this.sigBytes=e.length*4}var r=o.prototype;return r.random=function(e){for(var n=[],s=0;s<e;s+=4)n.push(qt());return new o(n,e)},r.toString=function(){return jt(this)},o})(),Ye={};/*! *****************************************************************************
|
|
10
|
+
Copyright (c) Microsoft Corporation.
|
|
11
|
+
|
|
12
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
+
purpose with or without fee is hereby granted.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
22
|
+
***************************************************************************** */var Ue=function(o,r){return Ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var s in n)n.hasOwnProperty(s)&&(e[s]=n[s])},Ue(o,r)};function Yt(o,r){Ue(o,r);function e(){this.constructor=o}o.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var Ee=function(){return Ee=Object.assign||function(o){for(var r,e=1,n=arguments.length;e<n;e++){r=arguments[e];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(o[s]=r[s])}return o},Ee.apply(this,arguments)};function Gt(o,r){var e={};for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&r.indexOf(n)<0&&(e[n]=o[n]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(o);s<n.length;s++)r.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(o,n[s])&&(e[n[s]]=o[n[s]]);return e}function Jt(o,r,e,n){var s=arguments.length,a=s<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,e):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,r,e,n);else for(var f=o.length-1;f>=0;f--)(c=o[f])&&(a=(s<3?c(a):s>3?c(r,e,a):c(r,e))||a);return s>3&&a&&Object.defineProperty(r,e,a),a}function Wt(o,r){return function(e,n){r(e,n,o)}}function Zt(o,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(o,r)}function zt(o,r,e,n){function s(a){return a instanceof e?a:new e(function(c){c(a)})}return new(e||(e=Promise))(function(a,c){function f(d){try{l(n.next(d))}catch(y){c(y)}}function g(d){try{l(n.throw(d))}catch(y){c(y)}}function l(d){d.done?a(d.value):s(d.value).then(f,g)}l((n=n.apply(o,r||[])).next())})}function Xt(o,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,c;return c={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(l){return function(d){return g([l,d])}}function g(l){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,s&&(a=l[0]&2?s.return:l[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,l[1])).done)return a;switch(s=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,s=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){e.label=l[1];break}if(l[0]===6&&e.label<a[1]){e.label=a[1],a=l;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(l);break}a[2]&&e.ops.pop(),e.trys.pop();continue}l=r.call(o,e)}catch(d){l=[6,d],s=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function $t(o,r,e,n){n===void 0&&(n=e),o[n]=r[e]}function Qt(o,r){for(var e in o)e!=="default"&&!r.hasOwnProperty(e)&&(r[e]=o[e])}function Te(o){var r=typeof Symbol=="function"&&Symbol.iterator,e=r&&o[r],n=0;if(e)return e.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&n>=o.length&&(o=void 0),{value:o&&o[n++],done:!o}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function yt(o,r){var e=typeof Symbol=="function"&&o[Symbol.iterator];if(!e)return o;var n=e.call(o),s,a=[],c;try{for(;(r===void 0||r-- >0)&&!(s=n.next()).done;)a.push(s.value)}catch(f){c={error:f}}finally{try{s&&!s.done&&(e=n.return)&&e.call(n)}finally{if(c)throw c.error}}return a}function er(){for(var o=[],r=0;r<arguments.length;r++)o=o.concat(yt(arguments[r]));return o}function tr(){for(var o=0,r=0,e=arguments.length;r<e;r++)o+=arguments[r].length;for(var n=Array(o),s=0,r=0;r<e;r++)for(var a=arguments[r],c=0,f=a.length;c<f;c++,s++)n[s]=a[c];return n}function fe(o){return this instanceof fe?(this.v=o,this):new fe(o)}function rr(o,r,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(o,r||[]),s,a=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(S){n[S]&&(s[S]=function(w){return new Promise(function(U,A){a.push([S,w,U,A])>1||f(S,w)})})}function f(S,w){try{g(n[S](w))}catch(U){y(a[0][3],U)}}function g(S){S.value instanceof fe?Promise.resolve(S.value.v).then(l,d):y(a[0][2],S)}function l(S){f("next",S)}function d(S){f("throw",S)}function y(S,w){S(w),a.shift(),a.length&&f(a[0][0],a[0][1])}}function nr(o){var r,e;return r={},n("next"),n("throw",function(s){throw s}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(s,a){r[s]=o[s]?function(c){return(e=!e)?{value:fe(o[s](c)),done:s==="return"}:a?a(c):c}:a}}function ir(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=o[Symbol.asyncIterator],e;return r?r.call(o):(o=typeof Te=="function"?Te(o):o[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(a){e[a]=o[a]&&function(c){return new Promise(function(f,g){c=o[a](c),s(f,g,c.done,c.value)})}}function s(a,c,f,g){Promise.resolve(g).then(function(l){a({value:l,done:f})},c)}}function sr(o,r){return Object.defineProperty?Object.defineProperty(o,"raw",{value:r}):o.raw=r,o}function or(o){if(o&&o.__esModule)return o;var r={};if(o!=null)for(var e in o)Object.hasOwnProperty.call(o,e)&&(r[e]=o[e]);return r.default=o,r}function ar(o){return o&&o.__esModule?o:{default:o}}function ur(o,r){if(!r.has(o))throw new TypeError("attempted to get private field on non-instance");return r.get(o)}function fr(o,r,e){if(!r.has(o))throw new TypeError("attempted to set private field on non-instance");return r.set(o,e),e}const cr=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return Ee},__asyncDelegator:nr,__asyncGenerator:rr,__asyncValues:ir,__await:fe,__awaiter:zt,__classPrivateFieldGet:ur,__classPrivateFieldSet:fr,__createBinding:$t,__decorate:Jt,__exportStar:Qt,__extends:Yt,__generator:Xt,__importDefault:ar,__importStar:or,__makeTemplateObject:sr,__metadata:Zt,__param:Wt,__read:yt,__rest:Gt,__spread:er,__spreadArrays:tr,__values:Te},Symbol.toStringTag,{value:"Module"})),St=Pe(cr);var re={},N={},Ge;function mt(){return Ge||(Ge=1,Object.defineProperty(N,"__esModule",{value:!0}),N.MAX_HASHABLE_LENGTH=N.INIT=N.KEY=N.DIGEST_LENGTH=N.BLOCK_SIZE=void 0,N.BLOCK_SIZE=64,N.DIGEST_LENGTH=32,N.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),N.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],N.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),N}var ne={},Je;function hr(){if(Je)return ne;Je=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.RawSha256=void 0;var o=mt(),r=(function(){function e(){this.state=Int32Array.from(o.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(n){if(this.finished)throw new Error("Attempted to update an already finished hash.");var s=0,a=n.byteLength;if(this.bytesHashed+=a,this.bytesHashed*8>o.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;a>0;)this.buffer[this.bufferLength++]=n[s++],a--,this.bufferLength===o.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var n=this.bytesHashed*8,s=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),a=this.bufferLength;if(s.setUint8(this.bufferLength++,128),a%o.BLOCK_SIZE>=o.BLOCK_SIZE-8){for(var c=this.bufferLength;c<o.BLOCK_SIZE;c++)s.setUint8(c,0);this.hashBuffer(),this.bufferLength=0}for(var c=this.bufferLength;c<o.BLOCK_SIZE-8;c++)s.setUint8(c,0);s.setUint32(o.BLOCK_SIZE-8,Math.floor(n/4294967296),!0),s.setUint32(o.BLOCK_SIZE-4,n),this.hashBuffer(),this.finished=!0}for(var f=new Uint8Array(o.DIGEST_LENGTH),c=0;c<8;c++)f[c*4]=this.state[c]>>>24&255,f[c*4+1]=this.state[c]>>>16&255,f[c*4+2]=this.state[c]>>>8&255,f[c*4+3]=this.state[c]>>>0&255;return f},e.prototype.hashBuffer=function(){for(var n=this,s=n.buffer,a=n.state,c=a[0],f=a[1],g=a[2],l=a[3],d=a[4],y=a[5],S=a[6],w=a[7],U=0;U<o.BLOCK_SIZE;U++){if(U<16)this.temp[U]=(s[U*4]&255)<<24|(s[U*4+1]&255)<<16|(s[U*4+2]&255)<<8|s[U*4+3]&255;else{var A=this.temp[U-2],E=(A>>>17|A<<15)^(A>>>19|A<<13)^A>>>10;A=this.temp[U-15];var T=(A>>>7|A<<25)^(A>>>18|A<<14)^A>>>3;this.temp[U]=(E+this.temp[U-7]|0)+(T+this.temp[U-16]|0)}var B=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&y^~d&S)|0)+(w+(o.KEY[U]+this.temp[U]|0)|0)|0,q=((c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10))+(c&f^c&g^f&g)|0;w=S,S=y,y=d,d=l+B|0,l=g,g=f,f=c,c=B+q|0}a[0]+=c,a[1]+=f,a[2]+=g,a[3]+=l,a[4]+=d,a[5]+=y,a[6]+=S,a[7]+=w},e})();return ne.RawSha256=r,ne}var We={},ie={};const lr=o=>{const r=[];for(let e=0,n=o.length;e<n;e++){const s=o.charCodeAt(e);if(s<128)r.push(s);else if(s<2048)r.push(s>>6|192,s&63|128);else if(e+1<o.length&&(s&64512)===55296&&(o.charCodeAt(e+1)&64512)===56320){const a=65536+((s&1023)<<10)+(o.charCodeAt(++e)&1023);r.push(a>>18|240,a>>12&63|128,a>>6&63|128,a&63|128)}else r.push(s>>12|224,s>>6&63|128,s&63|128)}return Uint8Array.from(r)},gr=o=>{let r="";for(let e=0,n=o.length;e<n;e++){const s=o[e];if(s<128)r+=String.fromCharCode(s);else if(192<=s&&s<224){const a=o[++e];r+=String.fromCharCode((s&31)<<6|a&63)}else if(240<=s&&s<365){const a="%"+[s,o[++e],o[++e],o[++e]].map(c=>c.toString(16)).join("%");r+=decodeURIComponent(a)}else r+=String.fromCharCode((s&15)<<12|(o[++e]&63)<<6|o[++e]&63)}return r};function pr(o){return new TextEncoder().encode(o)}function dr(o){return new TextDecoder("utf-8").decode(o)}const vr=o=>typeof TextEncoder=="function"?pr(o):lr(o),yr=o=>typeof TextDecoder=="function"?dr(o):gr(o),Sr=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:vr,toUtf8:yr},Symbol.toStringTag,{value:"Module"})),mr=Pe(Sr);var Ze;function wr(){if(Ze)return ie;Ze=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.convertToBuffer=void 0;var o=mr,r=typeof we<"u"&&we.from?function(n){return we.from(n,"utf8")}:o.fromUtf8;function e(n){return n instanceof Uint8Array?n:typeof n=="string"?r(n):ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(n)}return ie.convertToBuffer=e,ie}var se={},ze;function Ar(){if(ze)return se;ze=1,Object.defineProperty(se,"__esModule",{value:!0}),se.isEmptyData=void 0;function o(r){return typeof r=="string"?r.length===0:r.byteLength===0}return se.isEmptyData=o,se}var oe={},Xe;function Cr(){if(Xe)return oe;Xe=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.numToUint8=void 0;function o(r){return new Uint8Array([(r&4278190080)>>24,(r&16711680)>>16,(r&65280)>>8,r&255])}return oe.numToUint8=o,oe}var ae={},$e;function Ur(){if($e)return ae;$e=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.uint32ArrayFrom=void 0;function o(r){if(!Array.from){for(var e=new Uint32Array(r.length),n=0;n<r.length;)e[n]=r[n];return e}return Uint32Array.from(r)}return ae.uint32ArrayFrom=o,ae}var Qe;function Er(){return Qe||(Qe=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.uint32ArrayFrom=o.numToUint8=o.isEmptyData=o.convertToBuffer=void 0;var r=wr();Object.defineProperty(o,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var e=Ar();Object.defineProperty(o,"isEmptyData",{enumerable:!0,get:function(){return e.isEmptyData}});var n=Cr();Object.defineProperty(o,"numToUint8",{enumerable:!0,get:function(){return n.numToUint8}});var s=Ur();Object.defineProperty(o,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})})(We)),We}var et;function Tr(){if(et)return re;et=1,Object.defineProperty(re,"__esModule",{value:!0}),re.Sha256=void 0;var o=St,r=mt(),e=hr(),n=Er(),s=(function(){function c(f){if(this.hash=new e.RawSha256,f){this.outer=new e.RawSha256;var g=a(f),l=new Uint8Array(r.BLOCK_SIZE);l.set(g);for(var d=0;d<r.BLOCK_SIZE;d++)g[d]^=54,l[d]^=92;this.hash.update(g),this.outer.update(l);for(var d=0;d<g.byteLength;d++)g[d]=0}}return c.prototype.update=function(f){if(!((0,n.isEmptyData)(f)||this.error))try{this.hash.update((0,n.convertToBuffer)(f))}catch(g){this.error=g}},c.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},c.prototype.digest=function(){return(0,o.__awaiter)(this,void 0,void 0,function(){return(0,o.__generator)(this,function(f){return[2,this.digestSync()]})})},c})();re.Sha256=s;function a(c){var f=(0,n.convertToBuffer)(c);if(f.byteLength>r.BLOCK_SIZE){var g=new e.RawSha256;g.update(f),f=g.digest()}var l=new Uint8Array(r.BLOCK_SIZE);return l.set(f),l}return re}var tt;function Dr(){return tt||(tt=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0});var r=St;(0,r.__exportStar)(Tr(),o)})(Ye)),Ye}var ue=Dr();function m(o,r){o!=null&&this.fromString(o,r)}function O(){return new m(null)}var H,Ir=0xdeadbeefcafe,rt=(Ir&16777215)==15715070;function br(o,r,e,n,s,a){for(;--a>=0;){var c=r*this[o++]+e[n]+s;s=Math.floor(c/67108864),e[n++]=c&67108863}return s}function _r(o,r,e,n,s,a){for(var c=r&32767,f=r>>15;--a>=0;){var g=this[o]&32767,l=this[o++]>>15,d=f*g+l*c;g=c*g+((d&32767)<<15)+e[n]+(s&1073741823),s=(g>>>30)+(d>>>15)+f*l+(s>>>30),e[n++]=g&1073741823}return s}function Pr(o,r,e,n,s,a){for(var c=r&16383,f=r>>14;--a>=0;){var g=this[o]&16383,l=this[o++]>>14,d=f*g+l*c;g=c*g+((d&16383)<<14)+e[n]+s,s=(g>>28)+(d>>14)+f*l,e[n++]=g&268435455}return s}var nt=typeof navigator<"u";nt&&rt&&navigator.appName=="Microsoft Internet Explorer"?(m.prototype.am=_r,H=30):nt&&rt&&navigator.appName!="Netscape"?(m.prototype.am=br,H=26):(m.prototype.am=Pr,H=28);m.prototype.DB=H;m.prototype.DM=(1<<H)-1;m.prototype.DV=1<<H;var Re=52;m.prototype.FV=Math.pow(2,Re);m.prototype.F1=Re-H;m.prototype.F2=2*H-Re;var Rr="0123456789abcdefghijklmnopqrstuvwxyz",Se=new Array,ee,V;ee=48;for(V=0;V<=9;++V)Se[ee++]=V;ee=97;for(V=10;V<36;++V)Se[ee++]=V;ee=65;for(V=10;V<36;++V)Se[ee++]=V;function it(o){return Rr.charAt(o)}function kr(o,r){var e=Se[o.charCodeAt(r)];return e??-1}function Or(o){for(var r=this.t-1;r>=0;--r)o[r]=this[r];o.t=this.t,o.s=this.s}function Br(o){this.t=1,this.s=o<0?-1:0,o>0?this[0]=o:o<-1?this[0]=o+this.DV:this.t=0}function ke(o){var r=O();return r.fromInt(o),r}function Fr(o,r){var e;if(r==16)e=4;else if(r==8)e=3;else if(r==2)e=1;else if(r==32)e=5;else if(r==4)e=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;for(var n=o.length,s=!1,a=0;--n>=0;){var c=kr(o,n);if(c<0){o.charAt(n)=="-"&&(s=!0);continue}s=!1,a==0?this[this.t++]=c:a+e>this.DB?(this[this.t-1]|=(c&(1<<this.DB-a)-1)<<a,this[this.t++]=c>>this.DB-a):this[this.t-1]|=c<<a,a+=e,a>=this.DB&&(a-=this.DB)}this.clamp(),s&&m.ZERO.subTo(this,this)}function Mr(){for(var o=this.s&this.DM;this.t>0&&this[this.t-1]==o;)--this.t}function xr(o){if(this.s<0)return"-"+this.negate().toString(o);var r;if(o==16)r=4;else if(o==8)r=3;else if(o==2)r=1;else if(o==32)r=5;else if(o==4)r=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");var e=(1<<r)-1,n,s=!1,a="",c=this.t,f=this.DB-c*this.DB%r;if(c-- >0)for(f<this.DB&&(n=this[c]>>f)>0&&(s=!0,a=it(n));c>=0;)f<r?(n=(this[c]&(1<<f)-1)<<r-f,n|=this[--c]>>(f+=this.DB-r)):(n=this[c]>>(f-=r)&e,f<=0&&(f+=this.DB,--c)),n>0&&(s=!0),s&&(a+=it(n));return s?a:"0"}function Nr(){var o=O();return m.ZERO.subTo(this,o),o}function Kr(){return this.s<0?this.negate():this}function Vr(o){var r=this.s-o.s;if(r!=0)return r;var e=this.t;if(r=e-o.t,r!=0)return this.s<0?-r:r;for(;--e>=0;)if((r=this[e]-o[e])!=0)return r;return 0}function Oe(o){var r=1,e;return(e=o>>>16)!=0&&(o=e,r+=16),(e=o>>8)!=0&&(o=e,r+=8),(e=o>>4)!=0&&(o=e,r+=4),(e=o>>2)!=0&&(o=e,r+=2),(e=o>>1)!=0&&(o=e,r+=1),r}function Lr(){return this.t<=0?0:this.DB*(this.t-1)+Oe(this[this.t-1]^this.s&this.DM)}function qr(o,r){var e;for(e=this.t-1;e>=0;--e)r[e+o]=this[e];for(e=o-1;e>=0;--e)r[e]=0;r.t=this.t+o,r.s=this.s}function jr(o,r){for(var e=o;e<this.t;++e)r[e-o]=this[e];r.t=Math.max(this.t-o,0),r.s=this.s}function Hr(o,r){var e=o%this.DB,n=this.DB-e,s=(1<<n)-1,a=Math.floor(o/this.DB),c=this.s<<e&this.DM,f;for(f=this.t-1;f>=0;--f)r[f+a+1]=this[f]>>n|c,c=(this[f]&s)<<e;for(f=a-1;f>=0;--f)r[f]=0;r[a]=c,r.t=this.t+a+1,r.s=this.s,r.clamp()}function Yr(o,r){r.s=this.s;var e=Math.floor(o/this.DB);if(e>=this.t){r.t=0;return}var n=o%this.DB,s=this.DB-n,a=(1<<n)-1;r[0]=this[e]>>n;for(var c=e+1;c<this.t;++c)r[c-e-1]|=(this[c]&a)<<s,r[c-e]=this[c]>>n;n>0&&(r[this.t-e-1]|=(this.s&a)<<s),r.t=this.t-e,r.clamp()}function Gr(o,r){for(var e=0,n=0,s=Math.min(o.t,this.t);e<s;)n+=this[e]-o[e],r[e++]=n&this.DM,n>>=this.DB;if(o.t<this.t){for(n-=o.s;e<this.t;)n+=this[e],r[e++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;e<o.t;)n-=o[e],r[e++]=n&this.DM,n>>=this.DB;n-=o.s}r.s=n<0?-1:0,n<-1?r[e++]=this.DV+n:n>0&&(r[e++]=n),r.t=e,r.clamp()}function Jr(o,r){var e=this.abs(),n=o.abs(),s=e.t;for(r.t=s+n.t;--s>=0;)r[s]=0;for(s=0;s<n.t;++s)r[s+e.t]=e.am(0,n[s],r,s,0,e.t);r.s=0,r.clamp(),this.s!=o.s&&m.ZERO.subTo(r,r)}function Wr(o){for(var r=this.abs(),e=o.t=2*r.t;--e>=0;)o[e]=0;for(e=0;e<r.t-1;++e){var n=r.am(e,r[e],o,2*e,0,1);(o[e+r.t]+=r.am(e+1,2*r[e],o,2*e+1,n,r.t-e-1))>=r.DV&&(o[e+r.t]-=r.DV,o[e+r.t+1]=1)}o.t>0&&(o[o.t-1]+=r.am(e,r[e],o,2*e,0,1)),o.s=0,o.clamp()}function Zr(o,r,e){var n=o.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t){r?.fromInt(0),e!=null&&this.copyTo(e);return}e==null&&(e=O());var a=O(),c=this.s,f=o.s,g=this.DB-Oe(n[n.t-1]);g>0?(n.lShiftTo(g,a),s.lShiftTo(g,e)):(n.copyTo(a),s.copyTo(e));var l=a.t,d=a[l-1];if(d!=0){var y=d*(1<<this.F1)+(l>1?a[l-2]>>this.F2:0),S=this.FV/y,w=(1<<this.F1)/y,U=1<<this.F2,A=e.t,E=A-l,T=r??O();for(a.dlShiftTo(E,T),e.compareTo(T)>=0&&(e[e.t++]=1,e.subTo(T,e)),m.ONE.dlShiftTo(l,T),T.subTo(a,a);a.t<l;)a[a.t++]=0;for(;--E>=0;){var B=e[--A]==d?this.DM:Math.floor(e[A]*S+(e[A-1]+U)*w);if((e[A]+=a.am(0,B,e,E,0,l))<B)for(a.dlShiftTo(E,T),e.subTo(T,e);e[A]<--B;)e.subTo(T,e)}r!=null&&(e.drShiftTo(l,r),c!=f&&m.ZERO.subTo(r,r)),e.t=l,e.clamp(),g>0&&e.rShiftTo(g,e),c<0&&m.ZERO.subTo(e,e)}}}function zr(o){var r=O();return this.abs().divRemTo(o,null,r),this.s<0&&r.compareTo(m.ZERO)>0&&o.subTo(r,r),r}function Xr(){if(this.t<1)return 0;var o=this[0];if((o&1)==0)return 0;var r=o&3;return r=r*(2-(o&15)*r)&15,r=r*(2-(o&255)*r)&255,r=r*(2-((o&65535)*r&65535))&65535,r=r*(2-o*r%this.DV)%this.DV,r>0?this.DV-r:-r}function $r(o){return this.compareTo(o)==0}function Qr(o,r){for(var e=0,n=0,s=Math.min(o.t,this.t);e<s;)n+=this[e]+o[e],r[e++]=n&this.DM,n>>=this.DB;if(o.t<this.t){for(n+=o.s;e<this.t;)n+=this[e],r[e++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;e<o.t;)n+=o[e],r[e++]=n&this.DM,n>>=this.DB;n+=o.s}r.s=n<0?-1:0,n>0?r[e++]=n:n<-1&&(r[e++]=this.DV+n),r.t=e,r.clamp()}function en(o){var r=O();return this.addTo(o,r),r}function tn(o){var r=O();return this.subTo(o,r),r}function rn(o){var r=O();return this.multiplyTo(o,r),r}function nn(o){var r=O();return this.divRemTo(o,r,null),r}function te(o){this.m=o,this.mp=o.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<o.DB-15)-1,this.mt2=2*o.t}function sn(o){var r=O();return o.abs().dlShiftTo(this.m.t,r),r.divRemTo(this.m,null,r),o.s<0&&r.compareTo(m.ZERO)>0&&this.m.subTo(r,r),r}function on(o){var r=O();return o.copyTo(r),this.reduce(r),r}function an(o){for(;o.t<=this.mt2;)o[o.t++]=0;for(var r=0;r<this.m.t;++r){var e=o[r]&32767,n=e*this.mpl+((e*this.mph+(o[r]>>15)*this.mpl&this.um)<<15)&o.DM;for(e=r+this.m.t,o[e]+=this.m.am(0,n,o,r,0,this.m.t);o[e]>=o.DV;)o[e]-=o.DV,o[++e]++}o.clamp(),o.drShiftTo(this.m.t,o),o.compareTo(this.m)>=0&&o.subTo(this.m,o)}function un(o,r){o.squareTo(r),this.reduce(r)}function fn(o,r,e){o.multiplyTo(r,e),this.reduce(e)}te.prototype.convert=sn;te.prototype.revert=on;te.prototype.reduce=an;te.prototype.mulTo=fn;te.prototype.sqrTo=un;function cn(o,r,e){var n=o.bitLength(),s,a=ke(1),c=new te(r);if(n<=0)return a;n<18?s=1:n<48?s=3:n<144?s=4:n<768?s=5:s=6;var f=new Array,g=3,l=s-1,d=(1<<s)-1;if(f[1]=c.convert(this),s>1){var y=O();for(c.sqrTo(f[1],y);g<=d;)f[g]=O(),c.mulTo(y,f[g-2],f[g]),g+=2}var S=o.t-1,w,U=!0,A=O(),E;for(n=Oe(o[S])-1;S>=0;){for(n>=l?w=o[S]>>n-l&d:(w=(o[S]&(1<<n+1)-1)<<l-n,S>0&&(w|=o[S-1]>>this.DB+n-l)),g=s;(w&1)==0;)w>>=1,--g;if((n-=g)<0&&(n+=this.DB,--S),U)f[w].copyTo(a),U=!1;else{for(;g>1;)c.sqrTo(a,A),c.sqrTo(A,a),g-=2;g>0?c.sqrTo(a,A):(E=a,a=A,A=E),c.mulTo(A,f[w],a)}for(;S>=0&&(o[S]&1<<n)==0;)c.sqrTo(a,A),E=a,a=A,A=E,--n<0&&(n=this.DB-1,--S)}var T=c.revert(a);return e(null,T),T}m.prototype.copyTo=Or;m.prototype.fromInt=Br;m.prototype.fromString=Fr;m.prototype.clamp=Mr;m.prototype.dlShiftTo=qr;m.prototype.drShiftTo=jr;m.prototype.lShiftTo=Hr;m.prototype.rShiftTo=Yr;m.prototype.subTo=Gr;m.prototype.multiplyTo=Jr;m.prototype.squareTo=Wr;m.prototype.divRemTo=Zr;m.prototype.invDigit=Xr;m.prototype.addTo=Qr;m.prototype.toString=xr;m.prototype.negate=Nr;m.prototype.abs=Kr;m.prototype.compareTo=Vr;m.prototype.bitLength=Lr;m.prototype.mod=zr;m.prototype.equals=$r;m.prototype.add=en;m.prototype.subtract=tn;m.prototype.multiply=rn;m.prototype.divide=nn;m.prototype.modPow=cn;m.ZERO=ke(0);m.ONE=ke(1);/*!
|
|
23
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
24
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
25
|
+
*/function Ce(o){return I.Buffer.from(new Ht().random(o).toString(),"hex")}var hn=/^[89a-f]/i,ln="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",gn="userAttributes.",$=(function(){function o(e){this.N=new m(ln,16),this.g=new m("2",16),this.k=new m(this.hexHash(""+this.padHex(this.N)+this.padHex(this.g)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue(function(){}),this.infoBits=I.Buffer.from("Caldera Derived Key","utf8"),this.poolName=e}var r=o.prototype;return r.getSmallAValue=function(){return this.smallAValue},r.getLargeAValue=function(e){var n=this;this.largeAValue?e(null,this.largeAValue):this.calculateA(this.smallAValue,function(s,a){s&&e(s,null),n.largeAValue=a,e(null,n.largeAValue)})},r.generateRandomSmallA=function(){var e=Ce(128).toString("hex"),n=new m(e,16);return n},r.generateRandomString=function(){return Ce(40).toString("base64")},r.getRandomPassword=function(){return this.randomPassword},r.getSaltDevices=function(){return this.SaltToHashDevices},r.getVerifierDevices=function(){return this.verifierDevices},r.generateHashDevice=function(e,n,s){var a=this;this.randomPassword=this.generateRandomString();var c=""+e+n+":"+this.randomPassword,f=this.hash(c),g=Ce(16).toString("hex");this.SaltToHashDevices=this.padHex(new m(g,16)),this.g.modPow(new m(this.hexHash(this.SaltToHashDevices+f),16),this.N,function(l,d){l&&s(l,null),a.verifierDevices=a.padHex(d),s(null,null)})},r.calculateA=function(e,n){var s=this;this.g.modPow(e,this.N,function(a,c){a&&n(a,null),c.mod(s.N).equals(m.ZERO)&&n(new Error("Illegal paramater. A mod N cannot be 0."),null),n(null,c)})},r.calculateU=function(e,n){this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(n));var s=new m(this.UHexHash,16);return s},r.hash=function(e){var n=new ue.Sha256;n.update(e);var s=n.digestSync(),a=I.Buffer.from(s).toString("hex");return new Array(64-a.length).join("0")+a},r.hexHash=function(e){return this.hash(I.Buffer.from(e,"hex"))},r.computehkdf=function(e,n){var s=I.Buffer.concat([this.infoBits,I.Buffer.from("","utf8")]),a=new ue.Sha256(n);a.update(e);var c=a.digestSync(),f=new ue.Sha256(c);f.update(s);var g=f.digestSync(),l=g,d=l.slice(0,16);return d},r.getPasswordAuthenticationKey=function(e,n,s,a,c){var f=this;if(s.mod(this.N).equals(m.ZERO))throw new Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,s),this.UValue.equals(m.ZERO))throw new Error("U cannot be zero.");var g=""+this.poolName+e+":"+n,l=this.hash(g),d=new m(this.hexHash(this.padHex(a)+l),16);this.calculateS(d,s,function(y,S){y&&c(y,null);var w=f.computehkdf(I.Buffer.from(f.padHex(S),"hex"),I.Buffer.from(f.padHex(f.UValue),"hex"));c(null,w)})},r.calculateS=function(e,n,s){var a=this;this.g.modPow(e,this.N,function(c,f){c&&s(c,null);var g=n.subtract(a.k.multiply(f));g.modPow(a.smallAValue.add(a.UValue.multiply(e)),a.N,function(l,d){l&&s(l,null),s(null,d.mod(a.N))})})},r.getNewPasswordRequiredChallengeUserAttributePrefix=function(){return gn},r.padHex=function(e){if(!(e instanceof m))throw new Error("Not a BigInteger");var n=e.compareTo(m.ZERO)<0,s=e.abs().toString(16);if(s=s.length%2!==0?"0"+s:s,s=hn.test(s)?"00"+s:s,n){var a=s.split("").map(function(f){var g=~parseInt(f,16)&15;return"0123456789ABCDEF".charAt(g)}).join(""),c=new m(a,16).add(m.ONE);s=c.toString(16),s.toUpperCase().startsWith("FF8")&&(s=s.substring(2))}return s},o})();/*!
|
|
26
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
27
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
28
|
+
*/var wt=(function(){function o(e){this.jwtToken=e||"",this.payload=this.decodePayload()}var r=o.prototype;return r.getJwtToken=function(){return this.jwtToken},r.getExpiration=function(){return this.payload.exp},r.getIssuedAt=function(){return this.payload.iat},r.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(I.Buffer.from(e,"base64").toString("utf8"))}catch{return{}}},o})();function pn(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,De(o,r)}function De(o,r){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},De(o,r)}var st=(function(o){function r(e){var n=e===void 0?{}:e,s=n.AccessToken;return o.call(this,s||"")||this}return pn(r,o),r})(wt);function dn(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,Ie(o,r)}function Ie(o,r){return Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},Ie(o,r)}var ot=(function(o){function r(e){var n=e===void 0?{}:e,s=n.IdToken;return o.call(this,s||"")||this}return dn(r,o),r})(wt);/*!
|
|
29
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
30
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
31
|
+
*/var at=(function(){function o(e){var n=e===void 0?{}:e,s=n.RefreshToken;this.token=s||""}var r=o.prototype;return r.getToken=function(){return this.token},o})(),vn="5.0.4";/*!
|
|
32
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
33
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
34
|
+
*/var yn="aws-amplify/"+vn,At={userAgent:yn,isReactNative:typeof navigator<"u"&&navigator.product==="ReactNative"},Sn=function(){return At.userAgent};/*!
|
|
35
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
36
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
37
|
+
*/var ut=(function(){function o(e){var n=e===void 0?{}:e,s=n.IdToken,a=n.RefreshToken,c=n.AccessToken,f=n.ClockDrift;if(c==null||s==null)throw new Error("Id token and Access Token must be present.");this.idToken=s,this.refreshToken=a,this.accessToken=c,this.clockDrift=f===void 0?this.calculateClockDrift():f}var r=o.prototype;return r.getIdToken=function(){return this.idToken},r.getRefreshToken=function(){return this.refreshToken},r.getAccessToken=function(){return this.accessToken},r.getClockDrift=function(){return this.clockDrift},r.calculateClockDrift=function(){var e=Math.floor(new Date/1e3),n=Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt());return e-n},r.isValid=function(){var e=Math.floor(new Date/1e3),n=e-this.clockDrift;return n<this.accessToken.getExpiration()&&n<this.idToken.getExpiration()},o})();/*!
|
|
38
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
39
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
40
|
+
*/var mn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wn=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ft=(function(){function o(){}var r=o.prototype;return r.getNowString=function(){var e=new Date,n=wn[e.getUTCDay()],s=mn[e.getUTCMonth()],a=e.getUTCDate(),c=e.getUTCHours();c<10&&(c="0"+c);var f=e.getUTCMinutes();f<10&&(f="0"+f);var g=e.getUTCSeconds();g<10&&(g="0"+g);var l=e.getUTCFullYear(),d=n+" "+s+" "+a+" "+c+":"+f+":"+g+" UTC "+l;return d},o})();/*!
|
|
41
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
42
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
43
|
+
*/var An=(function(){function o(e){var n=e===void 0?{}:e,s=n.Name,a=n.Value;this.Name=s||"",this.Value=a||""}var r=o.prototype;return r.getValue=function(){return this.Value},r.setValue=function(e){return this.Value=e,this},r.getName=function(){return this.Name},r.setName=function(e){return this.Name=e,this},r.toString=function(){return JSON.stringify(this)},r.toJSON=function(){return{Name:this.Name,Value:this.Value}},o})();/*!
|
|
44
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
45
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
46
|
+
*/var J={},Cn=(function(){function o(){}return o.setItem=function(r,e){return J[r]=e,J[r]},o.getItem=function(r){return Object.prototype.hasOwnProperty.call(J,r)?J[r]:void 0},o.removeItem=function(r){return delete J[r]},o.clear=function(){return J={},J},o})(),Ct=(function(){function o(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch{this.storageWindow=Cn}}var r=o.prototype;return r.getStorage=function(){return this.storageWindow},o})();/*!
|
|
47
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
48
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
49
|
+
*/var Un=typeof navigator<"u",ct=Un?At.isReactNative?"react-native":navigator.userAgent:"nodejs",ht=(function(){function o(e){if(e==null||e.Username==null||e.Pool==null)throw new Error("Username and Pool information are required.");this.username=e.Username||"",this.pool=e.Pool,this.Session=null,this.client=e.Pool.client,this.signInUserSession=null,this.authenticationFlowType="USER_SRP_AUTH",this.storage=e.Storage||new Ct().getStorage(),this.keyPrefix="CognitoIdentityServiceProvider."+this.pool.getClientId(),this.userDataKey=this.keyPrefix+"."+this.username+".userData"}var r=o.prototype;return r.setSignInUserSession=function(e){this.clearCachedUserData(),this.signInUserSession=e,this.cacheTokens()},r.getSignInUserSession=function(){return this.signInUserSession},r.getUsername=function(){return this.username},r.getAuthenticationFlowType=function(){return this.authenticationFlowType},r.setAuthenticationFlowType=function(e){this.authenticationFlowType=e},r.initiateAuth=function(e,n){var s=this,a=e.getAuthParameters();a.USERNAME=this.username;var c=Object.keys(e.getValidationData()).length!==0?e.getValidationData():e.getClientMetadata(),f={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:a,ClientMetadata:c};this.getUserContextData()&&(f.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",f,function(g,l){if(g)return n.onFailure(g);var d=l.ChallengeName,y=l.ChallengeParameters;return d==="CUSTOM_CHALLENGE"?(s.Session=l.Session,n.customChallenge(y)):(s.signInUserSession=s.getCognitoUserSession(l.AuthenticationResult),s.cacheTokens(),n.onSuccess(s.signInUserSession))})},r.authenticateUser=function(e,n){return this.authenticationFlowType==="USER_PASSWORD_AUTH"?this.authenticateUserPlainUsernamePassword(e,n):this.authenticationFlowType==="USER_SRP_AUTH"||this.authenticationFlowType==="CUSTOM_AUTH"?this.authenticateUserDefaultAuth(e,n):n.onFailure(new Error("Authentication flow type is invalid."))},r.authenticateUserDefaultAuth=function(e,n){var s=this,a=new $(this.pool.getUserPoolName()),c=new ft,f,g,l={};this.deviceKey!=null&&(l.DEVICE_KEY=this.deviceKey),l.USERNAME=this.username,a.getLargeAValue(function(d,y){d&&n.onFailure(d),l.SRP_A=y.toString(16),s.authenticationFlowType==="CUSTOM_AUTH"&&(l.CHALLENGE_NAME="SRP_A");var S=Object.keys(e.getValidationData()).length!==0?e.getValidationData():e.getClientMetadata(),w={AuthFlow:s.authenticationFlowType,ClientId:s.pool.getClientId(),AuthParameters:l,ClientMetadata:S};s.getUserContextData(s.username)&&(w.UserContextData=s.getUserContextData(s.username)),s.client.request("InitiateAuth",w,function(U,A){if(U)return n.onFailure(U);var E=A.ChallengeParameters;s.username=E.USER_ID_FOR_SRP,s.userDataKey=s.keyPrefix+"."+s.username+".userData",f=new m(E.SRP_B,16),g=new m(E.SALT,16),s.getCachedDeviceKeyAndPassword(),a.getPasswordAuthenticationKey(s.username,e.getPassword(),f,g,function(T,B){T&&n.onFailure(T);var q=c.getNowString(),M=I.Buffer.concat([I.Buffer.from(s.pool.getUserPoolName(),"utf8"),I.Buffer.from(s.username,"utf8"),I.Buffer.from(E.SECRET_BLOCK,"base64"),I.Buffer.from(q,"utf8")]),Y=new ue.Sha256(B);Y.update(M);var W=Y.digestSync(),L=I.Buffer.from(W).toString("base64"),x={};x.USERNAME=s.username,x.PASSWORD_CLAIM_SECRET_BLOCK=E.SECRET_BLOCK,x.TIMESTAMP=q,x.PASSWORD_CLAIM_SIGNATURE=L,s.deviceKey!=null&&(x.DEVICE_KEY=s.deviceKey);var j=function(G,z){return s.client.request("RespondToAuthChallenge",G,function(X,he){return X&&X.code==="ResourceNotFoundException"&&X.message.toLowerCase().indexOf("device")!==-1?(x.DEVICE_KEY=null,s.deviceKey=null,s.randomPassword=null,s.deviceGroupKey=null,s.clearCachedDeviceKeyAndPassword(),j(G,z)):z(X,he)})},Z={ChallengeName:"PASSWORD_VERIFIER",ClientId:s.pool.getClientId(),ChallengeResponses:x,Session:A.Session,ClientMetadata:S};s.getUserContextData()&&(Z.UserContextData=s.getUserContextData()),j(Z,function(G,z){return G?n.onFailure(G):s.authenticateUserInternal(z,a,n)})})})})},r.authenticateUserPlainUsernamePassword=function(e,n){var s=this,a={};if(a.USERNAME=this.username,a.PASSWORD=e.getPassword(),!a.PASSWORD){n.onFailure(new Error("PASSWORD parameter is required"));return}var c=new $(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),this.deviceKey!=null&&(a.DEVICE_KEY=this.deviceKey);var f=Object.keys(e.getValidationData()).length!==0?e.getValidationData():e.getClientMetadata(),g={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:a,ClientMetadata:f};this.getUserContextData(this.username)&&(g.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",g,function(l,d){return l?n.onFailure(l):s.authenticateUserInternal(d,c,n)})},r.authenticateUserInternal=function(e,n,s){var a=this,c=e.ChallengeName,f=e.ChallengeParameters;if(c==="SMS_MFA")return this.Session=e.Session,s.mfaRequired(c,f);if(c==="SELECT_MFA_TYPE")return this.Session=e.Session,s.selectMFAType(c,f);if(c==="MFA_SETUP")return this.Session=e.Session,s.mfaSetup(c,f);if(c==="SOFTWARE_TOKEN_MFA")return this.Session=e.Session,s.totpRequired(c,f);if(c==="CUSTOM_CHALLENGE")return this.Session=e.Session,s.customChallenge(f);if(c==="NEW_PASSWORD_REQUIRED"){this.Session=e.Session;var g=null,l=null,d=[],y=n.getNewPasswordRequiredChallengeUserAttributePrefix();if(f&&(g=JSON.parse(e.ChallengeParameters.userAttributes),l=JSON.parse(e.ChallengeParameters.requiredAttributes)),l)for(var S=0;S<l.length;S++)d[S]=l[S].substr(y.length);return s.newPasswordRequired(g,d)}if(c==="DEVICE_SRP_AUTH"){this.Session=e.Session,this.getDeviceResponse(s);return}this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.challengeName=c,this.cacheTokens();var w=e.AuthenticationResult.NewDeviceMetadata;if(w==null)return s.onSuccess(this.signInUserSession);n.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(U){if(U)return s.onFailure(U);var A={Salt:I.Buffer.from(n.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:I.Buffer.from(n.getVerifierDevices(),"hex").toString("base64")};a.verifierDevices=A.PasswordVerifier,a.deviceGroupKey=w.DeviceGroupKey,a.randomPassword=n.getRandomPassword(),a.client.request("ConfirmDevice",{DeviceKey:w.DeviceKey,AccessToken:a.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:A,DeviceName:ct},function(E,T){return E?s.onFailure(E):(a.deviceKey=e.AuthenticationResult.NewDeviceMetadata.DeviceKey,a.cacheDeviceKeyAndPassword(),T.UserConfirmationNecessary===!0?s.onSuccess(a.signInUserSession,T.UserConfirmationNecessary):s.onSuccess(a.signInUserSession))})})},r.completeNewPasswordChallenge=function(e,n,s,a){var c=this;if(!e)return s.onFailure(new Error("New password is required."));var f=new $(this.pool.getUserPoolName()),g=f.getNewPasswordRequiredChallengeUserAttributePrefix(),l={};n&&Object.keys(n).forEach(function(y){l[g+y]=n[y]}),l.NEW_PASSWORD=e,l.USERNAME=this.username;var d={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:l,Session:this.Session,ClientMetadata:a};this.getUserContextData()&&(d.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",d,function(y,S){return y?s.onFailure(y):c.authenticateUserInternal(S,f,s)})},r.getDeviceResponse=function(e,n){var s=this,a=new $(this.deviceGroupKey),c=new ft,f={};f.USERNAME=this.username,f.DEVICE_KEY=this.deviceKey,a.getLargeAValue(function(g,l){g&&e.onFailure(g),f.SRP_A=l.toString(16);var d={ChallengeName:"DEVICE_SRP_AUTH",ClientId:s.pool.getClientId(),ChallengeResponses:f,ClientMetadata:n,Session:s.Session};s.getUserContextData()&&(d.UserContextData=s.getUserContextData()),s.client.request("RespondToAuthChallenge",d,function(y,S){if(y)return e.onFailure(y);var w=S.ChallengeParameters,U=new m(w.SRP_B,16),A=new m(w.SALT,16);a.getPasswordAuthenticationKey(s.deviceKey,s.randomPassword,U,A,function(E,T){if(E)return e.onFailure(E);var B=c.getNowString(),q=I.Buffer.concat([I.Buffer.from(s.deviceGroupKey,"utf8"),I.Buffer.from(s.deviceKey,"utf8"),I.Buffer.from(w.SECRET_BLOCK,"base64"),I.Buffer.from(B,"utf8")]),M=new ue.Sha256(T);M.update(q);var Y=M.digestSync(),W=I.Buffer.from(Y).toString("base64"),L={};L.USERNAME=s.username,L.PASSWORD_CLAIM_SECRET_BLOCK=w.SECRET_BLOCK,L.TIMESTAMP=B,L.PASSWORD_CLAIM_SIGNATURE=W,L.DEVICE_KEY=s.deviceKey;var x={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:s.pool.getClientId(),ChallengeResponses:L,Session:S.Session};s.getUserContextData()&&(x.UserContextData=s.getUserContextData()),s.client.request("RespondToAuthChallenge",x,function(j,Z){return j?e.onFailure(j):(s.signInUserSession=s.getCognitoUserSession(Z.AuthenticationResult),s.cacheTokens(),e.onSuccess(s.signInUserSession))})})})})},r.confirmRegistration=function(e,n,s,a){var c={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:n,ClientMetadata:a};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",c,function(f){return f?s(f,null):s(null,"SUCCESS")})},r.sendCustomChallengeAnswer=function(e,n,s){var a=this,c={};c.USERNAME=this.username,c.ANSWER=e;var f=new $(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),this.deviceKey!=null&&(c.DEVICE_KEY=this.deviceKey);var g={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:c,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:s};this.getUserContextData()&&(g.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",g,function(l,d){return l?n.onFailure(l):a.authenticateUserInternal(d,f,n)})},r.sendMFACode=function(e,n,s,a){var c=this,f={};f.USERNAME=this.username,f.SMS_MFA_CODE=e;var g=s||"SMS_MFA";g==="SOFTWARE_TOKEN_MFA"&&(f.SOFTWARE_TOKEN_MFA_CODE=e),this.deviceKey!=null&&(f.DEVICE_KEY=this.deviceKey);var l={ChallengeName:g,ChallengeResponses:f,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:a};this.getUserContextData()&&(l.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",l,function(d,y){if(d)return n.onFailure(d);var S=y.ChallengeName;if(S==="DEVICE_SRP_AUTH"){c.getDeviceResponse(n);return}if(c.signInUserSession=c.getCognitoUserSession(y.AuthenticationResult),c.cacheTokens(),y.AuthenticationResult.NewDeviceMetadata==null)return n.onSuccess(c.signInUserSession);var w=new $(c.pool.getUserPoolName());w.generateHashDevice(y.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,y.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(U){if(U)return n.onFailure(U);var A={Salt:I.Buffer.from(w.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:I.Buffer.from(w.getVerifierDevices(),"hex").toString("base64")};c.verifierDevices=A.PasswordVerifier,c.deviceGroupKey=y.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,c.randomPassword=w.getRandomPassword(),c.client.request("ConfirmDevice",{DeviceKey:y.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:c.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:A,DeviceName:ct},function(E,T){return E?n.onFailure(E):(c.deviceKey=y.AuthenticationResult.NewDeviceMetadata.DeviceKey,c.cacheDeviceKeyAndPassword(),T.UserConfirmationNecessary===!0?n.onSuccess(c.signInUserSession,T.UserConfirmationNecessary):n.onSuccess(c.signInUserSession))})})})},r.changePassword=function(e,n,s,a){if(!(this.signInUserSession!=null&&this.signInUserSession.isValid()))return s(new Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:n,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:a},function(c){return c?s(c,null):s(null,"SUCCESS")})},r.enableMFA=function(e){if(this.signInUserSession==null||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var n=[],s={DeliveryMedium:"SMS",AttributeName:"phone_number"};n.push(s),this.client.request("SetUserSettings",{MFAOptions:n,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(a){return a?e(a,null):e(null,"SUCCESS")})},r.setUserMfaPreference=function(e,n,s){if(this.signInUserSession==null||!this.signInUserSession.isValid())return s(new Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:n,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(a){return a?s(a,null):s(null,"SUCCESS")})},r.disableMFA=function(e){if(this.signInUserSession==null||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var n=[];this.client.request("SetUserSettings",{MFAOptions:n,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(s){return s?e(s,null):e(null,"SUCCESS")})},r.deleteUser=function(e,n){var s=this;if(this.signInUserSession==null||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("DeleteUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:n},function(a){return a?e(a,null):(s.clearCachedUser(),e(null,"SUCCESS"))})},r.updateAttributes=function(e,n,s){var a=this;if(this.signInUserSession==null||!this.signInUserSession.isValid())return n(new Error("User is not authenticated"),null);this.client.request("UpdateUserAttributes",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserAttributes:e,ClientMetadata:s},function(c,f){return c?n(c,null):a.getUserData(function(){return n(null,"SUCCESS",f)},{bypassCache:!0})})},r.getUserAttributes=function(e){if(!(this.signInUserSession!=null&&this.signInUserSession.isValid()))return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(n,s){if(n)return e(n,null);for(var a=[],c=0;c<s.UserAttributes.length;c++){var f={Name:s.UserAttributes[c].Name,Value:s.UserAttributes[c].Value},g=new An(f);a.push(g)}return e(null,a)})},r.getMFAOptions=function(e){if(!(this.signInUserSession!=null&&this.signInUserSession.isValid()))return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(n,s){return n?e(n,null):e(null,s.MFAOptions)})},r.createGetUserRequest=function(){return this.client.promisifyRequest("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()})},r.refreshSessionIfPossible=function(e){var n=this;return e===void 0&&(e={}),new Promise(function(s){var a=n.signInUserSession.getRefreshToken();a&&a.getToken()?n.refreshSession(a,s,e.clientMetadata):s()})},r.getUserData=function(e,n){var s=this;if(!(this.signInUserSession!=null&&this.signInUserSession.isValid()))return this.clearCachedUserData(),e(new Error("User is not authenticated"),null);var a=this.getUserDataFromCache();if(!a){this.fetchUserData().then(function(c){e(null,c)}).catch(e);return}if(this.isFetchUserDataAndTokenRequired(n)){this.fetchUserData().then(function(c){return s.refreshSessionIfPossible(n).then(function(){return c})}).then(function(c){return e(null,c)}).catch(e);return}try{e(null,JSON.parse(a));return}catch(c){this.clearCachedUserData(),e(c,null);return}},r.getUserDataFromCache=function(){var e=this.storage.getItem(this.userDataKey);return e},r.isFetchUserDataAndTokenRequired=function(e){var n=e||{},s=n.bypassCache,a=s===void 0?!1:s;return a},r.fetchUserData=function(){var e=this;return this.createGetUserRequest().then(function(n){return e.cacheUserData(n),n})},r.deleteAttributes=function(e,n){var s=this;if(!(this.signInUserSession!=null&&this.signInUserSession.isValid()))return n(new Error("User is not authenticated"),null);this.client.request("DeleteUserAttributes",{UserAttributeNames:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(a){return a?n(a,null):s.getUserData(function(){return n(null,"SUCCESS")},{bypassCache:!0})})},r.resendConfirmationCode=function(e,n){var s={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:n};this.client.request("ResendConfirmationCode",s,function(a,c){return a?e(a,null):e(null,c)})},r.getSession=function(e,n){if(n===void 0&&(n={}),this.username==null)return e(new Error("Username is null. Cannot retrieve a new session"),null);if(this.signInUserSession!=null&&this.signInUserSession.isValid())return e(null,this.signInUserSession);var s="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,a=s+".idToken",c=s+".accessToken",f=s+".refreshToken",g=s+".clockDrift";if(this.storage.getItem(a)){var l=new ot({IdToken:this.storage.getItem(a)}),d=new st({AccessToken:this.storage.getItem(c)}),y=new at({RefreshToken:this.storage.getItem(f)}),S=parseInt(this.storage.getItem(g),0)||0,w={IdToken:l,AccessToken:d,RefreshToken:y,ClockDrift:S},U=new ut(w);if(U.isValid())return this.signInUserSession=U,e(null,this.signInUserSession);if(!y.getToken())return e(new Error("Cannot retrieve a new session. Please authenticate."),null);this.refreshSession(y,e,n.clientMetadata)}else e(new Error("Local storage is missing an ID Token, Please authenticate"),null)},r.refreshSession=function(e,n,s){var a=this,c=this.pool.wrapRefreshSessionCallback?this.pool.wrapRefreshSessionCallback(n):n,f={};f.REFRESH_TOKEN=e.getToken();var g="CognitoIdentityServiceProvider."+this.pool.getClientId(),l=g+".LastAuthUser";if(this.storage.getItem(l)){this.username=this.storage.getItem(l);var d=g+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(d),f.DEVICE_KEY=this.deviceKey}var y={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:f,ClientMetadata:s};this.getUserContextData()&&(y.UserContextData=this.getUserContextData()),this.client.requestWithRetry("InitiateAuth",y,function(S,w){if(S)return S.code==="NotAuthorizedException"&&a.clearCachedUser(),c(S,null);if(w){var U=w.AuthenticationResult;return Object.prototype.hasOwnProperty.call(U,"RefreshToken")||(U.RefreshToken=e.getToken()),a.signInUserSession=a.getCognitoUserSession(U),a.cacheTokens(),c(null,a.signInUserSession)}})},r.cacheTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),n=e+"."+this.username+".idToken",s=e+"."+this.username+".accessToken",a=e+"."+this.username+".refreshToken",c=e+"."+this.username+".clockDrift",f=e+".LastAuthUser";this.storage.setItem(n,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(s,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(a,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(c,""+this.signInUserSession.getClockDrift()),this.storage.setItem(f,this.username)},r.cacheUserData=function(e){this.storage.setItem(this.userDataKey,JSON.stringify(e))},r.clearCachedUserData=function(){this.storage.removeItem(this.userDataKey)},r.clearCachedUser=function(){this.clearCachedTokens(),this.clearCachedUserData()},r.cacheDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,n=e+".deviceKey",s=e+".randomPasswordKey",a=e+".deviceGroupKey";this.storage.setItem(n,this.deviceKey),this.storage.setItem(s,this.randomPassword),this.storage.setItem(a,this.deviceGroupKey)},r.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,n=e+".deviceKey",s=e+".randomPasswordKey",a=e+".deviceGroupKey";this.storage.getItem(n)&&(this.deviceKey=this.storage.getItem(n),this.randomPassword=this.storage.getItem(s),this.deviceGroupKey=this.storage.getItem(a))},r.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,n=e+".deviceKey",s=e+".randomPasswordKey",a=e+".deviceGroupKey";this.storage.removeItem(n),this.storage.removeItem(s),this.storage.removeItem(a)},r.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),n=e+"."+this.username+".idToken",s=e+"."+this.username+".accessToken",a=e+"."+this.username+".refreshToken",c=e+".LastAuthUser",f=e+"."+this.username+".clockDrift";this.storage.removeItem(n),this.storage.removeItem(s),this.storage.removeItem(a),this.storage.removeItem(c),this.storage.removeItem(f)},r.getCognitoUserSession=function(e){var n=new ot(e),s=new st(e),a=new at(e),c={IdToken:n,AccessToken:s,RefreshToken:a};return new ut(c)},r.forgotPassword=function(e,n){var s={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:n};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",s,function(a,c){return a?e.onFailure(a):typeof e.inputVerificationCode=="function"?e.inputVerificationCode(c):e.onSuccess(c)})},r.confirmPassword=function(e,n,s,a){var c={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:n,ClientMetadata:a};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",c,function(f){return f?s.onFailure(f):s.onSuccess("SUCCESS")})},r.getAttributeVerificationCode=function(e,n,s){if(this.signInUserSession==null||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));this.client.request("GetUserAttributeVerificationCode",{AttributeName:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:s},function(a,c){return a?n.onFailure(a):typeof n.inputVerificationCode=="function"?n.inputVerificationCode(c):n.onSuccess("SUCCESS")})},r.verifyAttribute=function(e,n,s){if(this.signInUserSession==null||!this.signInUserSession.isValid())return s.onFailure(new Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:n,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(a){return a?s.onFailure(a):s.onSuccess("SUCCESS")})},r.getDevice=function(e){if(this.signInUserSession==null||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey},function(n,s){return n?e.onFailure(n):e.onSuccess(s)})},r.forgetSpecificDevice=function(e,n){if(this.signInUserSession==null||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));this.client.request("ForgetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:e},function(s){return s?n.onFailure(s):n.onSuccess("SUCCESS")})},r.forgetDevice=function(e){var n=this;this.forgetSpecificDevice(this.deviceKey,{onFailure:e.onFailure,onSuccess:function(s){return n.deviceKey=null,n.deviceGroupKey=null,n.randomPassword=null,n.clearCachedDeviceKeyAndPassword(),e.onSuccess(s)}})},r.setDeviceStatusRemembered=function(e){if(this.signInUserSession==null||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"remembered"},function(n){return n?e.onFailure(n):e.onSuccess("SUCCESS")})},r.setDeviceStatusNotRemembered=function(e){if(this.signInUserSession==null||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"not_remembered"},function(n){return n?e.onFailure(n):e.onSuccess("SUCCESS")})},r.listDevices=function(e,n,s){if(this.signInUserSession==null||!this.signInUserSession.isValid())return s.onFailure(new Error("User is not authenticated"));var a={AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),Limit:e};n&&(a.PaginationToken=n),this.client.request("ListDevices",a,function(c,f){return c?s.onFailure(c):s.onSuccess(f)})},r.globalSignOut=function(e){var n=this;if(this.signInUserSession==null||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GlobalSignOut",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(s){return s?e.onFailure(s):(n.clearCachedUser(),e.onSuccess("SUCCESS"))})},r.signOut=function(e){var n=this;if(!e||typeof e!="function"){this.cleanClientData();return}this.getSession(function(s,a){if(s)return e(s);n.revokeTokens(function(c){n.cleanClientData(),e(c)})})},r.revokeTokens=function(e){if(e===void 0&&(e=function(){}),typeof e!="function")throw new Error("Invalid revokeTokenCallback. It should be a function.");if(!this.signInUserSession){var n=new Error("User is not authenticated");return e(n)}if(!this.signInUserSession.getAccessToken()){var s=new Error("No Access token available");return e(s)}var a=this.signInUserSession.getRefreshToken().getToken(),c=this.signInUserSession.getAccessToken();if(this.isSessionRevocable(c)&&a)return this.revokeToken({token:a,callback:e});e()},r.isSessionRevocable=function(e){if(e&&typeof e.decodePayload=="function")try{var n=e.decodePayload(),s=n.origin_jti;return!!s}catch{}return!1},r.cleanClientData=function(){this.signInUserSession=null,this.clearCachedUser()},r.revokeToken=function(e){var n=e.token,s=e.callback;this.client.requestWithRetry("RevokeToken",{Token:n,ClientId:this.pool.getClientId()},function(a){if(a)return s(a);s()})},r.sendMFASelectionAnswer=function(e,n){var s=this,a={};a.USERNAME=this.username,a.ANSWER=e;var c={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:a,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",c,function(f,g){if(f)return n.onFailure(f);if(s.Session=g.Session,e==="SMS_MFA")return n.mfaRequired(g.ChallengeName,g.ChallengeParameters);if(e==="SOFTWARE_TOKEN_MFA")return n.totpRequired(g.ChallengeName,g.ChallengeParameters)})},r.getUserContextData=function(){var e=this.pool;return e.getUserContextData(this.username)},r.associateSoftwareToken=function(e){var n=this;this.signInUserSession!=null&&this.signInUserSession.isValid()?this.client.request("AssociateSoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(s,a){return s?e.onFailure(s):e.associateSecretCode(a.SecretCode)}):this.client.request("AssociateSoftwareToken",{Session:this.Session},function(s,a){return s?e.onFailure(s):(n.Session=a.Session,e.associateSecretCode(a.SecretCode))})},r.verifySoftwareToken=function(e,n,s){var a=this;this.signInUserSession!=null&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:n},function(c,f){return c?s.onFailure(c):s.onSuccess(f)}):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:n},function(c,f){if(c)return s.onFailure(c);a.Session=f.Session;var g={};g.USERNAME=a.username;var l={ChallengeName:"MFA_SETUP",ClientId:a.pool.getClientId(),ChallengeResponses:g,Session:a.Session};a.getUserContextData()&&(l.UserContextData=a.getUserContextData()),a.client.request("RespondToAuthChallenge",l,function(d,y){return d?s.onFailure(d):(a.signInUserSession=a.getCognitoUserSession(y.AuthenticationResult),a.cacheTokens(),s.onSuccess(a.signInUserSession))})})},o})();function En(o,r){return r=r||{},new Promise(function(e,n){var s=new XMLHttpRequest,a=[],c=[],f={},g=function(){return{ok:(s.status/100|0)==2,statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:g,headers:{keys:function(){return a},entries:function(){return c},get:function(d){return f[d.toLowerCase()]},has:function(d){return d.toLowerCase()in f}}}};for(var l in s.open(r.method||"get",o,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(d,y,S){a.push(y=y.toLowerCase()),c.push([y,S]),f[y]=f[y]?f[y]+","+S:S}),e(g())},s.onerror=n,s.withCredentials=r.credentials=="include",r.headers)s.setRequestHeader(l,r.headers[l]);s.send(r.body||null)})}const Tn=Object.freeze(Object.defineProperty({__proto__:null,default:En},Symbol.toStringTag,{value:"Module"})),lt=Pe(Tn);var gt,pt;function Dn(){return pt||(pt=1,gt=self.fetch||(self.fetch=lt.default||lt)),gt}Dn();function Q(){}Q.prototype.userAgent=Sn();var In=function(o){var r=Q.category?" "+Q.category:"",e=Q.framework?" framework/"+Q.framework:"",n=""+Q.prototype.userAgent+r+e;return n};function bn(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,ce(o,r)}function be(o){var r=typeof Map=="function"?new Map:void 0;return be=function(e){if(e===null||!Pn(e))return e;if(typeof e!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(e))return r.get(e);r.set(e,n)}function n(){return _n(e,arguments,_e(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ce(n,e)},be(o)}function _n(o,r,e){if(Ut())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,r);var s=new(o.bind.apply(o,n));return e&&ce(s,e.prototype),s}function Ut(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ut=function(){return!!o})()}function Pn(o){try{return Function.toString.call(o).indexOf("[native code]")!==-1}catch{return typeof o=="function"}}function ce(o,r){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},ce(o,r)}function _e(o){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_e(o)}var Rn=(function(o){function r(e,n,s,a){var c;return c=o.call(this,e)||this,c.code=n,c.name=s,c.statusCode=a,c}return bn(r,o),r})(be(Error)),kn=(function(){function o(e,n,s){this.endpoint=n||"https://cognito-idp."+e+".amazonaws.com/";var a=s||{},c=a.credentials;this.fetchOptions=c?{credentials:c}:{}}var r=o.prototype;return r.promisifyRequest=function(e,n){var s=this;return new Promise(function(a,c){s.request(e,n,function(f,g){f?c(new Rn(f.message,f.code,f.name,f.statusCode)):a(g)})})},r.requestWithRetry=function(e,n,s){var a=this,c=5*1e3;Fn(function(f){return new Promise(function(g,l){a.request(e,f,function(d,y){d?l(d):g(y)})})},[n],c).then(function(f){return s(null,f)}).catch(function(f){return s(f)})},r.request=function(e,n,s){var a={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProviderService."+e,"X-Amz-User-Agent":In(),"Cache-Control":"no-store"},c=Object.assign({},this.fetchOptions,{headers:a,method:"POST",mode:"cors",body:JSON.stringify(n)}),f;fetch(this.endpoint,c).then(function(g){return f=g,g},function(g){throw g instanceof TypeError?new Error("Network error"):g}).then(function(g){return g.json().catch(function(){return{}})}).then(function(g){if(f.ok)return s(null,g);var l=(g.__type||g.code).split("#").pop(),d=new Error(g.message||g.Message||null);return d.name=l,d.code=l,s(d)}).catch(function(g){if(f&&f.headers&&f.headers.get("x-amzn-errortype"))try{var l=f.headers.get("x-amzn-errortype").split(":")[0],d=new Error(f.status?f.status.toString():null);return d.code=l,d.name=l,d.statusCode=f.status,s(d)}catch{return s(g)}else g instanceof Error&&g.message==="Network error"&&(g.code="NetworkError");return s(g)})},o})(),ye={debug:function(){}},On=function(o){var r="nonRetryable";return o&&o[r]};function Et(o,r,e,n){if(n===void 0&&(n=1),typeof o!="function")throw Error("functionToRetry must be a function");return ye.debug(o.name+" attempt #"+n+" with args: "+JSON.stringify(r)),o.apply(void 0,r).catch(function(s){if(ye.debug("error on "+o.name,s),On(s))throw ye.debug(o.name+" non retryable error",s),s;var a=e(n,r,s);if(ye.debug(o.name+" retrying in "+a+" ms"),a!==!1)return new Promise(function(c){return setTimeout(c,a)}).then(function(){return Et(o,r,e,n+1)});throw s})}function Bn(o){var r=100,e=100;return function(n){var s=Math.pow(2,n)*r+e*Math.random();return s>o?!1:s}}function Fn(o,r,e){return Et(o,r,Bn(e))}/*!
|
|
50
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
51
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
52
|
+
*/var Mn=55,Hn=(function(){function o(e,n){var s=e||{},a=s.UserPoolId,c=s.ClientId,f=s.endpoint,g=s.fetchOptions,l=s.AdvancedSecurityDataCollectionFlag;if(!a||!c)throw new Error("Both UserPoolId and ClientId are required.");if(a.length>Mn||!/^[\w-]+_[0-9a-zA-Z]+$/.test(a))throw new Error("Invalid UserPoolId format.");var d=a.split("_")[0];this.userPoolId=a,this.clientId=c,this.client=new kn(d,f,g),this.advancedSecurityDataCollectionFlag=l!==!1,this.storage=e.Storage||new Ct().getStorage(),n&&(this.wrapRefreshSessionCallback=n)}var r=o.prototype;return r.getUserPoolId=function(){return this.userPoolId},r.getUserPoolName=function(){return this.getUserPoolId().split("_")[1]},r.getClientId=function(){return this.clientId},r.signUp=function(e,n,s,a,c,f){var g=this,l={ClientId:this.clientId,Username:e,Password:n,UserAttributes:s,ValidationData:a,ClientMetadata:f};this.getUserContextData(e)&&(l.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",l,function(d,y){if(d)return c(d,null);var S={Username:e,Pool:g,Storage:g.storage},w={user:new ht(S),userConfirmed:y.UserConfirmed,userSub:y.UserSub,codeDeliveryDetails:y.CodeDeliveryDetails};return c(null,w)})},r.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",n=this.storage.getItem(e);if(n){var s={Username:n,Pool:this,Storage:this.storage};return new ht(s)}return null},r.getUserContextData=function(e){if(!(typeof AmazonCognitoAdvancedSecurityData>"u")){var n=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var s=n.getData(e,this.userPoolId,this.clientId);if(s){var a={EncodedData:s};return a}}return{}}},o})(),dt={exports:{}};/*!
|
|
53
|
+
* JavaScript Cookie v2.2.1
|
|
54
|
+
* https://github.com/js-cookie/js-cookie
|
|
55
|
+
*
|
|
56
|
+
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
|
57
|
+
* Released under the MIT license
|
|
58
|
+
*/var vt;function xn(){return vt||(vt=1,(function(o,r){(function(e){var n;if(o.exports=e(),n=!0,!n){var s=window.Cookies,a=window.Cookies=e();a.noConflict=function(){return window.Cookies=s,a}}})(function(){function e(){for(var a=0,c={};a<arguments.length;a++){var f=arguments[a];for(var g in f)c[g]=f[g]}return c}function n(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function s(a){function c(){}function f(l,d,y){if(!(typeof document>"u")){y=e({path:"/"},c.defaults,y),typeof y.expires=="number"&&(y.expires=new Date(new Date*1+y.expires*864e5)),y.expires=y.expires?y.expires.toUTCString():"";try{var S=JSON.stringify(d);/^[\{\[]/.test(S)&&(d=S)}catch{}d=a.write?a.write(d,l):encodeURIComponent(String(d)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),l=encodeURIComponent(String(l)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var w="";for(var U in y)y[U]&&(w+="; "+U,y[U]!==!0&&(w+="="+y[U].split(";")[0]));return document.cookie=l+"="+d+w}}function g(l,d){if(!(typeof document>"u")){for(var y={},S=document.cookie?document.cookie.split("; "):[],w=0;w<S.length;w++){var U=S[w].split("="),A=U.slice(1).join("=");!d&&A.charAt(0)==='"'&&(A=A.slice(1,-1));try{var E=n(U[0]);if(A=(a.read||a)(A,E)||n(A),d)try{A=JSON.parse(A)}catch{}if(y[E]=A,l===E)break}catch{}}return l?y[l]:y}}return c.set=f,c.get=function(l){return g(l,!1)},c.getJSON=function(l){return g(l,!0)},c.remove=function(l,d){f(l,"",e(d,{expires:-1}))},c.defaults={},c.withConverter=s,c}return s(function(){})})})(dt)),dt.exports}xn();export{jn as AuthenticationDetails,$ as AuthenticationHelper,st as CognitoAccessToken,ot as CognitoIdToken,at as CognitoRefreshToken,ht as CognitoUser,An as CognitoUserAttribute,Hn as CognitoUserPool,ut as CognitoUserSession,ft as DateHelper,Ht as WordArray};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=globalThis||void 0||self,o=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{e as g,o as i};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-CoQHYqh2.js","assets/index-BUSNaVGD.js","assets/normalizeProvider-BrOPyH3l.js","assets/preload-helper-BlTxHScW.js","assets/index-Blq0zS4y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-ChvoNxcO.js","assets/__vite-browser-external-DJy8wZt7.js","assets/inherits_browser-nmOknR35-Bp0mvRSL.js","assets/_commonjsHelpers-B4e78b8K-W3E8ocG7.js","assets/index-6mKfgpcs-DsgiI2lM.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/index-D1jV2j2Y.js","assets/_commonjs-dynamic-modules-TDtrdbi3.js","assets/index-DIt05veo.js","assets/inherits_browser-5Fj3Mjxs.js","assets/index-DUWxxpyn.css","assets/loadSts-C4WH6vaF.js","assets/index-C2yyIBKa.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as I}from"./preload-helper-BlTxHScW.js";import{a as O,b as N,t as x,s as D,H as K,p as H,F as j,n as q}from"./normalizeProvider-BrOPyH3l.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-CoQHYqh2.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,20,21])),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-CoQHYqh2.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,20,21])),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
|
+
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
+
- ECS container host 169.254.170.2
|
|
5
|
+
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:t})}},T=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),R="The stream has already been transformed.",X=e=>{if(!E(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,E(e))return r(e);if(T(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},E=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-C4WH6vaF.js").then(y=>y.l);return{AssumeRoleCommand:w,STSClient:m}},__vite__mapDeps([22,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]));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=[v(e.clientConfig?.requestHandler),v(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}}},v=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-C2yyIBKa.js");return{getDefaultRoleAssumerWithWebIdentity:a}},__vite__mapDeps([23,22,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]));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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function v(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var y={exports:{}},e=y.exports={},n,o;function p(){throw new Error("setTimeout has not been defined")}function h(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?n=setTimeout:n=p}catch{n=p}try{typeof clearTimeout=="function"?o=clearTimeout:o=h}catch{o=h}})();function d(t){if(n===setTimeout)return setTimeout(t,0);if((n===p||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch{try{return n.call(null,t,0)}catch{return n.call(this,t,0)}}}function w(t){if(o===clearTimeout)return clearTimeout(t);if((o===h||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{return o(t)}catch{try{return o.call(null,t)}catch{return o.call(this,t)}}}var u=[],a=!1,s,f=-1;function b(){!a||!s||(a=!1,s.length?u=s.concat(u):f=-1,u.length&&T())}function T(){if(!a){var t=d(b);a=!0;for(var r=u.length;r;){for(s=u,u=[];++f<r;)s&&s[f].run();f=-1,r=u.length}s=null,a=!1,w(t)}}e.nextTick=function(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)r[c-1]=arguments[c];u.push(new g(t,r)),u.length===1&&!a&&d(T)};function g(t,r){this.fun=t,this.array=r}g.prototype.run=function(){this.fun.apply(null,this.array)};e.title="browser";e.browser=!0;e.env={};e.argv=[];e.version="";e.versions={};function i(){}e.on=i;e.addListener=i;e.once=i;e.off=i;e.removeListener=i;e.removeAllListeners=i;e.emit=i;e.prependListener=i;e.prependOnceListener=i;e.listeners=function(t){return[]};e.binding=function(t){throw new Error("process.binding is not supported")};e.cwd=function(){return"/"};e.chdir=function(t){throw new Error("process.chdir is not supported")};e.umask=function(){return 0};var x=y.exports;const L=v(x);var l={exports:{}},m;function E(){return m||(m=1,typeof Object.create=="function"?l.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:l.exports=function(t,r){if(r){t.super_=r;var c=function(){};c.prototype=r.prototype,t.prototype=new c,t.prototype.constructor=t}}),l.exports}export{L as E,E as L};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as V,m as Le,d as Ge,i as qe,T as y,b as J,N as b,c as R,e as Be,L as ue,f as pe,v as Ve,R as Je,h as Ke,n as le,j as Qe,E as We,r as Xe,k as Ye,l as Ze,p as et,o as tt,q as nt,s as st,t as rt,D as it,u as ot,w as at,x as ct,y as dt,z as ut,A as pt,B as lt,F as gt,G as ft,H as mt,I as ht,J as yt,K as Et,a as St,M as Ct,O as It,P as xt,Q as _t,U as wt,V as At,W as Pt,X as Rt,Y as bt,Z as vt,_ as kt,$ as Tt,a0 as Dt,a1 as Ot,C as ge,g as fe}from"./index-BUSNaVGD.js";import{n as N,c as Nt,H as me,t as he,d as ye,e as Mt,g as Ut,h as $t,a as Ee,i as Ft,f as zt,s as jt,F as Ht}from"./normalizeProvider-BrOPyH3l.js";import"./preload-helper-BlTxHScW.js";import"./index-Blq0zS4y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DJy8wZt7.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-6mKfgpcs-DsgiI2lM.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"./index-D1jV2j2Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-DIt05veo.js";import"./inherits_browser-5Fj3Mjxs.js";const Lt=void 0;function Gt(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function qt(t){const e=N(t.userAgentAppId??Lt),{customUserAgent:n}=t;return Object.assign(t,{customUserAgent:typeof n=="string"?[[n]]:n,userAgentAppId:async()=>{const s=await e();if(!Gt(s)){const r=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof s!="string"?r?.warn("userAgentAppId must be a string or undefined."):s.length>50&&r?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s}})}function Bt(t,e,n){return t.$source||(t.$source={}),t.$source[e]=n,t}function x(t,e,n){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]=n}const K=t=>Nt.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Se=t=>new Date(Date.now()+t),Vt=(t,e)=>Math.abs(Se(e).getTime()-t)>=3e5,Q=(t,e)=>{const n=Date.parse(t);return Vt(n,e)?n-Date.now():e},M=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},Jt=async t=>{const e=M("context",t.context),n=M("config",t.config),s=e.endpointV2?.properties?.authSchemes?.[0],o=await M("signer",n.signer)(s),i=t?.signingRegion,a=t?.signingRegionSet,c=t?.signingName;return{config:n,signer:o,signingRegion:i,signingRegionSet:a,signingName:c}};class Kt{async sign(e,n,s){if(!me.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await Jt(s),{config:o,signer:i}=r;let{signingRegion:a,signingName:c}=r;const d=s.context;if(d?.authSchemes?.length??!1){const[l,f]=d.authSchemes;l?.name==="sigv4a"&&f?.name==="sigv4"&&(a=f?.signingRegion??a,c=f?.signingName??c)}return await i.sign(e,{signingDate:Se(o.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return n=>{const s=n.ServerTime??K(n.$response);if(s){const r=M("config",e.config),o=r.systemClockOffset;r.systemClockOffset=Q(s,r.systemClockOffset),r.systemClockOffset!==o&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(e,n){const s=K(e);if(s){const r=M("config",n.config);r.systemClockOffset=Q(s,r.systemClockOffset)}}}const Qt=t=>{let e=t.credentials,n=!!t.credentials,s;Object.defineProperty(t,"credentials",{set(d){d&&d!==e&&d!==s&&(n=!0),e=d;const p=Wt(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),l=Xt(t,p);n&&!l.attributed?(s=async f=>l(f).then(E=>Bt(E,"CREDENTIALS_CODE","e")),s.memoized=l.memoized,s.configBound=l.configBound,s.attributed=!0):s=l},get(){return s},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:r=!0,systemClockOffset:o=t.systemClockOffset||0,sha256:i}=t;let a;return t.signer?a=N(t.signer):t.regionInfoProvider?a=()=>N(t.region)().then(async d=>[await t.regionInfoProvider(d,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},d]).then(([d,p])=>{const{signingRegion:l,signingService:f}=d;t.signingRegion=t.signingRegion||l||p,t.signingName=t.signingName||f||t.serviceId;const E={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:i,uriEscapePath:r},v=t.signerConstructor||V;return new v(E)}):a=async d=>{d=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await N(t.region)(),properties:{}},d);const p=d.signingRegion,l=d.signingName;t.signingRegion=t.signingRegion||p,t.signingName=t.signingName||l||t.serviceId;const f={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:i,uriEscapePath:r},E=t.signerConstructor||V;return new E(f)},Object.assign(t,{systemClockOffset:o,signingEscapePath:r,signer:a})};function Wt(t,{credentials:e,credentialDefaultProvider:n}){let s;return e?e?.memoized?s=e:s=Le(e,qe,Ge):n?s=N(n(Object.assign({},t,{parentClientConfig:t}))):s=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},s.memoized=!0,s}function Xt(t,e){if(e.configBound)return e;const n=async s=>e({...s,callerClientConfig:t});return n.memoized=e.memoized,n.configBound=!0,n}class Yt{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,n){const s=n.getMemberSchemas(),r=Object.values(s).find(o=>!!o.getMergedTraits().httpPayload);if(r){const o=r.getMergedTraits().mediaType;return o||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}else if(!n.isUnitSchema()&&Object.values(s).find(i=>{const{httpQuery:a,httpQueryParams:c,httpHeader:d,httpLabel:p,httpPrefixHeaders:l}=i.getMergedTraits();return!a&&!c&&!d&&!p&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,n,s,r,o,i){let a=n,c=e;e.includes("#")&&([a,c]=e.split("#"));const d={$metadata:o,$fault:s.statusCode<500?"client":"server"},p=y.for(a);try{return{errorSchema:i?.(p,c)??p.getSchema(e),errorMetadata:d}}catch{r.message=r.message??r.Message??"UnknownError";const f=y.for("smithy.ts.sdk.synthetic."+a),E=f.getBaseException();if(E){const v=f.getErrorCtor(E)??Error;throw this.decorateServiceException(Object.assign(new v({name:c}),d),r)}throw this.decorateServiceException(Object.assign(new Error(c),d),r)}}decorateServiceException(e,n={}){if(this.queryCompat){const s=e.Message??n.Message,r=J(e,n);return s&&(r.Message=s,r.message=s),r}return J(e,n)}setQueryCompatError(e,n){const s=n.headers?.["x-amzn-query-error"];if(e!==void 0&&s!=null){const[r,o]=s.split(";"),i=Object.entries(e),a={Code:r,Type:o};Object.assign(e,a);for(const[c,d]of i)a[c]=d;delete a.__type,e.Error=a}}queryCompatOutput(e,n){e.Error&&(n.Error=e.Error),e.Type&&(n.Type=e.Type),e.Code&&(n.Code=e.Code)}}class H{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*Zt(t,e){if(t.isUnitSchema())return;const n=t.getSchema();for(let s=0;s<n[4].length;++s){const r=n[4][s],o=new b([n[5][s],0],r);!(r in e)&&!o.isIdempotencyToken()||(yield[r,o])}}function*en(t,e,n){if(t.isUnitSchema())return;const s=t.getSchema();let r=Object.keys(e).length;for(let o=0;o<s[4].length&&r!==0;++o){const i=s[4][o],a=new b([s[5][o],0],i);let c=i;n&&(c=a.getMergedTraits()[n]??i),c in e&&(yield[i,a],r-=1)}}function tn(t,e,n){if(n?.source){const s=n.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||s!==String(e)))return s.includes(".")?new R(s,"bigDecimal"):BigInt(s)}return e}const nn=(t,e)=>Be(t,e).then(n=>(e?.utf8Encoder??he)(n)),sn=(t,e)=>nn(t,e).then(n=>{if(n.length)try{return JSON.parse(n)}catch(s){throw s?.name==="SyntaxError"&&Object.defineProperty(s,"$responseBodyText",{value:n}),s}return{}}),rn=(t,e)=>{const n=(o,i)=>Object.keys(o).find(a=>a.toLowerCase()===i.toLowerCase()),s=o=>{let i=o;return typeof i=="number"&&(i=i.toString()),i.indexOf(",")>=0&&(i=i.split(",")[0]),i.indexOf(":")>=0&&(i=i.split(":")[0]),i.indexOf("#")>=0&&(i=i.split("#")[1]),i},r=n(t.headers,"x-amzn-errortype");if(r!==void 0)return s(t.headers[r]);if(e&&typeof e=="object"){const o=n(e,"code");if(o&&e[o]!==void 0)return s(e[o]);if(e.__type!==void 0)return s(e.__type)}};class on extends H{settings;constructor(e){super(),this.settings=e}async read(e,n){return this._read(e,typeof n=="string"?JSON.parse(n,tn):await sn(n,this.serdeContext))}readObject(e,n){return this._read(e,n)}_read(e,n){const s=n!==null&&typeof n=="object",r=b.of(e);if(r.isListSchema()&&Array.isArray(n)){const i=r.getValueSchema(),a=[],c=!!r.getMergedTraits().sparse;for(const d of n)(c||d!=null)&&a.push(this._read(i,d));return a}else if(r.isMapSchema()&&s){const i=r.getValueSchema(),a={},c=!!r.getMergedTraits().sparse;for(const[d,p]of Object.entries(n))(c||p!=null)&&(a[d]=this._read(i,p));return a}else if(r.isStructSchema()&&s){const i={};for(const[a,c]of en(r,n,this.settings.jsonName?"jsonName":!1)){const d=this.settings.jsonName?c.getMergedTraits().jsonName??a:a,p=this._read(c,n[d]);p!=null&&(i[a]=p)}return i}if(r.isBlobSchema()&&typeof n=="string")return ye(n);const o=r.getMergedTraits().mediaType;if(r.isStringSchema()&&typeof n=="string"&&o&&(o==="application/json"||o.endsWith("+json")))return ue.from(n);if(r.isTimestampSchema()&&n!=null)switch(pe(r,this.settings)){case 5:return $t(n);case 6:return Ut(n);case 7:return Mt(n);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",n),new Date(n)}if(r.isBigIntegerSchema()&&(typeof n=="number"||typeof n=="string"))return BigInt(n);if(r.isBigDecimalSchema()&&n!=null){if(n instanceof R)return n;const i=n;return i.type==="bigDecimal"&&"string"in i?new R(i.string,i.type):new R(String(n),"bigDecimal")}if(r.isNumericSchema()&&typeof n=="string")switch(n){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}if(r.isDocumentSchema())if(s){const i=Array.isArray(n)?[]:{};for(const[a,c]of Object.entries(n))c instanceof R?i[a]=c:i[a]=this._read(r,c);return i}else return structuredClone(n);return n}}const W="Ν";class an{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,n)=>{if(n instanceof R){const s=`${W+"nv"+this.counter++}_`+n.string;return this.values.set(`"${s}"`,n.string),s}if(typeof n=="bigint"){const s=n.toString(),r=`${W+"b"+this.counter++}_`+s;return this.values.set(`"${r}"`,s),r}return n}}replaceInJson(e){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return e;for(const[n,s]of this.values)e=e.replace(n,s);return e}}class cn extends H{settings;buffer;rootSchema;constructor(e){super(),this.settings=e}write(e,n){this.rootSchema=b.of(e),this.buffer=this._write(this.rootSchema,n)}writeDiscriminatedDocument(e,n){this.write(e,n),typeof this.buffer=="object"&&(this.buffer.__type=b.of(e).getName(!0))}flush(){const{rootSchema:e}=this;if(this.rootSchema=void 0,e?.isStructSchema()||e?.isDocumentSchema()){const n=new an;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,n,s){const r=n!==null&&typeof n=="object",o=b.of(e);if(o.isListSchema()&&Array.isArray(n)){const i=o.getValueSchema(),a=[],c=!!o.getMergedTraits().sparse;for(const d of n)(c||d!=null)&&a.push(this._write(i,d));return a}else if(o.isMapSchema()&&r){const i=o.getValueSchema(),a={},c=!!o.getMergedTraits().sparse;for(const[d,p]of Object.entries(n))(c||p!=null)&&(a[d]=this._write(i,p));return a}else if(o.isStructSchema()&&r){const i={};for(const[a,c]of Zt(o,n)){const d=this._write(c,n[a],o);if(d!==void 0){const p=this.settings.jsonName?c.getMergedTraits().jsonName??a:a;i[p]=d}}return i}if(!(n===null&&s?.isStructSchema())){if(o.isBlobSchema()&&(n instanceof Uint8Array||typeof n=="string")||o.isDocumentSchema()&&n instanceof Uint8Array)return o===this.rootSchema?n:(this.serdeContext?.base64Encoder??Ee)(n);if((o.isTimestampSchema()||o.isDocumentSchema())&&n instanceof Date)switch(pe(o,this.settings)){case 5:return n.toISOString().replace(".000Z","Z");case 6:return Ft(n);case 7:return n.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",n),n.getTime()/1e3}if(o.isNumericSchema()&&typeof n=="number"&&(Math.abs(n)===1/0||isNaN(n)))return String(n);if(o.isStringSchema()){if(typeof n>"u"&&o.isIdempotencyToken())return Ve();const i=o.getMergedTraits().mediaType;if(n!=null&&i&&(i==="application/json"||i.endsWith("+json")))return ue.from(n)}if(o.isDocumentSchema())if(r){const i=Array.isArray(n)?[]:{};for(const[a,c]of Object.entries(n))c instanceof R?i[a]=c:i[a]=this._write(o,c);return i}else return structuredClone(n);return n}}}class dn extends H{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new cn(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new on(this.settings);return e.setSerdeContext(this.serdeContext),e}}class un extends Je{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:n,awsQueryCompatible:s}){super({defaultNamespace:e}),this.serviceTarget=n,this.codec=new dn({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!s,this.mixin=new Yt(this.awsQueryCompatible)}async serializeRequest(e,n,s){const r=await super.serializeRequest(e,n,s);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),(Ke(e.input)==="unit"||!r.body)&&(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,n,s,r,o){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,s);const i=rn(s,r)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,s,r,o),d=b.of(a),p=r.message??r.Message??"Unknown",l=y.for(a[1]).getErrorCtor(a)??Error,f=new l(p),E={};for(const[v,B]of d.structIterator()){const He=B.getMergedTraits().jsonName??v;E[v]=this.codec.createDeserializer().readObject(B,r[He])}throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,E),this.mixin.decorateServiceException(Object.assign(f,c,{$fault:d.getMergedTraits().error,message:p},E),r)}}class pn extends un{constructor({defaultNamespace:e,serviceTarget:n,awsQueryCompatible:s}){super({defaultNamespace:e,serviceTarget:n,awsQueryCompatible:s})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const ln=/\d{12}\.ddb/;async function gn(t,e,n){if(n.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&x(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const o=await e.retryStrategy();typeof o.acquireInitialRetryToken=="function"?o.constructor?.name?.includes("Adaptive")?x(t,"RETRY_MODE_ADAPTIVE","F"):x(t,"RETRY_MODE_STANDARD","E"):x(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const o=t.endpointV2;switch(String(o?.url?.hostname).match(ln)&&x(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":x(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":x(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":x(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const r=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const o=r;o.accountId&&x(t,"RESOLVED_ACCOUNT_ID","T");for(const[i,a]of Object.entries(o.$source??{}))x(t,i,a)}}const X="user-agent",z="x-amz-user-agent",Y=" ",j="/",fn=/[^!$%&'*+\-.^_`|~\w]/g,mn=/[^!$%&'*+\-.^_`|~\w#]/g,Z="-",hn=1024;function yn(t){let e="";for(const n in t){const s=t[n];if(e.length+s.length+1<=hn){e.length?e+=","+s:e+=s;continue}break}return e}const En=t=>(e,n)=>async s=>{const{request:r}=s;if(!me.isInstance(r))return e(s);const{headers:o}=r,i=n?.userAgent?.map($)||[],a=(await t.defaultUserAgentProvider()).map($);await gn(n,t,s);const c=n;a.push(`m/${yn(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const d=t?.customUserAgent?.map($)||[],p=await t.userAgentAppId();p&&a.push($(["app",`${p}`]));const l=[].concat([...a,...i,...d]).join(Y),f=[...a.filter(E=>E.startsWith("aws-sdk-")),...d].join(Y);return t.runtime!=="browser"?(f&&(o[z]=o[z]?`${o[X]} ${f}`:f),o[X]=l):o[z]=l,e({...s,request:r})},$=t=>{const e=t[0].split(j).map(i=>i.replace(fn,Z)).join(j),n=t[1]?.replace(mn,Z),s=e.indexOf(j),r=e.substring(0,s);let o=e.substring(s+1);return r==="api"&&(o=o.toLowerCase()),[r,o,n].filter(i=>i&&i.length>0).reduce((i,a,c)=>{switch(c){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},Sn={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Cn=t=>({applyToStack:e=>{e.add(En(t),Sn)}}),In=async(t,e,n)=>({operation:Qe(e).operation,region:await le(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function xn(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:(e,n)=>({signingProperties:{config:e,context:n}})}}function F(t){return{schemeId:"smithy.api#noAuth"}}const _n=t=>{const e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(F());break}case"GetId":{e.push(F());break}case"GetOpenIdToken":{e.push(F());break}case"UnlinkIdentity":{e.push(F());break}default:e.push(xn(t))}return e},wn=t=>{const e=Qt(t);return Object.assign(e,{authSchemePreference:le(t.authSchemePreference??[])})},An=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Ce={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Pn="3.940.0",Rn={version:Pn},Ie="required",m="fn",h="argv",T="ref",ee=!0,te="isSet",U="booleanEquals",k="error",_="endpoint",P="tree",L="PartitionResult",G="getAttr",D="stringEquals",ne={[Ie]:!1,type:"string"},se={[Ie]:!0,default:!1,type:"boolean"},re={[T]:"Endpoint"},xe={[m]:U,[h]:[{[T]:"UseFIPS"},!0]},_e={[m]:U,[h]:[{[T]:"UseDualStack"},!0]},g={},O={[T]:"Region"},ie={[m]:G,[h]:[{[T]:L},"supportsFIPS"]},we={[T]:L},oe={[m]:U,[h]:[!0,{[m]:G,[h]:[we,"supportsDualStack"]}]},ae=[xe],ce=[_e],de=[O],bn={parameters:{Region:ne,UseDualStack:se,UseFIPS:se,Endpoint:ne},rules:[{conditions:[{[m]:te,[h]:[re]}],rules:[{conditions:ae,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:k},{conditions:ce,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:k},{endpoint:{url:re,properties:g,headers:g},type:_}],type:P},{conditions:[{[m]:te,[h]:de}],rules:[{conditions:[{[m]:"aws.partition",[h]:de,assign:L}],rules:[{conditions:[xe,_e],rules:[{conditions:[{[m]:U,[h]:[ee,ie]},oe],rules:[{conditions:[{[m]:D,[h]:[O,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:g,headers:g},type:_},{conditions:[{[m]:D,[h]:[O,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:g,headers:g},type:_},{conditions:[{[m]:D,[h]:[O,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:g,headers:g},type:_},{conditions:[{[m]:D,[h]:[O,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:g,headers:g},type:_},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},type:_}],type:P},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:k}],type:P},{conditions:ae,rules:[{conditions:[{[m]:U,[h]:[ie,ee]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:g,headers:g},type:_}],type:P},{error:"FIPS is enabled but this partition does not support FIPS",type:k}],type:P},{conditions:ce,rules:[{conditions:[oe],rules:[{conditions:[{[m]:D,[h]:["aws",{[m]:G,[h]:[we,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:g,headers:g},type:_},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},type:_}],type:P},{error:"DualStack is enabled but this partition does not support DualStack",type:k}],type:P},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:g,headers:g},type:_}],type:P}],type:P},{error:"Invalid Configuration: Missing Region",type:k}]},vn=bn,kn=new We({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Tn=(t,e={})=>kn.get(t,()=>Xe(vn,{endpointParams:t,logger:e.logger}));Ze.aws=Ye;const Dn=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??ye,base64Encoder:t?.base64Encoder??Ee,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Tn,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??_n,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Kt},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new nt}],logger:t?.logger??new tt,protocol:t?.protocol??new pn({defaultNamespace:"com.amazonaws.cognitoidentity",serviceTarget:"AWSCognitoIdentityService",awsQueryCompatible:!1}),serviceId:t?.serviceId??"Cognito Identity",urlParser:t?.urlParser??et,utf8Decoder:t?.utf8Decoder??zt,utf8Encoder:t?.utf8Encoder??he}),On=t=>{const e=st(t),n=()=>e().then(lt),s=Dn(t);return{...s,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??dt,credentialDefaultProvider:t?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??ct({serviceId:s.serviceId,clientVersion:Rn.version}),maxAttempts:t?.maxAttempts??at,region:t?.region??ot("Region is missing"),requestHandler:Ht.create(t?.requestHandler??n),retryMode:t?.retryMode??(async()=>(await n()).retryMode||it),sha256:t?.sha256??rt,streamCollector:t?.streamCollector??jt,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(pt)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(ut))}},Nn=t=>{const e=t.httpAuthSchemes;let n=t.httpAuthSchemeProvider,s=t.credentials;return{setHttpAuthScheme(r){const o=e.findIndex(i=>i.schemeId===r.schemeId);o===-1?e.push(r):e.splice(o,1,r)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(r){n=r},httpAuthSchemeProvider(){return n},setCredentials(r){s=r},credentials(){return s}}},Mn=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Un=(t,e)=>{const n=Object.assign(gt(t),ft(t),mt(t),Nn(t));return e.forEach(s=>s.configure(n)),Object.assign(t,ht(n),yt(n),Et(n),Mn(n))};class dr extends St{config;constructor(...[e]){const n=On(e||{});super(n),this.initConfig=n;const s=An(n),r=qt(s),o=Ct(r),i=It(o),a=Tt(i),c=xt(a),d=wn(c),p=Un(d,e?.extensions||[]);this.config=p,this.middlewareStack.use(_t(this.config)),this.middlewareStack.use(Cn(this.config)),this.middlewareStack.use(wt(this.config)),this.middlewareStack.use(At(this.config)),this.middlewareStack.use(Pt(this.config)),this.middlewareStack.use(Rt(this.config)),this.middlewareStack.use(bt(this.config)),this.middlewareStack.use(vt(this.config,{httpAuthSchemeParametersProvider:In,identityProviderConfigProvider:async l=>new Dt({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(kt(this.config))}destroy(){super.destroy()}}let S=class Ae extends Ot{constructor(e){super(e),Object.setPrototypeOf(this,Ae.prototype)}},$n=class Pe extends S{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,Pe.prototype)}},Fn=class Re extends S{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,Re.prototype)}},zn=class be extends S{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,be.prototype)}},jn=class ve extends S{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,ve.prototype)}},Hn=class ke extends S{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,ke.prototype)}},Ln=class Te extends S{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Te.prototype)}},Gn=class De extends S{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,De.prototype)}},qn=class Oe extends S{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,Oe.prototype)}},Bn=class Ne extends S{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ne.prototype)}},Vn=class Me extends S{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,Me.prototype)}},Jn=class Ue extends S{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ue.prototype)}};const Kn="AccountId",Qn="AccessKeyId",$e="Credentials",Wn="ConcurrentModificationException",Xn="CustomRoleArn",Yn="DeveloperUserAlreadyRegisteredException",Zn="Expiration",es="ExternalServiceException",ts="GetCredentialsForIdentity",ns="GetCredentialsForIdentityInput",ss="GetCredentialsForIdentityResponse",rs="GetId",is="GetIdInput",os="GetIdResponse",as="InternalErrorException",q="IdentityId",cs="InvalidIdentityPoolConfigurationException",ds="InvalidParameterException",us="IdentityPoolId",ps="IdentityProviderToken",Fe="Logins",ls="LimitExceededException",gs="LoginsMap",fs="NotAuthorizedException",ms="ResourceConflictException",hs="ResourceNotFoundException",ys="SecretKey",Es="SecretKeyString",Ss="SessionToken",Cs="TooManyRequestsException",w="client",C="error",A="httpError",I="message",Is="server",ze="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",u="com.amazonaws.cognitoidentity";var xs=[0,u,ps,8,0],_s=[0,u,Es,8,0],ws=[-3,u,Wn,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(ws,Jn);var As=[3,u,$e,0,[Qn,ys,Ss,Zn],[0,[()=>_s,0],0,4]],Ps=[-3,u,Yn,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(Ps,Vn);var Rs=[-3,u,es,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(Rs,qn);var bs=[3,u,ns,0,[q,Fe,Xn],[0,[()=>je,0],0]],vs=[3,u,ss,0,[q,$e],[0,[()=>As,0]]],ks=[3,u,is,0,[Kn,us,Fe],[0,0,[()=>je,0]]],Ts=[3,u,os,0,[q],[0]],Ds=[-3,u,as,{[C]:Is},[I],[0]];y.for(u).registerError(Ds,$n);var Os=[-3,u,cs,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(Os,Bn);var Ns=[-3,u,ds,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(Ns,Fn);var Ms=[-3,u,ls,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(Ms,zn);var Us=[-3,u,fs,{[C]:w,[A]:403},[I],[0]];y.for(u).registerError(Us,jn);var $s=[-3,u,ms,{[C]:w,[A]:409},[I],[0]];y.for(u).registerError($s,Hn);var Fs=[-3,u,hs,{[C]:w,[A]:404},[I],[0]];y.for(u).registerError(Fs,Gn);var zs=[-3,u,Cs,{[C]:w,[A]:429},[I],[0]];y.for(u).registerError(zs,Ln);var js=[-3,ze,"CognitoIdentityServiceException",0,[],[]];y.for(ze).registerError(js,S);var je=[2,u,gs,0,[0,0],[()=>xs,0]],Hs=[9,u,ts,0,()=>bs,()=>vs],Ls=[9,u,rs,0,()=>ks,()=>Ts];class ur extends ge.classBuilder().ep(Ce).m(function(e,n,s,r){return[fe(s,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Hs).build(){}class pr extends ge.classBuilder().ep(Ce).m(function(e,n,s,r){return[fe(s,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Ls).build(){}export{dr as CognitoIdentityClient,ur as GetCredentialsForIdentityCommand,pr as GetIdCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a2 as ut,N as D,f as Ce,L as lt,c as _e,S as oe,m as mt,d as pt,i as gt,T as A,b as ie,v as ht,R as ft,h as yt,e as ae,n as Re,j as Et,E as St,r as wt,k as bt,l as Tt,p as Pt,o as At,q as Ct,s as _t,t as Rt,D as xt,u as It,w as Dt,x as kt,y as vt,z as Nt,A as Mt,B as $t,F as Ot,G as Ut,H as Ft,I as zt,J as Lt,K as jt,a as Ht,M as Vt,O as Wt,P as Kt,Q as Bt,U as qt,V as Qt,W as Gt,X as Xt,Y as Jt,Z as Yt,_ as Zt,$ as es,a0 as ts,a1 as ss,C as rs,g as ns}from"./index-BTT5ny1x.js";import{d as X,t as J,n as L,c as os,H as xe,a as Ie,i as is,f as as,s as cs,F as ds}from"./normalizeProvider-BrOPyH3l.js";function ce(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const Y="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Z="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",ee="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",De="(\\d?\\d)",ke="(\\d{4})",us=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),ls=new RegExp(`^${Y}, ${De} ${Z} ${ke} ${ee} GMT$`),ms=new RegExp(`^${Y}, ${De}-${Z}-(\\d\\d) ${ee} GMT$`),ps=new RegExp(`^${Y} ${Z} ( [1-9]|\\d\\d) ${ee} ${ke}$`),gs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],hs=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.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))},fs=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=us.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,s,r,n,o,i,a,,d,c]=t;R(r,1,12),R(n,1,31),R(o,0,23),R(i,0,59),R(a,0,60);const u=new Date(Date.UTC(Number(s),Number(r)-1,Number(n),Number(o),Number(i),Number(a),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(u.setUTCFullYear(Number(s)),c.toUpperCase()!="Z"){const[,l,f,E]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],P=l==="-"?1:-1;u.setTime(u.getTime()+P*(Number(f)*60*60*1e3+Number(E)*60*1e3))}return u},ys=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,s,r,n,o,i,a,d;if((d=ls.exec(e))?[,t,s,r,n,o,i,a]=d:(d=ms.exec(e))?([,t,s,r,n,o,i,a]=d,r=(Number(r)+1900).toString()):(d=ps.exec(e))&&([,s,t,n,o,i,a,r]=d),r&&i){const c=Date.UTC(Number(r),gs.indexOf(s),Number(t),Number(n),Number(o),Number(i),a?Math.round(parseFloat(`0.${a}`)*1e3):0);R(t,1,31),R(n,0,23),R(o,0,59),R(i,0,60);const u=new Date(c);return u.setUTCFullYear(Number(r)),u}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function R(e,t,s){const r=Number(e);if(r<t||r>s)throw new Error(`Value ${r} out of range [${t}, ${s}]`)}const Es=e=>{const t=e.length,s=[];let r=!1,n,o=0;for(let i=0;i<t;++i){const a=e[i];switch(a){case'"':n!=="\\"&&(r=!r);break;case",":r||(s.push(e.slice(o,i)),o=i+1);break}n=a}return s.push(e.slice(o)),s.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 Ss extends ut{settings;constructor(t){super(),this.settings=t}read(t,s){const r=D.of(t);if(r.isListSchema())return Es(s).map(n=>this.read(r.getValueSchema(),n));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??X)(s);if(r.isTimestampSchema())switch(Ce(r,this.settings)){case 5:return fs(s);case 6:return ys(s);case 7:return hs(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isStringSchema()){const n=r.getMergedTraits().mediaType;let o=s;if(n)return r.getMergedTraits().httpHeader&&(o=this.base64ToUtf8(o)),(n==="application/json"||n.endsWith("+json"))&&(o=lt.from(o)),o}return r.isNumericSchema()?Number(s):r.isBigIntegerSchema()?BigInt(s):r.isBigDecimalSchema()?new _e(s,"bigDecimal"):r.isBooleanSchema()?String(s).toLowerCase()==="true":s}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??J)((this.serdeContext?.base64Decoder??X)(t))}}const ve=e=>{const t="#text";for(const s in e)e.hasOwnProperty(s)&&e[s][t]!==void 0?e[s]=e[s][t]:typeof e[s]=="object"&&e[s]!==null&&(e[s]=ve(e[s]));return e};let K;function ws(e){K||(K=new DOMParser);const t=K.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const s=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const n=r;if(n.attributes.length===0&&n.childNodes.length===0)return"";const o={},i=Array.from(n.attributes);for(const d of i)o[`${d.name}`]=d.value;const a=Array.from(n.childNodes);for(const d of a){const c=s(d);if(c!=null){const u=d.nodeName;if(a.length===1&&i.length===0&&u==="#text")return c;o[u]?Array.isArray(o[u])?o[u].push(c):o[u]=[o[u],c]:o[u]=c}else if(a.length===1&&i.length===0)return n.textContent}return o}return null};return{[t.documentElement.nodeName]:s(t.documentElement)}}const bs=void 0;function Ts(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Ps(e){const t=L(e.userAgentAppId??bs),{customUserAgent:s}=e;return Object.assign(e,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await t();if(!Ts(r)){const n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?n?.warn("userAgentAppId must be a string or undefined."):r.length>50&&n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}function As(e,t,s){return e.$source||(e.$source={}),e.$source[t]=s,e}function C(e,t,s){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=s}const de=e=>os.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ne=e=>new Date(Date.now()+e),Cs=(e,t)=>Math.abs(Ne(t).getTime()-e)>=3e5,ue=(e,t)=>{const s=Date.parse(e);return Cs(s,t)?s-Date.now():t},j=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},_s=async e=>{const t=j("context",e.context),s=j("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],o=await j("signer",s.signer)(r),i=e?.signingRegion,a=e?.signingRegionSet,d=e?.signingName;return{config:s,signer:o,signingRegion:i,signingRegionSet:a,signingName:d}};class Rs{async sign(t,s,r){if(!xe.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await _s(r),{config:o,signer:i}=n;let{signingRegion:a,signingName:d}=n;const c=r.context;if(c?.authSchemes?.length??!1){const[l,f]=c.authSchemes;l?.name==="sigv4a"&&f?.name==="sigv4"&&(a=f?.signingRegion??a,d=f?.signingName??d)}return await i.sign(t,{signingDate:Ne(o.systemClockOffset),signingRegion:a,signingService:d})}errorHandler(t){return s=>{const r=s.ServerTime??de(s.$response);if(r){const n=j("config",t.config),o=n.systemClockOffset;n.systemClockOffset=ue(r,n.systemClockOffset),n.systemClockOffset!==o&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(t,s){const r=de(t);if(r){const n=j("config",s.config);n.systemClockOffset=ue(r,n.systemClockOffset)}}}const xs=e=>{let t=e.credentials,s=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(c){c&&c!==t&&c!==r&&(s=!0),t=c;const u=Is(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),l=Ds(e,u);s&&!l.attributed?(r=async f=>l(f).then(E=>As(E,"CREDENTIALS_CODE","e")),r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0):r=l},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:n=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:i}=e;let a;return e.signer?a=L(e.signer):e.regionInfoProvider?a=()=>L(e.region)().then(async c=>[await e.regionInfoProvider(c,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},c]).then(([c,u])=>{const{signingRegion:l,signingService:f}=c;e.signingRegion=e.signingRegion||l||u,e.signingName=e.signingName||f||e.serviceId;const E={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n},P=e.signerConstructor||oe;return new P(E)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await L(e.region)(),properties:{}},c);const u=c.signingRegion,l=c.signingName;e.signingRegion=e.signingRegion||u,e.signingName=e.signingName||l||e.serviceId;const f={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n},E=e.signerConstructor||oe;return new E(f)},Object.assign(e,{systemClockOffset:o,signingEscapePath:n,signer:a})};function Is(e,{credentials:t,credentialDefaultProvider:s}){let r;return t?t?.memoized?r=t:r=mt(t,gt,pt):s?r=L(s(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Ds(e,t){if(t.configBound)return t;const s=async r=>t({...r,callerClientConfig:e});return s.memoized=t.memoized,s.configBound=!0,s}class ks{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,s){const r=s.getMemberSchemas(),n=Object.values(r).find(o=>!!o.getMergedTraits().httpPayload);if(n){const o=n.getMergedTraits().mediaType;return o||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":t)}else if(!s.isUnitSchema()&&Object.values(r).find(i=>{const{httpQuery:a,httpQueryParams:d,httpHeader:c,httpLabel:u,httpPrefixHeaders:l}=i.getMergedTraits();return!a&&!d&&!c&&!u&&l===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,s,r,n,o,i){let a=s,d=t;t.includes("#")&&([a,d]=t.split("#"));const c={$metadata:o,$fault:r.statusCode<500?"client":"server"},u=A.for(a);try{return{errorSchema:i?.(u,d)??u.getSchema(t),errorMetadata:c}}catch{n.message=n.message??n.Message??"UnknownError";const f=A.for("smithy.ts.sdk.synthetic."+a),E=f.getBaseException();if(E){const P=f.getErrorCtor(E)??Error;throw this.decorateServiceException(Object.assign(new P({name:d}),c),n)}throw this.decorateServiceException(Object.assign(new Error(d),c),n)}}decorateServiceException(t,s={}){if(this.queryCompat){const r=t.Message??s.Message,n=ie(t,s);return r&&(n.Message=r,n.message=r),n}return ie(t,s)}setQueryCompatError(t,s){const r=s.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[n,o]=r.split(";"),i=Object.entries(t),a={Code:n,Type:o};Object.assign(t,a);for(const[d,c]of i)a[d]=c;delete a.__type,t.Error=a}}queryCompatOutput(t,s){t.Error&&(s.Error=t.Error),t.Type&&(s.Type=t.Type),t.Code&&(s.Code=t.Code)}}class Me{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*vs(e,t){if(e.isUnitSchema())return;const s=e.getSchema();for(let r=0;r<s[4].length;++r){const n=s[4][r],o=new D([s[5][r],0],n);!(n in t)&&!o.isIdempotencyToken()||(yield[n,o])}}class Ns extends Me{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new Ss(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,s,r){const n=D.of(t),o=n.getMemberSchemas();if(n.isStructSchema()&&n.isMemberSchema()&&!!Object.values(o).find(c=>!!c.getMemberTraits().eventPayload)){const c={},u=Object.keys(o)[0];return o[u].isBlobSchema()?c[u]=s:c[u]=this.read(o[u],s),c}const a=(this.serdeContext?.utf8Encoder??J)(s),d=this.parseXml(a);return this.readSchema(t,r?d[r]:d)}readSchema(t,s){const r=D.of(t);if(r.isUnitSchema())return;const n=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(s))return this.readSchema(r,[s]);if(s==null)return s;if(typeof s=="object"){const o=!!n.sparse,i=!!n.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),c=[],u=d.getMergedTraits().xmlName??"member",l=i?s:(s[0]??s)[u],f=Array.isArray(l)?l:[l];for(const E of f)(E!=null||o)&&c.push(this.readSchema(d,E));return c}const a={};if(r.isMapSchema()){const d=r.getKeySchema(),c=r.getValueSchema();let u;i?u=Array.isArray(s)?s:[s]:u=Array.isArray(s.entry)?s.entry:[s.entry];const l=d.getMergedTraits().xmlName??"key",f=c.getMergedTraits().xmlName??"value";for(const E of u){const P=E[l],x=E[f];(x!=null||o)&&(a[P]=this.readSchema(c,x))}return a}if(r.isStructSchema()){for(const[d,c]of r.structIterator()){const u=c.getMergedTraits(),l=u.httpPayload?u.xmlName??c.getName():c.getMemberTraits().xmlName??d;s[l]!=null&&(a[d]=this.readSchema(c,s[l]))}return a}if(r.isDocumentSchema())return s;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,s)}parseXml(t){if(t.length){let s;try{s=ws(t)}catch(i){throw i&&typeof i=="object"&&Object.defineProperty(i,"$responseBodyText",{value:t}),i}const r="#text",n=Object.keys(s)[0],o=s[n];return o[r]&&(o[n]=o[r],delete o[r]),ve(o)}return{}}}class Ms extends Me{settings;buffer;constructor(t){super(),this.settings=t}write(t,s,r=""){this.buffer===void 0&&(this.buffer="");const n=D.of(t);if(r&&!r.endsWith(".")&&(r+="."),n.isBlobSchema())(typeof s=="string"||s instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Ie)(s)));else if(n.isBooleanSchema()||n.isNumericSchema()||n.isStringSchema())s!=null?(this.writeKey(r),this.writeValue(String(s))):n.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(ht()));else if(n.isBigIntegerSchema())s!=null&&(this.writeKey(r),this.writeValue(String(s)));else if(n.isBigDecimalSchema())s!=null&&(this.writeKey(r),this.writeValue(s instanceof _e?s.string:String(s)));else if(n.isTimestampSchema()){if(s instanceof Date)switch(this.writeKey(r),Ce(n,this.settings)){case 5:this.writeValue(s.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(is(s));break;case 7:this.writeValue(String(s.getTime()/1e3));break}}else{if(n.isDocumentSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${n.getName(!0)}`);if(n.isListSchema()){if(Array.isArray(s))if(s.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const o=n.getValueSchema(),i=this.settings.flattenLists||n.getMergedTraits().xmlFlattened;let a=1;for(const d of s){if(d==null)continue;const c=this.getKey("member",o.getMergedTraits().xmlName),u=i?`${r}${a}`:`${r}${c}.${a}`;this.write(o,d,u),++a}}}else if(n.isMapSchema()){if(s&&typeof s=="object"){const o=n.getKeySchema(),i=n.getValueSchema(),a=n.getMergedTraits().xmlFlattened;let d=1;for(const[c,u]of Object.entries(s)){if(u==null)continue;const l=this.getKey("key",o.getMergedTraits().xmlName),f=a?`${r}${d}.${l}`:`${r}entry.${d}.${l}`,E=this.getKey("value",i.getMergedTraits().xmlName),P=a?`${r}${d}.${E}`:`${r}entry.${d}.${E}`;this.write(o,c,f),this.write(i,u,P),++d}}}else if(n.isStructSchema()){if(s&&typeof s=="object")for(const[o,i]of vs(n,s)){if(s[o]==null&&!i.isIdempotencyToken())continue;const a=this.getKey(o,i.getMergedTraits().xmlName),d=`${r}${a}`;this.write(i,s[o],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,s){const r=s??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${ce(t)}=`}writeValue(t){this.buffer+=ce(t)}}class $s extends ft{options;serializer;deserializer;mixin=new ks;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const s={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new Ms(s),this.deserializer=new Ns(s)}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,s,r){const n=await super.serializeRequest(t,s,r);n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":"application/x-www-form-urlencoded"}),(yt(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,s,r){const n=this.deserializer,o=D.of(t.output),i={};if(r.statusCode>=300){const l=await ae(r.body,s);l.byteLength>0&&Object.assign(i,await n.read(15,l)),await this.handleError(t,s,r,i,this.deserializeMetadata(r))}for(const l in r.headers){const f=r.headers[l];delete r.headers[l],r.headers[l.toLowerCase()]=f}const a=t.name.split("#")[1]??t.name,d=o.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,c=await ae(r.body,s);return c.byteLength>0&&Object.assign(i,await n.read(o,c,d)),{$metadata:this.deserializeMetadata(r),...i}}useNestedResult(){return!0}async handleError(t,s,r,n,o){const i=this.loadQueryErrorCode(r,n)??"Unknown",a=this.loadQueryError(n),d=this.loadQueryErrorMessage(n);a.message=d,a.Error={Type:a.Type,Code:a.Code,Message:d};const{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,r,a,o,(x,z)=>{try{return x.getSchema(z)}catch{return x.find(W=>D.of(W).getMergedTraits().awsQueryError?.[0]===z)}}),l=D.of(c),f=A.for(c[1]).getErrorCtor(c)??Error,E=new f(d),P={Error:a.Error};for(const[x,z]of l.structIterator()){const V=z.getMergedTraits().xmlName??x,W=a[V]??n[V];P[x]=this.deserializer.readSchema(z,W)}throw this.mixin.decorateServiceException(Object.assign(E,u,{$fault:l.getMergedTraits().error,message:d},P),n)}loadQueryErrorCode(t,s){const r=(s.Errors?.[0]?.Error??s.Errors?.Error??s.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const s=this.loadQueryError(t);return s?.message??s?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Os=/\d{12}\.ddb/;async function Us(e,t,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&C(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const o=await t.retryStrategy();typeof o.acquireInitialRetryToken=="function"?o.constructor?.name?.includes("Adaptive")?C(e,"RETRY_MODE_ADAPTIVE","F"):C(e,"RETRY_MODE_STANDARD","E"):C(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const o=e.endpointV2;switch(String(o?.url?.hostname).match(Os)&&C(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":C(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":C(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":C(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const o=n;o.accountId&&C(e,"RESOLVED_ACCOUNT_ID","T");for(const[i,a]of Object.entries(o.$source??{}))C(e,i,a)}}const le="user-agent",B="x-amz-user-agent",me=" ",q="/",Fs=/[^!$%&'*+\-.^_`|~\w]/g,zs=/[^!$%&'*+\-.^_`|~\w#]/g,pe="-",Ls=1024;function js(e){let t="";for(const s in e){const r=e[s];if(t.length+r.length+1<=Ls){t.length?t+=","+r:t+=r;continue}break}return t}const Hs=e=>(t,s)=>async r=>{const{request:n}=r;if(!xe.isInstance(n))return t(r);const{headers:o}=n,i=s?.userAgent?.map(H)||[],a=(await e.defaultUserAgentProvider()).map(H);await Us(s,e,r);const d=s;a.push(`m/${js(Object.assign({},s.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const c=e?.customUserAgent?.map(H)||[],u=await e.userAgentAppId();u&&a.push(H(["app",`${u}`]));const l=[].concat([...a,...i,...c]).join(me),f=[...a.filter(E=>E.startsWith("aws-sdk-")),...c].join(me);return e.runtime!=="browser"?(f&&(o[B]=o[B]?`${o[le]} ${f}`:f),o[le]=l):o[B]=l,t({...r,request:n})},H=e=>{const t=e[0].split(q).map(i=>i.replace(Fs,pe)).join(q),s=e[1]?.replace(zs,pe),r=t.indexOf(q),n=t.substring(0,r);let o=t.substring(r+1);return n==="api"&&(o=o.toLowerCase()),[n,o,s].filter(i=>i&&i.length>0).reduce((i,a,d)=>{switch(d){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},Vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Ws=e=>({applyToStack:t=>{t.add(Hs(e),Vs)}}),Ks=async(e,t,s)=>({operation:Et(t).operation,region:await Re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Bs(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function qs(e){return{schemeId:"smithy.api#noAuth"}}const Qs=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(qs());break}default:t.push(Bs(e))}return t},Gs=e=>Object.assign(e,{stsClientCtor:Ke}),Xs=e=>{const t=Gs(e),s=xs(t);return Object.assign(s,{authSchemePreference:Re(e.authSchemePreference??[])})},Js=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Ys={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"}},Zs="3.940.0",er={version:Zs},$e="required",m="type",p="fn",g="argv",k="ref",ge=!1,Q=!0,I="booleanEquals",S="stringEquals",Oe="sigv4",Ue="sts",Fe="us-east-1",y="endpoint",he="https://sts.{Region}.{PartitionResult#dnsSuffix}",_="tree",F="error",te="getAttr",fe={[$e]:!1,[m]:"string"},G={[$e]:!0,default:!1,[m]:"boolean"},ze={[k]:"Endpoint"},ye={[p]:"isSet",[g]:[{[k]:"Region"}]},w={[k]:"Region"},Ee={[p]:"aws.partition",[g]:[w],assign:"PartitionResult"},Le={[k]:"UseFIPS"},je={[k]:"UseDualStack"},b={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:Oe,signingName:Ue,signingRegion:Fe}]},headers:{}},T={},Se={conditions:[{[p]:S,[g]:[w,"aws-global"]}],[y]:b,[m]:y},He={[p]:I,[g]:[Le,!0]},Ve={[p]:I,[g]:[je,!0]},we={[p]:te,[g]:[{[k]:"PartitionResult"},"supportsFIPS"]},We={[k]:"PartitionResult"},be={[p]:I,[g]:[!0,{[p]:te,[g]:[We,"supportsDualStack"]}]},Te=[{[p]:"isSet",[g]:[ze]}],Pe=[He],Ae=[Ve],tr={parameters:{Region:fe,UseDualStack:G,UseFIPS:G,Endpoint:fe,UseGlobalEndpoint:G},rules:[{conditions:[{[p]:I,[g]:[{[k]:"UseGlobalEndpoint"},Q]},{[p]:"not",[g]:Te},ye,Ee,{[p]:I,[g]:[Le,ge]},{[p]:I,[g]:[je,ge]}],rules:[{conditions:[{[p]:S,[g]:[w,"ap-northeast-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"ap-south-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"ap-southeast-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"ap-southeast-2"]}],endpoint:b,[m]:y},Se,{conditions:[{[p]:S,[g]:[w,"ca-central-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-central-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-north-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-west-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-west-2"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-west-3"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"sa-east-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,Fe]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"us-east-2"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"us-west-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"us-west-2"]}],endpoint:b,[m]:y},{endpoint:{url:he,properties:{authSchemes:[{name:Oe,signingName:Ue,signingRegion:"{Region}"}]},headers:T},[m]:y}],[m]:_},{conditions:Te,rules:[{conditions:Pe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[m]:F},{conditions:Ae,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[m]:F},{endpoint:{url:ze,properties:T,headers:T},[m]:y}],[m]:_},{conditions:[ye],rules:[{conditions:[Ee],rules:[{conditions:[He,Ve],rules:[{conditions:[{[p]:I,[g]:[Q,we]},be],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:T,headers:T},[m]:y}],[m]:_},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[m]:F}],[m]:_},{conditions:Pe,rules:[{conditions:[{[p]:I,[g]:[we,Q]}],rules:[{conditions:[{[p]:S,[g]:[{[p]:te,[g]:[We,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:T,headers:T},[m]:y},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:T,headers:T},[m]:y}],[m]:_},{error:"FIPS is enabled but this partition does not support FIPS",[m]:F}],[m]:_},{conditions:Ae,rules:[{conditions:[be],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:T,headers:T},[m]:y}],[m]:_},{error:"DualStack is enabled but this partition does not support DualStack",[m]:F}],[m]:_},Se,{endpoint:{url:he,properties:T,headers:T},[m]:y}],[m]:_}],[m]:_},{error:"Invalid Configuration: Missing Region",[m]:F}]},sr=tr,rr=new St({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),nr=(e,t={})=>rr.get(e,()=>wt(sr,{endpointParams:e,logger:t.logger}));Tt.aws=bt;const or=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??X,base64Encoder:e?.base64Encoder??Ie,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??nr,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Qs,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Rs},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ct}],logger:e?.logger??new At,protocol:e?.protocol??new $s({defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15"}),serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??Pt,utf8Decoder:e?.utf8Decoder??as,utf8Encoder:e?.utf8Encoder??J}),ir=e=>{const t=_t(e),s=()=>t().then($t),r=or(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??vt,credentialDefaultProvider:e?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??kt({serviceId:r.serviceId,clientVersion:er.version}),maxAttempts:e?.maxAttempts??Dt,region:e?.region??It("Region is missing"),requestHandler:ds.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||xt),sha256:e?.sha256??Rt,streamCollector:e?.streamCollector??cs,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Mt)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Nt))}},ar=e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.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){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},cr=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),dr=(e,t)=>{const s=Object.assign(Ot(e),Ut(e),Ft(e),ar(e));return t.forEach(r=>r.configure(s)),Object.assign(e,zt(s),Lt(s),jt(s),cr(s))};class Ke extends Ht{config;constructor(...[t]){const s=ir(t||{});super(s),this.initConfig=s;const r=Js(s),n=Ps(r),o=Vt(n),i=Wt(o),a=es(i),d=Kt(a),c=Xs(d),u=dr(c,t?.extensions||[]);this.config=u,this.middlewareStack.use(Bt(this.config)),this.middlewareStack.use(Ws(this.config)),this.middlewareStack.use(qt(this.config)),this.middlewareStack.use(Qt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Xt(this.config)),this.middlewareStack.use(Jt(this.config)),this.middlewareStack.use(Yt(this.config,{httpAuthSchemeParametersProvider:Ks,identityProviderConfigProvider:async l=>new ts({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Zt(this.config))}destroy(){super.destroy()}}let v=class Be extends ss{constructor(t){super(t),Object.setPrototypeOf(this,Be.prototype)}},ur=class qe extends v{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,qe.prototype)}},lr=class Qe extends v{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,Qe.prototype)}},mr=class Ge extends v{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,Ge.prototype)}},pr=class Xe extends v{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,Xe.prototype)}},gr=class Je extends v{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,Je.prototype)}},hr=class Ye extends v{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Ye.prototype)}},fr=class Ze extends v{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,Ze.prototype)}};const yr="Arn",Er="AccessKeyId",Sr="AssumeRole",wr="AssumedRoleId",br="AssumeRoleRequest",Tr="AssumeRoleResponse",se="AssumedRoleUser",Pr="AssumeRoleWithWebIdentity",Ar="AssumeRoleWithWebIdentityRequest",Cr="AssumeRoleWithWebIdentityResponse",_r="Audience",re="Credentials",Rr="ContextAssertion",et="DurationSeconds",xr="Expiration",Ir="ExternalId",Dr="ExpiredTokenException",kr="IDPCommunicationErrorException",vr="IDPRejectedClaimException",Nr="InvalidIdentityTokenException",Mr="Key",$r="MalformedPolicyDocumentException",tt="Policy",st="PolicyArns",Or="ProviderArn",Ur="ProvidedContexts",Fr="ProvidedContextsListType",zr="ProvidedContext",Lr="PolicyDescriptorType",jr="ProviderId",rt="PackedPolicySize",Hr="PackedPolicyTooLargeException",Vr="Provider",nt="RoleArn",Wr="RegionDisabledException",ot="RoleSessionName",Kr="SecretAccessKey",Br="SubjectFromWebIdentityToken",ne="SourceIdentity",qr="SerialNumber",Qr="SessionToken",Gr="Tags",Xr="TokenCode",Jr="TransitiveTagKeys",Yr="Tag",Zr="Value",en="WebIdentityToken",tn="arn",sn="accessKeySecretType",N="awsQueryError",M="client",rn="clientTokenType",$="error",O="httpError",U="message",nn="policyDescriptorListType",it="smithy.ts.sdk.synthetic.com.amazonaws.sts",on="tagListType",h="com.amazonaws.sts";var an=[0,h,sn,8,0],cn=[0,h,rn,8,0],at=[3,h,se,0,[wr,yr],[0,0]],dn=[3,h,br,0,[nt,ot,st,tt,et,Gr,Jr,Ir,qr,Xr,ne,Ur],[0,0,()=>dt,0,1,()=>Cn,64,0,0,0,0,()=>An]],un=[3,h,Tr,0,[re,se,rt,ne],[[()=>ct,0],()=>at,1,0]],ln=[3,h,Ar,0,[nt,ot,en,jr,st,tt,et],[0,0,[()=>cn,0],0,()=>dt,0,1]],mn=[3,h,Cr,0,[re,Br,se,rt,Vr,_r,ne],[[()=>ct,0],0,()=>at,1,0,0,0]],ct=[3,h,re,0,[Er,Kr,Qr,xr],[0,[()=>an,0],0,4]],pn=[-3,h,Dr,{[$]:M,[O]:400,[N]:["ExpiredTokenException",400]},[U],[0]];A.for(h).registerError(pn,ur);var gn=[-3,h,kr,{[$]:M,[O]:400,[N]:["IDPCommunicationError",400]},[U],[0]];A.for(h).registerError(gn,fr);var hn=[-3,h,vr,{[$]:M,[O]:403,[N]:["IDPRejectedClaim",403]},[U],[0]];A.for(h).registerError(hn,gr);var fn=[-3,h,Nr,{[$]:M,[O]:400,[N]:["InvalidIdentityToken",400]},[U],[0]];A.for(h).registerError(fn,hr);var yn=[-3,h,$r,{[$]:M,[O]:400,[N]:["MalformedPolicyDocument",400]},[U],[0]];A.for(h).registerError(yn,lr);var En=[-3,h,Hr,{[$]:M,[O]:400,[N]:["PackedPolicyTooLarge",400]},[U],[0]];A.for(h).registerError(En,mr);var Sn=[3,h,Lr,0,[tn],[0]],wn=[3,h,zr,0,[Or,Rr],[0,0]],bn=[-3,h,Wr,{[$]:M,[O]:403,[N]:["RegionDisabledException",403]},[U],[0]];A.for(h).registerError(bn,pr);var Tn=[3,h,Yr,0,[Mr,Zr],[0,0]],Pn=[-3,it,"STSServiceException",0,[],[]];A.for(it).registerError(Pn,v);var dt=[1,h,nn,0,()=>Sn],An=[1,h,Fr,0,()=>wn],Cn=[1,h,on,0,()=>Tn],_n=[9,h,Sr,0,()=>dn,()=>un],Dn=[9,h,Pr,0,()=>ln,()=>mn];class Rn extends rs.classBuilder().ep(Ys).m(function(t,s,r,n){return[ns(r,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(_n).build(){}const kn=Object.freeze(Object.defineProperty({__proto__:null,AssumeRoleCommand:Rn,STSClient:Ke},Symbol.toStringTag,{value:"Module"}));export{Dn as A,ur as E,gr as I,lr as M,mr as P,pr as R,Ke as S,v as a,Rn as b,Ys as c,hr as d,fr as e,kn as l,As as s};
|
|
1
|
+
import{a2 as ut,N as D,f as Ce,L as lt,c as _e,S as oe,m as mt,d as pt,i as gt,T as A,b as ie,v as ht,R as ft,h as yt,e as ae,n as Re,j as Et,E as St,r as wt,k as bt,l as Tt,p as Pt,o as At,q as Ct,s as _t,t as Rt,D as xt,u as It,w as Dt,x as kt,y as vt,z as Nt,A as Mt,B as $t,F as Ot,G as Ut,H as Ft,I as zt,J as Lt,K as jt,a as Ht,M as Vt,O as Wt,P as Kt,Q as Bt,U as qt,V as Qt,W as Gt,X as Xt,Y as Jt,Z as Yt,_ as Zt,$ as es,a0 as ts,a1 as ss,C as rs,g as ns}from"./index-BUSNaVGD.js";import{d as X,t as J,n as L,c as os,H as xe,a as Ie,i as is,f as as,s as cs,F as ds}from"./normalizeProvider-BrOPyH3l.js";function ce(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const Y="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Z="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",ee="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",De="(\\d?\\d)",ke="(\\d{4})",us=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),ls=new RegExp(`^${Y}, ${De} ${Z} ${ke} ${ee} GMT$`),ms=new RegExp(`^${Y}, ${De}-${Z}-(\\d\\d) ${ee} GMT$`),ps=new RegExp(`^${Y} ${Z} ( [1-9]|\\d\\d) ${ee} ${ke}$`),gs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],hs=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.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))},fs=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=us.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,s,r,n,o,i,a,,d,c]=t;R(r,1,12),R(n,1,31),R(o,0,23),R(i,0,59),R(a,0,60);const u=new Date(Date.UTC(Number(s),Number(r)-1,Number(n),Number(o),Number(i),Number(a),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(u.setUTCFullYear(Number(s)),c.toUpperCase()!="Z"){const[,l,f,E]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],P=l==="-"?1:-1;u.setTime(u.getTime()+P*(Number(f)*60*60*1e3+Number(E)*60*1e3))}return u},ys=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,s,r,n,o,i,a,d;if((d=ls.exec(e))?[,t,s,r,n,o,i,a]=d:(d=ms.exec(e))?([,t,s,r,n,o,i,a]=d,r=(Number(r)+1900).toString()):(d=ps.exec(e))&&([,s,t,n,o,i,a,r]=d),r&&i){const c=Date.UTC(Number(r),gs.indexOf(s),Number(t),Number(n),Number(o),Number(i),a?Math.round(parseFloat(`0.${a}`)*1e3):0);R(t,1,31),R(n,0,23),R(o,0,59),R(i,0,60);const u=new Date(c);return u.setUTCFullYear(Number(r)),u}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function R(e,t,s){const r=Number(e);if(r<t||r>s)throw new Error(`Value ${r} out of range [${t}, ${s}]`)}const Es=e=>{const t=e.length,s=[];let r=!1,n,o=0;for(let i=0;i<t;++i){const a=e[i];switch(a){case'"':n!=="\\"&&(r=!r);break;case",":r||(s.push(e.slice(o,i)),o=i+1);break}n=a}return s.push(e.slice(o)),s.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 Ss extends ut{settings;constructor(t){super(),this.settings=t}read(t,s){const r=D.of(t);if(r.isListSchema())return Es(s).map(n=>this.read(r.getValueSchema(),n));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??X)(s);if(r.isTimestampSchema())switch(Ce(r,this.settings)){case 5:return fs(s);case 6:return ys(s);case 7:return hs(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isStringSchema()){const n=r.getMergedTraits().mediaType;let o=s;if(n)return r.getMergedTraits().httpHeader&&(o=this.base64ToUtf8(o)),(n==="application/json"||n.endsWith("+json"))&&(o=lt.from(o)),o}return r.isNumericSchema()?Number(s):r.isBigIntegerSchema()?BigInt(s):r.isBigDecimalSchema()?new _e(s,"bigDecimal"):r.isBooleanSchema()?String(s).toLowerCase()==="true":s}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??J)((this.serdeContext?.base64Decoder??X)(t))}}const ve=e=>{const t="#text";for(const s in e)e.hasOwnProperty(s)&&e[s][t]!==void 0?e[s]=e[s][t]:typeof e[s]=="object"&&e[s]!==null&&(e[s]=ve(e[s]));return e};let K;function ws(e){K||(K=new DOMParser);const t=K.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const s=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const n=r;if(n.attributes.length===0&&n.childNodes.length===0)return"";const o={},i=Array.from(n.attributes);for(const d of i)o[`${d.name}`]=d.value;const a=Array.from(n.childNodes);for(const d of a){const c=s(d);if(c!=null){const u=d.nodeName;if(a.length===1&&i.length===0&&u==="#text")return c;o[u]?Array.isArray(o[u])?o[u].push(c):o[u]=[o[u],c]:o[u]=c}else if(a.length===1&&i.length===0)return n.textContent}return o}return null};return{[t.documentElement.nodeName]:s(t.documentElement)}}const bs=void 0;function Ts(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Ps(e){const t=L(e.userAgentAppId??bs),{customUserAgent:s}=e;return Object.assign(e,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await t();if(!Ts(r)){const n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?n?.warn("userAgentAppId must be a string or undefined."):r.length>50&&n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}function As(e,t,s){return e.$source||(e.$source={}),e.$source[t]=s,e}function C(e,t,s){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=s}const de=e=>os.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ne=e=>new Date(Date.now()+e),Cs=(e,t)=>Math.abs(Ne(t).getTime()-e)>=3e5,ue=(e,t)=>{const s=Date.parse(e);return Cs(s,t)?s-Date.now():t},j=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},_s=async e=>{const t=j("context",e.context),s=j("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],o=await j("signer",s.signer)(r),i=e?.signingRegion,a=e?.signingRegionSet,d=e?.signingName;return{config:s,signer:o,signingRegion:i,signingRegionSet:a,signingName:d}};class Rs{async sign(t,s,r){if(!xe.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await _s(r),{config:o,signer:i}=n;let{signingRegion:a,signingName:d}=n;const c=r.context;if(c?.authSchemes?.length??!1){const[l,f]=c.authSchemes;l?.name==="sigv4a"&&f?.name==="sigv4"&&(a=f?.signingRegion??a,d=f?.signingName??d)}return await i.sign(t,{signingDate:Ne(o.systemClockOffset),signingRegion:a,signingService:d})}errorHandler(t){return s=>{const r=s.ServerTime??de(s.$response);if(r){const n=j("config",t.config),o=n.systemClockOffset;n.systemClockOffset=ue(r,n.systemClockOffset),n.systemClockOffset!==o&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(t,s){const r=de(t);if(r){const n=j("config",s.config);n.systemClockOffset=ue(r,n.systemClockOffset)}}}const xs=e=>{let t=e.credentials,s=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(c){c&&c!==t&&c!==r&&(s=!0),t=c;const u=Is(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),l=Ds(e,u);s&&!l.attributed?(r=async f=>l(f).then(E=>As(E,"CREDENTIALS_CODE","e")),r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0):r=l},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:n=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:i}=e;let a;return e.signer?a=L(e.signer):e.regionInfoProvider?a=()=>L(e.region)().then(async c=>[await e.regionInfoProvider(c,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},c]).then(([c,u])=>{const{signingRegion:l,signingService:f}=c;e.signingRegion=e.signingRegion||l||u,e.signingName=e.signingName||f||e.serviceId;const E={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n},P=e.signerConstructor||oe;return new P(E)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await L(e.region)(),properties:{}},c);const u=c.signingRegion,l=c.signingName;e.signingRegion=e.signingRegion||u,e.signingName=e.signingName||l||e.serviceId;const f={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n},E=e.signerConstructor||oe;return new E(f)},Object.assign(e,{systemClockOffset:o,signingEscapePath:n,signer:a})};function Is(e,{credentials:t,credentialDefaultProvider:s}){let r;return t?t?.memoized?r=t:r=mt(t,gt,pt):s?r=L(s(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Ds(e,t){if(t.configBound)return t;const s=async r=>t({...r,callerClientConfig:e});return s.memoized=t.memoized,s.configBound=!0,s}class ks{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,s){const r=s.getMemberSchemas(),n=Object.values(r).find(o=>!!o.getMergedTraits().httpPayload);if(n){const o=n.getMergedTraits().mediaType;return o||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":t)}else if(!s.isUnitSchema()&&Object.values(r).find(i=>{const{httpQuery:a,httpQueryParams:d,httpHeader:c,httpLabel:u,httpPrefixHeaders:l}=i.getMergedTraits();return!a&&!d&&!c&&!u&&l===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,s,r,n,o,i){let a=s,d=t;t.includes("#")&&([a,d]=t.split("#"));const c={$metadata:o,$fault:r.statusCode<500?"client":"server"},u=A.for(a);try{return{errorSchema:i?.(u,d)??u.getSchema(t),errorMetadata:c}}catch{n.message=n.message??n.Message??"UnknownError";const f=A.for("smithy.ts.sdk.synthetic."+a),E=f.getBaseException();if(E){const P=f.getErrorCtor(E)??Error;throw this.decorateServiceException(Object.assign(new P({name:d}),c),n)}throw this.decorateServiceException(Object.assign(new Error(d),c),n)}}decorateServiceException(t,s={}){if(this.queryCompat){const r=t.Message??s.Message,n=ie(t,s);return r&&(n.Message=r,n.message=r),n}return ie(t,s)}setQueryCompatError(t,s){const r=s.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[n,o]=r.split(";"),i=Object.entries(t),a={Code:n,Type:o};Object.assign(t,a);for(const[d,c]of i)a[d]=c;delete a.__type,t.Error=a}}queryCompatOutput(t,s){t.Error&&(s.Error=t.Error),t.Type&&(s.Type=t.Type),t.Code&&(s.Code=t.Code)}}class Me{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*vs(e,t){if(e.isUnitSchema())return;const s=e.getSchema();for(let r=0;r<s[4].length;++r){const n=s[4][r],o=new D([s[5][r],0],n);!(n in t)&&!o.isIdempotencyToken()||(yield[n,o])}}class Ns extends Me{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new Ss(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,s,r){const n=D.of(t),o=n.getMemberSchemas();if(n.isStructSchema()&&n.isMemberSchema()&&!!Object.values(o).find(c=>!!c.getMemberTraits().eventPayload)){const c={},u=Object.keys(o)[0];return o[u].isBlobSchema()?c[u]=s:c[u]=this.read(o[u],s),c}const a=(this.serdeContext?.utf8Encoder??J)(s),d=this.parseXml(a);return this.readSchema(t,r?d[r]:d)}readSchema(t,s){const r=D.of(t);if(r.isUnitSchema())return;const n=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(s))return this.readSchema(r,[s]);if(s==null)return s;if(typeof s=="object"){const o=!!n.sparse,i=!!n.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),c=[],u=d.getMergedTraits().xmlName??"member",l=i?s:(s[0]??s)[u],f=Array.isArray(l)?l:[l];for(const E of f)(E!=null||o)&&c.push(this.readSchema(d,E));return c}const a={};if(r.isMapSchema()){const d=r.getKeySchema(),c=r.getValueSchema();let u;i?u=Array.isArray(s)?s:[s]:u=Array.isArray(s.entry)?s.entry:[s.entry];const l=d.getMergedTraits().xmlName??"key",f=c.getMergedTraits().xmlName??"value";for(const E of u){const P=E[l],x=E[f];(x!=null||o)&&(a[P]=this.readSchema(c,x))}return a}if(r.isStructSchema()){for(const[d,c]of r.structIterator()){const u=c.getMergedTraits(),l=u.httpPayload?u.xmlName??c.getName():c.getMemberTraits().xmlName??d;s[l]!=null&&(a[d]=this.readSchema(c,s[l]))}return a}if(r.isDocumentSchema())return s;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,s)}parseXml(t){if(t.length){let s;try{s=ws(t)}catch(i){throw i&&typeof i=="object"&&Object.defineProperty(i,"$responseBodyText",{value:t}),i}const r="#text",n=Object.keys(s)[0],o=s[n];return o[r]&&(o[n]=o[r],delete o[r]),ve(o)}return{}}}class Ms extends Me{settings;buffer;constructor(t){super(),this.settings=t}write(t,s,r=""){this.buffer===void 0&&(this.buffer="");const n=D.of(t);if(r&&!r.endsWith(".")&&(r+="."),n.isBlobSchema())(typeof s=="string"||s instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Ie)(s)));else if(n.isBooleanSchema()||n.isNumericSchema()||n.isStringSchema())s!=null?(this.writeKey(r),this.writeValue(String(s))):n.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(ht()));else if(n.isBigIntegerSchema())s!=null&&(this.writeKey(r),this.writeValue(String(s)));else if(n.isBigDecimalSchema())s!=null&&(this.writeKey(r),this.writeValue(s instanceof _e?s.string:String(s)));else if(n.isTimestampSchema()){if(s instanceof Date)switch(this.writeKey(r),Ce(n,this.settings)){case 5:this.writeValue(s.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(is(s));break;case 7:this.writeValue(String(s.getTime()/1e3));break}}else{if(n.isDocumentSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${n.getName(!0)}`);if(n.isListSchema()){if(Array.isArray(s))if(s.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const o=n.getValueSchema(),i=this.settings.flattenLists||n.getMergedTraits().xmlFlattened;let a=1;for(const d of s){if(d==null)continue;const c=this.getKey("member",o.getMergedTraits().xmlName),u=i?`${r}${a}`:`${r}${c}.${a}`;this.write(o,d,u),++a}}}else if(n.isMapSchema()){if(s&&typeof s=="object"){const o=n.getKeySchema(),i=n.getValueSchema(),a=n.getMergedTraits().xmlFlattened;let d=1;for(const[c,u]of Object.entries(s)){if(u==null)continue;const l=this.getKey("key",o.getMergedTraits().xmlName),f=a?`${r}${d}.${l}`:`${r}entry.${d}.${l}`,E=this.getKey("value",i.getMergedTraits().xmlName),P=a?`${r}${d}.${E}`:`${r}entry.${d}.${E}`;this.write(o,c,f),this.write(i,u,P),++d}}}else if(n.isStructSchema()){if(s&&typeof s=="object")for(const[o,i]of vs(n,s)){if(s[o]==null&&!i.isIdempotencyToken())continue;const a=this.getKey(o,i.getMergedTraits().xmlName),d=`${r}${a}`;this.write(i,s[o],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,s){const r=s??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${ce(t)}=`}writeValue(t){this.buffer+=ce(t)}}class $s extends ft{options;serializer;deserializer;mixin=new ks;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const s={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new Ms(s),this.deserializer=new Ns(s)}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,s,r){const n=await super.serializeRequest(t,s,r);n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":"application/x-www-form-urlencoded"}),(yt(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,s,r){const n=this.deserializer,o=D.of(t.output),i={};if(r.statusCode>=300){const l=await ae(r.body,s);l.byteLength>0&&Object.assign(i,await n.read(15,l)),await this.handleError(t,s,r,i,this.deserializeMetadata(r))}for(const l in r.headers){const f=r.headers[l];delete r.headers[l],r.headers[l.toLowerCase()]=f}const a=t.name.split("#")[1]??t.name,d=o.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,c=await ae(r.body,s);return c.byteLength>0&&Object.assign(i,await n.read(o,c,d)),{$metadata:this.deserializeMetadata(r),...i}}useNestedResult(){return!0}async handleError(t,s,r,n,o){const i=this.loadQueryErrorCode(r,n)??"Unknown",a=this.loadQueryError(n),d=this.loadQueryErrorMessage(n);a.message=d,a.Error={Type:a.Type,Code:a.Code,Message:d};const{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,r,a,o,(x,z)=>{try{return x.getSchema(z)}catch{return x.find(W=>D.of(W).getMergedTraits().awsQueryError?.[0]===z)}}),l=D.of(c),f=A.for(c[1]).getErrorCtor(c)??Error,E=new f(d),P={Error:a.Error};for(const[x,z]of l.structIterator()){const V=z.getMergedTraits().xmlName??x,W=a[V]??n[V];P[x]=this.deserializer.readSchema(z,W)}throw this.mixin.decorateServiceException(Object.assign(E,u,{$fault:l.getMergedTraits().error,message:d},P),n)}loadQueryErrorCode(t,s){const r=(s.Errors?.[0]?.Error??s.Errors?.Error??s.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const s=this.loadQueryError(t);return s?.message??s?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Os=/\d{12}\.ddb/;async function Us(e,t,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&C(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const o=await t.retryStrategy();typeof o.acquireInitialRetryToken=="function"?o.constructor?.name?.includes("Adaptive")?C(e,"RETRY_MODE_ADAPTIVE","F"):C(e,"RETRY_MODE_STANDARD","E"):C(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const o=e.endpointV2;switch(String(o?.url?.hostname).match(Os)&&C(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":C(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":C(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":C(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const o=n;o.accountId&&C(e,"RESOLVED_ACCOUNT_ID","T");for(const[i,a]of Object.entries(o.$source??{}))C(e,i,a)}}const le="user-agent",B="x-amz-user-agent",me=" ",q="/",Fs=/[^!$%&'*+\-.^_`|~\w]/g,zs=/[^!$%&'*+\-.^_`|~\w#]/g,pe="-",Ls=1024;function js(e){let t="";for(const s in e){const r=e[s];if(t.length+r.length+1<=Ls){t.length?t+=","+r:t+=r;continue}break}return t}const Hs=e=>(t,s)=>async r=>{const{request:n}=r;if(!xe.isInstance(n))return t(r);const{headers:o}=n,i=s?.userAgent?.map(H)||[],a=(await e.defaultUserAgentProvider()).map(H);await Us(s,e,r);const d=s;a.push(`m/${js(Object.assign({},s.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const c=e?.customUserAgent?.map(H)||[],u=await e.userAgentAppId();u&&a.push(H(["app",`${u}`]));const l=[].concat([...a,...i,...c]).join(me),f=[...a.filter(E=>E.startsWith("aws-sdk-")),...c].join(me);return e.runtime!=="browser"?(f&&(o[B]=o[B]?`${o[le]} ${f}`:f),o[le]=l):o[B]=l,t({...r,request:n})},H=e=>{const t=e[0].split(q).map(i=>i.replace(Fs,pe)).join(q),s=e[1]?.replace(zs,pe),r=t.indexOf(q),n=t.substring(0,r);let o=t.substring(r+1);return n==="api"&&(o=o.toLowerCase()),[n,o,s].filter(i=>i&&i.length>0).reduce((i,a,d)=>{switch(d){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},Vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Ws=e=>({applyToStack:t=>{t.add(Hs(e),Vs)}}),Ks=async(e,t,s)=>({operation:Et(t).operation,region:await Re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Bs(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function qs(e){return{schemeId:"smithy.api#noAuth"}}const Qs=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(qs());break}default:t.push(Bs(e))}return t},Gs=e=>Object.assign(e,{stsClientCtor:Ke}),Xs=e=>{const t=Gs(e),s=xs(t);return Object.assign(s,{authSchemePreference:Re(e.authSchemePreference??[])})},Js=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Ys={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"}},Zs="3.940.0",er={version:Zs},$e="required",m="type",p="fn",g="argv",k="ref",ge=!1,Q=!0,I="booleanEquals",S="stringEquals",Oe="sigv4",Ue="sts",Fe="us-east-1",y="endpoint",he="https://sts.{Region}.{PartitionResult#dnsSuffix}",_="tree",F="error",te="getAttr",fe={[$e]:!1,[m]:"string"},G={[$e]:!0,default:!1,[m]:"boolean"},ze={[k]:"Endpoint"},ye={[p]:"isSet",[g]:[{[k]:"Region"}]},w={[k]:"Region"},Ee={[p]:"aws.partition",[g]:[w],assign:"PartitionResult"},Le={[k]:"UseFIPS"},je={[k]:"UseDualStack"},b={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:Oe,signingName:Ue,signingRegion:Fe}]},headers:{}},T={},Se={conditions:[{[p]:S,[g]:[w,"aws-global"]}],[y]:b,[m]:y},He={[p]:I,[g]:[Le,!0]},Ve={[p]:I,[g]:[je,!0]},we={[p]:te,[g]:[{[k]:"PartitionResult"},"supportsFIPS"]},We={[k]:"PartitionResult"},be={[p]:I,[g]:[!0,{[p]:te,[g]:[We,"supportsDualStack"]}]},Te=[{[p]:"isSet",[g]:[ze]}],Pe=[He],Ae=[Ve],tr={parameters:{Region:fe,UseDualStack:G,UseFIPS:G,Endpoint:fe,UseGlobalEndpoint:G},rules:[{conditions:[{[p]:I,[g]:[{[k]:"UseGlobalEndpoint"},Q]},{[p]:"not",[g]:Te},ye,Ee,{[p]:I,[g]:[Le,ge]},{[p]:I,[g]:[je,ge]}],rules:[{conditions:[{[p]:S,[g]:[w,"ap-northeast-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"ap-south-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"ap-southeast-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"ap-southeast-2"]}],endpoint:b,[m]:y},Se,{conditions:[{[p]:S,[g]:[w,"ca-central-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-central-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-north-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-west-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-west-2"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-west-3"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"sa-east-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,Fe]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"us-east-2"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"us-west-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"us-west-2"]}],endpoint:b,[m]:y},{endpoint:{url:he,properties:{authSchemes:[{name:Oe,signingName:Ue,signingRegion:"{Region}"}]},headers:T},[m]:y}],[m]:_},{conditions:Te,rules:[{conditions:Pe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[m]:F},{conditions:Ae,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[m]:F},{endpoint:{url:ze,properties:T,headers:T},[m]:y}],[m]:_},{conditions:[ye],rules:[{conditions:[Ee],rules:[{conditions:[He,Ve],rules:[{conditions:[{[p]:I,[g]:[Q,we]},be],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:T,headers:T},[m]:y}],[m]:_},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[m]:F}],[m]:_},{conditions:Pe,rules:[{conditions:[{[p]:I,[g]:[we,Q]}],rules:[{conditions:[{[p]:S,[g]:[{[p]:te,[g]:[We,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:T,headers:T},[m]:y},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:T,headers:T},[m]:y}],[m]:_},{error:"FIPS is enabled but this partition does not support FIPS",[m]:F}],[m]:_},{conditions:Ae,rules:[{conditions:[be],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:T,headers:T},[m]:y}],[m]:_},{error:"DualStack is enabled but this partition does not support DualStack",[m]:F}],[m]:_},Se,{endpoint:{url:he,properties:T,headers:T},[m]:y}],[m]:_}],[m]:_},{error:"Invalid Configuration: Missing Region",[m]:F}]},sr=tr,rr=new St({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),nr=(e,t={})=>rr.get(e,()=>wt(sr,{endpointParams:e,logger:t.logger}));Tt.aws=bt;const or=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??X,base64Encoder:e?.base64Encoder??Ie,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??nr,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Qs,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Rs},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ct}],logger:e?.logger??new At,protocol:e?.protocol??new $s({defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15"}),serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??Pt,utf8Decoder:e?.utf8Decoder??as,utf8Encoder:e?.utf8Encoder??J}),ir=e=>{const t=_t(e),s=()=>t().then($t),r=or(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??vt,credentialDefaultProvider:e?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??kt({serviceId:r.serviceId,clientVersion:er.version}),maxAttempts:e?.maxAttempts??Dt,region:e?.region??It("Region is missing"),requestHandler:ds.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||xt),sha256:e?.sha256??Rt,streamCollector:e?.streamCollector??cs,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Mt)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Nt))}},ar=e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.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){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},cr=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),dr=(e,t)=>{const s=Object.assign(Ot(e),Ut(e),Ft(e),ar(e));return t.forEach(r=>r.configure(s)),Object.assign(e,zt(s),Lt(s),jt(s),cr(s))};class Ke extends Ht{config;constructor(...[t]){const s=ir(t||{});super(s),this.initConfig=s;const r=Js(s),n=Ps(r),o=Vt(n),i=Wt(o),a=es(i),d=Kt(a),c=Xs(d),u=dr(c,t?.extensions||[]);this.config=u,this.middlewareStack.use(Bt(this.config)),this.middlewareStack.use(Ws(this.config)),this.middlewareStack.use(qt(this.config)),this.middlewareStack.use(Qt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Xt(this.config)),this.middlewareStack.use(Jt(this.config)),this.middlewareStack.use(Yt(this.config,{httpAuthSchemeParametersProvider:Ks,identityProviderConfigProvider:async l=>new ts({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Zt(this.config))}destroy(){super.destroy()}}let v=class Be extends ss{constructor(t){super(t),Object.setPrototypeOf(this,Be.prototype)}},ur=class qe extends v{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,qe.prototype)}},lr=class Qe extends v{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,Qe.prototype)}},mr=class Ge extends v{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,Ge.prototype)}},pr=class Xe extends v{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,Xe.prototype)}},gr=class Je extends v{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,Je.prototype)}},hr=class Ye extends v{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Ye.prototype)}},fr=class Ze extends v{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,Ze.prototype)}};const yr="Arn",Er="AccessKeyId",Sr="AssumeRole",wr="AssumedRoleId",br="AssumeRoleRequest",Tr="AssumeRoleResponse",se="AssumedRoleUser",Pr="AssumeRoleWithWebIdentity",Ar="AssumeRoleWithWebIdentityRequest",Cr="AssumeRoleWithWebIdentityResponse",_r="Audience",re="Credentials",Rr="ContextAssertion",et="DurationSeconds",xr="Expiration",Ir="ExternalId",Dr="ExpiredTokenException",kr="IDPCommunicationErrorException",vr="IDPRejectedClaimException",Nr="InvalidIdentityTokenException",Mr="Key",$r="MalformedPolicyDocumentException",tt="Policy",st="PolicyArns",Or="ProviderArn",Ur="ProvidedContexts",Fr="ProvidedContextsListType",zr="ProvidedContext",Lr="PolicyDescriptorType",jr="ProviderId",rt="PackedPolicySize",Hr="PackedPolicyTooLargeException",Vr="Provider",nt="RoleArn",Wr="RegionDisabledException",ot="RoleSessionName",Kr="SecretAccessKey",Br="SubjectFromWebIdentityToken",ne="SourceIdentity",qr="SerialNumber",Qr="SessionToken",Gr="Tags",Xr="TokenCode",Jr="TransitiveTagKeys",Yr="Tag",Zr="Value",en="WebIdentityToken",tn="arn",sn="accessKeySecretType",N="awsQueryError",M="client",rn="clientTokenType",$="error",O="httpError",U="message",nn="policyDescriptorListType",it="smithy.ts.sdk.synthetic.com.amazonaws.sts",on="tagListType",h="com.amazonaws.sts";var an=[0,h,sn,8,0],cn=[0,h,rn,8,0],at=[3,h,se,0,[wr,yr],[0,0]],dn=[3,h,br,0,[nt,ot,st,tt,et,Gr,Jr,Ir,qr,Xr,ne,Ur],[0,0,()=>dt,0,1,()=>Cn,64,0,0,0,0,()=>An]],un=[3,h,Tr,0,[re,se,rt,ne],[[()=>ct,0],()=>at,1,0]],ln=[3,h,Ar,0,[nt,ot,en,jr,st,tt,et],[0,0,[()=>cn,0],0,()=>dt,0,1]],mn=[3,h,Cr,0,[re,Br,se,rt,Vr,_r,ne],[[()=>ct,0],0,()=>at,1,0,0,0]],ct=[3,h,re,0,[Er,Kr,Qr,xr],[0,[()=>an,0],0,4]],pn=[-3,h,Dr,{[$]:M,[O]:400,[N]:["ExpiredTokenException",400]},[U],[0]];A.for(h).registerError(pn,ur);var gn=[-3,h,kr,{[$]:M,[O]:400,[N]:["IDPCommunicationError",400]},[U],[0]];A.for(h).registerError(gn,fr);var hn=[-3,h,vr,{[$]:M,[O]:403,[N]:["IDPRejectedClaim",403]},[U],[0]];A.for(h).registerError(hn,gr);var fn=[-3,h,Nr,{[$]:M,[O]:400,[N]:["InvalidIdentityToken",400]},[U],[0]];A.for(h).registerError(fn,hr);var yn=[-3,h,$r,{[$]:M,[O]:400,[N]:["MalformedPolicyDocument",400]},[U],[0]];A.for(h).registerError(yn,lr);var En=[-3,h,Hr,{[$]:M,[O]:400,[N]:["PackedPolicyTooLarge",400]},[U],[0]];A.for(h).registerError(En,mr);var Sn=[3,h,Lr,0,[tn],[0]],wn=[3,h,zr,0,[Or,Rr],[0,0]],bn=[-3,h,Wr,{[$]:M,[O]:403,[N]:["RegionDisabledException",403]},[U],[0]];A.for(h).registerError(bn,pr);var Tn=[3,h,Yr,0,[Mr,Zr],[0,0]],Pn=[-3,it,"STSServiceException",0,[],[]];A.for(it).registerError(Pn,v);var dt=[1,h,nn,0,()=>Sn],An=[1,h,Fr,0,()=>wn],Cn=[1,h,on,0,()=>Tn],_n=[9,h,Sr,0,()=>dn,()=>un],Dn=[9,h,Pr,0,()=>ln,()=>mn];class Rn extends rs.classBuilder().ep(Ys).m(function(t,s,r,n){return[ns(r,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(_n).build(){}const kn=Object.freeze(Object.defineProperty({__proto__:null,AssumeRoleCommand:Rn,STSClient:Ke},Symbol.toStringTag,{value:"Module"}));export{Dn as A,ur as E,gr as I,lr as M,mr as P,pr as R,Ke as S,v as a,Rn as b,Ys as c,hr as d,fr as e,kn as l,As as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o}from"./index-Blq0zS4y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./preload-helper-BlTxHScW.js";import"./__vite-browser-external-DJy8wZt7.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-6mKfgpcs-DsgiI2lM.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"./index-D1jV2j2Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-DIt05veo.js";import"./inherits_browser-5Fj3Mjxs.js";export{o as default};
|