@agentlang/lstudio 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/assets/_commonjs-dynamic-modules-DkOKMH7F.js +1 -0
  2. package/assets/_commonjsHelpers-B4e78b8K-W3E8ocG7.js +1 -0
  3. package/assets/index--s9Eldt5.js +1 -0
  4. package/assets/index-69shuAsh-DF18H7zf.js +1 -0
  5. package/assets/index-B1uC6UFQ.js +21984 -0
  6. package/assets/{index-CoCLR6CX.js → index-BFv-M3PX.js} +5 -5
  7. package/assets/{index-D3JO_TBD-DrqEk_TF.js → index-BJBOx-Z---hbiLl7B.js} +3 -3
  8. package/assets/index-BXMy9UIl.js +1 -0
  9. package/assets/{index-DlfdnOJV.js → index-BitrXVkV.js} +1 -1
  10. package/assets/index-Bto-kj6R-C0A_3Pwb.js +1 -0
  11. package/assets/index-CRGCpk5T.js +1 -0
  12. package/assets/{index-JiKw9JSs.js → index-ChvoNxcO.js} +1 -1
  13. package/assets/{index-CSAsH4Cj-CNgNYeys.js → index-D4z_hbl0-CnvKJFzI.js} +8 -8
  14. package/assets/index-DSosZ5sh-Ceejs_jv.js +1 -0
  15. package/assets/index-DTNuphFO-Bf5Ad1xs.js +17 -0
  16. package/assets/{index-BdxSFemm-BKC3Ptjg.js → index-DYmn2gQ6-CnjFa625.js} +1 -1
  17. package/assets/index-DsIu-45t-Bejjlpz4.js +6 -0
  18. package/assets/{index-KGBiLwKE-Kc8k70rJ.js → index-KGBiLwKE-Doz2tX9S.js} +4 -4
  19. package/assets/index-YRAb8XBa.js +1 -0
  20. package/assets/{index-CbTQ5dVq.js → index-p80zQUD2.js} +1 -1
  21. package/assets/index-rTTNJgoD.css +1 -0
  22. package/assets/index.browser-CYbR8BA1.js +6 -0
  23. package/assets/inherits_browser-nmOknR35-Bp0mvRSL.js +1 -0
  24. package/assets/loadCognitoIdentity-E_fY_3TJ.js +1 -0
  25. package/assets/loadSts-C4l6vs0V.js +1 -0
  26. package/assets/{normalizeProvider-EC8cbfMc.js → normalizeProvider-CtDY37Q6.js} +1 -1
  27. package/assets/replService-BJ7jMWR-.js +1 -0
  28. package/assets/resolveDefaultsModeConfig-Bt4sfKob.js +15 -0
  29. package/assets/util-CNqBjtt6-GUXK7Yxz.js +10 -0
  30. package/assets/util-Cr5qx-JB.js +10 -0
  31. package/assets/util-DZRIOW0Z-CproX86h.js +1 -0
  32. package/assets/winston-1qzyIKCb-DL1YEXb3.js +37 -0
  33. package/assets/winston-Bo7SUrrT.js +37 -0
  34. package/assets/winston-CtxF18qc-CAV82HbO.js +1 -0
  35. package/assets/{winston-CPWYjGTE.js → winston-dZFS_1to.js} +1 -1
  36. package/index.html +11 -9
  37. package/package.json +1 -1
  38. package/assets/AwsJson1_1Protocol-DdIGyZVw.js +0 -1
  39. package/assets/index-B3X6Xu-W.js +0 -1
  40. package/assets/index-BEhtjPxy-CBgP3wC4.js +0 -1
  41. package/assets/index-BjQNf7Nf.js +0 -15
  42. package/assets/index-Br2Hgz2q.js +0 -1
  43. package/assets/index-ClUL-R5x.js +0 -1
  44. package/assets/index-DB9kJcqZ.js +0 -5166
  45. package/assets/index-DSosZ5sh-_5CimrqR.js +0 -1
  46. package/assets/index-DzMfgnJU.css +0 -1
  47. package/assets/index-ZTnKX8xy-BNOF_2FA.js +0 -16952
  48. package/assets/index-mwiGaNy1-DKNEoPya.js +0 -17
  49. package/assets/index-q0DdgLUs.js +0 -1
  50. package/assets/index.browser-ClkxIF_a.js +0 -6
  51. package/assets/inherits_browser-SFmLU6iN-Bpg6Btaw.js +0 -6
  52. package/assets/loadCognitoIdentity-D3DCDtA_.js +0 -1
  53. package/assets/loadSts-De9MppCU.js +0 -1
  54. package/assets/replService-3_Zm3_kc.js +0 -1
  55. package/assets/util-COkob34j-BZ2TtJP8.js +0 -10
  56. package/assets/util-CsY--ROm-CHWqg22i.js +0 -1
  57. package/assets/winston-BSc_Rh2n-BqL-578K.js +0 -46
  58. package/assets/winston-C_b7Zy4p.js +0 -46
  59. package/assets/winston-tM2NjUgP-Cgaf-Nmz.js +0 -1
