PageSourceSearch

https://www.wonderla.com/_next/static/chunks/5525-0ce5c496183207eb.js

js wonderla.com collected 2026-09-24 18:55:28 UTC 108,102 bytes, 11 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5525],{1297:(e,t,n)=>{n.d(t,{k:()=>C});var o=n(73311),i=n(50160),r=n(69789),a=n(43425),s=n(85551),c=n(15050),d=n(2774),l=n(20310),u=n(28404),p=n(28803),E=n(37999),h=n(9588),g=n(5213),m=n(56626),f=n(29073),S=n(85267),y=n(22701),x=n(61056),I=n(35847);async function A({username:e,clientMetadata:t,config:n,tokenOrchestrator:o,preferredChallenge:i,password:s,session:c}){let{userPoolId:d,userPoolClientId:l,userPoolEndpoint:u}=n,p=(0,g.d)({username:e,userPoolId:d,userPoolClientId:l}),E={USERNAME:e};if(i){if(n.passwordless&&(("EMAIL_OTP"!==i||n.passwordless.emailOtpEnabled)&&("SMS_OTP"!==i||n.passwordless.smsOtpEnabled)&&("WEB_AUTHN"!==i||n.passwordless.webAuthn)||(0,a.M)(!1,r.P.InvalidPreferredChallenge)),"PASSWORD_SRP"===i)return(0,a.M)(!!s,r.P.EmptySignInPassword),(0,x.L)({username:e,password:s,clientMetadata:t,config:n,tokenOrchestrator:o,authFlow:"USER_AUTH",preferredChallenge:i});"PASSWORD"===i&&((0,a.M)(!!s,r.P.EmptySignInPassword),E.PASSWORD=s),E.PREFERRED_CHALLENGE=i}let A={AuthFlow:"USER_AUTH",AuthParameters:E,ClientMetadata:t,ClientId:l,UserContextData:p};c&&(A.Session=c);let v=(0,m.R)({endpointResolver:(0,f.o)({endpointOverride:u})}),w=await v({region:(0,S.J)(d),userAgentValue:(0,y.A)(h.BM.SignIn)},A);return(0,I.d)(e),w}var v=n(90724),w=n(38876);async function C(e){let{username:t,password:n,options:h}=e,g=o.H.getConfig().Auth?.Cognito,m={loginId:t,authFlowType:"USER_AUTH"};(0,i.$y)(g);let f=h?.clientMetadata,S=h?.preferredChallenge??g?.passwordless?.preferredChallenge;(0,a.M)(!!t,r.P.EmptySignInUsername);try{let e={username:t,config:g,tokenOrchestrator:E.o,clientMetadata:f,preferredChallenge:S,password:n},o=d.z.getState();o.active&&o.username===t&&(e.session=o.session);let i=await A(e),r=(0,c.ni)(t);if((0,l.wr)({signInSession:i.Session,username:r,challengeName:i.ChallengeName,signInDetails:m}),i.AuthenticationResult)return await (0,u.i)({username:r,...i.AuthenticationResult,NewDeviceMetadata:await (0,v.i)({userPoolId:g.userPoolId,userPoolEndpoint:g.userPoolEndpoint,newDeviceMetadata:i.AuthenticationResult.NewDeviceMetadata,accessToken:i.AuthenticationResult.AccessToken}),signInDetails:m}),(0,l.jN)(),await (0,p.Q)(),(0,w.xO)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,c.q2)({challengeName:i.ChallengeName,challengeParameters:i.ChallengeParameters,availableChallenges:"AvailableChallenges"in i?i.AvailableChallenges:void 0})}catch(t){(0,l.jN)(),(0,w.xO)(),(0,s.e)(t);let e=(0,c.m$)(t.name);if(e)return e;throw t}}},2774:(e,t,n)=>{function o(){return{active:!1}}n.d(t,{z:()=>i});let i=(e=>{let t=e(o(),{type:"RESET"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}})((e,t)=>{switch(t.type){case"SET_USERNAME":return{...e,username:t.value};case"SET_SESSION":return{...e,session:t.value};case"START":return{...e,active:!0};case"RESET":return o();default:return e}})},3637:(e,t,n)=>{n.d(t,{f:()=>p});var o=n(69216),i=n(69232),r=n(29073),a=n(85267),s=n(41004);n(39526);var c=n(90216),d=n(31626),l=n(5213),u=n(74596);async function p(e,t,n,p,E,h,g){let{userPoolId:m,userPoolClientId:f,userPoolEndpoint:S}=h,y=m?.split("_")[1]||"",x=new s.A(t?.SRP_B,16),I=new s.A(t?.SALT,16),A=t?.USER_ID_FOR_SRP;if(!A)throw new o.l({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});let v=await E.getPasswordAuthenticationKey({username:A,password:e,serverBValue:x,salt:I}),w=(0,c.q)(),C={USERNAME:A,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:w,PASSWORD_CLAIM_SIGNATURE:(0,d.I)({username:A,userPoolName:y,challengeParameters:t,dateNow:w,hkdf:v})},R=await g.getDeviceMetadata(A);R&&R.deviceKey&&(C.DEVICE_KEY=R.deviceKey);let P=(0,l.d)({username:A,userPoolId:m,userPoolClientId:f}),T=(0,i.H)({endpointResolver:(0,r.o)({endpointOverride:S})}),N=await T({region:(0,a.J)(m)},{ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:p,ClientId:f,UserContextData:P});return"DEVICE_SRP_AUTH"===N.ChallengeName?(0,u.O)({username:A,config:h,clientMetadata:n,session:N.Session,tokenOrchestrator:g}):N}},5213:(e,t,n)=>{n.d(t,{d:()=>o});function o({username:e,userPoolId:t,userPoolClientId:n}
1){if("undefined"==typeof window)return;let o=window.AmazonCognitoAdvancedSecurityData;if(void 0===o)return;let i=o.getData(e,t,n);return i?{EncodedData:i}:{}}},6254:(e,t,n)=>{n.d(t,{e:()=>r});var o=n(2035),i=n(95538);let r=(0,o.q)(i.F,[()=>(e,t)=>async function(t){return t.headers["cache-control"]="no-store",e(t)}])},7823:(e,t,n)=>{n.d(t,{J:()=>I});var o=n(15050),i=n(73311),r=n(50160),a=n(69789),s=n(43425),c=n(85551),d=n(20310),l=n(28404),u=n(37999),p=n(28803),E=n(53708),h=n(90724);async function g(e){let t=i.H.getConfig().Auth?.Cognito;(0,r.$y)(t);let{username:n,password:g,options:m}=e,f={loginId:n,authFlowType:"CUSTOM_WITHOUT_SRP"},S=m?.clientMetadata;(0,s.M)(!!n,a.P.EmptySignInUsername),(0,s.M)(!g,a.P.CustomAuthSignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:a}=await (0,E.i)(o.ty,[n,S,t,u.o],n,u.o),s=(0,o.ni)(n);if((0,d.wr)({signInSession:a,username:s,challengeName:e,signInDetails:f}),r)return await (0,l.i)({username:s,...r,NewDeviceMetadata:await (0,h.i)({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:f}),(0,d.jN)(),await (0,p.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.q2)({challengeName:e,challengeParameters:i})}catch(t){(0,d.jN)(),(0,c.e)(t);let e=(0,o.m$)(t.name);if(e)return e;throw t}}async function m(e){let{username:t,password:n,options:E}=e,g={loginId:t,authFlowType:"CUSTOM_WITH_SRP"},m=i.H.getConfig().Auth?.Cognito;(0,r.$y)(m);let f=E?.clientMetadata;(0,s.M)(!!t,a.P.EmptySignInUsername),(0,s.M)(!!n,a.P.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:a}=await (0,o.tE)(t,n,f,m,u.o),s=(0,o.ni)(t);if((0,d.wr)({signInSession:a,username:s,challengeName:e,signInDetails:g}),r)return await (0,l.i)({username:s,...r,NewDeviceMetadata:await (0,h.i)({userPoolId:m.userPoolId,userPoolEndpoint:m.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:g}),(0,d.jN)(),await (0,p.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.q2)({challengeName:e,challengeParameters:i})}catch(t){(0,d.jN)(),(0,c.e)(t);let e=(0,o.m$)(t.name);if(e)return e;throw t}}var f=n(38876);async function S(e){let{username:t,password:n}=e,E=i.H.getConfig().Auth?.Cognito,g={loginId:t,authFlowType:"USER_SRP_AUTH"};(0,r.$y)(E);let m=e.options?.clientMetadata;(0,s.M)(!!t,a.P.EmptySignInUsername),(0,s.M)(!!n,a.P.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:a}=await (0,o.Zw)(t,n,m,E,u.o),s=(0,o.ni)(t);if((0,d.wr)({signInSession:a,username:s,challengeName:e,signInDetails:g}),r)return await (0,l.i)({username:s,...r,NewDeviceMetadata:await (0,h.i)({userPoolId:E.userPoolId,userPoolEndpoint:E.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:g}),(0,d.jN)(),await (0,p.Q)(),(0,f.xO)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.q2)({challengeName:e,challengeParameters:i})}catch(t){(0,d.jN)(),(0,f.xO)(),(0,c.e)(t);let e=(0,o.m$)(t.name);if(e)return e;throw t}}async function y(e){let{username:t,password:n,options:g}=e,m=i.H.getConfig().Auth?.Cognito,S={loginId:t,authFlowType:"USER_PASSWORD_AUTH"};(0,r.$y)(m);let y=g?.clientMetadata;(0,s.M)(!!t,a.P.EmptySignInUsername),(0,s.M)(!!n,a.P.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:a}=await (0,E.i)(o.h5,[t,n,y,m,u.o],t,u.o),s=(0,o.ni)(t);if((0,d.wr)({signInSession:a,username:s,challengeName:e,signInDetails:S}),r)return await (0,l.i)({...r,username:s,NewDeviceMetadata:await (0,h.i)({userPoolId:m.userPoolId,userPoolEndpoint:m.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:S}),(0,d.jN)(),await (0,p.Q)(),(0,f.xO)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.q2)({challengeName:e,challengeParameters:i})}catch(t){(0,d.jN)(),(0,f.xO)(),(0,c.e)(t);let e=(0,o.m$)(t.name);if(e)return e;throw t}}var x=n(1297);async function I(e){(0,f.xO)(!1);let t=e.options?.authFlowType;switch(await (0,o.AR)(),t){case"USER_SRP_AUTH":default:return S(e);case"USER_PASSWORD_AUTH":return y(e);case"CUSTOM_WITHOUT_SRP":return g(e);case"CUSTOM_WITH_SRP":return m(e);case"USER_AUTH":return(0,x.k)(e)}}}
1,9588:(e,t,n)=>{var o,i,r,a,s,c,d,l,u,p,E,h,g,m;n.d(t,{BM:()=>c,b7:()=>i,dT:()=>o,sZ:()=>m}),function(e){e.WebUnknown="0",e.React="1",e.NextJs="2",e.Angular="3",e.VueJs="4",e.Nuxt="5",e.Svelte="6",e.ServerSideUnknown="100",e.ReactSSR="101",e.NextJsSSR="102",e.AngularSSR="103",e.VueJsSSR="104",e.NuxtSSR="105",e.SvelteSSR="106",e.ReactNative="201",e.Expo="202"}(o||(o={})),function(e){e.AI="ai",e.API="api",e.Auth="auth",e.Analytics="analytics",e.DataStore="datastore",e.Geo="geo",e.InAppMessaging="inappmessaging",e.Interactions="interactions",e.Predictions="predictions",e.PubSub="pubsub",e.PushNotification="pushnotification",e.Storage="storage"}(i||(i={})),function(e){e.CreateConversation="1",e.GetConversation="2",e.ListConversations="3",e.DeleteConversation="4",e.SendMessage="5",e.ListMessages="6",e.OnMessage="7",e.Generation="8",e.UpdateConversation="9"}(r||(r={})),function(e){e.Record="1",e.IdentifyUser="2"}(a||(a={})),function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"}(s||(s={})),function(e){e.SignUp="1",e.ConfirmSignUp="2",e.ResendSignUpCode="3",e.SignIn="4",e.FetchMFAPreference="6",e.UpdateMFAPreference="7",e.SetUpTOTP="10",e.VerifyTOTPSetup="11",e.ConfirmSignIn="12",e.DeleteUserAttributes="15",e.DeleteUser="16",e.UpdateUserAttributes="17",e.FetchUserAttributes="18",e.ConfirmUserAttribute="22",e.SignOut="26",e.UpdatePassword="27",e.ResetPassword="28",e.ConfirmResetPassword="29",e.FederatedSignIn="30",e.RememberDevice="32",e.ForgetDevice="33",e.FetchDevices="34",e.SendUserAttributeVerificationCode="35",e.SignInWithRedirect="36",e.StartWebAuthnRegistration="37",e.CompleteWebAuthnRegistration="38",e.ListWebAuthnCredentials="39",e.DeleteWebAuthnCredential="40"}(c||(c={})),function(e){e.Subscribe="1",e.GraphQl="2"}(d||(d={})),function(e){e.SearchByText="0",e.SearchByCoordinates="1",e.SearchForSuggestions="2",e.SearchByPlaceId="3",e.SaveGeofences="4",e.GetGeofence="5",e.ListGeofences="6",e.DeleteGeofences="7"}(l||(l={})),function(e){e.SyncMessages="1",e.IdentifyUser="2",e.NotifyMessageInteraction="3"}(u||(u={})),(p||(p={})).None="0",function(e){e.Convert="1",e.Identify="2",e.Interpret="3"}(E||(E={})),(h||(h={})).Subscribe="1",function(e){e.InitializePushNotifications="1",e.IdentifyUser="2"}(g||(g={})),function(e){e.UploadData="1",e.DownloadData="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6",e.GetUrl="7",e.GetDataAccess="8",e.ListCallerAccessGrants="9"}(m||(m={}))},11529:(e,t,n)=>{n.d(t,{A:()=>o});let o=(e,t,n,o)=>async(i,r)=>{let a={...o,...i},s=await a.endpointResolver(a,r),c=await t(r,s);return n(await e(c,{...a}))}},14920:(e,t,n)=>{n.d(t,{H0:()=>r,OW:()=>a,O_:()=>l,X4:()=>d,f3:()=>u});var o=n(69216),i=n(30119);function r(e){if(!e||!e.accessToken)throw new o.l({name:i.zz,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function a(e){if(!e||!e.idToken)throw new o.l({name:i.zz,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}let s=new o.l({name:i.Cs,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow. 
2	Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow. 
3	E.g { responseType: 'code' }`}),c=new o.l({name:i.zz,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function d(e){var t,n;if(p(t=e)&&!t?.refreshToken)throw s;if(!(p(n=e)&&n?.refreshToken))throw c}function l(e){if(!e||!e.deviceKey||!e.deviceGroupKey||!e.randomPassword)throw new o.l({name:i.kM,message:"Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.",recoverySuggestion:"Make sure to not clear storage after calling the signIn API."})}let u={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function p(e){return e?.accessToken||e?.idToken}},15050:(e,t,n)=>{n.d(t,{AR:()=>em,ni:()=>ef,q2:()=>el,m$:()=>eu,XE:()=>ep,ty:()=>ec,tE:()=>ed,h5:()=>ea,Zw:()=>es});var o,i=n(73311),r=n(9588),a=n(50160),s=n(2223),c=n(69216),d=n(30570),l=n(74390),u=n(69789),p=n(43425),E=n(30119),h=n(97
3592),g=n(22701),m=n(56626),f=n(69232),S=n(11529),y=n(6254),x=n(92169),I=n(58392),A=n(41705),v=n(29073),w=n(85267),C=n(28404),R=n(28803),P=n(20310),T=n(35993),N=n(23411);let U="Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.";class M extends T.x{constructor(e){super(e),this.constructor=M,Object.setPrototypeOf(this,M.prototype)}}!function(e){e.PasskeyNotSupported="PasskeyNotSupported",e.PasskeyAlreadyExists="PasskeyAlreadyExists",e.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",e.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",e.RelyingPartyMismatch="RelyingPartyMismatch",e.PasskeyRegistrationFailed="PasskeyRegistrationFailed",e.PasskeyRetrievalFailed="PasskeyRetrievalFailed",e.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",e.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",e.PasskeyOperationAborted="PasskeyOperationAborted"}(o||(o={}));let _="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",F="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",D={[o.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:U},[o.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:F},[o.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:F},[o.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:U},[o.PasskeyRetrievalFailed]:{message:"Device failed to retrieve passkey.",recoverySuggestion:"Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP."},[o.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[o.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:_},[o.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:_},[o.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:_},[o.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},O=(0,N.p)(D,M);var k=n(26348),b=n(41113),L=n(44771);let V=e=>L.Y.convert(new Uint8Array(e),{urlSafe:!0,skipPadding:!0});var K=n(31622);let q=e=>Uint8Array.from(K.m.convert(e,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,B=async e=>{try{let t=(0,b.B)()&&window.isSecureContext&&"credentials"in navigator&&"function"==typeof window.PublicKeyCredential;O(t,o.PasskeyNotSupported);let n=(e=>{let t=q(e.challenge),n=(e.allowCredentials||[]).map(e=>({...e,id:q(e.id)}));return{...e,challenge:t,allowCredentials:n}})(e),i=await navigator.credentials.get({publicKey:n});return!function(e){O(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAssertionResponse,o.PasskeyRetrievalFailed)}(i),(e=>{let t={clientDataJSON:V(e.response.clientDataJSON),authenticatorData:V(e.response.authenticatorData),signature:V(e.response.signature)};e.response.userHandle&&(t.userHandle=V(e.response.userHandle));let n={id:e.id,rawId:V(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorAttachment),n})(i)}catch(e){throw(e=>{if(e instanceof M)return e;if(e instanceof Error&&"NotAllowedError"===e.name){let{message:t,recoverySuggestion:n}=D[o.PasskeyAuthenticationCanceled];return new M({name:o.PasskeyAuthenticationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}return(e=>{if(e instanceof Error){if("AbortError"===e.name){let{message:t,recoverySuggestion:n}=D[o.PasskeyOperationAborted];return new M({name:o.PasskeyOperationAborted,message:t,recoverySuggestion:n,underlyingError:e})}if("SecurityError"===e.name){let{message:t,recoverySuggestion:n}=D[o.RelyingPartyMismatch];return new M({name:o.RelyingPartyMismatch,message:t,recoverySuggestion:n,underlyingError:e})}}return new M({name:k.m.Unknown,message:"An unknown error has occurred.",underlyingError:e})})(e)})(e)}};var $=n(90724);async function H(e){let t=i.H.getConfig().Auth?.Cognito;(0,a.$y)(t);
3let{username:n,signInSession:s,signInDetails:d,challengeName:u}=P.c$.getState();if("WEB_AUTHN"!==u||!n)throw new c.l({name:l.nC.SignInException,message:"Unable to proceed due to invalid sign in state."});let{CREDENTIAL_REQUEST_OPTIONS:p}=e;O(!!p,o.InvalidPasskeyAuthenticationOptions);let E=await B(JSON.parse(p)),h=(0,f.H)({endpointResolver:(0,v.o)({endpointOverride:t.userPoolEndpoint})}),{ChallengeName:m,ChallengeParameters:S,AuthenticationResult:y,Session:x}=await h({region:(0,w.J)(t.userPoolId),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(E)},ClientId:t.userPoolClientId,Session:s});if((0,P.wr)({signInSession:x,username:n,challengeName:m,signInDetails:d}),y)return await (0,C.i)({...y,username:n,NewDeviceMetadata:await (0,$.i)({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:y.NewDeviceMetadata,accessToken:y.AccessToken}),signInDetails:d}),P.c$.dispatch({type:"RESET_STATE"}),await (0,R.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if("WEB_AUTHN"===m)throw new c.l({name:l.nC.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:m,challengeParameters:S}}var W=n(61056);async function z({username:e,session:t,selectedChallenge:n,config:o,clientMetadata:i}){return(0,f.H)({endpointResolver:(0,v.o)({endpointOverride:o.userPoolEndpoint})})({region:(0,w.J)(o.userPoolId),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:e,ANSWER:n},ClientId:o.userPoolClientId,Session:t,ClientMetadata:i})}var G=n(5213),J=n(35847);async function j(e,t,n,o,i){let{userPoolId:a,userPoolClientId:s,userPoolEndpoint:c}=o,d=(0,G.d)({username:e,userPoolId:a,userPoolClientId:s}),l=(0,f.H)({endpointResolver:(0,v.o)({endpointOverride:c})}),u=await l({region:(0,w.J)(a),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{ANSWER:"PASSWORD",USERNAME:e,PASSWORD:t},ClientId:s,ClientMetadata:n,Session:i,UserContextData:d}),p=u.ChallengeParameters?.USERNAME??e;return(0,J.d)(p),u}var Y=n(56253);n(39526);var Z=n(53708),Q=n(3637);async function X(e,t,n,o,i,a){let{userPoolId:s,userPoolClientId:c,userPoolEndpoint:d}=o,l=s.split("_")[1]||"",u=await (0,Y.H)(l),p={ANSWER:"PASSWORD_SRP",USERNAME:e,SRP_A:u.A.toString(16)},E=(0,G.d)({username:e,userPoolId:s,userPoolClientId:c}),h=(0,f.H)({endpointResolver:(0,v.o)({endpointOverride:d})}),m=await h({region:(0,w.J)(s),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:p,ClientId:c,ClientMetadata:n,Session:i,UserContextData:E}),S=m.ChallengeParameters?.USERNAME??e;return((0,J.d)(S),"PASSWORD_VERIFIER"===m.ChallengeName)?(0,Z.i)(Q.f,[t,m.ChallengeParameters,n,m.Session,u,o,a],S,a):m}var ee=n(74596);let et="userAttributes.";async function en({challengeResponse:e,clientMetadata:t,session:n,username:o,config:i,tokenOrchestrator:a}){let{userPoolId:s,userPoolClientId:c,userPoolEndpoint:d}=i,l={USERNAME:o,ANSWER:e},u=await a?.getDeviceMetadata(o);u&&u.deviceKey&&(l.DEVICE_KEY=u.deviceKey);let p=(0,G.d)({username:o,userPoolId:s,userPoolClientId:c}),E=(0,f.H)({endpointResolver:(0,v.o)({endpointOverride:d})}),h=await E({region:(0,w.J)(s),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:l,Session:n,ClientMetadata:t,ClientId:c,UserContextData:p});return"DEVICE_SRP_AUTH"===h.ChallengeName?(0,ee.O)({username:o,config:i,clientMetadata:t,session:h.Session,tokenOrchestrator:a}):h}async function eo({challengeResponse:e,username:t,clientMetadata:n,session:o,deviceName:i,config:a}){let{userPoolId:s,userPoolClientId:d,userPoolEndpoint:u}=a;if("EMAIL"===e)return{ChallengeName:"MFA_SETUP",Session:o,ChallengeParameters:{MFAS_CAN_SETUP:'["EMAIL_OTP"]'},$metadata:{}};if("TOTP"===e)return{ChallengeName:"MFA_SETUP",Session:o,ChallengeParameters:{MFAS_CAN_SETUP:'["SOFTWARE_TOKEN_MFA"]'},$metadata:{}};let p={USERNAME:t};if(/^\d+$/.test(e)){let t,a=(t={endpointResolver:(0,v.o)({endpointOverride:u})},(0,S.A)(y.e,(0,x._)("VerifySoftwareToken"),(0,I.T)(),{...A.C,...t})),{Session:c}=await a({region:(0,w.J)(s),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{UserCode:e,Session:o,FriendlyDeviceName:i});return P.c$.dispatch({type:"SET_SIGN_IN_SESSION",value:c}),(0,f.H)({endpointResolver:(0,v.o)({endpointOverride:u})})({region:(0,w.J)(s),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{ChallengeName:"MFA_SETUP",ChallengeResponses:p,Session:c,ClientMetadata:n,ClientId:d})}if(e.includes("@"))return p.EMAIL=e,(0,f.H)({endpointResolver:(0,v.o)({endpointOverride:u})})({region:(0,w.J)(s),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{ChallengeName:"MFA_SETUP",ChallengeResponses:p,Session:o,ClientMetadata:n,ClientId:d});
3throw new c.l({name:l.nC.SignInException,message:`Cannot proceed with MFA setup using challengeResponse: ${e}`,recoverySuggestion:'Try passing "EMAIL", "TOTP", a valid email, or OTP code as the challengeResponse.'})}async function ei({challengeResponse:e,username:t,clientMetadata:n,session:o,config:i}){var a;let s,{userPoolId:c,userPoolClientId:d,userPoolEndpoint:l}=i;(0,p.M)("TOTP"===e||"SMS"===e||"EMAIL"===e,u.P.IncorrectMFAMethod);let E={USERNAME:t,ANSWER:(s="SMS_MFA","TOTP"===(a=e)&&(s="SOFTWARE_TOKEN_MFA"),"EMAIL"===a&&(s="EMAIL_OTP"),s)},h=(0,G.d)({username:t,userPoolId:c,userPoolClientId:d});return(0,f.H)({endpointResolver:(0,v.o)({endpointOverride:l})})({region:(0,w.J)(c),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:E,Session:o,ClientMetadata:n,ClientId:d,UserContextData:h})}async function er({challengeResponse:e,clientMetadata:t,session:n,username:o,requiredAttributes:i,config:a}){let{userPoolId:s,userPoolClientId:c,userPoolEndpoint:d}=a,l={...function(e){if(!e)return{};let t={};return Object.entries(e).forEach(([e,n])=>{n&&(t[`${et}${e}`]=n)}),t}(i),NEW_PASSWORD:e,USERNAME:o},u=(0,G.d)({username:o,userPoolId:s,userPoolClientId:c});return(0,f.H)({endpointResolver:(0,v.o)({endpointOverride:d})})({region:(0,w.J)(s),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:l,ClientMetadata:t,Session:n,ClientId:c,UserContextData:u})}async function ea(e,t,n,o,i){let{userPoolClientId:a,userPoolId:s,userPoolEndpoint:c}=o,d={USERNAME:e,PASSWORD:t},l=await i.getDeviceMetadata(e);l&&l.deviceKey&&(d.DEVICE_KEY=l.deviceKey);let u=(0,G.d)({username:e,userPoolId:s,userPoolClientId:a}),p=(0,m.R)({endpointResolver:(0,v.o)({endpointOverride:c})}),E=await p({region:(0,w.J)(s),userAgentValue:(0,g.A)(r.BM.SignIn)},{AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:d,ClientMetadata:n,ClientId:a,UserContextData:u}),h=E.ChallengeParameters?.USERNAME??E.ChallengeParameters?.USER_ID_FOR_SRP??e;return((0,J.d)(h),"DEVICE_SRP_AUTH"===E.ChallengeName)?(0,ee.O)({username:h,config:o,clientMetadata:n,session:E.Session,tokenOrchestrator:i}):E}async function es(e,t,n,o,i){return(0,W.L)({username:e,password:t,clientMetadata:n,config:o,tokenOrchestrator:i,authFlow:"USER_SRP_AUTH"})}async function ec(e,t,n,o){let{userPoolClientId:i,userPoolId:a,userPoolEndpoint:s}=n,c={USERNAME:e},d=await o.getDeviceMetadata(e);d&&d.deviceKey&&(c.DEVICE_KEY=d.deviceKey);let l=(0,G.d)({username:e,userPoolId:a,userPoolClientId:i}),u=(0,m.R)({endpointResolver:(0,v.o)({endpointOverride:s})}),p=await u({region:(0,w.J)(a),userAgentValue:(0,g.A)(r.BM.SignIn)},{AuthFlow:"CUSTOM_AUTH",AuthParameters:c,ClientMetadata:t,ClientId:i,UserContextData:l}),E=p.ChallengeParameters?.USERNAME??e;return((0,J.d)(E),"DEVICE_SRP_AUTH"===p.ChallengeName)?(0,ee.O)({username:E,config:n,clientMetadata:t,session:p.Session,tokenOrchestrator:o}):p}async function ed(e,t,n,o,i){(0,a.$y)(o);let{userPoolId:s,userPoolClientId:c,userPoolEndpoint:d}=o,l=s?.split("_")[1]||"",u=await (0,Y.H)(l),p={USERNAME:e,SRP_A:u.A.toString(16),CHALLENGE_NAME:"SRP_A"},E=(0,G.d)({username:e,userPoolId:s,userPoolClientId:c}),h=(0,m.R)({endpointResolver:(0,v.o)({endpointOverride:d})}),{ChallengeParameters:f,Session:S}=await h({region:(0,w.J)(s),userAgentValue:(0,g.A)(r.BM.SignIn)},{AuthFlow:"CUSTOM_AUTH",AuthParameters:p,ClientMetadata:n,ClientId:c,UserContextData:E}),y=f?.USERNAME??e;return(0,J.d)(y),(0,Z.i)(Q.f,[t,f,n,S,u,o,i],y,i)}async function el(e){var t,n,o;let{challengeName:r,challengeParameters:d,availableChallenges:u}=e,p=i.H.getConfig().Auth?.Cognito;switch((0,a.$y)(p),r){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:d}};case"MFA_SETUP":{let{signInSession:e,username:o}=P.c$.getState(),i=eh(eg(d.MFAS_CAN_SETUP))||[],r=i.filter(e=>"EMAIL"===e||"TOTP"===e),a=r.includes("TOTP"),u=r.includes("EMAIL");if(a&&u)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:r}};if(u)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(a){let i,r=(i={endpointResolver:(0,v.o)({endpointOverride:p.userPoolEndpoint})},(0,S.A)(y.e,(0,x._)("AssociateSoftwareToken"),(0,I.T)(),{...A.C,...i})),{Session:a,SecretCode:c}
3=await r({region:(0,w.J)(p.userPoolId)},{Session:e});return P.c$.dispatch({type:"SET_SIGN_IN_SESSION",value:a}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:(t=c,n=o,{sharedSecret:t,getSetupUri:(e,o)=>{let i=`otpauth://totp/${e}:${o??n}?secret=${t}&issuer=${e}`;return new s.o(i)}})}}}throw new c.l({name:l.nC.SignInException,message:`Cannot initiate MFA setup from available types: ${i}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:(o=d.requiredAttributes)?JSON.parse(o).map(e=>e.includes(et)?e.replace(et,""):e):[]}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:eh(eg(d.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:d.CODE_DELIVERY_DELIVERY_MEDIUM,destination:d.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}};case"EMAIL_OTP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_EMAIL_CODE",codeDeliveryDetails:{deliveryMedium:d.CODE_DELIVERY_DELIVERY_MEDIUM,destination:d.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{let e=await H(d);if("isSignedIn"in e&&"nextStep"in e)return e;return el(e)}case"PASSWORD":case"PASSWORD_SRP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_PASSWORD"}};case"SELECT_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION",availableChallenges:u}}}throw new c.l({name:l.nC.SignInException,message:`An error occurred during the sign in process. ${r} challengeName returned by the underlying service was not addressed.`})}function eu(e){return e===d.zh.PasswordResetRequiredException?{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}}:e===d.zh.UserNotConfirmedException?{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}:void 0}async function ep(e,t,n,o,i,r,a,s){let d=s?.userAttributes,u=s?.friendlyDeviceName;switch(t){case"WEB_AUTHN":case"SELECT_CHALLENGE":if("PASSWORD_SRP"===o||"PASSWORD"===o)return{ChallengeName:o,Session:n,$metadata:{}};return z({username:e,session:n,selectedChallenge:o,config:i,clientMetadata:a});case"SELECT_MFA_TYPE":return ei({challengeResponse:o,clientMetadata:a,session:n,username:e,config:i});case"MFA_SETUP":return eo({challengeResponse:o,clientMetadata:a,session:n,username:e,deviceName:u,config:i});case"NEW_PASSWORD_REQUIRED":return er({challengeResponse:o,clientMetadata:a,session:n,username:e,requiredAttributes:d,config:i});case"CUSTOM_CHALLENGE":return(0,Z.i)(en,[{challengeResponse:o,clientMetadata:a,session:n,username:e,config:i,tokenOrchestrator:r}],e,r);case"SMS_MFA":case"SOFTWARE_TOKEN_MFA":case"SMS_OTP":case"EMAIL_OTP":return eS({challengeName:t,challengeResponse:o,clientMetadata:a,session:n,username:e,config:i,tokenOrchestrator:r});case"PASSWORD":return j(e,o,a,i,n);case"PASSWORD_SRP":return X(e,o,a,i,n,r)}throw new c.l({name:l.nC.SignInException,message:`An error occurred during the sign in process.
4		${t} challengeName returned by the underlying service was not addressed.`})}function eE(e){return"SMS_MFA"===e?"SMS":"SOFTWARE_TOKEN_MFA"===e?"TOTP":"EMAIL_OTP"===e?"EMAIL":void 0}function eh(e){if(e)return e.map(eE).filter(Boolean)}function eg(e){return e?JSON.parse(e):[]}async function em(){let e;try{e=await (0,h.H)()}catch(e){}if(e&&e.userId&&e.username)throw new c.l({name:E.z0,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function ef(e){return P.c$.getState().username??e}async function eS({challengeName:e,challengeResponse:t,clientMetadata:n,session:o,username:i,config:a,tokenOrchestrator:s}){let{userPoolId:c,userPoolClientId:d,userPoolEndpoint:l}=a,u={USERNAME:i};"EMAIL_OTP"===e&&(u.EMAIL_OTP_CODE=t),"SMS_MFA"===e&&(u.SMS_MFA_CODE=t),"SMS_OTP"===e&&(u.SMS_OTP_CODE=t),"SOFTWARE_TOKEN_MFA"===e&&(u.SOFTWARE_TOKEN_MFA_CODE=t);let p=await s?.getDeviceMetadata(i);p&&p.deviceKey&&(u.DEVICE_KEY=p.deviceKey);let E=(0,G.d)({username:i,userPoolId:c,userPoolClientId:d}),h=(0,f.H)({endpointResolver:(0,v.o)({endpointOverride:l})}),m=await h({region:(0,w.J)(c),userAgentValue:(0,g.A)(r.BM.ConfirmSignIn)},{ChallengeName:e,ChallengeResponses:u,Session:o,ClientMetadata:n,ClientId:d,UserContextData:E});return"DEVICE_SRP_AUTH"===m.ChallengeName?(0,ee.O)({username:i,config:a,clientMetadata:n,session:m.Session,tokenOrchestrator:s}):m}},20310:(e,t,n)=>{n.d(t,{c$:()=>d,jN:()=>a,wr:()=>l});var o=n(42014);let i="CognitoSignInState",r={username:`${i}.username`,challengeName:`${i}.challengeName`,signInSession:`${i}.signInSession`,expiry:`${i}.expiry`},a=()=>{d.dispatch({type:"RESET_STATE"})},s=()=>{for(let e of Object.values(r))o.pR.removeItem(e)},c=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),d=(e=>{let t=e(c(),{type:"SET_INITIAL_STATE"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}})((e,t)=>{switch(t.type){case"SET_SIGN_IN_SESSION":return u({signInSession:t.value}),{...e,signInSession:t.value};case"SET_SIGN_IN_STATE":return u(t.value),{...t.value};case"SET_CHALLENGE_NAME":return u({challengeName:t.value}),{...e,challengeName:t.value};case"SET_USERNAME":return u({username:t.value}),{...e,username:t.value};case"SET_INITIAL_STATE":return(()=>{let e=o.pR.getItem(r.expiry);if(!e||Number(e)<=Date.now())return s(),c();let t=o.pR.getItem(r.username)??void 0;return{username:t,challengeName:o.pR.getItem(r.challengeName)??void 0,signInSession:o.pR.getItem(r.signInSession)??void 0}})();case"RESET_STATE":return s(),c();default:return e}});function l(e){d.dispatch({type:"SET_SIGN_IN_STATE",value:e})}let u=({challengeName:e,signInSession:t,username:n})=>{n&&o.pR.setItem(r.username,n),e&&o.pR.setItem(r.challengeName,e),t&&(o.pR.setItem(r.signInSession,t),o.pR.setItem(r.expiry,String(Date.now()+18e4)))}},22701:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(29567),i=n(9588);let r=(e,t)=>(0,o.fE)({category:i.b7.Auth,action:e,...t})}
4,23054:(e,t,n)=>{n.d(t,{C:()=>_});var o=n(94389),i=n(73311),r=n(42014);function a(){return i.H.Auth.clearCredentials()}var s=n(35943),c=n(50160),d=n(9588),l=n(22701),u=n(69216),p=n(32042),E=n(37999),h=n(85267),g=n(14920);n(39526);let m=async e=>{await e.clearOAuthData(),E.o.clearTokens(),await a(),s.YZ.dispatch("auth",{event:"signedOut"},"Auth",s.U9)},f=async e=>{window?.location&&(window.location.href=e.replace("http://","https://"))};var S=n(30119);let y=e=>e.startsWith(String(window.location.origin+(window.location.pathname||"/"))),x=e=>e.includes(String(window.location.hostname)),I=e=>e.startsWith("http://"),A=e=>e.startsWith("https://"),v=async(e,t=!1,n)=>{(0,c.G6)(e);let{loginWith:o,userPoolClientId:i}=e,{domain:r,redirectSignOut:a}=o.oauth,s=function(e,t){if(t){let n=e?.find(e=>e===t);if(!n)throw S.jK;return n}{let t=e?.find(y)??e?.find(x),n=e?.find(A)??e?.find(I);if(t)return t;if(n)throw S.$6;throw S.RW}}(a,n);return f(`https://${r}/logout?${Object.entries({client_id:i,logout_uri:encodeURIComponent(s)}).map(([e,t])=>`${e}=${t}`).join("&")}`)},w=async(e,t,n,o)=>{let{isOAuthSignIn:i}=await t.loadOAuthSignIn(),r=await n.getOAuthMetadata();if(await m(t),i||r?.oauthSignIn)return v(e,!1,o)};var C=n(11529),R=n(6254),P=n(92169),T=n(58392),N=n(41705),U=n(29073);let M=new o.C("Auth");async function _(e){let t,n=i.H.getConfig().Auth?.Cognito;(0,c.$y)(n),e?.global?await D(n):await F(n);try{(0,c.G6)(n),t=!0}catch(e){t=!1}if(t){let t=new p.S(r.ZL);t.setAuthConfig(n);let{type:o}=await w(n,t,E.o,e?.oauth?.redirectUrl)??{};if("error"===o)throw new u.l({name:S.mh,message:"An error occurred when attempting to log out from OAuth provider."})}else E.o.clearTokens(),await a(),s.YZ.dispatch("auth",{event:"signedOut"},"Auth",s.U9)}async function F(e){try{let{userPoolEndpoint:t,userPoolId:n,userPoolClientId:o}=e,i=await E.o.getTokenStore().loadTokens();if((0,g.X4)(i),O(i.accessToken)){let e,r=(e={endpointResolver:(0,U.o)({endpointOverride:t})},(0,C.A)(R.e,(0,P._)("RevokeToken"),(0,T.T)(),{...N.C,...e}));await r({region:(0,h.J)(n),userAgentValue:(0,l.A)(d.BM.SignOut)},{ClientId:o,Token:i.refreshToken})}}catch(e){M.debug("Client signOut error caught but will proceed with token removal")}}async function D(e){try{let t,{userPoolEndpoint:n,userPoolId:o}=e,i=await E.o.getTokenStore().loadTokens();(0,g.H0)(i);let r=(t={endpointResolver:(0,U.o)({endpointOverride:n})},(0,C.A)(R.e,(0,P._)("GlobalSignOut"),(0,T.T)(),{...N.C,...t}));await r({region:(0,h.J)(o),userAgentValue:(0,l.A)(d.BM.SignOut)},{AccessToken:i.accessToken.toString()})}catch(e){M.debug("Global signOut error caught but will proceed with token removal")}}let O=e=>!!e?.payload?.origin_jti},23411:(e,t,n)=>{n.d(t,{p:()=>i});var o=n(35993);let i=(e,t=o.x)=>(n,o,i)=>{let{message:r,recoverySuggestion:a}=e[o];if(!n)throw new t({name:o,message:i?`${r} ${i}`:r,recoverySuggestion:a})}},23937:(e,t,n)=>{n.d(t,{M:()=>o});let o="cognito-idp"},26125:(e,t,n)=>{n.d(t,{U:()=>o});let o={convert:e=>new TextEncoder().encode(e)}}
4,26239:(e,t,n)=>{n.d(t,{R:()=>r});let o={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},i={partitions:[o,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},r=e=>{let{partitions:t}=i;for(let{regions:n,outputs:o,regionRegex:i}of t){let t=new RegExp(i);if(n.includes(e)||t.test(e))return o.dnsSuffix}return o.outputs.dnsSuffix}},28404:(e,t,n)=>{n.d(t,{i:()=>a});var o=n(50160),i=n(35993),r=n(37999);async function a(e){if(e.AccessToken){let t,n,i,a=(0,o.Cq)(e.AccessToken),s=1e3*(a.payload.iat||0),c=new Date().getTime();e.RefreshToken&&(n=e.RefreshToken),e.IdToken&&(t=(0,o.Cq)(e.IdToken)),e?.NewDeviceMetadata&&(i=e.NewDeviceMetadata);let d={accessToken:a,idToken:t,refreshToken:n,clockDrift:s>0?s-c:0,deviceMetadata:i,username:e.username};e?.signInDetails&&(d.signInDetails=e.signInDetails),await r.o.setTokens({tokens:d})}else throw new i.x({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}},28803:(e,t,n)=>{n.d(t,{Q:()=>s});var o=n(35943),i=n(97592),r=n(30119),a=n(69216);let s=async()=>{try{o.YZ.dispatch("auth",{event:"signedIn",data:await (0,i.H)()},"Auth",o.U9)}catch(e){if(e.name===r.zz)throw new a.l({name:r.yA,message:"Unable to get user session following successful sign-in.",recoverySuggestion:"This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server."});throw e}}},29073:(e,t,n)=>{n.d(t,{o:()=>a});var o=n(2223),i=n(26239),r=n(23937);let a=({endpointOverride:e})=>t=>e?{url:new o.o(e)}:(({region:e})=>({url:new o.o(`https://${r.M}.${e}.${(0,i.R)(e)}`)}))(t)},29567:(e,t,n)=>{let o;n.d(t,{fE:()=>x});var i=n(9588);let r="6.16.2";var a=n(95704);let s=(e,t)=>!!Object.keys(e).find(e=>e.startsWith(t));var c=n(95704),d=n(95704),l=n(95704);let u=[{platform:i.dT.Expo,detectionMethod:function(){return"undefined"!=typeof global&&void 0!==global.expo}},{platform:i.dT.ReactNative,detectionMethod:function(){return"undefined"!=typeof navigator&&void 0!==navigator.product&&"ReactNative"===navigator.product}},{platform:i.dT.NextJs,detectionMethod:function(){return"undefined"!=typeof window&&window.next&&"object"==typeof window.next}},{platform:i.dT.Nuxt,detectionMethod:function(){return"undefined"!=typeof window&&(void 0!==window.__NUXT__||void 0!==window.$nuxt)}},{platform:i.dT.Angular,detectionMethod:function(){let e=!!("undefined"!=typeof document&&document.querySelector("[ng-version]")),t="undefined"!=typeof window&&void 0!==window.ng;return e||t}},{platform:i.dT.React,detectionMethod:function(){let e=e=>e.startsWith("_react")||e.startsWith("__react");return"undefined"!=typeof document&&Array.from(document.querySelectorAll("[id]")).some(t=>Object.keys(t).find(e))}},{platform:i.dT.VueJs,detectionMethod:function(){return"undefined"!=typeof window&&s(window,"__VUE")}},{platform:i.dT.Svelte,detectionMethod:function(){return"undefined"!=typeof window&&s(window,"__SVELTE")}},{platform:i.dT.WebUnknown,detectionMethod:function(){return"undefined"!=typeof window}},{platform:i.dT.NextJsSSR,detectionMethod:function(){return"undefined"!=typeof global&&(s(global,"__next")||s(global,"__NEXT"))}},{platform:i.dT.NuxtSSR,detectionMethod:function(){return"undefined"!=typeof global&&void 0!==global.__NUXT_PATHS__}},{platform:i.dT.ReactSSR,detectionMethod:function(){return void 0!==a&&void 0!==c.env&&!!Object.keys(c.env).find(e=>e.includes("react"))}},{platform:i.dT.VueJsSSR,detectionMethod:function(){return"undefined"!=typeof global&&s(global,"__VUE")}},{platform:i.dT.AngularSSR,detectionMethod:function(){return void 0!==a&&"object"==typeof l.env&&l.env.npm_lifecycle_script?.startsWith("ng ")||!1}},{platform:i.dT.SvelteSSR,detectionMethod:function(){return void 0!==a&&void 0!==d.env&&!!Object.keys(d.env).find(e=>e.includes("svelte"))}}],p=[],E=!1,h=()=>{if(!o){if(o=u.find(e=>e.detectionMethod())?.platform||i.dT.ServerSideUnknown,E)for(;p.length;)p.pop()?.();else p.forEach(e=>{e()});g(i.dT.ServerSideUnknown,10),g(i.dT.WebUnknown,10)}return o};function g(e,t){o!==e||E||setTimeout(()=>{o=void 0,E=!0,setTimeout(h,1e3)},t)}let m={},f="aws-amplify",S=e=>e.replace(/\+.*/,"");class y{constructor(){this.userAgent=`${f}/${S(r)}`}get framework(){return h()}get isReactNative(){return this.framework===i.dT.ReactNative||this.framework===i.dT.Expo}observeFrameworkChanges(e){E||p.push(e)}}new y;let x=e=>(({category:e,action:t}={})=>{let n=[[f,S(r)]];if(e&&n.push([e,t]),n.push(["framework",h()]),e&&t){let o=m[e]?.[t]?.additionalDetails;
4o&&o.forEach(e=>{n.push(e)})}return n})(e).map(([e,t])=>e&&t?`${e}/${t}`:e).join(" ")},30119:(e,t,n)=>{n.d(t,{$6:()=>l,A0:()=>s,Cs:()=>p,RW:()=>c,jK:()=>d,kM:()=>a,mh:()=>u,yA:()=>E,z0:()=>r,zz:()=>i});var o=n(69216);let i="UserUnAuthenticatedException",r="UserAlreadyAuthenticatedException",a="DeviceMetadataNotFoundException",s="AutoSignInException",c=new o.l({name:"InvalidRedirectException",message:"signInRedirect or signOutRedirect had an invalid format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."});new o.l({name:"InvalidAppSchemeException",message:"A valid non-http app scheme was not found in the config.",recoverySuggestion:"Please make sure a valid custom app scheme is present in the config."});let d=new o.l({name:"InvalidPreferredRedirectUrlException",message:"The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.",recoverySuggestion:"Please make sure a matching preferredRedirectUrl is provided."}),l=new o.l({name:"InvalidOriginException",message:"redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin",recoverySuggestion:"Please call signInWithRedirect from the same origin."}),u="OAuthSignOutException",p="TokenRefreshException",E="UnexpectedSignInInterruptionException"},30570:(e,t,n)=>{var o,i,r,a,s,c,d,l,u,p,E,h,g,m,f,S,y,x,I,A,v,w,C,R;n.d(t,{AU:()=>I,zh:()=>f}),function(e){e.ConcurrentModificationException="ConcurrentModificationException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"}(o||(o={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(i||(i={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UsernameExistsException="UsernameExistsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(r||(r={})),function(e){e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(a||(a={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"}(s||(s={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(c||(c={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(d||(d={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(l||(l={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPol
4icyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"}(u||(u={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(p||(p={})),function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"}(E||(E={})),function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"}(h||(h={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(g||(g={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException"}(m||(m={})),function(e){e.PasswordResetRequiredException="PasswordResetRequiredException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(f||(f={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPol
4icyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"}(S||(S={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.MFAMethodNotFoundException="MFAMethodNotFoundException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(y||(y={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(x||(x={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UsernameExistsException="UsernameExistsException"}(I||(I={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(A||(A={})),function(e){e.CodeMismatchException="CodeMismatchException",e.EnableSoftw
4areTokenMFAException="EnableSoftwareTokenMFAException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(v||(v={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(w||(w={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(C||(C={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(R||(R={}))},31622:(e,t,n)=>{n.d(t,{m:()=>i});var o=n(88968);let i={convert(e,t){let n=e;return t?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),(0,o.nW)()(n)}}},31626:(e,t,n)=>{n.d(t,{I:()=>s});var o=n(39526),i=n(44771),r=n(31622),a=n(26125);let s=({userPoolName:e,username:t,challengeParameters:n,dateNow:r,hkdf:s})=>{let d=a.U.convert(e),l=a.U.convert(t),u=c(n.SECRET_BLOCK),p=a.U.convert(r),E=new Uint8Array(d.byteLength+l.byteLength+u.byteLength+p.byteLength);E.set(d,0),E.set(l,d.byteLength),E.set(u,d.byteLength+l.byteLength),E.set(p,d.byteLength+l.byteLength+u.byteLength);let h=new o.I(s);h.update(E);let g=h.digestSync();return i.Y.convert(g)},c=e=>{let t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),o=r.m.convert(n),i=new Uint8Array(o.length);for(let e=0;e<o.length;++e)i[e]=o.charCodeAt(e);return i}},32042:(e,t,n)=>{n.d(t,{S:()=>c});var o=n(50160),i=n(67437),r=n(14920);let a="amplify-signin-with-hostedUI",s="CognitoIdentityServiceProvider";class c{constructor(e){this.keyValueStorage=e}async clearOAuthInflightData(){(0,o.$y)(this.cognitoConfig);let e=d(s,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(e.inflightOAuth),this.keyValueStorage.removeItem(e.oauthPKCE),this.keyValueStorage.removeItem(e.oauthState)])}async clearOAuthData(){(0,o.$y)(this.cognitoConfig);let e=d(s,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(a),this.keyValueStorage.removeItem(e.oauthSignIn)}loadOAuthState(){(0,o.$y)(this.cognitoConfig);let e=d(s,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthState)}storeOAuthState(e){(0,o.$y)(this.cognitoConfig);let t=d(s,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(t.oauthState,e)}loadPKCE(){(0,o.$y)(this.cognitoConfig);let e=d(s,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthPKCE)}storePKCE(e){(0,o.$y)(this.cognitoConfig);let t=d(s,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(t.oauthPKCE,e)}setAuthConfig(e){this.cognitoConfig=e}async loadOAuthInFlight(){(0,o.$y)(this.cognitoConfig);let e=d(s,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(e.inflightOAuth)==="true"}async storeOAuthInFlight(e){(0,o.$y)(this.cognitoConfig);let t=d(s,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(t.inflightOAuth,`${e}`)}async loadOAuthSignIn(){(0,o.$y)(this.cognitoConfig);let e=d(s,this.cognitoConfig.userPoolClientId),t=await this.keyValueStorage.getItem(a),[n,i]=(await this.keyValueStorage.getItem(e.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:"true"===n||"true"===t,preferPrivateSession:"true"===i}}async storeOAuthSignIn(e,t=!1){(0,o.$y)(this.cognitoConfig);let n=d(s,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.oauthSignIn,`${e},${t}`)}}let d=(e,t)=>(0,i.Qm)(r.f3)(e,t)},33451:(e,t,n)=>{n.d(t,{H:()=>F});var o=n(73311),i=n(50160),r=n(9588),a=n(43425),s=n(69789),c=n(85267);function d(e){return Object.entries(e).map(([e,t])=>({Name:e,Value:t}))}var l=n(35943),u=n(7823),p=n(69216),E=n(38876),h=n(30119),g=n(1297);function m(e,t){let n;return o=>{n||e(...o),clearTimeout(n),n=setTimeout(()=>{n=void 0},t)}}let f=m(function(e,t,n){let o=Date.now(),i=setInterval(async()=>
4{if(Date.now()-o>18e4)clearInterval(i),n(new p.l({name:h.A0,message:"The account was not confirmed on time.",recoverySuggestion:"Try to verify your account by clicking the link sent your email or phone and then login manually."})),(0,E.xO)();else try{let n=await (0,u.J)(e);"CONFIRM_SIGN_UP"!==n.nextStep.signInStep&&(t(n),clearInterval(i),(0,E.xO)())}catch(e){clearInterval(i),n(e),(0,E.xO)()}},5e3)},300),S=m(y,300);async function y(e,t,n){try{let n=e?.options?.authFlowType==="USER_AUTH"?await (0,g.k)(e):await (0,u.J)(e);t(n),(0,E.xO)()}catch(e){n(e),(0,E.xO)()}}function x(e){return async()=>new Promise((t,n)=>{S([e,t,n])})}var I=n(5213),A=n(22701),v=n(11529),w=n(47192),C=n(74390),R=n(85551),P=n(30570),T=n(92169),N=n(6254),U=n(41705),M=n(29073),_=n(2774);async function F(e){let t,{username:n,password:u,options:h}=e,g=o.H.getConfig().Auth?.Cognito,m=g?.signUpVerificationMethod??"code",{clientMetadata:S,validationData:y,autoSignIn:F}=e.options??{};(0,i.$y)(g),(0,a.M)(!!n,s.P.EmptySignUpUsername);let D="boolean"!=typeof F?F:void 0,O={username:n,options:D};D?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(O.password=u);let{userPoolId:k,userPoolClientId:b,userPoolEndpoint:L}=g,V=(t={endpointResolver:(0,M.o)({endpointOverride:L})},(0,v.A)(N.e,(0,T._)("SignUp"),async e=>{if(e.statusCode>=300){let t=await (0,w.F)(e);if((0,R.e)(t),t.name===P.AU.InvalidParameterException&&/'password'/.test(t.message)&&/Member must not be null/.test(t.message)){let e=s.P.EmptySignUpPassword,{message:t,recoverySuggestion:n}=C.ut[e];throw new p.l({name:e,message:t,recoverySuggestion:n})}throw new p.l({name:t.name,message:t.message})}return(0,w.Y)(e)},{...U.C,...t})),K={Username:n,Password:void 0,UserAttributes:h?.userAttributes&&d(h?.userAttributes),ClientMetadata:S,ValidationData:y&&d(y),ClientId:b,UserContextData:(0,I.d)({username:n,userPoolId:k,userPoolClientId:b})};u&&(K.Password=u);let{UserSub:q,CodeDeliveryDetails:B,UserConfirmed:$,Session:H}=await V({region:(0,c.J)(k),userAgentValue:(0,A.A)(r.BM.SignUp)},K);(D||!0===F)&&(_.z.dispatch({type:"START"}),_.z.dispatch({type:"SET_USERNAME",value:n}),_.z.dispatch({type:"SET_SESSION",value:H}));let W={destination:B?.Destination,deliveryMedium:B?.DeliveryMedium,attributeName:B?.AttributeName},z=_.z.getState().active;if($)return z?((0,E.K$)(x(O)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:q}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:q};if(z){if("link"===m)return(0,E.K$)(async()=>new Promise((e,t)=>{f([O,e,t])})),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:W},userId:q};let e=l.f3.listen("auth-internal",async({payload:t})=>{if("confirmSignUp"===t.event){let n=t.data;n?.isSignUpComplete&&(l.f3.dispatch("auth-internal",{event:"autoSignIn"}),(0,E.K$)(x(O)),e())}}),t=setTimeout(()=>{e(),clearTimeout(t),(0,E.xO)()},18e4)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:W},userId:q}}},35283:(e,t,n)=>{n.d(t,{d:()=>i});var o=n(68320);let i=e=>{if(e.length%2!=0)throw Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){let i=e.slice(n,n+2).toLowerCase();if(i in o.hv)t[n/2]=o.hv[i];else throw Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`)}return t}},35847:(e,t,n)=>{n.d(t,{d:()=>i});var o=n(20310);function i(e){let{dispatch:t}=o.c$;t({type:"SET_USERNAME",value:e})}},37999:(e,t,n)=>{n.d(t,{Q:()=>w,o:()=>C});var o=n(42014),i=n(50160),r=n(85267),a=n(14920),s=n(69216),c=n(29073),d=n(11529),l=n(92169),u=n(58392),p=n(6254),E=n(41705);let h=(e=>{let t;return async(...n)=>t||(t=new Promise((o,i)=>{e(...n).then(e=>{o(e)}).catch(e=>{i(e)}).finally(()=>{t=void 0})}))})(async({tokens:e,authConfig:t,username:n,clientMetadata:o})=>{let h;(0,i.$y)(t?.Cognito);let{userPoolId:g,userPoolClientId:m,userPoolEndpoint:f}=t.Cognito,S=(0,r.J)(g);(0,a.X4)(e);let y=(h={endpointResolver:(0,c.o)({endpointOverride:f})},(0,d.A)(p.e,(0,l._)("GetTokensFromRefreshToken"),(0,u.T)(),{...E.C,...h})),{AuthenticationResult:x}=await y({region:S},{ClientId:m,RefreshToken:e.refreshToken,DeviceKey:e.deviceMetadata?.deviceKey,ClientMetadata:o}),I=(0,i.Cq)(x?.AccessToken??""),A=x?.IdToken?(0,i.Cq)(x.IdToken):void 0,{iat:v}=I.payload;if(!v)throw new s.l({name:"iatNotFoundException",message:"iat not found in access token"});return{accessToken:I,idToken:A,clockDrift:1e3*v-new Date().getTime(),refreshToken:x?.RefreshToken??e.refreshToken,username:n}});var g=n(67437),m=n(35943),f=n(41113);function S({expiresAt:e,clockDrift:t,tolerance:n=5e3}){return Date.now()+t+n>e}var y=n(85551);let x=new(n(32042)).S(o.ZL),I=[];class A{constructor(){this.waitForInflightOAuth=(0,f.B)()?async()=>
4{if(await x.loadOAuthInFlight())return this.inflightPromise||(this.inflightPromise=new Promise((e,t)=>{I.push(e)})),this.inflightPromise}:async()=>{}}setAuthConfig(e){x.setAuthConfig(e.Cognito),this.authConfig=e}setTokenRefresher(e){this.tokenRefresher=e}setAuthTokenStore(e){this.tokenStore=e}getTokenStore(){if(!this.tokenStore)throw new s.l({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new s.l({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(e){this.clientMetadataProvider=e}async getTokens(e){let t;try{(0,i.$y)(this.authConfig?.Cognito)}catch(e){return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,t=await this.getTokenStore().loadTokens();let n=await this.getTokenStore().getLastAuthUser();if(null===t)return null;let o=!!t?.idToken&&S({expiresAt:(t.idToken?.payload?.exp??0)*1e3,clockDrift:t.clockDrift??0}),r=S({expiresAt:(t.accessToken?.payload?.exp??0)*1e3,clockDrift:t.clockDrift??0});return(e?.forceRefresh||o||r)&&null===(t=await this.refreshTokens({tokens:t,username:n,clientMetadata:e?.clientMetadata??await this.clientMetadataProvider?.()}))?null:{accessToken:t?.accessToken,idToken:t?.idToken,signInDetails:t?.signInDetails}}async refreshTokens({tokens:e,username:t,clientMetadata:n}){try{let{signInDetails:o}=e,i=await this.getTokenRefresher()({tokens:e,authConfig:this.authConfig,username:t,clientMetadata:n});return i.signInDetails=o,await this.setTokens({tokens:i}),m.YZ.dispatch("auth",{event:"tokenRefresh"},"Auth",m.U9),i}catch(e){return this.handleErrors(e)}}handleErrors(e){if((0,y.e)(e),this.isAuthenticationError(e)&&this.clearTokens(),m.YZ.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",m.U9),e.name.startsWith("NotAuthorizedException"))return null;throw e}isAuthenticationError(e){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(t=>e?.name?.startsWith?.(t))}async setTokens({tokens:e}){return this.getTokenStore().storeTokens(e)}async clearTokens(){return this.getTokenStore().clearTokens()}getDeviceMetadata(e){return this.getTokenStore().getDeviceMetadata(e)}clearDeviceMetadata(e){return this.getTokenStore().clearDeviceMetadata(e)}setOAuthMetadata(e){return this.getTokenStore().setOAuthMetadata(e)}getOAuthMetadata(){return this.getTokenStore().getOAuthMetadata()}}class v{constructor(){this.authTokenStore=new g.Uv,this.authTokenStore.setKeyValueStorage(o.ZL),this.tokenOrchestrator=new A,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(h)}getTokens(e={}){return this.tokenOrchestrator.getTokens(e)}setKeyValueStorage(e){this.authTokenStore.setKeyValueStorage(e)}setClientMetadataProvider(e){this.tokenOrchestrator.setClientMetadataProvider(e)}setAuthConfig(e){this.authTokenStore.setAuthConfig(e),this.tokenOrchestrator.setAuthConfig(e)}}let w=new v,{tokenOrchestrator:C}=w},38876:(e,t,n)=>{n.d(t,{K$:()=>c,eA:()=>s,xO:()=>d});var o=n(2774),i=n(69216),r=n(30119);let a=async()=>{throw new i.l({name:r.A0,message:"The autoSignIn flow has not started, or has been cancelled/completed.",recoverySuggestion:"Please try to use the signIn API or log out before starting a new autoSignIn flow."})},s=a;function c(e){s=e}function d(e=!0){e&&(s=a),o.z.dispatch({type:"RESET"})}},41004:(e,t,n)=>{let o,i,r;function a(e,t){null!=e&&this.fromString(e,t)}function s(){return new a(null,null)}n.d(t,{A:()=>a});let c="undefined"!=typeof navigator;c&&"Microsoft Internet Explorer"===navigator.appName?(a.prototype.am=function(e,t,n,o,i,r){let a=32767&t,s=t>>15;for(;--r>=0;){let t=32767&this[e],r=this[e++]>>15,c=s*t+r*a;i=((t=a*t+((32767&c)<<15)+n[o]+(0x3fffffff&i))>>>30)+(c>>>15)+s*r+(i>>>30),n[o++]=0x3fffffff&t}return i},o=30):c&&"Netscape"!==navigator.appName?(a.prototype.am=function(e,t,n,o,i,r){for(;--r>=0;){let r=t*this[e++]+n[o]+i;i=Math.floor(r/0x4000000),n[o++]=0x3ffffff&r}return i},o=26):(a.prototype.am=function(e,t,n,o,i,r){let a=16383&t,s=t>>14;for(;--r>=0;){let t=16383&this[e],r=this[e++]>>14,c=s*t+r*a;i=((t=a*t+((16383&c)<<14)+n[o]+i)>>28)+(c>>14)+s*r,n[o++]=0xfffffff&t}return i},o=28),a.prototype.DB=o,a.prototype.DM=(1<<o)-1,a.prototype.DV=1<<o,a.prototype.FV=0x10000000000000,a.prototype.F1=52-o,a.prototype.F2=2*o-52;let d=[];for(r=0,i=48;r<=9;++r)d[i++]=r;for(r=10,i=97;r<36;++r)d[i++]=r;for(r=10,i=65;r<36;++r)d[i++]=r;function l(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function u(e){let t=s();return t.fromInt(e),t}function p(e){let t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function E(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>
4>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}E.prototype.convert=function(e){let t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(a.ZERO)>0&&this.m.subTo(t,t),t},E.prototype.revert=function(e){let t=s();return e.copyTo(t),this.reduce(t),t},E.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(let t=0;t<this.m.t;++t){let n=32767&e[t],o=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,o,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},E.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},E.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},a.prototype.copyTo=function(e){for(let t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},a.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},a.prototype.fromString=function(e,t){let n;if(16===t)n=4;else if(8===t)n=3;else if(2===t)n=1;else if(32===t)n=5;else if(4===t)n=2;else throw Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let o=e.length,i=!1,r=0;for(;--o>=0;){let t=function(e,t){let n=d[e.charCodeAt(t)];return null==n?-1:n}(e,o);if(t<0){"-"===e.charAt(o)&&(i=!0);continue}i=!1,0===r?this[this.t++]=t:r+n>this.DB?(this[this.t-1]|=(t&(1<<this.DB-r)-1)<<r,this[this.t++]=t>>this.DB-r):this[this.t-1]|=t<<r,(r+=n)>=this.DB&&(r-=this.DB)}this.clamp(),i&&a.ZERO.subTo(this,this)},a.prototype.clamp=function(){let e=this.s&this.DM;for(;this.t>0&&this[this.t-1]==e;)--this.t},a.prototype.dlShiftTo=function(e,t){let n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},a.prototype.drShiftTo=function(e,t){for(let n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},a.prototype.lShiftTo=function(e,t){let n,o=e%this.DB,i=this.DB-o,r=(1<<i)-1,a=Math.floor(e/this.DB),s=this.s<<o&this.DM;for(n=this.t-1;n>=0;--n)t[n+a+1]=this[n]>>i|s,s=(this[n]&r)<<o;for(n=a-1;n>=0;--n)t[n]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},a.prototype.rShiftTo=function(e,t){t.s=this.s;let n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}let o=e%this.DB,i=this.DB-o,r=(1<<o)-1;t[0]=this[n]>>o;for(let e=n+1;e<this.t;++e)t[e-n-1]|=(this[e]&r)<<i,t[e-n]=this[e]>>o;o>0&&(t[this.t-n-1]|=(this.s&r)<<i),t.t=this.t-n,t.clamp()},a.prototype.subTo=function(e,t){let n=0,o=0,i=Math.min(e.t,this.t);for(;n<i;)o+=this[n]-e[n],t[n++]=o&this.DM,o>>=this.DB;if(e.t<this.t){for(o-=e.s;n<this.t;)o+=this[n],t[n++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;n<e.t;)o-=e[n],t[n++]=o&this.DM,o>>=this.DB;o-=e.s}t.s=o<0?-1:0,o<-1?t[n++]=this.DV+o:o>0&&(t[n++]=o),t.t=n,t.clamp()},a.prototype.multiplyTo=function(e,t){let n=this.abs(),o=e.abs(),i=n.t;for(t.t=i+o.t;--i>=0;)t[i]=0;for(i=0;i<o.t;++i)t[i+n.t]=n.am(0,o[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!==e.s&&a.ZERO.subTo(t,t)},a.prototype.squareTo=function(e){let t=this.abs(),n=e.t=2*t.t;for(;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){let o=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,o,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},a.prototype.divRemTo=function(e,t,n){let o=e.abs();if(o.t<=0)return;let i=this.abs();if(i.t<o.t){null!=t&&t.fromInt(0),null!=n&&this.copyTo(n);return}null===n&&(n=s());let r=s(),c=this.s,d=e.s,l=this.DB-p(o[o.t-1]);l>0?(o.lShiftTo(l,r),i.lShiftTo(l,n)):(o.copyTo(r),i.copyTo(n));let u=r.t,E=r[u-1];if(0===E)return;let h=E*(1<<this.F1)+(u>1?r[u-2]>>this.F2:0),g=this.FV/h,m=(1<<this.F1)/h,f=1<<this.F2,S=n.t,y=S-u,x=null===t?s():t;for(r.dlShiftTo(y,x),n.compareTo(x)>=0&&(n[n.t++]=1,n.subTo(x,n)),a.ONE.dlShiftTo(u,x),x.subTo(r,r);r.t<u;)r[r.t++]=0;for(;--y>=0;){let e=n[--S]===E?this.DM:Math.floor(n[S]*g+(n[S-1]+f)*m);if((n[S]+=r.am(0,e,n,y,0,u))<e)for(r.dlShiftTo(y,x),n.subTo(x,n);n[S]<--e;)n.subTo(x,n)}null!==t&&(n.drShiftTo(u,t),c!==d&&a.ZERO.subTo(t,t)),n.t=u,n.clamp(),l>0&&n.rShiftTo(l,n),c<0&&a.ZERO.subTo(n,n)},a.prototype.invDigit=function(){if(this.t<1)return 0;let e=this[0];if((1&e)==0)return 0;let t=3&e;
4return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},a.prototype.addTo=function(e,t){let n=0,o=0,i=Math.min(e.t,this.t);for(;n<i;)o+=this[n]+e[n],t[n++]=o&this.DM,o>>=this.DB;if(e.t<this.t){for(o+=e.s;n<this.t;)o+=this[n],t[n++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;n<e.t;)o+=e[n],t[n++]=o&this.DM,o>>=this.DB;o+=e.s}t.s=o<0?-1:0,o>0?t[n++]=o:o<-1&&(t[n++]=this.DV+o),t.t=n,t.clamp()},a.prototype.toString=function(e){let t,n;if(this.s<0)return"-"+this.negate().toString(e);if(16==e)t=4;else if(8===e)t=3;else if(2===e)t=1;else if(32===e)t=5;else if(4===e)t=2;else throw Error("Only radix 2, 4, 8, 16, 32 are supported");let o=(1<<t)-1,i=!1,r="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(n=this[a]>>s)>0&&(i=!0,r=l(n));a>=0;)s<t?n=(this[a]&(1<<s)-1)<<t-s|this[--a]>>(s+=this.DB-t):(n=this[a]>>(s-=t)&o,s<=0&&(s+=this.DB,--a)),n>0&&(i=!0),i&&(r+=l(n));return i?r:"0"},a.prototype.negate=function(){let e=s();return a.ZERO.subTo(this,e),e},a.prototype.abs=function(){return this.s<0?this.negate():this},a.prototype.compareTo=function(e){let t=this.s-e.s;if(0!=t)return t;let n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},a.prototype.mod=function(e){let t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(a.ZERO)>0&&e.subTo(t,t),t},a.prototype.equals=function(e){return 0===this.compareTo(e)},a.prototype.add=function(e){let t=s();return this.addTo(e,t),t},a.prototype.subtract=function(e){let t=s();return this.subTo(e,t),t},a.prototype.multiply=function(e){let t=s();return this.multiplyTo(e,t),t},a.prototype.divide=function(e){let t=s();return this.divRemTo(e,t,null),t},a.prototype.modPow=function(e,t,n){let o,i,r,a=e.bitLength(),c=u(1),d=new E(t);if(a<=0)return c;let l=[],h=3,g=(o=a<18?1:a<48?3:a<144?4:a<768?5:6)-1,m=(1<<o)-1;if(l[1]=d.convert(this),o>1){let e=s();for(d.sqrTo(l[1],e);h<=m;)l[h]=s(),d.mulTo(e,l[h-2],l[h]),h+=2}let f=e.t-1,S=!0,y=s();for(a=p(e[f])-1;f>=0;){for(a>=g?i=e[f]>>a-g&m:(i=(e[f]&(1<<a+1)-1)<<g-a,f>0&&(i|=e[f-1]>>this.DB+a-g)),h=o;(1&i)==0;)i>>=1,--h;if((a-=h)<0&&(a+=this.DB,--f),S)l[i].copyTo(c),S=!1;else{for(;h>1;)d.sqrTo(c,y),d.sqrTo(y,c),h-=2;h>0?d.sqrTo(c,y):(r=c,c=y,y=r),d.mulTo(y,l[i],c)}for(;f>=0&&(e[f]&1<<a)==0;)d.sqrTo(c,y),r=c,c=y,y=r,--a<0&&(a=this.DB-1,--f)}let x=d.revert(c);return n(null,x),x},a.ZERO=u(0),a.ONE=u(1)},41113:(e,t,n)=>{n.d(t,{B:()=>o});let o=()=>"undefined"!=typeof window&&void 0!==window.document},41705:(e,t,n)=>{n.d(t,{C:()=>s});var o=n(30861),i=n(47192),r=n(53110),a=n(29567);let s={service:n(23937).M,retryDecider:(0,o.D)(i.F),computeDelay:r.y,get userAgentValue(){return(0,a.fE)()},cache:"no-store"}},42014:(e,t,n)=>{n.d(t,{ZL:()=>g,pR:()=>m});var o=n(26348),i=n(35993);class r extends i.x{constructor(){super({name:o.m.PlatformNotSupported,message:"Function not supported on current platform"})}}class a{constructor(e){this.storage=e}async setItem(e,t){if(!this.storage)throw new r;this.storage.setItem(e,t)}async getItem(e){if(!this.storage)throw new r;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new r;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new r;this.storage.clear()}}var s=n(94389);class c{constructor(){this.storage=new Map}get length(){return this.storage.size}key(e){return e>this.length-1?null:Array.from(this.storage.keys())[e]}setItem(e,t){this.storage.set(e,t)}getItem(e){return this.storage.get(e)??null}removeItem(e){this.storage.delete(e)}clear(){this.storage.clear()}}let d=new s.C("CoreStorageUtils"),l=()=>{try{if("undefined"!=typeof window&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw Error("sessionStorage is not defined")}catch(e){return d.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new c}};class u extends a{constructor(){super((()=>{try{if("undefined"!=typeof window&&window.localStorage)return window.localStorage}catch(e){d.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new c})())}}class p extends a{constructor(){super(l())}}class E{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new r;return this._storage}setItem(e,t){this.storage.setItem(e,t)}getItem(e){return this.storage.getItem(e)}removeItem(e){this.storage.removeItem(e)}clear(){this.storage.clear()}}
4class h extends E{constructor(){super(l())}}let g=new u;new p;let m=new h;new a(new c)},43425:(e,t,n)=>{n.d(t,{M:()=>r});var o=n(74390),i=n(69216);function r(e,t){let{message:n,recoverySuggestion:r}=o.ut[t];if(!e)throw new i.l({name:t,message:n,recoverySuggestion:r})}},44771:(e,t,n)=>{n.d(t,{Y:()=>i});var o=n(88968);let i={convert(e,t={urlSafe:!1,skipPadding:!1}){let n="string"==typeof e?e:Array.from(e,e=>String.fromCodePoint(e)).join(""),i=(0,o.xA)()(n);return t.urlSafe&&(i=i.replace(/\+/g,"-").replace(/\//g,"_")),t.skipPadding&&(i=i.replace(/=/g,"")),i}}},50160:(e,t,n)=>{n.d(t,{Eh:()=>l,G6:()=>d,$y:()=>c,Cq:()=>u});var o,i=n(31622),r=n(23411);!function(e){e.AuthTokenConfigException="AuthTokenConfigException",e.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",e.AuthUserPoolException="AuthUserPoolException",e.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",e.OAuthNotConfigureException="OAuthNotConfigureException"}(o||(o={}));let a={[o.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[o.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[o.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[o.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[o.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},s=(0,r.p)(a);function c(e){s(!!e&&!!e.userPoolId&&!!e.userPoolClientId,o.AuthUserPoolException)}function d(e){s(!!e?.loginWith?.oauth?.domain&&!!e?.loginWith?.oauth?.redirectSignOut&&!!e?.loginWith?.oauth?.redirectSignIn&&!!e?.loginWith?.oauth?.responseType,o.OAuthNotConfigureException)}function l(e){s(!!e?.identityPoolId,o.InvalidIdentityPoolIdException)}function u(e){let t=e.split(".");if(3!==t.length)throw Error("Invalid token");try{let n=t[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(i.m.convert(n).split("").map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),r=JSON.parse(o);return{toString:()=>e,payload:r}}catch(e){throw Error("Invalid token payload")}}},53708:(e,t,n)=>{n.d(t,{i:()=>i});var o=n(69216);async function i(e,t,n,i){try{return await e(...t)}catch(r){if(r instanceof o.l&&"ResourceNotFoundException"===r.name&&r.message.includes("Device does not exist."))return await i.clearDeviceMetadata(n),e(...t);throw r}}},56253:(e,t,n)=>{n.d(t,{H:()=>I});var o=n(69216),i=n(26125),r=n(41004);let a=async({a:e,g:t,k:n,x:o,B:i,N:r,U:a})=>new Promise((s,c)=>{t.modPow(o,r,(t,d)=>{if(t)return void c(t);i.subtract(n.multiply(d)).modPow(e.add(a.multiply(o)),r,(e,t)=>{if(e)return void c(e);s(t.mod(r))})})});var s=n(35283),c=n(39526),d=n(68320);let l=e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=d.pU[e[n]];return t},u=e=>{let t=new c.I;t.update(e);let n=l(t.digestSync());return Array(64-n.length).join("0")+n},p=e=>u((0,s.d)(e)),E=/^[89a-f]/i,h=e=>{if(!(e instanceof r.A))throw Error("Not a BigInteger");let t=0>e.compareTo(r.A.ZERO),n=e.abs().toString(16);if(n=n.length%2!=0?`0${n}`:n,n=E.test(n)?`00${n}`:n,t){let e=n.split("").map(e=>{let t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)}).join("");(n=new r.A(e,16).add(r.A.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n};var g=n(88968);class m{constructor(e,t){this.words=[];let n=e;n=this.words=n||[],void 0!==t?this.sigBytes=t:this.sigBytes=4*n.length}random(e){let t=[];for(let n=0;n<e;n+=4)t.push((0,g.MY)().getRandomValues(new Uint32Array(1))[0]);return new m(t,e)}toString(){return function(e){let{words:t}=e,{sigBytes:n}=e,o=[];for(let e=0;e<n;e++){let n=t[e>>>2]>>>24-e%4*8&255;o.push((n>>>4).toString(16)),o.push((15&n).toString(16))}return o.join("")}(this)}}let f=e=>{let t=new m().random(e).toString();return(0,s.d)(t)};var S=n(44771);
4class y{constructor({userPoolName:e,a:t,g:n,A:o,N:a}){this.encoder=i.U,this.userPoolName=e,this.a=t,this.g=n,this.A=o,this.N=a,this.k=new r.A(p(`${h(a)}${h(n)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new o.l({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new o.l({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new o.l({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(e,t){this.randomPassword=S.Y.convert(f(40));let n=u(`${e}${t}:${this.randomPassword}`),o=l(f(16));return this.saltToHashDevices=h(new r.A(o,16)),new Promise((e,t)=>{this.g.modPow(new r.A(p(this.saltToHashDevices+n),16),this.N,(n,o)=>{if(n)return void t(n);this.verifierDevices=h(o),e()})})}async getPasswordAuthenticationKey({username:e,password:t,serverBValue:n,salt:o}){if(n.mod(this.N).equals(r.A.ZERO))throw Error("B cannot be zero.");let i=(({A:e,B:t})=>{let n=new r.A(p(h(e)+h(t)),16);if(n.equals(r.A.ZERO))throw Error("U cannot be zero.");return n})({A:this.A,B:n}),d=u(`${this.userPoolName}${e}:${t}`),l=new r.A(p(h(o)+d),16),E=await a({a:this.a,g:this.g,k:this.k,x:l,B:n,N:this.N,U:i}),g=this.encoder.convert("Caldera Derived Key"),m=this.encoder.convert("\x01"),f=new Uint8Array(g.byteLength+m.byteLength);return f.set(g,0),f.set(m,g.byteLength),((e,t,n)=>{let o=new c.I(t);o.update(e);let i=o.digestSync(),r=new c.I(i);return r.update(n),r.digestSync().slice(0,16)})((0,s.d)(h(E)),(0,s.d)(h(i)),f)}}let x=async({a:e,g:t,N:n})=>new Promise((o,i)=>{t.modPow(e,n,(e,t)=>e?void i(e):t.mod(n).equals(r.A.ZERO)?void i(Error("Illegal parameter. A mod N cannot be 0.")):void o(t))}),I=async e=>{let t=new r.A(d.oA,16),n=new r.A("2",16),o=A(),i=await x({a:o,g:n,N:t});return new y({userPoolName:e,a:o,g:n,A:i,N:t})},A=()=>{let e=l(f(128));return new r.A(e,16)}},56626:(e,t,n)=>{n.d(t,{R:()=>c});var o=n(11529),i=n(92169),r=n(58392),a=n(6254),s=n(41705);let c=e=>(0,o.A)(a.e,(0,i._)("InitiateAuth"),(0,r.T)(),{...s.C,...e})},57541:(e,t,n)=>{n.d(t,{r:()=>m});var o=n(73311),i=n(50160),r=n(20310),a=n(69216),s=n(15050),c=n(85551),d=n(43425),l=n(69789),u=n(74390),p=n(28404),E=n(37999),h=n(28803),g=n(90724);async function m(e){let{challengeResponse:t,options:n}=e,{username:m,challengeName:f,signInSession:S,signInDetails:y}=r.c$.getState(),x=o.H.getConfig().Auth?.Cognito;(0,i.$y)(x);let I=n?.clientMetadata;if((0,d.M)(!!t,l.P.EmptyChallengeResponse),!m||!f||!S)throw new a.l({name:u.nC.SignInException,message:`
5			An error occurred during the sign in process.
6
7			This most likely occurred due to:
8			1. signIn was not called before confirmSignIn.
9			2. signIn threw an exception.
10			3. page was refreshed during the sign in flow and session has expired.
11			`,recoverySuggestion:"Make sure a successful call to signIn is made before calling confirmSignInand that the session has not expired."});try{let{Session:e,ChallengeName:o,AuthenticationResult:i,ChallengeParameters:a}=await (0,s.XE)(m,f,S,t,x,E.o,I,n);if((0,r.wr)({signInSession:e,username:m,challengeName:o,signInDetails:y}),i)return await (0,p.i)({username:m,...i,NewDeviceMetadata:await (0,g.i)({userPoolId:x.userPoolId,userPoolEndpoint:x.userPoolEndpoint,newDeviceMetadata:i.NewDeviceMetadata,accessToken:i.AccessToken}),signInDetails:y}),(0,r.jN)(),await (0,h.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,s.q2)({challengeName:o,challengeParameters:a})}catch(t){(0,c.e)(t);let e=(0,s.m$)(t.name);if(e)return e;throw t}}},58392:(e,t,n)=>{n.d(t,{T:()=>a});var o=n(47192),i=n(85551),r=n(69216);let a=()=>async e=>{if(e.statusCode>=300){let t=await (0,o.F)(e);throw(0,i.e)(t),new r.l({name:t.name,message:t.message,metadata:t.$metadata})}return(0,o.Y)(e)}},59615:(e,t,n)=>{n.d(t,{z:()=>x});var o=n(73311),i=n(50160),r=n(9588),a=n(35943),s=n(43425),c=n(69789),d=n(85267),l=n(22701),u=n(5213),p=n(11529),E=n(41705),h=n(6254),g=n(92169),m=n(58392),f=n(29073),S=n(2774),y=n(38876);async function x(e){let t,{username:n,confirmationCode:x,options:I}=e,A=o.H.getConfig().Auth?.Cognito;(0,i.$y)(A);let{userPoolId:v,userPoolClientId:w,userPoolEndpoint:C}=A,R=I?.clientMetadata;(0,s.M)(!!n,c.P.EmptyConfirmSignUpUsername),(0,s.M)(!!x,c.P.EmptyConfirmSignUpCode);let P=(0,u.d)({username:n,userPoolId:v,userPoolClientId:w}),T=(t={endpointResolver:(0,f.o)({endpointOverride:C})},(0,p.A)(h.e,(0,g._)("ConfirmSignUp"),(0,m.T)(),{...E.C,...t})),{Session:N}=await T({region:(0,d.J)(A.userPoolId),userAgentValue:(0,l.A)(r.BM.ConfirmSignUp)},{Username:n,ConfirmationCode:x,ClientMetadata:R,ForceAliasCreation:I?.forceAliasCreation,ClientId:A.userPoolClientId,UserContextData:P});return new Promise((e,t)=>
11{try{let t={isSignUpComplete:!0,nextStep:{signUpStep:"DONE"}},o=S.z.getState();if(!o.active||o.username!==n){e(t),(0,y.xO)();return}S.z.dispatch({type:"SET_SESSION",value:N});let i=a.f3.listen("auth-internal",({payload:t})=>{"autoSignIn"===t.event&&(e({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),i())});a.f3.dispatch("auth-internal",{event:"confirmSignUp",data:t})}catch(e){t(e)}})}},61056:(e,t,n)=>{n.d(t,{L:()=>E});var o=n(9588),i=n(5213),r=n(56253);n(39526);var a=n(56626),s=n(29073),c=n(85267),d=n(22701),l=n(3637),u=n(53708),p=n(35847);async function E({username:e,password:t,clientMetadata:n,config:E,tokenOrchestrator:h,authFlow:g,preferredChallenge:m}){let{userPoolId:f,userPoolClientId:S,userPoolEndpoint:y}=E,x=f?.split("_")[1]||"",I=await (0,r.H)(x),A={USERNAME:e,SRP_A:I.A.toString(16)};"USER_AUTH"===g&&m&&(A.PREFERRED_CHALLENGE=m);let v=(0,i.d)({username:e,userPoolId:f,userPoolClientId:S}),w=(0,a.R)({endpointResolver:(0,s.o)({endpointOverride:y})}),C=await w({region:(0,c.J)(f),userAgentValue:(0,d.A)(o.BM.SignIn)},{AuthFlow:g,AuthParameters:A,ClientMetadata:n,ClientId:S,UserContextData:v}),{ChallengeParameters:R,Session:P}=C,T=R?.USERNAME??e;return((0,p.d)(T),"PASSWORD_VERIFIER"===C.ChallengeName)?(0,u.i)(l.f,[t,R,n,P,I,E,h],T,h):C}},61058:(e,t,n)=>{let o;n.d(t,{r:()=>d});let i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}
11,r=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));let s=function(e,t,n){if(i.randomUUID&&!t&&!e)return i.randomUUID();let s=(e=e||{}).random??e.rng?.()??function(){if(!o){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");o=crypto.getRandomValues.bind(crypto)}return o(r)}();if(s.length<16)throw Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=s[e];return t}return function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(s)};n(39526),n(78652);var c=n(1133);let d=()=>e=>async function(t){return t.headers[c.jy]||(t.headers[c.jy]=s()),e(t)}},67437:(e,t,n)=>{n.d(t,{Uv:()=>u,Qm:()=>E});var o,i=n(50160),r=n(69216);let a={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var s=n(23411);(o||(o={})).InvalidAuthTokens="InvalidAuthTokens";let c={[o.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},d=(0,s.p)(c),l="CognitoIdentityServiceProvider";class u{getKeyValueStorage(){if(!this.keyValueStorage)throw new r.l({name:"KeyValueStorageNotFoundException",message:"KeyValueStorage was not found in TokenStore"});return this.keyValueStorage}setKeyValueStorage(e){this.keyValueStorage=e}setAuthConfig(e){this.authConfig=e}async loadTokens(){try{let e=await this.getAuthKeys(),t=await this.getKeyValueStorage().getItem(e.accessToken);if(!t)throw new r.l({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});let n=(0,i.Cq)(t),o=await this.getKeyValueStorage().getItem(e.idToken),a=o?(0,i.Cq)(o):void 0,s=await this.getKeyValueStorage().getItem(e.refreshToken)??void 0,c=await this.getKeyValueStorage().getItem(e.clockDrift)??"0",d=Number.parseInt(c),l=await this.getKeyValueStorage().getItem(e.signInDetails),u={accessToken:n,idToken:a,refreshToken:s,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:d,username:await this.getLastAuthUser()};return l&&(u.signInDetails=JSON.parse(l)),u}catch(e){return null}}async storeTokens(e){d(void 0!==e,o.InvalidAuthTokens);let t=e.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),t);let n=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n.accessToken,e.accessToken.toString()),e.idToken?await this.getKeyValueStorage().setItem(n.idToken,e.idToken.toString()):await this.getKeyValueStorage().removeItem(n.idToken),e.refreshToken?await this.getKeyValueStorage().setItem(n.refreshToken,e.refreshToken):await this.getKeyValueStorage().removeItem(n.refreshToken),e.deviceMetadata&&(e.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(n.deviceKey,e.deviceMetadata.deviceKey),e.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(n.deviceGroupKey,e.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(n.randomPasswordKey,e.deviceMetadata.randomPassword)),e.signInDetails?await this.getKeyValueStorage().setItem(n.signInDetails,JSON.stringify(e.signInDetails)):await this.getKeyValueStorage().removeItem(n.signInDetails),await this.getKeyValueStorage().setItem(n.clockDrift,`${e.clockDrift}`)}async clearTokens(){let e=await this.getAuthKeys();await Promise.all([this.getKeyValueStorage().removeItem(e.accessToken),this.getKeyValueStorage().removeItem(e.idToken),this.getKeyValueStorage().removeItem(e.clockDrift),this.getKeyValueStorage().removeItem(e.refreshToken),this.getKeyValueStorage().removeItem(e.signInDetails),this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),this.getKeyValueStorage().removeItem(e.oauthMetadata)])}async getDeviceMetadata(e){let t=await this.getAuthKeys(e),n=await this.getKeyValueStorage().getItem(t.deviceKey),o=await this.getKeyValueStorage().getItem(t.deviceGroupKey),i=await this.getKeyValueStorage().getItem(t.randomPasswordKey);return i&&o&&n?{deviceKey:n,deviceGroupKey:o,randomPassword:i}:null}async clearDeviceMetadata(e){let t=await this.getAuthKeys(e);await Promise.all([this.getKeyValueStorage().removeItem(t.deviceKey),this.getKeyValueStorage().removeItem(t.deviceGroupKey),this.getKeyValueStorage().removeItem(t.randomPasswordKey)])}async getAuthKeys(e){(0,i.$y)(this.authConfig?.Cognito);let t=e??await this.getLastAuthUser();return p(l,`${this.authConfig.Cognito.userPoolClientId}.${t}`)}getLastAuthUserKey(){(0,i.$y)(this.authConfig?.Cognito);let e=this.authConfig.Cognito.userPoolClientId;return`${l}.${e}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(e){let{oauthMetadata:t}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(t,JSON.stringify(e))}async getOAuthMetadata(){let{oauthMetadata:e}=await this.getAuthKeys(),t=await this.getKeyValueStorage().getItem(e);return t&&JSON.parse(t)}}let p=(e,t)=>E(a)(`${e}`,t);function E(e){let t=Object.values({...e});return(e,n)=>t.reduce((t,o)=>({...t,[o]:`${e}.${n}.${o}`}),{})}},68320:(e,t,n)=>{n.d(t,{hv:()=>r,oA:()=>o,pU:()=>i});let o="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E
117EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",i={},r={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),i[e]=t,r[t]=e}},69216:(e,t,n)=>{n.d(t,{l:()=>i});var o=n(35993);class i extends o.x{constructor(e){super(e),this.constructor=i,Object.setPrototypeOf(this,i.prototype)}}},69232:(e,t,n)=>{n.d(t,{H:()=>c});var o=n(11529),i=n(6254),r=n(92169),a=n(58392),s=n(41705);let c=e=>(0,o.A)(i.e,(0,r._)("RespondToAuthChallenge"),(0,a.T)(),{...s.C,...e})},69789:(e,t,n)=>{var o;n.d(t,{P:()=>o}),function(e){e.EmptySignInUsername="EmptySignInUsername",e.EmptySignInPassword="EmptySignInPassword",e.CustomAuthSignInPassword="CustomAuthSignInPassword",e.EmptySignUpUsername="EmptySignUpUsername",e.EmptySignUpPassword="EmptySignUpPassword",e.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",e.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",e.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",e.EmptyChallengeResponse="EmptyChallengeResponse",e.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",e.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",e.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",e.EmptyResetPasswordUsername="EmptyResetPasswordUsername",e.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",e.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",e.IncorrectMFAMethod="IncorrectMFAMethod",e.EmptyUpdatePassword="EmptyUpdatePassword",e.InvalidPreferredChallenge="InvalidPreferredChallenge"}(o||(o={}))},74390:(e,t,n)=>{n.d(t,{nC:()=>i,ut:()=>a});var o,i,r=n(69789);let a={[r.P.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[r.P.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[r.P.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[r.P.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[r.P.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[r.P.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[r.P.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[r.P.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[r.P.EmptySignInPassword]:{message:"password is required to signIn"},[r.P.EmptySignInUsername]:{message:"username is required to signIn"},[r.P.EmptySignUpPassword]:{message:"password is required to signUp"},[r.P.EmptySignUpUsername]:{message:"username is required to signUp"},[r.P.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[r.P.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[r.P.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[r.P.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[r.P.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[r.P.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};
11!function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in",e.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"}(o||(o={})),function(e){e.SignInException="SignInException",e.OAuthSignInError="OAuthSignInException"}(i||(i={}))},74596:(e,t,n)=>{n.d(t,{O:()=>p});var o=n(69232),i=n(29073),r=n(85267),a=n(14920),s=n(56253),c=n(90216),d=n(31626),l=n(41004),u=n(5213);async function p({username:e,config:t,clientMetadata:n,session:c,tokenOrchestrator:d}){let{userPoolId:l,userPoolEndpoint:u}=t,p=t.userPoolClientId,h=await d?.getDeviceMetadata(e);(0,a.O_)(h);let g=await (0,s.H)(h.deviceGroupKey),m={USERNAME:e,SRP_A:g.A.toString(16),DEVICE_KEY:h.deviceKey},f=(0,o.H)({endpointResolver:(0,i.o)({endpointOverride:u})}),{ChallengeParameters:S,Session:y}=await f({region:(0,r.J)(l)},{ChallengeName:"DEVICE_SRP_AUTH",ClientId:p,ChallengeResponses:m,ClientMetadata:n,Session:c});return E(e,S,n,y,g,t,d)}async function E(e,t,n,s,p,{userPoolId:E,userPoolClientId:h,userPoolEndpoint:g},m){let f=await m?.getDeviceMetadata(e);(0,a.O_)(f);let S=new l.A(t?.SRP_B,16),y=new l.A(t?.SALT,16),{deviceKey:x}=f,{deviceGroupKey:I}=f,A=await p.getPasswordAuthenticationKey({username:f.deviceKey,password:f.randomPassword,serverBValue:S,salt:y}),v=(0,c.q)(),w={USERNAME:t?.USERNAME??e,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:v,PASSWORD_CLAIM_SIGNATURE:(0,d.I)({username:x,userPoolName:I,challengeParameters:t,dateNow:v,hkdf:A}),DEVICE_KEY:x},C=(0,u.d)({username:e,userPoolId:E,userPoolClientId:h});return(0,o.H)({endpointResolver:(0,i.o)({endpointOverride:g})})({region:(0,r.J)(E)},{ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:h,ChallengeResponses:w,Session:s,ClientMetadata:n,UserContextData:C})}},82660:(e,t,n)=>{n.d(t,{h:()=>f});var o=n(73311),i=n(50160),r=n(9588),a=n(43425),s=n(69789),c=n(85267),d=n(22701),l=n(5213),u=n(11529),p=n(6254),E=n(92169),h=n(58392),g=n(41705),m=n(29073);async function f(e){let t,{username:n}=e;(0,a.M)(!!n,s.P.EmptySignUpUsername);let f=o.H.getConfig().Auth?.Cognito;(0,i.$y)(f);let{userPoolClientId:S,userPoolId:y,userPoolEndpoint:x}=f,I=e.options?.clientMetadata,A=(0,l.d)({username:n,userPoolId:y,userPoolClientId:S}),v=(t={endpointResolver:(0,m.o)({endpointOverride:x})},(0,u.A)(p.e,(0,E._)("ResendConfirmationCode"),(0,h.T)(),{...g.C,...t})),{CodeDeliveryDetails:w}=await v({region:(0,c.J)(f.userPoolId),userAgentValue:(0,d.A)(r.BM.ResendSignUpCode)},{Username:n,ClientMetadata:I,ClientId:f.userPoolClientId,UserContextData:A}),{DeliveryMedium:C,AttributeName:R,Destination:P}={...w};return{destination:P,deliveryMedium:C,attributeName:R||void 0}}},85267:(e,t,n)=>{n.d(t,{C:()=>r,J:()=>i});var o=n(69216);function i(e){let t=e?.split("_")[0];if(!e||0>e.indexOf("_")||!t||"string"!=typeof t)throw new o.l({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function r(e){if(!e||!e.includes(":"))throw new o.l({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return e.split(":")[0]}},85551:(e,t,n)=>{n.d(t,{e:()=>r});var o=n(26348),i=n(69216);function r(e){if(!e||"Error"===e.name||e instanceof TypeError)throw new i.l({name:o.m.Unknown,message:"An unknown error has occurred.",underlyingError:e})}},86178:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(1133);let i=({maxAttempts:e=o.K7})=>(t,n)=>async function(i){let r=n.attemptsCount??0;return i.headers[o.Q8]=`attempt=${r+1}; max=${e}`,t(i)}},88968:(e,t,n)=>{n.d(t,{MY:()=>i,nW:()=>a,xA:()=>r});var o=n(35993);let i=()=>
11{if("object"==typeof window&&"object"==typeof window.crypto)return window.crypto;if("object"==typeof crypto)return crypto;throw new o.x({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},r=()=>{if("undefined"!=typeof window&&"function"==typeof window.btoa)return window.btoa;if("function"==typeof btoa)return btoa;throw new o.x({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},a=()=>{if("undefined"!=typeof window&&"function"==typeof window.atob)return window.atob;if("function"==typeof atob)return atob;throw new o.x({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})}},90216:(e,t,n)=>{n.d(t,{q:()=>r});let o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r=()=>{let e=new Date,t=i[e.getUTCDay()],n=o[e.getUTCMonth()],r=e.getUTCDate(),a=e.getUTCHours();a<10&&(a=`0${a}`);let s=e.getUTCMinutes();s<10&&(s=`0${s}`);let c=e.getUTCSeconds();c<10&&(c=`0${c}`);let d=e.getUTCFullYear();return`${t} ${n} ${r} ${a}:${s}:${c} UTC ${d}`}},90724:(e,t,n)=>{n.d(t,{i:()=>h});var o=n(44771);let i=async()=>{let{userAgentData:e}=navigator;if(!e)return navigator.userAgent;let{platform:t="",platformVersion:n="",model:o="",architecture:i="",fullVersionList:r=[]}=await e.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]);return[t,n,i,o,t,r.map(e=>`${e.brand}/${e.version}`).join(";")].filter(e=>e).join(" ")||navigator.userAgent};var r=n(11529),a=n(6254),s=n(92169),c=n(58392),d=n(41705),l=n(29073),u=n(85267),p=n(56253),E=n(35283);async function h({userPoolId:e,userPoolEndpoint:t,newDeviceMetadata:n,accessToken:h}){if(!n)return;let g=e.split("_")[1]||"",m=await (0,p.H)(g),f=n?.DeviceKey,S=n?.DeviceGroupKey;try{await m.generateHashDevice(S??"",f??"")}catch(e){return}let y={Salt:o.Y.convert((0,E.d)(m.getSaltToHashDevices())),PasswordVerifier:o.Y.convert((0,E.d)(m.getVerifierDevices()))},x=m.getRandomPassword();try{let o,p=(o={endpointResolver:(0,l.o)({endpointOverride:t})},(0,r.A)(a.e,(0,s._)("ConfirmDevice"),(0,c.T)(),{...d.C,...o}));return await p({region:(0,u.J)(e)},{AccessToken:h,DeviceName:await i(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:y}),{deviceKey:f,deviceGroupKey:S,randomPassword:x}}catch(e){return}}n(39526)},92169:(e,t,n)=>{n.d(t,{_:()=>o});let o=e=>(t,n)=>r(n,i(e),JSON.stringify(t)),i=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}),r=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"})},95538:(e,t,n)=>{n.d(t,{F:()=>d});var o=n(66352),i=n(61058),r=n(86178),a=n(13842),s=n(2035),c=n(83494);let d=(0,s.q)(c.Q,[a.L,i.r,o.b,r.Z])},97592:(e,t,n)=>{n.d(t,{H:()=>s});var o=n(73311),i=n(50160),r=n(14920);let a=async e=>{var t;let n=e.getConfig().Auth?.Cognito;(0,i.$y)(n);let o=await e.Auth.getTokens({forceRefresh:!1});(0,r.H0)(o);let{"cognito:username":a,sub:s}=o.idToken?.payload??{},c={username:a,userId:s},d=(t=o,t?.signInDetails);return d&&(c.signInDetails=d),c},s=async()=>a(o.H)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.