@remit/web-client-dist 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{ComposeBody-CN6LL8DJ.js → ComposeBody-BgvfdlIG.js} +1 -1
- package/assets/{ErrorState-CAiksnIx.js → ErrorState-a-0FlCPQ.js} +1 -1
- package/assets/{OnboardingWizard-aZtHoPRu.js → OnboardingWizard-CMkhARuC.js} +1 -1
- package/assets/{account-form-helpers-D6xD3_Q4.js → account-form-helpers-BDHHpqWU.js} +1 -1
- package/assets/{accounts-4xBwI5pT.js → accounts-3D7A9nyk.js} +1 -1
- package/assets/{advanced-qZrMsKTp.js → advanced-ZqR5aCEa.js} +1 -1
- package/assets/{appearance-Dta6f8kr.js → appearance-AI1e1Xdm.js} +1 -1
- package/assets/{avatar-o8uOIivm.js → avatar-BKanwFk1.js} +1 -1
- package/assets/{browser-ponyfill-DOsCHlBk.js → browser-ponyfill-Dxp20-DZ.js} +1 -1
- package/assets/{filter-status-Di02RXk8.js → filter-status-u_O2ZtrE.js} +1 -1
- package/assets/{filters-B5mz8b3m.js → filters-BWxQFzdU.js} +1 -1
- package/assets/{flagged-BIZUPAc1.js → flagged-Bn7CP0uC.js} +1 -1
- package/assets/folder-role-BW92GrxA.js +1 -0
- package/assets/folders-BDlhjZZJ.js +1 -0
- package/assets/index-DF5meFXr.js +1 -0
- package/assets/{index-BycZKbRn.css → index-DOZbsogf.css} +1 -1
- package/assets/{index-CXrHuyFy.js → index-DrEM_All.js} +9 -9
- package/assets/{index-DRgNHDNw.js → index-DwWGNIuo.js} +1 -1
- package/assets/{kbd-BTiY9EKZ.js → kbd-BFJ1PRvU.js} +1 -1
- package/assets/mail-BCdH9Bze.js +112 -0
- package/assets/{onboarding-DXJgvBY6.js → onboarding-Ds_XXr1k.js} +1 -1
- package/assets/{select-D7_Kr7xr.js → select-aL6nntxF.js} +1 -1
- package/assets/{senders-DGd2LA5D.js → senders-C46h-jmb.js} +1 -1
- package/assets/settings-CTg0UWtn.js +1 -0
- package/assets/{settings-screen-77hrdJD5.js → settings-screen-iMIBj24u.js} +1 -1
- package/assets/{star-DYdUBoAn.js → star-u5VPhmDs.js} +1 -1
- package/assets/{suggested-vips-B2Opi9qz.js → suggested-vips-D0-wKfXg.js} +1 -1
- package/assets/{trash-2-CbDT1D_N.js → trash-2-BBMRlIEX.js} +1 -1
- package/assets/{useDebouncedValue-BuxtHklN.js → useDebouncedValue--_oK6ORb.js} +1 -1
- package/assets/{useMutation-B3B2Grvk.js → useMutation-D_7RbYvF.js} +1 -1
- package/assets/{useSignature-BstPd727.js → useSignature-BOoAOYs8.js} +1 -1
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/folders-BrfKkqjC.js +0 -1
- package/assets/index-42UdmKR4.js +0 -1
- package/assets/mail-BupQ73qf.js +0 -112
- package/assets/send-D9-gwzh3.js +0 -1
- package/assets/settings-D8EclRrJ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mail-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mail-BCdH9Bze.js","assets/folder-roles-XnseeyyD.js","assets/useDebouncedValue--_oK6ORb.js","assets/avatar-BKanwFk1.js","assets/kbd-BFJ1PRvU.js","assets/star-u5VPhmDs.js","assets/trash-2-BBMRlIEX.js","assets/account-form-helpers-BDHHpqWU.js","assets/folder-role-BW92GrxA.js","assets/useMutation-D_7RbYvF.js","assets/useSignature-BOoAOYs8.js","assets/ErrorState-a-0FlCPQ.js","assets/format-BGdB831k.js","assets/select-aL6nntxF.js","assets/filter-status-u_O2ZtrE.js","assets/onboarding-Ds_XXr1k.js","assets/OnboardingWizard-CMkhARuC.js","assets/index-DwWGNIuo.js","assets/flagged-Bn7CP0uC.js","assets/accounts-3D7A9nyk.js","assets/settings-screen-iMIBj24u.js","assets/advanced-ZqR5aCEa.js","assets/appearance-AI1e1Xdm.js","assets/filters-BWxQFzdU.js","assets/folders-BDlhjZZJ.js","assets/senders-C46h-jmb.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function N5(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Ig=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var I1={exports:{}},pf={};var bN;function O$(){if(bN)return pf;bN=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,o){var a=null;if(o!==void 0&&(a=""+o),s.key!==void 0&&(a=""+s.key),"key"in s){o={};for(var u in s)u!=="key"&&(o[u]=s[u])}else o=s;return s=o.ref,{$$typeof:t,type:r,key:a,ref:s!==void 0?s:null,props:o}}return pf.Fragment=e,pf.jsx=n,pf.jsxs=n,pf}var SN;function N$(){return SN||(SN=1,I1.exports=O$()),I1.exports}var D=N$();const M$="Logging",P$="x-amz-user-agent",k$="NoHubcallbackProvidedException";var rs;(function(t){t.DEBUG="DEBUG",t.ERROR="ERROR",t.INFO="INFO",t.WARN="WARN",t.VERBOSE="VERBOSE",t.NONE="NONE"})(rs||(rs={}));const EN={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class nr{constructor(e,n=rs.WARN){this.name=e,this.level=n,this._pluggables=[]}_padding(e){return e<10?"0"+e:""+e}_ts(){const e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()}configure(e){return e?(this._config=e,this._config):this._config}_log(e,...n){let r=this.level;nr.LOG_LEVEL&&(r=nr.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const s=EN[r];if(!(EN[e]>=s))return;let a=console.log.bind(console);e===rs.ERROR&&console.error&&(a=console.error.bind(console)),e===rs.WARN&&console.warn&&(a=console.warn.bind(console)),nr.BIND_ALL_LOG_LEVELS&&(e===rs.INFO&&console.info&&(a=console.info.bind(console)),e===rs.DEBUG&&console.debug&&(a=console.debug.bind(console)));const u=`[${e}] ${this._ts()} ${this.name}`;let c="";if(n.length===1&&typeof n[0]=="string")c=`${u} - ${n[0]}`,a(c);else if(n.length===1)c=`${u} ${n[0]}`,a(u,n[0]);else if(typeof n[0]=="string"){let f=n.slice(1);f.length===1&&(f=f[0]),c=`${u} - ${n[0]} ${f}`,a(`${u} - ${n[0]}`,f)}else c=`${u} ${n}`,a(u,n);for(const f of this._pluggables){const p={message:c,timestamp:Date.now()};f.pushLogs([p])}}log(...e){this._log(rs.INFO,...e)}info(...e){this._log(rs.INFO,...e)}warn(...e){this._log(rs.WARN,...e)}error(...e){this._log(rs.ERROR,...e)}debug(...e){this._log(rs.DEBUG,...e)}verbose(...e){this._log(rs.VERBOSE,...e)}addPluggable(e){e&&e.getCategoryName()===M$&&(this._pluggables.push(e),e.configure(this._config))}listPluggables(){return this._pluggables}}nr.LOG_LEVEL=null;nr.BIND_ALL_LOG_LEVELS=!1;class jr extends Error{constructor({message:e,name:n,recoverySuggestion:r,underlyingError:s,metadata:o}){if(super(e),this.name=n,this.underlyingError=s,this.recoverySuggestion=r,o){const{extendedRequestId:a,httpStatusCode:u,requestId:c}=o;this.metadata={extendedRequestId:a,httpStatusCode:u,requestId:c}}this.constructor=jr,Object.setPrototypeOf(this,jr.prototype)}}var Pa;(function(t){t.NoEndpointId="NoEndpointId",t.PlatformNotSupported="PlatformNotSupported",t.Unknown="Unknown",t.NetworkError="NetworkError"})(Pa||(Pa={}));const fy=(t,e=jr)=>(n,r,s)=>{const{message:o,recoverySuggestion:a}=t[r];if(!n)throw new e({name:r,message:s?`${o} ${s}`:o,recoverySuggestion:a})},xo=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",gf=new nr("Hub");class M5{constructor(e){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}_remove(e,n){const r=this.listeners.get(e);if(!r){gf.warn(`No listeners for ${e}`);return}this.listeners.set(e,[...r.filter(({callback:s})=>s!==n)])}dispatch(e,n,r,s){typeof e=="string"&&this.protectedChannels.indexOf(e)>-1&&(s===xo||gf.warn(`WARNING: ${e} is protected and dispatching on it can have unintended consequences`));const o={channel:e,payload:{...n},source:r,patternInfo:[]};try{this._toListeners(o)}catch(a){gf.error(a)}}listen(e,n,r="noname"){let s;if(typeof n!="function")throw new jr({name:k$,message:"No callback supplied to Hub"});s=n;let o=this.listeners.get(e);return o||(o=[],this.listeners.set(e,o)),o.push({name:r,callback:s}),()=>{this._remove(e,s)}}_toListeners(e){const{channel:n,payload:r}=e,s=this.listeners.get(n);s&&s.forEach(o=>{gf.debug(`Dispatching to ${n} with `,r);try{o.callback(e)}catch(a){gf.error(a)}})}}const Ao=new M5("__default__"),fv=new M5("internal-hub"),EA=()=>{if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto;if(typeof crypto=="object")return crypto;throw new jr({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},D$=()=>{if(typeof window<"u"&&typeof window.btoa=="function")return window.btoa;if(typeof btoa=="function")return btoa;throw new jr({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},L$=()=>{if(typeof window<"u"&&typeof window.atob=="function")return window.atob;if(typeof atob=="function")return atob;throw new jr({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},CA={convert(t,e){let n=t;return e?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),L$()(n)}};var Eo;(function(t){t.AuthTokenConfigException="AuthTokenConfigException",t.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",t.AuthUserPoolException="AuthUserPoolException",t.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",t.OAuthNotConfigureException="OAuthNotConfigureException"})(Eo||(Eo={}));const U$={[Eo.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[Eo.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[Eo.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[Eo.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[Eo.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},wA=fy(U$);function lt(t){let e=!0;t?e=!!t.userPoolId&&!!t.userPoolClientId:e=!1,wA(e,Eo.AuthUserPoolException)}function hy(t){const e=!!t?.loginWith?.oauth?.domain&&!!t?.loginWith?.oauth?.redirectSignOut&&!!t?.loginWith?.oauth?.redirectSignIn&&!!t?.loginWith?.oauth?.responseType;wA(e,Eo.OAuthNotConfigureException)}function Lm(t){const e=!!t?.identityPoolId;wA(e,Eo.InvalidIdentityPoolIdException)}function gi(t){const e=t.split(".");if(e.length!==3)throw new Error("Invalid token");try{const r=e[1].replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(CA.convert(r).split("").map(a=>`%${`00${a.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),o=JSON.parse(s);return{toString:()=>t,payload:o}}catch{throw new Error("Invalid token payload")}}const P5=t=>{const e=Reflect.ownKeys(t);for(const n of e){const r=t[n];(r&&typeof r=="object"||typeof r=="function")&&P5(r)}return Object.freeze(t)},F$=new nr("parseAWSExports"),z$={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},B$=(t={})=>{if(!Object.prototype.hasOwnProperty.call(t,"aws_project_region"))throw new jr({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});const{aws_appsync_apiKey:e,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:r,aws_appsync_region:s,aws_bots_config:o,aws_cognito_identity_pool_id:a,aws_cognito_sign_up_verification_method:u,aws_cognito_mfa_configuration:c,aws_cognito_mfa_types:f,aws_cognito_password_protection_settings:p,aws_cognito_verification_mechanisms:g,aws_cognito_signup_attributes:m,aws_cognito_social_providers:y,aws_cognito_username_attributes:S,aws_mandatory_sign_in:E,aws_mobile_analytics_app_id:C,aws_mobile_analytics_app_region:w,aws_user_files_s3_bucket:x,aws_user_files_s3_bucket_region:T,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:R,aws_user_pools_id:M,aws_user_pools_web_client_id:O,geo:I,oauth:P,predictions:k,aws_cloud_logic_custom:H,Notifications:F,modelIntrospection:B}=t,W={};C&&(W.Analytics={Pinpoint:{appId:C,region:w}});const{InAppMessaging:Y,Push:ne}=F??{};if(Y?.AWSPinpoint||ne?.AWSPinpoint){if(Y?.AWSPinpoint){const{appId:J,region:oe}=Y.AWSPinpoint;W.Notifications={InAppMessaging:{Pinpoint:{appId:J,region:oe}}}}if(ne?.AWSPinpoint){const{appId:J,region:oe}=ne.AWSPinpoint;W.Notifications={...W.Notifications,PushNotification:{Pinpoint:{appId:J,region:oe}}}}}if(Array.isArray(o)&&(W.Interactions={LexV1:Object.fromEntries(o.map(J=>[J.name,J]))}),r){const J=z$[n];J||F$.debug(`Invalid authentication type ${n}. Falling back to IAM.`),W.API={GraphQL:{endpoint:r,apiKey:e,region:s,defaultAuthMode:J??"iam"}},B&&(W.API.GraphQL.modelIntrospection=B)}const $=c?{status:c&&c.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,ee=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,de=Array.from(new Set([...g??[],...m??[]])).reduce((J,oe)=>({...J,[oe.toLowerCase()]:{required:!0}}),{}),Ae=S?.includes("EMAIL")??!1,L=S?.includes("PHONE_NUMBER")??!1;(a||M)&&(W.Auth={Cognito:{identityPoolId:a,allowGuestAccess:E!=="enable",signUpVerificationMethod:u,userAttributes:de,userPoolClientId:O,userPoolId:M,mfa:$,passwordFormat:ee,loginWith:{username:!(Ae||L),email:Ae,phone:L}}});const V=P?Object.keys(P).length>0:!1,K=y?y.length>0:!1;if(W.Auth&&V&&(W.Auth.Cognito.loginWith={...W.Auth.Cognito.loginWith,oauth:{...j$(P),...K&&{providers:H$(y)}}}),x&&(W.Storage={S3:{bucket:x,region:T,dangerouslyConnectToHttpEndpointForTesting:R}}),I){const{amazon_location_service:J}=I;W.Geo={LocationService:{maps:J.maps,geofenceCollections:J.geofenceCollections,searchIndices:J.search_indices,region:J.region}}}if(H&&(W.API={...W.API,REST:H.reduce((J,oe)=>{const{name:he,endpoint:ue,region:ve,service:_e}=oe;return{...J,[he]:{endpoint:ue,..._e?{service:_e}:void 0,...ve?{region:ve}:void 0}}},{})}),k){const{VoiceId:J}=k?.convert?.speechGenerator?.defaults??{};W.Predictions=J?{...k,convert:{...k.convert,speechGenerator:{...k.convert.speechGenerator,defaults:{voiceId:J}}}}:k}return W},CN=t=>t?.split(",")??[],j$=({domain:t,scope:e,redirectSignIn:n,redirectSignOut:r,responseType:s})=>({domain:t,scopes:e,redirectSignIn:CN(n),redirectSignOut:CN(r),responseType:s}),H$=t=>t.map(e=>{const n=e.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),k5=Symbol("oauth-listener"),Xn=[];for(let t=0;t<256;++t)Xn.push((t+256).toString(16).slice(1));function $$(t,e=0){return(Xn[t[e+0]]+Xn[t[e+1]]+Xn[t[e+2]]+Xn[t[e+3]]+"-"+Xn[t[e+4]]+Xn[t[e+5]]+"-"+Xn[t[e+6]]+Xn[t[e+7]]+"-"+Xn[t[e+8]]+Xn[t[e+9]]+"-"+Xn[t[e+10]]+Xn[t[e+11]]+Xn[t[e+12]]+Xn[t[e+13]]+Xn[t[e+14]]+Xn[t[e+15]]).toLowerCase()}let O1;const q$=new Uint8Array(16);function W$(){if(!O1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");O1=crypto.getRandomValues.bind(crypto)}return O1(q$)}const G$=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),wN={randomUUID:G$};function V$(t,e,n){if(wN.randomUUID&&!e&&!t)return wN.randomUUID();t=t||{};const r=t.random??t.rng?.()??W$();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){if(n=n||0,n<0||n+16>e.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let s=0;s<16;++s)e[n+s]=r[s];return e}return $$(r)}function K$(t){const{version:e}=t;return e?e.startsWith("1"):!1}function Y$(t){if(!t)return;const{bucket_name:e,aws_region:n,buckets:r}=t;return{S3:{bucket:e,region:n,buckets:r&&iq(r)}}}function Z$(t){if(!t)return;const{user_pool_id:e,user_pool_client_id:n,identity_pool_id:r,password_policy:s,mfa_configuration:o,mfa_methods:a,unauthenticated_identities_enabled:u,oauth:c,username_attributes:f,standard_required_attributes:p,groups:g,passwordless:m}=t,y={Cognito:{userPoolId:e,userPoolClientId:n,groups:g}};return r&&(y.Cognito={...y.Cognito,identityPoolId:r}),s&&(y.Cognito.passwordFormat={requireLowercase:s.require_lowercase,requireNumbers:s.require_numbers,requireUppercase:s.require_uppercase,requireSpecialCharacters:s.require_symbols,minLength:s.min_length??6}),o&&(y.Cognito.mfa={status:oq(o),smsEnabled:a?.includes("SMS"),totpEnabled:a?.includes("TOTP")}),u&&(y.Cognito.allowGuestAccess=u),c&&(y.Cognito.loginWith={oauth:{domain:c.domain,redirectSignIn:c.redirect_sign_in_uri,redirectSignOut:c.redirect_sign_out_uri,responseType:c.response_type==="token"?"token":"code",scopes:c.scopes,providers:sq(c.identity_providers)}}),f&&(y.Cognito.loginWith={...y.Cognito.loginWith,email:f.includes("email"),phone:f.includes("phone_number"),username:f.includes("username")}),p&&(y.Cognito.userAttributes=p.reduce((S,E)=>({...S,[E]:{required:!0}}),{})),m&&(y.Cognito.passwordless={emailOtpEnabled:m.email_otp_enabled,smsOtpEnabled:m.sms_otp_enabled,webAuthn:m.web_authn?{relyingPartyId:m.web_authn.relying_party_id,userVerification:m.web_authn.user_verification}:void 0,preferredChallenge:m.preferred_challenge}),y}function X$(t){if(!t?.amazon_pinpoint)return;const{amazon_pinpoint:e}=t;return{Pinpoint:{appId:e.app_id,region:e.aws_region}}}function Q$(t){if(!t)return;const{aws_region:e,geofence_collections:n,maps:r,search_indices:s}=t;return{LocationService:{region:e,searchIndices:s,geofenceCollections:n,maps:r}}}function J$(t){if(!t)return;const{aws_region:e,default_authorization_type:n,url:r,api_key:s,model_introspection:o}=t;return{GraphQL:{endpoint:r,defaultAuthMode:D5(n),region:e,apiKey:s,modelIntrospection:o}}}function eq(t){if(!t?.events)return;const{url:e,aws_region:n,api_key:r,default_authorization_type:s}=t.events;return{Events:{endpoint:e,defaultAuthMode:D5(s),region:n,apiKey:r}}}function tq(t){if(!t)return;const{aws_region:e,channels:n,amazon_pinpoint_app_id:r}=t,s=n.includes("IN_APP_MESSAGING"),o=n.includes("APNS")||n.includes("FCM");if(!(s||o))return;const a={};return s&&(a.InAppMessaging={Pinpoint:{appId:r,region:e}}),o&&(a.PushNotification={Pinpoint:{appId:r,region:e}}),a}function nq(t){const e={};if(t.storage&&(e.Storage=Y$(t.storage)),t.auth&&(e.Auth=Z$(t.auth)),t.analytics&&(e.Analytics=X$(t.analytics)),t.geo&&(e.Geo=Q$(t.geo)),t.data&&(e.API=J$(t.data)),t.custom){const n=eq(t.custom);n&&"Events"in n&&(e.API={...e.API,...n})}return t.notifications&&(e.Notifications=tq(t.notifications)),e}const rq={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function D5(t){return rq[t]}const _N={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function sq(t=[]){return t.reduce((e,n)=>(_N[n]!==void 0&&e.push(_N[n]),e),[])}function oq(t){return t==="OPTIONAL"?"optional":t==="REQUIRED"?"on":"off"}function iq(t){const e={};return t.forEach(({name:n,bucket_name:r,aws_region:s,paths:o})=>{if(n in e)throw new Error(`Duplicate friendly name found: ${n}. Name must be unique.`);const a=o?Object.entries(o).reduce((u,[c,f])=>(f!==void 0&&(u[c]=f),u),{}):void 0;e[n]={bucketName:r,region:s,paths:a}}),e}const L5=t=>Object.keys(t).some(e=>e.startsWith("aws_"))?B$(t):K$(t)?nq(t):t;var xN=function(){return xN=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},xN.apply(this,arguments)};function Cxe(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function aq(t,e,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(p){try{f(r.next(p))}catch(g){a(g)}}function c(p){try{f(r.throw(p))}catch(g){a(g)}}function f(p){p.done?o(p.value):s(p.value).then(u,c)}f((r=r.apply(t,e||[])).next())})}function lq(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,s,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(f){return function(p){return c([f,p])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(n=0)),n;)try{if(r=1,s&&(o=f[0]&2?s.return:f[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,f[1])).done)return o;switch(s=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,s=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){n.label=f[1];break}if(f[0]===6&&n.label<o[1]){n.label=o[1],o=f;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(f);break}o[2]&&n.ops.pop(),n.trys.pop();continue}f=e.call(t,n)}catch(p){f=[6,p],s=0}finally{r=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function wxe(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var _s=64,uq=32,cq=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),dq=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],fq=Math.pow(2,53)-1,Um=(function(){function t(){this.state=Int32Array.from(dq),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return t.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=e.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>fq)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[n++],r--,this.bufferLength===_s&&(this.hashBuffer(),this.bufferLength=0)},t.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%_s>=_s-8){for(var s=this.bufferLength;s<_s;s++)n.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<_s-8;s++)n.setUint8(s,0);n.setUint32(_s-8,Math.floor(e/4294967296),!0),n.setUint32(_s-4,e),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(uq),s=0;s<8;s++)o[s*4]=this.state[s]>>>24&255,o[s*4+1]=this.state[s]>>>16&255,o[s*4+2]=this.state[s]>>>8&255,o[s*4+3]=this.state[s]>>>0&255;return o},t.prototype.hashBuffer=function(){for(var e=this,n=e.buffer,r=e.state,s=r[0],o=r[1],a=r[2],u=r[3],c=r[4],f=r[5],p=r[6],g=r[7],m=0;m<_s;m++){if(m<16)this.temp[m]=(n[m*4]&255)<<24|(n[m*4+1]&255)<<16|(n[m*4+2]&255)<<8|n[m*4+3]&255;else{var y=this.temp[m-2],S=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10;y=this.temp[m-15];var E=(y>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;this.temp[m]=(S+this.temp[m-7]|0)+(E+this.temp[m-16]|0)}var C=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&f^~c&p)|0)+(g+(cq[m]+this.temp[m]|0)|0)|0,w=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&o^s&a^o&a)|0;g=p,p=f,f=c,c=u+C|0,u=a,a=o,o=s,s=C+w|0}r[0]+=s,r[1]+=o,r[2]+=a,r[3]+=u,r[4]+=c,r[5]+=f,r[6]+=p,r[7]+=g},t})();const hq=t=>new TextEncoder().encode(t);var pq=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:hq;function U5(t){return t instanceof Uint8Array?t:typeof t=="string"?pq(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function gq(t){return typeof t=="string"?t.length===0:t.byteLength===0}var Ul=(function(){function t(e){this.secret=e,this.hash=new Um,this.reset()}return t.prototype.update=function(e){if(!(gq(e)||this.error))try{this.hash.update(U5(e))}catch(n){this.error=n}},t.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},t.prototype.digest=function(){return aq(this,void 0,void 0,function(){return lq(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new Um,this.secret){this.outer=new Um;var e=mq(this.secret),n=new Uint8Array(_s);n.set(e);for(var r=0;r<_s;r++)e[r]^=54,n[r]^=92;this.hash.update(e),this.outer.update(n);for(var r=0;r<e.byteLength;r++)e[r]=0}},t})();function mq(t){var e=U5(t);if(e.byteLength>_s){var n=new Um;n.update(e),e=n.digest()}var r=new Uint8Array(_s);return r.set(e),r}for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`)}var _n;(function(t){t.WebUnknown="0",t.React="1",t.NextJs="2",t.Angular="3",t.VueJs="4",t.Nuxt="5",t.Svelte="6",t.ServerSideUnknown="100",t.ReactSSR="101",t.NextJsSSR="102",t.AngularSSR="103",t.VueJsSSR="104",t.NuxtSSR="105",t.SvelteSSR="106",t.ReactNative="201",t.Expo="202"})(_n||(_n={}));var Rs;(function(t){t.AI="ai",t.API="api",t.Auth="auth",t.Analytics="analytics",t.DataStore="datastore",t.Geo="geo",t.InAppMessaging="inappmessaging",t.Interactions="interactions",t.Predictions="predictions",t.PubSub="pubsub",t.PushNotification="pushnotification",t.Storage="storage"})(Rs||(Rs={}));var oi;(function(t){t.CreateConversation="1",t.GetConversation="2",t.ListConversations="3",t.DeleteConversation="4",t.SendMessage="5",t.ListMessages="6",t.OnMessage="7",t.Generation="8",t.UpdateConversation="9"})(oi||(oi={}));var AN;(function(t){t.Record="1",t.IdentifyUser="2"})(AN||(AN={}));var TN;(function(t){t.GraphQl="1",t.Get="2",t.Post="3",t.Put="4",t.Patch="5",t.Del="6",t.Head="7"})(TN||(TN={}));var Ve;(function(t){t.SignUp="1",t.ConfirmSignUp="2",t.ResendSignUpCode="3",t.SignIn="4",t.FetchMFAPreference="6",t.UpdateMFAPreference="7",t.SetUpTOTP="10",t.VerifyTOTPSetup="11",t.ConfirmSignIn="12",t.DeleteUserAttributes="15",t.DeleteUser="16",t.UpdateUserAttributes="17",t.FetchUserAttributes="18",t.ConfirmUserAttribute="22",t.SignOut="26",t.UpdatePassword="27",t.ResetPassword="28",t.ConfirmResetPassword="29",t.FederatedSignIn="30",t.RememberDevice="32",t.ForgetDevice="33",t.FetchDevices="34",t.SendUserAttributeVerificationCode="35",t.SignInWithRedirect="36",t.StartWebAuthnRegistration="37",t.CompleteWebAuthnRegistration="38",t.ListWebAuthnCredentials="39",t.DeleteWebAuthnCredential="40"})(Ve||(Ve={}));var RN;(function(t){t.Subscribe="1",t.GraphQl="2"})(RN||(RN={}));var Qf;(function(t){t.SearchByText="0",t.SearchByCoordinates="1",t.SearchForSuggestions="2",t.SearchByPlaceId="3",t.SaveGeofences="4",t.GetGeofence="5",t.ListGeofences="6",t.DeleteGeofences="7"})(Qf||(Qf={}));var E_;(function(t){t.SyncMessages="1",t.IdentifyUser="2",t.NotifyMessageInteraction="3"})(E_||(E_={}));var IN;(function(t){t.None="0"})(IN||(IN={}));var ON;(function(t){t.Convert="1",t.Identify="2",t.Interpret="3"})(ON||(ON={}));var NN;(function(t){t.Subscribe="1"})(NN||(NN={}));var MN;(function(t){t.InitializePushNotifications="1",t.IdentifyUser="2"})(MN||(MN={}));var qs;(function(t){t.UploadData="1",t.DownloadData="2",t.List="3",t.Copy="4",t.Remove="5",t.GetProperties="6",t.GetUrl="7",t.GetDataAccess="8",t.ListCallerAccessGrants="9"})(qs||(qs={}));const vq="6.18.0",py=()=>typeof global<"u",Qc=()=>typeof window<"u",F5=()=>typeof document<"u",_A=()=>typeof process<"u",fh=(t,e)=>!!Object.keys(t).find(n=>n.startsWith(e));var PN={};function yq(){const t=r=>r.startsWith("_react")||r.startsWith("__react"),e=r=>Object.keys(r).find(t),n=()=>Array.from(document.querySelectorAll("[id]"));return F5()&&n().some(e)}function bq(){return _A()&&typeof PN<"u"&&!!Object.keys(PN).find(t=>t.includes("react"))}function Sq(){return Qc()&&fh(window,"__VUE")}function Eq(){return py()&&fh(global,"__VUE")}var kN={};function Cq(){return Qc()&&fh(window,"__SVELTE")}function wq(){return _A()&&typeof kN<"u"&&!!Object.keys(kN).find(t=>t.includes("svelte"))}function _q(){return Qc()&&window.next&&typeof window.next=="object"}function xq(){return py()&&(fh(global,"__next")||fh(global,"__NEXT"))}function Aq(){return Qc()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function Tq(){return py()&&typeof global.__NUXT_PATHS__<"u"}var DN={};function Rq(){const t=!!(F5()&&document.querySelector("[ng-version]")),e=!!(Qc()&&typeof window.ng<"u");return t||e}function Iq(){return _A()&&typeof DN=="object"&&DN.npm_lifecycle_script?.startsWith("ng ")||!1}function Oq(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function Nq(){return py()&&typeof global.expo<"u"}function Mq(){return Qc()}const Pq=[{platform:_n.Expo,detectionMethod:Nq},{platform:_n.ReactNative,detectionMethod:Oq},{platform:_n.NextJs,detectionMethod:_q},{platform:_n.Nuxt,detectionMethod:Aq},{platform:_n.Angular,detectionMethod:Rq},{platform:_n.React,detectionMethod:yq},{platform:_n.VueJs,detectionMethod:Sq},{platform:_n.Svelte,detectionMethod:Cq},{platform:_n.WebUnknown,detectionMethod:Mq},{platform:_n.NextJsSSR,detectionMethod:xq},{platform:_n.NuxtSSR,detectionMethod:Tq},{platform:_n.ReactSSR,detectionMethod:bq},{platform:_n.VueJsSSR,detectionMethod:Eq},{platform:_n.AngularSSR,detectionMethod:Iq},{platform:_n.SvelteSSR,detectionMethod:wq}];function kq(){return Pq.find(t=>t.detectionMethod())?.platform||_n.ServerSideUnknown}let Jf;const N1=[];let C_=!1;const Dq=10,Lq=10,Uq=1e3,z5=()=>{if(!Jf){if(Jf=kq(),C_)for(;N1.length;)N1.pop()?.();else N1.forEach(t=>{t()});LN(_n.ServerSideUnknown,Dq),LN(_n.WebUnknown,Lq)}return Jf};function Fq(){Jf=void 0}function LN(t,e){Jf===t&&!C_&&setTimeout(()=>{Fq(),C_=!0,setTimeout(z5,Uq)},e)}const pa={},Jo=t=>{pa[t.category]=t.apis.reduce((r,s)=>({...r,[s]:{refCount:r[s]?.refCount?r[s].refCount+1:1,additionalDetails:t.additionalDetails}}),pa[t.category]??{});let e=!1;return()=>{e||(e=!0,t.apis.forEach(r=>{const s=pa[t.category][r].refCount;s>1?pa[t.category][r].refCount=s-1:(delete pa[t.category][r],Object.keys(pa[t.category]).length||delete pa[t.category])}))}},zq=(t,e)=>pa[t]?.[e]?.additionalDetails,Bq="aws-amplify",jq=t=>t.replace(/\+.*/,""),Hq=({category:t,action:e}={})=>{const n=[[Bq,jq(vq)]];if(t&&n.push([t,e]),n.push(["framework",z5()]),t&&e){const r=zq(t,e);r&&r.forEach(s=>{n.push(s)})}return n},gy=t=>Hq(t).map(([r,s])=>r&&s?`${r}/${s}`:r).join(" "),my=()=>typeof window<"u"&&typeof window.document<"u",UN=new nr("Auth");class $q{configure(e,n){this.authConfig=e,this.authOptions=n,e&&e.Cognito?.userPoolEndpoint&&UN.warn(FN("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&UN.warn(FN("Amazon Cognito Identity Pool"))}async fetchAuthSession(e={}){let n,r;const s=await this.getTokens(e);return s?(r=s.accessToken?.payload?.sub,n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:s,authenticated:!0,forceRefresh:e.forceRefresh})):n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:e.forceRefresh}),{tokens:s,credentials:n?.credentials,identityId:n?.identityId,userSub:r}}async clearCredentials(){await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId()}async getTokens(e){return await this.authOptions?.tokenProvider?.getTokens(e)??void 0}}const FN=t=>`You are using a custom Amazon ${t} endpoint, ensure the endpoint is correct.`;class qq{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new $q}configure(e,n){const r=L5(e);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=P5(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),(this.resourcesConfig.Analytics?.Pinpoint||this.resourcesConfig.Notifications?.InAppMessaging?.Pinpoint||this.resourcesConfig.Notifications?.PushNotification?.Pinpoint)&&console.warn("AWS will end support for Amazon Pinpoint on October 30, 2026. The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics."),Ao.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",xo),this.notifyOAuthListener(),this.isConfigured=!0}getConfig(){return this.isConfigured||console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),this.resourcesConfig}[k5](e){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth?e(this.resourcesConfig.Auth?.Cognito):this.oAuthListener=e}notifyOAuthListener(){!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth||!this.oAuthListener||(this.oAuthListener(this.resourcesConfig.Auth?.Cognito),this.oAuthListener=void 0)}}const Ht=new qq,B5=(t,e)=>t.Auth.fetchAuthSession(e),vy=t=>B5(Ht,t);function j5(){return Ht.Auth.clearCredentials()}const yy=t=>{const{headers:e,statusCode:n}=t;return{...Wq(t)?t.$metadata:{},httpStatusCode:n,requestId:e["x-amzn-requestid"]??e["x-amzn-request-id"]??e["x-amz-request-id"],extendedRequestId:e["x-amz-id-2"],cfId:e["x-amz-cf-id"]}},Wq=t=>typeof t?.$metadata=="object",Jc=async t=>{if(!t||t.statusCode<300)return;const e=await Wh(t),r=(a=>{const[u]=a.toString().split(/[,:]+/);return u.includes("#")?u.split("#")[1]:u})(t.headers["x-amzn-errortype"]??e.code??e.__type??"UnknownError"),s=e.message??e.Message??"Unknown error",o=new Error(s);return Object.assign(o,{name:r,$metadata:yy(t)})},Wh=async t=>{if(!t.body)throw new Error("Missing response payload");const e=await t.body.json();return Object.assign(e,{$metadata:yy(t)})},Rn=(t,e,n,r)=>async(s,o)=>{const a={...r,...s},u=await a.endpointResolver(a,o),c=await e(o,u),f=await t(c,{...a});return n(f)},Gq=300*1e3;function Vq(t=Gq){return r=>{const s=2**r*100+100*Math.random();return s>t?!1:s}}const H5=3,zN="amz-sdk-invocation-id",Kq="amz-sdk-request",BN=300*1e3,$5=t=>{const n=Vq(BN)(t);return n===!1?BN:n},Yq=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],Zq=t=>!!t&&Yq.includes(t),q5=t=>async(e,n)=>{const r=n??await t(e)??void 0,s=r?.code||r?.name,o=e?.statusCode;return{retryable:eW(n)||Jq(o,s)||Zq(s)||tW(o,s)}},Xq=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],Qq=["TimeoutError","RequestTimeout","RequestTimeoutException"],Jq=(t,e)=>t===429||!!e&&Xq.includes(e),eW=t=>[Pa.NetworkError,"ERR_NETWORK"].includes(t?.name),tW=(t,e)=>!!t&&[500,502,503,504].includes(t)||!!e&&Qq.includes(e),W5="cognito-identity",G5={service:W5,retryDecider:q5(Jc),computeDelay:$5,cache:"no-store"},nW=({maxAttempts:t=H5,retryDecider:e,computeDelay:n,abortSignal:r})=>{if(t<1)throw new Error("maxAttempts must be greater than 0");return(s,o)=>async function(u){let c,f=o.attemptsCount??0,p;const g=()=>{if(p)return jN(p,f),p;throw jN(c,f),c};for(;!r?.aborted&&f<t;){try{p=await s(u),c=void 0}catch(S){c=S,p=void 0}f=(o.attemptsCount??0)>f?o.attemptsCount??0:f+1,o.attemptsCount=f;const{isCredentialsExpiredError:m,retryable:y}=await e(p,c,o);if(y){if(o.isCredentialsExpired=!!m,!r?.aborted&&f<t){const S=n(f);await rW(S,r)}continue}else return g()}if(r?.aborted)throw new Error("Request aborted.");return g()}},rW=(t,e)=>{if(e?.aborted)return Promise.resolve();let n,r;const s=new Promise(o=>{r=o,n=setTimeout(o,t)});return e?.addEventListener("abort",function o(a){clearTimeout(n),e?.removeEventListener("abort",o),r()}),s},jN=(t,e)=>{Object.prototype.toString.call(t)==="[object Object]"&&(t.$metadata={...t.$metadata??{},attempts:e})},sW=V$,oW=()=>t=>async function(n){return n.headers[zN]||(n.headers[zN]=sW()),t(n)},iW=({maxAttempts:t=H5})=>(e,n)=>async function(s){const o=n.attemptsCount??0;return s.headers[Kq]=`attempt=${o+1}; max=${t}`,e(s)},aW=({userAgentHeader:t="x-amz-user-agent",userAgentValue:e=""})=>n=>async function(s){if(e.trim().length===0)return await n(s);{const o=t.toLowerCase();return s.headers[o]=s.headers[o]?`${s.headers[o]} ${e}`:e,await n(s)}},xA=(t,e)=>(n,r)=>{const s={};let o=a=>t(a,r);for(let a=e.length-1;a>=0;a--){const u=e[a];o=u(r)(o,s)}return o(n)},M1=t=>{let e;return()=>(e||(e=t()),e)},lW=t=>!["HEAD","GET"].includes(t.toUpperCase()),uW=async({url:t,method:e,headers:n,body:r},{abortSignal:s,cache:o,withCrossDomainCredentials:a})=>{let u;try{u=await fetch(t,{method:e,headers:n,body:lW(e)?r:void 0,signal:s,cache:o,credentials:a?"include":"same-origin"})}catch(g){throw g instanceof TypeError?new jr({name:Pa.NetworkError,message:"A network error has occurred.",underlyingError:g}):g}const c={};u.headers?.forEach((g,m)=>{c[m.toLowerCase()]=g});const f={statusCode:u.status,headers:c,body:null},p=Object.assign(u.body??{},{text:M1(()=>u.text()),blob:M1(()=>u.blob()),json:M1(()=>u.json())});return{...f,body:p}},V5=xA(uW,[aW,oW,nW,iW]),cW=()=>t=>async function(n){return n.headers["cache-control"]="no-store",t(n)},K5=xA(V5,[cW]),Y5=t=>(e,n)=>{const r=dW(t),s=JSON.stringify(e);return fW(n,r,s)},dW=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${t}`}),fW=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"}),HN=t=>Rn(K5,Y5("GetCredentialsForIdentity"),hW,{...G5,...t,userAgentValue:gy()}),hW=async t=>{if(t.statusCode>=300)throw await Jc(t);const e=await Wh(t);return{IdentityId:e.IdentityId,Credentials:pW(e.Credentials),$metadata:yy(t)}},pW=({Expiration:t,...e}={})=>({...e,Expiration:t&&new Date(t*1e3)}),gW=t=>Rn(K5,Y5("GetId"),mW,{...G5,...t,userAgentValue:gy()}),mW=async t=>{if(t.statusCode>=300)throw await Jc(t);return{IdentityId:(await Wh(t)).IdentityId,$metadata:yy(t)}},Z5={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},vW={partitions:[Z5,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},X5=t=>{const{partitions:e}=vW;for(const{regions:n,outputs:r,regionRegex:s}of e){const o=new RegExp(s);if(n.includes(t)||o.test(t))return r.dnsSuffix}return Z5.outputs.dnsSuffix},Wa=URL,yW=({region:t})=>({url:new Wa(`https://${W5}.${t}.${X5(t)}`)});class Uf extends jr{constructor(){super({name:Pa.PlatformNotSupported,message:"Function not supported on current platform"})}}class Q5{constructor(e){this.storage=e}async setItem(e,n){if(!this.storage)throw new Uf;this.storage.setItem(e,n)}async getItem(e){if(!this.storage)throw new Uf;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new Uf;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new Uf;this.storage.clear()}}class J5{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,n){this.storage.set(e,n)}getItem(e){return this.storage.get(e)??null}removeItem(e){this.storage.delete(e)}clear(){this.storage.clear()}}const e6=new nr("CoreStorageUtils"),bW=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{e6.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new J5},t6=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return e6.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new J5}};class SW extends Q5{constructor(){super(bW())}}class EW extends Q5{constructor(){super(t6())}}class CW{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new Uf;return this._storage}setItem(e,n){this.storage.setItem(e,n)}getItem(e){return this.storage.getItem(e)}removeItem(e){this.storage.removeItem(e)}clear(){this.storage.clear()}}class wW extends CW{constructor(){super(t6())}}function Og(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)r!=="__proto__"&&(t[r]=n[r])}return t}var _W={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function w_(t,e){function n(s,o,a){if(!(typeof document>"u")){a=Og({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=s+"="+t.write(o,s)+u}}function r(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),f=c.slice(1).join("=");try{var p=decodeURIComponent(c[0]);if(p in a||(a[p]=t.read(f,p)),s===p)break}catch{}}return s?a[s]:a}}return Object.create({set:n,get:r,remove:function(s,o){n(s,"",Og({},o,{expires:-1}))},withAttributes:function(s){return w_(this.converter,Og({},this.attributes,s))},withConverter:function(s){return w_(Og({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Ng=w_(_W,{path:"/"});class xW{constructor(e={}){const{path:n,domain:r,expires:s,sameSite:o,secure:a}=e;if(this.domain=r,this.path=n||"/",this.expires=Object.prototype.hasOwnProperty.call(e,"expires")?s:365,this.secure=Object.prototype.hasOwnProperty.call(e,"secure")?a:!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!o||!["strict","lax","none"].includes(o))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if(o==="none"&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=o}}async setItem(e,n){Ng.set(e,n,this.getData())}async getItem(e){return Ng.get(e)??null}async removeItem(e){Ng.remove(e,this.getData())}async clear(){const e=Ng.get(),n=Object.keys(e).map(r=>this.removeItem(r));await Promise.all(n)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}const Gh=new SW;new EW;const ci=new wW,AW=new nr("I18n");let TW=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),AW.debug(this._lang)}setLanguage(e){this._lang=e}get(e,n=void 0){if(this.setDefaultLanguage(),!this._lang)return typeof n<"u"?n:e;const r=this._lang;let s=this.getByLanguage(e,r);return s||(r.indexOf("-")>0&&(s=this.getByLanguage(e,r.split("-")[0])),s)?s:typeof n<"u"?n:e}getByLanguage(e,n,r=null){if(!n)return r;const s=this._dict[n];return s?s[e]:r}putVocabulariesForLanguage(e,n){let r=this._dict[e];r||(r=this._dict[e]={}),this._dict[e]={...r,...n}}putVocabularies(e){Object.keys(e).forEach(n=>{this.putVocabulariesForLanguage(n,e[n])})}};var Cl;(function(t){t.NotConfigured="NotConfigured"})(Cl||(Cl={}));const RW={[Cl.NotConfigured]:{message:"i18n is not configured."}},Mg=fy(RW),$N=new nr("I18n");let Pg={language:null},Bs=null,n6=class bl{static configure(e){return $N.debug("configure I18n"),e&&(Pg=Object.assign({},Pg,e.I18n||e),bl.createInstance()),Pg}static getModuleName(){return"I18n"}static createInstance(){$N.debug("create I18n instance"),!Bs&&(Bs=new TW)}static setLanguage(e){bl.checkConfig(),Mg(!!Bs,Cl.NotConfigured),Bs.setLanguage(e)}static get(e,n){return bl.checkConfig(),Mg(!!Bs,Cl.NotConfigured),Bs.get(e,n)}static putVocabulariesForLanguage(e,n){bl.checkConfig(),Mg(!!Bs,Cl.NotConfigured),Bs.putVocabulariesForLanguage(e,n)}static putVocabularies(e){bl.checkConfig(),Mg(!!Bs,Cl.NotConfigured),Bs.putVocabularies(e)}static checkConfig(){return Bs||bl.createInstance(),!0}};n6.createInstance();const IW=t=>{const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(t);EA().getRandomValues(r);for(const s of r)n.push(e[s%e.length]);return n.join("")};function OW(t){return(t.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function NW(t){return t.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const MW=t=>{let e;return async(...n)=>e||(e=new Promise((r,s)=>{t(...n).then(o=>{r(o)}).catch(o=>{s(o)}).finally(()=>{e=void 0})}),e)};function qN({expiresAt:t,clockDrift:e,tolerance:n=5e3}){return Date.now()+e+n>t}const PW=async()=>{const{userAgentData:t}=navigator;if(!t)return navigator.userAgent;const{platform:e="",platformVersion:n="",model:r="",architecture:s="",fullVersionList:o=[]}=await t.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]),a=o.map(c=>`${c.brand}/${c.version}`).join(";");return[e,n,s,r,e,a].filter(c=>c).join(" ")||navigator.userAgent};function kW(t){return Array.from(t,e=>String.fromCodePoint(e)).join("")}const Mc={convert(t,e={urlSafe:!1,skipPadding:!1}){const n=typeof t=="string"?t:kW(t);let r=D$()(n);return e.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),e.skipPadding&&(r=r.replace(/=/g,"")),r}};function DW(){return EA().getRandomValues(new Uint32Array(1))[0]}function LW(t){const{words:e}=t,{sigBytes:n}=t,r=[];for(let s=0;s<n;s++){const o=e[s>>>2]>>>24-s%4*8&255;r.push((o>>>4).toString(16)),r.push((o&15).toString(16))}return r.join("")}class AA{constructor(e,n){this.words=[];let r=e;r=this.words=r||[],n!==void 0?this.sigBytes=n:this.sigBytes=r.length*4}random(e){const n=[];for(let r=0;r<e;r+=4)n.push(DW());return new AA(n,e)}toString(){return LW(this)}}var Ge;(function(t){t.EmptySignInUsername="EmptySignInUsername",t.EmptySignInPassword="EmptySignInPassword",t.CustomAuthSignInPassword="CustomAuthSignInPassword",t.EmptySignUpUsername="EmptySignUpUsername",t.EmptySignUpPassword="EmptySignUpPassword",t.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",t.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",t.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",t.EmptyChallengeResponse="EmptyChallengeResponse",t.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",t.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",t.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",t.EmptyResetPasswordUsername="EmptyResetPasswordUsername",t.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",t.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",t.IncorrectMFAMethod="IncorrectMFAMethod",t.EmptyUpdatePassword="EmptyUpdatePassword",t.InvalidPreferredChallenge="InvalidPreferredChallenge"})(Ge||(Ge={}));const r6={[Ge.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[Ge.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[Ge.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[Ge.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[Ge.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[Ge.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[Ge.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[Ge.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[Ge.EmptySignInPassword]:{message:"password is required to signIn"},[Ge.EmptySignInUsername]:{message:"username is required to signIn"},[Ge.EmptySignUpPassword]:{message:"password is required to signUp"},[Ge.EmptySignUpUsername]:{message:"username is required to signUp"},[Ge.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[Ge.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"},[Ge.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[Ge.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[Ge.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[Ge.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};var Fn;(function(t){t.DEFAULT_MSG="Authentication Error",t.EMPTY_EMAIL="Email cannot be empty",t.EMPTY_PHONE="Phone number cannot be empty",t.EMPTY_USERNAME="Username cannot be empty",t.INVALID_USERNAME="The username should either be a string or one of the sign in types",t.EMPTY_PASSWORD="Password cannot be empty",t.EMPTY_CODE="Confirmation code cannot be empty",t.SIGN_UP_ERROR="Error creating account",t.NO_MFA="No valid MFA method provided",t.INVALID_MFA="Invalid MFA type",t.EMPTY_CHALLENGE="Challenge response cannot be empty",t.NO_USER_SESSION="Failed to get the session because the user is empty",t.NETWORK_ERROR="Network Error",t.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",t.AUTOSIGNIN_ERROR="Please use your credentials to sign in",t.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"})(Fn||(Fn={}));var To;(function(t){t.SignInException="SignInException",t.OAuthSignInError="OAuthSignInException"})(To||(To={}));class Le extends jr{constructor(e){super(e),this.constructor=Le,Object.setPrototypeOf(this,Le.prototype)}}function fn(t,e){const{message:n,recoverySuggestion:r}=r6[e];if(!t)throw new Le({name:e,message:n,recoverySuggestion:r})}function yt(t){const e=t?.split("_")[0];if(!t||t.indexOf("_")<0||!e||typeof e!="string")throw new Le({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return e}function __(t){if(!t||!t.includes(":"))throw new Le({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return t.split(":")[0]}function WN(t){return Object.entries(t).map(([e,n])=>({Name:e,Value:n}))}function UW(t){const e={};return t?.forEach(n=>{n.Name&&(e[n.Name]=n.Value)}),e}var GN;(function(t){t.ConcurrentModificationException="ConcurrentModificationException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(GN||(GN={}));var VN;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(VN||(VN={}));var KN;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UsernameExistsException="UsernameExistsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(KN||(KN={}));var YN;(function(t){t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyFailedAttemptsException="TooManyFailedAttemptsException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(YN||(YN={}));var ZN;(function(t){t.AliasExistsException="AliasExistsException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyFailedAttemptsException="TooManyFailedAttemptsException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotFoundException="UserNotFoundException"})(ZN||(ZN={}));var XN;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(XN||(XN={}));var QN;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(QN||(QN={}));var JN;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(JN||(JN={}));var eM;(function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotFoundException="UserNotFoundException"})(eM||(eM={}));var tM;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(tM||(tM={}));var nM;(function(t){t.ExternalServiceException="ExternalServiceException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceConflictException="ResourceConflictException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException"})(nM||(nM={}));var rM;(function(t){t.ExternalServiceException="ExternalServiceException",t.InternalErrorException="InternalErrorException",t.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceConflictException="ResourceConflictException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException"})(rM||(rM={}));var sM;(function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(sM||(sM={}));var oM;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException"})(oM||(oM={}));var hv;(function(t){t.PasswordResetRequiredException="PasswordResetRequiredException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(hv||(hv={}));var iM;(function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotFoundException="UserNotFoundException"})(iM||(iM={}));var aM;(function(t){t.AliasExistsException="AliasExistsException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.MFAMethodNotFoundException="MFAMethodNotFoundException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(aM||(aM={}));var lM;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(lM||(lM={}));var x_;(function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UsernameExistsException="UsernameExistsException"})(x_||(x_={}));var uM;(function(t){t.AliasExistsException="AliasExistsException",t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(uM||(uM={}));var cM;(function(t){t.CodeMismatchException="CodeMismatchException",t.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(cM||(cM={}));var dM;(function(t){t.AliasExistsException="AliasExistsException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(dM||(dM={}));var fM;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(fM||(fM={}));var hM;(function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(hM||(hM={}));const by="UserUnAuthenticatedException",FW="UserAlreadyAuthenticatedException",zW="DeviceMetadataNotFoundException",s6="AutoSignInException",BW="InvalidRedirectException",jW="InvalidAppSchemeException",HW="InvalidPreferredRedirectUrlException",$W=new Le({name:BW,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 Le({name:jW,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."});new Le({name:HW,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."});const qW="InvalidOriginException",WW=new Le({name:qW,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."}),GW="OAuthSignOutException",VW="TokenRefreshException",KW="UnexpectedSignInInterruptionException";function ed(t){if(!t||!t.accessToken)throw new Le({name:by,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function YW(t){if(!t||!t.idToken)throw new Le({name:by,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const ZW=new Le({name:VW,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow.
|
|
3
3
|
Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow.
|
|
4
4
|
E.g { responseType: 'code' }`}),XW=new Le({name:by,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function o6(t){if(eG(t))throw ZW;if(!JW(t))throw XW}function i6(t){if(!t||!t.deviceKey||!t.deviceGroupKey||!t.randomPassword)throw new Le({name:zW,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."})}const QW={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function a6(t){return t?.accessToken||t?.idToken}function JW(t){return a6(t)&&t?.refreshToken}function eG(t){return a6(t)&&!t?.refreshToken}const tG=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const n=await t.Auth.getTokens({forceRefresh:!1});ed(n);const{"cognito:username":r,sub:s}=n.idToken?.payload??{},o={username:r,userId:s},a=nG(n);return a&&(o.signInDetails=a),o};function nG(t){return t?.signInDetails}const Sy=async()=>tG(Ht),Nt=(t,e)=>gy({category:Rs.Auth,action:t,...e}),Bn=t=>(e,n)=>{const r=rG(t),s=JSON.stringify(e);return sG(n,r,s)},rG=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}),sG=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"});function Is(t){if(!t||t.name==="Error"||t instanceof TypeError)throw new Le({name:Pa.Unknown,message:"An unknown error has occurred.",underlyingError:t})}const or=()=>async t=>{if(t.statusCode>=300){const e=await Jc(t);throw Is(e),new Le({name:e.name,message:e.message,metadata:e.$metadata})}return Wh(t)},oG=()=>(t,e)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await Ht.libraryOptions?.Auth?.headers?.()},t(r)},jn=xA(V5,[oG]),l6="cognito-idp",Hn={service:l6,retryDecider:q5(Jc),computeDelay:$5,get userAgentValue(){return gy()},cache:"no-store"},Vh=t=>Rn(jn,Bn("InitiateAuth"),or(),{...Hn,...t}),is=t=>Rn(jn,Bn("RespondToAuthChallenge"),or(),{...Hn,...t}),iG=t=>Rn(jn,Bn("VerifySoftwareToken"),or(),{...Hn,...t}),aG=t=>Rn(jn,Bn("AssociateSoftwareToken"),or(),{...Hn,...t}),lG=({region:t})=>({url:new Wa(`https://${l6}.${t}.${X5(t)}`)}),bt=({endpointOverride:t})=>e=>t?{url:new Wa(t)}:lG(e),uG=t=>Rn(jn,Bn("GetTokensFromRefreshToken"),or(),{...Hn,...t}),cG=async({tokens:t,authConfig:e,username:n,clientMetadata:r})=>{lt(e?.Cognito);const{userPoolId:s,userPoolClientId:o,userPoolEndpoint:a}=e.Cognito,u=yt(s);o6(t);const c=uG({endpointResolver:bt({endpointOverride:a})}),{AuthenticationResult:f}=await c({region:u},{ClientId:o,RefreshToken:t.refreshToken,DeviceKey:t.deviceMetadata?.deviceKey,ClientMetadata:r}),p=gi(f?.AccessToken??""),g=f?.IdToken?gi(f.IdToken):void 0,{iat:m}=p.payload;if(!m)throw new Le({name:"iatNotFoundException",message:"iat not found in access token"});const y=m*1e3-new Date().getTime();return{accessToken:p,idToken:g,clockDrift:y,refreshToken:f?.RefreshToken??t.refreshToken,username:n}},dG=MW(cG),fG={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var pv;(function(t){t.InvalidAuthTokens="InvalidAuthTokens"})(pv||(pv={}));const hG={[pv.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},pG=fy(hG),pM="CognitoIdentityServiceProvider";class gG{getKeyValueStorage(){if(!this.keyValueStorage)throw new Le({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{const e=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(e.accessToken);if(!n)throw new Le({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});const r=gi(n),s=await this.getKeyValueStorage().getItem(e.idToken),o=s?gi(s):void 0,a=await this.getKeyValueStorage().getItem(e.refreshToken)??void 0,u=await this.getKeyValueStorage().getItem(e.clockDrift)??"0",c=Number.parseInt(u),f=await this.getKeyValueStorage().getItem(e.signInDetails),p={accessToken:r,idToken:o,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:c,username:await this.getLastAuthUser()};return f&&(p.signInDetails=JSON.parse(f)),p}catch{return null}}async storeTokens(e){pG(e!==void 0,pv.InvalidAuthTokens);const n=e.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),n);const r=await this.getAuthKeys();await this.getKeyValueStorage().setItem(r.accessToken,e.accessToken.toString()),e.idToken?await this.getKeyValueStorage().setItem(r.idToken,e.idToken.toString()):await this.getKeyValueStorage().removeItem(r.idToken),e.refreshToken?await this.getKeyValueStorage().setItem(r.refreshToken,e.refreshToken):await this.getKeyValueStorage().removeItem(r.refreshToken),e.deviceMetadata&&(e.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(r.deviceKey,e.deviceMetadata.deviceKey),e.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(r.deviceGroupKey,e.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(r.randomPasswordKey,e.deviceMetadata.randomPassword)),e.signInDetails?await this.getKeyValueStorage().setItem(r.signInDetails,JSON.stringify(e.signInDetails)):await this.getKeyValueStorage().removeItem(r.signInDetails),await this.getKeyValueStorage().setItem(r.clockDrift,`${e.clockDrift}`)}async clearTokens(){const 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){const n=await this.getAuthKeys(e),r=await this.getKeyValueStorage().getItem(n.deviceKey),s=await this.getKeyValueStorage().getItem(n.deviceGroupKey),o=await this.getKeyValueStorage().getItem(n.randomPasswordKey);return o&&s&&r?{deviceKey:r,deviceGroupKey:s,randomPassword:o}:null}async clearDeviceMetadata(e){const n=await this.getAuthKeys(e);await Promise.all([this.getKeyValueStorage().removeItem(n.deviceKey),this.getKeyValueStorage().removeItem(n.deviceGroupKey),this.getKeyValueStorage().removeItem(n.randomPasswordKey)])}async getAuthKeys(e){lt(this.authConfig?.Cognito);const n=e??await this.getLastAuthUser();return mG(pM,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){lt(this.authConfig?.Cognito);const e=this.authConfig.Cognito.userPoolClientId;return`${pM}.${e}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(e){const{oauthMetadata:n}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n,JSON.stringify(e))}async getOAuthMetadata(){const{oauthMetadata:e}=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(e);return n&&JSON.parse(n)}}const mG=(t,e)=>TA(fG)(`${t}`,e);function TA(t){const e=Object.values({...t});return(n,r)=>e.reduce((s,o)=>({...s,[o]:`${n}.${r}.${o}`}),{})}const gM="amplify-signin-with-hostedUI",ho="CognitoIdentityServiceProvider";class u6{constructor(e){this.keyValueStorage=e}async clearOAuthInflightData(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(e.inflightOAuth),this.keyValueStorage.removeItem(e.oauthPKCE),this.keyValueStorage.removeItem(e.oauthState)])}async clearOAuthData(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(gM),this.keyValueStorage.removeItem(e.oauthSignIn)}loadOAuthState(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthState)}storeOAuthState(e){lt(this.cognitoConfig);const n=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthState,e)}loadPKCE(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthPKCE)}storePKCE(e){lt(this.cognitoConfig);const n=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthPKCE,e)}setAuthConfig(e){this.cognitoConfig=e}async loadOAuthInFlight(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(e.inflightOAuth)==="true"}async storeOAuthInFlight(e){lt(this.cognitoConfig);const n=po(ho,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.inflightOAuth,`${e}`)}async loadOAuthSignIn(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId),n=await this.keyValueStorage.getItem(gM),[r,s]=(await this.keyValueStorage.getItem(e.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:r==="true"||n==="true",preferPrivateSession:s==="true"}}async storeOAuthSignIn(e,n=!1){lt(this.cognitoConfig);const r=po(ho,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(r.oauthSignIn,`${e},${n}`)}}const po=(t,e)=>TA(QW)(t,e),Ur=new u6(Gh),A_=[],vG=t=>{A_.push(t)},c6=()=>{for(;A_.length;)A_.pop()?.()};class yG{constructor(){this.waitForInflightOAuth=my()?async()=>{if(await Ur.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((e,n)=>{vG(e)}),this.inflightPromise)}:async()=>{}}setAuthConfig(e){Ur.setAuthConfig(e.Cognito),this.authConfig=e}setTokenRefresher(e){this.tokenRefresher=e}setAuthTokenStore(e){this.tokenStore=e}getTokenStore(){if(!this.tokenStore)throw new Le({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new Le({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(e){this.clientMetadataProvider=e}async getTokens(e){let n;try{lt(this.authConfig?.Cognito)}catch{return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,n=await this.getTokenStore().loadTokens();const r=await this.getTokenStore().getLastAuthUser();if(n===null)return null;const s=!!n?.idToken&&qN({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),o=qN({expiresAt:(n.accessToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0});return(e?.forceRefresh||s||o)&&(n=await this.refreshTokens({tokens:n,username:r,clientMetadata:e?.clientMetadata??await this.clientMetadataProvider?.()}),n===null)?null:{accessToken:n?.accessToken,idToken:n?.idToken,signInDetails:n?.signInDetails}}async refreshTokens({tokens:e,username:n,clientMetadata:r}){try{const{signInDetails:s}=e,o=await this.getTokenRefresher()({tokens:e,authConfig:this.authConfig,username:n,clientMetadata:r});return o.signInDetails=s,await this.setTokens({tokens:o}),Ao.dispatch("auth",{event:"tokenRefresh"},"Auth",xo),o}catch(s){return this.handleErrors(s)}}handleErrors(e){if(Is(e),this.isAuthenticationError(e)&&this.clearTokens(),Ao.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",xo),e.name.startsWith("NotAuthorizedException"))return null;throw e}isAuthenticationError(e){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(r=>e?.name?.startsWith?.(r))}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 bG{constructor(){this.authTokenStore=new gG,this.authTokenStore.setKeyValueStorage(Gh),this.tokenOrchestrator=new yG,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(dG)}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)}}const Fm=new bG,{tokenOrchestrator:Hr}=Fm;async function xi(t){if(t.AccessToken){const e=gi(t.AccessToken),n=(e.payload.iat||0)*1e3,r=new Date().getTime(),s=n>0?n-r:0;let o,a,u;t.RefreshToken&&(a=t.RefreshToken),t.IdToken&&(o=gi(t.IdToken)),t?.NewDeviceMetadata&&(u=t.NewDeviceMetadata);const c={accessToken:e,idToken:o,refreshToken:a,clockDrift:s,deviceMetadata:u,username:t.username};t?.signInDetails&&(c.signInDetails=t.signInDetails),await Hr.setTokens({tokens:c})}else throw new jr({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}const SG="Unable to get user session following successful sign-in.",Ga=async()=>{try{Ao.dispatch("auth",{event:"signedIn",data:await Sy()},"Auth",xo)}catch(t){throw t.name===by?new Le({name:KW,message:SG,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."}):t}};function d6(){return{active:!1}}const EG=(t,e)=>{switch(e.type){case"SET_USERNAME":return{...t,username:e.value};case"SET_SESSION":return{...t,session:e.value};case"START":return{...t,active:!0};case"RESET":return d6();default:return t}},CG=t=>{let e=t(d6(),{type:"RESET"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Aa=CG(EG),wG=180*1e3,kg="CognitoSignInState",di={username:`${kg}.username`,challengeName:`${kg}.challengeName`,signInSession:`${kg}.signInSession`,expiry:`${kg}.expiry`},_G=(t,e)=>{switch(e.type){case"SET_SIGN_IN_SESSION":return Dg({signInSession:e.value}),{...t,signInSession:e.value};case"SET_SIGN_IN_STATE":return Dg(e.value),{...e.value};case"SET_CHALLENGE_NAME":return Dg({challengeName:e.value}),{...t,challengeName:e.value};case"SET_USERNAME":return Dg({username:e.value}),{...t,username:e.value};case"SET_INITIAL_STATE":return AG();case"RESET_STATE":return f6(),RA();default:return t}},xG=t=>{const e=Number(t),n=Date.now();return e<=n},Qs=()=>{Ro.dispatch({type:"RESET_STATE"})},f6=()=>{for(const t of Object.values(di))ci.removeItem(t)},RA=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),AG=()=>{const t=ci.getItem(di.expiry);if(!t||xG(t))return f6(),RA();const e=ci.getItem(di.username)??void 0,n=ci.getItem(di.challengeName)??void 0,r=ci.getItem(di.signInSession)??void 0;return{username:e,challengeName:n,signInSession:r}},TG=t=>{let e=t(RA(),{type:"SET_INITIAL_STATE"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Ro=TG(_G);function Xl(t){Ro.dispatch({type:"SET_SIGN_IN_STATE",value:t})}const Dg=({challengeName:t,signInSession:e,username:n})=>{n&&ci.setItem(di.username,n),t&&ci.setItem(di.challengeName,t),e&&(ci.setItem(di.signInSession,e),ci.setItem(di.expiry,String(Date.now()+wG)))},mM="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 Ts extends jr{constructor(e){super(e),this.constructor=Ts,Object.setPrototypeOf(this,Ts.prototype)}}var Bt;(function(t){t.PasskeyNotSupported="PasskeyNotSupported",t.PasskeyAlreadyExists="PasskeyAlreadyExists",t.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",t.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",t.RelyingPartyMismatch="RelyingPartyMismatch",t.PasskeyRegistrationFailed="PasskeyRegistrationFailed",t.PasskeyRetrievalFailed="PasskeyRetrievalFailed",t.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",t.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",t.PasskeyOperationAborted="PasskeyOperationAborted"})(Bt||(Bt={}));const P1="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",vM="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",Pc={[Bt.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:mM},[Bt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:vM},[Bt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:vM},[Bt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:mM},[Bt.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."},[Bt.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[Bt.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:P1},[Bt.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:P1},[Bt.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:P1},[Bt.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},td=fy(Pc,Ts),h6=t=>{if(t instanceof Error){if(t.name==="AbortError"){const{message:e,recoverySuggestion:n}=Pc[Bt.PasskeyOperationAborted];return new Ts({name:Bt.PasskeyOperationAborted,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="SecurityError"){const{message:e,recoverySuggestion:n}=Pc[Bt.RelyingPartyMismatch];return new Ts({name:Bt.RelyingPartyMismatch,message:e,recoverySuggestion:n,underlyingError:t})}}return new Ts({name:Pa.Unknown,message:"An unknown error has occurred.",underlyingError:t})},RG=t=>{if(t instanceof Ts)return t;if(t instanceof Error&&t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=Pc[Bt.PasskeyAuthenticationCanceled];return new Ts({name:Bt.PasskeyAuthenticationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}return h6(t)},p6=()=>my()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Co=t=>Mc.convert(new Uint8Array(t),{urlSafe:!0,skipPadding:!0}),eh=t=>Uint8Array.from(CA.convert(t,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,IG=t=>{const e=eh(t.user.id),n=eh(t.challenge),r=(t.excludeCredentials||[]).map(s=>({...s,id:eh(s.id)}));return{...t,excludeCredentials:r,challenge:n,user:{...t.user,id:e}}},OG=t=>{const e={clientDataJSON:Co(t.response.clientDataJSON),attestationObject:Co(t.response.attestationObject),transports:t.response.getTransports(),publicKeyAlgorithm:t.response.getPublicKeyAlgorithm(),authenticatorData:Co(t.response.getAuthenticatorData())},n=t.response.getPublicKey();n&&(e.publicKey=Co(n));const r={type:t.type,id:t.id,rawId:Co(t.rawId),clientExtensionResults:t.getClientExtensionResults(),response:e};return t.authenticatorAttachment&&(r.authenticatorAttachment=t.authenticatorAttachment),r},NG=t=>{const e=eh(t.challenge),n=(t.allowCredentials||[]).map(r=>({...r,id:eh(r.id)}));return{...t,challenge:e,allowCredentials:n}},MG=t=>{const e={clientDataJSON:Co(t.response.clientDataJSON),authenticatorData:Co(t.response.authenticatorData),signature:Co(t.response.signature)};t.response.userHandle&&(e.userHandle=Co(t.response.userHandle));const n={id:t.id,rawId:Co(t.rawId),type:t.type,clientExtensionResults:t.getClientExtensionResults(),response:e};return t.authenticatorAttachment&&(n.authenticatorAttachment=t.authenticatorAttachment),n};function PG(t){td([!!t,!!t?.challenge,!!t?.user,!!t?.rp,!!t?.pubKeyCredParams].every(Boolean),Bt.InvalidPasskeyRegistrationOptions)}function kG(t){td(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAttestationResponse,Bt.PasskeyRegistrationFailed)}function DG(t){td(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAssertionResponse,Bt.PasskeyRetrievalFailed)}const LG=async t=>{try{const e=p6();td(e,Bt.PasskeyNotSupported);const n=NG(t),r=await navigator.credentials.get({publicKey:n});return DG(r),MG(r)}catch(e){throw RG(e)}},UG=t=>Rn(jn,Bn("ConfirmDevice"),or(),{...Hn,...t}),zm={convert(t){return new TextEncoder().encode(t)}};function Ie(t,e){t!=null&&this.fromString(t,e)}function wr(){return new Ie(null,null)}let Ia;const FG=0xdeadbeefcafe,yM=(FG&16777215)===15715070;function zG(t,e,n,r,s,o){for(;--o>=0;){const a=e*this[t++]+n[r]+s;s=Math.floor(a/67108864),n[r++]=a&67108863}return s}function BG(t,e,n,r,s,o){const a=e&32767,u=e>>15;for(;--o>=0;){let c=this[t]&32767;const f=this[t++]>>15,p=u*c+f*a;c=a*c+((p&32767)<<15)+n[r]+(s&1073741823),s=(c>>>30)+(p>>>15)+u*f+(s>>>30),n[r++]=c&1073741823}return s}function jG(t,e,n,r,s,o){const a=e&16383,u=e>>14;for(;--o>=0;){let c=this[t]&16383;const f=this[t++]>>14,p=u*c+f*a;c=a*c+((p&16383)<<14)+n[r]+s,s=(c>>28)+(p>>14)+u*f,n[r++]=c&268435455}return s}const bM=typeof navigator<"u";bM&&yM&&navigator.appName==="Microsoft Internet Explorer"?(Ie.prototype.am=BG,Ia=30):bM&&yM&&navigator.appName!=="Netscape"?(Ie.prototype.am=zG,Ia=26):(Ie.prototype.am=jG,Ia=28);Ie.prototype.DB=Ia;Ie.prototype.DM=(1<<Ia)-1;Ie.prototype.DV=1<<Ia;const IA=52;Ie.prototype.FV=Math.pow(2,IA);Ie.prototype.F1=IA-Ia;Ie.prototype.F2=2*Ia-IA;const HG="0123456789abcdefghijklmnopqrstuvwxyz",Ey=[];let nd,xs;nd=48;for(xs=0;xs<=9;++xs)Ey[nd++]=xs;nd=97;for(xs=10;xs<36;++xs)Ey[nd++]=xs;nd=65;for(xs=10;xs<36;++xs)Ey[nd++]=xs;function SM(t){return HG.charAt(t)}function $G(t,e){const n=Ey[t.charCodeAt(e)];return n??-1}function qG(t){for(let e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function WG(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0}function OA(t){const e=wr();return e.fromInt(t),e}function GG(t,e){let n;if(e===16)n=4;else if(e===8)n=3;else if(e===2)n=1;else if(e===32)n=5;else if(e===4)n=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let r=t.length,s=!1,o=0;for(;--r>=0;){const a=$G(t,r);if(a<0){t.charAt(r)==="-"&&(s=!0);continue}s=!1,o===0?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,o+=n,o>=this.DB&&(o-=this.DB)}this.clamp(),s&&Ie.ZERO.subTo(this,this)}function VG(){const t=this.s&this.DM;for(;this.t>0&&this[this.t-1]==t;)--this.t}function KG(t){if(this.s<0)return"-"+this.negate().toString(t);let e;if(t==16)e=4;else if(t===8)e=3;else if(t===2)e=1;else if(t===32)e=5;else if(t===4)e=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");const n=(1<<e)-1;let r,s=!1,o="",a=this.t,u=this.DB-a*this.DB%e;if(a-- >0)for(u<this.DB&&(r=this[a]>>u)>0&&(s=!0,o=SM(r));a>=0;)u<e?(r=(this[a]&(1<<u)-1)<<e-u,r|=this[--a]>>(u+=this.DB-e)):(r=this[a]>>(u-=e)&n,u<=0&&(u+=this.DB,--a)),r>0&&(s=!0),s&&(o+=SM(r));return s?o:"0"}function YG(){const t=wr();return Ie.ZERO.subTo(this,t),t}function ZG(){return this.s<0?this.negate():this}function XG(t){let e=this.s-t.s;if(e!=0)return e;let n=this.t;if(e=n-t.t,e!=0)return this.s<0?-e:e;for(;--n>=0;)if((e=this[n]-t[n])!=0)return e;return 0}function NA(t){let e=1,n;return(n=t>>>16)!==0&&(t=n,e+=16),(n=t>>8)!==0&&(t=n,e+=8),(n=t>>4)!==0&&(t=n,e+=4),(n=t>>2)!==0&&(t=n,e+=2),(n=t>>1)!==0&&(t=n,e+=1),e}function QG(){return this.t<=0?0:this.DB*(this.t-1)+NA(this[this.t-1]^this.s&this.DM)}function JG(t,e){let n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function eV(t,e){for(let n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s}function tV(t,e){const n=t%this.DB,r=this.DB-n,s=(1<<r)-1,o=Math.floor(t/this.DB);let a=this.s<<n&this.DM,u;for(u=this.t-1;u>=0;--u)e[u+o+1]=this[u]>>r|a,a=(this[u]&s)<<n;for(u=o-1;u>=0;--u)e[u]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()}function nV(t,e){e.s=this.s;const n=Math.floor(t/this.DB);if(n>=this.t){e.t=0;return}const r=t%this.DB,s=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(let a=n+1;a<this.t;++a)e[a-n-1]|=(this[a]&o)<<s,e[a-n]=this[a]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<s),e.t=this.t-n,e.clamp()}function rV(t,e){let n=0,r=0;const s=Math.min(t.t,this.t);for(;n<s;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()}function sV(t,e){const n=this.abs(),r=t.abs();let s=n.t;for(e.t=s+r.t;--s>=0;)e[s]=0;for(s=0;s<r.t;++s)e[s+n.t]=n.am(0,r[s],e,s,0,n.t);e.s=0,e.clamp(),this.s!==t.s&&Ie.ZERO.subTo(e,e)}function oV(t){const e=this.abs();let n=t.t=2*e.t;for(;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){const r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()}function iV(t,e,n){const r=t.abs();if(r.t<=0)return;const s=this.abs();if(s.t<r.t){e?.fromInt(0),n!=null&&this.copyTo(n);return}n===null&&(n=wr());const o=wr(),a=this.s,u=t.s,c=this.DB-NA(r[r.t-1]);c>0?(r.lShiftTo(c,o),s.lShiftTo(c,n)):(r.copyTo(o),s.copyTo(n));const f=o.t,p=o[f-1];if(p===0)return;const g=p*(1<<this.F1)+(f>1?o[f-2]>>this.F2:0),m=this.FV/g,y=(1<<this.F1)/g,S=1<<this.F2;let E=n.t,C=E-f;const w=e===null?wr():e;for(o.dlShiftTo(C,w),n.compareTo(w)>=0&&(n[n.t++]=1,n.subTo(w,n)),Ie.ONE.dlShiftTo(f,w),w.subTo(o,o);o.t<f;)o[o.t++]=0;for(;--C>=0;){let x=n[--E]===p?this.DM:Math.floor(n[E]*m+(n[E-1]+S)*y);if((n[E]+=o.am(0,x,n,C,0,f))<x)for(o.dlShiftTo(C,w),n.subTo(w,n);n[E]<--x;)n.subTo(w,n)}e!==null&&(n.drShiftTo(f,e),a!==u&&Ie.ZERO.subTo(e,e)),n.t=f,n.clamp(),c>0&&n.rShiftTo(c,n),a<0&&Ie.ZERO.subTo(n,n)}function aV(t){const e=wr();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Ie.ZERO)>0&&t.subTo(e,e),e}function lV(){if(this.t<1)return 0;const t=this[0];if((t&1)===0)return 0;let e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function uV(t){return this.compareTo(t)===0}function cV(t,e){let n=0,r=0;const s=Math.min(t.t,this.t);for(;n<s;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()}function dV(t){const e=wr();return this.addTo(t,e),e}function fV(t){const e=wr();return this.subTo(t,e),e}function hV(t){const e=wr();return this.multiplyTo(t,e),e}function pV(t){const e=wr();return this.divRemTo(t,e,null),e}function rd(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function gV(t){const e=wr();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(Ie.ZERO)>0&&this.m.subTo(e,e),e}function mV(t){const e=wr();return t.copyTo(e),this.reduce(e),e}function vV(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(let e=0;e<this.m.t;++e){let n=t[e]&32767;const r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t[n]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function yV(t,e){t.squareTo(e),this.reduce(e)}function bV(t,e,n){t.multiplyTo(e,n),this.reduce(n)}rd.prototype.convert=gV;rd.prototype.revert=mV;rd.prototype.reduce=vV;rd.prototype.mulTo=bV;rd.prototype.sqrTo=yV;function SV(t,e,n){let r=t.bitLength(),s,o=OA(1);const a=new rd(e);if(r<=0)return o;r<18?s=1:r<48?s=3:r<144?s=4:r<768?s=5:s=6;const u=[];let c=3;const f=s-1,p=(1<<s)-1;if(u[1]=a.convert(this),s>1){const w=wr();for(a.sqrTo(u[1],w);c<=p;)u[c]=wr(),a.mulTo(w,u[c-2],u[c]),c+=2}let g=t.t-1,m,y=!0,S=wr(),E;for(r=NA(t[g])-1;g>=0;){for(r>=f?m=t[g]>>r-f&p:(m=(t[g]&(1<<r+1)-1)<<f-r,g>0&&(m|=t[g-1]>>this.DB+r-f)),c=s;(m&1)===0;)m>>=1,--c;if((r-=c)<0&&(r+=this.DB,--g),y)u[m].copyTo(o),y=!1;else{for(;c>1;)a.sqrTo(o,S),a.sqrTo(S,o),c-=2;c>0?a.sqrTo(o,S):(E=o,o=S,S=E),a.mulTo(S,u[m],o)}for(;g>=0&&(t[g]&1<<r)===0;)a.sqrTo(o,S),E=o,o=S,S=E,--r<0&&(r=this.DB-1,--g)}const C=a.revert(o);return n(null,C),C}Ie.prototype.copyTo=qG;Ie.prototype.fromInt=WG;Ie.prototype.fromString=GG;Ie.prototype.clamp=VG;Ie.prototype.dlShiftTo=JG;Ie.prototype.drShiftTo=eV;Ie.prototype.lShiftTo=tV;Ie.prototype.rShiftTo=nV;Ie.prototype.subTo=rV;Ie.prototype.multiplyTo=sV;Ie.prototype.squareTo=oV;Ie.prototype.divRemTo=iV;Ie.prototype.invDigit=lV;Ie.prototype.addTo=cV;Ie.prototype.toString=KG;Ie.prototype.negate=YG;Ie.prototype.abs=ZG;Ie.prototype.compareTo=XG;Ie.prototype.bitLength=QG;Ie.prototype.mod=aV;Ie.prototype.equals=uV;Ie.prototype.add=dV;Ie.prototype.subtract=fV;Ie.prototype.multiply=hV;Ie.prototype.divide=pV;Ie.prototype.modPow=SV;Ie.ZERO=OA(0);Ie.ONE=OA(1);const EV=async({a:t,g:e,k:n,x:r,B:s,N:o,U:a})=>new Promise((u,c)=>{e.modPow(r,o,(f,p)=>{if(f){c(f);return}s.subtract(n.multiply(p)).modPow(t.add(a.multiply(r)),o,(g,m)=>{if(g){c(g);return}u(m.mod(o))})})}),CV="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",g6={},T_={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),g6[t]=e,T_[e]=t}const kc=t=>{if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2){const r=t.slice(n,n+2).toLowerCase();if(r in T_)e[n/2]=T_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e},MA=t=>{let e="";for(let n=0;n<t.byteLength;n++)e+=g6[t[n]];return e},R_=t=>{const e=new Ul;e.update(t);const n=e.digestSync(),r=MA(n);return new Array(64-r.length).join("0")+r},Bm=t=>R_(kc(t)),wV=/^[89a-f]/i,ii=t=>{if(!(t instanceof Ie))throw new Error("Not a BigInteger");const e=t.compareTo(Ie.ZERO)<0;let n=t.abs().toString(16);if(n=n.length%2!==0?`0${n}`:n,n=wV.test(n)?`00${n}`:n,e){const r=n.split("").map(o=>{const a=~parseInt(o,16)&15;return"0123456789ABCDEF".charAt(a)}).join("");n=new Ie(r,16).add(Ie.ONE).toString(16),n.toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},_V=({A:t,B:e})=>{const n=new Ie(Bm(ii(t)+ii(e)),16);if(n.equals(Ie.ZERO))throw new Error("U cannot be zero.");return n},xV=(t,e,n)=>{const r=new Ul(e);r.update(t);const s=r.digestSync(),o=new Ul(s);return o.update(n),o.digestSync().slice(0,16)},PA=t=>{const e=new AA().random(t).toString();return kc(e)},AV=()=>Mc.convert(PA(40));class TV{constructor({userPoolName:e,a:n,g:r,A:s,N:o}){this.encoder=zm,this.userPoolName=e,this.a=n,this.g=r,this.A=s,this.N=o,this.k=new Ie(Bm(`${ii(o)}${ii(r)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new Le({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new Le({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new Le({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(e,n){this.randomPassword=AV();const r=`${e}${n}:${this.randomPassword}`,s=R_(r),o=MA(PA(16));return this.saltToHashDevices=ii(new Ie(o,16)),new Promise((a,u)=>{this.g.modPow(new Ie(Bm(this.saltToHashDevices+s),16),this.N,(c,f)=>{if(c){u(c);return}this.verifierDevices=ii(f),a()})})}async getPasswordAuthenticationKey({username:e,password:n,serverBValue:r,salt:s}){if(r.mod(this.N).equals(Ie.ZERO))throw new Error("B cannot be zero.");const o=_V({A:this.A,B:r}),a=`${this.userPoolName}${e}:${n}`,u=R_(a),c=new Ie(Bm(ii(s)+u),16),f=await EV({a:this.a,g:this.g,k:this.k,x:c,B:r,N:this.N,U:o}),p=this.encoder.convert("Caldera Derived Key"),g=this.encoder.convert(""),m=new Uint8Array(p.byteLength+g.byteLength);return m.set(p,0),m.set(g,p.byteLength),xV(kc(ii(f)),kc(ii(o)),m)}}const RV=async({a:t,g:e,N:n})=>new Promise((r,s)=>{e.modPow(t,n,(o,a)=>{if(o){s(o);return}if(a.mod(n).equals(Ie.ZERO)){s(new Error("Illegal parameter. A mod N cannot be 0."));return}r(a)})}),Kh=async t=>{const e=new Ie(CV,16),n=new Ie("2",16),r=IV(),s=await RV({a:r,g:n,N:e});return new TV({userPoolName:t,a:r,g:n,A:s,N:e})},IV=()=>{const t=MA(PA(128));return new Ie(t,16)};async function Ql({userPoolId:t,userPoolEndpoint:e,newDeviceMetadata:n,accessToken:r}){if(!n)return;const s=t.split("_")[1]||"",o=await Kh(s),a=n?.DeviceKey,u=n?.DeviceGroupKey;try{await o.generateHashDevice(u??"",a??"")}catch{return}const c={Salt:Mc.convert(kc(o.getSaltToHashDevices())),PasswordVerifier:Mc.convert(kc(o.getVerifierDevices()))},f=o.getRandomPassword();try{return await UG({endpointResolver:bt({endpointOverride:e})})({region:yt(t)},{AccessToken:r,DeviceName:await PW(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:c}),{deviceKey:a,deviceGroupKey:u,randomPassword:f}}catch{return}}async function OV(t){const e=Ht.getConfig().Auth?.Cognito;lt(e);const{username:n,signInSession:r,signInDetails:s,challengeName:o}=Ro.getState();if(o!=="WEB_AUTHN"||!n)throw new Le({name:To.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:a}=t;td(!!a,Bt.InvalidPasskeyAuthenticationOptions);const u=await LG(JSON.parse(a)),c=is({endpointResolver:bt({endpointOverride:e.userPoolEndpoint})}),{ChallengeName:f,ChallengeParameters:p,AuthenticationResult:g,Session:m}=await c({region:yt(e.userPoolId),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(u)},ClientId:e.userPoolClientId,Session:r});if(Xl({signInSession:m,username:n,challengeName:f,signInDetails:s}),g)return await xi({...g,username:n,NewDeviceMetadata:await Ql({userPoolId:e.userPoolId,userPoolEndpoint:e.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:s}),Ro.dispatch({type:"RESET_STATE"}),await Ga(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if(f==="WEB_AUTHN")throw new Le({name:To.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:f,challengeParameters:p}}function $n({username:t,userPoolId:e,userPoolClientId:n}){if(typeof window>"u")return;const r=window.AmazonCognitoAdvancedSecurityData;if(typeof r>"u")return;const s=r.getData(t,e,n);return s?{EncodedData:s}:{}}const NV=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],MV=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],m6=()=>{const t=new Date,e=MV[t.getUTCDay()],n=NV[t.getUTCMonth()],r=t.getUTCDate();let s=t.getUTCHours();s<10&&(s=`0${s}`);let o=t.getUTCMinutes();o<10&&(o=`0${o}`);let a=t.getUTCSeconds();a<10&&(a=`0${a}`);const u=t.getUTCFullYear();return`${e} ${n} ${r} ${s}:${o}:${a} UTC ${u}`},v6=({userPoolName:t,username:e,challengeParameters:n,dateNow:r,hkdf:s})=>{const o=zm.convert(t),a=zm.convert(e),u=PV(n.SECRET_BLOCK),c=zm.convert(r),f=new Uint8Array(o.byteLength+a.byteLength+u.byteLength+c.byteLength);f.set(o,0),f.set(a,o.byteLength),f.set(u,o.byteLength+a.byteLength),f.set(c,o.byteLength+a.byteLength+u.byteLength);const p=new Ul(s);p.update(f);const g=p.digestSync();return Mc.convert(g)},PV=t=>{const e="=".repeat((4-t.length%4)%4),n=(t+e).replace(/-/g,"+").replace(/_/g,"/"),r=CA.convert(n),s=new Uint8Array(r.length);for(let o=0;o<r.length;++o)s[o]=r.charCodeAt(o);return s};async function Yh({username:t,config:e,clientMetadata:n,session:r,tokenOrchestrator:s}){const{userPoolId:o,userPoolEndpoint:a}=e,u=e.userPoolClientId,c=await s?.getDeviceMetadata(t);i6(c);const f=await Kh(c.deviceGroupKey),p={USERNAME:t,SRP_A:f.A.toString(16),DEVICE_KEY:c.deviceKey},g={ChallengeName:"DEVICE_SRP_AUTH",ClientId:u,ChallengeResponses:p,ClientMetadata:n,Session:r},m=is({endpointResolver:bt({endpointOverride:a})}),{ChallengeParameters:y,Session:S}=await m({region:yt(o)},g);return kV(t,y,n,S,f,e,s)}async function kV(t,e,n,r,s,{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u},c){const f=await c?.getDeviceMetadata(t);i6(f);const p=new Ie(e?.SRP_B,16),g=new Ie(e?.SALT,16),{deviceKey:m}=f,{deviceGroupKey:y}=f,S=await s.getPasswordAuthenticationKey({username:f.deviceKey,password:f.randomPassword,serverBValue:p,salt:g}),E=m6(),C={USERNAME:e?.USERNAME??t,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:v6({username:m,userPoolName:y,challengeParameters:e,dateNow:E,hkdf:S}),DEVICE_KEY:m},w=$n({username:t,userPoolId:o,userPoolClientId:a}),x={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:C,Session:r,ClientMetadata:n,UserContextData:w};return is({endpointResolver:bt({endpointOverride:u})})({region:yt(o)},x)}async function kA(t,e,n,r,s,o,a){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=o,p=u?.split("_")[1]||"",g=new Ie(e?.SRP_B,16),m=new Ie(e?.SALT,16),y=e?.USER_ID_FOR_SRP;if(!y)throw new Le({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});const S=await s.getPasswordAuthenticationKey({username:y,password:t,serverBValue:g,salt:m}),E=m6(),C={USERNAME:y,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:v6({username:y,userPoolName:p,challengeParameters:e,dateNow:E,hkdf:S})},w=await a.getDeviceMetadata(y);w&&w.deviceKey&&(C.DEVICE_KEY=w.deviceKey);const x=$n({username:y,userPoolId:u,userPoolClientId:c}),T={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:r,ClientId:c,UserContextData:x},M=await is({endpointResolver:bt({endpointOverride:f})})({region:yt(u)},T);return M.ChallengeName==="DEVICE_SRP_AUTH"?Yh({username:y,config:o,clientMetadata:n,session:M.Session,tokenOrchestrator:a}):M}async function sd(t,e,n,r){try{return await t(...e)}catch(s){if(s instanceof Le&&s.name==="ResourceNotFoundException"&&s.message.includes("Device does not exist."))return await r.clearDeviceMetadata(n),t(...e);throw s}}function Jl(t){const{dispatch:e}=Ro;e({type:"SET_USERNAME",value:t})}async function y6({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:o,preferredChallenge:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=r,p=u?.split("_")[1]||"",g=await Kh(p),m={USERNAME:t,SRP_A:g.A.toString(16)};o==="USER_AUTH"&&a&&(m.PREFERRED_CHALLENGE=a);const y=$n({username:t,userPoolId:u,userPoolClientId:c}),S={AuthFlow:o,AuthParameters:m,ClientMetadata:n,ClientId:c,UserContextData:y},C=await Vh({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Nt(Ve.SignIn)},S),{ChallengeParameters:w,Session:x}=C,T=w?.USERNAME??t;return Jl(T),C.ChallengeName==="PASSWORD_VERIFIER"?sd(kA,[e,w,n,x,g,r,s],T,s):C}async function DV({username:t,session:e,selectedChallenge:n,config:r,clientMetadata:s}){return is({endpointResolver:bt({endpointOverride:r.userPoolEndpoint})})({region:yt(r.userPoolId),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:t,ANSWER:n},ClientId:r.userPoolClientId,Session:e,ClientMetadata:s})}async function LV(t,e,n,r,s){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c={ANSWER:"PASSWORD",USERNAME:t,PASSWORD:e},f=$n({username:t,userPoolId:o,userPoolClientId:a}),g=await is({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:c,ClientId:a,ClientMetadata:n,Session:s,UserContextData:f}),m=g.ChallengeParameters?.USERNAME??t;return Jl(m),g}async function UV(t,e,n,r,s,o){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=r,f=a.split("_")[1]||"",p=await Kh(f),g={ANSWER:"PASSWORD_SRP",USERNAME:t,SRP_A:p.A.toString(16)},m=$n({username:t,userPoolId:a,userPoolClientId:u}),S=await is({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:g,ClientId:u,ClientMetadata:n,Session:s,UserContextData:m}),E=S.ChallengeParameters?.USERNAME??t;return Jl(E),S.ChallengeName==="PASSWORD_VERIFIER"?sd(kA,[e,S.ChallengeParameters,n,S.Session,p,r,o],E,o):S}const I_="userAttributes.";function FV(t){return"isSignedIn"in t&&"nextStep"in t}async function zV({challengeResponse:t,clientMetadata:e,session:n,username:r,config:s,tokenOrchestrator:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=s,f={USERNAME:r,ANSWER:t},p=await o?.getDeviceMetadata(r);p&&p.deviceKey&&(f.DEVICE_KEY=p.deviceKey);const g=$n({username:r,userPoolId:a,userPoolClientId:u}),m={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:f,Session:n,ClientMetadata:e,ClientId:u,UserContextData:g},S=await is({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},m);return S.ChallengeName==="DEVICE_SRP_AUTH"?Yh({username:r,config:s,clientMetadata:e,session:S.Session,tokenOrchestrator:o}):S}async function BV({challengeResponse:t,username:e,clientMetadata:n,session:r,deviceName:s,config:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o;if(t==="EMAIL")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["EMAIL_OTP"]'},$metadata:{}};if(t==="TOTP")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["SOFTWARE_TOKEN_MFA"]'},$metadata:{}};const f={USERNAME:e};if(/^\d+$/.test(t)){const m=iG({endpointResolver:bt({endpointOverride:c})}),{Session:y}=await m({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},{UserCode:t,Session:r,FriendlyDeviceName:s});Ro.dispatch({type:"SET_SIGN_IN_SESSION",value:y});const S={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:y,ClientMetadata:n,ClientId:u};return is({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},S)}if(t.includes("@")){f.EMAIL=t;const m={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:r,ClientMetadata:n,ClientId:u};return is({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},m)}throw new Le({name:To.SignInException,message:`Cannot proceed with MFA setup using challengeResponse: ${t}`,recoverySuggestion:'Try passing "EMAIL", "TOTP", a valid email, or OTP code as the challengeResponse.'})}async function jV({challengeResponse:t,username:e,clientMetadata:n,session:r,config:s}){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=s;fn(t==="TOTP"||t==="SMS"||t==="EMAIL",Ge.IncorrectMFAMethod);const c={USERNAME:e,ANSWER:XV(t)},f=$n({username:e,userPoolId:o,userPoolClientId:a}),p={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:c,Session:r,ClientMetadata:n,ClientId:a,UserContextData:f};return is({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Nt(Ve.ConfirmSignIn)},p)}async function HV({challengeResponse:t,clientMetadata:e,session:n,username:r,requiredAttributes:s,config:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o,f={...YV(s),NEW_PASSWORD:t,USERNAME:r},p=$n({username:r,userPoolId:a,userPoolClientId:u}),g={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:f,ClientMetadata:e,Session:n,ClientId:u,UserContextData:p};return is({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},g)}async function $V(t,e,n,r,s){const{userPoolClientId:o,userPoolId:a,userPoolEndpoint:u}=r,c={USERNAME:t,PASSWORD:e},f=await s.getDeviceMetadata(t);f&&f.deviceKey&&(c.DEVICE_KEY=f.deviceKey);const p=$n({username:t,userPoolId:a,userPoolClientId:o}),g={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:c,ClientMetadata:n,ClientId:o,UserContextData:p},y=await Vh({endpointResolver:bt({endpointOverride:u})})({region:yt(a),userAgentValue:Nt(Ve.SignIn)},g),S=y.ChallengeParameters?.USERNAME??y.ChallengeParameters?.USER_ID_FOR_SRP??t;return Jl(S),y.ChallengeName==="DEVICE_SRP_AUTH"?Yh({username:S,config:r,clientMetadata:n,session:y.Session,tokenOrchestrator:s}):y}async function qV(t,e,n,r,s){return y6({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:"USER_SRP_AUTH"})}async function WV(t,e,n,r){const{userPoolClientId:s,userPoolId:o,userPoolEndpoint:a}=n,u={USERNAME:t},c=await r.getDeviceMetadata(t);c&&c.deviceKey&&(u.DEVICE_KEY=c.deviceKey);const f=$n({username:t,userPoolId:o,userPoolClientId:s}),p={AuthFlow:"CUSTOM_AUTH",AuthParameters:u,ClientMetadata:e,ClientId:s,UserContextData:f},m=await Vh({endpointResolver:bt({endpointOverride:a})})({region:yt(o),userAgentValue:Nt(Ve.SignIn)},p),y=m.ChallengeParameters?.USERNAME??t;return Jl(y),m.ChallengeName==="DEVICE_SRP_AUTH"?Yh({username:y,config:n,clientMetadata:e,session:m.Session,tokenOrchestrator:r}):m}async function GV(t,e,n,r,s){lt(r);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c=o?.split("_")[1]||"",f=await Kh(c),p={USERNAME:t,SRP_A:f.A.toString(16),CHALLENGE_NAME:"SRP_A"},g=$n({username:t,userPoolId:o,userPoolClientId:a}),m={AuthFlow:"CUSTOM_AUTH",AuthParameters:p,ClientMetadata:n,ClientId:a,UserContextData:g},y=Vh({endpointResolver:bt({endpointOverride:u})}),{ChallengeParameters:S,Session:E}=await y({region:yt(o),userAgentValue:Nt(Ve.SignIn)},m),C=S?.USERNAME??t;return Jl(C),sd(kA,[e,S,n,E,f,r,s],C,s)}async function eu(t){const{challengeName:e,challengeParameters:n,availableChallenges:r}=t,s=Ht.getConfig().Auth?.Cognito;switch(lt(s),e){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:n}};case"MFA_SETUP":{const{signInSession:o,username:a}=Ro.getState(),u=EM(CM(n.MFAS_CAN_SETUP))||[],c=JV(u),f=c.includes("TOTP"),p=c.includes("EMAIL");if(f&&p)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:c}};if(p)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(f){const g=aG({endpointResolver:bt({endpointOverride:s.userPoolEndpoint})}),{Session:m,SecretCode:y}=await g({region:yt(s.userPoolId)},{Session:o});return Ro.dispatch({type:"SET_SIGN_IN_SESSION",value:m}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:VV(y,a)}}}throw new Le({name:To.SignInException,message:`Cannot initiate MFA setup from available types: ${u}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:KV(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:EM(CM(n.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.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:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{const o=await OV(n);return FV(o)?o:eu(o)}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:r}}}throw new Le({name:To.SignInException,message:`An error occurred during the sign in process. ${e} challengeName returned by the underlying service was not addressed.`})}function VV(t,e){return{sharedSecret:t,getSetupUri:(n,r)=>{const s=`otpauth://totp/${n}:${r??e}?secret=${t}&issuer=${n}`;return new Wa(s)}}}function od(t){if(t===hv.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(t===hv.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function KV(t){return t?JSON.parse(t).map(n=>n.includes(I_)?n.replace(I_,""):n):[]}function YV(t){if(!t)return{};const e={};return Object.entries(t).forEach(([n,r])=>{r&&(e[`${I_}${n}`]=r)}),e}async function ZV(t,e,n,r,s,o,a,u){const c=u?.userAttributes,f=u?.friendlyDeviceName;switch(e){case"WEB_AUTHN":case"SELECT_CHALLENGE":return r==="PASSWORD_SRP"||r==="PASSWORD"?{ChallengeName:r,Session:n,$metadata:{}}:DV({username:t,session:n,selectedChallenge:r,config:s,clientMetadata:a});case"SELECT_MFA_TYPE":return jV({challengeResponse:r,clientMetadata:a,session:n,username:t,config:s});case"MFA_SETUP":return BV({challengeResponse:r,clientMetadata:a,session:n,username:t,deviceName:f,config:s});case"NEW_PASSWORD_REQUIRED":return HV({challengeResponse:r,clientMetadata:a,session:n,username:t,requiredAttributes:c,config:s});case"CUSTOM_CHALLENGE":return sd(zV,[{challengeResponse:r,clientMetadata:a,session:n,username:t,config:s,tokenOrchestrator:o}],t,o);case"SMS_MFA":case"SOFTWARE_TOKEN_MFA":case"SMS_OTP":case"EMAIL_OTP":return eK({challengeName:e,challengeResponse:r,clientMetadata:a,session:n,username:t,config:s,tokenOrchestrator:o});case"PASSWORD":return LV(t,r,a,s,n);case"PASSWORD_SRP":return UV(t,r,a,s,n,o)}throw new Le({name:To.SignInException,message:`An error occurred during the sign in process.
|
|
@@ -9,9 +9,9 @@ function N5(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&
|
|
|
9
9
|
1. signIn was not called before confirmSignIn.
|
|
10
10
|
2. signIn threw an exception.
|
|
11
11
|
3. page was refreshed during the sign in flow and session has expired.
|
|
12
|
-
`,recoverySuggestion:"Make sure a successful call to signIn is made before calling confirmSignInand that the session has not expired."});try{const{Session:f,ChallengeName:p,AuthenticationResult:g,ChallengeParameters:m}=await ZV(r,s,o,e,u,Hr,c,n);return Xl({signInSession:f,username:r,challengeName:p,signInDetails:a}),g?(await xi({username:r,...g,NewDeviceMetadata:await Ql({userPoolId:u.userPoolId,userPoolEndpoint:u.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:a}),Qs(),await Ga(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):eu({challengeName:p,challengeParameters:m})}catch(f){Is(f);const p=od(f.name);if(p)return p;throw f}}const CK=t=>Rn(jn,Bn("GetUser"),or(),{...Hn,...t}),wK=t=>Rn(jn,Bn("VerifyUserAttribute"),or(),{...Hn,...t});async function _K(t){const e=Ht.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{confirmationCode:s,userAttributeKey:o}=t;fn(!!s,Ge.EmptyConfirmUserAttributeCode);const{tokens:a}=await vy({forceRefresh:!1});ed(a),await wK({endpointResolver:bt({endpointOverride:n})})({region:yt(r),userAgentValue:Nt(Ve.ConfirmUserAttribute)},{AccessToken:a.accessToken.toString(),AttributeName:o,Code:s})}new nr("AuthError");const xK={oauthSignInError:{message:Fn.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:Fn.DEFAULT_MSG},missingAuthConfig:{message:Fn.DEFAULT_MSG},emptyUsername:{message:Fn.EMPTY_USERNAME},invalidUsername:{message:Fn.INVALID_USERNAME},emptyPassword:{message:Fn.EMPTY_PASSWORD},emptyCode:{message:Fn.EMPTY_CODE},signUpError:{message:Fn.SIGN_UP_ERROR},noMFA:{message:Fn.NO_MFA},invalidMFA:{message:Fn.INVALID_MFA},emptyChallengeResponse:{message:Fn.EMPTY_CHALLENGE},noUserSession:{message:Fn.NO_USER_SESSION},deviceConfig:{message:Fn.DEVICE_CONFIG},networkError:{message:Fn.NETWORK_ERROR},autoSignInError:{message:Fn.AUTOSIGNIN_ERROR},default:{message:Fn.DEFAULT_MSG}},ka=(t,e)=>new Le({message:t??"An error has occurred during the oauth process.",name:To.OAuthSignInError,recoverySuggestion:xK.oauthSignInError.log});var N_;(function(t){t.NoConfig="noConfig",t.MissingAuthConfig="missingAuthConfig",t.EmptyUsername="emptyUsername",t.InvalidUsername="invalidUsername",t.EmptyPassword="emptyPassword",t.EmptyCode="emptyCode",t.SignUpError="signUpError",t.NoMFA="noMFA",t.InvalidMFA="invalidMFA",t.EmptyChallengeResponse="emptyChallengeResponse",t.NoUserSession="noUserSession",t.Default="default",t.DeviceConfig="deviceConfig",t.NetworkError="networkError",t.AutoSignInError="autoSignInError",t.OAuthSignInError="oauthSignInError"})(N_||(N_={}));const AK="`signInWithRedirect` has been canceled.",TK="An error occurred while validating the state.",RK="Try to initiate an OAuth flow from Amplify",T6=async t=>{const e=await Ur.loadOAuthState(),n=t===e?e:void 0;if(!n)throw new Le({name:N_.OAuthSignInError,message:t===null?AK:TK,recoverySuggestion:t===null?void 0:RK});return n},R6=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,responseType:s,domain:o,preferPrivateSession:a})=>{const u=new Wa(t),c=u.searchParams.get("error"),f=u.searchParams.get("error_description");if(c)throw ka(f??c);return s==="code"?IK({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:o,preferPrivateSession:a}):OK({currentUrl:t,redirectUri:r,preferPrivateSession:a})},IK=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:s,preferPrivateSession:o})=>{const a=new Wa(t),u=a.searchParams.get("code"),c=a.searchParams.get("state");if(!u||!c)throw ka("User cancelled OAuth flow.");const f=await T6(c),p="https://"+s+"/oauth2/token",g=await Ur.loadPKCE(),m={grant_type:"authorization_code",code:u,client_id:n,redirect_uri:r,...g?{code_verifier:g}:{}},y=Object.entries(m).map(([O,I])=>`${encodeURIComponent(O)}=${encodeURIComponent(I)}`).join("&"),{access_token:S,refresh_token:E,id_token:C,error:w,error_message:x,token_type:T,expires_in:R}=await(await fetch(p,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[P$]:e},body:y})).json();if(w)throw ka(x??w);const M=(S&&gi(S).payload.username)??"username";return await xi({username:M,AccessToken:S,IdToken:C,RefreshToken:E}),I6({redirectUri:r,state:f,preferPrivateSession:o})},OK=async({currentUrl:t,redirectUri:e,preferPrivateSession:n})=>{const r=new Wa(t),{id_token:s,access_token:o,state:a,token_type:u,expires_in:c,error_description:f,error:p}=(r.hash??"#").substring(1).split("&").map(y=>y.split("=")).reduce((y,[S,E])=>({...y,[S]:E}),{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0});if(p)throw ka(f??p);if(!o)throw ka("No access token returned from OAuth flow.");const g=await T6(a),m=(o&&gi(o).payload.username)??"username";return await xi({username:m,AccessToken:o,IdToken:s}),I6({redirectUri:e,state:g,preferPrivateSession:n})},I6=async({redirectUri:t,state:e,preferPrivateSession:n})=>{await Hr.setOAuthMetadata({oauthSignIn:!0}),await Ur.clearOAuthData(),await Ur.storeOAuthSignIn(!0,n),c6(),PK(t),NK(e)&&Ao.dispatch("auth",{event:"customOAuthState",data:OW(MK(e))},"Auth",xo),Ao.dispatch("auth",{event:"signInWithRedirect"},"Auth",xo),await Ga()},NK=t=>/-/.test(t),MK=t=>t.split("-").splice(1).join("-"),PK=t=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",t)};function UA(t,e){{const n=t?.find(kK)??t?.find(DK),r=t?.find(UK)??t?.find(LK);if(n)return n;throw r?WW:$W}}const kK=t=>t.startsWith(String(window.location.origin+(window.location.pathname||"/"))),DK=t=>t.includes(String(window.location.hostname)),LK=t=>t.startsWith("http://"),UK=t=>t.startsWith("https://"),FA=async t=>{c6(),await Ur.clearOAuthInflightData(),Ao.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:t}},"Auth",xo)},FK=async t=>{try{lt(t),hy(t),Ur.setAuthConfig(t)}catch{return}if(await Ur.loadOAuthInFlight())try{const e=window.location.href,{loginWith:n,userPoolClientId:r}=t,{domain:s,redirectSignIn:o,responseType:a}=n.oauth,u=UA(o);await R6({currentUrl:e,clientId:r,domain:s,redirectUri:u,responseType:a,userAgentValue:Nt(Ve.SignInWithRedirect)})}catch(e){await FA(e)}};my()&&Ht[k5](FK);const zK={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},O6=async t=>{window?.location&&(window.location.href=t.replace("http://","https://"))},_M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",BK=t=>{const e=new Uint8Array(t);EA().getRandomValues(e);let n="",r;for(const s of e)n+=_M.charAt(s%_M.length);return{value:n,method:"S256",toCodeChallenge(){return r||(r=jK(n),r)}}};function jK(t){const e=new Ul;return e.update(t),HK(Mc.convert(e.digestSync(),{urlSafe:!0}))}function HK(t){return t.replace(/=/g,"")}const $K=()=>IW(32),qK=t=>{async function e(n){if(n.persisted&&await t.loadOAuthInFlight()){const s=ka("User cancelled OAuth flow.");await FA(s)}window.removeEventListener("pageshow",e)}window.addEventListener("pageshow",e)};async function N6(t){const e=Ht.getConfig().Auth?.Cognito;lt(e),hy(e),Ur.setAuthConfig(e),t?.options?.prompt||await b6();let n="COGNITO",r;return typeof t?.provider=="string"?n=zK[t.provider]:t?.provider?.custom?n=t.provider.custom:t?.provider?.idpIdentifier&&({idpIdentifier:r}=t.provider),WK({oauthConfig:e.loginWith.oauth,clientId:e.userPoolClientId,provider:n,idpIdentifier:r,customState:t?.customState,preferPrivateSession:t?.options?.preferPrivateSession,options:{loginHint:t?.options?.loginHint,lang:t?.options?.lang,nonce:t?.options?.nonce,prompt:t?.options?.prompt},authSessionOpener:t?.options?.authSessionOpener})}const WK=async({oauthConfig:t,provider:e,idpIdentifier:n,clientId:r,customState:s,preferPrivateSession:o,options:a,authSessionOpener:u})=>{const{domain:c,redirectSignIn:f,responseType:p,scopes:g}=t,{loginHint:m,lang:y,nonce:S,prompt:E}=a??{},C=$K(),w=u||O6,x=s?`${C}-${NW(s)}`:C,{value:T,method:R,toCodeChallenge:M}=BK(128),O=UA(t.redirectSignIn);my()&&Ur.storeOAuthInFlight(!0),Ur.storeOAuthState(x),Ur.storePKCE(T);const I=new URLSearchParams;I.append("redirect_uri",O),I.append("response_type",p),I.append("client_id",r),n?I.append("idp_identifier",n):I.append("identity_provider",e),I.append("scope",g.join(" ")),m&&I.append("login_hint",m),y&&I.append("lang",y),S&&I.append("nonce",S),E&&I.append("prompt",E.toLowerCase()),I.append("state",x),p==="code"&&(I.append("code_challenge",M()),I.append("code_challenge_method",R));const P=`https://${c}/oauth2/authorize?${I.toString()}`;qK(Ur);const{type:k,error:H,url:F}=await w(P,f,o)??{};try{if(k==="error")throw ka(String(H));if(k==="canceled")throw ka(String(k));k==="success"&&F&&await R6({currentUrl:F,clientId:r,domain:c,redirectUri:O,responseType:p,userAgentValue:Nt(Ve.SignInWithRedirect),preferPrivateSession:o})}catch(B){throw await FA(B),B}},GK=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{tokens:s}=await B5(t,{forceRefresh:!1});ed(s);const o=CK({endpointResolver:bt({endpointOverride:n})}),{UserAttributes:a}=await o({region:yt(r),userAgentValue:Nt(Ve.FetchUserAttributes)},{AccessToken:s.accessToken.toString()});return UW(a)},M6=()=>GK(Ht),VK=async t=>{await t.clearOAuthData(),Hr.clearTokens(),await j5(),Ao.dispatch("auth",{event:"signedOut"},"Auth",xo)},KK=async(t,e=!1,n)=>{hy(t);const{loginWith:r,userPoolClientId:s}=t,{domain:o,redirectSignOut:a}=r.oauth,u=UA(a),c=`https://${o}/logout?${Object.entries({client_id:s,logout_uri:encodeURIComponent(u)}).map(([f,p])=>`${f}=${p}`).join("&")}`;return O6(c)},YK=async(t,e,n,r)=>{const{isOAuthSignIn:s}=await e.loadOAuthSignIn(),o=await n.getOAuthMetadata();if(await VK(e),s||o?.oauthSignIn)return KK(t,!1)},ZK=t=>Rn(jn,Bn("RevokeToken"),or(),{...Hn,...t}),XK=new nr("Auth");async function QK(t){const e=Ht.getConfig().Auth?.Cognito;lt(e),await JK(e);let n;try{hy(e),n=!0}catch{n=!1}if(n){const r=new u6(Gh);r.setAuthConfig(e);const{type:s}=await YK(e,r,Hr)??{};if(s==="error")throw new Le({name:GW,message:"An error occurred when attempting to log out from OAuth provider."})}else Hr.clearTokens(),await j5(),Ao.dispatch("auth",{event:"signedOut"},"Auth",xo)}async function JK(t){try{const{userPoolEndpoint:e,userPoolId:n,userPoolClientId:r}=t,s=await Hr.getTokenStore().loadTokens();o6(s),eY(s.accessToken)&&await ZK({endpointResolver:bt({endpointOverride:e})})({region:yt(n),userAgentValue:Nt(Ve.SignOut)},{ClientId:r,Token:s.refreshToken})}catch{XK.debug("Client signOut error caught but will proceed with token removal")}}const eY=t=>!!t?.payload?.origin_jti,tY=t=>Rn(jn,Bn("GetUserAttributeVerificationCode"),or(),{...Hn,...t}),nY=async t=>{const{userAttributeKey:e,options:n}=t,r=Ht.getConfig().Auth?.Cognito,s=n?.clientMetadata;lt(r);const{userPoolEndpoint:o,userPoolId:a}=r,{tokens:u}=await vy({forceRefresh:!1});ed(u);const c=tY({endpointResolver:bt({endpointOverride:o})}),{CodeDeliveryDetails:f}=await c({region:yt(a),userAgentValue:Nt(Ve.SendUserAttributeVerificationCode)},{AccessToken:u.accessToken.toString(),ClientMetadata:s,AttributeName:e}),{DeliveryMedium:p,AttributeName:g,Destination:m}={...f};return{destination:m,deliveryMedium:p,attributeName:g}},rY={identityId:"identityId"},sY=new nr("DefaultIdentityIdStore");class P6{setAuthConfig(e){Lm(e.Cognito),this.authConfig=e,this._authKeys=oY("Cognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){Lm(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{const e=await this.keyValueStorage.getItem(this._authKeys.identityId);return e?(this._hasGuestIdentityId=!0,{id:e,type:"guest"}):null}}catch(e){return sY.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){Lm(this.authConfig?.Cognito),e.type==="guest"?(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)}}const oY=(t,e)=>TA(rY)(`com.amplify.${t}`,e),M_=({endpointOverride:t})=>e=>t?{url:new Wa(t)}:yW(e);function k6(t){const e=gi(t).payload.iss,n={};if(!e)throw new Le({name:"InvalidIdTokenException",message:"Invalid Idtoken."});const r=e.replace(/(^\w+:|^)\/\//,"");return n[r]=t,n}async function iY({tokens:t,authConfig:e,identityIdStore:n}){n.setAuthConfig({Cognito:e});const r=await n.loadIdentityId();if(r)return r.id;const s=t?.idToken?k6(t.idToken.toString()):{},o=await aY(s,e);return n.storeIdentityId({id:o,type:t?"primary":"guest"}),o}async function aY(t,e){const n=e?.identityPoolId,r=__(n),s=gW({endpointResolver:M_({endpointOverride:e.identityPoolEndpoint})});let o;try{o=(await s({region:r},{IdentityPoolId:n,Logins:t})).IdentityId}catch(a){throw Is(a),new Le(a)}if(!o)throw new Le({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return o}const Lg=new nr("CognitoCredentialsProvider"),xM=3e3*1e3;class D6{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){Lg.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){Lg.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){const n=e.authenticated,{tokens:r}=e,{authConfig:s}=e;try{Lm(s?.Cognito)}catch{return}if(!n&&!s.Cognito.allowGuestAccess)return;const{forceRefresh:o}=e,a=this.hasTokenChanged(r),u=await iY({tokens:r,authConfig:s.Cognito,identityIdStore:this._identityIdStore});return(o||a)&&this.clearCredentials(),n?(YW(r),this.credsForOIDCTokens(s.Cognito,r,u)):this.getGuestCredentials(u,s.Cognito)}async getGuestCredentials(e,n){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!1)return Lg.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=__(n.identityPoolId),s=HN({endpointResolver:M_({endpointOverride:n.identityPoolEndpoint})});let o;try{o=await s({region:r},{IdentityId:e})}catch(a){throw Is(a),new Le(a)}if(o?.Credentials?.AccessKeyId&&o?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+xM;const a={credentials:{accessKeyId:o.Credentials.AccessKeyId,secretAccessKey:o.Credentials.SecretKey,sessionToken:o.Credentials.SessionToken,expiration:o.Credentials.Expiration},identityId:e};return o.IdentityId&&(a.identityId=o.IdentityId,this._identityIdStore.storeIdentityId({id:o.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...a,isAuthenticatedCreds:!1},a}else throw new Le({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(e,n,r){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!0)return Lg.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const s=n.idToken?k6(n.idToken.toString()):{},o=__(e.identityPoolId),a=HN({endpointResolver:M_({endpointOverride:e.identityPoolEndpoint})});let u;try{u=await a({region:o},{IdentityId:r,Logins:s})}catch(c){throw Is(c),new Le(c)}if(u?.Credentials?.AccessKeyId&&u?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+xM;const c={credentials:{accessKeyId:u.Credentials.AccessKeyId,secretAccessKey:u.Credentials.SecretKey,sessionToken:u.Credentials.SessionToken,expiration:u.Credentials.Expiration},identityId:r};return u.IdentityId&&(c.identityId=u.IdentityId,this._identityIdStore.storeIdentityId({id:u.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...c,isAuthenticatedCreds:!0,associatedIdToken:n.idToken?.toString()},c}else throw new Le({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return this._nextCredentialsRefresh===void 0?!0:this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(e){return!!e&&!!this._credentialsAndIdentityId?.associatedIdToken&&e.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}const lY=new D6(new P6(Gh)),L6={configure(t,e){const n=L5(t),r=new xW({sameSite:"lax"}),s=e?.ssr?r:Gh,o=e?.ssr?new D6(new P6(r)):lY;if(!n.Auth||e?.Auth){Ht.configure(n,e);return}Fm.setAuthConfig(n.Auth),Fm.setKeyValueStorage(s),Ht.configure(n,{...e,Auth:{tokenProvider:Fm,credentialsProvider:o}})},getConfig(){return Ht.getConfig()}},Cy=()=>{const t=globalThis.__REMIT_CONFIG__??{};return{apiUrl:t.apiUrl??"/api",appOrigin:t.appOrigin??"",betterAuthEnabled:t.betterAuthEnabled??!1,cognito:{userPoolId:t.cognito?.userPoolId??"",clientId:t.cognito?.clientId??"",domain:t.cognito?.domain??"",region:t.cognito?.region??""},rum:{appMonitorId:t.rum?.appMonitorId??"",identityPoolId:t.rum?.identityPoolId??"",region:t.rum?.region??"eu-west-1"},mailboxPollIntervalSeconds:t.mailboxPollIntervalSeconds!=null?String(t.mailboxPollIntervalSeconds):void 0,disableDevtools:t.disableDevtools??!1}},uY=()=>{const t=Cy(),{userPoolId:e,clientId:n,domain:r,region:s}=t.cognito;return!e||!n?null:{userPoolId:e,userPoolClientId:n,domain:r,region:s,appOrigin:t.appOrigin}},P_=uY(),wy=()=>P_!==null,U6=()=>{if(!P_){console.warn("[auth] Cognito user pool is not configured. Running in local dev mode without Cognito auth.");return}const{userPoolId:t,userPoolClientId:e,domain:n,appOrigin:r}=P_;L6.configure({Auth:{Cognito:{userPoolId:t,userPoolClientId:e,loginWith:n?{oauth:{domain:n,scopes:["openid","email","profile"],redirectSignIn:r?[r]:[],redirectSignOut:r?[r]:[],responseType:"code"}}:void 0}}})};var cY={};const jm=Object.create(null),mf=t=>cY||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?jm:globalThis),ga=new Proxy(jm,{get(t,e){return mf()[e]??jm[e]},has(t,e){return e in mf()||e in jm},set(t,e,n){const r=mf(!0);return r[e]=n,!0},deleteProperty(t,e){if(!e)return!1;const n=mf(!0);return delete n[e],!0},ownKeys(){const t=mf(!0);return Object.keys(t)}});ga.NODE_ENV;var Hm=class extends Error{constructor(t,e){super(t,e),this.name="BetterAuthError",this.message=t,this.stack=""}};const dY=47;function F6(t){let e=t.length;for(;e>0&&t.charCodeAt(e-1)===dY;)e--;return e===t.length?t:t.slice(0,e)}function fY(t){try{return(F6(new URL(t).pathname)||"/")!=="/"}catch{throw new Hm(`Invalid base URL: ${t}. Please provide a valid base URL.`)}}function hY(t){try{const e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Hm(`Invalid base URL: ${t}. URL must include 'http://' or 'https://'`)}catch(e){throw e instanceof Hm?e:new Hm(`Invalid base URL: ${t}. Please provide a valid base URL.`,{cause:e})}}function AM(t,e="/api/auth"){if(hY(t),fY(t))return t;const n=F6(t);return!e||e==="/"?n:(e=e.startsWith("/")?e:`/${e}`,`${n}${e}`)}function pY(t,e,n,r,s){{const o=ga.BETTER_AUTH_URL||ga.NEXT_PUBLIC_BETTER_AUTH_URL||ga.PUBLIC_BETTER_AUTH_URL||ga.NUXT_PUBLIC_BETTER_AUTH_URL||ga.NUXT_PUBLIC_AUTH_URL||(ga.BASE_URL!=="/"?ga.BASE_URL:void 0);if(o)return AM(o,e)}if(typeof window<"u"&&window.location)return AM(window.location.origin,e)}const gY={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},mY=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,TM={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},vY=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function yY(t){return t instanceof Date&&!isNaN(t.getTime())}function bY(t){const e=vY.exec(t);if(!e)return null;const[,n,r,s,o,a,u,c,f,p,g]=e,m=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(s,10),parseInt(o,10),parseInt(a,10),parseInt(u,10),c?parseInt(c.padEnd(3,"0"),10):0));if(f){const y=(parseInt(p,10)*60+parseInt(g,10))*(f==="+"?-1:1);m.setUTCMinutes(m.getUTCMinutes()+y)}return yY(m)?m:null}function SY(t,e={}){const{strict:n=!1,warnings:r=!1,reviver:s,parseDates:o=!0}=e;if(typeof t!="string")return t;const a=t.trim(),u=a.toLowerCase();if(u.length<=9&&u in TM)return TM[u];if(!mY.test(a)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return t}if(Object.entries(gY).some(([c,f])=>{const p=f.test(a);return p&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${c} pattern`),p})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(a,(f,p)=>{if(f==="__proto__"||f==="constructor"&&p&&typeof p=="object"&&"prototype"in p){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(o&&typeof p=="string"){const g=bY(p);if(g)return g}return s?s(f,p):p})}catch(c){if(n)throw c;return t}}function EY(t,e={strict:!0}){return SY(t,e)}const CY=["javascript:","data:","vbscript:"];function wY(t){let e;try{e=new URL(t)}catch{return!0}return!CY.includes(e.protocol)}const _Y={id:"redirect",name:"Redirect",hooks:{onSuccess(t){if(t.data?.url&&t.data?.redirect&&wY(t.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=t.data.url}catch{}}}};let Vs=[],ma=0;const $m=4,xY=globalThis.nanostoresGlobal||={epoch:0};let AY=()=>{for(ma=0;ma<Vs.length;ma+=$m)Vs[ma](Vs[ma+1].value,Vs[ma+2],Vs[ma+3]);Vs.length=0};const RM=t=>{let e=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:t,lc:0,listen(r){return n.lc=e.push(r),()=>{for(let o=ma+$m;o<Vs.length;)Vs[o]===r?Vs.splice(o,$m):o+=$m;let s=e.indexOf(r);~s&&(e.splice(s,1),--n.lc||n.off())}},notify(r,s){xY.epoch++;let o=!Vs.length&&!0;for(let a of e)Vs.push(a,n,r,s);o&&AY()},off(){},set(r){let s=n.value;s!==r&&(n.value=r,n.notify(s))},subscribe(r){let s=n.listen(r);return r(n.value),s},value:t};return n},TY=2,RY=5,Ug=6,Fg=10;let z6=(t,e,n,r)=>(t.events=t.events||{},t.events[n+Fg]||(t.events[n+Fg]=r(s=>{t.events[n].reduceRight((o,a)=>(a(o),o),{shared:{},...s})})),t.events[n]=t.events[n]||[],t.events[n].push(e),()=>{let s=t.events[n],o=s.indexOf(e);s.splice(o,1),s.length||(delete t.events[n],t.events[n+Fg](),delete t.events[n+Fg])}),IY=(t,e)=>z6(t,e,TY,n=>{let r=t.set,s=t.setKey;return t.setKey&&(t.setKey=(o,a)=>{let u;if(n({abort:()=>{u=!0},changed:o,newValue:{...t.value,[o]:a}}),!u)return s(o,a)}),t.set=o=>{let a;if(n({abort:()=>{a=!0},newValue:o}),!a)return r(o)},()=>{t.set=r,t.setKey=s}});const OY=1e3;let NY=(t,e)=>z6(t,r=>{let s=e(r);s&&t.events[Ug].push(s)},RY,r=>{let s=t.listen;t.listen=(...a)=>(!t.lc&&!t.active&&(t.active=!0,r()),s(...a));let o=t.off;return t.events[Ug]=[],t.off=()=>{o(),setTimeout(()=>{if(t.active&&!t.lc){t.active=!1;for(let a of t.events[Ug])a();t.events[Ug]=[]}},OY)},()=>{t.listen=s,t.off=o}});function MY(t,e,n){let r=new Set(e);return t.listen((s,o,a)=>{(a===void 0?e.some(u=>s[u]!==o[u]):r.has(a)||r.has(a.split(/\.|\[/)[0]))&&n(s,o,a)})}function IM(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function gv(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!gv(t[n],e[n]))return!1;return!0}if(IM(t)&&IM(e)){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n)if(!(s in e)||!gv(t[s],e[s]))return!1;return!0}return!1}function PY(t,e){return IY(t,({newValue:n,abort:r})=>{e(t.value,n)&&r()})}const k1=Symbol.for("better-auth:broadcast-channel"),kY=()=>Math.floor(Date.now()/1e3);var DY=class{listeners=new Set;name;constructor(t="better-auth.message"){this.name=t}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}post(t){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...t,timestamp:kY()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const t=e=>{if(e.key!==this.name)return;const n=JSON.parse(e.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}};function D1(t="better-auth.message"){return globalThis[k1]||(globalThis[k1]=new DY(t)),globalThis[k1]}const L1=Symbol.for("better-auth:focus-manager");var LY=class{listeners=new Set;subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setFocused(t){this.listeners.forEach(e=>e(t))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const t=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",t,!1),()=>{document.removeEventListener("visibilitychange",t,!1)}}};function OM(){return globalThis[L1]||(globalThis[L1]=new LY),globalThis[L1]}const U1=Symbol.for("better-auth:online-manager");var UY=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setOnline(t){this.isOnline=t,this.listeners.forEach(e=>e(t))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const t=()=>this.setOnline(!0),e=()=>this.setOnline(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",e,!1),()=>{window.removeEventListener("online",t,!1),window.removeEventListener("offline",e,!1)}}};function F1(){return globalThis[U1]||(globalThis[U1]=new UY),globalThis[U1]}const z1=()=>Math.floor(Date.now()/1e3),FY=5;function zY(t){const{fetchSession:e,shouldPollSession:n=()=>!0,sessionSignal:r,options:s={}}=t,o=s.sessionOptions?.refetchInterval??0,a=s.sessionOptions?.refetchOnWindowFocus??!0,u=s.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},f=()=>u||F1().isOnline,p=T=>{if(f()){if(T?.event==="storage"){e();return}if(T?.event==="poll"){c.lastSessionRequest=z1(),e();return}if(T?.event==="visibilitychange"){if(z1()-c.lastSessionRequest<FY)return;c.lastSessionRequest=z1(),e();return}e()}},g=T=>{D1().post({event:"session",data:{trigger:T},clientId:Math.random().toString(36).substring(7)})},m=()=>{o&&o>0&&(c.pollInterval=setInterval(()=>{n()&&p({event:"poll"})},o*1e3))},y=()=>{c.unsubscribeBroadcast=D1().subscribe(()=>{p({event:"storage"})})},S=()=>{a&&(c.unsubscribeFocus=OM().subscribe(()=>{p({event:"visibilitychange"})}))},E=()=>{c.unsubscribeOnline=F1().subscribe(T=>{T&&p({event:"visibilitychange"})})},C=()=>{c.unsubscribeSignal=r.listen(()=>{e()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,m(),y(),S(),E(),C(),c.cleanupBroadcastSetup=D1().setup(),c.cleanupFocusSetup=OM().setup(),c.cleanupOnlineSetup=F1().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&(clearInterval(c.pollInterval),c.pollInterval=void 0),c.unsubscribeBroadcast&&(c.unsubscribeBroadcast(),c.unsubscribeBroadcast=void 0),c.unsubscribeFocus&&(c.unsubscribeFocus(),c.unsubscribeFocus=void 0),c.unsubscribeOnline&&(c.unsubscribeOnline(),c.unsubscribeOnline=void 0),c.unsubscribeSignal&&(c.unsubscribeSignal(),c.unsubscribeSignal=void 0),c.cleanupBroadcastSetup&&(c.cleanupBroadcastSetup(),c.cleanupBroadcastSetup=void 0),c.cleanupFocusSetup&&(c.cleanupFocusSetup(),c.cleanupFocusSetup=void 0),c.cleanupOnlineSetup&&(c.cleanupOnlineSetup(),c.cleanupOnlineSetup=void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:p,broadcastSessionUpdate:g}}const BY=()=>typeof window>"u";function NM(t){return typeof t=="object"&&t!==null&&"data"in t&&"error"in t?t:{data:t,error:null}}function jY(t){return!t||t.session===null&&t.user===null?null:t}function HY(t,e){return gv(t.data,e.data)&&t.error===e.error&&t.isPending===e.isPending&&t.isRefetching===e.isRefetching&&t.refetch===e.refetch}function $Y(t,e){const n=RM(!1);let r;const s=f=>u(f),o=RM({data:null,error:null,isPending:!0,isRefetching:!1,refetch:s});PY(o,HY);const a=f=>{if(r!==f)return;const p=o.get();r=void 0,!(!p.isPending&&!p.isRefetching)&&o.set({...p,isPending:!1,isRefetching:!1,refetch:s})},u=async f=>{r?.abort();const p=new AbortController;r=p;const g=o.get();o.set({...g,isPending:g.data===null,isRefetching:!0,error:null,refetch:s});try{const m=await t("/get-session",{method:"GET",query:f?.query,signal:p.signal});if(p.signal.aborted){a(p);return}let{data:y,error:S}=NM(m);if(y?.needsRefresh)try{const x=await t("/get-session",{method:"POST",signal:p.signal});if(p.signal.aborted){a(p);return}({data:y,error:S}=NM(x))}catch{if(p.signal.aborted){a(p);return}}if(S){const x=o.get(),T=S?.status===401;o.set({data:T?null:x.data,error:S,isPending:!1,isRefetching:!1,refetch:s});return}const E=jY(y),C=o.get(),w=C.data!=null&&E!=null&&gv(C.data,E)?C.data:E;o.set({data:w,error:null,isPending:!1,isRefetching:!1,refetch:s})}catch(m){if(p.signal.aborted){a(p);return}const y=o.get();o.set({data:y.data,error:m,isPending:!1,isRefetching:!1,refetch:s})}};let c=()=>{};return NY(o,()=>{let f;BY()||(f=setTimeout(()=>{u()},0));const p=zY({fetchSession:u,shouldPollSession:()=>o.get().data!=null,sessionSignal:n,options:e});return p.init(),c=p.broadcastSessionUpdate,()=>{f&&clearTimeout(f);const g=r;g?.abort(),g&&a(g),p.cleanup()}}),{session:o,$sessionSignal:n,broadcastSessionUpdate:f=>c(f)}}function B1(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function k_(t,e,n=".",r){if(!B1(e))return k_(t,{},n,r);const s={...e};for(const o of Object.keys(t)){if(o==="__proto__"||o==="constructor")continue;const a=t[o];a!=null&&(r&&r(s,o,a,n)||(Array.isArray(a)&&Array.isArray(s[o])?s[o]=[...a,...s[o]]:B1(a)&&B1(s[o])?s[o]=k_(a,s[o],(n?`${n}.`:"")+o.toString(),r):s[o]=a))}return s}function qY(t){return(...e)=>e.reduce((n,r)=>k_(n,r,"",t),{})}const WY=qY();var GY=Object.defineProperty,VY=Object.defineProperties,KY=Object.getOwnPropertyDescriptors,MM=Object.getOwnPropertySymbols,YY=Object.prototype.hasOwnProperty,ZY=Object.prototype.propertyIsEnumerable,PM=(t,e,n)=>e in t?GY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ws=(t,e)=>{for(var n in e||(e={}))YY.call(e,n)&&PM(t,n,e[n]);if(MM)for(var n of MM(e))ZY.call(e,n)&&PM(t,n,e[n]);return t},bo=(t,e)=>VY(t,KY(e)),XY=class extends Error{constructor(t,e,n){super(e||t.toString(),{cause:n}),this.status=t,this.statusText=e,this.error=n,Error.captureStackTrace(this,this.constructor)}},QY=async(t,e)=>{var n,r,s,o,a,u;let c=e||{};const f={onRequest:[e?.onRequest],onResponse:[e?.onResponse],onSuccess:[e?.onSuccess],onError:[e?.onError],onRetry:[e?.onRetry]};if(!e||!e?.plugins)return{url:t,options:c,hooks:f};for(const p of e?.plugins||[]){if(p.init){const g=await((n=p.init)==null?void 0:n.call(p,t.toString(),e));c=g.options||c,t=g.url}f.onRequest.push((r=p.hooks)==null?void 0:r.onRequest),f.onResponse.push((s=p.hooks)==null?void 0:s.onResponse),f.onSuccess.push((o=p.hooks)==null?void 0:o.onSuccess),f.onError.push((a=p.hooks)==null?void 0:a.onError),f.onRetry.push((u=p.hooks)==null?void 0:u.onRetry)}return{url:t,options:c,hooks:f}},kM=class{constructor(t){this.options=t}shouldAttemptRetry(t,e){return this.options.shouldRetry?Promise.resolve(t<this.options.attempts&&this.options.shouldRetry(e)):Promise.resolve(t<this.options.attempts)}getDelay(){return this.options.delay}},JY=class{constructor(t){this.options=t}shouldAttemptRetry(t,e){return this.options.shouldRetry?Promise.resolve(t<this.options.attempts&&this.options.shouldRetry(e)):Promise.resolve(t<this.options.attempts)}getDelay(t){return Math.min(this.options.maxDelay,this.options.baseDelay*2**t)}};function eZ(t){if(typeof t=="number")return new kM({type:"linear",attempts:t,delay:1e3});switch(t.type){case"linear":return new kM(t);case"exponential":return new JY(t);default:throw new Error("Invalid retry strategy")}}var tZ=async t=>{const e={},n=async r=>typeof r=="function"?await r():r;if(t?.auth){if(t.auth.type==="Bearer"){const r=await n(t.auth.token);if(!r)return e;e.authorization=`Bearer ${r}`}else if(t.auth.type==="Basic"){const[r,s]=await Promise.all([n(t.auth.username),n(t.auth.password)]);if(!r||!s)return e;e.authorization=`Basic ${btoa(`${r}:${s}`)}`}else if(t.auth.type==="Custom"){const[r,s]=await Promise.all([n(t.auth.prefix),n(t.auth.value)]);if(!s)return e;e.authorization=`${r??""} ${s}`}}return e},nZ=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function rZ(t){const e=t.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!e)return"json";const r=e.split(";").shift()||"";return nZ.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function sZ(t){try{return JSON.parse(t),!0}catch{return!1}}function B6(t){if(t===void 0)return!1;const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(t)?!0:t.buffer?!1:t.constructor&&t.constructor.name==="Object"||typeof t.toJSON=="function"}function DM(t){try{return JSON.parse(t)}catch{return t}}function LM(t){return typeof t=="function"}function oZ(t){if(t?.customFetchImpl)return t.customFetchImpl;if(typeof globalThis<"u"&&LM(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&LM(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function j6(...t){const e={};for(const n of t)if(n)if(n instanceof Headers)n.forEach((r,s)=>{e[s]=r});else{const r=Array.isArray(n)?n:Object.entries(n);for(const[s,o]of r)o!=null&&(e[s]=o)}return e}async function iZ(t){const e=new Headers(j6(t?.headers,await tZ(t)));if(!e.has("content-type")){const n=aZ(t?.body);n&&e.set("content-type",n)}return e}function aZ(t){return B6(t)?"application/json":null}function lZ(t){const e=t.get("content-type");return e?e.split(";")[0].trim().toLowerCase():null}function uZ(t,e){const{body:n}=t;return n?!B6(n)||typeof n=="string"?n:lZ(e)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function cZ(t,e){var n;if(e?.method)return e.method.toUpperCase();if(t.startsWith("@")){const r=(n=t.split("@")[1])==null?void 0:n.split("/")[0];return $6.includes(r)?r.toUpperCase():e?.body?"POST":"GET"}return e?.body?"POST":"GET"}function dZ(t,e){let n;return!t?.signal&&t?.timeout&&(n=setTimeout(()=>e?.abort(),t?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var fZ=class H6 extends Error{constructor(e,n){super(n||JSON.stringify(e,null,2)),this.issues=e,Object.setPrototypeOf(this,H6.prototype)}};async function Ff(t,e){const n=await t["~standard"].validate(e);if(n.issues)throw new fZ(n.issues);return n.value}var $6=["get","post","put","patch","delete"],hZ=t=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(e,n){var r,s,o,a;const u=((s=(r=t.plugins)==null?void 0:r.find(c=>{var f;return(f=c.schema)!=null&&f.config?e.startsWith(c.schema.config.baseURL||"")||e.startsWith(c.schema.config.prefix||""):!1}))==null?void 0:s.schema)||t.schema;if(u){let c=e;(o=u.config)!=null&&o.prefix&&c.startsWith(u.config.prefix)&&(c=c.replace(u.config.prefix,""),u.config.baseURL&&(e=e.replace(u.config.prefix,u.config.baseURL))),(a=u.config)!=null&&a.baseURL&&c.startsWith(u.config.baseURL)&&(c=c.replace(u.config.baseURL,"")),c.startsWith("/")&&c.charAt(1)==="@"&&(c=c.substring(1));const f=u.schema[c];if(f){let p=n?.headers;if(f.headers&&!n?.disableValidation){const m={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((E,C)=>{m[C.toLowerCase()]=E});else if(typeof n.headers=="object")for(const[E,C]of Object.entries(n.headers))C!=null&&(m[E.toLowerCase()]=C)}const y=await Ff(f.headers,m),S={};for(const[E,C]of Object.entries(y))S[E.toLowerCase()]=C;p=S}let g=bo(Ws({},n),{method:f.method,output:f.output,headers:p});return n?.disableValidation||(g=bo(Ws({},g),{body:f.input?await Ff(f.input,n?.body):n?.body,params:f.params?await Ff(f.params,n?.params):n?.params,query:f.query?await Ff(f.query,n?.query):n?.query})),{url:e,options:g}}}return{url:e,options:n}}}),pZ=t=>{async function e(n,r){const s=bo(Ws(Ws({},t),r),{headers:j6(t?.headers,r?.headers),plugins:[...t?.plugins||[],hZ(t||{}),...r?.plugins||[]]});if(t?.catchAllError)try{return await D_(n,s)}catch(o){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:o}}}return await D_(n,s)}return e},gZ=t=>t==="."||t==="..";function mZ(t,e){let n=t;for(const[r,s]of e)n=n.replace(r,s);if(gZ(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function vZ(t,e){const{baseURL:n,params:r,query:s}=e||{query:{},params:{},baseURL:""};let o=t.startsWith("http")?t.split("/").slice(0,3).join("/"):n||"";if(t.startsWith("@")){const m=t.toString().split("@")[1].split("/")[0];$6.includes(m)&&(t=t.replace(`@${m}/`,"/"))}o.endsWith("/")||(o+="/");let[a,u]=t.replace(o,"").split("?");const c=new URLSearchParams(u);for(const[m,y]of Object.entries(s||{})){if(y==null)continue;let S;if(typeof y=="string")S=y;else if(Array.isArray(y)){for(const E of y)c.append(m,E);continue}else S=JSON.stringify(y);c.set(m,S)}const f=new Map;if(r)if(Array.isArray(r)){const m=a.split("/").filter(y=>y.startsWith(":"));for(const[y,S]of m.entries()){const E=r[y];f.set(S,String(E))}}else for(const[m,y]of Object.entries(r))f.set(`:${m}`,String(y));a=a.split("/").map(m=>mZ(m,f)).join("/"),a=a.replace(/^\/+/,"");let p=c.toString();return p=p.length>0?`?${p}`.replace(/\+/g,"%20"):"",o.startsWith("http")?new URL(`${a}${p}`,o):`${o}${a}${p}`}var D_=async(t,e)=>{var n,r,s,o,a,u,c,f;const{hooks:p,url:g,options:m}=await QY(t,e),y=oZ(m),S=new AbortController,E=(n=m.signal)!=null?n:S.signal,C=vZ(g,m),w=await iZ(m),x=uZ(m,w),T=cZ(g,m),R=bo(Ws({},m),{url:C,headers:w,body:x,method:T,signal:E});for(const W of p.onRequest)if(W){const Y=await W(R);typeof Y=="object"&&Y!==null&&Object.assign(R,Y)}("pipeTo"in R&&typeof R.pipeTo=="function"||typeof((r=e?.body)==null?void 0:r.pipe)=="function")&&("duplex"in R||(R.duplex="half"));const{clearTimeout:M}=dZ(m,S);let O=await y(R.url,R);M();const I={response:O,request:R};for(const W of p.onResponse)if(W){const Y=await W(bo(Ws({},I),{response:(s=e?.hookOptions)!=null&&s.cloneResponse?O.clone():O}));Y instanceof Response?O=Y:typeof Y=="object"&&Y!==null&&(O=Y.response)}if(O.ok){if(!(R.method!=="HEAD"))return{data:"",error:null};const Y=rZ(O),ne={data:null,response:O,request:R};if(Y==="json"||Y==="text"){const $=await O.text(),ee=(o=R.jsonParser)!=null?o:DM;ne.data=await ee($)}else ne.data=await O[Y]();R?.output&&R.output&&!R.disableValidation&&(ne.data=await Ff(R.output,ne.data));for(const $ of p.onSuccess)$&&await $(bo(Ws({},ne),{response:(a=e?.hookOptions)!=null&&a.cloneResponse?O.clone():O}));return e?.throw?ne.data:{data:ne.data,error:null}}const P=(u=e?.jsonParser)!=null?u:DM,k=await O.text(),H=sZ(k),F=H?await P(k):null,B={response:O,responseText:k,request:R,error:bo(Ws({},F),{status:O.status,statusText:O.statusText})};for(const W of p.onError)W&&await W(bo(Ws({},B),{response:(c=e?.hookOptions)!=null&&c.cloneResponse?O.clone():O}));if(e?.retry){const W=eZ(e.retry),Y=(f=e.retryAttempt)!=null?f:0;if(await W.shouldAttemptRetry(Y,O)){for(const $ of p.onRetry)$&&await $(I);const ne=W.getDelay(Y);return await new Promise($=>setTimeout($,ne)),await D_(t,bo(Ws({},e),{retryAttempt:Y+1}))}}if(e?.throw)throw new XY(O.status,O.statusText,H?F:k);return{data:null,error:bo(Ws({},F),{status:O.status,statusText:O.statusText})}},gl={};const yZ=t=>{if(typeof process>"u")return;const e="/api/auth";if(gl.NEXT_PUBLIC_AUTH_URL)return gl.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(gl.NEXTAUTH_URL)try{return gl.NEXTAUTH_URL}catch{}if(gl.VERCEL_URL)try{const n=gl.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${gl.VERCEL_URL}`).origin}${e}`}catch{}}},bZ=(t,e)=>{const n="credentials"in Request.prototype,r=pY(t?.baseURL,t?.basePath)??yZ()??"/api/auth",s=[],o={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:t?.fetchOptions?.onSuccess,onError:t?.fetchOptions?.onError,onRequest:t?.fetchOptions?.onRequest,onResponse:t?.fetchOptions?.onResponse}},{onSuccess:a,onError:u,onRequest:c,onResponse:f,...p}={},g=pZ({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(M){return M?EY(M,{strict:!1}):null},customFetchImpl:fetch,...p,plugins:[o,...p.plugins||[],_Y,...s]}),{$sessionSignal:m,session:y,broadcastSessionUpdate:S}=$Y(g,t),E=[];let C={};const w={$sessionSignal:m,session:y},x={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},T=[{signal:"$sessionSignal",matcher(M){return M==="/sign-out"||M==="/update-user"||M==="/update-session"||M==="/sign-up/email"||M==="/sign-in/email"||M==="/delete-user"||M==="/verify-email"||M==="/revoke-sessions"||M==="/revoke-session"||M==="/revoke-other-sessions"||M==="/change-email"||M==="/change-password"},callback(M){M==="/sign-out"?S("signout"):(M==="/update-user"||M==="/update-session")&&S("updateUser")}}];for(const M of E)M.getAtoms&&Object.assign(w,M.getAtoms?.(g)),M.pathMethods&&Object.assign(x,M.pathMethods),M.atomListeners&&T.push(...M.atomListeners);const R={notify:M=>{w[M].set(!w[M].get())},listen:(M,O)=>{w[M].subscribe(O)},atoms:w};for(const M of E)M.getActions&&(C=WY(M.getActions?.(g,R,t)??{},C));return{get baseURL(){return r},pluginsActions:C,pluginsAtoms:w,pluginPathMethods:x,atomListeners:T,$fetch:g,$store:R}};function SZ(t){return typeof t=="object"&&t!==null&&"get"in t&&typeof t.get=="function"&&"lc"in t&&typeof t.lc=="number"}function EZ(t){return t.charAt(0).toUpperCase()+t.slice(1)}const CZ=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),wZ=/['\u2019]/g;function _Z(t){return t.replace(wZ,"").match(CZ)??[]}function xZ(t){return _Z(t).map(e=>e.toLowerCase()).join("-")}function AZ(t,e,n){const r=e[t],{fetchOptions:s,query:o,...a}=n||{};return r||(s?.method?s.method:a&&Object.keys(a).length>0?"POST":"GET")}function TZ(t,e,n,r,s){function o(a=[]){return new Proxy(function(){},{get(u,c){if(typeof c!="string"||c==="then"||c==="catch"||c==="finally")return;const f=[...a,c];let p=t;for(const g of f)if(p&&typeof p=="object"&&g in p)p=p[g];else{p=void 0;break}return typeof p=="function"||SZ(p)?p:o(f)},apply:async(u,c,f)=>{const p="/"+a.map(xZ).join("/"),g=f[0]||{},m=f[1]||{},{query:y,fetchOptions:S,...E}=g,C={...m,...S},w=AZ(p,n,g);return await e(p,{...C,body:w==="GET"?void 0:{...E,...C?.body||{}},query:y||C?.query,method:w,async onSuccess(x){if(await C?.onSuccess?.(x),!s||C.disableSignal)return;const T=s.filter(M=>M.matcher(p));if(!T.length)return;const R=new Set;for(const M of T){const O=r[M.signal];if(!O)return;if(R.has(M.signal))continue;R.add(M.signal);const I=O.get();setTimeout(()=>{O.set(!I)},10),M.callback?.(p)}}})}})}return o()}var j1={exports:{}},We={};var UM;function RZ(){if(UM)return We;UM=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),m=Symbol.iterator;function y(L){return L===null||typeof L!="object"?null:(L=m&&L[m]||L["@@iterator"],typeof L=="function"?L:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function w(L,V,K){this.props=L,this.context=V,this.refs=C,this.updater=K||S}w.prototype.isReactComponent={},w.prototype.setState=function(L,V){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,V,"setState")},w.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function x(){}x.prototype=w.prototype;function T(L,V,K){this.props=L,this.context=V,this.refs=C,this.updater=K||S}var R=T.prototype=new x;R.constructor=T,E(R,w.prototype),R.isPureReactComponent=!0;var M=Array.isArray;function O(){}var I={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function k(L,V,K){var J=K.ref;return{$$typeof:t,type:L,key:V,ref:J!==void 0?J:null,props:K}}function H(L,V){return k(L.type,V,L.props)}function F(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function B(L){var V={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(K){return V[K]})}var W=/\/+/g;function Y(L,V){return typeof L=="object"&&L!==null&&L.key!=null?B(""+L.key):V.toString(36)}function ne(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(O,O):(L.status="pending",L.then(function(V){L.status==="pending"&&(L.status="fulfilled",L.value=V)},function(V){L.status==="pending"&&(L.status="rejected",L.reason=V)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function $(L,V,K,J,oe){var he=typeof L;(he==="undefined"||he==="boolean")&&(L=null);var ue=!1;if(L===null)ue=!0;else switch(he){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(L.$$typeof){case t:case e:ue=!0;break;case p:return ue=L._init,$(ue(L._payload),V,K,J,oe)}}if(ue)return oe=oe(L),ue=J===""?"."+Y(L,0):J,M(oe)?(K="",ue!=null&&(K=ue.replace(W,"$&/")+"/"),$(oe,V,K,"",function(Xe){return Xe})):oe!=null&&(F(oe)&&(oe=H(oe,K+(oe.key==null||L&&L.key===oe.key?"":(""+oe.key).replace(W,"$&/")+"/")+ue)),V.push(oe)),1;ue=0;var ve=J===""?".":J+":";if(M(L))for(var _e=0;_e<L.length;_e++)J=L[_e],he=ve+Y(J,_e),ue+=$(J,V,K,he,oe);else if(_e=y(L),typeof _e=="function")for(L=_e.call(L),_e=0;!(J=L.next()).done;)J=J.value,he=ve+Y(J,_e++),ue+=$(J,V,K,he,oe);else if(he==="object"){if(typeof L.then=="function")return $(ne(L),V,K,J,oe);throw V=String(L),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ue}function ee(L,V,K){if(L==null)return L;var J=[],oe=0;return $(L,J,"","",function(he){return V.call(K,he,oe++)}),J}function fe(L){if(L._status===-1){var V=L._result;V=V(),V.then(function(K){(L._status===0||L._status===-1)&&(L._status=1,L._result=K)},function(K){(L._status===0||L._status===-1)&&(L._status=2,L._result=K)}),L._status===-1&&(L._status=0,L._result=V)}if(L._status===1)return L._result.default;throw L._result}var de=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},Ae={map:ee,forEach:function(L,V,K){ee(L,function(){V.apply(this,arguments)},K)},count:function(L){var V=0;return ee(L,function(){V++}),V},toArray:function(L){return ee(L,function(V){return V})||[]},only:function(L){if(!F(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return We.Activity=g,We.Children=Ae,We.Component=w,We.Fragment=n,We.Profiler=s,We.PureComponent=T,We.StrictMode=r,We.Suspense=c,We.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,We.__COMPILER_RUNTIME={__proto__:null,c:function(L){return I.H.useMemoCache(L)}},We.cache=function(L){return function(){return L.apply(null,arguments)}},We.cacheSignal=function(){return null},We.cloneElement=function(L,V,K){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var J=E({},L.props),oe=L.key;if(V!=null)for(he in V.key!==void 0&&(oe=""+V.key),V)!P.call(V,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&V.ref===void 0||(J[he]=V[he]);var he=arguments.length-2;if(he===1)J.children=K;else if(1<he){for(var ue=Array(he),ve=0;ve<he;ve++)ue[ve]=arguments[ve+2];J.children=ue}return k(L.type,oe,J)},We.createContext=function(L){return L={$$typeof:a,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},We.createElement=function(L,V,K){var J,oe={},he=null;if(V!=null)for(J in V.key!==void 0&&(he=""+V.key),V)P.call(V,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(oe[J]=V[J]);var ue=arguments.length-2;if(ue===1)oe.children=K;else if(1<ue){for(var ve=Array(ue),_e=0;_e<ue;_e++)ve[_e]=arguments[_e+2];oe.children=ve}if(L&&L.defaultProps)for(J in ue=L.defaultProps,ue)oe[J]===void 0&&(oe[J]=ue[J]);return k(L,he,oe)},We.createRef=function(){return{current:null}},We.forwardRef=function(L){return{$$typeof:u,render:L}},We.isValidElement=F,We.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:fe}},We.memo=function(L,V){return{$$typeof:f,type:L,compare:V===void 0?null:V}},We.startTransition=function(L){var V=I.T,K={};I.T=K;try{var J=L(),oe=I.S;oe!==null&&oe(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(O,de)}catch(he){de(he)}finally{V!==null&&K.types!==null&&(V.types=K.types),I.T=V}},We.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},We.use=function(L){return I.H.use(L)},We.useActionState=function(L,V,K){return I.H.useActionState(L,V,K)},We.useCallback=function(L,V){return I.H.useCallback(L,V)},We.useContext=function(L){return I.H.useContext(L)},We.useDebugValue=function(){},We.useDeferredValue=function(L,V){return I.H.useDeferredValue(L,V)},We.useEffect=function(L,V){return I.H.useEffect(L,V)},We.useEffectEvent=function(L){return I.H.useEffectEvent(L)},We.useId=function(){return I.H.useId()},We.useImperativeHandle=function(L,V,K){return I.H.useImperativeHandle(L,V,K)},We.useInsertionEffect=function(L,V){return I.H.useInsertionEffect(L,V)},We.useLayoutEffect=function(L,V){return I.H.useLayoutEffect(L,V)},We.useMemo=function(L,V){return I.H.useMemo(L,V)},We.useOptimistic=function(L,V){return I.H.useOptimistic(L,V)},We.useReducer=function(L,V,K){return I.H.useReducer(L,V,K)},We.useRef=function(L){return I.H.useRef(L)},We.useState=function(L){return I.H.useState(L)},We.useSyncExternalStore=function(L,V,K){return I.H.useSyncExternalStore(L,V,K)},We.useTransition=function(){return I.H.useTransition()},We.version="19.2.7",We}var FM;function Xh(){return FM||(FM=1,j1.exports=RZ()),j1.exports}var A=Xh();const z=qa(A),q6=N5({__proto__:null,default:z},[A]);function IZ(t,e={}){const n=A.useRef(t.get()),{keys:r,deps:s=[t,r]}=e,o=A.useCallback(u=>{const c=f=>{n.current!==f&&(n.current=f,u())};return c(t.value),r?.length?MY(t,r,c):t.listen(c)},s),a=()=>n.current;return A.useSyncExternalStore(o,a,a)}function OZ(t){return`use${EZ(t)}`}function NZ(t){const{pluginPathMethods:e,pluginsActions:n,pluginsAtoms:r,$fetch:s,$store:o,atomListeners:a}=bZ(t),u={};for(const[c,f]of Object.entries(r))u[OZ(c)]=()=>IZ(f);return TZ({...n,...u,$fetch:s,$store:o},s,e,r,a)}class W6 extends Error{constructor(e){super(e instanceof Error&&e.message?e.message:"The request could not be completed.",{cause:e}),this.name="NetworkError"}}const MZ=t=>typeof t=="object"&&t!==null&&"name"in t&&t.name==="AbortError",G6=async(t,e)=>{try{return await fetch(t,e)}catch(n){throw MZ(n)?n:new W6(n)}},_y=()=>Cy().betterAuthEnabled,PZ="EMAIL_PASSWORD_SIGN_UP_DISABLED",kZ=t=>typeof t=="object"&&t!==null&&t.code===PZ,hh=NZ(),DZ=60;let zf=null;const qm=()=>Math.floor(Date.now()/1e3),LZ=t=>{const[,e]=t.split(".");if(!e)return qm();try{const n=JSON.parse(atob(e.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp=="number"?n.exp:qm()}catch{return qm()}},UZ=async()=>{const t=await G6("/api/auth/token",{credentials:"include"});if(!t.ok)return null;const e=await t.json();return e&&typeof e=="object"&&"token"in e&&typeof e.token=="string"?e.token:null},FZ=async()=>{if(zf&&zf.expiresAt-DZ>qm())return zf.value;const t=await UZ();return zf=t?{value:t,expiresAt:LZ(t)}:null,t},V6=()=>{zf=null};const zZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),K6=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();var BZ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const jZ=A.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...u},c)=>A.createElement("svg",{ref:c,...BZ,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:K6("lucide",s),...u},[...a.map(([f,p])=>A.createElement(f,p)),...Array.isArray(o)?o:[o]]));const Ns=(t,e)=>{const n=A.forwardRef(({className:r,...s},o)=>A.createElement(jZ,{ref:o,iconNode:e,className:K6(`lucide-${zZ(t)}`,r),...s}));return n.displayName=`${t}`,n};const zM=Ns("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const HZ=Ns("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const $Z=Ns("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);const qZ=Ns("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);const WZ=Ns("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);const GZ=Ns("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const VZ=Ns("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const KZ=Ns("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);const YZ=Ns("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const ZZ=Ns("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const XZ=Ns("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);const ph=Ns("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Y6(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=Y6(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Z6(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=Y6(t))&&(r&&(r+=" "),r+=e);return r}const zA="-",QZ=t=>{const e=eX(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const u=a.split(zA);return u[0]===""&&u.length!==1&&u.shift(),X6(u,e)||JZ(a)},getConflictingClassGroupIds:(a,u)=>{const c=n[a]||[];return u&&r[a]?[...c,...r[a]]:c}}},X6=(t,e)=>{if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?X6(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const o=t.join(zA);return e.validators.find(({validator:a})=>a(o))?.classGroupId},BM=/^\[(.+)\]$/,JZ=t=>{if(BM.test(t)){const e=BM.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},eX=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return nX(Object.entries(t.classGroups),n).forEach(([o,a])=>{L_(a,r,o,e)}),r},L_=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const o=s===""?e:jM(e,s);o.classGroupId=n;return}if(typeof s=="function"){if(tX(s)){L_(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{L_(a,jM(e,o),n,r)})})},jM=(t,e)=>{let n=t;return e.split(zA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},tX=t=>t.isThemeGetter,nX=(t,e)=>e?t.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,u])=>[e+a,u])):o);return[n,s]}):t,rX=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(o,a)=>{n.set(o,a),e++,e>t&&(e=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return s(o,a),a},set(o,a){n.has(o)?n.set(o,a):s(o,a)}}},Q6="!",sX=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],o=e.length,a=u=>{const c=[];let f=0,p=0,g;for(let C=0;C<u.length;C++){let w=u[C];if(f===0){if(w===s&&(r||u.slice(C,C+o)===e)){c.push(u.slice(p,C)),p=C+o;continue}if(w==="/"){g=C;continue}}w==="["?f++:w==="]"&&f--}const m=c.length===0?u:u.substring(p),y=m.startsWith(Q6),S=y?m.substring(1):m,E=g&&g>p?g-p:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:E}};return n?u=>n({className:u,parseClassName:a}):a},oX=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},iX=t=>({cache:rX(t.cacheSize),parseClassName:sX(t),...QZ(t)}),aX=/\s+/,lX=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,o=[],a=t.trim().split(aX);let u="";for(let c=a.length-1;c>=0;c-=1){const f=a[c],{modifiers:p,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:y}=n(f);let S=!!y,E=r(S?m.substring(0,y):m);if(!E){if(!S){u=f+(u.length>0?" "+u:u);continue}if(E=r(m),!E){u=f+(u.length>0?" "+u:u);continue}S=!1}const C=oX(p).join(":"),w=g?C+Q6:C,x=w+E;if(o.includes(x))continue;o.push(x);const T=s(E,S);for(let R=0;R<T.length;++R){const M=T[R];o.push(w+M)}u=f+(u.length>0?" "+u:u)}return u};function uX(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=J6(e))&&(r&&(r+=" "),r+=n);return r}const J6=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=J6(t[r]))&&(n&&(n+=" "),n+=e);return n};function cX(t,...e){let n,r,s,o=a;function a(c){const f=e.reduce((p,g)=>g(p),t());return n=iX(f),r=n.cache.get,s=n.cache.set,o=u,u(c)}function u(c){const f=r(c);if(f)return f;const p=lX(c,n);return s(c,p),p}return function(){return o(uX.apply(null,arguments))}}const Yt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},e8=/^\[(?:([a-z-]+):)?(.+)\]$/i,dX=/^\d+\/\d+$/,fX=new Set(["px","full","screen"]),hX=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pX=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gX=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mX=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vX=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ei=t=>Ac(t)||fX.has(t)||dX.test(t),ca=t=>id(t,"length",xX),Ac=t=>!!t&&!Number.isNaN(Number(t)),H1=t=>id(t,"number",Ac),vf=t=>!!t&&Number.isInteger(Number(t)),yX=t=>t.endsWith("%")&&Ac(t.slice(0,-1)),et=t=>e8.test(t),da=t=>hX.test(t),bX=new Set(["length","size","percentage"]),SX=t=>id(t,bX,t8),EX=t=>id(t,"position",t8),CX=new Set(["image","url"]),wX=t=>id(t,CX,TX),_X=t=>id(t,"",AX),yf=()=>!0,id=(t,e,n)=>{const r=e8.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},xX=t=>pX.test(t)&&!gX.test(t),t8=()=>!1,AX=t=>mX.test(t),TX=t=>vX.test(t),RX=()=>{const t=Yt("colors"),e=Yt("spacing"),n=Yt("blur"),r=Yt("brightness"),s=Yt("borderColor"),o=Yt("borderRadius"),a=Yt("borderSpacing"),u=Yt("borderWidth"),c=Yt("contrast"),f=Yt("grayscale"),p=Yt("hueRotate"),g=Yt("invert"),m=Yt("gap"),y=Yt("gradientColorStops"),S=Yt("gradientColorStopPositions"),E=Yt("inset"),C=Yt("margin"),w=Yt("opacity"),x=Yt("padding"),T=Yt("saturate"),R=Yt("scale"),M=Yt("sepia"),O=Yt("skew"),I=Yt("space"),P=Yt("translate"),k=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",et,e],B=()=>[et,e],W=()=>["",ei,ca],Y=()=>["auto",Ac,et],ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>["start","end","center","between","around","evenly","stretch"],de=()=>["","0",et],Ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[Ac,et];return{cacheSize:500,separator:":",theme:{colors:[yf],spacing:[ei,ca],blur:["none","",da,et],brightness:L(),borderColor:[t],borderRadius:["none","","full",da,et],borderSpacing:B(),borderWidth:W(),contrast:L(),grayscale:de(),hueRotate:L(),invert:de(),gap:B(),gradientColorStops:[t],gradientColorStopPositions:[yX,ca],inset:F(),margin:F(),opacity:L(),padding:B(),saturate:L(),scale:L(),sepia:de(),skew:L(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",et]}],container:["container"],columns:[{columns:[da]}],"break-after":[{"break-after":Ae()}],"break-before":[{"break-before":Ae()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ne(),et]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vf,et]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",et]}],grow:[{grow:de()}],shrink:[{shrink:de()}],order:[{order:["first","last","none",vf,et]}],"grid-cols":[{"grid-cols":[yf]}],"col-start-end":[{col:["auto",{span:["full",vf,et]},et]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[yf]}],"row-start-end":[{row:["auto",{span:[vf,et]},et]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",et]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",et]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...fe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...fe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...fe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",et,e]}],"min-w":[{"min-w":[et,e,"min","max","fit"]}],"max-w":[{"max-w":[et,e,"none","full","min","max","fit","prose",{screen:[da]},da]}],h:[{h:[et,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[et,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[et,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[et,e,"auto","min","max","fit"]}],"font-size":[{text:["base",da,ca]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",H1]}],"font-family":[{font:[yf]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",et]}],"line-clamp":[{"line-clamp":["none",Ac,H1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ei,et]}],"list-image":[{"list-image":["none",et]}],"list-style-type":[{list:["none","disc","decimal",et]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ei,ca]}],"underline-offset":[{"underline-offset":["auto",ei,et]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",et]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",et]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ne(),EX]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",SX]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wX]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:$()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[ei,et]}],"outline-w":[{outline:[ei,ca]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[ei,ca]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",da,_X]}],"shadow-color":[{shadow:[yf]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",da,et]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[T]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",et]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",et]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",et]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[vf,et]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",et]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",et]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",et]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ei,ca,H1]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},n8=cX(RX);function dn(...t){return n8(Z6(t))}const IX=1024,OX=1280;function NX(t,e=IX,n=OX){const r=t>=e;return{nav:r,reading:r,intelligence:t>=n}}function MX(t){const e=A.useRef(null),[n,r]=A.useState(t??null);return A.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const o=new ResizeObserver(a=>{const u=a[0];u&&r(u.contentRect.width)});return o.observe(s),r(s.getBoundingClientRect().width),()=>o.disconnect()},[]),[e,n]}const PX=[{id:"all",label:"All"},{id:"personal",label:"Personal"},{id:"uncategorized",label:"Unclassified"},{id:"newsletter",label:"Newsletters"},{id:"marketing",label:"Marketing"},{id:"automated",label:"Automated"},{id:"transactional",label:"Transactional"},{id:"social",label:"Social"}],kX={uncategorized:"neutral",personal:"accent",newsletter:"neutral",marketing:"neutral",automated:"neutral",transactional:"positive",social:"warning"};function DX({open:t,onClose:e,title:n,titleId:r="dialog-title",children:s,className:o,anchor:a="center"}){const u=A.useRef(null),c=A.useCallback(m=>{m.key==="Escape"&&(m.preventDefault(),m.stopImmediatePropagation(),e())},[e]);if(A.useEffect(()=>{if(t)return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[t,c]),A.useEffect(()=>{if(!t)return;const m=u.current;if(!m)return;m.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')[0]?.focus()},[t]),!t)return null;const f=a==="left",p=a==="right",g=f||p;return D.jsxs("div",{className:dn("fixed inset-0 z-50 flex",f?"items-stretch justify-start":p?"items-stretch justify-end":"items-center justify-center px-4"),role:"presentation",onClick:e,children:[D.jsx("div",{className:dn("absolute inset-0",!g&&"bg-canvas/80")}),D.jsxs("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":r,className:dn("relative z-10 overflow-hidden border-line bg-surface shadow-xl",f?"h-full w-72 max-w-[85vw] border-r":p?"h-full w-[80vw] max-w-[320px] border-l":"w-full max-w-lg rounded-md border",o),onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),children:[D.jsx("h2",{id:r,className:"sr-only",children:n}),s]})]})}const xy=A.createContext(null);xy.displayName="PanelGroupContext";const mn={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},BA=10,Rl=A.useLayoutEffect,HM=q6.useId,LX=typeof HM=="function"?HM:()=>null;let UX=0;function jA(t=null){const e=LX(),n=A.useRef(t||e||null);return n.current===null&&(n.current=""+UX++),t??n.current}function r8({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:o,id:a,maxSize:u,minSize:c,onCollapse:f,onExpand:p,onResize:g,order:m,style:y,tagName:S="div",...E}){const C=A.useContext(xy);if(C===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:x,getPanelSize:T,getPanelStyle:R,groupId:M,isPanelCollapsed:O,reevaluatePanelConstraints:I,registerPanel:P,resizePanel:k,unregisterPanel:H}=C,F=jA(a),B=A.useRef({callbacks:{onCollapse:f,onExpand:p,onResize:g},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:u,minSize:c},id:F,idIsFromProps:a!==void 0,order:m});A.useRef({didLogMissingDefaultSizeWarning:!1}),Rl(()=>{const{callbacks:Y,constraints:ne}=B.current,$={...ne};B.current.id=F,B.current.idIsFromProps=a!==void 0,B.current.order=m,Y.onCollapse=f,Y.onExpand=p,Y.onResize=g,ne.collapsedSize=n,ne.collapsible=r,ne.defaultSize=s,ne.maxSize=u,ne.minSize=c,($.collapsedSize!==ne.collapsedSize||$.collapsible!==ne.collapsible||$.maxSize!==ne.maxSize||$.minSize!==ne.minSize)&&I(B.current,$)}),Rl(()=>{const Y=B.current;return P(Y),()=>{H(Y)}},[m,F,P,H]),A.useImperativeHandle(o,()=>({collapse:()=>{w(B.current)},expand:Y=>{x(B.current,Y)},getId(){return F},getSize(){return T(B.current)},isCollapsed(){return O(B.current)},isExpanded(){return!O(B.current)},resize:Y=>{k(B.current,Y)}}),[w,x,T,O,F,k]);const W=R(B.current,s);return A.createElement(S,{...E,children:t,className:e,id:F,style:{...W,...y},[mn.groupId]:M,[mn.panel]:"",[mn.panelCollapsible]:r||void 0,[mn.panelId]:F,[mn.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const s8=A.forwardRef((t,e)=>A.createElement(r8,{...t,forwardedRef:e}));r8.displayName="Panel";s8.displayName="forwardRef(Panel)";let U_=null,Wm=-1,Ea=null;function FX(t,e){if(e){const n=(e&u8)!==0,r=(e&c8)!==0,s=(e&d8)!==0,o=(e&f8)!==0;if(n)return s?"se-resize":o?"ne-resize":"e-resize";if(r)return s?"sw-resize":o?"nw-resize":"w-resize";if(s)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function zX(){Ea!==null&&(document.head.removeChild(Ea),U_=null,Ea=null,Wm=-1)}function $1(t,e){var n,r;const s=FX(t,e);if(U_!==s){if(U_=s,Ea===null&&(Ea=document.createElement("style"),document.head.appendChild(Ea)),Wm>=0){var o;(o=Ea.sheet)===null||o===void 0||o.removeRule(Wm)}Wm=(n=(r=Ea.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function o8(t){return t.type==="keydown"}function i8(t){return t.type.startsWith("pointer")}function a8(t){return t.type.startsWith("mouse")}function Ay(t){if(i8(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(a8(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function BX(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function jX(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function HX(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:WM(t),b:WM(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;tt(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:qM($M(n.a)),b:qM($M(n.b))};if(s.a===s.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let u=o.length;for(;u--;){const c=o[u];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(s.a-s.b)}const $X=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function qX(t){var e;const n=getComputedStyle((e=l8(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function WX(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||qX(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||$X.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function $M(t){let e=t.length;for(;e--;){const n=t[e];if(tt(n,"Missing node"),WX(n))return n}return null}function qM(t){return t&&Number(getComputedStyle(t).zIndex)||0}function WM(t){const e=[];for(;t;)e.push(t),t=l8(t);return e}function l8(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const u8=1,c8=2,d8=4,f8=8,GX=BX()==="coarse";let Ys=[],Tc=!1,El=new Map,Ty=new Map;const gh=new Set;function VX(t,e,n,r,s){var o;const{ownerDocument:a}=e,u={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(o=El.get(a))!==null&&o!==void 0?o:0;return El.set(a,c+1),gh.add(u),mv(),function(){var p;Ty.delete(t),gh.delete(u);const g=(p=El.get(a))!==null&&p!==void 0?p:1;if(El.set(a,g-1),mv(),g===1&&El.delete(a),Ys.includes(u)){const m=Ys.indexOf(u);m>=0&&Ys.splice(m,1),$A(),s("up",!0,null)}}}function KX(t){const{target:e}=t,{x:n,y:r}=Ay(t);Tc=!0,HA({target:e,x:n,y:r}),mv(),Ys.length>0&&(vv("down",t),t.preventDefault(),h8(e)||t.stopImmediatePropagation())}function q1(t){const{x:e,y:n}=Ay(t);if(Tc&&t.buttons===0&&(Tc=!1,vv("up",t)),!Tc){const{target:r}=t;HA({target:r,x:e,y:n})}vv("move",t),$A(),Ys.length>0&&t.preventDefault()}function W1(t){const{target:e}=t,{x:n,y:r}=Ay(t);Ty.clear(),Tc=!1,Ys.length>0&&(t.preventDefault(),h8(e)||t.stopImmediatePropagation()),vv("up",t),HA({target:e,x:n,y:r}),$A(),mv()}function h8(t){let e=t;for(;e;){if(e.hasAttribute(mn.resizeHandle))return!0;e=e.parentElement}return!1}function HA({target:t,x:e,y:n}){Ys.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),gh.forEach(s=>{const{element:o,hitAreaMargins:a}=s,u=o.getBoundingClientRect(),{bottom:c,left:f,right:p,top:g}=u,m=GX?a.coarse:a.fine;if(e>=f-m&&e<=p+m&&n>=g-m&&n<=c+m){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&HX(r,o)>0){let S=r,E=!1;for(;S&&!S.contains(o);){if(jX(S.getBoundingClientRect(),u)){E=!0;break}S=S.parentElement}if(E)return}Ys.push(s)}})}function G1(t,e){Ty.set(t,e)}function $A(){let t=!1,e=!1;Ys.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;Ty.forEach(r=>{n|=r}),t&&e?$1("intersection",n):t?$1("horizontal",n):e?$1("vertical",n):zX()}let V1=new AbortController;function mv(){V1.abort(),V1=new AbortController;const t={capture:!0,signal:V1.signal};gh.size&&(Tc?(Ys.length>0&&El.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",W1,t),r.addEventListener("pointerleave",q1,t),r.addEventListener("pointermove",q1,t))}),window.addEventListener("pointerup",W1,t),window.addEventListener("pointercancel",W1,t)):El.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",KX,t),r.addEventListener("pointermove",q1,t))}))}function vv(t,e){gh.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ys.includes(n);r(t,s,e)})}function YX(){const[t,e]=A.useState(0);return A.useCallback(()=>e(n=>n+1),[])}function tt(t,e){if(!t)throw console.error(e),Error(e)}function Fl(t,e,n=BA){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function li(t,e,n=BA){return Fl(t,e,n)===0}function ss(t,e,n){return Fl(t,e,n)===0}function ZX(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const s=t[r],o=e[r];if(!ss(s,o,n))return!1}return!0}function vc({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];tt(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:s=0,collapsible:o,maxSize:a=100,minSize:u=0}=r;if(Fl(n,u)<0)if(o){const c=(s+u)/2;Fl(n,c)<0?n=s:n=u}else n=u;return n=Math.min(a,n),n=parseFloat(n.toFixed(BA)),n}function Bf({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:o}){if(ss(t,0))return e;const a=[...e],[u,c]=r;tt(u!=null,"Invalid first pivot index"),tt(c!=null,"Invalid second pivot index");let f=0;if(o==="keyboard"){{const g=t<0?c:u,m=n[g];tt(m,`Panel constraints not found for index ${g}`);const{collapsedSize:y=0,collapsible:S,minSize:E=0}=m;if(S){const C=e[g];if(tt(C!=null,`Previous layout not found for panel index ${g}`),ss(C,y)){const w=E-C;Fl(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}{const g=t<0?u:c,m=n[g];tt(m,`No panel constraints found for index ${g}`);const{collapsedSize:y=0,collapsible:S,minSize:E=0}=m;if(S){const C=e[g];if(tt(C!=null,`Previous layout not found for panel index ${g}`),ss(C,E)){const w=C-y;Fl(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}}{const g=t<0?1:-1;let m=t<0?c:u,y=0;for(;;){const E=e[m];tt(E!=null,`Previous layout not found for panel index ${m}`);const w=vc({panelConstraints:n,panelIndex:m,size:100})-E;if(y+=w,m+=g,m<0||m>=n.length)break}const S=Math.min(Math.abs(t),Math.abs(y));t=t<0?0-S:S}{let m=t<0?u:c;for(;m>=0&&m<n.length;){const y=Math.abs(t)-Math.abs(f),S=e[m];tt(S!=null,`Previous layout not found for panel index ${m}`);const E=S-y,C=vc({panelConstraints:n,panelIndex:m,size:E});if(!ss(S,C)&&(f+=S-C,a[m]=C,f.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?m--:m++}}if(ZX(s,a))return s;{const g=t<0?c:u,m=e[g];tt(m!=null,`Previous layout not found for panel index ${g}`);const y=m+f,S=vc({panelConstraints:n,panelIndex:g,size:y});if(a[g]=S,!ss(S,y)){let E=y-S,w=t<0?c:u;for(;w>=0&&w<n.length;){const x=a[w];tt(x!=null,`Previous layout not found for panel index ${w}`);const T=x+E,R=vc({panelConstraints:n,panelIndex:w,size:T});if(ss(x,R)||(E-=R-x,a[w]=R),ss(E,0))break;t>0?w--:w++}}}const p=a.reduce((g,m)=>m+g,0);return ss(p,100)?a:s}function XX({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,o=0,a=0;const u=n[0];tt(u!=null,"No pivot index found"),e.forEach((g,m)=>{const{constraints:y}=g,{maxSize:S=100,minSize:E=0}=y;m===u?(r=E,s=S):(o+=E,a+=S)});const c=Math.min(s,100-o),f=Math.max(r,100-a),p=t[u];return{valueMax:c,valueMin:f,valueNow:p}}function mh(t,e=document){return Array.from(e.querySelectorAll(`[${mn.resizeHandleId}][data-panel-group-id="${t}"]`))}function p8(t,e,n=document){const s=mh(t,n).findIndex(o=>o.getAttribute(mn.resizeHandleId)===e);return s??null}function g8(t,e,n){const r=p8(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function m8(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Ry(t,e=document){const n=e.querySelector(`[${mn.resizeHandleId}="${t}"]`);return n||null}function QX(t,e,n,r=document){var s,o,a,u;const c=Ry(e,r),f=mh(t,r),p=c?f.indexOf(c):-1,g=(s=(o=n[p])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,m=(a=(u=n[p+1])===null||u===void 0?void 0:u.id)!==null&&a!==void 0?a:null;return[g,m]}function JX({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:o,setLayout:a}){A.useRef({didWarnAboutMissingResizeHandle:!1}),Rl(()=>{if(!o)return;const u=mh(n,o);for(let c=0;c<s.length-1;c++){const{valueMax:f,valueMin:p,valueNow:g}=XX({layout:r,panelsArray:s,pivotIndices:[c,c+1]}),m=u[c];if(m!=null){const y=s[c];tt(y,`No panel data found for index "${c}"`),m.setAttribute("aria-controls",y.id),m.setAttribute("aria-valuemax",""+Math.round(f)),m.setAttribute("aria-valuemin",""+Math.round(p)),m.setAttribute("aria-valuenow",g!=null?""+Math.round(g):"")}}return()=>{u.forEach((c,f)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,o]),A.useEffect(()=>{if(!o)return;const u=e.current;tt(u,"Eager values not found");const{panelDataArray:c}=u,f=m8(n,o);tt(f!=null,`No group found for id "${n}"`);const p=mh(n,o);tt(p,`No resize handles found for group id "${n}"`);const g=p.map(m=>{const y=m.getAttribute(mn.resizeHandleId);tt(y,"Resize handle element has no handle id attribute");const[S,E]=QX(n,y,c,o);if(S==null||E==null)return()=>{};const C=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const x=c.findIndex(T=>T.id===S);if(x>=0){const T=c[x];tt(T,`No panel data found for index ${x}`);const R=r[x],{collapsedSize:M=0,collapsible:O,minSize:I=0}=T.constraints;if(R!=null&&O){const P=Bf({delta:ss(R,M)?I-M:M-R,initialLayout:r,panelConstraints:c.map(k=>k.constraints),pivotIndices:g8(n,y,o),prevLayout:r,trigger:"keyboard"});r!==P&&a(P)}}break}}};return m.addEventListener("keydown",C),()=>{m.removeEventListener("keydown",C)}});return()=>{g.forEach(m=>m())}},[o,t,e,n,r,s,a])}function GM(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function v8(t,e){const n=t==="horizontal",{x:r,y:s}=Ay(e);return n?r:s}function eQ(t,e,n,r,s){const o=n==="horizontal",a=Ry(e,s);tt(a,`No resize handle element found for id "${e}"`);const u=a.getAttribute(mn.groupId);tt(u,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const f=v8(n,t),p=m8(u,s);tt(p,`No group element found for id "${u}"`);const g=p.getBoundingClientRect(),m=o?g.width:g.height;return(f-c)/m*100}function tQ(t,e,n,r,s,o){if(o8(t)){const a=n==="horizontal";let u=0;t.shiftKey?u=100:s!=null?u=s:u=10;let c=0;switch(t.key){case"ArrowDown":c=a?0:u;break;case"ArrowLeft":c=a?-u:0;break;case"ArrowRight":c=a?u:0;break;case"ArrowUp":c=a?0:-u;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:eQ(t,e,n,r,o)}function nQ({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,s=100;for(let o=0;o<t.length;o++){const a=n[o];tt(a,`Panel constraints not found for index ${o}`);const{defaultSize:u}=a;u!=null&&(r++,e[o]=u,s-=u)}for(let o=0;o<t.length;o++){const a=n[o];tt(a,`Panel constraints not found for index ${o}`);const{defaultSize:u}=a;if(u!=null)continue;const c=t.length-r,f=s/c;r++,e[o]=f,s-=f}return e}function Ku(t,e,n){e.forEach((r,s)=>{const o=t[s];tt(o,`Panel data not found for index ${s}`);const{callbacks:a,constraints:u,id:c}=o,{collapsedSize:f=0,collapsible:p}=u,g=n[c];if(g==null||r!==g){n[c]=r;const{onCollapse:m,onExpand:y,onResize:S}=a;S&&S(r,g),p&&(m||y)&&(y&&(g==null||li(g,f))&&!li(r,f)&&y(),m&&(g==null||!li(g,f))&&li(r,f)&&m())}})}function zg(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function rQ({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:s,precision:o=3}){const a=n[s];let u;return a==null?u=t!=null?t.toPrecision(o):"1":r.length===1?u="1":u=a.toPrecision(o),{flexBasis:0,flexGrow:u,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function sQ(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function VM(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function y8(t){return`react-resizable-panels:${t}`}function b8(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:o}=e;return s?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function S8(t,e){try{const n=y8(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function oQ(t,e,n){var r,s;const o=(r=S8(t,n))!==null&&r!==void 0?r:{},a=b8(e);return(s=o[a])!==null&&s!==void 0?s:null}function iQ(t,e,n,r,s){var o;const a=y8(t),u=b8(e),c=(o=S8(t,s))!==null&&o!==void 0?o:{};c[u]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(a,JSON.stringify(c))}catch(f){console.error(f)}}function KM({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,a)=>o+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!ss(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=100/r*a;n[o]=u}let s=0;for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=vc({panelConstraints:e,panelIndex:o,size:a});a!=u&&(s+=a-u,n[o]=u)}if(!ss(s,0))for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=a+s,c=vc({panelConstraints:e,panelIndex:o,size:u});if(a!==c&&(s-=c-a,n[o]=c,ss(s,0)))break}return n}const aQ=100,jf={getItem:t=>(VM(jf),jf.getItem(t)),setItem:(t,e)=>{VM(jf),jf.setItem(t,e)}},YM={};function E8({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:o=null,onLayout:a=null,keyboardResizeBy:u=null,storage:c=jf,style:f,tagName:p="div",...g}){const m=jA(o),y=A.useRef(null),[S,E]=A.useState(null),[C,w]=A.useState([]),x=YX(),T=A.useRef({}),R=A.useRef(new Map),M=A.useRef(0),O=A.useRef({autoSaveId:t,direction:r,dragState:S,id:m,keyboardResizeBy:u,onLayout:a,storage:c}),I=A.useRef({layout:C,panelDataArray:[],panelDataArrayChanged:!1});A.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),A.useImperativeHandle(s,()=>({getId:()=>O.current.id,getLayout:()=>{const{layout:K}=I.current;return K},setLayout:K=>{const{onLayout:J}=O.current,{layout:oe,panelDataArray:he}=I.current,ue=KM({layout:K,panelConstraints:he.map(ve=>ve.constraints)});GM(oe,ue)||(w(ue),I.current.layout=ue,J&&J(ue),Ku(he,ue,T.current))}}),[]),Rl(()=>{O.current.autoSaveId=t,O.current.direction=r,O.current.dragState=S,O.current.id=m,O.current.onLayout=a,O.current.storage=c}),JX({committedValuesRef:O,eagerValuesRef:I,groupId:m,layout:C,panelDataArray:I.current.panelDataArray,setLayout:w,panelGroupElement:y.current}),A.useEffect(()=>{const{panelDataArray:K}=I.current;if(t){if(C.length===0||C.length!==K.length)return;let J=YM[t];J==null&&(J=sQ(iQ,aQ),YM[t]=J);const oe=[...K],he=new Map(R.current);J(t,oe,he,C,c)}},[t,C,c]),A.useEffect(()=>{});const P=A.useCallback(K=>{const{onLayout:J}=O.current,{layout:oe,panelDataArray:he}=I.current;if(K.constraints.collapsible){const ue=he.map(Ee=>Ee.constraints),{collapsedSize:ve=0,panelSize:_e,pivotIndices:Xe}=ml(he,K,oe);if(tt(_e!=null,`Panel size not found for panel "${K.id}"`),!li(_e,ve)){R.current.set(K.id,_e);const pt=uc(he,K)===he.length-1?_e-ve:ve-_e,Ce=Bf({delta:pt,initialLayout:oe,panelConstraints:ue,pivotIndices:Xe,prevLayout:oe,trigger:"imperative-api"});zg(oe,Ce)||(w(Ce),I.current.layout=Ce,J&&J(Ce),Ku(he,Ce,T.current))}}},[]),k=A.useCallback((K,J)=>{const{onLayout:oe}=O.current,{layout:he,panelDataArray:ue}=I.current;if(K.constraints.collapsible){const ve=ue.map(ze=>ze.constraints),{collapsedSize:_e=0,panelSize:Xe=0,minSize:Ee=0,pivotIndices:pt}=ml(ue,K,he),Ce=J??Ee;if(li(Xe,_e)){const ze=R.current.get(K.id),Be=ze!=null&&ze>=Ce?ze:Ce,pr=uc(ue,K)===ue.length-1?Xe-Be:Be-Xe,Et=Bf({delta:pr,initialLayout:he,panelConstraints:ve,pivotIndices:pt,prevLayout:he,trigger:"imperative-api"});zg(he,Et)||(w(Et),I.current.layout=Et,oe&&oe(Et),Ku(ue,Et,T.current))}}},[]),H=A.useCallback(K=>{const{layout:J,panelDataArray:oe}=I.current,{panelSize:he}=ml(oe,K,J);return tt(he!=null,`Panel size not found for panel "${K.id}"`),he},[]),F=A.useCallback((K,J)=>{const{panelDataArray:oe}=I.current,he=uc(oe,K);return rQ({defaultSize:J,dragState:S,layout:C,panelData:oe,panelIndex:he})},[S,C]),B=A.useCallback(K=>{const{layout:J,panelDataArray:oe}=I.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=ml(oe,K,J);return tt(ve!=null,`Panel size not found for panel "${K.id}"`),ue===!0&&li(ve,he)},[]),W=A.useCallback(K=>{const{layout:J,panelDataArray:oe}=I.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=ml(oe,K,J);return tt(ve!=null,`Panel size not found for panel "${K.id}"`),!ue||Fl(ve,he)>0},[]),Y=A.useCallback(K=>{const{panelDataArray:J}=I.current;J.push(K),J.sort((oe,he)=>{const ue=oe.order,ve=he.order;return ue==null&&ve==null?0:ue==null?-1:ve==null?1:ue-ve}),I.current.panelDataArrayChanged=!0,x()},[x]);Rl(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:K,onLayout:J,storage:oe}=O.current,{layout:he,panelDataArray:ue}=I.current;let ve=null;if(K){const Xe=oQ(K,ue,oe);Xe&&(R.current=new Map(Object.entries(Xe.expandToSizes)),ve=Xe.layout)}ve==null&&(ve=nQ({panelDataArray:ue}));const _e=KM({layout:ve,panelConstraints:ue.map(Xe=>Xe.constraints)});GM(he,_e)||(w(_e),I.current.layout=_e,J&&J(_e),Ku(ue,_e,T.current))}}),Rl(()=>{const K=I.current;return()=>{K.layout=[]}},[]);const ne=A.useCallback(K=>{let J=!1;const oe=y.current;return oe&&window.getComputedStyle(oe,null).getPropertyValue("direction")==="rtl"&&(J=!0),function(ue){ue.preventDefault();const ve=y.current;if(!ve)return()=>null;const{direction:_e,dragState:Xe,id:Ee,keyboardResizeBy:pt,onLayout:Ce}=O.current,{layout:ze,panelDataArray:Be}=I.current,{initialLayout:He}=Xe??{},pr=g8(Ee,K,ve);let Et=tQ(ue,K,_e,Xe,pt,ve);const Gr=_e==="horizontal";Gr&&J&&(Et=-Et);const Wn=Be.map(Ar=>Ar.constraints),xr=Bf({delta:Et,initialLayout:He??ze,panelConstraints:Wn,pivotIndices:pr,prevLayout:ze,trigger:o8(ue)?"keyboard":"mouse-or-touch"}),to=!zg(ze,xr);(i8(ue)||a8(ue))&&M.current!=Et&&(M.current=Et,!to&&Et!==0?Gr?G1(K,Et<0?u8:c8):G1(K,Et<0?d8:f8):G1(K,0)),to&&(w(xr),I.current.layout=xr,Ce&&Ce(xr),Ku(Be,xr,T.current))}},[]),$=A.useCallback((K,J)=>{const{onLayout:oe}=O.current,{layout:he,panelDataArray:ue}=I.current,ve=ue.map(ze=>ze.constraints),{panelSize:_e,pivotIndices:Xe}=ml(ue,K,he);tt(_e!=null,`Panel size not found for panel "${K.id}"`);const pt=uc(ue,K)===ue.length-1?_e-J:J-_e,Ce=Bf({delta:pt,initialLayout:he,panelConstraints:ve,pivotIndices:Xe,prevLayout:he,trigger:"imperative-api"});zg(he,Ce)||(w(Ce),I.current.layout=Ce,oe&&oe(Ce),Ku(ue,Ce,T.current))},[]),ee=A.useCallback((K,J)=>{const{layout:oe,panelDataArray:he}=I.current,{collapsedSize:ue=0,collapsible:ve}=J,{collapsedSize:_e=0,collapsible:Xe,maxSize:Ee=100,minSize:pt=0}=K.constraints,{panelSize:Ce}=ml(he,K,oe);Ce!=null&&(ve&&Xe&&li(Ce,ue)?li(ue,_e)||$(K,_e):Ce<pt?$(K,pt):Ce>Ee&&$(K,Ee))},[$]),fe=A.useCallback((K,J)=>{const{direction:oe}=O.current,{layout:he}=I.current;if(!y.current)return;const ue=Ry(K,y.current);tt(ue,`Drag handle element not found for id "${K}"`);const ve=v8(oe,J);E({dragHandleId:K,dragHandleRect:ue.getBoundingClientRect(),initialCursorPosition:ve,initialLayout:he})},[]),de=A.useCallback(()=>{E(null)},[]),Ae=A.useCallback(K=>{const{panelDataArray:J}=I.current,oe=uc(J,K);oe>=0&&(J.splice(oe,1),delete T.current[K.id],I.current.panelDataArrayChanged=!0,x())},[x]),L=A.useMemo(()=>({collapsePanel:P,direction:r,dragState:S,expandPanel:k,getPanelSize:H,getPanelStyle:F,groupId:m,isPanelCollapsed:B,isPanelExpanded:W,reevaluatePanelConstraints:ee,registerPanel:Y,registerResizeHandle:ne,resizePanel:$,startDragging:fe,stopDragging:de,unregisterPanel:Ae,panelGroupElement:y.current}),[P,S,r,k,H,F,m,B,W,ee,Y,ne,$,fe,de,Ae]),V={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return A.createElement(xy.Provider,{value:L},A.createElement(p,{...g,children:e,className:n,id:o,ref:y,style:{...V,...f},[mn.group]:"",[mn.groupDirection]:r,[mn.groupId]:m}))}const C8=A.forwardRef((t,e)=>A.createElement(E8,{...t,forwardedRef:e}));E8.displayName="PanelGroup";C8.displayName="forwardRef(PanelGroup)";function uc(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function ml(t,e,n){const r=uc(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function lQ({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){A.useEffect(()=>{if(t||n==null||r==null)return;const s=Ry(e,r);if(s==null)return;const o=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const u=s.getAttribute(mn.groupId);tt(u,`No group element found for id "${u}"`);const c=mh(u,r),f=p8(u,e,r);tt(f!==null,`No resize element found for id "${e}"`);const p=a.shiftKey?f>0?f-1:c.length-1:f+1<c.length?f+1:0;c[p].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[r,t,e,n])}function w8({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:o,onClick:a,onDragging:u,onFocus:c,onPointerDown:f,onPointerUp:p,style:g={},tabIndex:m=0,tagName:y="div",...S}){var E,C;const w=A.useRef(null),x=A.useRef({onClick:a,onDragging:u,onPointerDown:f,onPointerUp:p});A.useEffect(()=>{x.current.onClick=a,x.current.onDragging=u,x.current.onPointerDown=f,x.current.onPointerUp=p});const T=A.useContext(xy);if(T===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:R,groupId:M,registerResizeHandle:O,startDragging:I,stopDragging:P,panelGroupElement:k}=T,H=jA(s),[F,B]=A.useState("inactive"),[W,Y]=A.useState(!1),[ne,$]=A.useState(null),ee=A.useRef({state:F});Rl(()=>{ee.current.state=F}),A.useEffect(()=>{if(n)$(null);else{const L=O(H);$(()=>L)}},[n,H,O]);const fe=(E=r?.coarse)!==null&&E!==void 0?E:15,de=(C=r?.fine)!==null&&C!==void 0?C:5;A.useEffect(()=>{if(n||ne==null)return;const L=w.current;tt(L,"Element ref not attached");let V=!1;return VX(H,L,R,{coarse:fe,fine:de},(J,oe,he)=>{if(!oe){B("inactive");return}switch(J){case"down":{B("drag"),V=!1,tt(he,'Expected event to be defined for "down" action'),I(H,he);const{onDragging:ue,onPointerDown:ve}=x.current;ue?.(!0),ve?.();break}case"move":{const{state:ue}=ee.current;V=!0,ue!=="drag"&&B("hover"),tt(he,'Expected event to be defined for "move" action'),ne(he);break}case"up":{B("hover"),P();const{onClick:ue,onDragging:ve,onPointerUp:_e}=x.current;ve?.(!1),_e?.(),V||ue?.();break}}})},[fe,R,n,de,O,H,ne,I,P]),lQ({disabled:n,handleId:H,resizeHandler:ne,panelGroupElement:k});const Ae={touchAction:"none",userSelect:"none"};return A.createElement(y,{...S,children:t,className:e,id:s,onBlur:()=>{Y(!1),o?.()},onFocus:()=>{Y(!0),c?.()},ref:w,role:"separator",style:{...Ae,...g},tabIndex:m,[mn.groupDirection]:R,[mn.groupId]:M,[mn.resizeHandle]:"",[mn.resizeHandleActive]:F==="drag"?"pointer":W?"keyboard":void 0,[mn.resizeHandleEnabled]:!n,[mn.resizeHandleId]:H,[mn.resizeHandleState]:F})}w8.displayName="PanelResizeHandle";function uQ({className:t,...e}){return D.jsx(C8,{className:dn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}const Bg=s8;function K1({className:t,...e}){return D.jsx(w8,{className:dn("relative w-px shrink-0 bg-line transition-colors cursor-col-resize","after:absolute after:inset-y-0 after:left-1/2 after:w-1.5 after:-translate-x-1/2","data-[resize-handle-state=hover]:bg-line-strong","data-[resize-handle-state=drag]:bg-accent","focus-visible:outline-none focus-visible:bg-accent",t),...e})}const _8=A.createContext(null);function xxe(){return A.useContext(_8)}function Axe({nav:t,list:e,reading:n,intelligence:r,intelligenceOpen:s=!0,hasThread:o=!0,density:a="comfortable",header:u,topBar:c,overlay:f,skeleton:p,isLoading:g=!1,initialWidth:m,navOpen:y,onOpenNav:S,onCloseNav:E}){const[C,w]=MX(m),x=NX(w??0),T=x.nav,R=x.reading&&!!n,M=x.intelligence,[O,I]=A.useState(!1),P=y!==void 0,k=P?y:O,H=()=>{P||I(!0),S?.()},F=()=>{P||I(!1),E?.()},B=M&&s&&o&&!!r,W={panes:x,containerWidth:w,showNavPane:T,openNav:H,showReadingPane:R,showIntelligencePane:M};return D.jsx(_8.Provider,{value:W,children:D.jsx("div",{ref:C,className:"@container flex h-dvh w-full flex-col overflow-hidden bg-canvas font-sans text-fg",children:g&&p?p:D.jsxs(D.Fragment,{children:[c,!T&&u&&D.jsx("div",{className:"shrink-0",children:u}),D.jsxs(uQ,{direction:"horizontal",className:"min-h-0 flex-1",children:[T&&D.jsxs(D.Fragment,{children:[D.jsx(Bg,{id:"nav",order:1,defaultSize:17,minSize:12,maxSize:24,className:"min-w-0",children:t}),D.jsx(K1,{})]}),D.jsx(Bg,{id:"list",order:2,defaultSize:R?a==="compact"?36:27:83,minSize:18,maxSize:R?48:88,className:"min-w-0",children:e}),R&&D.jsxs(D.Fragment,{children:[D.jsx(K1,{}),D.jsx(Bg,{id:"reading",order:3,minSize:24,className:"min-w-0",children:n})]}),B&&D.jsxs(D.Fragment,{children:[D.jsx(K1,{}),D.jsx(Bg,{id:"intelligence",order:4,defaultSize:21,minSize:15,maxSize:32,className:"min-w-0",children:r})]})]}),!T&&D.jsx(DX,{open:k,onClose:F,title:"Folders",anchor:"left",children:t}),f]})})})}const cQ="inline-flex items-center justify-center gap-2 rounded-md font-medium whitespace-nowrap transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface disabled:opacity-50 disabled:pointer-events-none",dQ={primary:"bg-accent text-accent-fg hover:bg-accent-hover",secondary:"bg-surface text-fg border border-line hover:bg-surface-sunken hover:border-line-strong",ghost:"text-fg-muted hover:bg-surface-sunken hover:text-fg",danger:"bg-danger text-accent-fg hover:opacity-90"},fQ={sm:"h-7 px-2.5 text-xs",md:"h-9 px-3.5 text-sm"};function Gm({variant:t="primary",size:e="md",icon:n,className:r,children:s,...o}){return D.jsxs("button",{type:"button",className:dn(cQ,dQ[t],fQ[e],r),...o,children:[n,s]})}const hQ={neutral:"bg-surface-sunken text-fg-muted",accent:"bg-accent-2-soft text-accent-2",positive:"bg-surface-sunken text-positive",warning:"bg-surface-sunken text-warning",danger:"bg-danger-soft text-danger"},pQ={neutral:"bg-fg-subtle",accent:"bg-accent-2",positive:"bg-positive",warning:"bg-warning",danger:"bg-danger"};function ZM({tone:t="neutral",dot:e,className:n,children:r,...s}){return D.jsxs("span",{className:dn("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-2xs font-medium",hQ[t],n),...s,children:[e&&D.jsx("span",{className:dn("size-1.5 rounded-full",pQ[t])}),r]})}const XM=10;function gQ({section:t,Row:e,selectedThreadId:n,initialExpanded:r=!1,initialCollapsed:s=!1,onSelectThread:o}){const[a,u]=A.useState(r),[c,f]=A.useState(s),p=t.threads.length>XM,m=!a&&p?t.threads.slice(0,XM):t.threads,y=t.threads.length-m.length;return D.jsxs("div",{children:[t.label&&D.jsxs("button",{type:"button","aria-expanded":!c,onClick:()=>f(S=>!S),className:"sticky top-0 z-10 flex h-section-row w-full items-center gap-1.5 border-b border-line bg-surface-sunken px-row-inset text-left transition-colors hover:bg-surface",children:[D.jsx("span",{className:"flex-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:t.label}),D.jsx("span",{className:"text-2xs text-fg-subtle tabular-nums",children:t.threads.length}),D.jsx(zM,{className:dn("size-3 shrink-0 text-fg-subtle transition-transform duration-200",c?"rotate-0":"rotate-180")})]}),!c&&D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"divide-y divide-line",children:m.map(S=>D.jsx(e,{thread:S,active:S.id===n,onClick:()=>o?.(S.id)},S.id))}),p&&D.jsxs("button",{type:"button",onClick:()=>u(S=>!S),className:"flex w-full items-center justify-center border-b border-line px-row-inset py-1.5 text-2xs font-medium text-accent transition-colors hover:bg-surface",children:[a?"Show less":`Show ${y} more`,!a&&D.jsx(zM,{className:"ml-1 size-3"})]})]})]})}function mQ(t){return t.target!==t.currentTarget?!1:t.key==="Enter"||t.key===" "}function vQ({className:t}){return D.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:D.jsx("path",{d:"M2 4l4 4 4-4"})})}function QM({className:t}){return D.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:D.jsx("path",{d:"M3 3l6 6M9 3l-6 6"})})}function yQ({categories:t,filters:e,sources:n,sourcesNote:r,selectedCategory:s,activeFilters:o,expanded:a,onSelectCategory:u,onSelectSource:c,onToggleFilter:f,onClear:p,onExpandedChange:g,children:m}){const y=a!==void 0,[S,E]=A.useState(!1),C=y?a:S,w=A.useCallback(ne=>{y||E(ne),g?.(ne)},[y,g]),x=t[0],T=x!==void 0&&s===x.id,R=n?.[0],M=n?.find(ne=>ne.active),O=R===void 0||M?.id===R.id,I=!T||o.size>0||!O&&!!M,P=A.useCallback(()=>{R&&c?.(R.id)},[R,c]),k=A.useCallback(()=>{p(),P()},[p,P]),H=t.find(ne=>ne.id===s),F=I?D.jsxs(D.Fragment,{children:[!O&&M&&D.jsx("span",{className:"inline-flex items-center rounded-full border border-accent-2 bg-accent-2-soft px-2 py-0.5 text-2xs font-medium text-accent-2",children:M.label}),!T&&H&&D.jsx(ZM,{tone:H.tone??"neutral",children:H.label}),e.filter(ne=>o.has(ne.id)).map(ne=>D.jsx("span",{className:"inline-flex items-center rounded-full border border-accent-2 bg-accent-2-soft px-2 py-0.5 text-2xs font-medium text-accent-2",children:ne.label},ne.id))]}):D.jsx("span",{className:"text-2xs text-fg-subtle",children:"Filters"}),B=n&&n.length>1&&D.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-2 pt-2",children:[n.map(ne=>D.jsxs("button",{type:"button",onClick:()=>c?.(ne.id),className:dn("flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",ne.active?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:[ne.label,ne.count!=null&&ne.count>0&&D.jsx("span",{className:"tabular-nums opacity-70",children:ne.count})]},ne.id)),r&&D.jsx("span",{className:"ml-auto shrink-0 text-2xs text-fg-subtle",children:r})]}),W=D.jsx("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-1.5 pt-1.5",children:t.map(ne=>{const $=s===ne.id;return D.jsx("button",{type:"button",onClick:()=>u(ne.id),className:dn("shrink-0 rounded-full transition-opacity",$?"opacity-100 ring-1 ring-accent-2":"opacity-60 hover:opacity-100"),children:D.jsx(ZM,{tone:ne.tone??"neutral",children:ne.label})},ne.id)})}),Y=D.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-2 pt-1.5",children:[e.map(ne=>{const $=o.has(ne.id);return D.jsx("button",{type:"button",onClick:()=>f(ne.id),className:dn("shrink-0 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",$?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:ne.label},ne.id)}),I&&D.jsxs("button",{type:"button",onClick:k,className:"ml-auto flex items-center gap-1 px-1 text-2xs text-fg-subtle hover:text-fg-muted",children:[D.jsx(QM,{className:"size-3"}),"Clear"]})]});return D.jsxs("div",{className:"flex h-full w-full flex-col overflow-hidden",children:[D.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":C,"aria-label":C?"Collapse filters":"Expand filters",onClick:()=>w(!C),onKeyDown:ne=>{mQ(ne)&&(ne.preventDefault(),w(!C))},className:"flex h-section-row w-full shrink-0 cursor-pointer items-center gap-1.5 overflow-x-hidden border-b border-line bg-surface-sunken px-row-inset text-left hover:bg-surface",children:[F,I&&D.jsx("button",{type:"button","aria-label":"Clear filters",onClick:ne=>{ne.stopPropagation(),k()},className:"flex size-6 items-center justify-center text-fg-subtle hover:text-fg-muted",children:D.jsx(QM,{className:"size-3"})}),D.jsx(vQ,{className:dn("ml-auto size-3 shrink-0 text-fg-subtle transition-transform duration-200",C?"rotate-180":"rotate-0")})]}),C&&D.jsxs("div",{className:"shrink-0",children:[B,W,Y]}),D.jsx("div",{className:"flex-1 overflow-y-auto",children:m})]})}function bQ(t){return t.sentDate!=null?new Date(t.sentDate).toDateString()===new Date().toDateString():/^\d{1,2}:\d{2}$/.test(t.timeLabel)}const x8=[{id:"unread",label:"Unread",match:t=>!t.isRead},{id:"attachment",label:"Has attachment",match:t=>!!t.hasAttachment},{id:"contacts",label:"From contacts",match:t=>t.trust==="vip"||t.trust==="wellknown"},{id:"today",label:"Today",match:bQ}],SQ=x8.map(({id:t,label:e})=>({id:t,label:e}));function Txe({sections:t,briefCategory:e="all",selectedThreadId:n,Row:r,onSelectThread:s,onSelectBriefCategory:o,sources:a,sourcesNote:u,onSelectSource:c,defaultExpanded:f=!1}){const[p,g]=A.useState(new Set),[m,y]=A.useState(f),S=k=>{g(H=>{const F=new Set(H);return F.has(k)?F.delete(k):F.add(k),F})},E=x8.filter(k=>p.has(k.id)),C=k=>(e==="all"||k.category===e)&&E.every(H=>H.match(k)),w=e==="all",x=t.map(k=>({...k,threads:k.threads.filter(C)})).filter(k=>k.threads.length>0),T=t.flatMap(k=>k.threads).filter(C),R=PX.map(k=>({id:k.id,label:k.label,tone:k.id==="all"?"neutral":kX[k.id]})),M=SQ,O=()=>{o?.("all"),g(new Set)},I=w?x.length===0:T.length===0,P=D.jsxs(D.Fragment,{children:[w?x.map(k=>D.jsx(gQ,{section:k,Row:r,selectedThreadId:n,onSelectThread:s},k.id)):D.jsx("div",{className:"divide-y divide-line",children:T.map(k=>D.jsx(r,{thread:k,active:k.id===n,onClick:()=>s?.(k.id)},k.id))}),I&&D.jsx("div",{className:"px-row-inset py-6 text-center text-2xs text-fg-subtle",children:"No threads match these filters."})]});return D.jsx(yQ,{categories:R,filters:M,sources:a,sourcesNote:u,selectedCategory:e,activeFilters:p,expanded:m,onExpandedChange:y,onSelectCategory:k=>o?.(k),onSelectSource:c,onToggleFilter:k=>S(k),onClear:O,children:P})}const EQ={default:dn("flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken px-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors"),inline:"flex items-center gap-2 bg-transparent text-sm"};function Y1({icon:t,className:e,variant:n="default",ref:r,...s}){return D.jsxs("div",{className:dn(EQ[n],e),children:[t&&D.jsx("span",{className:"text-fg-subtle shrink-0",children:t}),D.jsx("input",{ref:r,className:"min-w-0 flex-1 bg-transparent text-fg placeholder:text-fg-subtle outline-none",...s})]})}function JM(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function CQ(t){if(Array.isArray(t))return t}function wQ(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,o,a,u=[],c=!0,f=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(p){f=!0,s=p}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw s}}return u}}function _Q(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
13
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xQ(t,e){return CQ(t)||wQ(t,e)||AQ(t,e)||_Q()}function AQ(t,e){if(t){if(typeof t=="string")return JM(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?JM(t,e):void 0}}const A8=Object.entries,eP=Object.setPrototypeOf,TQ=Object.isFrozen,RQ=Object.getPrototypeOf,IQ=Object.getOwnPropertyDescriptor;let tr=Object.freeze,rr=Object.seal,cc=Object.create,T8=typeof Reflect<"u"&&Reflect,F_=T8.apply,z_=T8.construct;tr||(tr=function(e){return e});rr||(rr=function(e){return e});F_||(F_=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return e.apply(n,s)});z_||(z_=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new e(...r)});const Yu=Tn(Array.prototype.forEach),OQ=Tn(Array.prototype.lastIndexOf),tP=Tn(Array.prototype.pop),Zu=Tn(Array.prototype.push),NQ=Tn(Array.prototype.splice),Ca=Array.isArray,Hf=Tn(String.prototype.toLowerCase),Z1=Tn(String.prototype.toString),nP=Tn(String.prototype.match),bf=Tn(String.prototype.replace),rP=Tn(String.prototype.indexOf),MQ=Tn(String.prototype.trim),PQ=Tn(Number.prototype.toString),kQ=Tn(Boolean.prototype.toString),sP=typeof BigInt>"u"?null:Tn(BigInt.prototype.toString),oP=typeof Symbol>"u"?null:Tn(Symbol.prototype.toString),zn=Tn(Object.prototype.hasOwnProperty),Sf=Tn(Object.prototype.toString),Un=Tn(RegExp.prototype.test),vl=DQ(TypeError);function Tn(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return F_(t,e,r)}}function DQ(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return z_(t,n)}}function mt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hf;if(eP&&eP(t,null),!Ca(e))return t;let r=e.length;for(;r--;){let s=e[r];if(typeof s=="string"){const o=n(s);o!==s&&(TQ(e)||(e[r]=o),s=o)}t[s]=!0}return t}function LQ(t){for(let e=0;e<t.length;e++)zn(t,e)||(t[e]=null);return t}function br(t){const e=cc(null);for(const r of A8(t)){var n=xQ(r,2);const s=n[0],o=n[1];zn(t,s)&&(Ca(o)?e[s]=LQ(o):o&&typeof o=="object"&&o.constructor===Object?e[s]=br(o):e[s]=o)}return e}function UQ(t){switch(typeof t){case"string":return t;case"number":return PQ(t);case"boolean":return kQ(t);case"bigint":return sP?sP(t):"0";case"symbol":return oP?oP(t):"Symbol()";case"undefined":return Sf(t);case"function":case"object":{if(t===null)return Sf(t);const e=t,n=mo(e,"toString");if(typeof n=="function"){const r=n(e);return typeof r=="string"?r:Sf(r)}return Sf(t)}default:return Sf(t)}}function mo(t,e){for(;t!==null;){const r=IQ(t,e);if(r){if(r.get)return Tn(r.get);if(typeof r.value=="function")return Tn(r.value)}t=RQ(t)}function n(){return null}return n}function FQ(t){try{return Un(t,""),!0}catch{return!1}}const iP=tr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),X1=tr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Q1=tr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),zQ=tr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),J1=tr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),BQ=tr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),aP=tr(["#text"]),lP=tr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),eS=tr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),uP=tr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jg=tr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),jQ=rr(/{{[\w\W]*|^[\w\W]*}}/g),HQ=rr(/<%[\w\W]*|^[\w\W]*%>/g),$Q=rr(/\${[\w\W]*/g),qQ=rr(/^data-[\-\w.\u00B7-\uFFFF]+$/),WQ=rr(/^aria-[\-\w]+$/),cP=rr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),GQ=rr(/^(?:\w+script|data):/i),VQ=rr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),KQ=rr(/^html$/i),YQ=rr(/^[a-z][.\w]*(-[.\w]+)+$/i),dP=rr(/<[/\w!]/g),fP=rr(/<[/\w]/g),ZQ=rr(/<\/no(script|embed|frames)/i),XQ=rr(/\/>/i),ns={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},QQ=function(){return typeof window>"u"?null:window},JQ=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},hP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},fa=function(e,n,r,s){return zn(e,n)&&Ca(e[n])?mt(s.base?br(s.base):{},e[n],s.transform):r};function R8(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:QQ();const e=pe=>R8(pe);if(e.version="3.4.12",e.removed=[],!t||!t.document||t.document.nodeType!==ns.document||!t.Element)return e.isSupported=!1,e;let n=t.document;const r=n,s=r.currentScript;t.DocumentFragment;const o=t.HTMLTemplateElement,a=t.Node,u=t.Element,c=t.NodeFilter,f=t.NamedNodeMap;f===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const p=t.DOMParser,g=t.trustedTypes,m=u.prototype,y=mo(m,"cloneNode"),S=mo(m,"remove"),E=mo(m,"nextSibling"),C=mo(m,"childNodes"),w=mo(m,"parentNode"),x=mo(m,"shadowRoot"),T=mo(m,"attributes"),R=a&&a.prototype?mo(a.prototype,"nodeType"):null,M=a&&a.prototype?mo(a.prototype,"nodeName"):null;if(typeof o=="function"){const pe=n.createElement("template");pe.content&&pe.content.ownerDocument&&(n=pe.content.ownerDocument)}let O,I="",P,k=!1,H=0;const F=function(){if(H>0)throw vl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},B=function(U){F(),H++;try{return O.createHTML(U)}finally{H--}},W=function(U){F(),H++;try{return O.createScriptURL(U)}finally{H--}},Y=function(){return k||(P=JQ(g,s),k=!0),P},ne=n,$=ne.implementation,ee=ne.createNodeIterator,fe=ne.createDocumentFragment,de=ne.getElementsByTagName,Ae=r.importNode;let L=hP();e.isSupported=typeof A8=="function"&&typeof w=="function"&&$&&$.createHTMLDocument!==void 0;const V=jQ,K=HQ,J=$Q,oe=qQ,he=WQ,ue=GQ,ve=VQ,_e=YQ;let Xe=cP,Ee=null;const pt=mt({},[...iP,...X1,...Q1,...J1,...aP]);let Ce=null;const ze=mt({},[...lP,...eS,...uP,...jg]);let Be=Object.seal(cc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),He=null,pr=null;const Et=Object.seal(cc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Gr=!0,Wn=!0,xr=!1,to=!0,Ar=!1,Gt=!0,gt=!1,vn=!1,Tr=null,no=null,hd=!1,ko=!1,cu=!1,du=!1,Mi=!0,ir=!1;const Ps="user-content-";let Gn=!0,pd=!1,Pi={},hs=null;const ki=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Va=null;const Ka=mt({},["audio","video","img","source","image","track"]);let ks=null;const Ya=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ro="http://www.w3.org/1998/Math/MathML",fu="http://www.w3.org/2000/svg",Vr="http://www.w3.org/1999/xhtml";let so=Vr,Do=!1,gd=null;const pp=mt({},[ro,fu,Vr],Z1),md=tr(["mi","mo","mn","ms","mtext"]);let hu=mt({},md);const pu=tr(["annotation-xml"]);let Za=mt({},pu);const gp=mt({},["title","style","font","a","script"]);let Di=null;const oo=["application/xhtml+xml","text/html"],In="text/html";let nt=null,Kr=null;const vd=n.createElement("form"),mp=function(U){return U instanceof RegExp||U instanceof Function},yd=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Kr&&Kr===U)return;(!U||typeof U!="object")&&(U={}),U=br(U),Di=oo.indexOf(U.PARSER_MEDIA_TYPE)===-1?In:U.PARSER_MEDIA_TYPE,nt=Di==="application/xhtml+xml"?Z1:Hf,Ee=fa(U,"ALLOWED_TAGS",pt,{transform:nt}),Ce=fa(U,"ALLOWED_ATTR",ze,{transform:nt}),gd=fa(U,"ALLOWED_NAMESPACES",pp,{transform:Z1}),ks=fa(U,"ADD_URI_SAFE_ATTR",Ya,{transform:nt,base:Ya}),Va=fa(U,"ADD_DATA_URI_TAGS",Ka,{transform:nt,base:Ka}),hs=fa(U,"FORBID_CONTENTS",ki,{transform:nt}),He=fa(U,"FORBID_TAGS",br({}),{transform:nt}),pr=fa(U,"FORBID_ATTR",br({}),{transform:nt}),Pi=zn(U,"USE_PROFILES")?U.USE_PROFILES&&typeof U.USE_PROFILES=="object"?br(U.USE_PROFILES):U.USE_PROFILES:!1,Gr=U.ALLOW_ARIA_ATTR!==!1,Wn=U.ALLOW_DATA_ATTR!==!1,xr=U.ALLOW_UNKNOWN_PROTOCOLS||!1,to=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ar=U.SAFE_FOR_TEMPLATES||!1,Gt=U.SAFE_FOR_XML!==!1,gt=U.WHOLE_DOCUMENT||!1,ko=U.RETURN_DOM||!1,cu=U.RETURN_DOM_FRAGMENT||!1,du=U.RETURN_TRUSTED_TYPE||!1,hd=U.FORCE_BODY||!1,Mi=U.SANITIZE_DOM!==!1,ir=U.SANITIZE_NAMED_PROPS||!1,Gn=U.KEEP_CONTENT!==!1,pd=U.IN_PLACE||!1,Xe=FQ(U.ALLOWED_URI_REGEXP)?U.ALLOWED_URI_REGEXP:cP,so=typeof U.NAMESPACE=="string"?U.NAMESPACE:Vr,hu=zn(U,"MATHML_TEXT_INTEGRATION_POINTS")&&U.MATHML_TEXT_INTEGRATION_POINTS&&typeof U.MATHML_TEXT_INTEGRATION_POINTS=="object"?br(U.MATHML_TEXT_INTEGRATION_POINTS):mt({},md),Za=zn(U,"HTML_INTEGRATION_POINTS")&&U.HTML_INTEGRATION_POINTS&&typeof U.HTML_INTEGRATION_POINTS=="object"?br(U.HTML_INTEGRATION_POINTS):mt({},pu);const Z=zn(U,"CUSTOM_ELEMENT_HANDLING")&&U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING=="object"?br(U.CUSTOM_ELEMENT_HANDLING):cc(null);if(Be=cc(null),zn(Z,"tagNameCheck")&&mp(Z.tagNameCheck)&&(Be.tagNameCheck=Z.tagNameCheck),zn(Z,"attributeNameCheck")&&mp(Z.attributeNameCheck)&&(Be.attributeNameCheck=Z.attributeNameCheck),zn(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(Be.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),rr(Be),Ar&&(Wn=!1),cu&&(ko=!0),Pi&&(Ee=mt({},aP),Ce=cc(null),Pi.html===!0&&(mt(Ee,iP),mt(Ce,lP)),Pi.svg===!0&&(mt(Ee,X1),mt(Ce,eS),mt(Ce,jg)),Pi.svgFilters===!0&&(mt(Ee,Q1),mt(Ce,eS),mt(Ce,jg)),Pi.mathMl===!0&&(mt(Ee,J1),mt(Ce,uP),mt(Ce,jg))),Et.tagCheck=null,Et.attributeCheck=null,zn(U,"ADD_TAGS")&&(typeof U.ADD_TAGS=="function"?Et.tagCheck=U.ADD_TAGS:Ca(U.ADD_TAGS)&&(Ee===pt&&(Ee=br(Ee)),mt(Ee,U.ADD_TAGS,nt))),zn(U,"ADD_ATTR")&&(typeof U.ADD_ATTR=="function"?Et.attributeCheck=U.ADD_ATTR:Ca(U.ADD_ATTR)&&(Ce===ze&&(Ce=br(Ce)),mt(Ce,U.ADD_ATTR,nt))),zn(U,"ADD_URI_SAFE_ATTR")&&Ca(U.ADD_URI_SAFE_ATTR)&&mt(ks,U.ADD_URI_SAFE_ATTR,nt),zn(U,"FORBID_CONTENTS")&&Ca(U.FORBID_CONTENTS)&&(hs===ki&&(hs=br(hs)),mt(hs,U.FORBID_CONTENTS,nt)),zn(U,"ADD_FORBID_CONTENTS")&&Ca(U.ADD_FORBID_CONTENTS)&&(hs===ki&&(hs=br(hs)),mt(hs,U.ADD_FORBID_CONTENTS,nt)),Gn&&(Ee["#text"]=!0),gt&&mt(Ee,["html","head","body"]),Ee.table&&(mt(Ee,["tbody"]),delete He.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw vl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw vl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ce=O;O=U.TRUSTED_TYPES_POLICY;try{I=B("")}catch(Te){throw O=ce,Te}}else U.TRUSTED_TYPES_POLICY===null?(O=void 0,I=""):(O===void 0&&(O=Y()),O&&typeof I=="string"&&(I=B("")));tr&&tr(U),Kr=U},bd=mt({},[...X1,...Q1,...zQ]),Li=mt({},[...J1,...BQ]),Sd=function(U,Z,ce){return Z.namespaceURI===Vr?U==="svg":Z.namespaceURI===ro?U==="svg"&&(ce==="annotation-xml"||hu[ce]):!!bd[U]},Ui=function(U,Z,ce){return Z.namespaceURI===Vr?U==="math":Z.namespaceURI===fu?U==="math"&&Za[ce]:!!Li[U]},Fi=function(U,Z,ce){return Z.namespaceURI===fu&&!Za[ce]||Z.namespaceURI===ro&&!hu[ce]?!1:!Li[U]&&(gp[U]||!bd[U])},Xa=function(U){let Z=w(U);(!Z||!Z.tagName)&&(Z={namespaceURI:so,tagName:"template"});const ce=Hf(U.tagName),Te=Hf(Z.tagName);return gd[U.namespaceURI]?U.namespaceURI===fu?Sd(ce,Z,Te):U.namespaceURI===ro?Ui(ce,Z,Te):U.namespaceURI===Vr?Fi(ce,Z,Te):!!(Di==="application/xhtml+xml"&&gd[U.namespaceURI]):!1},gr=function(U){Zu(e.removed,{element:U});try{w(U).removeChild(U)}catch{if(S(U),!w(U))throw vl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},an=function(U){Ds(U);const Z=C(U);if(Z){const Te=[];Yu(Z,ke=>{Zu(Te,ke)}),Yu(Te,ke=>{try{S(ke)}catch{}})}const ce=T(U);if(ce)for(let Te=ce.length-1;Te>=0;--Te){const ke=ce[Te],Ue=ke&&ke.name;if(typeof Ue=="string")try{U.removeAttribute(Ue)}catch{}}},io=function(U,Z){try{Zu(e.removed,{attribute:Z.getAttributeNode(U),from:Z})}catch{Zu(e.removed,{attribute:null,from:Z})}if(Z.removeAttribute(U),U==="is")if(ko||cu)try{gr(Z)}catch{}else try{Z.setAttribute(U,"")}catch{}},vp=function(U){const Z=T(U);if(Z)for(let ce=Z.length-1;ce>=0;--ce){const Te=Z[ce],ke=Te&&Te.name;if(!(typeof ke!="string"||Ce[nt(ke)]))try{U.removeAttribute(ke)}catch{}}},Ds=function(U){const Z=[U];for(;Z.length>0;){const ce=Z.pop();(R?R(ce):ce.nodeType)===ns.element&&vp(ce);const ke=C(ce);if(ke)for(let Ue=ke.length-1;Ue>=0;--Ue)Z.push(ke[Ue])}},zi=function(U){if(!Gt)return;const Z=[U];for(;Z.length>0;){const ce=Z.pop(),Te=R?R(ce):ce.nodeType;if(Te===ns.processingInstruction||Te===ns.comment&&Un(fP,ce.data)){try{S(ce)}catch{}continue}if(Te===ns.element){const Ue=ce,en=nt(M?M(ce):ce.nodeName);try{Ue.hasAttribute&&Ue.hasAttribute("patchsrc")&&Ue.removeAttribute("patchsrc"),Ue.hasAttribute&&Ue.hasAttribute("for")&&en!=="label"&&en!=="output"&&Ue.removeAttribute("for")}catch{}}const ke=C(ce);if(ke)for(let Ue=ke.length-1;Ue>=0;--Ue)Z.push(ke[Ue])}},yp=function(U){let Z=null,ce=null;if(hd)U="<remove></remove>"+U;else{const Ue=nP(U,/^[\r\n\t ]+/);ce=Ue&&Ue[0]}Di==="application/xhtml+xml"&&so===Vr&&(U='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+U+"</body></html>");const Te=O?B(U):U;if(so===Vr)try{Z=new p().parseFromString(Te,Di)}catch{}if(!Z||!Z.documentElement){Z=$.createDocument(so,"template",null);try{Z.documentElement.innerHTML=Do?I:Te}catch{}}const ke=Z.body||Z.documentElement;return U&&ce&&ke.insertBefore(n.createTextNode(ce),ke.childNodes[0]||null),so===Vr?de.call(Z,gt?"html":"body")[0]:gt?Z.documentElement:ke},Ed=function(U){return ee.call(U.ownerDocument||U,U,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Qa=function(U){return U=bf(U,V," "),U=bf(U,K," "),U=bf(U,J," "),U},Cd=function(U){var Z;U.normalize();const ce=ee.call(U.ownerDocument||U,U,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Te=ce.nextNode();for(;Te;)Te.data=Qa(Te.data),Te=ce.nextNode();const ke=(Z=U.querySelectorAll)===null||Z===void 0?void 0:Z.call(U,"template");ke&&Yu(ke,Ue=>{Ls(Ue.content)&&Cd(Ue.content)})},Lo=function(U){const Z=M?M(U):null;return typeof Z!="string"||nt(Z)!=="form"?!1:typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||U.attributes!==T(U)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function"||U.nodeType!==R(U)||U.childNodes!==C(U)},Ls=function(U){if(!R||typeof U!="object"||U===null)return!1;try{return R(U)===ns.documentFragment}catch{return!1}},mr=function(U){if(!R||typeof U!="object"||U===null)return!1;try{return typeof R(U)=="number"}catch{return!1}};function ln(pe,U,Z){pe.length!==0&&Yu(pe,ce=>{ce.call(e,U,Z,Kr)})}const bp=function(U,Z){return!!(Gt&&U.hasChildNodes()&&!mr(U.firstElementChild)&&Un(dP,U.textContent)&&Un(dP,U.innerHTML)||Gt&&U.namespaceURI===Vr&&Z==="style"&&mr(U.firstElementChild)||U.nodeType===ns.processingInstruction||Gt&&U.nodeType===ns.comment&&Un(fP,U.data))},Tb=function(U,Z){if(!He[Z]&&Sp(Z)&&(Be.tagNameCheck instanceof RegExp&&Un(Be.tagNameCheck,Z)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(Z)))return!1;if(Gn&&!hs[Z]){const ce=w(U),Te=C(U);if(Te&&ce){const ke=Te.length;for(let Ue=ke-1;Ue>=0;--Ue){const en=pd?Te[Ue]:y(Te[Ue],!0);ce.insertBefore(en,E(U))}}}return gr(U),!0},gu=function(U,Z){if(ln(L.beforeSanitizeElements,U,null),U!==Z&&w(U)===null)return!0;if(Lo(U))return gr(U),!0;const ce=nt(M?M(U):U.nodeName);if(ln(L.uponSanitizeElement,U,{tagName:ce,allowedTags:Ee}),U!==Z&&w(U)===null)return!0;if(bp(U,ce))return gr(U),!0;if(He[ce]||!(Et.tagCheck instanceof Function&&Et.tagCheck(ce))&&!Ee[ce]){const ke=Tb(U,ce);return ke===!1&&ln(L.afterSanitizeElements,U,null),ke}if((R?R(U):U.nodeType)===ns.element&&!Xa(U)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&Un(ZQ,U.innerHTML))return gr(U),!0;if(Ar&&U.nodeType===ns.text){const ke=Qa(U.textContent);U.textContent!==ke&&(Zu(e.removed,{element:U.cloneNode()}),U.textContent=ke)}return ln(L.afterSanitizeElements,U,null),!1},wd=function(U,Z,ce){if(pr[Z]||Gt&&Z==="patchsrc"||Gt&&Z==="for"&&U!=="label"&&U!=="output"||Mi&&(Z==="id"||Z==="name")&&(ce in n||ce in vd))return!1;const Te=Ce[Z]||Et.attributeCheck instanceof Function&&Et.attributeCheck(Z,U);if(!(Wn&&Un(oe,Z))){if(!(Gr&&Un(he,Z))){if(Te){if(!ks[Z]){if(!Un(Xe,bf(ce,ve,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&U!=="script"&&rP(ce,"data:")===0&&Va[U])){if(!(xr&&!Un(ue,bf(ce,ve,"")))){if(ce)return!1}}}}}else if(!(Sp(U)&&(Be.tagNameCheck instanceof RegExp&&Un(Be.tagNameCheck,U)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(U))&&(Be.attributeNameCheck instanceof RegExp&&Un(Be.attributeNameCheck,Z)||Be.attributeNameCheck instanceof Function&&Be.attributeNameCheck(Z,U))||Z==="is"&&Be.allowCustomizedBuiltInElements&&(Be.tagNameCheck instanceof RegExp&&Un(Be.tagNameCheck,ce)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(ce))))return!1}}return!0},mu=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Sp=function(U){return!mu[Hf(U)]&&Un(_e,U)},Rr=function(U,Z,ce,Te){if(O&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ce)switch(g.getAttributeType(U,Z)){case"TrustedHTML":return B(Te);case"TrustedScriptURL":return W(Te)}return Te},_d=function(U,Z,ce,Te){try{ce?U.setAttributeNS(ce,Z,Te):U.setAttribute(Z,Te),Lo(U)?gr(U):tP(e.removed)}catch{io(Z,U)}},xd=function(U){ln(L.beforeSanitizeAttributes,U,null);const Z=U.attributes;if(!Z||Lo(U))return;const ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce,forceKeepAttr:void 0};let Te=Z.length;const ke=nt(U.nodeName);for(;Te--;){const Ue=Z[Te],en=Ue.name,Dn=Ue.namespaceURI,ar=Ue.value,tn=nt(en),vr=ar;let On=en==="value"?vr:MQ(vr);if(ce.attrName=tn,ce.attrValue=On,ce.keepAttr=!0,ce.forceKeepAttr=void 0,ln(L.uponSanitizeAttribute,U,ce),On=ce.attrValue,ir&&(tn==="id"||tn==="name")&&rP(On,Ps)!==0&&(io(en,U),On=Ps+On),Gt&&Un(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,On)){io(en,U);continue}if(tn==="attributename"&&nP(On,"href")){io(en,U);continue}if(!ce.forceKeepAttr){if(!ce.keepAttr){io(en,U);continue}if(!to&&Un(XQ,On)){io(en,U);continue}if(Ar&&(On=Qa(On)),!wd(ke,tn,On)){io(en,U);continue}On=Rr(ke,tn,Dn,On),On!==vr&&_d(U,en,Dn,On)}}ln(L.afterSanitizeAttributes,U,null)},Bi=function(U){let Z=null;const ce=Ed(U);for(ln(L.beforeSanitizeShadowDOM,U,null);Z=ce.nextNode();)if(ln(L.uponSanitizeShadowNode,Z,null),gu(Z,U),xd(Z),Ls(Z.content)&&Bi(Z.content),(R?R(Z):Z.nodeType)===ns.element){const ke=x(Z);Ls(ke)&&(ao(ke),Bi(ke))}ln(L.afterSanitizeShadowDOM,U,null)},ao=function(U){const Z=[{node:U,shadow:null}];for(;Z.length>0;){const ce=Z.pop();if(ce.shadow){Bi(ce.shadow);continue}const Te=ce.node,Ue=(R?R(Te):Te.nodeType)===ns.element,en=C(Te);if(en)for(let Dn=en.length-1;Dn>=0;--Dn)Z.push({node:en[Dn],shadow:null});if(Ue){const Dn=M?M(Te):null;if(typeof Dn=="string"&&nt(Dn)==="template"){const ar=Te.content;Ls(ar)&&Z.push({node:ar,shadow:null})}}if(Ue){const Dn=x(Te);Ls(Dn)&&Z.push({node:null,shadow:Dn},{node:Dn,shadow:null})}}};return e.sanitize=function(pe){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,ce=null,Te=null,ke=null;if(Do=!pe,Do&&(pe="<!-->"),typeof pe!="string"&&!mr(pe)&&(pe=UQ(pe),typeof pe!="string"))throw vl("dirty is not a string, aborting");if(!e.isSupported)return pe;vn?(Ee=Tr,Ce=no):yd(U),(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&(Ee=br(Ee)),L.uponSanitizeAttribute.length>0&&(Ce=br(Ce)),e.removed=[];const Ue=pd&&typeof pe!="string"&&mr(pe);if(Ue){zi(pe);const tn=M?M(pe):pe.nodeName;if(typeof tn=="string"){const vr=nt(tn);if(!Ee[vr]||He[vr])throw an(pe),vl("root node is forbidden and cannot be sanitized in-place")}if(Lo(pe))throw an(pe),vl("root node is clobbered and cannot be sanitized in-place");try{ao(pe)}catch(vr){throw an(pe),vr}}else if(mr(pe))Z=yp("<!---->"),ce=Z.ownerDocument.importNode(pe,!0),ce.nodeType===ns.element&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?Z=ce:Z.appendChild(ce),ao(ce);else{if(!ko&&!Ar&&!gt&&pe.indexOf("<")===-1)return O&&du?B(pe):pe;if(Z=yp(pe),!Z)return ko?null:du?I:""}Z&&hd&&gr(Z.firstChild);const en=Ue?pe:Z,Dn=Ed(en);try{for(;Te=Dn.nextNode();)gu(Te,en),xd(Te),Ls(Te.content)&&Bi(Te.content)}catch(tn){throw Ue&&(an(pe),Yu(e.removed,vr=>{vr.element&&Ds(vr.element)})),tn}if(Ue)return Yu(e.removed,tn=>{tn.element&&Ds(tn.element)}),Ar&&Cd(pe),pe;if(ko){if(Ar&&Cd(Z),cu)for(ke=fe.call(Z.ownerDocument);Z.firstChild;)ke.appendChild(Z.firstChild);else ke=Z;return(Ce.shadowroot||Ce.shadowrootmode)&&(ke=Ae.call(r,ke,!0)),ke}let ar=gt?Z.outerHTML:Z.innerHTML;return gt&&Ee["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&Un(KQ,Z.ownerDocument.doctype.name)&&(ar="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
|
|
14
|
-
`+ar),Ar&&(ar=Qa(ar)),O&&du?B(ar):ar},e.setConfig=function(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yd(pe),vn=!0,Tr=Ee,no=Ce},e.clearConfig=function(){Kr=null,vn=!1,Tr=null,no=null,O=P,I=""},e.isValidAttribute=function(pe,U,Z){Kr||yd({});const ce=nt(pe),Te=nt(U);return wd(ce,Te,Z)},e.addHook=function(pe,U){typeof U=="function"&&zn(L,pe)&&Zu(L[pe],U)},e.removeHook=function(pe,U){if(zn(L,pe)){if(U!==void 0){const Z=
|
|
12
|
+
`,recoverySuggestion:"Make sure a successful call to signIn is made before calling confirmSignInand that the session has not expired."});try{const{Session:f,ChallengeName:p,AuthenticationResult:g,ChallengeParameters:m}=await ZV(r,s,o,e,u,Hr,c,n);return Xl({signInSession:f,username:r,challengeName:p,signInDetails:a}),g?(await xi({username:r,...g,NewDeviceMetadata:await Ql({userPoolId:u.userPoolId,userPoolEndpoint:u.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:a}),Qs(),await Ga(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):eu({challengeName:p,challengeParameters:m})}catch(f){Is(f);const p=od(f.name);if(p)return p;throw f}}const CK=t=>Rn(jn,Bn("GetUser"),or(),{...Hn,...t}),wK=t=>Rn(jn,Bn("VerifyUserAttribute"),or(),{...Hn,...t});async function _K(t){const e=Ht.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{confirmationCode:s,userAttributeKey:o}=t;fn(!!s,Ge.EmptyConfirmUserAttributeCode);const{tokens:a}=await vy({forceRefresh:!1});ed(a),await wK({endpointResolver:bt({endpointOverride:n})})({region:yt(r),userAgentValue:Nt(Ve.ConfirmUserAttribute)},{AccessToken:a.accessToken.toString(),AttributeName:o,Code:s})}new nr("AuthError");const xK={oauthSignInError:{message:Fn.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:Fn.DEFAULT_MSG},missingAuthConfig:{message:Fn.DEFAULT_MSG},emptyUsername:{message:Fn.EMPTY_USERNAME},invalidUsername:{message:Fn.INVALID_USERNAME},emptyPassword:{message:Fn.EMPTY_PASSWORD},emptyCode:{message:Fn.EMPTY_CODE},signUpError:{message:Fn.SIGN_UP_ERROR},noMFA:{message:Fn.NO_MFA},invalidMFA:{message:Fn.INVALID_MFA},emptyChallengeResponse:{message:Fn.EMPTY_CHALLENGE},noUserSession:{message:Fn.NO_USER_SESSION},deviceConfig:{message:Fn.DEVICE_CONFIG},networkError:{message:Fn.NETWORK_ERROR},autoSignInError:{message:Fn.AUTOSIGNIN_ERROR},default:{message:Fn.DEFAULT_MSG}},ka=(t,e)=>new Le({message:t??"An error has occurred during the oauth process.",name:To.OAuthSignInError,recoverySuggestion:xK.oauthSignInError.log});var N_;(function(t){t.NoConfig="noConfig",t.MissingAuthConfig="missingAuthConfig",t.EmptyUsername="emptyUsername",t.InvalidUsername="invalidUsername",t.EmptyPassword="emptyPassword",t.EmptyCode="emptyCode",t.SignUpError="signUpError",t.NoMFA="noMFA",t.InvalidMFA="invalidMFA",t.EmptyChallengeResponse="emptyChallengeResponse",t.NoUserSession="noUserSession",t.Default="default",t.DeviceConfig="deviceConfig",t.NetworkError="networkError",t.AutoSignInError="autoSignInError",t.OAuthSignInError="oauthSignInError"})(N_||(N_={}));const AK="`signInWithRedirect` has been canceled.",TK="An error occurred while validating the state.",RK="Try to initiate an OAuth flow from Amplify",T6=async t=>{const e=await Ur.loadOAuthState(),n=t===e?e:void 0;if(!n)throw new Le({name:N_.OAuthSignInError,message:t===null?AK:TK,recoverySuggestion:t===null?void 0:RK});return n},R6=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,responseType:s,domain:o,preferPrivateSession:a})=>{const u=new Wa(t),c=u.searchParams.get("error"),f=u.searchParams.get("error_description");if(c)throw ka(f??c);return s==="code"?IK({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:o,preferPrivateSession:a}):OK({currentUrl:t,redirectUri:r,preferPrivateSession:a})},IK=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:s,preferPrivateSession:o})=>{const a=new Wa(t),u=a.searchParams.get("code"),c=a.searchParams.get("state");if(!u||!c)throw ka("User cancelled OAuth flow.");const f=await T6(c),p="https://"+s+"/oauth2/token",g=await Ur.loadPKCE(),m={grant_type:"authorization_code",code:u,client_id:n,redirect_uri:r,...g?{code_verifier:g}:{}},y=Object.entries(m).map(([O,I])=>`${encodeURIComponent(O)}=${encodeURIComponent(I)}`).join("&"),{access_token:S,refresh_token:E,id_token:C,error:w,error_message:x,token_type:T,expires_in:R}=await(await fetch(p,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[P$]:e},body:y})).json();if(w)throw ka(x??w);const M=(S&&gi(S).payload.username)??"username";return await xi({username:M,AccessToken:S,IdToken:C,RefreshToken:E}),I6({redirectUri:r,state:f,preferPrivateSession:o})},OK=async({currentUrl:t,redirectUri:e,preferPrivateSession:n})=>{const r=new Wa(t),{id_token:s,access_token:o,state:a,token_type:u,expires_in:c,error_description:f,error:p}=(r.hash??"#").substring(1).split("&").map(y=>y.split("=")).reduce((y,[S,E])=>({...y,[S]:E}),{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0});if(p)throw ka(f??p);if(!o)throw ka("No access token returned from OAuth flow.");const g=await T6(a),m=(o&&gi(o).payload.username)??"username";return await xi({username:m,AccessToken:o,IdToken:s}),I6({redirectUri:e,state:g,preferPrivateSession:n})},I6=async({redirectUri:t,state:e,preferPrivateSession:n})=>{await Hr.setOAuthMetadata({oauthSignIn:!0}),await Ur.clearOAuthData(),await Ur.storeOAuthSignIn(!0,n),c6(),PK(t),NK(e)&&Ao.dispatch("auth",{event:"customOAuthState",data:OW(MK(e))},"Auth",xo),Ao.dispatch("auth",{event:"signInWithRedirect"},"Auth",xo),await Ga()},NK=t=>/-/.test(t),MK=t=>t.split("-").splice(1).join("-"),PK=t=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",t)};function UA(t,e){{const n=t?.find(kK)??t?.find(DK),r=t?.find(UK)??t?.find(LK);if(n)return n;throw r?WW:$W}}const kK=t=>t.startsWith(String(window.location.origin+(window.location.pathname||"/"))),DK=t=>t.includes(String(window.location.hostname)),LK=t=>t.startsWith("http://"),UK=t=>t.startsWith("https://"),FA=async t=>{c6(),await Ur.clearOAuthInflightData(),Ao.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:t}},"Auth",xo)},FK=async t=>{try{lt(t),hy(t),Ur.setAuthConfig(t)}catch{return}if(await Ur.loadOAuthInFlight())try{const e=window.location.href,{loginWith:n,userPoolClientId:r}=t,{domain:s,redirectSignIn:o,responseType:a}=n.oauth,u=UA(o);await R6({currentUrl:e,clientId:r,domain:s,redirectUri:u,responseType:a,userAgentValue:Nt(Ve.SignInWithRedirect)})}catch(e){await FA(e)}};my()&&Ht[k5](FK);const zK={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},O6=async t=>{window?.location&&(window.location.href=t.replace("http://","https://"))},_M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",BK=t=>{const e=new Uint8Array(t);EA().getRandomValues(e);let n="",r;for(const s of e)n+=_M.charAt(s%_M.length);return{value:n,method:"S256",toCodeChallenge(){return r||(r=jK(n),r)}}};function jK(t){const e=new Ul;return e.update(t),HK(Mc.convert(e.digestSync(),{urlSafe:!0}))}function HK(t){return t.replace(/=/g,"")}const $K=()=>IW(32),qK=t=>{async function e(n){if(n.persisted&&await t.loadOAuthInFlight()){const s=ka("User cancelled OAuth flow.");await FA(s)}window.removeEventListener("pageshow",e)}window.addEventListener("pageshow",e)};async function N6(t){const e=Ht.getConfig().Auth?.Cognito;lt(e),hy(e),Ur.setAuthConfig(e),t?.options?.prompt||await b6();let n="COGNITO",r;return typeof t?.provider=="string"?n=zK[t.provider]:t?.provider?.custom?n=t.provider.custom:t?.provider?.idpIdentifier&&({idpIdentifier:r}=t.provider),WK({oauthConfig:e.loginWith.oauth,clientId:e.userPoolClientId,provider:n,idpIdentifier:r,customState:t?.customState,preferPrivateSession:t?.options?.preferPrivateSession,options:{loginHint:t?.options?.loginHint,lang:t?.options?.lang,nonce:t?.options?.nonce,prompt:t?.options?.prompt},authSessionOpener:t?.options?.authSessionOpener})}const WK=async({oauthConfig:t,provider:e,idpIdentifier:n,clientId:r,customState:s,preferPrivateSession:o,options:a,authSessionOpener:u})=>{const{domain:c,redirectSignIn:f,responseType:p,scopes:g}=t,{loginHint:m,lang:y,nonce:S,prompt:E}=a??{},C=$K(),w=u||O6,x=s?`${C}-${NW(s)}`:C,{value:T,method:R,toCodeChallenge:M}=BK(128),O=UA(t.redirectSignIn);my()&&Ur.storeOAuthInFlight(!0),Ur.storeOAuthState(x),Ur.storePKCE(T);const I=new URLSearchParams;I.append("redirect_uri",O),I.append("response_type",p),I.append("client_id",r),n?I.append("idp_identifier",n):I.append("identity_provider",e),I.append("scope",g.join(" ")),m&&I.append("login_hint",m),y&&I.append("lang",y),S&&I.append("nonce",S),E&&I.append("prompt",E.toLowerCase()),I.append("state",x),p==="code"&&(I.append("code_challenge",M()),I.append("code_challenge_method",R));const P=`https://${c}/oauth2/authorize?${I.toString()}`;qK(Ur);const{type:k,error:H,url:F}=await w(P,f,o)??{};try{if(k==="error")throw ka(String(H));if(k==="canceled")throw ka(String(k));k==="success"&&F&&await R6({currentUrl:F,clientId:r,domain:c,redirectUri:O,responseType:p,userAgentValue:Nt(Ve.SignInWithRedirect),preferPrivateSession:o})}catch(B){throw await FA(B),B}},GK=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{tokens:s}=await B5(t,{forceRefresh:!1});ed(s);const o=CK({endpointResolver:bt({endpointOverride:n})}),{UserAttributes:a}=await o({region:yt(r),userAgentValue:Nt(Ve.FetchUserAttributes)},{AccessToken:s.accessToken.toString()});return UW(a)},M6=()=>GK(Ht),VK=async t=>{await t.clearOAuthData(),Hr.clearTokens(),await j5(),Ao.dispatch("auth",{event:"signedOut"},"Auth",xo)},KK=async(t,e=!1,n)=>{hy(t);const{loginWith:r,userPoolClientId:s}=t,{domain:o,redirectSignOut:a}=r.oauth,u=UA(a),c=`https://${o}/logout?${Object.entries({client_id:s,logout_uri:encodeURIComponent(u)}).map(([f,p])=>`${f}=${p}`).join("&")}`;return O6(c)},YK=async(t,e,n,r)=>{const{isOAuthSignIn:s}=await e.loadOAuthSignIn(),o=await n.getOAuthMetadata();if(await VK(e),s||o?.oauthSignIn)return KK(t,!1)},ZK=t=>Rn(jn,Bn("RevokeToken"),or(),{...Hn,...t}),XK=new nr("Auth");async function QK(t){const e=Ht.getConfig().Auth?.Cognito;lt(e),await JK(e);let n;try{hy(e),n=!0}catch{n=!1}if(n){const r=new u6(Gh);r.setAuthConfig(e);const{type:s}=await YK(e,r,Hr)??{};if(s==="error")throw new Le({name:GW,message:"An error occurred when attempting to log out from OAuth provider."})}else Hr.clearTokens(),await j5(),Ao.dispatch("auth",{event:"signedOut"},"Auth",xo)}async function JK(t){try{const{userPoolEndpoint:e,userPoolId:n,userPoolClientId:r}=t,s=await Hr.getTokenStore().loadTokens();o6(s),eY(s.accessToken)&&await ZK({endpointResolver:bt({endpointOverride:e})})({region:yt(n),userAgentValue:Nt(Ve.SignOut)},{ClientId:r,Token:s.refreshToken})}catch{XK.debug("Client signOut error caught but will proceed with token removal")}}const eY=t=>!!t?.payload?.origin_jti,tY=t=>Rn(jn,Bn("GetUserAttributeVerificationCode"),or(),{...Hn,...t}),nY=async t=>{const{userAttributeKey:e,options:n}=t,r=Ht.getConfig().Auth?.Cognito,s=n?.clientMetadata;lt(r);const{userPoolEndpoint:o,userPoolId:a}=r,{tokens:u}=await vy({forceRefresh:!1});ed(u);const c=tY({endpointResolver:bt({endpointOverride:o})}),{CodeDeliveryDetails:f}=await c({region:yt(a),userAgentValue:Nt(Ve.SendUserAttributeVerificationCode)},{AccessToken:u.accessToken.toString(),ClientMetadata:s,AttributeName:e}),{DeliveryMedium:p,AttributeName:g,Destination:m}={...f};return{destination:m,deliveryMedium:p,attributeName:g}},rY={identityId:"identityId"},sY=new nr("DefaultIdentityIdStore");class P6{setAuthConfig(e){Lm(e.Cognito),this.authConfig=e,this._authKeys=oY("Cognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){Lm(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{const e=await this.keyValueStorage.getItem(this._authKeys.identityId);return e?(this._hasGuestIdentityId=!0,{id:e,type:"guest"}):null}}catch(e){return sY.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){Lm(this.authConfig?.Cognito),e.type==="guest"?(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)}}const oY=(t,e)=>TA(rY)(`com.amplify.${t}`,e),M_=({endpointOverride:t})=>e=>t?{url:new Wa(t)}:yW(e);function k6(t){const e=gi(t).payload.iss,n={};if(!e)throw new Le({name:"InvalidIdTokenException",message:"Invalid Idtoken."});const r=e.replace(/(^\w+:|^)\/\//,"");return n[r]=t,n}async function iY({tokens:t,authConfig:e,identityIdStore:n}){n.setAuthConfig({Cognito:e});const r=await n.loadIdentityId();if(r)return r.id;const s=t?.idToken?k6(t.idToken.toString()):{},o=await aY(s,e);return n.storeIdentityId({id:o,type:t?"primary":"guest"}),o}async function aY(t,e){const n=e?.identityPoolId,r=__(n),s=gW({endpointResolver:M_({endpointOverride:e.identityPoolEndpoint})});let o;try{o=(await s({region:r},{IdentityPoolId:n,Logins:t})).IdentityId}catch(a){throw Is(a),new Le(a)}if(!o)throw new Le({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return o}const Lg=new nr("CognitoCredentialsProvider"),xM=3e3*1e3;class D6{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){Lg.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){Lg.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){const n=e.authenticated,{tokens:r}=e,{authConfig:s}=e;try{Lm(s?.Cognito)}catch{return}if(!n&&!s.Cognito.allowGuestAccess)return;const{forceRefresh:o}=e,a=this.hasTokenChanged(r),u=await iY({tokens:r,authConfig:s.Cognito,identityIdStore:this._identityIdStore});return(o||a)&&this.clearCredentials(),n?(YW(r),this.credsForOIDCTokens(s.Cognito,r,u)):this.getGuestCredentials(u,s.Cognito)}async getGuestCredentials(e,n){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!1)return Lg.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=__(n.identityPoolId),s=HN({endpointResolver:M_({endpointOverride:n.identityPoolEndpoint})});let o;try{o=await s({region:r},{IdentityId:e})}catch(a){throw Is(a),new Le(a)}if(o?.Credentials?.AccessKeyId&&o?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+xM;const a={credentials:{accessKeyId:o.Credentials.AccessKeyId,secretAccessKey:o.Credentials.SecretKey,sessionToken:o.Credentials.SessionToken,expiration:o.Credentials.Expiration},identityId:e};return o.IdentityId&&(a.identityId=o.IdentityId,this._identityIdStore.storeIdentityId({id:o.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...a,isAuthenticatedCreds:!1},a}else throw new Le({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(e,n,r){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!0)return Lg.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const s=n.idToken?k6(n.idToken.toString()):{},o=__(e.identityPoolId),a=HN({endpointResolver:M_({endpointOverride:e.identityPoolEndpoint})});let u;try{u=await a({region:o},{IdentityId:r,Logins:s})}catch(c){throw Is(c),new Le(c)}if(u?.Credentials?.AccessKeyId&&u?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+xM;const c={credentials:{accessKeyId:u.Credentials.AccessKeyId,secretAccessKey:u.Credentials.SecretKey,sessionToken:u.Credentials.SessionToken,expiration:u.Credentials.Expiration},identityId:r};return u.IdentityId&&(c.identityId=u.IdentityId,this._identityIdStore.storeIdentityId({id:u.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...c,isAuthenticatedCreds:!0,associatedIdToken:n.idToken?.toString()},c}else throw new Le({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return this._nextCredentialsRefresh===void 0?!0:this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(e){return!!e&&!!this._credentialsAndIdentityId?.associatedIdToken&&e.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}const lY=new D6(new P6(Gh)),L6={configure(t,e){const n=L5(t),r=new xW({sameSite:"lax"}),s=e?.ssr?r:Gh,o=e?.ssr?new D6(new P6(r)):lY;if(!n.Auth||e?.Auth){Ht.configure(n,e);return}Fm.setAuthConfig(n.Auth),Fm.setKeyValueStorage(s),Ht.configure(n,{...e,Auth:{tokenProvider:Fm,credentialsProvider:o}})},getConfig(){return Ht.getConfig()}},Cy=()=>{const t=globalThis.__REMIT_CONFIG__??{};return{apiUrl:t.apiUrl??"/api",appOrigin:t.appOrigin??"",betterAuthEnabled:t.betterAuthEnabled??!1,cognito:{userPoolId:t.cognito?.userPoolId??"",clientId:t.cognito?.clientId??"",domain:t.cognito?.domain??"",region:t.cognito?.region??""},rum:{appMonitorId:t.rum?.appMonitorId??"",identityPoolId:t.rum?.identityPoolId??"",region:t.rum?.region??"eu-west-1"},mailboxPollIntervalSeconds:t.mailboxPollIntervalSeconds!=null?String(t.mailboxPollIntervalSeconds):void 0,disableDevtools:t.disableDevtools??!1}},uY=()=>{const t=Cy(),{userPoolId:e,clientId:n,domain:r,region:s}=t.cognito;return!e||!n?null:{userPoolId:e,userPoolClientId:n,domain:r,region:s,appOrigin:t.appOrigin}},P_=uY(),wy=()=>P_!==null,U6=()=>{if(!P_){console.warn("[auth] Cognito user pool is not configured. Running in local dev mode without Cognito auth.");return}const{userPoolId:t,userPoolClientId:e,domain:n,appOrigin:r}=P_;L6.configure({Auth:{Cognito:{userPoolId:t,userPoolClientId:e,loginWith:n?{oauth:{domain:n,scopes:["openid","email","profile"],redirectSignIn:r?[r]:[],redirectSignOut:r?[r]:[],responseType:"code"}}:void 0}}})};var cY={};const jm=Object.create(null),mf=t=>cY||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?jm:globalThis),ga=new Proxy(jm,{get(t,e){return mf()[e]??jm[e]},has(t,e){return e in mf()||e in jm},set(t,e,n){const r=mf(!0);return r[e]=n,!0},deleteProperty(t,e){if(!e)return!1;const n=mf(!0);return delete n[e],!0},ownKeys(){const t=mf(!0);return Object.keys(t)}});ga.NODE_ENV;var Hm=class extends Error{constructor(t,e){super(t,e),this.name="BetterAuthError",this.message=t,this.stack=""}};const dY=47;function F6(t){let e=t.length;for(;e>0&&t.charCodeAt(e-1)===dY;)e--;return e===t.length?t:t.slice(0,e)}function fY(t){try{return(F6(new URL(t).pathname)||"/")!=="/"}catch{throw new Hm(`Invalid base URL: ${t}. Please provide a valid base URL.`)}}function hY(t){try{const e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Hm(`Invalid base URL: ${t}. URL must include 'http://' or 'https://'`)}catch(e){throw e instanceof Hm?e:new Hm(`Invalid base URL: ${t}. Please provide a valid base URL.`,{cause:e})}}function AM(t,e="/api/auth"){if(hY(t),fY(t))return t;const n=F6(t);return!e||e==="/"?n:(e=e.startsWith("/")?e:`/${e}`,`${n}${e}`)}function pY(t,e,n,r,s){{const o=ga.BETTER_AUTH_URL||ga.NEXT_PUBLIC_BETTER_AUTH_URL||ga.PUBLIC_BETTER_AUTH_URL||ga.NUXT_PUBLIC_BETTER_AUTH_URL||ga.NUXT_PUBLIC_AUTH_URL||(ga.BASE_URL!=="/"?ga.BASE_URL:void 0);if(o)return AM(o,e)}if(typeof window<"u"&&window.location)return AM(window.location.origin,e)}const gY={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},mY=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,TM={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},vY=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function yY(t){return t instanceof Date&&!isNaN(t.getTime())}function bY(t){const e=vY.exec(t);if(!e)return null;const[,n,r,s,o,a,u,c,f,p,g]=e,m=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(s,10),parseInt(o,10),parseInt(a,10),parseInt(u,10),c?parseInt(c.padEnd(3,"0"),10):0));if(f){const y=(parseInt(p,10)*60+parseInt(g,10))*(f==="+"?-1:1);m.setUTCMinutes(m.getUTCMinutes()+y)}return yY(m)?m:null}function SY(t,e={}){const{strict:n=!1,warnings:r=!1,reviver:s,parseDates:o=!0}=e;if(typeof t!="string")return t;const a=t.trim(),u=a.toLowerCase();if(u.length<=9&&u in TM)return TM[u];if(!mY.test(a)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return t}if(Object.entries(gY).some(([c,f])=>{const p=f.test(a);return p&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${c} pattern`),p})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(a,(f,p)=>{if(f==="__proto__"||f==="constructor"&&p&&typeof p=="object"&&"prototype"in p){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(o&&typeof p=="string"){const g=bY(p);if(g)return g}return s?s(f,p):p})}catch(c){if(n)throw c;return t}}function EY(t,e={strict:!0}){return SY(t,e)}const CY=["javascript:","data:","vbscript:"];function wY(t){let e;try{e=new URL(t)}catch{return!0}return!CY.includes(e.protocol)}const _Y={id:"redirect",name:"Redirect",hooks:{onSuccess(t){if(t.data?.url&&t.data?.redirect&&wY(t.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=t.data.url}catch{}}}};let Vs=[],ma=0;const $m=4,xY=globalThis.nanostoresGlobal||={epoch:0};let AY=()=>{for(ma=0;ma<Vs.length;ma+=$m)Vs[ma](Vs[ma+1].value,Vs[ma+2],Vs[ma+3]);Vs.length=0};const RM=t=>{let e=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:t,lc:0,listen(r){return n.lc=e.push(r),()=>{for(let o=ma+$m;o<Vs.length;)Vs[o]===r?Vs.splice(o,$m):o+=$m;let s=e.indexOf(r);~s&&(e.splice(s,1),--n.lc||n.off())}},notify(r,s){xY.epoch++;let o=!Vs.length&&!0;for(let a of e)Vs.push(a,n,r,s);o&&AY()},off(){},set(r){let s=n.value;s!==r&&(n.value=r,n.notify(s))},subscribe(r){let s=n.listen(r);return r(n.value),s},value:t};return n},TY=2,RY=5,Ug=6,Fg=10;let z6=(t,e,n,r)=>(t.events=t.events||{},t.events[n+Fg]||(t.events[n+Fg]=r(s=>{t.events[n].reduceRight((o,a)=>(a(o),o),{shared:{},...s})})),t.events[n]=t.events[n]||[],t.events[n].push(e),()=>{let s=t.events[n],o=s.indexOf(e);s.splice(o,1),s.length||(delete t.events[n],t.events[n+Fg](),delete t.events[n+Fg])}),IY=(t,e)=>z6(t,e,TY,n=>{let r=t.set,s=t.setKey;return t.setKey&&(t.setKey=(o,a)=>{let u;if(n({abort:()=>{u=!0},changed:o,newValue:{...t.value,[o]:a}}),!u)return s(o,a)}),t.set=o=>{let a;if(n({abort:()=>{a=!0},newValue:o}),!a)return r(o)},()=>{t.set=r,t.setKey=s}});const OY=1e3;let NY=(t,e)=>z6(t,r=>{let s=e(r);s&&t.events[Ug].push(s)},RY,r=>{let s=t.listen;t.listen=(...a)=>(!t.lc&&!t.active&&(t.active=!0,r()),s(...a));let o=t.off;return t.events[Ug]=[],t.off=()=>{o(),setTimeout(()=>{if(t.active&&!t.lc){t.active=!1;for(let a of t.events[Ug])a();t.events[Ug]=[]}},OY)},()=>{t.listen=s,t.off=o}});function MY(t,e,n){let r=new Set(e);return t.listen((s,o,a)=>{(a===void 0?e.some(u=>s[u]!==o[u]):r.has(a)||r.has(a.split(/\.|\[/)[0]))&&n(s,o,a)})}function IM(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function gv(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!gv(t[n],e[n]))return!1;return!0}if(IM(t)&&IM(e)){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n)if(!(s in e)||!gv(t[s],e[s]))return!1;return!0}return!1}function PY(t,e){return IY(t,({newValue:n,abort:r})=>{e(t.value,n)&&r()})}const k1=Symbol.for("better-auth:broadcast-channel"),kY=()=>Math.floor(Date.now()/1e3);var DY=class{listeners=new Set;name;constructor(t="better-auth.message"){this.name=t}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}post(t){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...t,timestamp:kY()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const t=e=>{if(e.key!==this.name)return;const n=JSON.parse(e.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}};function D1(t="better-auth.message"){return globalThis[k1]||(globalThis[k1]=new DY(t)),globalThis[k1]}const L1=Symbol.for("better-auth:focus-manager");var LY=class{listeners=new Set;subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setFocused(t){this.listeners.forEach(e=>e(t))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const t=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",t,!1),()=>{document.removeEventListener("visibilitychange",t,!1)}}};function OM(){return globalThis[L1]||(globalThis[L1]=new LY),globalThis[L1]}const U1=Symbol.for("better-auth:online-manager");var UY=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setOnline(t){this.isOnline=t,this.listeners.forEach(e=>e(t))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const t=()=>this.setOnline(!0),e=()=>this.setOnline(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",e,!1),()=>{window.removeEventListener("online",t,!1),window.removeEventListener("offline",e,!1)}}};function F1(){return globalThis[U1]||(globalThis[U1]=new UY),globalThis[U1]}const z1=()=>Math.floor(Date.now()/1e3),FY=5;function zY(t){const{fetchSession:e,shouldPollSession:n=()=>!0,sessionSignal:r,options:s={}}=t,o=s.sessionOptions?.refetchInterval??0,a=s.sessionOptions?.refetchOnWindowFocus??!0,u=s.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},f=()=>u||F1().isOnline,p=T=>{if(f()){if(T?.event==="storage"){e();return}if(T?.event==="poll"){c.lastSessionRequest=z1(),e();return}if(T?.event==="visibilitychange"){if(z1()-c.lastSessionRequest<FY)return;c.lastSessionRequest=z1(),e();return}e()}},g=T=>{D1().post({event:"session",data:{trigger:T},clientId:Math.random().toString(36).substring(7)})},m=()=>{o&&o>0&&(c.pollInterval=setInterval(()=>{n()&&p({event:"poll"})},o*1e3))},y=()=>{c.unsubscribeBroadcast=D1().subscribe(()=>{p({event:"storage"})})},S=()=>{a&&(c.unsubscribeFocus=OM().subscribe(()=>{p({event:"visibilitychange"})}))},E=()=>{c.unsubscribeOnline=F1().subscribe(T=>{T&&p({event:"visibilitychange"})})},C=()=>{c.unsubscribeSignal=r.listen(()=>{e()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,m(),y(),S(),E(),C(),c.cleanupBroadcastSetup=D1().setup(),c.cleanupFocusSetup=OM().setup(),c.cleanupOnlineSetup=F1().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&(clearInterval(c.pollInterval),c.pollInterval=void 0),c.unsubscribeBroadcast&&(c.unsubscribeBroadcast(),c.unsubscribeBroadcast=void 0),c.unsubscribeFocus&&(c.unsubscribeFocus(),c.unsubscribeFocus=void 0),c.unsubscribeOnline&&(c.unsubscribeOnline(),c.unsubscribeOnline=void 0),c.unsubscribeSignal&&(c.unsubscribeSignal(),c.unsubscribeSignal=void 0),c.cleanupBroadcastSetup&&(c.cleanupBroadcastSetup(),c.cleanupBroadcastSetup=void 0),c.cleanupFocusSetup&&(c.cleanupFocusSetup(),c.cleanupFocusSetup=void 0),c.cleanupOnlineSetup&&(c.cleanupOnlineSetup(),c.cleanupOnlineSetup=void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:p,broadcastSessionUpdate:g}}const BY=()=>typeof window>"u";function NM(t){return typeof t=="object"&&t!==null&&"data"in t&&"error"in t?t:{data:t,error:null}}function jY(t){return!t||t.session===null&&t.user===null?null:t}function HY(t,e){return gv(t.data,e.data)&&t.error===e.error&&t.isPending===e.isPending&&t.isRefetching===e.isRefetching&&t.refetch===e.refetch}function $Y(t,e){const n=RM(!1);let r;const s=f=>u(f),o=RM({data:null,error:null,isPending:!0,isRefetching:!1,refetch:s});PY(o,HY);const a=f=>{if(r!==f)return;const p=o.get();r=void 0,!(!p.isPending&&!p.isRefetching)&&o.set({...p,isPending:!1,isRefetching:!1,refetch:s})},u=async f=>{r?.abort();const p=new AbortController;r=p;const g=o.get();o.set({...g,isPending:g.data===null,isRefetching:!0,error:null,refetch:s});try{const m=await t("/get-session",{method:"GET",query:f?.query,signal:p.signal});if(p.signal.aborted){a(p);return}let{data:y,error:S}=NM(m);if(y?.needsRefresh)try{const x=await t("/get-session",{method:"POST",signal:p.signal});if(p.signal.aborted){a(p);return}({data:y,error:S}=NM(x))}catch{if(p.signal.aborted){a(p);return}}if(S){const x=o.get(),T=S?.status===401;o.set({data:T?null:x.data,error:S,isPending:!1,isRefetching:!1,refetch:s});return}const E=jY(y),C=o.get(),w=C.data!=null&&E!=null&&gv(C.data,E)?C.data:E;o.set({data:w,error:null,isPending:!1,isRefetching:!1,refetch:s})}catch(m){if(p.signal.aborted){a(p);return}const y=o.get();o.set({data:y.data,error:m,isPending:!1,isRefetching:!1,refetch:s})}};let c=()=>{};return NY(o,()=>{let f;BY()||(f=setTimeout(()=>{u()},0));const p=zY({fetchSession:u,shouldPollSession:()=>o.get().data!=null,sessionSignal:n,options:e});return p.init(),c=p.broadcastSessionUpdate,()=>{f&&clearTimeout(f);const g=r;g?.abort(),g&&a(g),p.cleanup()}}),{session:o,$sessionSignal:n,broadcastSessionUpdate:f=>c(f)}}function B1(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function k_(t,e,n=".",r){if(!B1(e))return k_(t,{},n,r);const s={...e};for(const o of Object.keys(t)){if(o==="__proto__"||o==="constructor")continue;const a=t[o];a!=null&&(r&&r(s,o,a,n)||(Array.isArray(a)&&Array.isArray(s[o])?s[o]=[...a,...s[o]]:B1(a)&&B1(s[o])?s[o]=k_(a,s[o],(n?`${n}.`:"")+o.toString(),r):s[o]=a))}return s}function qY(t){return(...e)=>e.reduce((n,r)=>k_(n,r,"",t),{})}const WY=qY();var GY=Object.defineProperty,VY=Object.defineProperties,KY=Object.getOwnPropertyDescriptors,MM=Object.getOwnPropertySymbols,YY=Object.prototype.hasOwnProperty,ZY=Object.prototype.propertyIsEnumerable,PM=(t,e,n)=>e in t?GY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ws=(t,e)=>{for(var n in e||(e={}))YY.call(e,n)&&PM(t,n,e[n]);if(MM)for(var n of MM(e))ZY.call(e,n)&&PM(t,n,e[n]);return t},bo=(t,e)=>VY(t,KY(e)),XY=class extends Error{constructor(t,e,n){super(e||t.toString(),{cause:n}),this.status=t,this.statusText=e,this.error=n,Error.captureStackTrace(this,this.constructor)}},QY=async(t,e)=>{var n,r,s,o,a,u;let c=e||{};const f={onRequest:[e?.onRequest],onResponse:[e?.onResponse],onSuccess:[e?.onSuccess],onError:[e?.onError],onRetry:[e?.onRetry]};if(!e||!e?.plugins)return{url:t,options:c,hooks:f};for(const p of e?.plugins||[]){if(p.init){const g=await((n=p.init)==null?void 0:n.call(p,t.toString(),e));c=g.options||c,t=g.url}f.onRequest.push((r=p.hooks)==null?void 0:r.onRequest),f.onResponse.push((s=p.hooks)==null?void 0:s.onResponse),f.onSuccess.push((o=p.hooks)==null?void 0:o.onSuccess),f.onError.push((a=p.hooks)==null?void 0:a.onError),f.onRetry.push((u=p.hooks)==null?void 0:u.onRetry)}return{url:t,options:c,hooks:f}},kM=class{constructor(t){this.options=t}shouldAttemptRetry(t,e){return this.options.shouldRetry?Promise.resolve(t<this.options.attempts&&this.options.shouldRetry(e)):Promise.resolve(t<this.options.attempts)}getDelay(){return this.options.delay}},JY=class{constructor(t){this.options=t}shouldAttemptRetry(t,e){return this.options.shouldRetry?Promise.resolve(t<this.options.attempts&&this.options.shouldRetry(e)):Promise.resolve(t<this.options.attempts)}getDelay(t){return Math.min(this.options.maxDelay,this.options.baseDelay*2**t)}};function eZ(t){if(typeof t=="number")return new kM({type:"linear",attempts:t,delay:1e3});switch(t.type){case"linear":return new kM(t);case"exponential":return new JY(t);default:throw new Error("Invalid retry strategy")}}var tZ=async t=>{const e={},n=async r=>typeof r=="function"?await r():r;if(t?.auth){if(t.auth.type==="Bearer"){const r=await n(t.auth.token);if(!r)return e;e.authorization=`Bearer ${r}`}else if(t.auth.type==="Basic"){const[r,s]=await Promise.all([n(t.auth.username),n(t.auth.password)]);if(!r||!s)return e;e.authorization=`Basic ${btoa(`${r}:${s}`)}`}else if(t.auth.type==="Custom"){const[r,s]=await Promise.all([n(t.auth.prefix),n(t.auth.value)]);if(!s)return e;e.authorization=`${r??""} ${s}`}}return e},nZ=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function rZ(t){const e=t.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!e)return"json";const r=e.split(";").shift()||"";return nZ.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function sZ(t){try{return JSON.parse(t),!0}catch{return!1}}function B6(t){if(t===void 0)return!1;const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(t)?!0:t.buffer?!1:t.constructor&&t.constructor.name==="Object"||typeof t.toJSON=="function"}function DM(t){try{return JSON.parse(t)}catch{return t}}function LM(t){return typeof t=="function"}function oZ(t){if(t?.customFetchImpl)return t.customFetchImpl;if(typeof globalThis<"u"&&LM(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&LM(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function j6(...t){const e={};for(const n of t)if(n)if(n instanceof Headers)n.forEach((r,s)=>{e[s]=r});else{const r=Array.isArray(n)?n:Object.entries(n);for(const[s,o]of r)o!=null&&(e[s]=o)}return e}async function iZ(t){const e=new Headers(j6(t?.headers,await tZ(t)));if(!e.has("content-type")){const n=aZ(t?.body);n&&e.set("content-type",n)}return e}function aZ(t){return B6(t)?"application/json":null}function lZ(t){const e=t.get("content-type");return e?e.split(";")[0].trim().toLowerCase():null}function uZ(t,e){const{body:n}=t;return n?!B6(n)||typeof n=="string"?n:lZ(e)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function cZ(t,e){var n;if(e?.method)return e.method.toUpperCase();if(t.startsWith("@")){const r=(n=t.split("@")[1])==null?void 0:n.split("/")[0];return $6.includes(r)?r.toUpperCase():e?.body?"POST":"GET"}return e?.body?"POST":"GET"}function dZ(t,e){let n;return!t?.signal&&t?.timeout&&(n=setTimeout(()=>e?.abort(),t?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var fZ=class H6 extends Error{constructor(e,n){super(n||JSON.stringify(e,null,2)),this.issues=e,Object.setPrototypeOf(this,H6.prototype)}};async function Ff(t,e){const n=await t["~standard"].validate(e);if(n.issues)throw new fZ(n.issues);return n.value}var $6=["get","post","put","patch","delete"],hZ=t=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(e,n){var r,s,o,a;const u=((s=(r=t.plugins)==null?void 0:r.find(c=>{var f;return(f=c.schema)!=null&&f.config?e.startsWith(c.schema.config.baseURL||"")||e.startsWith(c.schema.config.prefix||""):!1}))==null?void 0:s.schema)||t.schema;if(u){let c=e;(o=u.config)!=null&&o.prefix&&c.startsWith(u.config.prefix)&&(c=c.replace(u.config.prefix,""),u.config.baseURL&&(e=e.replace(u.config.prefix,u.config.baseURL))),(a=u.config)!=null&&a.baseURL&&c.startsWith(u.config.baseURL)&&(c=c.replace(u.config.baseURL,"")),c.startsWith("/")&&c.charAt(1)==="@"&&(c=c.substring(1));const f=u.schema[c];if(f){let p=n?.headers;if(f.headers&&!n?.disableValidation){const m={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((E,C)=>{m[C.toLowerCase()]=E});else if(typeof n.headers=="object")for(const[E,C]of Object.entries(n.headers))C!=null&&(m[E.toLowerCase()]=C)}const y=await Ff(f.headers,m),S={};for(const[E,C]of Object.entries(y))S[E.toLowerCase()]=C;p=S}let g=bo(Ws({},n),{method:f.method,output:f.output,headers:p});return n?.disableValidation||(g=bo(Ws({},g),{body:f.input?await Ff(f.input,n?.body):n?.body,params:f.params?await Ff(f.params,n?.params):n?.params,query:f.query?await Ff(f.query,n?.query):n?.query})),{url:e,options:g}}}return{url:e,options:n}}}),pZ=t=>{async function e(n,r){const s=bo(Ws(Ws({},t),r),{headers:j6(t?.headers,r?.headers),plugins:[...t?.plugins||[],hZ(t||{}),...r?.plugins||[]]});if(t?.catchAllError)try{return await D_(n,s)}catch(o){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:o}}}return await D_(n,s)}return e},gZ=t=>t==="."||t==="..";function mZ(t,e){let n=t;for(const[r,s]of e)n=n.replace(r,s);if(gZ(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function vZ(t,e){const{baseURL:n,params:r,query:s}=e||{query:{},params:{},baseURL:""};let o=t.startsWith("http")?t.split("/").slice(0,3).join("/"):n||"";if(t.startsWith("@")){const m=t.toString().split("@")[1].split("/")[0];$6.includes(m)&&(t=t.replace(`@${m}/`,"/"))}o.endsWith("/")||(o+="/");let[a,u]=t.replace(o,"").split("?");const c=new URLSearchParams(u);for(const[m,y]of Object.entries(s||{})){if(y==null)continue;let S;if(typeof y=="string")S=y;else if(Array.isArray(y)){for(const E of y)c.append(m,E);continue}else S=JSON.stringify(y);c.set(m,S)}const f=new Map;if(r)if(Array.isArray(r)){const m=a.split("/").filter(y=>y.startsWith(":"));for(const[y,S]of m.entries()){const E=r[y];f.set(S,String(E))}}else for(const[m,y]of Object.entries(r))f.set(`:${m}`,String(y));a=a.split("/").map(m=>mZ(m,f)).join("/"),a=a.replace(/^\/+/,"");let p=c.toString();return p=p.length>0?`?${p}`.replace(/\+/g,"%20"):"",o.startsWith("http")?new URL(`${a}${p}`,o):`${o}${a}${p}`}var D_=async(t,e)=>{var n,r,s,o,a,u,c,f;const{hooks:p,url:g,options:m}=await QY(t,e),y=oZ(m),S=new AbortController,E=(n=m.signal)!=null?n:S.signal,C=vZ(g,m),w=await iZ(m),x=uZ(m,w),T=cZ(g,m),R=bo(Ws({},m),{url:C,headers:w,body:x,method:T,signal:E});for(const W of p.onRequest)if(W){const Y=await W(R);typeof Y=="object"&&Y!==null&&Object.assign(R,Y)}("pipeTo"in R&&typeof R.pipeTo=="function"||typeof((r=e?.body)==null?void 0:r.pipe)=="function")&&("duplex"in R||(R.duplex="half"));const{clearTimeout:M}=dZ(m,S);let O=await y(R.url,R);M();const I={response:O,request:R};for(const W of p.onResponse)if(W){const Y=await W(bo(Ws({},I),{response:(s=e?.hookOptions)!=null&&s.cloneResponse?O.clone():O}));Y instanceof Response?O=Y:typeof Y=="object"&&Y!==null&&(O=Y.response)}if(O.ok){if(!(R.method!=="HEAD"))return{data:"",error:null};const Y=rZ(O),ne={data:null,response:O,request:R};if(Y==="json"||Y==="text"){const $=await O.text(),ee=(o=R.jsonParser)!=null?o:DM;ne.data=await ee($)}else ne.data=await O[Y]();R?.output&&R.output&&!R.disableValidation&&(ne.data=await Ff(R.output,ne.data));for(const $ of p.onSuccess)$&&await $(bo(Ws({},ne),{response:(a=e?.hookOptions)!=null&&a.cloneResponse?O.clone():O}));return e?.throw?ne.data:{data:ne.data,error:null}}const P=(u=e?.jsonParser)!=null?u:DM,k=await O.text(),H=sZ(k),F=H?await P(k):null,B={response:O,responseText:k,request:R,error:bo(Ws({},F),{status:O.status,statusText:O.statusText})};for(const W of p.onError)W&&await W(bo(Ws({},B),{response:(c=e?.hookOptions)!=null&&c.cloneResponse?O.clone():O}));if(e?.retry){const W=eZ(e.retry),Y=(f=e.retryAttempt)!=null?f:0;if(await W.shouldAttemptRetry(Y,O)){for(const $ of p.onRetry)$&&await $(I);const ne=W.getDelay(Y);return await new Promise($=>setTimeout($,ne)),await D_(t,bo(Ws({},e),{retryAttempt:Y+1}))}}if(e?.throw)throw new XY(O.status,O.statusText,H?F:k);return{data:null,error:bo(Ws({},F),{status:O.status,statusText:O.statusText})}},gl={};const yZ=t=>{if(typeof process>"u")return;const e="/api/auth";if(gl.NEXT_PUBLIC_AUTH_URL)return gl.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(gl.NEXTAUTH_URL)try{return gl.NEXTAUTH_URL}catch{}if(gl.VERCEL_URL)try{const n=gl.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${gl.VERCEL_URL}`).origin}${e}`}catch{}}},bZ=(t,e)=>{const n="credentials"in Request.prototype,r=pY(t?.baseURL,t?.basePath)??yZ()??"/api/auth",s=[],o={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:t?.fetchOptions?.onSuccess,onError:t?.fetchOptions?.onError,onRequest:t?.fetchOptions?.onRequest,onResponse:t?.fetchOptions?.onResponse}},{onSuccess:a,onError:u,onRequest:c,onResponse:f,...p}={},g=pZ({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(M){return M?EY(M,{strict:!1}):null},customFetchImpl:fetch,...p,plugins:[o,...p.plugins||[],_Y,...s]}),{$sessionSignal:m,session:y,broadcastSessionUpdate:S}=$Y(g,t),E=[];let C={};const w={$sessionSignal:m,session:y},x={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},T=[{signal:"$sessionSignal",matcher(M){return M==="/sign-out"||M==="/update-user"||M==="/update-session"||M==="/sign-up/email"||M==="/sign-in/email"||M==="/delete-user"||M==="/verify-email"||M==="/revoke-sessions"||M==="/revoke-session"||M==="/revoke-other-sessions"||M==="/change-email"||M==="/change-password"},callback(M){M==="/sign-out"?S("signout"):(M==="/update-user"||M==="/update-session")&&S("updateUser")}}];for(const M of E)M.getAtoms&&Object.assign(w,M.getAtoms?.(g)),M.pathMethods&&Object.assign(x,M.pathMethods),M.atomListeners&&T.push(...M.atomListeners);const R={notify:M=>{w[M].set(!w[M].get())},listen:(M,O)=>{w[M].subscribe(O)},atoms:w};for(const M of E)M.getActions&&(C=WY(M.getActions?.(g,R,t)??{},C));return{get baseURL(){return r},pluginsActions:C,pluginsAtoms:w,pluginPathMethods:x,atomListeners:T,$fetch:g,$store:R}};function SZ(t){return typeof t=="object"&&t!==null&&"get"in t&&typeof t.get=="function"&&"lc"in t&&typeof t.lc=="number"}function EZ(t){return t.charAt(0).toUpperCase()+t.slice(1)}const CZ=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),wZ=/['\u2019]/g;function _Z(t){return t.replace(wZ,"").match(CZ)??[]}function xZ(t){return _Z(t).map(e=>e.toLowerCase()).join("-")}function AZ(t,e,n){const r=e[t],{fetchOptions:s,query:o,...a}=n||{};return r||(s?.method?s.method:a&&Object.keys(a).length>0?"POST":"GET")}function TZ(t,e,n,r,s){function o(a=[]){return new Proxy(function(){},{get(u,c){if(typeof c!="string"||c==="then"||c==="catch"||c==="finally")return;const f=[...a,c];let p=t;for(const g of f)if(p&&typeof p=="object"&&g in p)p=p[g];else{p=void 0;break}return typeof p=="function"||SZ(p)?p:o(f)},apply:async(u,c,f)=>{const p="/"+a.map(xZ).join("/"),g=f[0]||{},m=f[1]||{},{query:y,fetchOptions:S,...E}=g,C={...m,...S},w=AZ(p,n,g);return await e(p,{...C,body:w==="GET"?void 0:{...E,...C?.body||{}},query:y||C?.query,method:w,async onSuccess(x){if(await C?.onSuccess?.(x),!s||C.disableSignal)return;const T=s.filter(M=>M.matcher(p));if(!T.length)return;const R=new Set;for(const M of T){const O=r[M.signal];if(!O)return;if(R.has(M.signal))continue;R.add(M.signal);const I=O.get();setTimeout(()=>{O.set(!I)},10),M.callback?.(p)}}})}})}return o()}var j1={exports:{}},We={};var UM;function RZ(){if(UM)return We;UM=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),m=Symbol.iterator;function y(L){return L===null||typeof L!="object"?null:(L=m&&L[m]||L["@@iterator"],typeof L=="function"?L:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function w(L,V,K){this.props=L,this.context=V,this.refs=C,this.updater=K||S}w.prototype.isReactComponent={},w.prototype.setState=function(L,V){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,V,"setState")},w.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function x(){}x.prototype=w.prototype;function T(L,V,K){this.props=L,this.context=V,this.refs=C,this.updater=K||S}var R=T.prototype=new x;R.constructor=T,E(R,w.prototype),R.isPureReactComponent=!0;var M=Array.isArray;function O(){}var I={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function k(L,V,K){var J=K.ref;return{$$typeof:t,type:L,key:V,ref:J!==void 0?J:null,props:K}}function H(L,V){return k(L.type,V,L.props)}function F(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function B(L){var V={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(K){return V[K]})}var W=/\/+/g;function Y(L,V){return typeof L=="object"&&L!==null&&L.key!=null?B(""+L.key):V.toString(36)}function ne(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(O,O):(L.status="pending",L.then(function(V){L.status==="pending"&&(L.status="fulfilled",L.value=V)},function(V){L.status==="pending"&&(L.status="rejected",L.reason=V)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function $(L,V,K,J,oe){var he=typeof L;(he==="undefined"||he==="boolean")&&(L=null);var ue=!1;if(L===null)ue=!0;else switch(he){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(L.$$typeof){case t:case e:ue=!0;break;case p:return ue=L._init,$(ue(L._payload),V,K,J,oe)}}if(ue)return oe=oe(L),ue=J===""?"."+Y(L,0):J,M(oe)?(K="",ue!=null&&(K=ue.replace(W,"$&/")+"/"),$(oe,V,K,"",function(Xe){return Xe})):oe!=null&&(F(oe)&&(oe=H(oe,K+(oe.key==null||L&&L.key===oe.key?"":(""+oe.key).replace(W,"$&/")+"/")+ue)),V.push(oe)),1;ue=0;var ve=J===""?".":J+":";if(M(L))for(var _e=0;_e<L.length;_e++)J=L[_e],he=ve+Y(J,_e),ue+=$(J,V,K,he,oe);else if(_e=y(L),typeof _e=="function")for(L=_e.call(L),_e=0;!(J=L.next()).done;)J=J.value,he=ve+Y(J,_e++),ue+=$(J,V,K,he,oe);else if(he==="object"){if(typeof L.then=="function")return $(ne(L),V,K,J,oe);throw V=String(L),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ue}function ee(L,V,K){if(L==null)return L;var J=[],oe=0;return $(L,J,"","",function(he){return V.call(K,he,oe++)}),J}function fe(L){if(L._status===-1){var V=L._result;V=V(),V.then(function(K){(L._status===0||L._status===-1)&&(L._status=1,L._result=K)},function(K){(L._status===0||L._status===-1)&&(L._status=2,L._result=K)}),L._status===-1&&(L._status=0,L._result=V)}if(L._status===1)return L._result.default;throw L._result}var de=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},Ae={map:ee,forEach:function(L,V,K){ee(L,function(){V.apply(this,arguments)},K)},count:function(L){var V=0;return ee(L,function(){V++}),V},toArray:function(L){return ee(L,function(V){return V})||[]},only:function(L){if(!F(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return We.Activity=g,We.Children=Ae,We.Component=w,We.Fragment=n,We.Profiler=s,We.PureComponent=T,We.StrictMode=r,We.Suspense=c,We.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,We.__COMPILER_RUNTIME={__proto__:null,c:function(L){return I.H.useMemoCache(L)}},We.cache=function(L){return function(){return L.apply(null,arguments)}},We.cacheSignal=function(){return null},We.cloneElement=function(L,V,K){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var J=E({},L.props),oe=L.key;if(V!=null)for(he in V.key!==void 0&&(oe=""+V.key),V)!P.call(V,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&V.ref===void 0||(J[he]=V[he]);var he=arguments.length-2;if(he===1)J.children=K;else if(1<he){for(var ue=Array(he),ve=0;ve<he;ve++)ue[ve]=arguments[ve+2];J.children=ue}return k(L.type,oe,J)},We.createContext=function(L){return L={$$typeof:a,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},We.createElement=function(L,V,K){var J,oe={},he=null;if(V!=null)for(J in V.key!==void 0&&(he=""+V.key),V)P.call(V,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(oe[J]=V[J]);var ue=arguments.length-2;if(ue===1)oe.children=K;else if(1<ue){for(var ve=Array(ue),_e=0;_e<ue;_e++)ve[_e]=arguments[_e+2];oe.children=ve}if(L&&L.defaultProps)for(J in ue=L.defaultProps,ue)oe[J]===void 0&&(oe[J]=ue[J]);return k(L,he,oe)},We.createRef=function(){return{current:null}},We.forwardRef=function(L){return{$$typeof:u,render:L}},We.isValidElement=F,We.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:fe}},We.memo=function(L,V){return{$$typeof:f,type:L,compare:V===void 0?null:V}},We.startTransition=function(L){var V=I.T,K={};I.T=K;try{var J=L(),oe=I.S;oe!==null&&oe(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(O,de)}catch(he){de(he)}finally{V!==null&&K.types!==null&&(V.types=K.types),I.T=V}},We.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},We.use=function(L){return I.H.use(L)},We.useActionState=function(L,V,K){return I.H.useActionState(L,V,K)},We.useCallback=function(L,V){return I.H.useCallback(L,V)},We.useContext=function(L){return I.H.useContext(L)},We.useDebugValue=function(){},We.useDeferredValue=function(L,V){return I.H.useDeferredValue(L,V)},We.useEffect=function(L,V){return I.H.useEffect(L,V)},We.useEffectEvent=function(L){return I.H.useEffectEvent(L)},We.useId=function(){return I.H.useId()},We.useImperativeHandle=function(L,V,K){return I.H.useImperativeHandle(L,V,K)},We.useInsertionEffect=function(L,V){return I.H.useInsertionEffect(L,V)},We.useLayoutEffect=function(L,V){return I.H.useLayoutEffect(L,V)},We.useMemo=function(L,V){return I.H.useMemo(L,V)},We.useOptimistic=function(L,V){return I.H.useOptimistic(L,V)},We.useReducer=function(L,V,K){return I.H.useReducer(L,V,K)},We.useRef=function(L){return I.H.useRef(L)},We.useState=function(L){return I.H.useState(L)},We.useSyncExternalStore=function(L,V,K){return I.H.useSyncExternalStore(L,V,K)},We.useTransition=function(){return I.H.useTransition()},We.version="19.2.7",We}var FM;function Xh(){return FM||(FM=1,j1.exports=RZ()),j1.exports}var A=Xh();const z=qa(A),q6=N5({__proto__:null,default:z},[A]);function IZ(t,e={}){const n=A.useRef(t.get()),{keys:r,deps:s=[t,r]}=e,o=A.useCallback(u=>{const c=f=>{n.current!==f&&(n.current=f,u())};return c(t.value),r?.length?MY(t,r,c):t.listen(c)},s),a=()=>n.current;return A.useSyncExternalStore(o,a,a)}function OZ(t){return`use${EZ(t)}`}function NZ(t){const{pluginPathMethods:e,pluginsActions:n,pluginsAtoms:r,$fetch:s,$store:o,atomListeners:a}=bZ(t),u={};for(const[c,f]of Object.entries(r))u[OZ(c)]=()=>IZ(f);return TZ({...n,...u,$fetch:s,$store:o},s,e,r,a)}class W6 extends Error{constructor(e){super(e instanceof Error&&e.message?e.message:"The request could not be completed.",{cause:e}),this.name="NetworkError"}}const MZ=t=>typeof t=="object"&&t!==null&&"name"in t&&t.name==="AbortError",G6=async(t,e)=>{try{return await fetch(t,e)}catch(n){throw MZ(n)?n:new W6(n)}},_y=()=>Cy().betterAuthEnabled,PZ="EMAIL_PASSWORD_SIGN_UP_DISABLED",kZ=t=>typeof t=="object"&&t!==null&&t.code===PZ,hh=NZ(),DZ=60;let zf=null;const qm=()=>Math.floor(Date.now()/1e3),LZ=t=>{const[,e]=t.split(".");if(!e)return qm();try{const n=JSON.parse(atob(e.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp=="number"?n.exp:qm()}catch{return qm()}},UZ=async()=>{const t=await G6("/api/auth/token",{credentials:"include"});if(!t.ok)return null;const e=await t.json();return e&&typeof e=="object"&&"token"in e&&typeof e.token=="string"?e.token:null},FZ=async()=>{if(zf&&zf.expiresAt-DZ>qm())return zf.value;const t=await UZ();return zf=t?{value:t,expiresAt:LZ(t)}:null,t},V6=()=>{zf=null};const zZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),K6=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();var BZ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const jZ=A.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...u},c)=>A.createElement("svg",{ref:c,...BZ,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:K6("lucide",s),...u},[...a.map(([f,p])=>A.createElement(f,p)),...Array.isArray(o)?o:[o]]));const Ns=(t,e)=>{const n=A.forwardRef(({className:r,...s},o)=>A.createElement(jZ,{ref:o,iconNode:e,className:K6(`lucide-${zZ(t)}`,r),...s}));return n.displayName=`${t}`,n};const zM=Ns("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const HZ=Ns("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const $Z=Ns("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);const qZ=Ns("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);const WZ=Ns("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);const GZ=Ns("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const VZ=Ns("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const KZ=Ns("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);const YZ=Ns("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const ZZ=Ns("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const XZ=Ns("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);const ph=Ns("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Y6(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=Y6(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Z6(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=Y6(t))&&(r&&(r+=" "),r+=e);return r}const zA="-",QZ=t=>{const e=eX(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const u=a.split(zA);return u[0]===""&&u.length!==1&&u.shift(),X6(u,e)||JZ(a)},getConflictingClassGroupIds:(a,u)=>{const c=n[a]||[];return u&&r[a]?[...c,...r[a]]:c}}},X6=(t,e)=>{if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?X6(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const o=t.join(zA);return e.validators.find(({validator:a})=>a(o))?.classGroupId},BM=/^\[(.+)\]$/,JZ=t=>{if(BM.test(t)){const e=BM.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},eX=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return nX(Object.entries(t.classGroups),n).forEach(([o,a])=>{L_(a,r,o,e)}),r},L_=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const o=s===""?e:jM(e,s);o.classGroupId=n;return}if(typeof s=="function"){if(tX(s)){L_(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{L_(a,jM(e,o),n,r)})})},jM=(t,e)=>{let n=t;return e.split(zA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},tX=t=>t.isThemeGetter,nX=(t,e)=>e?t.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,u])=>[e+a,u])):o);return[n,s]}):t,rX=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(o,a)=>{n.set(o,a),e++,e>t&&(e=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return s(o,a),a},set(o,a){n.has(o)?n.set(o,a):s(o,a)}}},Q6="!",sX=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],o=e.length,a=u=>{const c=[];let f=0,p=0,g;for(let C=0;C<u.length;C++){let w=u[C];if(f===0){if(w===s&&(r||u.slice(C,C+o)===e)){c.push(u.slice(p,C)),p=C+o;continue}if(w==="/"){g=C;continue}}w==="["?f++:w==="]"&&f--}const m=c.length===0?u:u.substring(p),y=m.startsWith(Q6),S=y?m.substring(1):m,E=g&&g>p?g-p:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:E}};return n?u=>n({className:u,parseClassName:a}):a},oX=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},iX=t=>({cache:rX(t.cacheSize),parseClassName:sX(t),...QZ(t)}),aX=/\s+/,lX=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,o=[],a=t.trim().split(aX);let u="";for(let c=a.length-1;c>=0;c-=1){const f=a[c],{modifiers:p,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:y}=n(f);let S=!!y,E=r(S?m.substring(0,y):m);if(!E){if(!S){u=f+(u.length>0?" "+u:u);continue}if(E=r(m),!E){u=f+(u.length>0?" "+u:u);continue}S=!1}const C=oX(p).join(":"),w=g?C+Q6:C,x=w+E;if(o.includes(x))continue;o.push(x);const T=s(E,S);for(let R=0;R<T.length;++R){const M=T[R];o.push(w+M)}u=f+(u.length>0?" "+u:u)}return u};function uX(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=J6(e))&&(r&&(r+=" "),r+=n);return r}const J6=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=J6(t[r]))&&(n&&(n+=" "),n+=e);return n};function cX(t,...e){let n,r,s,o=a;function a(c){const f=e.reduce((p,g)=>g(p),t());return n=iX(f),r=n.cache.get,s=n.cache.set,o=u,u(c)}function u(c){const f=r(c);if(f)return f;const p=lX(c,n);return s(c,p),p}return function(){return o(uX.apply(null,arguments))}}const Yt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},e8=/^\[(?:([a-z-]+):)?(.+)\]$/i,dX=/^\d+\/\d+$/,fX=new Set(["px","full","screen"]),hX=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pX=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gX=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mX=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vX=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ei=t=>Ac(t)||fX.has(t)||dX.test(t),ca=t=>id(t,"length",xX),Ac=t=>!!t&&!Number.isNaN(Number(t)),H1=t=>id(t,"number",Ac),vf=t=>!!t&&Number.isInteger(Number(t)),yX=t=>t.endsWith("%")&&Ac(t.slice(0,-1)),et=t=>e8.test(t),da=t=>hX.test(t),bX=new Set(["length","size","percentage"]),SX=t=>id(t,bX,t8),EX=t=>id(t,"position",t8),CX=new Set(["image","url"]),wX=t=>id(t,CX,TX),_X=t=>id(t,"",AX),yf=()=>!0,id=(t,e,n)=>{const r=e8.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},xX=t=>pX.test(t)&&!gX.test(t),t8=()=>!1,AX=t=>mX.test(t),TX=t=>vX.test(t),RX=()=>{const t=Yt("colors"),e=Yt("spacing"),n=Yt("blur"),r=Yt("brightness"),s=Yt("borderColor"),o=Yt("borderRadius"),a=Yt("borderSpacing"),u=Yt("borderWidth"),c=Yt("contrast"),f=Yt("grayscale"),p=Yt("hueRotate"),g=Yt("invert"),m=Yt("gap"),y=Yt("gradientColorStops"),S=Yt("gradientColorStopPositions"),E=Yt("inset"),C=Yt("margin"),w=Yt("opacity"),x=Yt("padding"),T=Yt("saturate"),R=Yt("scale"),M=Yt("sepia"),O=Yt("skew"),I=Yt("space"),P=Yt("translate"),k=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",et,e],B=()=>[et,e],W=()=>["",ei,ca],Y=()=>["auto",Ac,et],ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>["start","end","center","between","around","evenly","stretch"],de=()=>["","0",et],Ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[Ac,et];return{cacheSize:500,separator:":",theme:{colors:[yf],spacing:[ei,ca],blur:["none","",da,et],brightness:L(),borderColor:[t],borderRadius:["none","","full",da,et],borderSpacing:B(),borderWidth:W(),contrast:L(),grayscale:de(),hueRotate:L(),invert:de(),gap:B(),gradientColorStops:[t],gradientColorStopPositions:[yX,ca],inset:F(),margin:F(),opacity:L(),padding:B(),saturate:L(),scale:L(),sepia:de(),skew:L(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",et]}],container:["container"],columns:[{columns:[da]}],"break-after":[{"break-after":Ae()}],"break-before":[{"break-before":Ae()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ne(),et]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vf,et]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",et]}],grow:[{grow:de()}],shrink:[{shrink:de()}],order:[{order:["first","last","none",vf,et]}],"grid-cols":[{"grid-cols":[yf]}],"col-start-end":[{col:["auto",{span:["full",vf,et]},et]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[yf]}],"row-start-end":[{row:["auto",{span:[vf,et]},et]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",et]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",et]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...fe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...fe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...fe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",et,e]}],"min-w":[{"min-w":[et,e,"min","max","fit"]}],"max-w":[{"max-w":[et,e,"none","full","min","max","fit","prose",{screen:[da]},da]}],h:[{h:[et,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[et,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[et,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[et,e,"auto","min","max","fit"]}],"font-size":[{text:["base",da,ca]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",H1]}],"font-family":[{font:[yf]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",et]}],"line-clamp":[{"line-clamp":["none",Ac,H1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ei,et]}],"list-image":[{"list-image":["none",et]}],"list-style-type":[{list:["none","disc","decimal",et]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ei,ca]}],"underline-offset":[{"underline-offset":["auto",ei,et]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",et]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",et]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ne(),EX]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",SX]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wX]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:$()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[ei,et]}],"outline-w":[{outline:[ei,ca]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[ei,ca]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",da,_X]}],"shadow-color":[{shadow:[yf]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",da,et]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[T]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",et]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",et]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",et]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[vf,et]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",et]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",et]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",et]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ei,ca,H1]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},n8=cX(RX);function dn(...t){return n8(Z6(t))}const IX=1024,OX=1280;function NX(t,e=IX,n=OX){const r=t>=e;return{nav:r,reading:r,intelligence:t>=n}}function MX(t){const e=A.useRef(null),[n,r]=A.useState(t??null);return A.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const o=new ResizeObserver(a=>{const u=a[0];u&&r(u.contentRect.width)});return o.observe(s),r(s.getBoundingClientRect().width),()=>o.disconnect()},[]),[e,n]}const PX=[{id:"all",label:"All"},{id:"personal",label:"Personal"},{id:"uncategorized",label:"Unclassified"},{id:"newsletter",label:"Newsletters"},{id:"marketing",label:"Marketing"},{id:"automated",label:"Automated"},{id:"transactional",label:"Transactional"},{id:"social",label:"Social"}],kX={uncategorized:"neutral",personal:"accent",newsletter:"neutral",marketing:"neutral",automated:"neutral",transactional:"positive",social:"warning"};function DX({open:t,onClose:e,title:n,titleId:r="dialog-title",children:s,className:o,anchor:a="center"}){const u=A.useRef(null),c=A.useCallback(m=>{m.key==="Escape"&&(m.preventDefault(),m.stopImmediatePropagation(),e())},[e]);if(A.useEffect(()=>{if(t)return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[t,c]),A.useEffect(()=>{if(!t)return;const m=u.current;if(!m)return;m.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')[0]?.focus()},[t]),!t)return null;const f=a==="left",p=a==="right",g=f||p;return D.jsxs("div",{className:dn("fixed inset-0 z-50 flex",f?"items-stretch justify-start":p?"items-stretch justify-end":"items-center justify-center px-4"),role:"presentation",onClick:e,children:[D.jsx("div",{className:dn("absolute inset-0",!g&&"bg-canvas/80")}),D.jsxs("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":r,className:dn("relative z-10 overflow-hidden border-line bg-surface shadow-xl",f?"h-full w-72 max-w-[85vw] border-r":p?"h-full w-[80vw] max-w-[320px] border-l":"w-full max-w-lg rounded-md border",o),onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),children:[D.jsx("h2",{id:r,className:"sr-only",children:n}),s]})]})}const xy=A.createContext(null);xy.displayName="PanelGroupContext";const mn={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},BA=10,Rl=A.useLayoutEffect,HM=q6.useId,LX=typeof HM=="function"?HM:()=>null;let UX=0;function jA(t=null){const e=LX(),n=A.useRef(t||e||null);return n.current===null&&(n.current=""+UX++),t??n.current}function r8({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:o,id:a,maxSize:u,minSize:c,onCollapse:f,onExpand:p,onResize:g,order:m,style:y,tagName:S="div",...E}){const C=A.useContext(xy);if(C===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:x,getPanelSize:T,getPanelStyle:R,groupId:M,isPanelCollapsed:O,reevaluatePanelConstraints:I,registerPanel:P,resizePanel:k,unregisterPanel:H}=C,F=jA(a),B=A.useRef({callbacks:{onCollapse:f,onExpand:p,onResize:g},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:u,minSize:c},id:F,idIsFromProps:a!==void 0,order:m});A.useRef({didLogMissingDefaultSizeWarning:!1}),Rl(()=>{const{callbacks:Y,constraints:ne}=B.current,$={...ne};B.current.id=F,B.current.idIsFromProps=a!==void 0,B.current.order=m,Y.onCollapse=f,Y.onExpand=p,Y.onResize=g,ne.collapsedSize=n,ne.collapsible=r,ne.defaultSize=s,ne.maxSize=u,ne.minSize=c,($.collapsedSize!==ne.collapsedSize||$.collapsible!==ne.collapsible||$.maxSize!==ne.maxSize||$.minSize!==ne.minSize)&&I(B.current,$)}),Rl(()=>{const Y=B.current;return P(Y),()=>{H(Y)}},[m,F,P,H]),A.useImperativeHandle(o,()=>({collapse:()=>{w(B.current)},expand:Y=>{x(B.current,Y)},getId(){return F},getSize(){return T(B.current)},isCollapsed(){return O(B.current)},isExpanded(){return!O(B.current)},resize:Y=>{k(B.current,Y)}}),[w,x,T,O,F,k]);const W=R(B.current,s);return A.createElement(S,{...E,children:t,className:e,id:F,style:{...W,...y},[mn.groupId]:M,[mn.panel]:"",[mn.panelCollapsible]:r||void 0,[mn.panelId]:F,[mn.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const s8=A.forwardRef((t,e)=>A.createElement(r8,{...t,forwardedRef:e}));r8.displayName="Panel";s8.displayName="forwardRef(Panel)";let U_=null,Wm=-1,Ea=null;function FX(t,e){if(e){const n=(e&u8)!==0,r=(e&c8)!==0,s=(e&d8)!==0,o=(e&f8)!==0;if(n)return s?"se-resize":o?"ne-resize":"e-resize";if(r)return s?"sw-resize":o?"nw-resize":"w-resize";if(s)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function zX(){Ea!==null&&(document.head.removeChild(Ea),U_=null,Ea=null,Wm=-1)}function $1(t,e){var n,r;const s=FX(t,e);if(U_!==s){if(U_=s,Ea===null&&(Ea=document.createElement("style"),document.head.appendChild(Ea)),Wm>=0){var o;(o=Ea.sheet)===null||o===void 0||o.removeRule(Wm)}Wm=(n=(r=Ea.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function o8(t){return t.type==="keydown"}function i8(t){return t.type.startsWith("pointer")}function a8(t){return t.type.startsWith("mouse")}function Ay(t){if(i8(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(a8(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function BX(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function jX(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function HX(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:WM(t),b:WM(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;tt(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:qM($M(n.a)),b:qM($M(n.b))};if(s.a===s.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let u=o.length;for(;u--;){const c=o[u];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(s.a-s.b)}const $X=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function qX(t){var e;const n=getComputedStyle((e=l8(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function WX(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||qX(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||$X.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function $M(t){let e=t.length;for(;e--;){const n=t[e];if(tt(n,"Missing node"),WX(n))return n}return null}function qM(t){return t&&Number(getComputedStyle(t).zIndex)||0}function WM(t){const e=[];for(;t;)e.push(t),t=l8(t);return e}function l8(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const u8=1,c8=2,d8=4,f8=8,GX=BX()==="coarse";let Ys=[],Tc=!1,El=new Map,Ty=new Map;const gh=new Set;function VX(t,e,n,r,s){var o;const{ownerDocument:a}=e,u={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(o=El.get(a))!==null&&o!==void 0?o:0;return El.set(a,c+1),gh.add(u),mv(),function(){var p;Ty.delete(t),gh.delete(u);const g=(p=El.get(a))!==null&&p!==void 0?p:1;if(El.set(a,g-1),mv(),g===1&&El.delete(a),Ys.includes(u)){const m=Ys.indexOf(u);m>=0&&Ys.splice(m,1),$A(),s("up",!0,null)}}}function KX(t){const{target:e}=t,{x:n,y:r}=Ay(t);Tc=!0,HA({target:e,x:n,y:r}),mv(),Ys.length>0&&(vv("down",t),t.preventDefault(),h8(e)||t.stopImmediatePropagation())}function q1(t){const{x:e,y:n}=Ay(t);if(Tc&&t.buttons===0&&(Tc=!1,vv("up",t)),!Tc){const{target:r}=t;HA({target:r,x:e,y:n})}vv("move",t),$A(),Ys.length>0&&t.preventDefault()}function W1(t){const{target:e}=t,{x:n,y:r}=Ay(t);Ty.clear(),Tc=!1,Ys.length>0&&(t.preventDefault(),h8(e)||t.stopImmediatePropagation()),vv("up",t),HA({target:e,x:n,y:r}),$A(),mv()}function h8(t){let e=t;for(;e;){if(e.hasAttribute(mn.resizeHandle))return!0;e=e.parentElement}return!1}function HA({target:t,x:e,y:n}){Ys.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),gh.forEach(s=>{const{element:o,hitAreaMargins:a}=s,u=o.getBoundingClientRect(),{bottom:c,left:f,right:p,top:g}=u,m=GX?a.coarse:a.fine;if(e>=f-m&&e<=p+m&&n>=g-m&&n<=c+m){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&HX(r,o)>0){let S=r,E=!1;for(;S&&!S.contains(o);){if(jX(S.getBoundingClientRect(),u)){E=!0;break}S=S.parentElement}if(E)return}Ys.push(s)}})}function G1(t,e){Ty.set(t,e)}function $A(){let t=!1,e=!1;Ys.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;Ty.forEach(r=>{n|=r}),t&&e?$1("intersection",n):t?$1("horizontal",n):e?$1("vertical",n):zX()}let V1=new AbortController;function mv(){V1.abort(),V1=new AbortController;const t={capture:!0,signal:V1.signal};gh.size&&(Tc?(Ys.length>0&&El.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",W1,t),r.addEventListener("pointerleave",q1,t),r.addEventListener("pointermove",q1,t))}),window.addEventListener("pointerup",W1,t),window.addEventListener("pointercancel",W1,t)):El.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",KX,t),r.addEventListener("pointermove",q1,t))}))}function vv(t,e){gh.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ys.includes(n);r(t,s,e)})}function YX(){const[t,e]=A.useState(0);return A.useCallback(()=>e(n=>n+1),[])}function tt(t,e){if(!t)throw console.error(e),Error(e)}function Fl(t,e,n=BA){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function li(t,e,n=BA){return Fl(t,e,n)===0}function ss(t,e,n){return Fl(t,e,n)===0}function ZX(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const s=t[r],o=e[r];if(!ss(s,o,n))return!1}return!0}function vc({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];tt(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:s=0,collapsible:o,maxSize:a=100,minSize:u=0}=r;if(Fl(n,u)<0)if(o){const c=(s+u)/2;Fl(n,c)<0?n=s:n=u}else n=u;return n=Math.min(a,n),n=parseFloat(n.toFixed(BA)),n}function Bf({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:o}){if(ss(t,0))return e;const a=[...e],[u,c]=r;tt(u!=null,"Invalid first pivot index"),tt(c!=null,"Invalid second pivot index");let f=0;if(o==="keyboard"){{const g=t<0?c:u,m=n[g];tt(m,`Panel constraints not found for index ${g}`);const{collapsedSize:y=0,collapsible:S,minSize:E=0}=m;if(S){const C=e[g];if(tt(C!=null,`Previous layout not found for panel index ${g}`),ss(C,y)){const w=E-C;Fl(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}{const g=t<0?u:c,m=n[g];tt(m,`No panel constraints found for index ${g}`);const{collapsedSize:y=0,collapsible:S,minSize:E=0}=m;if(S){const C=e[g];if(tt(C!=null,`Previous layout not found for panel index ${g}`),ss(C,E)){const w=C-y;Fl(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}}{const g=t<0?1:-1;let m=t<0?c:u,y=0;for(;;){const E=e[m];tt(E!=null,`Previous layout not found for panel index ${m}`);const w=vc({panelConstraints:n,panelIndex:m,size:100})-E;if(y+=w,m+=g,m<0||m>=n.length)break}const S=Math.min(Math.abs(t),Math.abs(y));t=t<0?0-S:S}{let m=t<0?u:c;for(;m>=0&&m<n.length;){const y=Math.abs(t)-Math.abs(f),S=e[m];tt(S!=null,`Previous layout not found for panel index ${m}`);const E=S-y,C=vc({panelConstraints:n,panelIndex:m,size:E});if(!ss(S,C)&&(f+=S-C,a[m]=C,f.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?m--:m++}}if(ZX(s,a))return s;{const g=t<0?c:u,m=e[g];tt(m!=null,`Previous layout not found for panel index ${g}`);const y=m+f,S=vc({panelConstraints:n,panelIndex:g,size:y});if(a[g]=S,!ss(S,y)){let E=y-S,w=t<0?c:u;for(;w>=0&&w<n.length;){const x=a[w];tt(x!=null,`Previous layout not found for panel index ${w}`);const T=x+E,R=vc({panelConstraints:n,panelIndex:w,size:T});if(ss(x,R)||(E-=R-x,a[w]=R),ss(E,0))break;t>0?w--:w++}}}const p=a.reduce((g,m)=>m+g,0);return ss(p,100)?a:s}function XX({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,o=0,a=0;const u=n[0];tt(u!=null,"No pivot index found"),e.forEach((g,m)=>{const{constraints:y}=g,{maxSize:S=100,minSize:E=0}=y;m===u?(r=E,s=S):(o+=E,a+=S)});const c=Math.min(s,100-o),f=Math.max(r,100-a),p=t[u];return{valueMax:c,valueMin:f,valueNow:p}}function mh(t,e=document){return Array.from(e.querySelectorAll(`[${mn.resizeHandleId}][data-panel-group-id="${t}"]`))}function p8(t,e,n=document){const s=mh(t,n).findIndex(o=>o.getAttribute(mn.resizeHandleId)===e);return s??null}function g8(t,e,n){const r=p8(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function m8(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Ry(t,e=document){const n=e.querySelector(`[${mn.resizeHandleId}="${t}"]`);return n||null}function QX(t,e,n,r=document){var s,o,a,u;const c=Ry(e,r),f=mh(t,r),p=c?f.indexOf(c):-1,g=(s=(o=n[p])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,m=(a=(u=n[p+1])===null||u===void 0?void 0:u.id)!==null&&a!==void 0?a:null;return[g,m]}function JX({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:o,setLayout:a}){A.useRef({didWarnAboutMissingResizeHandle:!1}),Rl(()=>{if(!o)return;const u=mh(n,o);for(let c=0;c<s.length-1;c++){const{valueMax:f,valueMin:p,valueNow:g}=XX({layout:r,panelsArray:s,pivotIndices:[c,c+1]}),m=u[c];if(m!=null){const y=s[c];tt(y,`No panel data found for index "${c}"`),m.setAttribute("aria-controls",y.id),m.setAttribute("aria-valuemax",""+Math.round(f)),m.setAttribute("aria-valuemin",""+Math.round(p)),m.setAttribute("aria-valuenow",g!=null?""+Math.round(g):"")}}return()=>{u.forEach((c,f)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,o]),A.useEffect(()=>{if(!o)return;const u=e.current;tt(u,"Eager values not found");const{panelDataArray:c}=u,f=m8(n,o);tt(f!=null,`No group found for id "${n}"`);const p=mh(n,o);tt(p,`No resize handles found for group id "${n}"`);const g=p.map(m=>{const y=m.getAttribute(mn.resizeHandleId);tt(y,"Resize handle element has no handle id attribute");const[S,E]=QX(n,y,c,o);if(S==null||E==null)return()=>{};const C=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const x=c.findIndex(T=>T.id===S);if(x>=0){const T=c[x];tt(T,`No panel data found for index ${x}`);const R=r[x],{collapsedSize:M=0,collapsible:O,minSize:I=0}=T.constraints;if(R!=null&&O){const P=Bf({delta:ss(R,M)?I-M:M-R,initialLayout:r,panelConstraints:c.map(k=>k.constraints),pivotIndices:g8(n,y,o),prevLayout:r,trigger:"keyboard"});r!==P&&a(P)}}break}}};return m.addEventListener("keydown",C),()=>{m.removeEventListener("keydown",C)}});return()=>{g.forEach(m=>m())}},[o,t,e,n,r,s,a])}function GM(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function v8(t,e){const n=t==="horizontal",{x:r,y:s}=Ay(e);return n?r:s}function eQ(t,e,n,r,s){const o=n==="horizontal",a=Ry(e,s);tt(a,`No resize handle element found for id "${e}"`);const u=a.getAttribute(mn.groupId);tt(u,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const f=v8(n,t),p=m8(u,s);tt(p,`No group element found for id "${u}"`);const g=p.getBoundingClientRect(),m=o?g.width:g.height;return(f-c)/m*100}function tQ(t,e,n,r,s,o){if(o8(t)){const a=n==="horizontal";let u=0;t.shiftKey?u=100:s!=null?u=s:u=10;let c=0;switch(t.key){case"ArrowDown":c=a?0:u;break;case"ArrowLeft":c=a?-u:0;break;case"ArrowRight":c=a?u:0;break;case"ArrowUp":c=a?0:-u;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:eQ(t,e,n,r,o)}function nQ({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,s=100;for(let o=0;o<t.length;o++){const a=n[o];tt(a,`Panel constraints not found for index ${o}`);const{defaultSize:u}=a;u!=null&&(r++,e[o]=u,s-=u)}for(let o=0;o<t.length;o++){const a=n[o];tt(a,`Panel constraints not found for index ${o}`);const{defaultSize:u}=a;if(u!=null)continue;const c=t.length-r,f=s/c;r++,e[o]=f,s-=f}return e}function Ku(t,e,n){e.forEach((r,s)=>{const o=t[s];tt(o,`Panel data not found for index ${s}`);const{callbacks:a,constraints:u,id:c}=o,{collapsedSize:f=0,collapsible:p}=u,g=n[c];if(g==null||r!==g){n[c]=r;const{onCollapse:m,onExpand:y,onResize:S}=a;S&&S(r,g),p&&(m||y)&&(y&&(g==null||li(g,f))&&!li(r,f)&&y(),m&&(g==null||!li(g,f))&&li(r,f)&&m())}})}function zg(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function rQ({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:s,precision:o=3}){const a=n[s];let u;return a==null?u=t!=null?t.toPrecision(o):"1":r.length===1?u="1":u=a.toPrecision(o),{flexBasis:0,flexGrow:u,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function sQ(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function VM(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function y8(t){return`react-resizable-panels:${t}`}function b8(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:o}=e;return s?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function S8(t,e){try{const n=y8(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function oQ(t,e,n){var r,s;const o=(r=S8(t,n))!==null&&r!==void 0?r:{},a=b8(e);return(s=o[a])!==null&&s!==void 0?s:null}function iQ(t,e,n,r,s){var o;const a=y8(t),u=b8(e),c=(o=S8(t,s))!==null&&o!==void 0?o:{};c[u]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(a,JSON.stringify(c))}catch(f){console.error(f)}}function KM({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,a)=>o+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!ss(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=100/r*a;n[o]=u}let s=0;for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=vc({panelConstraints:e,panelIndex:o,size:a});a!=u&&(s+=a-u,n[o]=u)}if(!ss(s,0))for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=a+s,c=vc({panelConstraints:e,panelIndex:o,size:u});if(a!==c&&(s-=c-a,n[o]=c,ss(s,0)))break}return n}const aQ=100,jf={getItem:t=>(VM(jf),jf.getItem(t)),setItem:(t,e)=>{VM(jf),jf.setItem(t,e)}},YM={};function E8({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:o=null,onLayout:a=null,keyboardResizeBy:u=null,storage:c=jf,style:f,tagName:p="div",...g}){const m=jA(o),y=A.useRef(null),[S,E]=A.useState(null),[C,w]=A.useState([]),x=YX(),T=A.useRef({}),R=A.useRef(new Map),M=A.useRef(0),O=A.useRef({autoSaveId:t,direction:r,dragState:S,id:m,keyboardResizeBy:u,onLayout:a,storage:c}),I=A.useRef({layout:C,panelDataArray:[],panelDataArrayChanged:!1});A.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),A.useImperativeHandle(s,()=>({getId:()=>O.current.id,getLayout:()=>{const{layout:K}=I.current;return K},setLayout:K=>{const{onLayout:J}=O.current,{layout:oe,panelDataArray:he}=I.current,ue=KM({layout:K,panelConstraints:he.map(ve=>ve.constraints)});GM(oe,ue)||(w(ue),I.current.layout=ue,J&&J(ue),Ku(he,ue,T.current))}}),[]),Rl(()=>{O.current.autoSaveId=t,O.current.direction=r,O.current.dragState=S,O.current.id=m,O.current.onLayout=a,O.current.storage=c}),JX({committedValuesRef:O,eagerValuesRef:I,groupId:m,layout:C,panelDataArray:I.current.panelDataArray,setLayout:w,panelGroupElement:y.current}),A.useEffect(()=>{const{panelDataArray:K}=I.current;if(t){if(C.length===0||C.length!==K.length)return;let J=YM[t];J==null&&(J=sQ(iQ,aQ),YM[t]=J);const oe=[...K],he=new Map(R.current);J(t,oe,he,C,c)}},[t,C,c]),A.useEffect(()=>{});const P=A.useCallback(K=>{const{onLayout:J}=O.current,{layout:oe,panelDataArray:he}=I.current;if(K.constraints.collapsible){const ue=he.map(Ee=>Ee.constraints),{collapsedSize:ve=0,panelSize:_e,pivotIndices:Xe}=ml(he,K,oe);if(tt(_e!=null,`Panel size not found for panel "${K.id}"`),!li(_e,ve)){R.current.set(K.id,_e);const pt=uc(he,K)===he.length-1?_e-ve:ve-_e,Ce=Bf({delta:pt,initialLayout:oe,panelConstraints:ue,pivotIndices:Xe,prevLayout:oe,trigger:"imperative-api"});zg(oe,Ce)||(w(Ce),I.current.layout=Ce,J&&J(Ce),Ku(he,Ce,T.current))}}},[]),k=A.useCallback((K,J)=>{const{onLayout:oe}=O.current,{layout:he,panelDataArray:ue}=I.current;if(K.constraints.collapsible){const ve=ue.map(ze=>ze.constraints),{collapsedSize:_e=0,panelSize:Xe=0,minSize:Ee=0,pivotIndices:pt}=ml(ue,K,he),Ce=J??Ee;if(li(Xe,_e)){const ze=R.current.get(K.id),Be=ze!=null&&ze>=Ce?ze:Ce,pr=uc(ue,K)===ue.length-1?Xe-Be:Be-Xe,Et=Bf({delta:pr,initialLayout:he,panelConstraints:ve,pivotIndices:pt,prevLayout:he,trigger:"imperative-api"});zg(he,Et)||(w(Et),I.current.layout=Et,oe&&oe(Et),Ku(ue,Et,T.current))}}},[]),H=A.useCallback(K=>{const{layout:J,panelDataArray:oe}=I.current,{panelSize:he}=ml(oe,K,J);return tt(he!=null,`Panel size not found for panel "${K.id}"`),he},[]),F=A.useCallback((K,J)=>{const{panelDataArray:oe}=I.current,he=uc(oe,K);return rQ({defaultSize:J,dragState:S,layout:C,panelData:oe,panelIndex:he})},[S,C]),B=A.useCallback(K=>{const{layout:J,panelDataArray:oe}=I.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=ml(oe,K,J);return tt(ve!=null,`Panel size not found for panel "${K.id}"`),ue===!0&&li(ve,he)},[]),W=A.useCallback(K=>{const{layout:J,panelDataArray:oe}=I.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=ml(oe,K,J);return tt(ve!=null,`Panel size not found for panel "${K.id}"`),!ue||Fl(ve,he)>0},[]),Y=A.useCallback(K=>{const{panelDataArray:J}=I.current;J.push(K),J.sort((oe,he)=>{const ue=oe.order,ve=he.order;return ue==null&&ve==null?0:ue==null?-1:ve==null?1:ue-ve}),I.current.panelDataArrayChanged=!0,x()},[x]);Rl(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:K,onLayout:J,storage:oe}=O.current,{layout:he,panelDataArray:ue}=I.current;let ve=null;if(K){const Xe=oQ(K,ue,oe);Xe&&(R.current=new Map(Object.entries(Xe.expandToSizes)),ve=Xe.layout)}ve==null&&(ve=nQ({panelDataArray:ue}));const _e=KM({layout:ve,panelConstraints:ue.map(Xe=>Xe.constraints)});GM(he,_e)||(w(_e),I.current.layout=_e,J&&J(_e),Ku(ue,_e,T.current))}}),Rl(()=>{const K=I.current;return()=>{K.layout=[]}},[]);const ne=A.useCallback(K=>{let J=!1;const oe=y.current;return oe&&window.getComputedStyle(oe,null).getPropertyValue("direction")==="rtl"&&(J=!0),function(ue){ue.preventDefault();const ve=y.current;if(!ve)return()=>null;const{direction:_e,dragState:Xe,id:Ee,keyboardResizeBy:pt,onLayout:Ce}=O.current,{layout:ze,panelDataArray:Be}=I.current,{initialLayout:He}=Xe??{},pr=g8(Ee,K,ve);let Et=tQ(ue,K,_e,Xe,pt,ve);const Gr=_e==="horizontal";Gr&&J&&(Et=-Et);const Wn=Be.map(Ar=>Ar.constraints),xr=Bf({delta:Et,initialLayout:He??ze,panelConstraints:Wn,pivotIndices:pr,prevLayout:ze,trigger:o8(ue)?"keyboard":"mouse-or-touch"}),to=!zg(ze,xr);(i8(ue)||a8(ue))&&M.current!=Et&&(M.current=Et,!to&&Et!==0?Gr?G1(K,Et<0?u8:c8):G1(K,Et<0?d8:f8):G1(K,0)),to&&(w(xr),I.current.layout=xr,Ce&&Ce(xr),Ku(Be,xr,T.current))}},[]),$=A.useCallback((K,J)=>{const{onLayout:oe}=O.current,{layout:he,panelDataArray:ue}=I.current,ve=ue.map(ze=>ze.constraints),{panelSize:_e,pivotIndices:Xe}=ml(ue,K,he);tt(_e!=null,`Panel size not found for panel "${K.id}"`);const pt=uc(ue,K)===ue.length-1?_e-J:J-_e,Ce=Bf({delta:pt,initialLayout:he,panelConstraints:ve,pivotIndices:Xe,prevLayout:he,trigger:"imperative-api"});zg(he,Ce)||(w(Ce),I.current.layout=Ce,oe&&oe(Ce),Ku(ue,Ce,T.current))},[]),ee=A.useCallback((K,J)=>{const{layout:oe,panelDataArray:he}=I.current,{collapsedSize:ue=0,collapsible:ve}=J,{collapsedSize:_e=0,collapsible:Xe,maxSize:Ee=100,minSize:pt=0}=K.constraints,{panelSize:Ce}=ml(he,K,oe);Ce!=null&&(ve&&Xe&&li(Ce,ue)?li(ue,_e)||$(K,_e):Ce<pt?$(K,pt):Ce>Ee&&$(K,Ee))},[$]),fe=A.useCallback((K,J)=>{const{direction:oe}=O.current,{layout:he}=I.current;if(!y.current)return;const ue=Ry(K,y.current);tt(ue,`Drag handle element not found for id "${K}"`);const ve=v8(oe,J);E({dragHandleId:K,dragHandleRect:ue.getBoundingClientRect(),initialCursorPosition:ve,initialLayout:he})},[]),de=A.useCallback(()=>{E(null)},[]),Ae=A.useCallback(K=>{const{panelDataArray:J}=I.current,oe=uc(J,K);oe>=0&&(J.splice(oe,1),delete T.current[K.id],I.current.panelDataArrayChanged=!0,x())},[x]),L=A.useMemo(()=>({collapsePanel:P,direction:r,dragState:S,expandPanel:k,getPanelSize:H,getPanelStyle:F,groupId:m,isPanelCollapsed:B,isPanelExpanded:W,reevaluatePanelConstraints:ee,registerPanel:Y,registerResizeHandle:ne,resizePanel:$,startDragging:fe,stopDragging:de,unregisterPanel:Ae,panelGroupElement:y.current}),[P,S,r,k,H,F,m,B,W,ee,Y,ne,$,fe,de,Ae]),V={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return A.createElement(xy.Provider,{value:L},A.createElement(p,{...g,children:e,className:n,id:o,ref:y,style:{...V,...f},[mn.group]:"",[mn.groupDirection]:r,[mn.groupId]:m}))}const C8=A.forwardRef((t,e)=>A.createElement(E8,{...t,forwardedRef:e}));E8.displayName="PanelGroup";C8.displayName="forwardRef(PanelGroup)";function uc(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function ml(t,e,n){const r=uc(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function lQ({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){A.useEffect(()=>{if(t||n==null||r==null)return;const s=Ry(e,r);if(s==null)return;const o=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const u=s.getAttribute(mn.groupId);tt(u,`No group element found for id "${u}"`);const c=mh(u,r),f=p8(u,e,r);tt(f!==null,`No resize element found for id "${e}"`);const p=a.shiftKey?f>0?f-1:c.length-1:f+1<c.length?f+1:0;c[p].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[r,t,e,n])}function w8({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:o,onClick:a,onDragging:u,onFocus:c,onPointerDown:f,onPointerUp:p,style:g={},tabIndex:m=0,tagName:y="div",...S}){var E,C;const w=A.useRef(null),x=A.useRef({onClick:a,onDragging:u,onPointerDown:f,onPointerUp:p});A.useEffect(()=>{x.current.onClick=a,x.current.onDragging=u,x.current.onPointerDown=f,x.current.onPointerUp=p});const T=A.useContext(xy);if(T===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:R,groupId:M,registerResizeHandle:O,startDragging:I,stopDragging:P,panelGroupElement:k}=T,H=jA(s),[F,B]=A.useState("inactive"),[W,Y]=A.useState(!1),[ne,$]=A.useState(null),ee=A.useRef({state:F});Rl(()=>{ee.current.state=F}),A.useEffect(()=>{if(n)$(null);else{const L=O(H);$(()=>L)}},[n,H,O]);const fe=(E=r?.coarse)!==null&&E!==void 0?E:15,de=(C=r?.fine)!==null&&C!==void 0?C:5;A.useEffect(()=>{if(n||ne==null)return;const L=w.current;tt(L,"Element ref not attached");let V=!1;return VX(H,L,R,{coarse:fe,fine:de},(J,oe,he)=>{if(!oe){B("inactive");return}switch(J){case"down":{B("drag"),V=!1,tt(he,'Expected event to be defined for "down" action'),I(H,he);const{onDragging:ue,onPointerDown:ve}=x.current;ue?.(!0),ve?.();break}case"move":{const{state:ue}=ee.current;V=!0,ue!=="drag"&&B("hover"),tt(he,'Expected event to be defined for "move" action'),ne(he);break}case"up":{B("hover"),P();const{onClick:ue,onDragging:ve,onPointerUp:_e}=x.current;ve?.(!1),_e?.(),V||ue?.();break}}})},[fe,R,n,de,O,H,ne,I,P]),lQ({disabled:n,handleId:H,resizeHandler:ne,panelGroupElement:k});const Ae={touchAction:"none",userSelect:"none"};return A.createElement(y,{...S,children:t,className:e,id:s,onBlur:()=>{Y(!1),o?.()},onFocus:()=>{Y(!0),c?.()},ref:w,role:"separator",style:{...Ae,...g},tabIndex:m,[mn.groupDirection]:R,[mn.groupId]:M,[mn.resizeHandle]:"",[mn.resizeHandleActive]:F==="drag"?"pointer":W?"keyboard":void 0,[mn.resizeHandleEnabled]:!n,[mn.resizeHandleId]:H,[mn.resizeHandleState]:F})}w8.displayName="PanelResizeHandle";function uQ({className:t,...e}){return D.jsx(C8,{className:dn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}const Bg=s8;function K1({className:t,...e}){return D.jsx(w8,{className:dn("relative w-px shrink-0 bg-line transition-colors cursor-col-resize","after:absolute after:inset-y-0 after:left-1/2 after:w-1.5 after:-translate-x-1/2","data-[resize-handle-state=hover]:bg-line-strong","data-[resize-handle-state=drag]:bg-accent","focus-visible:outline-none focus-visible:bg-accent",t),...e})}const _8=A.createContext(null);function xxe(){return A.useContext(_8)}function Axe({nav:t,list:e,reading:n,intelligence:r,intelligenceOpen:s=!0,hasThread:o=!0,density:a="comfortable",header:u,topBar:c,overlay:f,skeleton:p,isLoading:g=!1,initialWidth:m,navOpen:y,onOpenNav:S,onCloseNav:E}){const[C,w]=MX(m),x=NX(w??0),T=x.nav,R=x.reading&&!!n,M=x.intelligence,[O,I]=A.useState(!1),P=y!==void 0,k=P?y:O,H=()=>{P||I(!0),S?.()},F=()=>{P||I(!1),E?.()},B=M&&s&&o&&!!r,W={panes:x,containerWidth:w,showNavPane:T,openNav:H,showReadingPane:R,showIntelligencePane:M};return D.jsx(_8.Provider,{value:W,children:D.jsx("div",{ref:C,className:"@container flex h-dvh w-full flex-col overflow-hidden bg-canvas font-sans text-fg",children:g&&p?p:D.jsxs(D.Fragment,{children:[c,!T&&u&&D.jsx("div",{className:"shrink-0",children:u}),D.jsxs(uQ,{direction:"horizontal",className:"min-h-0 flex-1",children:[T&&D.jsxs(D.Fragment,{children:[D.jsx(Bg,{id:"nav",order:1,defaultSize:17,minSize:12,maxSize:24,className:"min-w-0",children:t}),D.jsx(K1,{})]}),D.jsx(Bg,{id:"list",order:2,defaultSize:R?a==="compact"?36:27:83,minSize:18,maxSize:R?48:88,className:"min-w-0",children:e}),R&&D.jsxs(D.Fragment,{children:[D.jsx(K1,{}),D.jsx(Bg,{id:"reading",order:3,minSize:24,className:"min-w-0",children:n})]}),B&&D.jsxs(D.Fragment,{children:[D.jsx(K1,{}),D.jsx(Bg,{id:"intelligence",order:4,defaultSize:21,minSize:15,maxSize:32,className:"min-w-0",children:r})]})]}),!T&&D.jsx(DX,{open:k,onClose:F,title:"Folders",anchor:"left",children:t}),f]})})})}const cQ="inline-flex items-center justify-center gap-2 rounded-md font-medium whitespace-nowrap transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface disabled:opacity-50 disabled:pointer-events-none",dQ={primary:"bg-accent text-accent-fg hover:bg-accent-hover",secondary:"bg-surface text-fg border border-line hover:bg-surface-sunken hover:border-line-strong",ghost:"text-fg-muted hover:bg-surface-sunken hover:text-fg",danger:"bg-danger text-accent-fg hover:opacity-90"},fQ={sm:"h-7 px-2.5 text-xs",md:"h-9 px-3.5 text-sm",touch:"h-11 w-11 text-sm"};function Gm({variant:t="primary",size:e="md",icon:n,className:r,children:s,...o}){return D.jsxs("button",{type:"button",className:dn(cQ,dQ[t],fQ[e],r),...o,children:[n,s]})}const hQ={neutral:"bg-surface-sunken text-fg-muted",accent:"bg-accent-2-soft text-accent-2",positive:"bg-surface-sunken text-positive",warning:"bg-surface-sunken text-warning",danger:"bg-danger-soft text-danger"},pQ={neutral:"bg-fg-subtle",accent:"bg-accent-2",positive:"bg-positive",warning:"bg-warning",danger:"bg-danger"};function ZM({tone:t="neutral",dot:e,className:n,children:r,...s}){return D.jsxs("span",{className:dn("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-2xs font-medium",hQ[t],n),...s,children:[e&&D.jsx("span",{className:dn("size-1.5 rounded-full",pQ[t])}),r]})}const XM=10;function gQ({section:t,Row:e,selectedThreadId:n,initialExpanded:r=!1,initialCollapsed:s=!1,onSelectThread:o}){const[a,u]=A.useState(r),[c,f]=A.useState(s),p=t.threads.length>XM,m=!a&&p?t.threads.slice(0,XM):t.threads,y=t.threads.length-m.length;return D.jsxs("div",{children:[t.label&&D.jsxs("button",{type:"button","aria-expanded":!c,onClick:()=>f(S=>!S),className:"sticky top-0 z-10 flex h-section-row w-full items-center gap-1.5 border-b border-line bg-surface-sunken px-row-inset text-left transition-colors hover:bg-surface",children:[D.jsx("span",{className:"flex-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:t.label}),D.jsx("span",{className:"text-2xs text-fg-subtle tabular-nums",children:t.threads.length}),D.jsx(zM,{className:dn("size-3 shrink-0 text-fg-subtle transition-transform duration-200",c?"rotate-0":"rotate-180")})]}),!c&&D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"divide-y divide-line",children:m.map(S=>D.jsx(e,{thread:S,active:S.id===n,onClick:()=>o?.(S.id)},S.id))}),p&&D.jsxs("button",{type:"button",onClick:()=>u(S=>!S),className:"flex w-full items-center justify-center border-b border-line px-row-inset py-1.5 text-2xs font-medium text-accent transition-colors hover:bg-surface",children:[a?"Show less":`Show ${y} more`,!a&&D.jsx(zM,{className:"ml-1 size-3"})]})]})]})}function mQ(t){return t.target!==t.currentTarget?!1:t.key==="Enter"||t.key===" "}function vQ({className:t}){return D.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:D.jsx("path",{d:"M2 4l4 4 4-4"})})}function QM({className:t}){return D.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:D.jsx("path",{d:"M3 3l6 6M9 3l-6 6"})})}function yQ({categories:t,filters:e,sources:n,sourcesNote:r,selectedCategory:s,activeFilters:o,expanded:a,onSelectCategory:u,onSelectSource:c,onToggleFilter:f,onClear:p,onExpandedChange:g,children:m}){const y=a!==void 0,[S,E]=A.useState(!1),C=y?a:S,w=A.useCallback(ne=>{y||E(ne),g?.(ne)},[y,g]),x=t[0],T=x!==void 0&&s===x.id,R=n?.[0],M=n?.find(ne=>ne.active),O=R===void 0||M?.id===R.id,I=!T||o.size>0||!O&&!!M,P=A.useCallback(()=>{R&&c?.(R.id)},[R,c]),k=A.useCallback(()=>{p(),P()},[p,P]),H=t.find(ne=>ne.id===s),F=I?D.jsxs(D.Fragment,{children:[!O&&M&&D.jsx("span",{className:"inline-flex items-center rounded-full border border-accent-2 bg-accent-2-soft px-2 py-0.5 text-2xs font-medium text-accent-2",children:M.label}),!T&&H&&D.jsx(ZM,{tone:H.tone??"neutral",children:H.label}),e.filter(ne=>o.has(ne.id)).map(ne=>D.jsx("span",{className:"inline-flex items-center rounded-full border border-accent-2 bg-accent-2-soft px-2 py-0.5 text-2xs font-medium text-accent-2",children:ne.label},ne.id))]}):D.jsx("span",{className:"text-2xs text-fg-subtle",children:"Filters"}),B=n&&n.length>1&&D.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-2 pt-2",children:[n.map(ne=>D.jsxs("button",{type:"button",onClick:()=>c?.(ne.id),className:dn("flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",ne.active?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:[ne.label,ne.count!=null&&ne.count>0&&D.jsx("span",{className:"tabular-nums opacity-70",children:ne.count})]},ne.id)),r&&D.jsx("span",{className:"ml-auto shrink-0 text-2xs text-fg-subtle",children:r})]}),W=D.jsx("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-1.5 pt-1.5",children:t.map(ne=>{const $=s===ne.id;return D.jsx("button",{type:"button",onClick:()=>u(ne.id),className:dn("shrink-0 rounded-full transition-opacity",$?"opacity-100 ring-1 ring-accent-2":"opacity-60 hover:opacity-100"),children:D.jsx(ZM,{tone:ne.tone??"neutral",children:ne.label})},ne.id)})}),Y=D.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-2 pt-1.5",children:[e.map(ne=>{const $=o.has(ne.id);return D.jsx("button",{type:"button",onClick:()=>f(ne.id),className:dn("shrink-0 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",$?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:ne.label},ne.id)}),I&&D.jsxs("button",{type:"button",onClick:k,className:"ml-auto flex items-center gap-1 px-1 text-2xs text-fg-subtle hover:text-fg-muted",children:[D.jsx(QM,{className:"size-3"}),"Clear"]})]});return D.jsxs("div",{className:"flex h-full w-full flex-col overflow-hidden",children:[D.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":C,"aria-label":C?"Collapse filters":"Expand filters",onClick:()=>w(!C),onKeyDown:ne=>{mQ(ne)&&(ne.preventDefault(),w(!C))},className:"flex h-section-row w-full shrink-0 cursor-pointer items-center gap-1.5 overflow-x-hidden border-b border-line bg-surface-sunken px-row-inset text-left hover:bg-surface",children:[F,I&&D.jsx("button",{type:"button","aria-label":"Clear filters",onClick:ne=>{ne.stopPropagation(),k()},className:"flex size-6 items-center justify-center text-fg-subtle hover:text-fg-muted",children:D.jsx(QM,{className:"size-3"})}),D.jsx(vQ,{className:dn("ml-auto size-3 shrink-0 text-fg-subtle transition-transform duration-200",C?"rotate-180":"rotate-0")})]}),C&&D.jsxs("div",{className:"shrink-0",children:[B,W,Y]}),D.jsx("div",{className:"flex-1 overflow-y-auto",children:m})]})}function bQ(t){return t.sentDate!=null?new Date(t.sentDate).toDateString()===new Date().toDateString():/^\d{1,2}:\d{2}$/.test(t.timeLabel)}const x8=[{id:"unread",label:"Unread",match:t=>!t.isRead},{id:"attachment",label:"Has attachment",match:t=>!!t.hasAttachment},{id:"contacts",label:"From contacts",match:t=>t.trust==="vip"||t.trust==="wellknown"},{id:"today",label:"Today",match:bQ}],SQ=x8.map(({id:t,label:e})=>({id:t,label:e}));function Txe({sections:t,briefCategory:e="all",selectedThreadId:n,Row:r,onSelectThread:s,onSelectBriefCategory:o,sources:a,sourcesNote:u,onSelectSource:c,defaultExpanded:f=!1}){const[p,g]=A.useState(new Set),[m,y]=A.useState(f),S=k=>{g(H=>{const F=new Set(H);return F.has(k)?F.delete(k):F.add(k),F})},E=x8.filter(k=>p.has(k.id)),C=k=>(e==="all"||k.category===e)&&E.every(H=>H.match(k)),w=e==="all",x=t.map(k=>({...k,threads:k.threads.filter(C)})).filter(k=>k.threads.length>0),T=t.flatMap(k=>k.threads).filter(C),R=PX.map(k=>({id:k.id,label:k.label,tone:k.id==="all"?"neutral":kX[k.id]})),M=SQ,O=()=>{o?.("all"),g(new Set)},I=w?x.length===0:T.length===0,P=D.jsxs(D.Fragment,{children:[w?x.map(k=>D.jsx(gQ,{section:k,Row:r,selectedThreadId:n,onSelectThread:s},k.id)):D.jsx("div",{className:"divide-y divide-line",children:T.map(k=>D.jsx(r,{thread:k,active:k.id===n,onClick:()=>s?.(k.id)},k.id))}),I&&D.jsx("div",{className:"px-row-inset py-6 text-center text-2xs text-fg-subtle",children:"No threads match these filters."})]});return D.jsx(yQ,{categories:R,filters:M,sources:a,sourcesNote:u,selectedCategory:e,activeFilters:p,expanded:m,onExpandedChange:y,onSelectCategory:k=>o?.(k),onSelectSource:c,onToggleFilter:k=>S(k),onClear:O,children:P})}const EQ={info:"bg-accent-2/15 text-accent-2 border-accent-2/40",success:"bg-positive/15 text-positive border-positive/40",warning:"bg-warning/15 text-warning border-warning/40",danger:"bg-danger/15 text-danger border-danger/40"},CQ={info:"bg-surface-sunken text-fg-muted",success:"bg-positive/10 text-positive",warning:"bg-warning/10 text-warning",danger:"bg-danger-soft text-danger"},wQ={info:"status",success:"status",warning:"alert",danger:"alert"};function F_({tone:t="info",variant:e="framed",onDismiss:n,role:r,className:s,children:o,...a}){const u=e==="soft";return D.jsxs("div",{role:r??wQ[t],className:dn("flex gap-2 px-3 py-2 text-sm",u?dn("items-start rounded-md",CQ[t]):dn("items-center border",EQ[t]),s),...a,children:[D.jsx("div",{className:"flex-1 min-w-0",children:o}),n&&(u?D.jsx(Gm,{variant:"ghost",size:"sm",icon:D.jsx(ph,{className:"size-3.5"}),onClick:n,"aria-label":"Dismiss",className:"-mr-1 shrink-0"}):D.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"shrink-0 rounded-md p-1 hover:bg-fg/10 transition-colors",children:D.jsx(ph,{className:"size-4","aria-hidden":"true"})}))]})}const _Q={default:dn("flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken px-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors"),inline:"flex items-center gap-2 bg-transparent text-sm"};function Y1({icon:t,className:e,variant:n="default",ref:r,...s}){return D.jsxs("div",{className:dn(_Q[n],e),children:[t&&D.jsx("span",{className:"text-fg-subtle shrink-0",children:t}),D.jsx("input",{ref:r,className:"min-w-0 flex-1 bg-transparent text-fg placeholder:text-fg-subtle outline-none",...s})]})}function JM(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function xQ(t){if(Array.isArray(t))return t}function AQ(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,o,a,u=[],c=!0,f=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(p){f=!0,s=p}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw s}}return u}}function TQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
13
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RQ(t,e){return xQ(t)||AQ(t,e)||IQ(t,e)||TQ()}function IQ(t,e){if(t){if(typeof t=="string")return JM(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?JM(t,e):void 0}}const A8=Object.entries,eP=Object.setPrototypeOf,OQ=Object.isFrozen,NQ=Object.getPrototypeOf,MQ=Object.getOwnPropertyDescriptor;let tr=Object.freeze,rr=Object.seal,cc=Object.create,T8=typeof Reflect<"u"&&Reflect,z_=T8.apply,B_=T8.construct;tr||(tr=function(e){return e});rr||(rr=function(e){return e});z_||(z_=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return e.apply(n,s)});B_||(B_=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new e(...r)});const Yu=Tn(Array.prototype.forEach),PQ=Tn(Array.prototype.lastIndexOf),tP=Tn(Array.prototype.pop),Zu=Tn(Array.prototype.push),kQ=Tn(Array.prototype.splice),Ca=Array.isArray,Hf=Tn(String.prototype.toLowerCase),Z1=Tn(String.prototype.toString),nP=Tn(String.prototype.match),bf=Tn(String.prototype.replace),rP=Tn(String.prototype.indexOf),DQ=Tn(String.prototype.trim),LQ=Tn(Number.prototype.toString),UQ=Tn(Boolean.prototype.toString),sP=typeof BigInt>"u"?null:Tn(BigInt.prototype.toString),oP=typeof Symbol>"u"?null:Tn(Symbol.prototype.toString),zn=Tn(Object.prototype.hasOwnProperty),Sf=Tn(Object.prototype.toString),Un=Tn(RegExp.prototype.test),vl=FQ(TypeError);function Tn(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return z_(t,e,r)}}function FQ(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return B_(t,n)}}function mt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hf;if(eP&&eP(t,null),!Ca(e))return t;let r=e.length;for(;r--;){let s=e[r];if(typeof s=="string"){const o=n(s);o!==s&&(OQ(e)||(e[r]=o),s=o)}t[s]=!0}return t}function zQ(t){for(let e=0;e<t.length;e++)zn(t,e)||(t[e]=null);return t}function br(t){const e=cc(null);for(const r of A8(t)){var n=RQ(r,2);const s=n[0],o=n[1];zn(t,s)&&(Ca(o)?e[s]=zQ(o):o&&typeof o=="object"&&o.constructor===Object?e[s]=br(o):e[s]=o)}return e}function BQ(t){switch(typeof t){case"string":return t;case"number":return LQ(t);case"boolean":return UQ(t);case"bigint":return sP?sP(t):"0";case"symbol":return oP?oP(t):"Symbol()";case"undefined":return Sf(t);case"function":case"object":{if(t===null)return Sf(t);const e=t,n=mo(e,"toString");if(typeof n=="function"){const r=n(e);return typeof r=="string"?r:Sf(r)}return Sf(t)}default:return Sf(t)}}function mo(t,e){for(;t!==null;){const r=MQ(t,e);if(r){if(r.get)return Tn(r.get);if(typeof r.value=="function")return Tn(r.value)}t=NQ(t)}function n(){return null}return n}function jQ(t){try{return Un(t,""),!0}catch{return!1}}const iP=tr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),X1=tr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Q1=tr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),HQ=tr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),J1=tr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$Q=tr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),aP=tr(["#text"]),lP=tr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),eS=tr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),uP=tr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jg=tr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qQ=rr(/{{[\w\W]*|^[\w\W]*}}/g),WQ=rr(/<%[\w\W]*|^[\w\W]*%>/g),GQ=rr(/\${[\w\W]*/g),VQ=rr(/^data-[\-\w.\u00B7-\uFFFF]+$/),KQ=rr(/^aria-[\-\w]+$/),cP=rr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),YQ=rr(/^(?:\w+script|data):/i),ZQ=rr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),XQ=rr(/^html$/i),QQ=rr(/^[a-z][.\w]*(-[.\w]+)+$/i),dP=rr(/<[/\w!]/g),fP=rr(/<[/\w]/g),JQ=rr(/<\/no(script|embed|frames)/i),eJ=rr(/\/>/i),ns={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},tJ=function(){return typeof window>"u"?null:window},nJ=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},hP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},fa=function(e,n,r,s){return zn(e,n)&&Ca(e[n])?mt(s.base?br(s.base):{},e[n],s.transform):r};function R8(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tJ();const e=pe=>R8(pe);if(e.version="3.4.12",e.removed=[],!t||!t.document||t.document.nodeType!==ns.document||!t.Element)return e.isSupported=!1,e;let n=t.document;const r=n,s=r.currentScript;t.DocumentFragment;const o=t.HTMLTemplateElement,a=t.Node,u=t.Element,c=t.NodeFilter,f=t.NamedNodeMap;f===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const p=t.DOMParser,g=t.trustedTypes,m=u.prototype,y=mo(m,"cloneNode"),S=mo(m,"remove"),E=mo(m,"nextSibling"),C=mo(m,"childNodes"),w=mo(m,"parentNode"),x=mo(m,"shadowRoot"),T=mo(m,"attributes"),R=a&&a.prototype?mo(a.prototype,"nodeType"):null,M=a&&a.prototype?mo(a.prototype,"nodeName"):null;if(typeof o=="function"){const pe=n.createElement("template");pe.content&&pe.content.ownerDocument&&(n=pe.content.ownerDocument)}let O,I="",P,k=!1,H=0;const F=function(){if(H>0)throw vl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},B=function(U){F(),H++;try{return O.createHTML(U)}finally{H--}},W=function(U){F(),H++;try{return O.createScriptURL(U)}finally{H--}},Y=function(){return k||(P=nJ(g,s),k=!0),P},ne=n,$=ne.implementation,ee=ne.createNodeIterator,fe=ne.createDocumentFragment,de=ne.getElementsByTagName,Ae=r.importNode;let L=hP();e.isSupported=typeof A8=="function"&&typeof w=="function"&&$&&$.createHTMLDocument!==void 0;const V=qQ,K=WQ,J=GQ,oe=VQ,he=KQ,ue=YQ,ve=ZQ,_e=QQ;let Xe=cP,Ee=null;const pt=mt({},[...iP,...X1,...Q1,...J1,...aP]);let Ce=null;const ze=mt({},[...lP,...eS,...uP,...jg]);let Be=Object.seal(cc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),He=null,pr=null;const Et=Object.seal(cc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Gr=!0,Wn=!0,xr=!1,to=!0,Ar=!1,Gt=!0,gt=!1,vn=!1,Tr=null,no=null,hd=!1,ko=!1,cu=!1,du=!1,Mi=!0,ir=!1;const Ps="user-content-";let Gn=!0,pd=!1,Pi={},hs=null;const ki=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Va=null;const Ka=mt({},["audio","video","img","source","image","track"]);let ks=null;const Ya=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ro="http://www.w3.org/1998/Math/MathML",fu="http://www.w3.org/2000/svg",Vr="http://www.w3.org/1999/xhtml";let so=Vr,Do=!1,gd=null;const pp=mt({},[ro,fu,Vr],Z1),md=tr(["mi","mo","mn","ms","mtext"]);let hu=mt({},md);const pu=tr(["annotation-xml"]);let Za=mt({},pu);const gp=mt({},["title","style","font","a","script"]);let Di=null;const oo=["application/xhtml+xml","text/html"],In="text/html";let nt=null,Kr=null;const vd=n.createElement("form"),mp=function(U){return U instanceof RegExp||U instanceof Function},yd=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Kr&&Kr===U)return;(!U||typeof U!="object")&&(U={}),U=br(U),Di=oo.indexOf(U.PARSER_MEDIA_TYPE)===-1?In:U.PARSER_MEDIA_TYPE,nt=Di==="application/xhtml+xml"?Z1:Hf,Ee=fa(U,"ALLOWED_TAGS",pt,{transform:nt}),Ce=fa(U,"ALLOWED_ATTR",ze,{transform:nt}),gd=fa(U,"ALLOWED_NAMESPACES",pp,{transform:Z1}),ks=fa(U,"ADD_URI_SAFE_ATTR",Ya,{transform:nt,base:Ya}),Va=fa(U,"ADD_DATA_URI_TAGS",Ka,{transform:nt,base:Ka}),hs=fa(U,"FORBID_CONTENTS",ki,{transform:nt}),He=fa(U,"FORBID_TAGS",br({}),{transform:nt}),pr=fa(U,"FORBID_ATTR",br({}),{transform:nt}),Pi=zn(U,"USE_PROFILES")?U.USE_PROFILES&&typeof U.USE_PROFILES=="object"?br(U.USE_PROFILES):U.USE_PROFILES:!1,Gr=U.ALLOW_ARIA_ATTR!==!1,Wn=U.ALLOW_DATA_ATTR!==!1,xr=U.ALLOW_UNKNOWN_PROTOCOLS||!1,to=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ar=U.SAFE_FOR_TEMPLATES||!1,Gt=U.SAFE_FOR_XML!==!1,gt=U.WHOLE_DOCUMENT||!1,ko=U.RETURN_DOM||!1,cu=U.RETURN_DOM_FRAGMENT||!1,du=U.RETURN_TRUSTED_TYPE||!1,hd=U.FORCE_BODY||!1,Mi=U.SANITIZE_DOM!==!1,ir=U.SANITIZE_NAMED_PROPS||!1,Gn=U.KEEP_CONTENT!==!1,pd=U.IN_PLACE||!1,Xe=jQ(U.ALLOWED_URI_REGEXP)?U.ALLOWED_URI_REGEXP:cP,so=typeof U.NAMESPACE=="string"?U.NAMESPACE:Vr,hu=zn(U,"MATHML_TEXT_INTEGRATION_POINTS")&&U.MATHML_TEXT_INTEGRATION_POINTS&&typeof U.MATHML_TEXT_INTEGRATION_POINTS=="object"?br(U.MATHML_TEXT_INTEGRATION_POINTS):mt({},md),Za=zn(U,"HTML_INTEGRATION_POINTS")&&U.HTML_INTEGRATION_POINTS&&typeof U.HTML_INTEGRATION_POINTS=="object"?br(U.HTML_INTEGRATION_POINTS):mt({},pu);const Z=zn(U,"CUSTOM_ELEMENT_HANDLING")&&U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING=="object"?br(U.CUSTOM_ELEMENT_HANDLING):cc(null);if(Be=cc(null),zn(Z,"tagNameCheck")&&mp(Z.tagNameCheck)&&(Be.tagNameCheck=Z.tagNameCheck),zn(Z,"attributeNameCheck")&&mp(Z.attributeNameCheck)&&(Be.attributeNameCheck=Z.attributeNameCheck),zn(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(Be.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),rr(Be),Ar&&(Wn=!1),cu&&(ko=!0),Pi&&(Ee=mt({},aP),Ce=cc(null),Pi.html===!0&&(mt(Ee,iP),mt(Ce,lP)),Pi.svg===!0&&(mt(Ee,X1),mt(Ce,eS),mt(Ce,jg)),Pi.svgFilters===!0&&(mt(Ee,Q1),mt(Ce,eS),mt(Ce,jg)),Pi.mathMl===!0&&(mt(Ee,J1),mt(Ce,uP),mt(Ce,jg))),Et.tagCheck=null,Et.attributeCheck=null,zn(U,"ADD_TAGS")&&(typeof U.ADD_TAGS=="function"?Et.tagCheck=U.ADD_TAGS:Ca(U.ADD_TAGS)&&(Ee===pt&&(Ee=br(Ee)),mt(Ee,U.ADD_TAGS,nt))),zn(U,"ADD_ATTR")&&(typeof U.ADD_ATTR=="function"?Et.attributeCheck=U.ADD_ATTR:Ca(U.ADD_ATTR)&&(Ce===ze&&(Ce=br(Ce)),mt(Ce,U.ADD_ATTR,nt))),zn(U,"ADD_URI_SAFE_ATTR")&&Ca(U.ADD_URI_SAFE_ATTR)&&mt(ks,U.ADD_URI_SAFE_ATTR,nt),zn(U,"FORBID_CONTENTS")&&Ca(U.FORBID_CONTENTS)&&(hs===ki&&(hs=br(hs)),mt(hs,U.FORBID_CONTENTS,nt)),zn(U,"ADD_FORBID_CONTENTS")&&Ca(U.ADD_FORBID_CONTENTS)&&(hs===ki&&(hs=br(hs)),mt(hs,U.ADD_FORBID_CONTENTS,nt)),Gn&&(Ee["#text"]=!0),gt&&mt(Ee,["html","head","body"]),Ee.table&&(mt(Ee,["tbody"]),delete He.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw vl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw vl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ce=O;O=U.TRUSTED_TYPES_POLICY;try{I=B("")}catch(Te){throw O=ce,Te}}else U.TRUSTED_TYPES_POLICY===null?(O=void 0,I=""):(O===void 0&&(O=Y()),O&&typeof I=="string"&&(I=B("")));tr&&tr(U),Kr=U},bd=mt({},[...X1,...Q1,...HQ]),Li=mt({},[...J1,...$Q]),Sd=function(U,Z,ce){return Z.namespaceURI===Vr?U==="svg":Z.namespaceURI===ro?U==="svg"&&(ce==="annotation-xml"||hu[ce]):!!bd[U]},Ui=function(U,Z,ce){return Z.namespaceURI===Vr?U==="math":Z.namespaceURI===fu?U==="math"&&Za[ce]:!!Li[U]},Fi=function(U,Z,ce){return Z.namespaceURI===fu&&!Za[ce]||Z.namespaceURI===ro&&!hu[ce]?!1:!Li[U]&&(gp[U]||!bd[U])},Xa=function(U){let Z=w(U);(!Z||!Z.tagName)&&(Z={namespaceURI:so,tagName:"template"});const ce=Hf(U.tagName),Te=Hf(Z.tagName);return gd[U.namespaceURI]?U.namespaceURI===fu?Sd(ce,Z,Te):U.namespaceURI===ro?Ui(ce,Z,Te):U.namespaceURI===Vr?Fi(ce,Z,Te):!!(Di==="application/xhtml+xml"&&gd[U.namespaceURI]):!1},gr=function(U){Zu(e.removed,{element:U});try{w(U).removeChild(U)}catch{if(S(U),!w(U))throw vl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},an=function(U){Ds(U);const Z=C(U);if(Z){const Te=[];Yu(Z,ke=>{Zu(Te,ke)}),Yu(Te,ke=>{try{S(ke)}catch{}})}const ce=T(U);if(ce)for(let Te=ce.length-1;Te>=0;--Te){const ke=ce[Te],Ue=ke&&ke.name;if(typeof Ue=="string")try{U.removeAttribute(Ue)}catch{}}},io=function(U,Z){try{Zu(e.removed,{attribute:Z.getAttributeNode(U),from:Z})}catch{Zu(e.removed,{attribute:null,from:Z})}if(Z.removeAttribute(U),U==="is")if(ko||cu)try{gr(Z)}catch{}else try{Z.setAttribute(U,"")}catch{}},vp=function(U){const Z=T(U);if(Z)for(let ce=Z.length-1;ce>=0;--ce){const Te=Z[ce],ke=Te&&Te.name;if(!(typeof ke!="string"||Ce[nt(ke)]))try{U.removeAttribute(ke)}catch{}}},Ds=function(U){const Z=[U];for(;Z.length>0;){const ce=Z.pop();(R?R(ce):ce.nodeType)===ns.element&&vp(ce);const ke=C(ce);if(ke)for(let Ue=ke.length-1;Ue>=0;--Ue)Z.push(ke[Ue])}},zi=function(U){if(!Gt)return;const Z=[U];for(;Z.length>0;){const ce=Z.pop(),Te=R?R(ce):ce.nodeType;if(Te===ns.processingInstruction||Te===ns.comment&&Un(fP,ce.data)){try{S(ce)}catch{}continue}if(Te===ns.element){const Ue=ce,en=nt(M?M(ce):ce.nodeName);try{Ue.hasAttribute&&Ue.hasAttribute("patchsrc")&&Ue.removeAttribute("patchsrc"),Ue.hasAttribute&&Ue.hasAttribute("for")&&en!=="label"&&en!=="output"&&Ue.removeAttribute("for")}catch{}}const ke=C(ce);if(ke)for(let Ue=ke.length-1;Ue>=0;--Ue)Z.push(ke[Ue])}},yp=function(U){let Z=null,ce=null;if(hd)U="<remove></remove>"+U;else{const Ue=nP(U,/^[\r\n\t ]+/);ce=Ue&&Ue[0]}Di==="application/xhtml+xml"&&so===Vr&&(U='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+U+"</body></html>");const Te=O?B(U):U;if(so===Vr)try{Z=new p().parseFromString(Te,Di)}catch{}if(!Z||!Z.documentElement){Z=$.createDocument(so,"template",null);try{Z.documentElement.innerHTML=Do?I:Te}catch{}}const ke=Z.body||Z.documentElement;return U&&ce&&ke.insertBefore(n.createTextNode(ce),ke.childNodes[0]||null),so===Vr?de.call(Z,gt?"html":"body")[0]:gt?Z.documentElement:ke},Ed=function(U){return ee.call(U.ownerDocument||U,U,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Qa=function(U){return U=bf(U,V," "),U=bf(U,K," "),U=bf(U,J," "),U},Cd=function(U){var Z;U.normalize();const ce=ee.call(U.ownerDocument||U,U,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Te=ce.nextNode();for(;Te;)Te.data=Qa(Te.data),Te=ce.nextNode();const ke=(Z=U.querySelectorAll)===null||Z===void 0?void 0:Z.call(U,"template");ke&&Yu(ke,Ue=>{Ls(Ue.content)&&Cd(Ue.content)})},Lo=function(U){const Z=M?M(U):null;return typeof Z!="string"||nt(Z)!=="form"?!1:typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||U.attributes!==T(U)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function"||U.nodeType!==R(U)||U.childNodes!==C(U)},Ls=function(U){if(!R||typeof U!="object"||U===null)return!1;try{return R(U)===ns.documentFragment}catch{return!1}},mr=function(U){if(!R||typeof U!="object"||U===null)return!1;try{return typeof R(U)=="number"}catch{return!1}};function ln(pe,U,Z){pe.length!==0&&Yu(pe,ce=>{ce.call(e,U,Z,Kr)})}const bp=function(U,Z){return!!(Gt&&U.hasChildNodes()&&!mr(U.firstElementChild)&&Un(dP,U.textContent)&&Un(dP,U.innerHTML)||Gt&&U.namespaceURI===Vr&&Z==="style"&&mr(U.firstElementChild)||U.nodeType===ns.processingInstruction||Gt&&U.nodeType===ns.comment&&Un(fP,U.data))},Tb=function(U,Z){if(!He[Z]&&Sp(Z)&&(Be.tagNameCheck instanceof RegExp&&Un(Be.tagNameCheck,Z)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(Z)))return!1;if(Gn&&!hs[Z]){const ce=w(U),Te=C(U);if(Te&&ce){const ke=Te.length;for(let Ue=ke-1;Ue>=0;--Ue){const en=pd?Te[Ue]:y(Te[Ue],!0);ce.insertBefore(en,E(U))}}}return gr(U),!0},gu=function(U,Z){if(ln(L.beforeSanitizeElements,U,null),U!==Z&&w(U)===null)return!0;if(Lo(U))return gr(U),!0;const ce=nt(M?M(U):U.nodeName);if(ln(L.uponSanitizeElement,U,{tagName:ce,allowedTags:Ee}),U!==Z&&w(U)===null)return!0;if(bp(U,ce))return gr(U),!0;if(He[ce]||!(Et.tagCheck instanceof Function&&Et.tagCheck(ce))&&!Ee[ce]){const ke=Tb(U,ce);return ke===!1&&ln(L.afterSanitizeElements,U,null),ke}if((R?R(U):U.nodeType)===ns.element&&!Xa(U)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&Un(JQ,U.innerHTML))return gr(U),!0;if(Ar&&U.nodeType===ns.text){const ke=Qa(U.textContent);U.textContent!==ke&&(Zu(e.removed,{element:U.cloneNode()}),U.textContent=ke)}return ln(L.afterSanitizeElements,U,null),!1},wd=function(U,Z,ce){if(pr[Z]||Gt&&Z==="patchsrc"||Gt&&Z==="for"&&U!=="label"&&U!=="output"||Mi&&(Z==="id"||Z==="name")&&(ce in n||ce in vd))return!1;const Te=Ce[Z]||Et.attributeCheck instanceof Function&&Et.attributeCheck(Z,U);if(!(Wn&&Un(oe,Z))){if(!(Gr&&Un(he,Z))){if(Te){if(!ks[Z]){if(!Un(Xe,bf(ce,ve,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&U!=="script"&&rP(ce,"data:")===0&&Va[U])){if(!(xr&&!Un(ue,bf(ce,ve,"")))){if(ce)return!1}}}}}else if(!(Sp(U)&&(Be.tagNameCheck instanceof RegExp&&Un(Be.tagNameCheck,U)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(U))&&(Be.attributeNameCheck instanceof RegExp&&Un(Be.attributeNameCheck,Z)||Be.attributeNameCheck instanceof Function&&Be.attributeNameCheck(Z,U))||Z==="is"&&Be.allowCustomizedBuiltInElements&&(Be.tagNameCheck instanceof RegExp&&Un(Be.tagNameCheck,ce)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(ce))))return!1}}return!0},mu=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Sp=function(U){return!mu[Hf(U)]&&Un(_e,U)},Rr=function(U,Z,ce,Te){if(O&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ce)switch(g.getAttributeType(U,Z)){case"TrustedHTML":return B(Te);case"TrustedScriptURL":return W(Te)}return Te},_d=function(U,Z,ce,Te){try{ce?U.setAttributeNS(ce,Z,Te):U.setAttribute(Z,Te),Lo(U)?gr(U):tP(e.removed)}catch{io(Z,U)}},xd=function(U){ln(L.beforeSanitizeAttributes,U,null);const Z=U.attributes;if(!Z||Lo(U))return;const ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce,forceKeepAttr:void 0};let Te=Z.length;const ke=nt(U.nodeName);for(;Te--;){const Ue=Z[Te],en=Ue.name,Dn=Ue.namespaceURI,ar=Ue.value,tn=nt(en),vr=ar;let On=en==="value"?vr:DQ(vr);if(ce.attrName=tn,ce.attrValue=On,ce.keepAttr=!0,ce.forceKeepAttr=void 0,ln(L.uponSanitizeAttribute,U,ce),On=ce.attrValue,ir&&(tn==="id"||tn==="name")&&rP(On,Ps)!==0&&(io(en,U),On=Ps+On),Gt&&Un(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,On)){io(en,U);continue}if(tn==="attributename"&&nP(On,"href")){io(en,U);continue}if(!ce.forceKeepAttr){if(!ce.keepAttr){io(en,U);continue}if(!to&&Un(eJ,On)){io(en,U);continue}if(Ar&&(On=Qa(On)),!wd(ke,tn,On)){io(en,U);continue}On=Rr(ke,tn,Dn,On),On!==vr&&_d(U,en,Dn,On)}}ln(L.afterSanitizeAttributes,U,null)},Bi=function(U){let Z=null;const ce=Ed(U);for(ln(L.beforeSanitizeShadowDOM,U,null);Z=ce.nextNode();)if(ln(L.uponSanitizeShadowNode,Z,null),gu(Z,U),xd(Z),Ls(Z.content)&&Bi(Z.content),(R?R(Z):Z.nodeType)===ns.element){const ke=x(Z);Ls(ke)&&(ao(ke),Bi(ke))}ln(L.afterSanitizeShadowDOM,U,null)},ao=function(U){const Z=[{node:U,shadow:null}];for(;Z.length>0;){const ce=Z.pop();if(ce.shadow){Bi(ce.shadow);continue}const Te=ce.node,Ue=(R?R(Te):Te.nodeType)===ns.element,en=C(Te);if(en)for(let Dn=en.length-1;Dn>=0;--Dn)Z.push({node:en[Dn],shadow:null});if(Ue){const Dn=M?M(Te):null;if(typeof Dn=="string"&&nt(Dn)==="template"){const ar=Te.content;Ls(ar)&&Z.push({node:ar,shadow:null})}}if(Ue){const Dn=x(Te);Ls(Dn)&&Z.push({node:null,shadow:Dn},{node:Dn,shadow:null})}}};return e.sanitize=function(pe){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,ce=null,Te=null,ke=null;if(Do=!pe,Do&&(pe="<!-->"),typeof pe!="string"&&!mr(pe)&&(pe=BQ(pe),typeof pe!="string"))throw vl("dirty is not a string, aborting");if(!e.isSupported)return pe;vn?(Ee=Tr,Ce=no):yd(U),(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&(Ee=br(Ee)),L.uponSanitizeAttribute.length>0&&(Ce=br(Ce)),e.removed=[];const Ue=pd&&typeof pe!="string"&&mr(pe);if(Ue){zi(pe);const tn=M?M(pe):pe.nodeName;if(typeof tn=="string"){const vr=nt(tn);if(!Ee[vr]||He[vr])throw an(pe),vl("root node is forbidden and cannot be sanitized in-place")}if(Lo(pe))throw an(pe),vl("root node is clobbered and cannot be sanitized in-place");try{ao(pe)}catch(vr){throw an(pe),vr}}else if(mr(pe))Z=yp("<!---->"),ce=Z.ownerDocument.importNode(pe,!0),ce.nodeType===ns.element&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?Z=ce:Z.appendChild(ce),ao(ce);else{if(!ko&&!Ar&&!gt&&pe.indexOf("<")===-1)return O&&du?B(pe):pe;if(Z=yp(pe),!Z)return ko?null:du?I:""}Z&&hd&&gr(Z.firstChild);const en=Ue?pe:Z,Dn=Ed(en);try{for(;Te=Dn.nextNode();)gu(Te,en),xd(Te),Ls(Te.content)&&Bi(Te.content)}catch(tn){throw Ue&&(an(pe),Yu(e.removed,vr=>{vr.element&&Ds(vr.element)})),tn}if(Ue)return Yu(e.removed,tn=>{tn.element&&Ds(tn.element)}),Ar&&Cd(pe),pe;if(ko){if(Ar&&Cd(Z),cu)for(ke=fe.call(Z.ownerDocument);Z.firstChild;)ke.appendChild(Z.firstChild);else ke=Z;return(Ce.shadowroot||Ce.shadowrootmode)&&(ke=Ae.call(r,ke,!0)),ke}let ar=gt?Z.outerHTML:Z.innerHTML;return gt&&Ee["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&Un(XQ,Z.ownerDocument.doctype.name)&&(ar="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
|
|
14
|
+
`+ar),Ar&&(ar=Qa(ar)),O&&du?B(ar):ar},e.setConfig=function(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yd(pe),vn=!0,Tr=Ee,no=Ce},e.clearConfig=function(){Kr=null,vn=!1,Tr=null,no=null,O=P,I=""},e.isValidAttribute=function(pe,U,Z){Kr||yd({});const ce=nt(pe),Te=nt(U);return wd(ce,Te,Z)},e.addHook=function(pe,U){typeof U=="function"&&zn(L,pe)&&Zu(L[pe],U)},e.removeHook=function(pe,U){if(zn(L,pe)){if(U!==void 0){const Z=PQ(L[pe],U);return Z===-1?void 0:kQ(L[pe],Z,1)[0]}return tP(L[pe])}},e.removeHooks=function(pe){zn(L,pe)&&(L[pe]=[])},e.removeAllHooks=function(){L=hP()},e}var Rxe=R8();function I8({children:t,className:e}){return D.jsx("div",{"data-auth-page":!0,className:dn("flex min-h-dvh w-full flex-col items-center justify-center overflow-y-auto bg-surface-sunken px-4 py-8 text-fg",e),style:{backgroundImage:"radial-gradient(at 20% 0%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%), radial-gradient(at 80% 100%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%)"},children:D.jsx("div",{className:"w-full max-w-[26rem]",children:t})})}const rJ="Secure sign-in powered by AWS Cognito";function O8(t){const e=t?.note??"Secure sign-in";return D.jsx("div",{className:"text-center pt-5",children:D.jsx("p",{className:"text-xs text-fg-muted",children:e})})}const sJ=()=>D.jsxs("svg",{width:"36",height:"36",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"text-accent",children:[D.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),D.jsx("path",{d:"M3 7l9 6 9-6"})]});function N8({wordmark:t="remit,",tagline:e="your email client in the cloud.",mark:n=D.jsx(sJ,{})}){return D.jsxs("div",{className:"text-center pb-6",children:[D.jsx("div",{className:"flex items-center justify-center pb-3",children:n}),D.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-[-0.01em] text-fg",children:t}),D.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:e})]})}const M8={filter:"border-line bg-surface-sunken text-fg-muted",scope:"border-accent-2/40 bg-accent-2-soft text-accent-2"},oJ=({label:t,onRemove:e,tone:n="filter",className:r})=>D.jsxs("span",{className:dn("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-2xs",M8[n],r),children:[D.jsx("span",{children:t}),D.jsx("button",{type:"button",onClick:e,className:"shrink-0 rounded-full p-0.5 hover:bg-fg-muted/20 transition-colors","aria-label":`Remove filter: ${t}`,children:D.jsx(ph,{className:"size-3"})})]}),iJ=A.forwardRef(({label:t,onRemove:e,onActivate:n,tone:r="filter",focused:s=!1,onKeyDown:o,onFocusLabel:a,className:u},c)=>D.jsxs("span",{role:"row",tabIndex:-1,className:dn("inline-flex max-w-48 items-center gap-1 rounded-full border px-2 py-0.5 text-2xs transition-colors",M8[r],s&&"ring-2 ring-ring",u),children:[D.jsx("button",{ref:c,type:"button",role:"gridcell",tabIndex:s?0:-1,onClick:n,onFocus:a,onKeyDown:o,className:dn("block min-w-0 max-w-full truncate rounded-full outline-none",n?"cursor-pointer":"cursor-default"),children:t}),D.jsx("button",{type:"button",role:"gridcell",tabIndex:-1,onClick:e,className:"block shrink-0 rounded-full p-0.5 transition-colors hover:bg-fg-muted/20","aria-label":`Remove filter: ${t}`,children:D.jsx(ph,{className:"size-3"})})]}));iJ.displayName="SearchChipRow";const Ixe=({tokens:t,className:e})=>t.length===0?null:D.jsx("div",{className:dn("flex flex-wrap items-center gap-1.5 border-b border-line bg-surface px-row-inset py-1.5",e),children:t.map(n=>D.jsx(oJ,{label:n.label,onRemove:n.onRemove},n.label))});var vh;(function(t){t[t.UP=-1]="UP",t[t.DOWN=1]="DOWN"})(vh||(vh={}));function aJ(t){var e=getComputedStyle(t).overflowY;return t===document.scrollingElement&&e==="visible"?!0:!(e!=="scroll"&&e!=="auto")}function lJ(t,e){if(!aJ(t))return!1;if(e===vh.DOWN){var n=t.scrollTop+t.clientHeight;return n<t.scrollHeight}if(e===vh.UP)return t.scrollTop>0;throw new Error("unsupported direction")}function P8(t,e){return lJ(t,e)?!0:t.parentElement==null?!1:P8(t.parentElement,e)}function k8(t,e){e===void 0&&(e={});var n=e.insertAt;if(!(!t||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",n==="top"&&r.firstChild?r.insertBefore(s,r.firstChild):r.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}}var uJ=`.lds-ellipsis {
|
|
15
15
|
display: inline-block;
|
|
16
16
|
position: relative;
|
|
17
17
|
width: 64px;
|
|
@@ -145,12 +145,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
145
145
|
.ptr__loader {
|
|
146
146
|
margin: 0 auto;
|
|
147
147
|
text-align: center;
|
|
148
|
-
}`;k8(fJ);var Oxe=function(t){var e=t.isPullable,n=e===void 0?!0:e,r=t.canFetchMore,s=r===void 0?!1:r,o=t.onRefresh,a=t.onFetchMore,u=t.refreshingContent,c=u===void 0?z.createElement(cJ,null):u,f=t.pullingContent,p=f===void 0?z.createElement(dJ,null):f,g=t.children,m=t.pullDownThreshold,y=m===void 0?67:m,S=t.fetchMoreThreshold,E=S===void 0?100:S,C=t.maxPullDownDistance,w=C===void 0?95:C,x=t.resistance,T=x===void 0?1:x,R=t.backgroundColor,M=t.className,O=M===void 0?"":M,I=A.useRef(null),P=A.useRef(null),k=A.useRef(null),H=A.useRef(null),F=!1,B=!1,W=!1,Y=0,ne=0;A.useEffect(function(){if(!(!n||!P||!P.current)){var V=P.current;return V.addEventListener("touchstart",fe,{passive:!0}),V.addEventListener("mousedown",fe),V.addEventListener("touchmove",de,{passive:!1}),V.addEventListener("mousemove",de),window.addEventListener("scroll",Ae),V.addEventListener("touchend",L),V.addEventListener("mouseup",L),document.body.addEventListener("mouseleave",L),function(){V.removeEventListener("touchstart",fe),V.removeEventListener("mousedown",fe),V.removeEventListener("touchmove",de),V.removeEventListener("mousemove",de),window.removeEventListener("scroll",Ae),V.removeEventListener("touchend",L),V.removeEventListener("mouseup",L),document.body.removeEventListener("mouseleave",L)}}},[g,n,o,y,w,s,E]),A.useEffect(function(){var V;if(!((V=I)===null||V===void 0)&&V.current){var K=I.current.classList.contains("ptr--fetch-more-treshold-breached");K||s&&$()<E&&a&&(I.current.classList.add("ptr--fetch-more-treshold-breached"),B=!0,a().then(ee).catch(ee))}},[s,g]);var $=function(){if(!P||!P.current)return-1;var V=window.scrollY,K=P.current.scrollHeight;return K-V-window.innerHeight},ee=function(){requestAnimationFrame(function(){P.current&&(P.current.style.overflowX="hidden",P.current.style.overflowY="auto",P.current.style.transform="unset"),k.current&&(k.current.style.opacity="0"),I.current&&(I.current.classList.remove("ptr--pull-down-treshold-breached"),I.current.classList.remove("ptr--dragging"),I.current.classList.remove("ptr--fetch-more-treshold-breached")),F&&(F=!1),B&&(B=!1)})},fe=function(V){W=!1,V instanceof MouseEvent&&(Y=V.pageY),window.TouchEvent&&V instanceof TouchEvent&&(Y=V.touches[0].pageY),ne=Y,!(V.type==="touchstart"&&P8(V.target,vh.UP))&&(P.current.getBoundingClientRect().top<0||(W=!0))},de=function(V){if(W){if(window.TouchEvent&&V instanceof TouchEvent?ne=V.touches[0].pageY:ne=V.pageY,I.current.classList.add("ptr--dragging"),ne<Y){W=!1;return}V.cancelable&&V.preventDefault();var K=Math.min((ne-Y)/T,w);K>=y&&(W=!0,F=!0,I.current.classList.remove("ptr--dragging"),I.current.classList.add("ptr--pull-down-treshold-breached")),!(K>=w)&&(k.current.style.opacity=(K/65).toString(),P.current.style.overflow="visible",P.current.style.transform="translate(0px, "+K+"px)",k.current.style.visibility="visible")}},Ae=function(V){B||s&&$()<E&&a&&(B=!0,I.current.classList.add("ptr--fetch-more-treshold-breached"),a().then(ee).catch(ee))},L=function(){if(W=!1,Y=0,ne=0,!F){k.current&&(k.current.style.visibility="hidden"),ee();return}P.current&&(P.current.style.overflow="visible",P.current.style.transform="translate(0px, "+y+"px)"),o().then(ee).catch(ee)};return z.createElement("div",{className:"ptr "+O,style:{backgroundColor:R},ref:I},z.createElement("div",{className:"ptr__pull-down",ref:k},z.createElement("div",{className:"ptr__loader ptr__pull-down--loading"},c),z.createElement("div",{className:"ptr__pull-down--pull-more"},p)),z.createElement("div",{className:"ptr__children",ref:P},g,z.createElement("div",{className:"ptr__fetch-more",ref:H},z.createElement("div",{className:"ptr__loader ptr__fetch-more--loading"},c))))};const hJ=()=>D.jsxs("div",{className:"hidden h-full w-[17%] min-w-40 max-w-64 shrink-0 flex-col gap-1 border-r border-line p-3 md:flex",children:[D.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((t,e)=>D.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[D.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},e))]}),pJ=()=>D.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((t,e)=>D.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[D.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),D.jsxs("div",{className:"flex-1 space-y-1.5",children:[D.jsxs("div",{className:"flex justify-between gap-2",children:[D.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),D.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},e))}),qA=()=>D.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[D.jsx(hJ,{}),D.jsx(pJ,{})]}),WA="
|
|
148
|
+
}`;k8(fJ);var Oxe=function(t){var e=t.isPullable,n=e===void 0?!0:e,r=t.canFetchMore,s=r===void 0?!1:r,o=t.onRefresh,a=t.onFetchMore,u=t.refreshingContent,c=u===void 0?z.createElement(cJ,null):u,f=t.pullingContent,p=f===void 0?z.createElement(dJ,null):f,g=t.children,m=t.pullDownThreshold,y=m===void 0?67:m,S=t.fetchMoreThreshold,E=S===void 0?100:S,C=t.maxPullDownDistance,w=C===void 0?95:C,x=t.resistance,T=x===void 0?1:x,R=t.backgroundColor,M=t.className,O=M===void 0?"":M,I=A.useRef(null),P=A.useRef(null),k=A.useRef(null),H=A.useRef(null),F=!1,B=!1,W=!1,Y=0,ne=0;A.useEffect(function(){if(!(!n||!P||!P.current)){var V=P.current;return V.addEventListener("touchstart",fe,{passive:!0}),V.addEventListener("mousedown",fe),V.addEventListener("touchmove",de,{passive:!1}),V.addEventListener("mousemove",de),window.addEventListener("scroll",Ae),V.addEventListener("touchend",L),V.addEventListener("mouseup",L),document.body.addEventListener("mouseleave",L),function(){V.removeEventListener("touchstart",fe),V.removeEventListener("mousedown",fe),V.removeEventListener("touchmove",de),V.removeEventListener("mousemove",de),window.removeEventListener("scroll",Ae),V.removeEventListener("touchend",L),V.removeEventListener("mouseup",L),document.body.removeEventListener("mouseleave",L)}}},[g,n,o,y,w,s,E]),A.useEffect(function(){var V;if(!((V=I)===null||V===void 0)&&V.current){var K=I.current.classList.contains("ptr--fetch-more-treshold-breached");K||s&&$()<E&&a&&(I.current.classList.add("ptr--fetch-more-treshold-breached"),B=!0,a().then(ee).catch(ee))}},[s,g]);var $=function(){if(!P||!P.current)return-1;var V=window.scrollY,K=P.current.scrollHeight;return K-V-window.innerHeight},ee=function(){requestAnimationFrame(function(){P.current&&(P.current.style.overflowX="hidden",P.current.style.overflowY="auto",P.current.style.transform="unset"),k.current&&(k.current.style.opacity="0"),I.current&&(I.current.classList.remove("ptr--pull-down-treshold-breached"),I.current.classList.remove("ptr--dragging"),I.current.classList.remove("ptr--fetch-more-treshold-breached")),F&&(F=!1),B&&(B=!1)})},fe=function(V){W=!1,V instanceof MouseEvent&&(Y=V.pageY),window.TouchEvent&&V instanceof TouchEvent&&(Y=V.touches[0].pageY),ne=Y,!(V.type==="touchstart"&&P8(V.target,vh.UP))&&(P.current.getBoundingClientRect().top<0||(W=!0))},de=function(V){if(W){if(window.TouchEvent&&V instanceof TouchEvent?ne=V.touches[0].pageY:ne=V.pageY,I.current.classList.add("ptr--dragging"),ne<Y){W=!1;return}V.cancelable&&V.preventDefault();var K=Math.min((ne-Y)/T,w);K>=y&&(W=!0,F=!0,I.current.classList.remove("ptr--dragging"),I.current.classList.add("ptr--pull-down-treshold-breached")),!(K>=w)&&(k.current.style.opacity=(K/65).toString(),P.current.style.overflow="visible",P.current.style.transform="translate(0px, "+K+"px)",k.current.style.visibility="visible")}},Ae=function(V){B||s&&$()<E&&a&&(B=!0,I.current.classList.add("ptr--fetch-more-treshold-breached"),a().then(ee).catch(ee))},L=function(){if(W=!1,Y=0,ne=0,!F){k.current&&(k.current.style.visibility="hidden"),ee();return}P.current&&(P.current.style.overflow="visible",P.current.style.transform="translate(0px, "+y+"px)"),o().then(ee).catch(ee)};return z.createElement("div",{className:"ptr "+O,style:{backgroundColor:R},ref:I},z.createElement("div",{className:"ptr__pull-down",ref:k},z.createElement("div",{className:"ptr__loader ptr__pull-down--loading"},c),z.createElement("div",{className:"ptr__pull-down--pull-more"},p)),z.createElement("div",{className:"ptr__children",ref:P},g,z.createElement("div",{className:"ptr__fetch-more",ref:H},z.createElement("div",{className:"ptr__loader ptr__fetch-more--loading"},c))))};const hJ=()=>D.jsxs("div",{className:"hidden h-full w-[17%] min-w-40 max-w-64 shrink-0 flex-col gap-1 border-r border-line p-3 md:flex",children:[D.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((t,e)=>D.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[D.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},e))]}),pJ=()=>D.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((t,e)=>D.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[D.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),D.jsxs("div",{className:"flex-1 space-y-1.5",children:[D.jsxs("div",{className:"flex justify-between gap-2",children:[D.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),D.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},e))}),qA=()=>D.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[D.jsx(hJ,{}),D.jsx(pJ,{})]}),WA="bb4cc7a376e998f998ff75a9f8c6e3408ad5f7d2",gJ="2026-07-20T08:01:12.311Z",mJ=WA.slice(0,7),Nxe=`https://github.com/remit-mail/reader/commit/${WA}`,vJ="https://github.com/remit-mail/reader/issues/new";class j_ extends Error{constructor(e,n,r){super(e),this.status=n,this.body=r,this.name="ApiError"}status;body}const ad=t=>{if(t instanceof j_)return t.status;if(t&&typeof t=="object"){const e=t;if(typeof e.status=="number")return e.status;if(typeof e.statusCode=="number")return e.statusCode}},D8=t=>ad(t)!==void 0,Iy=t=>{const e=ad(t);return e!==void 0&&e>=500&&e<=599},Oy=t=>!!(typeof DOMException<"u"&&t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"),yJ=()=>typeof navigator<"u"&&navigator.onLine===!1,L8=t=>Oy(t)||D8(t)?!1:t instanceof W6?!0:yJ(),bJ=t=>!D8(t)&&!Oy(t)&&!L8(t),U8=t=>Iy(t)||bJ(t),SJ=t=>t?.softError===!0,F8=(t,e)=>Iy(t)?!0:Oy(t)||L8(t)?!1:U8(t)?!0:!SJ(e),EJ=t=>Iy(t),H_=new Set;let z8=null,B8=null;const CJ=t=>{B8=t},wJ=t=>t instanceof Error?t:new Error(j8(t)),j8=t=>t instanceof Error?t.message||t.name:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"?t.message:"An unexpected server error occurred.",_J=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,zl=(t,e)=>{const n={error:t,message:j8(t),correlationId:_J(),at:Date.now(),recoverable:e?.recoverable??EJ(t),stack:t instanceof Error?t.stack:void 0,componentStack:e?.componentStack};z8=n,OJ(`Fatal: ${n.message} [${n.correlationId}]`),B8?.recordError(wJ(t),{fatal:"true",correlationId:n.correlationId});for(const r of H_)r(n);return n},xJ=t=>(H_.add(t),()=>{H_.delete(t)}),AJ=()=>z8,TJ=20,Vm=[],RJ=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function IJ(t){return typeof t!="string"?!1:RJ.has(t.replace(/\.\s*$/,""))}function Km(t){Vm.push(t),Vm.length>TJ&&Vm.shift()}function OJ(t){Km(t)}function NJ(t){return t.map(e=>{if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}).join(" ")}function MJ(){const t=console.error.bind(console);console.error=(...e)=>{Km(NJ(e)),t(...e)},window.addEventListener("error",e=>{IJ(e.message)||(Km(`Uncaught ${e.error instanceof Error?`${e.error.name}: ${e.error.message}`:String(e.message)} (${e.filename}:${e.lineno})`),zl(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{const n=e.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);Km(`Unhandled rejection: ${r}`),zl(n)})}function PJ(){return Vm.slice()}const pP=7500,gP=`
|
|
149
149
|
… (truncated — use “Copy full details” for the full stacktrace)`;function mP(t){return{appSha:WA,appShortSha:mJ,appBuildTime:gJ,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:PJ(),errorMessage:t?.errorMessage,stack:t?.stack,componentStack:t?.componentStack}}function vP(t){return["```",t,"```"].join(`
|
|
150
150
|
`)}function H8(t,e){const n=t.recentErrors.length>0?t.recentErrors.map(o=>` - ${o}`).join(`
|
|
151
151
|
`):" (none)",r=["## Environment",`- **Version**: [\`${t.appShortSha}\`](https://github.com/remit-mail/reader/commit/${t.appSha}) built ${t.appBuildTime}`,`- **Browser**: ${t.userAgent}`,`- **Viewport**: ${t.viewport}`,`- **Time**: ${t.timestamp} (${t.timezone})`,"","## URL",t.href,""];t.errorMessage&&r.push("## Error",t.errorMessage,"");const s=e??t.stack;return s&&r.push("## Stacktrace",vP(s),""),t.componentStack&&r.push("## Component stack",vP(t.componentStack),""),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
|
|
152
152
|
`)}function kJ(t){if(!t.errorMessage)return"Bug: ";const e=t.errorMessage.split(`
|
|
153
|
-
`)[0].trim();return`Bug: ${e.length>120?`${e.slice(0,117)}…`:e}`}function tS(t,e){const n=new URLSearchParams({title:kJ(t),body:H8(t,e)});return`${vJ}?${n.toString()}`}function DJ(t){return H8(t)}function LJ(t){const e=tS(t);if(e.length<=pP)return e;const n=t.stack??"",r={...t,componentStack:void 0};let s=0,o=n.length,a=0;for(;s<=o;){const u=s+o>>1;tS(r,n.slice(0,u)+gP).length<=pP?(a=u,s=u+1):o=u-1}return tS(r,n.slice(0,a)+gP)}const UJ="/mail",$8=()=>{const[t,e]=A.useState(()=>AJ());return A.useEffect(()=>xJ(e),[]),t?D.jsx(q8,{fatal:t}):null},yP=t=>({errorMessage:t.message,stack:t.stack,componentStack:t.componentStack}),q8=({fatal:t,onRetry:e})=>{const[n,r]=A.useState(!1),s=()=>{window.location.reload()},o=()=>{if(e){e();return}s()},a=()=>{const f=LJ(mP(yP(t)));window.open(f,"_blank","noopener,noreferrer")},u=async()=>{const f=DJ(mP(yP(t)));await navigator.clipboard.writeText(f),r(!0),window.setTimeout(()=>r(!1),2e3)},c=t.recoverable?"The server returned an unexpected error. This is not your fault — nothing was saved or sent. Retry, or report a bug so we can fix it.":"Something went wrong and this page can't recover. This is not your fault — nothing was saved or sent. Go to your inbox, or report a bug so we can fix it.";return D.jsxs("div",{role:"alert","aria-live":"assertive","data-testid":"fatal-error-overlay",className:"fixed inset-0 z-[1000] flex flex-col items-center justify-center gap-6 bg-red-700 p-6 text-center text-white",children:[D.jsx(VZ,{className:"size-16 shrink-0","aria-hidden":"true"}),D.jsxs("div",{className:"max-w-lg space-y-3",children:[D.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something broke"}),D.jsx("p",{className:"text-base text-red-50",children:c}),D.jsx("p",{className:"break-words font-mono text-sm text-red-100",children:t.message}),D.jsxs("p",{className:"font-mono text-xs text-red-200",children:["Reference: ",t.correlationId]})]}),D.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[t.recoverable?D.jsx("button",{type:"button",onClick:o,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Retry"}):D.jsx("a",{href:UJ,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Go to inbox"}),D.jsx("button",{type:"button",onClick:a,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:"Report a bug"}),D.jsx("button",{type:"button",onClick:u,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:n?"Copied":"Copy full details"})]})]})},FJ=({betterAuthEnabled:t,cognitoConfigured:e})=>t?"betterAuth":e?"cognito":"none",W8=t=>FJ(t)==="cognito"?eJ:void 0,zJ="Fetch Error",GA=(t,e)=>{if(t&&typeof t=="object"&&e in t){const n=t[e];if(typeof n=="string"&&n.trim().length>0)return n}},VA=t=>GA(t,"message"),BJ=t=>Oy(t)?!1:GA(t,"statusText")===zJ?!0:ad(t)===void 0,jJ=t=>{if(BJ(t))return"network";const e=ad(t);return e===void 0||e===404||e>=500?"fatal":VA(t)?"validation":"fatal"},HJ="Can't reach the server. You may be offline — check your connection and try again.",$J=(t,e)=>e==="network"?HJ:VA(t)??"Please check your details and try again.",qJ=t=>{const e=ad(t);if(e===void 0)return"no response";const n=GA(t,"statusText");return n?`${e} ${n}`:String(e)},WJ=(t,e)=>{const n=qJ(t),r=ad(t)===404?"The endpoint did not respond as expected — check that the backend is running and up to date (see the deployment guide's troubleshooting section).":"The server returned an unexpected response.",s=VA(t),o=s?` Server said: ${s}.`:"";return`${e.method} ${e.path} failed: ${n}. ${r}${o}`},GJ=(t,e)=>{zl(new Error(WJ(t,e)),{recoverable:!1})},VJ={method:"POST",path:"/api/auth/sign-up/email"},KJ={method:"POST",path:"/api/auth/sign-in/email"},YJ=()=>{const[t,e]=A.useState("signIn"),[n,r]=A.useState(""),[s,o]=A.useState(""),[a,u]=A.useState(""),[c,f]=A.useState(null),[p,g]=A.useState(!1),[m,y]=A.useState(!1),S=m?"signIn":t,E=(w,x)=>{if(kZ(w)){y(!0),e("signIn");return}const T=jJ(w);if(T==="fatal"){GJ(w,x);return}f($J(w,T))},C=async w=>{if(w.preventDefault(),p)return;f(null),g(!0);const x=S==="signUp"?VJ:KJ,T=await(S==="signUp"?hh.signUp.email({email:s,password:a,name:n}):hh.signIn.email({email:s,password:a})).then(R=>R.error??null,R=>R);g(!1),T&&E(T,x)};return D.jsxs(D.Fragment,{children:[D.jsx($8,{}),D.jsxs(I8,{children:[D.jsx(N8,{}),D.jsxs("form",{onSubmit:C,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[m?D.jsx(B_,{tone:"info",children:"New signups are currently closed. Sign in with an existing account, or contact your administrator for access."}):D.jsxs("div",{className:"flex gap-1",children:[D.jsx(Gm,{size:"sm",variant:S==="signIn"?"secondary":"ghost","aria-pressed":S==="signIn",onClick:()=>e("signIn"),children:"Sign in"}),D.jsx(Gm,{size:"sm",variant:S==="signUp"?"secondary":"ghost","aria-pressed":S==="signUp",onClick:()=>e("signUp"),children:"Create account"})]}),c&&D.jsx(B_,{tone:"danger",children:c}),S==="signUp"&&D.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[D.jsx("label",{htmlFor:"ba-name",className:"text-fg-muted",children:"Name"}),D.jsx(Y1,{id:"ba-name",type:"text",autoComplete:"name",value:n,onChange:w=>r(w.target.value),placeholder:"Your name",required:!0})]}),D.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[D.jsx("label",{htmlFor:"ba-email",className:"text-fg-muted",children:"Email"}),D.jsx(Y1,{id:"ba-email",type:"email",autoComplete:"email",value:s,onChange:w=>o(w.target.value),placeholder:"you@example.com",required:!0})]}),D.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[D.jsx("label",{htmlFor:"ba-password",className:"text-fg-muted",children:"Password"}),D.jsx(Y1,{id:"ba-password",type:"password",autoComplete:S==="signUp"?"new-password":"current-password",value:a,onChange:w=>u(w.target.value),placeholder:"Your password",required:!0})]}),D.jsx(Gm,{type:"submit",children:S==="signUp"?"Create account":"Sign in"})]}),D.jsx(O8,{note:W8({betterAuthEnabled:_y(),cognitoConfigured:!1})})]})]})},ZJ=({children:t})=>{const{data:e,isPending:n}=hh.useSession();return n?D.jsx(qA,{}):e?D.jsx(D.Fragment,{children:t}):D.jsx(YJ,{})},XJ=({children:t,fallback:e=null})=>{const{data:n}=hh.useSession();if(!n)return D.jsx(D.Fragment,{children:e});const r=async()=>{await hh.signOut(),V6()};return D.jsx(D.Fragment,{children:t({email:n.user.email??null,signOut:r})})},yv={configure:()=>{},getToken:FZ,resetToken:V6,Shell:ZJ,Account:XJ};var nS,bP;function QJ(){if(bP)return nS;bP=1;function t(){this.__data__=[],this.size=0}return nS=t,nS}var rS,SP;function Qh(){if(SP)return rS;SP=1;function t(e,n){return e===n||e!==e&&n!==n}return rS=t,rS}var sS,EP;function Ny(){if(EP)return sS;EP=1;var t=Qh();function e(n,r){for(var s=n.length;s--;)if(t(n[s][0],r))return s;return-1}return sS=e,sS}var oS,CP;function JJ(){if(CP)return oS;CP=1;var t=Ny(),e=Array.prototype,n=e.splice;function r(s){var o=this.__data__,a=t(o,s);if(a<0)return!1;var u=o.length-1;return a==u?o.pop():n.call(o,a,1),--this.size,!0}return oS=r,oS}var iS,wP;function eee(){if(wP)return iS;wP=1;var t=Ny();function e(n){var r=this.__data__,s=t(r,n);return s<0?void 0:r[s][1]}return iS=e,iS}var aS,_P;function tee(){if(_P)return aS;_P=1;var t=Ny();function e(n){return t(this.__data__,n)>-1}return aS=e,aS}var lS,xP;function nee(){if(xP)return lS;xP=1;var t=Ny();function e(n,r){var s=this.__data__,o=t(s,n);return o<0?(++this.size,s.push([n,r])):s[o][1]=r,this}return lS=e,lS}var uS,AP;function My(){if(AP)return uS;AP=1;var t=QJ(),e=JJ(),n=eee(),r=tee(),s=nee();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,uS=o,uS}var cS,TP;function ree(){if(TP)return cS;TP=1;var t=My();function e(){this.__data__=new t,this.size=0}return cS=e,cS}var dS,RP;function see(){if(RP)return dS;RP=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return dS=t,dS}var fS,IP;function oee(){if(IP)return fS;IP=1;function t(e){return this.__data__.get(e)}return fS=t,fS}var hS,OP;function iee(){if(OP)return hS;OP=1;function t(e){return this.__data__.has(e)}return hS=t,hS}var pS,NP;function G8(){if(NP)return pS;NP=1;var t=typeof Ig=="object"&&Ig&&Ig.Object===Object&&Ig;return pS=t,pS}var gS,MP;function No(){if(MP)return gS;MP=1;var t=G8(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return gS=n,gS}var mS,PP;function Py(){if(PP)return mS;PP=1;var t=No(),e=t.Symbol;return mS=e,mS}var vS,kP;function aee(){if(kP)return vS;kP=1;var t=Py(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,s=t?t.toStringTag:void 0;function o(a){var u=n.call(a,s),c=a[s];try{a[s]=void 0;var f=!0}catch{}var p=r.call(a);return f&&(u?a[s]=c:delete a[s]),p}return vS=o,vS}var yS,DP;function lee(){if(DP)return yS;DP=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return yS=n,yS}var bS,LP;function ld(){if(LP)return bS;LP=1;var t=Py(),e=aee(),n=lee(),r="[object Null]",s="[object Undefined]",o=t?t.toStringTag:void 0;function a(u){return u==null?u===void 0?s:r:o&&o in Object(u)?e(u):n(u)}return bS=a,bS}var SS,UP;function Ai(){if(UP)return SS;UP=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return SS=t,SS}var ES,FP;function KA(){if(FP)return ES;FP=1;var t=ld(),e=Ai(),n="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",o="[object Proxy]";function a(u){if(!e(u))return!1;var c=t(u);return c==r||c==s||c==n||c==o}return ES=a,ES}var CS,zP;function uee(){if(zP)return CS;zP=1;var t=No(),e=t["__core-js_shared__"];return CS=e,CS}var wS,BP;function cee(){if(BP)return wS;BP=1;var t=uee(),e=(function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!e&&e in r}return wS=n,wS}var _S,jP;function V8(){if(jP)return _S;jP=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return _S=n,_S}var xS,HP;function dee(){if(HP)return xS;HP=1;var t=KA(),e=cee(),n=Ai(),r=V8(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,c=a.toString,f=u.hasOwnProperty,p=RegExp("^"+c.call(f).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(m){if(!n(m)||e(m))return!1;var y=t(m)?p:o;return y.test(r(m))}return xS=g,xS}var AS,$P;function fee(){if($P)return AS;$P=1;function t(e,n){return e?.[n]}return AS=t,AS}var TS,qP;function tu(){if(qP)return TS;qP=1;var t=dee(),e=fee();function n(r,s){var o=e(r,s);return t(o)?o:void 0}return TS=n,TS}var RS,WP;function YA(){if(WP)return RS;WP=1;var t=tu(),e=No(),n=t(e,"Map");return RS=n,RS}var IS,GP;function ky(){if(GP)return IS;GP=1;var t=tu(),e=t(Object,"create");return IS=e,IS}var OS,VP;function hee(){if(VP)return OS;VP=1;var t=ky();function e(){this.__data__=t?t(null):{},this.size=0}return OS=e,OS}var NS,KP;function pee(){if(KP)return NS;KP=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return NS=t,NS}var MS,YP;function gee(){if(YP)return MS;YP=1;var t=ky(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function s(o){var a=this.__data__;if(t){var u=a[o];return u===e?void 0:u}return r.call(a,o)?a[o]:void 0}return MS=s,MS}var PS,ZP;function mee(){if(ZP)return PS;ZP=1;var t=ky(),e=Object.prototype,n=e.hasOwnProperty;function r(s){var o=this.__data__;return t?o[s]!==void 0:n.call(o,s)}return PS=r,PS}var kS,XP;function vee(){if(XP)return kS;XP=1;var t=ky(),e="__lodash_hash_undefined__";function n(r,s){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=t&&s===void 0?e:s,this}return kS=n,kS}var DS,QP;function yee(){if(QP)return DS;QP=1;var t=hee(),e=pee(),n=gee(),r=mee(),s=vee();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,DS=o,DS}var LS,JP;function bee(){if(JP)return LS;JP=1;var t=yee(),e=My(),n=YA();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return LS=r,LS}var US,e3;function See(){if(e3)return US;e3=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return US=t,US}var FS,t3;function Dy(){if(t3)return FS;t3=1;var t=See();function e(n,r){var s=n.__data__;return t(r)?s[typeof r=="string"?"string":"hash"]:s.map}return FS=e,FS}var zS,n3;function Eee(){if(n3)return zS;n3=1;var t=Dy();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return zS=e,zS}var BS,r3;function Cee(){if(r3)return BS;r3=1;var t=Dy();function e(n){return t(this,n).get(n)}return BS=e,BS}var jS,s3;function wee(){if(s3)return jS;s3=1;var t=Dy();function e(n){return t(this,n).has(n)}return jS=e,jS}var HS,o3;function _ee(){if(o3)return HS;o3=1;var t=Dy();function e(n,r){var s=t(this,n),o=s.size;return s.set(n,r),this.size+=s.size==o?0:1,this}return HS=e,HS}var $S,i3;function ZA(){if(i3)return $S;i3=1;var t=bee(),e=Eee(),n=Cee(),r=wee(),s=_ee();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,$S=o,$S}var qS,a3;function xee(){if(a3)return qS;a3=1;var t=My(),e=YA(),n=ZA(),r=200;function s(o,a){var u=this.__data__;if(u instanceof t){var c=u.__data__;if(!e||c.length<r-1)return c.push([o,a]),this.size=++u.size,this;u=this.__data__=new n(c)}return u.set(o,a),this.size=u.size,this}return qS=s,qS}var WS,l3;function XA(){if(l3)return WS;l3=1;var t=My(),e=ree(),n=see(),r=oee(),s=iee(),o=xee();function a(u){var c=this.__data__=new t(u);this.size=c.size}return a.prototype.clear=e,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=s,a.prototype.set=o,WS=a,WS}var GS,u3;function Aee(){if(u3)return GS;u3=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return GS=e,GS}var VS,c3;function Tee(){if(c3)return VS;c3=1;function t(e){return this.__data__.has(e)}return VS=t,VS}var KS,d3;function Ree(){if(d3)return KS;d3=1;var t=ZA(),e=Aee(),n=Tee();function r(s){var o=-1,a=s==null?0:s.length;for(this.__data__=new t;++o<a;)this.add(s[o])}return r.prototype.add=r.prototype.push=e,r.prototype.has=n,KS=r,KS}var YS,f3;function Iee(){if(f3)return YS;f3=1;function t(e,n){for(var r=-1,s=e==null?0:e.length;++r<s;)if(n(e[r],r,e))return!0;return!1}return YS=t,YS}var ZS,h3;function Oee(){if(h3)return ZS;h3=1;function t(e,n){return e.has(n)}return ZS=t,ZS}var XS,p3;function K8(){if(p3)return XS;p3=1;var t=Ree(),e=Iee(),n=Oee(),r=1,s=2;function o(a,u,c,f,p,g){var m=c&r,y=a.length,S=u.length;if(y!=S&&!(m&&S>y))return!1;var E=g.get(a),C=g.get(u);if(E&&C)return E==u&&C==a;var w=-1,x=!0,T=c&s?new t:void 0;for(g.set(a,u),g.set(u,a);++w<y;){var R=a[w],M=u[w];if(f)var O=m?f(M,R,w,u,a,g):f(R,M,w,a,u,g);if(O!==void 0){if(O)continue;x=!1;break}if(T){if(!e(u,function(I,P){if(!n(T,P)&&(R===I||p(R,I,c,f,g)))return T.push(P)})){x=!1;break}}else if(!(R===M||p(R,M,c,f,g))){x=!1;break}}return g.delete(a),g.delete(u),x}return XS=o,XS}var QS,g3;function Y8(){if(g3)return QS;g3=1;var t=No(),e=t.Uint8Array;return QS=e,QS}var JS,m3;function Nee(){if(m3)return JS;m3=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s,o){r[++n]=[o,s]}),r}return JS=t,JS}var eE,v3;function Mee(){if(v3)return eE;v3=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s){r[++n]=s}),r}return eE=t,eE}var tE,y3;function Pee(){if(y3)return tE;y3=1;var t=Py(),e=Y8(),n=Qh(),r=K8(),s=Nee(),o=Mee(),a=1,u=2,c="[object Boolean]",f="[object Date]",p="[object Error]",g="[object Map]",m="[object Number]",y="[object RegExp]",S="[object Set]",E="[object String]",C="[object Symbol]",w="[object ArrayBuffer]",x="[object DataView]",T=t?t.prototype:void 0,R=T?T.valueOf:void 0;function M(O,I,P,k,H,F,B){switch(P){case x:if(O.byteLength!=I.byteLength||O.byteOffset!=I.byteOffset)return!1;O=O.buffer,I=I.buffer;case w:return!(O.byteLength!=I.byteLength||!F(new e(O),new e(I)));case c:case f:case m:return n(+O,+I);case p:return O.name==I.name&&O.message==I.message;case y:case E:return O==I+"";case g:var W=s;case S:var Y=k&a;if(W||(W=o),O.size!=I.size&&!Y)return!1;var ne=B.get(O);if(ne)return ne==I;k|=u,B.set(O,I);var $=r(W(O),W(I),k,H,F,B);return B.delete(O),$;case C:if(R)return R.call(O)==R.call(I)}return!1}return tE=M,tE}var nE,b3;function Z8(){if(b3)return nE;b3=1;function t(e,n){for(var r=-1,s=n.length,o=e.length;++r<s;)e[o+r]=n[r];return e}return nE=t,nE}var rE,S3;function Ti(){if(S3)return rE;S3=1;var t=Array.isArray;return rE=t,rE}var sE,E3;function X8(){if(E3)return sE;E3=1;var t=Z8(),e=Ti();function n(r,s,o){var a=s(r);return e(r)?a:t(a,o(r))}return sE=n,sE}var oE,C3;function kee(){if(C3)return oE;C3=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,o=0,a=[];++r<s;){var u=e[r];n(u,r,e)&&(a[o++]=u)}return a}return oE=t,oE}var iE,w3;function Q8(){if(w3)return iE;w3=1;function t(){return[]}return iE=t,iE}var aE,_3;function J8(){if(_3)return aE;_3=1;var t=kee(),e=Q8(),n=Object.prototype,r=n.propertyIsEnumerable,s=Object.getOwnPropertySymbols,o=s?function(a){return a==null?[]:(a=Object(a),t(s(a),function(u){return r.call(a,u)}))}:e;return aE=o,aE}var lE,x3;function Dee(){if(x3)return lE;x3=1;function t(e,n){for(var r=-1,s=Array(e);++r<e;)s[r]=n(r);return s}return lE=t,lE}var uE,A3;function nu(){if(A3)return uE;A3=1;function t(e){return e!=null&&typeof e=="object"}return uE=t,uE}var cE,T3;function Lee(){if(T3)return cE;T3=1;var t=ld(),e=nu(),n="[object Arguments]";function r(s){return e(s)&&t(s)==n}return cE=r,cE}var dE,R3;function QA(){if(R3)return dE;R3=1;var t=Lee(),e=nu(),n=Object.prototype,r=n.hasOwnProperty,s=n.propertyIsEnumerable,o=t((function(){return arguments})())?t:function(a){return e(a)&&r.call(a,"callee")&&!s.call(a,"callee")};return dE=o,dE}var $f={exports:{}},fE,I3;function Uee(){if(I3)return fE;I3=1;function t(){return!1}return fE=t,fE}$f.exports;var O3;function JA(){return O3||(O3=1,(function(t,e){var n=No(),r=Uee(),s=e&&!e.nodeType&&e,o=s&&!0&&t&&!t.nodeType&&t,a=o&&o.exports===s,u=a?n.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||r;t.exports=f})($f,$f.exports)),$f.exports}var hE,N3;function Ly(){if(N3)return hE;N3=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,s){var o=typeof r;return s=s??t,!!s&&(o=="number"||o!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<s}return hE=n,hE}var pE,M3;function eT(){if(M3)return pE;M3=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return pE=e,pE}var gE,P3;function Fee(){if(P3)return gE;P3=1;var t=ld(),e=eT(),n=nu(),r="[object Arguments]",s="[object Array]",o="[object Boolean]",a="[object Date]",u="[object Error]",c="[object Function]",f="[object Map]",p="[object Number]",g="[object Object]",m="[object RegExp]",y="[object Set]",S="[object String]",E="[object WeakMap]",C="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",T="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",O="[object Int32Array]",I="[object Uint8Array]",P="[object Uint8ClampedArray]",k="[object Uint16Array]",H="[object Uint32Array]",F={};F[x]=F[T]=F[R]=F[M]=F[O]=F[I]=F[P]=F[k]=F[H]=!0,F[r]=F[s]=F[C]=F[o]=F[w]=F[a]=F[u]=F[c]=F[f]=F[p]=F[g]=F[m]=F[y]=F[S]=F[E]=!1;function B(W){return n(W)&&e(W.length)&&!!F[t(W)]}return gE=B,gE}var mE,k3;function zee(){if(k3)return mE;k3=1;function t(e){return function(n){return e(n)}}return mE=t,mE}var qf={exports:{}};qf.exports;var D3;function Bee(){return D3||(D3=1,(function(t,e){var n=G8(),r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===r,a=o&&n.process,u=(function(){try{var c=s&&s.require&&s.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();t.exports=u})(qf,qf.exports)),qf.exports}var vE,L3;function tT(){if(L3)return vE;L3=1;var t=Fee(),e=zee(),n=Bee(),r=n&&n.isTypedArray,s=r?e(r):t;return vE=s,vE}var yE,U3;function e9(){if(U3)return yE;U3=1;var t=Dee(),e=QA(),n=Ti(),r=JA(),s=Ly(),o=tT(),a=Object.prototype,u=a.hasOwnProperty;function c(f,p){var g=n(f),m=!g&&e(f),y=!g&&!m&&r(f),S=!g&&!m&&!y&&o(f),E=g||m||y||S,C=E?t(f.length,String):[],w=C.length;for(var x in f)(p||u.call(f,x))&&!(E&&(x=="length"||y&&(x=="offset"||x=="parent")||S&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||s(x,w)))&&C.push(x);return C}return yE=c,yE}var bE,F3;function nT(){if(F3)return bE;F3=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,s=typeof r=="function"&&r.prototype||t;return n===s}return bE=e,bE}var SE,z3;function t9(){if(z3)return SE;z3=1;function t(e,n){return function(r){return e(n(r))}}return SE=t,SE}var EE,B3;function jee(){if(B3)return EE;B3=1;var t=t9(),e=t(Object.keys,Object);return EE=e,EE}var CE,j3;function Hee(){if(j3)return CE;j3=1;var t=nT(),e=jee(),n=Object.prototype,r=n.hasOwnProperty;function s(o){if(!t(o))return e(o);var a=[];for(var u in Object(o))r.call(o,u)&&u!="constructor"&&a.push(u);return a}return CE=s,CE}var wE,H3;function Uy(){if(H3)return wE;H3=1;var t=KA(),e=eT();function n(r){return r!=null&&e(r.length)&&!t(r)}return wE=n,wE}var _E,$3;function n9(){if($3)return _E;$3=1;var t=e9(),e=Hee(),n=Uy();function r(s){return n(s)?t(s):e(s)}return _E=r,_E}var xE,q3;function $ee(){if(q3)return xE;q3=1;var t=X8(),e=J8(),n=n9();function r(s){return t(s,n,e)}return xE=r,xE}var AE,W3;function qee(){if(W3)return AE;W3=1;var t=$ee(),e=1,n=Object.prototype,r=n.hasOwnProperty;function s(o,a,u,c,f,p){var g=u&e,m=t(o),y=m.length,S=t(a),E=S.length;if(y!=E&&!g)return!1;for(var C=y;C--;){var w=m[C];if(!(g?w in a:r.call(a,w)))return!1}var x=p.get(o),T=p.get(a);if(x&&T)return x==a&&T==o;var R=!0;p.set(o,a),p.set(a,o);for(var M=g;++C<y;){w=m[C];var O=o[w],I=a[w];if(c)var P=g?c(I,O,w,a,o,p):c(O,I,w,o,a,p);if(!(P===void 0?O===I||f(O,I,u,c,p):P)){R=!1;break}M||(M=w=="constructor")}if(R&&!M){var k=o.constructor,H=a.constructor;k!=H&&"constructor"in o&&"constructor"in a&&!(typeof k=="function"&&k instanceof k&&typeof H=="function"&&H instanceof H)&&(R=!1)}return p.delete(o),p.delete(a),R}return AE=s,AE}var TE,G3;function Wee(){if(G3)return TE;G3=1;var t=tu(),e=No(),n=t(e,"DataView");return TE=n,TE}var RE,V3;function Gee(){if(V3)return RE;V3=1;var t=tu(),e=No(),n=t(e,"Promise");return RE=n,RE}var IE,K3;function Vee(){if(K3)return IE;K3=1;var t=tu(),e=No(),n=t(e,"Set");return IE=n,IE}var OE,Y3;function Kee(){if(Y3)return OE;Y3=1;var t=tu(),e=No(),n=t(e,"WeakMap");return OE=n,OE}var NE,Z3;function Yee(){if(Z3)return NE;Z3=1;var t=Wee(),e=YA(),n=Gee(),r=Vee(),s=Kee(),o=ld(),a=V8(),u="[object Map]",c="[object Object]",f="[object Promise]",p="[object Set]",g="[object WeakMap]",m="[object DataView]",y=a(t),S=a(e),E=a(n),C=a(r),w=a(s),x=o;return(t&&x(new t(new ArrayBuffer(1)))!=m||e&&x(new e)!=u||n&&x(n.resolve())!=f||r&&x(new r)!=p||s&&x(new s)!=g)&&(x=function(T){var R=o(T),M=R==c?T.constructor:void 0,O=M?a(M):"";if(O)switch(O){case y:return m;case S:return u;case E:return f;case C:return p;case w:return g}return R}),NE=x,NE}var ME,X3;function Zee(){if(X3)return ME;X3=1;var t=XA(),e=K8(),n=Pee(),r=qee(),s=Yee(),o=Ti(),a=JA(),u=tT(),c=1,f="[object Arguments]",p="[object Array]",g="[object Object]",m=Object.prototype,y=m.hasOwnProperty;function S(E,C,w,x,T,R){var M=o(E),O=o(C),I=M?p:s(E),P=O?p:s(C);I=I==f?g:I,P=P==f?g:P;var k=I==g,H=P==g,F=I==P;if(F&&a(E)){if(!a(C))return!1;M=!0,k=!1}if(F&&!k)return R||(R=new t),M||u(E)?e(E,C,w,x,T,R):n(E,C,I,w,x,T,R);if(!(w&c)){var B=k&&y.call(E,"__wrapped__"),W=H&&y.call(C,"__wrapped__");if(B||W){var Y=B?E.value():E,ne=W?C.value():C;return R||(R=new t),T(Y,ne,w,x,R)}}return F?(R||(R=new t),r(E,C,w,x,T,R)):!1}return ME=S,ME}var PE,Q3;function r9(){if(Q3)return PE;Q3=1;var t=Zee(),e=nu();function n(r,s,o,a,u){return r===s?!0:r==null||s==null||!e(r)&&!e(s)?r!==r&&s!==s:t(r,s,o,a,n,u)}return PE=n,PE}var kE={exports:{}},DE={},LE={exports:{}},UE={};var J3;function Xee(){if(J3)return UE;J3=1;var t=Xh();function e(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,s=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function u(g,m){var y=m(),S=r({inst:{value:y,getSnapshot:m}}),E=S[0].inst,C=S[1];return o(function(){E.value=y,E.getSnapshot=m,c(E)&&C({inst:E})},[g,y,m]),s(function(){return c(E)&&C({inst:E}),g(function(){c(E)&&C({inst:E})})},[g]),a(y),y}function c(g){var m=g.getSnapshot;g=g.value;try{var y=m();return!n(g,y)}catch{return!0}}function f(g,m){return m()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return UE.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,UE}var ek;function Qee(){return ek||(ek=1,LE.exports=Xee()),LE.exports}var tk;function Jee(){if(tk)return DE;tk=1;var t=Xh(),e=Qee();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,o=t.useRef,a=t.useEffect,u=t.useMemo,c=t.useDebugValue;return DE.useSyncExternalStoreWithSelector=function(f,p,g,m,y){var S=o(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=u(function(){function w(O){if(!x){if(x=!0,T=O,O=m(O),y!==void 0&&E.hasValue){var I=E.value;if(y(I,O))return R=I}return R=O}if(I=R,r(T,O))return I;var P=m(O);return y!==void 0&&y(I,P)?(T=O,I):(T=O,R=P)}var x=!1,T,R,M=g===void 0?null:g;return[function(){return w(p())},M===null?void 0:function(){return w(M())}]},[p,g,m,y]);var C=s(f,S[0],S[1]);return a(function(){E.hasValue=!0,E.value=C},[C]),c(C),C},DE}var nk;function ete(){return nk||(nk=1,kE.exports=Jee()),kE.exports}var rT=ete();const Mxe=qa(rT);var me=function(){return me=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},me.apply(this,arguments)};function sT(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function ht(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function At(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),s,o=[],a;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(u){a={error:u}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Qt(t,e,n){if(arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var kt;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(kt||(kt={}));var Bl;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(Bl||(Bl={}));var $_=kt.Start,oT=kt.Stop,Jh=kt.Raise,Fy=kt.Send,s9=kt.Cancel,tte=kt.NullEvent,iT=kt.Assign;kt.After;kt.DoneState;var o9=kt.Log,nte=kt.Init,q_=kt.Invoke;kt.ErrorExecution;var rk=kt.ErrorPlatform,rte=kt.ErrorCustom,aT=kt.Update,ste=kt.Choose,ote=kt.Pure,i9=".",sk={},W_="xstate.guard",ite="",Hg;function lT(t,e,n){n===void 0&&(n=i9);var r=th(t,n),s=th(e,n);return It(s)?It(r)?s===r:!1:It(r)?r in s:Object.keys(r).every(function(o){return o in s?lT(r[o],s[o]):!1})}function a9(t){try{return It(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function G_(t,e){try{return ud(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function ate(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function th(t,e){if(ate(t))return t.value;if(ud(t))return bv(t);if(typeof t!="string")return t;var n=G_(t,e);return bv(n)}function bv(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function Wf(t,e){for(var n={},r=Object.keys(t),s=0;s<r.length;s++){var o=r[s];n[o]=e(t[o],o,t,s)}return n}function ok(t,e,n){var r,s,o={};try{for(var a=ht(Object.keys(t)),u=a.next();!u.done;u=a.next()){var c=u.value,f=t[c];n(f)&&(o[c]=e(f,c,t))}}catch(p){r={error:p}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}var lte=function(t){return function(e){var n,r,s=e;try{for(var o=ht(t),a=o.next();!a.done;a=o.next()){var u=a.value;s=s[u]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s}};function ute(t,e){return function(n){var r,s,o=n;try{for(var a=ht(t),u=a.next();!u.done;u=a.next()){var c=u.value;o=o[e][c]}}catch(f){r={error:f}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}}function Ym(t){if(!t)return[[]];if(It(t))return[[t]];var e=cn(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Ym(t[n]).map(function(s){return[n].concat(s)})}));return e}function cn(t){var e;return(e=[]).concat.apply(e,Qt([],At(t),!1))}function l9(t){return ud(t)?t:[t]}function Hs(t){return t===void 0?[]:l9(t)}function Sv(t,e,n){var r,s;if(Ot(t))return t(e,n.data);var o={};try{for(var a=ht(Object.keys(t)),u=a.next();!u.done;u=a.next()){var c=u.value,f=t[c];Ot(f)?o[c]=f(e,n.data):o[c]=f}}catch(p){r={error:p}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}function cte(t){return/^(done|error)\./.test(t)}function ik(t){return!!(t instanceof Promise||t!==null&&(Ot(t)||typeof t=="object")&&Ot(t.then))}function dte(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function fte(t,e){var n,r,s=At([[],[]],2),o=s[0],a=s[1];try{for(var u=ht(t),c=u.next();!c.done;c=u.next()){var f=c.value;e(f)?o.push(f):a.push(f)}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return[o,a]}function u9(t,e){return Wf(t.states,function(n,r){if(n){var s=(It(e)?void 0:e[r])||(n?n.current:void 0);if(s)return{current:s,states:u9(n,s)}}})}function hte(t,e){return{current:e,states:u9(t,e)}}function ak(t,e,n,r){var s=t&&n.reduce(function(o,a){var u,c,f=a.assignment,p={state:r,action:a,_event:e},g={};if(Ot(f))g=f(o,e.data,p);else try{for(var m=ht(Object.keys(f)),y=m.next();!y.done;y=m.next()){var S=y.value,E=f[S];g[S]=Ot(E)?E(o,e.data,p):E}}catch(C){u={error:C}}finally{try{y&&!y.done&&(c=m.return)&&c.call(m)}finally{if(u)throw u.error}}return Object.assign({},o,g)},t);return s}var pte=function(){};function ud(t){return Array.isArray(t)}function Ot(t){return typeof t=="function"}function It(t){return typeof t=="string"}function c9(t,e){if(t)return It(t)?{type:W_,name:t,predicate:e?e[t]:void 0}:Ot(t)?{type:W_,name:t.name,predicate:t}:t}function gte(t){try{return"subscribe"in t&&Ot(t.subscribe)}catch{return!1}}var wa=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Hg={},Hg[wa]=function(){return this},Hg[Symbol.observable]=function(){return this};function Dc(t){return!!t&&"__xstatenode"in t}function mte(t){return!!t&&typeof t.send=="function"}var vte=(function(){var t=0;return function(){return t++,t.toString(16)}})();function zy(t,e){return It(t)||typeof t=="number"?me({type:t},e):t}function Jn(t,e){if(!It(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=zy(t);return me({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function Xu(t,e){var n=l9(e).map(function(r){return typeof r>"u"||typeof r=="string"||Dc(r)?{target:r,event:t}:me(me({},r),{event:t})});return n}function yte(t){if(!(t===void 0||t===ite))return Hs(t)}function d9(t,e,n,r,s){var o=t.options.guards,a={state:s,cond:e,_event:r};if(e.type===W_)return(o?.[e.name]||e.predicate)(n,r.data,a);var u=o?.[e.type];if(!u)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return u(n,r.data,a)}function f9(t){return typeof t=="string"?{type:t}:t}function nh(t,e,n){var r=function(){},s=typeof t=="object",o=s?t:null;return{next:((s?t.next:t)||r).bind(o),error:((s?t.error:e)||r).bind(o),complete:((s?t.complete:n)||r).bind(o)}}function $g(t,e){return"".concat(t,":invocation[").concat(e,"]")}function V_(t){return(t.type===Jh||t.type===Fy&&t.to===Bl.Internal)&&typeof t.delay!="number"}var Il=Jn({type:nte});function Ev(t,e){return e&&e[t]||void 0}function Lc(t,e){var n;if(It(t)||typeof t=="number"){var r=Ev(t,e);Ot(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Ot(t))n={type:t.name||t.toString(),exec:t};else{var r=Ev(t.type,e);if(Ot(r))n=me(me({},t),{exec:r});else if(r){var s=r.type||t.type;n=me(me(me({},r),t),{type:s})}else n=t}return n}var ui=function(t,e){if(!t)return[];var n=ud(t)?t:[t];return n.map(function(r){return Lc(r,e)})};function By(t){var e=Lc(t);return me(me({id:It(t)?t:e.id},e),{type:e.type})}function h9(t,e){return{type:Jh,event:typeof t=="function"?t:zy(t),delay:e?e.delay:void 0,id:e?.id}}function p9(t,e,n,r){var s={_event:n},o=Jn(Ot(t.event)?t.event(e,n.data,s):t.event),a;if(It(t.delay)){var u=r&&r[t.delay];a=Ot(u)?u(e,n.data,s):u}else a=Ot(t.delay)?t.delay(e,n.data,s):t.delay;return me(me({},t),{type:Jh,_event:o,delay:a})}function jy(t,e){return{to:e?e.to:void 0,type:Fy,event:Ot(t)?t:zy(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Ot(t)?t.name:a9(t)}}function g9(t,e,n,r){var s={_event:n},o=Jn(Ot(t.event)?t.event(e,n.data,s):t.event),a;if(It(t.delay)){var u=r&&r[t.delay];a=Ot(u)?u(e,n.data,s):u}else a=Ot(t.delay)?t.delay(e,n.data,s):t.delay;var c=Ot(t.to)?t.to(e,n.data,s):t.to;return me(me({},t),{to:c,_event:o,event:o.data,delay:a})}function m9(t,e){return jy(t,me(me({},e),{to:Bl.Parent}))}function v9(){return m9(aT)}var y9=function(t,e,n){return me(me({},t),{value:It(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},b9=function(t){return{type:s9,sendId:t}};function S9(t){var e=By(t);return{type:kt.Start,activity:e,exec:void 0}}function E9(t){var e=Ot(t)?t:By(t);return{type:kt.Stop,activity:e,exec:void 0}}function C9(t,e,n){var r=Ot(t.activity)?t.activity(e,n.data):t.activity,s=typeof r=="string"?{id:r}:r,o={type:kt.Stop,activity:s};return o}var w9=function(t){return{type:iT,assignment:t}};function _9(t,e){var n=e?"#".concat(e):"";return"".concat(kt.After,"(").concat(t,")").concat(n)}function Gf(t,e){var n="".concat(kt.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function rh(t,e){var n="".concat(kt.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function yc(t,e){var n="".concat(kt.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function x9(t,e){return jy(function(n,r){return r},me(me({},e),{to:t}))}function bte(t){return{type:kt.Choose,conds:t}}var Ste=function(t){var e,n,r=[];try{for(var s=ht(t),o=s.next();!o.done;o=s.next())for(var a=o.value,u=0;u<a.actions.length;){if(a.actions[u].type===iT){r.push(a.actions[u]),a.actions.splice(u,1);continue}u++}}catch(c){e={error:c}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return r};function yh(t,e,n,r,s,o,a){a===void 0&&(a=!1);var u=a?[]:Ste(s),c=u.length?ak(n,r,u,e):n,f=a?[n]:void 0,p=[];function g(S,E){var C;switch(E.type){case Jh:{var w=p9(E,c,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,c,r),w}case Fy:var x=g9(E,c,r,t.options.delays);return o&&x.to!==Bl.Internal&&(S==="entry"?p.push(x):o(x,c,r)),x;case o9:{var T=y9(E,c,r);return o?.(T,c,r),T}case ste:{var R=E,M=(C=R.conds.find(function($){var ee=c9($.cond,t.options.guards);return!ee||d9(t,ee,c,r,o?void 0:e)}))===null||C===void 0?void 0:C.actions;if(!M)return[];var O=At(yh(t,e,c,r,[{type:S,actions:ui(Hs(M),t.options.actions)}],o,a),2),I=O[0],P=O[1];return c=P,f?.push(c),I}case ote:{var M=E.get(c,r.data);if(!M)return[];var k=At(yh(t,e,c,r,[{type:S,actions:ui(Hs(M),t.options.actions)}],o,a),2),H=k[0],F=k[1];return c=F,f?.push(c),H}case oT:{var T=C9(E,c,r);return o?.(T,n,r),T}case iT:{c=ak(c,r,[E],o?void 0:e),f?.push(c);break}default:var B=Lc(E,t.options.actions),W=B.exec;if(o)o(B,c,r);else if(W&&f){var Y=f.length-1,ne=me(me({},B),{exec:function($){for(var ee=[],fe=1;fe<arguments.length;fe++)ee[fe-1]=arguments[fe];W.apply(void 0,Qt([f[Y]],At(ee),!1))}});B=ne}return B}}function m(S){var E,C,w=[];try{for(var x=ht(S.actions),T=x.next();!T.done;T=x.next()){var R=T.value,M=g(S.type,R);M&&(w=w.concat(M))}}catch(O){E={error:O}}finally{try{T&&!T.done&&(C=x.return)&&C.call(x)}finally{if(E)throw E.error}}return p.forEach(function(O){o(O,c,r)}),p.length=0,w}var y=cn(s.map(m));return[y,c]}const A9=Object.freeze(Object.defineProperty({__proto__:null,after:_9,assign:w9,cancel:b9,choose:bte,done:Gf,doneInvoke:rh,error:yc,forwardTo:x9,getActionFunction:Ev,initEvent:Il,raise:h9,resolveActions:yh,resolveLog:y9,resolveRaise:p9,resolveSend:g9,resolveStop:C9,send:jy,sendParent:m9,sendUpdate:v9,start:S9,stop:E9,toActionObject:Lc,toActionObjects:ui,toActivityDefinition:By},Symbol.toStringTag,{value:"Module"}));var Cv=[],dc=function(t,e){Cv.push(t);var n=e(t);return Cv.pop(),n},Ete=function(t){return t(Cv[Cv.length-1])};function T9(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[wa]=function(){return this},e}function Cte(t,e,n,r){var s,o=f9(t.src),a=(s=e?.options.services)===null||s===void 0?void 0:s[o.type],u=t.data?Sv(t.data,n,r):void 0,c=a?uT(a,t.id,u):T9(t.id);return c.meta=t,c}function uT(t,e,n){var r=T9(e);if(r.deferred=!0,Dc(t)){var s=r.state=dc(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return s}}return r}function wte(t){try{return typeof t.send=="function"}catch{return!1}}function _te(t){return wte(t)&&"id"in t}function xte(t){var e;return me((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[wa]=function(){return this},e),t)}var wv=function(t){return t.type==="atomic"||t.type==="final"};function R9(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function bh(t){return R9(t).filter(function(e){return e.type!=="history"})}function I9(t){var e=[t];return wv(t)?e:e.concat(cn(bh(t).map(I9)))}function Vf(t,e){var n,r,s,o,a,u,c,f,p=new Set(t),g=K_(p),m=new Set(e);try{for(var y=ht(m),S=y.next();!S.done;S=y.next())for(var E=S.value,C=E.parent;C&&!m.has(C);)m.add(C),C=C.parent}catch(k){n={error:k}}finally{try{S&&!S.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}var w=K_(m);try{for(var x=ht(m),T=x.next();!T.done;T=x.next()){var E=T.value;if(E.type==="compound"&&(!w.get(E)||!w.get(E).length))g.get(E)?g.get(E).forEach(function(H){return m.add(H)}):E.initialStateNodes.forEach(function(H){return m.add(H)});else if(E.type==="parallel")try{for(var R=(a=void 0,ht(bh(E))),M=R.next();!M.done;M=R.next()){var O=M.value;m.has(O)||(m.add(O),g.get(O)?g.get(O).forEach(function(H){return m.add(H)}):O.initialStateNodes.forEach(function(H){return m.add(H)}))}}catch(H){a={error:H}}finally{try{M&&!M.done&&(u=R.return)&&u.call(R)}finally{if(a)throw a.error}}}}catch(k){s={error:k}}finally{try{T&&!T.done&&(o=x.return)&&o.call(x)}finally{if(s)throw s.error}}try{for(var I=ht(m),P=I.next();!P.done;P=I.next())for(var E=P.value,C=E.parent;C&&!m.has(C);)m.add(C),C=C.parent}catch(k){c={error:k}}finally{try{P&&!P.done&&(f=I.return)&&f.call(I)}finally{if(c)throw c.error}}return m}function O9(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(wv(r))return r.key}else return{}}var s={};return n.forEach(function(o){s[o.key]=O9(o,e)}),s}function K_(t){var e,n,r=new Map;try{for(var s=ht(t),o=s.next();!o.done;o=s.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return r}function Ate(t,e){var n=Vf([t],e);return O9(t,K_(n))}function Kf(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function Tte(t){return Qt([],At(new Set(cn(Qt([],At(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Zm(t,e){return e.type==="compound"?bh(e).some(function(n){return n.type==="final"&&Kf(t,n)}):e.type==="parallel"?bh(e).every(function(n){return Zm(t,n)}):!1}function Rte(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function lk(t){return new Set(cn(t.map(function(e){return e.tags})))}function N9(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(It(t)||It(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(s){return N9(t[s],e[s])})}function Ite(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function Ote(t,e){var n=t.exec,r=me(me({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var $s=(function(){function t(e){var n=this,r;this.actions=[],this.activities=sk,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||sk,this.meta=Rte(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Tte(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,events:[],configuration:[],transitions:[],children:{}}):e;var r=Il;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=Il;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),It(e))return[e];var s=Object.keys(e);return s.concat.apply(s,Qt([],At(s.map(function(o){return r.toStrings(e[o],n).map(function(a){return o+n+a})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=sT(e,["configuration","transitions","tags","machine"]);return me(me({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return lT(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;pte(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!r?.transitions.length&&r.transitions.some(function(s){return s.target!==void 0||s.actions.length})},t})(),Nte={deferEvents:!1},uk=(function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=me(me({},Nte),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t})(),FE=new Map,Mte=0,Ef={bookId:function(){return"x:".concat(Mte++)},register:function(t,e){return FE.set(t,e),t},get:function(t){return FE.get(t)},free:function(t){FE.delete(t)}};function cT(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Pte(){var t=cT();if(t&&"__xstate__"in t)return t.__xstate__}function kte(t){if(cT()){var e=Pte();e&&e.register(t)}}function Dte(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,s=[],o=!1,a=function(){if(!o){for(o=!0;s.length>0;){var f=s.shift();n=t.transition(n,f,c),r.forEach(function(p){return p.next(n)})}o=!1}},u=xte({id:e.id,send:function(f){s.push(f),a()},getSnapshot:function(){return n},subscribe:function(f,p,g){var m=nh(f,p,g);return r.add(m),m.next(n),{unsubscribe:function(){r.delete(m)}}}}),c={parent:e.parent,self:u,id:e.id||"anonymous",observers:r};return n=t.start?t.start(c):n,u}var Y_={sync:!1,autoForward:!1},Mn;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Mn||(Mn={}));var Lte=(function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Mn.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(p,g){if(ud(p))return r.batch(p),r.state;var m=Jn(zy(p,g));if(r.status===Mn.Stopped)return r.state;if(r.status!==Mn.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(m.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
153
|
+
`)[0].trim();return`Bug: ${e.length>120?`${e.slice(0,117)}…`:e}`}function tS(t,e){const n=new URLSearchParams({title:kJ(t),body:H8(t,e)});return`${vJ}?${n.toString()}`}function DJ(t){return H8(t)}function LJ(t){const e=tS(t);if(e.length<=pP)return e;const n=t.stack??"",r={...t,componentStack:void 0};let s=0,o=n.length,a=0;for(;s<=o;){const u=s+o>>1;tS(r,n.slice(0,u)+gP).length<=pP?(a=u,s=u+1):o=u-1}return tS(r,n.slice(0,a)+gP)}const UJ="/mail",$8=()=>{const[t,e]=A.useState(()=>AJ());return A.useEffect(()=>xJ(e),[]),t?D.jsx(q8,{fatal:t}):null},yP=t=>({errorMessage:t.message,stack:t.stack,componentStack:t.componentStack}),q8=({fatal:t,onRetry:e})=>{const[n,r]=A.useState(!1),s=()=>{window.location.reload()},o=()=>{if(e){e();return}s()},a=()=>{const f=LJ(mP(yP(t)));window.open(f,"_blank","noopener,noreferrer")},u=async()=>{const f=DJ(mP(yP(t)));await navigator.clipboard.writeText(f),r(!0),window.setTimeout(()=>r(!1),2e3)},c=t.recoverable?"The server returned an unexpected error. This is not your fault — nothing was saved or sent. Retry, or report a bug so we can fix it.":"Something went wrong and this page can't recover. This is not your fault — nothing was saved or sent. Go to your inbox, or report a bug so we can fix it.";return D.jsxs("div",{role:"alert","aria-live":"assertive","data-testid":"fatal-error-overlay",className:"fixed inset-0 z-[1000] flex flex-col items-center justify-center gap-6 bg-red-700 p-6 text-center text-white",children:[D.jsx(VZ,{className:"size-16 shrink-0","aria-hidden":"true"}),D.jsxs("div",{className:"max-w-lg space-y-3",children:[D.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something broke"}),D.jsx("p",{className:"text-base text-red-50",children:c}),D.jsx("p",{className:"break-words font-mono text-sm text-red-100",children:t.message}),D.jsxs("p",{className:"font-mono text-xs text-red-200",children:["Reference: ",t.correlationId]})]}),D.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[t.recoverable?D.jsx("button",{type:"button",onClick:o,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Retry"}):D.jsx("a",{href:UJ,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Go to inbox"}),D.jsx("button",{type:"button",onClick:a,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:"Report a bug"}),D.jsx("button",{type:"button",onClick:u,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:n?"Copied":"Copy full details"})]})]})},FJ=({betterAuthEnabled:t,cognitoConfigured:e})=>t?"betterAuth":e?"cognito":"none",W8=t=>FJ(t)==="cognito"?rJ:void 0,zJ="Fetch Error",GA=(t,e)=>{if(t&&typeof t=="object"&&e in t){const n=t[e];if(typeof n=="string"&&n.trim().length>0)return n}},VA=t=>GA(t,"message"),BJ=t=>Oy(t)?!1:GA(t,"statusText")===zJ?!0:ad(t)===void 0,jJ=t=>{if(BJ(t))return"network";const e=ad(t);return e===void 0||e===404||e>=500?"fatal":VA(t)?"validation":"fatal"},HJ="Can't reach the server. You may be offline — check your connection and try again.",$J=(t,e)=>e==="network"?HJ:VA(t)??"Please check your details and try again.",qJ=t=>{const e=ad(t);if(e===void 0)return"no response";const n=GA(t,"statusText");return n?`${e} ${n}`:String(e)},WJ=(t,e)=>{const n=qJ(t),r=ad(t)===404?"The endpoint did not respond as expected — check that the backend is running and up to date (see the deployment guide's troubleshooting section).":"The server returned an unexpected response.",s=VA(t),o=s?` Server said: ${s}.`:"";return`${e.method} ${e.path} failed: ${n}. ${r}${o}`},GJ=(t,e)=>{zl(new Error(WJ(t,e)),{recoverable:!1})},VJ={method:"POST",path:"/api/auth/sign-up/email"},KJ={method:"POST",path:"/api/auth/sign-in/email"},YJ=()=>{const[t,e]=A.useState("signIn"),[n,r]=A.useState(""),[s,o]=A.useState(""),[a,u]=A.useState(""),[c,f]=A.useState(null),[p,g]=A.useState(!1),[m,y]=A.useState(!1),S=m?"signIn":t,E=(w,x)=>{if(kZ(w)){y(!0),e("signIn");return}const T=jJ(w);if(T==="fatal"){GJ(w,x);return}f($J(w,T))},C=async w=>{if(w.preventDefault(),p)return;f(null),g(!0);const x=S==="signUp"?VJ:KJ,T=await(S==="signUp"?hh.signUp.email({email:s,password:a,name:n}):hh.signIn.email({email:s,password:a})).then(R=>R.error??null,R=>R);g(!1),T&&E(T,x)};return D.jsxs(D.Fragment,{children:[D.jsx($8,{}),D.jsxs(I8,{children:[D.jsx(N8,{}),D.jsxs("form",{onSubmit:C,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[m?D.jsx(F_,{tone:"info",children:"New signups are currently closed. Sign in with an existing account, or contact your administrator for access."}):D.jsxs("div",{className:"flex gap-1",children:[D.jsx(Gm,{size:"sm",variant:S==="signIn"?"secondary":"ghost","aria-pressed":S==="signIn",onClick:()=>e("signIn"),children:"Sign in"}),D.jsx(Gm,{size:"sm",variant:S==="signUp"?"secondary":"ghost","aria-pressed":S==="signUp",onClick:()=>e("signUp"),children:"Create account"})]}),c&&D.jsx(F_,{tone:"danger",children:c}),S==="signUp"&&D.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[D.jsx("label",{htmlFor:"ba-name",className:"text-fg-muted",children:"Name"}),D.jsx(Y1,{id:"ba-name",type:"text",autoComplete:"name",value:n,onChange:w=>r(w.target.value),placeholder:"Your name",required:!0})]}),D.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[D.jsx("label",{htmlFor:"ba-email",className:"text-fg-muted",children:"Email"}),D.jsx(Y1,{id:"ba-email",type:"email",autoComplete:"email",value:s,onChange:w=>o(w.target.value),placeholder:"you@example.com",required:!0})]}),D.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[D.jsx("label",{htmlFor:"ba-password",className:"text-fg-muted",children:"Password"}),D.jsx(Y1,{id:"ba-password",type:"password",autoComplete:S==="signUp"?"new-password":"current-password",value:a,onChange:w=>u(w.target.value),placeholder:"Your password",required:!0})]}),D.jsx(Gm,{type:"submit",children:S==="signUp"?"Create account":"Sign in"})]}),D.jsx(O8,{note:W8({betterAuthEnabled:_y(),cognitoConfigured:!1})})]})]})},ZJ=({children:t})=>{const{data:e,isPending:n}=hh.useSession();return n?D.jsx(qA,{}):e?D.jsx(D.Fragment,{children:t}):D.jsx(YJ,{})},XJ=({children:t,fallback:e=null})=>{const{data:n}=hh.useSession();if(!n)return D.jsx(D.Fragment,{children:e});const r=async()=>{await hh.signOut(),V6()};return D.jsx(D.Fragment,{children:t({email:n.user.email??null,signOut:r})})},yv={configure:()=>{},getToken:FZ,resetToken:V6,Shell:ZJ,Account:XJ};var nS,bP;function QJ(){if(bP)return nS;bP=1;function t(){this.__data__=[],this.size=0}return nS=t,nS}var rS,SP;function Qh(){if(SP)return rS;SP=1;function t(e,n){return e===n||e!==e&&n!==n}return rS=t,rS}var sS,EP;function Ny(){if(EP)return sS;EP=1;var t=Qh();function e(n,r){for(var s=n.length;s--;)if(t(n[s][0],r))return s;return-1}return sS=e,sS}var oS,CP;function JJ(){if(CP)return oS;CP=1;var t=Ny(),e=Array.prototype,n=e.splice;function r(s){var o=this.__data__,a=t(o,s);if(a<0)return!1;var u=o.length-1;return a==u?o.pop():n.call(o,a,1),--this.size,!0}return oS=r,oS}var iS,wP;function eee(){if(wP)return iS;wP=1;var t=Ny();function e(n){var r=this.__data__,s=t(r,n);return s<0?void 0:r[s][1]}return iS=e,iS}var aS,_P;function tee(){if(_P)return aS;_P=1;var t=Ny();function e(n){return t(this.__data__,n)>-1}return aS=e,aS}var lS,xP;function nee(){if(xP)return lS;xP=1;var t=Ny();function e(n,r){var s=this.__data__,o=t(s,n);return o<0?(++this.size,s.push([n,r])):s[o][1]=r,this}return lS=e,lS}var uS,AP;function My(){if(AP)return uS;AP=1;var t=QJ(),e=JJ(),n=eee(),r=tee(),s=nee();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,uS=o,uS}var cS,TP;function ree(){if(TP)return cS;TP=1;var t=My();function e(){this.__data__=new t,this.size=0}return cS=e,cS}var dS,RP;function see(){if(RP)return dS;RP=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return dS=t,dS}var fS,IP;function oee(){if(IP)return fS;IP=1;function t(e){return this.__data__.get(e)}return fS=t,fS}var hS,OP;function iee(){if(OP)return hS;OP=1;function t(e){return this.__data__.has(e)}return hS=t,hS}var pS,NP;function G8(){if(NP)return pS;NP=1;var t=typeof Ig=="object"&&Ig&&Ig.Object===Object&&Ig;return pS=t,pS}var gS,MP;function No(){if(MP)return gS;MP=1;var t=G8(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return gS=n,gS}var mS,PP;function Py(){if(PP)return mS;PP=1;var t=No(),e=t.Symbol;return mS=e,mS}var vS,kP;function aee(){if(kP)return vS;kP=1;var t=Py(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,s=t?t.toStringTag:void 0;function o(a){var u=n.call(a,s),c=a[s];try{a[s]=void 0;var f=!0}catch{}var p=r.call(a);return f&&(u?a[s]=c:delete a[s]),p}return vS=o,vS}var yS,DP;function lee(){if(DP)return yS;DP=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return yS=n,yS}var bS,LP;function ld(){if(LP)return bS;LP=1;var t=Py(),e=aee(),n=lee(),r="[object Null]",s="[object Undefined]",o=t?t.toStringTag:void 0;function a(u){return u==null?u===void 0?s:r:o&&o in Object(u)?e(u):n(u)}return bS=a,bS}var SS,UP;function Ai(){if(UP)return SS;UP=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return SS=t,SS}var ES,FP;function KA(){if(FP)return ES;FP=1;var t=ld(),e=Ai(),n="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",o="[object Proxy]";function a(u){if(!e(u))return!1;var c=t(u);return c==r||c==s||c==n||c==o}return ES=a,ES}var CS,zP;function uee(){if(zP)return CS;zP=1;var t=No(),e=t["__core-js_shared__"];return CS=e,CS}var wS,BP;function cee(){if(BP)return wS;BP=1;var t=uee(),e=(function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!e&&e in r}return wS=n,wS}var _S,jP;function V8(){if(jP)return _S;jP=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return _S=n,_S}var xS,HP;function dee(){if(HP)return xS;HP=1;var t=KA(),e=cee(),n=Ai(),r=V8(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,c=a.toString,f=u.hasOwnProperty,p=RegExp("^"+c.call(f).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(m){if(!n(m)||e(m))return!1;var y=t(m)?p:o;return y.test(r(m))}return xS=g,xS}var AS,$P;function fee(){if($P)return AS;$P=1;function t(e,n){return e?.[n]}return AS=t,AS}var TS,qP;function tu(){if(qP)return TS;qP=1;var t=dee(),e=fee();function n(r,s){var o=e(r,s);return t(o)?o:void 0}return TS=n,TS}var RS,WP;function YA(){if(WP)return RS;WP=1;var t=tu(),e=No(),n=t(e,"Map");return RS=n,RS}var IS,GP;function ky(){if(GP)return IS;GP=1;var t=tu(),e=t(Object,"create");return IS=e,IS}var OS,VP;function hee(){if(VP)return OS;VP=1;var t=ky();function e(){this.__data__=t?t(null):{},this.size=0}return OS=e,OS}var NS,KP;function pee(){if(KP)return NS;KP=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return NS=t,NS}var MS,YP;function gee(){if(YP)return MS;YP=1;var t=ky(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function s(o){var a=this.__data__;if(t){var u=a[o];return u===e?void 0:u}return r.call(a,o)?a[o]:void 0}return MS=s,MS}var PS,ZP;function mee(){if(ZP)return PS;ZP=1;var t=ky(),e=Object.prototype,n=e.hasOwnProperty;function r(s){var o=this.__data__;return t?o[s]!==void 0:n.call(o,s)}return PS=r,PS}var kS,XP;function vee(){if(XP)return kS;XP=1;var t=ky(),e="__lodash_hash_undefined__";function n(r,s){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=t&&s===void 0?e:s,this}return kS=n,kS}var DS,QP;function yee(){if(QP)return DS;QP=1;var t=hee(),e=pee(),n=gee(),r=mee(),s=vee();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,DS=o,DS}var LS,JP;function bee(){if(JP)return LS;JP=1;var t=yee(),e=My(),n=YA();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return LS=r,LS}var US,e3;function See(){if(e3)return US;e3=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return US=t,US}var FS,t3;function Dy(){if(t3)return FS;t3=1;var t=See();function e(n,r){var s=n.__data__;return t(r)?s[typeof r=="string"?"string":"hash"]:s.map}return FS=e,FS}var zS,n3;function Eee(){if(n3)return zS;n3=1;var t=Dy();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return zS=e,zS}var BS,r3;function Cee(){if(r3)return BS;r3=1;var t=Dy();function e(n){return t(this,n).get(n)}return BS=e,BS}var jS,s3;function wee(){if(s3)return jS;s3=1;var t=Dy();function e(n){return t(this,n).has(n)}return jS=e,jS}var HS,o3;function _ee(){if(o3)return HS;o3=1;var t=Dy();function e(n,r){var s=t(this,n),o=s.size;return s.set(n,r),this.size+=s.size==o?0:1,this}return HS=e,HS}var $S,i3;function ZA(){if(i3)return $S;i3=1;var t=bee(),e=Eee(),n=Cee(),r=wee(),s=_ee();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,$S=o,$S}var qS,a3;function xee(){if(a3)return qS;a3=1;var t=My(),e=YA(),n=ZA(),r=200;function s(o,a){var u=this.__data__;if(u instanceof t){var c=u.__data__;if(!e||c.length<r-1)return c.push([o,a]),this.size=++u.size,this;u=this.__data__=new n(c)}return u.set(o,a),this.size=u.size,this}return qS=s,qS}var WS,l3;function XA(){if(l3)return WS;l3=1;var t=My(),e=ree(),n=see(),r=oee(),s=iee(),o=xee();function a(u){var c=this.__data__=new t(u);this.size=c.size}return a.prototype.clear=e,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=s,a.prototype.set=o,WS=a,WS}var GS,u3;function Aee(){if(u3)return GS;u3=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return GS=e,GS}var VS,c3;function Tee(){if(c3)return VS;c3=1;function t(e){return this.__data__.has(e)}return VS=t,VS}var KS,d3;function Ree(){if(d3)return KS;d3=1;var t=ZA(),e=Aee(),n=Tee();function r(s){var o=-1,a=s==null?0:s.length;for(this.__data__=new t;++o<a;)this.add(s[o])}return r.prototype.add=r.prototype.push=e,r.prototype.has=n,KS=r,KS}var YS,f3;function Iee(){if(f3)return YS;f3=1;function t(e,n){for(var r=-1,s=e==null?0:e.length;++r<s;)if(n(e[r],r,e))return!0;return!1}return YS=t,YS}var ZS,h3;function Oee(){if(h3)return ZS;h3=1;function t(e,n){return e.has(n)}return ZS=t,ZS}var XS,p3;function K8(){if(p3)return XS;p3=1;var t=Ree(),e=Iee(),n=Oee(),r=1,s=2;function o(a,u,c,f,p,g){var m=c&r,y=a.length,S=u.length;if(y!=S&&!(m&&S>y))return!1;var E=g.get(a),C=g.get(u);if(E&&C)return E==u&&C==a;var w=-1,x=!0,T=c&s?new t:void 0;for(g.set(a,u),g.set(u,a);++w<y;){var R=a[w],M=u[w];if(f)var O=m?f(M,R,w,u,a,g):f(R,M,w,a,u,g);if(O!==void 0){if(O)continue;x=!1;break}if(T){if(!e(u,function(I,P){if(!n(T,P)&&(R===I||p(R,I,c,f,g)))return T.push(P)})){x=!1;break}}else if(!(R===M||p(R,M,c,f,g))){x=!1;break}}return g.delete(a),g.delete(u),x}return XS=o,XS}var QS,g3;function Y8(){if(g3)return QS;g3=1;var t=No(),e=t.Uint8Array;return QS=e,QS}var JS,m3;function Nee(){if(m3)return JS;m3=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s,o){r[++n]=[o,s]}),r}return JS=t,JS}var eE,v3;function Mee(){if(v3)return eE;v3=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s){r[++n]=s}),r}return eE=t,eE}var tE,y3;function Pee(){if(y3)return tE;y3=1;var t=Py(),e=Y8(),n=Qh(),r=K8(),s=Nee(),o=Mee(),a=1,u=2,c="[object Boolean]",f="[object Date]",p="[object Error]",g="[object Map]",m="[object Number]",y="[object RegExp]",S="[object Set]",E="[object String]",C="[object Symbol]",w="[object ArrayBuffer]",x="[object DataView]",T=t?t.prototype:void 0,R=T?T.valueOf:void 0;function M(O,I,P,k,H,F,B){switch(P){case x:if(O.byteLength!=I.byteLength||O.byteOffset!=I.byteOffset)return!1;O=O.buffer,I=I.buffer;case w:return!(O.byteLength!=I.byteLength||!F(new e(O),new e(I)));case c:case f:case m:return n(+O,+I);case p:return O.name==I.name&&O.message==I.message;case y:case E:return O==I+"";case g:var W=s;case S:var Y=k&a;if(W||(W=o),O.size!=I.size&&!Y)return!1;var ne=B.get(O);if(ne)return ne==I;k|=u,B.set(O,I);var $=r(W(O),W(I),k,H,F,B);return B.delete(O),$;case C:if(R)return R.call(O)==R.call(I)}return!1}return tE=M,tE}var nE,b3;function Z8(){if(b3)return nE;b3=1;function t(e,n){for(var r=-1,s=n.length,o=e.length;++r<s;)e[o+r]=n[r];return e}return nE=t,nE}var rE,S3;function Ti(){if(S3)return rE;S3=1;var t=Array.isArray;return rE=t,rE}var sE,E3;function X8(){if(E3)return sE;E3=1;var t=Z8(),e=Ti();function n(r,s,o){var a=s(r);return e(r)?a:t(a,o(r))}return sE=n,sE}var oE,C3;function kee(){if(C3)return oE;C3=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,o=0,a=[];++r<s;){var u=e[r];n(u,r,e)&&(a[o++]=u)}return a}return oE=t,oE}var iE,w3;function Q8(){if(w3)return iE;w3=1;function t(){return[]}return iE=t,iE}var aE,_3;function J8(){if(_3)return aE;_3=1;var t=kee(),e=Q8(),n=Object.prototype,r=n.propertyIsEnumerable,s=Object.getOwnPropertySymbols,o=s?function(a){return a==null?[]:(a=Object(a),t(s(a),function(u){return r.call(a,u)}))}:e;return aE=o,aE}var lE,x3;function Dee(){if(x3)return lE;x3=1;function t(e,n){for(var r=-1,s=Array(e);++r<e;)s[r]=n(r);return s}return lE=t,lE}var uE,A3;function nu(){if(A3)return uE;A3=1;function t(e){return e!=null&&typeof e=="object"}return uE=t,uE}var cE,T3;function Lee(){if(T3)return cE;T3=1;var t=ld(),e=nu(),n="[object Arguments]";function r(s){return e(s)&&t(s)==n}return cE=r,cE}var dE,R3;function QA(){if(R3)return dE;R3=1;var t=Lee(),e=nu(),n=Object.prototype,r=n.hasOwnProperty,s=n.propertyIsEnumerable,o=t((function(){return arguments})())?t:function(a){return e(a)&&r.call(a,"callee")&&!s.call(a,"callee")};return dE=o,dE}var $f={exports:{}},fE,I3;function Uee(){if(I3)return fE;I3=1;function t(){return!1}return fE=t,fE}$f.exports;var O3;function JA(){return O3||(O3=1,(function(t,e){var n=No(),r=Uee(),s=e&&!e.nodeType&&e,o=s&&!0&&t&&!t.nodeType&&t,a=o&&o.exports===s,u=a?n.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||r;t.exports=f})($f,$f.exports)),$f.exports}var hE,N3;function Ly(){if(N3)return hE;N3=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,s){var o=typeof r;return s=s??t,!!s&&(o=="number"||o!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<s}return hE=n,hE}var pE,M3;function eT(){if(M3)return pE;M3=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return pE=e,pE}var gE,P3;function Fee(){if(P3)return gE;P3=1;var t=ld(),e=eT(),n=nu(),r="[object Arguments]",s="[object Array]",o="[object Boolean]",a="[object Date]",u="[object Error]",c="[object Function]",f="[object Map]",p="[object Number]",g="[object Object]",m="[object RegExp]",y="[object Set]",S="[object String]",E="[object WeakMap]",C="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",T="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",O="[object Int32Array]",I="[object Uint8Array]",P="[object Uint8ClampedArray]",k="[object Uint16Array]",H="[object Uint32Array]",F={};F[x]=F[T]=F[R]=F[M]=F[O]=F[I]=F[P]=F[k]=F[H]=!0,F[r]=F[s]=F[C]=F[o]=F[w]=F[a]=F[u]=F[c]=F[f]=F[p]=F[g]=F[m]=F[y]=F[S]=F[E]=!1;function B(W){return n(W)&&e(W.length)&&!!F[t(W)]}return gE=B,gE}var mE,k3;function zee(){if(k3)return mE;k3=1;function t(e){return function(n){return e(n)}}return mE=t,mE}var qf={exports:{}};qf.exports;var D3;function Bee(){return D3||(D3=1,(function(t,e){var n=G8(),r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===r,a=o&&n.process,u=(function(){try{var c=s&&s.require&&s.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();t.exports=u})(qf,qf.exports)),qf.exports}var vE,L3;function tT(){if(L3)return vE;L3=1;var t=Fee(),e=zee(),n=Bee(),r=n&&n.isTypedArray,s=r?e(r):t;return vE=s,vE}var yE,U3;function e9(){if(U3)return yE;U3=1;var t=Dee(),e=QA(),n=Ti(),r=JA(),s=Ly(),o=tT(),a=Object.prototype,u=a.hasOwnProperty;function c(f,p){var g=n(f),m=!g&&e(f),y=!g&&!m&&r(f),S=!g&&!m&&!y&&o(f),E=g||m||y||S,C=E?t(f.length,String):[],w=C.length;for(var x in f)(p||u.call(f,x))&&!(E&&(x=="length"||y&&(x=="offset"||x=="parent")||S&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||s(x,w)))&&C.push(x);return C}return yE=c,yE}var bE,F3;function nT(){if(F3)return bE;F3=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,s=typeof r=="function"&&r.prototype||t;return n===s}return bE=e,bE}var SE,z3;function t9(){if(z3)return SE;z3=1;function t(e,n){return function(r){return e(n(r))}}return SE=t,SE}var EE,B3;function jee(){if(B3)return EE;B3=1;var t=t9(),e=t(Object.keys,Object);return EE=e,EE}var CE,j3;function Hee(){if(j3)return CE;j3=1;var t=nT(),e=jee(),n=Object.prototype,r=n.hasOwnProperty;function s(o){if(!t(o))return e(o);var a=[];for(var u in Object(o))r.call(o,u)&&u!="constructor"&&a.push(u);return a}return CE=s,CE}var wE,H3;function Uy(){if(H3)return wE;H3=1;var t=KA(),e=eT();function n(r){return r!=null&&e(r.length)&&!t(r)}return wE=n,wE}var _E,$3;function n9(){if($3)return _E;$3=1;var t=e9(),e=Hee(),n=Uy();function r(s){return n(s)?t(s):e(s)}return _E=r,_E}var xE,q3;function $ee(){if(q3)return xE;q3=1;var t=X8(),e=J8(),n=n9();function r(s){return t(s,n,e)}return xE=r,xE}var AE,W3;function qee(){if(W3)return AE;W3=1;var t=$ee(),e=1,n=Object.prototype,r=n.hasOwnProperty;function s(o,a,u,c,f,p){var g=u&e,m=t(o),y=m.length,S=t(a),E=S.length;if(y!=E&&!g)return!1;for(var C=y;C--;){var w=m[C];if(!(g?w in a:r.call(a,w)))return!1}var x=p.get(o),T=p.get(a);if(x&&T)return x==a&&T==o;var R=!0;p.set(o,a),p.set(a,o);for(var M=g;++C<y;){w=m[C];var O=o[w],I=a[w];if(c)var P=g?c(I,O,w,a,o,p):c(O,I,w,o,a,p);if(!(P===void 0?O===I||f(O,I,u,c,p):P)){R=!1;break}M||(M=w=="constructor")}if(R&&!M){var k=o.constructor,H=a.constructor;k!=H&&"constructor"in o&&"constructor"in a&&!(typeof k=="function"&&k instanceof k&&typeof H=="function"&&H instanceof H)&&(R=!1)}return p.delete(o),p.delete(a),R}return AE=s,AE}var TE,G3;function Wee(){if(G3)return TE;G3=1;var t=tu(),e=No(),n=t(e,"DataView");return TE=n,TE}var RE,V3;function Gee(){if(V3)return RE;V3=1;var t=tu(),e=No(),n=t(e,"Promise");return RE=n,RE}var IE,K3;function Vee(){if(K3)return IE;K3=1;var t=tu(),e=No(),n=t(e,"Set");return IE=n,IE}var OE,Y3;function Kee(){if(Y3)return OE;Y3=1;var t=tu(),e=No(),n=t(e,"WeakMap");return OE=n,OE}var NE,Z3;function Yee(){if(Z3)return NE;Z3=1;var t=Wee(),e=YA(),n=Gee(),r=Vee(),s=Kee(),o=ld(),a=V8(),u="[object Map]",c="[object Object]",f="[object Promise]",p="[object Set]",g="[object WeakMap]",m="[object DataView]",y=a(t),S=a(e),E=a(n),C=a(r),w=a(s),x=o;return(t&&x(new t(new ArrayBuffer(1)))!=m||e&&x(new e)!=u||n&&x(n.resolve())!=f||r&&x(new r)!=p||s&&x(new s)!=g)&&(x=function(T){var R=o(T),M=R==c?T.constructor:void 0,O=M?a(M):"";if(O)switch(O){case y:return m;case S:return u;case E:return f;case C:return p;case w:return g}return R}),NE=x,NE}var ME,X3;function Zee(){if(X3)return ME;X3=1;var t=XA(),e=K8(),n=Pee(),r=qee(),s=Yee(),o=Ti(),a=JA(),u=tT(),c=1,f="[object Arguments]",p="[object Array]",g="[object Object]",m=Object.prototype,y=m.hasOwnProperty;function S(E,C,w,x,T,R){var M=o(E),O=o(C),I=M?p:s(E),P=O?p:s(C);I=I==f?g:I,P=P==f?g:P;var k=I==g,H=P==g,F=I==P;if(F&&a(E)){if(!a(C))return!1;M=!0,k=!1}if(F&&!k)return R||(R=new t),M||u(E)?e(E,C,w,x,T,R):n(E,C,I,w,x,T,R);if(!(w&c)){var B=k&&y.call(E,"__wrapped__"),W=H&&y.call(C,"__wrapped__");if(B||W){var Y=B?E.value():E,ne=W?C.value():C;return R||(R=new t),T(Y,ne,w,x,R)}}return F?(R||(R=new t),r(E,C,w,x,T,R)):!1}return ME=S,ME}var PE,Q3;function r9(){if(Q3)return PE;Q3=1;var t=Zee(),e=nu();function n(r,s,o,a,u){return r===s?!0:r==null||s==null||!e(r)&&!e(s)?r!==r&&s!==s:t(r,s,o,a,n,u)}return PE=n,PE}var kE={exports:{}},DE={},LE={exports:{}},UE={};var J3;function Xee(){if(J3)return UE;J3=1;var t=Xh();function e(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,s=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function u(g,m){var y=m(),S=r({inst:{value:y,getSnapshot:m}}),E=S[0].inst,C=S[1];return o(function(){E.value=y,E.getSnapshot=m,c(E)&&C({inst:E})},[g,y,m]),s(function(){return c(E)&&C({inst:E}),g(function(){c(E)&&C({inst:E})})},[g]),a(y),y}function c(g){var m=g.getSnapshot;g=g.value;try{var y=m();return!n(g,y)}catch{return!0}}function f(g,m){return m()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return UE.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,UE}var ek;function Qee(){return ek||(ek=1,LE.exports=Xee()),LE.exports}var tk;function Jee(){if(tk)return DE;tk=1;var t=Xh(),e=Qee();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,o=t.useRef,a=t.useEffect,u=t.useMemo,c=t.useDebugValue;return DE.useSyncExternalStoreWithSelector=function(f,p,g,m,y){var S=o(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=u(function(){function w(O){if(!x){if(x=!0,T=O,O=m(O),y!==void 0&&E.hasValue){var I=E.value;if(y(I,O))return R=I}return R=O}if(I=R,r(T,O))return I;var P=m(O);return y!==void 0&&y(I,P)?(T=O,I):(T=O,R=P)}var x=!1,T,R,M=g===void 0?null:g;return[function(){return w(p())},M===null?void 0:function(){return w(M())}]},[p,g,m,y]);var C=s(f,S[0],S[1]);return a(function(){E.hasValue=!0,E.value=C},[C]),c(C),C},DE}var nk;function ete(){return nk||(nk=1,kE.exports=Jee()),kE.exports}var rT=ete();const Mxe=qa(rT);var me=function(){return me=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},me.apply(this,arguments)};function sT(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function ht(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function At(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),s,o=[],a;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(u){a={error:u}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Qt(t,e,n){if(arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var kt;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(kt||(kt={}));var Bl;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(Bl||(Bl={}));var $_=kt.Start,oT=kt.Stop,Jh=kt.Raise,Fy=kt.Send,s9=kt.Cancel,tte=kt.NullEvent,iT=kt.Assign;kt.After;kt.DoneState;var o9=kt.Log,nte=kt.Init,q_=kt.Invoke;kt.ErrorExecution;var rk=kt.ErrorPlatform,rte=kt.ErrorCustom,aT=kt.Update,ste=kt.Choose,ote=kt.Pure,i9=".",sk={},W_="xstate.guard",ite="",Hg;function lT(t,e,n){n===void 0&&(n=i9);var r=th(t,n),s=th(e,n);return It(s)?It(r)?s===r:!1:It(r)?r in s:Object.keys(r).every(function(o){return o in s?lT(r[o],s[o]):!1})}function a9(t){try{return It(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function G_(t,e){try{return ud(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function ate(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function th(t,e){if(ate(t))return t.value;if(ud(t))return bv(t);if(typeof t!="string")return t;var n=G_(t,e);return bv(n)}function bv(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function Wf(t,e){for(var n={},r=Object.keys(t),s=0;s<r.length;s++){var o=r[s];n[o]=e(t[o],o,t,s)}return n}function ok(t,e,n){var r,s,o={};try{for(var a=ht(Object.keys(t)),u=a.next();!u.done;u=a.next()){var c=u.value,f=t[c];n(f)&&(o[c]=e(f,c,t))}}catch(p){r={error:p}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}var lte=function(t){return function(e){var n,r,s=e;try{for(var o=ht(t),a=o.next();!a.done;a=o.next()){var u=a.value;s=s[u]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s}};function ute(t,e){return function(n){var r,s,o=n;try{for(var a=ht(t),u=a.next();!u.done;u=a.next()){var c=u.value;o=o[e][c]}}catch(f){r={error:f}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}}function Ym(t){if(!t)return[[]];if(It(t))return[[t]];var e=cn(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Ym(t[n]).map(function(s){return[n].concat(s)})}));return e}function cn(t){var e;return(e=[]).concat.apply(e,Qt([],At(t),!1))}function l9(t){return ud(t)?t:[t]}function Hs(t){return t===void 0?[]:l9(t)}function Sv(t,e,n){var r,s;if(Ot(t))return t(e,n.data);var o={};try{for(var a=ht(Object.keys(t)),u=a.next();!u.done;u=a.next()){var c=u.value,f=t[c];Ot(f)?o[c]=f(e,n.data):o[c]=f}}catch(p){r={error:p}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}function cte(t){return/^(done|error)\./.test(t)}function ik(t){return!!(t instanceof Promise||t!==null&&(Ot(t)||typeof t=="object")&&Ot(t.then))}function dte(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function fte(t,e){var n,r,s=At([[],[]],2),o=s[0],a=s[1];try{for(var u=ht(t),c=u.next();!c.done;c=u.next()){var f=c.value;e(f)?o.push(f):a.push(f)}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return[o,a]}function u9(t,e){return Wf(t.states,function(n,r){if(n){var s=(It(e)?void 0:e[r])||(n?n.current:void 0);if(s)return{current:s,states:u9(n,s)}}})}function hte(t,e){return{current:e,states:u9(t,e)}}function ak(t,e,n,r){var s=t&&n.reduce(function(o,a){var u,c,f=a.assignment,p={state:r,action:a,_event:e},g={};if(Ot(f))g=f(o,e.data,p);else try{for(var m=ht(Object.keys(f)),y=m.next();!y.done;y=m.next()){var S=y.value,E=f[S];g[S]=Ot(E)?E(o,e.data,p):E}}catch(C){u={error:C}}finally{try{y&&!y.done&&(c=m.return)&&c.call(m)}finally{if(u)throw u.error}}return Object.assign({},o,g)},t);return s}var pte=function(){};function ud(t){return Array.isArray(t)}function Ot(t){return typeof t=="function"}function It(t){return typeof t=="string"}function c9(t,e){if(t)return It(t)?{type:W_,name:t,predicate:e?e[t]:void 0}:Ot(t)?{type:W_,name:t.name,predicate:t}:t}function gte(t){try{return"subscribe"in t&&Ot(t.subscribe)}catch{return!1}}var wa=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Hg={},Hg[wa]=function(){return this},Hg[Symbol.observable]=function(){return this};function Dc(t){return!!t&&"__xstatenode"in t}function mte(t){return!!t&&typeof t.send=="function"}var vte=(function(){var t=0;return function(){return t++,t.toString(16)}})();function zy(t,e){return It(t)||typeof t=="number"?me({type:t},e):t}function Jn(t,e){if(!It(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=zy(t);return me({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function Xu(t,e){var n=l9(e).map(function(r){return typeof r>"u"||typeof r=="string"||Dc(r)?{target:r,event:t}:me(me({},r),{event:t})});return n}function yte(t){if(!(t===void 0||t===ite))return Hs(t)}function d9(t,e,n,r,s){var o=t.options.guards,a={state:s,cond:e,_event:r};if(e.type===W_)return(o?.[e.name]||e.predicate)(n,r.data,a);var u=o?.[e.type];if(!u)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return u(n,r.data,a)}function f9(t){return typeof t=="string"?{type:t}:t}function nh(t,e,n){var r=function(){},s=typeof t=="object",o=s?t:null;return{next:((s?t.next:t)||r).bind(o),error:((s?t.error:e)||r).bind(o),complete:((s?t.complete:n)||r).bind(o)}}function $g(t,e){return"".concat(t,":invocation[").concat(e,"]")}function V_(t){return(t.type===Jh||t.type===Fy&&t.to===Bl.Internal)&&typeof t.delay!="number"}var Il=Jn({type:nte});function Ev(t,e){return e&&e[t]||void 0}function Lc(t,e){var n;if(It(t)||typeof t=="number"){var r=Ev(t,e);Ot(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Ot(t))n={type:t.name||t.toString(),exec:t};else{var r=Ev(t.type,e);if(Ot(r))n=me(me({},t),{exec:r});else if(r){var s=r.type||t.type;n=me(me(me({},r),t),{type:s})}else n=t}return n}var ui=function(t,e){if(!t)return[];var n=ud(t)?t:[t];return n.map(function(r){return Lc(r,e)})};function By(t){var e=Lc(t);return me(me({id:It(t)?t:e.id},e),{type:e.type})}function h9(t,e){return{type:Jh,event:typeof t=="function"?t:zy(t),delay:e?e.delay:void 0,id:e?.id}}function p9(t,e,n,r){var s={_event:n},o=Jn(Ot(t.event)?t.event(e,n.data,s):t.event),a;if(It(t.delay)){var u=r&&r[t.delay];a=Ot(u)?u(e,n.data,s):u}else a=Ot(t.delay)?t.delay(e,n.data,s):t.delay;return me(me({},t),{type:Jh,_event:o,delay:a})}function jy(t,e){return{to:e?e.to:void 0,type:Fy,event:Ot(t)?t:zy(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Ot(t)?t.name:a9(t)}}function g9(t,e,n,r){var s={_event:n},o=Jn(Ot(t.event)?t.event(e,n.data,s):t.event),a;if(It(t.delay)){var u=r&&r[t.delay];a=Ot(u)?u(e,n.data,s):u}else a=Ot(t.delay)?t.delay(e,n.data,s):t.delay;var c=Ot(t.to)?t.to(e,n.data,s):t.to;return me(me({},t),{to:c,_event:o,event:o.data,delay:a})}function m9(t,e){return jy(t,me(me({},e),{to:Bl.Parent}))}function v9(){return m9(aT)}var y9=function(t,e,n){return me(me({},t),{value:It(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},b9=function(t){return{type:s9,sendId:t}};function S9(t){var e=By(t);return{type:kt.Start,activity:e,exec:void 0}}function E9(t){var e=Ot(t)?t:By(t);return{type:kt.Stop,activity:e,exec:void 0}}function C9(t,e,n){var r=Ot(t.activity)?t.activity(e,n.data):t.activity,s=typeof r=="string"?{id:r}:r,o={type:kt.Stop,activity:s};return o}var w9=function(t){return{type:iT,assignment:t}};function _9(t,e){var n=e?"#".concat(e):"";return"".concat(kt.After,"(").concat(t,")").concat(n)}function Gf(t,e){var n="".concat(kt.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function rh(t,e){var n="".concat(kt.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function yc(t,e){var n="".concat(kt.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function x9(t,e){return jy(function(n,r){return r},me(me({},e),{to:t}))}function bte(t){return{type:kt.Choose,conds:t}}var Ste=function(t){var e,n,r=[];try{for(var s=ht(t),o=s.next();!o.done;o=s.next())for(var a=o.value,u=0;u<a.actions.length;){if(a.actions[u].type===iT){r.push(a.actions[u]),a.actions.splice(u,1);continue}u++}}catch(c){e={error:c}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return r};function yh(t,e,n,r,s,o,a){a===void 0&&(a=!1);var u=a?[]:Ste(s),c=u.length?ak(n,r,u,e):n,f=a?[n]:void 0,p=[];function g(S,E){var C;switch(E.type){case Jh:{var w=p9(E,c,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,c,r),w}case Fy:var x=g9(E,c,r,t.options.delays);return o&&x.to!==Bl.Internal&&(S==="entry"?p.push(x):o(x,c,r)),x;case o9:{var T=y9(E,c,r);return o?.(T,c,r),T}case ste:{var R=E,M=(C=R.conds.find(function($){var ee=c9($.cond,t.options.guards);return!ee||d9(t,ee,c,r,o?void 0:e)}))===null||C===void 0?void 0:C.actions;if(!M)return[];var O=At(yh(t,e,c,r,[{type:S,actions:ui(Hs(M),t.options.actions)}],o,a),2),I=O[0],P=O[1];return c=P,f?.push(c),I}case ote:{var M=E.get(c,r.data);if(!M)return[];var k=At(yh(t,e,c,r,[{type:S,actions:ui(Hs(M),t.options.actions)}],o,a),2),H=k[0],F=k[1];return c=F,f?.push(c),H}case oT:{var T=C9(E,c,r);return o?.(T,n,r),T}case iT:{c=ak(c,r,[E],o?void 0:e),f?.push(c);break}default:var B=Lc(E,t.options.actions),W=B.exec;if(o)o(B,c,r);else if(W&&f){var Y=f.length-1,ne=me(me({},B),{exec:function($){for(var ee=[],fe=1;fe<arguments.length;fe++)ee[fe-1]=arguments[fe];W.apply(void 0,Qt([f[Y]],At(ee),!1))}});B=ne}return B}}function m(S){var E,C,w=[];try{for(var x=ht(S.actions),T=x.next();!T.done;T=x.next()){var R=T.value,M=g(S.type,R);M&&(w=w.concat(M))}}catch(O){E={error:O}}finally{try{T&&!T.done&&(C=x.return)&&C.call(x)}finally{if(E)throw E.error}}return p.forEach(function(O){o(O,c,r)}),p.length=0,w}var y=cn(s.map(m));return[y,c]}const A9=Object.freeze(Object.defineProperty({__proto__:null,after:_9,assign:w9,cancel:b9,choose:bte,done:Gf,doneInvoke:rh,error:yc,forwardTo:x9,getActionFunction:Ev,initEvent:Il,raise:h9,resolveActions:yh,resolveLog:y9,resolveRaise:p9,resolveSend:g9,resolveStop:C9,send:jy,sendParent:m9,sendUpdate:v9,start:S9,stop:E9,toActionObject:Lc,toActionObjects:ui,toActivityDefinition:By},Symbol.toStringTag,{value:"Module"}));var Cv=[],dc=function(t,e){Cv.push(t);var n=e(t);return Cv.pop(),n},Ete=function(t){return t(Cv[Cv.length-1])};function T9(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[wa]=function(){return this},e}function Cte(t,e,n,r){var s,o=f9(t.src),a=(s=e?.options.services)===null||s===void 0?void 0:s[o.type],u=t.data?Sv(t.data,n,r):void 0,c=a?uT(a,t.id,u):T9(t.id);return c.meta=t,c}function uT(t,e,n){var r=T9(e);if(r.deferred=!0,Dc(t)){var s=r.state=dc(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return s}}return r}function wte(t){try{return typeof t.send=="function"}catch{return!1}}function _te(t){return wte(t)&&"id"in t}function xte(t){var e;return me((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[wa]=function(){return this},e),t)}var wv=function(t){return t.type==="atomic"||t.type==="final"};function R9(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function bh(t){return R9(t).filter(function(e){return e.type!=="history"})}function I9(t){var e=[t];return wv(t)?e:e.concat(cn(bh(t).map(I9)))}function Vf(t,e){var n,r,s,o,a,u,c,f,p=new Set(t),g=K_(p),m=new Set(e);try{for(var y=ht(m),S=y.next();!S.done;S=y.next())for(var E=S.value,C=E.parent;C&&!m.has(C);)m.add(C),C=C.parent}catch(k){n={error:k}}finally{try{S&&!S.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}var w=K_(m);try{for(var x=ht(m),T=x.next();!T.done;T=x.next()){var E=T.value;if(E.type==="compound"&&(!w.get(E)||!w.get(E).length))g.get(E)?g.get(E).forEach(function(H){return m.add(H)}):E.initialStateNodes.forEach(function(H){return m.add(H)});else if(E.type==="parallel")try{for(var R=(a=void 0,ht(bh(E))),M=R.next();!M.done;M=R.next()){var O=M.value;m.has(O)||(m.add(O),g.get(O)?g.get(O).forEach(function(H){return m.add(H)}):O.initialStateNodes.forEach(function(H){return m.add(H)}))}}catch(H){a={error:H}}finally{try{M&&!M.done&&(u=R.return)&&u.call(R)}finally{if(a)throw a.error}}}}catch(k){s={error:k}}finally{try{T&&!T.done&&(o=x.return)&&o.call(x)}finally{if(s)throw s.error}}try{for(var I=ht(m),P=I.next();!P.done;P=I.next())for(var E=P.value,C=E.parent;C&&!m.has(C);)m.add(C),C=C.parent}catch(k){c={error:k}}finally{try{P&&!P.done&&(f=I.return)&&f.call(I)}finally{if(c)throw c.error}}return m}function O9(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(wv(r))return r.key}else return{}}var s={};return n.forEach(function(o){s[o.key]=O9(o,e)}),s}function K_(t){var e,n,r=new Map;try{for(var s=ht(t),o=s.next();!o.done;o=s.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return r}function Ate(t,e){var n=Vf([t],e);return O9(t,K_(n))}function Kf(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function Tte(t){return Qt([],At(new Set(cn(Qt([],At(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Zm(t,e){return e.type==="compound"?bh(e).some(function(n){return n.type==="final"&&Kf(t,n)}):e.type==="parallel"?bh(e).every(function(n){return Zm(t,n)}):!1}function Rte(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function lk(t){return new Set(cn(t.map(function(e){return e.tags})))}function N9(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(It(t)||It(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(s){return N9(t[s],e[s])})}function Ite(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function Ote(t,e){var n=t.exec,r=me(me({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var $s=(function(){function t(e){var n=this,r;this.actions=[],this.activities=sk,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||sk,this.meta=Rte(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Tte(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,events:[],configuration:[],transitions:[],children:{}}):e;var r=Il;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=Il;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),It(e))return[e];var s=Object.keys(e);return s.concat.apply(s,Qt([],At(s.map(function(o){return r.toStrings(e[o],n).map(function(a){return o+n+a})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=sT(e,["configuration","transitions","tags","machine"]);return me(me({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return lT(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;pte(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!r?.transitions.length&&r.transitions.some(function(s){return s.target!==void 0||s.actions.length})},t})(),Nte={deferEvents:!1},uk=(function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=me(me({},Nte),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t})(),FE=new Map,Mte=0,Ef={bookId:function(){return"x:".concat(Mte++)},register:function(t,e){return FE.set(t,e),t},get:function(t){return FE.get(t)},free:function(t){FE.delete(t)}};function cT(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Pte(){var t=cT();if(t&&"__xstate__"in t)return t.__xstate__}function kte(t){if(cT()){var e=Pte();e&&e.register(t)}}function Dte(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,s=[],o=!1,a=function(){if(!o){for(o=!0;s.length>0;){var f=s.shift();n=t.transition(n,f,c),r.forEach(function(p){return p.next(n)})}o=!1}},u=xte({id:e.id,send:function(f){s.push(f),a()},getSnapshot:function(){return n},subscribe:function(f,p,g){var m=nh(f,p,g);return r.add(m),m.next(n),{unsubscribe:function(){r.delete(m)}}}}),c={parent:e.parent,self:u,id:e.id||"anonymous",observers:r};return n=t.start?t.start(c):n,u}var Y_={sync:!1,autoForward:!1},Mn;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Mn||(Mn={}));var Lte=(function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Mn.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(p,g){if(ud(p))return r.batch(p),r.state;var m=Jn(zy(p,g));if(r.status===Mn.Stopped)return r.state;if(r.status!==Mn.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(m.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
154
154
|
Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function(){r.forward(m);var y=r._nextState(m);r.update(y,m)}),r._state},this.sendTo=function(p,g,m){var y=r.parent&&(g===Bl.Parent||r.parent.id===g),S=y?r.parent:It(g)?g===Bl.Internal?r:r.children.get(g)||Ef.get(g):mte(g)?g:void 0;if(!S){if(!y)throw new Error("Unable to send event to child '".concat(g,"' from service '").concat(r.id,"'."));return}if("machine"in S){if(r.status!==Mn.Stopped||r.parent!==S||r.state.done){var E=me(me({},p),{name:p.name===rte?"".concat(yc(r.id)):p.name,origin:r.sessionId});!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([S,E]):S.send(E)}}else!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([S,p.data]):S.send(p.data)},this._exec=function(p,g,m,y){y===void 0&&(y=r.machine.options.actions);var S=p.exec||Ev(p.type,y),E=Ot(S)?S:S?S.exec:p.exec;if(E)try{return E(g,m.data,r.machine.config.predictableActionArguments?{action:p,_event:m}:{action:p,state:r.state,_event:m})}catch(Y){throw r.parent&&r.parent.send({type:"xstate.error",data:Y}),Y}switch(p.type){case Jh:{var C=p;r.defer(C);break}case Fy:var w=p;if(typeof w.delay=="number"){r.defer(w);return}else w.to?r.sendTo(w._event,w.to,m===Il):r.send(w._event);break;case s9:r.cancel(p.sendId);break;case $_:{if(r.status!==Mn.Running)return;var x=p.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[x.id||x.type])break;if(x.type===kt.Invoke){var T=f9(x.src),R=r.machine.options.services?r.machine.options.services[T.type]:void 0,M=x.id,O=x.data,I="autoForward"in x?x.autoForward:!!x.forward;if(!R)return;var P=O?Sv(O,g,m):void 0;if(typeof R=="string")return;var k=Ot(R)?R(g,m.data,{data:P,src:T,meta:x.meta}):R;if(!k)return;var H=void 0;Dc(k)&&(k=P?k.withContext(P):k,H={autoForward:I}),r.spawn(k,M,H)}else r.spawnActivity(x);break}case oT:{r.stopChild(p.activity.id);break}case o9:var F=p,B=F.label,W=F.value;B?r.logger(B,W):r.logger(W);break}};var s=me(me({},t.defaultOptions),n),o=s.clock,a=s.logger,u=s.parent,c=s.id,f=c!==void 0?c:e.id;this.id=f,this.logger=a,this.clock=o,this.parent=u,this.options=s,this.scheduler=new uk({deferEvents:this.options.deferEvents}),this.sessionId=Ef.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:dc(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var r,s;try{for(var o=ht(e.actions),a=o.next();!a.done;a=o.next()){var u=a.value;this.exec(u,e,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,s,o,a,u,c,f,p,g=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===Il)&&this.options.execute)this.execute(this.state);else for(var m=void 0;m=this._outgoingQueue.shift();)m[0].send(m[1]);if(this.children.forEach(function(k){g.state.children[k.id]=k}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var y=ht(this.eventListeners),S=y.next();!S.done;S=y.next()){var E=S.value;E(e.event)}}catch(k){r={error:k}}finally{try{S&&!S.done&&(s=y.return)&&s.call(y)}finally{if(r)throw r.error}}try{for(var C=ht(this.listeners),w=C.next();!w.done;w=C.next()){var E=w.value;E(e,e.event)}}catch(k){o={error:k}}finally{try{w&&!w.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}try{for(var x=ht(this.contextListeners),T=x.next();!T.done;T=x.next()){var R=T.value;R(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){u={error:k}}finally{try{T&&!T.done&&(c=x.return)&&c.call(x)}finally{if(u)throw u.error}}if(this.state.done){var M=e.configuration.find(function(k){return k.type==="final"&&k.parent===g.machine}),O=M&&M.doneData?Sv(M.doneData,e.context,n):void 0;this._doneEvent=rh(this.id,O);try{for(var I=ht(this.doneListeners),P=I.next();!P.done;P=I.next()){var E=P.value;E(this._doneEvent)}}catch(k){f={error:k}}finally{try{P&&!P.done&&(p=I.return)&&p.call(I)}finally{if(f)throw f.error}}this._stop(),this._stopChildren(),Ef.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Mn.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var s=this,o=nh(e,n,r);this.listeners.add(o.next),this.status!==Mn.NotStarted&&o.next(this.state);var a=function(){s.doneListeners.delete(a),s.stopListeners.delete(a),o.complete()};return this.status===Mn.Stopped?o.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){s.listeners.delete(o.next),s.doneListeners.delete(a),s.stopListeners.delete(a)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===Mn.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===Mn.Running)return this;this.machine._init(),Ef.register(this.sessionId,this),this.initialized=!0,this.status=Mn.Running;var r=e===void 0?this.initialState:dc(this,function(){return Ite(e)?n.machine.resolveState(e):n.machine.resolveState($s.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,Il)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Ot(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,s,o,a,u,c,f,p;try{for(var g=ht(this.listeners),m=g.next();!m.done;m=g.next()){var y=m.value;this.listeners.delete(y)}}catch(I){e={error:I}}finally{try{m&&!m.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}try{for(var S=ht(this.stopListeners),E=S.next();!E.done;E=S.next()){var y=E.value;y(),this.stopListeners.delete(y)}}catch(I){r={error:I}}finally{try{E&&!E.done&&(s=S.return)&&s.call(S)}finally{if(r)throw r.error}}try{for(var C=ht(this.contextListeners),w=C.next();!w.done;w=C.next()){var y=w.value;this.contextListeners.delete(y)}}catch(I){o={error:I}}finally{try{w&&!w.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}try{for(var x=ht(this.doneListeners),T=x.next();!T.done;T=x.next()){var y=T.value;this.doneListeners.delete(y)}}catch(I){u={error:I}}finally{try{T&&!T.done&&(c=x.return)&&c.call(x)}finally{if(u)throw u.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Mn.Stopped,this._initialState=void 0;try{for(var R=ht(Object.keys(this.delayedEventsMap)),M=R.next();!M.done;M=R.next()){var O=M.value;this.clock.clearTimeout(this.delayedEventsMap[O])}}catch(I){f={error:I}}finally{try{M&&!M.done&&(p=R.return)&&p.call(R)}finally{if(f)throw f.error}}this.scheduler.clear(),this.scheduler=new uk({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=e._state)===null||r===void 0)&&r.done)){var s=Jn({type:"xstate.stop"}),o=dc(e,function(){var a=cn(Qt([],At(e.state.configuration),!1).sort(function(g,m){return m.order-g.order}).map(function(g){return ui(g.onExit,e.machine.options.actions)})),u=At(yh(e.machine,e.state,e.state.context,s,[{type:"exit",actions:a}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),c=u[0],f=u[1],p=new $s({value:e.state.value,context:f,_event:s,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:c.filter(function(g){return!V_(g)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return p.changed=!0,p});e.update(o,s),e._stopChildren(),Ef.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Mn.NotStarted&&this.options.deferEvents)){if(this.status!==Mn.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var s,o,a=n.state,u=!1,c=[],f=function(y){var S=Jn(y);n.forward(S),a=dc(n,function(){return n.machine.transition(a,S,void 0,r||void 0)}),c.push.apply(c,Qt([],At(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(E){return Ote(E,a)})),!1)),u=u||!!a.changed};try{for(var p=ht(e),g=p.next();!g.done;g=p.next()){var m=g.value;f(m)}}catch(y){s={error:y}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(s)throw s.error}}a.changed=u,a.actions=c,n.update(a,Jn(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var s=Jn(e);if(s.name.indexOf(rk)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(rk)===0}))throw s.data.data;var o=dc(this,function(){return r.machine.transition(r.state,s,void 0,n||void 0)});return o},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var s=ht(this.forwardTo),o=s.next();!o.done;o=s.next()){var a=o.value,u=this.children.get(a);if(!u)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));u.send(e)}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,r=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=r)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(e,n.context,n._event,r)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),Ot(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Mn.Running)return uT(e,n);if(ik(e))return this.spawnPromise(Promise.resolve(e),n);if(Ot(e))return this.spawnCallback(e,n);if(_te(e))return this.spawnActor(e,n);if(gte(e))return this.spawnObservable(e,n);if(Dc(e))return this.spawnMachine(e,me(me({},r),{id:n}));if(dte(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var s=new t(e,me(me({},this.options),{parent:this,id:n.id||e.id})),o=me(me({},Y_),n);o.sync&&s.onTransition(function(u){r.send(aT,{state:u,id:s.id})});var a=s;return this.children.set(s.id,a),o.autoForward&&this.forwardTo.add(s.id),s.onDone(function(u){r.removeChild(s.id),r.send(Jn(u,{origin:s.id}))}).start(),a},t.prototype.spawnBehavior=function(e,n){var r=Dte(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,s=this,o=!1,a;e.then(function(c){o||(a=c,s.removeChild(n),s.send(Jn(rh(n,c),{origin:n})))},function(c){if(!o){s.removeChild(n);var f=yc(n,c);try{s.send(Jn(f,{origin:n}))}catch{s.devTools&&s.devTools.send(f,s.state),s.machine.strict&&s.stop()}}});var u=(r={id:n,send:function(){},subscribe:function(c,f,p){var g=nh(c,f,p),m=!1;return e.then(function(y){m||(g.next(y),!m&&g.complete())},function(y){m||g.error(y)}),{unsubscribe:function(){return m=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[wa]=function(){return this},r);return this.children.set(n,u),u},t.prototype.spawnCallback=function(e,n){var r,s=this,o=!1,a=new Set,u=new Set,c,f=function(m){c=m,u.forEach(function(y){return y(m)}),!o&&s.send(Jn(m,{origin:n}))},p;try{p=e(f,function(m){a.add(m)})}catch(m){this.send(yc(n,m))}if(ik(p))return this.spawnPromise(p,n);var g=(r={id:n,send:function(m){return a.forEach(function(y){return y(m)})},subscribe:function(m){var y=nh(m);return u.add(y.next),{unsubscribe:function(){u.delete(y.next)}}},stop:function(){o=!0,Ot(p)&&p()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[wa]=function(){return this},r);return this.children.set(n,g),g},t.prototype.spawnObservable=function(e,n){var r,s=this,o,a=e.subscribe(function(c){o=c,s.send(Jn(c,{origin:n}))},function(c){s.removeChild(n),s.send(Jn(yc(n,c),{origin:n}))},function(){s.removeChild(n),s.send(Jn(rh(n),{origin:n}))}),u=(r={id:n,send:function(){},subscribe:function(c,f,p){return e.subscribe(c,f,p)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[wa]=function(){return this},r);return this.children.set(n,u),u},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(n){var r=n(this.state.context,e);this.spawnEffect(e.id,r)}},t.prototype.spawnEffect=function(e,n){var r;this.children.set(e,(r={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},r[wa]=function(){return this},r))},t.prototype.attachDev=function(){var e=cT();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(me(me({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:me({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}kte(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[wa]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Mn.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=M9,t})(),Ute=function(t){return It(t)?me(me({},Y_),{name:t}):me(me(me({},Y_),{name:vte()}),t)};function Cf(t,e){var n=Ute(e);return Ete(function(r){return r?r.spawn(t,n.name,n):uT(t,n.name)})}function M9(t,e){var n=new Lte(t,e);return n}function Fte(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function qg(t){return me(me({type:q_},t),{toJSON:function(){t.onDone,t.onError;var e=sT(t,["onDone","onError"]);return me(me({},e),{type:q_,src:Fte(t.src)})}})}var Wg="",Z_="#",zE="*",Qu={},Ju=function(t){return t[0]===Z_},zte=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Bte=(function(){function t(e,n,r,s){r===void 0&&(r="context"in e?e.context:void 0);var o=this,a;this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(zte(),n),this.parent=s?.parent,this.key=this.config.key||s?.key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:i9),this.id=this.config.id||Qt([this.machine.key],At(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?Wf(this.config.states,function(f,p){var g,m=new t(f,{},void 0,{parent:o,key:p});return Object.assign(o.idMap,me((g={},g[m.id]=m,g),m.idMap)),m}):Qu;var u=0;function c(f){var p,g;f.order=u++;try{for(var m=ht(R9(f)),y=m.next();!y.done;y=m.next()){var S=y.value;c(S)}}catch(E){p={error:E}}finally{try{y&&!y.done&&(g=m.return)&&g.call(m)}finally{if(p)throw p.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(f){var p=f.event;return p===Wg}):Wg in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Hs(this.config.entry||this.config.onEntry).map(function(f){return Lc(f)}),this.onExit=Hs(this.config.exit||this.config.onExit).map(function(f){return Lc(f)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Hs(this.config.invoke).map(function(f,p){var g,m;if(Dc(f)){var y=$g(o.id,p);return o.machine.options.services=me((g={},g[y]=f,g),o.machine.options.services),qg({src:y,id:y})}else if(It(f.src)){var y=f.id||$g(o.id,p);return qg(me(me({},f),{id:y,src:f.src}))}else if(Dc(f.src)||Ot(f.src)){var y=f.id||$g(o.id,p);return o.machine.options.services=me((m={},m[y]=f.src,m),o.machine.options.services),qg(me(me({id:y},f),{src:y}))}else{var S=f.src;return qg(me(me({id:$g(o.id,p)},f),{src:S}))}}),this.activities=Hs(this.config.activities).concat(this.invoke).map(function(f){return By(f)}),this.transition=this.transition.bind(this),this.tags=Hs(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||I9(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,s=r.actions,o=r.activities,a=r.guards,u=r.services,c=r.delays;return new t(this.config,{actions:me(me({},s),e.actions),activities:me(me({},o),e.activities),guards:me(me({},a),e.guards),services:me(me({},u),e.services),delays:me(me({},c),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return Ot(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Wf(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===Wg,r=this.transitions.filter(function(s){var o=s.eventType===e;return n?o:o||s.eventType===zE});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(o,a){var u=Ot(o)?"".concat(e.id,":delay[").concat(a,"]"):o,c=_9(u,e.id);return e.onEntry.push(jy(c,{delay:o})),e.onExit.push(b9(c)),c},s=ud(n)?n.map(function(o,a){var u=r(o.delay,a);return me(me({},o),{event:u})}):cn(Object.keys(n).map(function(o,a){var u=n[o],c=It(u)?{target:u}:u,f=isNaN(+o)?o:+o,p=r(f,a);return Hs(c).map(function(g){return me(me({},g),{event:p,delay:f})})}));return s.map(function(o){var a=o.delay;return me(me({},e.formatTransition(o)),{delay:a})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var s=e instanceof $s?e.value:th(e,this.delimiter);if(It(s)){var o=this.getStateNode(s).initial;return o!==void 0?this.getStateNodes((n={},n[s]=o,n)):[this,this.states[s]]}var a=Object.keys(s),u=[this];return u.push.apply(u,Qt([],At(cn(a.map(function(c){return r.getStateNode(c).getStateNodes(s[c])}))),!1)),u},t.prototype.handles=function(e){var n=a9(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof $s?e:$s.create(e),r=Array.from(Vf([],this.getStateNodes(n.value)));return new $s(me(me({},n),{value:this.resolve(n.value),configuration:r,done:Zm(r,this),tags:lk(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var s=this.getStateNode(e),o=s.next(n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionCompoundNode=function(e,n,r){var s=Object.keys(e),o=this.getStateNode(s[0]),a=o._transition(e[s[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},t.prototype.transitionParallelNode=function(e,n,r){var s,o,a={};try{for(var u=ht(Object.keys(e)),c=u.next();!c.done;c=u.next()){var f=c.value,p=e[f];if(p){var g=this.getStateNode(f),m=g._transition(p,n,r);m&&(a[f]=m)}}}catch(w){s={error:w}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(s)throw s.error}}var y=Object.keys(a).map(function(w){return a[w]}),S=cn(y.map(function(w){return w.transitions})),E=y.some(function(w){return w.transitions.length>0});if(!E)return this.next(n,r);var C=cn(Object.keys(a).map(function(w){return a[w].configuration}));return{transitions:S,exitSet:cn(y.map(function(w){return w.exitSet})),configuration:C,source:n,actions:cn(Object.keys(a).map(function(w){return a[w].actions}))}},t.prototype._transition=function(e,n,r){return It(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,Jn(n))},t.prototype.next=function(e,n){var r,s,o=this,a=n.name,u=[],c=[],f;try{for(var p=ht(this.getCandidates(a)),g=p.next();!g.done;g=p.next()){var m=g.value,y=m.cond,S=m.in,E=e.context,C=S?It(S)&&Ju(S)?e.matches(th(this.getStateNodeById(S).path,this.delimiter)):lT(th(S,this.delimiter),lte(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!y||d9(this.machine,y,E,n,e)}catch(R){throw new Error("Unable to evaluate guard '".concat(y.name||y.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
|
|
155
155
|
`).concat(R.message))}if(w&&C){m.target!==void 0&&(c=m.target),u.push.apply(u,Qt([],At(m.actions),!1)),f=m;break}}}catch(R){r={error:R}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(r)throw r.error}}if(f){if(!c.length)return{transitions:[f],exitSet:[],configuration:e.value?[this]:[],source:e,actions:u};var x=cn(c.map(function(R){return o.getRelativeStateNodes(R,e.historyValue)})),T=!!f.internal;return{transitions:[f],exitSet:T?[]:cn(c.map(function(R){return o.getPotentiallyReenteringNodes(R)})),configuration:x,source:e,actions:u}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],r=this,s=e;r&&r!==s;)n.push(r),r=r.parent;return r!==s?[]:(n.push(s),n)},t.prototype.getActions=function(e,n,r,s,o,a,u){var c,f,p,g,m=this,y=a?Vf([],this.getStateNodes(a.value)):[],S=new Set;try{for(var E=ht(Array.from(e).sort(function(F,B){return F.order-B.order})),C=E.next();!C.done;C=E.next()){var w=C.value;(!Kf(y,w)||Kf(r.exitSet,w)||w.parent&&S.has(w.parent))&&S.add(w)}}catch(F){c={error:F}}finally{try{C&&!C.done&&(f=E.return)&&f.call(E)}finally{if(c)throw c.error}}try{for(var x=ht(y),T=x.next();!T.done;T=x.next()){var w=T.value;(!Kf(e,w)||Kf(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(F){p={error:F}}finally{try{T&&!T.done&&(g=x.return)&&g.call(x)}finally{if(p)throw p.error}}r.exitSet.sort(function(F,B){return B.order-F.order});var R=Array.from(S).sort(function(F,B){return F.order-B.order}),M=new Set(r.exitSet),O=cn(R.map(function(F){var B=[];if(F.type!=="final")return B;var W=F.parent;if(!W.parent)return B;B.push(Gf(F.id,F.doneData),Gf(W.id,F.doneData?Sv(F.doneData,s,o):void 0));var Y=W.parent;return Y.type==="parallel"&&bh(Y).every(function(ne){return Zm(r.configuration,ne)})&&B.push(Gf(Y.id)),B})),I=R.map(function(F){var B=F.onEntry,W=F.activities.map(function(Y){return S9(Y)});return{type:"entry",actions:ui(u?Qt(Qt([],At(B),!1),At(W),!1):Qt(Qt([],At(W),!1),At(B),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:O.map(function(F){return h9(F)})}),P=Array.from(M).map(function(F){return{type:"exit",actions:ui(Qt(Qt([],At(F.onExit),!1),At(F.activities.map(function(B){return E9(B)})),!1),m.machine.options.actions)}}),k=P.concat({type:"transition",actions:ui(r.actions,this.machine.options.actions)}).concat(I);if(n){var H=ui(cn(Qt([],At(e),!1).sort(function(F,B){return B.order-F.order}).map(function(F){return F.onExit})),this.machine.options.actions).filter(function(F){return!V_(F)});return k.concat({type:"stop",actions:H})}return k},t.prototype.transition=function(e,n,r,s){e===void 0&&(e=this.initialState);var o=Jn(n),a;if(e instanceof $s)a=r===void 0?e:this.resolveState($s.from(e,r));else{var u=It(e)?this.resolve(bv(this.getResolvedPath(e))):this.resolve(e),c=r??this.machine.context;a=this.resolveState($s.from(u,c))}if(this.strict&&!this.events.includes(o.name)&&!cte(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var f=this._transition(a.value,a,o)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},p=Vf([],this.getStateNodes(a.value)),g=f.configuration.length?Vf(p,f.configuration):p;return f.configuration=Qt([],At(g),!1),this.resolveTransition(f,a,a.context,s,o)},t.prototype.resolveRaisedTransition=function(e,n,r,s){var o,a=e.actions;return e=this.transition(e,n,void 0,s),e._event=r,e.event=r.data,(o=e.actions).unshift.apply(o,Qt([],At(a),!1)),e},t.prototype.resolveTransition=function(e,n,r,s,o){var a,u,c,f,p=this;o===void 0&&(o=Il);var g=e.configuration,m=!n||e.transitions.length>0,y=m?e.configuration:n?n.configuration:[],S=Zm(y,this),E=m?Ate(this.machine,g):void 0,C=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,w=this.getActions(new Set(y),S,e,r,o,n,s),x=n?me({},n.activities):{};try{for(var T=ht(w),R=T.next();!R.done;R=T.next()){var M=R.value;try{for(var O=(c=void 0,ht(M.actions)),I=O.next();!I.done;I=O.next()){var P=I.value;P.type===$_?x[P.activity.id||P.activity.type]=P:P.type===oT&&(x[P.activity.id||P.activity.type]=!1)}}catch(J){c={error:J}}finally{try{I&&!I.done&&(f=O.return)&&f.call(O)}finally{if(c)throw c.error}}}}catch(J){a={error:J}}finally{try{R&&!R.done&&(u=T.return)&&u.call(T)}finally{if(a)throw a.error}}var k=At(yh(this,n,r,o,w,s,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),H=k[0],F=k[1],B=At(fte(H,V_),2),W=B[0],Y=B[1],ne=H.filter(function(J){var oe;return J.type===$_&&((oe=J.activity)===null||oe===void 0?void 0:oe.type)===q_}),$=ne.reduce(function(J,oe){return J[oe.activity.id]=Cte(oe.activity,p.machine,F,o),J},n?me({},n.children):{}),ee=new $s({value:E||n.value,context:F,_event:o,_sessionid:n?n._sessionid:null,historyValue:E?C?hte(C,E):void 0:n?n.historyValue:void 0,history:!E||e.source?n:void 0,actions:E?Y:[],activities:E?x:n?n.activities:{},events:[],configuration:y,transitions:e.transitions,children:$,done:S,tags:lk(y),machine:this}),fe=r!==F;ee.changed=o.name===aT||fe;var de=ee.history;de&&delete de.history;var Ae=!S&&(this._transient||g.some(function(J){return J._transient}));if(!m&&(!Ae||o.name===Wg))return ee;var L=ee;if(!S)for(Ae&&(L=this.resolveRaisedTransition(L,{type:tte},o,s));W.length;){var V=W.shift();L=this.resolveRaisedTransition(L,V._event,o,s)}var K=L.changed||(de?!!L.actions.length||fe||typeof de.value!=typeof L.value||!N9(L.value,de.value):void 0);return L.changed=K,L.history=de,L},t.prototype.getStateNode=function(e){if(Ju(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=Ju(e)?e.slice(Z_.length):e;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&Ju(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=G_(e,this.delimiter).slice(),r=this;n.length;){var s=n.shift();if(!s.length)break;r=r.getStateNode(s)}return r},t.prototype.resolve=function(e){var n,r=this;if(!e)return this.initialStateValue||Qu;switch(this.type){case"parallel":return Wf(this.initialStateValue,function(o,a){return o?r.getStateNode(a).resolve(e[a]||o):Qu});case"compound":if(It(e)){var s=this.getStateNode(e);return s.type==="parallel"||s.type==="compound"?(n={},n[e]=s.initialStateValue,n):e}return Object.keys(e).length?Wf(e,function(o,a){return o?r.getStateNode(a).resolve(o):Qu}):this.initialStateValue||{};default:return e||Qu}},t.prototype.getResolvedPath=function(e){if(Ju(e)){var n=this.machine.idMap[e.slice(Z_.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return G_(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=ok(this.states,function(r){return r.initialStateValue||Qu},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=wv(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;It(n.target)?e=Ju(n.target)?bv(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,r){return r===void 0&&(r=!0),r?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(wv(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Ym(this.initialStateValue);return cn(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=At(e),r=n[0],s=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var o=this.getStateNode(r);if(o.type==="history")return o.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(s)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:ok(this.states,function(n,r){if(!e)return n.historyValue();var s=It(e)?void 0:e[r];return n.historyValue(s||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var s=this.target;return s?cn(Ym(s).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var o=ute(r.path,"states")(e).current;return It(o)?[r.getStateNode(o)]:cn(Ym(o).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=cn(Object.keys(this.states).map(function(r){return e.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,r,s;if(this.__cache.events)return this.__cache.events;var o=this.states,a=new Set(this.ownEvents);if(o)try{for(var u=ht(Object.keys(o)),c=u.next();!c.done;c=u.next()){var f=c.value,p=o[f];if(p.states)try{for(var g=(r=void 0,ht(p.events)),m=g.next();!m.done;m=g.next()){var y=m.value;a.add("".concat(y))}}catch(S){r={error:S}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(r)throw r.error}}}}catch(S){e={error:S}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(r){if(!It(r))return r;var s=r[0]===n.delimiter;if(s&&!n.parent)return n.getStateNodeByPath(r.slice(1));var o=s?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(o);return a}catch(u){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
156
156
|
`).concat(u.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=yte(e.target),s="internal"in e?e.internal:r?r.some(function(c){return It(c)&&c[0]===n.delimiter}):!0,o=this.machine.options.guards,a=this.resolveTarget(r),u=me(me({},e),{actions:ui(Hs(e.actions)),cond:c9(e.cond,o),target:a,source:this,internal:s,eventType:e.event,toJSON:function(){return me(me({},u),{target:u.target?u.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return u},t.prototype.formatTransitions=function(){var e,n,r=this,s;if(!this.config.on)s=[];else if(Array.isArray(this.config.on))s=this.config.on;else{var o=this.config.on,a=zE,u=o[a],c=u===void 0?[]:u,f=sT(o,[typeof a=="symbol"?a:a+""]);s=cn(Object.keys(f).map(function(x){var T=Xu(x,f[x]);return T}).concat(Xu(zE,c)))}var p=this.config.always?Xu("",this.config.always):[],g=this.config.onDone?Xu(String(Gf(this.id)),this.config.onDone):[],m=cn(this.invoke.map(function(x){var T=[];return x.onDone&&T.push.apply(T,Qt([],At(Xu(String(rh(x.id)),x.onDone)),!1)),x.onError&&T.push.apply(T,Qt([],At(Xu(String(yc(x.id)),x.onError)),!1)),T})),y=this.after,S=cn(Qt(Qt(Qt(Qt([],At(g),!1),At(m),!1),At(s),!1),At(p),!1).map(function(x){return Hs(x).map(function(T){return r.formatTransition(T)})}));try{for(var E=ht(y),C=E.next();!C.done;C=E.next()){var w=C.value;S.push(w)}}catch(x){e={error:x}}finally{try{C&&!C.done&&(n=E.return)&&n.call(E)}finally{if(e)throw e.error}}return S},t})();function cd(t,e){return new Bte(t,e)}var ti=w9,Hy=v9,jte=x9,Hte=A.useLayoutEffect;function ck(t){var e=A.useRef();return e.current||(e.current={v:t()}),e.current.v}var _v=function(){return _v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},_v.apply(this,arguments)},$te=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n},qte=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),s,o=[],a;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(u){a={error:u}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Wte(t,e){var n=ck(function(){return typeof t=="function"?t():t}),r=e.context,s=e.guards,o=e.actions,a=e.activities,u=e.services,c=e.delays;e.state;var f=$te(e,["context","guards","actions","activities","services","delays","state"]),p=ck(function(){var g={context:r,guards:s,actions:o,activities:a,services:u,delays:c},m=n.withConfig(g,function(){return _v(_v({},n.context),r)});return M9(m,f)});return Hte(function(){Object.assign(p.machine.options.actions,o),Object.assign(p.machine.options.guards,s),Object.assign(p.machine.options.activities,a),Object.assign(p.machine.options.services,u),Object.assign(p.machine.options.delays,c)},[o,s,a,u,c]),p}function Gte(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=qte(e,2),s=r[0],o=s===void 0?{}:s,a=r[1],u=Wte(t,o);return A.useEffect(function(){if(a){var c=u.subscribe(nh(a));return function(){c.unsubscribe()}}},[a]),A.useEffect(function(){var c=o.state;return u.start(c?$s.create(c):void 0),function(){u.stop(),u.status=Mn.NotStarted}},[]),u}function Vte(t){return t.status!==0?t.getSnapshot():t.machine.initialState}function Kte(t){return"state"in t&&"machine"in t}function Yte(t){return"state"in t}var Zte=function(t,e){return t===e},Xte=function(t,e){if(Kte(t)){if(t.status===0&&e.current)return e.current;var n=Vte(t);return e.current=t.status===0?n:null,n}return Yte(t)?t.state:void 0};function Qte(t,e,n,r){n===void 0&&(n=Zte);var s=A.useRef(null),o=A.useCallback(function(c){var f=t.subscribe(c).unsubscribe;return f},[t]),a=A.useCallback(function(){return Xte(t,s)},[t,r]),u=rT.useSyncExternalStoreWithSelector(o,a,a,e,n);return u}const Jte=t=>{if(t instanceof Ts)return t;if(t instanceof Error){if(t.name==="InvalidStateError"){const{message:e,recoverySuggestion:n}=Pc[Bt.PasskeyAlreadyExists];return new Ts({name:Bt.PasskeyAlreadyExists,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=Pc[Bt.PasskeyRegistrationCanceled];return new Ts({name:Bt.PasskeyRegistrationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}}return h6(t)},ene=async t=>{try{const e=p6();td(e,Bt.PasskeyNotSupported);const n=IG(t),r=await navigator.credentials.create({publicKey:n});return kG(r),OG(r)}catch(e){throw Jte(e)}},tne=t=>Rn(jn,Bn("StartWebAuthnRegistration"),or(),{...Hn,...t}),nne=t=>Rn(jn,Bn("CompleteWebAuthnRegistration"),or(),{...Hn,...t});async function rne(){const t=Ht.getConfig().Auth?.Cognito;lt(t);const{userPoolEndpoint:e,userPoolId:n}=t,{tokens:r}=await vy();ed(r);const s=tne({endpointResolver:bt({endpointOverride:e})}),{CredentialCreationOptions:o}=await s({region:yt(n),userAgentValue:Nt(Ve.StartWebAuthnRegistration)},{AccessToken:r.accessToken.toString()});PG(o);const a=await ene(o);await nne({endpointResolver:bt({endpointOverride:e})})({region:yt(n),userAgentValue:Nt(Ve.CompleteWebAuthnRegistration)},{AccessToken:r.accessToken.toString(),Credential:a})}const sne=t=>Rn(jn,Bn("ListWebAuthnCredentials"),or(),{...Hn,...t});async function one(t,e){const n=t.getConfig().Auth?.Cognito;lt(n);const{userPoolEndpoint:r,userPoolId:s}=n,{tokens:o}=await t.Auth.fetchAuthSession();ed(o);const a=sne({endpointResolver:bt({endpointOverride:r})}),{Credentials:u=[],NextToken:c}=await a({region:yt(s),userAgentValue:Nt(Ve.ListWebAuthnCredentials)},{AccessToken:o.accessToken.toString(),MaxResults:e?.pageSize,NextToken:e?.nextToken});return{credentials:u.map(p=>({credentialId:p.CredentialId,friendlyCredentialName:p.FriendlyCredentialName,relyingPartyId:p.RelyingPartyId,authenticatorAttachment:p.AuthenticatorAttachment,authenticatorTransports:p.AuthenticatorTransports,createdAt:p.CreatedAt?new Date(p.CreatedAt*1e3):void 0})),nextToken:c}}async function dT(t){return one(Ht,t)}const fT=t=>t.context.actorRef?.getSnapshot(),Sh=t=>fT(t)?.context,ine={category:Rs.AI,apis:[oi.CreateConversation,oi.DeleteConversation,oi.ListConversations,oi.UpdateConversation,oi.OnMessage,oi.SendMessage,oi.Generation]},ane={apis:[Ve.DeleteUser,Ve.UpdatePassword],category:Rs.Auth},lne={apis:[Ve.SignUp,Ve.ConfirmSignUp,Ve.ResendSignUpCode,Ve.SignIn,Ve.ConfirmSignIn,Ve.FetchUserAttributes,Ve.SignOut,Ve.ResetPassword,Ve.ConfirmResetPassword,Ve.SignInWithRedirect],category:Rs.Auth},une={apis:[qs.UploadData],category:Rs.Storage},cne={apis:[E_.NotifyMessageInteraction],category:Rs.InAppMessaging},dne={category:Rs.Geo,apis:[Qf.SearchByText,Qf.SearchForSuggestions,Qf.SearchByPlaceId]},fne={category:Rs.Geo,apis:[]},hne={apis:[qs.UploadData],category:Rs.Storage},pne={apis:[qs.UploadData,qs.Copy,qs.GetUrl,qs.List,qs.Remove,qs.GetDataAccess,qs.ListCallerAccessGrants],category:Rs.Storage};function as(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function mi(t){return typeof t=="string"||typeof t=="object"&&Object.prototype.toString.call(t)==="[object String]"}function gne(t){return as(t)&&Object.prototype.toString.call(t)==="[object Map]"}function mne(t){return as(t)&&Object.prototype.toString.call(t)==="[object Set]"}function hT(t){if(t==null)return!0;if(as(t)&&(gne(t)||mne(t)))return!t.size;if(as(t)&&(mi(t)||Array.isArray(t)))return!t.length;for(const e in t)if(vi(t,e))return!1;return!0}function vne(t){return Array.isArray(t)&&hT(t)}function yne(...t){return t.every(vne)}function P9(t){return as(t)&&hT(t)}function bne(...t){return t.every(P9)}function vi(t,e){return t!=null&&Object.prototype.hasOwnProperty.call(t,e)}function yi(t){return typeof t=="function"}const jt=(t,e)=>e?`${t}--${e}`:"",Br=(t,e,n)=>n?`${t}--${e}`:"";function Sne(...t){}function Ene(t,e){const n={},r={};return Object.entries(t).forEach(([s,o])=>{e(s)?n[s]=o:r[s]=o}),[n,r]}const k9=({payload:t},e,n)=>{const{data:r,event:s}=t,{send:o}=e,{onSignIn:a,onSignOut:u}=n??{};switch(s){case"signedIn":{yi(a)&&a(t);break}case"signInWithRedirect":{o("SIGN_IN_WITH_REDIRECT");break}case"signedOut":{yi(u)&&u(),o("SIGN_OUT");break}case"tokenRefresh_failure":{if(r?.error?.name===Pa.NetworkError)return;o("SIGN_OUT");break}}},Cne=(t,e=k9)=>{const n=r=>e(r,t);return Ao.listen("auth",n,"authenticator-hub-handler")},D9=["+1","+7","+20","+27","+30","+31","+32","+33","+34","+36","+39","+40","+41","+43","+44","+45","+46","+47","+48","+49","+51","+52","+53","+54","+55","+56","+57","+58","+60","+61","+62","+63","+64","+65","+66","+81","+82","+84","+86","+90","+91","+92","+93","+94","+95","+98","+212","+213","+216","+218","+220","+221","+222","+223","+224","+225","+226","+227","+228","+229","+230","+231","+232","+233","+234","+235","+236","+237","+238","+239","+240","+241","+242","+243","+244","+245","+246","+248","+249","+250","+251","+252","+253","+254","+255","+256","+257","+258","+260","+261","+262","+263","+264","+265","+266","+267","+268","+269","+290","+291","+297","+298","+299","+345","+350","+351","+352","+353","+354","+355","+356","+357","+358","+359","+370","+371","+372","+373","+374","+375","+376","+377","+378","+379","+380","+381","+382","+385","+386","+387","+389","+420","+421","+423","+500","+501","+502","+503","+504","+505","+506","+507","+508","+509","+537","+590","+591","+593","+594","+595","+596","+597","+598","+599","+670","+672","+673","+674","+675","+676","+677","+678","+679","+680","+681","+682","+683","+685","+686","+687","+688","+689","+690","+691","+692","+850","+852","+853","+855","+856","+872","+880","+886","+960","+961","+962","+963","+964","+965","+966","+967","+968","+970","+971","+972","+973","+974","+975","+976","+977","+992","+993","+994","+995","+996","+998"],$y={birthdate:{label:"Birthdate",placeholder:"Enter your Birthdate",type:"date",autocomplete:"bday",isRequired:!0},confirmation_code:{label:"Confirmation Code",placeholder:"Enter your Confirmation Code",type:"text",autocomplete:"one-time-code",isRequired:!0},confirm_password:{label:"Confirm Password",placeholder:"Please confirm your Password",type:"password",autocomplete:"new-password",isRequired:!0},email:{label:"Email",placeholder:"Enter your Email",type:"email",autocomplete:"username",isRequired:!0},family_name:{label:"Family Name",placeholder:"Enter your Family Name",type:"text",autocomplete:"family-name",isRequired:!0},given_name:{label:"Given Name",placeholder:"Enter your Given Name",type:"text",autocomplete:"given-name",isRequired:!0},middle_name:{label:"Middle Name",placeholder:"Enter your Middle Name",type:"text",autocomplete:"additional-name",isRequired:!0},name:{label:"Name",placeholder:"Enter your Name",type:"text",autocomplete:"name",isRequired:!0},nickname:{label:"Nickname",placeholder:"Enter your Nickname",type:"text",autocomplete:"tel",isRequired:!0},password:{label:"Password",placeholder:"Enter your Password",type:"password",autocomplete:"new-password",isRequired:!0},phone_number:{label:"Phone Number",placeholder:"Enter your Phone Number",type:"tel",autocomplete:"tel",dialCode:"+1",dialCodeList:D9,isRequired:!0},preferred_username:{label:"Preferred Username",placeholder:"Enter your Preferred Username",type:"text",isRequired:!0},profile:{label:"Profile",placeholder:"Add your Profile",type:"url",autocomplete:"url",isRequired:!0},website:{label:"Website",placeholder:"Add your Website",type:"url",autocomplete:"url",isRequired:!0},username:{label:"Username",placeholder:"Enter your Username",type:"text",autocomplete:"username",isRequired:!0}},wne=["^","$","*",".","[","]","{","}","(",")","?",'"',"!","@","#","%","&","/","\\",",",">","<","'",":",";","|","_","~","`","=","+","-"," "],_ne=(t,e)=>{if(e?.matches("federatedSignIn")){if(t.matches("signUpActor"))return"signUp";if(t.matches("signInActor"))return"signIn"}switch(!0){case t.matches("idle"):return"idle";case t.matches("setup"):return"setup";case t.matches("signOut"):return"signOut";case t.matches("authenticated"):return"authenticated";case e?.matches("confirmSignUp"):case e?.matches("resendSignUpCode"):return"confirmSignUp";case e?.matches("confirmSignIn"):return"confirmSignIn";case e?.matches("setupTotp.edit"):case e?.matches("setupTotp.submit"):return"setupTotp";case e?.matches("signIn.submit"):return e?.context.selectedAuthMethod!=null?"signInSelectAuthFactor":"signIn";case e?.matches("signIn.selectMethod"):return"signInSelectAuthFactor";case e?.matches("passkeyPrompt"):return"passkeyPrompt";case e?.matches("signIn"):return"signIn";case e?.matches("signUp"):case e?.matches("autoSignIn"):return"signUp";case e?.matches("forceChangePassword"):return"forceNewPassword";case e?.matches("forgotPassword"):return"forgotPassword";case e?.matches("confirmResetPassword"):return"confirmResetPassword";case e?.matches("selectUserAttributes"):return"verifyUser";case e?.matches("confirmVerifyUserAttribute"):return"confirmVerifyUser";case e?.matches("setupEmail"):return"setupEmail";case e?.matches("selectMfaType"):return"selectMfaType";case t.matches("getCurrentUser"):case e?.matches("fetchUserAttributes"):return"transition";default:return null}},xne=t=>{const e=n=>r=>t({type:n,data:r});return{initializeMachine:e("INIT"),resendCode:e("RESEND"),selectAuthMethod:e("SELECT_METHOD"),signOut:e("SIGN_OUT"),submitForm:e("SUBMIT"),toShowAuthMethods:e("SHOW_AUTH_METHODS"),updateForm:e("CHANGE"),updateBlur:e("BLUR"),toFederatedSignIn:e("FEDERATED_SIGN_IN"),toForgotPassword:e("FORGOT_PASSWORD"),toSignIn:e("SIGN_IN"),toSignUp:e("SIGN_UP"),skipVerification:e("SKIP")}},Ane=t=>{const e=Sh(t)??{},{allowedMfaTypes:n,availableAuthMethods:r,challengeName:s,codeDeliveryDetails:o,preferredChallenge:a,remoteError:u,selectedAuthMethod:c,validationError:f,totpSecretCode:p=null,unverifiedUserAttributes:g,username:m}=e,{socialProviders:y=[],loginMechanisms:S}=t.context?.config??{},E=S?.[0],C=e?.user??t.context?.user,w=!!(f&&Object.keys(f).length>0),x=fT(t),T=t.hasTag("pending")||x?.hasTag("pending"),R=_ne(t,x),M=(I=>{switch(I){case"idle":case"setup":return"configuring";case"authenticated":return"authenticated";default:return"unauthenticated"}})(R);return{allowedMfaTypes:n,authStatus:M,availableAuthMethods:r,challengeName:s,codeDeliveryDetails:o,error:u,hasValidationErrors:w,isPending:T,loginMechanism:E,preferredChallenge:a,route:R,selectedAuthMethod:c,socialProviders:y,totpSecretCode:p,unverifiedUserAttributes:g,user:C,username:m,validationErrors:f}},Tne=({send:t,state:e})=>{const n=xne(t),r=Ane(e);return{...n,...r}};var bc;(function(t){t.Apple="Apple",t.Amazon="Amazon",t.Facebook="Facebook",t.Google="Google"})(bc||(bc={}));var dk;(function(t){t.Email="email",t.PhoneNumber="phone_number"})(dk||(dk={}));const Rne=["birthdate","email","family_name","given_name","middle_name","name","nickname","phone_number","preferred_username","profile","website"],Ine=["username","email","phone_number"],L9=[...Ine,...Rne,"confirmation_code","password","confirm_password"],One=t=>L9.includes(t),U9=t=>L9.includes(t),Nne=t=>Array.isArray(t),Mne=t=>t?Nne(t)?t:[t]:null,Pne=t=>{const e=t.trim().split("");for(let n=0;n<e.length;n++)n>0&&n<e.length-1&&(e[n]="*");return e.join("")},kne=t=>{if(t.length<4)return t;const e=t.split("");for(let n=0;n<e.length-4;n++)e[n]="*";return e.join("")},Dne=t=>{const e=t.split("@");return`${Pne(e[0])}@${e[1]}`},Lne=(t,e)=>t==="Phone Number"?kne(e):Dne(e),Une=t=>wne.some(e=>t.includes(e)),Fne=(t,e,n)=>encodeURI(`otpauth://totp/${t}:${e}?secret=${n}&issuer=${t}`);function zne(t,...e){return Object.entries(t).reduce((n,[r,s])=>({...n,[r]:e.includes(r)?s:s?.trim()}),{})}const Bne={ADD_PROFILE:"Add your Profile",ADD_WEBSITE:"Add your Website",BACK_SIGN_IN:"Back to Sign In",BIRTHDATE:"Birthdate",CHANGE_PASSWORD:"Change Password",CHANGING_PASSWORD:"Changing",CODE:"Code",CODE_ARRIVAL:"It may take a minute to arrive",CODE_EMAILED:"Your code is on the way. To log in, enter the code we emailed to",CODE_SENT:"Your code is on the way. To log in, enter the code we sent you",CODE_TEXTED:"Your code is on the way. To log in, enter the code we texted to",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Please confirm your Password",CONFIRM_RESET_PASSWORD_HEADING:"Reset your Password",CONFIRM_SIGNUP_HEADING:"Confirm Sign Up",CONFIRM_SMS:"Confirm SMS Code",CONFIRM_EMAIL:"Confirm Email Code",CONFIRM_MFA_DEFAULT:"Confirm MFA Code",CONFIRM_TOTP:"Confirm TOTP Code",CONFIRM:"Confirm",CONFIRMATION_CODE:"Confirmation Code",CONFIRMING:"Confirming",CONTINUE:"Continue",CONTINUE_WITHOUT_PASSKEY:"Continue without a Passkey",CREATE_ACCOUNT:"Create Account",CREATE_ACCOUNT_WITH_EMAIL_OTP:"Create account with Email OTP",CREATE_ACCOUNT_WITH_PASSWORD:"Create account with Password",CREATE_ACCOUNT_WITH_SMS_OTP:"Create account with SMS OTP",CREATE_PASSKEY:"Create a Passkey",CREATING_ACCOUNT:"Creating Account",EMAIL_ADDRESS:"Email",EMAIL_OTP:"Email Message",ENTER_BIRTHDATE:"Enter your Birthdate",ENTER_CODE:"Enter your code",ENTER_CONFIRMATION_CODE:"Enter your Confirmation Code",ENTER_EMAIL:"Enter your Email",ENTER_FAMILY_NAME:"Enter your Family Name",ENTER_GIVEN_NAME:"Enter your Given Name",ENTER_MIDDLE_NAME:"Enter your Middle Name",ENTER_NAME:"Enter your Name",ENTER_NICK_NAME:"Enter your Nickname",ENTER_PASSWORD:"Enter your Password",ENTER_PHONE_NUMBER:"Enter your Phone Number",ENTER_PREFERRED_USERNAME:"Enter your Preferred Username",ENTER_USERNAME:"Enter your username",ENTER_USERNAME_FIRST:"Please enter your username first",EXISTING_PASSKEYS:"Existing Passkeys",FAMILY_NAME:"Family Name",GIVEN_NAME:"Given Name",FORGOT_PASSWORD:"Forgot Password?",FORGOT_YOUR_PASSWORD:"Forgot your password?",HIDE_PASSWORD:"Hide password",LOADING:"Loading",LOGIN_NAME:"Username",MIDDLE_NAME:"Middle Name",MFA_SETUP_SELECTION:"Multi-Factor Authentication Setup",MFA_SELECTION:"Multi-Factor Authentication",NAME:"Name",NICKNAME:"Nickname",NEW_PASSWORD:"New password",OR:"or",OTHER_SIGN_IN_OPTIONS:"Other sign-in options",PASSKEY_AUTHENTICATION_CANCELED:"Passkey authentication was canceled. Please try again or use a different sign-in method.",PASSKEY_CREATED_SUCCESS:"Passkey created successfully!",PASSKEY_LABEL:"Passkey",PASSKEY_PROMPT_DESCRIPTION:"Passkeys are WebAuthn credentials that validate your identity using biometric data like touch or facial recognition or device authentication like passwords or PINs, serving as a secure password replacement.",PASSKEY_PROMPT_HEADING:"Sign in faster with Passkey",PASSKEY_REGISTERED:"Your passkey has been successfully registered.",PASSKEY_REGISTRATION_FAILED:"Failed to create passkey. Please try again.",PASSWORD:"Password",PASSWORDLESS_NOT_ENABLED:"Passwordless authentication is not enabled for this account. Please contact your administrator or use password sign-in.",PHONE_NUMBER:"Phone Number",PREFERRED_USERNAME:"Preferred Username",PROFILE:"Profile",REGISTERING:"Registering",RESEND_CODE:"Resend Code",RESET_PASSWORD_HEADING:"Reset your password",RESET_PASSWORD:"Reset Password",SEND_CODE:"Send code",CODE_DELIVERY_FAILED:"Unable to send verification code. Please try again.",VERIFICATION_CODE_EXPIRED:"Your verification code has expired. Please request a new code.",VERIFICATION_CODE_INVALID:"The verification code you entered is incorrect. Please try again.",SENDING:"Sending",SELECT_MFA_TYPE:"Select MFA Type",SETUP_ANOTHER_PASSKEY:"Setup another Passkey",SETUP_EMAIL:"Setup Email",SETUP_TOTP:"Setup TOTP",SHOW_PASSWORD:"Show password",SIGN_IN_BUTTON:"Sign in",SIGN_IN_TAB:"Sign In",SIGN_IN_WITH_AMAZON:"Sign In with Amazon",SIGN_IN_WITH_APPLE:"Sign In with Apple",SIGN_IN_WITH_EMAIL:"Sign In with Email",SIGN_IN_WITH_FACEBOOK:"Sign In with Facebook",SIGN_IN_WITH_GOOGLE:"Sign In with Google",SIGN_IN_WITH_PASSKEY:"Sign In with Passkey",SIGN_IN_WITH_PASSWORD:"Sign In with Password",SIGN_IN_WITH_SMS:"Sign In with SMS",SIGN_IN:"Sign in to your account",SIGN_UP_BUTTON:"Create a new account",SIGNING_IN_BUTTON:"Signing in",SKIP:"Skip",SMS_MFA:"Text Message (SMS)",SUBMIT:"Submit",SUBMITTING:"Submitting",SOFTWARE_TOKEN_MFA:"Authenticator App (TOTP)",UPPERCASE_COPY:"COPY",USERNAME:"Username",VERIFY_CONTACT:"Verify Contact",VERIFY_HEADING:"Account recovery requires verified contact information",VERIFY:"Verify",WE_EMAILED:"We Emailed You",WE_SENT_CODE:"We Sent A Code",WE_TEXTED:"We Texted You",WEBSITE:"Website"},Xm={...Bne},we={...Xm};function ye(t){return n6.get(t)}const pT=t=>{const e=t?.context.config?.loginMechanisms,[n]=e??["username"];return n},jne=t=>{const e={...t};for(const[n,r]of Object.entries(t)){const{label:s,placeholder:o}=r;e[n]={...r,label:s?ye(s):void 0,placeholder:o?ye(o):void 0}}return e},Hne=t=>Object.entries(t).sort((e,n)=>{const r=e[1].order||Number.MAX_VALUE,s=n[1].order||Number.MAX_VALUE;return r-s}).filter(e=>e[1]!==void 0),$ne="+1",bi=t=>{let e=$y[t];const{type:n}=e;return n==="tel"&&(e={...e,dialCode:$ne}),e},qy=t=>{const e=pT(t);return{...bi(e),autocomplete:"username"}},Qm=t=>({confirmation_code:{...bi("confirmation_code"),label:"Code *",placeholder:"Code"}}),qne=t=>{const e=t.context.actorRef?.getSnapshot()?.context,n=e?.availableAuthMethods,r=e?.preferredChallenge,s=!n?.length||n.length===1&&n[0]==="PASSWORD"||n.length>1&&(!r||r==="PASSWORD"),o={username:{...qy(t)}};return s&&(o.password={...bi("password"),autocomplete:"current-password"}),o},Wne=t=>{const{loginMechanisms:e,signUpAttributes:n}=t.context.config,r=pT(t),o=t.context.actorRef?.getSnapshot()?.context?.availableAuthMethods,a=o&&o.length>1,u=Array.from(new Set([...e,"password","confirm_password",...n])),c={};for(const f of u)if(U9(f)){const p=f===r?qy(t):bi(f),g=a&&(f==="email"||f==="phone_number"||f==="password"||f==="confirm_password");c[f]={...p,...g&&{isRequired:!1}}}else console.debug(`Authenticator does not have a default implementation for ${f}. Customize SignUp FormFields to add your own.`);return c},Gne=t=>({confirmation_code:{...bi("confirmation_code"),placeholder:"Enter your code"}}),Vne=t=>{const e=pT(t),{label:n}=$y[e];return{username:{...qy(t),label:`Enter your ${n.toLowerCase()}`,placeholder:`Enter your ${n.toLowerCase()}`}}},Kne=t=>({...Qm(),password:{...bi("password"),label:"New Password",placeholder:"New Password"},confirm_password:{...bi("confirm_password"),label:"Confirm Password",placeholder:"Confirm Password"}}),Yne=t=>{const e=fT(t),{missingAttributes:n}=e.context,r=Array.from(new Set(["password","confirm_password",...n??[]])),s={};for(const o of r)U9(o)?s[o]={...bi(o)}:console.debug(`Authenticator does not have a default implementation for ${o}. Customize ForceNewPassword FormFields to add your own.`);return s},Zne=t=>({email:bi("email")}),Xne={signIn:qne,signUp:Wne,confirmSignUp:Gne,confirmSignIn:Qm,forceNewPassword:Yne,forgotPassword:Vne,confirmResetPassword:Kne,confirmVerifyUser:Qm,setupEmail:Zne,setupTotp:Qm},Qne=(t,e)=>{const n=Xne[t];return n(e)},Jne=(t,e)=>{const n=Sh(e)?.formFields?.[t];return!n||Object.keys(n).length===0?{}:Object.entries(n).reduce((r,[s,o])=>{if((t==="signIn"||t==="forgotPassword")&&s==="username"){const u={...qy(e),...o};return{...r,[s]:u}}else if(One(s)){const u={...$y[s],...o};return{...r,[s]:u}}else return{...r,[s]:o}},{})},ere=(t,e)=>{const n=Qne(t,e),r=Jne(t,e),s={...n,...r};return delete s.QR,jne(s)},tre=t=>t.map(e=>{const n=e[0],r={...e[1],order:void 0};return[n,r]}),nre=(t,e)=>{const n=ere(t,e);return tre(Hne(n))},rre=t=>{switch(t){case"EMAIL_OTP":return ye(we.CONFIRM_EMAIL);case"SMS_MFA":return ye(we.CONFIRM_SMS);case"SOFTWARE_TOKEN_MFA":return ye(we.CONFIRM_TOTP);default:return ye(we.CONFIRM_MFA_DEFAULT)}},sre=t=>{const{DeliveryMedium:e,Destination:n}=t??{},r=e==="EMAIL",s=e==="SMS",o=ye(we.CODE_ARRIVAL);return r||s?`${ye(r?we.CODE_EMAILED:we.CODE_TEXTED)} ${n}. ${o}.`:`${ye(we.CODE_SENT)}. ${o}.`},ore=t=>{const{DeliveryMedium:e}=t??{},n=e==="EMAIL";return ye(!n&&e==="SMS"?we.WE_SENT_CODE:n?we.WE_EMAILED:we.WE_TEXTED)},ire={amazon:"Amazon",apple:"Apple",facebook:"Facebook",google:"Google"},are=(t,e)=>ye(`Sign ${t==="signIn"?"In":"Up"} with ${ire[e]}`),lre=t=>ye(t==="MFA_SETUP"?we.MFA_SETUP_SELECTION:we.MFA_SELECTION),ure=t=>{switch(t){case"email":return ye(we.EMAIL_ADDRESS);case"phone_number":return ye(we.PHONE_NUMBER);default:return ye(we.USERNAME)}},cre=t=>{switch(t){case"EMAIL":return ye(Xm.EMAIL_OTP);case"SMS":return ye(Xm.SMS_MFA);case"TOTP":return ye(Xm.SOFTWARE_TOKEN_MFA);default:return ye(t)}},kn={getBackToSignInText:()=>ye(we.BACK_SIGN_IN),getChangePasswordText:()=>ye(we.CHANGE_PASSWORD),getChangingText:()=>ye(we.CHANGING_PASSWORD),getConfirmText:()=>ye(we.CONFIRM),getConfirmingText:()=>ye(we.CONFIRMING),getContinueText:()=>ye(we.CONTINUE),getCopyText:()=>ye(we.UPPERCASE_COPY),getHidePasswordText:()=>ye(we.HIDE_PASSWORD),getLoadingText:()=>ye(we.LOADING),getOrText:()=>ye(we.OR),getResendCodeText:()=>ye(we.RESEND_CODE),getSendCodeText:()=>ye(we.SEND_CODE),getSendingText:()=>ye(we.SENDING),getShowPasswordText:()=>ye(we.SHOW_PASSWORD),getSubmitText:()=>ye(we.SUBMIT),getSubmittingText:()=>ye(we.SUBMITTING),getSignInTabText:()=>ye(we.SIGN_IN_TAB),getSignUpTabText:()=>ye(we.CREATE_ACCOUNT),getForgotPasswordText:t=>ye(t?we.FORGOT_PASSWORD:we.FORGOT_YOUR_PASSWORD),getSigningInText:()=>ye(we.SIGNING_IN_BUTTON),getSignInText:()=>ye(we.SIGN_IN_BUTTON),getCreatingAccountText:()=>ye(we.CREATING_ACCOUNT),getCreateAccountText:()=>ye(we.CREATE_ACCOUNT),getCreateAccountWithEmailText:()=>ye(we.CREATE_ACCOUNT_WITH_EMAIL_OTP),getCreateAccountWithPasswordText:()=>ye(we.CREATE_ACCOUNT_WITH_PASSWORD),getCreateAccountWithSmsText:()=>ye(we.CREATE_ACCOUNT_WITH_SMS_OTP),getDeliveryMessageText:sre,getDeliveryMethodText:ore,getChallengeText:rre,getResetYourPasswordText:()=>ye(we.RESET_PASSWORD),getSetupEmailText:()=>ye(we.SETUP_EMAIL),getSetupTotpText:()=>ye(we.SETUP_TOTP),getSetupTotpInstructionsText:()=>ye("Copy and paste the secret key below into an authenticator app and then enter the code in the text field below."),getCopiedText:()=>ye("COPIED"),getSignInWithFederationText:are,getMfaTypeLabelByValue:cre,getSelectMfaTypeByChallengeName:lre,getSelectMfaTypeText:()=>ye(we.SELECT_MFA_TYPE),getSkipText:()=>ye(we.SKIP),getVerifyText:()=>ye(we.VERIFY),getVerifyContactText:()=>ye(we.VERIFY_CONTACT),getAccountRecoveryInfoText:()=>ye(we.VERIFY_HEADING),getPasskeyPromptHeadingText:()=>ye(we.PASSKEY_PROMPT_HEADING),getPasskeyPromptDescriptionText:()=>ye(we.PASSKEY_PROMPT_DESCRIPTION),getCreatePasskeyText:()=>ye(we.CREATE_PASSKEY),getRegisteringText:()=>ye(we.REGISTERING),getContinueWithoutPasskeyText:()=>ye(we.CONTINUE_WITHOUT_PASSKEY),getPasskeyCreatedSuccessText:()=>ye(we.PASSKEY_CREATED_SUCCESS),getPasskeyRegisteredText:()=>ye(we.PASSKEY_REGISTERED),getPasskeyRegistrationFailedText:()=>ye(we.PASSKEY_REGISTRATION_FAILED),getPasskeyLabelText:()=>ye(we.PASSKEY_LABEL),getExistingPasskeysText:()=>ye(we.EXISTING_PASSKEYS),getSetupAnotherPasskeyText:()=>ye(we.SETUP_ANOTHER_PASSKEY),getSignInWithPasswordText:()=>ye(we.SIGN_IN_WITH_PASSWORD),getSignInWithEmailText:()=>ye(we.SIGN_IN_WITH_EMAIL),getSignInWithSmsText:()=>ye(we.SIGN_IN_WITH_SMS),getSignInWithPasskeyText:()=>ye(we.SIGN_IN_WITH_PASSKEY),getOtherSignInOptionsText:()=>ye(we.OTHER_SIGN_IN_OPTIONS),getEnterUsernameFirstText:()=>ye(we.ENTER_USERNAME_FIRST),getUsernameLabelByLoginMechanism:ure,getInvalidEmailText:()=>ye("Please enter a valid email"),getRequiredFieldText:()=>ye("This field is required")};var BE,fk;function F9(){if(fk)return BE;fk=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,o=Array(s);++r<s;)o[r]=n(e[r],r,e);return o}return BE=t,BE}var jE,hk;function dre(){if(hk)return jE;hk=1;var t=XA(),e=r9(),n=1,r=2;function s(o,a,u,c){var f=u.length,p=f,g=!c;if(o==null)return!p;for(o=Object(o);f--;){var m=u[f];if(g&&m[2]?m[1]!==o[m[0]]:!(m[0]in o))return!1}for(;++f<p;){m=u[f];var y=m[0],S=o[y],E=m[1];if(g&&m[2]){if(S===void 0&&!(y in o))return!1}else{var C=new t;if(c)var w=c(S,E,y,o,a,C);if(!(w===void 0?e(E,S,n|r,c,C):w))return!1}}return!0}return jE=s,jE}var HE,pk;function z9(){if(pk)return HE;pk=1;var t=Ai();function e(n){return n===n&&!t(n)}return HE=e,HE}var $E,gk;function fre(){if(gk)return $E;gk=1;var t=z9(),e=n9();function n(r){for(var s=e(r),o=s.length;o--;){var a=s[o],u=r[a];s[o]=[a,u,t(u)]}return s}return $E=n,$E}var qE,mk;function B9(){if(mk)return qE;mk=1;function t(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}return qE=t,qE}var WE,vk;function hre(){if(vk)return WE;vk=1;var t=dre(),e=fre(),n=B9();function r(s){var o=e(s);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(a){return a===s||t(a,s,o)}}return WE=r,WE}var GE,yk;function gT(){if(yk)return GE;yk=1;var t=ld(),e=nu(),n="[object Symbol]";function r(s){return typeof s=="symbol"||e(s)&&t(s)==n}return GE=r,GE}var VE,bk;function mT(){if(bk)return VE;bk=1;var t=Ti(),e=gT(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(o,a){if(t(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||e(o)?!0:r.test(o)||!n.test(o)||a!=null&&o in Object(a)}return VE=s,VE}var KE,Sk;function pre(){if(Sk)return KE;Sk=1;var t=ZA(),e="Expected a function";function n(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new TypeError(e);var o=function(){var a=arguments,u=s?s.apply(this,a):a[0],c=o.cache;if(c.has(u))return c.get(u);var f=r.apply(this,a);return o.cache=c.set(u,f)||c,f};return o.cache=new(n.Cache||t),o}return n.Cache=t,KE=n,KE}var YE,Ek;function gre(){if(Ek)return YE;Ek=1;var t=pre(),e=500;function n(r){var s=t(r,function(a){return o.size===e&&o.clear(),a}),o=s.cache;return s}return YE=n,YE}var ZE,Ck;function mre(){if(Ck)return ZE;Ck=1;var t=gre(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(e,function(a,u,c,f){o.push(c?f.replace(n,"$1"):u||a)}),o});return ZE=r,ZE}var XE,wk;function vre(){if(wk)return XE;wk=1;var t=Py(),e=F9(),n=Ti(),r=gT(),s=t?t.prototype:void 0,o=s?s.toString:void 0;function a(u){if(typeof u=="string")return u;if(n(u))return e(u,a)+"";if(r(u))return o?o.call(u):"";var c=u+"";return c=="0"&&1/u==-1/0?"-0":c}return XE=a,XE}var QE,_k;function vT(){if(_k)return QE;_k=1;var t=vre();function e(n){return n==null?"":t(n)}return QE=e,QE}var JE,xk;function Wy(){if(xk)return JE;xk=1;var t=Ti(),e=mT(),n=mre(),r=vT();function s(o,a){return t(o)?o:e(o,a)?[o]:n(r(o))}return JE=s,JE}var eC,Ak;function ep(){if(Ak)return eC;Ak=1;var t=gT();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return eC=e,eC}var tC,Tk;function yT(){if(Tk)return tC;Tk=1;var t=Wy(),e=ep();function n(r,s){s=t(s,r);for(var o=0,a=s.length;r!=null&&o<a;)r=r[e(s[o++])];return o&&o==a?r:void 0}return tC=n,tC}var nC,Rk;function yre(){if(Rk)return nC;Rk=1;var t=yT();function e(n,r,s){var o=n==null?void 0:t(n,r);return o===void 0?s:o}return nC=e,nC}var rC,Ik;function bre(){if(Ik)return rC;Ik=1;function t(e,n){return e!=null&&n in Object(e)}return rC=t,rC}var sC,Ok;function Sre(){if(Ok)return sC;Ok=1;var t=Wy(),e=QA(),n=Ti(),r=Ly(),s=eT(),o=ep();function a(u,c,f){c=t(c,u);for(var p=-1,g=c.length,m=!1;++p<g;){var y=o(c[p]);if(!(m=u!=null&&f(u,y)))break;u=u[y]}return m||++p!=g?m:(g=u==null?0:u.length,!!g&&s(g)&&r(y,g)&&(n(u)||e(u)))}return sC=a,sC}var oC,Nk;function Ere(){if(Nk)return oC;Nk=1;var t=bre(),e=Sre();function n(r,s){return r!=null&&e(r,s,t)}return oC=n,oC}var iC,Mk;function Cre(){if(Mk)return iC;Mk=1;var t=r9(),e=yre(),n=Ere(),r=mT(),s=z9(),o=B9(),a=ep(),u=1,c=2;function f(p,g){return r(p)&&s(g)?o(a(p),g):function(m){var y=e(m,p);return y===void 0&&y===g?n(m,p):t(g,y,u|c)}}return iC=f,iC}var aC,Pk;function bT(){if(Pk)return aC;Pk=1;function t(e){return e}return aC=t,aC}var lC,kk;function wre(){if(kk)return lC;kk=1;function t(e){return function(n){return n?.[e]}}return lC=t,lC}var uC,Dk;function _re(){if(Dk)return uC;Dk=1;var t=yT();function e(n){return function(r){return t(r,n)}}return uC=e,uC}var cC,Lk;function xre(){if(Lk)return cC;Lk=1;var t=wre(),e=_re(),n=mT(),r=ep();function s(o){return n(o)?t(r(o)):e(o)}return cC=s,cC}var dC,Uk;function Are(){if(Uk)return dC;Uk=1;var t=hre(),e=Cre(),n=bT(),r=Ti(),s=xre();function o(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?e(a[0],a[1]):t(a):s(a)}return dC=o,dC}var fC,Fk;function j9(){if(Fk)return fC;Fk=1;var t=tu(),e=(function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}})();return fC=e,fC}var hC,zk;function ST(){if(zk)return hC;zk=1;var t=j9();function e(n,r,s){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:s,writable:!0}):n[r]=s}return hC=e,hC}var pC,Bk;function H9(){if(Bk)return pC;Bk=1;var t=ST(),e=Qh(),n=Object.prototype,r=n.hasOwnProperty;function s(o,a,u){var c=o[a];(!(r.call(o,a)&&e(c,u))||u===void 0&&!(a in o))&&t(o,a,u)}return pC=s,pC}var gC,jk;function Tre(){if(jk)return gC;jk=1;var t=H9(),e=Wy(),n=Ly(),r=Ai(),s=ep();function o(a,u,c,f){if(!r(a))return a;u=e(u,a);for(var p=-1,g=u.length,m=g-1,y=a;y!=null&&++p<g;){var S=s(u[p]),E=c;if(S==="__proto__"||S==="constructor"||S==="prototype")return a;if(p!=m){var C=y[S];E=f?f(C,S,y):void 0,E===void 0&&(E=r(C)?C:n(u[p+1])?[]:{})}t(y,S,E),y=y[S]}return a}return gC=o,gC}var mC,Hk;function Rre(){if(Hk)return mC;Hk=1;var t=yT(),e=Tre(),n=Wy();function r(s,o,a){for(var u=-1,c=o.length,f={};++u<c;){var p=o[u],g=t(s,p);a(g,p)&&e(f,n(p,s),g)}return f}return mC=r,mC}var vC,$k;function ET(){if($k)return vC;$k=1;var t=t9(),e=t(Object.getPrototypeOf,Object);return vC=e,vC}var yC,qk;function Ire(){if(qk)return yC;qk=1;var t=Z8(),e=ET(),n=J8(),r=Q8(),s=Object.getOwnPropertySymbols,o=s?function(a){for(var u=[];a;)t(u,n(a)),a=e(a);return u}:r;return yC=o,yC}var bC,Wk;function Ore(){if(Wk)return bC;Wk=1;function t(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}return bC=t,bC}var SC,Gk;function Nre(){if(Gk)return SC;Gk=1;var t=Ai(),e=nT(),n=Ore(),r=Object.prototype,s=r.hasOwnProperty;function o(a){if(!t(a))return n(a);var u=e(a),c=[];for(var f in a)f=="constructor"&&(u||!s.call(a,f))||c.push(f);return c}return SC=o,SC}var EC,Vk;function CT(){if(Vk)return EC;Vk=1;var t=e9(),e=Nre(),n=Uy();function r(s){return n(s)?t(s,!0):e(s)}return EC=r,EC}var CC,Kk;function Mre(){if(Kk)return CC;Kk=1;var t=X8(),e=Ire(),n=CT();function r(s){return t(s,n,e)}return CC=r,CC}var wC,Yk;function Pre(){if(Yk)return wC;Yk=1;var t=F9(),e=Are(),n=Rre(),r=Mre();function s(o,a){if(o==null)return{};var u=t(r(o),function(c){return[c]});return a=e(a),n(o,u,function(c,f){return a(c,f[0])})}return wC=s,wC}var kre=Pre();const Dre=qa(kre),Lre=!0,Ure="",Eh=(t,e)=>`${t}${e}`.replace(/[^A-Z0-9+]/gi,""),Fre=(t,e)=>{switch(e){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return e.startsWith("custom:")}},zre=t=>{const{phone_number:e,...n}=Dre(t,Fre);if(mi(e)&&e!==Ure){const{country_code:r}=t;return{...n,phone_number:Eh(r,e)}}return n},Bre=(t,e,n,r)=>{const{password:s,...o}=e,a=zre(o),u=r&&r!=="PASSWORD";let c=a;r==="SMS_OTP"&&a.email&&(c={...a,email:""});const f={autoSignIn:u?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:r}:Lre,userAttributes:{...n==="phone_number"?{...c,phone_number:t}:c}};return{username:t,password:u?void 0:s,options:f}},jre=({formValues:t,loginMechanisms:e})=>{const n=t.__authMethod;if(n==="SMS_OTP"){const{country_code:s,phone_number:o}=t;return Eh(s,o)}if(n==="EMAIL_OTP")return t.email;if(e.includes("username"))return t.username;const r=e[0];if(r==="phone_number"){const{country_code:s,phone_number:o}=t;return Eh(s,o)}return t[r]},Hre=(t,e)=>{const n=[],r=e!==void 0;n.push("PASSWORD"),(r||t?.emailOtpEnabled)&&n.push("EMAIL_OTP"),(r||t?.smsOtpEnabled)&&n.push("SMS_OTP"),(r||t?.webAuthnEnabled)&&n.push("WEB_AUTHN");const s=e??[],o=n.filter(a=>!s.includes(a));if(o.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return o},{assign:ot}=A9,$re=ot({actorDoneData:void 0}),qre=ot({challengeName:void 0}),Wre=ot({missingAttributes:void 0}),Gre=ot({remoteError:void 0}),Vre=ot({formValues:t=>({username:t.formValues?.username})}),Kre=ot({touched:{}}),Yre=ot({user:void 0}),Zre=ot({validationError:{}}),Xre=ot({totpSecretCode:(t,{data:e})=>{const{sharedSecret:n}=e.nextStep?.totpSetupDetails??{};return n}}),Qre=ot({allowedMfaTypes:(t,{data:e})=>e.nextStep?.allowedMFATypes}),Jre=ot({step:"SIGN_IN"}),ese=ot({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),tse=ot({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),nse=ot({challengeName:(t,{data:e})=>{const{signInStep:n}=e.nextStep;switch(n){case"CONFIRM_SIGN_IN_WITH_SMS_CODE":return"SMS_MFA";case"CONFIRM_SIGN_IN_WITH_TOTP_CODE":return"SOFTWARE_TOKEN_MFA";case"CONFIRM_SIGN_IN_WITH_EMAIL_CODE":return"EMAIL_OTP";case"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION":case"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP":case"CONTINUE_SIGN_IN_WITH_TOTP_SETUP":return"MFA_SETUP";case"CONTINUE_SIGN_IN_WITH_MFA_SELECTION":return"SELECT_MFA_TYPE";default:return}}}),rse=ot({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:r,country_code:s}=t;return n==="phone_number"?Eh(s,r):r}}),sse=ot({username:jre}),ose=ot({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:r,country_code:s}=t;return n==="phone_number"?Eh(s,r):r}}),ise=ot({step:(t,{data:e})=>e.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":e.nextStep.signInStep}),ase=ot({step:(t,{data:e})=>e.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":e.nextStep.signUpStep}),lse=ot({step:(t,{data:e})=>e.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":e.nextStep.resetPasswordStep}),use=ot({missingAttributes:(t,{data:e})=>e.nextStep?.missingAttributes}),cse=ot({validationError:(t,{data:e})=>e}),dse=ot({remoteError:(t,{data:e})=>{if(e.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const n=e?.message||"";return n.includes("USER_AUTH flow not enabled")?ye(we.PASSWORDLESS_NOT_ENABLED):n.includes("Cannot send code to either")?ye(we.CODE_DELIVERY_FAILED):n.includes("Invalid code or auth state")?ye(we.VERIFICATION_CODE_INVALID):n.includes("session is expired")?ye(we.VERIFICATION_CODE_EXPIRED):n.includes("ceremony has been canceled")?ye(we.PASSKEY_AUTHENTICATION_CANCELED):n||e}}),fse=ot({user:(t,{data:e})=>e}),Zk=t=>({Destination:t.destination,DeliveryMedium:t.deliveryMedium,AttributeName:t.attributName}),hse=ot({codeDeliveryDetails:(t,{data:e})=>e?.nextStep?.codeDeliveryDetails?Zk(e.nextStep.codeDeliveryDetails):Zk(e)}),pse=ot({formValues:(t,{data:e})=>{const{name:n,value:r}=e;return{...t.formValues,[n]:r}}}),gse=ot({formValues:(t,{data:e})=>zne({...t.formValues,...e},"password")}),mse=ot({touched:(t,{data:e})=>({...t.touched,[e.name]:!0})}),vse=ot({unverifiedUserAttributes:(t,{data:e})=>{const n=e||t.fetchedUserAttributes;if(!n)return{};const{email:r,phone_number:s}=n;return{...r&&{email:r},...s&&{phone_number:s}}}}),yse=ot({selectedUserAttribute:void 0}),bse=ot({selectedUserAttribute:t=>t.formValues?.unverifiedAttr}),Sse=ot({step:"CONFIRM_SIGN_UP"}),Ese=ot({selectedAuthMethod:(t,{data:e})=>e.method}),Cse=ot({selectedAuthMethod:(t,{data:e})=>e?.__authMethod||"PASSWORD"}),wse=ot({step:"SELECT_AUTH_METHOD"}),_se=ot({fetchedUserAttributes:(t,e)=>e.data}),xse=ot({hasExistingPasskeys:(t,e)=>e.data}),Ase=ot({hasExistingPasskeys:!1}),tp={clearActorDoneData:$re,clearChallengeName:qre,clearError:Gre,clearFormValues:Vre,clearHasExistingPasskeys:Ase,clearMissingAttributes:Wre,clearSelectedUserAttribute:yse,clearTouched:Kre,clearUser:Yre,clearValidationError:Zre,handleBlur:mse,handleInput:pse,handleSubmit:gse,setAllowedMfaTypes:Qre,setChallengeName:nse,setCodeDeliveryDetails:hse,setFetchedUserAttributes:_se,setFieldErrors:cse,setHasExistingPasskeys:xse,setMissingAttributes:use,setNextResetPasswordStep:lse,setNextSignInStep:ise,setNextSignUpStep:ase,setRemoteError:dse,setConfirmAttributeCompleteStep:tse,setConfirmSignUpSignUpStep:Sse,setSelectAuthMethodStep:wse,setSelectedAuthMethod:Ese,setSelectedAuthMethodFromForm:Cse,setShouldVerifyUserAttributeStep:ese,setSelectedUserAttribute:bse,setSignInStep:Jre,setTotpSecretCode:Xre,setUser:fse,setUnverifiedUserAttributes:vse,setUsernameForgotPassword:rse,setUsernameSignIn:ose,setUsernameSignUp:sse},Tse=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],Rse=(t,{data:e})=>e?.nextStep.signInStep==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",Ise=(t,{data:e})=>e?.nextStep?.signInStep==="RESET_PASSWORD",Ose=(t,{data:e})=>e?.nextStep.signInStep==="CONFIRM_SIGN_UP",Nse=(t,{data:e})=>e?.nextStep.signUpStep==="COMPLETE_AUTO_SIGN_IN",Mse=(t,{data:e})=>e?.nextStep.signUpStep==="DONE"&&t.step==="CONFIRM_SIGN_UP",Pse=(t,{data:e})=>e?.nextStep.signInStep==="DONE",kse=(t,{data:e})=>e?.nextStep.signUpStep==="DONE",Dse=(t,{data:e})=>e?.nextStep.resetPasswordStep==="DONE",Lse=(t,{data:e})=>e?.step==="CONFIRM_ATTRIBUTE_COMPLETE",Use=(t,{data:e})=>e?.step==="CONFIRM_ATTRIBUTE_WITH_CODE",Fse=(t,{data:e})=>e?.step==="SHOULD_CONFIRM_USER_ATTRIBUTE",zse=(t,{data:e})=>e?.step==="RESET_PASSWORD",Bse=(t,{data:e})=>e?.step==="CONFIRM_SIGN_UP",jse=({step:t})=>Tse.includes(t),Hse=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",$se=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",qse=({step:t})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t),Wse=({step:t})=>t==="RESET_PASSWORD",Gse=({step:t})=>t==="CONFIRM_RESET_PASSWORD_WITH_CODE",Vse=({step:t})=>t==="CONFIRM_SIGN_UP",Kse=(t,e)=>{const n=e.data||t.fetchedUserAttributes;if(!n)return!1;const{email:r,phone_number:s,phone_number_verified:o,email_verified:a}=n;return!r&&!s?!1:(a===void 0||a==="false")&&(o===void 0||o==="false")},Yse=(t,{data:e})=>e.message==="User is already confirmed.",Zse=({availableAuthMethods:t,preferredChallenge:e,selectedAuthMethod:n})=>t&&t.length>1&&(!e||n===null),Xse=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},Qse=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignup==="ALWAYS"},Jse=({passwordless:t})=>t?.passkeyRegistrationPrompts!=null,eoe=({selectedAuthMethod:t,step:e})=>t!=null&&e==="SELECT_AUTH_METHOD",Gy={hasCompletedAttributeConfirmation:Lse,hasCompletedResetPassword:Dse,hasCompletedSignIn:Pse,hasCompletedSignUp:kse,hasPasskeyRegistrationPrompts:Jse,isConfirmSignUpStep:Bse,isConfirmUserAttributeStep:Use,isResetPasswordStep:zse,isShouldConfirmUserAttributeStep:Fse,isUserAlreadyConfirmed:Yse,shouldAutoSignIn:Nse,shouldManualSignIn:Mse,shouldConfirmResetPassword:Gse,shouldConfirmSignIn:jse,shouldConfirmSignInWithNewPassword:Rse,shouldConfirmSignUp:Vse,shouldConfirmSignUpFromSignIn:Ose,shouldResetPassword:Wse,shouldResetPasswordFromSignIn:Ise,shouldReturnToSelectMethod:eoe,shouldSelectAuthMethod:Zse,shouldSetupTotp:Hse,shouldSetupEmail:$se,shouldSelectMfaType:qse,shouldVerifyAttribute:Kse,shouldPromptPasskeyRegistration:Xse,shouldPromptPasskeyRegistrationAfterSignup:Qse};var _C,Xk;function $9(){if(Xk)return _C;Xk=1;var t=ST(),e=Qh();function n(r,s,o){(o!==void 0&&!e(r[s],o)||o===void 0&&!(s in r))&&t(r,s,o)}return _C=n,_C}var xC,Qk;function toe(){if(Qk)return xC;Qk=1;function t(e){return function(n,r,s){for(var o=-1,a=Object(n),u=s(n),c=u.length;c--;){var f=u[e?c:++o];if(r(a[f],f,a)===!1)break}return n}}return xC=t,xC}var AC,Jk;function noe(){if(Jk)return AC;Jk=1;var t=toe(),e=t();return AC=e,AC}var Yf={exports:{}};Yf.exports;var eD;function roe(){return eD||(eD=1,(function(t,e){var n=No(),r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===r,a=o?n.Buffer:void 0,u=a?a.allocUnsafe:void 0;function c(f,p){if(p)return f.slice();var g=f.length,m=u?u(g):new f.constructor(g);return f.copy(m),m}t.exports=c})(Yf,Yf.exports)),Yf.exports}var TC,tD;function soe(){if(tD)return TC;tD=1;var t=Y8();function e(n){var r=new n.constructor(n.byteLength);return new t(r).set(new t(n)),r}return TC=e,TC}var RC,nD;function ooe(){if(nD)return RC;nD=1;var t=soe();function e(n,r){var s=r?t(n.buffer):n.buffer;return new n.constructor(s,n.byteOffset,n.length)}return RC=e,RC}var IC,rD;function ioe(){if(rD)return IC;rD=1;function t(e,n){var r=-1,s=e.length;for(n||(n=Array(s));++r<s;)n[r]=e[r];return n}return IC=t,IC}var OC,sD;function aoe(){if(sD)return OC;sD=1;var t=Ai(),e=Object.create,n=(function(){function r(){}return function(s){if(!t(s))return{};if(e)return e(s);r.prototype=s;var o=new r;return r.prototype=void 0,o}})();return OC=n,OC}var NC,oD;function loe(){if(oD)return NC;oD=1;var t=aoe(),e=ET(),n=nT();function r(s){return typeof s.constructor=="function"&&!n(s)?t(e(s)):{}}return NC=r,NC}var MC,iD;function uoe(){if(iD)return MC;iD=1;var t=Uy(),e=nu();function n(r){return e(r)&&t(r)}return MC=n,MC}var PC,aD;function coe(){if(aD)return PC;aD=1;var t=ld(),e=ET(),n=nu(),r="[object Object]",s=Function.prototype,o=Object.prototype,a=s.toString,u=o.hasOwnProperty,c=a.call(Object);function f(p){if(!n(p)||t(p)!=r)return!1;var g=e(p);if(g===null)return!0;var m=u.call(g,"constructor")&&g.constructor;return typeof m=="function"&&m instanceof m&&a.call(m)==c}return PC=f,PC}var kC,lD;function q9(){if(lD)return kC;lD=1;function t(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}return kC=t,kC}var DC,uD;function doe(){if(uD)return DC;uD=1;var t=H9(),e=ST();function n(r,s,o,a){var u=!o;o||(o={});for(var c=-1,f=s.length;++c<f;){var p=s[c],g=a?a(o[p],r[p],p,o,r):void 0;g===void 0&&(g=r[p]),u?e(o,p,g):t(o,p,g)}return o}return DC=n,DC}var LC,cD;function foe(){if(cD)return LC;cD=1;var t=doe(),e=CT();function n(r){return t(r,e(r))}return LC=n,LC}var UC,dD;function hoe(){if(dD)return UC;dD=1;var t=$9(),e=roe(),n=ooe(),r=ioe(),s=loe(),o=QA(),a=Ti(),u=uoe(),c=JA(),f=KA(),p=Ai(),g=coe(),m=tT(),y=q9(),S=foe();function E(C,w,x,T,R,M,O){var I=y(C,x),P=y(w,x),k=O.get(P);if(k){t(C,x,k);return}var H=M?M(I,P,x+"",C,w,O):void 0,F=H===void 0;if(F){var B=a(P),W=!B&&c(P),Y=!B&&!W&&m(P);H=P,B||W||Y?a(I)?H=I:u(I)?H=r(I):W?(F=!1,H=e(P,!0)):Y?(F=!1,H=n(P,!0)):H=[]:g(P)||o(P)?(H=I,o(I)?H=S(I):(!p(I)||f(I))&&(H=s(P))):F=!1}F&&(O.set(P,H),R(H,P,T,M,O),O.delete(P)),t(C,x,H)}return UC=E,UC}var FC,fD;function poe(){if(fD)return FC;fD=1;var t=XA(),e=$9(),n=noe(),r=hoe(),s=Ai(),o=CT(),a=q9();function u(c,f,p,g,m){c!==f&&n(f,function(y,S){if(m||(m=new t),s(y))r(c,f,S,p,u,g,m);else{var E=g?g(a(c,S),y,S+"",c,f,m):void 0;E===void 0&&(E=y),e(c,S,E)}},o)}return FC=u,FC}var zC,hD;function goe(){if(hD)return zC;hD=1;function t(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}return zC=t,zC}var BC,pD;function moe(){if(pD)return BC;pD=1;var t=goe(),e=Math.max;function n(r,s,o){return s=e(s===void 0?r.length-1:s,0),function(){for(var a=arguments,u=-1,c=e(a.length-s,0),f=Array(c);++u<c;)f[u]=a[s+u];u=-1;for(var p=Array(s+1);++u<s;)p[u]=a[u];return p[s]=o(f),t(r,this,p)}}return BC=n,BC}var jC,gD;function voe(){if(gD)return jC;gD=1;function t(e){return function(){return e}}return jC=t,jC}var HC,mD;function yoe(){if(mD)return HC;mD=1;var t=voe(),e=j9(),n=bT(),r=e?function(s,o){return e(s,"toString",{configurable:!0,enumerable:!1,value:t(o),writable:!0})}:n;return HC=r,HC}var $C,vD;function boe(){if(vD)return $C;vD=1;var t=800,e=16,n=Date.now;function r(s){var o=0,a=0;return function(){var u=n(),c=e-(u-a);if(a=u,c>0){if(++o>=t)return arguments[0]}else o=0;return s.apply(void 0,arguments)}}return $C=r,$C}var qC,yD;function Soe(){if(yD)return qC;yD=1;var t=yoe(),e=boe(),n=e(t);return qC=n,qC}var WC,bD;function Eoe(){if(bD)return WC;bD=1;var t=bT(),e=moe(),n=Soe();function r(s,o){return n(e(s,o,t),s+"")}return WC=r,WC}var GC,SD;function Coe(){if(SD)return GC;SD=1;var t=Qh(),e=Uy(),n=Ly(),r=Ai();function s(o,a,u){if(!r(u))return!1;var c=typeof a;return(c=="number"?e(u)&&n(a,u.length):c=="string"&&a in u)?t(u[a],o):!1}return GC=s,GC}var VC,ED;function woe(){if(ED)return VC;ED=1;var t=Eoe(),e=Coe();function n(r){return t(function(s,o){var a=-1,u=o.length,c=u>1?o[u-1]:void 0,f=u>2?o[2]:void 0;for(c=r.length>3&&typeof c=="function"?(u--,c):void 0,f&&e(o[0],o[1],f)&&(c=u<3?void 0:c,u=1),s=Object(s);++a<u;){var p=o[a];p&&r(s,p,a,c)}return s})}return VC=n,VC}var KC,CD;function _oe(){if(CD)return KC;CD=1;var t=poe(),e=woe(),n=e(function(r,s,o){t(r,s,o)});return KC=n,KC}var xoe=_oe();const Aoe=qa(xoe),Vy=async(t,e,n,r)=>{const s=await Promise.all(r.map(a=>a(t,e,n))),o=Aoe({},...s);return hT(o)?Promise.resolve():Promise.reject(o)},Toe=8,Roe=t=>Array.isArray(t),Ioe=t=>{if(t)return Roe(t)?Object.entries(t).map(([e,n])=>Object.keys(n)[0]):Object.keys(t)},Da={async getAmplifyConfig(){const t=L6.getConfig(),e=t.Auth?.Cognito,{loginWith:n,userAttributes:r}=t.Auth?.Cognito??{},s=n?Object.entries(n).filter(([f,p])=>f!=="oauth").filter(([f,p])=>!!p).map(f=>f[0]==="phone"?"phone_number":f[0]):void 0,o=Ioe(r),a=n?.oauth?.providers?n.oauth.providers?.map(f=>f.toString().toLowerCase()):void 0,u=t.Auth?.Cognito?.passwordless,c={emailOtpEnabled:u?.emailOtpEnabled??u?.email_otp_enabled===!0,smsOtpEnabled:u?.smsOtpEnabled??u?.sms_otp_enabled===!0,webAuthnEnabled:!!(u?.webAuthn??u?.web_authn),preferredChallenge:u?.preferredChallenge??u?.preferred_challenge};return{...e,loginMechanisms:s,signUpAttributes:o,socialProviders:a,passwordlessCapabilities:c}},getCurrentUser:Sy,handleSignIn:LA,handleSignUp:pK,handleConfirmSignIn:A6,handleConfirmSignUp:EK,handleForgotPasswordSubmit:vK,handleForgotPassword:x6,handleResendSignUpCode:bK,async validateCustomSignUp(t,e){},async validateFormPassword(t,e,n){const{password:r}=t,{password:s}=e;if(!s||!n)return null;const o=[],a=n.minLength??Toe;return r.length<a&&o.push(`Password must have at least ${a} characters`),n.requireLowercase&&!/[a-z]/.test(r)&&o.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(r)&&o.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(r)&&o.push("Password must have numbers"),n.requireSpecialCharacters&&!Une(r)&&o.push("Password must have special characters"),o.length!==0?{password:o}:null},async validateConfirmPassword(t,e){const{password:n,confirm_password:r}=t,{confirm_password:s,password:o}=e;if(!n&&!r)return null;if((n||r)&&n!==r&&(s&&o||n?.length>=6&&r?.length>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(t,e){},async validateRequiredFieldsForAuthMethod(t){const e=t.__authMethod;if(!e)return null;if(e==="EMAIL_OTP"&&!t.email)return{email:"Email is required for Email OTP sign up"};if(e==="SMS_OTP"&&!t.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(e==="PASSWORD"){const n={};return t.password||(n.password="Password is required"),t.confirm_password||(n.confirm_password="Confirm Password is required"),Object.keys(n).length>0?n:null}return null}};function Ooe({services:t}){return cd({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleResetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...tp,sendUpdate:Hy()},guards:Gy,services:{handleResetPassword({username:e}){return t.handleForgotPassword({username:e})},handleConfirmResetPassword({formValues:e,username:n}){const{confirmation_code:r,password:s}=e;return t.handleForgotPasswordSubmit({confirmationCode:r,newPassword:s,username:n})},validateFields(e){return Vy(e.formValues,e.touched,e.passwordSettings,[Da.validateFormPassword,Da.validateConfirmPassword])}}})}const W9=t=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:t},onError:{actions:"setRemoteError",target:t}}}),Noe=t=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t)?"mfa_type":t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",Jm={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode","setAllowedMfaTypes","setCodeDeliveryDetails"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},Gg=t=>({initial:"edit",exit:t,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"},RESEND:{target:"resend"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...Jm}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function Moe({services:t}){return cd({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:"shouldSetupEmail",target:"setupEmail"},{cond:"shouldSelectMfaType",target:"selectMfaType"},{cond:({step:e})=>e==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...W9("signIn")},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await dT();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistration",target:"#signInActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}]},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SHOW_AUTH_METHODS:{actions:"setUsernameSignIn",target:"selectMethod"},SUBMIT:[{cond:"shouldSelectAuthMethod",actions:"handleSubmit",target:"selectMethod"},{actions:"handleSubmit",target:"submit"}]}},selectMethod:{entry:["sendUpdate","setSelectAuthMethodStep","setUsernameSignIn"],on:{SELECT_METHOD:{actions:"setSelectedAuthMethod",target:"submit"},SUBMIT:{actions:["handleSubmit","setSelectedAuthMethodFromForm"],target:"submit"},SIGN_IN:{target:"edit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",onDone:Jm.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},Jm.onError]}}}},confirmSignIn:{...Gg(["clearChallengeName","clearFormValues","clearError","clearTouched"])},forceChangePassword:{entry:"sendUpdate",type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...Jm}}}}}},setupTotp:{...Gg(["clearFormValues","clearError","clearTouched"])},setupEmail:{...Gg(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...Gg(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({codeDeliveryDetails:e.codeDeliveryDetails,remoteError:e.remoteError,step:e.step,unverifiedUserAttributes:e.unverifiedUserAttributes,username:e.username})}}},{actions:{...tp,sendUpdate:Hy()},guards:Gy,services:{async fetchUserAttributes(){return M6()},resetPassword({username:e}){return x6({username:e})},handleResendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},resendSignInCode({username:e,selectedAuthMethod:n,availableAuthMethods:r,preferredChallenge:s}){const o=n??s??r?.[0]??"PASSWORD";return t.handleSignIn({username:e,options:{authFlowType:"USER_AUTH",preferredChallenge:o}})},handleSignIn({formValues:e,username:n,selectedAuthMethod:r,availableAuthMethods:s,preferredChallenge:o}){const a=r??o??s?.[0]??"PASSWORD";if(a==="PASSWORD"){const{password:u}=e;return t.handleSignIn({username:n,password:u})}else return t.handleSignIn({username:n,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},confirmSignIn({formValues:e,step:n}){const r=Noe(n),{[r]:s}=e;return t.handleConfirmSignIn({challengeResponse:s})},async handleForceChangePassword({formValues:e}){let{password:n,phone_number:r,country_code:s,confirm_password:o,username:a,...u}=e,c;return r&&(c=`${s}${r}`.replace(/[^A-Z0-9+]/gi,""),u={...u,phone_number:c}),A6({challengeResponse:n,options:{userAttributes:u}})},signInWithRedirect(e,{data:n}){return N6(n)},async validateFields(e){return Vy(e.formValues,e.touched,e.passwordSettings,[Da.validateFormPassword,Da.validateConfirmPassword])}}})}const Poe={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},koe={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode","setAllowedMfaTypes"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}};function Doe({services:t}){return cd({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...koe}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await dT();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistrationAfterSignup",target:"#signUpActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}]},federatedSignIn:{...W9("signUp")},resetPassword:{invoke:{src:"resetPassword",...Poe}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"],target:"#signUpActor.confirmSignUp"}]}},signUp:{type:"parallel",exit:"clearTouched",on:{FEDERATED_SIGN_IN:{target:"federatedSignIn"}},states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{BLUR:{actions:"handleBlur",target:".pending"},CHANGE:{actions:"handleInput",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:["sendUpdate"],on:{SUBMIT:{actions:["setSelectedAuthMethodFromForm","handleSubmit"],target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"handleSignUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},handleSignUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{cond:"shouldManualSignIn",actions:["clearFormValues","setSignInStep"],target:"#signUpActor.resolved"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},passkeyPrompt:{entry:"sendUpdate",on:{SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({challengeName:e.challengeName,missingAttributes:e.missingAttributes,remoteError:e.remoteError,step:e.step,totpSecretCode:e.totpSecretCode,username:e.username,unverifiedUserAttributes:e.unverifiedUserAttributes,allowedMfaTypes:e.allowedMfaTypes})}}},{actions:{...tp,sendUpdate:Hy()},guards:Gy,services:{autoSignIn(){return DA()},async fetchUserAttributes(){return M6()},confirmSignUp({formValues:e,username:n}){const{confirmation_code:r}=e,s={username:n,confirmationCode:r};return t.handleConfirmSignUp(s)},resendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},signInWithRedirect(e,{data:n}){return N6(n)},handleSignUp(e){const{formValues:n,loginMechanisms:r,username:s,selectedAuthMethod:o,preferredChallenge:a}=e,u=r[0],f=Bre(s,n,u,o??a);return t.handleSignUp(f)},async validateSignUp(e){return Vy(e.formValues,e.touched,e.passwordSettings,[t.validateFormPassword,t.validateConfirmPassword,t.validatePreferredUsername,t.validateRequiredFieldsForAuthMethod,t.validateCustomSignUp])}}})}const Loe=()=>cd({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:"pending",invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>QK()}});function Uoe(){return cd({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...tp,sendUpdate:Hy()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:t}}){return nY({userAttributeKey:t})},async confirmVerifyUserAttribute({formValues:{confirmation_code:t},selectedUserAttribute:e}){return _K({confirmationCode:t,userAttributeKey:e})},async validateFields(t){return Vy(t.formValues,t.touched,t.passwordSettings,[Da.validateFormPassword,Da.validateConfirmPassword])}}})}const Vg=(t,e)=>{const n=Hre(t.passwordlessCapabilities,t.config?.passwordless?.hiddenAuthMethods),r=t.config?.passwordless?.preferredAuthMethod??t.passwordlessCapabilities?.preferredChallenge;return{...t.actorDoneData,step:t?.actorDoneData?.step??e,formValues:{},touched:{},validationError:{},formFields:t.config?.formFields,loginMechanisms:t.config?.loginMechanisms,passwordSettings:t.config?.passwordSettings,signUpAttributes:t.config?.signUpAttributes,socialProviders:t.config?.socialProviders,availableAuthMethods:n,preferredChallenge:r,passwordless:t.config?.passwordless}},{choose:Foe,stop:zoe}=A9,wf=t=>zoe(t),Boe={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},joe={always:{actions:"configure",target:"getConfig"}};function Hoe(t){const{useNextWaitConfig:e,...n}=t??{};return cd({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Da,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"setup"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:e?joe:Boe,getConfig:{invoke:{src:"getAmplifyConfig",onDone:[{actions:["applyAmplifyConfig","setHasSetup"],cond:"hasUser",target:"#authenticator.authenticated"},{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}]}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:wf("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SELECT_METHOD:{actions:"forwardToActor"},SHOW_AUTH_METHODS:{actions:"forwardToActor"},SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:wf("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:wf("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:wf("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:wf("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...tp,forwardToActor:Foe([{cond:"hasActor",actions:jte(({actorRef:s})=>s)}]),setActorDoneData:ti({actorDoneData:(s,o)=>({challengeName:o.data.challengeName,codeDeliveryDetails:o.data.codeDeliveryDetails,missingAttributes:o.data.missingAttributes,remoteError:o.data.remoteError,username:o.data.username,step:o.data.step,totpSecretCode:o.data.totpSecretCode,unverifiedUserAttributes:o.data.unverifiedUserAttributes,allowedMfaTypes:o.data.allowedMfaTypes})}),applyAmplifyConfig:ti({passwordlessCapabilities:(s,{data:o})=>o.passwordlessCapabilities,config(s,{data:o}){const{loginMechanisms:a=o.loginMechanisms??[],signUpAttributes:u=o.signUpAttributes??[],socialProviders:c=o.socialProviders??[],initialState:f,formFields:p,passwordSettings:g=o.passwordFormat??{},passwordless:m}=s.config;return a.length===0&&a.push("username"),{formFields:$oe(p)??{},initialState:f,loginMechanisms:a,passwordSettings:g,passwordless:m,signUpAttributes:u,socialProviders:c}}}),spawnSignInActor:ti({actorRef:(s,o)=>{const{services:a}=s,u=Moe({services:a}).withContext(Vg(s,"SIGN_IN"));return Cf(u,{name:"signInActor"})}}),spawnSignUpActor:ti({actorRef:(s,o)=>{const{services:a}=s,u=Doe({services:a}).withContext(Vg(s,"SIGN_UP"));return Cf(u,{name:"signUpActor"})}}),spawnForgotPasswordActor:ti({actorRef:(s,o)=>{const{services:a}=s,u=Ooe({services:a}).withContext(Vg(s,"FORGOT_PASSWORD"));return Cf(u,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:ti({actorRef:s=>{const o=Uoe().withContext(Vg(s));return Cf(o,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:ti({actorRef:s=>{const o=Loe().withContext({user:s?.user});return Cf(o,{name:"signOutActor"})}}),configure:ti((s,o)=>{const{services:a,...u}=P9(n)?o.data??{}:n;return{services:{...Da,...a},config:u}}),setHasSetup:ti({hasSetup:!0})},guards:{...Gy,hasActor:({actorRef:s})=>!!s,isInitialStateSignUp:({config:s})=>s.initialState==="signUp",isInitialStateResetPassword:({config:s})=>s.initialState==="forgotPassword",shouldSetup:({hasSetup:s})=>!s,hasUser:({user:s})=>!!s},services:{getAmplifyConfig:({services:s})=>s.getAmplifyConfig(),handleGetCurrentUser:({services:s})=>s.getCurrentUser()}})}function $oe(t){return t&&Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{let r=t[e][n];r.required=r.isRequired})}),t}const qoe={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Woe={red:{10:{value:"hsl(0, 75%, 95%)"},20:{value:"hsl(0, 75%, 85%)"},40:{value:"hsl(0, 75%, 75%)"},60:{value:"hsl(0, 50%, 50%)"},80:{value:"hsl(0, 95%, 30%)"},90:{value:"hsl(0, 100%, 20%)"},100:{value:"hsl(0, 100%, 15%)"}},orange:{10:{value:"hsl(30, 75%, 95%)"},20:{value:"hsl(30, 75%, 85%)"},40:{value:"hsl(30, 75%, 75%)"},60:{value:"hsl(30, 50%, 50%)"},80:{value:"hsl(30, 95%, 30%)"},90:{value:"hsl(30, 100%, 20%)"},100:{value:"hsl(30, 100%, 15%)"}},yellow:{10:{value:"hsl(60, 75%, 95%)"},20:{value:"hsl(60, 75%, 85%)"},40:{value:"hsl(60, 75%, 75%)"},60:{value:"hsl(60, 50%, 50%)"},80:{value:"hsl(60, 95%, 30%)"},90:{value:"hsl(60, 100%, 20%)"},100:{value:"hsl(60, 100%, 15%)"}},green:{10:{value:"hsl(130, 60%, 95%)"},20:{value:"hsl(130, 60%, 90%)"},40:{value:"hsl(130, 44%, 63%)"},60:{value:"hsl(130, 43%, 46%)"},80:{value:"hsl(130, 33%, 37%)"},90:{value:"hsl(130, 27%, 29%)"},100:{value:"hsl(130, 22%, 23%)"}},teal:{10:{value:"hsl(190, 75%, 95%)"},20:{value:"hsl(190, 75%, 85%)"},40:{value:"hsl(190, 70%, 70%)"},60:{value:"hsl(190, 50%, 50%)"},80:{value:"hsl(190, 95%, 30%)"},90:{value:"hsl(190, 100%, 20%)"},100:{value:"hsl(190, 100%, 15%)"}},blue:{10:{value:"hsl(220, 95%, 95%)"},20:{value:"hsl(220, 85%, 85%)"},40:{value:"hsl(220, 70%, 70%)"},60:{value:"hsl(220, 50%, 50%)"},80:{value:"hsl(220, 95%, 30%)"},90:{value:"hsl(220, 100%, 20%)"},100:{value:"hsl(220, 100%, 15%)"}},purple:{10:{value:"hsl(300, 95%, 95%)"},20:{value:"hsl(300, 85%, 85%)"},40:{value:"hsl(300, 70%, 70%)"},60:{value:"hsl(300, 50%, 50%)"},80:{value:"hsl(300, 95%, 30%)"},90:{value:"hsl(300, 100%, 20%)"},100:{value:"hsl(300, 100%, 15%)"}},pink:{10:{value:"hsl(340, 95%, 95%)"},20:{value:"hsl(340, 90%, 85%)"},40:{value:"hsl(340, 70%, 70%)"},60:{value:"hsl(340, 50%, 50%)"},80:{value:"hsl(340, 95%, 30%)"},90:{value:"hsl(340, 100%, 20%)"},100:{value:"hsl(340, 100%, 15%)"}},neutral:{10:{value:"hsl(210, 5%, 98%)"},20:{value:"hsl(210, 5%, 94%)"},40:{value:"hsl(210, 5%, 87%)"},60:{value:"hsl(210, 10%, 58%)"},80:{value:"hsl(210, 10%, 40%)"},90:{value:"hsl(210, 25%, 25%)"},100:{value:"hsl(210, 50%, 10%)"}},primary:{10:{value:"{colors.teal.10.value}"},20:{value:"{colors.teal.20.value}"},40:{value:"{colors.teal.40.value}"},60:{value:"{colors.teal.60.value}"},80:{value:"{colors.teal.80.value}"},90:{value:"{colors.teal.90.value}"},100:{value:"{colors.teal.100.value}"}},secondary:{10:{value:"{colors.purple.10.value}"},20:{value:"{colors.purple.20.value}"},40:{value:"{colors.purple.40.value}"},60:{value:"{colors.purple.60.value}"},80:{value:"{colors.purple.80.value}"},90:{value:"{colors.purple.90.value}"},100:{value:"{colors.purple.100.value}"}},font:{primary:{value:"{colors.neutral.100.value}"},secondary:{value:"{colors.neutral.90.value}"},tertiary:{value:"{colors.neutral.80.value}"},disabled:{value:"{colors.neutral.60.value}"},inverse:{value:"{colors.white.value}"},interactive:{value:"{colors.primary.80.value}"},hover:{value:"{colors.primary.90.value}"},focus:{value:"{colors.primary.100.value}"},active:{value:"{colors.primary.100.value}"},info:{value:"{colors.blue.90.value}"},warning:{value:"{colors.orange.90.value}"},error:{value:"{colors.red.90.value}"},success:{value:"{colors.green.90.value}"}},background:{primary:{value:"{colors.white.value}"},secondary:{value:"{colors.neutral.10.value}"},tertiary:{value:"{colors.neutral.20.value}"},quaternary:{value:"{colors.neutral.60.value}"},disabled:{value:"{colors.background.tertiary.value}"},info:{value:"{colors.blue.10.value}"},warning:{value:"{colors.orange.10.value}"},error:{value:"{colors.red.10.value}"},success:{value:"{colors.green.10.value}"}},border:{primary:{value:"{colors.neutral.60.value}"},secondary:{value:"{colors.neutral.40.value}"},tertiary:{value:"{colors.neutral.20.value}"},disabled:{value:"{colors.border.tertiary.value}"},pressed:{value:"{colors.primary.100.value}"},focus:{value:"{colors.primary.100.value}"},error:{value:"{colors.red.80.value}"},info:{value:"{colors.blue.80.value}"},success:{value:"{colors.green.80.value}"},warning:{value:"{colors.orange.80.value}"}},shadow:{primary:{value:"hsla(210, 50%, 10%, 0.25)"},secondary:{value:"hsla(210, 50%, 10%, 0.15)"},tertiary:{value:"hsla(210, 50%, 10%, 0.05)"}},overlay:{5:{value:"hsla(0, 0%, 0%, 0.05)"},10:{value:"hsla(0, 0%, 0%, 0.1)"},20:{value:"hsla(0, 0%, 0%, 0.2)"},30:{value:"hsla(0, 0%, 0%, 0.3)"},40:{value:"hsla(0, 0%, 0%, 0.4)"},50:{value:"hsla(0, 0%, 0%, 0.5)"},60:{value:"hsla(0, 0%, 0%, 0.6)"},70:{value:"hsla(0, 0%, 0%, 0.7)"},80:{value:"hsla(0, 0%, 0%, 0.8)"},90:{value:"hsla(0, 0%, 0%, 0.9)"}},black:{value:"hsl(0, 0%, 0%)"},white:{value:"hsl(0, 0%, 100%)"},transparent:{value:"transparent"}},Goe={alignItems:{value:"center"},justifyContent:{value:"space-between"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}}},Voe={message:{backgroundColor:{value:"{colors.background.secondary.value}"},borderRadius:{value:"{radii.large.value}"},gap:{value:"{space.small.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.small.value}"},user:{backgroundColor:{value:"{colors.background.secondary.value}"}},assistant:{backgroundColor:{value:"{colors.primary.10.value}"}},sender:{gap:{value:"{space.small.value}"},username:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"{fontWeights.bold.value}"}},timestamp:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"inherit"}}},body:{gap:{value:"{space.xs.value}"}},actions:{gap:{value:"{space.xs.value}"}}},form:{gap:{value:"{space.small.value}"},padding:{value:"{space.small.value}"}},attachment:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},fontSize:{value:"{fontSizes.small.value}"},paddingBlock:{value:"{space.xxxs.value}"},paddingInline:{value:"{space.xs.value}"},gap:{value:"{space.xs.value}"},list:{padding:{value:"{space.xs.value}"},paddingBlockStart:{value:"0"},gap:{value:"{space.xxs.value}"}},name:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},size:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},remove:{padding:{value:"{space.xxs.value}"}},image:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}}}},Koe={menu:{width:{value:"100%"},marginBlockStart:{value:"{space.xxxs}"},backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small}"},options:{display:{value:"flex"},flexDirection:{value:"column"},maxHeight:{value:"300px"}},option:{backgroundColor:{value:"{colors.background.primary}"},color:{value:"currentcolor"},cursor:{value:"pointer"},transitionDuration:{value:"{time.short}"},transitionProperty:{value:"background-color, color"},transitionTimingFunction:{value:"ease"},_active:{backgroundColor:{value:"{colors.primary.80}"},color:{value:"{colors.white}"}}},_empty:{display:{value:"flex"}},_loading:{alignItems:{value:"center"},display:{value:"flex"},gap:{value:"{space.xxxs}"}},spaceShared:{paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"}}}},Yoe={maxWidth:{value:"60rem"},modal:{width:{value:"{space.relative.full}"},height:{value:"{space.relative.full}"},backgroundColor:{value:"{colors.overlay.50.value}"},top:{value:"{space.zero}"},left:{value:"{space.zero}"}},container:{widthMax:{value:"30rem"}},router:{borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.medium.value}"}},footer:{paddingBottom:{value:"{space.medium.value}"}},form:{padding:{value:"{space.xl.value}"}},state:{inactive:{backgroundColor:{value:"{colors.background.secondary.value}"}}},orContainer:{color:{value:"{colors.neutral.80.value}"},orLine:{backgroundColor:{value:"{colors.background.primary.value}"}}}},Zoe={color:{value:"{colors.font.tertiary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},width:{value:"{fontSizes.xxl.value}"},height:{value:"{fontSizes.xxl.value}"},backgroundColor:{value:"{colors.background.tertiary}"},borderRadius:{value:"100%"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"{colors.border.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"{colors.border.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"{colors.border.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"{colors.border.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},width:{value:"{fontSizes.xl.value}"},height:{value:"{fontSizes.xl.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}}},Xoe={color:{value:"{colors.font.primary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},paddingVertical:{value:"{space.xs.value}"},paddingHorizontal:{value:"{space.small.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderRadius:{value:"{radii.xl.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},paddingVertical:{value:"{space.xxs.value}"},paddingHorizontal:{value:"{space.xs.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"}}},Qoe={flexDirection:{value:"row"},flexWrap:{value:"wrap"},gap:{value:"0"},color:{value:"{colors.font.tertiary}"},item:{flexDirection:{value:"row"},color:{value:"inherit"},fontSize:{value:"inherit"},alignItems:{value:"center"},lineHeight:{value:"1"}},separator:{color:{value:"inherit"},fontSize:{value:"inherit"},paddingInline:{value:"{space.xxs}"}},link:{color:{value:"{components.link.color}"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"},paddingInline:{value:"{space.xs}"},paddingBlock:{value:"{space.xxs}"},current:{color:{value:"inherit"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"}}}},Joe={fontWeight:{value:"{fontWeights.bold.value}"},transitionDuration:{value:"{components.fieldcontrol.transitionDuration.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},lineHeight:{value:"{components.fieldcontrol.lineHeight.value}"},paddingBlockStart:{value:"{components.fieldcontrol.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.paddingInlineEnd.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},borderWidth:{value:"{components.fieldcontrol.borderWidth.value}"},borderStyle:{value:"{components.fieldcontrol.borderStyle.value}"},borderRadius:{value:"{components.fieldcontrol.borderRadius.value}"},color:{value:"{colors.font.primary.value}"},_hover:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.primary.60.value}"}},_focus:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{color:{value:"{colors.font.active.value}"},backgroundColor:{value:"{colors.primary.20.value}"},borderColor:{value:"{colors.primary.100.value}"}},_loading:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},outlined:{info:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"}},_focus:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"}},_focus:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"}},_focus:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"}},_focus:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_hover:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"}},_focus:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.neutral.100.value}"}}}},primary:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.font.inverse.value}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.100.value}"},color:{value:"{colors.font.inverse.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.100.value}"},color:{value:"{colors.font.inverse.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.100.value}"},color:{value:"{colors.font.inverse.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100.value}"},color:{value:"{colors.font.inverse.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.100.value}"},color:{value:"{colors.font.inverse.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.70}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}}}},menu:{borderWidth:{value:"{space.zero.value}"},backgroundColor:{value:"transparent"},justifyContent:{value:"start"},_hover:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_focus:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_active:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.90.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"}}},link:{backgroundColor:{value:"transparent"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.interactive.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.hover.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.20.value}"},color:{value:"{colors.font.active.value}"}},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.neutral.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.80.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.overlay.90.value}"}}}},warning:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.red.60}"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.red.60}"},_hover:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.font.error}"}},_focus:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.red.80}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"{colors.red.100}"},backgroundColor:{value:"{colors.red.20}"},color:{value:"{colors.red.100}"}},_disabled:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}}},destructive:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.red.60}"},color:{value:"{colors.font.inverse}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100}"},color:{value:"{colors.font.inverse}"}}},small:{fontSize:{value:"{components.fieldcontrol.small.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.small.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.small.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.small.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.small.paddingInlineEnd.value}"}},large:{fontSize:{value:"{components.fieldcontrol.large.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.large.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.large.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.large.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.large.paddingInlineEnd.value}"}},loaderWrapper:{alignItems:{value:"center"},gap:{value:"{space.xs.value}"}}},eie={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"none"},padding:{value:"{space.medium.value}"},outlined:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{components.card.boxShadow.value}"}},elevated:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"{shadows.medium.value}"}}},tie={cursor:{value:"pointer"},alignItems:{value:"center"},_disabled:{cursor:{value:"not-allowed"}},button:{position:{value:"relative"},alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},before:{width:{value:"100%"},height:{value:"100%"},borderWidth:{value:"{borderWidths.medium.value}"},borderRadius:{value:"20%"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"}},_focus:{outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{borderColor:{value:"{colors.border.error.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},icon:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"20%"},opacity:{value:"{opacities.0.value}"},transform:{value:"scale(0)"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.short.value}"},transitionTimingFunction:{value:"ease-in-out"},_checked:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},_indeterminate:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},nie={alignItems:{value:"flex-start"},alignContent:{value:"center"},flexDirection:{value:"column"},justifyContent:{value:"center"}},rie={pagination:{current:{color:{value:"{components.pagination.current.color}"},backgroundColor:{value:"{components.pagination.current.backgroundColor}"}},button:{color:{value:"{components.pagination.button.color}"},_hover:{backgroundColor:{value:"{components.pagination.button.hover.backgroundColor}"},color:{value:"{components.pagination.button.hover.color}"}},_disabled:{color:{value:"{components.pagination.button.disabled.color}"}}}},search:{input:{color:{value:"{components.searchfield.color}"}},button:{color:{value:"{components.searchfield.button.color}"},_active:{backgroundColor:{value:"{components.searchfield.button._active.backgroundColor}"},borderColor:{value:"{components.searchfield.button._active.borderColor}"},color:{value:"{components.searchfield.button._active.color}"}},_disabled:{backgroundColor:{value:"{components.searchfield.button._disabled.backgroundColor}"},borderColor:{value:"{components.searchfield.button._disabled.borderColor}"},color:{value:"{components.searchfield.button._disabled.color}"}},_focus:{backgroundColor:{value:"{components.searchfield.button._focus.backgroundColor}"},borderColor:{value:"{components.searchfield.button._focus.borderColor}"},color:{value:"{components.searchfield.button._focus.color}"}},_hover:{backgroundColor:{value:"{components.searchfield.button._hover.backgroundColor}"},borderColor:{value:"{components.searchfield.button._hover.borderColor}"},color:{value:"{components.searchfield.button._hover.color}"}}}}},sie={fontSize:{value:"{fontSizes.xs}"},gap:{value:"{space.relative.medium}"},svg:{path:{fill:{value:"{colors.font.primary}"}}},toolTip:{bottom:{value:"{space.large}"},color:{value:"{colors.teal.100}"},fontSize:{value:"{fontSizes.xxs}"}}},oie={height:{value:"{space.relative.full.value}"}},iie={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},label:{color:{value:"{colors.font.tertiary.value}"},paddingInline:{value:"{space.medium.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.background.primary.value}"}},small:{borderWidth:{value:"{borderWidths.small.value}"}},large:{borderWidth:{value:"{borderWidths.large.value}"}},opacity:{value:"{opacities.60.value}"}},aie={backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.font.primary}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.primary}"}},_disabled:{backgroundColor:{value:"{colors.background.disabled}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.disabled}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.disabled}"}},accepted:{backgroundColor:{value:"{colors.background.success}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.success}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.success}"}},rejected:{backgroundColor:{value:"{colors.background.error}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.error}"}}},lie={backgroundColor:{value:"{colors.background.primary.value}"},item:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small.value}"},trigger:{alignItems:{value:"center"},backgroundColor:{value:"{colors.background.primary.value}"},color:{value:"inherit"},gap:{value:"{space.small.value}"},justifyContent:{value:"space-between"},paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},_hover:{color:{value:"inherit"},backgroundColor:{value:"{colors.overlay.5.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0",offsetY:"0",blurRadius:"0",spreadRadius:"2px",color:"{colors.border.focus.value}"}}}},content:{color:{value:"inherit"},paddingInline:{value:"{space.small.value}"},paddingBlockEnd:{value:"{space.small.value}"},paddingBlockStart:{value:"{space.xxxs.value}"}},icon:{color:{value:"{colors.font.tertiary.value}"},transitionDuration:{value:"{time.medium.value}"},transitionTimingFunction:{value:"cubic-bezier(0.87, 0, 0.13, 1)"}}}},uie={gap:{value:"{space.xs.value}"},fontSize:{value:"{fontSizes.medium.value}"},flexDirection:{value:"column"},small:{gap:{value:"{space.xxxs.value}"},fontSize:{value:"{fontSizes.small.value}"}},large:{gap:{value:"{space.small.value}"},fontSize:{value:"{fontSizes.large.value}"}},label:{color:{value:"{colors.font.secondary.value}"}}},cie={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},color:{value:"{colors.font.primary.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"},fontSize:{value:"{components.field.fontSize.value}"},lineHeight:{value:"{lineHeights.medium.value}"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},small:{fontSize:{value:"{components.field.small.fontSize.value}"},paddingBlockStart:{value:"{space.xxs.value}"},paddingBlockEnd:{value:"{space.xxs.value}"},paddingInlineStart:{value:"{space.small.value}"},paddingInlineEnd:{value:"{space.small.value}"}},large:{fontSize:{value:"{components.field.large.fontSize.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}},quiet:{borderStyle:{value:"none"},borderInlineStart:{value:"none"},borderInlineEnd:{value:"none"},borderBlockStart:{value:"none"},borderRadius:{value:"0"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderBlockEndColor:{value:"{colors.border.error.value}"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.focus.value}"}}},_disabled:{color:{value:"{colors.font.disabled.value}"},cursor:{value:"not-allowed"},borderColor:{value:"{colors.transparent.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},color:{value:"{colors.font.error.value}"},_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.error.value}"}}}},info:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.blue.100.value}"}}}},warning:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.orange.100.value}"}}}},success:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.green.100.value}"}}}},overlay:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.overlay.90.value}"}}}}},die={gap:{value:"{space.zero.value}"},vertical:{alignItems:{value:"center"}},outer:{alignItems:{value:"center"}}},fie={backgroundColor:{value:"transparent"},borderRadius:{value:"{radii.xs.value}"},flexDirection:{value:"column"},gap:{value:"{components.field.gap.value}"},legend:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{components.field.fontSize.value}"},fontWeight:{value:"{fontWeights.bold.value}"},lineHeight:{value:"{lineHeights.medium.value}"},small:{fontSize:"{components.field.small.fontSize.value}"},large:{fontSize:"{components.field.large.fontSize.value}"}},outlined:{padding:"{space.medium.value}",borderColor:"{colors.neutral.40.value}",borderWidth:"{borderWidths.small.value}",borderStyle:"solid",small:{padding:"{space.small.value}"},large:{padding:"{space.large.value}"}},small:{gap:"{components.field.small.gap.value}"},large:{gap:"{components.field.large.gap.value}"}},hie={error:{color:{value:"{colors.font.error.value}"},fontSize:{value:"{fontSizes.small.value}"}},description:{color:{value:"{colors.font.secondary.value}"},fontStyle:{value:"italic"},fontSize:{value:"{fontSizes.small.value}"}}},pie={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.fileuploader.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.fileuploader.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},gie={gap:{value:"{space.medium.value}"},justifyContent:{value:"normal"},alignItems:{value:"stretch"},alignContent:{value:"normal"},flexWrap:{value:"nowrap"}},mie={color:{value:"{colors.font.primary.value}"},lineHeight:{value:"{lineHeights.small.value}"},1:{fontSize:{value:"{fontSizes.xxxxl.value}"},fontWeight:{value:"{fontWeights.light.value}"}},2:{fontSize:{value:"{fontSizes.xxxl.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},3:{fontSize:{value:"{fontSizes.xxl.value}"},fontWeight:{value:"{fontWeights.medium.value}"}},4:{fontSize:{value:"{fontSizes.xl.value}"},fontWeight:{value:"{fontWeights.semibold.value}"}},5:{fontSize:{value:"{fontSizes.large.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},6:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},vie={highlighted:{fontWeight:{value:"{fontWeights.bold}"}}},yie={lineHeight:{value:1},height:{value:"1em"}},bie={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Sie={maxWidth:{value:"100%"},height:{value:"auto"},objectFit:{value:"initial"},objectPosition:{value:"initial"}},Eie={banner:{height:{value:"150px "},width:{value:"400px "}},button:{backgroundColor:{value:"#e8e8e8"},borderRadius:{value:"5px"},color:{value:"black"}},dialog:{height:{value:"50vh"},minHeight:{value:"400px"},minWidth:{value:"400px"},width:{value:"30vw"}},header:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},Cie={active:{color:{value:"{colors.font.active.value}"}},color:{value:"{colors.font.interactive.value}"},focus:{color:{value:"{colors.font.focus.value}"}},hover:{color:{value:"{colors.font.hover.value}"}},visited:{color:{value:"{colors.font.interactive.value}"}}},wie={cameraModule:{backgroundColor:{value:"{colors.background.primary.value}"}}},_ie={width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},fontSize:{value:"{fontSizes.xs.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"},fontSize:{value:"{fontSizes.xxs.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"},fontSize:{value:"{fontSizes.small.value}"}},linear:{width:{value:"100%"},minWidth:{value:"5rem"},fontSize:{value:"{fontSizes.xxs.value}"},strokeWidth:{value:"{fontSizes.xxs.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{strokeWidth:{value:"{fontSizes.xxxs.value}"},fontSize:{value:"{fontSizes.xxxs.value}"}},large:{strokeWidth:{value:"{fontSizes.xs.value}"},fontSize:{value:"{fontSizes.xs.value}"}}},text:{fill:{value:"{colors.font.primary.value}"}}},xie={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.medium.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{shadows.large.value}"},flexDirection:{value:"column"},gap:{value:"{space.zero.value}"},maxWidth:{value:"30rem"},minWidth:{value:"14rem"},small:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}},large:{width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}},item:{minHeight:{value:"2.5rem"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}}},Aie={alignItems:{value:"center"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderColor:{value:"transparent"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.xs.value}"},color:{value:"{colors.font.primary.value}"},justifyContent:{value:"flex-start"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},lineHeight:{value:"{lineHeights.small.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},dismiss:{gap:{value:"{space.xxs.value}"}},plain:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}}},outlined:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.primary.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.error.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.success.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.warning.value}"}}},filled:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.secondary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"transparent"}}}},Tie={current:{alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.overlay.40.value}"}},button:{color:{value:"{colors.font.primary.value}"},paddingInlineStart:{value:"{space.xxs.value}"},paddingInlineEnd:{value:"{space.xxs.value}"},transitionProperty:{value:"background-color"},transitionDuration:{value:"{time.medium.value}"},hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},disabled:{color:{value:"{colors.font.disabled.value}"}}},ellipsis:{alignItems:{value:"baseline"},justifyContent:{value:"center"},paddingInlineStart:{value:"{space.xs.value}"},paddingInlineEnd:{value:"{space.xs.value}"}},itemContainer:{marginLeft:{value:"{space.xxxs.value}"},marginRight:{value:"{space.xxxs.value}"}},itemShared:{height:{value:"{fontSizes.xxl.value}"},minWidth:{value:"{fontSizes.xxl.value}"},borderRadius:{value:"{fontSizes.medium.value}"}}},Rie={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_error:{color:{value:"{components.button.outlined.error.color.value}"},backgroundColor:{value:"{components.button.outlined.error.backgroundColor.value}"},borderColor:{value:"{components.button.outlined.error.borderColor.value}"},_active:{borderColor:{value:"{components.button.outlined.error._active.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._active.backgroundColor.value}"},color:{value:"{components.button.outlined.error._active.color.value}"}},_focus:{borderColor:{value:"{components.button.outlined.error._focus.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._focus.backgroundColor.value}"},color:{value:"{components.button.outlined.error._focus.color.value}"},boxShadow:{value:"{components.button.outlined.error._focus.boxShadow.value}"}},_hover:{borderColor:{value:"{components.button.outlined.error._hover.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._hover.backgroundColor.value}"},color:{value:"{components.button.outlined.error._hover.color.value}"}}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},Iie={color:{value:"{components.fieldcontrol.color}"},borderColor:{value:"{components.fieldcontrol.borderColor}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}}},Oie={borderRadius:{value:"{radii.small.value}"},transitionDuration:{value:"{time.long.value}"},startColor:{value:"{colors.background.secondary.value}"},endColor:{value:"{colors.background.tertiary.value}"},small:{height:{value:"{space.small.value}"}},default:{height:{value:"{space.medium.value}"}},large:{height:{value:"{space.large.value}"}}},Nie={alignItems:{value:"center"},justifyContent:{value:"flex-start"},gap:{value:"inherit"},_disabled:{cursor:{value:"not-allowed"}},button:{alignItems:{value:"center"},justifyContent:{value:"center"},width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},boxSizing:{value:"border-box"},borderWidth:{value:"{borderWidths.medium.value}"},borderStyle:{value:"solid"},borderRadius:{value:"50%"},borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.background.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},padding:{value:"{borderWidths.medium.value}"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"}},_checked:{color:{value:"{colors.primary.80.value}"},_disabled:{color:{value:"{colors.background.disabled.value}"}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.primary.value}"}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},Mie={radio:{borderWidth:{value:"{components.radio.button.borderWidth}"},borderColor:{value:"{components.radio.button.borderColor}"},backgroundColor:{value:"{components.radio.button.backgroundColor}"},_checked:{color:{value:"{components.radio.button._checked.color}"}},label:{color:{value:"{components.radio.label.color}"}}},legend:{color:{value:"{components.fieldset.legend.color}"},fontWeight:{value:"{fontWeights.normal}"}}},Pie={large:{size:{value:"{fontSizes.xxxl.value}"}},default:{size:{value:"{fontSizes.xl.value}"}},small:{size:{value:"{fontSizes.small.value}"}},filled:{color:{value:"{colors.secondary.80.value}"}},empty:{color:{value:"{colors.background.tertiary.value}"}}},kie={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},backgroundColor:{value:"{colors.background.primary.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},Die={color:{value:"{components.fieldcontrol.color}"},backgroundColor:{value:"{colors.background.primary.value}"},paddingInlineEnd:{value:"{space.xxl.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},wrapper:{flex:{value:"1"},display:{value:"block"},position:{value:"relative"},cursor:{value:"pointer"}},iconWrapper:{alignItems:{value:"center"},position:{value:"absolute"},top:{value:"50%"},right:{value:"{space.medium.value}"},transform:{value:"translateY(-50%)"},pointerEvents:{value:"none"},small:{right:{value:"{space.xs.value}"}},large:{right:{value:"{space.medium.value}"}}},option:{backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"}}},whiteSpace:{value:"nowrap"},minWidth:{value:"6.5rem"},small:{minWidth:{value:"5.5rem"},paddingInlineEnd:{value:"{space.xl.value}"}},large:{minWidth:{value:"7.5rem"},paddingInlineEnd:{value:"{space.xxl.value}"}},expanded:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},option:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"}}}},Lie={borderColor:{value:"{components.fieldcontrol.borderColor}"},color:{value:"{components.fieldcontrol.color}"},flexDirection:{value:"column"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}},label:{color:{value:"{components.field.label.color}"}}},Uie={paddingBlock:{value:"{space.xs.value}"},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"9999px"},height:{value:"0.375rem"},minWidth:{value:"10rem"}},range:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"9999px"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},thumb:{width:{value:"1.25rem"},height:{value:"1.25rem"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.small.value}"},borderRadius:{value:"50%"},borderWidth:{value:"{borderWidths.medium.value}"},borderColor:{value:"{colors.border.primary.value}"},borderStyle:{value:"solid"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"},borderColor:{value:"transparent"},boxShadow:{value:"none"}},_hover:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.focus.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}}},small:{track:{height:{value:"0.25rem"}},thumb:{width:{value:"1rem"},height:{value:"1rem"}}},large:{track:{height:{value:"0.625rem"}},thumb:{width:{value:"1.5rem"},height:{value:"1.5rem"}}}},Fie={borderColor:{value:"{components.fieldcontrol.borderColor}"},flexDirection:{value:"column"},input:{color:{value:"{components.fieldcontrol.color}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},textAlign:{value:"center"}},button:{color:{value:"{components.button.color}"},backgroundColor:{value:"{colors.transparent}"},_active:{color:{value:"{components.button._active.color}"},backgroundColor:{value:"{components.button._active.backgroundColor}"}},_focus:{color:{value:"{components.button._focus.color}"},backgroundColor:{value:"{components.button._focus.backgroundColor}"}},_disabled:{color:{value:"{components.button._disabled.color}"},backgroundColor:{value:"{components.fieldcontrol._disabled.backgroundColor}"}},_hover:{color:{value:"{components.button._hover.color}"},backgroundColor:{value:"{components.button._hover.backgroundColor}"}}}},zie={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.storagemanager.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.storagemanager.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},Bie={_disabled:{opacity:{value:"{opacities.60.value}"}},_focused:{shadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},fontSize:{value:"{fontSizes.medium.value}"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}},label:{padding:{value:"{space.xs.value}"}},thumb:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.xxxl.value}"},checked:{transform:{value:"{transforms.slideX.medium.value}"}},transition:{duration:{value:"{time.medium.value}"}},width:{value:"{space.relative.medium.value}"}},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"{radii.xxxl.value}"},checked:{backgroundColor:{value:"{colors.primary.80.value}"}},height:{value:"{space.relative.medium.value}"},padding:{value:"{outlineWidths.medium.value}"},transition:{duration:{value:"{time.short.value}"}},width:{value:"{space.relative.xl.value}"},_error:{backgroundColor:{value:"{colors.background.error.value}"}}}},jie={borderCollapse:{value:"collapse"},display:{value:"table"},width:{value:"100%"},head:{display:{value:"table-header-group"},verticalAlign:{value:"middle"}},body:{display:{value:"table-row-group"},verticalAlign:{value:"middle"}},foot:{display:{value:"table-footer-group"},verticalAlign:{value:"middle"}},row:{display:{value:"table-row"},verticalAlign:{value:"middle"},hover:{backgroundColor:{value:"{colors.background.tertiary.value}"}},striped:{backgroundColor:{value:"{colors.background.secondary.value}"}}},header:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},data:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.normal.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},caption:{captionSide:{value:"bottom"},color:{value:"{colors.font.primary.value}"},display:{value:"table-caption"},fontSize:{value:"{fontSizes.medium.value}"},textAlign:{value:"center"},wordBreak:{value:"break-all"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}}}},Hie={backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},gap:{value:"0"},item:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},color:{value:"{colors.font.secondary.value}"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"},textAlign:{value:"center"},transitionDuration:{value:"{time.medium.value}"},_hover:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.hover.value}"}},_focus:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"{borderWidths.medium}",color:"{colors.border.focus.value}"}},color:{value:"{colors.font.focus.value}"}},_active:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.font.interactive.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.interactive.value}"}},_disabled:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.disabled.value}"}}},panel:{backgroundColor:{value:"transparent"},paddingInline:{value:"0"},paddingBlock:{value:"{space.small.value}"}}},$ie={color:{value:"{colors.font.primary.value}"},primary:{color:{value:"{colors.font.primary.value}"}},secondary:{color:{value:"{colors.font.secondary.value}"}},tertiary:{color:{value:"{colors.font.tertiary.value}"}},error:{color:{value:"{colors.font.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"}},success:{color:{value:"{colors.font.success.value}"}},info:{color:{value:"{colors.font.info.value}"}}},qie={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Wie={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Gie={borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.font.primary.value}"},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.font.primary.value}"}},_active:{backgroundColor:{value:"{colors.transparent.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},borderColor:{value:"{colors.border.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{borderColor:{value:"{colors.border.pressed.value}"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.overlay.20.value}"},_hover:{backgroundColor:{value:"{colors.overlay.30.value}"}}},primary:{backgroundColor:{value:"{colors.transparent.value}"},borderWidth:{value:"{borderWidths.small.value}"},_focus:{borderColor:{value:"{colors.border.focus.value}"},backgroundColor:{value:"{colors.transparent.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"},color:{value:"{colors.font.primary.value}"}},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.primary.80.value}"},borderColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.background.primary.value}"},_focus:{backgroundColor:{value:"{colors.border.focus.value}"},borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.background.primary.value}"}},_hover:{borderColor:{value:"{colors.primary.60.value}"},backgroundColor:{value:"{colors.primary.60.value}"},boxShadow:{value:"{colors.primary.60.value}"},color:{value:"{colors.background.primary.value}"}}}},link:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"},_hover:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"}},_hover:{color:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.transparent.value}"}}}}},Vie={alignItems:{value:"center"},alignContent:{value:"center"},justifyContent:{value:"flex-start"}},Kie={accordion:lie,aiConversation:Voe,alert:Goe,authenticator:Yoe,autocomplete:Koe,avatar:Zoe,badge:Xoe,breadcrumbs:Qoe,button:Joe,card:eie,checkbox:tie,checkboxfield:nie,collection:rie,copy:sie,countrycodeselect:oie,divider:iie,dropzone:aie,field:uie,fieldcontrol:cie,fieldgroup:die,fieldmessages:hie,fieldset:fie,fileuploader:pie,flex:gie,heading:mie,icon:yie,highlightmatch:vie,image:Sie,inappmessaging:Eie,input:bie,link:Cie,liveness:wie,loader:_ie,menu:xie,message:Aie,pagination:Tie,passwordfield:Rie,phonenumberfield:Iie,placeholder:Oie,radio:Nie,radiogroup:Mie,rating:Pie,searchfield:kie,select:Die,selectfield:Lie,sliderfield:Uie,stepperfield:Fie,storagemanager:zie,switchfield:Bie,table:jie,tabs:Hie,text:$ie,textareafield:qie,textfield:Wie,togglebutton:Gie,togglebuttongroup:Vie},Yie={default:{variable:{value:`'InterVariable', 'Inter var', 'Inter', -apple-system, BlinkMacSystemFont,
|
|
@@ -213,7 +213,7 @@ Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Tw=n,T
|
|
|
213
213
|
The chosen QR Code version cannot contain this amount of data.
|
|
214
214
|
Minimum version required to store current data is: `+F+`.
|
|
215
215
|
`);const B=T(I,P,H),W=t.getSymbolSize(I),Y=new r(W);return y(Y,I),S(Y),E(Y,I),w(Y,P,0),I>=7&&C(Y,I),x(Y,B),isNaN(k)&&(k=a.getBestMask(Y,w.bind(null,Y,P))),a.applyMask(k,Y),w(Y,P,k),{modules:Y,version:I,errorCorrectionLevel:P,maskPattern:k,segments:H}}return uw.create=function(I,P){if(typeof I>"u"||I==="")throw new Error("No input text");let k=e.M,H,F;return typeof P<"u"&&(k=e.from(P.errorCorrectionLevel,e.M),H=f.from(P.version),F=a.from(P.maskPattern),P.toSJISFunc&&t.setToSJISFunction(P.toSJISFunc)),M(I,H,k,F)},uw}var Iw={},Ow={},gL;function CF(){return gL||(gL=1,(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,a=r.scale||4;return{width:o,scale:o?4:a,margin:s,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},t.getImageWidth=function(r,s){const o=t.getScale(r,s);return Math.floor((r+s.margin*2)*o)},t.qrToImageData=function(r,s,o){const a=s.modules.size,u=s.modules.data,c=t.getScale(a,o),f=Math.floor((a+o.margin*2)*c),p=o.margin*c,g=[o.color.light,o.color.dark];for(let m=0;m<f;m++)for(let y=0;y<f;y++){let S=(m*f+y)*4,E=o.color.light;if(m>=p&&y>=p&&m<f-p&&y<f-p){const C=Math.floor((m-p)/c),w=Math.floor((y-p)/c);E=g[u[C*a+w]?1:0]}r[S++]=E.r,r[S++]=E.g,r[S++]=E.b,r[S]=E.a}}})(Ow)),Ow}var mL;function Lue(){return mL||(mL=1,(function(t){const e=CF();function n(s,o,a){s.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=a,o.width=a,o.style.height=a+"px",o.style.width=a+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,a,u){let c=u,f=a;typeof c>"u"&&(!a||!a.getContext)&&(c=a,a=void 0),a||(f=r()),c=e.getOptions(c);const p=e.getImageWidth(o.modules.size,c),g=f.getContext("2d"),m=g.createImageData(p,p);return e.qrToImageData(m.data,o,c),n(g,f,p),g.putImageData(m,0,0),f},t.renderToDataURL=function(o,a,u){let c=u;typeof c>"u"&&(!a||!a.getContext)&&(c=a,a=void 0),c||(c={});const f=t.render(o,a,c),p=c.type||"image/png",g=c.rendererOpts||{};return f.toDataURL(p,g.quality)}})(Iw)),Iw}var Nw={},vL;function Uue(){if(vL)return Nw;vL=1;const t=CF();function e(s,o){const a=s.a/255,u=o+'="'+s.hex+'"';return a<1?u+" "+o+'-opacity="'+a.toFixed(2).slice(1)+'"':u}function n(s,o,a){let u=s+o;return typeof a<"u"&&(u+=" "+a),u}function r(s,o,a){let u="",c=0,f=!1,p=0;for(let g=0;g<s.length;g++){const m=Math.floor(g%o),y=Math.floor(g/o);!m&&!f&&(f=!0),s[g]?(p++,g>0&&m>0&&s[g-1]||(u+=f?n("M",m+a,.5+y+a):n("m",c,0),c=0,f=!1),m+1<o&&s[g+1]||(u+=n("h",p),p=0)):c++}return u}return Nw.render=function(o,a,u){const c=t.getOptions(a),f=o.modules.size,p=o.modules.data,g=f+c.margin*2,m=c.color.light.a?"<path "+e(c.color.light,"fill")+' d="M0 0h'+g+"v"+g+'H0z"/>':"",y="<path "+e(c.color.dark,"stroke")+' d="'+r(p,f,c.margin)+'"/>',S='viewBox="0 0 '+g+" "+g+'"',C='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+S+' shape-rendering="crispEdges">'+m+y+`</svg>
|
|
216
|
-
`;return typeof u=="function"&&u(null,C),C},Nw}var yL;function Fue(){if(yL)return ec;yL=1;const t=vue(),e=Due(),n=Lue(),r=Uue();function s(o,a,u,c,f){const p=[].slice.call(arguments,1),g=p.length,m=typeof p[g-1]=="function";if(!m&&!t())throw new Error("Callback required as last argument");if(m){if(g<2)throw new Error("Too few arguments provided");g===2?(f=u,u=a,a=c=void 0):g===3&&(a.getContext&&typeof f>"u"?(f=c,c=void 0):(f=c,c=u,u=a,a=void 0))}else{if(g<1)throw new Error("Too few arguments provided");return g===1?(u=a,a=c=void 0):g===2&&!a.getContext&&(c=u,u=a,a=void 0),new Promise(function(y,S){try{const E=e.create(u,c);y(o(E,a,c))}catch(E){S(E)}})}try{const y=e.create(u,c);f(null,o(y,a,c))}catch(y){f(y)}}return ec.create=e.create,ec.toCanvas=s.bind(null,n.render),ec.toDataURL=s.bind(null,n.renderToDataURL),ec.toString=s.bind(null,function(o,a,u){return r.render(o,u)}),ec}var zue=Fue();const Bue=qa(zue),jue=t=>t==="signIn"||t==="signUp",jT=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:Hue,getConfirmingText:$ue,getBackToSignInText:que,getResendCodeText:Wue}=kn,nb=()=>{const{isPending:t,toSignIn:e,challengeName:n,resendCode:r,selectedAuthMethod:s,availableAuthMethods:o}=St(c=>[c.isPending,c.toSignIn,c.challengeName,c.resendCode,c.selectedAuthMethod,c.availableAuthMethods]),a=!!s&&s!=="PASSWORD"||!!o?.some(c=>c!=="PASSWORD"),u=jT(n)&&a&&r;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:$ue()},Hue()),u&&z.createElement(Jt,{onClick:r,type:"button"},Wue()),z.createElement(Jt,{onClick:e,type:"button",variation:"link",size:"small"},que()))},Gue=new nr("SetupTotp-logger"),{getSetupTotpText:Vue,getCopiedText:Kue,getLoadingText:Yue}=kn,Ua=({className:t,variation:e})=>{const{totpSecretCode:n,isPending:r,username:s,QRFields:o}=St(R=>[R.isPending,R.totpSecretCode,R.username]),{handleChange:a,handleSubmit:u}=cs(),{components:{SetupTotp:{Header:c=Ua.Header,Footer:f=Ua.Footer}}}=us(),[p,g]=A.useState(!0),[m,y]=A.useState(),[S,E]=A.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:w=s}=o??{},x=A.useCallback(async()=>{try{const R=Fne(C,w,n),M=await Bue.toDataURL(R);y(M)}catch(R){Gue.error(R)}finally{g(!1)}},[C,w,n]);A.useEffect(()=>{m||x()},[x,m]);const T=()=>{navigator.clipboard.writeText(n),E(Kue())};return A.createElement($r,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-totp":"",method:"post",onChange:a,onSubmit:u},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:r},A.createElement(c,null),A.createElement(Fe,{direction:"column"},p?A.createElement("p",null,Yue(),"…"):A.createElement("img",{"data-amplify-qrcode":!0,src:m,alt:"qr code",width:"228",height:"228"}),A.createElement(Fe,{"data-amplify-copy":!0},A.createElement("div",null,n),A.createElement(Fe,{"data-amplify-copy-svg":!0,onClick:T},A.createElement("div",{"data-amplify-copy-tooltip":!0},S),A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})))),A.createElement(Mo,null),A.createElement(Wr,null)),A.createElement(nb,null),A.createElement(f,null))))};Ua.Header=function(){return A.createElement(_r,{level:3},Vue())};Ua.Footer=function(){return null};const{getSubmitText:Zue,getSubmittingText:Xue}=kn,rb=t=>{const{cancelButtonSendType:e,cancelButtonText:n,submitButtonText:r}=t,{isPending:s,resendCode:o,skipVerification:a,toSignIn:u}=St(g=>[g.isPending]),c=()=>{switch(e){case"SKIP":a();break;case"RESEND":o();break;case"SIGN_IN":u();break;default:return}},f=s?z.createElement(z.Fragment,null,Xue(),"…"):z.createElement(z.Fragment,null,Zue()),p=r??f;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{variation:"primary",isDisabled:s,type:"submit"},p),z.createElement(Fe,{direction:"column",alignItems:"center"},z.createElement(Jt,{onClick:c,type:"button",variation:"link",size:"small"},n)))},Que=()=>z.createElement("svg",{"aria-label":"Apple icon",className:"amplify-icon federated-sign-in-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},z.createElement("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})),Jue=()=>z.createElement("svg",{"aria-label":"Google icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},z.createElement("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),z.createElement("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),z.createElement("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),z.createElement("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})),ece=()=>z.createElement(eF,{className:"federated-sign-in-icon",ariaLabel:"Facebook icon",viewBox:{minX:0,minY:0,width:279,height:538},pathData:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"}),tce=()=>z.createElement("svg",{"aria-label":"Amazon icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 243 264",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},z.createElement("path",{d:"M230.826 208.039C227.468 203.683 208.551 205.982 200.056 206.998C197.471 207.321 197.076 205.042 199.407 203.405C214.475 192.665 239.201 195.766 242.082 199.364C244.966 202.982 241.337 228.071 227.173 240.049C225.001 241.888 222.93 240.904 223.898 238.468C227.077 230.431 234.205 212.419 230.826 208.039ZM123.769 264C71.0234 264 39.0764 241.955 14.7853 217.542C9.97339 212.706 3.71799 206.296 0.311513 200.691C-1.09773 198.372 2.59096 195.022 5.04421 196.844C35.239 219.268 79.1012 239.538 122.53 239.538C151.82 239.538 188.046 227.47 217.669 214.868C222.147 212.966 222.147 219.18 221.512 221.061C221.183 222.032 206.515 236.221 186.247 247.047C167.304 257.166 143.397 264 123.769 264Z",fill:"#F2541B"}),z.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M142.943 111.185C142.943 124.756 143.268 136.054 136.406 148.123C130.856 157.913 122.027 163.95 112.222 163.95C98.8288 163.95 90.9806 153.772 90.9806 138.693C90.9806 109.036 117.677 103.647 142.943 103.647V111.185ZM178.166 196.081C175.858 198.15 171.635 198.22 169.914 196.894C157.974 187.684 149.89 173.688 149.89 173.688C130.706 193.156 117.127 199 92.2879 199C62.8772 199 40 180.905 40 144.729C40 116.461 55.3552 97.2408 77.2563 87.823C96.2094 79.5256 122.684 78.0173 142.943 75.7517C142.943 75.7517 144.633 53.933 138.699 45.9806C134.098 39.8163 126.272 36.9329 119.089 36.9329C106.127 36.8829 93.61 43.9051 91.1262 57.4188C90.4136 61.2829 87.5533 64.5261 84.54 64.206L51.0823 60.5922C48.5156 60.2951 45.0381 57.6639 45.8636 53.3081C53.644 12.3684 90.7373 0 123.989 0C140.983 0 163.21 4.51651 176.608 17.3349C193.597 33.1648 191.969 54.2755 191.969 77.2722V131.51C191.969 147.835 198.768 154.987 205.151 163.775C207.376 166.953 207.886 170.714 205.04 173.032C197.902 178.999 178.166 196.081 178.166 196.081Z",fill:"#F2541B"})),Zg=t=>{const{icon:e,provider:n,text:r}=t,{toFederatedSignIn:s}=St(),o=u=>{u.preventDefault(),s({provider:n})};let a;return e==="facebook"?a=z.createElement(ece,null):e==="google"?a=z.createElement(Jue,null):e==="amazon"?a=z.createElement(tce,null):e==="apple"&&(a=z.createElement(Que,null)),z.createElement(Jt,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,z.createElement(As,{as:"span"},r))},{getSignInWithFederationText:Xg,getOrText:nce}=kn;function wF(){const{route:t,socialProviders:e}=St(({route:n,socialProviders:r})=>[n,r]);return e.length===0?null:z.createElement(Fe,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},e.map(n=>{switch(n){case"amazon":return z.createElement(Zg,{icon:"amazon",key:n,provider:bc.Amazon,text:Xg(t,n)});case"apple":return z.createElement(Zg,{icon:"apple",key:n,provider:bc.Apple,text:Xg(t,n)});case"facebook":return z.createElement(Zg,{icon:"facebook",key:n,provider:bc.Facebook,text:Xg(t,n)});case"google":return z.createElement(Zg,{icon:"google",key:n,provider:bc.Google,text:Xg(t,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),z.createElement(MT,{size:"small",label:nce()}))}const{getSignInText:Qg,getSigningInText:rce,getForgotPasswordText:sce,getSignInWithEmailText:oce,getSignInWithSmsText:ice,getSignInWithPasskeyText:ace,getOtherSignInOptionsText:lce,getEnterUsernameFirstText:uce}=kn;function Si(){const{isPending:t,availableAuthMethods:e,preferredChallenge:n,toShowAuthMethods:r}=St(w=>[w.isPending,w.availableAuthMethods,w.preferredChallenge,w.toShowAuthMethods]),{handleChange:s,handleSubmit:o}=cs(),[a,u]=z.useState(""),{components:{SignIn:{Header:c=Si.Header,Footer:f=Si.Footer}}}=us(),g=e&&e.length>1&&n,m=a.trim().length>0,y=z.useCallback(w=>{const{name:x,value:T}=w.target;x==="username"&&typeof T=="string"&&u(T),s(w)},[s]),S=()=>{if(!n)return Qg();switch(n){case"EMAIL_OTP":return oce();case"SMS_OTP":return ice();case"WEB_AUTHN":return ace();default:return Qg()}},E=w=>{w.preventDefault(),o(w)},C=w=>{w.preventDefault(),r()};return z.createElement($e,null,z.createElement(c,null),z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:g?E:o,onChange:y},z.createElement(wF,null),z.createElement(Fe,{direction:"column"},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:t},z.createElement(eb,null,z.createElement("legend",null,Qg())),z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:rce()},g?S():Qg()),g&&z.createElement(Jt,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:uce()},lce()),z.createElement(f,null))))}const cce=()=>{const{toForgotPassword:t}=St(e=>[e.toForgotPassword]);return z.createElement($e,{"data-amplify-footer":""},z.createElement(Jt,{onClick:t,size:"small",variation:"link"},sce()))};Si.Footer=cce;Si.Header=function(){return null};const{getCreateAccountText:bL,getCreatingAccountText:dce,getCreateAccountWithEmailText:fce,getCreateAccountWithPasswordText:hce,getCreateAccountWithSmsText:pce,getOrText:gce}=kn;function Xs(){const{hasValidationErrors:t,isPending:e,availableAuthMethods:n,preferredChallenge:r,selectedAuthMethod:s}=St(T=>[T.hasValidationErrors,T.isPending,T.availableAuthMethods,T.preferredChallenge,T.selectedAuthMethod]),{handleChange:o,handleBlur:a,handleSubmit:u}=cs(),{components:{SignUp:{Header:c=Xs.Header,FormFields:f=Xs.FormFields,Footer:p=Xs.Footer}}}=us(),g=n?.filter(T=>T!=="WEB_AUTHN"),m=g&&g.length>1,y=r&&r!=="WEB_AUTHN"?r:"PASSWORD",S=g?.filter(T=>T!==y)??[],C=(s??y)!=="PASSWORD",w=T=>{switch(T){case"EMAIL_OTP":return fce();case"SMS_OTP":return pce();case"PASSWORD":return m?hce():bL();default:return bL()}},x=T=>R=>{R.preventDefault();const M=R.target.closest("form");if(M){if(!M.__authMethod){const O=document.createElement("input");O.name="__authMethod",M.appendChild(O)}M.__authMethod.type="hidden",M.__authMethod.value=T,M.requestSubmit()}};return z.createElement($e,null,z.createElement(c,null),z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:o,onSubmit:u,onBlur:a},z.createElement(wF,null),z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:e},z.createElement(Fe,{direction:"column"},z.createElement(f,{includePassword:!C}),z.createElement(Wr,null)),z.createElement(Jt,{isDisabled:(!m||S.length==0)&&t||e,isFullWidth:!0,type:"submit",variation:"primary",isLoading:e,loadingText:dce(),onClick:x(y)},w(y)),m&&S.length>0&&z.createElement(z.Fragment,null,z.createElement(Fe,{justifyContent:"center",padding:"medium 0"},gce()),S.map(T=>z.createElement(Jt,{key:T,isDisabled:e,isFullWidth:!0,type:"button",variation:"primary",onClick:x(T)},w(T)))),z.createElement(p,null))))}Xs.Header=function(){return null};Xs.FormFields=function(){return z.createElement(Mo,null)};Xs.Footer=function(){return null};const{getSignInTabText:mce,getSignUpTabText:vce}=kn,yce=({className:t,hideSignUp:e,variation:n})=>{const{route:r,toSignIn:s,toSignUp:o}=St(a=>[a.route,a.toSignIn,a.toSignUp]);return z.createElement($r,{className:t,variation:n},e?z.createElement($e,{"data-amplify-router-content":""},r==="signIn"&&z.createElement(Si,null)):z.createElement(Sl.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?s():o())}},z.createElement(Sl.List,{spacing:"equal",indicatorPosition:"top"},z.createElement(Sl.Item,{value:"signIn"},mce()),z.createElement(Sl.Item,{value:"signUp"},vce())),z.createElement(Sl.Panel,{value:"signIn","data-amplify-router-content":""},z.createElement(Si,null)),z.createElement(Sl.Panel,{value:"signUp","data-amplify-router-content":""},z.createElement(Xs,null))))},{getAccountRecoveryInfoText:bce,getSkipText:Sce}=kn,Hl=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=cs(),{components:{ConfirmVerifyUser:{Header:o=Hl.Header,Footer:a=Hl.Footer}}}=us();return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(o,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(rb,{cancelButtonText:Sce(),cancelButtonSendType:"SKIP"}),z.createElement(a,null))))};Hl.Header=function(){return z.createElement(_r,{level:3},bce())};Hl.Footer=function(){return null};const{getSkipText:Ece,getVerifyText:Cce,getVerifyContactText:wce,getAccountRecoveryInfoText:_ce}=kn,xce=t=>Object.entries(t).map(([e,n],r)=>{const s=$y[e].label;return z.createElement(kT,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",Lne(s,n))}),$l=({className:t,variation:e})=>{const{components:{VerifyUser:{Header:n=$l.Header,Footer:r=$l.Footer}}}=us(),{isPending:s,unverifiedUserAttributes:o}=St(({isPending:p,unverifiedUserAttributes:g})=>[p,g]),{handleChange:a,handleSubmit:u}=cs(),c=s?z.createElement(z.Fragment,null,"Verifying…"):z.createElement(z.Fragment,null,Cce()),f=z.createElement(DT,{legend:wce(),name:"verify_context",isDisabled:s,legendHidden:!0},xce(o));return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:a,onSubmit:u},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:s},z.createElement(n,null),f,z.createElement(Wr,null),z.createElement(rb,{cancelButtonText:Ece(),cancelButtonSendType:"SKIP",submitButtonText:c}),z.createElement(r,null))))};$l.Header=function(){return z.createElement(_r,{level:3},_ce())};$l.Footer=function(){return null};const{getChallengeText:Ace,getDeliveryMessageText:Tce,getDeliveryMethodText:Rce}=kn,ql=({className:t,variation:e})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:s}=St(p=>[p.isPending,p.challengeName,p.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=cs(),{components:{ConfirmSignIn:{Header:u=ql.Header,Footer:c=ql.Footer}}}=us(),f=jT(r)&&s;return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:o,onSubmit:a},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(u,null),z.createElement(Fe,{direction:"column"},f&&z.createElement(As,{className:"amplify-authenticator__subtitle"},Tce(s)),z.createElement(Mo,null),z.createElement(Wr,null)),z.createElement(nb,null),z.createElement(c,null))))};function Ice(){const{challengeName:t,codeDeliveryDetails:e}=St(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=jT(t)&&e;return z.createElement(z.Fragment,null,z.createElement(_r,{level:3},Ace(t)),n&&z.createElement(_r,{level:5},Rce(e)))}ql.Header=Ice;ql.Footer=function(){return null};const{getResendCodeText:Oce,getResetYourPasswordText:Nce}=kn,Wl=({className:t,variation:e})=>{const{isPending:n}=St(c=>[c.isPending]),{handleBlur:r,handleChange:s,handleSubmit:o}=cs(),{components:{ConfirmResetPassword:{Header:a=Wl.Header,Footer:u=Wl.Footer}}}=us();return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:o,onChange:s,onBlur:r},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(a,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(rb,{cancelButtonSendType:"RESEND",cancelButtonText:Oce()}),z.createElement(u,null))))};Wl.Header=function(){const e=Nce();return z.createElement(_r,{level:3},e)};Wl.Footer=function(){return null};const{getBackToSignInText:Mce,getSendingText:Pce,getSendCodeText:kce,getResetYourPasswordText:Dce}=kn,Fa=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=cs(),{components:{ForgotPassword:{Header:o=Fa.Header,Footer:a=Fa.Footer}}}=us();return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(o,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(rb,{cancelButtonText:Mce(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?z.createElement(z.Fragment,null,Pce(),"…"):z.createElement(z.Fragment,null,kce())}),z.createElement(a,null))))};Fa.Header=function(){return z.createElement(_r,{level:3},Dce())};Fa.Footer=function(){return null};const{getMfaTypeLabelByValue:Lce,getSelectMfaTypeByChallengeName:Uce,getSelectMfaTypeText:Fce}=kn,za=({className:t,variation:e})=>{const{isPending:n,allowedMfaTypes:r=[]}=St(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:s,handleSubmit:o}=cs(),{components:{SelectMfaType:{Header:a=za.Header,Footer:u=za.Footer}}}=us();return A.createElement($r,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-select-mfa-type":"",method:"post",onChange:s,onSubmit:o},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},A.createElement(a,null),A.createElement(Fe,{direction:"column"},A.createElement(DT,{name:"mfa_type",legend:Fce(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>A.createElement(kT,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},Lce(c)))),A.createElement(Wr,null)),A.createElement(nb,null),A.createElement(u,null))))};za.Header=function(){const{challengeName:e}=St(n=>[n.challengeName]);return A.createElement(_r,{level:3},Uce(e))};za.Footer=function(){return null};const{getSetupEmailText:zce}=kn,Ba=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=cs(),{components:{SetupEmail:{Header:o=Ba.Header,Footer:a=Ba.Footer}}}=us();return A.createElement($r,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-email":"",method:"post",onChange:r,onSubmit:s},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},A.createElement(o,null),A.createElement(Fe,{direction:"column"},A.createElement(Mo,null),A.createElement(Wr,null)),A.createElement(nb,null),A.createElement(a,null))))};Ba.Header=function(){return A.createElement(_r,{level:3},zce())};Ba.Footer=function(){return null};const{getSignInWithPasswordText:rx,getSignInWithEmailText:Bce,getSignInWithSmsText:jce,getSignInWithPasskeyText:Hce,getSigningInText:$ce,getBackToSignInText:qce,getOrText:Wce,getUsernameLabelByLoginMechanism:Gce}=kn,Vce=t=>{switch(t){case"EMAIL_OTP":return Bce();case"SMS_OTP":return jce();case"WEB_AUTHN":return Hce();case"PASSWORD":return rx();default:return rx()}},Kce=({className:t,variation:e})=>{const{isPending:n,username:r,availableAuthMethods:s,toSignIn:o,selectAuthMethod:a,loginMechanism:u}=St(E=>[E.isPending,E.username,E.availableAuthMethods,E.toSignIn,E.selectAuthMethod,E.loginMechanism]),{handleChange:c,handleSubmit:f}=cs(),p=s??[],g=p.includes("PASSWORD"),m=p.filter(E=>E!=="PASSWORD"),y=E=>{a({method:E})},S=Gce(u);return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:c},z.createElement(Fe,{direction:"column"},z.createElement(rp,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),g&&z.createElement(z.Fragment,null,z.createElement(PT,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),z.createElement(Jt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:$ce()},rx())),g&&m.length>0&&z.createElement(MT,{label:Wce()}),m.length>0&&z.createElement(Fe,{direction:"column",gap:"0.5rem"},m.map(E=>z.createElement(Jt,{key:E,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>y(E)},Vce(E)))),z.createElement(Wr,null),z.createElement(Jt,{onClick:o,size:"small",variation:"link",isDisabled:n},qce()))))},Yce=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M22.9333 38.9333L41.7333 20.1333L38 16.4L22.9333 31.4667L15.3333 23.8667L11.6 27.6L22.9333 38.9333ZM26.6667 53.3333C22.9778 53.3333 19.5111 52.6333 16.2667 51.2333C13.0222 49.8333 10.2 47.9333 7.8 45.5333C5.4 43.1333 3.5 40.3111 2.1 37.0667C0.7 33.8222 0 30.3556 0 26.6667C0 22.9778 0.7 19.5111 2.1 16.2667C3.5 13.0222 5.4 10.2 7.8 7.8C10.2 5.4 13.0222 3.5 16.2667 2.1C19.5111 0.7 22.9778 0 26.6667 0C30.3556 0 33.8222 0.7 37.0667 2.1C40.3111 3.5 43.1333 5.4 45.5333 7.8C47.9333 10.2 49.8333 13.0222 51.2333 16.2667C52.6333 19.5111 53.3333 22.9778 53.3333 26.6667C53.3333 30.3556 52.6333 33.8222 51.2333 37.0667C49.8333 40.3111 47.9333 43.1333 45.5333 45.5333C43.1333 47.9333 40.3111 49.8333 37.0667 51.2333C33.8222 52.6333 30.3556 53.3333 26.6667 53.3333Z",fill:"currentColor"})))},Zce=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"195",height:"128",viewBox:"0 0 195 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("circle",{cx:"60",cy:"36",r:"31",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M60 69C84.4313 69 105.396 83.8504 114.357 105.021C116.774 110.729 115.382 116.168 111.798 120.23C108.191 124.319 102.358 127 96 127H24C17.6416 127 11.8094 124.319 8.20215 120.23C4.61836 116.168 3.22626 110.729 5.64258 105.021C14.6036 83.8504 35.5687 69 60 69Z",stroke:"#00404D",strokeWidth:"2"}),A.createElement("circle",{cx:"122",cy:"26",r:"25",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),A.createElement("mask",{id:"path-4-inside-1_4178_10171",fill:"white"},A.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z"})),A.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z",fill:"#00404D",stroke:"#00404D",strokeWidth:"4",mask:"url(#path-4-inside-1_4178_10171)"}),A.createElement("circle",{cx:"167.5",cy:"49.5",r:"19.5",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M167.89 43.65L161.26 54.18H167.89",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M167.5 60.42C173.316 60.42 178.03 55.7056 178.03 49.89V48.72",stroke:"#00404D",strokeWidth:"2"}),A.createElement("circle",{cx:"173.74",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),A.createElement("circle",{cx:"160.48",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M104 112C116.129 112 126.457 104.288 130.347 93.5H147.5L155.5 101.5L168 89L180.5 101.5L193 89L180.5 76.5H130.984C127.705 64.6779 116.866 56 104 56C88.536 56 76 68.536 76 84C76 99.464 88.536 112 104 112ZM104 98C111.732 98 118 91.732 118 84C118 76.268 111.732 70 104 70C96.268 70 90 76.268 90 84C90 91.732 96.268 98 104 98Z",fill:"#BCECF5"}),A.createElement("path",{d:"M130.347 93.5V92.5H129.645L129.407 93.1608L130.347 93.5ZM147.5 93.5L148.207 92.7929L147.914 92.5H147.5V93.5ZM155.5 101.5L154.793 102.207L155.5 102.914L156.207 102.207L155.5 101.5ZM168 89L168.707 88.2929L168 87.5858L167.293 88.2929L168 89ZM180.5 101.5L179.793 102.207L180.5 102.914L181.207 102.207L180.5 101.5ZM193 89L193.707 89.7071L194.414 89L193.707 88.2929L193 89ZM180.5 76.5L181.207 75.7929L180.914 75.5H180.5V76.5ZM130.984 76.5L130.021 76.7673L130.224 77.5H130.984V76.5ZM129.407 93.1608C125.655 103.565 115.694 111 104 111V113C116.564 113 127.259 105.011 131.288 93.8392L129.407 93.1608ZM147.5 92.5H130.347V94.5H147.5V92.5ZM156.207 100.793L148.207 92.7929L146.793 94.2071L154.793 102.207L156.207 100.793ZM167.293 88.2929L154.793 100.793L156.207 102.207L168.707 89.7071L167.293 88.2929ZM181.207 100.793L168.707 88.2929L167.293 89.7071L179.793 102.207L181.207 100.793ZM192.293 88.2929L179.793 100.793L181.207 102.207L193.707 89.7071L192.293 88.2929ZM179.793 77.2071L192.293 89.7071L193.707 88.2929L181.207 75.7929L179.793 77.2071ZM130.984 77.5H180.5V75.5H130.984V77.5ZM104 57C116.405 57 126.859 65.3669 130.021 76.7673L131.948 76.2327C128.552 63.9889 117.327 55 104 55V57ZM77 84C77 69.0883 89.0883 57 104 57V55C87.9837 55 75 67.9837 75 84H77ZM104 111C89.0883 111 77 98.9117 77 84H75C75 100.016 87.9837 113 104 113V111ZM117 84C117 91.1797 111.18 97 104 97V99C112.284 99 119 92.2843 119 84H117ZM104 71C111.18 71 117 76.8203 117 84H119C119 75.7157 112.284 69 104 69V71ZM91 84C91 76.8203 96.8203 71 104 71V69C95.7157 69 89 75.7157 89 84H91ZM104 97C96.8203 97 91 91.1797 91 84H89C89 92.2843 95.7157 99 104 99V97Z",fill:"#00404D"}),A.createElement("path",{d:"M138.5 57V66",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M139 104V124",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M134 61.5L143 61.5",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M129 114L149 114",stroke:"#00404D",strokeWidth:"2"})))},{getPasskeyPromptHeadingText:Xce,getPasskeyPromptDescriptionText:Qce,getCreatePasskeyText:Jce,getRegisteringText:ede,getContinueWithoutPasskeyText:tde,getPasskeyCreatedSuccessText:nde,getPasskeyRegisteredText:rde,getPasskeyRegistrationFailedText:sde,getPasskeyLabelText:ode,getExistingPasskeysText:ide,getSetupAnotherPasskeyText:ade,getContinueText:lde}=kn;function ude({className:t,variation:e}){const[n,r]=z.useState(!1),[s,o]=z.useState(null),[a,u]=z.useState(!1),[c,f]=z.useState([]),{submitForm:p,isPending:g}=St(w=>[w.submitForm,w.isPending]),m=z.useCallback(async()=>{try{const w=await dT();f(w.credentials||[])}catch{}},[]);z.useEffect(()=>{n&&m()},[n,m]);const y=z.useCallback(()=>{p({type:"SKIP"})},[p]),S=z.useCallback(()=>{p({type:"SUBMIT"})},[p]),E=z.useCallback(async()=>{try{o(null),u(!0),await rne(),r(!0)}catch(w){const x=w,T=x.name??"",R=x.message??"";if(T==="PasskeyRegistrationCanceled"||T==="NotAllowedError"||R.includes("canceled")||R.includes("cancelled")||R.includes("ceremony has been canceled")||R.includes("not allowed")){y();return}o(sde())}finally{u(!1)}},[y]);if(n)return z.createElement($r,{className:t,variation:e},z.createElement(Fe,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"xs"},z.createElement(Yce,{className:"amplify-authenticator__passkey-success-icon"}),z.createElement(_r,{level:4},nde()),z.createElement(As,null,rde())),c.length>0&&z.createElement($e,{marginTop:"large"},z.createElement(_r,{level:5},ide()),z.createElement(Fe,{direction:"column",gap:"xs",marginTop:"xs"},c.map((w,x)=>z.createElement($e,{key:w.credentialId,className:"amplify-authenticator__passkey-credential-item"},z.createElement(As,{fontSize:"small"},w.friendlyCredentialName??`${ode()} ${x+1}`))))),z.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},z.createElement(Jt,{onClick:()=>{r(!1),E()},variation:"link"},ade()),z.createElement(Jt,{onClick:()=>S(),variation:"primary",isFullWidth:!0},lde()))));const C=g||a;return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(_r,{level:4},Xce()),z.createElement(As,null,Qce()),z.createElement(Fe,{justifyContent:"center"},z.createElement(Zce,{className:"amplify-authenticator__passkey-icon"})),z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(Jt,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:ede()},Jce()),z.createElement(Jt,{onClick:y,variation:"link",isDisabled:C},tde()),s&&z.createElement(As,{className:"amplify-authenticator__passkey-error"},s),z.createElement(Wr,null)))))}function SL(){return null}const cde=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return SL;case"confirmSignUp":return jl;case"confirmSignIn":return ql;case"selectMfaType":return za;case"setupEmail":return Ba;case"setupTotp":return Ua;case"signIn":case"signUp":return yce;case"signInSelectAuthFactor":return Kce;case"passkeyPrompt":return ude;case"forceNewPassword":return Zs;case"forgotPassword":return Fa;case"confirmResetPassword":return Wl;case"verifyUser":return $l;case"confirmVerifyUser":return Hl;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${t}`),SL}};function dde({className:t,hideSignUp:e,variation:n}){const{route:r}=St(({route:o})=>[o]),s=A.useMemo(()=>cde(r),[r]);return z.createElement(s,{className:t,hideSignUp:jue(r)?e:void 0,variation:n})}const fde={Header:()=>null,SignIn:{Header:Si.Header,Footer:Si.Footer},SignUp:{Header:Xs.Header,FormFields:Xs.FormFields,Footer:Xs.Footer},ConfirmSignUp:{Header:jl.Header,Footer:jl.Footer},SelectMfaType:{Header:za.Header,Footer:za.Footer},SetupEmail:{Header:Ba.Header,Footer:Ba.Footer},SetupTotp:{Header:Ua.Header,Footer:Ua.Footer},ConfirmResetPassword:{Header:Wl.Header,Footer:Wl.Footer},ConfirmSignIn:{Header:ql.Header,Footer:ql.Footer},VerifyUser:{Header:$l.Header,Footer:$l.Footer},ConfirmVerifyUser:{Header:Hl.Header,Footer:Hl.Footer},ForceNewPassword:{Header:Zs.Header,Footer:Zs.Footer,FormFields:Zs.FormFields},ForgotPassword:{Header:Fa.Header,Footer:Fa.Footer},Footer:()=>null};function hde({children:t,className:e,components:n,formFields:r,hideSignUp:s,initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,signUpAttributes:f,services:p,socialProviders:g,variation:m}){aue({message:"The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.",shouldWarn:!1});const{route:y,signOut:S,user:E}=St(({route:x,signOut:T,user:R})=>[x,T,R]);Uae({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:p,signUpAttributes:f,socialProviders:g,formFields:r});const C=A.useMemo(()=>({components:{...fde,...n}}),[n]);return y==="authenticated"||y==="signOut"?t?A.createElement(A.Fragment,null,yi(t)?t({signOut:S,user:E}):t):null:A.createElement(vF.Provider,{value:C},A.createElement(dde,{className:e,hideSignUp:s,variation:m}))}function Po(t){return zae({componentName:"Authenticator",packageName:"react",version:iue}),A.createElement(X9,null,A.createElement(hde,{...t}))}Po.Provider=X9;Po.ForgotPassword=Fa;Po.SetupTotp=Ua;Po.SignIn=Si;Po.SignUp=Xs;Po.ForceNewPassword=Zs;Po.SelectMfaType=za;Po.SetupEmail=Ba;const _F=({cssText:t,...e})=>t===void 0||/<\/style/i.test(t)?null:A.createElement("style",{...e,dangerouslySetInnerHTML:{__html:t}});_F.displayName="Style";const xF=({theme:t,...e})=>{if(!t)return null;const{name:n,cssText:r}=t;return A.createElement(_F,{...e,cssText:r,id:`amplify-theme-${n}`})};xF.displayName="ThemeStyle";function pde({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=A.useMemo(()=>({theme:Yy(s),colorMode:e}),[s,e]);return A.createElement(Q9.Provider,{value:o},A.createElement(Ule,{dir:n},A.createElement("div",{"data-amplify-theme":o.theme.name,"data-amplify-color-mode":e,dir:n},t),s?A.createElement(xF,{theme:o.theme,nonce:r}):null))}const gde=({configured:t,authStatus:e})=>e==="authenticated",mde=t=>t?t.signInDetails?.loginId??t.username??null:null,vde=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=St(o=>[o.authStatus,o.signOut,o.user]);return gde({configured:!0,authStatus:n})?D.jsx(D.Fragment,{children:t({email:mde(s),signOut:()=>r()})}):D.jsx(D.Fragment,{children:e})},yde=({children:t,fallback:e=null})=>wy()?D.jsx(vde,{fallback:e,children:t}):D.jsx(D.Fragment,{children:e}),EL='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ri=t=>`var(${t})`,un=Ri("--accent"),bde=Ri("--accent-hover"),CL=Ri("--accent-soft"),Af=Ri("--accent-fg"),wL=Ri("--surface"),tc=Ri("--fg"),Sde=Ri("--surface-sunken"),Jg=Ri("--fg-muted"),Tf=Ri("--line"),Ede=Yy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:CL},20:{value:CL},40:{value:un},60:{value:un},80:{value:un},90:{value:un},100:{value:un}}},background:{primary:{value:wL},secondary:{value:Sde}},font:{primary:{value:tc},secondary:{value:Jg},tertiary:{value:Jg},interactive:{value:un},inverse:{value:Af},hover:{value:un},focus:{value:un},active:{value:un}},border:{primary:{value:Tf},secondary:{value:Tf},focus:{value:un}}},fonts:{default:{variable:{value:EL},static:{value:EL}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Tf},borderWidth:{value:"1px"},boxShadow:{value:"0 10px 30px -10px rgb(15 23 42 / 0.18), 0 4px 12px -6px rgb(15 23 42 / 0.1)"},backgroundColor:{value:wL}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:Jg}}},button:{color:{value:tc},primary:{backgroundColor:{value:un},color:{value:Af},_hover:{backgroundColor:{value:bde},color:{value:Af}},_focus:{backgroundColor:{value:un},color:{value:Af}},_active:{backgroundColor:{value:un},color:{value:Af}}},link:{color:{value:un},_hover:{color:{value:un},backgroundColor:{value:"transparent"}},_focus:{color:{value:un},backgroundColor:{value:"transparent"}},_active:{color:{value:un},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:tc},borderColor:{value:Tf},_focus:{borderColor:{value:un},boxShadow:{value:`0 0 0 2px ${un}`}}},field:{label:{color:{value:tc}}},tabs:{borderColor:{value:Tf},item:{color:{value:Jg},backgroundColor:{value:"transparent"},_active:{color:{value:un},borderColor:{value:un},backgroundColor:{value:"transparent"}},_hover:{color:{value:un}},_focus:{color:{value:un}}}},heading:{color:{value:tc}},text:{color:{value:tc}}}}}),Cde={signIn:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"}},signUp:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"},confirm_password:{placeholder:"Confirm your password"}}},wde=()=>D.jsx(B_,{tone:"warning",className:"fixed top-0 left-0 right-0 z-50 h-7 sm:h-10 overflow-hidden border-x-0 border-t-0",children:D.jsxs("span",{className:"flex items-center gap-2",children:[D.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),D.jsx("span",{className:"truncate hidden sm:inline",children:"— Cognito not configured. Set VITE_COGNITO_USER_POOL_ID and VITE_COGNITO_CLIENT_ID in .env.local to enable sign-in."}),D.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),_de=()=>D.jsx(O8,{note:W8({betterAuthEnabled:!1,cognitoConfigured:wy()})}),xde=({children:t})=>{const{authStatus:e}=St(n=>[n.authStatus]);return e==="authenticated"?D.jsx(D.Fragment,{children:t}):e==="configuring"?D.jsx(qA,{}):D.jsx(pde,{theme:Ede,children:D.jsxs(I8,{children:[D.jsx(N8,{}),D.jsx(Po,{hideSignUp:!1,formFields:Cde,components:{Footer:_de}})]})})},Ade=({children:t})=>wy()?D.jsx(Po.Provider,{children:D.jsx(xde,{children:t})}):D.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[D.jsx(wde,{}),t]}),AF=60;let Rc=null;const TF=()=>Math.floor(Date.now()/1e3),Tde=t=>t!==null&&t.expiresAt-AF>TF(),Rde=async()=>{const e=(await vy()).tokens?.idToken;return e?(Rc={value:e.toString(),expiresAt:e.payload.exp??TF()+AF},Rc.value):(Rc=null,null)},Ide=async()=>wy()?Tde(Rc)?Rc.value:Rde():null,Ode=()=>{Rc=null},xv={configure:U6,getToken:Ide,resetToken:Ode,Shell:Ade,Account:yde},Nde=({children:t})=>_y()?D.jsx(yv.Shell,{children:t}):D.jsx(xv.Shell,{children:t}),Mde=t=>_y()?D.jsx(yv.Account,{...t}):D.jsx(xv.Account,{...t}),Pde={configure:U6,getToken:()=>_y()?yv.getToken():xv.getToken(),resetToken:()=>{yv.resetToken(),xv.resetToken()},Shell:Nde,Account:Mde};var sp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},kde=class extends sp{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},HT=new kde,Dde={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Lde=class{#e=Dde;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},wl=new Lde;function Ude(t){setTimeout(t,0)}var Fde=typeof window>"u"||"Deno"in globalThis;function Lr(){}function zde(t,e){return typeof t=="function"?t(e):t}function sx(t){return typeof t=="number"&&t>=0&&t!==1/0}function RF(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Oa(t,e){return typeof t=="function"?t(e):t}function os(t,e){return typeof t=="function"?t(e):t}function _L(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==$T(a,e.options))return!1}else if(!wh(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||s&&s!==e.state.fetchStatus||o&&!o(e))}function xL(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(Ch(e.options.mutationKey)!==Ch(o))return!1}else if(!wh(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function $T(t,e){return(e?.queryKeyHashFn||Ch)(t)}function Ch(t){return JSON.stringify(t,(e,n)=>ix(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function wh(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>wh(t[n],e[n])):!1}var Bde=Object.prototype.hasOwnProperty;function IF(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=AL(t)&&AL(e);if(!r&&!(ix(t)&&ix(e)))return e;const o=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),u=a.length,c=r?new Array(u):{};let f=0;for(let p=0;p<u;p++){const g=r?p:a[p],m=t[g],y=e[g];if(m===y){c[g]=m,(r?p<o:Bde.call(t,g))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[g]=y;continue}const S=IF(m,y,n+1);c[g]=S,S===m&&f++}return o===u&&f===o?t:c}function ox(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function AL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function ix(t){if(!TL(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!TL(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function TL(t){return Object.prototype.toString.call(t)==="[object Object]"}function jde(t){return new Promise(e=>{wl.setTimeout(e,t)})}function ax(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?IF(t,e):e}function kxe(t){return t}function Hde(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function $de(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var qT=Symbol();function OF(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===qT?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function NF(t,e){return typeof t=="function"?t(...e):!!t}function qde(t,e,n){let r=!1,s;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??=e(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),t}var _h=(()=>{let t=()=>Fde;return{isServer(){return t()},setIsServer(e){t=e}}})();function lx(){let t,e;const n=new Promise((s,o)=>{t=s,e=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}var Wde=Ude;function Gde(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=Wde;const o=u=>{e?t.push(u):s(()=>{n(u)})},a=()=>{const u=t;t=[],u.length&&s(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;e++;try{c=u()}finally{e--,e||a()}return c},batchCalls:u=>(...c)=>{o(()=>{u(...c)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{s=u}}}var er=Gde(),Vde=class extends sp{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},Av=new Vde;function Kde(t){return Math.min(1e3*2**t,3e4)}function MF(t){return(t??"online")==="online"?Av.isOnline():!0}var ux=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function PF(t){let e=!1,n=0,r;const s=lx(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new ux(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>HT.isFocused()&&(t.networkMode==="always"||Av.isOnline())&&t.canRun(),p=()=>MF(t.networkMode)&&t.canRun(),g=E=>{o()||(r?.(),s.resolve(E))},m=E=>{o()||(r?.(),s.reject(E))},y=()=>new Promise(E=>{r=C=>{(o()||f())&&E(C)},t.onPause?.()}).then(()=>{r=void 0,o()||t.onContinue?.()}),S=()=>{if(o())return;let E;const C=n===0?t.initialPromise:void 0;try{E=C??t.fn()}catch(w){E=Promise.reject(w)}Promise.resolve(E).then(g).catch(w=>{if(o())return;const x=t.retry??(_h.isServer()?0:3),T=t.retryDelay??Kde,R=typeof T=="function"?T(n,w):T,M=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,w);if(e||!M){m(w);return}n++,t.onFail?.(n,w),jde(R).then(()=>f()?void 0:y()).then(()=>{e?m(w):S()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:c,canStart:p,start:()=>(p()?S():y().then(S),s)}}var kF=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sx(this.gcTime)&&(this.#e=wl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(_h.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(wl.clearTimeout(this.#e),this.#e=void 0)}};function Yde(t){return{onFetch:(e,n)=>{const r=e.options,s=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},c=0;const f=async()=>{let p=!1;const g=S=>{qde(S,()=>e.signal,()=>p=!0)},m=OF(e.options,e.fetchOptions),y=async(S,E,C)=>{if(p)return Promise.reject(e.signal.reason);if(E==null&&S.pages.length)return Promise.resolve(S);const x=(()=>{const O={client:e.client,queryKey:e.queryKey,pageParam:E,direction:C?"backward":"forward",meta:e.options.meta};return g(O),O})(),T=await m(x),{maxPages:R}=e.options,M=C?$de:Hde;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?DF:cx,C={pages:o,pageParams:a},w=E(r,C);u=await y(C,w,S)}else{const S=t??o.length;do{const E=c===0?a[0]??r.initialPageParam:cx(r,u);if(c>0&&E==null)break;u=await y(u,E),c++}while(c<S)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=f}}}function cx(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function DF(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}function Dxe(t,e){return e?cx(t,e)!=null:!1}function Lxe(t,e){return!e||!t.getPreviousPageParam?!1:DF(t,e)!=null}var Zde=class extends kF{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t){super(),this.#i=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#o=t.client,this.#r=this.#o.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=IL(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#a,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=IL(this.options);e.data!==void 0&&(this.setState(RL(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=ax(this.state.data,t,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t){this.#l({type:"setState",state:t})}cancel(t){const e=this.#s?.promise;return this.#s?.cancel(t),e?e.then(Lr).catch(Lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>os(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Oa(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!RF(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#s&&(this.#i||this.#c()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},s=()=>{const c=OF(this.options,e),p=(()=>{const g={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(g),g})();return this.#i=!1,this.options.persister?this.options.persister(c,p,this):c(p)},a=(()=>{const c={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:s};return r(c),c})();(this.#e==="infinite"?Yde(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:"fetch",meta:a.fetchOptions?.meta}),this.#s=PF({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof ux&&c.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(c,f)=>{this.#l({type:"failed",failureCount:c,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const c=await this.#s.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#r.config.onSuccess?.(c,this),this.#r.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof ux){if(c.silent)return this.#s.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#l({type:"error",error:c}),this.#r.config.onError?.(c,this),this.#r.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#l(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...LF(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...RL(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const s=t.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),er.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function LF(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:MF(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function RL(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function IL(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Xde=class extends sp{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=lx(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#n=void 0;#r=void 0;#o;#s;#a;#i;#c;#l;#p;#d;#f;#u;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),OL(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dx(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dx(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#E(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof os(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#t.setOptions(this.options),e._defaulted&&!ox(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&NL(this.#t,n,this.options,e)&&this.#h(),this.updateResult(),r&&(this.#t!==n||os(this.options.enabled,this.#t)!==os(e.enabled,this.#t)||Oa(this.options.staleTime,this.#t)!==Oa(e.staleTime,this.#t))&&this.#m();const s=this.#v();r&&(this.#t!==n||os(this.options.enabled,this.#t)!==os(e.enabled,this.#t)||s!==this.#u)&&this.#y(s)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),n=this.createResult(e,t);return Jde(this,n)&&(this.#r=n,this.#s=this.options,this.#o=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(n,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(t){this.#g.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),n=this.#e.getQueryCache().build(this.#e,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(t){this.#C();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Lr)),e}#m(){this.#S();const t=Oa(this.options.staleTime,this.#t);if(_h.isServer()||this.#r.isStale||!sx(t))return;const n=RF(this.#r.dataUpdatedAt,t)+1;this.#d=wl.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#E(),this.#u=t,!(_h.isServer()||os(this.options.enabled,this.#t)===!1||!sx(this.#u)||this.#u===0)&&(this.#f=wl.setInterval(()=>{(this.options.refetchIntervalInBackground||HT.isFocused())&&this.#h()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#S(){this.#d!==void 0&&(wl.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(wl.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const n=this.#t,r=this.options,s=this.#r,o=this.#o,a=this.#s,c=t!==n?t.state:this.#n,{state:f}=t;let p={...f},g=!1,m;if(e._optimisticResults){const P=this.hasListeners(),k=!P&&OL(t,e),H=P&&NL(t,n,e,r);(k||H)&&(p={...p,...LF(f.data,t.options)}),e._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:S,status:E}=p;m=p.data;let C=!1;if(e.placeholderData!==void 0&&m===void 0&&E==="pending"){let P;s?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(P=s.data,C=!0):P=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,P!==void 0&&(E="success",m=ax(s?.data,P,e),g=!0)}if(e.select&&m!==void 0&&!C)if(s&&m===o?.data&&e.select===this.#c)m=this.#l;else try{this.#c=e.select,m=e.select(m),m=ax(s?.data,m,e),this.#l=m,this.#i=null}catch(P){this.#i=P}this.#i&&(y=this.#i,m=this.#l,S=Date.now(),E="error");const w=p.fetchStatus==="fetching",x=E==="pending",T=E==="error",R=x&&w,M=m!==void 0,I={status:E,fetchStatus:p.fetchStatus,isPending:x,isSuccess:E==="success",isError:T,isInitialLoading:R,isLoading:R,data:m,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:T&&!M,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&M,isStale:WT(t,e),refetch:this.refetch,promise:this.#a,isEnabled:os(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=I.data!==void 0,k=I.status==="error"&&!P,H=W=>{k?W.reject(I.error):P&&W.resolve(I.data)},F=()=>{const W=this.#a=I.promise=lx();H(W)},B=this.#a;switch(B.status){case"pending":t.queryHash===n.queryHash&&H(B);break;case"fulfilled":(k||I.data!==B.value)&&F();break;case"rejected":(!k||I.error!==B.reason)&&F();break}}return I}updateResult(){const t=this.#r,e=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#s=this.options,this.#o.data!==void 0&&(this.#p=this.#t),ox(e,t))return;this.#r=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#g.size)return!0;const o=new Set(s??this.#g);return this.options.throwOnError&&o.add("error"),Object.keys(this.#r).some(a=>{const u=a;return this.#r[u]!==t[u]&&o.has(u)})};this.#w({listeners:n()})}#C(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#w(t){er.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Qde(t,e){return os(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&os(e.retryOnMount,t)===!1)}function OL(t,e){return Qde(t,e)||t.state.data!==void 0&&dx(t,e,e.refetchOnMount)}function dx(t,e,n){if(os(e.enabled,t)!==!1&&Oa(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&WT(t,e)}return!1}function NL(t,e,n,r){return(t!==e||os(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&WT(t,n)}function WT(t,e){return os(e.enabled,t)!==!1&&t.isStaleByTime(Oa(e.staleTime,t))}function Jde(t,e){return!ox(t.getCurrentResult(),e)}var efe=class extends kF{#e;#t;#n;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||tfe(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#o({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=PF({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,a)=>{this.#o({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#o({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",s=!this.#r.canStart();try{if(r)e();else{this.#o({type:"pending",variables:t,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const a=await this.options.onMutate?.(t,n);a!==this.state.context&&this.#o({type:"pending",context:a,variables:t,isPaused:s})}const o=await this.#r.start();return await this.#n.config.onSuccess?.(o,t,this.state.context,this,n),await this.options.onSuccess?.(o,t,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,t,this.state.context,n),this.#o({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,t,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(o,t,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,o,t,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#o({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#o(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),er.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function tfe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var UF=class extends sp{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,n){const r=new efe({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){this.#e.add(t);const e=em(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=em(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=em(t);if(typeof e=="string"){const r=this.#t.get(e)?.find(s=>s.state.status==="pending");return!r||r===t}else return!0}runNext(t){const e=em(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){er.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>xL(e,n))}findAll(t={}){return this.getAll().filter(e=>xL(t,e))}notify(t){er.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return er.batch(()=>Promise.all(t.map(e=>e.continue().catch(Lr))))}};function em(t){return t.options.scope?.id}var FF=class extends sp{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??$T(r,e);let o=this.get(s);return o||(o=new Zde({client:t,queryKey:r,queryHash:s,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){er.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>_L(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>_L(t,n)):e}notify(t){er.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){er.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){er.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nfe=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new FF,this.#t=t.mutationCache||new UF,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=HT.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Av.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Oa(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,a=zde(e,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return er.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;er.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return er.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=er.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Lr).catch(Lr)}invalidateQueries(t,e={}){return er.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=er.batch(()=>this.#e.findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Lr)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Lr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(Oa(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Lr).catch(Lr)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Lr).catch(Lr)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Av.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#r.set(Ch(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{wh(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(Ch(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{wh(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=$T(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===qT&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},zF=A.createContext(void 0),BF=t=>{const e=A.useContext(zF);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},rfe=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),D.jsx(zF.Provider,{value:t,children:e})),jF=A.createContext(!1),sfe=()=>A.useContext(jF);jF.Provider;function ofe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var ife=A.createContext(ofe()),afe=()=>A.useContext(ife),lfe=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?NF(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},ufe=t=>{A.useEffect(()=>{t.clearReset()},[t])},cfe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||NF(n,[t.error,r])),dfe=t=>{if(t.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ffe=(t,e)=>t.isLoading&&t.isFetching&&!e,hfe=(t,e)=>t?.suspense&&e.isPending,ML=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function pfe(t,e,n){const r=sfe(),s=afe(),o=BF(),a=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const u=o.getQueryCache().get(a.queryHash),c=t.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,dfe(a),lfe(a,s,u),ufe(s);const f=!o.getQueryCache().get(a.queryHash),[p]=A.useState(()=>new e(o,a)),g=p.getOptimisticResult(a),m=!r&&c;if(A.useSyncExternalStore(A.useCallback(y=>{const S=m?p.subscribe(er.batchCalls(y)):Lr;return p.updateResult(),S},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),A.useEffect(()=>{p.setOptions(a)},[a,p]),hfe(a,g))throw ML(a,p,s);if(cfe({result:g,errorResetBoundary:s,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw g.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(a,g),a.experimental_prefetchInRender&&!_h.isServer()&&ffe(g,r)&&(f?ML(a,p,s):u?.promise)?.catch(Lr).finally(()=>{p.updateResult()}),a.notifyOnChangeProps?g:p.trackResult(g)}function gfe(t,e){return pfe(t,Xde)}const mfe="modulepreload",vfe=function(t){return"/"+t},PL={},qn=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");s=c(n.map(f=>{if(f=vfe(f),f in PL)return;PL[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const m=document.createElement("link");if(m.rel=p?"stylesheet":mfe,p||(m.as="script"),m.crossOrigin="",m.href=f,u&&m.setAttribute("nonce",u),document.head.appendChild(m),p)return new Promise((y,S)=>{m.addEventListener("load",y),m.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return s.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return e().catch(o)})};var kL=A.use,Sc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Mw(t){const e=A.useRef({value:t,prev:null}),n=e.current.value;return t!==n&&(e.current={value:t,prev:n}),e.current.prev}function yfe(t,e,n={},r={}){A.useEffect(()=>{if(!t.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([o])=>{e(o)},n);return s.observe(t.current),()=>{s.disconnect()}},[e,n,r.disabled,t])}function bfe(t){const e=A.useRef(null);return A.useImperativeHandle(t,()=>e.current,[]),e}const HF=!1;function xh(t){return t[t.length-1]}function Sfe(t){return typeof t=="function"}function _l(t,e){return Sfe(t)?t(e):t}const $F=Object.prototype.hasOwnProperty,DL=Object.prototype.propertyIsEnumerable;function qF(t){for(const e in t)if($F.call(t,e))return!0;return!1}const Efe=()=>Object.create(null),yl=(t,e)=>xl(t,e,Efe);function xl(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=FL(t)&&FL(s);if(!o&&!(Tv(t)&&Tv(s)))return s;const a=o?t:LL(t);if(!a)return s;const u=o?s:LL(s);if(!u)return s;const c=a.length,f=u.length,p=o?new Array(f):n();let g=0;for(let m=0;m<f;m++){const y=o?m:u[m],S=t[y],E=s[y];if(S===E){p[y]=S,(o?m<c:$F.call(t,y))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){p[y]=E;continue}const C=xl(S,E,n,r+1);p[y]=C,C===S&&g++}return c===f&&g===c?t:p}function LL(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!DL.call(t,s))return!1;const n=Object.getOwnPropertySymbols(t);if(n.length===0)return e;const r=e;for(const s of n){if(!DL.call(t,s))return!1;r.push(s)}return r}function Tv(t){if(!UL(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!UL(n)||!n.hasOwnProperty("isPrototypeOf"))}function UL(t){return Object.prototype.toString.call(t)==="[object Object]"}function FL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Nl(t,e,n){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,s=t.length;r<s;r++)if(!Nl(t[r],e[r],n))return!1;return!0}if(Tv(t)&&Tv(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Nl(t[a],e[a],n))return!1;return!0}let s=0;if(!r)s=Object.keys(t).length;else for(const a in t)t[a]!==void 0&&s++;let o=0;for(const a in e)if((!r||e[a]!==void 0)&&(o++,o>s||!Nl(t[a],e[a],n)))return!1;return s===o}return!1}function Uc(t){let e,n;const r=new Promise((s,o)=>{e=s,n=o});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,e(s),t?.(s)},r.reject=s=>{r.status="rejected",n(s)},r}function Cfe(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function Ah(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const wfe=/[\x00-\x1f\x7f"<>`{}]/g;function _fe(t){return t.replace(wfe,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function zL(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return _fe(e)}const xfe=["http:","https:","mailto:","tel:"];function Rv(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function Rf(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let n=0,r="",s;for(;(s=e.exec(t))!==null;)r+=zL(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+zL(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function Afe(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function Tfe(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function pi(){throw new Error("Invariant failed")}function Th(t){const e=new Map;let n,r;const s=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const a=e.get(o);if(a)return s(a),a.value},set(o,a){if(e.size>=t&&n){const c=n;e.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const u=e.get(o);if(u)u.value=a,s(u);else{const c={key:o,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),e.set(o,c)}},clear(){e.clear(),n=void 0,r=void 0}}}const Ta=4,WF=5;function Rfe(t){const e=t.indexOf("{");if(e===-1)return null;const n=t.indexOf("}",e);return n===-1||e+1>=t.length?null:[e,n]}function GF(t,e,n=new Uint16Array(6)){const r=t.indexOf("/",e),s=r===-1?t.length:r,o=t.substring(e,s);if(!o||!o.includes("$"))return n[0]=0,n[1]=e,n[2]=e,n[3]=s,n[4]=s,n[5]=s,n;if(o==="$"){const u=t.length;return n[0]=2,n[1]=e,n[2]=e,n[3]=u,n[4]=u,n[5]=u,n}if(o.charCodeAt(0)===36)return n[0]=1,n[1]=e,n[2]=e+1,n[3]=s,n[4]=s,n[5]=s,n;const a=Rfe(o);if(a){const[u,c]=a,f=o.charCodeAt(u+1);if(f===45){if(u+2<o.length&&o.charCodeAt(u+2)===36){const p=u+3,g=c;if(p<g)return n[0]=3,n[1]=e+u,n[2]=e+p,n[3]=e+g,n[4]=e+c+1,n[5]=s,n}}else if(f===36){const p=u+1,g=u+2;return g===c?(n[0]=2,n[1]=e+u,n[2]=e+p,n[3]=e+g,n[4]=e+c+1,n[5]=t.length,n):(n[0]=1,n[1]=e+u,n[2]=e+g,n[3]=e+c,n[4]=e+c+1,n[5]=s,n)}}return n[0]=0,n[1]=e,n[2]=e,n[3]=s,n[4]=s,n[5]=s,n}function sb(t,e,n,r,s,o,a){a?.(n);let u=r;{const c=n.fullPath??n.from,f=c.length,p=n.options?.caseSensitive??t,g=n.options?.params?.parse??n.options?.parseParams;for(;u<f;){const y=GF(c,u,e);let S;const E=u,C=y[5];switch(u=C+1,o++,y[0]){case 0:{const w=c.substring(y[2],y[3]);if(p){const x=s.static?.get(w);if(x)S=x;else{s.static??=new Map;const T=Al(n.fullPath??n.from);T.parent=s,T.depth=o,S=T,s.static.set(w,T)}}else{const x=w.toLowerCase(),T=s.staticInsensitive?.get(x);if(T)S=T;else{s.staticInsensitive??=new Map;const R=Al(n.fullPath??n.from);R.parent=s,R.depth=o,S=R,s.staticInsensitive.set(x,R)}}break}case 1:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=p&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,O=!g&&s.dynamic?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(O)S=O;else{const I=kw(1,n.fullPath??n.from,T,R,M);S=I,I.depth=o,I.parent=s,s.dynamic??=[],s.dynamic.push(I)}break}case 3:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=p&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,O=!g&&s.optional?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(O)S=O;else{const I=kw(3,n.fullPath??n.from,T,R,M);S=I,I.parent=s,I.depth=o,s.optional??=[],s.optional.push(I)}break}case 2:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=p&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,O=kw(2,n.fullPath??n.from,T,R,M);S=O,O.parent=s,O.depth=o,s.wildcard??=[],s.wildcard.push(O)}}s=S}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const y=Al(n.fullPath??n.from);y.kind=WF,y.parent=s,o++,y.depth=o,s.pathless??=[],s.pathless.push(y),s=y}const m=(n.path||!n.children)&&!n.isRoot;if(m&&c.endsWith("/")){const y=Al(n.fullPath??n.from);y.kind=Ta,y.parent=s,o++,y.depth=o,s.index=y,s=y}s.parse=g??null,s.priority=n.options?.params?.priority??0,m&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)sb(t,e,c,u,s,o,a)}function Pw(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function ya(t){if(t.pathless)for(const e of t.pathless)ya(e);if(t.static)for(const e of t.static.values())ya(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())ya(e);if(t.dynamic?.length){t.dynamic.sort(Pw);for(const e of t.dynamic)ya(e)}if(t.optional?.length){t.optional.sort(Pw);for(const e of t.optional)ya(e)}if(t.wildcard?.length){t.wildcard.sort(Pw);for(const e of t.wildcard)ya(e)}}function Al(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}function kw(t,e,n,r,s){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:s}}function Ife(t,e){const n=Al("/"),r=new Uint16Array(6);for(const s of t)sb(!1,r,s,1,n,0);ya(n),e.masksTree=n,e.flatCache=Th(1e3)}function Ofe(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=GT(t,e.masksTree);return e.flatCache.set(t,r),r}function Nfe(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Al("/"),sb(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),GT(r,a,n)}function Mfe(t,e,n=!1){const r=n?t:`nofuzz\0${t}`,s=e.matchCache.get(r);if(s!==void 0)return s;t||="/";let o;try{o=GT(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=KF(o.route)),e.matchCache.set(r,o),o}function Pfe(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function kfe(t,e=!1,n){const r=Al(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return sb(e,s,t,1,r,0,c=>{if(n?.(c,u),c.id in o&&pi(),o[c.id]=c,u!==0&&c.path){const f=Pfe(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),ya(r),{processedTree:{segmentTree:r,singleCache:Th(1e3),matchCache:Th(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function GT(t,e,n=!1){const r=t.split("/"),s=Lfe(t,r,e,n);if(!s)return null;const[o]=VF(t,r,s);return{route:s.node.route,rawParams:o}}function VF(t,e,n){const r=Dfe(n.node);let s=null;const o=Object.create(null);let a=n.extract?.part??0,u=n.extract?.node??0,c=n.extract?.path??0,f=n.extract?.segment??0;for(;u<r.length;a++,u++,c++,f++){const p=r[u];if(p.kind===Ta)break;if(p.kind===WF){f--,a--,c--;continue}const g=e[a],m=c;if(g&&(c+=g.length),p.kind===1){s??=n.node.fullPath.split("/");const y=s[f],S=p.prefix?.length??0;if(y.charCodeAt(S)===123){const E=p.suffix?.length??0,C=y.substring(S+2,y.length-E-1),w=g.substring(S,g.length-E);o[C]=decodeURIComponent(w)}else{const E=y.substring(1);o[E]=decodeURIComponent(g)}}else if(p.kind===3){if(n.skipped&1<<u){a--,c=m-1;continue}s??=n.node.fullPath.split("/");const y=s[f],S=p.prefix?.length??0,E=p.suffix?.length??0,C=y.substring(S+3,y.length-E-1),w=p.suffix||p.prefix?g.substring(S,g.length-E):g;w&&(o[C]=decodeURIComponent(w))}else if(p.kind===2){const y=p,S=t.substring(m+(y.prefix?.length??0),t.length-(y.suffix?.length??0)),E=decodeURIComponent(S);o["*"]=E,o._splat=E;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:u,path:c,segment:f}]}function KF(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function Dfe(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function Lfe(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const s=!xh(e),o=s&&t!=="/",a=e.length-(s?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let c=null,f=null;for(;u.length;){const p=u.pop(),{node:g,index:m,skipped:y,depth:S,statics:E,dynamics:C,optionals:w}=p;let{extract:x,rawParams:T}=p;if(g.kind===2&&g.route&&!nm(f,p))continue;if(g.parse){if(!BL(t,e,p))continue;T=p.rawParams,x=p.extract}r&&g.route&&g.kind!==Ta&&nm(c,p)&&(c=p);const R=m===a;if(R&&(g.route&&(!o||g.kind===Ta||g.kind===2)&&nm(f,p)&&(f=p),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const M=R?void 0:e[m];let O;if(R&&g.index){const I={node:g.index,index:m,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T};let P=!0;if(g.index.parse&&(BL(t,e,I)||(P=!1)),P){if(!C&&!w&&!y&&Ufe(E,a))return I;nm(f,I)&&(f=I)}}if(g.wildcard)for(let I=g.wildcard.length-1;I>=0;I--){const P=g.wildcard[I],{prefix:k,suffix:H}=P;if(!(k&&(R||!(P.caseSensitive?M:O??=M.toLowerCase()).startsWith(k)))){if(H){if(R)continue;const F=e.slice(m).join("/").slice(-H.length);if((P.caseSensitive?F:F.toLowerCase())!==H)continue}u.push({node:P,index:a,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}}if(g.optional){const I=y|1<<S,P=S+1;for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k];u.push({node:H,index:m,skipped:I,depth:P,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}if(!R)for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k],{prefix:F,suffix:B}=H;if(F||B){const W=H.caseSensitive?M:O??=M.toLowerCase();if(F&&!W.startsWith(F)||B&&!W.endsWith(B))continue}u.push({node:H,index:m+1,skipped:y,depth:P,statics:E,dynamics:C,optionals:w+tm(a,m),extract:x,rawParams:T})}}if(!R&&g.dynamic&&M)for(let I=g.dynamic.length-1;I>=0;I--){const P=g.dynamic[I],{prefix:k,suffix:H}=P;if(k||H){const F=P.caseSensitive?M:O??=M.toLowerCase();if(k&&!F.startsWith(k)||H&&!F.endsWith(H))continue}u.push({node:P,index:m+1,skipped:y,depth:S+1,statics:E,dynamics:C+tm(a,m),optionals:w,extract:x,rawParams:T})}if(!R&&g.staticInsensitive){const I=g.staticInsensitive.get(O??=M.toLowerCase());I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+tm(a,m),dynamics:C,optionals:w,extract:x,rawParams:T})}if(!R&&g.static){const I=g.static.get(M);I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+tm(a,m),dynamics:C,optionals:w,extract:x,rawParams:T})}if(g.pathless){const I=S+1;for(let P=g.pathless.length-1;P>=0;P--){const k=g.pathless[P];u.push({node:k,index:m,skipped:y,depth:I,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}}}if(f)return f;if(r&&c){let p=c.index;for(let m=0;m<c.index;m++)p+=e[m].length;const g=p===t.length?"/":t.slice(p);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(g),c}return null}function tm(t,e){return 2**(t-e-1)}function Ufe(t,e){return t===2**(e-1)-1}function BL(t,e,n){let r,s;try{[r,s]=VF(t,e,n)}catch{return null}if(n.rawParams=r,n.extract=s,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function nm(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===Ta)>(t.node.kind===Ta)||e.node.kind===Ta==(t.node.kind===Ta)&&e.depth>t.depth))):!0}function ev(t){return VT(t.filter(e=>e!==void 0).join("/"))}function VT(t){return t.replace(/\/{2,}/g,"/")}function YF(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function fi(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function ZF(t){return fi(YF(t))}function Iv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function Ffe(t,e,n){return Iv(t,n)===Iv(e,n)}function zfe({base:t,to:e,trailingSlash:n="never",cache:r}){const s=e.startsWith("/"),o=!s&&e===".";let a;if(r){a=s?e:o?t:t+"\0"+e;const f=r.get(a);if(f)return f}let u;if(o)u=t.split("/");else if(s)u=e.split("/");else{for(u=t.split("/");u.length>1&&xh(u)==="";)u.pop();const f=e.split("/");for(let p=0,g=f.length;p<g;p++){const m=f[p];m===""?p?p===g-1&&u.push(m):u=[m]:m===".."?u.pop():m==="."||u.push(m)}}u.length>1&&(xh(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=VT(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function Bfe(t){const e=new Map(t.map(s=>[encodeURIComponent(s),s])),n=Array.from(e.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return s=>s.replace(r,o=>e.get(o)??o)}function Dw(t,e,n){const r=e[t];return typeof r!="string"?r:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>HL(s,n)).join("/"):HL(r,n)}function jL({path:t,params:e,decoder:n,...r}){let s=!1;const o=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:s};if(!t.includes("$"))return{interpolatedPath:t,usedParams:o,isMissingParams:s};const a=t.length;let u=0,c,f="";for(;u<a;){const p=u;c=GF(t,p,c);const g=c[5];if(u=g+1,p===g)continue;const m=c[0];if(m===0){f+="/"+t.substring(p,g);continue}if(m===2){const y=e._splat;o._splat=y,o["*"]=y;const S=t.substring(p,c[1]),E=t.substring(c[4],g);if(!y){s=!0,(S||E)&&(f+="/"+S+E);continue}const C=Dw("_splat",e,n);f+="/"+S+C+E;continue}if(m===1){const y=t.substring(c[2],c[3]);!s&&!(y in e)&&(s=!0),o[y]=e[y];const S=t.substring(p,c[1]),E=t.substring(c[4],g),C=Dw(y,e,n)??"undefined";f+="/"+S+C+E;continue}if(m===3){const y=t.substring(c[2],c[3]),S=e[y];if(S==null)continue;o[y]=S;const E=t.substring(p,c[1]),C=t.substring(c[4],g),w=Dw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function HL(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function cr(t){return t?.isNotFound===!0}function jfe(){try{return sessionStorage}catch{return}}const Hfe="tsr-scroll-restoration-v1_3",XF=jfe();function $fe(){try{return JSON.parse(XF?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function qfe(){try{XF?.setItem(Hfe,JSON.stringify(fc))}catch{}}const fc=$fe(),$L="data-scroll-restoration-id",Wfe=t=>t.state.__TSR_key||t.href;function Gfe(t){const e=t.getAttribute($L);if(e)return`[${$L}="${e}"]`;let n="",r=t,s;for(;s=r.parentNode;){let o=1,a=r;for(;a=a.previousElementSibling;)o++;const u=`${r.localName}:nth-child(${o})`;n=n?`${u} > ${n}`:u,r=s}return n}let rm=!1;const tv="window";function fx(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function qL(t){const e=new Set;for(const n of t){if(n===tv)continue;const r=fx(n);r&&e.add(r)}return e}function Vfe(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||Wfe,o=new Set,a=u=>{const c=fc[u]||={};for(const f of o)f===document?c[tv]={scrollX,scrollY}:f.isConnected&&(c[Gfe(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,rm=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{rm||o.add(u.target)},!0),t.subscribe("onBeforeLoad",u=>{u.fromLocation&&a(s(u.fromLocation)),o.clear()}),addEventListener("pagehide",()=>{a(s(t.stores.resolvedLocation.get()??t.stores.location.get())),qfe()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",u=>{const c=t.options.scrollRestorationBehavior,f=t.options.scrollToTopSelectors,p=r.next,g=r.hash;let m;if(o.clear(),r.next=!0,r.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const y=s(u.toLocation),S=u.fromLocation&&s(u.fromLocation);if(r.restoring&&S&&S!==y){const E=fc[S];if(E){let C=fc[y];for(const w in E){if(w===tv){if(p)continue}else{const x=fx(w);if(!x||p&&f&&(m??=qL(f),m.has(x)))continue}C||(C=fc[y]={}),C[w]??=E[w]}}}rm=!0;try{const E=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(p){!E&&f&&(m??=qL(f));const x=E&&C&&g,T=r.restoring?fc[y]:void 0;if(T)for(const R in T){const{scrollX:M,scrollY:O}=T[R];if(R===tv){if(x)continue;scrollTo({top:O,left:M,behavior:c}),w=!0}else{const I=fx(R);I&&(I.scrollLeft=M,I.scrollTop=O,m?.delete(I))}}if(!E){const R={top:0,left:0,behavior:c};if(w||scrollTo(R),m)for(const M of m)M.scrollTo(R)}}!w&&E&&C&&document.getElementById(E)?.scrollIntoView(C)}finally{rm=!1}}))}function Kfe(t,e=String){const n=new URLSearchParams;for(const r in t){const s=t[r];s!==void 0&&n.set(r,e(s))}return n.toString()}function Lw(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function Yfe(t){const e=new URLSearchParams(t),n=Object.create(null);for(const[r,s]of e.entries()){const o=n[r];o==null?n[r]=Lw(s):Array.isArray(o)?o.push(Lw(s)):n[r]=[o,Lw(s)]}return n}const Zfe=Qfe(JSON.parse),Xfe=Jfe(JSON.stringify,JSON.parse);function Qfe(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=Yfe(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function Jfe(t,e){const n=typeof e=="function";function r(s){if(typeof s=="object"&&s!==null)try{return t(s)}catch{}else if(n&&typeof s=="string")try{return e(s),t(s)}catch{}return s}return s=>{const o=Kfe(s,r);return o?`?${o}`:""}}const Ml="__root__";function QF(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const n=new Response(null,{status:t.statusCode,headers:e});if(n.options=t,t.throw)throw n;return n}function Fr(t){return t instanceof Response&&!!t.options}function ehe(t){return{input:({url:e})=>{for(const n of t)e=hx(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=JF(t[n],e);return e}}}function the(t){const e=ZF(t.basepath),n=`/${e}`,r=t.caseSensitive?n:n.toLowerCase(),s=`${r}/`;return{input:({url:o})=>{const a=t.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===r?o.pathname="/":a.startsWith(s)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=ev(["/",e,o.pathname]),o)}}function hx(t,e){const n=t?.input?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function JF(t,e){const n=t?.output?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function nhe(t,e){const{createMutableStore:n,createReadonlyStore:r,batch:s,init:o}=e,a=new Map,u=new Map,c=new Map,f=n(t.status),p=n(t.loadedAt),g=n(t.isLoading),m=n(t.isTransitioning),y=n(t.location),S=n(t.resolvedLocation),E=n(t.statusCode),C=n(t.redirect),w=n([]),x=n([]),T=n([]),R=r(()=>Uw(a,w.get())),M=r(()=>Uw(u,x.get())),O=r(()=>Uw(c,T.get())),I=r(()=>w.get()[0]),P=r(()=>w.get().some(ee=>a.get(ee)?.get().status==="pending")),k=r(()=>({locationHref:y.get().href,resolvedLocationHref:S.get()?.href,status:f.get()})),H=r(()=>({status:f.get(),loadedAt:p.get(),isLoading:g.get(),isTransitioning:m.get(),matches:R.get(),location:y.get(),resolvedLocation:S.get(),statusCode:E.get(),redirect:C.get()})),F=Th(64);function B(ee){let fe=F.get(ee);return fe||(fe=r(()=>{const de=w.get();for(const Ae of de){const L=a.get(Ae);if(L&&L.routeId===ee)return L.get()}}),F.set(ee,fe)),fe}const W={status:f,loadedAt:p,isLoading:g,isTransitioning:m,location:y,resolvedLocation:S,statusCode:E,redirect:C,matchesId:w,pendingIds:x,cachedIds:T,matches:R,pendingMatches:M,cachedMatches:O,firstId:I,hasPending:P,matchRouteDeps:k,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:H,getRouteMatchStore:B,setMatches:Y,setPending:ne,setCached:$};Y(t.matches),o?.(W);function Y(ee){Fw(ee,a,w,n,s)}function ne(ee){Fw(ee,u,x,n,s)}function $(ee){Fw(ee,c,T,n,s)}return W}function Uw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function Fw(t,e,n,r,s){const o=t.map(u=>u.id),a=new Set(o);s(()=>{for(const u of e.keys())a.has(u)||e.delete(u);for(const u of t){const c=e.get(u.id);if(!c){const f=r(u);f.routeId=u.routeId,e.set(u.id,f);continue}c.routeId=u.routeId,c.get()!==u&&c.set(u)}Tfe(n.get(),o)||n.set(o)})}const px=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},rhe=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),ob=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Pl=(t,e,n=!0)=>{const r={...t.router.options.context??{}},s=n?e:e-1;for(let o=0;o<=s;o++){const a=t.matches[o];if(!a)continue;const u=t.router.getMatch(a.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},WL=(t,e)=>{if(!t.matches.length)return;const n=e.routeId,r=t.matches.findIndex(a=>a.routeId===t.router.routeTree.id),s=r>=0?r:0;let o=n?t.matches.findIndex(a=>a.routeId===n):t.firstBadMatchIndex??t.matches.length-1;o<0&&(o=s);for(let a=o;a>=0;a--){const u=t.matches[a];if(t.router.looseRoutesById[u.routeId].options.notFoundComponent)return a}return n?o:s},Ra=(t,e,n)=>{if(!(!Fr(n)&&!cr(n)))throw Fr(n)&&n.redirectHandled&&!n.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=n,t.updateMatch(e.id,r=>({...r,status:Fr(n)?"redirected":cr(n)?"notFound":r.status==="pending"?"success":r.status,context:Pl(t,e.index),isFetching:!1,error:n})),cr(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),Fr(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},e7=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},GL=(t,e,n)=>{const r=Pl(t,n);t.updateMatch(e,s=>({...s,context:r}))},If=(t,e,n)=>{const{id:r,routeId:s}=t.matches[e],o=t.router.looseRoutesById[s];if(n instanceof Promise)throw n;t.firstBadMatchIndex??=e,Ra(t,t.router.getMatch(r),n);try{o.options.onError?.(n)}catch(a){n=a,Ra(t,t.router.getMatch(r),n)}t.updateMatch(r,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!Fr(n)&&!cr(n)&&(t.serialError??=n)},t7=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!ob(t,e)&&(n.options.loader||n.options.beforeLoad||r7(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{px(t)},s);r._nonReactive.pendingTimeout=o}},she=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;t7(t,e,n,r);const s=()=>{const o=t.router.getMatch(e);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Ra(t,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},ohe=(t,e,n,r)=>{const s=t.router.getMatch(e);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Uc(()=>{o?.resolve(),o=void 0});const{paramsError:a,searchError:u}=s;a&&If(t,n,a),u&&If(t,n,u),t7(t,e,r,s);const c=new AbortController;let f=!1;const p=()=>{f||(f=!0,t.updateMatch(e,R=>({...R,isFetching:"beforeLoad",fetchCount:R.fetchCount+1,abortController:c})))},g=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,R=>({...R,isFetching:!1}))};if(!r.options.beforeLoad){t.router.batch(()=>{p(),g()});return}s._nonReactive.beforeLoadPromise=Uc();const m={...Pl(t,n,!1),...s.__routeContext},{search:y,params:S,cause:E}=s,C=ob(t,e),w={search:y,abortController:c,params:S,preload:C,context:m,location:t.location,navigate:R=>t.router.navigate({...R,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:C?"preload":E,matches:t.matches,routeId:r.id,...t.router.options.additionalContext},x=R=>{if(R===void 0){t.router.batch(()=>{p(),g()});return}(Fr(R)||cr(R))&&(p(),If(t,n,R)),t.router.batch(()=>{p(),t.updateMatch(e,M=>({...M,__beforeLoadContext:R})),g()})};let T;try{if(T=r.options.beforeLoad(w),Ah(T))return p(),T.catch(R=>{If(t,n,R)}).then(x)}catch(R){p(),If(t,n,R)}x(T)},ihe=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>ohe(t,n,e,s),u=()=>{if(e7(t,n))return;const c=she(t,n,s);return Ah(c)?c.then(a):a()};return o()},ahe=(t,e,n)=>{const r=t.router.getMatch(e);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:t.router.options.ssr,matches:t.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([o,a,u])=>({meta:o?.meta,links:o?.links,headScripts:o?.scripts,headers:u,scripts:a,styles:o?.styles}))},n7=(t,e,n,r,s)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),p=Pl(t,r),g=ob(t,n);return{params:a,deps:u,preload:!!g,parentMatchPromise:o,abortController:c,context:p,location:t.location,navigate:m=>t.router.navigate({...m,_fromLocation:t.location}),cause:g?"preload":f,route:s,...t.router.options.additionalContext}},VL=async(t,e,n,r,s)=>{try{const o=t.router.getMatch(n);try{(!(HF??t.router.isServer)||o.ssr===!0)&&Rh(s);const a=s.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(n7(t,e,n,r,s)),f=!!u&&Ah(c);if((f||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||o._nonReactive.minPendingPromise)&&t.updateMatch(n,g=>({...g,isFetching:"loader"})),u){const g=f?await c:c;Ra(t,t.router.getMatch(n),g),g!==void 0&&t.updateMatch(n,m=>({...m,loaderData:g}))}s._lazyPromise&&await s._lazyPromise;const p=o._nonReactive.minPendingPromise;p&&await p,s._componentsPromise&&await s._componentsPromise,t.updateMatch(n,g=>({...g,error:void 0,context:Pl(t,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let u=a;if(u?.name==="AbortError"){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}t.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:Pl(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,cr(a)&&await s.options.notFoundComponent?.preload?.(),Ra(t,t.router.getMatch(n),a);try{s.options.onError?.(a)}catch(f){u=f,Ra(t,t.router.getMatch(n),f)}!Fr(u)&&!cr(u)&&await Rh(s,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Pl(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Ra(t,a,o)}},lhe=async(t,e,n)=>{async function r(y,S,E,C,w){const x=Date.now()-S.updatedAt,T=y?w.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??t.router.options.defaultStaleTime??0,R=w.options.shouldReload,M=typeof R=="function"?R(n7(t,e,s,n,w)):R,{status:O,invalid:I}=C,P=x>=T&&(!!t.forceStaleReload||C.cause==="enter"||E!==void 0&&E!==C.id);a=O==="success"&&(I||(M??P)),y&&w.options.preload===!1||(a&&!t.sync&&p?(u=!0,(async()=>{try{await VL(t,e,s,n,w);const k=t.router.getMatch(s);k._nonReactive.loaderPromise?.resolve(),k._nonReactive.loadPromise?.resolve(),k._nonReactive.loaderPromise=void 0,k._nonReactive.loadPromise=void 0}catch(k){Fr(k)&&await t.router.navigate(k.options)}})()):O!=="success"||a?await VL(t,e,s,n,w):GL(t,s,n))}const{id:s,routeId:o}=t.matches[n];let a=!1,u=!1;const c=t.router.looseRoutesById[o],f=c.options.loader,p=((typeof f=="function"?void 0:f?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(e7(t,s)){if(!t.router.getMatch(s))return t.matches[n];GL(t,s,n)}else{const y=t.router.getMatch(s),S=t.router.stores.matchesId.get()[n],E=(S&&t.router.stores.matchStores.get(S)||null)?.routeId===o?S:t.router.stores.matches.get().find(w=>w.routeId===o)?.id,C=ob(t,s);if(y._nonReactive.loaderPromise){if(y.status==="success"&&!t.sync&&!y.preload&&p)return y;await y._nonReactive.loaderPromise;const w=t.router.getMatch(s),x=w._nonReactive.error||w.error;x&&Ra(t,w,x),w.status==="pending"&&await r(C,y,E,w,c)}else{const w=C&&!t.router.stores.matchStores.has(s),x=t.router.getMatch(s);x._nonReactive.loaderPromise=Uc(),w!==x.preload&&t.updateMatch(s,T=>({...T,preload:w})),await r(C,y,E,x,c)}}const g=t.router.getMatch(s);u||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,u||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const m=u?g.isFetching:!1;return m!==g.isFetching||g.invalid!==!1?(t.updateMatch(s,y=>({...y,isFetching:m,invalid:!1})),t.router.getMatch(s)):g};async function KL(t){const e=t,n=[];rhe(e.router)&&px(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=ihe(e,m);Ah(y)&&await y}catch(y){if(Fr(y))throw y;if(cr(y))r=y;else if(!e.preload)throw y;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const s=e.firstBadMatchIndex??e.matches.length,o=r&&!e.preload?WL(e,r):void 0,a=r&&e.preload?0:o!==void 0?Math.min(o+1,s):s;let u,c;for(let m=0;m<a;m++)n.push(lhe(e,n,m));try{await Promise.all(n)}catch{const m=await Promise.allSettled(n);for(const y of m){if(y.status!=="rejected")continue;const S=y.reason;if(Fr(S))throw S;cr(S)?u??=S:c??=S}if(c!==void 0)throw c}const f=u??(r&&!e.preload?r:void 0);let p=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!f&&r&&e.preload)return e.matches;if(f){const m=WL(e,f);m===void 0&&pi();const y=e.matches[m],S=e.router.looseRoutesById[y.routeId],E=e.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&E&&(S.options.notFoundComponent=E),f.routeId=y.routeId;const C=y.routeId===e.router.routeTree.id;e.updateMatch(y.id,w=>({...w,...C?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),p=m,await Rh(S,["notFoundComponent"])}else if(!e.preload){const m=e.matches[0];m.globalNotFound||e.router.getMatch(m.id)?.globalNotFound&&e.updateMatch(m.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const m=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await Rh(m,["errorComponent"])}for(let m=0;m<=p;m++){const{id:y,routeId:S}=e.matches[m],E=e.router.looseRoutesById[S];try{const C=ahe(e,y,E);if(C){const w=await C;e.updateMatch(y,x=>({...x,...w}))}}catch(C){console.error(`Error executing head for route ${S}:`,C)}}const g=px(e);if(Ah(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function YL(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Rh(t,e=nv){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(r=>{const{id:s,...o}=r.options;Object.assign(t.options,o),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const n=()=>t._componentsLoaded?void 0:e===nv?(()=>{if(t._componentsPromise===void 0){const r=YL(t,nv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():YL(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function r7(t){for(const e of nv)if(t.options[e]?.preload)return!0;return!1}const nv=["component","errorComponent","pendingComponent","notFoundComponent"];var Na="__TSR_index",ZL="popstate",XL="beforeunload";function uhe(t){let e=t.getLocation();const n=new Set,r=a=>{e=t.getLocation(),n.forEach(u=>u({location:e,action:a}))},s=a=>{t.notifyOnIndexChange??!0?r(a):e=t.getLocation()},o=async({task:a,navigateOpts:u,...c})=>{if(u?.ignoreBlocker??!1){a();return}const f=t.getBlockers?.()??[],p=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const g of f){const m=Ov(c.path,c.state);if(await g.blockerFn({currentLocation:e,nextLocation:m,action:c.type})){t.onBlocked?.();return}}a()};return{get location(){return e},get length(){return t.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,u,c)=>{const f=e.state[Na];u=QL(f+1,u),o({task:()=>{t.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=e.state[Na];u=QL(f,u),o({task:()=>{t.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{o({task:()=>{t.go(a),s({type:"GO",index:a})},navigateOpts:u,type:"GO"})},back:a=>{o({task:()=>{t.back(a?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{t.forward(a?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[Na]!==0,createHref:a=>t.createHref(a),block:a=>{if(!t.setBlockers)return()=>{};const u=t.getBlockers?.()??[];return t.setBlockers([...u,a]),()=>{const c=t.getBlockers?.()??[];t.setBlockers?.(c.filter(f=>f!==a))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r}}function QL(t,e){e||(e={});const n=KT();return{...e,key:n,__TSR_key:n,[Na]:t}}function che(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,r=e.history.replaceState;let s=[];const o=()=>s,a=P=>s=P,u=(P=>P),c=(()=>Ov(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const P=KT();e.history.replaceState({[Na]:0,key:P,__TSR_key:P},"")}let f=c(),p,g=!1,m=!1,y=!1,S=!1;const E=()=>f;let C,w;const x=()=>{C&&(I._ignoreSubscribers=!0,(C.isPush?e.history.pushState:e.history.replaceState)(C.state,"",C.href),I._ignoreSubscribers=!1,C=void 0,w=void 0,p=void 0)},T=(P,k,H)=>{const F=u(k);w||(p=f),f=Ov(k,H),C={href:F,state:H,isPush:C?.isPush||P==="push"},w||(w=Promise.resolve().then(()=>x()))},R=P=>{f=c(),I.notify({type:P})},M=async()=>{if(m){m=!1;return}const P=c(),k=P.state[Na]-f.state[Na],H=k===1,F=k===-1,B=!H&&!F||g;g=!1;const W=B?"GO":F?"BACK":"FORWARD",Y=B?{type:"GO",index:k}:{type:F?"BACK":"FORWARD"};if(y)y=!1;else{const ne=o();if(typeof document<"u"&&ne.length){for(const $ of ne)if(await $.blockerFn({currentLocation:f,nextLocation:P,action:W})){m=!0,e.history.go(1),I.notify(Y);return}}}f=c(),I.notify(Y)},O=P=>{if(S){S=!1;return}let k=!1;const H=o();if(typeof document<"u"&&H.length)for(const F of H){const B=F.enableBeforeUnload??!0;if(B===!0){k=!0;break}if(typeof B=="function"&&B()===!0){k=!0;break}}if(k)return P.preventDefault(),P.returnValue=""},I=uhe({getLocation:E,getLength:()=>e.history.length,pushState:(P,k)=>T("push",P,k),replaceState:(P,k)=>T("replace",P,k),back:P=>(P&&(y=!0),S=!0,e.history.back()),forward:P=>{P&&(y=!0),S=!0,e.history.forward()},go:P=>{g=!0,e.history.go(P)},createHref:P=>u(P),flush:x,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(XL,O,{capture:!0}),e.removeEventListener(ZL,M)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(XL,O,{capture:!0}),e.addEventListener(ZL,M),e.history.pushState=function(...P){const k=n.apply(e.history,P);return I._ignoreSubscribers||R("PUSH"),k},e.history.replaceState=function(...P){const k=r.apply(e.history,P);return I._ignoreSubscribers||R("REPLACE"),k},I}function dhe(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Ov(t,e){const n=dhe(t),r=n.indexOf("#"),s=n.indexOf("?"),o=KT();return{href:n,pathname:n.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:n.length),hash:r>-1?n.substring(r):"",search:s>-1?n.slice(s,r===-1?void 0:r):"",state:e||{[Na]:0,key:o,__TSR_key:o}}}function KT(){return(Math.random()+1).toString(36).substring(7)}function Ic(t,e){const n=e,r=t;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var fhe=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,s=this.basepath??r?.basepath??"/",o=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Bfe(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=che()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=Th(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=nhe(phe(this.latestLocation),p),Vfe(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||s!==c||a!==f){this.basepath=c;const p=[],g=ZF(c);g&&g!=="/"&&p.push(the({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:ehe(p),this.history&&this.updateLatestLocation(),u=!0}u&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=kfe(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&Ife(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({pathname:c,search:f,hash:p,href:g,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const w=this.options.parseSearch(f),x=this.options.stringifySearch(w);return{href:c+x+p,publicHref:c+x+p,pathname:Rf(c).path,external:!1,searchStr:x,search:yl(r?.search,w),hash:Rf(p.slice(1)).path,state:xl(r?.state,m)}}const y=new URL(g,this.origin),S=hx(this.rewrite,y),E=this.options.parseSearch(S.search),C=this.options.stringifySearch(E);return S.search=C,{href:S.href.replace(S.origin,""),publicHref:g,pathname:Rf(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:C,search:yl(r?.search,E),hash:Rf(S.hash.slice(1)).path,state:xl(r?.state,m)}},o=s(n),{__tempLocation:a,__tempKey:u}=o.state;if(a&&(!u||u===this.tempLocationKey)){const c=s(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>zfe({base:n,to:r.includes("//")?VT(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>ghe({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(o={})=>{const a=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??u.fullPath,f=o.to?`${o.to}`:void 0,p=u.search,g=Object.assign(Object.create(null),u.params),m=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(c,"."),y=f?this.resolvePathWithBase(m,f):m,S=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?g:Object.assign(g,_l(o.params,g)),E=this.routesByPath[fi(y)];let C;if(E)C=this.getRouteBranch(E);else if(y.includes("$"))C=[];else{const F=this.getMatchedRoutes(y);C=F.matchedRoutes,this.options.notFoundRoute&&(!F.foundRoute||F.foundRoute.path!=="/"&&F.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&qF(S))for(const F of C){const B=F.options.params?.stringify??F.options.stringifyParams;if(B)try{Object.assign(S,B(S))}catch{}}const w=n.leaveParams?y:Rf(jL({path:y,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=p;if(n._includeValidateSearch&&this.options.search?.strict){const F={};C.forEach(B=>{if(B.options.validateSearch)try{Object.assign(F,rv(B.options.validateSearch,{...F,...x}))}catch{}}),x=F}x=mhe({search:x,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),x=yl(p,x);const T=this.options.stringifySearch(x),R=o.hash===!0?a.hash:o.hash?_l(o.hash,a.hash):void 0,M=R?`#${R}`:"";let O=o.state===!0?a.state:o.state?_l(o.state,a.state):{};O=xl(a.state,O);const I=`${w}${T}${M}`;let P,k,H=!1;if(this.rewrite){const F=new URL(I,this.origin),B=JF(this.rewrite,F);P=F.href.replace(F.origin,""),B.origin!==this.origin?(k=B.href,H=!0):k=B.pathname+B.search+B.hash}else P=Afe(I),k=P;return{publicHref:k,href:P,pathname:w,search:x,searchStr:T,state:O,hash:R??"",external:H,unmaskOnReload:o.unmaskOnReload}},s=(o={},a)=>{const u=r(o);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const p=Ofe(u.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:g,params:m,...y}=p.route,S=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,_l(m,f));a={from:n.from,...y,params:S},c=r(a)}}}return c&&(u.maskedLocation=c),u};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...s})=>{let o;const a=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(g=>{s.state[g]=this.latestLocation.state[g]});const p=Nl(s.state,this.latestLocation.state);return f.forEach(g=>{delete s.state[g]}),p},u=fi(this.latestLocation.href)===fi(s.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Uc(()=>{c?.resolve(),c=void 0}),u&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:p,...g}=s;f&&(g={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=p??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,o=s.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:r})}return this._scroll.next=s.resetScroll??!0,this.history.subscribers.size||this.load(o?{action:{type:o}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:a,href:u,...c}={})=>{if(u){const g=this.history.location.state.__TSR_index,m=Ov(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=hx(this.rewrite,y).pathname,c.search=this.options.parseSearch(m.search),c.hash=m.hash.slice(1)}const f=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const p=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:o,...a})=>{let u=!1;if(s)try{new URL(`${s}`),u=!0}catch{}if(u&&!r&&(r=!0),r){if(n!==void 0||!s){const f=this.buildLocation({to:n,...a});s=s??f.publicHref,o=o??f.publicHref}const c=!u&&o?o:s;if(Rv(c,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const p of f)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(c):window.location.href=c;return}return this.buildAndCommitLocation({...a,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(s=>!n.some(o=>o.id===s.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{const r=n?.action?.type;let s,o,a;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad(),r&&(this._scroll.hash=r==="PUSH"||r==="REPLACE");const p=this.latestLocation,g=Ic(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await KL({router:this,sync:n?.sync,forceStaleReload:u.href===p.href,matches:this.stores.pendingMatches.get(),location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,y=null,S=null,E=null;this.batch(()=>{const C=this.stores.pendingMatches.get(),w=C.length,x=this.stores.matches.get();m=w?x.filter(M=>!this.stores.pendingMatchStores.has(M.id)):null;const T=new Set;for(const M of this.stores.pendingMatchStores.values())M.routeId&&T.add(M.routeId);const R=new Set;for(const M of this.stores.matchStores.values())M.routeId&&R.add(M.routeId);y=w?x.filter(M=>!T.has(M.routeId)):null,S=w?C.filter(M=>!R.has(M.routeId)):null,E=w?C.filter(M=>R.has(M.routeId)):x,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),w&&(this.stores.setMatches(C),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[C,w]of[[y,"onLeave"],[S,"onEnter"],[E,"onStay"]])if(C)for(const x of C)this.looseRoutesById[x.routeId].options[w]?.(x)})})}})}catch(p){Fr(p)?(s=p,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):cr(p)&&(o=p);const g=s?s.status:o?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(s)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(f=>f.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,a=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(Ic(o,a)):r.types;if(u===!1){n();return}s={update:n,types:u}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const s=this.stores.pendingMatchStores.get(n);if(s){s.set(r);return}const o=this.stores.matchStores.get(n);if(o){o.set(r);return}const a=this.stores.cachedMatchStores.get(n);if(a){const u=r(a.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):a.set(u)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const s=n.options._builtLocation??this.buildLocation(n.options),o=this.getParsedLocationHref(s);n.options.href=o,n.headers.set("Location",o)}else if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const o=s.pathname+s.search+s.hash;n.options.href=o,n.headers.set("Location",o)}}catch{}if(n.options.href&&!n.options._builtLocation&&Rv(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(s=>!r(s))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=s=>{const o=this.looseRoutesById[s.routeId];if(!o.options.loader)return!0;const a=(s.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:n-s.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=Rh,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...o,...this.stores.cachedIds.get()]),u=s.filter(c=>!a.has(c.id));if(u.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...u])}try{return s=await KL({router:this,matches:s,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?s=s.map(p=>p.id===c?f(p):p):this.updateMatch(c,f)}}),s}catch(c){if(Fr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});cr(c)||console.error(c);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(s);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const a=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=Nfe(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Nl(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Nl(a.search,o.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Xfe,parseSearch:t.parseSearch??Zfe,protocolAllowlist:t.protocolAllowlist??xfe}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:n}){this.routesById=t,this.routesByPath=e,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=KF(t),this.routeBranchCache.set(t,e)),e}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const n=this.getMatchedRoutes(t.pathname),{foundRoute:r,routeParams:s}=n;let{matchedRoutes:o}=n,a=!1;(r?r.path!=="/"&&s["**"]:fi(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const u=a?yhe(this.options.notFoundMode,o):void 0,c=new Array(o.length),f=new Map;for(const p of this.stores.matchStores.values())p.routeId&&f.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const g=o[p],m=c[p-1];let y,S,E;{const B=m?.search??t.search,W=m?._strictSearch??void 0;try{const Y=rv(g.options.validateSearch,{...B})??void 0;y={...B,...Y},S={...W,...Y},E=void 0}catch(Y){let ne=Y;if(Y instanceof Nv||(ne=new Nv(Y.message,{cause:Y})),e?.throwOnError)throw ne;y=B,S={},E=ne}}const C=g.options.loaderDeps?.({search:y})??"",w=C?JSON.stringify(C):"",{interpolatedPath:x,usedParams:T}=jL({path:g.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),R=g.id+x+w,M=this.getMatch(R),O=f.get(g.id),I=M?._strictParams??T;let P;if(!M)try{JL(g,I)}catch(B){if(cr(B)||Fr(B)?P=B:P=new hhe(B.message,{cause:B}),e?.throwOnError)throw P}Object.assign(s,I);const k=O?"stay":"enter";let H;if(M)H={...M,cause:k,params:O?.params??s,_strictParams:I,search:yl(O?O.search:M.search,y),_strictSearch:S};else{const B=g.options.loader||g.options.beforeLoad||g.lazyFn||r7(g)?"pending":"success";H={id:R,ssr:g.options.ssr,index:p,routeId:g.id,params:O?.params??s,_strictParams:I,pathname:x,updatedAt:Date.now(),search:O?yl(O.search,y):y,_strictSearch:S,searchError:void 0,status:B,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:Uc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:k,loaderDeps:O?xl(O.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:g.options.staticData||{},fullPath:g.fullPath}}e?.preload||(H.globalNotFound=u===g.id),H.searchError=E;const F=this.getParentContext(m);H.context={...F,...H.__routeContext,...H.__beforeLoadContext},c[p]=H}for(let p=0;p<c.length;p++){const g=c[p],m=this.looseRoutesById[g.routeId],y=this.getMatch(g.id),S=f.get(g.routeId);if(g.params=S?yl(S.params,s):s,!y){const E=c[p-1],C=this.getParentContext(E);if(m.options.context){const w={deps:g.loaderDeps,params:g.params,context:C??{},location:t,navigate:x=>this.navigate({...x,_fromLocation:t}),buildLocation:this.buildLocation,cause:g.cause,abortController:g.abortController,preload:!!g.preload,matches:c,routeId:m.id};g.__routeContext=m.options.context(w)??void 0}g.context={...C,...g.__routeContext,...g.__beforeLoadContext}}}return c}matchRoutesLightweight(t){const e=xh(this.stores.matchesId.get()),n=this.lightweightCache.get(t);if(n&&n[0]===e)return n[1];const{matchedRoutes:r,routeParams:s}=this.getMatchedRoutes(t.pathname),o=xh(r),a={...t.search};for(const g of r)try{Object.assign(a,rv(g.options.validateSearch,a))}catch{}const u=e&&this.stores.matchStores.get(e)?.get(),c=u&&u.routeId===o.id&&u.pathname===t.pathname;let f;if(c)f=u.params;else{const g=Object.assign(Object.create(null),s);for(const m of r)try{JL(m,g)}catch{}f=g}const p={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,p]),p}},Nv=class extends Error{},hhe=class extends Error{};function phe(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function rv(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new Nv("Async validation not supported");if(n.issues)throw new Nv(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function ghe({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=fi(t);let o;const a=Mfe(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function mhe({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return vhe(n)(t,e,r??!1)}function vhe(t){let e,n;const r=[];for(const o of t){const a=o.options;if("search"in a)a.search?.middlewares&&r.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){const c=({search:f,next:p})=>{const g=p(a.preSearchFilters?a.preSearchFilters.reduce((m,y)=>y(m),f):f);return a.postSearchFilters?a.postSearchFilters.reduce((m,y)=>y(m),g):g};r.push(c)}const u=a.validateSearch;if(u){const c=({search:f,next:p,meta:g})=>{const m=p(f);if(n)try{const y=rv(u,m);if(g&&y)for(const S in y)S in m||(g.defaulted||=new Map).set(S,y[S]);return{...m,...y}}catch{}return m};r.push(c)}}const s=(o,a,u)=>{if(o>=r.length){if(!e.search)return{};if(e.search===!0)return a;const f=_l(e.search,a);return u&&(u.explicit=f),f}const c=(f,p)=>{if(p){const g=u||{};return{search:s(o+1,f,g),meta:g}}return s(o+1,f,u)};return r[o]({search:a,next:c,meta:u})};return function(a,u,c){return e=u,n=c,s(0,a)}}function yhe(t,e){if(t!=="root")for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.children)return r.id}return Ml}function JL(t,e){const n=t.options.params?.parse??t.options.parseParams;if(n){const r=n(e);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(e,r)}}const bhe="Error preloading route! ☝️";var s7=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Ml:this.parentRoute||pi();let s=r?Ml:n?.path;s&&s!=="/"&&(s=YF(s));const o=n?.id||s;let a=r?Ml:ev([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=ev(["/",a]));const u=a==="__root__"?"/":ev([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=u,this._to=fi(u)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>QF({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},She=class extends s7{constructor(t){super(t)}};function YT(t){const e=t.errorComponent??ZT;return D.jsx(Ehe,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?A.createElement(e,{error:n,reset:r}):t.children})}var Ehe=class extends A.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const n=t.getResetKey();return e.error&&e.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function ZT({error:t}){const[e,n]=A.useState(!1);return D.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[D.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[D.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),D.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:e?"Hide Error":"Show Error"})]}),D.jsx("div",{style:{height:".25rem"}}),e?D.jsx("div",{children:D.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?D.jsx("code",{children:t.message}):null})}):null]})}function Che({children:t,fallback:e=null}){return o7()?D.jsx(z.Fragment,{children:t}):D.jsx(z.Fragment,{children:e})}function o7(){return z.useSyncExternalStore(whe,()=>!0,()=>!1)}function whe(){return()=>{}}var i7=A.createContext(null);function ds(t){return A.useContext(i7)}var ib=A.createContext(void 0),_he=A.createContext(void 0),rn=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(rn||{});function xhe({update:t,notify:e,unwatched:n}){return{link:r,unlink:s,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,p,g){const m=p.depsTail;if(m!==void 0&&m.dep===f)return;const y=m!==void 0?m.nextDep:p.deps;if(y!==void 0&&y.dep===f){y.version=g,p.depsTail=y;return}const S=f.subsTail;if(S!==void 0&&S.version===g&&S.sub===p)return;const E=p.depsTail=f.subsTail={version:g,dep:f,sub:p,prevDep:m,nextDep:y,prevSub:S,nextSub:void 0};y!==void 0&&(y.prevDep=E),m!==void 0?m.nextDep=E:p.deps=E,S!==void 0?S.nextSub=E:f.subs=E}function s(f,p=f.sub){const g=f.dep,m=f.prevDep,y=f.nextDep,S=f.nextSub,E=f.prevSub;return y!==void 0?y.prevDep=m:p.depsTail=m,m!==void 0?m.nextDep=y:p.deps=y,S!==void 0?S.prevSub=E:g.subsTail=E,E!==void 0?E.nextSub=S:(g.subs=S)===void 0&&n(g),y}function o(f){let p=f.nextSub,g;e:do{const m=f.sub;let y=m.flags;if(y&60?y&12?y&4?!(y&48)&&c(f,m)?(m.flags=y|40,y&=1):y=0:m.flags=y&-9|32:y=0:m.flags=y|32,y&2&&e(m),y&1){const S=m.subs;if(S!==void 0){const E=(f=S).nextSub;E!==void 0&&(g={value:p,prev:g},p=E);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;g!==void 0;)if(f=g.value,g=g.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function a(f,p){let g,m=0,y=!1;e:do{const S=f.dep,E=S.flags;if(p.flags&16)y=!0;else if((E&17)===17){if(t(S)){const C=S.subs;C.nextSub!==void 0&&u(C),y=!0}}else if((E&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(g={value:f,prev:g}),f=S.deps,p=S,++m;continue}if(!y){const C=f.nextDep;if(C!==void 0){f=C;continue}}for(;m--;){const C=p.subs,w=C.nextSub!==void 0;if(w?(f=g.value,g=g.prev):f=C,y){if(t(p)){w&&u(C),p=f.sub;continue}y=!1}else p.flags&=-33;p=f.sub;const x=f.nextDep;if(x!==void 0){f=x;continue e}}return y}while(!0)}function u(f){do{const p=f.sub,g=p.flags;(g&48)===32&&(p.flags=g|16,(g&6)===2&&e(p))}while((f=f.nextSub)!==void 0)}function c(f,p){let g=p.depsTail;for(;g!==void 0;){if(g===f)return!0;g=g.prevDep}return!1}}function Ahe(t,e,n){const r=typeof t=="object",s=r?t:void 0;return{next:(r?t.next:t)?.bind(s),error:(r?t.error:e)?.bind(s),complete:(r?t.complete:n)?.bind(s)}}const gx=[];let sv=0;const{link:eU,unlink:The,propagate:Rhe,checkDirty:a7,shallowPropagate:tU}=xhe({update(t){return t._update()},notify(t){gx[mx++]=t,t.flags&=~rn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=rn.Mutable|rn.Dirty,Mv(t))}});let sm=0,mx=0,So,vx=0;function l7(t){try{++vx,t()}finally{--vx||u7()}}function Mv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=The(n,t)}function u7(){if(!(vx>0)){for(;sm<mx;){const t=gx[sm];gx[sm++]=void 0,t.notify()}sm=0,mx=0}}function nU(t,e){const n=typeof t=="function",r=t,s={_snapshot:n?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?rn.None:rn.Mutable,get(){return So!==void 0&&eU(s,So,sv),s._snapshot},subscribe(o){const a=Ahe(o),u={current:!1},c=Ihe(()=>{s.get(),u.current?a.next?.(s._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=So,u=e?.compare??Object.is;if(n)So=s,++sv,s.depsTail=void 0;else if(o===void 0)return!1;n&&(s.flags=rn.Mutable|rn.RecursedCheck);try{const c=s._snapshot,f=typeof o=="function"?o(c):o===void 0&&n?r(c):o;return c===void 0||!u(c,f)?(s._snapshot=f,!0):!1}finally{So=a,n&&(s.flags&=~rn.RecursedCheck),Mv(s)}}};return n?(s.flags=rn.Mutable|rn.Dirty,s.get=function(){const o=s.flags;if(o&rn.Dirty||o&rn.Pending&&a7(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&tU(a)}}else o&rn.Pending&&(s.flags=o&~rn.Pending);return So!==void 0&&eU(s,So,sv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(Rhe(a),tU(a),u7())}},s}function Ihe(t){const e=()=>{const r=So;So=n,++sv,n.depsTail=void 0,n.flags=rn.Watching|rn.RecursedCheck;try{return t()}finally{So=r,n.flags&=~rn.RecursedCheck,Mv(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:rn.Watching|rn.RecursedCheck,notify(){const r=this.flags;r&rn.Dirty||r&rn.Pending&&a7(this.deps,this)?e():this.flags=rn.Watching},stop(){this.flags=rn.None,this.depsTail=void 0,Mv(this)}};return e(),n}function Ohe(t,e){return t===e}function qr(t,e,n=Ohe){const r=A.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=A.useCallback(()=>t?.get(),[t]);return rT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var zw={get(){},subscribe(){return{unsubscribe(){}}}};function Nhe(t,e){const n=A.useRef();return r=>{const s=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=xl(n.current,s):s}}function ou(t){const e=ds(),n=A.useContext(t.from?_he:ib),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=Nhe(t,e),o=qr(r??zw,a=>a?s(a):zw);if(o!==zw)return o;(t.shouldThrow??!0)&&pi()}function c7(t){return ou({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function d7(t){const{select:e,...n}=t;return ou({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function f7(t){return ou({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const n=t.strict===!1?e.params:e._strictParams;return t.select?t.select(n):n}})}function h7(t){return ou({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function XT(t){const e=ds();return A.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function Uxe(t){const e=ds(),n=XT(),r=A.useRef(null);return Sc(()=>{r.current!==t&&(n(t),r.current=t)},[e,t,n]),null}function p7(t){return ou({...t,select:e=>t.select?t.select(e.context):e.context})}function Mhe(t,e){const n=ds(),r=bfe(e),{activeProps:s,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:g,replace:m,startTransition:y,resetScroll:S,viewTransition:E,children:C,target:w,disabled:x,style:T,className:R,onClick:M,onBlur:O,onFocus:I,onMouseEnter:P,onMouseLeave:k,onTouchStart:H,ignoreBlocker:F,params:B,search:W,hash:Y,state:ne,mask:$,reloadDocument:ee,unsafeRelative:fe,from:de,_fromLocation:Ae,...L}=t,V=o7(),K=A.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),J=qr(n.stores.location,gt=>gt,(gt,vn)=>gt.href===vn.href),oe=A.useMemo(()=>{const gt={_fromLocation:J,...K};return n.buildLocation(gt)},[n,J,K]),he=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ue=oe.maskedLocation?oe.maskedLocation.external:oe.external,ve=A.useMemo(()=>Fhe(he,ue,n.history,x),[x,ue,he,n.history]),_e=A.useMemo(()=>{if(ve?.external)return Rv(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!zhe(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Rv(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=A.useMemo(()=>{if(_e)return!1;if(a?.exact){if(!Ffe(J.pathname,oe.pathname,n.basepath))return!1}else{const gt=Iv(J.pathname,n.basepath),vn=Iv(oe.pathname,n.basepath);if(!(gt.startsWith(vn)&&(gt.length===vn.length||gt[vn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Nl(J.search,oe.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?V&&J.hash===oe.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,J,_e,V,oe.hash,oe.pathname,oe.search,n.basepath]),Ee=Xe?_l(s,{})??Phe:Bw,pt=Xe?Bw:_l(o,{})??Bw,Ce=[R,Ee.className,pt.className].filter(Boolean).join(" "),ze=(T||Ee.style||pt.style)&&{...T,...Ee.style,...pt.style},[Be,He]=A.useState(!1),pr=A.useRef(!1),Et=t.reloadDocument||_e?!1:c??n.options.defaultPreload,Gr=f??n.options.defaultPreloadDelay??0,Wn=A.useCallback(()=>{n.preloadRoute({...K,_builtLocation:oe}).catch(gt=>{console.warn(gt),console.warn(bhe)})},[n,K,oe]);yfe(r,A.useCallback(gt=>{gt?.isIntersecting&&Wn()},[Wn]),Uhe,{disabled:!!x||Et!=="viewport"}),A.useEffect(()=>{pr.current||!x&&Et==="render"&&(Wn(),pr.current=!0)},[x,Wn,Et]);const xr=gt=>{const vn=gt.currentTarget.getAttribute("target"),Tr=w!==void 0?w:vn;if(!x&&!Bhe(gt)&&!gt.defaultPrevented&&(!Tr||Tr==="_self")&>.button===0){gt.preventDefault(),uF.flushSync(()=>{He(!0)});const no=n.subscribe("onResolved",()=>{no(),He(!1)});n.navigate({...K,replace:m,resetScroll:S,hashScrollIntoView:g,startTransition:y,viewTransition:E,ignoreBlocker:F})}};if(_e)return{...L,ref:r,href:_e,...C&&{children:C},...w&&{target:w},...x&&{disabled:x},...T&&{style:T},...R&&{className:R},...M&&{onClick:M},...O&&{onBlur:O},...I&&{onFocus:I},...P&&{onMouseEnter:P},...k&&{onMouseLeave:k},...H&&{onTouchStart:H}};const to=gt=>{if(x||Et!=="intent")return;if(!Gr){Wn();return}const vn=gt.currentTarget;if(Of.has(vn))return;const Tr=setTimeout(()=>{Of.delete(vn),Wn()},Gr);Of.set(vn,Tr)},Ar=gt=>{x||Et!=="intent"||Wn()},Gt=gt=>{if(x||!Et||!Gr)return;const vn=gt.currentTarget,Tr=Of.get(vn);Tr&&(clearTimeout(Tr),Of.delete(vn))};return{...L,...Ee,...pt,href:ve?.href,ref:r,onClick:nc([M,xr]),onBlur:nc([O,Gt]),onFocus:nc([I,to]),onMouseEnter:nc([P,to]),onMouseLeave:nc([k,Gt]),onTouchStart:nc([H,Ar]),disabled:!!x,target:w,...ze&&{style:ze},...Ce&&{className:Ce},...x&&khe,...Xe&&Dhe,...V&&Be&&Lhe}}var Bw={},Phe={className:"active"},khe={role:"link","aria-disabled":!0},Dhe={"data-status":"active","aria-current":"page"},Lhe={"data-transitioning":"transitioning"},Of=new WeakMap,Uhe={rootMargin:"100px"},nc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function Fhe(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function zhe(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var g7=A.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:s,...o}=Mhe(r,e),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=o;return A.createElement("a",c,a)}return A.createElement(n,o,a)});function Bhe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var jhe=class extends s7{constructor(e){super(e),this.useMatch=n=>ou({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>p7({...n,from:this.id}),this.useSearch=n=>h7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>f7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>d7({...n,from:this.id}),this.useLoaderData=n=>c7({...n,from:this.id}),this.useNavigate=()=>XT({from:this.fullPath}),this.Link=z.forwardRef((n,r)=>D.jsx(g7,{ref:r,from:this.fullPath,...n}))}};function Hhe(t){return new jhe(t)}function $he(){return t=>Whe(t)}var qhe=class extends She{constructor(t){super(t),this.useMatch=e=>ou({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>p7({...e,from:this.id}),this.useSearch=e=>h7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>f7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>d7({...e,from:this.id}),this.useLoaderData=e=>c7({...e,from:this.id}),this.useNavigate=()=>XT({from:this.fullPath}),this.Link=z.forwardRef((e,n)=>D.jsx(g7,{ref:n,from:this.fullPath,...e}))}};function Whe(t){return new qhe(t)}function dr(t){return new Ghe(t,{silent:!0}).createRoute}var Ghe=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=Hhe(n);return r.isRoot=!1,r},this.silent=e?.silent}};function sr(t,e){let n,r,s,o;const a=()=>(n||(n=t().then(c=>{n=void 0,r=c[e??"default"]}).catch(c=>{if(s=c,Cfe(s)&&s instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${s.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),o=!0)}})),n),u=function(f){if(o)throw window.location.reload(),new Promise(()=>{});if(s)throw s;if(!r)if(kL)kL(a());else throw a();return A.createElement(r,f)};return u.preload=a,u}function Vhe(t){const e=ds(),n=`not-found-${qr(e.stores.location,r=>r.pathname)}-${qr(e.stores.status,r=>r)}`;return D.jsx(YT,{getResetKey:()=>n,onCatch:(r,s)=>{if(cr(r))t.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(cr(r))return t.fallback?.(r);throw r},children:t.children})}function Khe(){return D.jsx("p",{children:"Not Found"})}function hc(t){return D.jsx(D.Fragment,{children:t.children})}function m7(t,e,n){return e.options.notFoundComponent?D.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?D.jsx(t.options.defaultNotFoundComponent,{...n}):D.jsx(Khe,{})}function Yhe(t){return null}function Zhe(){return Yhe(ds()),null}var Xhe=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,Qhe=(t,e)=>t[0]===e[0]&&t[1]===e[1],v7=A.memo(function({matchId:e}){const n=ds(),r=n.stores.matchStores.get(e);r||pi();const s=qr(n.stores.loadedAt,a=>a),o=qr(r,a=>a,Xhe);return D.jsx(Jhe,{router:n,matchId:e,resetKey:s,matchState:A.useMemo(()=>{const a=o.routeId,u=n.routesById[a].parentRoute?.id;return{routeId:a,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:u}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function Jhe({router:t,matchId:e,resetKey:n,matchState:r}){const s=t.routesById[r.routeId],o=s.options.pendingComponent??t.options.defaultPendingComponent,a=o?D.jsx(o,{}):null,u=s.options.errorComponent??t.options.defaultErrorComponent,c=s.options.onCatch??t.options.defaultOnCatch,f=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,p=r.ssr===!1||r.ssr==="data-only",g=(!s.isRoot||s.options.wrapInSuspense||p)&&(s.options.wrapInSuspense??o??(s.options.errorComponent?.preload||p))?A.Suspense:hc,m=u?YT:hc,y=f?Vhe:hc;return D.jsxs(s.isRoot?s.options.shellComponent??hc:hc,{children:[D.jsx(ib.Provider,{value:e,children:D.jsx(g,{fallback:a,children:D.jsx(m,{getResetKey:()=>n,errorComponent:u||ZT,onCatch:(S,E)=>{if(cr(S))throw S.routeId??=r.routeId,S;c?.(S,E)},children:D.jsx(y,{fallback:S=>{if(S.routeId??=r.routeId,!f||S.routeId&&S.routeId!==r.routeId||!S.routeId&&!s.isRoot)throw S;return A.createElement(f,S)},children:p||r._displayPending?D.jsx(Che,{fallback:a,children:D.jsx(rU,{matchId:e})}):D.jsx(rU,{matchId:e})})})})}),r.parentRouteId===Ml?D.jsxs(D.Fragment,{children:[D.jsx(epe,{}),t.options.scrollRestoration&&HF?D.jsx(Zhe,{}):null]}):null]})}function epe(){const t=ds(),e=A.useRef();return Sc(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...Ic(t.stores.location.get(),r??n)}),e.current=n},[qr(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var rU=A.memo(function({matchId:e}){const n=ds(),r=(p,g)=>n.getMatch(p.id)?._nonReactive[g]??p._nonReactive[g],s=n.stores.matchStores.get(e);s||pi();const o=qr(s,p=>p),a=o.routeId,u=n.routesById[a],c=A.useMemo(()=>{const p=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return p?JSON.stringify(p):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=A.useMemo(()=>{const p=u.options.component??n.options.defaultComponent;return p?D.jsx(p,{},c):D.jsx(y7,{})},[c,u.options.component,n.options.defaultComponent]);if(o._displayPending)throw r(o,"displayPendingPromise");if(o._forcePending)throw r(o,"minPendingPromise");if(o.status==="pending"){const p=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(p){const g=n.getMatch(o.id);if(g&&!g._nonReactive.minPendingPromise){const m=Uc();g._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),g._nonReactive.minPendingPromise=void 0},p)}}throw r(o,"loadPromise")}if(o.status==="notFound")return cr(o.error)||pi(),m7(n,u,o.error);if(o.status==="redirected")throw Fr(o.error)||pi(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),y7=A.memo(function(){const e=ds(),n=A.useContext(ib);let r,s=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[r,s]=qr(f,p=>[p?.routeId,p?.globalNotFound??!1],Qhe),o=qr(e.stores.matchesId,p=>p[p.findIndex(g=>g===n)+1])}const a=r?e.routesById[r]:void 0,u=e.options.defaultPendingComponent?D.jsx(e.options.defaultPendingComponent,{}):null;if(s)return a||pi(),m7(e,a,void 0);if(!o)return null;const c=D.jsx(v7,{matchId:o});return r===Ml?D.jsx(A.Suspense,{fallback:u,children:c}):c});function tpe(){const t=ds(),e=A.useRef({router:t,mounted:!1}),[n,r]=A.useState(!1),s=qr(t.stores.isLoading,g=>g),o=qr(t.stores.hasPending,g=>g),a=Mw(s),u=s||n||o,c=Mw(u),f=s||o,p=Mw(f);return t.startTransition=g=>{r(!0),A.startTransition(()=>{g(),r(!1)})},A.useEffect(()=>{const g=t.history.subscribe(t.load),m=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return fi(t.latestLocation.publicHref)!==fi(m.publicHref)&&t.commitLocation({...m,replace:!0}),()=>{g()}},[t,t.history]),Sc(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(m){console.error(m)}})()},[t]),Sc(()=>{a&&!s&&t.emit({type:"onLoad",...Ic(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,s]),Sc(()=>{p&&!f&&t.emit({type:"onBeforeRouteMount",...Ic(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,p,t]),Sc(()=>{if(c&&!u){const g=Ic(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),l7(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function npe(){const t=ds(),e=t.routesById[Ml].options.pendingComponent??t.options.defaultPendingComponent,n=e?D.jsx(e,{}):null,r=D.jsxs(typeof document<"u"&&t.ssr?hc:A.Suspense,{fallback:n,children:[D.jsx(tpe,{}),D.jsx(rpe,{})]});return t.options.InnerWrap?D.jsx(t.options.InnerWrap,{children:r}):r}function rpe(){const t=ds(),e=qr(t.stores.firstId,s=>s),n=qr(t.stores.loadedAt,s=>s),r=e?D.jsx(v7,{matchId:e}):null;return D.jsx(ib.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:D.jsx(YT,{getResetKey:()=>n,errorComponent:ZT,onCatch:void 0,children:r})})}var spe=t=>({createMutableStore:nU,createReadonlyStore:nU,batch:l7}),ope=t=>new ipe(t),ipe=class extends fhe{constructor(t){super(t,spe)}};function ape({router:t,children:e,...n}){qF(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=D.jsx(i7.Provider,{value:t,children:e});return t.options.Wrap?D.jsx(t.options.Wrap,{children:r}):r}function lpe({router:t,...e}){return D.jsx(ape,{router:t,...e,children:D.jsx(npe,{})})}var jw={exports:{}},Nf={},Hw={exports:{}},$w={};var sU;function upe(){return sU||(sU=1,(function(t){function e($,ee){var fe=$.length;$.push(ee);e:for(;0<fe;){var de=fe-1>>>1,Ae=$[de];if(0<s(Ae,ee))$[de]=ee,$[fe]=Ae,fe=de;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var ee=$[0],fe=$.pop();if(fe!==ee){$[0]=fe;e:for(var de=0,Ae=$.length,L=Ae>>>1;de<L;){var V=2*(de+1)-1,K=$[V],J=V+1,oe=$[J];if(0>s(K,fe))J<Ae&&0>s(oe,K)?($[de]=oe,$[J]=fe,de=J):($[de]=K,$[V]=fe,de=V);else if(J<Ae&&0>s(oe,fe))$[de]=oe,$[J]=fe,de=J;else break e}}return ee}function s($,ee){var fe=$.sortIndex-ee.sortIndex;return fe!==0?fe:$.id-ee.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();t.unstable_now=function(){return a.now()-u}}var c=[],f=[],p=1,g=null,m=3,y=!1,S=!1,E=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R($){for(var ee=n(f);ee!==null;){if(ee.callback===null)r(f);else if(ee.startTime<=$)r(f),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=n(f)}}function M($){if(E=!1,R($),!S)if(n(c)!==null)S=!0,O||(O=!0,B());else{var ee=n(f);ee!==null&&ne(M,ee.startTime-$)}}var O=!1,I=-1,P=5,k=-1;function H(){return C?!0:!(t.unstable_now()-k<P)}function F(){if(C=!1,O){var $=t.unstable_now();k=$;var ee=!0;try{e:{S=!1,E&&(E=!1,x(I),I=-1),y=!0;var fe=m;try{t:{for(R($),g=n(c);g!==null&&!(g.expirationTime>$&&H());){var de=g.callback;if(typeof de=="function"){g.callback=null,m=g.priorityLevel;var Ae=de(g.expirationTime<=$);if($=t.unstable_now(),typeof Ae=="function"){g.callback=Ae,R($),ee=!0;break t}g===n(c)&&r(c),R($)}else r(c);g=n(c)}if(g!==null)ee=!0;else{var L=n(f);L!==null&&ne(M,L.startTime-$),ee=!1}}break e}finally{g=null,m=fe,y=!1}ee=void 0}}finally{ee?B():O=!1}}}var B;if(typeof T=="function")B=function(){T(F)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Y=W.port2;W.port1.onmessage=F,B=function(){Y.postMessage(null)}}else B=function(){w(F,0)};function ne($,ee){I=w(function(){$(t.unstable_now())},ee)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function($){$.callback=null},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function($){switch(m){case 1:case 2:case 3:var ee=3;break;default:ee=m}var fe=m;m=ee;try{return $()}finally{m=fe}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function($,ee){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var fe=m;m=$;try{return ee()}finally{m=fe}},t.unstable_scheduleCallback=function($,ee,fe){var de=t.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?de+fe:de):fe=de,$){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=fe+Ae,$={id:p++,callback:ee,priorityLevel:$,startTime:fe,expirationTime:Ae,sortIndex:-1},fe>de?($.sortIndex=fe,e(f,$),n(c)===null&&$===n(f)&&(E?(x(I),I=-1):E=!0,ne(M,fe-de))):($.sortIndex=Ae,e(c,$),S||y||(S=!0,O||(O=!0,B()))),$},t.unstable_shouldYield=H,t.unstable_wrapCallback=function($){var ee=m;return function(){var fe=m;m=ee;try{return $.apply(this,arguments)}finally{m=fe}}}})($w)),$w}var oU;function cpe(){return oU||(oU=1,Hw.exports=upe()),Hw.exports}var iU;function dpe(){if(iU)return Nf;iU=1;var t=cpe(),e=Xh(),n=lF();function r(i){var l="https://react.dev/errors/"+i;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+i+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var l=i,d=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,(l.flags&4098)!==0&&(d=l.return),i=l.return;while(i)}return l.tag===3?d:null}function a(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function u(i){if(i.tag===31){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function c(i){if(o(i)!==i)throw Error(r(188))}function f(i){var l=i.alternate;if(!l){if(l=o(i),l===null)throw Error(r(188));return l!==i?null:i}for(var d=i,h=l;;){var v=d.return;if(v===null)break;var b=v.alternate;if(b===null){if(h=v.return,h!==null){d=h;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===d)return c(v),i;if(b===h)return c(v),l;b=b.sibling}throw Error(r(188))}if(d.return!==h.return)d=v,h=b;else{for(var _=!1,N=v.child;N;){if(N===d){_=!0,d=v,h=b;break}if(N===h){_=!0,h=v,d=b;break}N=N.sibling}if(!_){for(N=b.child;N;){if(N===d){_=!0,d=b,h=v;break}if(N===h){_=!0,h=b,d=v;break}N=N.sibling}if(!_)throw Error(r(189))}}if(d.alternate!==h)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:l}function p(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=p(i),l!==null)return l;i=i.sibling}return null}var g=Object.assign,m=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function B(i){return i===null||typeof i!="object"?null:(i=F&&i[F]||i["@@iterator"],typeof i=="function"?i:null)}var W=Symbol.for("react.client.reference");function Y(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===W?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case E:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case O:return"SuspenseList";case k:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case T:return i.displayName||"Context";case x:return(i._context.displayName||"Context")+".Consumer";case R:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return l=i.displayName||null,l!==null?l:Y(i.type)||"Memo";case P:l=i._payload,i=i._init;try{return Y(i(l))}catch{}}return null}var ne=Array.isArray,$=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},de=[],Ae=-1;function L(i){return{current:i}}function V(i){0>Ae||(i.current=de[Ae],de[Ae]=null,Ae--)}function K(i,l){Ae++,de[Ae]=i.current,i.current=l}var J=L(null),oe=L(null),he=L(null),ue=L(null);function ve(i,l){switch(K(he,l),K(oe,i),K(J,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?H2(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=H2(l),i=$2(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(J),K(J,i)}function _e(){V(J),V(oe),V(he)}function Xe(i){i.memoizedState!==null&&K(ue,i);var l=J.current,d=$2(l,i.type);l!==d&&(K(oe,i),K(J,d))}function Ee(i){oe.current===i&&(V(J),V(oe)),ue.current===i&&(V(ue),cf._currentValue=fe)}var pt,Ce;function ze(i){if(pt===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);pt=l&&l[1]||"",Ce=-1<d.stack.indexOf(`
|
|
216
|
+
`;return typeof u=="function"&&u(null,C),C},Nw}var yL;function Fue(){if(yL)return ec;yL=1;const t=vue(),e=Due(),n=Lue(),r=Uue();function s(o,a,u,c,f){const p=[].slice.call(arguments,1),g=p.length,m=typeof p[g-1]=="function";if(!m&&!t())throw new Error("Callback required as last argument");if(m){if(g<2)throw new Error("Too few arguments provided");g===2?(f=u,u=a,a=c=void 0):g===3&&(a.getContext&&typeof f>"u"?(f=c,c=void 0):(f=c,c=u,u=a,a=void 0))}else{if(g<1)throw new Error("Too few arguments provided");return g===1?(u=a,a=c=void 0):g===2&&!a.getContext&&(c=u,u=a,a=void 0),new Promise(function(y,S){try{const E=e.create(u,c);y(o(E,a,c))}catch(E){S(E)}})}try{const y=e.create(u,c);f(null,o(y,a,c))}catch(y){f(y)}}return ec.create=e.create,ec.toCanvas=s.bind(null,n.render),ec.toDataURL=s.bind(null,n.renderToDataURL),ec.toString=s.bind(null,function(o,a,u){return r.render(o,u)}),ec}var zue=Fue();const Bue=qa(zue),jue=t=>t==="signIn"||t==="signUp",jT=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:Hue,getConfirmingText:$ue,getBackToSignInText:que,getResendCodeText:Wue}=kn,nb=()=>{const{isPending:t,toSignIn:e,challengeName:n,resendCode:r,selectedAuthMethod:s,availableAuthMethods:o}=St(c=>[c.isPending,c.toSignIn,c.challengeName,c.resendCode,c.selectedAuthMethod,c.availableAuthMethods]),a=!!s&&s!=="PASSWORD"||!!o?.some(c=>c!=="PASSWORD"),u=jT(n)&&a&&r;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:$ue()},Hue()),u&&z.createElement(Jt,{onClick:r,type:"button"},Wue()),z.createElement(Jt,{onClick:e,type:"button",variation:"link",size:"small"},que()))},Gue=new nr("SetupTotp-logger"),{getSetupTotpText:Vue,getCopiedText:Kue,getLoadingText:Yue}=kn,Ua=({className:t,variation:e})=>{const{totpSecretCode:n,isPending:r,username:s,QRFields:o}=St(R=>[R.isPending,R.totpSecretCode,R.username]),{handleChange:a,handleSubmit:u}=cs(),{components:{SetupTotp:{Header:c=Ua.Header,Footer:f=Ua.Footer}}}=us(),[p,g]=A.useState(!0),[m,y]=A.useState(),[S,E]=A.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:w=s}=o??{},x=A.useCallback(async()=>{try{const R=Fne(C,w,n),M=await Bue.toDataURL(R);y(M)}catch(R){Gue.error(R)}finally{g(!1)}},[C,w,n]);A.useEffect(()=>{m||x()},[x,m]);const T=()=>{navigator.clipboard.writeText(n),E(Kue())};return A.createElement($r,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-totp":"",method:"post",onChange:a,onSubmit:u},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:r},A.createElement(c,null),A.createElement(Fe,{direction:"column"},p?A.createElement("p",null,Yue(),"…"):A.createElement("img",{"data-amplify-qrcode":!0,src:m,alt:"qr code",width:"228",height:"228"}),A.createElement(Fe,{"data-amplify-copy":!0},A.createElement("div",null,n),A.createElement(Fe,{"data-amplify-copy-svg":!0,onClick:T},A.createElement("div",{"data-amplify-copy-tooltip":!0},S),A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})))),A.createElement(Mo,null),A.createElement(Wr,null)),A.createElement(nb,null),A.createElement(f,null))))};Ua.Header=function(){return A.createElement(_r,{level:3},Vue())};Ua.Footer=function(){return null};const{getSubmitText:Zue,getSubmittingText:Xue}=kn,rb=t=>{const{cancelButtonSendType:e,cancelButtonText:n,submitButtonText:r}=t,{isPending:s,resendCode:o,skipVerification:a,toSignIn:u}=St(g=>[g.isPending]),c=()=>{switch(e){case"SKIP":a();break;case"RESEND":o();break;case"SIGN_IN":u();break;default:return}},f=s?z.createElement(z.Fragment,null,Xue(),"…"):z.createElement(z.Fragment,null,Zue()),p=r??f;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{variation:"primary",isDisabled:s,type:"submit"},p),z.createElement(Fe,{direction:"column",alignItems:"center"},z.createElement(Jt,{onClick:c,type:"button",variation:"link",size:"small"},n)))},Que=()=>z.createElement("svg",{"aria-label":"Apple icon",className:"amplify-icon federated-sign-in-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},z.createElement("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})),Jue=()=>z.createElement("svg",{"aria-label":"Google icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},z.createElement("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),z.createElement("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),z.createElement("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),z.createElement("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})),ece=()=>z.createElement(eF,{className:"federated-sign-in-icon",ariaLabel:"Facebook icon",viewBox:{minX:0,minY:0,width:279,height:538},pathData:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"}),tce=()=>z.createElement("svg",{"aria-label":"Amazon icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 243 264",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},z.createElement("path",{d:"M230.826 208.039C227.468 203.683 208.551 205.982 200.056 206.998C197.471 207.321 197.076 205.042 199.407 203.405C214.475 192.665 239.201 195.766 242.082 199.364C244.966 202.982 241.337 228.071 227.173 240.049C225.001 241.888 222.93 240.904 223.898 238.468C227.077 230.431 234.205 212.419 230.826 208.039ZM123.769 264C71.0234 264 39.0764 241.955 14.7853 217.542C9.97339 212.706 3.71799 206.296 0.311513 200.691C-1.09773 198.372 2.59096 195.022 5.04421 196.844C35.239 219.268 79.1012 239.538 122.53 239.538C151.82 239.538 188.046 227.47 217.669 214.868C222.147 212.966 222.147 219.18 221.512 221.061C221.183 222.032 206.515 236.221 186.247 247.047C167.304 257.166 143.397 264 123.769 264Z",fill:"#F2541B"}),z.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M142.943 111.185C142.943 124.756 143.268 136.054 136.406 148.123C130.856 157.913 122.027 163.95 112.222 163.95C98.8288 163.95 90.9806 153.772 90.9806 138.693C90.9806 109.036 117.677 103.647 142.943 103.647V111.185ZM178.166 196.081C175.858 198.15 171.635 198.22 169.914 196.894C157.974 187.684 149.89 173.688 149.89 173.688C130.706 193.156 117.127 199 92.2879 199C62.8772 199 40 180.905 40 144.729C40 116.461 55.3552 97.2408 77.2563 87.823C96.2094 79.5256 122.684 78.0173 142.943 75.7517C142.943 75.7517 144.633 53.933 138.699 45.9806C134.098 39.8163 126.272 36.9329 119.089 36.9329C106.127 36.8829 93.61 43.9051 91.1262 57.4188C90.4136 61.2829 87.5533 64.5261 84.54 64.206L51.0823 60.5922C48.5156 60.2951 45.0381 57.6639 45.8636 53.3081C53.644 12.3684 90.7373 0 123.989 0C140.983 0 163.21 4.51651 176.608 17.3349C193.597 33.1648 191.969 54.2755 191.969 77.2722V131.51C191.969 147.835 198.768 154.987 205.151 163.775C207.376 166.953 207.886 170.714 205.04 173.032C197.902 178.999 178.166 196.081 178.166 196.081Z",fill:"#F2541B"})),Zg=t=>{const{icon:e,provider:n,text:r}=t,{toFederatedSignIn:s}=St(),o=u=>{u.preventDefault(),s({provider:n})};let a;return e==="facebook"?a=z.createElement(ece,null):e==="google"?a=z.createElement(Jue,null):e==="amazon"?a=z.createElement(tce,null):e==="apple"&&(a=z.createElement(Que,null)),z.createElement(Jt,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,z.createElement(As,{as:"span"},r))},{getSignInWithFederationText:Xg,getOrText:nce}=kn;function wF(){const{route:t,socialProviders:e}=St(({route:n,socialProviders:r})=>[n,r]);return e.length===0?null:z.createElement(Fe,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},e.map(n=>{switch(n){case"amazon":return z.createElement(Zg,{icon:"amazon",key:n,provider:bc.Amazon,text:Xg(t,n)});case"apple":return z.createElement(Zg,{icon:"apple",key:n,provider:bc.Apple,text:Xg(t,n)});case"facebook":return z.createElement(Zg,{icon:"facebook",key:n,provider:bc.Facebook,text:Xg(t,n)});case"google":return z.createElement(Zg,{icon:"google",key:n,provider:bc.Google,text:Xg(t,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),z.createElement(MT,{size:"small",label:nce()}))}const{getSignInText:Qg,getSigningInText:rce,getForgotPasswordText:sce,getSignInWithEmailText:oce,getSignInWithSmsText:ice,getSignInWithPasskeyText:ace,getOtherSignInOptionsText:lce,getEnterUsernameFirstText:uce}=kn;function Si(){const{isPending:t,availableAuthMethods:e,preferredChallenge:n,toShowAuthMethods:r}=St(w=>[w.isPending,w.availableAuthMethods,w.preferredChallenge,w.toShowAuthMethods]),{handleChange:s,handleSubmit:o}=cs(),[a,u]=z.useState(""),{components:{SignIn:{Header:c=Si.Header,Footer:f=Si.Footer}}}=us(),g=e&&e.length>1&&n,m=a.trim().length>0,y=z.useCallback(w=>{const{name:x,value:T}=w.target;x==="username"&&typeof T=="string"&&u(T),s(w)},[s]),S=()=>{if(!n)return Qg();switch(n){case"EMAIL_OTP":return oce();case"SMS_OTP":return ice();case"WEB_AUTHN":return ace();default:return Qg()}},E=w=>{w.preventDefault(),o(w)},C=w=>{w.preventDefault(),r()};return z.createElement($e,null,z.createElement(c,null),z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:g?E:o,onChange:y},z.createElement(wF,null),z.createElement(Fe,{direction:"column"},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:t},z.createElement(eb,null,z.createElement("legend",null,Qg())),z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:rce()},g?S():Qg()),g&&z.createElement(Jt,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:uce()},lce()),z.createElement(f,null))))}const cce=()=>{const{toForgotPassword:t}=St(e=>[e.toForgotPassword]);return z.createElement($e,{"data-amplify-footer":""},z.createElement(Jt,{onClick:t,size:"small",variation:"link"},sce()))};Si.Footer=cce;Si.Header=function(){return null};const{getCreateAccountText:bL,getCreatingAccountText:dce,getCreateAccountWithEmailText:fce,getCreateAccountWithPasswordText:hce,getCreateAccountWithSmsText:pce,getOrText:gce}=kn;function Xs(){const{hasValidationErrors:t,isPending:e,availableAuthMethods:n,preferredChallenge:r,selectedAuthMethod:s}=St(T=>[T.hasValidationErrors,T.isPending,T.availableAuthMethods,T.preferredChallenge,T.selectedAuthMethod]),{handleChange:o,handleBlur:a,handleSubmit:u}=cs(),{components:{SignUp:{Header:c=Xs.Header,FormFields:f=Xs.FormFields,Footer:p=Xs.Footer}}}=us(),g=n?.filter(T=>T!=="WEB_AUTHN"),m=g&&g.length>1,y=r&&r!=="WEB_AUTHN"?r:"PASSWORD",S=g?.filter(T=>T!==y)??[],C=(s??y)!=="PASSWORD",w=T=>{switch(T){case"EMAIL_OTP":return fce();case"SMS_OTP":return pce();case"PASSWORD":return m?hce():bL();default:return bL()}},x=T=>R=>{R.preventDefault();const M=R.target.closest("form");if(M){if(!M.__authMethod){const O=document.createElement("input");O.name="__authMethod",M.appendChild(O)}M.__authMethod.type="hidden",M.__authMethod.value=T,M.requestSubmit()}};return z.createElement($e,null,z.createElement(c,null),z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:o,onSubmit:u,onBlur:a},z.createElement(wF,null),z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:e},z.createElement(Fe,{direction:"column"},z.createElement(f,{includePassword:!C}),z.createElement(Wr,null)),z.createElement(Jt,{isDisabled:(!m||S.length==0)&&t||e,isFullWidth:!0,type:"submit",variation:"primary",isLoading:e,loadingText:dce(),onClick:x(y)},w(y)),m&&S.length>0&&z.createElement(z.Fragment,null,z.createElement(Fe,{justifyContent:"center",padding:"medium 0"},gce()),S.map(T=>z.createElement(Jt,{key:T,isDisabled:e,isFullWidth:!0,type:"button",variation:"primary",onClick:x(T)},w(T)))),z.createElement(p,null))))}Xs.Header=function(){return null};Xs.FormFields=function(){return z.createElement(Mo,null)};Xs.Footer=function(){return null};const{getSignInTabText:mce,getSignUpTabText:vce}=kn,yce=({className:t,hideSignUp:e,variation:n})=>{const{route:r,toSignIn:s,toSignUp:o}=St(a=>[a.route,a.toSignIn,a.toSignUp]);return z.createElement($r,{className:t,variation:n},e?z.createElement($e,{"data-amplify-router-content":""},r==="signIn"&&z.createElement(Si,null)):z.createElement(Sl.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?s():o())}},z.createElement(Sl.List,{spacing:"equal",indicatorPosition:"top"},z.createElement(Sl.Item,{value:"signIn"},mce()),z.createElement(Sl.Item,{value:"signUp"},vce())),z.createElement(Sl.Panel,{value:"signIn","data-amplify-router-content":""},z.createElement(Si,null)),z.createElement(Sl.Panel,{value:"signUp","data-amplify-router-content":""},z.createElement(Xs,null))))},{getAccountRecoveryInfoText:bce,getSkipText:Sce}=kn,Hl=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=cs(),{components:{ConfirmVerifyUser:{Header:o=Hl.Header,Footer:a=Hl.Footer}}}=us();return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(o,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(rb,{cancelButtonText:Sce(),cancelButtonSendType:"SKIP"}),z.createElement(a,null))))};Hl.Header=function(){return z.createElement(_r,{level:3},bce())};Hl.Footer=function(){return null};const{getSkipText:Ece,getVerifyText:Cce,getVerifyContactText:wce,getAccountRecoveryInfoText:_ce}=kn,xce=t=>Object.entries(t).map(([e,n],r)=>{const s=$y[e].label;return z.createElement(kT,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",Lne(s,n))}),$l=({className:t,variation:e})=>{const{components:{VerifyUser:{Header:n=$l.Header,Footer:r=$l.Footer}}}=us(),{isPending:s,unverifiedUserAttributes:o}=St(({isPending:p,unverifiedUserAttributes:g})=>[p,g]),{handleChange:a,handleSubmit:u}=cs(),c=s?z.createElement(z.Fragment,null,"Verifying…"):z.createElement(z.Fragment,null,Cce()),f=z.createElement(DT,{legend:wce(),name:"verify_context",isDisabled:s,legendHidden:!0},xce(o));return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:a,onSubmit:u},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:s},z.createElement(n,null),f,z.createElement(Wr,null),z.createElement(rb,{cancelButtonText:Ece(),cancelButtonSendType:"SKIP",submitButtonText:c}),z.createElement(r,null))))};$l.Header=function(){return z.createElement(_r,{level:3},_ce())};$l.Footer=function(){return null};const{getChallengeText:Ace,getDeliveryMessageText:Tce,getDeliveryMethodText:Rce}=kn,ql=({className:t,variation:e})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:s}=St(p=>[p.isPending,p.challengeName,p.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=cs(),{components:{ConfirmSignIn:{Header:u=ql.Header,Footer:c=ql.Footer}}}=us(),f=jT(r)&&s;return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:o,onSubmit:a},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(u,null),z.createElement(Fe,{direction:"column"},f&&z.createElement(As,{className:"amplify-authenticator__subtitle"},Tce(s)),z.createElement(Mo,null),z.createElement(Wr,null)),z.createElement(nb,null),z.createElement(c,null))))};function Ice(){const{challengeName:t,codeDeliveryDetails:e}=St(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=jT(t)&&e;return z.createElement(z.Fragment,null,z.createElement(_r,{level:3},Ace(t)),n&&z.createElement(_r,{level:5},Rce(e)))}ql.Header=Ice;ql.Footer=function(){return null};const{getResendCodeText:Oce,getResetYourPasswordText:Nce}=kn,Wl=({className:t,variation:e})=>{const{isPending:n}=St(c=>[c.isPending]),{handleBlur:r,handleChange:s,handleSubmit:o}=cs(),{components:{ConfirmResetPassword:{Header:a=Wl.Header,Footer:u=Wl.Footer}}}=us();return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:o,onChange:s,onBlur:r},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(a,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(rb,{cancelButtonSendType:"RESEND",cancelButtonText:Oce()}),z.createElement(u,null))))};Wl.Header=function(){const e=Nce();return z.createElement(_r,{level:3},e)};Wl.Footer=function(){return null};const{getBackToSignInText:Mce,getSendingText:Pce,getSendCodeText:kce,getResetYourPasswordText:Dce}=kn,Fa=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=cs(),{components:{ForgotPassword:{Header:o=Fa.Header,Footer:a=Fa.Footer}}}=us();return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(o,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Wr,null),z.createElement(rb,{cancelButtonText:Mce(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?z.createElement(z.Fragment,null,Pce(),"…"):z.createElement(z.Fragment,null,kce())}),z.createElement(a,null))))};Fa.Header=function(){return z.createElement(_r,{level:3},Dce())};Fa.Footer=function(){return null};const{getMfaTypeLabelByValue:Lce,getSelectMfaTypeByChallengeName:Uce,getSelectMfaTypeText:Fce}=kn,za=({className:t,variation:e})=>{const{isPending:n,allowedMfaTypes:r=[]}=St(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:s,handleSubmit:o}=cs(),{components:{SelectMfaType:{Header:a=za.Header,Footer:u=za.Footer}}}=us();return A.createElement($r,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-select-mfa-type":"",method:"post",onChange:s,onSubmit:o},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},A.createElement(a,null),A.createElement(Fe,{direction:"column"},A.createElement(DT,{name:"mfa_type",legend:Fce(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>A.createElement(kT,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},Lce(c)))),A.createElement(Wr,null)),A.createElement(nb,null),A.createElement(u,null))))};za.Header=function(){const{challengeName:e}=St(n=>[n.challengeName]);return A.createElement(_r,{level:3},Uce(e))};za.Footer=function(){return null};const{getSetupEmailText:zce}=kn,Ba=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=cs(),{components:{SetupEmail:{Header:o=Ba.Header,Footer:a=Ba.Footer}}}=us();return A.createElement($r,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-email":"",method:"post",onChange:r,onSubmit:s},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},A.createElement(o,null),A.createElement(Fe,{direction:"column"},A.createElement(Mo,null),A.createElement(Wr,null)),A.createElement(nb,null),A.createElement(a,null))))};Ba.Header=function(){return A.createElement(_r,{level:3},zce())};Ba.Footer=function(){return null};const{getSignInWithPasswordText:rx,getSignInWithEmailText:Bce,getSignInWithSmsText:jce,getSignInWithPasskeyText:Hce,getSigningInText:$ce,getBackToSignInText:qce,getOrText:Wce,getUsernameLabelByLoginMechanism:Gce}=kn,Vce=t=>{switch(t){case"EMAIL_OTP":return Bce();case"SMS_OTP":return jce();case"WEB_AUTHN":return Hce();case"PASSWORD":return rx();default:return rx()}},Kce=({className:t,variation:e})=>{const{isPending:n,username:r,availableAuthMethods:s,toSignIn:o,selectAuthMethod:a,loginMechanism:u}=St(E=>[E.isPending,E.username,E.availableAuthMethods,E.toSignIn,E.selectAuthMethod,E.loginMechanism]),{handleChange:c,handleSubmit:f}=cs(),p=s??[],g=p.includes("PASSWORD"),m=p.filter(E=>E!=="PASSWORD"),y=E=>{a({method:E})},S=Gce(u);return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:c},z.createElement(Fe,{direction:"column"},z.createElement(rp,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),g&&z.createElement(z.Fragment,null,z.createElement(PT,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),z.createElement(Jt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:$ce()},rx())),g&&m.length>0&&z.createElement(MT,{label:Wce()}),m.length>0&&z.createElement(Fe,{direction:"column",gap:"0.5rem"},m.map(E=>z.createElement(Jt,{key:E,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>y(E)},Vce(E)))),z.createElement(Wr,null),z.createElement(Jt,{onClick:o,size:"small",variation:"link",isDisabled:n},qce()))))},Yce=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M22.9333 38.9333L41.7333 20.1333L38 16.4L22.9333 31.4667L15.3333 23.8667L11.6 27.6L22.9333 38.9333ZM26.6667 53.3333C22.9778 53.3333 19.5111 52.6333 16.2667 51.2333C13.0222 49.8333 10.2 47.9333 7.8 45.5333C5.4 43.1333 3.5 40.3111 2.1 37.0667C0.7 33.8222 0 30.3556 0 26.6667C0 22.9778 0.7 19.5111 2.1 16.2667C3.5 13.0222 5.4 10.2 7.8 7.8C10.2 5.4 13.0222 3.5 16.2667 2.1C19.5111 0.7 22.9778 0 26.6667 0C30.3556 0 33.8222 0.7 37.0667 2.1C40.3111 3.5 43.1333 5.4 45.5333 7.8C47.9333 10.2 49.8333 13.0222 51.2333 16.2667C52.6333 19.5111 53.3333 22.9778 53.3333 26.6667C53.3333 30.3556 52.6333 33.8222 51.2333 37.0667C49.8333 40.3111 47.9333 43.1333 45.5333 45.5333C43.1333 47.9333 40.3111 49.8333 37.0667 51.2333C33.8222 52.6333 30.3556 53.3333 26.6667 53.3333Z",fill:"currentColor"})))},Zce=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:je(le.Icon,e),...n},A.createElement("svg",{width:"195",height:"128",viewBox:"0 0 195 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("circle",{cx:"60",cy:"36",r:"31",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M60 69C84.4313 69 105.396 83.8504 114.357 105.021C116.774 110.729 115.382 116.168 111.798 120.23C108.191 124.319 102.358 127 96 127H24C17.6416 127 11.8094 124.319 8.20215 120.23C4.61836 116.168 3.22626 110.729 5.64258 105.021C14.6036 83.8504 35.5687 69 60 69Z",stroke:"#00404D",strokeWidth:"2"}),A.createElement("circle",{cx:"122",cy:"26",r:"25",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),A.createElement("mask",{id:"path-4-inside-1_4178_10171",fill:"white"},A.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z"})),A.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z",fill:"#00404D",stroke:"#00404D",strokeWidth:"4",mask:"url(#path-4-inside-1_4178_10171)"}),A.createElement("circle",{cx:"167.5",cy:"49.5",r:"19.5",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M167.89 43.65L161.26 54.18H167.89",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M167.5 60.42C173.316 60.42 178.03 55.7056 178.03 49.89V48.72",stroke:"#00404D",strokeWidth:"2"}),A.createElement("circle",{cx:"173.74",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),A.createElement("circle",{cx:"160.48",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M104 112C116.129 112 126.457 104.288 130.347 93.5H147.5L155.5 101.5L168 89L180.5 101.5L193 89L180.5 76.5H130.984C127.705 64.6779 116.866 56 104 56C88.536 56 76 68.536 76 84C76 99.464 88.536 112 104 112ZM104 98C111.732 98 118 91.732 118 84C118 76.268 111.732 70 104 70C96.268 70 90 76.268 90 84C90 91.732 96.268 98 104 98Z",fill:"#BCECF5"}),A.createElement("path",{d:"M130.347 93.5V92.5H129.645L129.407 93.1608L130.347 93.5ZM147.5 93.5L148.207 92.7929L147.914 92.5H147.5V93.5ZM155.5 101.5L154.793 102.207L155.5 102.914L156.207 102.207L155.5 101.5ZM168 89L168.707 88.2929L168 87.5858L167.293 88.2929L168 89ZM180.5 101.5L179.793 102.207L180.5 102.914L181.207 102.207L180.5 101.5ZM193 89L193.707 89.7071L194.414 89L193.707 88.2929L193 89ZM180.5 76.5L181.207 75.7929L180.914 75.5H180.5V76.5ZM130.984 76.5L130.021 76.7673L130.224 77.5H130.984V76.5ZM129.407 93.1608C125.655 103.565 115.694 111 104 111V113C116.564 113 127.259 105.011 131.288 93.8392L129.407 93.1608ZM147.5 92.5H130.347V94.5H147.5V92.5ZM156.207 100.793L148.207 92.7929L146.793 94.2071L154.793 102.207L156.207 100.793ZM167.293 88.2929L154.793 100.793L156.207 102.207L168.707 89.7071L167.293 88.2929ZM181.207 100.793L168.707 88.2929L167.293 89.7071L179.793 102.207L181.207 100.793ZM192.293 88.2929L179.793 100.793L181.207 102.207L193.707 89.7071L192.293 88.2929ZM179.793 77.2071L192.293 89.7071L193.707 88.2929L181.207 75.7929L179.793 77.2071ZM130.984 77.5H180.5V75.5H130.984V77.5ZM104 57C116.405 57 126.859 65.3669 130.021 76.7673L131.948 76.2327C128.552 63.9889 117.327 55 104 55V57ZM77 84C77 69.0883 89.0883 57 104 57V55C87.9837 55 75 67.9837 75 84H77ZM104 111C89.0883 111 77 98.9117 77 84H75C75 100.016 87.9837 113 104 113V111ZM117 84C117 91.1797 111.18 97 104 97V99C112.284 99 119 92.2843 119 84H117ZM104 71C111.18 71 117 76.8203 117 84H119C119 75.7157 112.284 69 104 69V71ZM91 84C91 76.8203 96.8203 71 104 71V69C95.7157 69 89 75.7157 89 84H91ZM104 97C96.8203 97 91 91.1797 91 84H89C89 92.2843 95.7157 99 104 99V97Z",fill:"#00404D"}),A.createElement("path",{d:"M138.5 57V66",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M139 104V124",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M134 61.5L143 61.5",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M129 114L149 114",stroke:"#00404D",strokeWidth:"2"})))},{getPasskeyPromptHeadingText:Xce,getPasskeyPromptDescriptionText:Qce,getCreatePasskeyText:Jce,getRegisteringText:ede,getContinueWithoutPasskeyText:tde,getPasskeyCreatedSuccessText:nde,getPasskeyRegisteredText:rde,getPasskeyRegistrationFailedText:sde,getPasskeyLabelText:ode,getExistingPasskeysText:ide,getSetupAnotherPasskeyText:ade,getContinueText:lde}=kn;function ude({className:t,variation:e}){const[n,r]=z.useState(!1),[s,o]=z.useState(null),[a,u]=z.useState(!1),[c,f]=z.useState([]),{submitForm:p,isPending:g}=St(w=>[w.submitForm,w.isPending]),m=z.useCallback(async()=>{try{const w=await dT();f(w.credentials||[])}catch{}},[]);z.useEffect(()=>{n&&m()},[n,m]);const y=z.useCallback(()=>{p({type:"SKIP"})},[p]),S=z.useCallback(()=>{p({type:"SUBMIT"})},[p]),E=z.useCallback(async()=>{try{o(null),u(!0),await rne(),r(!0)}catch(w){const x=w,T=x.name??"",R=x.message??"";if(T==="PasskeyRegistrationCanceled"||T==="NotAllowedError"||R.includes("canceled")||R.includes("cancelled")||R.includes("ceremony has been canceled")||R.includes("not allowed")){y();return}o(sde())}finally{u(!1)}},[y]);if(n)return z.createElement($r,{className:t,variation:e},z.createElement(Fe,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"xs"},z.createElement(Yce,{className:"amplify-authenticator__passkey-success-icon"}),z.createElement(_r,{level:4},nde()),z.createElement(As,null,rde())),c.length>0&&z.createElement($e,{marginTop:"large"},z.createElement(_r,{level:5},ide()),z.createElement(Fe,{direction:"column",gap:"xs",marginTop:"xs"},c.map((w,x)=>z.createElement($e,{key:w.credentialId,className:"amplify-authenticator__passkey-credential-item"},z.createElement(As,{fontSize:"small"},w.friendlyCredentialName??`${ode()} ${x+1}`))))),z.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},z.createElement(Jt,{onClick:()=>{r(!1),E()},variation:"link"},ade()),z.createElement(Jt,{onClick:()=>S(),variation:"primary",isFullWidth:!0},lde()))));const C=g||a;return z.createElement($r,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(_r,{level:4},Xce()),z.createElement(As,null,Qce()),z.createElement(Fe,{justifyContent:"center"},z.createElement(Zce,{className:"amplify-authenticator__passkey-icon"})),z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(Jt,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:ede()},Jce()),z.createElement(Jt,{onClick:y,variation:"link",isDisabled:C},tde()),s&&z.createElement(As,{className:"amplify-authenticator__passkey-error"},s),z.createElement(Wr,null)))))}function SL(){return null}const cde=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return SL;case"confirmSignUp":return jl;case"confirmSignIn":return ql;case"selectMfaType":return za;case"setupEmail":return Ba;case"setupTotp":return Ua;case"signIn":case"signUp":return yce;case"signInSelectAuthFactor":return Kce;case"passkeyPrompt":return ude;case"forceNewPassword":return Zs;case"forgotPassword":return Fa;case"confirmResetPassword":return Wl;case"verifyUser":return $l;case"confirmVerifyUser":return Hl;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${t}`),SL}};function dde({className:t,hideSignUp:e,variation:n}){const{route:r}=St(({route:o})=>[o]),s=A.useMemo(()=>cde(r),[r]);return z.createElement(s,{className:t,hideSignUp:jue(r)?e:void 0,variation:n})}const fde={Header:()=>null,SignIn:{Header:Si.Header,Footer:Si.Footer},SignUp:{Header:Xs.Header,FormFields:Xs.FormFields,Footer:Xs.Footer},ConfirmSignUp:{Header:jl.Header,Footer:jl.Footer},SelectMfaType:{Header:za.Header,Footer:za.Footer},SetupEmail:{Header:Ba.Header,Footer:Ba.Footer},SetupTotp:{Header:Ua.Header,Footer:Ua.Footer},ConfirmResetPassword:{Header:Wl.Header,Footer:Wl.Footer},ConfirmSignIn:{Header:ql.Header,Footer:ql.Footer},VerifyUser:{Header:$l.Header,Footer:$l.Footer},ConfirmVerifyUser:{Header:Hl.Header,Footer:Hl.Footer},ForceNewPassword:{Header:Zs.Header,Footer:Zs.Footer,FormFields:Zs.FormFields},ForgotPassword:{Header:Fa.Header,Footer:Fa.Footer},Footer:()=>null};function hde({children:t,className:e,components:n,formFields:r,hideSignUp:s,initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,signUpAttributes:f,services:p,socialProviders:g,variation:m}){aue({message:"The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.",shouldWarn:!1});const{route:y,signOut:S,user:E}=St(({route:x,signOut:T,user:R})=>[x,T,R]);Uae({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:p,signUpAttributes:f,socialProviders:g,formFields:r});const C=A.useMemo(()=>({components:{...fde,...n}}),[n]);return y==="authenticated"||y==="signOut"?t?A.createElement(A.Fragment,null,yi(t)?t({signOut:S,user:E}):t):null:A.createElement(vF.Provider,{value:C},A.createElement(dde,{className:e,hideSignUp:s,variation:m}))}function Po(t){return zae({componentName:"Authenticator",packageName:"react",version:iue}),A.createElement(X9,null,A.createElement(hde,{...t}))}Po.Provider=X9;Po.ForgotPassword=Fa;Po.SetupTotp=Ua;Po.SignIn=Si;Po.SignUp=Xs;Po.ForceNewPassword=Zs;Po.SelectMfaType=za;Po.SetupEmail=Ba;const _F=({cssText:t,...e})=>t===void 0||/<\/style/i.test(t)?null:A.createElement("style",{...e,dangerouslySetInnerHTML:{__html:t}});_F.displayName="Style";const xF=({theme:t,...e})=>{if(!t)return null;const{name:n,cssText:r}=t;return A.createElement(_F,{...e,cssText:r,id:`amplify-theme-${n}`})};xF.displayName="ThemeStyle";function pde({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=A.useMemo(()=>({theme:Yy(s),colorMode:e}),[s,e]);return A.createElement(Q9.Provider,{value:o},A.createElement(Ule,{dir:n},A.createElement("div",{"data-amplify-theme":o.theme.name,"data-amplify-color-mode":e,dir:n},t),s?A.createElement(xF,{theme:o.theme,nonce:r}):null))}const gde=({configured:t,authStatus:e})=>e==="authenticated",mde=t=>t?t.signInDetails?.loginId??t.username??null:null,vde=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=St(o=>[o.authStatus,o.signOut,o.user]);return gde({configured:!0,authStatus:n})?D.jsx(D.Fragment,{children:t({email:mde(s),signOut:()=>r()})}):D.jsx(D.Fragment,{children:e})},yde=({children:t,fallback:e=null})=>wy()?D.jsx(vde,{fallback:e,children:t}):D.jsx(D.Fragment,{children:e}),EL='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ri=t=>`var(${t})`,un=Ri("--accent"),bde=Ri("--accent-hover"),CL=Ri("--accent-soft"),Af=Ri("--accent-fg"),wL=Ri("--surface"),tc=Ri("--fg"),Sde=Ri("--surface-sunken"),Jg=Ri("--fg-muted"),Tf=Ri("--line"),Ede=Yy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:CL},20:{value:CL},40:{value:un},60:{value:un},80:{value:un},90:{value:un},100:{value:un}}},background:{primary:{value:wL},secondary:{value:Sde}},font:{primary:{value:tc},secondary:{value:Jg},tertiary:{value:Jg},interactive:{value:un},inverse:{value:Af},hover:{value:un},focus:{value:un},active:{value:un}},border:{primary:{value:Tf},secondary:{value:Tf},focus:{value:un}}},fonts:{default:{variable:{value:EL},static:{value:EL}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Tf},borderWidth:{value:"1px"},boxShadow:{value:"0 10px 30px -10px rgb(15 23 42 / 0.18), 0 4px 12px -6px rgb(15 23 42 / 0.1)"},backgroundColor:{value:wL}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:Jg}}},button:{color:{value:tc},primary:{backgroundColor:{value:un},color:{value:Af},_hover:{backgroundColor:{value:bde},color:{value:Af}},_focus:{backgroundColor:{value:un},color:{value:Af}},_active:{backgroundColor:{value:un},color:{value:Af}}},link:{color:{value:un},_hover:{color:{value:un},backgroundColor:{value:"transparent"}},_focus:{color:{value:un},backgroundColor:{value:"transparent"}},_active:{color:{value:un},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:tc},borderColor:{value:Tf},_focus:{borderColor:{value:un},boxShadow:{value:`0 0 0 2px ${un}`}}},field:{label:{color:{value:tc}}},tabs:{borderColor:{value:Tf},item:{color:{value:Jg},backgroundColor:{value:"transparent"},_active:{color:{value:un},borderColor:{value:un},backgroundColor:{value:"transparent"}},_hover:{color:{value:un}},_focus:{color:{value:un}}}},heading:{color:{value:tc}},text:{color:{value:tc}}}}}),Cde={signIn:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"}},signUp:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"},confirm_password:{placeholder:"Confirm your password"}}},wde=()=>D.jsx(F_,{tone:"warning",className:"fixed top-0 left-0 right-0 z-50 h-7 sm:h-10 overflow-hidden border-x-0 border-t-0",children:D.jsxs("span",{className:"flex items-center gap-2",children:[D.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),D.jsx("span",{className:"truncate hidden sm:inline",children:"— Cognito not configured. Set VITE_COGNITO_USER_POOL_ID and VITE_COGNITO_CLIENT_ID in .env.local to enable sign-in."}),D.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),_de=()=>D.jsx(O8,{note:W8({betterAuthEnabled:!1,cognitoConfigured:wy()})}),xde=({children:t})=>{const{authStatus:e}=St(n=>[n.authStatus]);return e==="authenticated"?D.jsx(D.Fragment,{children:t}):e==="configuring"?D.jsx(qA,{}):D.jsx(pde,{theme:Ede,children:D.jsxs(I8,{children:[D.jsx(N8,{}),D.jsx(Po,{hideSignUp:!1,formFields:Cde,components:{Footer:_de}})]})})},Ade=({children:t})=>wy()?D.jsx(Po.Provider,{children:D.jsx(xde,{children:t})}):D.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[D.jsx(wde,{}),t]}),AF=60;let Rc=null;const TF=()=>Math.floor(Date.now()/1e3),Tde=t=>t!==null&&t.expiresAt-AF>TF(),Rde=async()=>{const e=(await vy()).tokens?.idToken;return e?(Rc={value:e.toString(),expiresAt:e.payload.exp??TF()+AF},Rc.value):(Rc=null,null)},Ide=async()=>wy()?Tde(Rc)?Rc.value:Rde():null,Ode=()=>{Rc=null},xv={configure:U6,getToken:Ide,resetToken:Ode,Shell:Ade,Account:yde},Nde=({children:t})=>_y()?D.jsx(yv.Shell,{children:t}):D.jsx(xv.Shell,{children:t}),Mde=t=>_y()?D.jsx(yv.Account,{...t}):D.jsx(xv.Account,{...t}),Pde={configure:U6,getToken:()=>_y()?yv.getToken():xv.getToken(),resetToken:()=>{yv.resetToken(),xv.resetToken()},Shell:Nde,Account:Mde};var sp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},kde=class extends sp{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},HT=new kde,Dde={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Lde=class{#e=Dde;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},wl=new Lde;function Ude(t){setTimeout(t,0)}var Fde=typeof window>"u"||"Deno"in globalThis;function Lr(){}function zde(t,e){return typeof t=="function"?t(e):t}function sx(t){return typeof t=="number"&&t>=0&&t!==1/0}function RF(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Oa(t,e){return typeof t=="function"?t(e):t}function os(t,e){return typeof t=="function"?t(e):t}function _L(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==$T(a,e.options))return!1}else if(!wh(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||s&&s!==e.state.fetchStatus||o&&!o(e))}function xL(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(Ch(e.options.mutationKey)!==Ch(o))return!1}else if(!wh(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function $T(t,e){return(e?.queryKeyHashFn||Ch)(t)}function Ch(t){return JSON.stringify(t,(e,n)=>ix(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function wh(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>wh(t[n],e[n])):!1}var Bde=Object.prototype.hasOwnProperty;function IF(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=AL(t)&&AL(e);if(!r&&!(ix(t)&&ix(e)))return e;const o=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),u=a.length,c=r?new Array(u):{};let f=0;for(let p=0;p<u;p++){const g=r?p:a[p],m=t[g],y=e[g];if(m===y){c[g]=m,(r?p<o:Bde.call(t,g))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[g]=y;continue}const S=IF(m,y,n+1);c[g]=S,S===m&&f++}return o===u&&f===o?t:c}function ox(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function AL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function ix(t){if(!TL(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!TL(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function TL(t){return Object.prototype.toString.call(t)==="[object Object]"}function jde(t){return new Promise(e=>{wl.setTimeout(e,t)})}function ax(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?IF(t,e):e}function kxe(t){return t}function Hde(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function $de(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var qT=Symbol();function OF(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===qT?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function NF(t,e){return typeof t=="function"?t(...e):!!t}function qde(t,e,n){let r=!1,s;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??=e(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),t}var _h=(()=>{let t=()=>Fde;return{isServer(){return t()},setIsServer(e){t=e}}})();function lx(){let t,e;const n=new Promise((s,o)=>{t=s,e=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}var Wde=Ude;function Gde(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=Wde;const o=u=>{e?t.push(u):s(()=>{n(u)})},a=()=>{const u=t;t=[],u.length&&s(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;e++;try{c=u()}finally{e--,e||a()}return c},batchCalls:u=>(...c)=>{o(()=>{u(...c)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{s=u}}}var er=Gde(),Vde=class extends sp{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},Av=new Vde;function Kde(t){return Math.min(1e3*2**t,3e4)}function MF(t){return(t??"online")==="online"?Av.isOnline():!0}var ux=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function PF(t){let e=!1,n=0,r;const s=lx(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new ux(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>HT.isFocused()&&(t.networkMode==="always"||Av.isOnline())&&t.canRun(),p=()=>MF(t.networkMode)&&t.canRun(),g=E=>{o()||(r?.(),s.resolve(E))},m=E=>{o()||(r?.(),s.reject(E))},y=()=>new Promise(E=>{r=C=>{(o()||f())&&E(C)},t.onPause?.()}).then(()=>{r=void 0,o()||t.onContinue?.()}),S=()=>{if(o())return;let E;const C=n===0?t.initialPromise:void 0;try{E=C??t.fn()}catch(w){E=Promise.reject(w)}Promise.resolve(E).then(g).catch(w=>{if(o())return;const x=t.retry??(_h.isServer()?0:3),T=t.retryDelay??Kde,R=typeof T=="function"?T(n,w):T,M=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,w);if(e||!M){m(w);return}n++,t.onFail?.(n,w),jde(R).then(()=>f()?void 0:y()).then(()=>{e?m(w):S()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:c,canStart:p,start:()=>(p()?S():y().then(S),s)}}var kF=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sx(this.gcTime)&&(this.#e=wl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(_h.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(wl.clearTimeout(this.#e),this.#e=void 0)}};function Yde(t){return{onFetch:(e,n)=>{const r=e.options,s=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},c=0;const f=async()=>{let p=!1;const g=S=>{qde(S,()=>e.signal,()=>p=!0)},m=OF(e.options,e.fetchOptions),y=async(S,E,C)=>{if(p)return Promise.reject(e.signal.reason);if(E==null&&S.pages.length)return Promise.resolve(S);const x=(()=>{const O={client:e.client,queryKey:e.queryKey,pageParam:E,direction:C?"backward":"forward",meta:e.options.meta};return g(O),O})(),T=await m(x),{maxPages:R}=e.options,M=C?$de:Hde;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?DF:cx,C={pages:o,pageParams:a},w=E(r,C);u=await y(C,w,S)}else{const S=t??o.length;do{const E=c===0?a[0]??r.initialPageParam:cx(r,u);if(c>0&&E==null)break;u=await y(u,E),c++}while(c<S)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=f}}}function cx(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function DF(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}function Dxe(t,e){return e?cx(t,e)!=null:!1}function Lxe(t,e){return!e||!t.getPreviousPageParam?!1:DF(t,e)!=null}var Zde=class extends kF{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t){super(),this.#i=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#o=t.client,this.#r=this.#o.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=IL(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#a,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=IL(this.options);e.data!==void 0&&(this.setState(RL(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=ax(this.state.data,t,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t){this.#l({type:"setState",state:t})}cancel(t){const e=this.#s?.promise;return this.#s?.cancel(t),e?e.then(Lr).catch(Lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>os(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Oa(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!RF(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#s&&(this.#i||this.#c()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},s=()=>{const c=OF(this.options,e),p=(()=>{const g={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(g),g})();return this.#i=!1,this.options.persister?this.options.persister(c,p,this):c(p)},a=(()=>{const c={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:s};return r(c),c})();(this.#e==="infinite"?Yde(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:"fetch",meta:a.fetchOptions?.meta}),this.#s=PF({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof ux&&c.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(c,f)=>{this.#l({type:"failed",failureCount:c,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const c=await this.#s.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#r.config.onSuccess?.(c,this),this.#r.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof ux){if(c.silent)return this.#s.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#l({type:"error",error:c}),this.#r.config.onError?.(c,this),this.#r.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#l(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...LF(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...RL(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const s=t.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),er.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function LF(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:MF(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function RL(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function IL(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Xde=class extends sp{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=lx(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#n=void 0;#r=void 0;#o;#s;#a;#i;#c;#l;#p;#d;#f;#u;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),OL(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dx(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dx(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#E(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof os(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#t.setOptions(this.options),e._defaulted&&!ox(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&NL(this.#t,n,this.options,e)&&this.#h(),this.updateResult(),r&&(this.#t!==n||os(this.options.enabled,this.#t)!==os(e.enabled,this.#t)||Oa(this.options.staleTime,this.#t)!==Oa(e.staleTime,this.#t))&&this.#m();const s=this.#v();r&&(this.#t!==n||os(this.options.enabled,this.#t)!==os(e.enabled,this.#t)||s!==this.#u)&&this.#y(s)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),n=this.createResult(e,t);return Jde(this,n)&&(this.#r=n,this.#s=this.options,this.#o=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(n,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(t){this.#g.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),n=this.#e.getQueryCache().build(this.#e,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(t){this.#C();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Lr)),e}#m(){this.#S();const t=Oa(this.options.staleTime,this.#t);if(_h.isServer()||this.#r.isStale||!sx(t))return;const n=RF(this.#r.dataUpdatedAt,t)+1;this.#d=wl.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#E(),this.#u=t,!(_h.isServer()||os(this.options.enabled,this.#t)===!1||!sx(this.#u)||this.#u===0)&&(this.#f=wl.setInterval(()=>{(this.options.refetchIntervalInBackground||HT.isFocused())&&this.#h()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#S(){this.#d!==void 0&&(wl.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(wl.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const n=this.#t,r=this.options,s=this.#r,o=this.#o,a=this.#s,c=t!==n?t.state:this.#n,{state:f}=t;let p={...f},g=!1,m;if(e._optimisticResults){const P=this.hasListeners(),k=!P&&OL(t,e),H=P&&NL(t,n,e,r);(k||H)&&(p={...p,...LF(f.data,t.options)}),e._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:S,status:E}=p;m=p.data;let C=!1;if(e.placeholderData!==void 0&&m===void 0&&E==="pending"){let P;s?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(P=s.data,C=!0):P=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,P!==void 0&&(E="success",m=ax(s?.data,P,e),g=!0)}if(e.select&&m!==void 0&&!C)if(s&&m===o?.data&&e.select===this.#c)m=this.#l;else try{this.#c=e.select,m=e.select(m),m=ax(s?.data,m,e),this.#l=m,this.#i=null}catch(P){this.#i=P}this.#i&&(y=this.#i,m=this.#l,S=Date.now(),E="error");const w=p.fetchStatus==="fetching",x=E==="pending",T=E==="error",R=x&&w,M=m!==void 0,I={status:E,fetchStatus:p.fetchStatus,isPending:x,isSuccess:E==="success",isError:T,isInitialLoading:R,isLoading:R,data:m,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:T&&!M,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&M,isStale:WT(t,e),refetch:this.refetch,promise:this.#a,isEnabled:os(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=I.data!==void 0,k=I.status==="error"&&!P,H=W=>{k?W.reject(I.error):P&&W.resolve(I.data)},F=()=>{const W=this.#a=I.promise=lx();H(W)},B=this.#a;switch(B.status){case"pending":t.queryHash===n.queryHash&&H(B);break;case"fulfilled":(k||I.data!==B.value)&&F();break;case"rejected":(!k||I.error!==B.reason)&&F();break}}return I}updateResult(){const t=this.#r,e=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#s=this.options,this.#o.data!==void 0&&(this.#p=this.#t),ox(e,t))return;this.#r=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#g.size)return!0;const o=new Set(s??this.#g);return this.options.throwOnError&&o.add("error"),Object.keys(this.#r).some(a=>{const u=a;return this.#r[u]!==t[u]&&o.has(u)})};this.#w({listeners:n()})}#C(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#w(t){er.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Qde(t,e){return os(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&os(e.retryOnMount,t)===!1)}function OL(t,e){return Qde(t,e)||t.state.data!==void 0&&dx(t,e,e.refetchOnMount)}function dx(t,e,n){if(os(e.enabled,t)!==!1&&Oa(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&WT(t,e)}return!1}function NL(t,e,n,r){return(t!==e||os(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&WT(t,n)}function WT(t,e){return os(e.enabled,t)!==!1&&t.isStaleByTime(Oa(e.staleTime,t))}function Jde(t,e){return!ox(t.getCurrentResult(),e)}var efe=class extends kF{#e;#t;#n;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||tfe(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#o({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=PF({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,a)=>{this.#o({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#o({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",s=!this.#r.canStart();try{if(r)e();else{this.#o({type:"pending",variables:t,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const a=await this.options.onMutate?.(t,n);a!==this.state.context&&this.#o({type:"pending",context:a,variables:t,isPaused:s})}const o=await this.#r.start();return await this.#n.config.onSuccess?.(o,t,this.state.context,this,n),await this.options.onSuccess?.(o,t,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,t,this.state.context,n),this.#o({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,t,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(o,t,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,o,t,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#o({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#o(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),er.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function tfe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var UF=class extends sp{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,n){const r=new efe({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){this.#e.add(t);const e=em(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=em(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=em(t);if(typeof e=="string"){const r=this.#t.get(e)?.find(s=>s.state.status==="pending");return!r||r===t}else return!0}runNext(t){const e=em(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){er.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>xL(e,n))}findAll(t={}){return this.getAll().filter(e=>xL(t,e))}notify(t){er.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return er.batch(()=>Promise.all(t.map(e=>e.continue().catch(Lr))))}};function em(t){return t.options.scope?.id}var FF=class extends sp{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??$T(r,e);let o=this.get(s);return o||(o=new Zde({client:t,queryKey:r,queryHash:s,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){er.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>_L(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>_L(t,n)):e}notify(t){er.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){er.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){er.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nfe=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new FF,this.#t=t.mutationCache||new UF,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=HT.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Av.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Oa(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,a=zde(e,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return er.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;er.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return er.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=er.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Lr).catch(Lr)}invalidateQueries(t,e={}){return er.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=er.batch(()=>this.#e.findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Lr)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Lr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(Oa(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Lr).catch(Lr)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Lr).catch(Lr)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Av.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#r.set(Ch(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{wh(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(Ch(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{wh(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=$T(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===qT&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},zF=A.createContext(void 0),BF=t=>{const e=A.useContext(zF);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},rfe=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),D.jsx(zF.Provider,{value:t,children:e})),jF=A.createContext(!1),sfe=()=>A.useContext(jF);jF.Provider;function ofe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var ife=A.createContext(ofe()),afe=()=>A.useContext(ife),lfe=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?NF(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},ufe=t=>{A.useEffect(()=>{t.clearReset()},[t])},cfe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||NF(n,[t.error,r])),dfe=t=>{if(t.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ffe=(t,e)=>t.isLoading&&t.isFetching&&!e,hfe=(t,e)=>t?.suspense&&e.isPending,ML=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function pfe(t,e,n){const r=sfe(),s=afe(),o=BF(),a=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const u=o.getQueryCache().get(a.queryHash),c=t.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,dfe(a),lfe(a,s,u),ufe(s);const f=!o.getQueryCache().get(a.queryHash),[p]=A.useState(()=>new e(o,a)),g=p.getOptimisticResult(a),m=!r&&c;if(A.useSyncExternalStore(A.useCallback(y=>{const S=m?p.subscribe(er.batchCalls(y)):Lr;return p.updateResult(),S},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),A.useEffect(()=>{p.setOptions(a)},[a,p]),hfe(a,g))throw ML(a,p,s);if(cfe({result:g,errorResetBoundary:s,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw g.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(a,g),a.experimental_prefetchInRender&&!_h.isServer()&&ffe(g,r)&&(f?ML(a,p,s):u?.promise)?.catch(Lr).finally(()=>{p.updateResult()}),a.notifyOnChangeProps?g:p.trackResult(g)}function gfe(t,e){return pfe(t,Xde)}const mfe="modulepreload",vfe=function(t){return"/"+t},PL={},qn=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");s=c(n.map(f=>{if(f=vfe(f),f in PL)return;PL[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const m=document.createElement("link");if(m.rel=p?"stylesheet":mfe,p||(m.as="script"),m.crossOrigin="",m.href=f,u&&m.setAttribute("nonce",u),document.head.appendChild(m),p)return new Promise((y,S)=>{m.addEventListener("load",y),m.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return s.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return e().catch(o)})};var kL=A.use,Sc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Mw(t){const e=A.useRef({value:t,prev:null}),n=e.current.value;return t!==n&&(e.current={value:t,prev:n}),e.current.prev}function yfe(t,e,n={},r={}){A.useEffect(()=>{if(!t.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([o])=>{e(o)},n);return s.observe(t.current),()=>{s.disconnect()}},[e,n,r.disabled,t])}function bfe(t){const e=A.useRef(null);return A.useImperativeHandle(t,()=>e.current,[]),e}const HF=!1;function xh(t){return t[t.length-1]}function Sfe(t){return typeof t=="function"}function _l(t,e){return Sfe(t)?t(e):t}const $F=Object.prototype.hasOwnProperty,DL=Object.prototype.propertyIsEnumerable;function qF(t){for(const e in t)if($F.call(t,e))return!0;return!1}const Efe=()=>Object.create(null),yl=(t,e)=>xl(t,e,Efe);function xl(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=FL(t)&&FL(s);if(!o&&!(Tv(t)&&Tv(s)))return s;const a=o?t:LL(t);if(!a)return s;const u=o?s:LL(s);if(!u)return s;const c=a.length,f=u.length,p=o?new Array(f):n();let g=0;for(let m=0;m<f;m++){const y=o?m:u[m],S=t[y],E=s[y];if(S===E){p[y]=S,(o?m<c:$F.call(t,y))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){p[y]=E;continue}const C=xl(S,E,n,r+1);p[y]=C,C===S&&g++}return c===f&&g===c?t:p}function LL(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!DL.call(t,s))return!1;const n=Object.getOwnPropertySymbols(t);if(n.length===0)return e;const r=e;for(const s of n){if(!DL.call(t,s))return!1;r.push(s)}return r}function Tv(t){if(!UL(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!UL(n)||!n.hasOwnProperty("isPrototypeOf"))}function UL(t){return Object.prototype.toString.call(t)==="[object Object]"}function FL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Nl(t,e,n){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,s=t.length;r<s;r++)if(!Nl(t[r],e[r],n))return!1;return!0}if(Tv(t)&&Tv(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Nl(t[a],e[a],n))return!1;return!0}let s=0;if(!r)s=Object.keys(t).length;else for(const a in t)t[a]!==void 0&&s++;let o=0;for(const a in e)if((!r||e[a]!==void 0)&&(o++,o>s||!Nl(t[a],e[a],n)))return!1;return s===o}return!1}function Uc(t){let e,n;const r=new Promise((s,o)=>{e=s,n=o});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,e(s),t?.(s)},r.reject=s=>{r.status="rejected",n(s)},r}function Cfe(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function Ah(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const wfe=/[\x00-\x1f\x7f"<>`{}]/g;function _fe(t){return t.replace(wfe,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function zL(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return _fe(e)}const xfe=["http:","https:","mailto:","tel:"];function Rv(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function Rf(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let n=0,r="",s;for(;(s=e.exec(t))!==null;)r+=zL(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+zL(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function Afe(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function Tfe(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function pi(){throw new Error("Invariant failed")}function Th(t){const e=new Map;let n,r;const s=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const a=e.get(o);if(a)return s(a),a.value},set(o,a){if(e.size>=t&&n){const c=n;e.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const u=e.get(o);if(u)u.value=a,s(u);else{const c={key:o,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),e.set(o,c)}},clear(){e.clear(),n=void 0,r=void 0}}}const Ta=4,WF=5;function Rfe(t){const e=t.indexOf("{");if(e===-1)return null;const n=t.indexOf("}",e);return n===-1||e+1>=t.length?null:[e,n]}function GF(t,e,n=new Uint16Array(6)){const r=t.indexOf("/",e),s=r===-1?t.length:r,o=t.substring(e,s);if(!o||!o.includes("$"))return n[0]=0,n[1]=e,n[2]=e,n[3]=s,n[4]=s,n[5]=s,n;if(o==="$"){const u=t.length;return n[0]=2,n[1]=e,n[2]=e,n[3]=u,n[4]=u,n[5]=u,n}if(o.charCodeAt(0)===36)return n[0]=1,n[1]=e,n[2]=e+1,n[3]=s,n[4]=s,n[5]=s,n;const a=Rfe(o);if(a){const[u,c]=a,f=o.charCodeAt(u+1);if(f===45){if(u+2<o.length&&o.charCodeAt(u+2)===36){const p=u+3,g=c;if(p<g)return n[0]=3,n[1]=e+u,n[2]=e+p,n[3]=e+g,n[4]=e+c+1,n[5]=s,n}}else if(f===36){const p=u+1,g=u+2;return g===c?(n[0]=2,n[1]=e+u,n[2]=e+p,n[3]=e+g,n[4]=e+c+1,n[5]=t.length,n):(n[0]=1,n[1]=e+u,n[2]=e+g,n[3]=e+c,n[4]=e+c+1,n[5]=s,n)}}return n[0]=0,n[1]=e,n[2]=e,n[3]=s,n[4]=s,n[5]=s,n}function sb(t,e,n,r,s,o,a){a?.(n);let u=r;{const c=n.fullPath??n.from,f=c.length,p=n.options?.caseSensitive??t,g=n.options?.params?.parse??n.options?.parseParams;for(;u<f;){const y=GF(c,u,e);let S;const E=u,C=y[5];switch(u=C+1,o++,y[0]){case 0:{const w=c.substring(y[2],y[3]);if(p){const x=s.static?.get(w);if(x)S=x;else{s.static??=new Map;const T=Al(n.fullPath??n.from);T.parent=s,T.depth=o,S=T,s.static.set(w,T)}}else{const x=w.toLowerCase(),T=s.staticInsensitive?.get(x);if(T)S=T;else{s.staticInsensitive??=new Map;const R=Al(n.fullPath??n.from);R.parent=s,R.depth=o,S=R,s.staticInsensitive.set(x,R)}}break}case 1:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=p&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,O=!g&&s.dynamic?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(O)S=O;else{const I=kw(1,n.fullPath??n.from,T,R,M);S=I,I.depth=o,I.parent=s,s.dynamic??=[],s.dynamic.push(I)}break}case 3:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=p&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,O=!g&&s.optional?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(O)S=O;else{const I=kw(3,n.fullPath??n.from,T,R,M);S=I,I.parent=s,I.depth=o,s.optional??=[],s.optional.push(I)}break}case 2:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=p&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,O=kw(2,n.fullPath??n.from,T,R,M);S=O,O.parent=s,O.depth=o,s.wildcard??=[],s.wildcard.push(O)}}s=S}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const y=Al(n.fullPath??n.from);y.kind=WF,y.parent=s,o++,y.depth=o,s.pathless??=[],s.pathless.push(y),s=y}const m=(n.path||!n.children)&&!n.isRoot;if(m&&c.endsWith("/")){const y=Al(n.fullPath??n.from);y.kind=Ta,y.parent=s,o++,y.depth=o,s.index=y,s=y}s.parse=g??null,s.priority=n.options?.params?.priority??0,m&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)sb(t,e,c,u,s,o,a)}function Pw(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function ya(t){if(t.pathless)for(const e of t.pathless)ya(e);if(t.static)for(const e of t.static.values())ya(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())ya(e);if(t.dynamic?.length){t.dynamic.sort(Pw);for(const e of t.dynamic)ya(e)}if(t.optional?.length){t.optional.sort(Pw);for(const e of t.optional)ya(e)}if(t.wildcard?.length){t.wildcard.sort(Pw);for(const e of t.wildcard)ya(e)}}function Al(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}function kw(t,e,n,r,s){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:s}}function Ife(t,e){const n=Al("/"),r=new Uint16Array(6);for(const s of t)sb(!1,r,s,1,n,0);ya(n),e.masksTree=n,e.flatCache=Th(1e3)}function Ofe(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=GT(t,e.masksTree);return e.flatCache.set(t,r),r}function Nfe(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Al("/"),sb(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),GT(r,a,n)}function Mfe(t,e,n=!1){const r=n?t:`nofuzz\0${t}`,s=e.matchCache.get(r);if(s!==void 0)return s;t||="/";let o;try{o=GT(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=KF(o.route)),e.matchCache.set(r,o),o}function Pfe(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function kfe(t,e=!1,n){const r=Al(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return sb(e,s,t,1,r,0,c=>{if(n?.(c,u),c.id in o&&pi(),o[c.id]=c,u!==0&&c.path){const f=Pfe(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),ya(r),{processedTree:{segmentTree:r,singleCache:Th(1e3),matchCache:Th(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function GT(t,e,n=!1){const r=t.split("/"),s=Lfe(t,r,e,n);if(!s)return null;const[o]=VF(t,r,s);return{route:s.node.route,rawParams:o}}function VF(t,e,n){const r=Dfe(n.node);let s=null;const o=Object.create(null);let a=n.extract?.part??0,u=n.extract?.node??0,c=n.extract?.path??0,f=n.extract?.segment??0;for(;u<r.length;a++,u++,c++,f++){const p=r[u];if(p.kind===Ta)break;if(p.kind===WF){f--,a--,c--;continue}const g=e[a],m=c;if(g&&(c+=g.length),p.kind===1){s??=n.node.fullPath.split("/");const y=s[f],S=p.prefix?.length??0;if(y.charCodeAt(S)===123){const E=p.suffix?.length??0,C=y.substring(S+2,y.length-E-1),w=g.substring(S,g.length-E);o[C]=decodeURIComponent(w)}else{const E=y.substring(1);o[E]=decodeURIComponent(g)}}else if(p.kind===3){if(n.skipped&1<<u){a--,c=m-1;continue}s??=n.node.fullPath.split("/");const y=s[f],S=p.prefix?.length??0,E=p.suffix?.length??0,C=y.substring(S+3,y.length-E-1),w=p.suffix||p.prefix?g.substring(S,g.length-E):g;w&&(o[C]=decodeURIComponent(w))}else if(p.kind===2){const y=p,S=t.substring(m+(y.prefix?.length??0),t.length-(y.suffix?.length??0)),E=decodeURIComponent(S);o["*"]=E,o._splat=E;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:u,path:c,segment:f}]}function KF(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function Dfe(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function Lfe(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const s=!xh(e),o=s&&t!=="/",a=e.length-(s?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let c=null,f=null;for(;u.length;){const p=u.pop(),{node:g,index:m,skipped:y,depth:S,statics:E,dynamics:C,optionals:w}=p;let{extract:x,rawParams:T}=p;if(g.kind===2&&g.route&&!nm(f,p))continue;if(g.parse){if(!BL(t,e,p))continue;T=p.rawParams,x=p.extract}r&&g.route&&g.kind!==Ta&&nm(c,p)&&(c=p);const R=m===a;if(R&&(g.route&&(!o||g.kind===Ta||g.kind===2)&&nm(f,p)&&(f=p),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const M=R?void 0:e[m];let O;if(R&&g.index){const I={node:g.index,index:m,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T};let P=!0;if(g.index.parse&&(BL(t,e,I)||(P=!1)),P){if(!C&&!w&&!y&&Ufe(E,a))return I;nm(f,I)&&(f=I)}}if(g.wildcard)for(let I=g.wildcard.length-1;I>=0;I--){const P=g.wildcard[I],{prefix:k,suffix:H}=P;if(!(k&&(R||!(P.caseSensitive?M:O??=M.toLowerCase()).startsWith(k)))){if(H){if(R)continue;const F=e.slice(m).join("/").slice(-H.length);if((P.caseSensitive?F:F.toLowerCase())!==H)continue}u.push({node:P,index:a,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}}if(g.optional){const I=y|1<<S,P=S+1;for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k];u.push({node:H,index:m,skipped:I,depth:P,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}if(!R)for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k],{prefix:F,suffix:B}=H;if(F||B){const W=H.caseSensitive?M:O??=M.toLowerCase();if(F&&!W.startsWith(F)||B&&!W.endsWith(B))continue}u.push({node:H,index:m+1,skipped:y,depth:P,statics:E,dynamics:C,optionals:w+tm(a,m),extract:x,rawParams:T})}}if(!R&&g.dynamic&&M)for(let I=g.dynamic.length-1;I>=0;I--){const P=g.dynamic[I],{prefix:k,suffix:H}=P;if(k||H){const F=P.caseSensitive?M:O??=M.toLowerCase();if(k&&!F.startsWith(k)||H&&!F.endsWith(H))continue}u.push({node:P,index:m+1,skipped:y,depth:S+1,statics:E,dynamics:C+tm(a,m),optionals:w,extract:x,rawParams:T})}if(!R&&g.staticInsensitive){const I=g.staticInsensitive.get(O??=M.toLowerCase());I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+tm(a,m),dynamics:C,optionals:w,extract:x,rawParams:T})}if(!R&&g.static){const I=g.static.get(M);I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+tm(a,m),dynamics:C,optionals:w,extract:x,rawParams:T})}if(g.pathless){const I=S+1;for(let P=g.pathless.length-1;P>=0;P--){const k=g.pathless[P];u.push({node:k,index:m,skipped:y,depth:I,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}}}if(f)return f;if(r&&c){let p=c.index;for(let m=0;m<c.index;m++)p+=e[m].length;const g=p===t.length?"/":t.slice(p);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(g),c}return null}function tm(t,e){return 2**(t-e-1)}function Ufe(t,e){return t===2**(e-1)-1}function BL(t,e,n){let r,s;try{[r,s]=VF(t,e,n)}catch{return null}if(n.rawParams=r,n.extract=s,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function nm(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===Ta)>(t.node.kind===Ta)||e.node.kind===Ta==(t.node.kind===Ta)&&e.depth>t.depth))):!0}function ev(t){return VT(t.filter(e=>e!==void 0).join("/"))}function VT(t){return t.replace(/\/{2,}/g,"/")}function YF(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function fi(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function ZF(t){return fi(YF(t))}function Iv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function Ffe(t,e,n){return Iv(t,n)===Iv(e,n)}function zfe({base:t,to:e,trailingSlash:n="never",cache:r}){const s=e.startsWith("/"),o=!s&&e===".";let a;if(r){a=s?e:o?t:t+"\0"+e;const f=r.get(a);if(f)return f}let u;if(o)u=t.split("/");else if(s)u=e.split("/");else{for(u=t.split("/");u.length>1&&xh(u)==="";)u.pop();const f=e.split("/");for(let p=0,g=f.length;p<g;p++){const m=f[p];m===""?p?p===g-1&&u.push(m):u=[m]:m===".."?u.pop():m==="."||u.push(m)}}u.length>1&&(xh(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=VT(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function Bfe(t){const e=new Map(t.map(s=>[encodeURIComponent(s),s])),n=Array.from(e.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return s=>s.replace(r,o=>e.get(o)??o)}function Dw(t,e,n){const r=e[t];return typeof r!="string"?r:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>HL(s,n)).join("/"):HL(r,n)}function jL({path:t,params:e,decoder:n,...r}){let s=!1;const o=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:s};if(!t.includes("$"))return{interpolatedPath:t,usedParams:o,isMissingParams:s};const a=t.length;let u=0,c,f="";for(;u<a;){const p=u;c=GF(t,p,c);const g=c[5];if(u=g+1,p===g)continue;const m=c[0];if(m===0){f+="/"+t.substring(p,g);continue}if(m===2){const y=e._splat;o._splat=y,o["*"]=y;const S=t.substring(p,c[1]),E=t.substring(c[4],g);if(!y){s=!0,(S||E)&&(f+="/"+S+E);continue}const C=Dw("_splat",e,n);f+="/"+S+C+E;continue}if(m===1){const y=t.substring(c[2],c[3]);!s&&!(y in e)&&(s=!0),o[y]=e[y];const S=t.substring(p,c[1]),E=t.substring(c[4],g),C=Dw(y,e,n)??"undefined";f+="/"+S+C+E;continue}if(m===3){const y=t.substring(c[2],c[3]),S=e[y];if(S==null)continue;o[y]=S;const E=t.substring(p,c[1]),C=t.substring(c[4],g),w=Dw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function HL(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function cr(t){return t?.isNotFound===!0}function jfe(){try{return sessionStorage}catch{return}}const Hfe="tsr-scroll-restoration-v1_3",XF=jfe();function $fe(){try{return JSON.parse(XF?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function qfe(){try{XF?.setItem(Hfe,JSON.stringify(fc))}catch{}}const fc=$fe(),$L="data-scroll-restoration-id",Wfe=t=>t.state.__TSR_key||t.href;function Gfe(t){const e=t.getAttribute($L);if(e)return`[${$L}="${e}"]`;let n="",r=t,s;for(;s=r.parentNode;){let o=1,a=r;for(;a=a.previousElementSibling;)o++;const u=`${r.localName}:nth-child(${o})`;n=n?`${u} > ${n}`:u,r=s}return n}let rm=!1;const tv="window";function fx(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function qL(t){const e=new Set;for(const n of t){if(n===tv)continue;const r=fx(n);r&&e.add(r)}return e}function Vfe(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||Wfe,o=new Set,a=u=>{const c=fc[u]||={};for(const f of o)f===document?c[tv]={scrollX,scrollY}:f.isConnected&&(c[Gfe(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,rm=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{rm||o.add(u.target)},!0),t.subscribe("onBeforeLoad",u=>{u.fromLocation&&a(s(u.fromLocation)),o.clear()}),addEventListener("pagehide",()=>{a(s(t.stores.resolvedLocation.get()??t.stores.location.get())),qfe()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",u=>{const c=t.options.scrollRestorationBehavior,f=t.options.scrollToTopSelectors,p=r.next,g=r.hash;let m;if(o.clear(),r.next=!0,r.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const y=s(u.toLocation),S=u.fromLocation&&s(u.fromLocation);if(r.restoring&&S&&S!==y){const E=fc[S];if(E){let C=fc[y];for(const w in E){if(w===tv){if(p)continue}else{const x=fx(w);if(!x||p&&f&&(m??=qL(f),m.has(x)))continue}C||(C=fc[y]={}),C[w]??=E[w]}}}rm=!0;try{const E=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(p){!E&&f&&(m??=qL(f));const x=E&&C&&g,T=r.restoring?fc[y]:void 0;if(T)for(const R in T){const{scrollX:M,scrollY:O}=T[R];if(R===tv){if(x)continue;scrollTo({top:O,left:M,behavior:c}),w=!0}else{const I=fx(R);I&&(I.scrollLeft=M,I.scrollTop=O,m?.delete(I))}}if(!E){const R={top:0,left:0,behavior:c};if(w||scrollTo(R),m)for(const M of m)M.scrollTo(R)}}!w&&E&&C&&document.getElementById(E)?.scrollIntoView(C)}finally{rm=!1}}))}function Kfe(t,e=String){const n=new URLSearchParams;for(const r in t){const s=t[r];s!==void 0&&n.set(r,e(s))}return n.toString()}function Lw(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function Yfe(t){const e=new URLSearchParams(t),n=Object.create(null);for(const[r,s]of e.entries()){const o=n[r];o==null?n[r]=Lw(s):Array.isArray(o)?o.push(Lw(s)):n[r]=[o,Lw(s)]}return n}const Zfe=Qfe(JSON.parse),Xfe=Jfe(JSON.stringify,JSON.parse);function Qfe(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=Yfe(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function Jfe(t,e){const n=typeof e=="function";function r(s){if(typeof s=="object"&&s!==null)try{return t(s)}catch{}else if(n&&typeof s=="string")try{return e(s),t(s)}catch{}return s}return s=>{const o=Kfe(s,r);return o?`?${o}`:""}}const Ml="__root__";function QF(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const n=new Response(null,{status:t.statusCode,headers:e});if(n.options=t,t.throw)throw n;return n}function Fr(t){return t instanceof Response&&!!t.options}function ehe(t){return{input:({url:e})=>{for(const n of t)e=hx(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=JF(t[n],e);return e}}}function the(t){const e=ZF(t.basepath),n=`/${e}`,r=t.caseSensitive?n:n.toLowerCase(),s=`${r}/`;return{input:({url:o})=>{const a=t.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===r?o.pathname="/":a.startsWith(s)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=ev(["/",e,o.pathname]),o)}}function hx(t,e){const n=t?.input?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function JF(t,e){const n=t?.output?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function nhe(t,e){const{createMutableStore:n,createReadonlyStore:r,batch:s,init:o}=e,a=new Map,u=new Map,c=new Map,f=n(t.status),p=n(t.loadedAt),g=n(t.isLoading),m=n(t.isTransitioning),y=n(t.location),S=n(t.resolvedLocation),E=n(t.statusCode),C=n(t.redirect),w=n([]),x=n([]),T=n([]),R=r(()=>Uw(a,w.get())),M=r(()=>Uw(u,x.get())),O=r(()=>Uw(c,T.get())),I=r(()=>w.get()[0]),P=r(()=>w.get().some(ee=>a.get(ee)?.get().status==="pending")),k=r(()=>({locationHref:y.get().href,resolvedLocationHref:S.get()?.href,status:f.get()})),H=r(()=>({status:f.get(),loadedAt:p.get(),isLoading:g.get(),isTransitioning:m.get(),matches:R.get(),location:y.get(),resolvedLocation:S.get(),statusCode:E.get(),redirect:C.get()})),F=Th(64);function B(ee){let fe=F.get(ee);return fe||(fe=r(()=>{const de=w.get();for(const Ae of de){const L=a.get(Ae);if(L&&L.routeId===ee)return L.get()}}),F.set(ee,fe)),fe}const W={status:f,loadedAt:p,isLoading:g,isTransitioning:m,location:y,resolvedLocation:S,statusCode:E,redirect:C,matchesId:w,pendingIds:x,cachedIds:T,matches:R,pendingMatches:M,cachedMatches:O,firstId:I,hasPending:P,matchRouteDeps:k,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:H,getRouteMatchStore:B,setMatches:Y,setPending:ne,setCached:$};Y(t.matches),o?.(W);function Y(ee){Fw(ee,a,w,n,s)}function ne(ee){Fw(ee,u,x,n,s)}function $(ee){Fw(ee,c,T,n,s)}return W}function Uw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function Fw(t,e,n,r,s){const o=t.map(u=>u.id),a=new Set(o);s(()=>{for(const u of e.keys())a.has(u)||e.delete(u);for(const u of t){const c=e.get(u.id);if(!c){const f=r(u);f.routeId=u.routeId,e.set(u.id,f);continue}c.routeId=u.routeId,c.get()!==u&&c.set(u)}Tfe(n.get(),o)||n.set(o)})}const px=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},rhe=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),ob=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Pl=(t,e,n=!0)=>{const r={...t.router.options.context??{}},s=n?e:e-1;for(let o=0;o<=s;o++){const a=t.matches[o];if(!a)continue;const u=t.router.getMatch(a.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},WL=(t,e)=>{if(!t.matches.length)return;const n=e.routeId,r=t.matches.findIndex(a=>a.routeId===t.router.routeTree.id),s=r>=0?r:0;let o=n?t.matches.findIndex(a=>a.routeId===n):t.firstBadMatchIndex??t.matches.length-1;o<0&&(o=s);for(let a=o;a>=0;a--){const u=t.matches[a];if(t.router.looseRoutesById[u.routeId].options.notFoundComponent)return a}return n?o:s},Ra=(t,e,n)=>{if(!(!Fr(n)&&!cr(n)))throw Fr(n)&&n.redirectHandled&&!n.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=n,t.updateMatch(e.id,r=>({...r,status:Fr(n)?"redirected":cr(n)?"notFound":r.status==="pending"?"success":r.status,context:Pl(t,e.index),isFetching:!1,error:n})),cr(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),Fr(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},e7=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},GL=(t,e,n)=>{const r=Pl(t,n);t.updateMatch(e,s=>({...s,context:r}))},If=(t,e,n)=>{const{id:r,routeId:s}=t.matches[e],o=t.router.looseRoutesById[s];if(n instanceof Promise)throw n;t.firstBadMatchIndex??=e,Ra(t,t.router.getMatch(r),n);try{o.options.onError?.(n)}catch(a){n=a,Ra(t,t.router.getMatch(r),n)}t.updateMatch(r,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!Fr(n)&&!cr(n)&&(t.serialError??=n)},t7=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!ob(t,e)&&(n.options.loader||n.options.beforeLoad||r7(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{px(t)},s);r._nonReactive.pendingTimeout=o}},she=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;t7(t,e,n,r);const s=()=>{const o=t.router.getMatch(e);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Ra(t,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},ohe=(t,e,n,r)=>{const s=t.router.getMatch(e);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Uc(()=>{o?.resolve(),o=void 0});const{paramsError:a,searchError:u}=s;a&&If(t,n,a),u&&If(t,n,u),t7(t,e,r,s);const c=new AbortController;let f=!1;const p=()=>{f||(f=!0,t.updateMatch(e,R=>({...R,isFetching:"beforeLoad",fetchCount:R.fetchCount+1,abortController:c})))},g=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,R=>({...R,isFetching:!1}))};if(!r.options.beforeLoad){t.router.batch(()=>{p(),g()});return}s._nonReactive.beforeLoadPromise=Uc();const m={...Pl(t,n,!1),...s.__routeContext},{search:y,params:S,cause:E}=s,C=ob(t,e),w={search:y,abortController:c,params:S,preload:C,context:m,location:t.location,navigate:R=>t.router.navigate({...R,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:C?"preload":E,matches:t.matches,routeId:r.id,...t.router.options.additionalContext},x=R=>{if(R===void 0){t.router.batch(()=>{p(),g()});return}(Fr(R)||cr(R))&&(p(),If(t,n,R)),t.router.batch(()=>{p(),t.updateMatch(e,M=>({...M,__beforeLoadContext:R})),g()})};let T;try{if(T=r.options.beforeLoad(w),Ah(T))return p(),T.catch(R=>{If(t,n,R)}).then(x)}catch(R){p(),If(t,n,R)}x(T)},ihe=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>ohe(t,n,e,s),u=()=>{if(e7(t,n))return;const c=she(t,n,s);return Ah(c)?c.then(a):a()};return o()},ahe=(t,e,n)=>{const r=t.router.getMatch(e);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:t.router.options.ssr,matches:t.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([o,a,u])=>({meta:o?.meta,links:o?.links,headScripts:o?.scripts,headers:u,scripts:a,styles:o?.styles}))},n7=(t,e,n,r,s)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),p=Pl(t,r),g=ob(t,n);return{params:a,deps:u,preload:!!g,parentMatchPromise:o,abortController:c,context:p,location:t.location,navigate:m=>t.router.navigate({...m,_fromLocation:t.location}),cause:g?"preload":f,route:s,...t.router.options.additionalContext}},VL=async(t,e,n,r,s)=>{try{const o=t.router.getMatch(n);try{(!(HF??t.router.isServer)||o.ssr===!0)&&Rh(s);const a=s.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(n7(t,e,n,r,s)),f=!!u&&Ah(c);if((f||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||o._nonReactive.minPendingPromise)&&t.updateMatch(n,g=>({...g,isFetching:"loader"})),u){const g=f?await c:c;Ra(t,t.router.getMatch(n),g),g!==void 0&&t.updateMatch(n,m=>({...m,loaderData:g}))}s._lazyPromise&&await s._lazyPromise;const p=o._nonReactive.minPendingPromise;p&&await p,s._componentsPromise&&await s._componentsPromise,t.updateMatch(n,g=>({...g,error:void 0,context:Pl(t,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let u=a;if(u?.name==="AbortError"){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}t.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:Pl(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,cr(a)&&await s.options.notFoundComponent?.preload?.(),Ra(t,t.router.getMatch(n),a);try{s.options.onError?.(a)}catch(f){u=f,Ra(t,t.router.getMatch(n),f)}!Fr(u)&&!cr(u)&&await Rh(s,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Pl(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Ra(t,a,o)}},lhe=async(t,e,n)=>{async function r(y,S,E,C,w){const x=Date.now()-S.updatedAt,T=y?w.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??t.router.options.defaultStaleTime??0,R=w.options.shouldReload,M=typeof R=="function"?R(n7(t,e,s,n,w)):R,{status:O,invalid:I}=C,P=x>=T&&(!!t.forceStaleReload||C.cause==="enter"||E!==void 0&&E!==C.id);a=O==="success"&&(I||(M??P)),y&&w.options.preload===!1||(a&&!t.sync&&p?(u=!0,(async()=>{try{await VL(t,e,s,n,w);const k=t.router.getMatch(s);k._nonReactive.loaderPromise?.resolve(),k._nonReactive.loadPromise?.resolve(),k._nonReactive.loaderPromise=void 0,k._nonReactive.loadPromise=void 0}catch(k){Fr(k)&&await t.router.navigate(k.options)}})()):O!=="success"||a?await VL(t,e,s,n,w):GL(t,s,n))}const{id:s,routeId:o}=t.matches[n];let a=!1,u=!1;const c=t.router.looseRoutesById[o],f=c.options.loader,p=((typeof f=="function"?void 0:f?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(e7(t,s)){if(!t.router.getMatch(s))return t.matches[n];GL(t,s,n)}else{const y=t.router.getMatch(s),S=t.router.stores.matchesId.get()[n],E=(S&&t.router.stores.matchStores.get(S)||null)?.routeId===o?S:t.router.stores.matches.get().find(w=>w.routeId===o)?.id,C=ob(t,s);if(y._nonReactive.loaderPromise){if(y.status==="success"&&!t.sync&&!y.preload&&p)return y;await y._nonReactive.loaderPromise;const w=t.router.getMatch(s),x=w._nonReactive.error||w.error;x&&Ra(t,w,x),w.status==="pending"&&await r(C,y,E,w,c)}else{const w=C&&!t.router.stores.matchStores.has(s),x=t.router.getMatch(s);x._nonReactive.loaderPromise=Uc(),w!==x.preload&&t.updateMatch(s,T=>({...T,preload:w})),await r(C,y,E,x,c)}}const g=t.router.getMatch(s);u||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,u||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const m=u?g.isFetching:!1;return m!==g.isFetching||g.invalid!==!1?(t.updateMatch(s,y=>({...y,isFetching:m,invalid:!1})),t.router.getMatch(s)):g};async function KL(t){const e=t,n=[];rhe(e.router)&&px(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=ihe(e,m);Ah(y)&&await y}catch(y){if(Fr(y))throw y;if(cr(y))r=y;else if(!e.preload)throw y;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const s=e.firstBadMatchIndex??e.matches.length,o=r&&!e.preload?WL(e,r):void 0,a=r&&e.preload?0:o!==void 0?Math.min(o+1,s):s;let u,c;for(let m=0;m<a;m++)n.push(lhe(e,n,m));try{await Promise.all(n)}catch{const m=await Promise.allSettled(n);for(const y of m){if(y.status!=="rejected")continue;const S=y.reason;if(Fr(S))throw S;cr(S)?u??=S:c??=S}if(c!==void 0)throw c}const f=u??(r&&!e.preload?r:void 0);let p=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!f&&r&&e.preload)return e.matches;if(f){const m=WL(e,f);m===void 0&&pi();const y=e.matches[m],S=e.router.looseRoutesById[y.routeId],E=e.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&E&&(S.options.notFoundComponent=E),f.routeId=y.routeId;const C=y.routeId===e.router.routeTree.id;e.updateMatch(y.id,w=>({...w,...C?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),p=m,await Rh(S,["notFoundComponent"])}else if(!e.preload){const m=e.matches[0];m.globalNotFound||e.router.getMatch(m.id)?.globalNotFound&&e.updateMatch(m.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const m=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await Rh(m,["errorComponent"])}for(let m=0;m<=p;m++){const{id:y,routeId:S}=e.matches[m],E=e.router.looseRoutesById[S];try{const C=ahe(e,y,E);if(C){const w=await C;e.updateMatch(y,x=>({...x,...w}))}}catch(C){console.error(`Error executing head for route ${S}:`,C)}}const g=px(e);if(Ah(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function YL(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Rh(t,e=nv){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(r=>{const{id:s,...o}=r.options;Object.assign(t.options,o),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const n=()=>t._componentsLoaded?void 0:e===nv?(()=>{if(t._componentsPromise===void 0){const r=YL(t,nv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():YL(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function r7(t){for(const e of nv)if(t.options[e]?.preload)return!0;return!1}const nv=["component","errorComponent","pendingComponent","notFoundComponent"];var Na="__TSR_index",ZL="popstate",XL="beforeunload";function uhe(t){let e=t.getLocation();const n=new Set,r=a=>{e=t.getLocation(),n.forEach(u=>u({location:e,action:a}))},s=a=>{t.notifyOnIndexChange??!0?r(a):e=t.getLocation()},o=async({task:a,navigateOpts:u,...c})=>{if(u?.ignoreBlocker??!1){a();return}const f=t.getBlockers?.()??[],p=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const g of f){const m=Ov(c.path,c.state);if(await g.blockerFn({currentLocation:e,nextLocation:m,action:c.type})){t.onBlocked?.();return}}a()};return{get location(){return e},get length(){return t.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,u,c)=>{const f=e.state[Na];u=QL(f+1,u),o({task:()=>{t.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=e.state[Na];u=QL(f,u),o({task:()=>{t.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{o({task:()=>{t.go(a),s({type:"GO",index:a})},navigateOpts:u,type:"GO"})},back:a=>{o({task:()=>{t.back(a?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{t.forward(a?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[Na]!==0,createHref:a=>t.createHref(a),block:a=>{if(!t.setBlockers)return()=>{};const u=t.getBlockers?.()??[];return t.setBlockers([...u,a]),()=>{const c=t.getBlockers?.()??[];t.setBlockers?.(c.filter(f=>f!==a))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r}}function QL(t,e){e||(e={});const n=KT();return{...e,key:n,__TSR_key:n,[Na]:t}}function che(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,r=e.history.replaceState;let s=[];const o=()=>s,a=P=>s=P,u=(P=>P),c=(()=>Ov(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const P=KT();e.history.replaceState({[Na]:0,key:P,__TSR_key:P},"")}let f=c(),p,g=!1,m=!1,y=!1,S=!1;const E=()=>f;let C,w;const x=()=>{C&&(I._ignoreSubscribers=!0,(C.isPush?e.history.pushState:e.history.replaceState)(C.state,"",C.href),I._ignoreSubscribers=!1,C=void 0,w=void 0,p=void 0)},T=(P,k,H)=>{const F=u(k);w||(p=f),f=Ov(k,H),C={href:F,state:H,isPush:C?.isPush||P==="push"},w||(w=Promise.resolve().then(()=>x()))},R=P=>{f=c(),I.notify({type:P})},M=async()=>{if(m){m=!1;return}const P=c(),k=P.state[Na]-f.state[Na],H=k===1,F=k===-1,B=!H&&!F||g;g=!1;const W=B?"GO":F?"BACK":"FORWARD",Y=B?{type:"GO",index:k}:{type:F?"BACK":"FORWARD"};if(y)y=!1;else{const ne=o();if(typeof document<"u"&&ne.length){for(const $ of ne)if(await $.blockerFn({currentLocation:f,nextLocation:P,action:W})){m=!0,e.history.go(1),I.notify(Y);return}}}f=c(),I.notify(Y)},O=P=>{if(S){S=!1;return}let k=!1;const H=o();if(typeof document<"u"&&H.length)for(const F of H){const B=F.enableBeforeUnload??!0;if(B===!0){k=!0;break}if(typeof B=="function"&&B()===!0){k=!0;break}}if(k)return P.preventDefault(),P.returnValue=""},I=uhe({getLocation:E,getLength:()=>e.history.length,pushState:(P,k)=>T("push",P,k),replaceState:(P,k)=>T("replace",P,k),back:P=>(P&&(y=!0),S=!0,e.history.back()),forward:P=>{P&&(y=!0),S=!0,e.history.forward()},go:P=>{g=!0,e.history.go(P)},createHref:P=>u(P),flush:x,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(XL,O,{capture:!0}),e.removeEventListener(ZL,M)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(XL,O,{capture:!0}),e.addEventListener(ZL,M),e.history.pushState=function(...P){const k=n.apply(e.history,P);return I._ignoreSubscribers||R("PUSH"),k},e.history.replaceState=function(...P){const k=r.apply(e.history,P);return I._ignoreSubscribers||R("REPLACE"),k},I}function dhe(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Ov(t,e){const n=dhe(t),r=n.indexOf("#"),s=n.indexOf("?"),o=KT();return{href:n,pathname:n.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:n.length),hash:r>-1?n.substring(r):"",search:s>-1?n.slice(s,r===-1?void 0:r):"",state:e||{[Na]:0,key:o,__TSR_key:o}}}function KT(){return(Math.random()+1).toString(36).substring(7)}function Ic(t,e){const n=e,r=t;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var fhe=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,s=this.basepath??r?.basepath??"/",o=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Bfe(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=che()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=Th(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=nhe(phe(this.latestLocation),p),Vfe(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||s!==c||a!==f){this.basepath=c;const p=[],g=ZF(c);g&&g!=="/"&&p.push(the({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:ehe(p),this.history&&this.updateLatestLocation(),u=!0}u&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=kfe(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&Ife(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({pathname:c,search:f,hash:p,href:g,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const w=this.options.parseSearch(f),x=this.options.stringifySearch(w);return{href:c+x+p,publicHref:c+x+p,pathname:Rf(c).path,external:!1,searchStr:x,search:yl(r?.search,w),hash:Rf(p.slice(1)).path,state:xl(r?.state,m)}}const y=new URL(g,this.origin),S=hx(this.rewrite,y),E=this.options.parseSearch(S.search),C=this.options.stringifySearch(E);return S.search=C,{href:S.href.replace(S.origin,""),publicHref:g,pathname:Rf(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:C,search:yl(r?.search,E),hash:Rf(S.hash.slice(1)).path,state:xl(r?.state,m)}},o=s(n),{__tempLocation:a,__tempKey:u}=o.state;if(a&&(!u||u===this.tempLocationKey)){const c=s(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>zfe({base:n,to:r.includes("//")?VT(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>ghe({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(o={})=>{const a=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??u.fullPath,f=o.to?`${o.to}`:void 0,p=u.search,g=Object.assign(Object.create(null),u.params),m=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(c,"."),y=f?this.resolvePathWithBase(m,f):m,S=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?g:Object.assign(g,_l(o.params,g)),E=this.routesByPath[fi(y)];let C;if(E)C=this.getRouteBranch(E);else if(y.includes("$"))C=[];else{const F=this.getMatchedRoutes(y);C=F.matchedRoutes,this.options.notFoundRoute&&(!F.foundRoute||F.foundRoute.path!=="/"&&F.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&qF(S))for(const F of C){const B=F.options.params?.stringify??F.options.stringifyParams;if(B)try{Object.assign(S,B(S))}catch{}}const w=n.leaveParams?y:Rf(jL({path:y,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=p;if(n._includeValidateSearch&&this.options.search?.strict){const F={};C.forEach(B=>{if(B.options.validateSearch)try{Object.assign(F,rv(B.options.validateSearch,{...F,...x}))}catch{}}),x=F}x=mhe({search:x,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),x=yl(p,x);const T=this.options.stringifySearch(x),R=o.hash===!0?a.hash:o.hash?_l(o.hash,a.hash):void 0,M=R?`#${R}`:"";let O=o.state===!0?a.state:o.state?_l(o.state,a.state):{};O=xl(a.state,O);const I=`${w}${T}${M}`;let P,k,H=!1;if(this.rewrite){const F=new URL(I,this.origin),B=JF(this.rewrite,F);P=F.href.replace(F.origin,""),B.origin!==this.origin?(k=B.href,H=!0):k=B.pathname+B.search+B.hash}else P=Afe(I),k=P;return{publicHref:k,href:P,pathname:w,search:x,searchStr:T,state:O,hash:R??"",external:H,unmaskOnReload:o.unmaskOnReload}},s=(o={},a)=>{const u=r(o);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const p=Ofe(u.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:g,params:m,...y}=p.route,S=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,_l(m,f));a={from:n.from,...y,params:S},c=r(a)}}}return c&&(u.maskedLocation=c),u};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...s})=>{let o;const a=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(g=>{s.state[g]=this.latestLocation.state[g]});const p=Nl(s.state,this.latestLocation.state);return f.forEach(g=>{delete s.state[g]}),p},u=fi(this.latestLocation.href)===fi(s.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Uc(()=>{c?.resolve(),c=void 0}),u&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:p,...g}=s;f&&(g={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=p??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,o=s.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:r})}return this._scroll.next=s.resetScroll??!0,this.history.subscribers.size||this.load(o?{action:{type:o}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:a,href:u,...c}={})=>{if(u){const g=this.history.location.state.__TSR_index,m=Ov(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=hx(this.rewrite,y).pathname,c.search=this.options.parseSearch(m.search),c.hash=m.hash.slice(1)}const f=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const p=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:o,...a})=>{let u=!1;if(s)try{new URL(`${s}`),u=!0}catch{}if(u&&!r&&(r=!0),r){if(n!==void 0||!s){const f=this.buildLocation({to:n,...a});s=s??f.publicHref,o=o??f.publicHref}const c=!u&&o?o:s;if(Rv(c,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const p of f)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(c):window.location.href=c;return}return this.buildAndCommitLocation({...a,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(s=>!n.some(o=>o.id===s.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{const r=n?.action?.type;let s,o,a;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad(),r&&(this._scroll.hash=r==="PUSH"||r==="REPLACE");const p=this.latestLocation,g=Ic(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await KL({router:this,sync:n?.sync,forceStaleReload:u.href===p.href,matches:this.stores.pendingMatches.get(),location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,y=null,S=null,E=null;this.batch(()=>{const C=this.stores.pendingMatches.get(),w=C.length,x=this.stores.matches.get();m=w?x.filter(M=>!this.stores.pendingMatchStores.has(M.id)):null;const T=new Set;for(const M of this.stores.pendingMatchStores.values())M.routeId&&T.add(M.routeId);const R=new Set;for(const M of this.stores.matchStores.values())M.routeId&&R.add(M.routeId);y=w?x.filter(M=>!T.has(M.routeId)):null,S=w?C.filter(M=>!R.has(M.routeId)):null,E=w?C.filter(M=>R.has(M.routeId)):x,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),w&&(this.stores.setMatches(C),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[C,w]of[[y,"onLeave"],[S,"onEnter"],[E,"onStay"]])if(C)for(const x of C)this.looseRoutesById[x.routeId].options[w]?.(x)})})}})}catch(p){Fr(p)?(s=p,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):cr(p)&&(o=p);const g=s?s.status:o?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(s)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(f=>f.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,a=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(Ic(o,a)):r.types;if(u===!1){n();return}s={update:n,types:u}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const s=this.stores.pendingMatchStores.get(n);if(s){s.set(r);return}const o=this.stores.matchStores.get(n);if(o){o.set(r);return}const a=this.stores.cachedMatchStores.get(n);if(a){const u=r(a.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):a.set(u)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const s=n.options._builtLocation??this.buildLocation(n.options),o=this.getParsedLocationHref(s);n.options.href=o,n.headers.set("Location",o)}else if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const o=s.pathname+s.search+s.hash;n.options.href=o,n.headers.set("Location",o)}}catch{}if(n.options.href&&!n.options._builtLocation&&Rv(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(s=>!r(s))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=s=>{const o=this.looseRoutesById[s.routeId];if(!o.options.loader)return!0;const a=(s.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:n-s.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=Rh,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...o,...this.stores.cachedIds.get()]),u=s.filter(c=>!a.has(c.id));if(u.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...u])}try{return s=await KL({router:this,matches:s,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?s=s.map(p=>p.id===c?f(p):p):this.updateMatch(c,f)}}),s}catch(c){if(Fr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});cr(c)||console.error(c);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(s);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const a=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=Nfe(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Nl(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Nl(a.search,o.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Xfe,parseSearch:t.parseSearch??Zfe,protocolAllowlist:t.protocolAllowlist??xfe}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:n}){this.routesById=t,this.routesByPath=e,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=KF(t),this.routeBranchCache.set(t,e)),e}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const n=this.getMatchedRoutes(t.pathname),{foundRoute:r,routeParams:s}=n;let{matchedRoutes:o}=n,a=!1;(r?r.path!=="/"&&s["**"]:fi(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const u=a?yhe(this.options.notFoundMode,o):void 0,c=new Array(o.length),f=new Map;for(const p of this.stores.matchStores.values())p.routeId&&f.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const g=o[p],m=c[p-1];let y,S,E;{const B=m?.search??t.search,W=m?._strictSearch??void 0;try{const Y=rv(g.options.validateSearch,{...B})??void 0;y={...B,...Y},S={...W,...Y},E=void 0}catch(Y){let ne=Y;if(Y instanceof Nv||(ne=new Nv(Y.message,{cause:Y})),e?.throwOnError)throw ne;y=B,S={},E=ne}}const C=g.options.loaderDeps?.({search:y})??"",w=C?JSON.stringify(C):"",{interpolatedPath:x,usedParams:T}=jL({path:g.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),R=g.id+x+w,M=this.getMatch(R),O=f.get(g.id),I=M?._strictParams??T;let P;if(!M)try{JL(g,I)}catch(B){if(cr(B)||Fr(B)?P=B:P=new hhe(B.message,{cause:B}),e?.throwOnError)throw P}Object.assign(s,I);const k=O?"stay":"enter";let H;if(M)H={...M,cause:k,params:O?.params??s,_strictParams:I,search:yl(O?O.search:M.search,y),_strictSearch:S};else{const B=g.options.loader||g.options.beforeLoad||g.lazyFn||r7(g)?"pending":"success";H={id:R,ssr:g.options.ssr,index:p,routeId:g.id,params:O?.params??s,_strictParams:I,pathname:x,updatedAt:Date.now(),search:O?yl(O.search,y):y,_strictSearch:S,searchError:void 0,status:B,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:Uc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:k,loaderDeps:O?xl(O.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:g.options.staticData||{},fullPath:g.fullPath}}e?.preload||(H.globalNotFound=u===g.id),H.searchError=E;const F=this.getParentContext(m);H.context={...F,...H.__routeContext,...H.__beforeLoadContext},c[p]=H}for(let p=0;p<c.length;p++){const g=c[p],m=this.looseRoutesById[g.routeId],y=this.getMatch(g.id),S=f.get(g.routeId);if(g.params=S?yl(S.params,s):s,!y){const E=c[p-1],C=this.getParentContext(E);if(m.options.context){const w={deps:g.loaderDeps,params:g.params,context:C??{},location:t,navigate:x=>this.navigate({...x,_fromLocation:t}),buildLocation:this.buildLocation,cause:g.cause,abortController:g.abortController,preload:!!g.preload,matches:c,routeId:m.id};g.__routeContext=m.options.context(w)??void 0}g.context={...C,...g.__routeContext,...g.__beforeLoadContext}}}return c}matchRoutesLightweight(t){const e=xh(this.stores.matchesId.get()),n=this.lightweightCache.get(t);if(n&&n[0]===e)return n[1];const{matchedRoutes:r,routeParams:s}=this.getMatchedRoutes(t.pathname),o=xh(r),a={...t.search};for(const g of r)try{Object.assign(a,rv(g.options.validateSearch,a))}catch{}const u=e&&this.stores.matchStores.get(e)?.get(),c=u&&u.routeId===o.id&&u.pathname===t.pathname;let f;if(c)f=u.params;else{const g=Object.assign(Object.create(null),s);for(const m of r)try{JL(m,g)}catch{}f=g}const p={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,p]),p}},Nv=class extends Error{},hhe=class extends Error{};function phe(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function rv(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new Nv("Async validation not supported");if(n.issues)throw new Nv(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function ghe({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=fi(t);let o;const a=Mfe(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function mhe({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return vhe(n)(t,e,r??!1)}function vhe(t){let e,n;const r=[];for(const o of t){const a=o.options;if("search"in a)a.search?.middlewares&&r.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){const c=({search:f,next:p})=>{const g=p(a.preSearchFilters?a.preSearchFilters.reduce((m,y)=>y(m),f):f);return a.postSearchFilters?a.postSearchFilters.reduce((m,y)=>y(m),g):g};r.push(c)}const u=a.validateSearch;if(u){const c=({search:f,next:p,meta:g})=>{const m=p(f);if(n)try{const y=rv(u,m);if(g&&y)for(const S in y)S in m||(g.defaulted||=new Map).set(S,y[S]);return{...m,...y}}catch{}return m};r.push(c)}}const s=(o,a,u)=>{if(o>=r.length){if(!e.search)return{};if(e.search===!0)return a;const f=_l(e.search,a);return u&&(u.explicit=f),f}const c=(f,p)=>{if(p){const g=u||{};return{search:s(o+1,f,g),meta:g}}return s(o+1,f,u)};return r[o]({search:a,next:c,meta:u})};return function(a,u,c){return e=u,n=c,s(0,a)}}function yhe(t,e){if(t!=="root")for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.children)return r.id}return Ml}function JL(t,e){const n=t.options.params?.parse??t.options.parseParams;if(n){const r=n(e);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(e,r)}}const bhe="Error preloading route! ☝️";var s7=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Ml:this.parentRoute||pi();let s=r?Ml:n?.path;s&&s!=="/"&&(s=YF(s));const o=n?.id||s;let a=r?Ml:ev([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=ev(["/",a]));const u=a==="__root__"?"/":ev([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=u,this._to=fi(u)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>QF({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},She=class extends s7{constructor(t){super(t)}};function YT(t){const e=t.errorComponent??ZT;return D.jsx(Ehe,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?A.createElement(e,{error:n,reset:r}):t.children})}var Ehe=class extends A.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const n=t.getResetKey();return e.error&&e.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function ZT({error:t}){const[e,n]=A.useState(!1);return D.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[D.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[D.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),D.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:e?"Hide Error":"Show Error"})]}),D.jsx("div",{style:{height:".25rem"}}),e?D.jsx("div",{children:D.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?D.jsx("code",{children:t.message}):null})}):null]})}function Che({children:t,fallback:e=null}){return o7()?D.jsx(z.Fragment,{children:t}):D.jsx(z.Fragment,{children:e})}function o7(){return z.useSyncExternalStore(whe,()=>!0,()=>!1)}function whe(){return()=>{}}var i7=A.createContext(null);function ds(t){return A.useContext(i7)}var ib=A.createContext(void 0),_he=A.createContext(void 0),rn=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(rn||{});function xhe({update:t,notify:e,unwatched:n}){return{link:r,unlink:s,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,p,g){const m=p.depsTail;if(m!==void 0&&m.dep===f)return;const y=m!==void 0?m.nextDep:p.deps;if(y!==void 0&&y.dep===f){y.version=g,p.depsTail=y;return}const S=f.subsTail;if(S!==void 0&&S.version===g&&S.sub===p)return;const E=p.depsTail=f.subsTail={version:g,dep:f,sub:p,prevDep:m,nextDep:y,prevSub:S,nextSub:void 0};y!==void 0&&(y.prevDep=E),m!==void 0?m.nextDep=E:p.deps=E,S!==void 0?S.nextSub=E:f.subs=E}function s(f,p=f.sub){const g=f.dep,m=f.prevDep,y=f.nextDep,S=f.nextSub,E=f.prevSub;return y!==void 0?y.prevDep=m:p.depsTail=m,m!==void 0?m.nextDep=y:p.deps=y,S!==void 0?S.prevSub=E:g.subsTail=E,E!==void 0?E.nextSub=S:(g.subs=S)===void 0&&n(g),y}function o(f){let p=f.nextSub,g;e:do{const m=f.sub;let y=m.flags;if(y&60?y&12?y&4?!(y&48)&&c(f,m)?(m.flags=y|40,y&=1):y=0:m.flags=y&-9|32:y=0:m.flags=y|32,y&2&&e(m),y&1){const S=m.subs;if(S!==void 0){const E=(f=S).nextSub;E!==void 0&&(g={value:p,prev:g},p=E);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;g!==void 0;)if(f=g.value,g=g.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function a(f,p){let g,m=0,y=!1;e:do{const S=f.dep,E=S.flags;if(p.flags&16)y=!0;else if((E&17)===17){if(t(S)){const C=S.subs;C.nextSub!==void 0&&u(C),y=!0}}else if((E&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(g={value:f,prev:g}),f=S.deps,p=S,++m;continue}if(!y){const C=f.nextDep;if(C!==void 0){f=C;continue}}for(;m--;){const C=p.subs,w=C.nextSub!==void 0;if(w?(f=g.value,g=g.prev):f=C,y){if(t(p)){w&&u(C),p=f.sub;continue}y=!1}else p.flags&=-33;p=f.sub;const x=f.nextDep;if(x!==void 0){f=x;continue e}}return y}while(!0)}function u(f){do{const p=f.sub,g=p.flags;(g&48)===32&&(p.flags=g|16,(g&6)===2&&e(p))}while((f=f.nextSub)!==void 0)}function c(f,p){let g=p.depsTail;for(;g!==void 0;){if(g===f)return!0;g=g.prevDep}return!1}}function Ahe(t,e,n){const r=typeof t=="object",s=r?t:void 0;return{next:(r?t.next:t)?.bind(s),error:(r?t.error:e)?.bind(s),complete:(r?t.complete:n)?.bind(s)}}const gx=[];let sv=0;const{link:eU,unlink:The,propagate:Rhe,checkDirty:a7,shallowPropagate:tU}=xhe({update(t){return t._update()},notify(t){gx[mx++]=t,t.flags&=~rn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=rn.Mutable|rn.Dirty,Mv(t))}});let sm=0,mx=0,So,vx=0;function l7(t){try{++vx,t()}finally{--vx||u7()}}function Mv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=The(n,t)}function u7(){if(!(vx>0)){for(;sm<mx;){const t=gx[sm];gx[sm++]=void 0,t.notify()}sm=0,mx=0}}function nU(t,e){const n=typeof t=="function",r=t,s={_snapshot:n?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?rn.None:rn.Mutable,get(){return So!==void 0&&eU(s,So,sv),s._snapshot},subscribe(o){const a=Ahe(o),u={current:!1},c=Ihe(()=>{s.get(),u.current?a.next?.(s._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=So,u=e?.compare??Object.is;if(n)So=s,++sv,s.depsTail=void 0;else if(o===void 0)return!1;n&&(s.flags=rn.Mutable|rn.RecursedCheck);try{const c=s._snapshot,f=typeof o=="function"?o(c):o===void 0&&n?r(c):o;return c===void 0||!u(c,f)?(s._snapshot=f,!0):!1}finally{So=a,n&&(s.flags&=~rn.RecursedCheck),Mv(s)}}};return n?(s.flags=rn.Mutable|rn.Dirty,s.get=function(){const o=s.flags;if(o&rn.Dirty||o&rn.Pending&&a7(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&tU(a)}}else o&rn.Pending&&(s.flags=o&~rn.Pending);return So!==void 0&&eU(s,So,sv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(Rhe(a),tU(a),u7())}},s}function Ihe(t){const e=()=>{const r=So;So=n,++sv,n.depsTail=void 0,n.flags=rn.Watching|rn.RecursedCheck;try{return t()}finally{So=r,n.flags&=~rn.RecursedCheck,Mv(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:rn.Watching|rn.RecursedCheck,notify(){const r=this.flags;r&rn.Dirty||r&rn.Pending&&a7(this.deps,this)?e():this.flags=rn.Watching},stop(){this.flags=rn.None,this.depsTail=void 0,Mv(this)}};return e(),n}function Ohe(t,e){return t===e}function qr(t,e,n=Ohe){const r=A.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=A.useCallback(()=>t?.get(),[t]);return rT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var zw={get(){},subscribe(){return{unsubscribe(){}}}};function Nhe(t,e){const n=A.useRef();return r=>{const s=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=xl(n.current,s):s}}function ou(t){const e=ds(),n=A.useContext(t.from?_he:ib),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=Nhe(t,e),o=qr(r??zw,a=>a?s(a):zw);if(o!==zw)return o;(t.shouldThrow??!0)&&pi()}function c7(t){return ou({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function d7(t){const{select:e,...n}=t;return ou({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function f7(t){return ou({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const n=t.strict===!1?e.params:e._strictParams;return t.select?t.select(n):n}})}function h7(t){return ou({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function XT(t){const e=ds();return A.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function Uxe(t){const e=ds(),n=XT(),r=A.useRef(null);return Sc(()=>{r.current!==t&&(n(t),r.current=t)},[e,t,n]),null}function p7(t){return ou({...t,select:e=>t.select?t.select(e.context):e.context})}function Mhe(t,e){const n=ds(),r=bfe(e),{activeProps:s,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:g,replace:m,startTransition:y,resetScroll:S,viewTransition:E,children:C,target:w,disabled:x,style:T,className:R,onClick:M,onBlur:O,onFocus:I,onMouseEnter:P,onMouseLeave:k,onTouchStart:H,ignoreBlocker:F,params:B,search:W,hash:Y,state:ne,mask:$,reloadDocument:ee,unsafeRelative:fe,from:de,_fromLocation:Ae,...L}=t,V=o7(),K=A.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),J=qr(n.stores.location,gt=>gt,(gt,vn)=>gt.href===vn.href),oe=A.useMemo(()=>{const gt={_fromLocation:J,...K};return n.buildLocation(gt)},[n,J,K]),he=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ue=oe.maskedLocation?oe.maskedLocation.external:oe.external,ve=A.useMemo(()=>Fhe(he,ue,n.history,x),[x,ue,he,n.history]),_e=A.useMemo(()=>{if(ve?.external)return Rv(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!zhe(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Rv(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=A.useMemo(()=>{if(_e)return!1;if(a?.exact){if(!Ffe(J.pathname,oe.pathname,n.basepath))return!1}else{const gt=Iv(J.pathname,n.basepath),vn=Iv(oe.pathname,n.basepath);if(!(gt.startsWith(vn)&&(gt.length===vn.length||gt[vn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Nl(J.search,oe.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?V&&J.hash===oe.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,J,_e,V,oe.hash,oe.pathname,oe.search,n.basepath]),Ee=Xe?_l(s,{})??Phe:Bw,pt=Xe?Bw:_l(o,{})??Bw,Ce=[R,Ee.className,pt.className].filter(Boolean).join(" "),ze=(T||Ee.style||pt.style)&&{...T,...Ee.style,...pt.style},[Be,He]=A.useState(!1),pr=A.useRef(!1),Et=t.reloadDocument||_e?!1:c??n.options.defaultPreload,Gr=f??n.options.defaultPreloadDelay??0,Wn=A.useCallback(()=>{n.preloadRoute({...K,_builtLocation:oe}).catch(gt=>{console.warn(gt),console.warn(bhe)})},[n,K,oe]);yfe(r,A.useCallback(gt=>{gt?.isIntersecting&&Wn()},[Wn]),Uhe,{disabled:!!x||Et!=="viewport"}),A.useEffect(()=>{pr.current||!x&&Et==="render"&&(Wn(),pr.current=!0)},[x,Wn,Et]);const xr=gt=>{const vn=gt.currentTarget.getAttribute("target"),Tr=w!==void 0?w:vn;if(!x&&!Bhe(gt)&&!gt.defaultPrevented&&(!Tr||Tr==="_self")&>.button===0){gt.preventDefault(),uF.flushSync(()=>{He(!0)});const no=n.subscribe("onResolved",()=>{no(),He(!1)});n.navigate({...K,replace:m,resetScroll:S,hashScrollIntoView:g,startTransition:y,viewTransition:E,ignoreBlocker:F})}};if(_e)return{...L,ref:r,href:_e,...C&&{children:C},...w&&{target:w},...x&&{disabled:x},...T&&{style:T},...R&&{className:R},...M&&{onClick:M},...O&&{onBlur:O},...I&&{onFocus:I},...P&&{onMouseEnter:P},...k&&{onMouseLeave:k},...H&&{onTouchStart:H}};const to=gt=>{if(x||Et!=="intent")return;if(!Gr){Wn();return}const vn=gt.currentTarget;if(Of.has(vn))return;const Tr=setTimeout(()=>{Of.delete(vn),Wn()},Gr);Of.set(vn,Tr)},Ar=gt=>{x||Et!=="intent"||Wn()},Gt=gt=>{if(x||!Et||!Gr)return;const vn=gt.currentTarget,Tr=Of.get(vn);Tr&&(clearTimeout(Tr),Of.delete(vn))};return{...L,...Ee,...pt,href:ve?.href,ref:r,onClick:nc([M,xr]),onBlur:nc([O,Gt]),onFocus:nc([I,to]),onMouseEnter:nc([P,to]),onMouseLeave:nc([k,Gt]),onTouchStart:nc([H,Ar]),disabled:!!x,target:w,...ze&&{style:ze},...Ce&&{className:Ce},...x&&khe,...Xe&&Dhe,...V&&Be&&Lhe}}var Bw={},Phe={className:"active"},khe={role:"link","aria-disabled":!0},Dhe={"data-status":"active","aria-current":"page"},Lhe={"data-transitioning":"transitioning"},Of=new WeakMap,Uhe={rootMargin:"100px"},nc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function Fhe(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function zhe(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var g7=A.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:s,...o}=Mhe(r,e),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=o;return A.createElement("a",c,a)}return A.createElement(n,o,a)});function Bhe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var jhe=class extends s7{constructor(e){super(e),this.useMatch=n=>ou({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>p7({...n,from:this.id}),this.useSearch=n=>h7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>f7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>d7({...n,from:this.id}),this.useLoaderData=n=>c7({...n,from:this.id}),this.useNavigate=()=>XT({from:this.fullPath}),this.Link=z.forwardRef((n,r)=>D.jsx(g7,{ref:r,from:this.fullPath,...n}))}};function Hhe(t){return new jhe(t)}function $he(){return t=>Whe(t)}var qhe=class extends She{constructor(t){super(t),this.useMatch=e=>ou({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>p7({...e,from:this.id}),this.useSearch=e=>h7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>f7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>d7({...e,from:this.id}),this.useLoaderData=e=>c7({...e,from:this.id}),this.useNavigate=()=>XT({from:this.fullPath}),this.Link=z.forwardRef((e,n)=>D.jsx(g7,{ref:n,from:this.fullPath,...e}))}};function Whe(t){return new qhe(t)}function dr(t){return new Ghe(t,{silent:!0}).createRoute}var Ghe=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=Hhe(n);return r.isRoot=!1,r},this.silent=e?.silent}};function sr(t,e){let n,r,s,o;const a=()=>(n||(n=t().then(c=>{n=void 0,r=c[e??"default"]}).catch(c=>{if(s=c,Cfe(s)&&s instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${s.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),o=!0)}})),n),u=function(f){if(o)throw window.location.reload(),new Promise(()=>{});if(s)throw s;if(!r)if(kL)kL(a());else throw a();return A.createElement(r,f)};return u.preload=a,u}function Vhe(t){const e=ds(),n=`not-found-${qr(e.stores.location,r=>r.pathname)}-${qr(e.stores.status,r=>r)}`;return D.jsx(YT,{getResetKey:()=>n,onCatch:(r,s)=>{if(cr(r))t.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(cr(r))return t.fallback?.(r);throw r},children:t.children})}function Khe(){return D.jsx("p",{children:"Not Found"})}function hc(t){return D.jsx(D.Fragment,{children:t.children})}function m7(t,e,n){return e.options.notFoundComponent?D.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?D.jsx(t.options.defaultNotFoundComponent,{...n}):D.jsx(Khe,{})}function Yhe(t){return null}function Zhe(){return Yhe(ds()),null}var Xhe=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,Qhe=(t,e)=>t[0]===e[0]&&t[1]===e[1],v7=A.memo(function({matchId:e}){const n=ds(),r=n.stores.matchStores.get(e);r||pi();const s=qr(n.stores.loadedAt,a=>a),o=qr(r,a=>a,Xhe);return D.jsx(Jhe,{router:n,matchId:e,resetKey:s,matchState:A.useMemo(()=>{const a=o.routeId,u=n.routesById[a].parentRoute?.id;return{routeId:a,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:u}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function Jhe({router:t,matchId:e,resetKey:n,matchState:r}){const s=t.routesById[r.routeId],o=s.options.pendingComponent??t.options.defaultPendingComponent,a=o?D.jsx(o,{}):null,u=s.options.errorComponent??t.options.defaultErrorComponent,c=s.options.onCatch??t.options.defaultOnCatch,f=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,p=r.ssr===!1||r.ssr==="data-only",g=(!s.isRoot||s.options.wrapInSuspense||p)&&(s.options.wrapInSuspense??o??(s.options.errorComponent?.preload||p))?A.Suspense:hc,m=u?YT:hc,y=f?Vhe:hc;return D.jsxs(s.isRoot?s.options.shellComponent??hc:hc,{children:[D.jsx(ib.Provider,{value:e,children:D.jsx(g,{fallback:a,children:D.jsx(m,{getResetKey:()=>n,errorComponent:u||ZT,onCatch:(S,E)=>{if(cr(S))throw S.routeId??=r.routeId,S;c?.(S,E)},children:D.jsx(y,{fallback:S=>{if(S.routeId??=r.routeId,!f||S.routeId&&S.routeId!==r.routeId||!S.routeId&&!s.isRoot)throw S;return A.createElement(f,S)},children:p||r._displayPending?D.jsx(Che,{fallback:a,children:D.jsx(rU,{matchId:e})}):D.jsx(rU,{matchId:e})})})})}),r.parentRouteId===Ml?D.jsxs(D.Fragment,{children:[D.jsx(epe,{}),t.options.scrollRestoration&&HF?D.jsx(Zhe,{}):null]}):null]})}function epe(){const t=ds(),e=A.useRef();return Sc(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...Ic(t.stores.location.get(),r??n)}),e.current=n},[qr(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var rU=A.memo(function({matchId:e}){const n=ds(),r=(p,g)=>n.getMatch(p.id)?._nonReactive[g]??p._nonReactive[g],s=n.stores.matchStores.get(e);s||pi();const o=qr(s,p=>p),a=o.routeId,u=n.routesById[a],c=A.useMemo(()=>{const p=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return p?JSON.stringify(p):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=A.useMemo(()=>{const p=u.options.component??n.options.defaultComponent;return p?D.jsx(p,{},c):D.jsx(y7,{})},[c,u.options.component,n.options.defaultComponent]);if(o._displayPending)throw r(o,"displayPendingPromise");if(o._forcePending)throw r(o,"minPendingPromise");if(o.status==="pending"){const p=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(p){const g=n.getMatch(o.id);if(g&&!g._nonReactive.minPendingPromise){const m=Uc();g._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),g._nonReactive.minPendingPromise=void 0},p)}}throw r(o,"loadPromise")}if(o.status==="notFound")return cr(o.error)||pi(),m7(n,u,o.error);if(o.status==="redirected")throw Fr(o.error)||pi(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),y7=A.memo(function(){const e=ds(),n=A.useContext(ib);let r,s=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[r,s]=qr(f,p=>[p?.routeId,p?.globalNotFound??!1],Qhe),o=qr(e.stores.matchesId,p=>p[p.findIndex(g=>g===n)+1])}const a=r?e.routesById[r]:void 0,u=e.options.defaultPendingComponent?D.jsx(e.options.defaultPendingComponent,{}):null;if(s)return a||pi(),m7(e,a,void 0);if(!o)return null;const c=D.jsx(v7,{matchId:o});return r===Ml?D.jsx(A.Suspense,{fallback:u,children:c}):c});function tpe(){const t=ds(),e=A.useRef({router:t,mounted:!1}),[n,r]=A.useState(!1),s=qr(t.stores.isLoading,g=>g),o=qr(t.stores.hasPending,g=>g),a=Mw(s),u=s||n||o,c=Mw(u),f=s||o,p=Mw(f);return t.startTransition=g=>{r(!0),A.startTransition(()=>{g(),r(!1)})},A.useEffect(()=>{const g=t.history.subscribe(t.load),m=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return fi(t.latestLocation.publicHref)!==fi(m.publicHref)&&t.commitLocation({...m,replace:!0}),()=>{g()}},[t,t.history]),Sc(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(m){console.error(m)}})()},[t]),Sc(()=>{a&&!s&&t.emit({type:"onLoad",...Ic(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,s]),Sc(()=>{p&&!f&&t.emit({type:"onBeforeRouteMount",...Ic(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,p,t]),Sc(()=>{if(c&&!u){const g=Ic(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),l7(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function npe(){const t=ds(),e=t.routesById[Ml].options.pendingComponent??t.options.defaultPendingComponent,n=e?D.jsx(e,{}):null,r=D.jsxs(typeof document<"u"&&t.ssr?hc:A.Suspense,{fallback:n,children:[D.jsx(tpe,{}),D.jsx(rpe,{})]});return t.options.InnerWrap?D.jsx(t.options.InnerWrap,{children:r}):r}function rpe(){const t=ds(),e=qr(t.stores.firstId,s=>s),n=qr(t.stores.loadedAt,s=>s),r=e?D.jsx(v7,{matchId:e}):null;return D.jsx(ib.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:D.jsx(YT,{getResetKey:()=>n,errorComponent:ZT,onCatch:void 0,children:r})})}var spe=t=>({createMutableStore:nU,createReadonlyStore:nU,batch:l7}),ope=t=>new ipe(t),ipe=class extends fhe{constructor(t){super(t,spe)}};function ape({router:t,children:e,...n}){qF(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=D.jsx(i7.Provider,{value:t,children:e});return t.options.Wrap?D.jsx(t.options.Wrap,{children:r}):r}function lpe({router:t,...e}){return D.jsx(ape,{router:t,...e,children:D.jsx(npe,{})})}var jw={exports:{}},Nf={},Hw={exports:{}},$w={};var sU;function upe(){return sU||(sU=1,(function(t){function e($,ee){var fe=$.length;$.push(ee);e:for(;0<fe;){var de=fe-1>>>1,Ae=$[de];if(0<s(Ae,ee))$[de]=ee,$[fe]=Ae,fe=de;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var ee=$[0],fe=$.pop();if(fe!==ee){$[0]=fe;e:for(var de=0,Ae=$.length,L=Ae>>>1;de<L;){var V=2*(de+1)-1,K=$[V],J=V+1,oe=$[J];if(0>s(K,fe))J<Ae&&0>s(oe,K)?($[de]=oe,$[J]=fe,de=J):($[de]=K,$[V]=fe,de=V);else if(J<Ae&&0>s(oe,fe))$[de]=oe,$[J]=fe,de=J;else break e}}return ee}function s($,ee){var fe=$.sortIndex-ee.sortIndex;return fe!==0?fe:$.id-ee.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();t.unstable_now=function(){return a.now()-u}}var c=[],f=[],p=1,g=null,m=3,y=!1,S=!1,E=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R($){for(var ee=n(f);ee!==null;){if(ee.callback===null)r(f);else if(ee.startTime<=$)r(f),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=n(f)}}function M($){if(E=!1,R($),!S)if(n(c)!==null)S=!0,O||(O=!0,B());else{var ee=n(f);ee!==null&&ne(M,ee.startTime-$)}}var O=!1,I=-1,P=5,k=-1;function H(){return C?!0:!(t.unstable_now()-k<P)}function F(){if(C=!1,O){var $=t.unstable_now();k=$;var ee=!0;try{e:{S=!1,E&&(E=!1,x(I),I=-1),y=!0;var fe=m;try{t:{for(R($),g=n(c);g!==null&&!(g.expirationTime>$&&H());){var de=g.callback;if(typeof de=="function"){g.callback=null,m=g.priorityLevel;var Ae=de(g.expirationTime<=$);if($=t.unstable_now(),typeof Ae=="function"){g.callback=Ae,R($),ee=!0;break t}g===n(c)&&r(c),R($)}else r(c);g=n(c)}if(g!==null)ee=!0;else{var L=n(f);L!==null&&ne(M,L.startTime-$),ee=!1}}break e}finally{g=null,m=fe,y=!1}ee=void 0}}finally{ee?B():O=!1}}}var B;if(typeof T=="function")B=function(){T(F)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Y=W.port2;W.port1.onmessage=F,B=function(){Y.postMessage(null)}}else B=function(){w(F,0)};function ne($,ee){I=w(function(){$(t.unstable_now())},ee)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function($){$.callback=null},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function($){switch(m){case 1:case 2:case 3:var ee=3;break;default:ee=m}var fe=m;m=ee;try{return $()}finally{m=fe}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function($,ee){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var fe=m;m=$;try{return ee()}finally{m=fe}},t.unstable_scheduleCallback=function($,ee,fe){var de=t.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?de+fe:de):fe=de,$){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=fe+Ae,$={id:p++,callback:ee,priorityLevel:$,startTime:fe,expirationTime:Ae,sortIndex:-1},fe>de?($.sortIndex=fe,e(f,$),n(c)===null&&$===n(f)&&(E?(x(I),I=-1):E=!0,ne(M,fe-de))):($.sortIndex=Ae,e(c,$),S||y||(S=!0,O||(O=!0,B()))),$},t.unstable_shouldYield=H,t.unstable_wrapCallback=function($){var ee=m;return function(){var fe=m;m=ee;try{return $.apply(this,arguments)}finally{m=fe}}}})($w)),$w}var oU;function cpe(){return oU||(oU=1,Hw.exports=upe()),Hw.exports}var iU;function dpe(){if(iU)return Nf;iU=1;var t=cpe(),e=Xh(),n=lF();function r(i){var l="https://react.dev/errors/"+i;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+i+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var l=i,d=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,(l.flags&4098)!==0&&(d=l.return),i=l.return;while(i)}return l.tag===3?d:null}function a(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function u(i){if(i.tag===31){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function c(i){if(o(i)!==i)throw Error(r(188))}function f(i){var l=i.alternate;if(!l){if(l=o(i),l===null)throw Error(r(188));return l!==i?null:i}for(var d=i,h=l;;){var v=d.return;if(v===null)break;var b=v.alternate;if(b===null){if(h=v.return,h!==null){d=h;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===d)return c(v),i;if(b===h)return c(v),l;b=b.sibling}throw Error(r(188))}if(d.return!==h.return)d=v,h=b;else{for(var _=!1,N=v.child;N;){if(N===d){_=!0,d=v,h=b;break}if(N===h){_=!0,h=v,d=b;break}N=N.sibling}if(!_){for(N=b.child;N;){if(N===d){_=!0,d=b,h=v;break}if(N===h){_=!0,h=b,d=v;break}N=N.sibling}if(!_)throw Error(r(189))}}if(d.alternate!==h)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:l}function p(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=p(i),l!==null)return l;i=i.sibling}return null}var g=Object.assign,m=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function B(i){return i===null||typeof i!="object"?null:(i=F&&i[F]||i["@@iterator"],typeof i=="function"?i:null)}var W=Symbol.for("react.client.reference");function Y(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===W?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case E:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case O:return"SuspenseList";case k:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case T:return i.displayName||"Context";case x:return(i._context.displayName||"Context")+".Consumer";case R:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return l=i.displayName||null,l!==null?l:Y(i.type)||"Memo";case P:l=i._payload,i=i._init;try{return Y(i(l))}catch{}}return null}var ne=Array.isArray,$=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},de=[],Ae=-1;function L(i){return{current:i}}function V(i){0>Ae||(i.current=de[Ae],de[Ae]=null,Ae--)}function K(i,l){Ae++,de[Ae]=i.current,i.current=l}var J=L(null),oe=L(null),he=L(null),ue=L(null);function ve(i,l){switch(K(he,l),K(oe,i),K(J,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?H2(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=H2(l),i=$2(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(J),K(J,i)}function _e(){V(J),V(oe),V(he)}function Xe(i){i.memoizedState!==null&&K(ue,i);var l=J.current,d=$2(l,i.type);l!==d&&(K(oe,i),K(J,d))}function Ee(i){oe.current===i&&(V(J),V(oe)),ue.current===i&&(V(ue),cf._currentValue=fe)}var pt,Ce;function ze(i){if(pt===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);pt=l&&l[1]||"",Ce=-1<d.stack.indexOf(`
|
|
217
217
|
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
218
218
|
`+pt+i+Ce}var Be=!1;function He(i,l){if(!i||Be)return"";Be=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(l){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(re){var te=re}Reflect.construct(i,[],ae)}else{try{ae.call()}catch(re){te=re}i.call(ae.prototype)}}else{try{throw Error()}catch(re){te=re}(ae=i())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(re){if(re&&te&&typeof re.stack=="string")return[re.stack,te.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=h.DetermineComponentFrameRoot(),_=b[0],N=b[1];if(_&&N){var j=_.split(`
|
|
219
219
|
`),Q=N.split(`
|
|
@@ -291,5 +291,5 @@ https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.p
|
|
|
291
291
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Bv.LANG&&Bv.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
292
292
|
https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new UR().version,u}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(a,u,c){return Lt([s(c)]).process(a,u)},s};Lt.stringify=B1e;Lt.parse=W1e;Lt.fromJSON=j1e;Lt.list=G1e;Lt.comment=t=>new IB(t);Lt.atRule=t=>new OB(t);Lt.decl=t=>new TB(t);Lt.rule=t=>new NB(t);Lt.root=t=>new MB(t);Lt.document=t=>new RB(t);Lt.CssSyntaxError=U1e;Lt.Declaration=TB;Lt.Container=z1e;Lt.Processor=UR;Lt.Document=RB;Lt.Comment=IB;Lt.Warning=H1e;Lt.AtRule=OB;Lt.Result=$1e;Lt.Input=q1e;Lt.Rule=NB;Lt.Root=MB;Lt.Node=V1e;F1e.registerPostcss(Lt);var K1e=Lt;Lt.default=Lt;const on=a0e(K1e);on.stringify;on.fromJSON;on.plugin;on.parse;on.list;on.document;on.comment;on.atRule;on.rule;on.decl;on.root;on.CssSyntaxError;on.Declaration;on.Container;on.Processor;on.Document;on.Comment;on.Warning;on.AtRule;on.Result;on.Input;on.Rule;on.Root;on.Node;class FR{constructor(...e){Cs(this,"parentElement",null),Cs(this,"parentNode",null),Cs(this,"ownerDocument"),Cs(this,"firstChild",null),Cs(this,"lastChild",null),Cs(this,"previousSibling",null),Cs(this,"nextSibling",null),Cs(this,"ELEMENT_NODE",1),Cs(this,"TEXT_NODE",3),Cs(this,"nodeType"),Cs(this,"nodeName"),Cs(this,"RRNodeType")}get childNodes(){const e=[];let n=this.firstChild;for(;n;)e.push(n),n=n.nextSibling;return e}contains(e){if(e instanceof FR){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const x4={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},A4={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Om={},Y1e=()=>!!globalThis.Zone;function zR(t){if(Om[t])return Om[t];const e=globalThis[t],n=e.prototype,r=t in x4?x4[t]:void 0,s=!!(r&&r.every(u=>{var c,f;return!!((f=(c=Object.getOwnPropertyDescriptor(n,u))==null?void 0:c.get)!=null&&f.toString().includes("[native code]"))})),o=t in A4?A4[t]:void 0,a=!!(o&&o.every(u=>{var c;return typeof n[u]=="function"&&((c=n[u])==null?void 0:c.toString().includes("[native code]"))}));if(s&&a&&!Y1e())return Om[t]=e.prototype,e.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const c=u.contentWindow;if(!c)return e.prototype;const f=c[t].prototype;return document.body.removeChild(u),f?Om[t]=f:n}catch{return n}}const h_={};function Oi(t,e,n){var r;const s=`${t}.${String(n)}`;if(h_[s])return h_[s].call(e);const o=zR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(h_[s]=a,a.call(e)):e[n]}const p_={};function PB(t,e,n){const r=`${t}.${String(n)}`;if(p_[r])return p_[r].bind(e);const o=zR(t)[n];return typeof o!="function"?e[n]:(p_[r]=o,o.bind(e))}function Z1e(t){return Oi("Node",t,"ownerDocument")}function X1e(t){return Oi("Node",t,"childNodes")}function Q1e(t){return Oi("Node",t,"parentNode")}function J1e(t){return Oi("Node",t,"parentElement")}function eSe(t){return Oi("Node",t,"textContent")}function tSe(t,e){return PB("Node",t,"contains")(e)}function nSe(t){return PB("Node",t,"getRootNode")()}function rSe(t){return!t||!("host"in t)?null:Oi("ShadowRoot",t,"host")}function sSe(t){return t.styleSheets}function oSe(t){return!t||!("shadowRoot"in t)?null:Oi("Element",t,"shadowRoot")}function iSe(t,e){return Oi("Element",t,"querySelector")(e)}function aSe(t,e){return Oi("Element",t,"querySelectorAll")(e)}function kB(){return zR("MutationObserver").constructor}function uu(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}const rt={ownerDocument:Z1e,childNodes:X1e,parentNode:Q1e,parentElement:J1e,textContent:eSe,contains:tSe,getRootNode:nSe,host:rSe,styleSheets:sSe,shadowRoot:oSe,querySelector:iSe,querySelectorAll:aSe,mutationObserver:kB,patch:uu};function Sr(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const pc=`Please stop import mirror directly. Instead of that,\r
|
|
293
293
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
294
|
-
or you can use record.mirror to access the mirror instance during recording.`;let T4={map:{},getId(){return console.error(pc),-1},getNode(){return console.error(pc),null},removeNodeFromMap(){console.error(pc)},has(){return console.error(pc),!1},reset(){console.error(pc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(T4=new Proxy(T4,{get(t,e,n){return e==="map"&&console.error(pc),Reflect.get(t,e,n)}}));function jh(t,e,n={}){let r=null,s=0;return function(...o){const a=Date.now();!s&&n.leading===!1&&(s=a);const u=e-(a-s),c=this;u<=0||u>e?(r&&(clearTimeout(r),r=null),s=a,t.apply(c,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{s=n.leading===!1?0:Date.now(),r=null,t.apply(c,o)},u))}}function xb(t,e,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>xb(t,e,o||{},!0)}let Jv=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Jv=()=>new Date().getTime());function DB(t){var e,n,r,s;const o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:o.documentElement.scrollLeft||o?.body&&((e=rt.parentElement(o.body))==null?void 0:e.scrollLeft)||((n=o?.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:o?.documentElement.scrollTop||o?.body&&((r=rt.parentElement(o.body))==null?void 0:r.scrollTop)||((s=o?.body)==null?void 0:s.scrollTop)||0}}function LB(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function UB(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function FB(t){return t?t.nodeType===t.ELEMENT_NODE?t:rt.parentElement(t):null}function Er(t,e,n,r){if(!t)return!1;const s=FB(t);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(qv(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function lSe(t,e){return e.getId(t)!==-1}function g_(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===Mh}function zB(t,e){if(lh(t))return!1;const n=e.getId(t);if(!e.has(n))return!0;const r=rt.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?zB(r,e):!0}function rA(t){return!!t.changedTouches}function uSe(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function BB(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function jB(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function sA(t){return t?t instanceof FR&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class cSe{constructor(){Se(this,"id",1),Se(this,"styleIDMap",new WeakMap),Se(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function HB(t){var e;let n=null;return"getRootNode"in t&&((e=rt.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&rt.host(rt.getRootNode(t))&&(n=rt.host(rt.getRootNode(t))),n}function dSe(t){let e=t,n;for(;n=HB(e);)e=n;return e}function fSe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=dSe(t);return rt.contains(e,n)}function $B(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||fSe(t):!1}var Ct=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Ct||{}),ft=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(ft||{}),Dr=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Dr||{}),si=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(si||{}),Wc=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Wc||{}),gc=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(gc||{}),qB=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(qB||{});function R4(t){return"__ln"in t}class hSe{constructor(){Se(this,"length",0),Se(this,"head",null),Se(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&R4(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&R4(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){const n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const I4=(t,e)=>`${t}@${e}`;class pSe{constructor(){Se(this,"frozen",!1),Se(this,"locked",!1),Se(this,"texts",[]),Se(this,"attributes",[]),Se(this,"attributeMap",new WeakMap),Se(this,"removes",[]),Se(this,"mapRemoves",[]),Se(this,"movedMap",{}),Se(this,"addedSet",new Set),Se(this,"movedSet",new Set),Se(this,"droppedSet",new Set),Se(this,"removesSubTreeCache",new Set),Se(this,"mutationCb"),Se(this,"blockClass"),Se(this,"blockSelector"),Se(this,"maskTextClass"),Se(this,"maskTextSelector"),Se(this,"inlineStylesheet"),Se(this,"maskInputOptions"),Se(this,"maskTextFn"),Se(this,"maskInputFn"),Se(this,"keepIframeSrcFn"),Se(this,"recordCanvas"),Se(this,"inlineImages"),Se(this,"slimDOMOptions"),Se(this,"dataURLOptions"),Se(this,"doc"),Se(this,"mirror"),Se(this,"iframeManager"),Se(this,"stylesheetManager"),Se(this,"shadowDomManager"),Se(this,"canvasManager"),Se(this,"processedNodeManager"),Se(this,"unattachedDoc"),Se(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Se(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],n=new Set,r=new hSe,s=c=>{let f=c,p=Mh;for(;p===Mh;)f=f&&f.nextSibling,p=f&&this.mirror.getId(f);return p},o=c=>{const f=rt.parentNode(c);if(!f||!$B(c))return;let p=!1;if(c.nodeType===Node.TEXT_NODE){const S=f.tagName;if(S==="TEXTAREA")return;S==="STYLE"&&this.addedSet.has(f)&&(p=!0)}const g=lh(f)?this.mirror.getId(HB(c)):this.mirror.getId(f),m=s(c);if(g===-1||m===-1)return r.addNode(c);const y=_c(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:S=>{BB(S,this.mirror)&&this.iframeManager.addIframe(S),jB(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),sA(c)&&this.shadowDomManager.addShadowRoot(rt.shadowRoot(c),this.doc)},onIframeLoad:(S,E)=>{this.iframeManager.attachIframe(S,E),this.shadowDomManager.observeAttachShadow(S)},onStylesheetLoad:(S,E)=>{this.stylesheetManager.attachLinkElement(S,E)},cssCaptured:p});y&&(e.push({parentId:g,nextId:m,node:y}),n.add(y.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)O4(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!N4(this.droppedSet,c)&&!O4(this.removesSubTreeCache,c,this.mirror)||N4(this.movedSet,c)?o(c):this.droppedSet.add(c);let a=null;for(;r.length;){let c=null;if(a){const f=this.mirror.getId(rt.parentNode(a.value)),p=s(a.value);f!==-1&&p!==-1&&(c=a)}if(!c){let f=r.tail;for(;f;){const p=f;if(f=f.previous,p){const g=this.mirror.getId(rt.parentNode(p.value));if(s(p.value)===-1)continue;if(g!==-1){c=p;break}else{const y=p.value,S=rt.parentNode(y);if(S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const E=rt.host(S);if(this.mirror.getId(E)!==-1){c=p;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}a=c.previous,r.removeNode(c.value),o(c.value)}const u={texts:this.texts.map(c=>{const f=c.node,p=rt.parentNode(f);return p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p),{id:this.mirror.getId(f),value:c.value}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:f}=c;if(typeof f.style=="string"){const p=JSON.stringify(c.styleDiff),g=JSON.stringify(c._unchangedStyles);p.length<f.style.length&&(p+g).split("var(").length===f.style.split("var(").length&&(f.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),Se(this,"genTextAreaValueMutation",e=>{let n=this.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e,n));const r=Array.from(rt.childNodes(e),s=>rt.textContent(s)||"").join("");n.attributes.value=jv({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Hv(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!g_(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const n=rt.textContent(e.target);!Er(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:hz(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,FB(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if(r==="value"){const a=Hv(n);s=jv({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:s,maskInputFn:this.maskInputFn})}if(Er(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!fz(n.tagName,r))if(o.attributes[r]=dz(this.doc,Gl(n.tagName),Gl(r),s),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const u of Array.from(n.style)){const c=n.style.getPropertyValue(u),f=n.style.getPropertyPriority(u);c!==a.style.getPropertyValue(u)||f!==a.style.getPropertyPriority(u)?f===""?o.styleDiff[u]=c:o.styleDiff[u]=[c,f]:o._unchangedStyles[u]=[c,f]}for(const u of Array.from(a.style))n.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(Er(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=lh(e.target)?this.mirror.getId(rt.host(e.target)):this.mirror.getId(e.target);Er(e.target,this.blockClass,this.blockSelector,!1)||g_(n,this.mirror,this.slimDOMOptions)||!lSe(n,this.mirror)||(this.addedSet.has(n)?(oA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||zB(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[I4(r,s)]?oA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:lh(e.target)&&uh(e.target)?!0:void 0}),gSe(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),Se(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(g_(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[I4(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Er(e,this.blockClass,this.blockSelector,!1)||(rt.childNodes(e).forEach(r=>this.genAdds(r)),sA(e)&&rt.childNodes(rt.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function oA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>oA(t,n))}function gSe(t,e){const n=[t];for(;n.length;){const r=n.pop();e.has(r)||(e.add(r),rt.childNodes(r).forEach(s=>n.push(s)))}}function O4(t,e,n){return t.size===0?!1:mSe(t,e)}function mSe(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function N4(t,e){return t.size===0?!1:WB(t,e)}function WB(t,e){const n=rt.parentNode(e);return n?t.has(n)?!0:WB(t,n):!1}let ch;function vSe(t){ch=t}function ySe(){ch=void 0}const vt=t=>ch?(...n)=>{try{return t(...n)}catch(r){if(ch&&ch(r)===!0)return;throw r}}:t,Tl=[];function cp(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function GB(t,e){const n=new pSe;Tl.push(n),n.init(t);const r=new(kB())(vt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function bSe({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const s=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],u;const c=jh(vt(g=>{const m=Date.now()-u;t(a.map(y=>(y.timeOffset-=m,y)),g),a=[],u=null}),o),f=vt(jh(vt(g=>{const m=cp(g),{clientX:y,clientY:S}=rA(g)?g.changedTouches[0]:g;u||(u=Jv()),a.push({x:y,y:S,id:r.getId(m),timeOffset:Jv()-u}),c(typeof DragEvent<"u"&&g instanceof DragEvent?ft.Drag:g instanceof MouseEvent?ft.MouseMove:ft.TouchMove)}),s,{trailing:!1})),p=[Sr("mousemove",f,n),Sr("touchmove",f,n),Sr("drag",f,n)];return vt(()=>{p.forEach(g=>g())})}function SSe({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[];let c=null;const f=p=>g=>{const m=cp(g);if(Er(m,r,s,!0))return;let y=null,S=p;if("pointerType"in g){switch(g.pointerType){case"mouse":y=si.Mouse;break;case"touch":y=si.Touch;break;case"pen":y=si.Pen;break}y===si.Touch?Dr[p]===Dr.MouseDown?S="TouchStart":Dr[p]===Dr.MouseUp&&(S="TouchEnd"):si.Pen}else rA(g)&&(y=si.Touch);y!==null?(c=y,(S.startsWith("Touch")&&y===si.Touch||S.startsWith("Mouse")&&y===si.Mouse)&&(y=null)):Dr[p]===Dr.Click&&(y=c,c=null);const E=rA(g)?g.changedTouches[0]:g;if(!E)return;const C=n.getId(m),{clientX:w,clientY:x}=E;vt(t)({type:Dr[S],id:C,x:w,y:x,...y!==null&&{pointerType:y}})};return Object.keys(Dr).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&a[p]!==!1).forEach(p=>{let g=Gl(p);const m=f(p);if(window.PointerEvent)switch(Dr[p]){case Dr.MouseDown:case Dr.MouseUp:g=g.replace("mouse","pointer");break;case Dr.TouchStart:case Dr.TouchEnd:return}u.push(Sr(g,m,e))}),vt(()=>{u.forEach(p=>p())})}function VB({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){const a=vt(jh(vt(u=>{const c=cp(u);if(!c||Er(c,r,s,!0))return;const f=n.getId(c);if(c===e&&e.defaultView){const p=DB(e.defaultView);t({id:f,x:p.left,y:p.top})}else t({id:f,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Sr("scroll",a,e)}function ESe({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=vt(jh(vt(()=>{const o=LB(),a=UB();(n!==o||r!==a)&&(t({width:Number(a),height:Number(o)}),n=o,r=a)}),200));return Sr("resize",s,e)}const CSe=["INPUT","TEXTAREA","SELECT"],M4=new WeakMap;function wSe({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:p}){function g(x){let T=cp(x);const R=x.isTrusted,M=T&&T.tagName;if(T&&M==="OPTION"&&(T=rt.parentElement(T)),!T||!M||CSe.indexOf(M)<0||Er(T,r,s,!0)||T.classList.contains(o)||a&&T.matches(a))return;let O=T.value,I=!1;const P=Hv(T)||"";P==="radio"||P==="checkbox"?I=T.checked:(u[M.toLowerCase()]||u[P])&&(O=jv({element:T,maskInputOptions:u,tagName:M,type:P,value:O,maskInputFn:c})),m(T,p?{text:O,isChecked:I,userTriggered:R}:{text:O,isChecked:I});const k=T.name;P==="radio"&&k&&I&&e.querySelectorAll(`input[type="radio"][name="${k}"]`).forEach(H=>{if(H!==T){const F=H.value;m(H,p?{text:F,isChecked:!I,userTriggered:!1}:{text:F,isChecked:!I})}})}function m(x,T){const R=M4.get(x);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){M4.set(x,T);const M=n.getId(x);vt(t)({...T,id:M})}}const S=(f.input==="last"?["change"]:["input","change"]).map(x=>Sr(x,vt(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(x=>x())};const C=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),w=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&S.push(...w.map(x=>xb(x[0],x[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(x=>x())})}function ey(t){const e=[];function n(r,s){if(Nm("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Nm("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Nm("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Nm("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(a)}return s}return n(t,e)}function ba(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function _Se({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:vt((p,g,m)=>{const[y,S]=m,{id:E,styleId:C}=ba(g,e,n.styleMirror);return(E&&E!==-1||C&&C!==-1)&&t({id:E,styleId:C,adds:[{rule:y,index:S}]}),p.apply(g,m)})}),r.CSSStyleSheet.prototype.addRule=function(p,g,m=this.cssRules.length){const y=`${p} { ${g} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[y,m])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,removes:[{index:y}]}),p.apply(g,m)})}),r.CSSStyleSheet.prototype.removeRule=function(p){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replace:y}),p.apply(g,m)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replaceSync:y}),p.apply(g,m)})}));const c={};Mm("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Mm("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Mm("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Mm("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(c).forEach(([p,g])=>{f[p]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(f[p].insertRule,{apply:vt((m,y,S)=>{const[E,C]=S,{id:w,styleId:x}=ba(y.parentStyleSheet,e,n.styleMirror);return(w&&w!==-1||x&&x!==-1)&&t({id:w,styleId:x,adds:[{rule:E,index:[...ey(y),C||0]}]}),m.apply(y,S)})}),g.prototype.deleteRule=new Proxy(f[p].deleteRule,{apply:vt((m,y,S)=>{const[E]=S,{id:C,styleId:w}=ba(y.parentStyleSheet,e,n.styleMirror);return(C&&C!==-1||w&&w!==-1)&&t({id:C,styleId:w,removes:[{index:[...ey(y),E]}]}),m.apply(y,S)})})}),vt(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,a&&(r.CSSStyleSheet.prototype.replace=a),u&&(r.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach(([p,g])=>{g.prototype.insertRule=f[p].insertRule,g.prototype.deleteRule=f[p].deleteRule})})}function KB({mirror:t,stylesheetManager:e},n){var r,s,o;let a=null;n.nodeName==="#document"?a=t.getId(n):a=t.getId(rt.host(n));const u=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(o=(s=n.ownerDocument)==null?void 0:s.defaultView)==null?void 0:o.ShadowRoot,c=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var f;return(f=c.get)==null?void 0:f.call(this)},set(f){var p;const g=(p=c.set)==null?void 0:p.call(this,f);if(a!==null&&a!==-1)try{e.adoptStyleSheets(f,a)}catch{}return g}}),vt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function xSe({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:vt((u,c,f)=>{var p;const[g,m,y]=f;if(n.has(g))return o.apply(c,[g,m,y]);const{id:S,styleId:E}=ba((p=c.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,set:{property:g,value:m,priority:y},index:ey(c.parentRule)}),u.apply(c,f)})});const a=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:vt((u,c,f)=>{var p;const[g]=f;if(n.has(g))return a.apply(c,[g]);const{id:m,styleId:y}=ba((p=c.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&t({id:m,styleId:y,remove:{property:g},index:ey(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function ASe({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:s,doc:o}){const a=vt(c=>jh(vt(f=>{const p=cp(f);if(!p||Er(p,e,n,!0))return;const{currentTime:g,volume:m,muted:y,playbackRate:S,loop:E}=p;t({type:c,id:r.getId(p),currentTime:g,volume:m,muted:y,playbackRate:S,loop:E})}),s.media||500)),u=[Sr("play",a(gc.Play),o),Sr("pause",a(gc.Pause),o),Sr("seeked",a(gc.Seeked),o),Sr("volumechange",a(gc.VolumeChange),o),Sr("ratechange",a(gc.RateChange),o)];return vt(()=>{u.forEach(c=>c())})}function TSe({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(c,f,p){const g=new o(c,f,p);return s.set(g,{family:c,buffer:typeof f!="string",descriptors:p,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),g};const a=uu(e.fonts,"add",function(u){return function(c){return setTimeout(vt(()=>{const f=s.get(c);f&&(t(f),s.delete(c))}),0),u.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(a),vt(()=>{r.forEach(u=>u())})}function RSe(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,selectionCb:o}=t;let a=!0;const u=vt(()=>{const c=e.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;const f=[],p=c.rangeCount||0;for(let g=0;g<p;g++){const m=c.getRangeAt(g),{startContainer:y,startOffset:S,endContainer:E,endOffset:C}=m;Er(y,r,s,!0)||Er(E,r,s,!0)||f.push({start:n.getId(y),startOffset:S,end:n.getId(E),endOffset:C})}o({ranges:f})});return u(),Sr("selectionchange",u)}function ISe({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:uu(n.customElements,"define",function(s){return function(o,a,u){try{e({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return s.apply(this,[o,a,u])}})}function OSe(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:c,styleSheetRuleCb:f,styleDeclarationCb:p,canvasMutationCb:g,fontCb:m,selectionCb:y,customElementCb:S}=t;t.mutationCb=(...E)=>{e.mutation&&e.mutation(...E),n(...E)},t.mousemoveCb=(...E)=>{e.mousemove&&e.mousemove(...E),r(...E)},t.mouseInteractionCb=(...E)=>{e.mouseInteraction&&e.mouseInteraction(...E),s(...E)},t.scrollCb=(...E)=>{e.scroll&&e.scroll(...E),o(...E)},t.viewportResizeCb=(...E)=>{e.viewportResize&&e.viewportResize(...E),a(...E)},t.inputCb=(...E)=>{e.input&&e.input(...E),u(...E)},t.mediaInteractionCb=(...E)=>{e.mediaInteaction&&e.mediaInteaction(...E),c(...E)},t.styleSheetRuleCb=(...E)=>{e.styleSheetRule&&e.styleSheetRule(...E),f(...E)},t.styleDeclarationCb=(...E)=>{e.styleDeclaration&&e.styleDeclaration(...E),p(...E)},t.canvasMutationCb=(...E)=>{e.canvasMutation&&e.canvasMutation(...E),g(...E)},t.fontCb=(...E)=>{e.font&&e.font(...E),m(...E)},t.selectionCb=(...E)=>{e.selection&&e.selection(...E),y(...E)},t.customElementCb=(...E)=>{e.customElement&&e.customElement(...E),S(...E)}}function NSe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};OSe(t,e);let r;t.recordDOM&&(r=GB(t,t.doc));const s=bSe(t),o=SSe(t),a=VB(t),u=ESe(t,{win:n}),c=wSe(t),f=ASe(t);let p=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(p=_Se(t,{win:n}),g=KB(t,t.doc),m=xSe(t,{win:n}),t.collectFonts&&(y=TSe(t)));const S=RSe(t),E=ISe(t),C=[];for(const w of t.plugins)C.push(w.observer(w.callback,n,w.options));return vt(()=>{Tl.forEach(w=>w.reset()),r?.disconnect(),s(),o(),a(),u(),c(),f(),p(),g(),m(),y(),S(),E(),C.forEach(w=>w())})}function Nm(t){return typeof window[t]<"u"}function Mm(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class P4{constructor(e){Se(this,"iframeIdToRemoteIdMap",new WeakMap),Se(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,n,r,s){const o=r||this.getIdToRemoteIdMap(e),a=s||this.getRemoteIdToIdMap(e);let u=o.get(n);return u||(u=this.generateIdFn(),o.set(n,u),a.set(u,n)),u}getIds(e,n){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,r,s))}getRemoteId(e,n,r){const s=r||this.getRemoteIdToIdMap(e);if(typeof n!="number")return n;const o=s.get(n);return o||-1}getRemoteIds(e,n){const r=this.getRemoteIdToIdMap(e);return n.map(s=>this.getRemoteId(e,s,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}}class MSe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new P4(cz)),Se(this,"crossOriginIframeStyleMirror"),Se(this,"crossOriginIframeRootIdMap",new WeakMap),Se(this,"mirror"),Se(this,"mutationCb"),Se(this,"wrappedEmit"),Se(this,"loadListener"),Se(this,"stylesheetManager"),Se(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new P4(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const o=this.transformCrossOriginEvent(s,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){var r;switch(n.type){case Ct.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);const s=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(n.data.node,s),{timestamp:n.timestamp,type:Ct.IncrementalSnapshot,data:{source:ft.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ct.Meta:case Ct.Load:case Ct.DomContentLoaded:return!1;case Ct.Plugin:return n;case Ct.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case Ct.IncrementalSnapshot:switch(n.data.source){case ft.Mutation:return n.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(s.node,o)}),n.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"])}),n.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"])}),n.data.texts.forEach(s=>{this.replaceIds(s,e,["id"])}),n;case ft.Drag:case ft.TouchMove:case ft.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,e,["id"])}),n;case ft.ViewportResize:return!1;case ft.MediaInteraction:case ft.MouseInteraction:case ft.Scroll:case ft.CanvasMutation:case ft.Input:return this.replaceIds(n.data,e,["id"]),n;case ft.StyleSheetRule:case ft.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case ft.Font:return n;case ft.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"])}),n;case ft.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),(r=n.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,e,["styleId"])}),n}}return!1}replace(e,n,r,s){for(const o of s)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(r,n[o]):n[o]=e.getId(r,n[o]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==qB.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class PSe{constructor(e){Se(this,"shadowDoms",new WeakSet),Se(this,"mutationCb"),Se(this,"scrollCb"),Se(this,"bypassOptions"),Se(this,"mirror"),Se(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!uh(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=GB({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(VB({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(rt.host(e))),this.restoreHandlers.push(KB({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){const r=this;this.restoreHandlers.push(uu(e.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o),u=rt.shadowRoot(this);return u&&$B(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var xc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kSe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Pm=0;Pm<xc.length;Pm++)kSe[xc.charCodeAt(Pm)]=Pm;var DSe=function(t){var e=new Uint8Array(t),n,r=e.length,s="";for(n=0;n<r;n+=3)s+=xc[e[n]>>2],s+=xc[(e[n]&3)<<4|e[n+1]>>4],s+=xc[(e[n+1]&15)<<2|e[n+2]>>6],s+=xc[e[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const k4=new Map;function LSe(t,e){let n=k4.get(t);return n||(n=new Map,k4.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const YB=(t,e,n)=>{if(!t||!(XB(t,e)||typeof t=="object"))return;const r=t.constructor.name,s=LSe(n,r);let o=s.indexOf(t);return o===-1&&(o=s.length,s.push(t)),o};function cv(t,e,n){if(t instanceof Array)return t.map(r=>cv(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const r=t.constructor.name,s=DSe(t);return{rr_type:r,base64:s}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[cv(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:s}=t;return{rr_type:r,src:s}}else if(t instanceof HTMLCanvasElement){const r="HTMLImageElement",s=t.toDataURL();return{rr_type:r,src:s}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[cv(t.data,e,n),t.width,t.height]};if(XB(t,e)||typeof t=="object"){const r=t.constructor.name,s=YB(t,e,n);return{rr_type:r,index:s}}}}return t}const ZB=(t,e,n)=>t.map(r=>cv(r,e,n)),XB=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>t instanceof e[s]);function USe(t,e,n,r){const s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const u=uu(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return Er(this.canvas,n,r,!0)||setTimeout(()=>{const p=ZB(f,e,this);t(this.canvas,{type:Wc["2D"],property:a,args:p})},0),c.apply(this,f)}});s.push(u)}catch{const u=xb(e.CanvasRenderingContext2D.prototype,a,{set(c){t(this.canvas,{type:Wc["2D"],property:a,args:[c],setter:!0})}});s.push(u)}return()=>{s.forEach(a=>a())}}function FSe(t){return t==="experimental-webgl"?"webgl":t}function D4(t,e,n,r){const s=[];try{const o=uu(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!Er(this,e,n,!0)){const f=FSe(u);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(c[0]&&typeof c[0]=="object"){const p=c[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...c])}});s.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(o=>o())}}function L4(t,e,n,r,s,o){const a=[],u=Object.getOwnPropertyNames(t);for(const c of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;const f=uu(t,c,function(p){return function(...g){const m=p.apply(this,g);if(YB(m,o,this),"tagName"in this.canvas&&!Er(this.canvas,r,s,!0)){const y=ZB(g,o,this),S={type:e,property:c,args:y};n(this.canvas,S)}return m}});a.push(f)}catch{const f=xb(t,c,{set(p){n(this.canvas,{type:e,property:c,args:[p],setter:!0})}});a.push(f)}return a}function zSe(t,e,n,r){const s=[];return s.push(...L4(e.WebGLRenderingContext.prototype,Wc.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...L4(e.WebGL2RenderingContext.prototype,Wc.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const QB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",BSe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),U4=typeof window<"u"&&window.Blob&&new Blob([BSe(QB)],{type:"text/javascript;charset=utf-8"});function jSe(t){let e;try{if(e=U4&&(window.URL||window.webkitURL).createObjectURL(U4),!e)throw"";const n=new Worker(e,{name:t?.name});return n.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),n}catch{return new Worker("data:text/javascript;base64,"+QB,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class HSe{constructor(e){Se(this,"pendingCanvasMutations",new Map),Se(this,"rafStamps",{latestId:0,invokeId:null}),Se(this,"mirror"),Se(this,"mutationCb"),Se(this,"resetObservers"),Se(this,"frozen",!1),Se(this,"locked",!1),Se(this,"processMutation",(c,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(f)});const{sampling:n="all",win:r,blockClass:s,blockSelector:o,recordCanvas:a,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&n==="all"&&this.initCanvasMutationObserver(r,s,o),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,s,o,{dataURLOptions:u})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,n,r,s,o){const a=D4(n,r,s,!0),u=new Map,c=new jSe;c.onmessage=S=>{const{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;const{base64:C,type:w,width:x,height:T}=S.data;this.mutationCb({id:E,type:Wc["2D"],commands:[{property:"clearRect",args:[0,0,x,T]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:w}]},0,0]}]})};const f=1e3/e;let p=0,g;const m=()=>{const S=[];return n.document.querySelectorAll("canvas").forEach(E=>{Er(E,r,s,!0)||S.push(E)}),S},y=S=>{if(p&&S-p<f){g=requestAnimationFrame(y);return}p=S,m().forEach(async E=>{var C;const w=this.mirror.getId(E);if(u.get(w)||E.width===0||E.height===0)return;if(u.set(w,!0),["webgl","webgl2"].includes(E.__context)){const T=E.getContext(E.__context);((C=T?.getContextAttributes())==null?void 0:C.preserveDrawingBuffer)===!1&&T.clear(T.COLOR_BUFFER_BIT)}const x=await createImageBitmap(E);c.postMessage({id:w,bitmap:x,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[x])}),g=requestAnimationFrame(y)};g=requestAnimationFrame(y),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=D4(e,n,r,!1),o=USe(this.processMutation.bind(this),e,n,r),a=zSe(this.processMutation.bind(this),e,n,r);this.resetObservers=()=>{s(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const s=r.map(a=>{const{type:u,...c}=a;return c}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:s}),this.pendingCanvasMutations.delete(e)}}class $Se{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new cSe),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;const r={id:n,styleIds:[]},s=[];for(const o of e){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),s.push({styleId:a,rules:Array.from(o.rules||CSSRule,(u,c)=>({rule:az(u,o.href),index:c}))})),r.styleIds.push(a)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class qSe{constructor(){Se(this,"nodeMap",new WeakMap),Se(this,"active",!1)}inOtherBuffer(e,n){const r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==n)}add(e,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}}let gn,dv,m_,ty=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((BU=t.contentWindow)==null?void 0:BU.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const js=Gve();function dp(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:y,maskInputFn:S,maskTextFn:E,hooks:C,packFn:w,sampling:x={},dataURLOptions:T={},mousemoveWait:R,recordDOM:M=!0,recordCanvas:O=!1,recordCrossOriginIframes:I=!1,recordAfter:P=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:k=!1,collectFonts:H=!1,inlineImages:F=!1,plugins:B,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:ne}=t;vSe(ne);const $=I?window.parent===window:!0;let ee=!1;if(!$)try{window.parent.document&&(ee=!1)}catch{ee=!0}if($&&!e)throw new Error("emit function is required");if(!$&&!ee)return()=>{};R!==void 0&&x.mousemove===void 0&&(x.mousemove=R),js.reset();const fe=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:m!==void 0?m:{password:!0},de=pz(y);uSe();let Ae,L=0;const V=Ee=>{for(const pt of B||[])pt.eventProcessor&&(Ee=pt.eventProcessor(Ee));return w&&!ee&&(Ee=w(Ee)),Ee};gn=(Ee,pt)=>{var Ce;const ze=Ee;if(ze.timestamp=Jv(),(Ce=Tl[0])!=null&&Ce.isFrozen()&&ze.type!==Ct.FullSnapshot&&!(ze.type===Ct.IncrementalSnapshot&&ze.data.source===ft.Mutation)&&Tl.forEach(Be=>Be.unfreeze()),$)e?.(V(ze),pt);else if(ee){const Be={type:"rrweb",event:V(ze),origin:window.location.origin,isCheckout:pt};window.parent.postMessage(Be,"*")}if(ze.type===Ct.FullSnapshot)Ae=ze,L=0;else if(ze.type===Ct.IncrementalSnapshot){if(ze.data.source===ft.Mutation&&ze.data.isAttachIframe)return;L++;const Be=r&&L>=r,He=n&&ze.timestamp-Ae.timestamp>n;(Be||He)&&dv(!0)}};const K=Ee=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Mutation,...Ee}})},J=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Scroll,...Ee}}),oe=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.CanvasMutation,...Ee}}),he=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.AdoptedStyleSheet,...Ee}}),ue=new $Se({mutationCb:K,adoptedStyleSheetCb:he}),ve=new MSe({mirror:js,mutationCb:K,stylesheetManager:ue,recordCrossOriginIframes:I,wrappedEmit:gn});for(const Ee of B||[])Ee.getMirror&&Ee.getMirror({nodeMirror:js,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const _e=new qSe;m_=new HSe({recordCanvas:O,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:js,sampling:x.canvas,dataURLOptions:T});const Xe=new PSe({mutationCb:K,scrollCb:J,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:p,maskInputOptions:fe,dataURLOptions:T,maskTextFn:E,maskInputFn:S,recordCanvas:O,inlineImages:F,sampling:x,slimDOMOptions:de,iframeManager:ve,stylesheetManager:ue,canvasManager:m_,keepIframeSrcFn:W,processedNodeManager:_e},mirror:js});dv=(Ee=!1)=>{if(!M)return;gn({type:Ct.Meta,data:{href:window.location.href,width:UB(),height:LB()}},Ee),ue.reset(),Xe.init(),Tl.forEach(Ce=>Ce.lock());const pt=mye(document,{mirror:js,blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:p,maskAllInputs:fe,maskTextFn:E,maskInputFn:S,slimDOM:de,dataURLOptions:T,recordCanvas:O,inlineImages:F,onSerialize:Ce=>{BB(Ce,js)&&ve.addIframe(Ce),jB(Ce,js)&&ue.trackLinkElement(Ce),sA(Ce)&&Xe.addShadowRoot(rt.shadowRoot(Ce),document)},onIframeLoad:(Ce,ze)=>{ve.attachIframe(Ce,ze),Xe.observeAttachShadow(Ce)},onStylesheetLoad:(Ce,ze)=>{ue.attachLinkElement(Ce,ze)},keepIframeSrcFn:W});if(!pt)return console.warn("Failed to snapshot the document");gn({type:Ct.FullSnapshot,data:{node:pt,initialOffset:DB(window)}},Ee),Tl.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,js.getId(document))};try{const Ee=[],pt=ze=>{var Be;return vt(NSe)({mutationCb:K,mousemoveCb:(He,pr)=>gn({type:Ct.IncrementalSnapshot,data:{source:pr,positions:He}}),mouseInteractionCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MouseInteraction,...He}}),scrollCb:J,viewportResizeCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.ViewportResize,...He}}),inputCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Input,...He}}),mediaInteractionCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MediaInteraction,...He}}),styleSheetRuleCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleSheetRule,...He}}),styleDeclarationCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleDeclaration,...He}}),canvasMutationCb:oe,fontCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Font,...He}}),selectionCb:He=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Selection,...He}})},customElementCb:He=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.CustomElement,...He}})},blockClass:s,ignoreClass:a,ignoreSelector:u,maskTextClass:c,maskTextSelector:f,maskInputOptions:fe,inlineStylesheet:p,sampling:x,recordDOM:M,recordCanvas:O,inlineImages:F,userTriggeredOnInput:k,collectFonts:H,doc:ze,maskInputFn:S,maskTextFn:E,keepIframeSrcFn:W,blockSelector:o,slimDOMOptions:de,dataURLOptions:T,mirror:js,iframeManager:ve,stylesheetManager:ue,shadowDomManager:Xe,processedNodeManager:_e,canvasManager:m_,ignoreCSSAttributes:Y,plugins:((Be=B?.filter(He=>He.observer))==null?void 0:Be.map(He=>({observer:He.observer,options:He.options,callback:pr=>gn({type:Ct.Plugin,data:{plugin:He.name,payload:pr}})})))||[]},C)};ve.addLoadListener(ze=>{try{Ee.push(pt(ze.contentDocument))}catch(Be){console.warn(Be)}});const Ce=()=>{dv(),Ee.push(pt(document)),ty=!0};return["interactive","complete"].includes(document.readyState)?Ce():(Ee.push(Sr("DOMContentLoaded",()=>{gn({type:Ct.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&Ce()})),Ee.push(Sr("load",()=>{gn({type:Ct.Load,data:{}}),P==="load"&&Ce()},window))),()=>{Ee.forEach(ze=>{try{ze()}catch(Be){String(Be).toLowerCase().includes("cross-origin")||console.warn(Be)}}),_e.destroy(),ty=!1,ySe()}}catch(Ee){console.warn(Ee)}}dp.addCustomEvent=(t,e)=>{if(!ty)throw new Error("please add custom event after start recording");gn({type:Ct.Custom,data:{tag:t,payload:e}})};dp.freezePage=()=>{Tl.forEach(t=>t.freeze())};dp.takeFullSnapshot=t=>{if(!ty)throw new Error("please take full snapshot after start recording");dv(t)};dp.mirror=js;var F4;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(F4||(F4={}));const WSe="rrweb",GSe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},VSe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},z4=VSe;class KSe extends Os{constructor(e){super(WSe),this.recordingEvents=[],this.isRecording=!1,this.recordingStartTime=null,this.flushTimer=null,this.stopRecording=null,this.enabled=!1;const n=Object.assign(Object.assign(Object.assign({},z4.recordOptions),e?.recordOptions),GSe);this.config=Object.assign(Object.assign(Object.assign({},z4),e),{recordOptions:n}),be.info("RRWebPlugin initialized",{additionalSampleRate:this.config.additionalSampleRate,batchSize:this.config.batchSize,flushInterval:this.config.flushInterval})}enable(){var e;if(this.enabled){be.info("RRWebPlugin already enabled");return}const n=(e=this.context)===null||e===void 0?void 0:e.getSession();if(!n||!n.record){be.warn("RRWebPlugin skipping - session not being recorded",{hasSession:!!n,sessionRecord:n?.record});return}const r=Math.random();if(r>this.config.additionalSampleRate){be.warn("RRWebPlugin skipping - session replay additionalSampleRate",{randomValue:r,samplingRate:this.config.additionalSampleRate});return}this.enabled=!0,be.info("RRWebPlugin enabled - starting recording"),this.startRecording()}disable(){if(!this.enabled){be.info("RRWebPlugin already disabled");return}be.info("RRWebPlugin disabled - stopping recording"),this.enabled=!1,this.stopCurrentRecording()}record(e){const n=e?.action;n==="start"?(be.info("RRWebPlugin manual start recording"),this.startRecording()):n==="stop"&&(be.info("RRWebPlugin manual stop recording"),this.stopCurrentRecording())}onload(){}startRecording(){this.recordingStartTime=Date.now(),this.recordingEvents=[],this.isRecording=!0,be.info("RRWebPlugin starting rrweb recording",{startTime:this.recordingStartTime});const e=dp(Object.assign(Object.assign({},this.config.recordOptions),{emit:this.handleRRWebEvent.bind(this)}));e?(this.stopRecording=e,be.info("RRWebPlugin rrweb recording initialized successfully")):be.warn("RRWebPlugin failed to initialize rrweb recording"),this.flushTimer=window.setInterval(()=>{this.flush()},this.config.flushInterval)}stopCurrentRecording(){if(!this.isRecording){be.info("RRWebPlugin stopCurrentRecording called but not recording");return}be.info("RRWebPlugin stopping current recording"),this.isRecording=!1,this.stopRecording&&(this.stopRecording(),this.stopRecording=null,be.info("RRWebPlugin rrweb recording stopped")),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null,be.info("RRWebPlugin flush timer cleared")),this.flush()}handleRRWebEvent(e){this.isRecording&&(this.recordingEvents.push(e),this.recordingEvents.length>=this.config.batchSize&&(be.info("RRWebPlugin flushing events due to batch size",{eventCount:this.recordingEvents.length,batchSize:this.config.batchSize}),this.flush()))}flush(){if(this.recordingEvents.length===0){be.info("RRWebPlugin flushEvent called but no events to flush");return}be.info("RRWebPlugin flushing events",{eventCount:this.recordingEvents.length});const e=[...this.recordingEvents],n={version:"1.0.0",events:e,eventCount:e.length};this.context.record(_U,n),be.info("RRWebPlugin events sent to RUM",{eventType:_U,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var YSe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n},iA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(iA||(iA={}));const JB="us-west-2",aA=`https://dataplane.rum.${JB}.amazonaws.com`,ej=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),tj=t=>({allowCookies:!1,batchLimit:100,client:bge,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:aA,endpointUrl:new URL(aA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:iA.Path,pagesToExclude:[],pagesToInclude:[/.*/],signing:!1,recordResourceUrl:!0,retries:2,routeChangeComplete:100,routeChangeTimeout:1e4,sessionAttributes:{},sessionEventLimit:200,sessionLengthSeconds:1800,sessionSampleRate:1,suppressSessionStartEvent:!1,useBeacon:!0,userIdRetentionDays:30,enableW3CTraceId:!1,candidatesCacheSize:10});let ZSe=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=YSe(s,["cookieAttributes"]);this.eventBus=new W7,typeof r>"u"&&(r="us-west-2"),this.applicationId=e;const u=Object.assign(Object.assign({},ej()),o);this.config=Object.assign(Object.assign({fetchFunction:fetch},tj(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:aA.replace(JB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new Ome({id:e,version:n},this.config,this.eventBus),this.dispatchManager=this.initDispatch(r,e),this.pluginManager=this.initPluginManager(e,n),this.eventCache.setPluginFlushHook(()=>this.pluginManager.flush()),this.config.enableRumClient?this.enable():this.disable()}setAwsCredentials(e){this.dispatchManager.setAwsCredentials(e)}setSigningConfigFactory(e){this.dispatchManager.setSigningConfigFactory(e)}addSessionAttributes(e){this.eventCache.addSessionAttributes(e)}getSessionId(){return this.eventCache.getSessionId()}pinSessionId(e){this.eventCache.pinSessionId(e)}startSession(e){return this.eventCache.startSession(e)}getUserId(){return this.eventCache.getUserId()}pinUserId(e){this.eventCache.pinUserId(e)}setEventMetadataHook(e){this.eventCache.setEventMetadataHook(e)}clearEventMetadataHook(){this.eventCache.clearEventMetadataHook()}addPlugin(e){this.pluginManager.addPlugin(e)}dispatch(){this.dispatchManager.dispatchFetch()}dispatchBeacon(){this.dispatchManager.dispatchBeacon()}enable(){this.eventCache.enable(),this.pluginManager.enable(),this.dispatchManager.enable()}disable(){this.dispatchManager.disable(),this.pluginManager.disable(),this.eventCache.disable()}allowCookies(e){this.config.allowCookies=e}clearCookies(){const e=this.config.cookieAttributes;[kv,Dv,Fc,`${kv}_${this.applicationId}`,`${Dv}_${this.applicationId}`,`${Fc}_${this.applicationId}`].forEach(r=>Cme(r,e))}recordPageView(e){this.eventCache.recordPageView(e)}recordError(e){this.pluginManager.record("com.amazonaws.rum.js-error",e)}registerDomEvents(e){this.pluginManager.updatePlugin("com.amazonaws.rum.dom-event",e)}recordEvent(e,n,r){this.eventCache.recordEvent(e,n,r)}initDispatch(e,n){return new Sge(n,e,this.config.endpointUrl,this.eventCache,this.config)}initPluginManager(e,n){const r={applicationId:e,applicationVersion:n,config:this.config,record:this.eventCache.recordEvent,recordCandidate:this.eventCache.recordCandidate,recordPageView:this.eventCache.recordPageView,getSession:this.eventCache.getSession,eventBus:this.eventBus},s=new Eme(r);return this.config.disableAutoPageView||s.addPlugin(new Kme),this.config.eventPluginsToLoad.forEach(o=>{s.addPlugin(o)}),s}};var Ks;(function(t){t.Errors="errors",t.Performance="performance",t.Interaction="interaction",t.Http="http",t.Replay="replay"})(Ks||(Ks={}));var B4;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(B4||(B4={}));const XSe=t=>Object.assign(Object.assign({},tj(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class QSe extends ZSe{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},XSe(ej())),s)),be.info(`RUM client initialized for app: ${e}`),be.info(`Telemetries enabled: ${this.config.telemetries.join(", ")||"none"}`)}initDispatch(e,n){const r=super.initDispatch(e,n);return r.setSigningConfigFactory(Yge),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new dme(c,o).ChainAnonymousCredentialsProvider:new fme(c,o).ChainAnonymousCredentialsProvider}),this.config.signing&&this.config.identityPoolId&&r.setCognitoCredentials(this.config.identityPoolId,this.config.guestRoleArn),r}initPluginManager(e,n){const r=super.initPluginManager(e,n);return this.constructBuiltinPlugins().forEach(o=>{r.addPlugin(o)}),r}recordError(e){this.pluginManager.record(K7,e)}registerDomEvents(e){this.pluginManager.updatePlugin(G7,e)}constructBuiltinPlugins(){let e=[];const n=this.telemetryFunctor();return this.config.telemetries.forEach(r=>{typeof r=="string"&&n[r.toLowerCase()]?e=[...e,...n[r.toLowerCase()]({})]:Array.isArray(r)&&n[r[0].toLowerCase()]&&(e=[...e,...n[r[0].toLowerCase()](r[1])])}),e}telemetryFunctor(){return{[Ks.Errors]:e=>[new jme(e)],[Ks.Performance]:e=>[new qme(e),new Zme(e),new mve(e)],[Ks.Interaction]:e=>[new iR(e)],[Ks.Http]:e=>[new Eve(e),new yve(e)],[Ks.Replay]:e=>[new KSe(e)]}}}const nj={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},JSe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function rj(t){return t.replace(JSe,"[redacted]")}function eEe(t){const e=t.indexOf("?"),n=t.indexOf("#"),r=e===-1&&n===-1?t.length:e===-1?n:n===-1?e:Math.min(e,n);return rj(t.slice(0,r))}function tEe(t){const e=rj(t.message);if(e===t.message)return t;const n=new Error(e);return n.name=t.name,n.stack=t.stack,n}function nEe(t){return{recordPageView(e){t.recordPageView(eEe(e))},recordError(e,n){t.recordError(tEe(e)),n&&t.recordEvent("telemetry.error_context",n)},recordEvent(e,n){t.recordEvent(e,n??{})},recordTiming(e,n,r){t.recordEvent("telemetry.timing",{...r,name:e,durationMs:String(n)})}}}function j4(t){return t instanceof Error?t:new Error(String(t))}function rEe(t){window.addEventListener("error",e=>{t.recordError(j4(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(j4(e.reason))})}function sEe(){const{appMonitorId:t,identityPoolId:e,region:n}=Cy().rum;if(!t)return nj;const r=new QSe(t,"1.0.0",n,{sessionSampleRate:1,identityPoolId:e,endpoint:`https://dataplane.rum.${n}.amazonaws.com`,telemetries:["performance"],disableAutoPageView:!0,allowCookies:!1,enableXRay:!1}),s=nEe(r);return rEe(s),s}const sj=A.createContext(nj);function SAe(){return A.useContext(sj)}const lA="remit.theme",oEe="dark";function H4(){return typeof localStorage>"u"?"system":localStorage.getItem(lA)??"system"}function uA(t){if(typeof document>"u")return;const e=t==="dark"||t==="system"&&typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle(oEe,e)}function EAe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(lA):localStorage.setItem(lA,t)),uA(t)}const iEe=()=>{if(typeof window>"u"||(uA(H4()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{uA(H4())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},aEe=(t,e,n,r)=>{const s=[n,{code:e,...r||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);Ll(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},$4={},cA=(t,e,n,r)=>{Ll(n)&&$4[n]||(Ll(n)&&($4[n]=new Date),aEe(t,e,n,r))},oj=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},dA=(t,e,n)=>{t.loadNamespaces(e,oj(t,n))},q4=(t,e,n,r)=>{if(Ll(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return dA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,oj(t,r))},lEe=(t,e,n={})=>!e.languages||!e.languages.length?(cA(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(r,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,t))return!1}}),Ll=t=>typeof t=="string",uEe=t=>typeof t=="object"&&t!==null,cEe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,dEe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},fEe=t=>dEe[t],hEe=t=>t.replace(cEe,fEe);let fA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:hEe};const pEe=(t={})=>{fA={...fA,...t}},gEe=()=>fA;let ij;const mEe=t=>{ij=t},vEe=()=>ij,yEe={type:"3rdParty",init(t){pEe(t.options.react),mEe(t)}},bEe=A.createContext();class SEe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const EEe=(t,e)=>{const n=A.useRef();return A.useEffect(()=>{n.current=t},[t,e]),n.current},aj=(t,e,n,r)=>t.getFixedT(e,n,r),CEe=(t,e,n,r)=>A.useCallback(aj(t,e,n,r),[t,e,n,r]),wEe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=A.useContext(bEe)||{},o=n||r||vEe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new SEe),!o){cA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(O,I)=>Ll(I)?I:uEe(I)&&Ll(I.defaultValue)?I.defaultValue:Array.isArray(O)?O[O.length-1]:O,M=[R,{},!1];return M.t=R,M.i18n={},M.ready=!1,M}o.options.react?.wait&&cA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...gEe(),...o.options.react,...e},{useSuspense:u,keyPrefix:c}=a;let f=t||s||o.options?.defaultNS;f=Ll(f)?[f]:f||["translation"],o.reportNamespaces.addUsedNamespaces?.(f);const p=(o.isInitialized||o.initializedStoreOnce)&&f.every(R=>lEe(R,o,a)),g=CEe(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),m=()=>g,y=()=>aj(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),[S,E]=A.useState(m);let C=f.join();e.lng&&(C=`${e.lng}${C}`);const w=EEe(C),x=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;x.current=!0,!p&&!u&&(e.lng?q4(o,e.lng,f,()=>{x.current&&E(y)}):dA(o,f,()=>{x.current&&E(y)})),p&&w&&w!==C&&x.current&&E(y);const O=()=>{x.current&&E(y)};return R&&o?.on(R,O),M&&o?.store.on(M,O),()=>{x.current=!1,o&&R&&R?.split(" ").forEach(I=>o.off(I,O)),M&&o&&M.split(" ").forEach(I=>o.store.off(I,O))}},[o,C]),A.useEffect(()=>{x.current&&p&&E(m)},[o,c,p]);const T=[S,o,p];if(T.t=S,T.i18n=o,T.ready=p,p||!p&&!u)return T;throw new Promise(R=>{e.lng?q4(o,e.lng,f,()=>R()):dA(o,f,()=>R())})},_Ee=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),xEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),AEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),TEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),REe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),IEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),OEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),NEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),MEe=t=>(t.client??Ze).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),PEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),kEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),DEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),LEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),UEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),FEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),zEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),BEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),jEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),HEe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),CAe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),$Ee=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),qEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),WEe=t=>(t?.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),GEe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),VEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),KEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),YEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),ZEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),XEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),QEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),JEe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),eCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),tCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),nCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),rCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),sCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),oCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),iCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),aCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),wAe=t=>({mutationFn:async n=>{const{data:r}=await _Ee({...t,...n,throwOnError:!0});return r}}),fr=(t,e,n,r)=>{const s={_id:t,baseUrl:e?.baseUrl||(e?.client??Ze).getConfig().baseUrl};return e?.body&&(s.body=e.body),e?.headers&&(s.headers=e.headers),e?.path&&(s.path=e.path),e?.query&&(s.query=e.query),[s]},_Ae=t=>({mutationFn:async n=>{const{data:r}=await xEe({...t,...n,throwOnError:!0});return r}}),xAe=t=>({mutationFn:async n=>{const{data:r}=await AEe({...t,...n,throwOnError:!0});return r}}),AAe=t=>({mutationFn:async n=>{const{data:r}=await TEe({...t,...n,throwOnError:!0});return r}}),TAe=t=>({mutationFn:async n=>{const{data:r}=await REe({...t,...n,throwOnError:!0});return r}}),lCe=t=>fr("filterOperationsListFilters",t),RAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await IEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:lCe(t)}),IAe=t=>({mutationFn:async n=>{const{data:r}=await OEe({...t,...n,throwOnError:!0});return r}}),OAe=t=>({mutationFn:async n=>{const{data:r}=await NEe({...t,...n,throwOnError:!0});return r}}),NAe=t=>({mutationFn:async n=>{const{data:r}=await MEe({...t,...n,throwOnError:!0});return r}}),uCe=t=>fr("mailboxOperationsListMailboxes",t),MAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await PEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:uCe(t)}),PAe=t=>({mutationFn:async n=>{const{data:r}=await kEe({...t,...n,throwOnError:!0});return r}}),kAe=t=>({mutationFn:async n=>{const{data:r}=await DEe({...t,...n,throwOnError:!0});return r}}),DAe=t=>({mutationFn:async n=>{const{data:r}=await LEe({...t,...n,throwOnError:!0});return r}}),cCe=t=>fr("organizeJobDetailOperationsGetOrganizeJob",t),LAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await UEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:cCe(t)}),UAe=t=>({mutationFn:async n=>{const{data:r}=await FEe({...t,...n,throwOnError:!0});return r}}),dCe=t=>fr("syncOperationsGetSyncStatus",t),FAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await zEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:dCe(t)}),fCe=t=>fr("addressOperationsSearchAddresses",t),zAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await BEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:fCe(t)}),BAe=t=>({mutationFn:async n=>{const{data:r}=await jEe({...t,...n,throwOnError:!0});return r}}),hCe=t=>fr("configOperationsGetConfig",t),pCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await HEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:hCe(t)}),jAe=t=>fr("threadOperationsListThreads",t),gCe=t=>fr("threadOperationsSearchThreads",t),HAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await $Ee({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:gCe(t)}),$Ae=t=>({mutationFn:async n=>{const{data:r}=await qEe({...t,...n,throwOnError:!0});return r}}),qAe=t=>({mutationFn:async n=>{const{data:r}=await WEe({...t,...n,throwOnError:!0});return r}}),mCe=t=>fr("meOperationsListVipSuggestions",t),WAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await GEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:mCe(t)}),GAe=t=>({mutationFn:async n=>{const{data:r}=await VEe({...t,...n,throwOnError:!0});return r}}),VAe=t=>({mutationFn:async n=>{const{data:r}=await KEe({...t,...n,throwOnError:!0});return r}}),KAe=t=>({mutationFn:async n=>{const{data:r}=await YEe({...t,...n,throwOnError:!0});return r}}),vCe=t=>fr("messageOperationsDescribeMessage",t),YAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await ZEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:vCe(t)}),ZAe=t=>({mutationFn:async n=>{const{data:r}=await XEe({...t,...n,throwOnError:!0});return r}}),yCe=t=>fr("messageOperationsGetRawMessage",t),XAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await QEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:yCe(t)}),lj=t=>fr("outboxOperationsListOutboxMessages",t),QAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await JEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:lj(t)}),JAe=t=>({mutationFn:async n=>{const{data:r}=await eCe({...t,...n,throwOnError:!0});return r}}),eTe=t=>({mutationFn:async n=>{const{data:r}=await tCe({...t,...n,throwOnError:!0});return r}}),bCe=t=>fr("outboxDetailOperationsGetOutboxMessage",t),SCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await nCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:bCe(t)}),tTe=t=>({mutationFn:async n=>{const{data:r}=await rCe({...t,...n,throwOnError:!0});return r}}),nTe=t=>({mutationFn:async n=>{const{data:r}=await sCe({...t,...n,throwOnError:!0});return r}}),ECe=t=>fr("semanticSearchOperationsSemanticSearch",t),rTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await oCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:ECe(t)}),CCe=t=>fr("unifiedThreadOperationsListAllThreads",t),wCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await iCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:CCe(t)}),_Ce=t=>fr("threadDetailOperationsListThreadMessages",t),sTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await aCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:_Ce(t)}),uj=A.createContext(void 0),W4={isOpen:!1,mode:"new"},xCe=2e3,ACe=6e4,TCe=({children:t})=>{const[e,n]=A.useState(W4),[r,s]=A.useState(),o=A.useRef(0),a=BF(),{data:u}=gfe({...SCe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>ACe?!1:xCe}});A.useEffect(()=>{if(!u||!r)return;(u.status==="sent"||u.status==="failed"||u.status==="blocked")&&(s(void 0),a.invalidateQueries({queryKey:lj()}))},[u,r,a]);const c=A.useCallback(y=>{n({...y,isOpen:!0})},[]),f=A.useCallback(()=>{n(W4)},[]),p=A.useCallback(y=>{n(S=>({...S,outboxMessageId:y}))},[]),g=A.useCallback(y=>{o.current=Date.now(),s(y)},[]),m=A.useMemo(()=>({state:e,openCompose:c,closeCompose:f,setOutboxMessageId:p,startSendPolling:g}),[e,c,f,p,g]);return D.jsx(uj.Provider,{value:m,children:t})},oTe=()=>{const t=A.useContext(uj);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},v_=(...t)=>n8(Z6(t)),RCe={error:{container:"border-danger/50 bg-danger-soft",icon:"text-danger",title:"text-danger"},warning:{container:"border-warning/50 bg-warning-soft",icon:"text-warning",title:"text-warning"},info:{container:"border-accent-2/50 bg-accent-2-soft",icon:"text-accent-2",title:"text-accent-2"}},ICe={error:HZ,warning:YZ,info:GZ},OCe={error:"Error",warning:"Warning",info:"Information"},NCe=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=RCe[e],a=ICe[e];return D.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:v_("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",o.container),children:[D.jsx(a,{className:v_("size-5 shrink-0 mt-0.5",o.icon),"aria-hidden":"true"}),D.jsxs("div",{className:"flex-1 min-w-0",children:[D.jsx("p",{className:v_("text-sm font-medium",o.title),children:n}),r&&D.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r})]}),D.jsx("button",{type:"button",onClick:()=>s(t),className:"shrink-0 rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors","aria-label":`Dismiss ${OCe[e].toLowerCase()}`,children:D.jsx(ph,{className:"size-4","aria-hidden":"true"})})]})},MCe=({errors:t,onDismiss:e})=>t.length===0?null:D.jsx("section",{"aria-label":"Notifications",className:"pointer-events-none fixed inset-x-0 top-0 z-[60] flex flex-col items-center gap-2 px-4 pt-4 sm:items-end sm:pr-6",children:D.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:t.map(n=>D.jsx(NCe,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),G4=5,iTe=(t,e,n)=>({title:t,detail:cj(n)??e,error:n}),cj=t=>{if(t!=null){if(t instanceof Error)return t.message||void 0;if(typeof t=="string")return t||void 0;if(typeof t=="object"&&"message"in t&&typeof t.message=="string")return t.message||void 0}},aTe=t=>{const e=cj(t);return e?e.startsWith("Message not found"):!1},PCe=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,kCe=(t,e)=>{const r=[...t.filter(s=>!PCe(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=G4?r:r.slice(r.length-G4)},DCe=(t,e)=>t.filter(n=>n.id!==e),LCe=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),dj=A.createContext(void 0),UCe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,FCe=({children:t})=>{const[e,n]=A.useState([]),r=A.useCallback(u=>{if(u.error!=null&&U8(u.error))return zl(u.error).correlationId;const c=LCe(u,UCe(),Date.now());return n(f=>kCe(f,c)),c.id},[]),s=A.useCallback(u=>{n(c=>DCe(c,u))},[]),o=A.useCallback(()=>{n([])},[]),a=A.useMemo(()=>({errors:e,pushError:r,dismissError:s,clearAll:o}),[e,r,s,o]);return D.jsxs(dj.Provider,{value:a,children:[t,D.jsx(MCe,{errors:e,onDismiss:s})]})},lTe=()=>{const t=A.useContext(dj);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},zCe=({error:t,reset:e,info:n})=>{const r=Iy(t),s=zl(t,{recoverable:r,componentStack:n?.componentStack});return D.jsx(q8,{fatal:s,onRetry:r?e:void 0})},fp=$he()({component:jCe,errorComponent:zCe}),BCe=()=>{const{t}=wEe("common",{useSuspense:!1});return D.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:z-50 focus:p-4 focus:bg-canvas focus:text-fg focus:rounded-md",children:t("accessibility.skipToContent","Skip to main content")})};function jCe(){return D.jsxs(FCe,{children:[D.jsxs(TCe,{children:[D.jsx(BCe,{}),D.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:D.jsx(A.Suspense,{fallback:D.jsx(qA,{}),children:D.jsx(y7,{})})})]}),D.jsx($8,{})]})}const HCe=dr("/")({beforeLoad:()=>{throw QF({to:"/mail"})}});var Tt;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),a={};for(const u of o)a[u]=s[u];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},t.find=(s,o)=>{for(const a of s)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Tt||(Tt={}));var V4;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(V4||(V4={}));const Oe=Tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Sa=t=>{switch(typeof t){case"undefined":return Oe.undefined;case"string":return Oe.string;case"number":return Number.isNaN(t)?Oe.nan:Oe.number;case"boolean":return Oe.boolean;case"function":return Oe.function;case"bigint":return Oe.bigint;case"symbol":return Oe.symbol;case"object":return Array.isArray(t)?Oe.array:t===null?Oe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Oe.promise:typeof Map<"u"&&t instanceof Map?Oe.map:typeof Set<"u"&&t instanceof Set?Oe.set:typeof Date<"u"&&t instanceof Date?Oe.date:Oe.object;default:return Oe.unknown}},ge=Tt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class _i extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let u=r,c=0;for(;c<a.path.length;){const f=a.path[c];c===a.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(a))):u[f]=u[f]||{_errors:[]},u=u[f],c++}}};return s(this),r}static assert(e){if(!(e instanceof _i))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Tt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];n[o]=n[o]||[],n[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}_i.create=t=>new _i(t);const hA=(t,e)=>{let n;switch(t.code){case ge.invalid_type:t.received===Oe.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Tt.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${Tt.joinValues(t.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Tt.joinValues(t.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${Tt.joinValues(t.options)}, received '${t.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Tt.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ge.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ge.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=e.defaultError,Tt.assertNever(t)}return{message:n}};let $Ce=hA;function qCe(){return $Ce}const WCe=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,o=[...n,...s.path||[]],a={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let u="";const c=r.filter(f=>!!f).slice().reverse();for(const f of c)u=f(a,{data:e,defaultError:u}).message;return{...s,path:o,message:u}};function xe(t,e){const n=qCe(),r=WCe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===hA?void 0:hA].filter(s=>!!s)});t.common.issues.push(r)}class ls{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return Ke;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const o=await s.key,a=await s.value;r.push({key:o,value:a})}return ls.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:o,value:a}=s;if(o.status==="aborted"||a.status==="aborted")return Ke;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[o.value]=a.value)}return{status:e.value,value:r}}}const Ke=Object.freeze({status:"aborted"}),Xf=t=>({status:"dirty",value:t}),Ms=t=>({status:"valid",value:t}),K4=t=>t.status==="aborted",Y4=t=>t.status==="dirty",Gc=t=>t.status==="valid",ny=t=>typeof Promise<"u"&&t instanceof Promise;var Me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Me||(Me={}));class ja{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Z4=(t,e)=>{if(Gc(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new _i(t.common.issues);return this._error=n,this._error}}};function st(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,u)=>{const{message:c}=t;return a.code==="invalid_enum_value"?{message:c??u.defaultError}:typeof u.data>"u"?{message:c??r??u.defaultError}:a.code!=="invalid_type"?{message:u.defaultError}:{message:c??n??u.defaultError}},description:s}}class wt{get description(){return this._def.description}_getType(e){return Sa(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Sa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ls,ctx:{common:e.parent.common,data:e.data,parsedType:Sa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(ny(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Z4(r,s)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return Gc(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Gc(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)},s=this._parse({data:e,path:r.path,parent:r}),o=await(ny(s)?s:Promise.resolve(s));return Z4(r,o)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const a=e(s),u=()=>o.addIssue({code:ge.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new Yc({schema:this,typeName:Ye.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ma.create(this,this._def)}nullable(){return Zc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _o.create(this)}promise(){return iy.create(this,this._def)}or(e){return sy.create([this,e],this._def)}and(e){return oy.create(this,e,this._def)}transform(e){return new Yc({...st(this._def),schema:this,typeName:Ye.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new gA({...st(this._def),innerType:this,defaultValue:n,typeName:Ye.ZodDefault})}brand(){return new pwe({typeName:Ye.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new mA({...st(this._def),innerType:this,catchValue:n,typeName:Ye.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return BR.create(this,e)}readonly(){return vA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const GCe=/^c[^\s-]{8,}$/i,VCe=/^[0-9a-z]+$/,KCe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,YCe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ZCe=/^[a-z0-9_-]{21}$/i,XCe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,QCe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,JCe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ewe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let y_;const twe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nwe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rwe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,swe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,owe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,iwe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,fj="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",awe=new RegExp(`^${fj}$`);function hj(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function lwe(t){return new RegExp(`^${hj(t)}$`)}function uwe(t){let e=`${fj}T${hj(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function cwe(t,e){return!!((e==="v4"||!e)&&twe.test(t)||(e==="v6"||!e)&&rwe.test(t))}function dwe(t,e){if(!XCe.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function fwe(t,e){return!!((e==="v4"||!e)&&nwe.test(t)||(e==="v6"||!e)&&swe.test(t))}class hi extends wt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Oe.string){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_type,expected:Oe.string,received:o.parsedType}),Ke}const r=new ls;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=e.data.length>o.value,u=e.data.length<o.value;(a||u)&&(s=this._getOrReturnCtx(e,s),a?xe(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&xe(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")JCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"email",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")y_||(y_=new RegExp(ewe,"u")),y_.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"emoji",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")YCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"uuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")ZCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"nanoid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")GCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"cuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")VCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"cuid2",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")KCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"ulid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),xe(s,{validation:"url",code:ge.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"regex",code:ge.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?uwe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?awe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?lwe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?QCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?cwe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"ip",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?dwe(e.data,o.alg)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"jwt",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?fwe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"cidr",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?owe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?iwe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"base64url",code:ge.invalid_string,message:o.message}),r.dirty()):Tt.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:ge.invalid_string,...Me.errToObj(r)})}_addCheck(e){return new hi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Me.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Me.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Me.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Me.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Me.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Me.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Me.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Me.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Me.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Me.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Me.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Me.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Me.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Me.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Me.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Me.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Me.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Me.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Me.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Me.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Me.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Me.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Me.errToObj(n)})}nonempty(e){return this.min(1,Me.errToObj(e))}trim(){return new hi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new hi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new hi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}hi.create=t=>new hi({checks:[],typeName:Ye.ZodString,coerce:t?.coerce??!1,...st(t)});function hwe(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,o=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return o%a/10**s}class Vl extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Oe.number){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_type,expected:Oe.number,received:o.parsedType}),Ke}let r;const s=new ls;for(const o of this._def.checks)o.kind==="int"?Tt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?hwe(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.not_finite,message:o.message}),s.dirty()):Tt.assertNever(o);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Me.toString(n))}setLimit(e,n,r,s){return new Vl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Vl({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Me.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Me.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Me.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Me.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Me.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Tt.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Vl.create=t=>new Vl({checks:[],typeName:Ye.ZodNumber,coerce:t?.coerce||!1,...st(t)});class Kl extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Oe.bigint)return this._getInvalidInput(e);let r;const s=new ls;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Tt.assertNever(o);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return xe(n,{code:ge.invalid_type,expected:Oe.bigint,received:n.parsedType}),Ke}gte(e,n){return this.setLimit("min",e,!0,Me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Me.toString(n))}setLimit(e,n,r,s){return new Kl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Kl({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Me.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Kl.create=t=>new Kl({checks:[],typeName:Ye.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class ry extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Oe.boolean){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.boolean,received:r.parsedType}),Ke}return Ms(e.data)}}ry.create=t=>new ry({typeName:Ye.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class Vc extends wt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Oe.date){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_type,expected:Oe.date,received:o.parsedType}),Ke}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_date}),Ke}const r=new ls;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Tt.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Vc({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Me.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Me.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Vc.create=t=>new Vc({checks:[],coerce:t?.coerce||!1,typeName:Ye.ZodDate,...st(t)});class X4 extends wt{_parse(e){if(this._getType(e)!==Oe.symbol){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.symbol,received:r.parsedType}),Ke}return Ms(e.data)}}X4.create=t=>new X4({typeName:Ye.ZodSymbol,...st(t)});class Q4 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.undefined,received:r.parsedType}),Ke}return Ms(e.data)}}Q4.create=t=>new Q4({typeName:Ye.ZodUndefined,...st(t)});class J4 extends wt{_parse(e){if(this._getType(e)!==Oe.null){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.null,received:r.parsedType}),Ke}return Ms(e.data)}}J4.create=t=>new J4({typeName:Ye.ZodNull,...st(t)});class e5 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}e5.create=t=>new e5({typeName:Ye.ZodAny,...st(t)});class t5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}t5.create=t=>new t5({typeName:Ye.ZodUnknown,...st(t)});class Ha extends wt{_parse(e){const n=this._getOrReturnCtx(e);return xe(n,{code:ge.invalid_type,expected:Oe.never,received:n.parsedType}),Ke}}Ha.create=t=>new Ha({typeName:Ye.ZodNever,...st(t)});class n5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.void,received:r.parsedType}),Ke}return Ms(e.data)}}n5.create=t=>new n5({typeName:Ye.ZodVoid,...st(t)});class _o extends wt{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==Oe.array)return xe(n,{code:ge.invalid_type,expected:Oe.array,received:n.parsedType}),Ke;if(s.exactLength!==null){const a=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(a||u)&&(xe(n,{code:a?ge.too_big:ge.too_small,minimum:u?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(xe(n,{code:ge.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(xe(n,{code:ge.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,u)=>s.type._parseAsync(new ja(n,a,n.path,u)))).then(a=>ls.mergeArray(r,a));const o=[...n.data].map((a,u)=>s.type._parseSync(new ja(n,a,n.path,u)));return ls.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new _o({...this._def,minLength:{value:e,message:Me.toString(n)}})}max(e,n){return new _o({...this._def,maxLength:{value:e,message:Me.toString(n)}})}length(e,n){return new _o({...this._def,exactLength:{value:e,message:Me.toString(n)}})}nonempty(e){return this.min(1,e)}}_o.create=(t,e)=>new _o({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ye.ZodArray,...st(e)});function mc(t){if(t instanceof xn){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Ma.create(mc(r))}return new xn({...t._def,shape:()=>e})}else return t instanceof _o?new _o({...t._def,type:mc(t.element)}):t instanceof Ma?Ma.create(mc(t.unwrap())):t instanceof Zc?Zc.create(mc(t.unwrap())):t instanceof Yl?Yl.create(t.items.map(e=>mc(e))):t}class xn extends wt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Tt.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Oe.object){const f=this._getOrReturnCtx(e);return xe(f,{code:ge.invalid_type,expected:Oe.object,received:f.parsedType}),Ke}const{status:r,ctx:s}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof Ha&&this._def.unknownKeys==="strip"))for(const f in s.data)a.includes(f)||u.push(f);const c=[];for(const f of a){const p=o[f],g=s.data[f];c.push({key:{status:"valid",value:f},value:p._parse(new ja(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Ha){const f=this._def.unknownKeys;if(f==="passthrough")for(const p of u)c.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(f==="strict")u.length>0&&(xe(s,{code:ge.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const p of u){const g=s.data[p];c.push({key:{status:"valid",value:p},value:f._parse(new ja(s,g,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const p of c){const g=await p.key,m=await p.value;f.push({key:g,value:m,alwaysSet:p.alwaysSet})}return f}).then(f=>ls.mergeObjectSync(r,f)):ls.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return Me.errToObj,new xn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Me.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new xn({...this._def,unknownKeys:"strip"})}passthrough(){return new xn({...this._def,unknownKeys:"passthrough"})}extend(e){return new xn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new xn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ye.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new xn({...this._def,catchall:e})}pick(e){const n={};for(const r of Tt.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new xn({...this._def,shape:()=>n})}omit(e){const n={};for(const r of Tt.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new xn({...this._def,shape:()=>n})}deepPartial(){return mc(this)}partial(e){const n={};for(const r of Tt.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new xn({...this._def,shape:()=>n})}required(e){const n={};for(const r of Tt.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Ma;)o=o._def.innerType;n[r]=o}return new xn({...this._def,shape:()=>n})}keyof(){return pj(Tt.objectKeys(this.shape))}}xn.create=(t,e)=>new xn({shape:()=>t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});xn.strictCreate=(t,e)=>new xn({shape:()=>t,unknownKeys:"strict",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});xn.lazycreate=(t,e)=>new xn({shape:t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});class sy extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const a=o.map(u=>new _i(u.ctx.common.issues));return xe(n,{code:ge.invalid_union,unionErrors:a}),Ke}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let o;const a=[];for(const c of r){const f={...n,common:{...n.common,issues:[]},parent:null},p=c._parseSync({data:n.data,path:n.path,parent:f});if(p.status==="valid")return p;p.status==="dirty"&&!o&&(o={result:p,ctx:f}),f.common.issues.length&&a.push(f.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=a.map(c=>new _i(c));return xe(n,{code:ge.invalid_union,unionErrors:u}),Ke}}get options(){return this._def.options}}sy.create=(t,e)=>new sy({options:t,typeName:Ye.ZodUnion,...st(e)});function pA(t,e){const n=Sa(t),r=Sa(e);if(t===e)return{valid:!0,data:t};if(n===Oe.object&&r===Oe.object){const s=Tt.objectKeys(e),o=Tt.objectKeys(t).filter(u=>s.indexOf(u)!==-1),a={...t,...e};for(const u of o){const c=pA(t[u],e[u]);if(!c.valid)return{valid:!1};a[u]=c.data}return{valid:!0,data:a}}else if(n===Oe.array&&r===Oe.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const a=t[o],u=e[o],c=pA(a,u);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===Oe.date&&r===Oe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class oy extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(K4(o)||K4(a))return Ke;const u=pA(o.value,a.value);return u.valid?((Y4(o)||Y4(a))&&n.dirty(),{status:n.value,value:u.data}):(xe(r,{code:ge.invalid_intersection_types}),Ke)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>s(o,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}oy.create=(t,e,n)=>new oy({left:t,right:e,typeName:Ye.ZodIntersection,...st(n)});class Yl extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.array)return xe(r,{code:ge.invalid_type,expected:Oe.array,received:r.parsedType}),Ke;if(r.data.length<this._def.items.length)return xe(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ke;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,u)=>{const c=this._def.items[u]||this._def.rest;return c?c._parse(new ja(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>ls.mergeArray(n,a)):ls.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new Yl({...this._def,rest:e})}}Yl.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yl({items:t,typeName:Ye.ZodTuple,rest:null,...st(e)})};class r5 extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.map)return xe(r,{code:ge.invalid_type,expected:Oe.map,received:r.parsedType}),Ke;const s=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,c],f)=>({key:s._parse(new ja(r,u,r.path,[f,"key"])),value:o._parse(new ja(r,c,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const c of a){const f=await c.key,p=await c.value;if(f.status==="aborted"||p.status==="aborted")return Ke;(f.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(f.value,p.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const c of a){const f=c.key,p=c.value;if(f.status==="aborted"||p.status==="aborted")return Ke;(f.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(f.value,p.value)}return{status:n.value,value:u}}}}r5.create=(t,e,n)=>new r5({valueType:e,keyType:t,typeName:Ye.ZodMap,...st(n)});class Hh extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.set)return xe(r,{code:ge.invalid_type,expected:Oe.set,received:r.parsedType}),Ke;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(xe(r,{code:ge.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(xe(r,{code:ge.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function a(c){const f=new Set;for(const p of c){if(p.status==="aborted")return Ke;p.status==="dirty"&&n.dirty(),f.add(p.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((c,f)=>o._parse(new ja(r,c,r.path,f)));return r.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(e,n){return new Hh({...this._def,minSize:{value:e,message:Me.toString(n)}})}max(e,n){return new Hh({...this._def,maxSize:{value:e,message:Me.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Hh.create=(t,e)=>new Hh({valueType:t,minSize:null,maxSize:null,typeName:Ye.ZodSet,...st(e)});class s5 extends wt{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}s5.create=(t,e)=>new s5({getter:t,typeName:Ye.ZodLazy,...st(e)});class o5 extends wt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return xe(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Ke}return{status:"valid",value:e.data}}get value(){return this._def.value}}o5.create=(t,e)=>new o5({value:t,typeName:Ye.ZodLiteral,...st(e)});function pj(t,e){return new Kc({values:t,typeName:Ye.ZodEnum,...st(e)})}class Kc extends wt{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return xe(n,{expected:Tt.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Ke}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return xe(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Ke}return Ms(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Kc.create(e,{...this._def,...n})}exclude(e,n=this._def){return Kc.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Kc.create=pj;class i5 extends wt{_parse(e){const n=Tt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Oe.string&&r.parsedType!==Oe.number){const s=Tt.objectValues(n);return xe(r,{expected:Tt.joinValues(s),received:r.parsedType,code:ge.invalid_type}),Ke}if(this._cache||(this._cache=new Set(Tt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=Tt.objectValues(n);return xe(r,{received:r.data,code:ge.invalid_enum_value,options:s}),Ke}return Ms(e.data)}get enum(){return this._def.values}}i5.create=(t,e)=>new i5({values:t,typeName:Ye.ZodNativeEnum,...st(e)});class iy extends wt{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Oe.promise&&n.common.async===!1)return xe(n,{code:ge.invalid_type,expected:Oe.promise,received:n.parsedType}),Ke;const r=n.parsedType===Oe.promise?n.data:Promise.resolve(n.data);return Ms(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}iy.create=(t,e)=>new iy({type:t,typeName:Ye.ZodPromise,...st(e)});class Yc extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,o={addIssue:a=>{xe(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const a=s.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async u=>{if(n.value==="aborted")return Ke;const c=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return c.status==="aborted"?Ke:c.status==="dirty"||n.value==="dirty"?Xf(c.value):c});{if(n.value==="aborted")return Ke;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?Ke:u.status==="dirty"||n.value==="dirty"?Xf(u.value):u}}if(s.type==="refinement"){const a=u=>{const c=s.refinement(u,o);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Ke:(u.status==="dirty"&&n.dirty(),a(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Ke:(u.status==="dirty"&&n.dirty(),a(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Gc(a))return Ke;const u=s.transform(a.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Gc(a)?Promise.resolve(s.transform(a.value,o)).then(u=>({status:n.value,value:u})):Ke);Tt.assertNever(s)}}Yc.create=(t,e,n)=>new Yc({schema:t,typeName:Ye.ZodEffects,effect:e,...st(n)});Yc.createWithPreprocess=(t,e,n)=>new Yc({schema:e,effect:{type:"preprocess",transform:t},typeName:Ye.ZodEffects,...st(n)});class Ma extends wt{_parse(e){return this._getType(e)===Oe.undefined?Ms(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ma.create=(t,e)=>new Ma({innerType:t,typeName:Ye.ZodOptional,...st(e)});class Zc extends wt{_parse(e){return this._getType(e)===Oe.null?Ms(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Zc.create=(t,e)=>new Zc({innerType:t,typeName:Ye.ZodNullable,...st(e)});class gA extends wt{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Oe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}gA.create=(t,e)=>new gA({innerType:t,typeName:Ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class mA extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ny(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}mA.create=(t,e)=>new mA({innerType:t,typeName:Ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class a5 extends wt{_parse(e){if(this._getType(e)!==Oe.nan){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.nan,received:r.parsedType}),Ke}return{status:"valid",value:e.data}}}a5.create=t=>new a5({typeName:Ye.ZodNaN,...st(t)});class pwe extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class BR extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ke:o.status==="dirty"?(n.dirty(),Xf(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ke:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new BR({in:e,out:n,typeName:Ye.ZodPipeline})}}class vA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Gc(s)&&(s.value=Object.freeze(s.value)),s);return ny(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}vA.create=(t,e)=>new vA({innerType:t,typeName:Ye.ZodReadonly,...st(e)});var Ye;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ye||(Ye={}));const Cr=hi.create;Vl.create;Kl.create;const gwe=ry.create;Vc.create;Ha.create;_o.create;const fd=xn.create;sy.create;oy.create;Yl.create;Kc.create;iy.create;Ma.create;Zc.create;const uTe={string:(t=>hi.create({...t,coerce:!0})),number:(t=>Vl.create({...t,coerce:!0})),boolean:(t=>ry.create({...t,coerce:!0})),bigint:(t=>Kl.create({...t,coerce:!0})),date:(t=>Vc.create({...t,coerce:!0}))},mwe=Cy().apiUrl;Ze.setConfig({baseUrl:mwe,fetch:G6});Ze.interceptors.error.use((t,e)=>{if(t instanceof j_||!e)return t;const n=t,r=n&&typeof n=="object"&&"message"in n?String(n.message):`Request failed with status ${e.status}`;return new j_(r,e.status,n)});const vwe=A.createContext(null),cTe=()=>A.useContext(vwe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},ywe=()=>qn(()=>import("./mail-BupQ73qf.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])),bwe=fd({q:Cr().optional()}),Swe=dr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery(pCe()),t.prefetchQuery({...wCe(),staleTime:6e4})},component:sr(ywe,"component"),validateSearch:bwe}),Ewe=()=>qn(()=>import("./onboarding-DXJgvBY6.js"),__vite__mapDeps([15,16,4,13,9,7])),Cwe=dr("/onboarding")({component:sr(Ewe,"component")}),wwe=()=>qn(()=>import("./settings-D8EclRrJ.js"),[]),dTe=[{id:"accounts",label:"Accounts",icon:D.jsx(WZ,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:D.jsx(ZZ,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:D.jsx(qZ,{className:"size-4"})},{id:"filters",label:"Filters",icon:D.jsx($Z,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:D.jsx(KZ,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:D.jsx(XZ,{className:"size-4"})}],fTe={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},_we=dr("/settings")({component:sr(wwe,"component")}),xwe=()=>qn(()=>import("./index-DRgNHDNw.js"),__vite__mapDeps([17,11])),Awe=()=>qn(()=>import("./index-DtqBFgK5.js"),[]),Twe=fd({selectedMessageId:Cr().optional(),selectedThreadId:Cr().optional(),selectedMailboxId:Cr().optional(),q:Cr().optional()}),Rwe=dr("/mail/")({component:sr(Awe,"component"),validateSearch:Twe,errorComponent:sr(xwe,"errorComponent")}),Iwe=()=>qn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),Owe=fd({selectedMessageId:Cr().optional(),selectedThreadId:Cr().optional(),q:Cr().optional()}),Nwe=dr("/mail/$mailboxId")({component:sr(Iwe,"component"),validateSearch:Owe}),Mwe=()=>qn(()=>import("./flagged-BIZUPAc1.js"),__vite__mapDeps([18,11])),Pwe=()=>qn(()=>import("./flagged-DtqBFgK5.js"),[]),kwe=fd({selectedMessageId:Cr().optional(),q:Cr().optional()}),Dwe=dr("/mail/flagged")({component:sr(Pwe,"component"),validateSearch:kwe,errorComponent:sr(Mwe,"errorComponent")}),Lwe=()=>qn(()=>import("./outbox-DtqBFgK5.js"),[]),Uwe=fd({selectedOutboxMessageId:Cr().optional(),q:Cr().optional()}),Fwe=dr("/mail/outbox")({component:sr(Lwe,"component"),validateSearch:Uwe}),zwe=()=>qn(()=>import("./index-42UdmKR4.js"),[]),Bwe=dr("/settings/")({component:sr(zwe,"component")}),jwe=()=>qn(()=>import("./accounts-4xBwI5pT.js"),__vite__mapDeps([19,10,7,9,20,3,16,4,13,11,12,6])),Hwe=fd({editAccountId:Cr().optional(),focusSmtp:gwe().optional(),connected:Cr().optional(),oauthError:Cr().optional()}),$we=dr("/settings/accounts")({component:sr(jwe,"component"),validateSearch:Hwe}),qwe=()=>qn(()=>import("./advanced-qZrMsKTp.js"),__vite__mapDeps([21,20,3])),Wwe=dr("/settings/advanced")({component:sr(qwe,"component")}),Gwe=()=>qn(()=>import("./appearance-Dta6f8kr.js"),__vite__mapDeps([22,20,3])),Vwe=dr("/settings/appearance")({component:sr(Gwe,"component")}),Kwe=()=>qn(()=>import("./filters-B5mz8b3m.js"),__vite__mapDeps([23,20,3,14,9,6,11,1])),Ywe=dr("/settings/filters")({component:sr(Kwe,"component")}),Zwe=()=>qn(()=>import("./folders-BrfKkqjC.js"),__vite__mapDeps([24,8,6,5,13,20,3,9,11,1])),Xwe=dr("/settings/folders")({component:sr(Zwe,"component")}),Qwe=()=>qn(()=>import("./senders-DGd2LA5D.js"),__vite__mapDeps([25,4,20,3,9,11,2,12,5])),Jwe=dr("/settings/senders")({component:sr(Qwe,"component")}),e_e=()=>qn(()=>import("./suggested-vips-B2Opi9qz.js"),[]),t_e=dr("/settings/suggested-vips")({component:sr(e_e,"component")}),n_e=HCe.update({id:"/",path:"/",getParentRoute:()=>fp}),hp=Swe.update({id:"/mail",path:"/mail",getParentRoute:()=>fp}),r_e=Cwe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>fp}),Ni=_we.update({id:"/settings",path:"/settings",getParentRoute:()=>fp}),s_e=Rwe.update({id:"/",path:"/",getParentRoute:()=>hp}),o_e=Nwe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>hp}),i_e=Dwe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>hp}),a_e=Fwe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>hp}),l_e=Bwe.update({id:"/",path:"/",getParentRoute:()=>Ni}),u_e=$we.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Ni}),c_e=Wwe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Ni}),d_e=Vwe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Ni}),f_e=Ywe.update({id:"/filters",path:"/filters",getParentRoute:()=>Ni}),h_e=Xwe.update({id:"/folders",path:"/folders",getParentRoute:()=>Ni}),p_e=Jwe.update({id:"/senders",path:"/senders",getParentRoute:()=>Ni}),g_e=t_e.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Ni}),m_e={MailMailboxIdRoute:o_e,MailFlaggedRoute:i_e,MailOutboxRoute:a_e,MailIndexRoute:s_e},v_e=hp._addFileChildren(m_e),y_e={SettingsAccountsRoute:u_e,SettingsAdvancedRoute:c_e,SettingsAppearanceRoute:d_e,SettingsFiltersRoute:f_e,SettingsFoldersRoute:h_e,SettingsSendersRoute:p_e,SettingsSuggestedVipsRoute:g_e,SettingsIndexRoute:l_e},b_e=Ni._addFileChildren(y_e),S_e={IndexRoute:n_e,MailRoute:v_e,OnboardingRoute:r_e,SettingsRoute:b_e},E_e=fp._addFileChildren(S_e)._addFileTypes(),C_e=(t,e)=>{const n=ope({routeTree:E_e,context:{queryClient:t},defaultPreload:"intent"});return n.subscribe("onResolved",r=>{e.recordPageView(r.toLocation.pathname)}),n},qe=t=>typeof t=="string",Lf=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},l5=t=>t==null?"":""+t,w_e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},__e=/###/g,u5=t=>t&&t.indexOf("###")>-1?t.replace(__e,"."):t,c5=t=>!t||qe(t),dh=(t,e,n)=>{const r=qe(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(c5(t))return{};const o=u5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return c5(t)?{}:{obj:t,k:u5(r[s])}},d5=(t,e,n)=>{const{obj:r,k:s}=dh(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let o=e[e.length-1],a=e.slice(0,e.length-1),u=dh(t,a,Object);for(;u.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),u=dh(t,a,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},x_e=(t,e,n,r)=>{const{obj:s,k:o}=dh(t,e,Object);s[o]=s[o]||[],s[o].push(n)},ay=(t,e)=>{const{obj:n,k:r}=dh(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},A_e=(t,e,n)=>{const r=ay(t,n);return r!==void 0?r:ay(e,n)},gj=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?qe(t[r])||t[r]instanceof String||qe(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):gj(t[r],e[r],n):t[r]=e[r]);return t},oc=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var T_e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const R_e=t=>qe(t)?t.replace(/[&<>"'\/]/g,e=>T_e[e]):t;class I_e{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const O_e=[" ",",","?","!",";"],N_e=new I_e(20),M_e=(t,e,n)=>{e=e||"",n=n||"";const r=O_e.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=N_e.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!s.test(t);if(!o){const a=t.indexOf(n);a>0&&!s.test(t.substring(0,a))&&(o=!0)}return o},yA=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let s=t;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let a,u="";for(let c=o;c<r.length;++c)if(c!==o&&(u+=n),u+=r[c],a=s[u],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;o+=c-o+1;break}s=a}return s},ly=t=>t?.replace("_","-"),P_e={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class uy{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||P_e,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,s){return s&&!this.debug?null:(qe(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new uy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new uy(this.logger,e)}}var wo=new uy;class Ab{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[u,c]=a;for(let f=0;f<c;f++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[u,c]=a;for(let f=0;f<c;f++)u.apply(u,[e,...r])})}}class f5 extends Ab{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;e.indexOf(".")>-1?u=e.split("."):(u=[e,n],r&&(Array.isArray(r)?u.push(...r):qe(r)&&o?u.push(...r.split(o)):u.push(r)));const c=ay(this.data,u);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=u[0],n=u[1],r=u.slice(2).join(".")),c||!a||!qe(r)?c:yA(this.data?.[e]?.[n],r,o)}addResource(e,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let u=[e,n];r&&(u=u.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(u=e.split("."),s=n,n=u[1]),this.addNamespaces(n),d5(this.data,u,s),o.silent||this.emit("added",e,n,r,s)}addResources(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(qe(r[o])||Array.isArray(r[o]))&&this.addResource(e,n,o,r[o],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[e,n];e.indexOf(".")>-1&&(u=e.split("."),s=r,r=n,n=u[1]),this.addNamespaces(n);let c=ay(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?gj(c,r,o):c={...c,...r},d5(this.data,u,c),a.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var mj={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(o=>{e=this.processors[o]?.process(e,n,r,s)??e}),e}};const h5={},p5=t=>!qe(t)&&typeof t!="boolean"&&typeof t!="number";class cy extends Ab{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),w_e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wo.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return e==null?!1:this.resolve(e,n)?.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!M_e(e,r,s);if(a&&!u){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:qe(o)?[o]:o};const f=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(f[0])>-1)&&(o=f.shift()),e=f.join(s)}return{key:e,namespaces:qe(o)?[o]:o}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(e[e.length-1],n),c=u[u.length-1],f=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(p){const F=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${F}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${F}${a}`}return s?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const g=this.resolve(e,n);let m=g?.res;const y=g?.usedKey||a,S=g?.exactUsedKey||a,E=["[object Number]","[object Function]","[object RegExp]"],C=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,x=n.count!==void 0&&!qe(n.count),T=cy.hasDefaultValue(n),R=x?this.pluralResolver.getSuffix(f,n.count,n):"",M=n.ordinal&&x?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",O=x&&!n.ordinal&&n.count===0,I=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${M}`]||n.defaultValue;let P=m;w&&!m&&T&&(P=I);const k=p5(P),H=Object.prototype.toString.apply(P);if(w&&P&&k&&E.indexOf(H)<0&&!(qe(C)&&Array.isArray(P))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,P,{...n,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(g.res=F,g.usedParams=this.getUsedParamsDetails(n),g):F}if(o){const F=Array.isArray(P),B=F?[]:{},W=F?S:y;for(const Y in P)if(Object.prototype.hasOwnProperty.call(P,Y)){const ne=`${W}${o}${Y}`;T&&!m?B[Y]=this.translate(ne,{...n,defaultValue:p5(I)?I[Y]:void 0,joinArrays:!1,ns:u}):B[Y]=this.translate(ne,{...n,joinArrays:!1,ns:u}),B[Y]===ne&&(B[Y]=P[Y])}m=B}}else if(w&&qe(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,e,n,r));else{let F=!1,B=!1;!this.isValidLookup(m)&&T&&(F=!0,m=I),this.isValidLookup(m)||(B=!0,m=a);const Y=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:m,ne=T&&I!==m&&this.options.updateMissing;if(B||F||ne){if(this.logger.log(ne?"updateKey":"missingKey",f,c,a,ne?I:m),o){const de=this.resolve(a,{...n,keySeparator:!1});de&&de.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let de=0;de<ee.length;de++)$.push(ee[de]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(n.lng||this.language):$.push(n.lng||this.language);const fe=(de,Ae,L)=>{const V=T&&L!==m?L:Y;this.options.missingKeyHandler?this.options.missingKeyHandler(de,c,Ae,V,ne,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(de,c,Ae,V,ne,n),this.emit("missingKey",de,c,Ae,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?$.forEach(de=>{const Ae=this.pluralResolver.getSuffixes(de,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ae.push(`${this.options.pluralSeparator}zero`),Ae.forEach(L=>{fe([de],a+L,n[`defaultValue${L}`]||I)})}):fe($,a,I))}m=this.extendTranslation(m,e,n,g,r),B&&m===a&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${a}`),(B||F)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,F?m:void 0))}return s?(g.res=m,g.usedParams=this.getUsedParamsDetails(n),g):m}extendTranslation(e,n,r,s,o){var a=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=qe(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(f){const m=e.match(this.interpolator.nestingRegexp);p=m&&m.length}let g=r.replace&&!qe(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),e=this.interpolator.interpolate(e,g,r.lng||this.language||s.usedLng,r),f){const m=e.match(this.interpolator.nestingRegexp),y=m&&m.length;p<y&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var m=arguments.length,y=new Array(m),S=0;S<m;S++)y[S]=arguments[S];return o?.[0]===y[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):a.translate(...y,n)},r)),r.interpolation&&this.interpolator.reset()}const u=r.postProcess||this.options.postProcess,c=qe(u)?[u]:u;return e!=null&&c?.length&&r.applyPostProcessor!==!1&&(e=mj.handle(c,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,a,u;return qe(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(c,n),p=f.key;s=p;let g=f.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const m=n.count!==void 0&&!qe(n.count),y=m&&!n.ordinal&&n.count===0,S=n.context!==void 0&&(qe(n.context)||typeof n.context=="number")&&n.context!=="",E=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);g.forEach(C=>{this.isValidLookup(r)||(u=C,!h5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(h5[`${E[0]}-${C}`]=!0,this.logger.warn(`key "${s}" for languages "${E.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[p];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,p,w,C,n);else{let R;m&&(R=this.pluralResolver.getSuffix(w,n.count,n));const M=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(x.push(p+R),n.ordinal&&R.indexOf(O)===0&&x.push(p+R.replace(O,this.options.pluralSeparator)),y&&x.push(p+M)),S){const I=`${p}${this.options.contextSeparator}${n.context}`;x.push(I),m&&(x.push(I+R),n.ordinal&&R.indexOf(O)===0&&x.push(I+R.replace(O,this.options.pluralSeparator)),y&&x.push(I+M))}}let T;for(;T=x.pop();)this.isValidLookup(r)||(o=T,r=this.getResource(w,C,T,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:a,usedNS:u}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!qe(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class g5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(e){if(e=ly(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=ly(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(qe(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),qe(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),s=[],o=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return qe(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):qe(e)&&o(this.formatLanguageCode(e)),r.forEach(a=>{s.indexOf(a)<0&&o(this.formatLanguageCode(a))}),s}}const m5={zero:0,one:1,two:2,few:3,many:4,other:5},v5={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class k_e{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=wo.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=ly(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),v5;if(!e.match(/-|_/))return v5;const c=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(c,n)}return this.pluralRulesCache[o]=a,a}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,o)=>m5[s]-m5[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const y5=function(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=A_e(t,e,n);return!o&&s&&qe(n)&&(o=yA(t,n,r),o===void 0&&(o=yA(e,n,r))),o},b_=t=>t.replace(/\$/g,"$$$$");class D_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:a,suffix:u,suffixEscaped:c,formatSeparator:f,unescapeSuffix:p,unescapePrefix:g,nestingPrefix:m,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:E,nestingOptionsSeparator:C,maxReplaces:w,alwaysFormat:x}=e.interpolation;this.escape=n!==void 0?n:R_e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?oc(o):a||"{{",this.suffix=u?oc(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=p?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=m?oc(m):y||oc("$t("),this.nestingSuffix=S?oc(S):E||oc(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,r,s){let o,a,u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=y=>{if(y.indexOf(this.formatSeparator)<0){const w=y5(n,c,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...s,...n,interpolationkey:y}):w}const S=y.split(this.formatSeparator),E=S.shift().trim(),C=S.join(this.formatSeparator).trim();return this.format(y5(n,c,E,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...s,...n,interpolationkey:E})};this.resetRegExp();const p=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>b_(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?b_(this.escape(y)):b_(y)}].forEach(y=>{for(u=0;o=y.regex.exec(e);){const S=o[1].trim();if(a=f(S),a===void 0)if(typeof p=="function"){const C=p(e,o,s);a=qe(C)?C:""}else if(s&&Object.prototype.hasOwnProperty.call(s,S))a="";else if(g){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${e}`),a="";else!qe(a)&&!this.useRawValueToEscape&&(a=l5(a));const E=y.safeValue(a);if(e=e.replace(o[0],E),g?(y.regex.lastIndex+=a.length,y.regex.lastIndex-=o[0].length):y.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,a;const u=(c,f)=>{const p=this.nestingOptionsSeparator;if(c.indexOf(p)<0)return c;const g=c.split(new RegExp(`${p}[ ]*{`));let m=`{${g[1]}`;c=g[0],m=this.interpolate(m,a);const y=m.match(/'/g),S=m.match(/"/g);((y?.length??0)%2===0&&!S||S.length%2!==0)&&(m=m.replace(/'/g,'"'));try{a=JSON.parse(m),f&&(a={...f,...a})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,E),`${c}${p}${m}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];a={...r},a=a.replace&&!qe(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let f=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const p=s[1].split(this.formatSeparator).map(g=>g.trim());s[1]=p.shift(),c=p,f=!0}if(o=n(u.call(this,s[1].trim(),a),a),o&&s[0]===e&&!qe(o))return o;qe(o)||(o=l5(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),f&&(o=c.reduce((p,g)=>this.format(p,g,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const L_e=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(a=>{if(a){const[u,...c]=a.split(":"),f=c.join(":").trim().replace(/^'+|'+$/g,""),p=u.trim();n[p]||(n[p]=f),f==="false"&&(n[p]=!1),f==="true"&&(n[p]=!0),isNaN(f)||(n[p]=parseInt(f,10))}})}return{formatName:e,formatOptions:n}},ic=t=>{const e={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const a=r+JSON.stringify(o);let u=e[a];return u||(u=t(ly(r),s),e[a]=u),u(n)}};class U_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("formatter"),this.options=e,this.formats={number:ic((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:ic((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:ic((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:ic((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:ic((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(e)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=ic(n)}format(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(u=>u.indexOf(")")>-1)){const u=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,u)].join(this.formatSeparator)}return o.reduce((u,c)=>{const{formatName:f,formatOptions:p}=L_e(c);if(this.formats[f]){let g=u;try{const m=s?.formatParams?.[s.interpolationkey]||{},y=m.locale||m.lng||s.locale||s.lng||r;g=this.formats[f](u,y,{...p,...s,...m})}catch(m){this.logger.warn(m)}return g}else this.logger.warn(`there was no format function for ${f}`);return u},e)}}const F_e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class z_e extends Ab{constructor(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=wo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,s.backend,s)}queueLoad(e,n,r,s){const o={},a={},u={},c={};return e.forEach(f=>{let p=!0;n.forEach(g=>{const m=`${f}|${g}`;!r.reload&&this.store.hasResourceBundle(f,g)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?a[m]===void 0&&(a[m]=!0):(this.state[m]=1,p=!1,a[m]===void 0&&(a[m]=!0),o[m]===void 0&&(o[m]=!0),c[g]===void 0&&(c[g]=!0)))}),p||(u[f]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const s=e.split("|"),o=s[0],a=s[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const u={};this.queue.forEach(c=>{x_e(c.loaded,[o],a),F_e(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(f=>{u[f]||(u[f]={});const p=c.loaded[f];p.length&&p.forEach(g=>{u[f][g]===void 0&&(u[f][g]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:o,callback:a});return}this.readingCalls++;const u=(f,p)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(f&&p&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,o*2,a)},o);return}a(f,p)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const f=c(e,n);f&&typeof f.then=="function"?f.then(p=>u(null,p)).catch(u):u(null,f)}catch(f){u(f)}return}return c(e,n,u)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();qe(e)&&(e=this.languageUtils.toResolveHierarchy(e)),qe(n)&&(n=[n]);const o=this.queueLoad(e,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(a,u)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,a),!a&&u&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,u),this.loaded(e,a,u)})}saveMissing(e,n,r,s,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const c={...a,isUpdate:o},f=this.backend.create.bind(this.backend);if(f.length<6)try{let p;f.length===5?p=f(e,n,r,s,c):p=f(e,n,r,s),p&&typeof p.then=="function"?p.then(g=>u(null,g)).catch(u):u(null,p)}catch(p){u(p)}else f(e,n,r,s,u,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const b5=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),qe(t[1])&&(e.defaultValue=t[1]),qe(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),S5=t=>(qe(t.ns)&&(t.ns=[t.ns]),qe(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),qe(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),km=()=>{},B_e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class $h extends Ab{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=S5(e),this.services={},this.logger=wo,this.modules={external:[]},B_e(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(qe(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=b5();this.options={...s,...this.options,...S5(n)},this.options.interpolation={...s.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?wo.init(o(this.modules.logger),this.options):wo.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=U_e;const g=new g5(this.options);this.store=new f5(this.options.resources,this.options);const m=this.services;m.logger=wo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new k_e(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(m.formatter=o(p),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new D_e(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new z_e(o(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),C=1;C<S;C++)E[C-1]=arguments[C];e.emit(y,...E)}),this.modules.languageDetector&&(m.languageDetector=o(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=o(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new cy(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),C=1;C<S;C++)E[C-1]=arguments[C];e.emit(y,...E)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,r||(r=km),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(p=>{this[p]=function(){return e.store[p](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=function(){return e.store[p](...arguments),e}});const c=Lf(),f=()=>{const p=(g,m)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(m),r(g,m)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:km;const s=qe(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&o.indexOf(f)<0&&o.push(f)})};s?a(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload?.forEach?.(u=>a(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(e,n,r){const s=Lf();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=km),this.services.backendConnector.reload(e,n,o=>{s.resolve(),r(o)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&mj.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const s=Lf();this.emit("languageChanging",e);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,f)=>{f?(o(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},u=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const f=qe(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);f&&(this.language||o(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector?.cacheUserLanguage?.(f)),this.loadResources(f,p=>{a(p,f)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),s}getFixedT(e,n,r){var s=this;const o=function(a,u){let c;if(typeof u!="object"){for(var f=arguments.length,p=new Array(f>2?f-2:0),g=2;g<f;g++)p[g-2]=arguments[g];c=s.options.overloadTranslationOptionHandler([a,u].concat(p))}else c={...u};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const m=s.options.keySeparator||".";let y;return c.keyPrefix&&Array.isArray(a)?y=a.map(S=>`${c.keyPrefix}${m}${S}`):y=c.keyPrefix?`${c.keyPrefix}${m}${a}`:a,s.t(y,c)};return qe(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.translator?.translate(...n)}exists(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.translator?.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(u,c)=>{const f=this.services.backendConnector.state[`${u}|${c}`];return f===-1||f===0||f===2};if(n.precheck){const u=n.precheck(this,a);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!s||a(o,e)))}loadNamespaces(e,n){const r=Lf();return this.options.ns?(qe(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Lf();qe(e)&&(e=[e]);const s=this.options.preload||[],o=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=s.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new g5(b5());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new $h(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:km;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new $h(s);if((e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(u=>{o[u]=this[u]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const u=Object.keys(this.store.data).reduce((c,f)=>(c[f]={...this.store.data[f]},Object.keys(c[f]).reduce((p,g)=>(p[g]={...c[f][g]},p),{})),{});o.store=new f5(u,s),o.services.resourceStore=o.store}return o.translator=new cy(o.services,s),o.translator.on("*",function(u){for(var c=arguments.length,f=new Array(c>1?c-1:0),p=1;p<c;p++)f[p-1]=arguments[p];o.emit(u,...f)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const hr=$h.createInstance();hr.createInstance=$h.createInstance;hr.createInstance;hr.dir;hr.init;hr.loadResources;hr.reloadResources;hr.use;hr.changeLanguage;hr.getFixedT;hr.t;hr.exists;hr.setDefaultNamespace;hr.hasLoadedNamespace;hr.loadNamespaces;hr.loadLanguages;const{slice:j_e,forEach:H_e}=[];function $_e(t){return H_e.call(j_e.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function q_e(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const E5=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,W_e=function(t,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e);let o=`${t}=${s}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!E5.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!E5.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},C5={create(t,e,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=W_e(t,e,s)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var G_e={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return C5.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&C5.create(n,t,r,s,o)}},V_e={name:"querystring",lookup(t){let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a<o.length;a++){const u=o[a].indexOf("=");u>0&&o[a].substring(0,u)===e&&(n=o[a].substring(u+1))}}return n}},K_e={name:"hash",lookup(t){let{lookupHash:e,lookupFromHashIndex:n}=t,r;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const o=s.substring(1);if(e){const a=o.split("&");for(let u=0;u<a.length;u++){const c=a[u].indexOf("=");c>0&&a[u].substring(0,c)===e&&(r=a[u].substring(c+1))}}if(r)return r;if(!r&&n>-1){const a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let ac=null;const w5=()=>{if(ac!==null)return ac;try{if(ac=typeof window<"u"&&window.localStorage!==null,!ac)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{ac=!1}return ac};var Y_e={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&w5())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&w5()&&window.localStorage.setItem(n,t)}};let lc=null;const _5=()=>{if(lc!==null)return lc;try{if(lc=typeof window<"u"&&window.sessionStorage!==null,!lc)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{lc=!1}return lc};var Z_e={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&_5())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&_5()&&window.sessionStorage.setItem(n,t)}},X_e={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)e.push(n[o]);r&&e.push(r),s&&e.push(s)}return e.length>0?e:void 0}},Q_e={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},J_e={name:"path",lookup(t){let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof e=="number"?e:0]?.replace("/",""):void 0}},exe={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let vj=!1;try{document.cookie,vj=!0}catch{}const yj=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];vj||yj.splice(1,1);const txe=()=>({order:yj,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class bj{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=$_e(n,this.options||{},txe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(G_e),this.addDetector(V_e),this.addDetector(Y_e),this.addDetector(Z_e),this.addDetector(X_e),this.addDetector(Q_e),this.addDetector(J_e),this.addDetector(exe),this.addDetector(K_e)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(r=>r!=null&&!q_e(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}bj.type="languageDetector";function nxe(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=rxe(t))||e){n&&(t=n);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(f){throw f},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
295
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var f=n.next();return a=f.done,f},e:function(f){u=!0,o=f},f:function(){try{a||n.return==null||n.return()}finally{if(u)throw o}}}}function rxe(t,e){if(t){if(typeof t=="string")return x5(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x5(t,e):void 0}}function x5(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function bA(t){"@babel/helpers - typeof";return bA=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bA(t)}var Sj=["__proto__","constructor","prototype"];function Ej(t){return!(typeof t!="string"||t.length===0||t.length>128||Sj.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function Cj(t){return!(!Ej(t)||t.indexOf("/")>-1)}function sxe(t){return Ej(t)}var oxe={lng:Cj,ns:sxe};function Dm(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function ixe(t){if(typeof t!="string"||t.length===0)return t;try{var e=new URL(t);return e.username||e.password?(e.username="",e.password="",e.toString()):t}catch{return t.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function wj(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":bA(XMLHttpRequest))==="object"}function axe(t){return!!t&&typeof t.then=="function"}function lxe(t){return axe(t)?t:Promise.resolve(t)}var uxe=/\{\{(.+?)\}\}/g;function A5(t,e){var n=!1,r=t.replace(uxe,function(s,o){var a=o.trim();if(Sj.indexOf(a)>-1)return s;var u=e[a];if(u==null)return s;var c=oxe[a]||Cj,f=String(u).split("+"),p=nxe(f),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;if(!c(m))return n=!0,s}}catch(y){p.e(y)}finally{p.f()}return f.join("+")});return n?null:r}function T5(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function R5(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?T5(Object(n),!0).forEach(function(r){cxe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function cxe(t,e,n){return(e=dxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dxe(t){var e=fxe(t,"string");return Zl(e)=="symbol"?e:e+""}function fxe(t,e){if(Zl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Zl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Zl(t){"@babel/helpers - typeof";return Zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zl(t)}var $a=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?$a=global.fetch:typeof window<"u"&&window.fetch&&($a=window.fetch);var qh;wj()&&(typeof global<"u"&&global.XMLHttpRequest?qh=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(qh=window.XMLHttpRequest));var dy;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?dy=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(dy=window.ActiveXObject));typeof $a!="function"&&($a=void 0);if(!$a&&!qh&&!dy)try{qn(()=>import("./browser-ponyfill-DOsCHlBk.js").then(t=>t.b),[]).then(function(t){$a=t.default}).catch(function(){})}catch{}var _j=["__proto__","constructor","prototype"],SA=function(e,n){if(n&&Zl(n)==="object"){for(var r="",s=0,o=Object.keys(n);s<o.length;s++){var a=o[s];_j.indexOf(a)>-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},I5=function(e,n,r,s){var o=function(c){if(!c.ok)return r(c.statusText||"Error",{status:c.status});c.text().then(function(f){r(null,{status:c.status,data:f})}).catch(r)};if(s){var a=s(e,n);if(a instanceof Promise){a.then(o).catch(r);return}}typeof fetch=="function"?fetch(e,n).then(o).catch(r):$a(e,n).then(o).catch(r)},hxe=function(e,n,r,s){e.queryStringParams&&(n=SA(n,e.queryStringParams));var o=R5({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(o["Content-Type"]="application/json");var a=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,u=R5({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:o},e._omitFetchOptions?{}:a),c=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{I5(n,u,s,c)}catch(f){if(!a||Object.keys(a).length===0||!f.message||f.message.indexOf("not implemented")<0)return s(f);try{Object.keys(a).forEach(function(p){delete u[p]}),I5(n,u,s,c),e._omitFetchOptions=!0}catch(p){s(p)}}},pxe=function(e,n,r,s){r&&Zl(r)==="object"&&(r=SA("",r).slice(1)),e.queryStringParams&&(n=SA(n,e.queryStringParams));try{var o=qh?new qh:new dy("MSXML2.XMLHTTP.3.0");o.open(r?"POST":"GET",n,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(var u=0,c=Object.keys(a);u<c.length;u++){var f=c[u];_j.indexOf(f)>-1||o.setRequestHeader(f,a[f])}o.onreadystatechange=function(){o.readyState>3&&s(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(p){console&&console.log(p)}},gxe=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},$a&&n.indexOf("file:")!==0)return hxe(e,n,r,s);if(wj()||typeof ActiveXObject=="function")return pxe(e,n,r,s);s(new Error("No fetch and no xhr implementation found!"))};function Xc(t){"@babel/helpers - typeof";return Xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xc(t)}function O5(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function S_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?O5(Object(n),!0).forEach(function(r){xj(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function mxe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vxe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Aj(r.key),r)}}function yxe(t,e,n){return e&&vxe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function xj(t,e,n){return(e=Aj(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Aj(t){var e=bxe(t,"string");return Xc(e)=="symbol"?e:e+""}function bxe(t,e){if(Xc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Sxe=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,s){return xj({},r,s||"")},parseLoadPayload:function(n,r){},request:gxe,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Tj=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};mxe(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return yxe(t,[{key:"init",value:function(n){var r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=S_(S_(S_({},Sxe()),this.options||{}),s),this.allOptions=o,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Xc(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,s){this._readAny(n,n,r,r,s)}},{key:"read",value:function(n,r,s){this._readAny([n],n,[r],r,s)}},{key:"_readAny",value:function(n,r,s,o,a){var u=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,s)),c=lxe(c),c.then(function(f){if(!f)return a(null,{});var p=A5(f,{lng:n.join("+"),ns:s.join("+")});if(p==null){var g=n.map(Dm).join(", "),m=s.map(Dm).join(", ");return a(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+g+"] namespaces=["+m+"]"),!1)}u.loadUrl(p,a,r,o)})}},{key:"loadUrl",value:function(n,r,s,o){var a=this,u=typeof s=="string"?[s]:s,c=typeof o=="string"?[o]:o,f=this.options.parseLoadPayload(u,c),p=Dm(ixe(n));this.options.request(this.options,n,f,function(g,m){if(m&&(m.status>=500&&m.status<600||!m.status))return r("failed loading "+p+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+p+"; status code: "+m.status,!1);if(!m&&g&&g.message){var y=g.message.toLowerCase(),S=["failed","fetch","network","load"].find(function(w){return y.indexOf(w)>-1});if(S)return r("failed loading "+p+": "+Dm(g.message),!0)}if(g)return r(g,!1);var E,C;try{typeof m.data=="string"?E=a.options.parse(m.data,s,o):E=m.data}catch{C="failed parsing "+p+" to json"}if(C)return r(C,!1);r(null,E)})}},{key:"create",value:function(n,r,s,o,a){var u=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,s,o),f=0,p=[],g=[];n.forEach(function(m){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(m,r));var S=A5(y,{lng:m,ns:r});if(S==null){f+=1,a&&f===n.length&&a(p,g);return}u.options.request(u.options,S,c,function(E,C){f+=1,p.push(E),g.push(C),f===n.length&&typeof a=="function"&&a(p,g)})})}}},{key:"reload",value:function(){var n=this,r=this.services,s=r.backendConnector,o=r.languageUtils,a=r.logger,u=s.language;if(!(u&&u.toLowerCase()==="cimode")){var c=[],f=function(g){var m=o.toResolveHierarchy(g);m.forEach(function(y){c.indexOf(y)<0&&c.push(y)})};f(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(p){return f(p)}),c.forEach(function(p){n.allOptions.ns.forEach(function(g){s.read(p,g,"read",null,null,function(m,y){m&&a.warn("loading namespace ".concat(g," for language ").concat(p," failed"),m),!m&&y&&a.log("loaded namespace ".concat(g," for language ").concat(p),y),s.loaded("".concat(p,"|").concat(g),m,y)})})})}}}])})();Tj.type="backend";hr.use(Tj).use(bj).use(yEe).init({fallbackLng:"en",supportedLngs:["en","nl","de","fr"],ns:["common","mail","settings","errors"],defaultNS:"common",backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["navigator","htmlTag"],caches:[]},interpolation:{escapeValue:!1},react:{useSuspense:!0,bindI18n:"languageChanged loaded"}});const Exe=({authProvider:t,rootElementId:e="root"})=>{MJ(),iEe(),t.configure(),Npe(t);const n=sEe();CJ(n);const r=new nfe({queryCache:new FF({onError:Dpe}),mutationCache:new UF({onError:Lpe}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=C_e(r,n);n.recordPageView(window.location.pathname);const o=document.getElementById(e);if(!o)throw new Error(`Root element not found: #${e}`);const{Shell:a}=t;hpe.createRoot(o).render(D.jsx(A.StrictMode,{children:D.jsx(sj.Provider,{value:n,children:D.jsxs(rfe,{client:r,children:[D.jsx(kpe,{value:t,children:D.jsx(a,{children:D.jsx(lpe,{router:s})})}),!1]})})}))};Exe({authProvider:Pde});export{MAe as $,afe as A,Gm as B,zM as C,DX as D,dfe as E,yQ as F,lfe as G,ufe as H,GZ as I,Lr as J,hfe as K,ML as L,cfe as M,pfe as N,VZ as O,Oxe as P,Xde as Q,q6 as R,iJ as S,YZ as T,ds as U,qr as V,Nhe as W,ph as X,oTe as Y,XT as Z,xN as _,dn as a,y7 as a$,v_ as a0,zxe as a1,mP as a2,LJ as a3,f7 as a4,wEe as a5,cTe as a6,SAe as a7,gfe as a8,vCe as a9,YAe as aA,aTe as aB,sTe as aC,rTe as aD,xxe as aE,wCe as aF,Iy as aG,fCe as aH,zl as aI,g7 as aJ,iCe as aK,lj as aL,DAe as aM,kAe as aN,LAe as aO,UAe as aP,HAe as aQ,kxe as aR,$Ee as aS,CAe as aT,qa as aU,FEe as aV,F8 as aW,Cy as aX,vwe as aY,Axe as aZ,qA as a_,G6 as aa,JAe as ab,tTe as ac,QAe as ad,zAe as ae,pCe as af,lTe as ag,SCe as ah,cj as ai,nTe as aj,iTe as ak,eTe as al,qn as am,jAe as an,gCe as ao,uCe as ap,VAe as aq,_Ce as ar,CCe as as,ZAe as at,KAe as au,GAe as av,BAe as aw,z as ax,h7 as ay,XAe as az,ZM as b,Bee as b$,hCe as b0,Uxe as b1,xAe as b2,wAe as b3,TAe as b4,fd as b5,gwe as b6,Cr as b7,uTe as b8,$Ae as b9,gT as bA,Ai as bB,coe as bC,Ti as bD,noe as bE,n9 as bF,Uy as bG,F9 as bH,Are as bI,poe as bJ,woe as bK,Rre as bL,Ere as bM,Py as bN,QA as bO,Z8 as bP,Soe as bQ,moe as bR,Pre as bS,doe as bT,CT as bU,J8 as bV,Ire as bW,soe as bX,ooe as bY,Yee as bZ,nu as b_,qAe as ba,$we as bb,_Ae as bc,AAe as bd,dTe as be,fTe as bf,FAe as bg,mJ as bh,Nxe as bi,gJ as bj,H4 as bk,EAe as bl,RAe as bm,lCe as bn,OAe as bo,IAe as bp,NAe as bq,PAe as br,WAe as bs,mCe as bt,Ch as bu,tfe as bv,NF as bw,Ig as bx,r9 as by,No as bz,Ns as c,zee as c0,XA as c1,H9 as c2,roe as c3,$ee as c4,Mre as c5,loe as c6,JA as c7,ioe as c8,Aoe as c9,V9 as ca,Z6 as cb,Pxe as cc,Xh as cd,Mxe as ce,yT as cf,Wy as cg,ep as ch,Eoe as ci,Qh as cj,Coe as ck,goe as cl,HZ as d,kX as e,Txe as f,WZ as g,Ixe as h,mQ as i,D as j,Y1 as k,B_ as l,SQ as m,uF as n,Cxe as o,Rxe as p,wxe as q,A as r,Lxe as s,Dxe as t,sp as u,er as v,ox as w,IF as x,BF as y,sfe as z};
|
|
294
|
+
or you can use record.mirror to access the mirror instance during recording.`;let T4={map:{},getId(){return console.error(pc),-1},getNode(){return console.error(pc),null},removeNodeFromMap(){console.error(pc)},has(){return console.error(pc),!1},reset(){console.error(pc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(T4=new Proxy(T4,{get(t,e,n){return e==="map"&&console.error(pc),Reflect.get(t,e,n)}}));function jh(t,e,n={}){let r=null,s=0;return function(...o){const a=Date.now();!s&&n.leading===!1&&(s=a);const u=e-(a-s),c=this;u<=0||u>e?(r&&(clearTimeout(r),r=null),s=a,t.apply(c,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{s=n.leading===!1?0:Date.now(),r=null,t.apply(c,o)},u))}}function xb(t,e,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>xb(t,e,o||{},!0)}let Jv=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Jv=()=>new Date().getTime());function DB(t){var e,n,r,s;const o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:o.documentElement.scrollLeft||o?.body&&((e=rt.parentElement(o.body))==null?void 0:e.scrollLeft)||((n=o?.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:o?.documentElement.scrollTop||o?.body&&((r=rt.parentElement(o.body))==null?void 0:r.scrollTop)||((s=o?.body)==null?void 0:s.scrollTop)||0}}function LB(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function UB(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function FB(t){return t?t.nodeType===t.ELEMENT_NODE?t:rt.parentElement(t):null}function Er(t,e,n,r){if(!t)return!1;const s=FB(t);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(qv(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function lSe(t,e){return e.getId(t)!==-1}function g_(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===Mh}function zB(t,e){if(lh(t))return!1;const n=e.getId(t);if(!e.has(n))return!0;const r=rt.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?zB(r,e):!0}function rA(t){return!!t.changedTouches}function uSe(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function BB(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function jB(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function sA(t){return t?t instanceof FR&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class cSe{constructor(){Se(this,"id",1),Se(this,"styleIDMap",new WeakMap),Se(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function HB(t){var e;let n=null;return"getRootNode"in t&&((e=rt.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&rt.host(rt.getRootNode(t))&&(n=rt.host(rt.getRootNode(t))),n}function dSe(t){let e=t,n;for(;n=HB(e);)e=n;return e}function fSe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=dSe(t);return rt.contains(e,n)}function $B(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||fSe(t):!1}var Ct=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Ct||{}),ft=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(ft||{}),Dr=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Dr||{}),si=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(si||{}),Wc=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Wc||{}),gc=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(gc||{}),qB=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(qB||{});function R4(t){return"__ln"in t}class hSe{constructor(){Se(this,"length",0),Se(this,"head",null),Se(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&R4(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&R4(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){const n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const I4=(t,e)=>`${t}@${e}`;class pSe{constructor(){Se(this,"frozen",!1),Se(this,"locked",!1),Se(this,"texts",[]),Se(this,"attributes",[]),Se(this,"attributeMap",new WeakMap),Se(this,"removes",[]),Se(this,"mapRemoves",[]),Se(this,"movedMap",{}),Se(this,"addedSet",new Set),Se(this,"movedSet",new Set),Se(this,"droppedSet",new Set),Se(this,"removesSubTreeCache",new Set),Se(this,"mutationCb"),Se(this,"blockClass"),Se(this,"blockSelector"),Se(this,"maskTextClass"),Se(this,"maskTextSelector"),Se(this,"inlineStylesheet"),Se(this,"maskInputOptions"),Se(this,"maskTextFn"),Se(this,"maskInputFn"),Se(this,"keepIframeSrcFn"),Se(this,"recordCanvas"),Se(this,"inlineImages"),Se(this,"slimDOMOptions"),Se(this,"dataURLOptions"),Se(this,"doc"),Se(this,"mirror"),Se(this,"iframeManager"),Se(this,"stylesheetManager"),Se(this,"shadowDomManager"),Se(this,"canvasManager"),Se(this,"processedNodeManager"),Se(this,"unattachedDoc"),Se(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Se(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],n=new Set,r=new hSe,s=c=>{let f=c,p=Mh;for(;p===Mh;)f=f&&f.nextSibling,p=f&&this.mirror.getId(f);return p},o=c=>{const f=rt.parentNode(c);if(!f||!$B(c))return;let p=!1;if(c.nodeType===Node.TEXT_NODE){const S=f.tagName;if(S==="TEXTAREA")return;S==="STYLE"&&this.addedSet.has(f)&&(p=!0)}const g=lh(f)?this.mirror.getId(HB(c)):this.mirror.getId(f),m=s(c);if(g===-1||m===-1)return r.addNode(c);const y=_c(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:S=>{BB(S,this.mirror)&&this.iframeManager.addIframe(S),jB(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),sA(c)&&this.shadowDomManager.addShadowRoot(rt.shadowRoot(c),this.doc)},onIframeLoad:(S,E)=>{this.iframeManager.attachIframe(S,E),this.shadowDomManager.observeAttachShadow(S)},onStylesheetLoad:(S,E)=>{this.stylesheetManager.attachLinkElement(S,E)},cssCaptured:p});y&&(e.push({parentId:g,nextId:m,node:y}),n.add(y.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)O4(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!N4(this.droppedSet,c)&&!O4(this.removesSubTreeCache,c,this.mirror)||N4(this.movedSet,c)?o(c):this.droppedSet.add(c);let a=null;for(;r.length;){let c=null;if(a){const f=this.mirror.getId(rt.parentNode(a.value)),p=s(a.value);f!==-1&&p!==-1&&(c=a)}if(!c){let f=r.tail;for(;f;){const p=f;if(f=f.previous,p){const g=this.mirror.getId(rt.parentNode(p.value));if(s(p.value)===-1)continue;if(g!==-1){c=p;break}else{const y=p.value,S=rt.parentNode(y);if(S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const E=rt.host(S);if(this.mirror.getId(E)!==-1){c=p;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}a=c.previous,r.removeNode(c.value),o(c.value)}const u={texts:this.texts.map(c=>{const f=c.node,p=rt.parentNode(f);return p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p),{id:this.mirror.getId(f),value:c.value}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:f}=c;if(typeof f.style=="string"){const p=JSON.stringify(c.styleDiff),g=JSON.stringify(c._unchangedStyles);p.length<f.style.length&&(p+g).split("var(").length===f.style.split("var(").length&&(f.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),Se(this,"genTextAreaValueMutation",e=>{let n=this.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e,n));const r=Array.from(rt.childNodes(e),s=>rt.textContent(s)||"").join("");n.attributes.value=jv({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Hv(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!g_(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const n=rt.textContent(e.target);!Er(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:hz(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,FB(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if(r==="value"){const a=Hv(n);s=jv({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:s,maskInputFn:this.maskInputFn})}if(Er(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!fz(n.tagName,r))if(o.attributes[r]=dz(this.doc,Gl(n.tagName),Gl(r),s),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const u of Array.from(n.style)){const c=n.style.getPropertyValue(u),f=n.style.getPropertyPriority(u);c!==a.style.getPropertyValue(u)||f!==a.style.getPropertyPriority(u)?f===""?o.styleDiff[u]=c:o.styleDiff[u]=[c,f]:o._unchangedStyles[u]=[c,f]}for(const u of Array.from(a.style))n.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(Er(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=lh(e.target)?this.mirror.getId(rt.host(e.target)):this.mirror.getId(e.target);Er(e.target,this.blockClass,this.blockSelector,!1)||g_(n,this.mirror,this.slimDOMOptions)||!lSe(n,this.mirror)||(this.addedSet.has(n)?(oA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||zB(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[I4(r,s)]?oA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:lh(e.target)&&uh(e.target)?!0:void 0}),gSe(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),Se(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(g_(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[I4(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Er(e,this.blockClass,this.blockSelector,!1)||(rt.childNodes(e).forEach(r=>this.genAdds(r)),sA(e)&&rt.childNodes(rt.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function oA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>oA(t,n))}function gSe(t,e){const n=[t];for(;n.length;){const r=n.pop();e.has(r)||(e.add(r),rt.childNodes(r).forEach(s=>n.push(s)))}}function O4(t,e,n){return t.size===0?!1:mSe(t,e)}function mSe(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function N4(t,e){return t.size===0?!1:WB(t,e)}function WB(t,e){const n=rt.parentNode(e);return n?t.has(n)?!0:WB(t,n):!1}let ch;function vSe(t){ch=t}function ySe(){ch=void 0}const vt=t=>ch?(...n)=>{try{return t(...n)}catch(r){if(ch&&ch(r)===!0)return;throw r}}:t,Tl=[];function cp(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function GB(t,e){const n=new pSe;Tl.push(n),n.init(t);const r=new(kB())(vt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function bSe({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const s=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],u;const c=jh(vt(g=>{const m=Date.now()-u;t(a.map(y=>(y.timeOffset-=m,y)),g),a=[],u=null}),o),f=vt(jh(vt(g=>{const m=cp(g),{clientX:y,clientY:S}=rA(g)?g.changedTouches[0]:g;u||(u=Jv()),a.push({x:y,y:S,id:r.getId(m),timeOffset:Jv()-u}),c(typeof DragEvent<"u"&&g instanceof DragEvent?ft.Drag:g instanceof MouseEvent?ft.MouseMove:ft.TouchMove)}),s,{trailing:!1})),p=[Sr("mousemove",f,n),Sr("touchmove",f,n),Sr("drag",f,n)];return vt(()=>{p.forEach(g=>g())})}function SSe({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[];let c=null;const f=p=>g=>{const m=cp(g);if(Er(m,r,s,!0))return;let y=null,S=p;if("pointerType"in g){switch(g.pointerType){case"mouse":y=si.Mouse;break;case"touch":y=si.Touch;break;case"pen":y=si.Pen;break}y===si.Touch?Dr[p]===Dr.MouseDown?S="TouchStart":Dr[p]===Dr.MouseUp&&(S="TouchEnd"):si.Pen}else rA(g)&&(y=si.Touch);y!==null?(c=y,(S.startsWith("Touch")&&y===si.Touch||S.startsWith("Mouse")&&y===si.Mouse)&&(y=null)):Dr[p]===Dr.Click&&(y=c,c=null);const E=rA(g)?g.changedTouches[0]:g;if(!E)return;const C=n.getId(m),{clientX:w,clientY:x}=E;vt(t)({type:Dr[S],id:C,x:w,y:x,...y!==null&&{pointerType:y}})};return Object.keys(Dr).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&a[p]!==!1).forEach(p=>{let g=Gl(p);const m=f(p);if(window.PointerEvent)switch(Dr[p]){case Dr.MouseDown:case Dr.MouseUp:g=g.replace("mouse","pointer");break;case Dr.TouchStart:case Dr.TouchEnd:return}u.push(Sr(g,m,e))}),vt(()=>{u.forEach(p=>p())})}function VB({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){const a=vt(jh(vt(u=>{const c=cp(u);if(!c||Er(c,r,s,!0))return;const f=n.getId(c);if(c===e&&e.defaultView){const p=DB(e.defaultView);t({id:f,x:p.left,y:p.top})}else t({id:f,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Sr("scroll",a,e)}function ESe({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=vt(jh(vt(()=>{const o=LB(),a=UB();(n!==o||r!==a)&&(t({width:Number(a),height:Number(o)}),n=o,r=a)}),200));return Sr("resize",s,e)}const CSe=["INPUT","TEXTAREA","SELECT"],M4=new WeakMap;function wSe({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:p}){function g(x){let T=cp(x);const R=x.isTrusted,M=T&&T.tagName;if(T&&M==="OPTION"&&(T=rt.parentElement(T)),!T||!M||CSe.indexOf(M)<0||Er(T,r,s,!0)||T.classList.contains(o)||a&&T.matches(a))return;let O=T.value,I=!1;const P=Hv(T)||"";P==="radio"||P==="checkbox"?I=T.checked:(u[M.toLowerCase()]||u[P])&&(O=jv({element:T,maskInputOptions:u,tagName:M,type:P,value:O,maskInputFn:c})),m(T,p?{text:O,isChecked:I,userTriggered:R}:{text:O,isChecked:I});const k=T.name;P==="radio"&&k&&I&&e.querySelectorAll(`input[type="radio"][name="${k}"]`).forEach(H=>{if(H!==T){const F=H.value;m(H,p?{text:F,isChecked:!I,userTriggered:!1}:{text:F,isChecked:!I})}})}function m(x,T){const R=M4.get(x);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){M4.set(x,T);const M=n.getId(x);vt(t)({...T,id:M})}}const S=(f.input==="last"?["change"]:["input","change"]).map(x=>Sr(x,vt(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(x=>x())};const C=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),w=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&S.push(...w.map(x=>xb(x[0],x[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(x=>x())})}function ey(t){const e=[];function n(r,s){if(Nm("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Nm("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Nm("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Nm("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(a)}return s}return n(t,e)}function ba(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function _Se({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:vt((p,g,m)=>{const[y,S]=m,{id:E,styleId:C}=ba(g,e,n.styleMirror);return(E&&E!==-1||C&&C!==-1)&&t({id:E,styleId:C,adds:[{rule:y,index:S}]}),p.apply(g,m)})}),r.CSSStyleSheet.prototype.addRule=function(p,g,m=this.cssRules.length){const y=`${p} { ${g} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[y,m])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,removes:[{index:y}]}),p.apply(g,m)})}),r.CSSStyleSheet.prototype.removeRule=function(p){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replace:y}),p.apply(g,m)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replaceSync:y}),p.apply(g,m)})}));const c={};Mm("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Mm("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Mm("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Mm("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(c).forEach(([p,g])=>{f[p]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(f[p].insertRule,{apply:vt((m,y,S)=>{const[E,C]=S,{id:w,styleId:x}=ba(y.parentStyleSheet,e,n.styleMirror);return(w&&w!==-1||x&&x!==-1)&&t({id:w,styleId:x,adds:[{rule:E,index:[...ey(y),C||0]}]}),m.apply(y,S)})}),g.prototype.deleteRule=new Proxy(f[p].deleteRule,{apply:vt((m,y,S)=>{const[E]=S,{id:C,styleId:w}=ba(y.parentStyleSheet,e,n.styleMirror);return(C&&C!==-1||w&&w!==-1)&&t({id:C,styleId:w,removes:[{index:[...ey(y),E]}]}),m.apply(y,S)})})}),vt(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,a&&(r.CSSStyleSheet.prototype.replace=a),u&&(r.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach(([p,g])=>{g.prototype.insertRule=f[p].insertRule,g.prototype.deleteRule=f[p].deleteRule})})}function KB({mirror:t,stylesheetManager:e},n){var r,s,o;let a=null;n.nodeName==="#document"?a=t.getId(n):a=t.getId(rt.host(n));const u=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(o=(s=n.ownerDocument)==null?void 0:s.defaultView)==null?void 0:o.ShadowRoot,c=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var f;return(f=c.get)==null?void 0:f.call(this)},set(f){var p;const g=(p=c.set)==null?void 0:p.call(this,f);if(a!==null&&a!==-1)try{e.adoptStyleSheets(f,a)}catch{}return g}}),vt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function xSe({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:vt((u,c,f)=>{var p;const[g,m,y]=f;if(n.has(g))return o.apply(c,[g,m,y]);const{id:S,styleId:E}=ba((p=c.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,set:{property:g,value:m,priority:y},index:ey(c.parentRule)}),u.apply(c,f)})});const a=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:vt((u,c,f)=>{var p;const[g]=f;if(n.has(g))return a.apply(c,[g]);const{id:m,styleId:y}=ba((p=c.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&t({id:m,styleId:y,remove:{property:g},index:ey(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function ASe({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:s,doc:o}){const a=vt(c=>jh(vt(f=>{const p=cp(f);if(!p||Er(p,e,n,!0))return;const{currentTime:g,volume:m,muted:y,playbackRate:S,loop:E}=p;t({type:c,id:r.getId(p),currentTime:g,volume:m,muted:y,playbackRate:S,loop:E})}),s.media||500)),u=[Sr("play",a(gc.Play),o),Sr("pause",a(gc.Pause),o),Sr("seeked",a(gc.Seeked),o),Sr("volumechange",a(gc.VolumeChange),o),Sr("ratechange",a(gc.RateChange),o)];return vt(()=>{u.forEach(c=>c())})}function TSe({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(c,f,p){const g=new o(c,f,p);return s.set(g,{family:c,buffer:typeof f!="string",descriptors:p,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),g};const a=uu(e.fonts,"add",function(u){return function(c){return setTimeout(vt(()=>{const f=s.get(c);f&&(t(f),s.delete(c))}),0),u.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(a),vt(()=>{r.forEach(u=>u())})}function RSe(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,selectionCb:o}=t;let a=!0;const u=vt(()=>{const c=e.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;const f=[],p=c.rangeCount||0;for(let g=0;g<p;g++){const m=c.getRangeAt(g),{startContainer:y,startOffset:S,endContainer:E,endOffset:C}=m;Er(y,r,s,!0)||Er(E,r,s,!0)||f.push({start:n.getId(y),startOffset:S,end:n.getId(E),endOffset:C})}o({ranges:f})});return u(),Sr("selectionchange",u)}function ISe({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:uu(n.customElements,"define",function(s){return function(o,a,u){try{e({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return s.apply(this,[o,a,u])}})}function OSe(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:c,styleSheetRuleCb:f,styleDeclarationCb:p,canvasMutationCb:g,fontCb:m,selectionCb:y,customElementCb:S}=t;t.mutationCb=(...E)=>{e.mutation&&e.mutation(...E),n(...E)},t.mousemoveCb=(...E)=>{e.mousemove&&e.mousemove(...E),r(...E)},t.mouseInteractionCb=(...E)=>{e.mouseInteraction&&e.mouseInteraction(...E),s(...E)},t.scrollCb=(...E)=>{e.scroll&&e.scroll(...E),o(...E)},t.viewportResizeCb=(...E)=>{e.viewportResize&&e.viewportResize(...E),a(...E)},t.inputCb=(...E)=>{e.input&&e.input(...E),u(...E)},t.mediaInteractionCb=(...E)=>{e.mediaInteaction&&e.mediaInteaction(...E),c(...E)},t.styleSheetRuleCb=(...E)=>{e.styleSheetRule&&e.styleSheetRule(...E),f(...E)},t.styleDeclarationCb=(...E)=>{e.styleDeclaration&&e.styleDeclaration(...E),p(...E)},t.canvasMutationCb=(...E)=>{e.canvasMutation&&e.canvasMutation(...E),g(...E)},t.fontCb=(...E)=>{e.font&&e.font(...E),m(...E)},t.selectionCb=(...E)=>{e.selection&&e.selection(...E),y(...E)},t.customElementCb=(...E)=>{e.customElement&&e.customElement(...E),S(...E)}}function NSe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};OSe(t,e);let r;t.recordDOM&&(r=GB(t,t.doc));const s=bSe(t),o=SSe(t),a=VB(t),u=ESe(t,{win:n}),c=wSe(t),f=ASe(t);let p=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(p=_Se(t,{win:n}),g=KB(t,t.doc),m=xSe(t,{win:n}),t.collectFonts&&(y=TSe(t)));const S=RSe(t),E=ISe(t),C=[];for(const w of t.plugins)C.push(w.observer(w.callback,n,w.options));return vt(()=>{Tl.forEach(w=>w.reset()),r?.disconnect(),s(),o(),a(),u(),c(),f(),p(),g(),m(),y(),S(),E(),C.forEach(w=>w())})}function Nm(t){return typeof window[t]<"u"}function Mm(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class P4{constructor(e){Se(this,"iframeIdToRemoteIdMap",new WeakMap),Se(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,n,r,s){const o=r||this.getIdToRemoteIdMap(e),a=s||this.getRemoteIdToIdMap(e);let u=o.get(n);return u||(u=this.generateIdFn(),o.set(n,u),a.set(u,n)),u}getIds(e,n){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,r,s))}getRemoteId(e,n,r){const s=r||this.getRemoteIdToIdMap(e);if(typeof n!="number")return n;const o=s.get(n);return o||-1}getRemoteIds(e,n){const r=this.getRemoteIdToIdMap(e);return n.map(s=>this.getRemoteId(e,s,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}}class MSe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new P4(cz)),Se(this,"crossOriginIframeStyleMirror"),Se(this,"crossOriginIframeRootIdMap",new WeakMap),Se(this,"mirror"),Se(this,"mutationCb"),Se(this,"wrappedEmit"),Se(this,"loadListener"),Se(this,"stylesheetManager"),Se(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new P4(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const o=this.transformCrossOriginEvent(s,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){var r;switch(n.type){case Ct.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);const s=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(n.data.node,s),{timestamp:n.timestamp,type:Ct.IncrementalSnapshot,data:{source:ft.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ct.Meta:case Ct.Load:case Ct.DomContentLoaded:return!1;case Ct.Plugin:return n;case Ct.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case Ct.IncrementalSnapshot:switch(n.data.source){case ft.Mutation:return n.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(s.node,o)}),n.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"])}),n.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"])}),n.data.texts.forEach(s=>{this.replaceIds(s,e,["id"])}),n;case ft.Drag:case ft.TouchMove:case ft.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,e,["id"])}),n;case ft.ViewportResize:return!1;case ft.MediaInteraction:case ft.MouseInteraction:case ft.Scroll:case ft.CanvasMutation:case ft.Input:return this.replaceIds(n.data,e,["id"]),n;case ft.StyleSheetRule:case ft.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case ft.Font:return n;case ft.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"])}),n;case ft.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),(r=n.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,e,["styleId"])}),n}}return!1}replace(e,n,r,s){for(const o of s)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(r,n[o]):n[o]=e.getId(r,n[o]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==qB.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class PSe{constructor(e){Se(this,"shadowDoms",new WeakSet),Se(this,"mutationCb"),Se(this,"scrollCb"),Se(this,"bypassOptions"),Se(this,"mirror"),Se(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!uh(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=GB({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(VB({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(rt.host(e))),this.restoreHandlers.push(KB({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){const r=this;this.restoreHandlers.push(uu(e.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o),u=rt.shadowRoot(this);return u&&$B(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var xc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kSe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Pm=0;Pm<xc.length;Pm++)kSe[xc.charCodeAt(Pm)]=Pm;var DSe=function(t){var e=new Uint8Array(t),n,r=e.length,s="";for(n=0;n<r;n+=3)s+=xc[e[n]>>2],s+=xc[(e[n]&3)<<4|e[n+1]>>4],s+=xc[(e[n+1]&15)<<2|e[n+2]>>6],s+=xc[e[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const k4=new Map;function LSe(t,e){let n=k4.get(t);return n||(n=new Map,k4.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const YB=(t,e,n)=>{if(!t||!(XB(t,e)||typeof t=="object"))return;const r=t.constructor.name,s=LSe(n,r);let o=s.indexOf(t);return o===-1&&(o=s.length,s.push(t)),o};function cv(t,e,n){if(t instanceof Array)return t.map(r=>cv(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const r=t.constructor.name,s=DSe(t);return{rr_type:r,base64:s}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[cv(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:s}=t;return{rr_type:r,src:s}}else if(t instanceof HTMLCanvasElement){const r="HTMLImageElement",s=t.toDataURL();return{rr_type:r,src:s}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[cv(t.data,e,n),t.width,t.height]};if(XB(t,e)||typeof t=="object"){const r=t.constructor.name,s=YB(t,e,n);return{rr_type:r,index:s}}}}return t}const ZB=(t,e,n)=>t.map(r=>cv(r,e,n)),XB=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>t instanceof e[s]);function USe(t,e,n,r){const s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const u=uu(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return Er(this.canvas,n,r,!0)||setTimeout(()=>{const p=ZB(f,e,this);t(this.canvas,{type:Wc["2D"],property:a,args:p})},0),c.apply(this,f)}});s.push(u)}catch{const u=xb(e.CanvasRenderingContext2D.prototype,a,{set(c){t(this.canvas,{type:Wc["2D"],property:a,args:[c],setter:!0})}});s.push(u)}return()=>{s.forEach(a=>a())}}function FSe(t){return t==="experimental-webgl"?"webgl":t}function D4(t,e,n,r){const s=[];try{const o=uu(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!Er(this,e,n,!0)){const f=FSe(u);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(c[0]&&typeof c[0]=="object"){const p=c[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...c])}});s.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(o=>o())}}function L4(t,e,n,r,s,o){const a=[],u=Object.getOwnPropertyNames(t);for(const c of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;const f=uu(t,c,function(p){return function(...g){const m=p.apply(this,g);if(YB(m,o,this),"tagName"in this.canvas&&!Er(this.canvas,r,s,!0)){const y=ZB(g,o,this),S={type:e,property:c,args:y};n(this.canvas,S)}return m}});a.push(f)}catch{const f=xb(t,c,{set(p){n(this.canvas,{type:e,property:c,args:[p],setter:!0})}});a.push(f)}return a}function zSe(t,e,n,r){const s=[];return s.push(...L4(e.WebGLRenderingContext.prototype,Wc.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...L4(e.WebGL2RenderingContext.prototype,Wc.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const QB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",BSe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),U4=typeof window<"u"&&window.Blob&&new Blob([BSe(QB)],{type:"text/javascript;charset=utf-8"});function jSe(t){let e;try{if(e=U4&&(window.URL||window.webkitURL).createObjectURL(U4),!e)throw"";const n=new Worker(e,{name:t?.name});return n.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),n}catch{return new Worker("data:text/javascript;base64,"+QB,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class HSe{constructor(e){Se(this,"pendingCanvasMutations",new Map),Se(this,"rafStamps",{latestId:0,invokeId:null}),Se(this,"mirror"),Se(this,"mutationCb"),Se(this,"resetObservers"),Se(this,"frozen",!1),Se(this,"locked",!1),Se(this,"processMutation",(c,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(f)});const{sampling:n="all",win:r,blockClass:s,blockSelector:o,recordCanvas:a,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&n==="all"&&this.initCanvasMutationObserver(r,s,o),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,s,o,{dataURLOptions:u})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,n,r,s,o){const a=D4(n,r,s,!0),u=new Map,c=new jSe;c.onmessage=S=>{const{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;const{base64:C,type:w,width:x,height:T}=S.data;this.mutationCb({id:E,type:Wc["2D"],commands:[{property:"clearRect",args:[0,0,x,T]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:w}]},0,0]}]})};const f=1e3/e;let p=0,g;const m=()=>{const S=[];return n.document.querySelectorAll("canvas").forEach(E=>{Er(E,r,s,!0)||S.push(E)}),S},y=S=>{if(p&&S-p<f){g=requestAnimationFrame(y);return}p=S,m().forEach(async E=>{var C;const w=this.mirror.getId(E);if(u.get(w)||E.width===0||E.height===0)return;if(u.set(w,!0),["webgl","webgl2"].includes(E.__context)){const T=E.getContext(E.__context);((C=T?.getContextAttributes())==null?void 0:C.preserveDrawingBuffer)===!1&&T.clear(T.COLOR_BUFFER_BIT)}const x=await createImageBitmap(E);c.postMessage({id:w,bitmap:x,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[x])}),g=requestAnimationFrame(y)};g=requestAnimationFrame(y),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=D4(e,n,r,!1),o=USe(this.processMutation.bind(this),e,n,r),a=zSe(this.processMutation.bind(this),e,n,r);this.resetObservers=()=>{s(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const s=r.map(a=>{const{type:u,...c}=a;return c}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:s}),this.pendingCanvasMutations.delete(e)}}class $Se{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new cSe),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;const r={id:n,styleIds:[]},s=[];for(const o of e){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),s.push({styleId:a,rules:Array.from(o.rules||CSSRule,(u,c)=>({rule:az(u,o.href),index:c}))})),r.styleIds.push(a)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class qSe{constructor(){Se(this,"nodeMap",new WeakMap),Se(this,"active",!1)}inOtherBuffer(e,n){const r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==n)}add(e,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}}let gn,dv,m_,ty=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((BU=t.contentWindow)==null?void 0:BU.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const js=Gve();function dp(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:y,maskInputFn:S,maskTextFn:E,hooks:C,packFn:w,sampling:x={},dataURLOptions:T={},mousemoveWait:R,recordDOM:M=!0,recordCanvas:O=!1,recordCrossOriginIframes:I=!1,recordAfter:P=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:k=!1,collectFonts:H=!1,inlineImages:F=!1,plugins:B,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:ne}=t;vSe(ne);const $=I?window.parent===window:!0;let ee=!1;if(!$)try{window.parent.document&&(ee=!1)}catch{ee=!0}if($&&!e)throw new Error("emit function is required");if(!$&&!ee)return()=>{};R!==void 0&&x.mousemove===void 0&&(x.mousemove=R),js.reset();const fe=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:m!==void 0?m:{password:!0},de=pz(y);uSe();let Ae,L=0;const V=Ee=>{for(const pt of B||[])pt.eventProcessor&&(Ee=pt.eventProcessor(Ee));return w&&!ee&&(Ee=w(Ee)),Ee};gn=(Ee,pt)=>{var Ce;const ze=Ee;if(ze.timestamp=Jv(),(Ce=Tl[0])!=null&&Ce.isFrozen()&&ze.type!==Ct.FullSnapshot&&!(ze.type===Ct.IncrementalSnapshot&&ze.data.source===ft.Mutation)&&Tl.forEach(Be=>Be.unfreeze()),$)e?.(V(ze),pt);else if(ee){const Be={type:"rrweb",event:V(ze),origin:window.location.origin,isCheckout:pt};window.parent.postMessage(Be,"*")}if(ze.type===Ct.FullSnapshot)Ae=ze,L=0;else if(ze.type===Ct.IncrementalSnapshot){if(ze.data.source===ft.Mutation&&ze.data.isAttachIframe)return;L++;const Be=r&&L>=r,He=n&&ze.timestamp-Ae.timestamp>n;(Be||He)&&dv(!0)}};const K=Ee=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Mutation,...Ee}})},J=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Scroll,...Ee}}),oe=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.CanvasMutation,...Ee}}),he=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.AdoptedStyleSheet,...Ee}}),ue=new $Se({mutationCb:K,adoptedStyleSheetCb:he}),ve=new MSe({mirror:js,mutationCb:K,stylesheetManager:ue,recordCrossOriginIframes:I,wrappedEmit:gn});for(const Ee of B||[])Ee.getMirror&&Ee.getMirror({nodeMirror:js,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const _e=new qSe;m_=new HSe({recordCanvas:O,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:js,sampling:x.canvas,dataURLOptions:T});const Xe=new PSe({mutationCb:K,scrollCb:J,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:p,maskInputOptions:fe,dataURLOptions:T,maskTextFn:E,maskInputFn:S,recordCanvas:O,inlineImages:F,sampling:x,slimDOMOptions:de,iframeManager:ve,stylesheetManager:ue,canvasManager:m_,keepIframeSrcFn:W,processedNodeManager:_e},mirror:js});dv=(Ee=!1)=>{if(!M)return;gn({type:Ct.Meta,data:{href:window.location.href,width:UB(),height:LB()}},Ee),ue.reset(),Xe.init(),Tl.forEach(Ce=>Ce.lock());const pt=mye(document,{mirror:js,blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:p,maskAllInputs:fe,maskTextFn:E,maskInputFn:S,slimDOM:de,dataURLOptions:T,recordCanvas:O,inlineImages:F,onSerialize:Ce=>{BB(Ce,js)&&ve.addIframe(Ce),jB(Ce,js)&&ue.trackLinkElement(Ce),sA(Ce)&&Xe.addShadowRoot(rt.shadowRoot(Ce),document)},onIframeLoad:(Ce,ze)=>{ve.attachIframe(Ce,ze),Xe.observeAttachShadow(Ce)},onStylesheetLoad:(Ce,ze)=>{ue.attachLinkElement(Ce,ze)},keepIframeSrcFn:W});if(!pt)return console.warn("Failed to snapshot the document");gn({type:Ct.FullSnapshot,data:{node:pt,initialOffset:DB(window)}},Ee),Tl.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,js.getId(document))};try{const Ee=[],pt=ze=>{var Be;return vt(NSe)({mutationCb:K,mousemoveCb:(He,pr)=>gn({type:Ct.IncrementalSnapshot,data:{source:pr,positions:He}}),mouseInteractionCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MouseInteraction,...He}}),scrollCb:J,viewportResizeCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.ViewportResize,...He}}),inputCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Input,...He}}),mediaInteractionCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MediaInteraction,...He}}),styleSheetRuleCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleSheetRule,...He}}),styleDeclarationCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleDeclaration,...He}}),canvasMutationCb:oe,fontCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Font,...He}}),selectionCb:He=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Selection,...He}})},customElementCb:He=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.CustomElement,...He}})},blockClass:s,ignoreClass:a,ignoreSelector:u,maskTextClass:c,maskTextSelector:f,maskInputOptions:fe,inlineStylesheet:p,sampling:x,recordDOM:M,recordCanvas:O,inlineImages:F,userTriggeredOnInput:k,collectFonts:H,doc:ze,maskInputFn:S,maskTextFn:E,keepIframeSrcFn:W,blockSelector:o,slimDOMOptions:de,dataURLOptions:T,mirror:js,iframeManager:ve,stylesheetManager:ue,shadowDomManager:Xe,processedNodeManager:_e,canvasManager:m_,ignoreCSSAttributes:Y,plugins:((Be=B?.filter(He=>He.observer))==null?void 0:Be.map(He=>({observer:He.observer,options:He.options,callback:pr=>gn({type:Ct.Plugin,data:{plugin:He.name,payload:pr}})})))||[]},C)};ve.addLoadListener(ze=>{try{Ee.push(pt(ze.contentDocument))}catch(Be){console.warn(Be)}});const Ce=()=>{dv(),Ee.push(pt(document)),ty=!0};return["interactive","complete"].includes(document.readyState)?Ce():(Ee.push(Sr("DOMContentLoaded",()=>{gn({type:Ct.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&Ce()})),Ee.push(Sr("load",()=>{gn({type:Ct.Load,data:{}}),P==="load"&&Ce()},window))),()=>{Ee.forEach(ze=>{try{ze()}catch(Be){String(Be).toLowerCase().includes("cross-origin")||console.warn(Be)}}),_e.destroy(),ty=!1,ySe()}}catch(Ee){console.warn(Ee)}}dp.addCustomEvent=(t,e)=>{if(!ty)throw new Error("please add custom event after start recording");gn({type:Ct.Custom,data:{tag:t,payload:e}})};dp.freezePage=()=>{Tl.forEach(t=>t.freeze())};dp.takeFullSnapshot=t=>{if(!ty)throw new Error("please take full snapshot after start recording");dv(t)};dp.mirror=js;var F4;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(F4||(F4={}));const WSe="rrweb",GSe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},VSe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},z4=VSe;class KSe extends Os{constructor(e){super(WSe),this.recordingEvents=[],this.isRecording=!1,this.recordingStartTime=null,this.flushTimer=null,this.stopRecording=null,this.enabled=!1;const n=Object.assign(Object.assign(Object.assign({},z4.recordOptions),e?.recordOptions),GSe);this.config=Object.assign(Object.assign(Object.assign({},z4),e),{recordOptions:n}),be.info("RRWebPlugin initialized",{additionalSampleRate:this.config.additionalSampleRate,batchSize:this.config.batchSize,flushInterval:this.config.flushInterval})}enable(){var e;if(this.enabled){be.info("RRWebPlugin already enabled");return}const n=(e=this.context)===null||e===void 0?void 0:e.getSession();if(!n||!n.record){be.warn("RRWebPlugin skipping - session not being recorded",{hasSession:!!n,sessionRecord:n?.record});return}const r=Math.random();if(r>this.config.additionalSampleRate){be.warn("RRWebPlugin skipping - session replay additionalSampleRate",{randomValue:r,samplingRate:this.config.additionalSampleRate});return}this.enabled=!0,be.info("RRWebPlugin enabled - starting recording"),this.startRecording()}disable(){if(!this.enabled){be.info("RRWebPlugin already disabled");return}be.info("RRWebPlugin disabled - stopping recording"),this.enabled=!1,this.stopCurrentRecording()}record(e){const n=e?.action;n==="start"?(be.info("RRWebPlugin manual start recording"),this.startRecording()):n==="stop"&&(be.info("RRWebPlugin manual stop recording"),this.stopCurrentRecording())}onload(){}startRecording(){this.recordingStartTime=Date.now(),this.recordingEvents=[],this.isRecording=!0,be.info("RRWebPlugin starting rrweb recording",{startTime:this.recordingStartTime});const e=dp(Object.assign(Object.assign({},this.config.recordOptions),{emit:this.handleRRWebEvent.bind(this)}));e?(this.stopRecording=e,be.info("RRWebPlugin rrweb recording initialized successfully")):be.warn("RRWebPlugin failed to initialize rrweb recording"),this.flushTimer=window.setInterval(()=>{this.flush()},this.config.flushInterval)}stopCurrentRecording(){if(!this.isRecording){be.info("RRWebPlugin stopCurrentRecording called but not recording");return}be.info("RRWebPlugin stopping current recording"),this.isRecording=!1,this.stopRecording&&(this.stopRecording(),this.stopRecording=null,be.info("RRWebPlugin rrweb recording stopped")),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null,be.info("RRWebPlugin flush timer cleared")),this.flush()}handleRRWebEvent(e){this.isRecording&&(this.recordingEvents.push(e),this.recordingEvents.length>=this.config.batchSize&&(be.info("RRWebPlugin flushing events due to batch size",{eventCount:this.recordingEvents.length,batchSize:this.config.batchSize}),this.flush()))}flush(){if(this.recordingEvents.length===0){be.info("RRWebPlugin flushEvent called but no events to flush");return}be.info("RRWebPlugin flushing events",{eventCount:this.recordingEvents.length});const e=[...this.recordingEvents],n={version:"1.0.0",events:e,eventCount:e.length};this.context.record(_U,n),be.info("RRWebPlugin events sent to RUM",{eventType:_U,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var YSe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n},iA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(iA||(iA={}));const JB="us-west-2",aA=`https://dataplane.rum.${JB}.amazonaws.com`,ej=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),tj=t=>({allowCookies:!1,batchLimit:100,client:bge,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:aA,endpointUrl:new URL(aA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:iA.Path,pagesToExclude:[],pagesToInclude:[/.*/],signing:!1,recordResourceUrl:!0,retries:2,routeChangeComplete:100,routeChangeTimeout:1e4,sessionAttributes:{},sessionEventLimit:200,sessionLengthSeconds:1800,sessionSampleRate:1,suppressSessionStartEvent:!1,useBeacon:!0,userIdRetentionDays:30,enableW3CTraceId:!1,candidatesCacheSize:10});let ZSe=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=YSe(s,["cookieAttributes"]);this.eventBus=new W7,typeof r>"u"&&(r="us-west-2"),this.applicationId=e;const u=Object.assign(Object.assign({},ej()),o);this.config=Object.assign(Object.assign({fetchFunction:fetch},tj(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:aA.replace(JB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new Ome({id:e,version:n},this.config,this.eventBus),this.dispatchManager=this.initDispatch(r,e),this.pluginManager=this.initPluginManager(e,n),this.eventCache.setPluginFlushHook(()=>this.pluginManager.flush()),this.config.enableRumClient?this.enable():this.disable()}setAwsCredentials(e){this.dispatchManager.setAwsCredentials(e)}setSigningConfigFactory(e){this.dispatchManager.setSigningConfigFactory(e)}addSessionAttributes(e){this.eventCache.addSessionAttributes(e)}getSessionId(){return this.eventCache.getSessionId()}pinSessionId(e){this.eventCache.pinSessionId(e)}startSession(e){return this.eventCache.startSession(e)}getUserId(){return this.eventCache.getUserId()}pinUserId(e){this.eventCache.pinUserId(e)}setEventMetadataHook(e){this.eventCache.setEventMetadataHook(e)}clearEventMetadataHook(){this.eventCache.clearEventMetadataHook()}addPlugin(e){this.pluginManager.addPlugin(e)}dispatch(){this.dispatchManager.dispatchFetch()}dispatchBeacon(){this.dispatchManager.dispatchBeacon()}enable(){this.eventCache.enable(),this.pluginManager.enable(),this.dispatchManager.enable()}disable(){this.dispatchManager.disable(),this.pluginManager.disable(),this.eventCache.disable()}allowCookies(e){this.config.allowCookies=e}clearCookies(){const e=this.config.cookieAttributes;[kv,Dv,Fc,`${kv}_${this.applicationId}`,`${Dv}_${this.applicationId}`,`${Fc}_${this.applicationId}`].forEach(r=>Cme(r,e))}recordPageView(e){this.eventCache.recordPageView(e)}recordError(e){this.pluginManager.record("com.amazonaws.rum.js-error",e)}registerDomEvents(e){this.pluginManager.updatePlugin("com.amazonaws.rum.dom-event",e)}recordEvent(e,n,r){this.eventCache.recordEvent(e,n,r)}initDispatch(e,n){return new Sge(n,e,this.config.endpointUrl,this.eventCache,this.config)}initPluginManager(e,n){const r={applicationId:e,applicationVersion:n,config:this.config,record:this.eventCache.recordEvent,recordCandidate:this.eventCache.recordCandidate,recordPageView:this.eventCache.recordPageView,getSession:this.eventCache.getSession,eventBus:this.eventBus},s=new Eme(r);return this.config.disableAutoPageView||s.addPlugin(new Kme),this.config.eventPluginsToLoad.forEach(o=>{s.addPlugin(o)}),s}};var Ks;(function(t){t.Errors="errors",t.Performance="performance",t.Interaction="interaction",t.Http="http",t.Replay="replay"})(Ks||(Ks={}));var B4;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(B4||(B4={}));const XSe=t=>Object.assign(Object.assign({},tj(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class QSe extends ZSe{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},XSe(ej())),s)),be.info(`RUM client initialized for app: ${e}`),be.info(`Telemetries enabled: ${this.config.telemetries.join(", ")||"none"}`)}initDispatch(e,n){const r=super.initDispatch(e,n);return r.setSigningConfigFactory(Yge),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new dme(c,o).ChainAnonymousCredentialsProvider:new fme(c,o).ChainAnonymousCredentialsProvider}),this.config.signing&&this.config.identityPoolId&&r.setCognitoCredentials(this.config.identityPoolId,this.config.guestRoleArn),r}initPluginManager(e,n){const r=super.initPluginManager(e,n);return this.constructBuiltinPlugins().forEach(o=>{r.addPlugin(o)}),r}recordError(e){this.pluginManager.record(K7,e)}registerDomEvents(e){this.pluginManager.updatePlugin(G7,e)}constructBuiltinPlugins(){let e=[];const n=this.telemetryFunctor();return this.config.telemetries.forEach(r=>{typeof r=="string"&&n[r.toLowerCase()]?e=[...e,...n[r.toLowerCase()]({})]:Array.isArray(r)&&n[r[0].toLowerCase()]&&(e=[...e,...n[r[0].toLowerCase()](r[1])])}),e}telemetryFunctor(){return{[Ks.Errors]:e=>[new jme(e)],[Ks.Performance]:e=>[new qme(e),new Zme(e),new mve(e)],[Ks.Interaction]:e=>[new iR(e)],[Ks.Http]:e=>[new Eve(e),new yve(e)],[Ks.Replay]:e=>[new KSe(e)]}}}const nj={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},JSe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function rj(t){return t.replace(JSe,"[redacted]")}function eEe(t){const e=t.indexOf("?"),n=t.indexOf("#"),r=e===-1&&n===-1?t.length:e===-1?n:n===-1?e:Math.min(e,n);return rj(t.slice(0,r))}function tEe(t){const e=rj(t.message);if(e===t.message)return t;const n=new Error(e);return n.name=t.name,n.stack=t.stack,n}function nEe(t){return{recordPageView(e){t.recordPageView(eEe(e))},recordError(e,n){t.recordError(tEe(e)),n&&t.recordEvent("telemetry.error_context",n)},recordEvent(e,n){t.recordEvent(e,n??{})},recordTiming(e,n,r){t.recordEvent("telemetry.timing",{...r,name:e,durationMs:String(n)})}}}function j4(t){return t instanceof Error?t:new Error(String(t))}function rEe(t){window.addEventListener("error",e=>{t.recordError(j4(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(j4(e.reason))})}function sEe(){const{appMonitorId:t,identityPoolId:e,region:n}=Cy().rum;if(!t)return nj;const r=new QSe(t,"1.0.0",n,{sessionSampleRate:1,identityPoolId:e,endpoint:`https://dataplane.rum.${n}.amazonaws.com`,telemetries:["performance"],disableAutoPageView:!0,allowCookies:!1,enableXRay:!1}),s=nEe(r);return rEe(s),s}const sj=A.createContext(nj);function SAe(){return A.useContext(sj)}const lA="remit.theme",oEe="dark";function H4(){return typeof localStorage>"u"?"system":localStorage.getItem(lA)??"system"}function uA(t){if(typeof document>"u")return;const e=t==="dark"||t==="system"&&typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle(oEe,e)}function EAe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(lA):localStorage.setItem(lA,t)),uA(t)}const iEe=()=>{if(typeof window>"u"||(uA(H4()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{uA(H4())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},aEe=(t,e,n,r)=>{const s=[n,{code:e,...r||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);Ll(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},$4={},cA=(t,e,n,r)=>{Ll(n)&&$4[n]||(Ll(n)&&($4[n]=new Date),aEe(t,e,n,r))},oj=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},dA=(t,e,n)=>{t.loadNamespaces(e,oj(t,n))},q4=(t,e,n,r)=>{if(Ll(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return dA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,oj(t,r))},lEe=(t,e,n={})=>!e.languages||!e.languages.length?(cA(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(r,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,t))return!1}}),Ll=t=>typeof t=="string",uEe=t=>typeof t=="object"&&t!==null,cEe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,dEe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},fEe=t=>dEe[t],hEe=t=>t.replace(cEe,fEe);let fA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:hEe};const pEe=(t={})=>{fA={...fA,...t}},gEe=()=>fA;let ij;const mEe=t=>{ij=t},vEe=()=>ij,yEe={type:"3rdParty",init(t){pEe(t.options.react),mEe(t)}},bEe=A.createContext();class SEe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const EEe=(t,e)=>{const n=A.useRef();return A.useEffect(()=>{n.current=t},[t,e]),n.current},aj=(t,e,n,r)=>t.getFixedT(e,n,r),CEe=(t,e,n,r)=>A.useCallback(aj(t,e,n,r),[t,e,n,r]),wEe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=A.useContext(bEe)||{},o=n||r||vEe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new SEe),!o){cA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(O,I)=>Ll(I)?I:uEe(I)&&Ll(I.defaultValue)?I.defaultValue:Array.isArray(O)?O[O.length-1]:O,M=[R,{},!1];return M.t=R,M.i18n={},M.ready=!1,M}o.options.react?.wait&&cA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...gEe(),...o.options.react,...e},{useSuspense:u,keyPrefix:c}=a;let f=t||s||o.options?.defaultNS;f=Ll(f)?[f]:f||["translation"],o.reportNamespaces.addUsedNamespaces?.(f);const p=(o.isInitialized||o.initializedStoreOnce)&&f.every(R=>lEe(R,o,a)),g=CEe(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),m=()=>g,y=()=>aj(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),[S,E]=A.useState(m);let C=f.join();e.lng&&(C=`${e.lng}${C}`);const w=EEe(C),x=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;x.current=!0,!p&&!u&&(e.lng?q4(o,e.lng,f,()=>{x.current&&E(y)}):dA(o,f,()=>{x.current&&E(y)})),p&&w&&w!==C&&x.current&&E(y);const O=()=>{x.current&&E(y)};return R&&o?.on(R,O),M&&o?.store.on(M,O),()=>{x.current=!1,o&&R&&R?.split(" ").forEach(I=>o.off(I,O)),M&&o&&M.split(" ").forEach(I=>o.store.off(I,O))}},[o,C]),A.useEffect(()=>{x.current&&p&&E(m)},[o,c,p]);const T=[S,o,p];if(T.t=S,T.i18n=o,T.ready=p,p||!p&&!u)return T;throw new Promise(R=>{e.lng?q4(o,e.lng,f,()=>R()):dA(o,f,()=>R())})},_Ee=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),xEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),AEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),TEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),REe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),IEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),OEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),NEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),MEe=t=>(t.client??Ze).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),PEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),kEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),DEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),LEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),UEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),FEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),zEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),BEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),jEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),HEe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),CAe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),$Ee=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),qEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),WEe=t=>(t?.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),GEe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),VEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),KEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),YEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),ZEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),XEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),QEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),JEe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),eCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),tCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),nCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),rCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),sCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),oCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),iCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),aCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),wAe=t=>({mutationFn:async n=>{const{data:r}=await _Ee({...t,...n,throwOnError:!0});return r}}),fr=(t,e,n,r)=>{const s={_id:t,baseUrl:e?.baseUrl||(e?.client??Ze).getConfig().baseUrl};return e?.body&&(s.body=e.body),e?.headers&&(s.headers=e.headers),e?.path&&(s.path=e.path),e?.query&&(s.query=e.query),[s]},_Ae=t=>({mutationFn:async n=>{const{data:r}=await xEe({...t,...n,throwOnError:!0});return r}}),xAe=t=>({mutationFn:async n=>{const{data:r}=await AEe({...t,...n,throwOnError:!0});return r}}),AAe=t=>({mutationFn:async n=>{const{data:r}=await TEe({...t,...n,throwOnError:!0});return r}}),TAe=t=>({mutationFn:async n=>{const{data:r}=await REe({...t,...n,throwOnError:!0});return r}}),lCe=t=>fr("filterOperationsListFilters",t),RAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await IEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:lCe(t)}),IAe=t=>({mutationFn:async n=>{const{data:r}=await OEe({...t,...n,throwOnError:!0});return r}}),OAe=t=>({mutationFn:async n=>{const{data:r}=await NEe({...t,...n,throwOnError:!0});return r}}),NAe=t=>({mutationFn:async n=>{const{data:r}=await MEe({...t,...n,throwOnError:!0});return r}}),uCe=t=>fr("mailboxOperationsListMailboxes",t),MAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await PEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:uCe(t)}),PAe=t=>({mutationFn:async n=>{const{data:r}=await kEe({...t,...n,throwOnError:!0});return r}}),kAe=t=>({mutationFn:async n=>{const{data:r}=await DEe({...t,...n,throwOnError:!0});return r}}),DAe=t=>({mutationFn:async n=>{const{data:r}=await LEe({...t,...n,throwOnError:!0});return r}}),cCe=t=>fr("organizeJobDetailOperationsGetOrganizeJob",t),LAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await UEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:cCe(t)}),UAe=t=>({mutationFn:async n=>{const{data:r}=await FEe({...t,...n,throwOnError:!0});return r}}),dCe=t=>fr("syncOperationsGetSyncStatus",t),FAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await zEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:dCe(t)}),fCe=t=>fr("addressOperationsSearchAddresses",t),zAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await BEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:fCe(t)}),BAe=t=>({mutationFn:async n=>{const{data:r}=await jEe({...t,...n,throwOnError:!0});return r}}),hCe=t=>fr("configOperationsGetConfig",t),pCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await HEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:hCe(t)}),jAe=t=>fr("threadOperationsListThreads",t),gCe=t=>fr("threadOperationsSearchThreads",t),HAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await $Ee({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:gCe(t)}),$Ae=t=>({mutationFn:async n=>{const{data:r}=await qEe({...t,...n,throwOnError:!0});return r}}),qAe=t=>({mutationFn:async n=>{const{data:r}=await WEe({...t,...n,throwOnError:!0});return r}}),mCe=t=>fr("meOperationsListVipSuggestions",t),WAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await GEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:mCe(t)}),GAe=t=>({mutationFn:async n=>{const{data:r}=await VEe({...t,...n,throwOnError:!0});return r}}),VAe=t=>({mutationFn:async n=>{const{data:r}=await KEe({...t,...n,throwOnError:!0});return r}}),KAe=t=>({mutationFn:async n=>{const{data:r}=await YEe({...t,...n,throwOnError:!0});return r}}),vCe=t=>fr("messageOperationsDescribeMessage",t),YAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await ZEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:vCe(t)}),ZAe=t=>({mutationFn:async n=>{const{data:r}=await XEe({...t,...n,throwOnError:!0});return r}}),yCe=t=>fr("messageOperationsGetRawMessage",t),XAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await QEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:yCe(t)}),lj=t=>fr("outboxOperationsListOutboxMessages",t),QAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await JEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:lj(t)}),JAe=t=>({mutationFn:async n=>{const{data:r}=await eCe({...t,...n,throwOnError:!0});return r}}),eTe=t=>({mutationFn:async n=>{const{data:r}=await tCe({...t,...n,throwOnError:!0});return r}}),bCe=t=>fr("outboxDetailOperationsGetOutboxMessage",t),SCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await nCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:bCe(t)}),tTe=t=>({mutationFn:async n=>{const{data:r}=await rCe({...t,...n,throwOnError:!0});return r}}),nTe=t=>({mutationFn:async n=>{const{data:r}=await sCe({...t,...n,throwOnError:!0});return r}}),ECe=t=>fr("semanticSearchOperationsSemanticSearch",t),rTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await oCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:ECe(t)}),CCe=t=>fr("unifiedThreadOperationsListAllThreads",t),wCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await iCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:CCe(t)}),_Ce=t=>fr("threadDetailOperationsListThreadMessages",t),sTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await aCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:_Ce(t)}),uj=A.createContext(void 0),W4={isOpen:!1,mode:"new"},xCe=2e3,ACe=6e4,TCe=({children:t})=>{const[e,n]=A.useState(W4),[r,s]=A.useState(),o=A.useRef(0),a=BF(),{data:u}=gfe({...SCe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>ACe?!1:xCe}});A.useEffect(()=>{if(!u||!r)return;(u.status==="sent"||u.status==="failed"||u.status==="blocked")&&(s(void 0),a.invalidateQueries({queryKey:lj()}))},[u,r,a]);const c=A.useCallback(y=>{n({...y,isOpen:!0})},[]),f=A.useCallback(()=>{n(W4)},[]),p=A.useCallback(y=>{n(S=>({...S,outboxMessageId:y}))},[]),g=A.useCallback(y=>{o.current=Date.now(),s(y)},[]),m=A.useMemo(()=>({state:e,openCompose:c,closeCompose:f,setOutboxMessageId:p,startSendPolling:g}),[e,c,f,p,g]);return D.jsx(uj.Provider,{value:m,children:t})},oTe=()=>{const t=A.useContext(uj);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},v_=(...t)=>n8(Z6(t)),RCe={error:{container:"border-danger/50 bg-danger-soft",icon:"text-danger",title:"text-danger"},warning:{container:"border-warning/50 bg-warning-soft",icon:"text-warning",title:"text-warning"},info:{container:"border-accent-2/50 bg-accent-2-soft",icon:"text-accent-2",title:"text-accent-2"}},ICe={error:HZ,warning:YZ,info:GZ},OCe={error:"Error",warning:"Warning",info:"Information"},NCe=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=RCe[e],a=ICe[e];return D.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:v_("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",o.container),children:[D.jsx(a,{className:v_("size-5 shrink-0 mt-0.5",o.icon),"aria-hidden":"true"}),D.jsxs("div",{className:"flex-1 min-w-0",children:[D.jsx("p",{className:v_("text-sm font-medium",o.title),children:n}),r&&D.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r})]}),D.jsx("button",{type:"button",onClick:()=>s(t),className:"shrink-0 rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors","aria-label":`Dismiss ${OCe[e].toLowerCase()}`,children:D.jsx(ph,{className:"size-4","aria-hidden":"true"})})]})},MCe=({errors:t,onDismiss:e})=>t.length===0?null:D.jsx("section",{"aria-label":"Notifications",className:"pointer-events-none fixed inset-x-0 top-0 z-[60] flex flex-col items-center gap-2 px-4 pt-4 sm:items-end sm:pr-6",children:D.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:t.map(n=>D.jsx(NCe,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),G4=5,iTe=(t,e,n)=>({title:t,detail:cj(n)??e,error:n}),cj=t=>{if(t!=null){if(t instanceof Error)return t.message||void 0;if(typeof t=="string")return t||void 0;if(typeof t=="object"&&"message"in t&&typeof t.message=="string")return t.message||void 0}},aTe=t=>{const e=cj(t);return e?e.startsWith("Message not found"):!1},PCe=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,kCe=(t,e)=>{const r=[...t.filter(s=>!PCe(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=G4?r:r.slice(r.length-G4)},DCe=(t,e)=>t.filter(n=>n.id!==e),LCe=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),dj=A.createContext(void 0),UCe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,FCe=({children:t})=>{const[e,n]=A.useState([]),r=A.useCallback(u=>{if(u.error!=null&&U8(u.error))return zl(u.error).correlationId;const c=LCe(u,UCe(),Date.now());return n(f=>kCe(f,c)),c.id},[]),s=A.useCallback(u=>{n(c=>DCe(c,u))},[]),o=A.useCallback(()=>{n([])},[]),a=A.useMemo(()=>({errors:e,pushError:r,dismissError:s,clearAll:o}),[e,r,s,o]);return D.jsxs(dj.Provider,{value:a,children:[t,D.jsx(MCe,{errors:e,onDismiss:s})]})},lTe=()=>{const t=A.useContext(dj);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},zCe=({error:t,reset:e,info:n})=>{const r=Iy(t),s=zl(t,{recoverable:r,componentStack:n?.componentStack});return D.jsx(q8,{fatal:s,onRetry:r?e:void 0})},fp=$he()({component:jCe,errorComponent:zCe}),BCe=()=>{const{t}=wEe("common",{useSuspense:!1});return D.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:z-50 focus:p-4 focus:bg-canvas focus:text-fg focus:rounded-md",children:t("accessibility.skipToContent","Skip to main content")})};function jCe(){return D.jsxs(FCe,{children:[D.jsxs(TCe,{children:[D.jsx(BCe,{}),D.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:D.jsx(A.Suspense,{fallback:D.jsx(qA,{}),children:D.jsx(y7,{})})})]}),D.jsx($8,{})]})}const HCe=dr("/")({beforeLoad:()=>{throw QF({to:"/mail"})}});var Tt;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),a={};for(const u of o)a[u]=s[u];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},t.find=(s,o)=>{for(const a of s)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Tt||(Tt={}));var V4;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(V4||(V4={}));const Oe=Tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Sa=t=>{switch(typeof t){case"undefined":return Oe.undefined;case"string":return Oe.string;case"number":return Number.isNaN(t)?Oe.nan:Oe.number;case"boolean":return Oe.boolean;case"function":return Oe.function;case"bigint":return Oe.bigint;case"symbol":return Oe.symbol;case"object":return Array.isArray(t)?Oe.array:t===null?Oe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Oe.promise:typeof Map<"u"&&t instanceof Map?Oe.map:typeof Set<"u"&&t instanceof Set?Oe.set:typeof Date<"u"&&t instanceof Date?Oe.date:Oe.object;default:return Oe.unknown}},ge=Tt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class _i extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let u=r,c=0;for(;c<a.path.length;){const f=a.path[c];c===a.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(a))):u[f]=u[f]||{_errors:[]},u=u[f],c++}}};return s(this),r}static assert(e){if(!(e instanceof _i))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Tt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];n[o]=n[o]||[],n[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}_i.create=t=>new _i(t);const hA=(t,e)=>{let n;switch(t.code){case ge.invalid_type:t.received===Oe.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Tt.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${Tt.joinValues(t.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Tt.joinValues(t.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${Tt.joinValues(t.options)}, received '${t.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Tt.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ge.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ge.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=e.defaultError,Tt.assertNever(t)}return{message:n}};let $Ce=hA;function qCe(){return $Ce}const WCe=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,o=[...n,...s.path||[]],a={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let u="";const c=r.filter(f=>!!f).slice().reverse();for(const f of c)u=f(a,{data:e,defaultError:u}).message;return{...s,path:o,message:u}};function xe(t,e){const n=qCe(),r=WCe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===hA?void 0:hA].filter(s=>!!s)});t.common.issues.push(r)}class ls{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return Ke;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const o=await s.key,a=await s.value;r.push({key:o,value:a})}return ls.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:o,value:a}=s;if(o.status==="aborted"||a.status==="aborted")return Ke;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[o.value]=a.value)}return{status:e.value,value:r}}}const Ke=Object.freeze({status:"aborted"}),Xf=t=>({status:"dirty",value:t}),Ms=t=>({status:"valid",value:t}),K4=t=>t.status==="aborted",Y4=t=>t.status==="dirty",Gc=t=>t.status==="valid",ny=t=>typeof Promise<"u"&&t instanceof Promise;var Me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Me||(Me={}));class ja{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Z4=(t,e)=>{if(Gc(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new _i(t.common.issues);return this._error=n,this._error}}};function st(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,u)=>{const{message:c}=t;return a.code==="invalid_enum_value"?{message:c??u.defaultError}:typeof u.data>"u"?{message:c??r??u.defaultError}:a.code!=="invalid_type"?{message:u.defaultError}:{message:c??n??u.defaultError}},description:s}}class wt{get description(){return this._def.description}_getType(e){return Sa(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Sa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ls,ctx:{common:e.parent.common,data:e.data,parsedType:Sa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(ny(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Z4(r,s)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return Gc(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Gc(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)},s=this._parse({data:e,path:r.path,parent:r}),o=await(ny(s)?s:Promise.resolve(s));return Z4(r,o)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const a=e(s),u=()=>o.addIssue({code:ge.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new Yc({schema:this,typeName:Ye.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ma.create(this,this._def)}nullable(){return Zc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _o.create(this)}promise(){return iy.create(this,this._def)}or(e){return sy.create([this,e],this._def)}and(e){return oy.create(this,e,this._def)}transform(e){return new Yc({...st(this._def),schema:this,typeName:Ye.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new gA({...st(this._def),innerType:this,defaultValue:n,typeName:Ye.ZodDefault})}brand(){return new pwe({typeName:Ye.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new mA({...st(this._def),innerType:this,catchValue:n,typeName:Ye.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return BR.create(this,e)}readonly(){return vA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const GCe=/^c[^\s-]{8,}$/i,VCe=/^[0-9a-z]+$/,KCe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,YCe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ZCe=/^[a-z0-9_-]{21}$/i,XCe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,QCe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,JCe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ewe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let y_;const twe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nwe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rwe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,swe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,owe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,iwe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,fj="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",awe=new RegExp(`^${fj}$`);function hj(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function lwe(t){return new RegExp(`^${hj(t)}$`)}function uwe(t){let e=`${fj}T${hj(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function cwe(t,e){return!!((e==="v4"||!e)&&twe.test(t)||(e==="v6"||!e)&&rwe.test(t))}function dwe(t,e){if(!XCe.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function fwe(t,e){return!!((e==="v4"||!e)&&nwe.test(t)||(e==="v6"||!e)&&swe.test(t))}class hi extends wt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Oe.string){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_type,expected:Oe.string,received:o.parsedType}),Ke}const r=new ls;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=e.data.length>o.value,u=e.data.length<o.value;(a||u)&&(s=this._getOrReturnCtx(e,s),a?xe(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&xe(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")JCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"email",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")y_||(y_=new RegExp(ewe,"u")),y_.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"emoji",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")YCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"uuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")ZCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"nanoid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")GCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"cuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")VCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"cuid2",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")KCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"ulid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),xe(s,{validation:"url",code:ge.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"regex",code:ge.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?uwe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?awe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?lwe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?QCe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?cwe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"ip",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?dwe(e.data,o.alg)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"jwt",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?fwe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"cidr",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?owe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?iwe.test(e.data)||(s=this._getOrReturnCtx(e,s),xe(s,{validation:"base64url",code:ge.invalid_string,message:o.message}),r.dirty()):Tt.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:ge.invalid_string,...Me.errToObj(r)})}_addCheck(e){return new hi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Me.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Me.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Me.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Me.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Me.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Me.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Me.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Me.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Me.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Me.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Me.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Me.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Me.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Me.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Me.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Me.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Me.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Me.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Me.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Me.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Me.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Me.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Me.errToObj(n)})}nonempty(e){return this.min(1,Me.errToObj(e))}trim(){return new hi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new hi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new hi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}hi.create=t=>new hi({checks:[],typeName:Ye.ZodString,coerce:t?.coerce??!1,...st(t)});function hwe(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,o=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return o%a/10**s}class Vl extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Oe.number){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_type,expected:Oe.number,received:o.parsedType}),Ke}let r;const s=new ls;for(const o of this._def.checks)o.kind==="int"?Tt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?hwe(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.not_finite,message:o.message}),s.dirty()):Tt.assertNever(o);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Me.toString(n))}setLimit(e,n,r,s){return new Vl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Vl({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Me.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Me.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Me.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Me.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Me.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Tt.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Vl.create=t=>new Vl({checks:[],typeName:Ye.ZodNumber,coerce:t?.coerce||!1,...st(t)});class Kl extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Oe.bigint)return this._getInvalidInput(e);let r;const s=new ls;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),xe(r,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Tt.assertNever(o);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return xe(n,{code:ge.invalid_type,expected:Oe.bigint,received:n.parsedType}),Ke}gte(e,n){return this.setLimit("min",e,!0,Me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Me.toString(n))}setLimit(e,n,r,s){return new Kl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Kl({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Me.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Kl.create=t=>new Kl({checks:[],typeName:Ye.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class ry extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Oe.boolean){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.boolean,received:r.parsedType}),Ke}return Ms(e.data)}}ry.create=t=>new ry({typeName:Ye.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class Vc extends wt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Oe.date){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_type,expected:Oe.date,received:o.parsedType}),Ke}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return xe(o,{code:ge.invalid_date}),Ke}const r=new ls;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(s=this._getOrReturnCtx(e,s),xe(s,{code:ge.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Tt.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Vc({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Me.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Me.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Vc.create=t=>new Vc({checks:[],coerce:t?.coerce||!1,typeName:Ye.ZodDate,...st(t)});class X4 extends wt{_parse(e){if(this._getType(e)!==Oe.symbol){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.symbol,received:r.parsedType}),Ke}return Ms(e.data)}}X4.create=t=>new X4({typeName:Ye.ZodSymbol,...st(t)});class Q4 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.undefined,received:r.parsedType}),Ke}return Ms(e.data)}}Q4.create=t=>new Q4({typeName:Ye.ZodUndefined,...st(t)});class J4 extends wt{_parse(e){if(this._getType(e)!==Oe.null){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.null,received:r.parsedType}),Ke}return Ms(e.data)}}J4.create=t=>new J4({typeName:Ye.ZodNull,...st(t)});class e5 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}e5.create=t=>new e5({typeName:Ye.ZodAny,...st(t)});class t5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}t5.create=t=>new t5({typeName:Ye.ZodUnknown,...st(t)});class Ha extends wt{_parse(e){const n=this._getOrReturnCtx(e);return xe(n,{code:ge.invalid_type,expected:Oe.never,received:n.parsedType}),Ke}}Ha.create=t=>new Ha({typeName:Ye.ZodNever,...st(t)});class n5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.void,received:r.parsedType}),Ke}return Ms(e.data)}}n5.create=t=>new n5({typeName:Ye.ZodVoid,...st(t)});class _o extends wt{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==Oe.array)return xe(n,{code:ge.invalid_type,expected:Oe.array,received:n.parsedType}),Ke;if(s.exactLength!==null){const a=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(a||u)&&(xe(n,{code:a?ge.too_big:ge.too_small,minimum:u?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(xe(n,{code:ge.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(xe(n,{code:ge.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,u)=>s.type._parseAsync(new ja(n,a,n.path,u)))).then(a=>ls.mergeArray(r,a));const o=[...n.data].map((a,u)=>s.type._parseSync(new ja(n,a,n.path,u)));return ls.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new _o({...this._def,minLength:{value:e,message:Me.toString(n)}})}max(e,n){return new _o({...this._def,maxLength:{value:e,message:Me.toString(n)}})}length(e,n){return new _o({...this._def,exactLength:{value:e,message:Me.toString(n)}})}nonempty(e){return this.min(1,e)}}_o.create=(t,e)=>new _o({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ye.ZodArray,...st(e)});function mc(t){if(t instanceof xn){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Ma.create(mc(r))}return new xn({...t._def,shape:()=>e})}else return t instanceof _o?new _o({...t._def,type:mc(t.element)}):t instanceof Ma?Ma.create(mc(t.unwrap())):t instanceof Zc?Zc.create(mc(t.unwrap())):t instanceof Yl?Yl.create(t.items.map(e=>mc(e))):t}class xn extends wt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Tt.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Oe.object){const f=this._getOrReturnCtx(e);return xe(f,{code:ge.invalid_type,expected:Oe.object,received:f.parsedType}),Ke}const{status:r,ctx:s}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof Ha&&this._def.unknownKeys==="strip"))for(const f in s.data)a.includes(f)||u.push(f);const c=[];for(const f of a){const p=o[f],g=s.data[f];c.push({key:{status:"valid",value:f},value:p._parse(new ja(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Ha){const f=this._def.unknownKeys;if(f==="passthrough")for(const p of u)c.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(f==="strict")u.length>0&&(xe(s,{code:ge.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const p of u){const g=s.data[p];c.push({key:{status:"valid",value:p},value:f._parse(new ja(s,g,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const p of c){const g=await p.key,m=await p.value;f.push({key:g,value:m,alwaysSet:p.alwaysSet})}return f}).then(f=>ls.mergeObjectSync(r,f)):ls.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return Me.errToObj,new xn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Me.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new xn({...this._def,unknownKeys:"strip"})}passthrough(){return new xn({...this._def,unknownKeys:"passthrough"})}extend(e){return new xn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new xn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ye.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new xn({...this._def,catchall:e})}pick(e){const n={};for(const r of Tt.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new xn({...this._def,shape:()=>n})}omit(e){const n={};for(const r of Tt.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new xn({...this._def,shape:()=>n})}deepPartial(){return mc(this)}partial(e){const n={};for(const r of Tt.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new xn({...this._def,shape:()=>n})}required(e){const n={};for(const r of Tt.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Ma;)o=o._def.innerType;n[r]=o}return new xn({...this._def,shape:()=>n})}keyof(){return pj(Tt.objectKeys(this.shape))}}xn.create=(t,e)=>new xn({shape:()=>t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});xn.strictCreate=(t,e)=>new xn({shape:()=>t,unknownKeys:"strict",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});xn.lazycreate=(t,e)=>new xn({shape:t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});class sy extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const a=o.map(u=>new _i(u.ctx.common.issues));return xe(n,{code:ge.invalid_union,unionErrors:a}),Ke}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let o;const a=[];for(const c of r){const f={...n,common:{...n.common,issues:[]},parent:null},p=c._parseSync({data:n.data,path:n.path,parent:f});if(p.status==="valid")return p;p.status==="dirty"&&!o&&(o={result:p,ctx:f}),f.common.issues.length&&a.push(f.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=a.map(c=>new _i(c));return xe(n,{code:ge.invalid_union,unionErrors:u}),Ke}}get options(){return this._def.options}}sy.create=(t,e)=>new sy({options:t,typeName:Ye.ZodUnion,...st(e)});function pA(t,e){const n=Sa(t),r=Sa(e);if(t===e)return{valid:!0,data:t};if(n===Oe.object&&r===Oe.object){const s=Tt.objectKeys(e),o=Tt.objectKeys(t).filter(u=>s.indexOf(u)!==-1),a={...t,...e};for(const u of o){const c=pA(t[u],e[u]);if(!c.valid)return{valid:!1};a[u]=c.data}return{valid:!0,data:a}}else if(n===Oe.array&&r===Oe.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const a=t[o],u=e[o],c=pA(a,u);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===Oe.date&&r===Oe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class oy extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(K4(o)||K4(a))return Ke;const u=pA(o.value,a.value);return u.valid?((Y4(o)||Y4(a))&&n.dirty(),{status:n.value,value:u.data}):(xe(r,{code:ge.invalid_intersection_types}),Ke)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>s(o,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}oy.create=(t,e,n)=>new oy({left:t,right:e,typeName:Ye.ZodIntersection,...st(n)});class Yl extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.array)return xe(r,{code:ge.invalid_type,expected:Oe.array,received:r.parsedType}),Ke;if(r.data.length<this._def.items.length)return xe(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ke;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,u)=>{const c=this._def.items[u]||this._def.rest;return c?c._parse(new ja(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>ls.mergeArray(n,a)):ls.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new Yl({...this._def,rest:e})}}Yl.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yl({items:t,typeName:Ye.ZodTuple,rest:null,...st(e)})};class r5 extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.map)return xe(r,{code:ge.invalid_type,expected:Oe.map,received:r.parsedType}),Ke;const s=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,c],f)=>({key:s._parse(new ja(r,u,r.path,[f,"key"])),value:o._parse(new ja(r,c,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const c of a){const f=await c.key,p=await c.value;if(f.status==="aborted"||p.status==="aborted")return Ke;(f.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(f.value,p.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const c of a){const f=c.key,p=c.value;if(f.status==="aborted"||p.status==="aborted")return Ke;(f.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(f.value,p.value)}return{status:n.value,value:u}}}}r5.create=(t,e,n)=>new r5({valueType:e,keyType:t,typeName:Ye.ZodMap,...st(n)});class Hh extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.set)return xe(r,{code:ge.invalid_type,expected:Oe.set,received:r.parsedType}),Ke;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(xe(r,{code:ge.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(xe(r,{code:ge.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function a(c){const f=new Set;for(const p of c){if(p.status==="aborted")return Ke;p.status==="dirty"&&n.dirty(),f.add(p.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((c,f)=>o._parse(new ja(r,c,r.path,f)));return r.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(e,n){return new Hh({...this._def,minSize:{value:e,message:Me.toString(n)}})}max(e,n){return new Hh({...this._def,maxSize:{value:e,message:Me.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Hh.create=(t,e)=>new Hh({valueType:t,minSize:null,maxSize:null,typeName:Ye.ZodSet,...st(e)});class s5 extends wt{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}s5.create=(t,e)=>new s5({getter:t,typeName:Ye.ZodLazy,...st(e)});class o5 extends wt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return xe(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Ke}return{status:"valid",value:e.data}}get value(){return this._def.value}}o5.create=(t,e)=>new o5({value:t,typeName:Ye.ZodLiteral,...st(e)});function pj(t,e){return new Kc({values:t,typeName:Ye.ZodEnum,...st(e)})}class Kc extends wt{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return xe(n,{expected:Tt.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Ke}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return xe(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Ke}return Ms(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Kc.create(e,{...this._def,...n})}exclude(e,n=this._def){return Kc.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Kc.create=pj;class i5 extends wt{_parse(e){const n=Tt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Oe.string&&r.parsedType!==Oe.number){const s=Tt.objectValues(n);return xe(r,{expected:Tt.joinValues(s),received:r.parsedType,code:ge.invalid_type}),Ke}if(this._cache||(this._cache=new Set(Tt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=Tt.objectValues(n);return xe(r,{received:r.data,code:ge.invalid_enum_value,options:s}),Ke}return Ms(e.data)}get enum(){return this._def.values}}i5.create=(t,e)=>new i5({values:t,typeName:Ye.ZodNativeEnum,...st(e)});class iy extends wt{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Oe.promise&&n.common.async===!1)return xe(n,{code:ge.invalid_type,expected:Oe.promise,received:n.parsedType}),Ke;const r=n.parsedType===Oe.promise?n.data:Promise.resolve(n.data);return Ms(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}iy.create=(t,e)=>new iy({type:t,typeName:Ye.ZodPromise,...st(e)});class Yc extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,o={addIssue:a=>{xe(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const a=s.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async u=>{if(n.value==="aborted")return Ke;const c=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return c.status==="aborted"?Ke:c.status==="dirty"||n.value==="dirty"?Xf(c.value):c});{if(n.value==="aborted")return Ke;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?Ke:u.status==="dirty"||n.value==="dirty"?Xf(u.value):u}}if(s.type==="refinement"){const a=u=>{const c=s.refinement(u,o);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Ke:(u.status==="dirty"&&n.dirty(),a(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Ke:(u.status==="dirty"&&n.dirty(),a(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Gc(a))return Ke;const u=s.transform(a.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Gc(a)?Promise.resolve(s.transform(a.value,o)).then(u=>({status:n.value,value:u})):Ke);Tt.assertNever(s)}}Yc.create=(t,e,n)=>new Yc({schema:t,typeName:Ye.ZodEffects,effect:e,...st(n)});Yc.createWithPreprocess=(t,e,n)=>new Yc({schema:e,effect:{type:"preprocess",transform:t},typeName:Ye.ZodEffects,...st(n)});class Ma extends wt{_parse(e){return this._getType(e)===Oe.undefined?Ms(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ma.create=(t,e)=>new Ma({innerType:t,typeName:Ye.ZodOptional,...st(e)});class Zc extends wt{_parse(e){return this._getType(e)===Oe.null?Ms(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Zc.create=(t,e)=>new Zc({innerType:t,typeName:Ye.ZodNullable,...st(e)});class gA extends wt{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Oe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}gA.create=(t,e)=>new gA({innerType:t,typeName:Ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class mA extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ny(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}mA.create=(t,e)=>new mA({innerType:t,typeName:Ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class a5 extends wt{_parse(e){if(this._getType(e)!==Oe.nan){const r=this._getOrReturnCtx(e);return xe(r,{code:ge.invalid_type,expected:Oe.nan,received:r.parsedType}),Ke}return{status:"valid",value:e.data}}}a5.create=t=>new a5({typeName:Ye.ZodNaN,...st(t)});class pwe extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class BR extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ke:o.status==="dirty"?(n.dirty(),Xf(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ke:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new BR({in:e,out:n,typeName:Ye.ZodPipeline})}}class vA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Gc(s)&&(s.value=Object.freeze(s.value)),s);return ny(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}vA.create=(t,e)=>new vA({innerType:t,typeName:Ye.ZodReadonly,...st(e)});var Ye;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ye||(Ye={}));const Cr=hi.create;Vl.create;Kl.create;const gwe=ry.create;Vc.create;Ha.create;_o.create;const fd=xn.create;sy.create;oy.create;Yl.create;Kc.create;iy.create;Ma.create;Zc.create;const uTe={string:(t=>hi.create({...t,coerce:!0})),number:(t=>Vl.create({...t,coerce:!0})),boolean:(t=>ry.create({...t,coerce:!0})),bigint:(t=>Kl.create({...t,coerce:!0})),date:(t=>Vc.create({...t,coerce:!0}))},mwe=Cy().apiUrl;Ze.setConfig({baseUrl:mwe,fetch:G6});Ze.interceptors.error.use((t,e)=>{if(t instanceof j_||!e)return t;const n=t,r=n&&typeof n=="object"&&"message"in n?String(n.message):`Request failed with status ${e.status}`;return new j_(r,e.status,n)});const vwe=A.createContext(null),cTe=()=>A.useContext(vwe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},ywe=()=>qn(()=>import("./mail-BCdH9Bze.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])),bwe=fd({q:Cr().optional()}),Swe=dr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery(pCe()),t.prefetchQuery({...wCe(),staleTime:6e4})},component:sr(ywe,"component"),validateSearch:bwe}),Ewe=()=>qn(()=>import("./onboarding-Ds_XXr1k.js"),__vite__mapDeps([15,16,4,13,9,7])),Cwe=dr("/onboarding")({component:sr(Ewe,"component")}),wwe=()=>qn(()=>import("./settings-CTg0UWtn.js"),[]),dTe=[{id:"accounts",label:"Accounts",icon:D.jsx(WZ,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:D.jsx(ZZ,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:D.jsx(qZ,{className:"size-4"})},{id:"filters",label:"Filters",icon:D.jsx($Z,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:D.jsx(KZ,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:D.jsx(XZ,{className:"size-4"})}],fTe={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},_we=dr("/settings")({component:sr(wwe,"component")}),xwe=()=>qn(()=>import("./index-DwWGNIuo.js"),__vite__mapDeps([17,11])),Awe=()=>qn(()=>import("./index-DtqBFgK5.js"),[]),Twe=fd({selectedMessageId:Cr().optional(),selectedThreadId:Cr().optional(),selectedMailboxId:Cr().optional(),q:Cr().optional()}),Rwe=dr("/mail/")({component:sr(Awe,"component"),validateSearch:Twe,errorComponent:sr(xwe,"errorComponent")}),Iwe=()=>qn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),Owe=fd({selectedMessageId:Cr().optional(),selectedThreadId:Cr().optional(),q:Cr().optional()}),Nwe=dr("/mail/$mailboxId")({component:sr(Iwe,"component"),validateSearch:Owe}),Mwe=()=>qn(()=>import("./flagged-Bn7CP0uC.js"),__vite__mapDeps([18,11])),Pwe=()=>qn(()=>import("./flagged-DtqBFgK5.js"),[]),kwe=fd({selectedMessageId:Cr().optional(),q:Cr().optional()}),Dwe=dr("/mail/flagged")({component:sr(Pwe,"component"),validateSearch:kwe,errorComponent:sr(Mwe,"errorComponent")}),Lwe=()=>qn(()=>import("./outbox-DtqBFgK5.js"),[]),Uwe=fd({selectedOutboxMessageId:Cr().optional(),q:Cr().optional()}),Fwe=dr("/mail/outbox")({component:sr(Lwe,"component"),validateSearch:Uwe}),zwe=()=>qn(()=>import("./index-DF5meFXr.js"),[]),Bwe=dr("/settings/")({component:sr(zwe,"component")}),jwe=()=>qn(()=>import("./accounts-3D7A9nyk.js"),__vite__mapDeps([19,10,7,9,20,3,16,4,13,11,12,6])),Hwe=fd({editAccountId:Cr().optional(),focusSmtp:gwe().optional(),connected:Cr().optional(),oauthError:Cr().optional()}),$we=dr("/settings/accounts")({component:sr(jwe,"component"),validateSearch:Hwe}),qwe=()=>qn(()=>import("./advanced-ZqR5aCEa.js"),__vite__mapDeps([21,20,3])),Wwe=dr("/settings/advanced")({component:sr(qwe,"component")}),Gwe=()=>qn(()=>import("./appearance-AI1e1Xdm.js"),__vite__mapDeps([22,20,3])),Vwe=dr("/settings/appearance")({component:sr(Gwe,"component")}),Kwe=()=>qn(()=>import("./filters-BWxQFzdU.js"),__vite__mapDeps([23,20,3,14,9,6,11,1])),Ywe=dr("/settings/filters")({component:sr(Kwe,"component")}),Zwe=()=>qn(()=>import("./folders-BDlhjZZJ.js"),__vite__mapDeps([24,8,6,5,13,20,3,9,11,1])),Xwe=dr("/settings/folders")({component:sr(Zwe,"component")}),Qwe=()=>qn(()=>import("./senders-C46h-jmb.js"),__vite__mapDeps([25,4,20,3,9,11,2,12,5])),Jwe=dr("/settings/senders")({component:sr(Qwe,"component")}),e_e=()=>qn(()=>import("./suggested-vips-D0-wKfXg.js"),[]),t_e=dr("/settings/suggested-vips")({component:sr(e_e,"component")}),n_e=HCe.update({id:"/",path:"/",getParentRoute:()=>fp}),hp=Swe.update({id:"/mail",path:"/mail",getParentRoute:()=>fp}),r_e=Cwe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>fp}),Ni=_we.update({id:"/settings",path:"/settings",getParentRoute:()=>fp}),s_e=Rwe.update({id:"/",path:"/",getParentRoute:()=>hp}),o_e=Nwe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>hp}),i_e=Dwe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>hp}),a_e=Fwe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>hp}),l_e=Bwe.update({id:"/",path:"/",getParentRoute:()=>Ni}),u_e=$we.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Ni}),c_e=Wwe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Ni}),d_e=Vwe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Ni}),f_e=Ywe.update({id:"/filters",path:"/filters",getParentRoute:()=>Ni}),h_e=Xwe.update({id:"/folders",path:"/folders",getParentRoute:()=>Ni}),p_e=Jwe.update({id:"/senders",path:"/senders",getParentRoute:()=>Ni}),g_e=t_e.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Ni}),m_e={MailMailboxIdRoute:o_e,MailFlaggedRoute:i_e,MailOutboxRoute:a_e,MailIndexRoute:s_e},v_e=hp._addFileChildren(m_e),y_e={SettingsAccountsRoute:u_e,SettingsAdvancedRoute:c_e,SettingsAppearanceRoute:d_e,SettingsFiltersRoute:f_e,SettingsFoldersRoute:h_e,SettingsSendersRoute:p_e,SettingsSuggestedVipsRoute:g_e,SettingsIndexRoute:l_e},b_e=Ni._addFileChildren(y_e),S_e={IndexRoute:n_e,MailRoute:v_e,OnboardingRoute:r_e,SettingsRoute:b_e},E_e=fp._addFileChildren(S_e)._addFileTypes(),C_e=(t,e)=>{const n=ope({routeTree:E_e,context:{queryClient:t},defaultPreload:"intent"});return n.subscribe("onResolved",r=>{e.recordPageView(r.toLocation.pathname)}),n},qe=t=>typeof t=="string",Lf=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},l5=t=>t==null?"":""+t,w_e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},__e=/###/g,u5=t=>t&&t.indexOf("###")>-1?t.replace(__e,"."):t,c5=t=>!t||qe(t),dh=(t,e,n)=>{const r=qe(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(c5(t))return{};const o=u5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return c5(t)?{}:{obj:t,k:u5(r[s])}},d5=(t,e,n)=>{const{obj:r,k:s}=dh(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let o=e[e.length-1],a=e.slice(0,e.length-1),u=dh(t,a,Object);for(;u.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),u=dh(t,a,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},x_e=(t,e,n,r)=>{const{obj:s,k:o}=dh(t,e,Object);s[o]=s[o]||[],s[o].push(n)},ay=(t,e)=>{const{obj:n,k:r}=dh(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},A_e=(t,e,n)=>{const r=ay(t,n);return r!==void 0?r:ay(e,n)},gj=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?qe(t[r])||t[r]instanceof String||qe(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):gj(t[r],e[r],n):t[r]=e[r]);return t},oc=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var T_e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const R_e=t=>qe(t)?t.replace(/[&<>"'\/]/g,e=>T_e[e]):t;class I_e{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const O_e=[" ",",","?","!",";"],N_e=new I_e(20),M_e=(t,e,n)=>{e=e||"",n=n||"";const r=O_e.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=N_e.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!s.test(t);if(!o){const a=t.indexOf(n);a>0&&!s.test(t.substring(0,a))&&(o=!0)}return o},yA=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let s=t;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let a,u="";for(let c=o;c<r.length;++c)if(c!==o&&(u+=n),u+=r[c],a=s[u],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;o+=c-o+1;break}s=a}return s},ly=t=>t?.replace("_","-"),P_e={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class uy{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||P_e,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,s){return s&&!this.debug?null:(qe(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new uy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new uy(this.logger,e)}}var wo=new uy;class Ab{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[u,c]=a;for(let f=0;f<c;f++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[u,c]=a;for(let f=0;f<c;f++)u.apply(u,[e,...r])})}}class f5 extends Ab{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;e.indexOf(".")>-1?u=e.split("."):(u=[e,n],r&&(Array.isArray(r)?u.push(...r):qe(r)&&o?u.push(...r.split(o)):u.push(r)));const c=ay(this.data,u);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=u[0],n=u[1],r=u.slice(2).join(".")),c||!a||!qe(r)?c:yA(this.data?.[e]?.[n],r,o)}addResource(e,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let u=[e,n];r&&(u=u.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(u=e.split("."),s=n,n=u[1]),this.addNamespaces(n),d5(this.data,u,s),o.silent||this.emit("added",e,n,r,s)}addResources(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(qe(r[o])||Array.isArray(r[o]))&&this.addResource(e,n,o,r[o],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[e,n];e.indexOf(".")>-1&&(u=e.split("."),s=r,r=n,n=u[1]),this.addNamespaces(n);let c=ay(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?gj(c,r,o):c={...c,...r},d5(this.data,u,c),a.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var mj={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(o=>{e=this.processors[o]?.process(e,n,r,s)??e}),e}};const h5={},p5=t=>!qe(t)&&typeof t!="boolean"&&typeof t!="number";class cy extends Ab{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),w_e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wo.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return e==null?!1:this.resolve(e,n)?.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!M_e(e,r,s);if(a&&!u){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:qe(o)?[o]:o};const f=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(f[0])>-1)&&(o=f.shift()),e=f.join(s)}return{key:e,namespaces:qe(o)?[o]:o}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(e[e.length-1],n),c=u[u.length-1],f=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(p){const F=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${F}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${F}${a}`}return s?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const g=this.resolve(e,n);let m=g?.res;const y=g?.usedKey||a,S=g?.exactUsedKey||a,E=["[object Number]","[object Function]","[object RegExp]"],C=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,x=n.count!==void 0&&!qe(n.count),T=cy.hasDefaultValue(n),R=x?this.pluralResolver.getSuffix(f,n.count,n):"",M=n.ordinal&&x?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",O=x&&!n.ordinal&&n.count===0,I=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${M}`]||n.defaultValue;let P=m;w&&!m&&T&&(P=I);const k=p5(P),H=Object.prototype.toString.apply(P);if(w&&P&&k&&E.indexOf(H)<0&&!(qe(C)&&Array.isArray(P))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,P,{...n,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(g.res=F,g.usedParams=this.getUsedParamsDetails(n),g):F}if(o){const F=Array.isArray(P),B=F?[]:{},W=F?S:y;for(const Y in P)if(Object.prototype.hasOwnProperty.call(P,Y)){const ne=`${W}${o}${Y}`;T&&!m?B[Y]=this.translate(ne,{...n,defaultValue:p5(I)?I[Y]:void 0,joinArrays:!1,ns:u}):B[Y]=this.translate(ne,{...n,joinArrays:!1,ns:u}),B[Y]===ne&&(B[Y]=P[Y])}m=B}}else if(w&&qe(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,e,n,r));else{let F=!1,B=!1;!this.isValidLookup(m)&&T&&(F=!0,m=I),this.isValidLookup(m)||(B=!0,m=a);const Y=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:m,ne=T&&I!==m&&this.options.updateMissing;if(B||F||ne){if(this.logger.log(ne?"updateKey":"missingKey",f,c,a,ne?I:m),o){const de=this.resolve(a,{...n,keySeparator:!1});de&&de.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let de=0;de<ee.length;de++)$.push(ee[de]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(n.lng||this.language):$.push(n.lng||this.language);const fe=(de,Ae,L)=>{const V=T&&L!==m?L:Y;this.options.missingKeyHandler?this.options.missingKeyHandler(de,c,Ae,V,ne,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(de,c,Ae,V,ne,n),this.emit("missingKey",de,c,Ae,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?$.forEach(de=>{const Ae=this.pluralResolver.getSuffixes(de,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ae.push(`${this.options.pluralSeparator}zero`),Ae.forEach(L=>{fe([de],a+L,n[`defaultValue${L}`]||I)})}):fe($,a,I))}m=this.extendTranslation(m,e,n,g,r),B&&m===a&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${a}`),(B||F)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,F?m:void 0))}return s?(g.res=m,g.usedParams=this.getUsedParamsDetails(n),g):m}extendTranslation(e,n,r,s,o){var a=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=qe(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(f){const m=e.match(this.interpolator.nestingRegexp);p=m&&m.length}let g=r.replace&&!qe(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),e=this.interpolator.interpolate(e,g,r.lng||this.language||s.usedLng,r),f){const m=e.match(this.interpolator.nestingRegexp),y=m&&m.length;p<y&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var m=arguments.length,y=new Array(m),S=0;S<m;S++)y[S]=arguments[S];return o?.[0]===y[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):a.translate(...y,n)},r)),r.interpolation&&this.interpolator.reset()}const u=r.postProcess||this.options.postProcess,c=qe(u)?[u]:u;return e!=null&&c?.length&&r.applyPostProcessor!==!1&&(e=mj.handle(c,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,a,u;return qe(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(c,n),p=f.key;s=p;let g=f.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const m=n.count!==void 0&&!qe(n.count),y=m&&!n.ordinal&&n.count===0,S=n.context!==void 0&&(qe(n.context)||typeof n.context=="number")&&n.context!=="",E=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);g.forEach(C=>{this.isValidLookup(r)||(u=C,!h5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(h5[`${E[0]}-${C}`]=!0,this.logger.warn(`key "${s}" for languages "${E.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[p];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,p,w,C,n);else{let R;m&&(R=this.pluralResolver.getSuffix(w,n.count,n));const M=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(x.push(p+R),n.ordinal&&R.indexOf(O)===0&&x.push(p+R.replace(O,this.options.pluralSeparator)),y&&x.push(p+M)),S){const I=`${p}${this.options.contextSeparator}${n.context}`;x.push(I),m&&(x.push(I+R),n.ordinal&&R.indexOf(O)===0&&x.push(I+R.replace(O,this.options.pluralSeparator)),y&&x.push(I+M))}}let T;for(;T=x.pop();)this.isValidLookup(r)||(o=T,r=this.getResource(w,C,T,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:a,usedNS:u}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!qe(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class g5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(e){if(e=ly(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=ly(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(qe(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),qe(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),s=[],o=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return qe(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):qe(e)&&o(this.formatLanguageCode(e)),r.forEach(a=>{s.indexOf(a)<0&&o(this.formatLanguageCode(a))}),s}}const m5={zero:0,one:1,two:2,few:3,many:4,other:5},v5={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class k_e{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=wo.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=ly(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),v5;if(!e.match(/-|_/))return v5;const c=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(c,n)}return this.pluralRulesCache[o]=a,a}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,o)=>m5[s]-m5[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const y5=function(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=A_e(t,e,n);return!o&&s&&qe(n)&&(o=yA(t,n,r),o===void 0&&(o=yA(e,n,r))),o},b_=t=>t.replace(/\$/g,"$$$$");class D_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:a,suffix:u,suffixEscaped:c,formatSeparator:f,unescapeSuffix:p,unescapePrefix:g,nestingPrefix:m,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:E,nestingOptionsSeparator:C,maxReplaces:w,alwaysFormat:x}=e.interpolation;this.escape=n!==void 0?n:R_e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?oc(o):a||"{{",this.suffix=u?oc(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=p?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=m?oc(m):y||oc("$t("),this.nestingSuffix=S?oc(S):E||oc(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,r,s){let o,a,u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=y=>{if(y.indexOf(this.formatSeparator)<0){const w=y5(n,c,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...s,...n,interpolationkey:y}):w}const S=y.split(this.formatSeparator),E=S.shift().trim(),C=S.join(this.formatSeparator).trim();return this.format(y5(n,c,E,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...s,...n,interpolationkey:E})};this.resetRegExp();const p=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>b_(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?b_(this.escape(y)):b_(y)}].forEach(y=>{for(u=0;o=y.regex.exec(e);){const S=o[1].trim();if(a=f(S),a===void 0)if(typeof p=="function"){const C=p(e,o,s);a=qe(C)?C:""}else if(s&&Object.prototype.hasOwnProperty.call(s,S))a="";else if(g){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${e}`),a="";else!qe(a)&&!this.useRawValueToEscape&&(a=l5(a));const E=y.safeValue(a);if(e=e.replace(o[0],E),g?(y.regex.lastIndex+=a.length,y.regex.lastIndex-=o[0].length):y.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,a;const u=(c,f)=>{const p=this.nestingOptionsSeparator;if(c.indexOf(p)<0)return c;const g=c.split(new RegExp(`${p}[ ]*{`));let m=`{${g[1]}`;c=g[0],m=this.interpolate(m,a);const y=m.match(/'/g),S=m.match(/"/g);((y?.length??0)%2===0&&!S||S.length%2!==0)&&(m=m.replace(/'/g,'"'));try{a=JSON.parse(m),f&&(a={...f,...a})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,E),`${c}${p}${m}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];a={...r},a=a.replace&&!qe(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let f=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const p=s[1].split(this.formatSeparator).map(g=>g.trim());s[1]=p.shift(),c=p,f=!0}if(o=n(u.call(this,s[1].trim(),a),a),o&&s[0]===e&&!qe(o))return o;qe(o)||(o=l5(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),f&&(o=c.reduce((p,g)=>this.format(p,g,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const L_e=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(a=>{if(a){const[u,...c]=a.split(":"),f=c.join(":").trim().replace(/^'+|'+$/g,""),p=u.trim();n[p]||(n[p]=f),f==="false"&&(n[p]=!1),f==="true"&&(n[p]=!0),isNaN(f)||(n[p]=parseInt(f,10))}})}return{formatName:e,formatOptions:n}},ic=t=>{const e={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const a=r+JSON.stringify(o);let u=e[a];return u||(u=t(ly(r),s),e[a]=u),u(n)}};class U_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("formatter"),this.options=e,this.formats={number:ic((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:ic((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:ic((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:ic((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:ic((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(e)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=ic(n)}format(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(u=>u.indexOf(")")>-1)){const u=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,u)].join(this.formatSeparator)}return o.reduce((u,c)=>{const{formatName:f,formatOptions:p}=L_e(c);if(this.formats[f]){let g=u;try{const m=s?.formatParams?.[s.interpolationkey]||{},y=m.locale||m.lng||s.locale||s.lng||r;g=this.formats[f](u,y,{...p,...s,...m})}catch(m){this.logger.warn(m)}return g}else this.logger.warn(`there was no format function for ${f}`);return u},e)}}const F_e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class z_e extends Ab{constructor(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=wo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,s.backend,s)}queueLoad(e,n,r,s){const o={},a={},u={},c={};return e.forEach(f=>{let p=!0;n.forEach(g=>{const m=`${f}|${g}`;!r.reload&&this.store.hasResourceBundle(f,g)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?a[m]===void 0&&(a[m]=!0):(this.state[m]=1,p=!1,a[m]===void 0&&(a[m]=!0),o[m]===void 0&&(o[m]=!0),c[g]===void 0&&(c[g]=!0)))}),p||(u[f]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const s=e.split("|"),o=s[0],a=s[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const u={};this.queue.forEach(c=>{x_e(c.loaded,[o],a),F_e(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(f=>{u[f]||(u[f]={});const p=c.loaded[f];p.length&&p.forEach(g=>{u[f][g]===void 0&&(u[f][g]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:o,callback:a});return}this.readingCalls++;const u=(f,p)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(f&&p&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,o*2,a)},o);return}a(f,p)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const f=c(e,n);f&&typeof f.then=="function"?f.then(p=>u(null,p)).catch(u):u(null,f)}catch(f){u(f)}return}return c(e,n,u)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();qe(e)&&(e=this.languageUtils.toResolveHierarchy(e)),qe(n)&&(n=[n]);const o=this.queueLoad(e,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(a,u)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,a),!a&&u&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,u),this.loaded(e,a,u)})}saveMissing(e,n,r,s,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const c={...a,isUpdate:o},f=this.backend.create.bind(this.backend);if(f.length<6)try{let p;f.length===5?p=f(e,n,r,s,c):p=f(e,n,r,s),p&&typeof p.then=="function"?p.then(g=>u(null,g)).catch(u):u(null,p)}catch(p){u(p)}else f(e,n,r,s,u,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const b5=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),qe(t[1])&&(e.defaultValue=t[1]),qe(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),S5=t=>(qe(t.ns)&&(t.ns=[t.ns]),qe(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),qe(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),km=()=>{},B_e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class $h extends Ab{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=S5(e),this.services={},this.logger=wo,this.modules={external:[]},B_e(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(qe(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=b5();this.options={...s,...this.options,...S5(n)},this.options.interpolation={...s.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?wo.init(o(this.modules.logger),this.options):wo.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=U_e;const g=new g5(this.options);this.store=new f5(this.options.resources,this.options);const m=this.services;m.logger=wo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new k_e(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(m.formatter=o(p),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new D_e(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new z_e(o(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),C=1;C<S;C++)E[C-1]=arguments[C];e.emit(y,...E)}),this.modules.languageDetector&&(m.languageDetector=o(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=o(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new cy(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),C=1;C<S;C++)E[C-1]=arguments[C];e.emit(y,...E)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,r||(r=km),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(p=>{this[p]=function(){return e.store[p](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=function(){return e.store[p](...arguments),e}});const c=Lf(),f=()=>{const p=(g,m)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(m),r(g,m)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:km;const s=qe(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&o.indexOf(f)<0&&o.push(f)})};s?a(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload?.forEach?.(u=>a(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(e,n,r){const s=Lf();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=km),this.services.backendConnector.reload(e,n,o=>{s.resolve(),r(o)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&mj.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const s=Lf();this.emit("languageChanging",e);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,f)=>{f?(o(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},u=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const f=qe(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);f&&(this.language||o(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector?.cacheUserLanguage?.(f)),this.loadResources(f,p=>{a(p,f)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),s}getFixedT(e,n,r){var s=this;const o=function(a,u){let c;if(typeof u!="object"){for(var f=arguments.length,p=new Array(f>2?f-2:0),g=2;g<f;g++)p[g-2]=arguments[g];c=s.options.overloadTranslationOptionHandler([a,u].concat(p))}else c={...u};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const m=s.options.keySeparator||".";let y;return c.keyPrefix&&Array.isArray(a)?y=a.map(S=>`${c.keyPrefix}${m}${S}`):y=c.keyPrefix?`${c.keyPrefix}${m}${a}`:a,s.t(y,c)};return qe(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.translator?.translate(...n)}exists(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.translator?.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(u,c)=>{const f=this.services.backendConnector.state[`${u}|${c}`];return f===-1||f===0||f===2};if(n.precheck){const u=n.precheck(this,a);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!s||a(o,e)))}loadNamespaces(e,n){const r=Lf();return this.options.ns?(qe(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Lf();qe(e)&&(e=[e]);const s=this.options.preload||[],o=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=s.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new g5(b5());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new $h(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:km;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new $h(s);if((e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(u=>{o[u]=this[u]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const u=Object.keys(this.store.data).reduce((c,f)=>(c[f]={...this.store.data[f]},Object.keys(c[f]).reduce((p,g)=>(p[g]={...c[f][g]},p),{})),{});o.store=new f5(u,s),o.services.resourceStore=o.store}return o.translator=new cy(o.services,s),o.translator.on("*",function(u){for(var c=arguments.length,f=new Array(c>1?c-1:0),p=1;p<c;p++)f[p-1]=arguments[p];o.emit(u,...f)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const hr=$h.createInstance();hr.createInstance=$h.createInstance;hr.createInstance;hr.dir;hr.init;hr.loadResources;hr.reloadResources;hr.use;hr.changeLanguage;hr.getFixedT;hr.t;hr.exists;hr.setDefaultNamespace;hr.hasLoadedNamespace;hr.loadNamespaces;hr.loadLanguages;const{slice:j_e,forEach:H_e}=[];function $_e(t){return H_e.call(j_e.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function q_e(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const E5=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,W_e=function(t,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e);let o=`${t}=${s}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!E5.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!E5.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},C5={create(t,e,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=W_e(t,e,s)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var G_e={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return C5.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&C5.create(n,t,r,s,o)}},V_e={name:"querystring",lookup(t){let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a<o.length;a++){const u=o[a].indexOf("=");u>0&&o[a].substring(0,u)===e&&(n=o[a].substring(u+1))}}return n}},K_e={name:"hash",lookup(t){let{lookupHash:e,lookupFromHashIndex:n}=t,r;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const o=s.substring(1);if(e){const a=o.split("&");for(let u=0;u<a.length;u++){const c=a[u].indexOf("=");c>0&&a[u].substring(0,c)===e&&(r=a[u].substring(c+1))}}if(r)return r;if(!r&&n>-1){const a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let ac=null;const w5=()=>{if(ac!==null)return ac;try{if(ac=typeof window<"u"&&window.localStorage!==null,!ac)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{ac=!1}return ac};var Y_e={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&w5())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&w5()&&window.localStorage.setItem(n,t)}};let lc=null;const _5=()=>{if(lc!==null)return lc;try{if(lc=typeof window<"u"&&window.sessionStorage!==null,!lc)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{lc=!1}return lc};var Z_e={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&_5())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&_5()&&window.sessionStorage.setItem(n,t)}},X_e={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)e.push(n[o]);r&&e.push(r),s&&e.push(s)}return e.length>0?e:void 0}},Q_e={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},J_e={name:"path",lookup(t){let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof e=="number"?e:0]?.replace("/",""):void 0}},exe={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let vj=!1;try{document.cookie,vj=!0}catch{}const yj=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];vj||yj.splice(1,1);const txe=()=>({order:yj,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class bj{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=$_e(n,this.options||{},txe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(G_e),this.addDetector(V_e),this.addDetector(Y_e),this.addDetector(Z_e),this.addDetector(X_e),this.addDetector(Q_e),this.addDetector(J_e),this.addDetector(exe),this.addDetector(K_e)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(r=>r!=null&&!q_e(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}bj.type="languageDetector";function nxe(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=rxe(t))||e){n&&(t=n);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(f){throw f},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
295
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var f=n.next();return a=f.done,f},e:function(f){u=!0,o=f},f:function(){try{a||n.return==null||n.return()}finally{if(u)throw o}}}}function rxe(t,e){if(t){if(typeof t=="string")return x5(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x5(t,e):void 0}}function x5(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function bA(t){"@babel/helpers - typeof";return bA=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bA(t)}var Sj=["__proto__","constructor","prototype"];function Ej(t){return!(typeof t!="string"||t.length===0||t.length>128||Sj.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function Cj(t){return!(!Ej(t)||t.indexOf("/")>-1)}function sxe(t){return Ej(t)}var oxe={lng:Cj,ns:sxe};function Dm(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function ixe(t){if(typeof t!="string"||t.length===0)return t;try{var e=new URL(t);return e.username||e.password?(e.username="",e.password="",e.toString()):t}catch{return t.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function wj(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":bA(XMLHttpRequest))==="object"}function axe(t){return!!t&&typeof t.then=="function"}function lxe(t){return axe(t)?t:Promise.resolve(t)}var uxe=/\{\{(.+?)\}\}/g;function A5(t,e){var n=!1,r=t.replace(uxe,function(s,o){var a=o.trim();if(Sj.indexOf(a)>-1)return s;var u=e[a];if(u==null)return s;var c=oxe[a]||Cj,f=String(u).split("+"),p=nxe(f),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;if(!c(m))return n=!0,s}}catch(y){p.e(y)}finally{p.f()}return f.join("+")});return n?null:r}function T5(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function R5(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?T5(Object(n),!0).forEach(function(r){cxe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function cxe(t,e,n){return(e=dxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dxe(t){var e=fxe(t,"string");return Zl(e)=="symbol"?e:e+""}function fxe(t,e){if(Zl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Zl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Zl(t){"@babel/helpers - typeof";return Zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zl(t)}var $a=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?$a=global.fetch:typeof window<"u"&&window.fetch&&($a=window.fetch);var qh;wj()&&(typeof global<"u"&&global.XMLHttpRequest?qh=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(qh=window.XMLHttpRequest));var dy;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?dy=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(dy=window.ActiveXObject));typeof $a!="function"&&($a=void 0);if(!$a&&!qh&&!dy)try{qn(()=>import("./browser-ponyfill-Dxp20-DZ.js").then(t=>t.b),[]).then(function(t){$a=t.default}).catch(function(){})}catch{}var _j=["__proto__","constructor","prototype"],SA=function(e,n){if(n&&Zl(n)==="object"){for(var r="",s=0,o=Object.keys(n);s<o.length;s++){var a=o[s];_j.indexOf(a)>-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},I5=function(e,n,r,s){var o=function(c){if(!c.ok)return r(c.statusText||"Error",{status:c.status});c.text().then(function(f){r(null,{status:c.status,data:f})}).catch(r)};if(s){var a=s(e,n);if(a instanceof Promise){a.then(o).catch(r);return}}typeof fetch=="function"?fetch(e,n).then(o).catch(r):$a(e,n).then(o).catch(r)},hxe=function(e,n,r,s){e.queryStringParams&&(n=SA(n,e.queryStringParams));var o=R5({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(o["Content-Type"]="application/json");var a=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,u=R5({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:o},e._omitFetchOptions?{}:a),c=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{I5(n,u,s,c)}catch(f){if(!a||Object.keys(a).length===0||!f.message||f.message.indexOf("not implemented")<0)return s(f);try{Object.keys(a).forEach(function(p){delete u[p]}),I5(n,u,s,c),e._omitFetchOptions=!0}catch(p){s(p)}}},pxe=function(e,n,r,s){r&&Zl(r)==="object"&&(r=SA("",r).slice(1)),e.queryStringParams&&(n=SA(n,e.queryStringParams));try{var o=qh?new qh:new dy("MSXML2.XMLHTTP.3.0");o.open(r?"POST":"GET",n,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(var u=0,c=Object.keys(a);u<c.length;u++){var f=c[u];_j.indexOf(f)>-1||o.setRequestHeader(f,a[f])}o.onreadystatechange=function(){o.readyState>3&&s(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(p){console&&console.log(p)}},gxe=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},$a&&n.indexOf("file:")!==0)return hxe(e,n,r,s);if(wj()||typeof ActiveXObject=="function")return pxe(e,n,r,s);s(new Error("No fetch and no xhr implementation found!"))};function Xc(t){"@babel/helpers - typeof";return Xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xc(t)}function O5(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function S_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?O5(Object(n),!0).forEach(function(r){xj(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function mxe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vxe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Aj(r.key),r)}}function yxe(t,e,n){return e&&vxe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function xj(t,e,n){return(e=Aj(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Aj(t){var e=bxe(t,"string");return Xc(e)=="symbol"?e:e+""}function bxe(t,e){if(Xc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Sxe=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,s){return xj({},r,s||"")},parseLoadPayload:function(n,r){},request:gxe,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Tj=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};mxe(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return yxe(t,[{key:"init",value:function(n){var r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=S_(S_(S_({},Sxe()),this.options||{}),s),this.allOptions=o,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Xc(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,s){this._readAny(n,n,r,r,s)}},{key:"read",value:function(n,r,s){this._readAny([n],n,[r],r,s)}},{key:"_readAny",value:function(n,r,s,o,a){var u=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,s)),c=lxe(c),c.then(function(f){if(!f)return a(null,{});var p=A5(f,{lng:n.join("+"),ns:s.join("+")});if(p==null){var g=n.map(Dm).join(", "),m=s.map(Dm).join(", ");return a(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+g+"] namespaces=["+m+"]"),!1)}u.loadUrl(p,a,r,o)})}},{key:"loadUrl",value:function(n,r,s,o){var a=this,u=typeof s=="string"?[s]:s,c=typeof o=="string"?[o]:o,f=this.options.parseLoadPayload(u,c),p=Dm(ixe(n));this.options.request(this.options,n,f,function(g,m){if(m&&(m.status>=500&&m.status<600||!m.status))return r("failed loading "+p+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+p+"; status code: "+m.status,!1);if(!m&&g&&g.message){var y=g.message.toLowerCase(),S=["failed","fetch","network","load"].find(function(w){return y.indexOf(w)>-1});if(S)return r("failed loading "+p+": "+Dm(g.message),!0)}if(g)return r(g,!1);var E,C;try{typeof m.data=="string"?E=a.options.parse(m.data,s,o):E=m.data}catch{C="failed parsing "+p+" to json"}if(C)return r(C,!1);r(null,E)})}},{key:"create",value:function(n,r,s,o,a){var u=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,s,o),f=0,p=[],g=[];n.forEach(function(m){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(m,r));var S=A5(y,{lng:m,ns:r});if(S==null){f+=1,a&&f===n.length&&a(p,g);return}u.options.request(u.options,S,c,function(E,C){f+=1,p.push(E),g.push(C),f===n.length&&typeof a=="function"&&a(p,g)})})}}},{key:"reload",value:function(){var n=this,r=this.services,s=r.backendConnector,o=r.languageUtils,a=r.logger,u=s.language;if(!(u&&u.toLowerCase()==="cimode")){var c=[],f=function(g){var m=o.toResolveHierarchy(g);m.forEach(function(y){c.indexOf(y)<0&&c.push(y)})};f(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(p){return f(p)}),c.forEach(function(p){n.allOptions.ns.forEach(function(g){s.read(p,g,"read",null,null,function(m,y){m&&a.warn("loading namespace ".concat(g," for language ").concat(p," failed"),m),!m&&y&&a.log("loaded namespace ".concat(g," for language ").concat(p),y),s.loaded("".concat(p,"|").concat(g),m,y)})})})}}}])})();Tj.type="backend";hr.use(Tj).use(bj).use(yEe).init({fallbackLng:"en",supportedLngs:["en","nl","de","fr"],ns:["common","mail","settings","errors"],defaultNS:"common",backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["navigator","htmlTag"],caches:[]},interpolation:{escapeValue:!1},react:{useSuspense:!0,bindI18n:"languageChanged loaded"}});const Exe=({authProvider:t,rootElementId:e="root"})=>{MJ(),iEe(),t.configure(),Npe(t);const n=sEe();CJ(n);const r=new nfe({queryCache:new FF({onError:Dpe}),mutationCache:new UF({onError:Lpe}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=C_e(r,n);n.recordPageView(window.location.pathname);const o=document.getElementById(e);if(!o)throw new Error(`Root element not found: #${e}`);const{Shell:a}=t;hpe.createRoot(o).render(D.jsx(A.StrictMode,{children:D.jsx(sj.Provider,{value:n,children:D.jsxs(rfe,{client:r,children:[D.jsx(kpe,{value:t,children:D.jsx(a,{children:D.jsx(lpe,{router:s})})}),!1]})})}))};Exe({authProvider:Pde});export{MAe as $,afe as A,Gm as B,zM as C,DX as D,dfe as E,yQ as F,lfe as G,ufe as H,GZ as I,Lr as J,hfe as K,ML as L,cfe as M,pfe as N,VZ as O,Oxe as P,Xde as Q,q6 as R,iJ as S,YZ as T,ds as U,qr as V,Nhe as W,ph as X,oTe as Y,XT as Z,xN as _,dn as a,y7 as a$,v_ as a0,zxe as a1,mP as a2,LJ as a3,f7 as a4,wEe as a5,cTe as a6,SAe as a7,gfe as a8,vCe as a9,YAe as aA,aTe as aB,sTe as aC,rTe as aD,xxe as aE,wCe as aF,Iy as aG,fCe as aH,zl as aI,g7 as aJ,iCe as aK,lj as aL,DAe as aM,kAe as aN,LAe as aO,UAe as aP,HAe as aQ,kxe as aR,$Ee as aS,CAe as aT,qa as aU,FEe as aV,F8 as aW,Cy as aX,vwe as aY,Axe as aZ,qA as a_,G6 as aa,JAe as ab,tTe as ac,QAe as ad,zAe as ae,pCe as af,lTe as ag,SCe as ah,cj as ai,nTe as aj,iTe as ak,eTe as al,qn as am,jAe as an,gCe as ao,uCe as ap,VAe as aq,_Ce as ar,CCe as as,ZAe as at,KAe as au,GAe as av,BAe as aw,z as ax,h7 as ay,XAe as az,ZM as b,Bee as b$,hCe as b0,Uxe as b1,xAe as b2,wAe as b3,TAe as b4,fd as b5,gwe as b6,Cr as b7,uTe as b8,$Ae as b9,gT as bA,Ai as bB,coe as bC,Ti as bD,noe as bE,n9 as bF,Uy as bG,F9 as bH,Are as bI,poe as bJ,woe as bK,Rre as bL,Ere as bM,Py as bN,QA as bO,Z8 as bP,Soe as bQ,moe as bR,Pre as bS,doe as bT,CT as bU,J8 as bV,Ire as bW,soe as bX,ooe as bY,Yee as bZ,nu as b_,qAe as ba,$we as bb,_Ae as bc,AAe as bd,dTe as be,fTe as bf,FAe as bg,mJ as bh,Nxe as bi,gJ as bj,H4 as bk,EAe as bl,RAe as bm,lCe as bn,OAe as bo,IAe as bp,NAe as bq,PAe as br,WAe as bs,mCe as bt,Ch as bu,tfe as bv,NF as bw,Ig as bx,r9 as by,No as bz,Ns as c,zee as c0,XA as c1,H9 as c2,roe as c3,$ee as c4,Mre as c5,loe as c6,JA as c7,ioe as c8,Aoe as c9,V9 as ca,Z6 as cb,Pxe as cc,Xh as cd,Mxe as ce,yT as cf,Wy as cg,ep as ch,Eoe as ci,Qh as cj,Coe as ck,goe as cl,HZ as d,kX as e,F_ as f,Txe as g,WZ as h,mQ as i,D as j,Ixe as k,Y1 as l,SQ as m,uF as n,Cxe as o,Rxe as p,wxe as q,A as r,Lxe as s,Dxe as t,sp as u,er as v,ox as w,IF as x,BF as y,sfe as z};
|