1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1104],{2338:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(7798),i=n(34888);Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DISALLOWED_FORM_PROPS:function(){return o},checkFormActionUrl:function(){return s},createFormSubmitDestinationUrl:function(){return a},hasReactClientActionAttributes:function(){return f},hasUnsupportedSubmitterAttributes:function(){return c},isSupportedFormEncType:function(){return d},isSupportedFormMethod:function(){return u},isSupportedFormTarget:function(){return l}});var o=["method","encType","target"];function a(e,t){try{var n=window.location.href;d=new URL(e,n)}catch(t){throw Object.defineProperty(Error('Cannot parse form action "'+e+'" as a URL',{cause:t}),"__NEXT_ERROR_CODE",{value:"E152",enumerable:!1,configurable:!0})}d.searchParams.size&&(d.search="");var i=new FormData(t),o=!0,a=!1,s=void 0;try{for(var d,u,l=i[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=r._(u.value,2),f=c[0],h=c[1];"string"!=typeof h&&(h=h.name),d.searchParams.append(f,h)}}catch(e){a=!0,s=e}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}return d}function s(e,t){var n;try{n=new URL(e,"http://n")}catch(n){console.error("<Form> received "+("action"===t?"an `action`":"a `formAction`")+' that cannot be parsed as a URL: "'+e+'".');return}n.searchParams.size}var d=function(e){return"application/x-www-form-urlencoded"===e},u=function(e){return"get"===e},l=function(e){return"_self"===e};function c(e){var t=e.getAttribute("formEncType");if(null!==t&&!d(t))return!0;var n=e.getAttribute("formMethod");if(null!==n&&!u(n))return!0;var r=e.getAttribute("formTarget");return!(null===r||l(r))}function f(e){var t=e.getAttribute("formAction");return t&&/\s*javascript:/i.test(t)}("function"==typeof t.default||"object"===i._(t.default)&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3625:(e,t,n)=>{function r(e){return e.moduleIds,null}Object.defineProperty(t,"__esModule",{value:!0}),n(95412),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(54568),n(97509),n(63042),n(81271)},6035:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(59113).createAsyncLocalStorage)()},25575:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(46615),i=n(17194),o=n(34888);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});var a=n(84931)._(n(97007));function s(e,t){var n,o={};"function"==typeof e&&(o.loader=e);var s=r._({},o,t);return(0,a.default)(i._(r._({},s),{modules:null==(n=s.loadableGenerated)?void 0:n.modules}))}("function"==typeof t.default||"object"===o._(t.default)&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},48678:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(46615),i=n(17194),o=n(61880),a=n(34888);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return y}});var s=n(54568),d=n(7620),u=n(54539),l=n(47424),c=n(36329),f=n(2338),h=n(67168),p=n(70915);function y(e){var t=e.replace,n=e.scroll,a=e.prefetch,y=e.ref,g=o._(e,["replace","scroll","prefetch","ref"]),I=(0,d.useContext)(c.AppRouterContext),m=g.action,_="string"==typeof m,C=!0,v=!1,A=void 0;try{for(var b,w=f.DISALLOWED_FORM_PROPS[Symbol.iterator]();!(C=(b=w.next()).done);C=!0){var S=b.value;S in g&&delete g[S]}}catch(e){v=!0,A=e}finally{try{C||null==w.return||w.return()}finally{if(v)throw A}}var P=!!I&&_&&null===(!1===a||null===a?a:null),O=(0,d.useCallback)(function(e){return P&&null!==I&&(0,h.mountFormInstance)(e,m,I,p.FetchStrategy.PPR),function(){(0,h.unmountPrefetchableInstance)(e)}},[P,m,I]),E=(0,l.useMergedRef)(O,null!=y?y:null);if(!_)return(0,s.jsx)("form",i._(r._({},g),{ref:E}));var T=(0,u.addBasePath)(m);return(0,s.jsx)("form",i._(r._({},g),{ref:E,action:T,onSubmit:function(e){return function(e,t){var n=t.actionHref,r=t.onSubmit,i=t.replace,o=t.scroll,a=t.router;if(("function"!=typeof r||(r(e),!e.defaultPrevented))&&a){var s=e.currentTarget,d=e.nativeEvent.submitter,u=n;if(d){if((0,f.hasUnsupportedSubmitterAttributes)(d)||(0,f.hasReactClientActionAttributes)(d))return;var l=d.getAttribute("formAction");null!==l&&(u=l)}var c=(0,f.createFormSubmitDestinationUrl)(u,s);e.preventDefault();var h=c.href;a[i?"replace":"push"](h,{scroll:o})}}(e,{router:I,actionHref:T,replace:t,scroll:n,onSubmit:g.onSubmit})}}))}("function"==typeof t.default||"object"===a._(t.default)&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
1dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},56452:(e,t,n)=>{function r(e){return e.reason,e.children}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(89800)},57439:(e,t,n)=>{n.d(t,{H:()=>eo});var r=n(26690),i=n(10434);let o=new i.C("Auth");class a{configure(e,t){this.authConfig=e,this.authOptions=t,e&&e.Cognito?.userPoolEndpoint&&o.warn(s("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&o.warn(s("Amazon Cognito Identity Pool"))}async fetchAuthSession(e={}){let t,n,r=await this.getTokens(e);return r?(n=r.accessToken?.payload?.sub,t=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:r,authenticated:!0,forceRefresh:e.forceRefresh})):t=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:e.forceRefresh}),{tokens:r,credentials:t?.credentials,identityId:t?.identityId,userSub:n}}async clearCredentials(){await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId()}async getTokens(e){return await this.authOptions?.tokenProvider?.getTokens(e)??void 0}}let s=e=>`You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`,d=e=>{for(let t of Reflect.ownKeys(e)){let n=e[t];(n&&"object"==typeof n||"function"==typeof n)&&d(n)}return Object.freeze(e)};var u=n(28498);let l=new i.C("parseAWSExports"),c={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},f=e=>e?.split(",")??[],h={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"},p={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"},y=e=>Object.keys(e).some(e=>e.startsWith("aws_"))?((e={})=>{if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new u.x({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});let{aws_appsync_apiKey:t,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:r,aws_appsync_region:i,aws_bots_config:o,aws_cognito_identity_pool_id:a,aws_cognito_sign_up_verification_method:s,aws_cognito_mfa_configuration:d,aws_cognito_mfa_types:h,aws_cognito_password_protection_settings:p,aws_cognito_verification_mechanisms:y,aws_cognito_signup_attributes:g,aws_cognito_social_providers:I,aws_cognito_username_attributes:m,aws_mandatory_sign_in:_,aws_mobile_analytics_app_id:C,aws_mobile_analytics_app_region:v,aws_user_files_s3_bucket:A,aws_user_files_s3_bucket_region:b,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:w,aws_user_pools_id:S,aws_user_pools_web_client_id:P,geo:O,oauth:E,predictions:T,aws_cloud_logic_custom:k,Notifications:j,modelIntrospection:R}=e,x={};C&&(x.Analytics={Pinpoint:{appId:C,region:v}});let{InAppMessaging:M,Push:L}=j??{};if(M?.AWSPinpoint||L?.AWSPinpoint){if(M?.AWSPinpoint){let{appId:e,region:t}=M.AWSPinpoint;x.Notifications={InAppMessaging:{Pinpoint:{appId:e,region:t}}}}if(L?.AWSPinpoint){let{appId:e,region:t}=L.AWSPinpoint;x.Notifications={...x.Notifications,PushNotification:{Pinpoint:{appId:e,region:t}}}}}if(Array.isArray(o)&&(x.Interactions={LexV1:Object.fromEntries(o.map(e=>[e.name,e]))}),r){let e=c[n];e||l.debug(`Invalid authentication type ${n}. Falling back to IAM.`),x.API={GraphQL:{endpoint:r,apiKey:t,region:i,defaultAuthMode:e??"iam"}},R&&(x.API.GraphQL.modelIntrospection=R)}let N=d?{status:d&&d.toLowerCase(),totpEnabled:h?.includes("TOTP")??!1,smsEnabled:h?.includes("SMS")??!1}:void 0,D=p?{minLength:p.passwordPolicyMinLength,requireLowercase:p.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:p.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:p.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:p.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,U=Array.from(new Set([...y??[],...g??[]])).reduce((e,t)=>
1({...e,[t.toLowerCase()]:{required:!0}}),{}),G=m?.includes("EMAIL")??!1,F=m?.includes("PHONE_NUMBER")??!1;(a||S)&&(x.Auth={Cognito:{identityPoolId:a,allowGuestAccess:"enable"!==_,signUpVerificationMethod:s,userAttributes:U,userPoolClientId:P,userPoolId:S,mfa:N,passwordFormat:D,loginWith:{username:!(G||F),email:G,phone:F}}});let K=!!E&&Object.keys(E).length>0,W=!!I&&I.length>0;if(x.Auth&&K&&(x.Auth.Cognito.loginWith={...x.Auth.Cognito.loginWith,oauth:{...(({domain:e,scope:t,redirectSignIn:n,redirectSignOut:r,responseType:i})=>({domain:e,scopes:t,redirectSignIn:f(n),redirectSignOut:f(r),responseType:i}))(E),...W&&{providers:I.map(e=>{let t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)})}}}),A&&(x.Storage={S3:{bucket:A,region:b,dangerouslyConnectToHttpEndpointForTesting:w}}),O){let{amazon_location_service:e}=O;x.Geo={LocationService:{maps:e.maps,geofenceCollections:e.geofenceCollections,searchIndices:e.search_indices,region:e.region}}}if(k&&(x.API={...x.API,REST:k.reduce((e,t)=>{let{name:n,endpoint:r,region:i,service:o}=t;return{...e,[n]:{endpoint:r,...o?{service:o}:void 0,...i?{region:i}:void 0}}},{})}),T){let{VoiceId:e}=T?.convert?.speechGenerator?.defaults??{};x.Predictions=e?{...T,convert:{...T.convert,speechGenerator:{...T.convert.speechGenerator,defaults:{voiceId:e}}}}:T}return x})(e):!function(e){let{version:t}=e;return!!t&&t.startsWith("1")}(e)?e:function(e){let t={};if(e.storage&&(t.Storage=function(e){if(!e)return;let{bucket_name:t,aws_region:n,buckets:r}=e;return{S3:{bucket:t,region:n,buckets:r&&function(e){let t={};return e.forEach(({name:e,bucket_name:n,aws_region:r,paths:i})=>{if(e in t)throw Error(`Duplicate friendly name found: ${e}. Name must be unique.`);let o=i?Object.entries(i).reduce((e,[t,n])=>(void 0!==n&&(e[t]=n),e),{}):void 0;t[e]={bucketName:n,region:r,paths:o}}),t}(r)}}}(e.storage)),e.auth&&(t.Auth=function(e){var t;if(!e)return;let{user_pool_id:n,user_pool_client_id:r,identity_pool_id:i,password_policy:o,mfa_configuration:a,mfa_methods:s,unauthenticated_identities_enabled:d,oauth:u,username_attributes:l,standard_required_attributes:c,groups:f,passwordless:h}=e,y={Cognito:{userPoolId:n,userPoolClientId:r,groups:f}};return i&&(y.Cognito={...y.Cognito,identityPoolId:i}),o&&(y.Cognito.passwordFormat={requireLowercase:o.require_lowercase,requireNumbers:o.require_numbers,requireUppercase:o.require_uppercase,requireSpecialCharacters:o.require_symbols,minLength:o.min_length??6}),a&&(y.Cognito.mfa={status:"OPTIONAL"===(t=a)?"optional":"REQUIRED"===t?"on":"off",smsEnabled:s?.includes("SMS"),totpEnabled:s?.includes("TOTP")}),d&&(y.Cognito.allowGuestAccess=d),u&&(y.Cognito.loginWith={oauth:{domain:u.domain,redirectSignIn:u.redirect_sign_in_uri,redirectSignOut:u.redirect_sign_out_uri,responseType:"token"===u.response_type?"token":"code",scopes:u.scopes,providers:function(e=[]){return e.reduce((e,t)=>(void 0!==p[t]&&e.push(p[t]),e),[])}(u.identity_providers)}}),l&&(y.Cognito.loginWith={...y.Cognito.loginWith,email:l.includes("email"),phone:l.includes("phone_number"),username:l.includes("username")}),c&&(y.Cognito.userAttributes=c.reduce((e,t)=>({...e,[t]:{required:!0}}),{})),h&&(y.Cognito.passwordless={emailOtpEnabled:h.email_otp_enabled,smsOtpEnabled:h.sms_otp_enabled,webAuthn:h.web_authn?{relyingPartyId:h.web_authn.relying_party_id,userVerification:h.web_authn.user_verification}:void 0,preferredChallenge:h.preferred_challenge}),y}(e.auth)),e.analytics&&(t.Analytics=function(e){if(!e?.amazon_pinpoint)return;let{amazon_pinpoint:t}=e;return{Pinpoint:{appId:t.app_id,region:t.aws_region}}}(e.analytics)),e.geo&&(t.Geo=function(e){if(!e)return;let{aws_region:t,geofence_collections:n,maps:r,search_indices:i}=e;return{LocationService:{region:t,searchIndices:i,geofenceCollections:n,maps:r}}}(e.geo)),e.data&&(t.API=function(e){if(!e)return;let{aws_region:t,default_authorization_type:n,url:r,api_key:i,model_introspection:o}=e;return{GraphQL:{endpoint:r,defaultAuthMode:h[n],region:t,apiKey:i,modelIntrospection:o}}}(e.data)),e.custom){let n=function(e){if(!e?.events)return;let{url:t,aws_region:n,api_key:r,default_authorization_type:i}=e.events;return{Events:{endpoint:t,defaultAuthMode:h[i],region:n,apiKey:r}}}(e.custom);
1n&&"Events"in n&&(t.API={...t.API,...n})}return e.notifications&&(t.Notifications=function(e){if(!e)return;let{aws_region:t,channels:n,amazon_pinpoint_app_id:r,amazon_connect:i}=e,o=n??[],a=o.includes("IN_APP_MESSAGING"),s=o.includes("APNS")||o.includes("FCM"),d=!!i;if(!(a||s||d))return;let u={};a&&r&&t&&(u.InAppMessaging={Pinpoint:{appId:r,region:t}});let l={};return s&&r&&t&&(l.Pinpoint={appId:r,region:t}),i&&(l.CustomerProfiles={endpoint:i.endpoint,region:i.aws_region}),Object.keys(l).length>0&&(u.PushNotification=l),u}(e.notifications)),t}(e);var g=n(3942),I=n(91216),m=n(88902);function _(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)"__proto__"!==r&&(e[r]=n[r])}return e}var C=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=_({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(s in r||(r[s]=t.read(a,s)),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",_({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,_({},this.attributes,t))},withConverter:function(t){return e(_({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});class v{constructor(e={}){let{path:t,domain:n,expires:r,sameSite:i,secure:o}=e;if(this.domain=n,this.path=t||"/",this.expires=Object.prototype.hasOwnProperty.call(e,"expires")?r:365,this.secure=!Object.prototype.hasOwnProperty.call(e,"secure")||o,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!i||!["strict","lax","none"].includes(i))throw Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===i&&!this.secure)throw Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=i}}async setItem(e,t){C.set(e,t,this.getData())}async getItem(e){return C.get(e)??null}async removeItem(e){C.remove(e,this.getData())}async clear(){let e=Object.keys(C.get()).map(e=>this.removeItem(e));await Promise.all(e)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}n(98324),n(38647);var A=n(1476),b=n(99846),w=n(88641),S=n(14924),P=n(33117),O=n(97026);let E="cognito-identity",T={service:E,retryDecider:(0,O.D)(w.F),computeDelay:P.y,cache:"no-store"};var k=n(73743);let j=(0,n(584).q)(k.F,[()=>e=>async function(t){return t.headers["cache-control"]="no-store",e(t)}]),R=e=>(t,n)=>M(n,x(e),JSON.stringify(t)),x=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}),M=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"}),L=e=>(0,S.A)(j,R("GetCredentialsForIdentity"),N,{...T,...e,userAgentValue:(0,A.fE)()}),N=async e=>{if(e.statusCode>=300)throw await (0,w.F)(e);let t=await (0,w.Y)(e);return{IdentityId:t.IdentityId,Credentials:D(t.Credentials),$metadata:(0,b.j)(e)}},D=({Expiration:e,...t}={})=>({...t,Expiration:e&&new Date(1e3*e)});var U=n(16095),G=n(13989),F=n(29592),K=n(23750),W=n(55799),q=n(22560),z=n(59034);let B=({endpointOverride:e})=>t=>e?{url:new z.o(e)}:(({region:e})=>({url:new z.o(`https://${E}.${e}.${(0,q.R)(e)}`)}))(t),V=async e=>{if(e.statusCode>=300)throw await (0,w.F)(e);return{IdentityId:(await (0,w.Y)(e)).IdentityId,$metadata:(0,b.j)(e)}};function $(e){let t=(0,U.Cq)(e).payload.iss,n={};if(!t)throw new G.l({name:"InvalidIdTokenException",message:"Invalid Idtoken."});return n[t.replace(/(^\w+:|^)\/\//,"")]=e,n}async function H({tokens:e,authConfig:t,identityIdStore:n}){n.setAuthConfig({Cognito:t});let r=await n.loadIdentityId();if(r)return r.id;let i=e?.idToken?$(e.idToken.toString()):{},o=await Q(i,t);return n.storeIdentityId({id:o,type:e?"primary":"guest"}),o}async function Q(e,t){let n,r,i=t?.identityPoolId,o=(0,K.C)(i),a=(r={endpointResolver:B({endpointOverride:t.identityPoolEndpoint})},(0,S.A)(j,R("GetId"),V,{...T,...r,userAgentValue:(0,A.fE)()}));try{n=(await a({region:o},{IdentityPoolId:i,Logins:e})).IdentityId}catch(e){throw(0,F.e)(e),new G.l(e)}if(!n)throw new G.l({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return n}let Y=new i.C("CognitoCredentialsProvider");class Z{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){Y.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){Y.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){let t=e.authenticated,{tokens:n}=e,{authConfig:r}=e;try{(0,U.Eh)(r?.Cognito)}catch{return}if(!t&&!r.Cognito.allowGuestAccess)return;let{forceRefresh:i}=e,o=this.hasTokenChanged(n),a=await H({tokens:n,authConfig:r.Cognito,identityIdStore:this._identityIdStore});return((i||o)&&this.clearCredentials(),t)?((0,W.OW)(n),this.credsForOIDCTokens(r.Cognito,n,a)):this.getGuestCredentials(a,r.Cognito)}async getGuestCredentials(e,t){let n;if(this._credentialsAndIdentityId&&!this.isPastTTL()&&!1===this._credentialsAndIdentityId.isAuthenticatedCreds)return Y.info("returning stored credentials as they neither past TTL n
1or expired."),this._credentialsAndIdentityId;this.clearCredentials();let r=(0,K.C)(t.identityPoolId),i=L({endpointResolver:B({endpointOverride:t.identityPoolEndpoint})});try{n=await i({region:r},{IdentityId:e})}catch(e){throw(0,F.e)(e),new G.l(e)}if(n?.Credentials?.AccessKeyId&&n?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+3e6;let t={credentials:{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration},identityId:e};return n.IdentityId&&(t.identityId=n.IdentityId,this._identityIdStore.storeIdentityId({id:n.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...t,isAuthenticatedCreds:!1},t}throw new G.l({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(e,t,n){let r;if(this._credentialsAndIdentityId&&!this.isPastTTL()&&!0===this._credentialsAndIdentityId.isAuthenticatedCreds)return Y.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();let i=t.idToken?$(t.idToken.toString()):{},o=(0,K.C)(e.identityPoolId),a=L({endpointResolver:B({endpointOverride:e.identityPoolEndpoint})});try{r=await a({region:o},{IdentityId:n,Logins:i})}catch(e){throw(0,F.e)(e),new G.l(e)}if(r?.Credentials?.AccessKeyId&&r?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+3e6;let e={credentials:{accessKeyId:r.Credentials.AccessKeyId,secretAccessKey:r.Credentials.SecretKey,sessionToken:r.Credentials.SessionToken,expiration:r.Credentials.Expiration},identityId:n};return r.IdentityId&&(e.identityId=r.IdentityId,this._identityIdStore.storeIdentityId({id:r.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...e,isAuthenticatedCreds:!0,associatedIdToken:t.idToken?.toString()},e}throw new G.l({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return void 0===this._nextCredentialsRefresh||this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(e){return!!e&&!!this._credentialsAndIdentityId?.associatedIdToken&&e.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}var J=n(94578);let X={identityId:"identityId"},ee=new i.C("DefaultIdentityIdStore");class et{setAuthConfig(e){(0,U.Eh)(e.Cognito),this.authConfig=e,this._authKeys=en("Cognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){(0,U.Eh)(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{let e=await this.keyValueStorage.getItem(this._authKeys.identityId);if(e)return this._hasGuestIdentityId=!0,{id:e,type:"guest"};return null}}catch(e){return ee.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){(0,U.Eh)(this.authConfig?.Cognito),"guest"===e.type?(this.keyValueStorage.setItem(this._authKeys.identityId,e.id),this._primaryIdentityId=void 0,this._hasGuestIdentityId=!0):(this._primaryIdentityId=e.id,this._hasGuestIdentityId&&(this.keyValueStorage.removeItem(this._authKeys.identityId),this._hasGuestIdentityId=!1))}async clearIdentityId(){this._primaryIdentityId=void 0,await this.keyValueStorage.removeItem(this._authKeys.identityId)}}let en=(e,t)=>(0,J.Qm)(X)(`com.amplify.${e}`,t),er=new Z(new et(m.ZL));var ei=n(9806);let eo={configure(e,t){let n=y(e),i=function(e,t,n){if(!e.Auth)return!t&&n?n:t??{};if(t?.Auth)return t;let r=t??n??{},i=r.ssr?new v({sameSite:"lax"}):m.ZL,o=r.ssr?new Z(new et(i)):er;return ei.Q.setAuthConfig(e.Auth),ei.Q.setKeyValueStorage(i),{...r,Auth:{tokenProvider:ei.Q,credentialsProvider:o}}}(n,t,(0,r.Vl)()?(0,r.xH)().libraryOptions:void 0),o=function(e,t,n){let r=d(y(e)),i=t??{},o=new a;r.Auth&&o.configure(r.Auth,i.Auth);let s={resourcesConfig:r,libraryOptions:i,token:Object.freeze({value:Symbol("amplifyContextToken")}),fetchAuthSession:e=>o.fetchAuthSession(e??{}),clearCredentials:()=>o.clearCredentials(),getTokens:e=>o.getTokens(e)};
1return Object.defineProperty(s,g.J,{value:!0,enumerable:!1,configurable:!1,writable:!1}),Object.freeze(s),s}(n,i);(0,r.zm)(o),I.YZ.dispatch("core",{event:"configure",data:n},"Configure",I.U9)},getConfig:()=>(0,r.Vl)()?(0,r.xH)().resourcesConfig:(console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),{}),fetchAuthSession:e=>(0,r.xH)().fetchAuthSession(e),clearCredentials:()=>(0,r.xH)().clearCredentials(),getTokens:e=>(0,r.xH)().getTokens(e)}},59113:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{bindSnapshot:function(){return a},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return s}});let n=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let i="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return i?new i:new r}function a(e){return i?i.bind(e):r.bind(e)}function s(){return i?i.snapshot():function(e,...t){return e(...t)}}},63042:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(6035)},86678:(e,t,n)=>{n.d(t,{C:()=>E});var r=n(10434),i=n(88902),o=n(91216),a=n(67452),s=n(16095),d=n(85421),u=n(81166),l=n(13989),c=n(55799),f=n(79881),h=n(33685),p=n(23750);n(98324);let y=async(e,t,n)=>{await e.clearOAuthData(),t.clearTokens(),await n(),o.YZ.dispatch("auth",{event:"signedOut"},"Auth",o.U9)};var g=n(1869),I=n(60093);let m=async(e,t=!1,n)=>{(0,s.G6)(e);let{loginWith:r,userPoolClientId:i}=e,{domain:o,redirectSignOut:a}=r.oauth,d=(0,I.M)(a,n),u=`https://${o}/logout?${Object.entries({client_id:i,logout_uri:encodeURIComponent(d)}).map(([e,t])=>`${e}=${t}`).join("&")}`;return(0,g.z)(u)},_=async(e,t,n,r,i)=>{let{isOAuthSignIn:o}=await t.loadOAuthSignIn(),a=await n.getOAuthMetadata();if(await y(t,n,i),o||a?.oauthSignIn)return m(e,!1,r)};var C=n(6846),v=n(14924),A=n(27429),b=n(95186),w=n(92835),S=n(3422),P=n(75738);let O=new r.C("Auth");async function E(...e){let t,[n,r]=(0,a.j)(e),d=n.resourcesConfig.Auth?.Cognito;(0,s.$y)(d);let u=(0,h.i)(n);r?.global?await k(d,u):await T(d,u);try{(0,s.G6)(d),t=!0}catch(e){t=!1}if(t){let e=new f.S(i.ZL);e.setAuthConfig(d);let{type:t}=await _(d,e,u,r?.oauth?.redirectUrl,()=>n.clearCredentials())??{};if("error"===t)throw new l.l({name:C.mh,message:"An error occurred when attempting to log out from OAuth provider."})}else u.clearTokens(),await n.clearCredentials(),o.YZ.dispatch("auth",{event:"signedOut"},"Auth",o.U9)}async function T(e,t){try{let{userPoolEndpoint:n,userPoolId:r,userPoolClientId:i}=e,o=await t.getTokenStore().loadTokens();if((0,c.X4)(o),j(o.accessToken)){let e,t=(e={endpointResolver:(0,P.o)({endpointOverride:n})},(0,v.A)(A.e,(0,b._)("RevokeToken"),(0,w.T)(),{...S.C,...e}));await t({region:(0,p.J)(r),userAgentValue:(0,u.A)(d.BM.SignOut)},{ClientId:i,Token:o.refreshToken})}}catch(e){O.debug("Client signOut error caught but will proceed with token removal")}}async function k(e,t){try{let n,{userPoolEndpoint:r,userPoolId:i}=e,o=await t.getTokenStore().loadTokens();(0,c.H0)(o);let a=(n={endpointResolver:(0,P.o)({endpointOverride:r})},(0,v.A)(A.e,(0,b._)("GlobalSignOut"),(0,w.T)(),{...S.C,...n}));await a({region:(0,p.J)(i),userAgentValue:(0,u.A)(d.BM.SignOut)},{AccessToken:o.accessToken.toString()})}catch(e){O.debug("Global signOut error caught but will proceed with token removal")}}let j=e=>!!e?.payload?.origin_jti},96442:(e,t,n)=>{n.d(t,{default:()=>i.a});var r=n(25575),i=n.n(r)},97007:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(46615),i=n(17194);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});var o=n(54568),a=n(7620),s=n(56452);function d(e){return{default:e&&"default"in e?e.default:e}}n(3625);var u={loader:function(){return Promise.resolve(d(function(){return null}))},loading:null,ssr:!0},l=function(e){var t=r._({},u,e),n=(0,a.lazy)(function(){return t.loader().then(d)}),l=t.loading;function c(e){var d=l?(0,o.jsx)(l,{isLoading:!0,pastDelay:!0,error:null}):null,u=!t.ssr||!!t.loading,c=u?a.Suspense:a.Fragment,f=t.ssr?(0,o.jsxs)(o.Fragment,{children:[null,(0,o.jsx)(n,r._({},e))]}):(0,o.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,o.jsx)(n,r._({},e))});return(0,o.jsx)(c,i._(r._({},u?{fallback:d}:{}),{children:f}))}return c.displayName="LoadableComponent",c}}}]); 2//# sourceMappingURL=1104-a2b768e438e5b3db.js.map
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.