@@ -1,7 +1,7 @@
1
- import{l as Pe,I as xt,k as Nt,u as Le}from"./index-DSosZ5sh-_5CimrqR.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";/*!
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
2
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
- */var qn=(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}/*!
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
5
  * The buffer module from node.js, for the browser.
6
6
  *
7
7
  * @author Feross Aboukhadijeh <http://feross.org>
@@ -49,10 +49,10 @@ PERFORMANCE OF THIS SOFTWARE.
49
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
50
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
51
51
  * SPDX-License-Identifier: Apache-2.0
52
- */var Mn=55,jn=(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:{}};/*!
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
53
  * JavaScript Cookie v2.2.1
54
54
  * https://github.com/js-cookie/js-cookie
55
55
  *
56
56
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
57
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{qn as AuthenticationDetails,$ as AuthenticationHelper,st as CognitoAccessToken,ot as CognitoIdToken,at as CognitoRefreshToken,ht as CognitoUser,An as CognitoUserAttribute,jn as CognitoUserPool,ut as CognitoUserSession,ft as DateHelper,Ht as WordArray};
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
+ import{r as Pe,a as ye,A as Ae,b as ve,c as Ie,g as Re,d as Ce,e as xe,k as De,f as be,h as _e,i as Te,j as ke,s as N}from"./index-CRGCpk5T.js";import{n as ee,k as we,E as We,r as $e,c as Ue,p as He,l as Fe,o as Oe,q as Le,s as je,D as Me,t as Ne,u as Ke,w as qe,x as ze,y as Ge,z as Ve,A as Be,B as Qe,C as Je,F as Xe,G as Ye,H as Ze,I as et,J as tt,K as nt,M as ot,O as st,P as it,U as rt,Q as at,V as ct,T as P,W as dt,X as lt}from"./resolveDefaultsModeConfig-Bt4sfKob.js";import{b as ut,i as pt,t as mt,f as gt,s as ht,F as ft}from"./normalizeProvider-CtDY37Q6.js";import"./preload-helper-BlTxHScW.js";import"./index-B1uC6UFQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";function St(){return async()=>"us-east-1"}const Et=async(e,t,i)=>({operation:we(t).operation,region:await ee(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Pt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,i)=>({signingProperties:{config:t,context:i}})}}function yt(e){return{schemeId:"smithy.api#noAuth"}}const At=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(yt());break}default:t.push(Pt(e))}return t},vt=e=>Object.assign(e,{stsClientCtor:ue}),It=e=>{const t=vt(e),i=Pe(t);return Object.assign(i,{authSchemePreference:ee(e.authSchemePreference??[])})},Rt=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Ct={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"}},xt="3.974.0",Dt={version:xt},te="required",n="type",o="fn",s="argv",y="ref",K=!1,w=!0,E="booleanEquals",l="stringEquals",ne="sigv4",oe="sts",se="us-east-1",a="endpoint",q="https://sts.{Region}.{PartitionResult#dnsSuffix}",h="tree",D="error",$="getAttr",z={[te]:!1,[n]:"string"},W={[te]:!0,default:!1,[n]:"boolean"},ie={[y]:"Endpoint"},G={[o]:"isSet",[s]:[{[y]:"Region"}]},u={[y]:"Region"},V={[o]:"aws.partition",[s]:[u],assign:"PartitionResult"},re={[y]:"UseFIPS"},ae={[y]:"UseDualStack"},p={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:ne,signingName:oe,signingRegion:se}]},headers:{}},m={},B={conditions:[{[o]:l,[s]:[u,"aws-global"]}],[a]:p,[n]:a},ce={[o]:E,[s]:[re,!0]},de={[o]:E,[s]:[ae,!0]},Q={[o]:$,[s]:[{[y]:"PartitionResult"},"supportsFIPS"]},le={[y]:"PartitionResult"},J={[o]:E,[s]:[!0,{[o]:$,[s]:[le,"supportsDualStack"]}]},X=[{[o]:"isSet",[s]:[ie]}],Y=[ce],Z=[de],bt={parameters:{Region:z,UseDualStack:W,UseFIPS:W,Endpoint:z,UseGlobalEndpoint:W},rules:[{conditions:[{[o]:E,[s]:[{[y]:"UseGlobalEndpoint"},w]},{[o]:"not",[s]:X},G,V,{[o]:E,[s]:[re,K]},{[o]:E,[s]:[ae,K]}],rules:[{conditions:[{[o]:l,[s]:[u,"ap-northeast-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"ap-south-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"ap-southeast-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"ap-southeast-2"]}],endpoint:p,[n]:a},B,{conditions:[{[o]:l,[s]:[u,"ca-central-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-central-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-north-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-west-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-west-2"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-west-3"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"sa-east-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,se]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"us-east-2"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"us-west-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"us-west-2"]}],endpoint:p,[n]:a},{endpoint:{url:q,properties:{authSchemes:[{name:ne,signingName:oe,signingRegion:"{Region}"}]},headers:m},[n]:a}],[n]:h},{conditions:X,rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[n]:D},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[n]:D},{endpoint:{url:ie,properties:m,headers:m},[n]:a}],[n]:h},{conditions:[G],rules:[{conditions:[V],rules:[{conditions:[ce,de],rules:[{conditions:[{[o]:E,[s]:[w,Q]},J],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},[n]:a}],[n]:h},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[n]:D}],[n]:h},{conditions:Y,rules:[{conditions:[{[o]:E,[s]:[Q,w]}],rules:[{conditions:[{[o]:l,[s]:[{[o]:$,[s]:[le,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:m,headers:m},[n]:a},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},[n]:a}],[n]:h},{error:"FIPS is enabled but this partition does not support FIPS",[n]:D}],[n]:h},{conditions:Z,rules:[{conditions:[J],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},[n]:a}],[n]:h},{error:"DualStack is enabled but this partition does not support DualStack",[n]:D}],[n]:h},B,{endpoint:{url:q,properties:m,headers:m},[n]:a}],[n]:h}],[n]:h},{error:"Invalid Configuration: Missing Region",[n]:D}]},_t=bt,Tt=new We({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),kt=(e,t={})=>Tt.get(e,()=>$e(_t,{endpointParams:e,logger:t.logger}));Ue.aws=ye;const wt=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??gt,base64Encoder:e?.base64Encoder??mt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??kt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??At,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new ve},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Oe}],logger:e?.logger??new Fe,protocol:e?.protocol??Ae,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??He,utf8Decoder:e?.utf8Decoder??pt,utf8Encoder:e?.utf8Encoder??ut}),Wt=e=>{const t=Le(e),i=()=>t().then(Ve),d=wt(e);return{...d,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qe,credentialDefaultProvider:e?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Ie({serviceId:d.serviceId,clientVersion:Dt.version}),maxAttempts:e?.maxAttempts??Ke,region:e?.region??Ne("Region is missing"),requestHandler:ft.create(e?.requestHandler??i),retryMode:e?.retryMode??(async()=>(await i()).retryMode||Me),sha256:e?.sha256??je,streamCollector:e?.streamCollector??ht,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ge)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(ze))}},$t=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,d=e.credentials;return{setHttpAuthScheme(r){const S=t.findIndex(g=>g.schemeId===r.schemeId);S===-1?t.push(r):t.splice(S,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){i=r},httpAuthSchemeProvider(){return i},setCredentials(r){d=r},credentials(){return d}}},Ut=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Ht=(e,t)=>{const i=Object.assign(Re(e),Be(e),Qe(e),$t(e));return t.forEach(d=>d.configure(i)),Object.assign(e,Ce(i),Je(i),Xe(i),Ut(i))};class ue extends Ye{config;constructor(...[t]){const i=Wt(t||{});super(i),this.initConfig=i;const d=Rt(i),r=xe(d),S=Ze(r),g=et(S),A=De(g),_=tt(A),T=It(_),k=Ht(T,t?.extensions||[]);this.config=k,this.middlewareStack.use(nt(this.config)),this.middlewareStack.use(be(this.config)),this.middlewareStack.use(ot(this.config)),this.middlewareStack.use(st(this.config)),this.middlewareStack.use(_e(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(ke(this.config)),this.middlewareStack.use(it(this.config,{httpAuthSchemeParametersProvider:Et,identityProviderConfigProvider:async b=>new rt({"aws.auth#sigv4":b.credentials})})),this.middlewareStack.use(at(this.config))}destroy(){super.destroy()}}class f extends ct{constructor(t){super(t),Object.setPrototypeOf(this,f.prototype)}}class U extends f{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,U.prototype)}}class H extends f{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,H.prototype)}}class F extends f{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,F.prototype)}}class O extends f{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,O.prototype)}}class L extends f{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,L.prototype)}}class j extends f{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,j.prototype)}}class M extends f{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,M.prototype)}}const Ft="Arn",Ot="AccessKeyId",Lt="AssumedRoleId",pe="AssumedRoleUser",jt="AssumeRoleWithWebIdentity",Mt="AssumeRoleWithWebIdentityRequest",Nt="AssumeRoleWithWebIdentityResponse",Kt="Audience",me="Credentials",qt="DurationSeconds",zt="Expiration",Gt="ExpiredTokenException",Vt="IDPCommunicationErrorException",Bt="IDPRejectedClaimException",Qt="InvalidIdentityTokenException",Jt="MalformedPolicyDocumentException",Xt="Policy",Yt="PolicyArns",Zt="PolicyDescriptorType",en="ProviderId",tn="PackedPolicySize",nn="PackedPolicyTooLargeException",on="Provider",sn="RoleArn",rn="RegionDisabledException",an="RoleSessionName",cn="SecretAccessKey",dn="SubjectFromWebIdentityToken",ln="SourceIdentity",un="SessionToken",pn="WebIdentityToken",mn="arn",gn="accessKeySecretType",v="awsQueryError",I="client",hn="clientTokenType",R="error",C="httpError",x="message",fn="policyDescriptorListType",ge="smithy.ts.sdk.synthetic.com.amazonaws.sts",c="com.amazonaws.sts";var Sn=[0,c,gn,8,0],En=[0,c,hn,8,0],Pn=[3,c,pe,0,[Lt,Ft],[0,0],2],yn=[3,c,Mt,0,[sn,an,pn,en,Yt,Xt,qt],[0,0,[()=>En,0],0,()=>wn,0,1],3],An=[3,c,Nt,0,[me,dn,pe,tn,on,Kt,ln],[[()=>vn,0],0,()=>Pn,1,0,0,0]],vn=[3,c,me,0,[Ot,cn,un,zt],[0,[()=>Sn,0],0,4],4],In=[-3,c,Gt,{[v]:["ExpiredTokenException",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(In,U);var Rn=[-3,c,Vt,{[v]:["IDPCommunicationError",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(Rn,M);var Cn=[-3,c,Bt,{[v]:["IDPRejectedClaim",403],[R]:I,[C]:403},[x],[0]];P.for(c).registerError(Cn,L);var xn=[-3,c,Qt,{[v]:["InvalidIdentityToken",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(xn,j);var Dn=[-3,c,Jt,{[v]:["MalformedPolicyDocument",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(Dn,H);var bn=[-3,c,nn,{[v]:["PackedPolicyTooLarge",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(bn,F);var _n=[3,c,Zt,0,[mn],[0]],Tn=[-3,c,rn,{[v]:["RegionDisabledException",403],[R]:I,[C]:403},[x],[0]];P.for(c).registerError(Tn,O);var kn=[-3,ge,"STSServiceException",0,[],[]];P.for(ge).registerError(kn,f);var wn=[1,c,fn,0,()=>_n],Wn=[9,c,jt,0,()=>yn,()=>An];class $n extends dt.classBuilder().ep(Ct).m(function(t,i,d,r){return[lt(d,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(Wn).build(){}const Un=e=>{if(typeof e?.Arn=="string"){const t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},Hn=async(e,t,i,d={})=>{const r=typeof e=="function"?await e():e,S=typeof t=="function"?await t():t;let g="";const A=r??S??(g=await St()());return i?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${r} (credential provider clientConfig)`,`${S} (contextual client)`,`${g} (STS default: AWS_REGION, profile region, or us-east-1)`),A},Fn=(e,t)=>{let i;return async d=>{if(!i){const{logger:_=e?.parentClientConfig?.logger,profile:T=e?.parentClientConfig?.profile,region:k,requestHandler:b=e?.parentClientConfig?.requestHandler,credentialProviderLogger:he,userAgentAppId:fe=e?.parentClientConfig?.userAgentAppId}=e,Se=await Hn(k,e?.parentClientConfig?.region,he,{}),Ee=!On(b);i=new t({...e,userAgentAppId:fe,profile:T,region:Se,requestHandler:Ee?b:void 0,logger:_})}const{Credentials:r,AssumedRoleUser:S}=await i.send(new $n(d));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${d.RoleArn}`);const g=Un(S),A={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...g&&{accountId:g}};return g&&N(A,"RESOLVED_ACCOUNT_ID","T"),N(A,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),A}},On=e=>e?.metadata?.handlerProtocol==="h2",Ln=(e,t)=>t?class extends e{constructor(d){super(d);for(const r of t)this.middlewareStack.use(r)}}:e,io=(e={},t)=>Fn(e,Ln(ue,t));export{dt as $Command,Wn as AssumeRoleWithWebIdentity$,$n as AssumeRoleWithWebIdentityCommand,yn as AssumeRoleWithWebIdentityRequest$,An as AssumeRoleWithWebIdentityResponse$,Pn as AssumedRoleUser$,vn as Credentials$,U as ExpiredTokenException,In as ExpiredTokenException$,M as IDPCommunicationErrorException,Rn as IDPCommunicationErrorException$,L as IDPRejectedClaimException,Cn as IDPRejectedClaimException$,j as InvalidIdentityTokenException,xn as InvalidIdentityTokenException$,H as MalformedPolicyDocumentException,Dn as MalformedPolicyDocumentException$,F as PackedPolicyTooLargeException,bn as PackedPolicyTooLargeException$,_n as PolicyDescriptorType$,O as RegionDisabledException,Tn as RegionDisabledException$,ue as STSClient,f as STSServiceException,kn as STSServiceException$,Ye as __Client,io as getDefaultRoleAssumerWithWebIdentity};
@@ -1,4 +1,4 @@
1
- import{a as On,g as Tn}from"./_commonjsHelpers-D6-XlEtG.js";import{a as En,b as Fr,c as Nn,d as In,r as An}from"./winston-C_b7Zy4p.js";import{a as Pe}from"./index-DB9kJcqZ.js";import{c as it}from"./index-B3X6Xu-W.js";function Fn(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(n,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Ut={exports:{}},Dr;function Rn(){return Dr||(Dr=1,(function(e,t){(function(r){e.exports=r()})(function(){return(function r(n,s,u){function g(L,j){if(!s[L]){if(!n[L]){var ee=typeof it=="function"&&it;if(!j&&ee)return ee(L,!0);if(T)return T(L,!0);throw new Error("Cannot find module '"+L+"'")}j=s[L]={exports:{}},n[L][0].call(j.exports,function(k){var Q=n[L][1][k];return g(Q||k)},j,j.exports,r,n,s,u)}return s[L].exports}for(var T=typeof it=="function"&&it,F=0;F<u.length;F++)g(u[F]);return g})({1:[function(r,n,s){(function(u,g,T,F,L,j,ee,k,Q){var M=r("crypto");function _(c,w){w=v(c,w);var o;return(o=w.algorithm!=="passthrough"?M.createHash(w.algorithm):new D).write===void 0&&(o.write=o.update,o.end=o.update),b(w,o).dispatch(c),o.update||o.end(""),o.digest?o.digest(w.encoding==="buffer"?void 0:w.encoding):(c=o.read(),w.encoding!=="buffer"?c.toString(w.encoding):c)}(s=n.exports=_).sha1=function(c){return _(c)},s.keys=function(c){return _(c,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},s.MD5=function(c){return _(c,{algorithm:"md5",encoding:"hex"})},s.keysMD5=function(c){return _(c,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var d=M.getHashes?M.getHashes().slice():["sha1","md5"],m=(d.push("passthrough"),["buffer","hex","binary","base64"]);function v(c,w){var o={};if(o.algorithm=(w=w||{}).algorithm||"sha1",o.encoding=w.encoding||"hex",o.excludeValues=!!w.excludeValues,o.algorithm=o.algorithm.toLowerCase(),o.encoding=o.encoding.toLowerCase(),o.ignoreUnknown=w.ignoreUnknown===!0,o.respectType=w.respectType!==!1,o.respectFunctionNames=w.respectFunctionNames!==!1,o.respectFunctionProperties=w.respectFunctionProperties!==!1,o.unorderedArrays=w.unorderedArrays===!0,o.unorderedSets=w.unorderedSets!==!1,o.unorderedObjects=w.unorderedObjects!==!1,o.replacer=w.replacer||void 0,o.excludeKeys=w.excludeKeys||void 0,c===void 0)throw new Error("Object argument required.");for(var f=0;f<d.length;++f)d[f].toLowerCase()===o.algorithm.toLowerCase()&&(o.algorithm=d[f]);if(d.indexOf(o.algorithm)===-1)throw new Error('Algorithm "'+o.algorithm+'" not supported. supported values: '+d.join(", "));if(m.indexOf(o.encoding)===-1&&o.algorithm!=="passthrough")throw new Error('Encoding "'+o.encoding+'" not supported. supported values: '+m.join(", "));return o}function S(c){if(typeof c=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(c))!=null}function b(c,w,o){o=o||[];function f(a){return w.update?w.update(a,"utf8"):w.write(a,"utf8")}return{dispatch:function(a){return this["_"+((a=c.replacer?c.replacer(a):a)===null?"null":typeof a)](a)},_object:function(a){var y,p=Object.prototype.toString.call(a),P=/\[object (.*)\]/i.exec(p);if(P=(P=P?P[1]:"unknown:["+p+"]").toLowerCase(),0<=(p=o.indexOf(a)))return this.dispatch("[CIRCULAR:"+p+"]");if(o.push(a),T!==void 0&&T.isBuffer&&T.isBuffer(a))return f("buffer:"),f(a);if(P==="object"||P==="function"||P==="asyncfunction")return p=Object.keys(a),c.unorderedObjects&&(p=p.sort()),c.respectType===!1||S(a)||p.splice(0,0,"prototype","__proto__","constructor"),c.excludeKeys&&(p=p.filter(function(U){return!c.excludeKeys(U)})),f("object:"+p.length+":"),y=this,p.forEach(function(U){y.dispatch(U),f(":"),c.excludeValues||y.dispatch(a[U]),f(",")});if(!this["_"+P]){if(c.ignoreUnknown)return f("["+P+"]");throw new Error('Unknown object type "'+P+'"')}this["_"+P](a)},_array:function(a,U){U=U!==void 0?U:c.unorderedArrays!==!1;var p=this;if(f("array:"+a.length+":"),!U||a.length<=1)return a.forEach(function(C){return p.dispatch(C)});var P=[],U=a.map(function(C){var R=new D,B=o.slice();return b(c,R,B).dispatch(C),P=P.concat(B.slice(o.length)),R.read().toString()});return o=o.concat(P),U.sort(),this._array(U,!1)},_date:function(a){return f("date:"+a.toJSON())},_symbol:function(a){return f("symbol:"+a.toString())},_error:function(a){return f("error:"+a.toString())},_boolean:function(a){return f("bool:"+a.toString())},_string:function(a){f("string:"+a.length+":"),f(a.toString())},_function:function(a){f("fn:"),S(a)?this.dispatch("[native]"):this.dispatch(a.toString()),c.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(a.name)),c.respectFunctionProperties&&this._object(a)},_number:function(a){return f("number:"+a.toString())},_xml:function(a){return f("xml:"+a.toString())},_null:function(){return f("Null")},_undefined:function(){return f("Undefined")},_regexp:function(a){return f("regex:"+a.toString())},_uint8array:function(a){return f("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return f("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return f("int8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return f("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return f("int16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return f("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return f("int32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return f("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return f("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return f("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return f("url:"+a.toString())},_map:function(a){return f("map:"),a=Array.from(a),this._array(a,c.unorderedSets!==!1)},_set:function(a){return f("set:"),a=Array.from(a),this._array(a,c.unorderedSets!==!1)},_file:function(a){return f("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(c.ignoreUnknown)return f("[blob]");throw Error(`Hashing Blob objects is currently not supported
1
+ import{a as On,g as Tn}from"./_commonjsHelpers-D6-XlEtG.js";import{r as En,a as Nn,b as In,c as An}from"./winston-Bo7SUrrT.js";import{c as it,b as Pe}from"./_commonjs-dynamic-modules-DkOKMH7F.js";import{r as Fr}from"./util-Cr5qx-JB.js";function Fn(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(n,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Ut={exports:{}},Dr;function Rn(){return Dr||(Dr=1,(function(e,t){(function(r){e.exports=r()})(function(){return(function r(n,s,u){function g(L,j){if(!s[L]){if(!n[L]){var ee=typeof it=="function"&&it;if(!j&&ee)return ee(L,!0);if(T)return T(L,!0);throw new Error("Cannot find module '"+L+"'")}j=s[L]={exports:{}},n[L][0].call(j.exports,function(k){var Q=n[L][1][k];return g(Q||k)},j,j.exports,r,n,s,u)}return s[L].exports}for(var T=typeof it=="function"&&it,F=0;F<u.length;F++)g(u[F]);return g})({1:[function(r,n,s){(function(u,g,T,F,L,j,ee,k,Q){var M=r("crypto");function _(c,w){w=v(c,w);var o;return(o=w.algorithm!=="passthrough"?M.createHash(w.algorithm):new D).write===void 0&&(o.write=o.update,o.end=o.update),b(w,o).dispatch(c),o.update||o.end(""),o.digest?o.digest(w.encoding==="buffer"?void 0:w.encoding):(c=o.read(),w.encoding!=="buffer"?c.toString(w.encoding):c)}(s=n.exports=_).sha1=function(c){return _(c)},s.keys=function(c){return _(c,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},s.MD5=function(c){return _(c,{algorithm:"md5",encoding:"hex"})},s.keysMD5=function(c){return _(c,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var d=M.getHashes?M.getHashes().slice():["sha1","md5"],m=(d.push("passthrough"),["buffer","hex","binary","base64"]);function v(c,w){var o={};if(o.algorithm=(w=w||{}).algorithm||"sha1",o.encoding=w.encoding||"hex",o.excludeValues=!!w.excludeValues,o.algorithm=o.algorithm.toLowerCase(),o.encoding=o.encoding.toLowerCase(),o.ignoreUnknown=w.ignoreUnknown===!0,o.respectType=w.respectType!==!1,o.respectFunctionNames=w.respectFunctionNames!==!1,o.respectFunctionProperties=w.respectFunctionProperties!==!1,o.unorderedArrays=w.unorderedArrays===!0,o.unorderedSets=w.unorderedSets!==!1,o.unorderedObjects=w.unorderedObjects!==!1,o.replacer=w.replacer||void 0,o.excludeKeys=w.excludeKeys||void 0,c===void 0)throw new Error("Object argument required.");for(var f=0;f<d.length;++f)d[f].toLowerCase()===o.algorithm.toLowerCase()&&(o.algorithm=d[f]);if(d.indexOf(o.algorithm)===-1)throw new Error('Algorithm "'+o.algorithm+'" not supported. supported values: '+d.join(", "));if(m.indexOf(o.encoding)===-1&&o.algorithm!=="passthrough")throw new Error('Encoding "'+o.encoding+'" not supported. supported values: '+m.join(", "));return o}function S(c){if(typeof c=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(c))!=null}function b(c,w,o){o=o||[];function f(a){return w.update?w.update(a,"utf8"):w.write(a,"utf8")}return{dispatch:function(a){return this["_"+((a=c.replacer?c.replacer(a):a)===null?"null":typeof a)](a)},_object:function(a){var y,p=Object.prototype.toString.call(a),P=/\[object (.*)\]/i.exec(p);if(P=(P=P?P[1]:"unknown:["+p+"]").toLowerCase(),0<=(p=o.indexOf(a)))return this.dispatch("[CIRCULAR:"+p+"]");if(o.push(a),T!==void 0&&T.isBuffer&&T.isBuffer(a))return f("buffer:"),f(a);if(P==="object"||P==="function"||P==="asyncfunction")return p=Object.keys(a),c.unorderedObjects&&(p=p.sort()),c.respectType===!1||S(a)||p.splice(0,0,"prototype","__proto__","constructor"),c.excludeKeys&&(p=p.filter(function(U){return!c.excludeKeys(U)})),f("object:"+p.length+":"),y=this,p.forEach(function(U){y.dispatch(U),f(":"),c.excludeValues||y.dispatch(a[U]),f(",")});if(!this["_"+P]){if(c.ignoreUnknown)return f("["+P+"]");throw new Error('Unknown object type "'+P+'"')}this["_"+P](a)},_array:function(a,U){U=U!==void 0?U:c.unorderedArrays!==!1;var p=this;if(f("array:"+a.length+":"),!U||a.length<=1)return a.forEach(function(C){return p.dispatch(C)});var P=[],U=a.map(function(C){var R=new D,B=o.slice();return b(c,R,B).dispatch(C),P=P.concat(B.slice(o.length)),R.read().toString()});return o=o.concat(P),U.sort(),this._array(U,!1)},_date:function(a){return f("date:"+a.toJSON())},_symbol:function(a){return f("symbol:"+a.toString())},_error:function(a){return f("error:"+a.toString())},_boolean:function(a){return f("bool:"+a.toString())},_string:function(a){f("string:"+a.length+":"),f(a.toString())},_function:function(a){f("fn:"),S(a)?this.dispatch("[native]"):this.dispatch(a.toString()),c.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(a.name)),c.respectFunctionProperties&&this._object(a)},_number:function(a){return f("number:"+a.toString())},_xml:function(a){return f("xml:"+a.toString())},_null:function(){return f("Null")},_undefined:function(){return f("Undefined")},_regexp:function(a){return f("regex:"+a.toString())},_uint8array:function(a){return f("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return f("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return f("int8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return f("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return f("int16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return f("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return f("int32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return f("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return f("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return f("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return f("url:"+a.toString())},_map:function(a){return f("map:"),a=Array.from(a),this._array(a,c.unorderedSets!==!1)},_set:function(a){return f("set:"),a=Array.from(a),this._array(a,c.unorderedSets!==!1)},_file:function(a){return f("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(c.ignoreUnknown)return f("[blob]");throw Error(`Hashing Blob objects is currently not supported
2
2
  (see https://github.com/puleos/object-hash/issues/26)
3
3
  Use "options.replacer" or "options.ignoreUnknown"
4
4
  `)},_domwindow:function(){return f("domwindow")},_bigint:function(a){return f("bigint:"+a.toString())},_process:function(){return f("process")},_timer:function(){return f("timer")},_pipe:function(){return f("pipe")},_tcp:function(){return f("tcp")},_udp:function(){return f("udp")},_tty:function(){return f("tty")},_statwatcher:function(){return f("statwatcher")},_securecontext:function(){return f("securecontext")},_connection:function(){return f("connection")},_zlib:function(){return f("zlib")},_context:function(){return f("context")},_nodescript:function(){return f("nodescript")},_httpparser:function(){return f("httpparser")},_dataview:function(){return f("dataview")},_signal:function(){return f("signal")},_fsevent:function(){return f("fsevent")},_tlswrap:function(){return f("tlswrap")}}}function D(){return{buf:"",write:function(c){this.buf+=c},end:function(c){this.buf+=c},read:function(){return this.buf}}}s.writeToStream=function(c,w,o){return o===void 0&&(o=w,w={}),b(w=v(c,w),o).dispatch(c)}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(r,n,s){(function(u,g,T,F,L,j,ee,k,Q){(function(M){var _=typeof Uint8Array<"u"?Uint8Array:Array,d=43,m=47,v=48,S=97,b=65,D=45,c=95;function w(o){return o=o.charCodeAt(0),o===d||o===D?62:o===m||o===c?63:o<v?-1:o<v+10?o-v+26+26:o<b+26?o-b:o<S+26?o-S+26:void 0}M.toByteArray=function(o){var f,a;if(0<o.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var y=o.length,y=o.charAt(y-2)==="="?2:o.charAt(y-1)==="="?1:0,p=new _(3*o.length/4-y),P=0<y?o.length-4:o.length,U=0;function C(R){p[U++]=R}for(f=0;f<P;f+=4,0)C((16711680&(a=w(o.charAt(f))<<18|w(o.charAt(f+1))<<12|w(o.charAt(f+2))<<6|w(o.charAt(f+3))))>>16),C((65280&a)>>8),C(255&a);return y==2?C(255&(a=w(o.charAt(f))<<2|w(o.charAt(f+1))>>4)):y==1&&(C((a=w(o.charAt(f))<<10|w(o.charAt(f+1))<<4|w(o.charAt(f+2))>>2)>>8&255),C(255&a)),p},M.fromByteArray=function(o){var f,a,y,p,P=o.length%3,U="";function C(R){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R)}for(f=0,y=o.length-P;f<y;f+=3)a=(o[f]<<16)+(o[f+1]<<8)+o[f+2],U+=C((p=a)>>18&63)+C(p>>12&63)+C(p>>6&63)+C(63&p);switch(P){case 1:U=(U+=C((a=o[o.length-1])>>2))+C(a<<4&63)+"==";break;case 2:U=(U=(U+=C((a=(o[o.length-2]<<8)+o[o.length-1])>>10))+C(a>>4&63))+C(a<<2&63)+"="}return U}})(s===void 0?this.base64js={}:s)}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(r,n,s){(function(u,g,d,F,L,j,ee,k,Q){var M=r("base64-js"),_=r("ieee754");function d(i,l,h){if(!(this instanceof d))return new d(i,l,h);var O,x,I,$,se=typeof i;if(l==="base64"&&se=="string")for(i=($=i).trim?$.trim():$.replace(/^\s+|\s+$/g,"");i.length%4!=0;)i+="=";if(se=="number")O=V(i);else if(se=="string")O=d.byteLength(i,l);else{if(se!="object")throw new Error("First argument needs to be a number, array or string.");O=V(i.length)}if(d._useTypedArrays?x=d._augment(new Uint8Array(O)):((x=this).length=O,x._isBuffer=!0),d._useTypedArrays&&typeof i.byteLength=="number")x._set(i);else if(K($=i)||d.isBuffer($)||$&&typeof $=="object"&&typeof $.length=="number")for(I=0;I<O;I++)d.isBuffer(i)?x[I]=i.readUInt8(I):x[I]=i[I];else if(se=="string")x.write(i,0,l);else if(se=="number"&&!d._useTypedArrays&&!h)for(I=0;I<O;I++)x[I]=0;return x}function m(i,l,h,O){return d._charsWritten=ye((function(x){for(var I=[],$=0;$<x.length;$++)I.push(255&x.charCodeAt($));return I})(l),i,h,O)}function v(i,l,h,O){return d._charsWritten=ye((function(x){for(var I,$,se=[],ue=0;ue<x.length;ue++)$=x.charCodeAt(ue),I=$>>8,$=$%256,se.push($),se.push(I);return se})(l),i,h,O)}function S(i,l,h){var O="";h=Math.min(i.length,h);for(var x=l;x<h;x++)O+=String.fromCharCode(i[x]);return O}function b(i,l,h,I){I||(E(typeof h=="boolean","missing or invalid endian"),E(l!=null,"missing offset"),E(l+1<i.length,"Trying to read beyond buffer length"));var x,I=i.length;if(!(I<=l))return h?(x=i[l],l+1<I&&(x|=i[l+1]<<8)):(x=i[l]<<8,l+1<I&&(x|=i[l+1])),x}function D(i,l,h,I){I||(E(typeof h=="boolean","missing or invalid endian"),E(l!=null,"missing offset"),E(l+3<i.length,"Trying to read beyond buffer length"));var x,I=i.length;if(!(I<=l))return h?(l+2<I&&(x=i[l+2]<<16),l+1<I&&(x|=i[l+1]<<8),x|=i[l],l+3<I&&(x+=i[l+3]<<24>>>0)):(l+1<I&&(x=i[l+1]<<16),l+2<I&&(x|=i[l+2]<<8),l+3<I&&(x|=i[l+3]),x+=i[l]<<24>>>0),x}function c(i,l,h,O){if(O||(E(typeof h=="boolean","missing or invalid endian"),E(l!=null,"missing offset"),E(l+1<i.length,"Trying to read beyond buffer length")),!(i.length<=l))return O=b(i,l,h,!0),32768&O?-1*(65535-O+1):O}function w(i,l,h,O){if(O||(E(typeof h=="boolean","missing or invalid endian"),E(l!=null,"missing offset"),E(l+3<i.length,"Trying to read beyond buffer length")),!(i.length<=l))return O=D(i,l,h,!0),2147483648&O?-1*(4294967295-O+1):O}function o(i,l,h,O){return O||(E(typeof h=="boolean","missing or invalid endian"),E(l+3<i.length,"Trying to read beyond buffer length")),_.read(i,l,h,23,4)}function f(i,l,h,O){return O||(E(typeof h=="boolean","missing or invalid endian"),E(l+7<i.length,"Trying to read beyond buffer length")),_.read(i,l,h,52,8)}function a(i,l,h,O,x){if(x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+1<i.length,"trying to write beyond buffer length"),Lt(l,65535)),x=i.length,!(x<=h))for(var I=0,$=Math.min(x-h,2);I<$;I++)i[h+I]=(l&255<<8*(O?I:1-I))>>>8*(O?I:1-I)}function y(i,l,h,O,x){if(x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+3<i.length,"trying to write beyond buffer length"),Lt(l,4294967295)),x=i.length,!(x<=h))for(var I=0,$=Math.min(x-h,4);I<$;I++)i[h+I]=l>>>8*(O?I:3-I)&255}function p(i,l,h,O,x){x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+1<i.length,"Trying to write beyond buffer length"),Wt(l,32767,-32768)),i.length<=h||a(i,0<=l?l:65535+l+1,h,O,x)}function P(i,l,h,O,x){x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+3<i.length,"Trying to write beyond buffer length"),Wt(l,2147483647,-2147483648)),i.length<=h||y(i,0<=l?l:4294967295+l+1,h,O,x)}function U(i,l,h,O,x){x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+3<i.length,"Trying to write beyond buffer length"),Sr(l,34028234663852886e22,-34028234663852886e22)),i.length<=h||_.write(i,l,h,O,23,4)}function C(i,l,h,O,x){x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+7<i.length,"Trying to write beyond buffer length"),Sr(l,17976931348623157e292,-17976931348623157e292)),i.length<=h||_.write(i,l,h,O,52,8)}s.Buffer=d,s.SlowBuffer=d,s.INSPECT_MAX_BYTES=50,d.poolSize=8192,d._useTypedArrays=(function(){try{var i=new ArrayBuffer(0),l=new Uint8Array(i);return l.foo=function(){return 42},l.foo()===42&&typeof l.subarray=="function"}catch{return!1}})(),d.isEncoding=function(i){switch(String(i).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.isBuffer=function(i){return!(i==null||!i._isBuffer)},d.byteLength=function(i,l){var h;switch(i+="",l||"utf8"){case"hex":h=i.length/2;break;case"utf8":case"utf-8":h=de(i).length;break;case"ascii":case"binary":case"raw":h=i.length;break;case"base64":h=Te(i).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=2*i.length;break;default:throw new Error("Unknown encoding")}return h},d.concat=function(i,l){if(E(K(i),`Usage: Buffer.concat(list, [totalLength])