@remit/web-client-dist 0.0.71 → 0.0.72
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-DUjtoP6m.js → ComposeBody-BlotJORc.js} +1 -1
- package/assets/{ErrorState-BxwZpzII.js → ErrorState-CYlNdOM7.js} +1 -1
- package/assets/{OnboardingWizard-CxjYu4uh.js → OnboardingWizard-D1laKxAV.js} +1 -1
- package/assets/{account-form-helpers-C6SeBbs1.js → account-form-helpers-C2def1j4.js} +1 -1
- package/assets/{accounts-CRLsyGdC.js → accounts-ByZa0CEH.js} +1 -1
- package/assets/{advanced-Cj7oBz2q.js → advanced-CBoT2UpB.js} +1 -1
- package/assets/{appearance-Ccykc5lF.js → appearance-6D67BmVw.js} +1 -1
- package/assets/{avatar-DQNzRh1Z.js → avatar-DJw1RldU.js} +1 -1
- package/assets/{browser-ponyfill-DL3vLOqC.js → browser-ponyfill-jVqk70DF.js} +1 -1
- package/assets/{filter-status-a9fPZ_6n.js → filter-status-DoLjGaYj.js} +1 -1
- package/assets/{filters-BYsopZUu.js → filters-Djgem6yu.js} +1 -1
- package/assets/{flagged-Dxz6AwxG.js → flagged-CQJvFPtw.js} +1 -1
- package/assets/{folder-CJsTRqgw.js → folder-Dy7Idgd4.js} +1 -1
- package/assets/{folders-Cn-bzo8V.js → folders-D7dx0_Jq.js} +1 -1
- package/assets/{index-BrDcIM7w.js → index-B77Nghmt.js} +1 -1
- package/assets/index-CffBlbpr.js +1 -0
- package/assets/{index-Bggkftgl.js → index-CpXBtH3q.js} +24 -24
- package/assets/{kbd-CxISOQ-k.js → kbd-DwO5GrDC.js} +1 -1
- package/assets/{mail-BpAW5li-.js → mail-D_PjavXJ.js} +3 -3
- package/assets/{onboarding-BXpr5Krz.js → onboarding-SKdeQkz0.js} +1 -1
- package/assets/{select-8c6vtLYP.js → select-Dn-CEZRC.js} +1 -1
- package/assets/{senders-K5nFMPWP.js → senders-DiwKIfrY.js} +1 -1
- package/assets/settings-BwaJSNWB.js +1 -0
- package/assets/{settings-screen-B_xAkUFJ.js → settings-screen-CehY3JdZ.js} +1 -1
- package/assets/{suggested-vips-340kg8Gs.js → suggested-vips-BSdj6Ci8.js} +1 -1
- package/assets/{useDebouncedValue-Dy4Cx0ze.js → useDebouncedValue-DfqkSkZa.js} +1 -1
- package/assets/{useMutation-toR-RH8N.js → useMutation-BLdkYtlT.js} +1 -1
- package/assets/{useSignature-Du9RPS7i.js → useSignature-DWWf7Lwr.js} +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
- package/assets/index-DmoNyvcD.js +0 -1
- package/assets/settings-CwOQfpqn.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-D_PjavXJ.js","assets/useDebouncedValue-DfqkSkZa.js","assets/avatar-DJw1RldU.js","assets/kbd-DwO5GrDC.js","assets/account-form-helpers-C2def1j4.js","assets/useMutation-BLdkYtlT.js","assets/useSignature-DWWf7Lwr.js","assets/ErrorState-CYlNdOM7.js","assets/format-CnrKvE9L.js","assets/select-Dn-CEZRC.js","assets/filter-status-DoLjGaYj.js","assets/folder-Dy7Idgd4.js","assets/onboarding-SKdeQkz0.js","assets/OnboardingWizard-D1laKxAV.js","assets/index-B77Nghmt.js","assets/flagged-CQJvFPtw.js","assets/accounts-ByZa0CEH.js","assets/settings-screen-CehY3JdZ.js","assets/advanced-CBoT2UpB.js","assets/appearance-6D67BmVw.js","assets/filters-Djgem6yu.js","assets/folders-D7dx0_Jq.js","assets/senders-DiwKIfrY.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function j5(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 Ng=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 P1={exports:{}},mf={};var RN;function B$(){if(RN)return mf;RN=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 mf.Fragment=e,mf.jsx=n,mf.jsxs=n,mf}var IN;function H$(){return IN||(IN=1,P1.exports=B$()),P1.exports}var D=H$();const $$="Logging",q$="x-amz-user-agent",W$="NoHubcallbackProvidedException";var ss;(function(t){t.DEBUG="DEBUG",t.ERROR="ERROR",t.INFO="INFO",t.WARN="WARN",t.VERBOSE="VERBOSE",t.NONE="NONE"})(ss||(ss={}));const ON={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class rr{constructor(e,n=ss.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;rr.LOG_LEVEL&&(r=rr.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const s=ON[r];if(!(ON[e]>=s))return;let a=console.log.bind(console);e===ss.ERROR&&console.error&&(a=console.error.bind(console)),e===ss.WARN&&console.warn&&(a=console.warn.bind(console)),rr.BIND_ALL_LOG_LEVELS&&(e===ss.INFO&&console.info&&(a=console.info.bind(console)),e===ss.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(ss.INFO,...e)}info(...e){this._log(ss.INFO,...e)}warn(...e){this._log(ss.WARN,...e)}error(...e){this._log(ss.ERROR,...e)}debug(...e){this._log(ss.DEBUG,...e)}verbose(...e){this._log(ss.VERBOSE,...e)}addPluggable(e){e&&e.getCategoryName()===$$&&(this._pluggables.push(e),e.configure(this._config))}listPluggables(){return this._pluggables}}rr.LOG_LEVEL=null;rr.BIND_ALL_LOG_LEVELS=!1;class Hr 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=Hr,Object.setPrototypeOf(this,Hr.prototype)}}var Pa;(function(t){t.NoEndpointId="NoEndpointId",t.PlatformNotSupported="PlatformNotSupported",t.Unknown="Unknown",t.NetworkError="NetworkError"})(Pa||(Pa={}));const my=(t,e=Hr)=>(n,r,s)=>{const{message:o,recoverySuggestion:a}=t[r];if(!n)throw new e({name:r,message:s?`${o} ${s}`:o,recoverySuggestion:a})},_o=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",vf=new rr("Hub");class B5{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){vf.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===_o||vf.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){vf.error(a)}}listen(e,n,r="noname"){let s;if(typeof n!="function")throw new Hr({name:W$,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=>{vf.debug(`Dispatching to ${n} with `,r);try{o.callback(e)}catch(a){vf.error(a)}})}}const Ao=new B5("__default__"),pv=new B5("internal-hub"),RA=()=>{if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto;if(typeof crypto=="object")return crypto;throw new Hr({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},G$=()=>{if(typeof window<"u"&&typeof window.btoa=="function")return window.btoa;if(typeof btoa=="function")return btoa;throw new Hr({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},V$=()=>{if(typeof window<"u"&&typeof window.atob=="function")return window.atob;if(typeof atob=="function")return atob;throw new Hr({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},IA={convert(t,e){let n=t;return e?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),V$()(n)}};var Eo;(function(t){t.AuthTokenConfigException="AuthTokenConfigException",t.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",t.AuthUserPoolException="AuthUserPoolException",t.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",t.OAuthNotConfigureException="OAuthNotConfigureException"})(Eo||(Eo={}));const K$={[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."}},OA=my(K$);function lt(t){let e=!0;t?e=!!t.userPoolId&&!!t.userPoolClientId:e=!1,OA(e,Eo.AuthUserPoolException)}function vy(t){const e=!!t?.loginWith?.oauth?.domain&&!!t?.loginWith?.oauth?.redirectSignOut&&!!t?.loginWith?.oauth?.redirectSignIn&&!!t?.loginWith?.oauth?.responseType;OA(e,Eo.OAuthNotConfigureException)}function zm(t){const e=!!t?.identityPoolId;OA(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(IA.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 H5=t=>{const e=Reflect.ownKeys(t);for(const n of e){const r=t[n];(r&&typeof r=="object"||typeof r=="function")&&H5(r)}return Object.freeze(t)},Y$=new rr("parseAWSExports"),Z$={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},X$=(t={})=>{if(!Object.prototype.hasOwnProperty.call(t,"aws_project_region"))throw new Hr({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:_,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:j}=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||Y$.debug(`Invalid authentication type ${n}. Falling back to IAM.`),W.API={GraphQL:{endpoint:r,apiKey:e,region:s,defaultAuthMode:J??"iam"}},j&&(W.API.GraphQL.modelIntrospection=j)}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:{...Q$(P),...K&&{providers:J$(y)}}}),_&&(W.Storage={S3:{bucket:_,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:xe}=oe;return{...J,[he]:{endpoint:ue,...xe?{service:xe}: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},NN=t=>t?.split(",")??[],Q$=({domain:t,scope:e,redirectSignIn:n,redirectSignOut:r,responseType:s})=>({domain:t,scopes:e,redirectSignIn:NN(n),redirectSignOut:NN(r),responseType:s}),J$=t=>t.map(e=>{const n=e.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),$5=Symbol("oauth-listener"),Qn=[];for(let t=0;t<256;++t)Qn.push((t+256).toString(16).slice(1));function eq(t,e=0){return(Qn[t[e+0]]+Qn[t[e+1]]+Qn[t[e+2]]+Qn[t[e+3]]+"-"+Qn[t[e+4]]+Qn[t[e+5]]+"-"+Qn[t[e+6]]+Qn[t[e+7]]+"-"+Qn[t[e+8]]+Qn[t[e+9]]+"-"+Qn[t[e+10]]+Qn[t[e+11]]+Qn[t[e+12]]+Qn[t[e+13]]+Qn[t[e+14]]+Qn[t[e+15]]).toLowerCase()}let k1;const tq=new Uint8Array(16);function nq(){if(!k1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");k1=crypto.getRandomValues.bind(crypto)}return k1(tq)}const rq=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),MN={randomUUID:rq};function sq(t,e,n){if(MN.randomUUID&&!e&&!t)return MN.randomUUID();t=t||{};const r=t.random??t.rng?.()??nq();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 eq(r)}function oq(t){const{version:e}=t;return e?e.startsWith("1"):!1}function iq(t){if(!t)return;const{bucket_name:e,aws_region:n,buckets:r}=t;return{S3:{bucket:e,region:n,buckets:r&&vq(r)}}}function aq(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:mq(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:gq(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 lq(t){if(!t?.amazon_pinpoint)return;const{amazon_pinpoint:e}=t;return{Pinpoint:{appId:e.app_id,region:e.aws_region}}}function uq(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 cq(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:q5(n),region:e,apiKey:s,modelIntrospection:o}}}function dq(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:q5(s),region:n,apiKey:r}}}function fq(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 hq(t){const e={};if(t.storage&&(e.Storage=iq(t.storage)),t.auth&&(e.Auth=aq(t.auth)),t.analytics&&(e.Analytics=lq(t.analytics)),t.geo&&(e.Geo=uq(t.geo)),t.data&&(e.API=cq(t.data)),t.custom){const n=dq(t.custom);n&&"Events"in n&&(e.API={...e.API,...n})}return t.notifications&&(e.Notifications=fq(t.notifications)),e}const pq={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function q5(t){return pq[t]}const PN={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function gq(t=[]){return t.reduce((e,n)=>(PN[n]!==void 0&&e.push(PN[n]),e),[])}function mq(t){return t==="OPTIONAL"?"optional":t==="REQUIRED"?"on":"off"}function vq(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 W5=t=>Object.keys(t).some(e=>e.startsWith("aws_"))?X$(t):oq(t)?hq(t):t;var kN=function(){return kN=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},kN.apply(this,arguments)};function tAe(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 yq(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 bq(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 nAe(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,Sq=32,Eq=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]),Cq=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],wq=Math.pow(2,53)-1,jm=(function(){function t(){this.state=Int32Array.from(Cq),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>wq)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(Sq),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+(Eq[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 xq=t=>new TextEncoder().encode(t);var _q=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:xq;function G5(t){return t instanceof Uint8Array?t:typeof t=="string"?_q(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function Aq(t){return typeof t=="string"?t.length===0:t.byteLength===0}var zl=(function(){function t(e){this.secret=e,this.hash=new jm,this.reset()}return t.prototype.update=function(e){if(!(Aq(e)||this.error))try{this.hash.update(G5(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 yq(this,void 0,void 0,function(){return bq(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new jm,this.secret){this.outer=new jm;var e=Tq(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 Tq(t){var e=G5(t);if(e.byteLength>_s){var n=new jm;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 xn;(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"})(xn||(xn={}));var Is;(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"})(Is||(Is={}));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 DN;(function(t){t.Record="1",t.IdentifyUser="2"})(DN||(DN={}));var LN;(function(t){t.GraphQl="1",t.Get="2",t.Post="3",t.Put="4",t.Patch="5",t.Del="6",t.Head="7"})(LN||(LN={}));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 UN;(function(t){t.Subscribe="1",t.GraphQl="2"})(UN||(UN={}));var eh;(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"})(eh||(eh={}));var Tx;(function(t){t.SyncMessages="1",t.IdentifyUser="2",t.NotifyMessageInteraction="3"})(Tx||(Tx={}));var FN;(function(t){t.None="0"})(FN||(FN={}));var zN;(function(t){t.Convert="1",t.Identify="2",t.Interpret="3"})(zN||(zN={}));var jN;(function(t){t.Subscribe="1"})(jN||(jN={}));var BN;(function(t){t.InitializePushNotifications="1",t.IdentifyUser="2"})(BN||(BN={}));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 Rq="6.18.0",yy=()=>typeof global<"u",ed=()=>typeof window<"u",V5=()=>typeof document<"u",NA=()=>typeof process<"u",ph=(t,e)=>!!Object.keys(t).find(n=>n.startsWith(e));var HN={};function Iq(){const t=r=>r.startsWith("_react")||r.startsWith("__react"),e=r=>Object.keys(r).find(t),n=()=>Array.from(document.querySelectorAll("[id]"));return V5()&&n().some(e)}function Oq(){return NA()&&typeof HN<"u"&&!!Object.keys(HN).find(t=>t.includes("react"))}function Nq(){return ed()&&ph(window,"__VUE")}function Mq(){return yy()&&ph(global,"__VUE")}var $N={};function Pq(){return ed()&&ph(window,"__SVELTE")}function kq(){return NA()&&typeof $N<"u"&&!!Object.keys($N).find(t=>t.includes("svelte"))}function Dq(){return ed()&&window.next&&typeof window.next=="object"}function Lq(){return yy()&&(ph(global,"__next")||ph(global,"__NEXT"))}function Uq(){return ed()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function Fq(){return yy()&&typeof global.__NUXT_PATHS__<"u"}var qN={};function zq(){const t=!!(V5()&&document.querySelector("[ng-version]")),e=!!(ed()&&typeof window.ng<"u");return t||e}function jq(){return NA()&&typeof qN=="object"&&qN.npm_lifecycle_script?.startsWith("ng ")||!1}function Bq(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function Hq(){return yy()&&typeof global.expo<"u"}function $q(){return ed()}const qq=[{platform:xn.Expo,detectionMethod:Hq},{platform:xn.ReactNative,detectionMethod:Bq},{platform:xn.NextJs,detectionMethod:Dq},{platform:xn.Nuxt,detectionMethod:Uq},{platform:xn.Angular,detectionMethod:zq},{platform:xn.React,detectionMethod:Iq},{platform:xn.VueJs,detectionMethod:Nq},{platform:xn.Svelte,detectionMethod:Pq},{platform:xn.WebUnknown,detectionMethod:$q},{platform:xn.NextJsSSR,detectionMethod:Lq},{platform:xn.NuxtSSR,detectionMethod:Fq},{platform:xn.ReactSSR,detectionMethod:Oq},{platform:xn.VueJsSSR,detectionMethod:Mq},{platform:xn.AngularSSR,detectionMethod:jq},{platform:xn.SvelteSSR,detectionMethod:kq}];function Wq(){return qq.find(t=>t.detectionMethod())?.platform||xn.ServerSideUnknown}let th;const D1=[];let Rx=!1;const Gq=10,Vq=10,Kq=1e3,K5=()=>{if(!th){if(th=Wq(),Rx)for(;D1.length;)D1.pop()?.();else D1.forEach(t=>{t()});WN(xn.ServerSideUnknown,Gq),WN(xn.WebUnknown,Vq)}return th};function Yq(){th=void 0}function WN(t,e){th===t&&!Rx&&setTimeout(()=>{Yq(),Rx=!0,setTimeout(K5,Kq)},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,Xq="aws-amplify",Qq=t=>t.replace(/\+.*/,""),Jq=({category:t,action:e}={})=>{const n=[[Xq,Qq(Rq)]];if(t&&n.push([t,e]),n.push(["framework",K5()]),t&&e){const r=Zq(t,e);r&&r.forEach(s=>{n.push(s)})}return n},by=t=>Jq(t).map(([r,s])=>r&&s?`${r}/${s}`:r).join(" "),Sy=()=>typeof window<"u"&&typeof window.document<"u",GN=new rr("Auth");class eW{configure(e,n){this.authConfig=e,this.authOptions=n,e&&e.Cognito?.userPoolEndpoint&&GN.warn(VN("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&GN.warn(VN("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 VN=t=>`You are using a custom Amazon ${t} endpoint, ensure the endpoint is correct.`;class tW{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new eW}configure(e,n){const r=W5(e);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=H5(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",_o),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}[$5](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 tW,Y5=(t,e)=>t.Auth.fetchAuthSession(e),Ey=t=>Y5(Ht,t);function Z5(){return Ht.Auth.clearCredentials()}const Cy=t=>{const{headers:e,statusCode:n}=t;return{...nW(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"]}},nW=t=>typeof t?.$metadata=="object",td=async t=>{if(!t||t.statusCode<300)return;const e=await Vh(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:Cy(t)})},Vh=async t=>{if(!t.body)throw new Error("Missing response payload");const e=await t.body.json();return Object.assign(e,{$metadata:Cy(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)},rW=300*1e3;function sW(t=rW){return r=>{const s=2**r*100+100*Math.random();return s>t?!1:s}}const X5=3,KN="amz-sdk-invocation-id",oW="amz-sdk-request",YN=300*1e3,Q5=t=>{const n=sW(YN)(t);return n===!1?YN:n},iW=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],aW=t=>!!t&&iW.includes(t),J5=t=>async(e,n)=>{const r=n??await t(e)??void 0,s=r?.code||r?.name,o=e?.statusCode;return{retryable:dW(n)||cW(o,s)||aW(s)||fW(o,s)}},lW=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],uW=["TimeoutError","RequestTimeout","RequestTimeoutException"],cW=(t,e)=>t===429||!!e&&lW.includes(e),dW=t=>[Pa.NetworkError,"ERR_NETWORK"].includes(t?.name),fW=(t,e)=>!!t&&[500,502,503,504].includes(t)||!!e&&uW.includes(e),e6="cognito-identity",t6={service:e6,retryDecider:J5(td),computeDelay:Q5,cache:"no-store"},hW=({maxAttempts:t=X5,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 ZN(p,f),p;throw ZN(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 pW(S,r)}continue}else return g()}if(r?.aborted)throw new Error("Request aborted.");return g()}},pW=(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},ZN=(t,e)=>{Object.prototype.toString.call(t)==="[object Object]"&&(t.$metadata={...t.$metadata??{},attempts:e})},gW=sq,mW=()=>t=>async function(n){return n.headers[KN]||(n.headers[KN]=gW()),t(n)},vW=({maxAttempts:t=X5})=>(e,n)=>async function(s){const o=n.attemptsCount??0;return s.headers[oW]=`attempt=${o+1}; max=${t}`,e(s)},yW=({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)}},MA=(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)},L1=t=>{let e;return()=>(e||(e=t()),e)},bW=t=>!["HEAD","GET"].includes(t.toUpperCase()),SW=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:bW(e)?r:void 0,signal:s,cache:o,credentials:a?"include":"same-origin"})}catch(g){throw g instanceof TypeError?new Hr({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:L1(()=>u.text()),blob:L1(()=>u.blob()),json:L1(()=>u.json())});return{...f,body:p}},n6=MA(SW,[yW,mW,hW,vW]),EW=()=>t=>async function(n){return n.headers["cache-control"]="no-store",t(n)},r6=MA(n6,[EW]),s6=t=>(e,n)=>{const r=CW(t),s=JSON.stringify(e);return wW(n,r,s)},CW=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${t}`}),wW=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"}),XN=t=>Rn(r6,s6("GetCredentialsForIdentity"),xW,{...t6,...t,userAgentValue:by()}),xW=async t=>{if(t.statusCode>=300)throw await td(t);const e=await Vh(t);return{IdentityId:e.IdentityId,Credentials:_W(e.Credentials),$metadata:Cy(t)}},_W=({Expiration:t,...e}={})=>({...e,Expiration:t&&new Date(t*1e3)}),AW=t=>Rn(r6,s6("GetId"),TW,{...t6,...t,userAgentValue:by()}),TW=async t=>{if(t.statusCode>=300)throw await td(t);return{IdentityId:(await Vh(t)).IdentityId,$metadata:Cy(t)}},o6={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},RW={partitions:[o6,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},i6=t=>{const{partitions:e}=RW;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 o6.outputs.dnsSuffix},Wa=URL,IW=({region:t})=>({url:new Wa(`https://${e6}.${t}.${i6(t)}`)});class jf extends Hr{constructor(){super({name:Pa.PlatformNotSupported,message:"Function not supported on current platform"})}}class a6{constructor(e){this.storage=e}async setItem(e,n){if(!this.storage)throw new jf;this.storage.setItem(e,n)}async getItem(e){if(!this.storage)throw new jf;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new jf;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new jf;this.storage.clear()}}class l6{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 u6=new rr("CoreStorageUtils"),OW=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{u6.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new l6},c6=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return u6.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new l6}};class NW extends a6{constructor(){super(OW())}}class MW extends a6{constructor(){super(c6())}}class PW{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new jf;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 kW extends PW{constructor(){super(c6())}}function Mg(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 DW={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 Ix(t,e){function n(s,o,a){if(!(typeof document>"u")){a=Mg({},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,"",Mg({},o,{expires:-1}))},withAttributes:function(s){return Ix(this.converter,Mg({},this.attributes,s))},withConverter:function(s){return Ix(Mg({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Pg=Ix(DW,{path:"/"});class LW{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){Pg.set(e,n,this.getData())}async getItem(e){return Pg.get(e)??null}async removeItem(e){Pg.remove(e,this.getData())}async clear(){const e=Pg.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 Kh=new NW;new MW;const ci=new kW,UW=new rr("I18n");let FW=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),UW.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 zW={[Cl.NotConfigured]:{message:"i18n is not configured."}},kg=my(zW),QN=new rr("I18n");let Dg={language:null},js=null,d6=class bl{static configure(e){return QN.debug("configure I18n"),e&&(Dg=Object.assign({},Dg,e.I18n||e),bl.createInstance()),Dg}static getModuleName(){return"I18n"}static createInstance(){QN.debug("create I18n instance"),!js&&(js=new FW)}static setLanguage(e){bl.checkConfig(),kg(!!js,Cl.NotConfigured),js.setLanguage(e)}static get(e,n){return bl.checkConfig(),kg(!!js,Cl.NotConfigured),js.get(e,n)}static putVocabulariesForLanguage(e,n){bl.checkConfig(),kg(!!js,Cl.NotConfigured),js.putVocabulariesForLanguage(e,n)}static putVocabularies(e){bl.checkConfig(),kg(!!js,Cl.NotConfigured),js.putVocabularies(e)}static checkConfig(){return js||bl.createInstance(),!0}};d6.createInstance();const jW=t=>{const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(t);RA().getRandomValues(r);for(const s of r)n.push(e[s%e.length]);return n.join("")};function BW(t){return(t.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function HW(t){return t.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const $W=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 JN({expiresAt:t,clockDrift:e,tolerance:n=5e3}){return Date.now()+e+n>t}const qW=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 WW(t){return Array.from(t,e=>String.fromCodePoint(e)).join("")}const kc={convert(t,e={urlSafe:!1,skipPadding:!1}){const n=typeof t=="string"?t:WW(t);let r=G$()(n);return e.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),e.skipPadding&&(r=r.replace(/=/g,"")),r}};function GW(){return RA().getRandomValues(new Uint32Array(1))[0]}function VW(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 PA{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(GW());return new PA(n,e)}toString(){return VW(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 f6={[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 Hr{constructor(e){super(e),this.constructor=Le,Object.setPrototypeOf(this,Le.prototype)}}function fn(t,e){const{message:n,recoverySuggestion:r}=f6[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 Ox(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 eM(t){return Object.entries(t).map(([e,n])=>({Name:e,Value:n}))}function KW(t){const e={};return t?.forEach(n=>{n.Name&&(e[n.Name]=n.Value)}),e}var tM;(function(t){t.ConcurrentModificationException="ConcurrentModificationException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(tM||(tM={}));var nM;(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"})(nM||(nM={}));var rM;(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"})(rM||(rM={}));var sM;(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"})(sM||(sM={}));var oM;(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"})(oM||(oM={}));var iM;(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"})(iM||(iM={}));var aM;(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"})(aM||(aM={}));var lM;(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"})(lM||(lM={}));var uM;(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"})(uM||(uM={}));var cM;(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"})(cM||(cM={}));var dM;(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"})(dM||(dM={}));var fM;(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"})(fM||(fM={}));var hM;(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"})(hM||(hM={}));var pM;(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"})(pM||(pM={}));var gv;(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"})(gv||(gv={}));var gM;(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"})(gM||(gM={}));var mM;(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"})(mM||(mM={}));var vM;(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"})(vM||(vM={}));var Nx;(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"})(Nx||(Nx={}));var yM;(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"})(yM||(yM={}));var bM;(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"})(bM||(bM={}));var SM;(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"})(SM||(SM={}));var EM;(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"})(EM||(EM={}));var CM;(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"})(CM||(CM={}));const wy="UserUnAuthenticatedException",YW="UserAlreadyAuthenticatedException",ZW="DeviceMetadataNotFoundException",h6="AutoSignInException",XW="InvalidRedirectException",QW="InvalidAppSchemeException",JW="InvalidPreferredRedirectUrlException",eG=new Le({name:XW,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:QW,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:JW,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 tG="InvalidOriginException",nG=new Le({name:tG,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."}),rG="OAuthSignOutException",sG="TokenRefreshException",oG="UnexpectedSignInInterruptionException";function nd(t){if(!t||!t.accessToken)throw new Le({name:wy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function iG(t){if(!t||!t.idToken)throw new Le({name:wy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const aG=new Le({name:sG,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' }`}),lG=new Le({name:wy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function p6(t){if(dG(t))throw aG;if(!cG(t))throw lG}function g6(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 uG={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function m6(t){return t?.accessToken||t?.idToken}function cG(t){return m6(t)&&t?.refreshToken}function dG(t){return m6(t)&&!t?.refreshToken}const fG=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const n=await t.Auth.getTokens({forceRefresh:!1});nd(n);const{"cognito:username":r,sub:s}=n.idToken?.payload??{},o={username:r,userId:s},a=hG(n);return a&&(o.signInDetails=a),o};function hG(t){return t?.signInDetails}const xy=async()=>fG(Ht),Nt=(t,e)=>by({category:Is.Auth,action:t,...e}),jn=t=>(e,n)=>{const r=pG(t),s=JSON.stringify(e);return gG(n,r,s)},pG=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}),gG=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"});function Os(t){if(!t||t.name==="Error"||t instanceof TypeError)throw new Le({name:Pa.Unknown,message:"An unknown error has occurred.",underlyingError:t})}const ir=()=>async t=>{if(t.statusCode>=300){const e=await td(t);throw Os(e),new Le({name:e.name,message:e.message,metadata:e.$metadata})}return Vh(t)},mG=()=>(t,e)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await Ht.libraryOptions?.Auth?.headers?.()},t(r)},Bn=MA(n6,[mG]),v6="cognito-idp",Hn={service:v6,retryDecider:J5(td),computeDelay:Q5,get userAgentValue(){return by()},cache:"no-store"},Yh=t=>Rn(Bn,jn("InitiateAuth"),ir(),{...Hn,...t}),as=t=>Rn(Bn,jn("RespondToAuthChallenge"),ir(),{...Hn,...t}),vG=t=>Rn(Bn,jn("VerifySoftwareToken"),ir(),{...Hn,...t}),yG=t=>Rn(Bn,jn("AssociateSoftwareToken"),ir(),{...Hn,...t}),bG=({region:t})=>({url:new Wa(`https://${v6}.${t}.${i6(t)}`)}),bt=({endpointOverride:t})=>e=>t?{url:new Wa(t)}:bG(e),SG=t=>Rn(Bn,jn("GetTokensFromRefreshToken"),ir(),{...Hn,...t}),EG=async({tokens:t,authConfig:e,username:n,clientMetadata:r})=>{lt(e?.Cognito);const{userPoolId:s,userPoolClientId:o,userPoolEndpoint:a}=e.Cognito,u=yt(s);p6(t);const c=SG({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}},CG=$W(EG),wG={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var mv;(function(t){t.InvalidAuthTokens="InvalidAuthTokens"})(mv||(mv={}));const xG={[mv.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},_G=my(xG),wM="CognitoIdentityServiceProvider";class AG{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){_G(e!==void 0,mv.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 TG(wM,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){lt(this.authConfig?.Cognito);const e=this.authConfig.Cognito.userPoolClientId;return`${wM}.${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 TG=(t,e)=>kA(wG)(`${t}`,e);function kA(t){const e=Object.values({...t});return(n,r)=>e.reduce((s,o)=>({...s,[o]:`${n}.${r}.${o}`}),{})}const xM="amplify-signin-with-hostedUI",ho="CognitoIdentityServiceProvider";class y6{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(xM),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(xM),[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)=>kA(uG)(t,e),Fr=new y6(Kh),Mx=[],RG=t=>{Mx.push(t)},b6=()=>{for(;Mx.length;)Mx.pop()?.()};class IG{constructor(){this.waitForInflightOAuth=Sy()?async()=>{if(await Fr.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((e,n)=>{RG(e)}),this.inflightPromise)}:async()=>{}}setAuthConfig(e){Fr.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&&JN({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),o=JN({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",_o),o}catch(s){return this.handleErrors(s)}}handleErrors(e){if(Os(e),this.isAuthenticationError(e)&&this.clearTokens(),Ao.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",_o),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 OG{constructor(){this.authTokenStore=new AG,this.authTokenStore.setKeyValueStorage(Kh),this.tokenOrchestrator=new IG,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(CG)}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 Bm=new OG,{tokenOrchestrator:$r}=Bm;async function _i(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 $r.setTokens({tokens:c})}else throw new Hr({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}const NG="Unable to get user session following successful sign-in.",Ga=async()=>{try{Ao.dispatch("auth",{event:"signedIn",data:await xy()},"Auth",_o)}catch(t){throw t.name===wy?new Le({name:oG,message:NG,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 S6(){return{active:!1}}const MG=(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 S6();default:return t}},PG=t=>{let e=t(S6(),{type:"RESET"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Aa=PG(MG),kG=180*1e3,Lg="CognitoSignInState",di={username:`${Lg}.username`,challengeName:`${Lg}.challengeName`,signInSession:`${Lg}.signInSession`,expiry:`${Lg}.expiry`},DG=(t,e)=>{switch(e.type){case"SET_SIGN_IN_SESSION":return Ug({signInSession:e.value}),{...t,signInSession:e.value};case"SET_SIGN_IN_STATE":return Ug(e.value),{...e.value};case"SET_CHALLENGE_NAME":return Ug({challengeName:e.value}),{...t,challengeName:e.value};case"SET_USERNAME":return Ug({username:e.value}),{...t,username:e.value};case"SET_INITIAL_STATE":return UG();case"RESET_STATE":return E6(),DA();default:return t}},LG=t=>{const e=Number(t),n=Date.now();return e<=n},Qs=()=>{Ro.dispatch({type:"RESET_STATE"})},E6=()=>{for(const t of Object.values(di))ci.removeItem(t)},DA=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),UG=()=>{const t=ci.getItem(di.expiry);if(!t||LG(t))return E6(),DA();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}},FG=t=>{let e=t(DA(),{type:"SET_INITIAL_STATE"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Ro=FG(DG);function Jl(t){Ro.dispatch({type:"SET_SIGN_IN_STATE",value:t})}const Ug=({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()+kG)))},_M="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 Rs extends Hr{constructor(e){super(e),this.constructor=Rs,Object.setPrototypeOf(this,Rs.prototype)}}var jt;(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"})(jt||(jt={}));const U1="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",AM="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",Dc={[jt.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:_M},[jt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:AM},[jt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:AM},[jt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:_M},[jt.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."},[jt.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[jt.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:U1},[jt.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:U1},[jt.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:U1},[jt.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},rd=my(Dc,Rs),C6=t=>{if(t instanceof Error){if(t.name==="AbortError"){const{message:e,recoverySuggestion:n}=Dc[jt.PasskeyOperationAborted];return new Rs({name:jt.PasskeyOperationAborted,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="SecurityError"){const{message:e,recoverySuggestion:n}=Dc[jt.RelyingPartyMismatch];return new Rs({name:jt.RelyingPartyMismatch,message:e,recoverySuggestion:n,underlyingError:t})}}return new Rs({name:Pa.Unknown,message:"An unknown error has occurred.",underlyingError:t})},zG=t=>{if(t instanceof Rs)return t;if(t instanceof Error&&t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=Dc[jt.PasskeyAuthenticationCanceled];return new Rs({name:jt.PasskeyAuthenticationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}return C6(t)},w6=()=>Sy()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Co=t=>kc.convert(new Uint8Array(t),{urlSafe:!0,skipPadding:!0}),nh=t=>Uint8Array.from(IA.convert(t,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,jG=t=>{const e=nh(t.user.id),n=nh(t.challenge),r=(t.excludeCredentials||[]).map(s=>({...s,id:nh(s.id)}));return{...t,excludeCredentials:r,challenge:n,user:{...t.user,id:e}}},BG=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},HG=t=>{const e=nh(t.challenge),n=(t.allowCredentials||[]).map(r=>({...r,id:nh(r.id)}));return{...t,challenge:e,allowCredentials:n}},$G=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 qG(t){rd([!!t,!!t?.challenge,!!t?.user,!!t?.rp,!!t?.pubKeyCredParams].every(Boolean),jt.InvalidPasskeyRegistrationOptions)}function WG(t){rd(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAttestationResponse,jt.PasskeyRegistrationFailed)}function GG(t){rd(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAssertionResponse,jt.PasskeyRetrievalFailed)}const VG=async t=>{try{const e=w6();rd(e,jt.PasskeyNotSupported);const n=HG(t),r=await navigator.credentials.get({publicKey:n});return GG(r),$G(r)}catch(e){throw zG(e)}},KG=t=>Rn(Bn,jn("ConfirmDevice"),ir(),{...Hn,...t}),Hm={convert(t){return new TextEncoder().encode(t)}};function Ie(t,e){t!=null&&this.fromString(t,e)}function xr(){return new Ie(null,null)}let Ia;const YG=0xdeadbeefcafe,TM=(YG&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 XG(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 QG(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 RM=typeof navigator<"u";RM&&TM&&navigator.appName==="Microsoft Internet Explorer"?(Ie.prototype.am=XG,Ia=30):RM&&TM&&navigator.appName!=="Netscape"?(Ie.prototype.am=ZG,Ia=26):(Ie.prototype.am=QG,Ia=28);Ie.prototype.DB=Ia;Ie.prototype.DM=(1<<Ia)-1;Ie.prototype.DV=1<<Ia;const LA=52;Ie.prototype.FV=Math.pow(2,LA);Ie.prototype.F1=LA-Ia;Ie.prototype.F2=2*Ia-LA;const JG="0123456789abcdefghijklmnopqrstuvwxyz",_y=[];let sd,As;sd=48;for(As=0;As<=9;++As)_y[sd++]=As;sd=97;for(As=10;As<36;++As)_y[sd++]=As;sd=65;for(As=10;As<36;++As)_y[sd++]=As;function IM(t){return JG.charAt(t)}function eV(t,e){const n=_y[t.charCodeAt(e)];return n??-1}function tV(t){for(let e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function nV(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 UA(t){const e=xr();return e.fromInt(t),e}function rV(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=eV(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 sV(){const t=this.s&this.DM;for(;this.t>0&&this[this.t-1]==t;)--this.t}function oV(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=IM(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+=IM(r));return s?o:"0"}function iV(){const t=xr();return Ie.ZERO.subTo(this,t),t}function aV(){return this.s<0?this.negate():this}function lV(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 FA(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 uV(){return this.t<=0?0:this.DB*(this.t-1)+FA(this[this.t-1]^this.s&this.DM)}function cV(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 dV(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 fV(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 hV(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 pV(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 gV(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 mV(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 vV(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=xr());const o=xr(),a=this.s,u=t.s,c=this.DB-FA(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?xr():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 _=n[--E]===p?this.DM:Math.floor(n[E]*m+(n[E-1]+S)*y);if((n[E]+=o.am(0,_,n,C,0,f))<_)for(o.dlShiftTo(C,w),n.subTo(w,n);n[E]<--_;)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 yV(t){const e=xr();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Ie.ZERO)>0&&t.subTo(e,e),e}function bV(){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 SV(t){return this.compareTo(t)===0}function EV(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 CV(t){const e=xr();return this.addTo(t,e),e}function wV(t){const e=xr();return this.subTo(t,e),e}function xV(t){const e=xr();return this.multiplyTo(t,e),e}function _V(t){const e=xr();return this.divRemTo(t,e,null),e}function od(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 AV(t){const e=xr();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 TV(t){const e=xr();return t.copyTo(e),this.reduce(e),e}function RV(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 IV(t,e){t.squareTo(e),this.reduce(e)}function OV(t,e,n){t.multiplyTo(e,n),this.reduce(n)}od.prototype.convert=AV;od.prototype.revert=TV;od.prototype.reduce=RV;od.prototype.mulTo=OV;od.prototype.sqrTo=IV;function NV(t,e,n){let r=t.bitLength(),s,o=UA(1);const a=new od(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=xr();for(a.sqrTo(u[1],w);c<=p;)u[c]=xr(),a.mulTo(w,u[c-2],u[c]),c+=2}let g=t.t-1,m,y=!0,S=xr(),E;for(r=FA(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=tV;Ie.prototype.fromInt=nV;Ie.prototype.fromString=rV;Ie.prototype.clamp=sV;Ie.prototype.dlShiftTo=cV;Ie.prototype.drShiftTo=dV;Ie.prototype.lShiftTo=fV;Ie.prototype.rShiftTo=hV;Ie.prototype.subTo=pV;Ie.prototype.multiplyTo=gV;Ie.prototype.squareTo=mV;Ie.prototype.divRemTo=vV;Ie.prototype.invDigit=bV;Ie.prototype.addTo=EV;Ie.prototype.toString=oV;Ie.prototype.negate=iV;Ie.prototype.abs=aV;Ie.prototype.compareTo=lV;Ie.prototype.bitLength=uV;Ie.prototype.mod=yV;Ie.prototype.equals=SV;Ie.prototype.add=CV;Ie.prototype.subtract=wV;Ie.prototype.multiply=xV;Ie.prototype.divide=_V;Ie.prototype.modPow=NV;Ie.ZERO=UA(0);Ie.ONE=UA(1);const MV=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))})})}),PV="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",x6={},Px={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),x6[t]=e,Px[e]=t}const Lc=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 Px)e[n/2]=Px[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e},zA=t=>{let e="";for(let n=0;n<t.byteLength;n++)e+=x6[t[n]];return e},kx=t=>{const e=new zl;e.update(t);const n=e.digestSync(),r=zA(n);return new Array(64-r.length).join("0")+r},$m=t=>kx(Lc(t)),kV=/^[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=kV.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},DV=({A:t,B:e})=>{const n=new Ie($m(ii(t)+ii(e)),16);if(n.equals(Ie.ZERO))throw new Error("U cannot be zero.");return n},LV=(t,e,n)=>{const r=new zl(e);r.update(t);const s=r.digestSync(),o=new zl(s);return o.update(n),o.digestSync().slice(0,16)},jA=t=>{const e=new PA().random(t).toString();return Lc(e)},UV=()=>kc.convert(jA(40));class FV{constructor({userPoolName:e,a:n,g:r,A:s,N:o}){this.encoder=Hm,this.userPoolName=e,this.a=n,this.g=r,this.A=s,this.N=o,this.k=new Ie($m(`${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=UV();const r=`${e}${n}:${this.randomPassword}`,s=kx(r),o=zA(jA(16));return this.saltToHashDevices=ii(new Ie(o,16)),new Promise((a,u)=>{this.g.modPow(new Ie($m(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=DV({A:this.A,B:r}),a=`${this.userPoolName}${e}:${n}`,u=kx(a),c=new Ie($m(ii(s)+u),16),f=await MV({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),LV(Lc(ii(f)),Lc(ii(o)),m)}}const zV=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)})}),Zh=async t=>{const e=new Ie(PV,16),n=new Ie("2",16),r=jV(),s=await zV({a:r,g:n,N:e});return new FV({userPoolName:t,a:r,g:n,A:s,N:e})},jV=()=>{const t=zA(jA(128));return new Ie(t,16)};async function eu({userPoolId:t,userPoolEndpoint:e,newDeviceMetadata:n,accessToken:r}){if(!n)return;const s=t.split("_")[1]||"",o=await Zh(s),a=n?.DeviceKey,u=n?.DeviceGroupKey;try{await o.generateHashDevice(u??"",a??"")}catch{return}const c={Salt:kc.convert(Lc(o.getSaltToHashDevices())),PasswordVerifier:kc.convert(Lc(o.getVerifierDevices()))},f=o.getRandomPassword();try{return await KG({endpointResolver:bt({endpointOverride:e})})({region:yt(t)},{AccessToken:r,DeviceName:await qW(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:c}),{deviceKey:a,deviceGroupKey:u,randomPassword:f}}catch{return}}async function BV(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;rd(!!a,jt.InvalidPasskeyAuthenticationOptions);const u=await VG(JSON.parse(a)),c=as({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(Jl({signInSession:m,username:n,challengeName:f,signInDetails:s}),g)return await _i({...g,username:n,NewDeviceMetadata:await eu({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 HV=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],$V=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],_6=()=>{const t=new Date,e=$V[t.getUTCDay()],n=HV[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}`},A6=({userPoolName:t,username:e,challengeParameters:n,dateNow:r,hkdf:s})=>{const o=Hm.convert(t),a=Hm.convert(e),u=qV(n.SECRET_BLOCK),c=Hm.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 zl(s);p.update(f);const g=p.digestSync();return kc.convert(g)},qV=t=>{const e="=".repeat((4-t.length%4)%4),n=(t+e).replace(/-/g,"+").replace(/_/g,"/"),r=IA.convert(n),s=new Uint8Array(r.length);for(let o=0;o<r.length;++o)s[o]=r.charCodeAt(o);return s};async function Xh({username:t,config:e,clientMetadata:n,session:r,tokenOrchestrator:s}){const{userPoolId:o,userPoolEndpoint:a}=e,u=e.userPoolClientId,c=await s?.getDeviceMetadata(t);g6(c);const f=await Zh(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=as({endpointResolver:bt({endpointOverride:a})}),{ChallengeParameters:y,Session:S}=await m({region:yt(o)},g);return WV(t,y,n,S,f,e,s)}async function WV(t,e,n,r,s,{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u},c){const f=await c?.getDeviceMetadata(t);g6(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=_6(),C={USERNAME:e?.USERNAME??t,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:A6({username:m,userPoolName:y,challengeParameters:e,dateNow:E,hkdf:S}),DEVICE_KEY:m},w=$n({username:t,userPoolId:o,userPoolClientId:a}),_={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:C,Session:r,ClientMetadata:n,UserContextData:w};return as({endpointResolver:bt({endpointOverride:u})})({region:yt(o)},_)}async function BA(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=_6(),C={USERNAME:y,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:A6({username:y,userPoolName:p,challengeParameters:e,dateNow:E,hkdf:S})},w=await a.getDeviceMetadata(y);w&&w.deviceKey&&(C.DEVICE_KEY=w.deviceKey);const _=$n({username:y,userPoolId:u,userPoolClientId:c}),T={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:r,ClientId:c,UserContextData:_},M=await as({endpointResolver:bt({endpointOverride:f})})({region:yt(u)},T);return M.ChallengeName==="DEVICE_SRP_AUTH"?Xh({username:y,config:o,clientMetadata:n,session:M.Session,tokenOrchestrator:a}):M}async function id(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 tu(t){const{dispatch:e}=Ro;e({type:"SET_USERNAME",value:t})}async function T6({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 Zh(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 Yh({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Nt(Ve.SignIn)},S),{ChallengeParameters:w,Session:_}=C,T=w?.USERNAME??t;return tu(T),C.ChallengeName==="PASSWORD_VERIFIER"?id(BA,[e,w,n,_,g,r,s],T,s):C}async function GV({username:t,session:e,selectedChallenge:n,config:r,clientMetadata:s}){return as({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 VV(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 as({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 tu(m),g}async function KV(t,e,n,r,s,o){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=r,f=a.split("_")[1]||"",p=await Zh(f),g={ANSWER:"PASSWORD_SRP",USERNAME:t,SRP_A:p.A.toString(16)},m=$n({username:t,userPoolId:a,userPoolClientId:u}),S=await as({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 tu(E),S.ChallengeName==="PASSWORD_VERIFIER"?id(BA,[e,S.ChallengeParameters,n,S.Session,p,r,o],E,o):S}const Dx="userAttributes.";function YV(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 as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},m);return S.ChallengeName==="DEVICE_SRP_AUTH"?Xh({username:r,config:s,clientMetadata:e,session:S.Session,tokenOrchestrator:o}):S}async function XV({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=vG({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 as({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 as({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 QV({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:lK(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 as({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Nt(Ve.ConfirmSignIn)},p)}async function JV({challengeResponse:t,clientMetadata:e,session:n,username:r,requiredAttributes:s,config:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o,f={...iK(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 as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},g)}async function eK(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 Yh({endpointResolver:bt({endpointOverride:u})})({region:yt(a),userAgentValue:Nt(Ve.SignIn)},g),S=y.ChallengeParameters?.USERNAME??y.ChallengeParameters?.USER_ID_FOR_SRP??t;return tu(S),y.ChallengeName==="DEVICE_SRP_AUTH"?Xh({username:S,config:r,clientMetadata:n,session:y.Session,tokenOrchestrator:s}):y}async function tK(t,e,n,r,s){return T6({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:"USER_SRP_AUTH"})}async function nK(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 Yh({endpointResolver:bt({endpointOverride:a})})({region:yt(o),userAgentValue:Nt(Ve.SignIn)},p),y=m.ChallengeParameters?.USERNAME??t;return tu(y),m.ChallengeName==="DEVICE_SRP_AUTH"?Xh({username:y,config:n,clientMetadata:e,session:m.Session,tokenOrchestrator:r}):m}async function rK(t,e,n,r,s){lt(r);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c=o?.split("_")[1]||"",f=await Zh(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=Yh({endpointResolver:bt({endpointOverride:u})}),{ChallengeParameters:S,Session:E}=await y({region:yt(o),userAgentValue:Nt(Ve.SignIn)},m),C=S?.USERNAME??t;return tu(C),id(BA,[e,S,n,E,f,r,s],C,s)}async function nu(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=OM(NM(n.MFAS_CAN_SETUP))||[],c=cK(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=yG({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:sK(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:oK(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:OM(NM(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 BV(n);return YV(o)?o:nu(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 sK(t,e){return{sharedSecret:t,getSetupUri:(n,r)=>{const s=`otpauth://totp/${n}:${r??e}?secret=${t}&issuer=${n}`;return new Wa(s)}}}function ad(t){if(t===gv.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(t===gv.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function oK(t){return t?JSON.parse(t).map(n=>n.includes(Dx)?n.replace(Dx,""):n):[]}function iK(t){if(!t)return{};const e={};return Object.entries(t).forEach(([n,r])=>{r&&(e[`${Dx}${n}`]=r)}),e}async function aK(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:{}}:GV({username:t,session:n,selectedChallenge:r,config:s,clientMetadata:a});case"SELECT_MFA_TYPE":return QV({challengeResponse:r,clientMetadata:a,session:n,username:t,config:s});case"MFA_SETUP":return XV({challengeResponse:r,clientMetadata:a,session:n,username:t,deviceName:f,config:s});case"NEW_PASSWORD_REQUIRED":return JV({challengeResponse:r,clientMetadata:a,session:n,username:t,requiredAttributes:c,config:s});case"CUSTOM_CHALLENGE":return id(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 dK({challengeName:e,challengeResponse:r,clientMetadata:a,session:n,username:t,config:s,tokenOrchestrator:o});case"PASSWORD":return VV(t,r,a,s,n);case"PASSWORD_SRP":return KV(t,r,a,s,n,o)}throw new Le({name:To.SignInException,message:`An error occurred during the sign in process.
|
|
@@ -145,7 +145,7 @@ 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
|
-
}`;V8(qJ);var dAe=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(HJ,null):u,f=t.pullingContent,p=f===void 0?z.createElement($J,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,_=t.resistance,T=_===void 0?1:_,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,j=!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"),j=!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),j&&(j=!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"&&G8(V.target,bh.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){j||s&&$()<E&&a&&(j=!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 WJ=()=>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))]}),GJ=()=>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))}),JA=()=>D.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[D.jsx(WJ,{}),D.jsx(GJ,{})]}),eT="
|
|
148
|
+
}`;V8(qJ);var dAe=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(HJ,null):u,f=t.pullingContent,p=f===void 0?z.createElement($J,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,_=t.resistance,T=_===void 0?1:_,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,j=!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"),j=!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),j&&(j=!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"&&G8(V.target,bh.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){j||s&&$()<E&&a&&(j=!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 WJ=()=>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))]}),GJ=()=>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))}),JA=()=>D.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[D.jsx(WJ,{}),D.jsx(GJ,{})]}),eT="c65ea1b5422682005924114fb0e0bf087a55e460",VJ="2026-07-21T08:04:38.757Z",KJ=eT.slice(0,7),fAe=`https://github.com/remit-mail/reader/commit/${eT}`,YJ="https://github.com/remit-mail/reader/issues/new";class Kx extends Error{constructor(e,n,r){super(e),this.status=n,this.body=r,this.name="ApiError"}status;body}const ud=t=>{if(t instanceof Kx)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}},K8=t=>ud(t)!==void 0,Py=t=>{const e=ud(t);return e!==void 0&&e>=500&&e<=599},ky=t=>!!(typeof DOMException<"u"&&t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"),ZJ=()=>typeof navigator<"u"&&navigator.onLine===!1,Y8=t=>ky(t)||K8(t)?!1:t instanceof GA?!0:ZJ(),XJ=t=>!K8(t)&&!ky(t)&&!Y8(t),Z8=t=>Py(t)||XJ(t),QJ=t=>t?.softError===!0,X8=(t,e)=>Py(t)?!0:ky(t)||Y8(t)?!1:Z8(t)?!0:!QJ(e),JJ=t=>Py(t),Yx=new Set;let Q8=null,J8=null;const eee=t=>{J8=t},tee=t=>t instanceof Error?t:new Error(e9(t)),e9=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.",nee=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,Bl=(t,e)=>{const n={error:t,message:e9(t),correlationId:nee(),at:Date.now(),recoverable:e?.recoverable??JJ(t),stack:t instanceof Error?t.stack:void 0,componentStack:e?.componentStack};Q8=n,lee(`Fatal: ${n.message} [${n.correlationId}]`),J8?.recordError(tee(t),{fatal:"true",correlationId:n.correlationId});for(const r of Yx)r(n);return n},ree=t=>(Yx.add(t),()=>{Yx.delete(t)}),see=()=>Q8,oee=20,Ym=[],iee=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function aee(t){return typeof t!="string"?!1:iee.has(t.replace(/\.\s*$/,""))}function Zm(t){Ym.push(t),Ym.length>oee&&Ym.shift()}function lee(t){Zm(t)}function uee(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 cee(){const t=console.error.bind(console);console.error=(...e)=>{Zm(uee(e)),t(...e)},window.addEventListener("error",e=>{aee(e.message)||(Zm(`Uncaught ${e.error instanceof Error?`${e.error.name}: ${e.error.message}`:String(e.message)} (${e.filename}:${e.lineno})`),Bl(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{const n=e.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);Zm(`Unhandled rejection: ${r}`),Bl(n)})}function dee(){return Ym.slice()}const lS=7500,RP=`
|
|
149
149
|
… (truncated — the copy action on this screen has the full report)`;function IP(t){return{appSha:eT,appShortSha:KJ,appBuildTime:VJ,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:dee(),errorMessage:t?.errorMessage,stack:t?.stack,componentStack:t?.componentStack,quarantine:t?.quarantine,title:t?.title}}function uS(t){return["```",t,"```"].join(`
|
|
150
150
|
`)}function t9(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,""];if(t.errorMessage&&r.push("## Error",t.errorMessage,""),t.quarantine){const o=e?.quarantineStructure??t.quarantine.structure;r.push(t.quarantine.head,"",uS(o),"",t.quarantine.disclaimer,"")}const s=e?.stack??t.stack;return s&&r.push("## Stacktrace",uS(s),""),t.componentStack&&r.push("## Component stack",uS(t.componentStack),""),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
|
|
@@ -213,7 +213,7 @@ Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Mw=n,M
|
|
|
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 j=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),_(Y,j),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 pw.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)},pw}var kw={},Dw={},wL;function PF(){return wL||(wL=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}}})(Dw)),Dw}var xL;function dce(){return xL||(xL=1,(function(t){const e=PF();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)}})(kw)),kw}var Lw={},_L;function fce(){if(_L)return Lw;_L=1;const t=PF();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 Lw.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},Lw}var AL;function hce(){if(AL)return nc;AL=1;const t=Gue(),e=cce(),n=dce(),r=fce();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 nc.create=e.create,nc.toCanvas=s.bind(null,n.render),nc.toDataURL=s.bind(null,n.renderToDataURL),nc.toString=s.bind(null,function(o,a,u){return r.render(o,u)}),nc}var pce=hce();const gce=qa(pce),mce=t=>t==="signIn"||t==="signUp",ZT=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:vce,getConfirmingText:yce,getBackToSignInText:bce,getResendCodeText:Sce}=kn,ib=()=>{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=ZT(n)&&a&&r;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:yce()},vce()),u&&z.createElement(Jt,{onClick:r,type:"button"},Sce()),z.createElement(Jt,{onClick:e,type:"button",variation:"link",size:"small"},bce()))},Ece=new rr("SetupTotp-logger"),{getSetupTotpText:Cce,getCopiedText:wce,getLoadingText:xce}=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}=ds(),{components:{SetupTotp:{Header:c=Ua.Header,Footer:f=Ua.Footer}}}=cs(),[p,g]=A.useState(!0),[m,y]=A.useState(),[S,E]=A.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:w=s}=o??{},_=A.useCallback(async()=>{try{const R=pre(C,w,n),M=await gce.toDataURL(R);y(M)}catch(R){Ece.error(R)}finally{g(!1)}},[C,w,n]);A.useEffect(()=>{m||_()},[_,m]);const T=()=>{navigator.clipboard.writeText(n),E(wce())};return A.createElement(qr,{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,xce(),"…"):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(Gr,null)),A.createElement(ib,null),A.createElement(f,null))))};Ua.Header=function(){return A.createElement(_r,{level:3},Cce())};Ua.Footer=function(){return null};const{getSubmitText:_ce,getSubmittingText:Ace}=kn,ab=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,Ace(),"…"):z.createElement(z.Fragment,null,_ce()),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)))},Tce=()=>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"})),Rce=()=>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"})),Ice=()=>z.createElement(hF,{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"}),Oce=()=>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"})),Jg=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(Ice,null):e==="google"?a=z.createElement(Rce,null):e==="amazon"?a=z.createElement(Oce,null):e==="apple"&&(a=z.createElement(Tce,null)),z.createElement(Jt,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,z.createElement(Ts,{as:"span"},r))},{getSignInWithFederationText:em,getOrText:Nce}=kn;function kF(){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(Jg,{icon:"amazon",key:n,provider:Ec.Amazon,text:em(t,n)});case"apple":return z.createElement(Jg,{icon:"apple",key:n,provider:Ec.Apple,text:em(t,n)});case"facebook":return z.createElement(Jg,{icon:"facebook",key:n,provider:Ec.Facebook,text:em(t,n)});case"google":return z.createElement(Jg,{icon:"google",key:n,provider:Ec.Google,text:em(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(BT,{size:"small",label:Nce()}))}const{getSignInText:tm,getSigningInText:Mce,getForgotPasswordText:Pce,getSignInWithEmailText:kce,getSignInWithSmsText:Dce,getSignInWithPasskeyText:Lce,getOtherSignInOptionsText:Uce,getEnterUsernameFirstText:Fce}=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}=ds(),[a,u]=z.useState(""),{components:{SignIn:{Header:c=Si.Header,Footer:f=Si.Footer}}}=cs(),g=e&&e.length>1&&n,m=a.trim().length>0,y=z.useCallback(w=>{const{name:_,value:T}=w.target;_==="username"&&typeof T=="string"&&u(T),s(w)},[s]),S=()=>{if(!n)return tm();switch(n){case"EMAIL_OTP":return kce();case"SMS_OTP":return Dce();case"WEB_AUTHN":return Lce();default:return tm()}},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(kF,null),z.createElement(Fe,{direction:"column"},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:t},z.createElement(sb,null,z.createElement("legend",null,tm())),z.createElement(Mo,null)),z.createElement(Gr,null),z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:Mce()},g?S():tm()),g&&z.createElement(Jt,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:Fce()},Uce()),z.createElement(f,null))))}const zce=()=>{const{toForgotPassword:t}=St(e=>[e.toForgotPassword]);return z.createElement($e,{"data-amplify-footer":""},z.createElement(Jt,{onClick:t,size:"small",variation:"link"},Pce()))};Si.Footer=zce;Si.Header=function(){return null};const{getCreateAccountText:TL,getCreatingAccountText:jce,getCreateAccountWithEmailText:Bce,getCreateAccountWithPasswordText:Hce,getCreateAccountWithSmsText:$ce,getOrText:qce}=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}=ds(),{components:{SignUp:{Header:c=Xs.Header,FormFields:f=Xs.FormFields,Footer:p=Xs.Footer}}}=cs(),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 Bce();case"SMS_OTP":return $ce();case"PASSWORD":return m?Hce():TL();default:return TL()}},_=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(kF,null),z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:e},z.createElement(Fe,{direction:"column"},z.createElement(f,{includePassword:!C}),z.createElement(Gr,null)),z.createElement(Jt,{isDisabled:(!m||S.length==0)&&t||e,isFullWidth:!0,type:"submit",variation:"primary",isLoading:e,loadingText:jce(),onClick:_(y)},w(y)),m&&S.length>0&&z.createElement(z.Fragment,null,z.createElement(Fe,{justifyContent:"center",padding:"medium 0"},qce()),S.map(T=>z.createElement(Jt,{key:T,isDisabled:e,isFullWidth:!0,type:"button",variation:"primary",onClick:_(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:Wce,getSignUpTabText:Gce}=kn,Vce=({className:t,hideSignUp:e,variation:n})=>{const{route:r,toSignIn:s,toSignUp:o}=St(a=>[a.route,a.toSignIn,a.toSignUp]);return z.createElement(qr,{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"},Wce()),z.createElement(Sl.Item,{value:"signUp"},Gce())),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:Kce,getSkipText:Yce}=kn,ql=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ConfirmVerifyUser:{Header:o=ql.Header,Footer:a=ql.Footer}}}=cs();return z.createElement(qr,{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(Gr,null),z.createElement(ab,{cancelButtonText:Yce(),cancelButtonSendType:"SKIP"}),z.createElement(a,null))))};ql.Header=function(){return z.createElement(_r,{level:3},Kce())};ql.Footer=function(){return null};const{getSkipText:Zce,getVerifyText:Xce,getVerifyContactText:Qce,getAccountRecoveryInfoText:Jce}=kn,ede=t=>Object.entries(t).map(([e,n],r)=>{const s=Vy[e].label;return z.createElement($T,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",fre(s,n))}),Wl=({className:t,variation:e})=>{const{components:{VerifyUser:{Header:n=Wl.Header,Footer:r=Wl.Footer}}}=cs(),{isPending:s,unverifiedUserAttributes:o}=St(({isPending:p,unverifiedUserAttributes:g})=>[p,g]),{handleChange:a,handleSubmit:u}=ds(),c=s?z.createElement(z.Fragment,null,"Verifying…"):z.createElement(z.Fragment,null,Xce()),f=z.createElement(qT,{legend:Qce(),name:"verify_context",isDisabled:s,legendHidden:!0},ede(o));return z.createElement(qr,{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(Gr,null),z.createElement(ab,{cancelButtonText:Zce(),cancelButtonSendType:"SKIP",submitButtonText:c}),z.createElement(r,null))))};Wl.Header=function(){return z.createElement(_r,{level:3},Jce())};Wl.Footer=function(){return null};const{getChallengeText:tde,getDeliveryMessageText:nde,getDeliveryMethodText:rde}=kn,Gl=({className:t,variation:e})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:s}=St(p=>[p.isPending,p.challengeName,p.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=ds(),{components:{ConfirmSignIn:{Header:u=Gl.Header,Footer:c=Gl.Footer}}}=cs(),f=ZT(r)&&s;return z.createElement(qr,{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(Ts,{className:"amplify-authenticator__subtitle"},nde(s)),z.createElement(Mo,null),z.createElement(Gr,null)),z.createElement(ib,null),z.createElement(c,null))))};function sde(){const{challengeName:t,codeDeliveryDetails:e}=St(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=ZT(t)&&e;return z.createElement(z.Fragment,null,z.createElement(_r,{level:3},tde(t)),n&&z.createElement(_r,{level:5},rde(e)))}Gl.Header=sde;Gl.Footer=function(){return null};const{getResendCodeText:ode,getResetYourPasswordText:ide}=kn,Vl=({className:t,variation:e})=>{const{isPending:n}=St(c=>[c.isPending]),{handleBlur:r,handleChange:s,handleSubmit:o}=ds(),{components:{ConfirmResetPassword:{Header:a=Vl.Header,Footer:u=Vl.Footer}}}=cs();return z.createElement(qr,{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(Gr,null),z.createElement(ab,{cancelButtonSendType:"RESEND",cancelButtonText:ode()}),z.createElement(u,null))))};Vl.Header=function(){const e=ide();return z.createElement(_r,{level:3},e)};Vl.Footer=function(){return null};const{getBackToSignInText:ade,getSendingText:lde,getSendCodeText:ude,getResetYourPasswordText:cde}=kn,Fa=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ForgotPassword:{Header:o=Fa.Header,Footer:a=Fa.Footer}}}=cs();return z.createElement(qr,{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(Gr,null),z.createElement(ab,{cancelButtonText:ade(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?z.createElement(z.Fragment,null,lde(),"…"):z.createElement(z.Fragment,null,ude())}),z.createElement(a,null))))};Fa.Header=function(){return z.createElement(_r,{level:3},cde())};Fa.Footer=function(){return null};const{getMfaTypeLabelByValue:dde,getSelectMfaTypeByChallengeName:fde,getSelectMfaTypeText:hde}=kn,za=({className:t,variation:e})=>{const{isPending:n,allowedMfaTypes:r=[]}=St(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:s,handleSubmit:o}=ds(),{components:{SelectMfaType:{Header:a=za.Header,Footer:u=za.Footer}}}=cs();return A.createElement(qr,{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(qT,{name:"mfa_type",legend:hde(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>A.createElement($T,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},dde(c)))),A.createElement(Gr,null)),A.createElement(ib,null),A.createElement(u,null))))};za.Header=function(){const{challengeName:e}=St(n=>[n.challengeName]);return A.createElement(_r,{level:3},fde(e))};za.Footer=function(){return null};const{getSetupEmailText:pde}=kn,ja=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{SetupEmail:{Header:o=ja.Header,Footer:a=ja.Footer}}}=cs();return A.createElement(qr,{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(Gr,null)),A.createElement(ib,null),A.createElement(a,null))))};ja.Header=function(){return A.createElement(_r,{level:3},pde())};ja.Footer=function(){return null};const{getSignInWithPasswordText:c_,getSignInWithEmailText:gde,getSignInWithSmsText:mde,getSignInWithPasskeyText:vde,getSigningInText:yde,getBackToSignInText:bde,getOrText:Sde,getUsernameLabelByLoginMechanism:Ede}=kn,Cde=t=>{switch(t){case"EMAIL_OTP":return gde();case"SMS_OTP":return mde();case"WEB_AUTHN":return vde();case"PASSWORD":return c_();default:return c_()}},wde=({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}=ds(),p=s??[],g=p.includes("PASSWORD"),m=p.filter(E=>E!=="PASSWORD"),y=E=>{a({method:E})},S=Ede(u);return z.createElement(qr,{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(op,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),g&&z.createElement(z.Fragment,null,z.createElement(HT,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),z.createElement(Jt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:yde()},c_())),g&&m.length>0&&z.createElement(BT,{label:Sde()}),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)},Cde(E)))),z.createElement(Gr,null),z.createElement(Jt,{onClick:o,size:"small",variation:"link",isDisabled:n},bde()))))},xde=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(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"})))},_de=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(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:Ade,getPasskeyPromptDescriptionText:Tde,getCreatePasskeyText:Rde,getRegisteringText:Ide,getContinueWithoutPasskeyText:Ode,getPasskeyCreatedSuccessText:Nde,getPasskeyRegisteredText:Mde,getPasskeyRegistrationFailedText:Pde,getPasskeyLabelText:kde,getExistingPasskeysText:Dde,getSetupAnotherPasskeyText:Lde,getContinueText:Ude}=kn;function Fde({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 ST();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 Pne(),r(!0)}catch(w){const _=w,T=_.name??"",R=_.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(Pde())}finally{u(!1)}},[y]);if(n)return z.createElement(qr,{className:t,variation:e},z.createElement(Fe,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"xs"},z.createElement(xde,{className:"amplify-authenticator__passkey-success-icon"}),z.createElement(_r,{level:4},Nde()),z.createElement(Ts,null,Mde())),c.length>0&&z.createElement($e,{marginTop:"large"},z.createElement(_r,{level:5},Dde()),z.createElement(Fe,{direction:"column",gap:"xs",marginTop:"xs"},c.map((w,_)=>z.createElement($e,{key:w.credentialId,className:"amplify-authenticator__passkey-credential-item"},z.createElement(Ts,{fontSize:"small"},w.friendlyCredentialName??`${kde()} ${_+1}`))))),z.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},z.createElement(Jt,{onClick:()=>{r(!1),E()},variation:"link"},Lde()),z.createElement(Jt,{onClick:()=>S(),variation:"primary",isFullWidth:!0},Ude()))));const C=g||a;return z.createElement(qr,{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},Ade()),z.createElement(Ts,null,Tde()),z.createElement(Fe,{justifyContent:"center"},z.createElement(_de,{className:"amplify-authenticator__passkey-icon"})),z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(Jt,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:Ide()},Rde()),z.createElement(Jt,{onClick:y,variation:"link",isDisabled:C},Ode()),s&&z.createElement(Ts,{className:"amplify-authenticator__passkey-error"},s),z.createElement(Gr,null)))))}function RL(){return null}const zde=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return RL;case"confirmSignUp":return $l;case"confirmSignIn":return Gl;case"selectMfaType":return za;case"setupEmail":return ja;case"setupTotp":return Ua;case"signIn":case"signUp":return Vce;case"signInSelectAuthFactor":return wde;case"passkeyPrompt":return Fde;case"forceNewPassword":return Zs;case"forgotPassword":return Fa;case"confirmResetPassword":return Vl;case"verifyUser":return Wl;case"confirmVerifyUser":return ql;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${t}`),RL}};function jde({className:t,hideSignUp:e,variation:n}){const{route:r}=St(({route:o})=>[o]),s=A.useMemo(()=>zde(r),[r]);return z.createElement(s,{className:t,hideSignUp:mce(r)?e:void 0,variation:n})}const Bde={Header:()=>null,SignIn:{Header:Si.Header,Footer:Si.Footer},SignUp:{Header:Xs.Header,FormFields:Xs.FormFields,Footer:Xs.Footer},ConfirmSignUp:{Header:$l.Header,Footer:$l.Footer},SelectMfaType:{Header:za.Header,Footer:za.Footer},SetupEmail:{Header:ja.Header,Footer:ja.Footer},SetupTotp:{Header:Ua.Header,Footer:Ua.Footer},ConfirmResetPassword:{Header:Vl.Header,Footer:Vl.Footer},ConfirmSignIn:{Header:Gl.Header,Footer:Gl.Footer},VerifyUser:{Header:Wl.Header,Footer:Wl.Footer},ConfirmVerifyUser:{Header:ql.Header,Footer:ql.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}){Lue({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:_,signOut:T,user:R})=>[_,T,R]);hle({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:p,signUpAttributes:f,socialProviders:g,formFields:r});const C=A.useMemo(()=>({components:{...Bde,...n}}),[n]);return y==="authenticated"||y==="signOut"?t?A.createElement(A.Fragment,null,yi(t)?t({signOut:S,user:E}):t):null:A.createElement(RF.Provider,{value:C},A.createElement(jde,{className:e,hideSignUp:s,variation:m}))}function Po(t){return gle({componentName:"Authenticator",packageName:"react",version:Due}),A.createElement(cF,null,A.createElement(Hde,{...t}))}Po.Provider=cF;Po.ForgotPassword=Fa;Po.SetupTotp=Ua;Po.SignIn=Si;Po.SignUp=Xs;Po.ForceNewPassword=Zs;Po.SelectMfaType=za;Po.SetupEmail=ja;const DF=({cssText:t,...e})=>t===void 0||/<\/style/i.test(t)?null:A.createElement("style",{...e,dangerouslySetInnerHTML:{__html:t}});DF.displayName="Style";const LF=({theme:t,...e})=>{if(!t)return null;const{name:n,cssText:r}=t;return A.createElement(DF,{...e,cssText:r,id:`amplify-theme-${n}`})};LF.displayName="ThemeStyle";function $de({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=A.useMemo(()=>({theme:Jy(s),colorMode:e}),[s,e]);return A.createElement(dF.Provider,{value:o},A.createElement(fue,{dir:n},A.createElement("div",{"data-amplify-theme":o.theme.name,"data-amplify-color-mode":e,dir:n},t),s?A.createElement(LF,{theme:o.theme,nonce:r}):null))}const qde=({configured:t,authStatus:e})=>e==="authenticated",Wde=t=>t?t.signInDetails?.loginId??t.username??null:null,Gde=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=St(o=>[o.authStatus,o.signOut,o.user]);return qde({configured:!0,authStatus:n})?D.jsx(D.Fragment,{children:t({email:Wde(s),signOut:()=>r()})}):D.jsx(D.Fragment,{children:e})},Vde=({children:t,fallback:e=null})=>Ty()?D.jsx(Gde,{fallback:e,children:t}):D.jsx(D.Fragment,{children:e}),IL='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ri=t=>`var(${t})`,un=Ri("--accent"),Kde=Ri("--accent-hover"),OL=Ri("--accent-soft"),If=Ri("--accent-fg"),NL=Ri("--surface"),rc=Ri("--fg"),Yde=Ri("--surface-sunken"),nm=Ri("--fg-muted"),Of=Ri("--line"),Zde=Jy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:OL},20:{value:OL},40:{value:un},60:{value:un},80:{value:un},90:{value:un},100:{value:un}}},background:{primary:{value:NL},secondary:{value:Yde}},font:{primary:{value:rc},secondary:{value:nm},tertiary:{value:nm},interactive:{value:un},inverse:{value:If},hover:{value:un},focus:{value:un},active:{value:un}},border:{primary:{value:Of},secondary:{value:Of},focus:{value:un}}},fonts:{default:{variable:{value:IL},static:{value:IL}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Of},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:NL}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:nm}}},button:{color:{value:rc},primary:{backgroundColor:{value:un},color:{value:If},_hover:{backgroundColor:{value:Kde},color:{value:If}},_focus:{backgroundColor:{value:un},color:{value:If}},_active:{backgroundColor:{value:un},color:{value:If}}},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:rc},borderColor:{value:Of},_focus:{borderColor:{value:un},boxShadow:{value:`0 0 0 2px ${un}`}}},field:{label:{color:{value:rc}}},tabs:{borderColor:{value:Of},item:{color:{value:nm},backgroundColor:{value:"transparent"},_active:{color:{value:un},borderColor:{value:un},backgroundColor:{value:"transparent"}},_hover:{color:{value:un}},_focus:{color:{value:un}}}},heading:{color:{value:rc}},text:{color:{value:rc}}}}}),Xde={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"}}},Qde=()=>D.jsx(Wx,{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"})]})}),Jde=()=>D.jsx($8,{note:s9({betterAuthEnabled:!1,cognitoConfigured:Ty()})}),efe=({children:t})=>{const{authStatus:e}=St(n=>[n.authStatus]);return e==="authenticated"?D.jsx(D.Fragment,{children:t}):e==="configuring"?D.jsx(JA,{}):D.jsx($de,{theme:Zde,children:D.jsxs(H8,{children:[D.jsx(q8,{}),D.jsx(Po,{hideSignUp:!1,formFields:Xde,components:{Footer:Jde}})]})})},tfe=({children:t})=>Ty()?D.jsx(Po.Provider,{children:D.jsx(efe,{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(Qde,{}),t]}),UF=60;let Oc=null;const FF=()=>Math.floor(Date.now()/1e3),nfe=t=>t!==null&&t.expiresAt-UF>FF(),rfe=async()=>{const e=(await Ey()).tokens?.idToken;return e?(Oc={value:e.toString(),expiresAt:e.payload.exp??FF()+UF},Oc.value):(Oc=null,null)},sfe=async()=>Ty()?nfe(Oc)?Oc.value:rfe():null,ofe=()=>{Oc=null},Iv={configure:G6,getToken:sfe,resetToken:ofe,Shell:tfe,Account:Vde},ife=({children:t})=>Ry()?D.jsx(Cv.Shell,{children:t}):D.jsx(Iv.Shell,{children:t}),afe=t=>Ry()?D.jsx(Cv.Account,{...t}):D.jsx(Iv.Account,{...t}),lfe={configure:G6,getToken:()=>Ry()?Cv.getToken():Iv.getToken(),resetToken:()=>{Cv.resetToken(),Iv.resetToken()},Shell:ife,Account:afe};var ip=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(){}},ufe=class extends ip{#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"}},XT=new ufe,cfe={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},dfe=class{#e=cfe;#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)}},xl=new dfe;function ffe(t){setTimeout(t,0)}var hfe=typeof window>"u"||"Deno"in globalThis;function Ur(){}function pfe(t,e){return typeof t=="function"?t(e):t}function d_(t){return typeof t=="number"&&t>=0&&t!==1/0}function zF(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Oa(t,e){return typeof t=="function"?t(e):t}function is(t,e){return typeof t=="function"?t(e):t}function ML(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==QT(a,e.options))return!1}else if(!_h(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 PL(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(xh(e.options.mutationKey)!==xh(o))return!1}else if(!_h(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function QT(t,e){return(e?.queryKeyHashFn||xh)(t)}function xh(t){return JSON.stringify(t,(e,n)=>h_(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function _h(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>_h(t[n],e[n])):!1}var gfe=Object.prototype.hasOwnProperty;function jF(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=kL(t)&&kL(e);if(!r&&!(h_(t)&&h_(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:gfe.call(t,g))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[g]=y;continue}const S=jF(m,y,n+1);c[g]=S,S===m&&f++}return o===u&&f===o?t:c}function f_(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 kL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function h_(t){if(!DL(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!DL(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function DL(t){return Object.prototype.toString.call(t)==="[object Object]"}function mfe(t){return new Promise(e=>{xl.setTimeout(e,t)})}function p_(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?jF(t,e):e}function pAe(t){return t}function vfe(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function yfe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var JT=Symbol();function BF(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===JT?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function HF(t,e){return typeof t=="function"?t(...e):!!t}function bfe(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 Ah=(()=>{let t=()=>hfe;return{isServer(){return t()},setIsServer(e){t=e}}})();function g_(){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 Sfe=ffe;function Efe(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=Sfe;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 tr=Efe(),Cfe=class extends ip{#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}},Ov=new Cfe;function wfe(t){return Math.min(1e3*2**t,3e4)}function $F(t){return(t??"online")==="online"?Ov.isOnline():!0}var m_=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function qF(t){let e=!1,n=0,r;const s=g_(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new m_(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>XT.isFocused()&&(t.networkMode==="always"||Ov.isOnline())&&t.canRun(),p=()=>$F(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 _=t.retry??(Ah.isServer()?0:3),T=t.retryDelay??wfe,R=typeof T=="function"?T(n,w):T,M=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,w);if(e||!M){m(w);return}n++,t.onFail?.(n,w),mfe(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 WF=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),d_(this.gcTime)&&(this.#e=xl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ah.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(xl.clearTimeout(this.#e),this.#e=void 0)}};function xfe(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=>{bfe(S,()=>e.signal,()=>p=!0)},m=BF(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 _=(()=>{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(_),{maxPages:R}=e.options,M=C?yfe:vfe;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?GF:v_,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:v_(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 v_(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 GF(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}function gAe(t,e){return e?v_(t,e)!=null:!1}function mAe(t,e){return!e||!t.getPreviousPageParam?!1:GF(t,e)!=null}var _fe=class extends WF{#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=UL(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=UL(this.options);e.data!==void 0&&(this.setState(LL(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=p_(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(Ur).catch(Ur):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=>is(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===JT||!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:!zF(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=BF(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"?xfe(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=qF({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof m_&&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 m_){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,...VF(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...LL(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),tr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function VF(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$F(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function LL(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function UL(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 Afe=class extends ip{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=g_(),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),FL(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return y_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return y_(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 is(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&&!f_(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&zL(this.#t,n,this.options,e)&&this.#h(),this.updateResult(),r&&(this.#t!==n||is(this.options.enabled,this.#t)!==is(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||is(this.options.enabled,this.#t)!==is(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 Rfe(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(Ur)),e}#m(){this.#S();const t=Oa(this.options.staleTime,this.#t);if(Ah.isServer()||this.#r.isStale||!d_(t))return;const n=zF(this.#r.dataUpdatedAt,t)+1;this.#d=xl.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,!(Ah.isServer()||is(this.options.enabled,this.#t)===!1||!d_(this.#u)||this.#u===0)&&(this.#f=xl.setInterval(()=>{(this.options.refetchIntervalInBackground||XT.isFocused())&&this.#h()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#S(){this.#d!==void 0&&(xl.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(xl.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&&FL(t,e),H=P&&zL(t,n,e,r);(k||H)&&(p={...p,...VF(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=p_(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=p_(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",_=E==="pending",T=E==="error",R=_&&w,M=m!==void 0,I={status:E,fetchStatus:p.fetchStatus,isPending:_,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&&!_,isLoadingError:T&&!M,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&M,isStale:eR(t,e),refetch:this.refetch,promise:this.#a,isEnabled:is(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=g_();H(W)},j=this.#a;switch(j.status){case"pending":t.queryHash===n.queryHash&&H(j);break;case"fulfilled":(k||I.data!==j.value)&&F();break;case"rejected":(!k||I.error!==j.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),f_(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){tr.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Tfe(t,e){return is(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&is(e.retryOnMount,t)===!1)}function FL(t,e){return Tfe(t,e)||t.state.data!==void 0&&y_(t,e,e.refetchOnMount)}function y_(t,e,n){if(is(e.enabled,t)!==!1&&Oa(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&eR(t,e)}return!1}function zL(t,e,n,r){return(t!==e||is(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&eR(t,n)}function eR(t,e){return is(e.enabled,t)!==!1&&t.isStaleByTime(Oa(e.staleTime,t))}function Rfe(t,e){return!f_(t.getCurrentResult(),e)}var Ife=class extends WF{#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||Ofe(),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=qF({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),tr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Ofe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var KF=class extends ip{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 Ife({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=rm(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=rm(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=rm(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=rm(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){tr.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=>PL(e,n))}findAll(t={}){return this.getAll().filter(e=>PL(t,e))}notify(t){tr.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return tr.batch(()=>Promise.all(t.map(e=>e.continue().catch(Ur))))}};function rm(t){return t.options.scope?.id}var YF=class extends ip{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??QT(r,e);let o=this.get(s);return o||(o=new _fe({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(){tr.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=>ML(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>ML(t,n)):e}notify(t){tr.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){tr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Nfe=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new YF,this.#t=t.mutationCache||new KF,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=XT.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Ov.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=pfe(e,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return tr.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;tr.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return tr.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=tr.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Ur).catch(Ur)}invalidateQueries(t,e={}){return tr.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=tr.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(Ur)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Ur)}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(Ur).catch(Ur)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ur).catch(Ur)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Ov.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(xh(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{_h(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(xh(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{_h(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=QT(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===JT&&(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),XF=t=>{const e=A.useContext(ZF);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Mfe=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),D.jsx(ZF.Provider,{value:t,children:e})),QF=A.createContext(!1),Pfe=()=>A.useContext(QF);QF.Provider;function kfe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Dfe=A.createContext(kfe()),Lfe=()=>A.useContext(Dfe),Ufe=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?HF(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},Ffe=t=>{A.useEffect(()=>{t.clearReset()},[t])},zfe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||HF(n,[t.error,r])),jfe=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))}},Bfe=(t,e)=>t.isLoading&&t.isFetching&&!e,Hfe=(t,e)=>t?.suspense&&e.isPending,jL=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function $fe(t,e,n){const r=Pfe(),s=Lfe(),o=XF(),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,jfe(a),Ufe(a,s,u),Ffe(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(tr.batchCalls(y)):Ur;return p.updateResult(),S},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),A.useEffect(()=>{p.setOptions(a)},[a,p]),Hfe(a,g))throw jL(a,p,s);if(zfe({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&&!Ah.isServer()&&Bfe(g,r)&&(f?jL(a,p,s):u?.promise)?.catch(Ur).finally(()=>{p.updateResult()}),a.notifyOnChangeProps?g:p.trackResult(g)}function qfe(t,e){return $fe(t,Afe)}const Wfe="modulepreload",Gfe=function(t){return"/"+t},BL={},Wn=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=Gfe(f),f in BL)return;BL[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":Wfe,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 HL=A.use,Cc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Uw(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 Vfe(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 Kfe(t){const e=A.useRef(null);return A.useImperativeHandle(t,()=>e.current,[]),e}const JF=!1;function Th(t){return t[t.length-1]}function Yfe(t){return typeof t=="function"}function _l(t,e){return Yfe(t)?t(e):t}const e7=Object.prototype.hasOwnProperty,$L=Object.prototype.propertyIsEnumerable;function t7(t){for(const e in t)if(e7.call(t,e))return!0;return!1}const Zfe=()=>Object.create(null),yl=(t,e)=>Al(t,e,Zfe);function Al(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=GL(t)&&GL(s);if(!o&&!(Nv(t)&&Nv(s)))return s;const a=o?t:qL(t);if(!a)return s;const u=o?s:qL(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:e7.call(t,y))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){p[y]=E;continue}const C=Al(S,E,n,r+1);p[y]=C,C===S&&g++}return c===f&&g===c?t:p}function qL(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!$L.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(!$L.call(t,s))return!1;r.push(s)}return r}function Nv(t){if(!WL(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!WL(n)||!n.hasOwnProperty("isPrototypeOf"))}function WL(t){return Object.prototype.toString.call(t)==="[object Object]"}function GL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Pl(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(!Pl(t[r],e[r],n))return!1;return!0}if(Nv(t)&&Nv(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Pl(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||!Pl(t[a],e[a],n)))return!1;return s===o}return!1}function zc(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 Xfe(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 Rh(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const Qfe=/[\x00-\x1f\x7f"<>`{}]/g;function Jfe(t){return t.replace(Qfe,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function VL(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 Jfe(e)}const ehe=["http:","https:","mailto:","tel:"];function Mv(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function Nf(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+=VL(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+VL(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function the(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function nhe(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 Ih(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,n7=5;function rhe(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 r7(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=rhe(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 lb(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=r7(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 _=s.static?.get(w);if(_)S=_;else{s.static??=new Map;const T=Tl(n.fullPath??n.from);T.parent=s,T.depth=o,S=T,s.static.set(w,T)}}else{const _=w.toLowerCase(),T=s.staticInsensitive?.get(_);if(T)S=T;else{s.staticInsensitive??=new Map;const R=Tl(n.fullPath??n.from);R.parent=s,R.depth=o,S=R,s.staticInsensitive.set(_,R)}}break}case 1:{const w=c.substring(E,y[1]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.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=zw(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]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.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=zw(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]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.toLowerCase():void 0,O=zw(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=Tl(n.fullPath??n.from);y.kind=n7,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=Tl(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)lb(t,e,c,u,s,o,a)}function Fw(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(Fw);for(const e of t.dynamic)ya(e)}if(t.optional?.length){t.optional.sort(Fw);for(const e of t.optional)ya(e)}if(t.wildcard?.length){t.wildcard.sort(Fw);for(const e of t.wildcard)ya(e)}}function Tl(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 zw(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 she(t,e){const n=Tl("/"),r=new Uint16Array(6);for(const s of t)lb(!1,r,s,1,n,0);ya(n),e.masksTree=n,e.flatCache=Ih(1e3)}function ohe(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=tR(t,e.masksTree);return e.flatCache.set(t,r),r}function ihe(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Tl("/"),lb(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),tR(r,a,n)}function ahe(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=tR(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=o7(o.route)),e.matchCache.set(r,o),o}function lhe(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function uhe(t,e=!1,n){const r=Tl(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return lb(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=lhe(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),ya(r),{processedTree:{segmentTree:r,singleCache:Ih(1e3),matchCache:Ih(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function tR(t,e,n=!1){const r=t.split("/"),s=dhe(t,r,e,n);if(!s)return null;const[o]=s7(t,r,s);return{route:s.node.route,rawParams:o}}function s7(t,e,n){const r=che(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===n7){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 o7(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function che(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function dhe(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const s=!Th(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:_,rawParams:T}=p;if(g.kind===2&&g.route&&!om(f,p))continue;if(g.parse){if(!KL(t,e,p))continue;T=p.rawParams,_=p.extract}r&&g.route&&g.kind!==Ta&&om(c,p)&&(c=p);const R=m===a;if(R&&(g.route&&(!o||g.kind===Ta||g.kind===2)&&om(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:_,rawParams:T};let P=!0;if(g.index.parse&&(KL(t,e,I)||(P=!1)),P){if(!C&&!w&&!y&&fhe(E,a))return I;om(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:_,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:_,rawParams:T})}if(!R)for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k],{prefix:F,suffix:j}=H;if(F||j){const W=H.caseSensitive?M:O??=M.toLowerCase();if(F&&!W.startsWith(F)||j&&!W.endsWith(j))continue}u.push({node:H,index:m+1,skipped:y,depth:P,statics:E,dynamics:C,optionals:w+sm(a,m),extract:_,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+sm(a,m),optionals:w,extract:_,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+sm(a,m),dynamics:C,optionals:w,extract:_,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+sm(a,m),dynamics:C,optionals:w,extract:_,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:_,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 sm(t,e){return 2**(t-e-1)}function fhe(t,e){return t===2**(e-1)-1}function KL(t,e,n){let r,s;try{[r,s]=s7(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 om(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 nv(t){return nR(t.filter(e=>e!==void 0).join("/"))}function nR(t){return t.replace(/\/{2,}/g,"/")}function i7(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 a7(t){return fi(i7(t))}function Pv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function hhe(t,e,n){return Pv(t,n)===Pv(e,n)}function phe({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&&Th(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&&(Th(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=nR(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function ghe(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 jw(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=>ZL(s,n)).join("/"):ZL(r,n)}function YL({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=r7(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=jw("_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=jw(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=jw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function ZL(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function dr(t){return t?.isNotFound===!0}function mhe(){try{return sessionStorage}catch{return}}const vhe="tsr-scroll-restoration-v1_3",l7=mhe();function yhe(){try{return JSON.parse(l7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function bhe(){try{l7?.setItem(vhe,JSON.stringify(pc))}catch{}}const pc=yhe(),XL="data-scroll-restoration-id",She=t=>t.state.__TSR_key||t.href;function Ehe(t){const e=t.getAttribute(XL);if(e)return`[${XL}="${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 im=!1;const rv="window";function b_(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===rv)continue;const r=b_(n);r&&e.add(r)}return e}function Che(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||She,o=new Set,a=u=>{const c=pc[u]||={};for(const f of o)f===document?c[rv]={scrollX,scrollY}:f.isConnected&&(c[Ehe(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,im=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{im||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())),bhe()})),!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=pc[S];if(E){let C=pc[y];for(const w in E){if(w===rv){if(p)continue}else{const _=b_(w);if(!_||p&&f&&(m??=QL(f),m.has(_)))continue}C||(C=pc[y]={}),C[w]??=E[w]}}}im=!0;try{const E=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(p){!E&&f&&(m??=QL(f));const _=E&&C&&g,T=r.restoring?pc[y]:void 0;if(T)for(const R in T){const{scrollX:M,scrollY:O}=T[R];if(R===rv){if(_)continue;scrollTo({top:O,left:M,behavior:c}),w=!0}else{const I=b_(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{im=!1}}))}function whe(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 Bw(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function xhe(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]=Bw(s):Array.isArray(o)?o.push(Bw(s)):n[r]=[o,Bw(s)]}return n}const _he=The(JSON.parse),Ahe=Rhe(JSON.stringify,JSON.parse);function The(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=xhe(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function Rhe(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=whe(s,r);return o?`?${o}`:""}}const kl="__root__";function u7(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 zr(t){return t instanceof Response&&!!t.options}function Ihe(t){return{input:({url:e})=>{for(const n of t)e=S_(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=c7(t[n],e);return e}}}function Ohe(t){const e=a7(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=nv(["/",e,o.pathname]),o)}}function S_(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 c7(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([]),_=n([]),T=n([]),R=r(()=>Hw(a,w.get())),M=r(()=>Hw(u,_.get())),O=r(()=>Hw(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=Ih(64);function j(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:_,cachedIds:T,matches:R,pendingMatches:M,cachedMatches:O,firstId:I,hasPending:P,matchRouteDeps:k,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:H,getRouteMatchStore:j,setMatches:Y,setPending:ne,setCached:$};Y(t.matches),o?.(W);function Y(ee){$w(ee,a,w,n,s)}function ne(ee){$w(ee,u,_,n,s)}function $(ee){$w(ee,c,T,n,s)}return W}function Hw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function $w(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)}nhe(n.get(),o)||n.set(o)})}const E_=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Mhe=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),ub=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Dl=(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},JL=(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(!(!zr(n)&&!dr(n)))throw zr(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:zr(n)?"redirected":dr(n)?"notFound":r.status==="pending"?"success":r.status,context:Dl(t,e.index),isFetching:!1,error:n})),dr(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),zr(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},d7=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},eU=(t,e,n)=>{const r=Dl(t,n);t.updateMatch(e,s=>({...s,context:r}))},Mf=(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&&!zr(n)&&!dr(n)&&(t.serialError??=n)},f7=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!ub(t,e)&&(n.options.loader||n.options.beforeLoad||p7(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{E_(t)},s);r._nonReactive.pendingTimeout=o}},Phe=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;f7(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()},khe=(t,e,n,r)=>{const s=t.router.getMatch(e);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=zc(()=>{o?.resolve(),o=void 0});const{paramsError:a,searchError:u}=s;a&&Mf(t,n,a),u&&Mf(t,n,u),f7(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=zc();const m={...Dl(t,n,!1),...s.__routeContext},{search:y,params:S,cause:E}=s,C=ub(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},_=R=>{if(R===void 0){t.router.batch(()=>{p(),g()});return}(zr(R)||dr(R))&&(p(),Mf(t,n,R)),t.router.batch(()=>{p(),t.updateMatch(e,M=>({...M,__beforeLoadContext:R})),g()})};let T;try{if(T=r.options.beforeLoad(w),Rh(T))return p(),T.catch(R=>{Mf(t,n,R)}).then(_)}catch(R){p(),Mf(t,n,R)}_(T)},Dhe=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>khe(t,n,e,s),u=()=>{if(d7(t,n))return;const c=Phe(t,n,s);return Rh(c)?c.then(a):a()};return o()},Lhe=(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}))},h7=(t,e,n,r,s)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),p=Dl(t,r),g=ub(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}},tU=async(t,e,n,r,s)=>{try{const o=t.router.getMatch(n);try{(!(JF??t.router.isServer)||o.ssr===!0)&&Oh(s);const a=s.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(h7(t,e,n,r,s)),f=!!u&&Rh(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:Dl(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:Dl(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,dr(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)}!zr(u)&&!dr(u)&&await Oh(s,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Dl(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Ra(t,a,o)}},Uhe=async(t,e,n)=>{async function r(y,S,E,C,w){const _=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(h7(t,e,s,n,w)):R,{status:O,invalid:I}=C,P=_>=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 tU(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){zr(k)&&await t.router.navigate(k.options)}})()):O!=="success"||a?await tU(t,e,s,n,w):eU(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(d7(t,s)){if(!t.router.getMatch(s))return t.matches[n];eU(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=ub(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),_=w._nonReactive.error||w.error;_&&Ra(t,w,_),w.status==="pending"&&await r(C,y,E,w,c)}else{const w=C&&!t.router.stores.matchStores.has(s),_=t.router.getMatch(s);_._nonReactive.loaderPromise=zc(),w!==_.preload&&t.updateMatch(s,T=>({...T,preload:w})),await r(C,y,E,_,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 nU(t){const e=t,n=[];Mhe(e.router)&&E_(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=Dhe(e,m);Rh(y)&&await y}catch(y){if(zr(y))throw y;if(dr(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?JL(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(Uhe(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(zr(S))throw S;dr(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=JL(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 Oh(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 Oh(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=Lhe(e,y,E);if(C){const w=await C;e.updateMatch(y,_=>({..._,...w}))}}catch(C){console.error(`Error executing head for route ${S}:`,C)}}const g=E_(e);if(Rh(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function rU(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Oh(t,e=sv){!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===sv?(()=>{if(t._componentsPromise===void 0){const r=rU(t,sv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():rU(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function p7(t){for(const e of sv)if(t.options[e]?.preload)return!0;return!1}const sv=["component","errorComponent","pendingComponent","notFoundComponent"];var Na="__TSR_index",sU="popstate",oU="beforeunload";function Fhe(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=kv(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=iU(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=iU(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 iU(t,e){e||(e={});const n=rR();return{...e,key:n,__TSR_key:n,[Na]:t}}function zhe(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=(()=>kv(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const P=rR();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 _=()=>{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=kv(k,H),C={href:F,state:H,isPush:C?.isPush||P==="push"},w||(w=Promise.resolve().then(()=>_()))},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,j=!H&&!F||g;g=!1;const W=j?"GO":F?"BACK":"FORWARD",Y=j?{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 j=F.enableBeforeUnload??!0;if(j===!0){k=!0;break}if(typeof j=="function"&&j()===!0){k=!0;break}}if(k)return P.preventDefault(),P.returnValue=""},I=Fhe({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:_,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(oU,O,{capture:!0}),e.removeEventListener(sU,M)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(oU,O,{capture:!0}),e.addEventListener(sU,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 jhe(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function kv(t,e){const n=jhe(t),r=n.indexOf("#"),s=n.indexOf("?"),o=rR();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 rR(){return(Math.random()+1).toString(36).substring(7)}function Nc(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 Bhe=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=ghe(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=zhe()),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=Ih(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=Nhe($he(this.latestLocation),p),Che(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=a7(c);g&&g!=="/"&&p.push(Ohe({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:Ihe(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=uhe(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&she(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),_=this.options.stringifySearch(w);return{href:c+_+p,publicHref:c+_+p,pathname:Nf(c).path,external:!1,searchStr:_,search:yl(r?.search,w),hash:Nf(p.slice(1)).path,state:Al(r?.state,m)}}const y=new URL(g,this.origin),S=S_(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:Nf(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:C,search:yl(r?.search,E),hash:Nf(S.hash.slice(1)).path,state:Al(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)=>phe({base:n,to:r.includes("//")?nR(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=>qhe({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&&t7(S))for(const F of C){const j=F.options.params?.stringify??F.options.stringifyParams;if(j)try{Object.assign(S,j(S))}catch{}}const w=n.leaveParams?y:Nf(YL({path:y,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=p;if(n._includeValidateSearch&&this.options.search?.strict){const F={};C.forEach(j=>{if(j.options.validateSearch)try{Object.assign(F,ov(j.options.validateSearch,{...F,..._}))}catch{}}),_=F}_=Whe({search:_,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),_=yl(p,_);const T=this.options.stringifySearch(_),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=Al(a.state,O);const I=`${w}${T}${M}`;let P,k,H=!1;if(this.rewrite){const F=new URL(I,this.origin),j=c7(this.rewrite,F);P=F.href.replace(F.origin,""),j.origin!==this.origin?(k=j.href,H=!0):k=j.pathname+j.search+j.hash}else P=the(I),k=P;return{publicHref:k,href:P,pathname:w,search:_,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=ohe(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=Pl(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=zc(()=>{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=kv(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=S_(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(Mv(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=Nc(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await nU({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,_=this.stores.matches.get();m=w?_.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?_.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)):_,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 _ of C)this.looseRoutesById[_.routeId].options[w]?.(_)})})}})}catch(p){zr(p)?(s=p,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):dr(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(Nc(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&&Mv(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=Oh,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 nU({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(zr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});dr(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=ihe(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Pl(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Pl(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??Ahe,parseSearch:t.parseSearch??_he,protocolAllowlist:t.protocolAllowlist??ehe}),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=o7(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?Vhe(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 j=m?.search??t.search,W=m?._strictSearch??void 0;try{const Y=ov(g.options.validateSearch,{...j})??void 0;y={...j,...Y},S={...W,...Y},E=void 0}catch(Y){let ne=Y;if(Y instanceof Dv||(ne=new Dv(Y.message,{cause:Y})),e?.throwOnError)throw ne;y=j,S={},E=ne}}const C=g.options.loaderDeps?.({search:y})??"",w=C?JSON.stringify(C):"",{interpolatedPath:_,usedParams:T}=YL({path:g.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),R=g.id+_+w,M=this.getMatch(R),O=f.get(g.id),I=M?._strictParams??T;let P;if(!M)try{aU(g,I)}catch(j){if(dr(j)||zr(j)?P=j:P=new Hhe(j.message,{cause:j}),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 j=g.options.loader||g.options.beforeLoad||g.lazyFn||p7(g)?"pending":"success";H={id:R,ssr:g.options.ssr,index:p,routeId:g.id,params:O?.params??s,_strictParams:I,pathname:_,updatedAt:Date.now(),search:O?yl(O.search,y):y,_strictSearch:S,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:zc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:k,loaderDeps:O?Al(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:_=>this.navigate({..._,_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=Th(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=Th(r),a={...t.search};for(const g of r)try{Object.assign(a,ov(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{aU(m,g)}catch{}f=g}const p={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,p]),p}},Dv=class extends Error{},Hhe=class extends Error{};function $he(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function ov(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new Dv("Async validation not supported");if(n.issues)throw new Dv(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 qhe({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=fi(t);let o;const a=ahe(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function Whe({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return Ghe(n)(t,e,r??!1)}function Ghe(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=ov(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 Vhe(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 kl}function aU(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 Khe="Error preloading route! ☝️";var g7=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=kl:this.parentRoute||pi();let s=r?kl:n?.path;s&&s!=="/"&&(s=i7(s));const o=n?.id||s;let a=r?kl:nv([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=nv(["/",a]));const u=a==="__root__"?"/":nv([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=>u7({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.")}},Yhe=class extends g7{constructor(t){super(t)}};function sR(t){const e=t.errorComponent??oR;return D.jsx(Zhe,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?A.createElement(e,{error:n,reset:r}):t.children})}var Zhe=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 oR({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 Xhe({children:t,fallback:e=null}){return m7()?D.jsx(z.Fragment,{children:t}):D.jsx(z.Fragment,{children:e})}function m7(){return z.useSyncExternalStore(Qhe,()=>!0,()=>!1)}function Qhe(){return()=>{}}var v7=A.createContext(null);function fs(t){return A.useContext(v7)}var cb=A.createContext(void 0),Jhe=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 epe({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 _=f.nextDep;if(_!==void 0){f=_;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 tpe(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 C_=[];let iv=0;const{link:lU,unlink:npe,propagate:rpe,checkDirty:y7,shallowPropagate:uU}=epe({update(t){return t._update()},notify(t){C_[w_++]=t,t.flags&=~rn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=rn.Mutable|rn.Dirty,Lv(t))}});let am=0,w_=0,So,x_=0;function b7(t){try{++x_,t()}finally{--x_||S7()}}function Lv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=npe(n,t)}function S7(){if(!(x_>0)){for(;am<w_;){const t=C_[am];C_[am++]=void 0,t.notify()}am=0,w_=0}}function cU(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&&lU(s,So,iv),s._snapshot},subscribe(o){const a=tpe(o),u={current:!1},c=spe(()=>{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,++iv,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),Lv(s)}}};return n?(s.flags=rn.Mutable|rn.Dirty,s.get=function(){const o=s.flags;if(o&rn.Dirty||o&rn.Pending&&y7(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&uU(a)}}else o&rn.Pending&&(s.flags=o&~rn.Pending);return So!==void 0&&lU(s,So,iv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(rpe(a),uU(a),S7())}},s}function spe(t){const e=()=>{const r=So;So=n,++iv,n.depsTail=void 0,n.flags=rn.Watching|rn.RecursedCheck;try{return t()}finally{So=r,n.flags&=~rn.RecursedCheck,Lv(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&&y7(this.deps,this)?e():this.flags=rn.Watching},stop(){this.flags=rn.None,this.depsTail=void 0,Lv(this)}};return e(),n}function ope(t,e){return t===e}function Wr(t,e,n=ope){const r=A.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=A.useCallback(()=>t?.get(),[t]);return fT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var qw={get(){},subscribe(){return{unsubscribe(){}}}};function ipe(t,e){const n=A.useRef();return r=>{const s=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=Al(n.current,s):s}}function au(t){const e=fs(),n=A.useContext(t.from?Jhe:cb),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=ipe(t,e),o=Wr(r??qw,a=>a?s(a):qw);if(o!==qw)return o;(t.shouldThrow??!0)&&pi()}function E7(t){return au({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function C7(t){const{select:e,...n}=t;return au({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function w7(t){return au({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 x7(t){return au({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function iR(t){const e=fs();return A.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function vAe(t){const e=fs(),n=iR(),r=A.useRef(null);return Cc(()=>{r.current!==t&&(n(t),r.current=t)},[e,t,n]),null}function _7(t){return au({...t,select:e=>t.select?t.select(e.context):e.context})}function ape(t,e){const n=fs(),r=Kfe(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:_,style:T,className:R,onClick:M,onBlur:O,onFocus:I,onMouseEnter:P,onMouseLeave:k,onTouchStart:H,ignoreBlocker:F,params:j,search:W,hash:Y,state:ne,mask:$,reloadDocument:ee,unsafeRelative:fe,from:de,_fromLocation:Ae,...L}=t,V=m7(),K=A.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),J=Wr(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(()=>hpe(he,ue,n.history,_),[_,ue,he,n.history]),xe=A.useMemo(()=>{if(ve?.external)return Mv(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!ppe(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Mv(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=A.useMemo(()=>{if(xe)return!1;if(a?.exact){if(!hhe(J.pathname,oe.pathname,n.basepath))return!1}else{const gt=Pv(J.pathname,n.basepath),vn=Pv(oe.pathname,n.basepath);if(!(gt.startsWith(vn)&&(gt.length===vn.length||gt[vn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Pl(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,xe,V,oe.hash,oe.pathname,oe.search,n.basepath]),Ee=Xe?_l(s,{})??lpe:Ww,pt=Xe?Ww:_l(o,{})??Ww,Ce=[R,Ee.className,pt.className].filter(Boolean).join(" "),ze=(T||Ee.style||pt.style)&&{...T,...Ee.style,...pt.style},[je,He]=A.useState(!1),gr=A.useRef(!1),Et=t.reloadDocument||xe?!1:c??n.options.defaultPreload,Vr=f??n.options.defaultPreloadDelay??0,Gn=A.useCallback(()=>{n.preloadRoute({...K,_builtLocation:oe}).catch(gt=>{console.warn(gt),console.warn(Khe)})},[n,K,oe]);Vfe(r,A.useCallback(gt=>{gt?.isIntersecting&&Gn()},[Gn]),fpe,{disabled:!!_||Et!=="viewport"}),A.useEffect(()=>{gr.current||!_&&Et==="render"&&(Gn(),gr.current=!0)},[_,Gn,Et]);const Ar=gt=>{const vn=gt.currentTarget.getAttribute("target"),Rr=w!==void 0?w:vn;if(!_&&!gpe(gt)&&!gt.defaultPrevented&&(!Rr||Rr==="_self")&>.button===0){gt.preventDefault(),i8.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(xe)return{...L,ref:r,href:xe,...C&&{children:C},...w&&{target:w},..._&&{disabled:_},...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(_||Et!=="intent")return;if(!Vr){Gn();return}const vn=gt.currentTarget;if(Pf.has(vn))return;const Rr=setTimeout(()=>{Pf.delete(vn),Gn()},Vr);Pf.set(vn,Rr)},Tr=gt=>{_||Et!=="intent"||Gn()},Gt=gt=>{if(_||!Et||!Vr)return;const vn=gt.currentTarget,Rr=Pf.get(vn);Rr&&(clearTimeout(Rr),Pf.delete(vn))};return{...L,...Ee,...pt,href:ve?.href,ref:r,onClick:sc([M,Ar]),onBlur:sc([O,Gt]),onFocus:sc([I,to]),onMouseEnter:sc([P,to]),onMouseLeave:sc([k,Gt]),onTouchStart:sc([H,Tr]),disabled:!!_,target:w,...ze&&{style:ze},...Ce&&{className:Ce},..._&&upe,...Xe&&cpe,...V&&je&&dpe}}var Ww={},lpe={className:"active"},upe={role:"link","aria-disabled":!0},cpe={"data-status":"active","aria-current":"page"},dpe={"data-transitioning":"transitioning"},Pf=new WeakMap,fpe={rootMargin:"100px"},sc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function hpe(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function ppe(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var A7=A.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:s,...o}=ape(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 gpe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var mpe=class extends g7{constructor(e){super(e),this.useMatch=n=>au({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>_7({...n,from:this.id}),this.useSearch=n=>x7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>w7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>C7({...n,from:this.id}),this.useLoaderData=n=>E7({...n,from:this.id}),this.useNavigate=()=>iR({from:this.fullPath}),this.Link=z.forwardRef((n,r)=>D.jsx(A7,{ref:r,from:this.fullPath,...n}))}};function vpe(t){return new mpe(t)}function ype(){return t=>Spe(t)}var bpe=class extends Yhe{constructor(t){super(t),this.useMatch=e=>au({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>_7({...e,from:this.id}),this.useSearch=e=>x7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>w7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>C7({...e,from:this.id}),this.useLoaderData=e=>E7({...e,from:this.id}),this.useNavigate=()=>iR({from:this.fullPath}),this.Link=z.forwardRef((e,n)=>D.jsx(A7,{ref:n,from:this.fullPath,...e}))}};function Spe(t){return new bpe(t)}function fr(t){return new Epe(t,{silent:!0}).createRoute}var Epe=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=vpe(n);return r.isRoot=!1,r},this.silent=e?.silent}};function or(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,Xfe(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(HL)HL(a());else throw a();return A.createElement(r,f)};return u.preload=a,u}function Cpe(t){const e=fs(),n=`not-found-${Wr(e.stores.location,r=>r.pathname)}-${Wr(e.stores.status,r=>r)}`;return D.jsx(sR,{getResetKey:()=>n,onCatch:(r,s)=>{if(dr(r))t.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(dr(r))return t.fallback?.(r);throw r},children:t.children})}function wpe(){return D.jsx("p",{children:"Not Found"})}function gc(t){return D.jsx(D.Fragment,{children:t.children})}function T7(t,e,n){return e.options.notFoundComponent?D.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?D.jsx(t.options.defaultNotFoundComponent,{...n}):D.jsx(wpe,{})}function xpe(t){return null}function _pe(){return xpe(fs()),null}var Ape=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,Tpe=(t,e)=>t[0]===e[0]&&t[1]===e[1],R7=A.memo(function({matchId:e}){const n=fs(),r=n.stores.matchStores.get(e);r||pi();const s=Wr(n.stores.loadedAt,a=>a),o=Wr(r,a=>a,Ape);return D.jsx(Rpe,{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 Rpe({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:gc,m=u?sR:gc,y=f?Cpe:gc;return D.jsxs(s.isRoot?s.options.shellComponent??gc:gc,{children:[D.jsx(cb.Provider,{value:e,children:D.jsx(g,{fallback:a,children:D.jsx(m,{getResetKey:()=>n,errorComponent:u||oR,onCatch:(S,E)=>{if(dr(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(Xhe,{fallback:a,children:D.jsx(dU,{matchId:e})}):D.jsx(dU,{matchId:e})})})})}),r.parentRouteId===kl?D.jsxs(D.Fragment,{children:[D.jsx(Ipe,{}),t.options.scrollRestoration&&JF?D.jsx(_pe,{}):null]}):null]})}function Ipe(){const t=fs(),e=A.useRef();return Cc(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...Nc(t.stores.location.get(),r??n)}),e.current=n},[Wr(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var dU=A.memo(function({matchId:e}){const n=fs(),r=(p,g)=>n.getMatch(p.id)?._nonReactive[g]??p._nonReactive[g],s=n.stores.matchStores.get(e);s||pi();const o=Wr(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(I7,{})},[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=zc();g._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),g._nonReactive.minPendingPromise=void 0},p)}}throw r(o,"loadPromise")}if(o.status==="notFound")return dr(o.error)||pi(),T7(n,u,o.error);if(o.status==="redirected")throw zr(o.error)||pi(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),I7=A.memo(function(){const e=fs(),n=A.useContext(cb);let r,s=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[r,s]=Wr(f,p=>[p?.routeId,p?.globalNotFound??!1],Tpe),o=Wr(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(),T7(e,a,void 0);if(!o)return null;const c=D.jsx(R7,{matchId:o});return r===kl?D.jsx(A.Suspense,{fallback:u,children:c}):c});function Ope(){const t=fs(),e=A.useRef({router:t,mounted:!1}),[n,r]=A.useState(!1),s=Wr(t.stores.isLoading,g=>g),o=Wr(t.stores.hasPending,g=>g),a=Uw(s),u=s||n||o,c=Uw(u),f=s||o,p=Uw(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]),Cc(()=>{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]),Cc(()=>{a&&!s&&t.emit({type:"onLoad",...Nc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,s]),Cc(()=>{p&&!f&&t.emit({type:"onBeforeRouteMount",...Nc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,p,t]),Cc(()=>{if(c&&!u){const g=Nc(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),b7(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function Npe(){const t=fs(),e=t.routesById[kl].options.pendingComponent??t.options.defaultPendingComponent,n=e?D.jsx(e,{}):null,r=D.jsxs(typeof document<"u"&&t.ssr?gc:A.Suspense,{fallback:n,children:[D.jsx(Ope,{}),D.jsx(Mpe,{})]});return t.options.InnerWrap?D.jsx(t.options.InnerWrap,{children:r}):r}function Mpe(){const t=fs(),e=Wr(t.stores.firstId,s=>s),n=Wr(t.stores.loadedAt,s=>s),r=e?D.jsx(R7,{matchId:e}):null;return D.jsx(cb.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:D.jsx(sR,{getResetKey:()=>n,errorComponent:oR,onCatch:void 0,children:r})})}var Ppe=t=>({createMutableStore:cU,createReadonlyStore:cU,batch:b7}),kpe=t=>new Dpe(t),Dpe=class extends Bhe{constructor(t){super(t,Ppe)}};function Lpe({router:t,children:e,...n}){t7(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=D.jsx(v7.Provider,{value:t,children:e});return t.options.Wrap?D.jsx(t.options.Wrap,{children:r}):r}function Upe({router:t,...e}){return D.jsx(Lpe,{router:t,...e,children:D.jsx(Npe,{})})}var Gw={exports:{}},kf={},Vw={exports:{}},Kw={};var fU;function Fpe(){return fU||(fU=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,_=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,j());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,_(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?j():O=!1}}}var j;if(typeof T=="function")j=function(){T(F)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Y=W.port2;W.port1.onmessage=F,j=function(){Y.postMessage(null)}}else j=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?(_(I),I=-1):E=!0,ne(M,fe-de))):($.sortIndex=Ae,e(c,$),S||y||(S=!0,O||(O=!0,j()))),$},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}}}})(Kw)),Kw}var hU;function zpe(){return hU||(hU=1,Vw.exports=Fpe()),Vw.exports}var pU;function jpe(){if(pU)return kf;pU=1;var t=zpe(),e=Jh(),n=o8();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 x=!1,N=v.child;N;){if(N===d){x=!0,d=v,h=b;break}if(N===h){x=!0,h=v,d=b;break}N=N.sibling}if(!x){for(N=b.child;N;){if(N===d){x=!0,d=b,h=v;break}if(N===h){x=!0,h=b,d=v;break}N=N.sibling}if(!x)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"),_=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 j(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 _: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)?XO(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=XO(l),i=QO(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(J),K(J,i)}function xe(){V(J),V(oe),V(he)}function Xe(i){i.memoizedState!==null&&K(ue,i);var l=J.current,d=QO(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),ff._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},Lw}var AL;function hce(){if(AL)return nc;AL=1;const t=Gue(),e=cce(),n=dce(),r=fce();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 nc.create=e.create,nc.toCanvas=s.bind(null,n.render),nc.toDataURL=s.bind(null,n.renderToDataURL),nc.toString=s.bind(null,function(o,a,u){return r.render(o,u)}),nc}var pce=hce();const gce=qa(pce),mce=t=>t==="signIn"||t==="signUp",ZT=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:vce,getConfirmingText:yce,getBackToSignInText:bce,getResendCodeText:Sce}=kn,ib=()=>{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=ZT(n)&&a&&r;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:yce()},vce()),u&&z.createElement(Jt,{onClick:r,type:"button"},Sce()),z.createElement(Jt,{onClick:e,type:"button",variation:"link",size:"small"},bce()))},Ece=new rr("SetupTotp-logger"),{getSetupTotpText:Cce,getCopiedText:wce,getLoadingText:xce}=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}=ds(),{components:{SetupTotp:{Header:c=Ua.Header,Footer:f=Ua.Footer}}}=cs(),[p,g]=A.useState(!0),[m,y]=A.useState(),[S,E]=A.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:w=s}=o??{},_=A.useCallback(async()=>{try{const R=pre(C,w,n),M=await gce.toDataURL(R);y(M)}catch(R){Ece.error(R)}finally{g(!1)}},[C,w,n]);A.useEffect(()=>{m||_()},[_,m]);const T=()=>{navigator.clipboard.writeText(n),E(wce())};return A.createElement(qr,{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,xce(),"…"):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(Gr,null)),A.createElement(ib,null),A.createElement(f,null))))};Ua.Header=function(){return A.createElement(_r,{level:3},Cce())};Ua.Footer=function(){return null};const{getSubmitText:_ce,getSubmittingText:Ace}=kn,ab=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,Ace(),"…"):z.createElement(z.Fragment,null,_ce()),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)))},Tce=()=>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"})),Rce=()=>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"})),Ice=()=>z.createElement(hF,{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"}),Oce=()=>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"})),Jg=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(Ice,null):e==="google"?a=z.createElement(Rce,null):e==="amazon"?a=z.createElement(Oce,null):e==="apple"&&(a=z.createElement(Tce,null)),z.createElement(Jt,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,z.createElement(Ts,{as:"span"},r))},{getSignInWithFederationText:em,getOrText:Nce}=kn;function kF(){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(Jg,{icon:"amazon",key:n,provider:Ec.Amazon,text:em(t,n)});case"apple":return z.createElement(Jg,{icon:"apple",key:n,provider:Ec.Apple,text:em(t,n)});case"facebook":return z.createElement(Jg,{icon:"facebook",key:n,provider:Ec.Facebook,text:em(t,n)});case"google":return z.createElement(Jg,{icon:"google",key:n,provider:Ec.Google,text:em(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(BT,{size:"small",label:Nce()}))}const{getSignInText:tm,getSigningInText:Mce,getForgotPasswordText:Pce,getSignInWithEmailText:kce,getSignInWithSmsText:Dce,getSignInWithPasskeyText:Lce,getOtherSignInOptionsText:Uce,getEnterUsernameFirstText:Fce}=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}=ds(),[a,u]=z.useState(""),{components:{SignIn:{Header:c=Si.Header,Footer:f=Si.Footer}}}=cs(),g=e&&e.length>1&&n,m=a.trim().length>0,y=z.useCallback(w=>{const{name:_,value:T}=w.target;_==="username"&&typeof T=="string"&&u(T),s(w)},[s]),S=()=>{if(!n)return tm();switch(n){case"EMAIL_OTP":return kce();case"SMS_OTP":return Dce();case"WEB_AUTHN":return Lce();default:return tm()}},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(kF,null),z.createElement(Fe,{direction:"column"},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:t},z.createElement(sb,null,z.createElement("legend",null,tm())),z.createElement(Mo,null)),z.createElement(Gr,null),z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:Mce()},g?S():tm()),g&&z.createElement(Jt,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:Fce()},Uce()),z.createElement(f,null))))}const zce=()=>{const{toForgotPassword:t}=St(e=>[e.toForgotPassword]);return z.createElement($e,{"data-amplify-footer":""},z.createElement(Jt,{onClick:t,size:"small",variation:"link"},Pce()))};Si.Footer=zce;Si.Header=function(){return null};const{getCreateAccountText:TL,getCreatingAccountText:jce,getCreateAccountWithEmailText:Bce,getCreateAccountWithPasswordText:Hce,getCreateAccountWithSmsText:$ce,getOrText:qce}=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}=ds(),{components:{SignUp:{Header:c=Xs.Header,FormFields:f=Xs.FormFields,Footer:p=Xs.Footer}}}=cs(),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 Bce();case"SMS_OTP":return $ce();case"PASSWORD":return m?Hce():TL();default:return TL()}},_=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(kF,null),z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:e},z.createElement(Fe,{direction:"column"},z.createElement(f,{includePassword:!C}),z.createElement(Gr,null)),z.createElement(Jt,{isDisabled:(!m||S.length==0)&&t||e,isFullWidth:!0,type:"submit",variation:"primary",isLoading:e,loadingText:jce(),onClick:_(y)},w(y)),m&&S.length>0&&z.createElement(z.Fragment,null,z.createElement(Fe,{justifyContent:"center",padding:"medium 0"},qce()),S.map(T=>z.createElement(Jt,{key:T,isDisabled:e,isFullWidth:!0,type:"button",variation:"primary",onClick:_(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:Wce,getSignUpTabText:Gce}=kn,Vce=({className:t,hideSignUp:e,variation:n})=>{const{route:r,toSignIn:s,toSignUp:o}=St(a=>[a.route,a.toSignIn,a.toSignUp]);return z.createElement(qr,{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"},Wce()),z.createElement(Sl.Item,{value:"signUp"},Gce())),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:Kce,getSkipText:Yce}=kn,ql=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ConfirmVerifyUser:{Header:o=ql.Header,Footer:a=ql.Footer}}}=cs();return z.createElement(qr,{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(Gr,null),z.createElement(ab,{cancelButtonText:Yce(),cancelButtonSendType:"SKIP"}),z.createElement(a,null))))};ql.Header=function(){return z.createElement(_r,{level:3},Kce())};ql.Footer=function(){return null};const{getSkipText:Zce,getVerifyText:Xce,getVerifyContactText:Qce,getAccountRecoveryInfoText:Jce}=kn,ede=t=>Object.entries(t).map(([e,n],r)=>{const s=Vy[e].label;return z.createElement($T,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",fre(s,n))}),Wl=({className:t,variation:e})=>{const{components:{VerifyUser:{Header:n=Wl.Header,Footer:r=Wl.Footer}}}=cs(),{isPending:s,unverifiedUserAttributes:o}=St(({isPending:p,unverifiedUserAttributes:g})=>[p,g]),{handleChange:a,handleSubmit:u}=ds(),c=s?z.createElement(z.Fragment,null,"Verifying…"):z.createElement(z.Fragment,null,Xce()),f=z.createElement(qT,{legend:Qce(),name:"verify_context",isDisabled:s,legendHidden:!0},ede(o));return z.createElement(qr,{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(Gr,null),z.createElement(ab,{cancelButtonText:Zce(),cancelButtonSendType:"SKIP",submitButtonText:c}),z.createElement(r,null))))};Wl.Header=function(){return z.createElement(_r,{level:3},Jce())};Wl.Footer=function(){return null};const{getChallengeText:tde,getDeliveryMessageText:nde,getDeliveryMethodText:rde}=kn,Gl=({className:t,variation:e})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:s}=St(p=>[p.isPending,p.challengeName,p.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=ds(),{components:{ConfirmSignIn:{Header:u=Gl.Header,Footer:c=Gl.Footer}}}=cs(),f=ZT(r)&&s;return z.createElement(qr,{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(Ts,{className:"amplify-authenticator__subtitle"},nde(s)),z.createElement(Mo,null),z.createElement(Gr,null)),z.createElement(ib,null),z.createElement(c,null))))};function sde(){const{challengeName:t,codeDeliveryDetails:e}=St(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=ZT(t)&&e;return z.createElement(z.Fragment,null,z.createElement(_r,{level:3},tde(t)),n&&z.createElement(_r,{level:5},rde(e)))}Gl.Header=sde;Gl.Footer=function(){return null};const{getResendCodeText:ode,getResetYourPasswordText:ide}=kn,Vl=({className:t,variation:e})=>{const{isPending:n}=St(c=>[c.isPending]),{handleBlur:r,handleChange:s,handleSubmit:o}=ds(),{components:{ConfirmResetPassword:{Header:a=Vl.Header,Footer:u=Vl.Footer}}}=cs();return z.createElement(qr,{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(Gr,null),z.createElement(ab,{cancelButtonSendType:"RESEND",cancelButtonText:ode()}),z.createElement(u,null))))};Vl.Header=function(){const e=ide();return z.createElement(_r,{level:3},e)};Vl.Footer=function(){return null};const{getBackToSignInText:ade,getSendingText:lde,getSendCodeText:ude,getResetYourPasswordText:cde}=kn,Fa=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ForgotPassword:{Header:o=Fa.Header,Footer:a=Fa.Footer}}}=cs();return z.createElement(qr,{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(Gr,null),z.createElement(ab,{cancelButtonText:ade(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?z.createElement(z.Fragment,null,lde(),"…"):z.createElement(z.Fragment,null,ude())}),z.createElement(a,null))))};Fa.Header=function(){return z.createElement(_r,{level:3},cde())};Fa.Footer=function(){return null};const{getMfaTypeLabelByValue:dde,getSelectMfaTypeByChallengeName:fde,getSelectMfaTypeText:hde}=kn,za=({className:t,variation:e})=>{const{isPending:n,allowedMfaTypes:r=[]}=St(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:s,handleSubmit:o}=ds(),{components:{SelectMfaType:{Header:a=za.Header,Footer:u=za.Footer}}}=cs();return A.createElement(qr,{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(qT,{name:"mfa_type",legend:hde(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>A.createElement($T,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},dde(c)))),A.createElement(Gr,null)),A.createElement(ib,null),A.createElement(u,null))))};za.Header=function(){const{challengeName:e}=St(n=>[n.challengeName]);return A.createElement(_r,{level:3},fde(e))};za.Footer=function(){return null};const{getSetupEmailText:pde}=kn,ja=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{SetupEmail:{Header:o=ja.Header,Footer:a=ja.Footer}}}=cs();return A.createElement(qr,{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(Gr,null)),A.createElement(ib,null),A.createElement(a,null))))};ja.Header=function(){return A.createElement(_r,{level:3},pde())};ja.Footer=function(){return null};const{getSignInWithPasswordText:c_,getSignInWithEmailText:gde,getSignInWithSmsText:mde,getSignInWithPasskeyText:vde,getSigningInText:yde,getBackToSignInText:bde,getOrText:Sde,getUsernameLabelByLoginMechanism:Ede}=kn,Cde=t=>{switch(t){case"EMAIL_OTP":return gde();case"SMS_OTP":return mde();case"WEB_AUTHN":return vde();case"PASSWORD":return c_();default:return c_()}},wde=({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}=ds(),p=s??[],g=p.includes("PASSWORD"),m=p.filter(E=>E!=="PASSWORD"),y=E=>{a({method:E})},S=Ede(u);return z.createElement(qr,{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(op,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),g&&z.createElement(z.Fragment,null,z.createElement(HT,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),z.createElement(Jt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:yde()},c_())),g&&m.length>0&&z.createElement(BT,{label:Sde()}),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)},Cde(E)))),z.createElement(Gr,null),z.createElement(Jt,{onClick:o,size:"small",variation:"link",isDisabled:n},bde()))))},xde=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(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"})))},_de=t=>{const{className:e,...n}=t;return A.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(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:Ade,getPasskeyPromptDescriptionText:Tde,getCreatePasskeyText:Rde,getRegisteringText:Ide,getContinueWithoutPasskeyText:Ode,getPasskeyCreatedSuccessText:Nde,getPasskeyRegisteredText:Mde,getPasskeyRegistrationFailedText:Pde,getPasskeyLabelText:kde,getExistingPasskeysText:Dde,getSetupAnotherPasskeyText:Lde,getContinueText:Ude}=kn;function Fde({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 ST();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 Pne(),r(!0)}catch(w){const _=w,T=_.name??"",R=_.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(Pde())}finally{u(!1)}},[y]);if(n)return z.createElement(qr,{className:t,variation:e},z.createElement(Fe,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"xs"},z.createElement(xde,{className:"amplify-authenticator__passkey-success-icon"}),z.createElement(_r,{level:4},Nde()),z.createElement(Ts,null,Mde())),c.length>0&&z.createElement($e,{marginTop:"large"},z.createElement(_r,{level:5},Dde()),z.createElement(Fe,{direction:"column",gap:"xs",marginTop:"xs"},c.map((w,_)=>z.createElement($e,{key:w.credentialId,className:"amplify-authenticator__passkey-credential-item"},z.createElement(Ts,{fontSize:"small"},w.friendlyCredentialName??`${kde()} ${_+1}`))))),z.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},z.createElement(Jt,{onClick:()=>{r(!1),E()},variation:"link"},Lde()),z.createElement(Jt,{onClick:()=>S(),variation:"primary",isFullWidth:!0},Ude()))));const C=g||a;return z.createElement(qr,{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},Ade()),z.createElement(Ts,null,Tde()),z.createElement(Fe,{justifyContent:"center"},z.createElement(_de,{className:"amplify-authenticator__passkey-icon"})),z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(Jt,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:Ide()},Rde()),z.createElement(Jt,{onClick:y,variation:"link",isDisabled:C},Ode()),s&&z.createElement(Ts,{className:"amplify-authenticator__passkey-error"},s),z.createElement(Gr,null)))))}function RL(){return null}const zde=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return RL;case"confirmSignUp":return $l;case"confirmSignIn":return Gl;case"selectMfaType":return za;case"setupEmail":return ja;case"setupTotp":return Ua;case"signIn":case"signUp":return Vce;case"signInSelectAuthFactor":return wde;case"passkeyPrompt":return Fde;case"forceNewPassword":return Zs;case"forgotPassword":return Fa;case"confirmResetPassword":return Vl;case"verifyUser":return Wl;case"confirmVerifyUser":return ql;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${t}`),RL}};function jde({className:t,hideSignUp:e,variation:n}){const{route:r}=St(({route:o})=>[o]),s=A.useMemo(()=>zde(r),[r]);return z.createElement(s,{className:t,hideSignUp:mce(r)?e:void 0,variation:n})}const Bde={Header:()=>null,SignIn:{Header:Si.Header,Footer:Si.Footer},SignUp:{Header:Xs.Header,FormFields:Xs.FormFields,Footer:Xs.Footer},ConfirmSignUp:{Header:$l.Header,Footer:$l.Footer},SelectMfaType:{Header:za.Header,Footer:za.Footer},SetupEmail:{Header:ja.Header,Footer:ja.Footer},SetupTotp:{Header:Ua.Header,Footer:Ua.Footer},ConfirmResetPassword:{Header:Vl.Header,Footer:Vl.Footer},ConfirmSignIn:{Header:Gl.Header,Footer:Gl.Footer},VerifyUser:{Header:Wl.Header,Footer:Wl.Footer},ConfirmVerifyUser:{Header:ql.Header,Footer:ql.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}){Lue({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:_,signOut:T,user:R})=>[_,T,R]);hle({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:p,signUpAttributes:f,socialProviders:g,formFields:r});const C=A.useMemo(()=>({components:{...Bde,...n}}),[n]);return y==="authenticated"||y==="signOut"?t?A.createElement(A.Fragment,null,yi(t)?t({signOut:S,user:E}):t):null:A.createElement(RF.Provider,{value:C},A.createElement(jde,{className:e,hideSignUp:s,variation:m}))}function Po(t){return gle({componentName:"Authenticator",packageName:"react",version:Due}),A.createElement(cF,null,A.createElement(Hde,{...t}))}Po.Provider=cF;Po.ForgotPassword=Fa;Po.SetupTotp=Ua;Po.SignIn=Si;Po.SignUp=Xs;Po.ForceNewPassword=Zs;Po.SelectMfaType=za;Po.SetupEmail=ja;const DF=({cssText:t,...e})=>t===void 0||/<\/style/i.test(t)?null:A.createElement("style",{...e,dangerouslySetInnerHTML:{__html:t}});DF.displayName="Style";const LF=({theme:t,...e})=>{if(!t)return null;const{name:n,cssText:r}=t;return A.createElement(DF,{...e,cssText:r,id:`amplify-theme-${n}`})};LF.displayName="ThemeStyle";function $de({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=A.useMemo(()=>({theme:Jy(s),colorMode:e}),[s,e]);return A.createElement(dF.Provider,{value:o},A.createElement(fue,{dir:n},A.createElement("div",{"data-amplify-theme":o.theme.name,"data-amplify-color-mode":e,dir:n},t),s?A.createElement(LF,{theme:o.theme,nonce:r}):null))}const qde=({configured:t,authStatus:e})=>e==="authenticated",Wde=t=>t?t.signInDetails?.loginId??t.username??null:null,Gde=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=St(o=>[o.authStatus,o.signOut,o.user]);return qde({configured:!0,authStatus:n})?D.jsx(D.Fragment,{children:t({email:Wde(s),signOut:()=>r()})}):D.jsx(D.Fragment,{children:e})},Vde=({children:t,fallback:e=null})=>Ty()?D.jsx(Gde,{fallback:e,children:t}):D.jsx(D.Fragment,{children:e}),IL='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ri=t=>`var(${t})`,un=Ri("--accent"),Kde=Ri("--accent-hover"),OL=Ri("--accent-soft"),If=Ri("--accent-fg"),NL=Ri("--surface"),rc=Ri("--fg"),Yde=Ri("--surface-sunken"),nm=Ri("--fg-muted"),Of=Ri("--line"),Zde=Jy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:OL},20:{value:OL},40:{value:un},60:{value:un},80:{value:un},90:{value:un},100:{value:un}}},background:{primary:{value:NL},secondary:{value:Yde}},font:{primary:{value:rc},secondary:{value:nm},tertiary:{value:nm},interactive:{value:un},inverse:{value:If},hover:{value:un},focus:{value:un},active:{value:un}},border:{primary:{value:Of},secondary:{value:Of},focus:{value:un}}},fonts:{default:{variable:{value:IL},static:{value:IL}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Of},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:NL}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:nm}}},button:{color:{value:rc},primary:{backgroundColor:{value:un},color:{value:If},_hover:{backgroundColor:{value:Kde},color:{value:If}},_focus:{backgroundColor:{value:un},color:{value:If}},_active:{backgroundColor:{value:un},color:{value:If}}},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:rc},borderColor:{value:Of},_focus:{borderColor:{value:un},boxShadow:{value:`0 0 0 2px ${un}`}}},field:{label:{color:{value:rc}}},tabs:{borderColor:{value:Of},item:{color:{value:nm},backgroundColor:{value:"transparent"},_active:{color:{value:un},borderColor:{value:un},backgroundColor:{value:"transparent"}},_hover:{color:{value:un}},_focus:{color:{value:un}}}},heading:{color:{value:rc}},text:{color:{value:rc}}}}}),Xde={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"}}},Qde=()=>D.jsx(Wx,{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"})]})}),Jde=()=>D.jsx($8,{note:s9({betterAuthEnabled:!1,cognitoConfigured:Ty()})}),efe=({children:t})=>{const{authStatus:e}=St(n=>[n.authStatus]);return e==="authenticated"?D.jsx(D.Fragment,{children:t}):e==="configuring"?D.jsx(JA,{}):D.jsx($de,{theme:Zde,children:D.jsxs(H8,{children:[D.jsx(q8,{}),D.jsx(Po,{hideSignUp:!1,formFields:Xde,components:{Footer:Jde}})]})})},tfe=({children:t})=>Ty()?D.jsx(Po.Provider,{children:D.jsx(efe,{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(Qde,{}),t]}),UF=60;let Oc=null;const FF=()=>Math.floor(Date.now()/1e3),nfe=t=>t!==null&&t.expiresAt-UF>FF(),rfe=async()=>{const e=(await Ey()).tokens?.idToken;return e?(Oc={value:e.toString(),expiresAt:e.payload.exp??FF()+UF},Oc.value):(Oc=null,null)},sfe=async()=>Ty()?nfe(Oc)?Oc.value:rfe():null,ofe=()=>{Oc=null},Iv={configure:G6,getToken:sfe,resetToken:ofe,Shell:tfe,Account:Vde},ife=({children:t})=>Ry()?D.jsx(Cv.Shell,{children:t}):D.jsx(Iv.Shell,{children:t}),afe=t=>Ry()?D.jsx(Cv.Account,{...t}):D.jsx(Iv.Account,{...t}),lfe={configure:G6,getToken:()=>Ry()?Cv.getToken():Iv.getToken(),resetToken:()=>{Cv.resetToken(),Iv.resetToken()},Shell:ife,Account:afe};var ip=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(){}},ufe=class extends ip{#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"}},XT=new ufe,cfe={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},dfe=class{#e=cfe;#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)}},xl=new dfe;function ffe(t){setTimeout(t,0)}var hfe=typeof window>"u"||"Deno"in globalThis;function Ur(){}function pfe(t,e){return typeof t=="function"?t(e):t}function d_(t){return typeof t=="number"&&t>=0&&t!==1/0}function zF(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Oa(t,e){return typeof t=="function"?t(e):t}function is(t,e){return typeof t=="function"?t(e):t}function ML(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==QT(a,e.options))return!1}else if(!_h(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 PL(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(xh(e.options.mutationKey)!==xh(o))return!1}else if(!_h(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function QT(t,e){return(e?.queryKeyHashFn||xh)(t)}function xh(t){return JSON.stringify(t,(e,n)=>h_(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function _h(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>_h(t[n],e[n])):!1}var gfe=Object.prototype.hasOwnProperty;function jF(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=kL(t)&&kL(e);if(!r&&!(h_(t)&&h_(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:gfe.call(t,g))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[g]=y;continue}const S=jF(m,y,n+1);c[g]=S,S===m&&f++}return o===u&&f===o?t:c}function f_(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 kL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function h_(t){if(!DL(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!DL(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function DL(t){return Object.prototype.toString.call(t)==="[object Object]"}function mfe(t){return new Promise(e=>{xl.setTimeout(e,t)})}function p_(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?jF(t,e):e}function pAe(t){return t}function vfe(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function yfe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var JT=Symbol();function BF(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===JT?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function HF(t,e){return typeof t=="function"?t(...e):!!t}function bfe(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 Ah=(()=>{let t=()=>hfe;return{isServer(){return t()},setIsServer(e){t=e}}})();function g_(){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 Sfe=ffe;function Efe(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=Sfe;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 tr=Efe(),Cfe=class extends ip{#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}},Ov=new Cfe;function wfe(t){return Math.min(1e3*2**t,3e4)}function $F(t){return(t??"online")==="online"?Ov.isOnline():!0}var m_=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function qF(t){let e=!1,n=0,r;const s=g_(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new m_(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>XT.isFocused()&&(t.networkMode==="always"||Ov.isOnline())&&t.canRun(),p=()=>$F(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 _=t.retry??(Ah.isServer()?0:3),T=t.retryDelay??wfe,R=typeof T=="function"?T(n,w):T,M=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,w);if(e||!M){m(w);return}n++,t.onFail?.(n,w),mfe(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 WF=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),d_(this.gcTime)&&(this.#e=xl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ah.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(xl.clearTimeout(this.#e),this.#e=void 0)}};function xfe(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=>{bfe(S,()=>e.signal,()=>p=!0)},m=BF(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 _=(()=>{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(_),{maxPages:R}=e.options,M=C?yfe:vfe;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?GF:v_,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:v_(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 v_(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 GF(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}function gAe(t,e){return e?v_(t,e)!=null:!1}function mAe(t,e){return!e||!t.getPreviousPageParam?!1:GF(t,e)!=null}var _fe=class extends WF{#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=UL(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=UL(this.options);e.data!==void 0&&(this.setState(LL(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=p_(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(Ur).catch(Ur):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=>is(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===JT||!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:!zF(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=BF(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"?xfe(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=qF({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof m_&&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 m_){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,...VF(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...LL(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),tr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function VF(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$F(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function LL(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function UL(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 Afe=class extends ip{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=g_(),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),FL(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return y_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return y_(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 is(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&&!f_(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&zL(this.#t,n,this.options,e)&&this.#h(),this.updateResult(),r&&(this.#t!==n||is(this.options.enabled,this.#t)!==is(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||is(this.options.enabled,this.#t)!==is(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 Rfe(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(Ur)),e}#m(){this.#S();const t=Oa(this.options.staleTime,this.#t);if(Ah.isServer()||this.#r.isStale||!d_(t))return;const n=zF(this.#r.dataUpdatedAt,t)+1;this.#d=xl.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,!(Ah.isServer()||is(this.options.enabled,this.#t)===!1||!d_(this.#u)||this.#u===0)&&(this.#f=xl.setInterval(()=>{(this.options.refetchIntervalInBackground||XT.isFocused())&&this.#h()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#S(){this.#d!==void 0&&(xl.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(xl.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&&FL(t,e),H=P&&zL(t,n,e,r);(k||H)&&(p={...p,...VF(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=p_(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=p_(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",_=E==="pending",T=E==="error",R=_&&w,M=m!==void 0,I={status:E,fetchStatus:p.fetchStatus,isPending:_,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&&!_,isLoadingError:T&&!M,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&M,isStale:eR(t,e),refetch:this.refetch,promise:this.#a,isEnabled:is(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=g_();H(W)},j=this.#a;switch(j.status){case"pending":t.queryHash===n.queryHash&&H(j);break;case"fulfilled":(k||I.data!==j.value)&&F();break;case"rejected":(!k||I.error!==j.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),f_(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){tr.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Tfe(t,e){return is(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&is(e.retryOnMount,t)===!1)}function FL(t,e){return Tfe(t,e)||t.state.data!==void 0&&y_(t,e,e.refetchOnMount)}function y_(t,e,n){if(is(e.enabled,t)!==!1&&Oa(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&eR(t,e)}return!1}function zL(t,e,n,r){return(t!==e||is(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&eR(t,n)}function eR(t,e){return is(e.enabled,t)!==!1&&t.isStaleByTime(Oa(e.staleTime,t))}function Rfe(t,e){return!f_(t.getCurrentResult(),e)}var Ife=class extends WF{#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||Ofe(),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=qF({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),tr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Ofe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var KF=class extends ip{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 Ife({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=rm(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=rm(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=rm(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=rm(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){tr.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=>PL(e,n))}findAll(t={}){return this.getAll().filter(e=>PL(t,e))}notify(t){tr.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return tr.batch(()=>Promise.all(t.map(e=>e.continue().catch(Ur))))}};function rm(t){return t.options.scope?.id}var YF=class extends ip{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??QT(r,e);let o=this.get(s);return o||(o=new _fe({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(){tr.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=>ML(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>ML(t,n)):e}notify(t){tr.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){tr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Nfe=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new YF,this.#t=t.mutationCache||new KF,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=XT.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Ov.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=pfe(e,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return tr.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;tr.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return tr.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=tr.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Ur).catch(Ur)}invalidateQueries(t,e={}){return tr.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=tr.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(Ur)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Ur)}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(Ur).catch(Ur)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ur).catch(Ur)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Ov.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(xh(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{_h(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(xh(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{_h(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=QT(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===JT&&(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),XF=t=>{const e=A.useContext(ZF);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Mfe=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),D.jsx(ZF.Provider,{value:t,children:e})),QF=A.createContext(!1),Pfe=()=>A.useContext(QF);QF.Provider;function kfe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Dfe=A.createContext(kfe()),Lfe=()=>A.useContext(Dfe),Ufe=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?HF(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},Ffe=t=>{A.useEffect(()=>{t.clearReset()},[t])},zfe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||HF(n,[t.error,r])),jfe=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))}},Bfe=(t,e)=>t.isLoading&&t.isFetching&&!e,Hfe=(t,e)=>t?.suspense&&e.isPending,jL=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function $fe(t,e,n){const r=Pfe(),s=Lfe(),o=XF(),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,jfe(a),Ufe(a,s,u),Ffe(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(tr.batchCalls(y)):Ur;return p.updateResult(),S},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),A.useEffect(()=>{p.setOptions(a)},[a,p]),Hfe(a,g))throw jL(a,p,s);if(zfe({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&&!Ah.isServer()&&Bfe(g,r)&&(f?jL(a,p,s):u?.promise)?.catch(Ur).finally(()=>{p.updateResult()}),a.notifyOnChangeProps?g:p.trackResult(g)}function qfe(t,e){return $fe(t,Afe)}const Wfe="modulepreload",Gfe=function(t){return"/"+t},BL={},Wn=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=Gfe(f),f in BL)return;BL[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":Wfe,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 HL=A.use,Cc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Uw(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 Vfe(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 Kfe(t){const e=A.useRef(null);return A.useImperativeHandle(t,()=>e.current,[]),e}const JF=!1;function Th(t){return t[t.length-1]}function Yfe(t){return typeof t=="function"}function _l(t,e){return Yfe(t)?t(e):t}const e7=Object.prototype.hasOwnProperty,$L=Object.prototype.propertyIsEnumerable;function t7(t){for(const e in t)if(e7.call(t,e))return!0;return!1}const Zfe=()=>Object.create(null),yl=(t,e)=>Al(t,e,Zfe);function Al(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=GL(t)&&GL(s);if(!o&&!(Nv(t)&&Nv(s)))return s;const a=o?t:qL(t);if(!a)return s;const u=o?s:qL(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:e7.call(t,y))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){p[y]=E;continue}const C=Al(S,E,n,r+1);p[y]=C,C===S&&g++}return c===f&&g===c?t:p}function qL(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!$L.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(!$L.call(t,s))return!1;r.push(s)}return r}function Nv(t){if(!WL(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!WL(n)||!n.hasOwnProperty("isPrototypeOf"))}function WL(t){return Object.prototype.toString.call(t)==="[object Object]"}function GL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Pl(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(!Pl(t[r],e[r],n))return!1;return!0}if(Nv(t)&&Nv(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Pl(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||!Pl(t[a],e[a],n)))return!1;return s===o}return!1}function zc(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 Xfe(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 Rh(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const Qfe=/[\x00-\x1f\x7f"<>`{}]/g;function Jfe(t){return t.replace(Qfe,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function VL(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 Jfe(e)}const ehe=["http:","https:","mailto:","tel:"];function Mv(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function Nf(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+=VL(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+VL(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function the(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function nhe(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 Ih(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,n7=5;function rhe(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 r7(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=rhe(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 lb(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=r7(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 _=s.static?.get(w);if(_)S=_;else{s.static??=new Map;const T=Tl(n.fullPath??n.from);T.parent=s,T.depth=o,S=T,s.static.set(w,T)}}else{const _=w.toLowerCase(),T=s.staticInsensitive?.get(_);if(T)S=T;else{s.staticInsensitive??=new Map;const R=Tl(n.fullPath??n.from);R.parent=s,R.depth=o,S=R,s.staticInsensitive.set(_,R)}}break}case 1:{const w=c.substring(E,y[1]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.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=zw(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]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.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=zw(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]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.toLowerCase():void 0,O=zw(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=Tl(n.fullPath??n.from);y.kind=n7,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=Tl(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)lb(t,e,c,u,s,o,a)}function Fw(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(Fw);for(const e of t.dynamic)ya(e)}if(t.optional?.length){t.optional.sort(Fw);for(const e of t.optional)ya(e)}if(t.wildcard?.length){t.wildcard.sort(Fw);for(const e of t.wildcard)ya(e)}}function Tl(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 zw(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 she(t,e){const n=Tl("/"),r=new Uint16Array(6);for(const s of t)lb(!1,r,s,1,n,0);ya(n),e.masksTree=n,e.flatCache=Ih(1e3)}function ohe(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=tR(t,e.masksTree);return e.flatCache.set(t,r),r}function ihe(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Tl("/"),lb(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),tR(r,a,n)}function ahe(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=tR(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=o7(o.route)),e.matchCache.set(r,o),o}function lhe(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function uhe(t,e=!1,n){const r=Tl(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return lb(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=lhe(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),ya(r),{processedTree:{segmentTree:r,singleCache:Ih(1e3),matchCache:Ih(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function tR(t,e,n=!1){const r=t.split("/"),s=dhe(t,r,e,n);if(!s)return null;const[o]=s7(t,r,s);return{route:s.node.route,rawParams:o}}function s7(t,e,n){const r=che(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===n7){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 o7(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function che(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function dhe(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const s=!Th(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:_,rawParams:T}=p;if(g.kind===2&&g.route&&!om(f,p))continue;if(g.parse){if(!KL(t,e,p))continue;T=p.rawParams,_=p.extract}r&&g.route&&g.kind!==Ta&&om(c,p)&&(c=p);const R=m===a;if(R&&(g.route&&(!o||g.kind===Ta||g.kind===2)&&om(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:_,rawParams:T};let P=!0;if(g.index.parse&&(KL(t,e,I)||(P=!1)),P){if(!C&&!w&&!y&&fhe(E,a))return I;om(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:_,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:_,rawParams:T})}if(!R)for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k],{prefix:F,suffix:j}=H;if(F||j){const W=H.caseSensitive?M:O??=M.toLowerCase();if(F&&!W.startsWith(F)||j&&!W.endsWith(j))continue}u.push({node:H,index:m+1,skipped:y,depth:P,statics:E,dynamics:C,optionals:w+sm(a,m),extract:_,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+sm(a,m),optionals:w,extract:_,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+sm(a,m),dynamics:C,optionals:w,extract:_,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+sm(a,m),dynamics:C,optionals:w,extract:_,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:_,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 sm(t,e){return 2**(t-e-1)}function fhe(t,e){return t===2**(e-1)-1}function KL(t,e,n){let r,s;try{[r,s]=s7(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 om(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 nv(t){return nR(t.filter(e=>e!==void 0).join("/"))}function nR(t){return t.replace(/\/{2,}/g,"/")}function i7(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 a7(t){return fi(i7(t))}function Pv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function hhe(t,e,n){return Pv(t,n)===Pv(e,n)}function phe({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&&Th(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&&(Th(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=nR(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function ghe(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 jw(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=>ZL(s,n)).join("/"):ZL(r,n)}function YL({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=r7(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=jw("_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=jw(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=jw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function ZL(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function dr(t){return t?.isNotFound===!0}function mhe(){try{return sessionStorage}catch{return}}const vhe="tsr-scroll-restoration-v1_3",l7=mhe();function yhe(){try{return JSON.parse(l7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function bhe(){try{l7?.setItem(vhe,JSON.stringify(pc))}catch{}}const pc=yhe(),XL="data-scroll-restoration-id",She=t=>t.state.__TSR_key||t.href;function Ehe(t){const e=t.getAttribute(XL);if(e)return`[${XL}="${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 im=!1;const rv="window";function b_(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===rv)continue;const r=b_(n);r&&e.add(r)}return e}function Che(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||She,o=new Set,a=u=>{const c=pc[u]||={};for(const f of o)f===document?c[rv]={scrollX,scrollY}:f.isConnected&&(c[Ehe(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,im=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{im||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())),bhe()})),!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=pc[S];if(E){let C=pc[y];for(const w in E){if(w===rv){if(p)continue}else{const _=b_(w);if(!_||p&&f&&(m??=QL(f),m.has(_)))continue}C||(C=pc[y]={}),C[w]??=E[w]}}}im=!0;try{const E=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(p){!E&&f&&(m??=QL(f));const _=E&&C&&g,T=r.restoring?pc[y]:void 0;if(T)for(const R in T){const{scrollX:M,scrollY:O}=T[R];if(R===rv){if(_)continue;scrollTo({top:O,left:M,behavior:c}),w=!0}else{const I=b_(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{im=!1}}))}function whe(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 Bw(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function xhe(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]=Bw(s):Array.isArray(o)?o.push(Bw(s)):n[r]=[o,Bw(s)]}return n}const _he=The(JSON.parse),Ahe=Rhe(JSON.stringify,JSON.parse);function The(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=xhe(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function Rhe(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=whe(s,r);return o?`?${o}`:""}}const kl="__root__";function u7(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 zr(t){return t instanceof Response&&!!t.options}function Ihe(t){return{input:({url:e})=>{for(const n of t)e=S_(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=c7(t[n],e);return e}}}function Ohe(t){const e=a7(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=nv(["/",e,o.pathname]),o)}}function S_(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 c7(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([]),_=n([]),T=n([]),R=r(()=>Hw(a,w.get())),M=r(()=>Hw(u,_.get())),O=r(()=>Hw(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=Ih(64);function j(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:_,cachedIds:T,matches:R,pendingMatches:M,cachedMatches:O,firstId:I,hasPending:P,matchRouteDeps:k,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:H,getRouteMatchStore:j,setMatches:Y,setPending:ne,setCached:$};Y(t.matches),o?.(W);function Y(ee){$w(ee,a,w,n,s)}function ne(ee){$w(ee,u,_,n,s)}function $(ee){$w(ee,c,T,n,s)}return W}function Hw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function $w(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)}nhe(n.get(),o)||n.set(o)})}const E_=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Mhe=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),ub=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Dl=(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},JL=(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(!(!zr(n)&&!dr(n)))throw zr(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:zr(n)?"redirected":dr(n)?"notFound":r.status==="pending"?"success":r.status,context:Dl(t,e.index),isFetching:!1,error:n})),dr(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),zr(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},d7=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},e4=(t,e,n)=>{const r=Dl(t,n);t.updateMatch(e,s=>({...s,context:r}))},Mf=(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&&!zr(n)&&!dr(n)&&(t.serialError??=n)},f7=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!ub(t,e)&&(n.options.loader||n.options.beforeLoad||p7(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{E_(t)},s);r._nonReactive.pendingTimeout=o}},Phe=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;f7(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()},khe=(t,e,n,r)=>{const s=t.router.getMatch(e);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=zc(()=>{o?.resolve(),o=void 0});const{paramsError:a,searchError:u}=s;a&&Mf(t,n,a),u&&Mf(t,n,u),f7(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=zc();const m={...Dl(t,n,!1),...s.__routeContext},{search:y,params:S,cause:E}=s,C=ub(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},_=R=>{if(R===void 0){t.router.batch(()=>{p(),g()});return}(zr(R)||dr(R))&&(p(),Mf(t,n,R)),t.router.batch(()=>{p(),t.updateMatch(e,M=>({...M,__beforeLoadContext:R})),g()})};let T;try{if(T=r.options.beforeLoad(w),Rh(T))return p(),T.catch(R=>{Mf(t,n,R)}).then(_)}catch(R){p(),Mf(t,n,R)}_(T)},Dhe=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>khe(t,n,e,s),u=()=>{if(d7(t,n))return;const c=Phe(t,n,s);return Rh(c)?c.then(a):a()};return o()},Lhe=(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}))},h7=(t,e,n,r,s)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),p=Dl(t,r),g=ub(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}},t4=async(t,e,n,r,s)=>{try{const o=t.router.getMatch(n);try{(!(JF??t.router.isServer)||o.ssr===!0)&&Oh(s);const a=s.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(h7(t,e,n,r,s)),f=!!u&&Rh(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:Dl(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:Dl(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,dr(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)}!zr(u)&&!dr(u)&&await Oh(s,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Dl(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Ra(t,a,o)}},Uhe=async(t,e,n)=>{async function r(y,S,E,C,w){const _=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(h7(t,e,s,n,w)):R,{status:O,invalid:I}=C,P=_>=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 t4(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){zr(k)&&await t.router.navigate(k.options)}})()):O!=="success"||a?await t4(t,e,s,n,w):e4(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(d7(t,s)){if(!t.router.getMatch(s))return t.matches[n];e4(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=ub(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),_=w._nonReactive.error||w.error;_&&Ra(t,w,_),w.status==="pending"&&await r(C,y,E,w,c)}else{const w=C&&!t.router.stores.matchStores.has(s),_=t.router.getMatch(s);_._nonReactive.loaderPromise=zc(),w!==_.preload&&t.updateMatch(s,T=>({...T,preload:w})),await r(C,y,E,_,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 n4(t){const e=t,n=[];Mhe(e.router)&&E_(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=Dhe(e,m);Rh(y)&&await y}catch(y){if(zr(y))throw y;if(dr(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?JL(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(Uhe(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(zr(S))throw S;dr(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=JL(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 Oh(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 Oh(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=Lhe(e,y,E);if(C){const w=await C;e.updateMatch(y,_=>({..._,...w}))}}catch(C){console.error(`Error executing head for route ${S}:`,C)}}const g=E_(e);if(Rh(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function r4(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Oh(t,e=sv){!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===sv?(()=>{if(t._componentsPromise===void 0){const r=r4(t,sv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():r4(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function p7(t){for(const e of sv)if(t.options[e]?.preload)return!0;return!1}const sv=["component","errorComponent","pendingComponent","notFoundComponent"];var Na="__TSR_index",s4="popstate",o4="beforeunload";function Fhe(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=kv(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=i4(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=i4(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 i4(t,e){e||(e={});const n=rR();return{...e,key:n,__TSR_key:n,[Na]:t}}function zhe(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=(()=>kv(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const P=rR();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 _=()=>{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=kv(k,H),C={href:F,state:H,isPush:C?.isPush||P==="push"},w||(w=Promise.resolve().then(()=>_()))},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,j=!H&&!F||g;g=!1;const W=j?"GO":F?"BACK":"FORWARD",Y=j?{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 j=F.enableBeforeUnload??!0;if(j===!0){k=!0;break}if(typeof j=="function"&&j()===!0){k=!0;break}}if(k)return P.preventDefault(),P.returnValue=""},I=Fhe({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:_,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(o4,O,{capture:!0}),e.removeEventListener(s4,M)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(o4,O,{capture:!0}),e.addEventListener(s4,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 jhe(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function kv(t,e){const n=jhe(t),r=n.indexOf("#"),s=n.indexOf("?"),o=rR();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 rR(){return(Math.random()+1).toString(36).substring(7)}function Nc(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 Bhe=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=ghe(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=zhe()),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=Ih(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=Nhe($he(this.latestLocation),p),Che(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=a7(c);g&&g!=="/"&&p.push(Ohe({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:Ihe(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=uhe(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&she(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),_=this.options.stringifySearch(w);return{href:c+_+p,publicHref:c+_+p,pathname:Nf(c).path,external:!1,searchStr:_,search:yl(r?.search,w),hash:Nf(p.slice(1)).path,state:Al(r?.state,m)}}const y=new URL(g,this.origin),S=S_(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:Nf(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:C,search:yl(r?.search,E),hash:Nf(S.hash.slice(1)).path,state:Al(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)=>phe({base:n,to:r.includes("//")?nR(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=>qhe({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&&t7(S))for(const F of C){const j=F.options.params?.stringify??F.options.stringifyParams;if(j)try{Object.assign(S,j(S))}catch{}}const w=n.leaveParams?y:Nf(YL({path:y,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=p;if(n._includeValidateSearch&&this.options.search?.strict){const F={};C.forEach(j=>{if(j.options.validateSearch)try{Object.assign(F,ov(j.options.validateSearch,{...F,..._}))}catch{}}),_=F}_=Whe({search:_,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),_=yl(p,_);const T=this.options.stringifySearch(_),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=Al(a.state,O);const I=`${w}${T}${M}`;let P,k,H=!1;if(this.rewrite){const F=new URL(I,this.origin),j=c7(this.rewrite,F);P=F.href.replace(F.origin,""),j.origin!==this.origin?(k=j.href,H=!0):k=j.pathname+j.search+j.hash}else P=the(I),k=P;return{publicHref:k,href:P,pathname:w,search:_,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=ohe(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=Pl(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=zc(()=>{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=kv(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=S_(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(Mv(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=Nc(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await n4({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,_=this.stores.matches.get();m=w?_.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?_.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)):_,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 _ of C)this.looseRoutesById[_.routeId].options[w]?.(_)})})}})}catch(p){zr(p)?(s=p,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):dr(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(Nc(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&&Mv(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=Oh,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 n4({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(zr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});dr(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=ihe(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Pl(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Pl(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??Ahe,parseSearch:t.parseSearch??_he,protocolAllowlist:t.protocolAllowlist??ehe}),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=o7(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?Vhe(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 j=m?.search??t.search,W=m?._strictSearch??void 0;try{const Y=ov(g.options.validateSearch,{...j})??void 0;y={...j,...Y},S={...W,...Y},E=void 0}catch(Y){let ne=Y;if(Y instanceof Dv||(ne=new Dv(Y.message,{cause:Y})),e?.throwOnError)throw ne;y=j,S={},E=ne}}const C=g.options.loaderDeps?.({search:y})??"",w=C?JSON.stringify(C):"",{interpolatedPath:_,usedParams:T}=YL({path:g.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),R=g.id+_+w,M=this.getMatch(R),O=f.get(g.id),I=M?._strictParams??T;let P;if(!M)try{a4(g,I)}catch(j){if(dr(j)||zr(j)?P=j:P=new Hhe(j.message,{cause:j}),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 j=g.options.loader||g.options.beforeLoad||g.lazyFn||p7(g)?"pending":"success";H={id:R,ssr:g.options.ssr,index:p,routeId:g.id,params:O?.params??s,_strictParams:I,pathname:_,updatedAt:Date.now(),search:O?yl(O.search,y):y,_strictSearch:S,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:zc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:k,loaderDeps:O?Al(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:_=>this.navigate({..._,_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=Th(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=Th(r),a={...t.search};for(const g of r)try{Object.assign(a,ov(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{a4(m,g)}catch{}f=g}const p={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,p]),p}},Dv=class extends Error{},Hhe=class extends Error{};function $he(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function ov(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new Dv("Async validation not supported");if(n.issues)throw new Dv(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 qhe({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=fi(t);let o;const a=ahe(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function Whe({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return Ghe(n)(t,e,r??!1)}function Ghe(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=ov(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 Vhe(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 kl}function a4(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 Khe="Error preloading route! ☝️";var g7=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=kl:this.parentRoute||pi();let s=r?kl:n?.path;s&&s!=="/"&&(s=i7(s));const o=n?.id||s;let a=r?kl:nv([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=nv(["/",a]));const u=a==="__root__"?"/":nv([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=>u7({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.")}},Yhe=class extends g7{constructor(t){super(t)}};function sR(t){const e=t.errorComponent??oR;return D.jsx(Zhe,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?A.createElement(e,{error:n,reset:r}):t.children})}var Zhe=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 oR({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 Xhe({children:t,fallback:e=null}){return m7()?D.jsx(z.Fragment,{children:t}):D.jsx(z.Fragment,{children:e})}function m7(){return z.useSyncExternalStore(Qhe,()=>!0,()=>!1)}function Qhe(){return()=>{}}var v7=A.createContext(null);function fs(t){return A.useContext(v7)}var cb=A.createContext(void 0),Jhe=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 epe({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 _=f.nextDep;if(_!==void 0){f=_;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 tpe(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 C_=[];let iv=0;const{link:l4,unlink:npe,propagate:rpe,checkDirty:y7,shallowPropagate:u4}=epe({update(t){return t._update()},notify(t){C_[w_++]=t,t.flags&=~rn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=rn.Mutable|rn.Dirty,Lv(t))}});let am=0,w_=0,So,x_=0;function b7(t){try{++x_,t()}finally{--x_||S7()}}function Lv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=npe(n,t)}function S7(){if(!(x_>0)){for(;am<w_;){const t=C_[am];C_[am++]=void 0,t.notify()}am=0,w_=0}}function c4(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&&l4(s,So,iv),s._snapshot},subscribe(o){const a=tpe(o),u={current:!1},c=spe(()=>{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,++iv,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),Lv(s)}}};return n?(s.flags=rn.Mutable|rn.Dirty,s.get=function(){const o=s.flags;if(o&rn.Dirty||o&rn.Pending&&y7(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&u4(a)}}else o&rn.Pending&&(s.flags=o&~rn.Pending);return So!==void 0&&l4(s,So,iv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(rpe(a),u4(a),S7())}},s}function spe(t){const e=()=>{const r=So;So=n,++iv,n.depsTail=void 0,n.flags=rn.Watching|rn.RecursedCheck;try{return t()}finally{So=r,n.flags&=~rn.RecursedCheck,Lv(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&&y7(this.deps,this)?e():this.flags=rn.Watching},stop(){this.flags=rn.None,this.depsTail=void 0,Lv(this)}};return e(),n}function ope(t,e){return t===e}function Wr(t,e,n=ope){const r=A.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=A.useCallback(()=>t?.get(),[t]);return fT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var qw={get(){},subscribe(){return{unsubscribe(){}}}};function ipe(t,e){const n=A.useRef();return r=>{const s=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=Al(n.current,s):s}}function au(t){const e=fs(),n=A.useContext(t.from?Jhe:cb),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=ipe(t,e),o=Wr(r??qw,a=>a?s(a):qw);if(o!==qw)return o;(t.shouldThrow??!0)&&pi()}function E7(t){return au({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function C7(t){const{select:e,...n}=t;return au({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function w7(t){return au({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 x7(t){return au({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function iR(t){const e=fs();return A.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function vAe(t){const e=fs(),n=iR(),r=A.useRef(null);return Cc(()=>{r.current!==t&&(n(t),r.current=t)},[e,t,n]),null}function _7(t){return au({...t,select:e=>t.select?t.select(e.context):e.context})}function ape(t,e){const n=fs(),r=Kfe(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:_,style:T,className:R,onClick:M,onBlur:O,onFocus:I,onMouseEnter:P,onMouseLeave:k,onTouchStart:H,ignoreBlocker:F,params:j,search:W,hash:Y,state:ne,mask:$,reloadDocument:ee,unsafeRelative:fe,from:de,_fromLocation:Ae,...L}=t,V=m7(),K=A.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),J=Wr(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(()=>hpe(he,ue,n.history,_),[_,ue,he,n.history]),xe=A.useMemo(()=>{if(ve?.external)return Mv(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!ppe(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Mv(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=A.useMemo(()=>{if(xe)return!1;if(a?.exact){if(!hhe(J.pathname,oe.pathname,n.basepath))return!1}else{const gt=Pv(J.pathname,n.basepath),vn=Pv(oe.pathname,n.basepath);if(!(gt.startsWith(vn)&&(gt.length===vn.length||gt[vn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Pl(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,xe,V,oe.hash,oe.pathname,oe.search,n.basepath]),Ee=Xe?_l(s,{})??lpe:Ww,pt=Xe?Ww:_l(o,{})??Ww,Ce=[R,Ee.className,pt.className].filter(Boolean).join(" "),ze=(T||Ee.style||pt.style)&&{...T,...Ee.style,...pt.style},[je,He]=A.useState(!1),gr=A.useRef(!1),Et=t.reloadDocument||xe?!1:c??n.options.defaultPreload,Vr=f??n.options.defaultPreloadDelay??0,Gn=A.useCallback(()=>{n.preloadRoute({...K,_builtLocation:oe}).catch(gt=>{console.warn(gt),console.warn(Khe)})},[n,K,oe]);Vfe(r,A.useCallback(gt=>{gt?.isIntersecting&&Gn()},[Gn]),fpe,{disabled:!!_||Et!=="viewport"}),A.useEffect(()=>{gr.current||!_&&Et==="render"&&(Gn(),gr.current=!0)},[_,Gn,Et]);const Ar=gt=>{const vn=gt.currentTarget.getAttribute("target"),Rr=w!==void 0?w:vn;if(!_&&!gpe(gt)&&!gt.defaultPrevented&&(!Rr||Rr==="_self")&>.button===0){gt.preventDefault(),i8.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(xe)return{...L,ref:r,href:xe,...C&&{children:C},...w&&{target:w},..._&&{disabled:_},...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(_||Et!=="intent")return;if(!Vr){Gn();return}const vn=gt.currentTarget;if(Pf.has(vn))return;const Rr=setTimeout(()=>{Pf.delete(vn),Gn()},Vr);Pf.set(vn,Rr)},Tr=gt=>{_||Et!=="intent"||Gn()},Gt=gt=>{if(_||!Et||!Vr)return;const vn=gt.currentTarget,Rr=Pf.get(vn);Rr&&(clearTimeout(Rr),Pf.delete(vn))};return{...L,...Ee,...pt,href:ve?.href,ref:r,onClick:sc([M,Ar]),onBlur:sc([O,Gt]),onFocus:sc([I,to]),onMouseEnter:sc([P,to]),onMouseLeave:sc([k,Gt]),onTouchStart:sc([H,Tr]),disabled:!!_,target:w,...ze&&{style:ze},...Ce&&{className:Ce},..._&&upe,...Xe&&cpe,...V&&je&&dpe}}var Ww={},lpe={className:"active"},upe={role:"link","aria-disabled":!0},cpe={"data-status":"active","aria-current":"page"},dpe={"data-transitioning":"transitioning"},Pf=new WeakMap,fpe={rootMargin:"100px"},sc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function hpe(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function ppe(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var A7=A.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:s,...o}=ape(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 gpe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var mpe=class extends g7{constructor(e){super(e),this.useMatch=n=>au({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>_7({...n,from:this.id}),this.useSearch=n=>x7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>w7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>C7({...n,from:this.id}),this.useLoaderData=n=>E7({...n,from:this.id}),this.useNavigate=()=>iR({from:this.fullPath}),this.Link=z.forwardRef((n,r)=>D.jsx(A7,{ref:r,from:this.fullPath,...n}))}};function vpe(t){return new mpe(t)}function ype(){return t=>Spe(t)}var bpe=class extends Yhe{constructor(t){super(t),this.useMatch=e=>au({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>_7({...e,from:this.id}),this.useSearch=e=>x7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>w7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>C7({...e,from:this.id}),this.useLoaderData=e=>E7({...e,from:this.id}),this.useNavigate=()=>iR({from:this.fullPath}),this.Link=z.forwardRef((e,n)=>D.jsx(A7,{ref:n,from:this.fullPath,...e}))}};function Spe(t){return new bpe(t)}function fr(t){return new Epe(t,{silent:!0}).createRoute}var Epe=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=vpe(n);return r.isRoot=!1,r},this.silent=e?.silent}};function or(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,Xfe(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(HL)HL(a());else throw a();return A.createElement(r,f)};return u.preload=a,u}function Cpe(t){const e=fs(),n=`not-found-${Wr(e.stores.location,r=>r.pathname)}-${Wr(e.stores.status,r=>r)}`;return D.jsx(sR,{getResetKey:()=>n,onCatch:(r,s)=>{if(dr(r))t.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(dr(r))return t.fallback?.(r);throw r},children:t.children})}function wpe(){return D.jsx("p",{children:"Not Found"})}function gc(t){return D.jsx(D.Fragment,{children:t.children})}function T7(t,e,n){return e.options.notFoundComponent?D.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?D.jsx(t.options.defaultNotFoundComponent,{...n}):D.jsx(wpe,{})}function xpe(t){return null}function _pe(){return xpe(fs()),null}var Ape=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,Tpe=(t,e)=>t[0]===e[0]&&t[1]===e[1],R7=A.memo(function({matchId:e}){const n=fs(),r=n.stores.matchStores.get(e);r||pi();const s=Wr(n.stores.loadedAt,a=>a),o=Wr(r,a=>a,Ape);return D.jsx(Rpe,{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 Rpe({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:gc,m=u?sR:gc,y=f?Cpe:gc;return D.jsxs(s.isRoot?s.options.shellComponent??gc:gc,{children:[D.jsx(cb.Provider,{value:e,children:D.jsx(g,{fallback:a,children:D.jsx(m,{getResetKey:()=>n,errorComponent:u||oR,onCatch:(S,E)=>{if(dr(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(Xhe,{fallback:a,children:D.jsx(d4,{matchId:e})}):D.jsx(d4,{matchId:e})})})})}),r.parentRouteId===kl?D.jsxs(D.Fragment,{children:[D.jsx(Ipe,{}),t.options.scrollRestoration&&JF?D.jsx(_pe,{}):null]}):null]})}function Ipe(){const t=fs(),e=A.useRef();return Cc(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...Nc(t.stores.location.get(),r??n)}),e.current=n},[Wr(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var d4=A.memo(function({matchId:e}){const n=fs(),r=(p,g)=>n.getMatch(p.id)?._nonReactive[g]??p._nonReactive[g],s=n.stores.matchStores.get(e);s||pi();const o=Wr(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(I7,{})},[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=zc();g._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),g._nonReactive.minPendingPromise=void 0},p)}}throw r(o,"loadPromise")}if(o.status==="notFound")return dr(o.error)||pi(),T7(n,u,o.error);if(o.status==="redirected")throw zr(o.error)||pi(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),I7=A.memo(function(){const e=fs(),n=A.useContext(cb);let r,s=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[r,s]=Wr(f,p=>[p?.routeId,p?.globalNotFound??!1],Tpe),o=Wr(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(),T7(e,a,void 0);if(!o)return null;const c=D.jsx(R7,{matchId:o});return r===kl?D.jsx(A.Suspense,{fallback:u,children:c}):c});function Ope(){const t=fs(),e=A.useRef({router:t,mounted:!1}),[n,r]=A.useState(!1),s=Wr(t.stores.isLoading,g=>g),o=Wr(t.stores.hasPending,g=>g),a=Uw(s),u=s||n||o,c=Uw(u),f=s||o,p=Uw(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]),Cc(()=>{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]),Cc(()=>{a&&!s&&t.emit({type:"onLoad",...Nc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,s]),Cc(()=>{p&&!f&&t.emit({type:"onBeforeRouteMount",...Nc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,p,t]),Cc(()=>{if(c&&!u){const g=Nc(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),b7(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function Npe(){const t=fs(),e=t.routesById[kl].options.pendingComponent??t.options.defaultPendingComponent,n=e?D.jsx(e,{}):null,r=D.jsxs(typeof document<"u"&&t.ssr?gc:A.Suspense,{fallback:n,children:[D.jsx(Ope,{}),D.jsx(Mpe,{})]});return t.options.InnerWrap?D.jsx(t.options.InnerWrap,{children:r}):r}function Mpe(){const t=fs(),e=Wr(t.stores.firstId,s=>s),n=Wr(t.stores.loadedAt,s=>s),r=e?D.jsx(R7,{matchId:e}):null;return D.jsx(cb.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:D.jsx(sR,{getResetKey:()=>n,errorComponent:oR,onCatch:void 0,children:r})})}var Ppe=t=>({createMutableStore:c4,createReadonlyStore:c4,batch:b7}),kpe=t=>new Dpe(t),Dpe=class extends Bhe{constructor(t){super(t,Ppe)}};function Lpe({router:t,children:e,...n}){t7(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=D.jsx(v7.Provider,{value:t,children:e});return t.options.Wrap?D.jsx(t.options.Wrap,{children:r}):r}function Upe({router:t,...e}){return D.jsx(Lpe,{router:t,...e,children:D.jsx(Npe,{})})}var Gw={exports:{}},kf={},Vw={exports:{}},Kw={};var f4;function Fpe(){return f4||(f4=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,_=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,j());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,_(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?j():O=!1}}}var j;if(typeof T=="function")j=function(){T(F)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Y=W.port2;W.port1.onmessage=F,j=function(){Y.postMessage(null)}}else j=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?(_(I),I=-1):E=!0,ne(M,fe-de))):($.sortIndex=Ae,e(c,$),S||y||(S=!0,O||(O=!0,j()))),$},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}}}})(Kw)),Kw}var h4;function zpe(){return h4||(h4=1,Vw.exports=Fpe()),Vw.exports}var p4;function jpe(){if(p4)return kf;p4=1;var t=zpe(),e=Jh(),n=o8();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 x=!1,N=v.child;N;){if(N===d){x=!0,d=v,h=b;break}if(N===h){x=!0,h=v,d=b;break}N=N.sibling}if(!x){for(N=b.child;N;){if(N===d){x=!0,d=b,h=v;break}if(N===h){x=!0,h=b,d=v;break}N=N.sibling}if(!x)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"),_=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 j(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 _: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)?XO(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=XO(l),i=QO(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(J),K(J,i)}function xe(){V(J),V(oe),V(he)}function Xe(i){i.memoizedState!==null&&K(ue,i);var l=J.current,d=QO(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),ff._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 je=!1;function He(i,l){if(!i||je)return"";je=!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(),x=b[0],N=b[1];if(x&&N){var B=x.split(`
|
|
219
219
|
`),Q=N.split(`
|
|
@@ -221,14 +221,14 @@ Minimum version required to store current data is: `+F+`.
|
|
|
221
221
|
`+B[h].replace(" at new "," at ");return i.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",i.displayName)),se}while(1<=h&&0<=v);break}}}finally{je=!1,Error.prepareStackTrace=d}return(d=i?i.displayName||i.name:"")?ze(d):""}function gr(i,l){switch(i.tag){case 26:case 27:case 5:return ze(i.type);case 16:return ze("Lazy");case 13:return i.child!==l&&l!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return He(i.type,!1);case 11:return He(i.type.render,!1);case 1:return He(i.type,!0);case 31:return ze("Activity");default:return""}}function Et(i){try{var l="",d=null;do l+=gr(i,d),d=i,i=i.return;while(i);return l}catch(h){return`
|
|
222
222
|
Error generating stack: `+h.message+`
|
|
223
223
|
`+h.stack}}var Vr=Object.prototype.hasOwnProperty,Gn=t.unstable_scheduleCallback,Ar=t.unstable_cancelCallback,to=t.unstable_shouldYield,Tr=t.unstable_requestPaint,Gt=t.unstable_now,gt=t.unstable_getCurrentPriorityLevel,vn=t.unstable_ImmediatePriority,Rr=t.unstable_UserBlockingPriority,no=t.unstable_NormalPriority,gd=t.unstable_LowPriority,ko=t.unstable_IdlePriority,fu=t.log,hu=t.unstable_setDisableYieldValue,Mi=null,ar=null;function Ps(i){if(typeof fu=="function"&&hu(i),ar&&typeof ar.setStrictMode=="function")try{ar.setStrictMode(Mi,i)}catch{}}var Vn=Math.clz32?Math.clz32:ps,md=Math.log,Pi=Math.LN2;function ps(i){return i>>>=0,i===0?32:31-(md(i)/Pi|0)|0}var ki=256,Va=262144,Ka=4194304;function ks(i){var l=i&42;if(l!==0)return l;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Ya(i,l,d){var h=i.pendingLanes;if(h===0)return 0;var v=0,b=i.suspendedLanes,x=i.pingedLanes;i=i.warmLanes;var N=h&134217727;return N!==0?(h=N&~b,h!==0?v=ks(h):(x&=N,x!==0?v=ks(x):d||(d=N&~i,d!==0&&(v=ks(d))))):(N=h&~b,N!==0?v=ks(N):x!==0?v=ks(x):d||(d=h&~i,d!==0&&(v=ks(d)))),v===0?0:l!==0&&l!==v&&(l&b)===0&&(b=v&-v,d=l&-l,b>=d||b===32&&(d&4194048)!==0)?l:v}function ro(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function pu(i,l){switch(i){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kr(){var i=Ka;return Ka<<=1,(Ka&62914560)===0&&(Ka=4194304),i}function so(i){for(var l=[],d=0;31>d;d++)l.push(i);return l}function Do(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function vd(i,l,d,h,v,b){var x=i.pendingLanes;i.pendingLanes=d,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=d,i.entangledLanes&=d,i.errorRecoveryDisabledLanes&=d,i.shellSuspendCounter=0;var N=i.entanglements,B=i.expirationTimes,Q=i.hiddenUpdates;for(d=x&~d;0<d;){var se=31-Vn(d),ae=1<<se;N[se]=0,B[se]=-1;var te=Q[se];if(te!==null)for(Q[se]=null,se=0;se<te.length;se++){var re=te[se];re!==null&&(re.lane&=-536870913)}d&=~ae}h!==0&&mp(i,h,0),b!==0&&v===0&&i.tag!==0&&(i.suspendedLanes|=b&~(x&~l))}function mp(i,l,d){i.pendingLanes|=l,i.suspendedLanes&=~l;var h=31-Vn(l);i.entangledLanes|=l,i.entanglements[h]=i.entanglements[h]|1073741824|d&261930}function yd(i,l){var d=i.entangledLanes|=l;for(i=i.entanglements;d;){var h=31-Vn(d),v=1<<h;v&l|i[h]&l&&(i[h]|=l),d&=~v}}function gu(i,l){var d=l&-l;return d=(d&42)!==0?1:mu(d),(d&(i.suspendedLanes|l))!==0?0:d}function mu(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Za(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function vp(){var i=ee.p;return i!==0?i:(i=window.event,i===void 0?32:EN(i.type))}function Di(i,l){var d=ee.p;try{return ee.p=i,l()}finally{ee.p=d}}var oo=Math.random().toString(36).slice(2),In="__reactFiber$"+oo,nt="__reactProps$"+oo,Yr="__reactContainer$"+oo,bd="__reactEvents$"+oo,yp="__reactListeners$"+oo,Sd="__reactHandles$"+oo,Ed="__reactResources$"+oo,Li="__reactMarker$"+oo;function Cd(i){delete i[In],delete i[nt],delete i[bd],delete i[yp],delete i[Sd]}function Ui(i){var l=i[In];if(l)return l;for(var d=i.parentNode;d;){if(l=d[Yr]||d[In]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(i=oN(i);i!==null;){if(d=i[In])return d;i=oN(i)}return l}i=d,d=i.parentNode}return null}function Fi(i){if(i=i[In]||i[Yr]){var l=i.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return i}return null}function Xa(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i.stateNode;throw Error(r(33))}function mr(i){var l=i[Ed];return l||(l=i[Ed]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function an(i){i[Li]=!0}var io=new Set,bp={};function Ds(i,l){zi(i,l),zi(i+"Capture",l)}function zi(i,l){for(bp[i]=l,i=0;i<l.length;i++)io.add(l[i])}var Sp=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),wd={},Qa={};function xd(i){return Vr.call(Qa,i)?!0:Vr.call(wd,i)?!1:Sp.test(i)?Qa[i]=!0:(wd[i]=!0,!1)}function Lo(i,l,d){if(xd(l))if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":i.removeAttribute(l);return;case"boolean":var h=l.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(l);return}}i.setAttribute(l,""+d)}}function Ls(i,l,d){if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttribute(l,""+d)}}function vr(i,l,d,h){if(h===null)i.removeAttribute(d);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(d);return}i.setAttributeNS(l,d,""+h)}}function ln(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ep(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Nb(i,l,d){var h=Object.getOwnPropertyDescriptor(i.constructor.prototype,l);if(!i.hasOwnProperty(l)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,b=h.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return v.call(this)},set:function(x){d=""+x,b.call(this,x)}}),Object.defineProperty(i,l,{enumerable:h.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function vu(i){if(!i._valueTracker){var l=Ep(i)?"checked":"value";i._valueTracker=Nb(i,l,""+i[l])}}function _d(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var d=l.getValue(),h="";return i&&(h=Ep(i)?i.checked?"true":"false":i.value),i=h,i!==d?(l.setValue(i),!0):!1}function yu(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Cp=/[\n"\\]/g;function Ir(i){return i.replace(Cp,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ad(i,l,d,h,v,b,x,N){i.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?i.type=x:i.removeAttribute("type"),l!=null?x==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+ln(l)):i.value!==""+ln(l)&&(i.value=""+ln(l)):x!=="submit"&&x!=="reset"||i.removeAttribute("value"),l!=null?ji(i,x,ln(l)):d!=null?ji(i,x,ln(d)):h!=null&&i.removeAttribute("value"),v==null&&b!=null&&(i.defaultChecked=!!b),v!=null&&(i.checked=v&&typeof v!="function"&&typeof v!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.name=""+ln(N):i.removeAttribute("name")}function Td(i,l,d,h,v,b,x,N){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),l!=null||d!=null){if(!(b!=="submit"&&b!=="reset"||l!=null)){vu(i);return}d=d!=null?""+ln(d):"",l=l!=null?""+ln(l):d,N||l===i.value||(i.value=l),i.defaultValue=l}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=N?i.checked:!!h,i.defaultChecked=!!h,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(i.name=x),vu(i)}function ji(i,l,d){l==="number"&&yu(i.ownerDocument)===i||i.defaultValue===""+d||(i.defaultValue=""+d)}function ao(i,l,d,h){if(i=i.options,l){l={};for(var v=0;v<d.length;v++)l["$"+d[v]]=!0;for(d=0;d<i.length;d++)v=l.hasOwnProperty("$"+i[d].value),i[d].selected!==v&&(i[d].selected=v),v&&h&&(i[d].defaultSelected=!0)}else{for(d=""+ln(d),l=null,v=0;v<i.length;v++){if(i[v].value===d){i[v].selected=!0,h&&(i[v].defaultSelected=!0);return}l!==null||i[v].disabled||(l=i[v])}l!==null&&(l.selected=!0)}}function pe(i,l,d){if(l!=null&&(l=""+ln(l),l!==i.value&&(i.value=l),d==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=d!=null?""+ln(d):""}function U(i,l,d,h){if(l==null){if(h!=null){if(d!=null)throw Error(r(92));if(ne(h)){if(1<h.length)throw Error(r(93));h=h[0]}d=h}d==null&&(d=""),l=d}d=ln(l),i.defaultValue=d,h=i.textContent,h===d&&h!==""&&h!==null&&(i.value=h),vu(i)}function Z(i,l){if(l){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=l;return}}i.textContent=l}var ce=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Te(i,l,d){var h=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?h?i.setProperty(l,""):l==="float"?i.cssFloat="":i[l]="":h?i.setProperty(l,d):typeof d!="number"||d===0||ce.has(l)?l==="float"?i.cssFloat=d:i[l]=(""+d).trim():i[l]=d+"px"}function ke(i,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(i=i.style,d!=null){for(var h in d)!d.hasOwnProperty(h)||l!=null&&l.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var v in l)h=l[v],l.hasOwnProperty(v)&&d[v]!==h&&Te(i,v,h)}else for(var b in l)l.hasOwnProperty(b)&&Te(i,b,l[b])}function Ue(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var en=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Dn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function lr(i){return Dn.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function tn(){}var yr=null;function On(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var bu=null,Su=null;function ZR(i){var l=Fi(i);if(l&&(i=l.stateNode)){var d=i[nt]||null;e:switch(i=l.stateNode,l.type){case"input":if(Ad(i,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=i;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Ir(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var h=d[l];if(h!==i&&h.form===i.form){var v=h[nt]||null;if(!v)throw Error(r(90));Ad(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(l=0;l<d.length;l++)h=d[l],h.form===i.form&&_d(h)}break e;case"textarea":pe(i,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&ao(i,!!d.multiple,l,!1)}}}var Mb=!1;function XR(i,l,d){if(Mb)return i(l,d);Mb=!0;try{var h=i(l);return h}finally{if(Mb=!1,(bu!==null||Su!==null)&&(ug(),bu&&(l=bu,i=Su,Su=bu=null,ZR(l),i)))for(l=0;l<i.length;l++)ZR(i[l])}}function Rd(i,l){var d=i.stateNode;if(d===null)return null;var h=d[nt]||null;if(h===null)return null;d=h[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Uo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pb=!1;if(Uo)try{var Id={};Object.defineProperty(Id,"passive",{get:function(){Pb=!0}}),window.addEventListener("test",Id,Id),window.removeEventListener("test",Id,Id)}catch{Pb=!1}var Bi=null,kb=null,wp=null;function QR(){if(wp)return wp;var i,l=kb,d=l.length,h,v="value"in Bi?Bi.value:Bi.textContent,b=v.length;for(i=0;i<d&&l[i]===v[i];i++);var x=d-i;for(h=1;h<=x&&l[d-h]===v[b-h];h++);return wp=v.slice(i,1<h?1-h:void 0)}function xp(i){var l=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&l===13&&(i=13)):i=l,i===10&&(i=13),32<=i||i===13?i:0}function _p(){return!0}function JR(){return!1}function Or(i){function l(d,h,v,b,x){this._reactName=d,this._targetInst=v,this.type=h,this.nativeEvent=b,this.target=x,this.currentTarget=null;for(var N in i)i.hasOwnProperty(N)&&(d=i[N],this[N]=d?d(b):b[N]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?_p:JR,this.isPropagationStopped=JR,this}return g(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=_p)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=_p)},persist:function(){},isPersistent:_p}),l}var Ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ap=Or(Ja),Od=g({},Ja,{view:0,detail:0}),zB=Or(Od),Db,Lb,Nd,Tp=g({},Od,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fb,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Nd&&(Nd&&i.type==="mousemove"?(Db=i.screenX-Nd.screenX,Lb=i.screenY-Nd.screenY):Lb=Db=0,Nd=i),Db)},movementY:function(i){return"movementY"in i?i.movementY:Lb}}),eI=Or(Tp),jB=g({},Tp,{dataTransfer:0}),BB=Or(jB),HB=g({},Od,{relatedTarget:0}),Ub=Or(HB),$B=g({},Ja,{animationName:0,elapsedTime:0,pseudoElement:0}),qB=Or($B),WB=g({},Ja,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),GB=Or(WB),VB=g({},Ja,{data:0}),tI=Or(VB),KB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ZB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XB(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=ZB[i])?!!l[i]:!1}function Fb(){return XB}var QB=g({},Od,{key:function(i){if(i.key){var l=KB[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=xp(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?YB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fb,charCode:function(i){return i.type==="keypress"?xp(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?xp(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),JB=Or(QB),eH=g({},Tp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nI=Or(eH),tH=g({},Od,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fb}),nH=Or(tH),rH=g({},Ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),sH=Or(rH),oH=g({},Tp,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),iH=Or(oH),aH=g({},Ja,{newState:0,oldState:0}),lH=Or(aH),uH=[9,13,27,32],zb=Uo&&"CompositionEvent"in window,Md=null;Uo&&"documentMode"in document&&(Md=document.documentMode);var cH=Uo&&"TextEvent"in window&&!Md,rI=Uo&&(!zb||Md&&8<Md&&11>=Md),sI=" ",oI=!1;function iI(i,l){switch(i){case"keyup":return uH.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aI(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Eu=!1;function dH(i,l){switch(i){case"compositionend":return aI(l);case"keypress":return l.which!==32?null:(oI=!0,sI);case"textInput":return i=l.data,i===sI&&oI?null:i;default:return null}}function fH(i,l){if(Eu)return i==="compositionend"||!zb&&iI(i,l)?(i=QR(),wp=kb=Bi=null,Eu=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return rI&&l.locale!=="ko"?null:l.data;default:return null}}var hH={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lI(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!hH[i.type]:l==="textarea"}function uI(i,l,d,h){bu?Su?Su.push(h):Su=[h]:bu=h,l=mg(l,"onChange"),0<l.length&&(d=new Ap("onChange","change",null,d,h),i.push({event:d,listeners:l}))}var Pd=null,kd=null;function pH(i){WO(i,0)}function Rp(i){var l=Xa(i);if(_d(l))return i}function cI(i,l){if(i==="change")return l}var dI=!1;if(Uo){var jb;if(Uo){var Bb="oninput"in document;if(!Bb){var fI=document.createElement("div");fI.setAttribute("oninput","return;"),Bb=typeof fI.oninput=="function"}jb=Bb}else jb=!1;dI=jb&&(!document.documentMode||9<document.documentMode)}function hI(){Pd&&(Pd.detachEvent("onpropertychange",pI),kd=Pd=null)}function pI(i){if(i.propertyName==="value"&&Rp(kd)){var l=[];uI(l,kd,i,On(i)),XR(pH,l)}}function gH(i,l,d){i==="focusin"?(hI(),Pd=l,kd=d,Pd.attachEvent("onpropertychange",pI)):i==="focusout"&&hI()}function mH(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Rp(kd)}function vH(i,l){if(i==="click")return Rp(l)}function yH(i,l){if(i==="input"||i==="change")return Rp(l)}function bH(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var Zr=typeof Object.is=="function"?Object.is:bH;function Dd(i,l){if(Zr(i,l))return!0;if(typeof i!="object"||i===null||typeof l!="object"||l===null)return!1;var d=Object.keys(i),h=Object.keys(l);if(d.length!==h.length)return!1;for(h=0;h<d.length;h++){var v=d[h];if(!Vr.call(l,v)||!Zr(i[v],l[v]))return!1}return!0}function gI(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function mI(i,l){var d=gI(i);i=0;for(var h;d;){if(d.nodeType===3){if(h=i+d.textContent.length,i<=l&&h>=l)return{node:d,offset:l-i};i=h}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=gI(d)}}function vI(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?vI(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function yI(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=yu(i.document);l instanceof i.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)i=l.contentWindow;else break;l=yu(i.document)}return l}function Hb(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}var SH=Uo&&"documentMode"in document&&11>=document.documentMode,Cu=null,$b=null,Ld=null,qb=!1;function bI(i,l,d){var h=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;qb||Cu==null||Cu!==yu(h)||(h=Cu,"selectionStart"in h&&Hb(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ld&&Dd(Ld,h)||(Ld=h,h=mg($b,"onSelect"),0<h.length&&(l=new Ap("onSelect","select",null,l,d),i.push({event:l,listeners:h}),l.target=Cu)))}function el(i,l){var d={};return d[i.toLowerCase()]=l.toLowerCase(),d["Webkit"+i]="webkit"+l,d["Moz"+i]="moz"+l,d}var wu={animationend:el("Animation","AnimationEnd"),animationiteration:el("Animation","AnimationIteration"),animationstart:el("Animation","AnimationStart"),transitionrun:el("Transition","TransitionRun"),transitionstart:el("Transition","TransitionStart"),transitioncancel:el("Transition","TransitionCancel"),transitionend:el("Transition","TransitionEnd")},Wb={},SI={};Uo&&(SI=document.createElement("div").style,"AnimationEvent"in window||(delete wu.animationend.animation,delete wu.animationiteration.animation,delete wu.animationstart.animation),"TransitionEvent"in window||delete wu.transitionend.transition);function tl(i){if(Wb[i])return Wb[i];if(!wu[i])return i;var l=wu[i],d;for(d in l)if(l.hasOwnProperty(d)&&d in SI)return Wb[i]=l[d];return i}var EI=tl("animationend"),CI=tl("animationiteration"),wI=tl("animationstart"),EH=tl("transitionrun"),CH=tl("transitionstart"),wH=tl("transitioncancel"),xI=tl("transitionend"),_I=new Map,Gb="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Gb.push("scrollEnd");function Us(i,l){_I.set(i,l),Ds(l,[i])}var Ip=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},gs=[],xu=0,Vb=0;function Op(){for(var i=xu,l=Vb=xu=0;l<i;){var d=gs[l];gs[l++]=null;var h=gs[l];gs[l++]=null;var v=gs[l];gs[l++]=null;var b=gs[l];if(gs[l++]=null,h!==null&&v!==null){var x=h.pending;x===null?v.next=v:(v.next=x.next,x.next=v),h.pending=v}b!==0&&AI(d,v,b)}}function Np(i,l,d,h){gs[xu++]=i,gs[xu++]=l,gs[xu++]=d,gs[xu++]=h,Vb|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function Kb(i,l,d,h){return Np(i,l,d,h),Mp(i)}function nl(i,l){return Np(i,null,null,l),Mp(i)}function AI(i,l,d){i.lanes|=d;var h=i.alternate;h!==null&&(h.lanes|=d);for(var v=!1,b=i.return;b!==null;)b.childLanes|=d,h=b.alternate,h!==null&&(h.childLanes|=d),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(v=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,v&&l!==null&&(v=31-Vn(d),i=b.hiddenUpdates,h=i[v],h===null?i[v]=[l]:h.push(l),l.lane=d|536870912),b):null}function Mp(i){if(50<sf)throw sf=0,r1=null,Error(r(185));for(var l=i.return;l!==null;)i=l,l=i.return;return i.tag===3?i.stateNode:null}var _u={};function xH(i,l,d,h){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(i,l,d,h){return new xH(i,l,d,h)}function Yb(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Fo(i,l){var d=i.alternate;return d===null?(d=Xr(i.tag,l,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=l,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&65011712,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,l=i.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d.refCleanup=i.refCleanup,d}function TI(i,l){i.flags&=65011714;var d=i.alternate;return d===null?(i.childLanes=0,i.lanes=l,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=d.childLanes,i.lanes=d.lanes,i.child=d.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=d.memoizedProps,i.memoizedState=d.memoizedState,i.updateQueue=d.updateQueue,i.type=d.type,l=d.dependencies,i.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),i}function Pp(i,l,d,h,v,b){var x=0;if(h=i,typeof i=="function")Yb(i)&&(x=1);else if(typeof i=="string")x=I$(i,d,J.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case k:return i=Xr(31,d,l,v),i.elementType=k,i.lanes=b,i;case E:return rl(d.children,v,b,l);case C:x=8,v|=24;break;case w:return i=Xr(12,d,l,v|2),i.elementType=w,i.lanes=b,i;case M:return i=Xr(13,d,l,v),i.elementType=M,i.lanes=b,i;case O:return i=Xr(19,d,l,v),i.elementType=O,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:x=10;break e;case _:x=9;break e;case R:x=11;break e;case I:x=14;break e;case P:x=16,h=null;break e}x=29,d=Error(r(130,i===null?"null":typeof i,"")),h=null}return l=Xr(x,d,l,v),l.elementType=i,l.type=h,l.lanes=b,l}function rl(i,l,d,h){return i=Xr(7,i,h,l),i.lanes=d,i}function Zb(i,l,d){return i=Xr(6,i,null,l),i.lanes=d,i}function RI(i){var l=Xr(18,null,null,0);return l.stateNode=i,l}function Xb(i,l,d){return l=Xr(4,i.children!==null?i.children:[],i.key,l),l.lanes=d,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}var II=new WeakMap;function ms(i,l){if(typeof i=="object"&&i!==null){var d=II.get(i);return d!==void 0?d:(l={value:i,source:l,stack:Et(l)},II.set(i,l),l)}return{value:i,source:l,stack:Et(l)}}var Au=[],Tu=0,kp=null,Ud=0,vs=[],ys=0,Hi=null,lo=1,uo="";function zo(i,l){Au[Tu++]=Ud,Au[Tu++]=kp,kp=i,Ud=l}function OI(i,l,d){vs[ys++]=lo,vs[ys++]=uo,vs[ys++]=Hi,Hi=i;var h=lo;i=uo;var v=32-Vn(h)-1;h&=~(1<<v),d+=1;var b=32-Vn(l)+v;if(30<b){var x=v-v%5;b=(h&(1<<x)-1).toString(32),h>>=x,v-=x,lo=1<<32-Vn(l)+v|d<<v|h,uo=b+i}else lo=1<<b|d<<v|h,uo=i}function Qb(i){i.return!==null&&(zo(i,1),OI(i,1,0))}function Jb(i){for(;i===kp;)kp=Au[--Tu],Au[Tu]=null,Ud=Au[--Tu],Au[Tu]=null;for(;i===Hi;)Hi=vs[--ys],vs[ys]=null,uo=vs[--ys],vs[ys]=null,lo=vs[--ys],vs[ys]=null}function NI(i,l){vs[ys++]=lo,vs[ys++]=uo,vs[ys++]=Hi,lo=l.id,uo=l.overflow,Hi=i}var Kn=null,Vt=null,dt=!1,$i=null,bs=!1,e0=Error(r(519));function qi(i){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fd(ms(l,i)),e0}function MI(i){var l=i.stateNode,d=i.type,h=i.memoizedProps;switch(l[In]=i,l[nt]=h,d){case"dialog":at("cancel",l),at("close",l);break;case"iframe":case"object":case"embed":at("load",l);break;case"video":case"audio":for(d=0;d<af.length;d++)at(af[d],l);break;case"source":at("error",l);break;case"img":case"image":case"link":at("error",l),at("load",l);break;case"details":at("toggle",l);break;case"input":at("invalid",l),Td(l,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":at("invalid",l);break;case"textarea":at("invalid",l),U(l,h.value,h.defaultValue,h.children)}d=h.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||h.suppressHydrationWarning===!0||YO(l.textContent,d)?(h.popover!=null&&(at("beforetoggle",l),at("toggle",l)),h.onScroll!=null&&at("scroll",l),h.onScrollEnd!=null&&at("scrollend",l),h.onClick!=null&&(l.onclick=tn),l=!0):l=!1,l||qi(i,!0)}function PI(i){for(Kn=i.return;Kn;)switch(Kn.tag){case 5:case 31:case 13:bs=!1;return;case 27:case 3:bs=!0;return;default:Kn=Kn.return}}function Ru(i){if(i!==Kn)return!1;if(!dt)return PI(i),dt=!0,!1;var l=i.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=i.type,d=!(d!=="form"&&d!=="button")||y1(i.type,i.memoizedProps)),d=!d),d&&Vt&&qi(i),PI(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Vt=sN(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Vt=sN(i)}else l===27?(l=Vt,sa(i.type)?(i=w1,w1=null,Vt=i):Vt=l):Vt=Kn?Es(i.stateNode.nextSibling):null;return!0}function sl(){Vt=Kn=null,dt=!1}function t0(){var i=$i;return i!==null&&(kr===null?kr=i:kr.push.apply(kr,i),$i=null),i}function Fd(i){$i===null?$i=[i]:$i.push(i)}var n0=L(null),ol=null,jo=null;function Wi(i,l,d){K(n0,l._currentValue),l._currentValue=d}function Bo(i){i._currentValue=n0.current,V(n0)}function r0(i,l,d){for(;i!==null;){var h=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,h!==null&&(h.childLanes|=l)):h!==null&&(h.childLanes&l)!==l&&(h.childLanes|=l),i===d)break;i=i.return}}function s0(i,l,d,h){var v=i.child;for(v!==null&&(v.return=i);v!==null;){var b=v.dependencies;if(b!==null){var x=v.child;b=b.firstContext;e:for(;b!==null;){var N=b;b=v;for(var B=0;B<l.length;B++)if(N.context===l[B]){b.lanes|=d,N=b.alternate,N!==null&&(N.lanes|=d),r0(b.return,d,i),h||(x=null);break e}b=N.next}}else if(v.tag===18){if(x=v.return,x===null)throw Error(r(341));x.lanes|=d,b=x.alternate,b!==null&&(b.lanes|=d),r0(x,d,i),x=null}else x=v.child;if(x!==null)x.return=v;else for(x=v;x!==null;){if(x===i){x=null;break}if(v=x.sibling,v!==null){v.return=x.return,x=v;break}x=x.return}v=x}}function Iu(i,l,d,h){i=null;for(var v=l,b=!1;v!==null;){if(!b){if((v.flags&524288)!==0)b=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var x=v.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var N=v.type;Zr(v.pendingProps.value,x.value)||(i!==null?i.push(N):i=[N])}}else if(v===ue.current){if(x=v.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(i!==null?i.push(ff):i=[ff])}v=v.return}i!==null&&s0(l,i,d,h),l.flags|=262144}function Dp(i){for(i=i.firstContext;i!==null;){if(!Zr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function il(i){ol=i,jo=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Yn(i){return kI(ol,i)}function Lp(i,l){return ol===null&&il(i),kI(i,l)}function kI(i,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},jo===null){if(i===null)throw Error(r(308));jo=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else jo=jo.next=l;return d}var _H=typeof AbortController<"u"?AbortController:function(){var i=[],l=this.signal={aborted:!1,addEventListener:function(d,h){i.push(h)}};this.abort=function(){l.aborted=!0,i.forEach(function(d){return d()})}},AH=t.unstable_scheduleCallback,TH=t.unstable_NormalPriority,Sn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function o0(){return{controller:new _H,data:new Map,refCount:0}}function zd(i){i.refCount--,i.refCount===0&&AH(TH,function(){i.controller.abort()})}var jd=null,i0=0,Ou=0,Nu=null;function RH(i,l){if(jd===null){var d=jd=[];i0=0,Ou=u1(),Nu={status:"pending",value:void 0,then:function(h){d.push(h)}}}return i0++,l.then(DI,DI),l}function DI(){if(--i0===0&&jd!==null){Nu!==null&&(Nu.status="fulfilled");var i=jd;jd=null,Ou=0,Nu=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function IH(i,l){var d=[],h={status:"pending",value:null,reason:null,then:function(v){d.push(v)}};return i.then(function(){h.status="fulfilled",h.value=l;for(var v=0;v<d.length;v++)(0,d[v])(l)},function(v){for(h.status="rejected",h.reason=v,v=0;v<d.length;v++)(0,d[v])(void 0)}),h}var LI=$.S;$.S=function(i,l){bO=Gt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&RH(i,l),LI!==null&&LI(i,l)};var al=L(null);function a0(){var i=al.current;return i!==null?i:qt.pooledCache}function Up(i,l){l===null?K(al,al.current):K(al,l.pool)}function UI(){var i=a0();return i===null?null:{parent:Sn._currentValue,pool:i}}var Mu=Error(r(460)),l0=Error(r(474)),Fp=Error(r(542)),zp={then:function(){}};function FI(i){return i=i.status,i==="fulfilled"||i==="rejected"}function zI(i,l,d){switch(d=i[d],d===void 0?i.push(l):d!==l&&(l.then(tn,tn),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,BI(i),i;default:if(typeof l.status=="string")l.then(tn,tn);else{if(i=qt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=l,i.status="pending",i.then(function(h){if(l.status==="pending"){var v=l;v.status="fulfilled",v.value=h}},function(h){if(l.status==="pending"){var v=l;v.status="rejected",v.reason=h}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,BI(i),i}throw ul=l,Mu}}function ll(i){try{var l=i._init;return l(i._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(ul=d,Mu):d}}var ul=null;function jI(){if(ul===null)throw Error(r(459));var i=ul;return ul=null,i}function BI(i){if(i===Mu||i===Fp)throw Error(r(483))}var Pu=null,Bd=0;function jp(i){var l=Bd;return Bd+=1,Pu===null&&(Pu=[]),zI(Pu,i,l)}function Hd(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function Bp(i,l){throw l.$$typeof===m?Error(r(525)):(i=Object.prototype.toString.call(l),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":i)))}function HI(i){function l(G,q){if(i){var X=G.deletions;X===null?(G.deletions=[q],G.flags|=16):X.push(q)}}function d(G,q){if(!i)return null;for(;q!==null;)l(G,q),q=q.sibling;return null}function h(G){for(var q=new Map;G!==null;)G.key!==null?q.set(G.key,G):q.set(G.index,G),G=G.sibling;return q}function v(G,q){return G=Fo(G,q),G.index=0,G.sibling=null,G}function b(G,q,X){return G.index=X,i?(X=G.alternate,X!==null?(X=X.index,X<q?(G.flags|=67108866,q):X):(G.flags|=67108866,q)):(G.flags|=1048576,q)}function x(G){return i&&G.alternate===null&&(G.flags|=67108866),G}function N(G,q,X,ie){return q===null||q.tag!==6?(q=Zb(X,G.mode,ie),q.return=G,q):(q=v(q,X),q.return=G,q)}function B(G,q,X,ie){var Pe=X.type;return Pe===E?se(G,q,X.props.children,ie,X.key):q!==null&&(q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===P&&ll(Pe)===q.type)?(q=v(q,X.props),Hd(q,X),q.return=G,q):(q=Pp(X.type,X.key,X.props,null,G.mode,ie),Hd(q,X),q.return=G,q)}function Q(G,q,X,ie){return q===null||q.tag!==4||q.stateNode.containerInfo!==X.containerInfo||q.stateNode.implementation!==X.implementation?(q=Xb(X,G.mode,ie),q.return=G,q):(q=v(q,X.children||[]),q.return=G,q)}function se(G,q,X,ie,Pe){return q===null||q.tag!==7?(q=rl(X,G.mode,ie,Pe),q.return=G,q):(q=v(q,X),q.return=G,q)}function ae(G,q,X){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=Zb(""+q,G.mode,X),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case y:return X=Pp(q.type,q.key,q.props,null,G.mode,X),Hd(X,q),X.return=G,X;case S:return q=Xb(q,G.mode,X),q.return=G,q;case P:return q=ll(q),ae(G,q,X)}if(ne(q)||j(q))return q=rl(q,G.mode,X,null),q.return=G,q;if(typeof q.then=="function")return ae(G,jp(q),X);if(q.$$typeof===T)return ae(G,Lp(G,q),X);Bp(G,q)}return null}function te(G,q,X,ie){var Pe=q!==null?q.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Pe!==null?null:N(G,q,""+X,ie);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case y:return X.key===Pe?B(G,q,X,ie):null;case S:return X.key===Pe?Q(G,q,X,ie):null;case P:return X=ll(X),te(G,q,X,ie)}if(ne(X)||j(X))return Pe!==null?null:se(G,q,X,ie,null);if(typeof X.then=="function")return te(G,q,jp(X),ie);if(X.$$typeof===T)return te(G,q,Lp(G,X),ie);Bp(G,X)}return null}function re(G,q,X,ie,Pe){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return G=G.get(X)||null,N(q,G,""+ie,Pe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return G=G.get(ie.key===null?X:ie.key)||null,B(q,G,ie,Pe);case S:return G=G.get(ie.key===null?X:ie.key)||null,Q(q,G,ie,Pe);case P:return ie=ll(ie),re(G,q,X,ie,Pe)}if(ne(ie)||j(ie))return G=G.get(X)||null,se(q,G,ie,Pe,null);if(typeof ie.then=="function")return re(G,q,X,jp(ie),Pe);if(ie.$$typeof===T)return re(G,q,X,Lp(q,ie),Pe);Bp(q,ie)}return null}function Re(G,q,X,ie){for(var Pe=null,xt=null,Ne=q,Je=q=0,ct=null;Ne!==null&&Je<X.length;Je++){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var _t=te(G,Ne,X[Je],ie);if(_t===null){Ne===null&&(Ne=ct);break}i&&Ne&&_t.alternate===null&&l(G,Ne),q=b(_t,q,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t,Ne=ct}if(Je===X.length)return d(G,Ne),dt&&zo(G,Je),Pe;if(Ne===null){for(;Je<X.length;Je++)Ne=ae(G,X[Je],ie),Ne!==null&&(q=b(Ne,q,Je),xt===null?Pe=Ne:xt.sibling=Ne,xt=Ne);return dt&&zo(G,Je),Pe}for(Ne=h(Ne);Je<X.length;Je++)ct=re(Ne,G,Je,X[Je],ie),ct!==null&&(i&&ct.alternate!==null&&Ne.delete(ct.key===null?Je:ct.key),q=b(ct,q,Je),xt===null?Pe=ct:xt.sibling=ct,xt=ct);return i&&Ne.forEach(function(ua){return l(G,ua)}),dt&&zo(G,Je),Pe}function De(G,q,X,ie){if(X==null)throw Error(r(151));for(var Pe=null,xt=null,Ne=q,Je=q=0,ct=null,_t=X.next();Ne!==null&&!_t.done;Je++,_t=X.next()){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var ua=te(G,Ne,_t.value,ie);if(ua===null){Ne===null&&(Ne=ct);break}i&&Ne&&ua.alternate===null&&l(G,Ne),q=b(ua,q,Je),xt===null?Pe=ua:xt.sibling=ua,xt=ua,Ne=ct}if(_t.done)return d(G,Ne),dt&&zo(G,Je),Pe;if(Ne===null){for(;!_t.done;Je++,_t=X.next())_t=ae(G,_t.value,ie),_t!==null&&(q=b(_t,q,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t);return dt&&zo(G,Je),Pe}for(Ne=h(Ne);!_t.done;Je++,_t=X.next())_t=re(Ne,G,Je,_t.value,ie),_t!==null&&(i&&_t.alternate!==null&&Ne.delete(_t.key===null?Je:_t.key),q=b(_t,q,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t);return i&&Ne.forEach(function(j$){return l(G,j$)}),dt&&zo(G,Je),Pe}function zt(G,q,X,ie){if(typeof X=="object"&&X!==null&&X.type===E&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case y:e:{for(var Pe=X.key;q!==null;){if(q.key===Pe){if(Pe=X.type,Pe===E){if(q.tag===7){d(G,q.sibling),ie=v(q,X.props.children),ie.return=G,G=ie;break e}}else if(q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===P&&ll(Pe)===q.type){d(G,q.sibling),ie=v(q,X.props),Hd(ie,X),ie.return=G,G=ie;break e}d(G,q);break}else l(G,q);q=q.sibling}X.type===E?(ie=rl(X.props.children,G.mode,ie,X.key),ie.return=G,G=ie):(ie=Pp(X.type,X.key,X.props,null,G.mode,ie),Hd(ie,X),ie.return=G,G=ie)}return x(G);case S:e:{for(Pe=X.key;q!==null;){if(q.key===Pe)if(q.tag===4&&q.stateNode.containerInfo===X.containerInfo&&q.stateNode.implementation===X.implementation){d(G,q.sibling),ie=v(q,X.children||[]),ie.return=G,G=ie;break e}else{d(G,q);break}else l(G,q);q=q.sibling}ie=Xb(X,G.mode,ie),ie.return=G,G=ie}return x(G);case P:return X=ll(X),zt(G,q,X,ie)}if(ne(X))return Re(G,q,X,ie);if(j(X)){if(Pe=j(X),typeof Pe!="function")throw Error(r(150));return X=Pe.call(X),De(G,q,X,ie)}if(typeof X.then=="function")return zt(G,q,jp(X),ie);if(X.$$typeof===T)return zt(G,q,Lp(G,X),ie);Bp(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,q!==null&&q.tag===6?(d(G,q.sibling),ie=v(q,X),ie.return=G,G=ie):(d(G,q),ie=Zb(X,G.mode,ie),ie.return=G,G=ie),x(G)):d(G,q)}return function(G,q,X,ie){try{Bd=0;var Pe=zt(G,q,X,ie);return Pu=null,Pe}catch(Ne){if(Ne===Mu||Ne===Fp)throw Ne;var xt=Xr(29,Ne,null,G.mode);return xt.lanes=ie,xt.return=G,xt}}}var cl=HI(!0),$I=HI(!1),Gi=!1;function u0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function c0(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Vi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ki(i,l,d){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(Rt&2)!==0){var v=h.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),h.pending=l,l=Mp(i),AI(i,null,d),l}return Np(i,h,l,d),Mp(i)}function $d(i,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var h=l.lanes;h&=i.pendingLanes,d|=h,l.lanes=d,yd(i,d)}}function d0(i,l){var d=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,d===h)){var v=null,b=null;if(d=d.firstBaseUpdate,d!==null){do{var x={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};b===null?v=b=x:b=b.next=x,d=d.next}while(d!==null);b===null?v=b=l:b=b.next=l}else v=b=l;d={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:b,shared:h.shared,callbacks:h.callbacks},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=l:i.next=l,d.lastBaseUpdate=l}var f0=!1;function qd(){if(f0){var i=Nu;if(i!==null)throw i}}function Wd(i,l,d,h){f0=!1;var v=i.updateQueue;Gi=!1;var b=v.firstBaseUpdate,x=v.lastBaseUpdate,N=v.shared.pending;if(N!==null){v.shared.pending=null;var B=N,Q=B.next;B.next=null,x===null?b=Q:x.next=Q,x=B;var se=i.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==x&&(N===null?se.firstBaseUpdate=Q:N.next=Q,se.lastBaseUpdate=B))}if(b!==null){var ae=v.baseState;x=0,se=Q=B=null,N=b;do{var te=N.lane&-536870913,re=te!==N.lane;if(re?(ut&te)===te:(h&te)===te){te!==0&&te===Ou&&(f0=!0),se!==null&&(se=se.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Re=i,De=N;te=l;var zt=d;switch(De.tag){case 1:if(Re=De.payload,typeof Re=="function"){ae=Re.call(zt,ae,te);break e}ae=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=De.payload,te=typeof Re=="function"?Re.call(zt,ae,te):Re,te==null)break e;ae=g({},ae,te);break e;case 2:Gi=!0}}te=N.callback,te!==null&&(i.flags|=64,re&&(i.flags|=8192),re=v.callbacks,re===null?v.callbacks=[te]:re.push(te))}else re={lane:te,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(Q=se=re,B=ae):se=se.next=re,x|=te;if(N=N.next,N===null){if(N=v.shared.pending,N===null)break;re=N,N=re.next,re.next=null,v.lastBaseUpdate=re,v.shared.pending=null}}while(!0);se===null&&(B=ae),v.baseState=B,v.firstBaseUpdate=Q,v.lastBaseUpdate=se,b===null&&(v.shared.lanes=0),Ji|=x,i.lanes=x,i.memoizedState=ae}}function qI(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function WI(i,l){var d=i.callbacks;if(d!==null)for(i.callbacks=null,i=0;i<d.length;i++)qI(d[i],l)}var ku=L(null),Hp=L(0);function GI(i,l){i=Zo,K(Hp,i),K(ku,l),Zo=i|l.baseLanes}function h0(){K(Hp,Zo),K(ku,ku.current)}function p0(){Zo=Hp.current,V(ku),V(Hp)}var Qr=L(null),Ss=null;function Yi(i){var l=i.alternate;K(yn,yn.current&1),K(Qr,i),Ss===null&&(l===null||ku.current!==null||l.memoizedState!==null)&&(Ss=i)}function g0(i){K(yn,yn.current),K(Qr,i),Ss===null&&(Ss=i)}function VI(i){i.tag===22?(K(yn,yn.current),K(Qr,i),Ss===null&&(Ss=i)):Zi()}function Zi(){K(yn,yn.current),K(Qr,Qr.current)}function Jr(i){V(Qr),Ss===i&&(Ss=null),V(yn)}var yn=L(0);function $p(i){for(var l=i;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||E1(d)||C1(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Ho=0,Qe=null,Ut=null,En=null,qp=!1,Du=!1,dl=!1,Wp=0,Gd=0,Lu=null,OH=0;function hn(){throw Error(r(321))}function m0(i,l){if(l===null)return!1;for(var d=0;d<l.length&&d<i.length;d++)if(!Zr(i[d],l[d]))return!1;return!0}function v0(i,l,d,h,v,b){return Ho=b,Qe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,$.H=i===null||i.memoizedState===null?O2:M0,dl=!1,b=d(h,v),dl=!1,Du&&(b=YI(l,d,h,v)),KI(i),b}function KI(i){$.H=Yd;var l=Ut!==null&&Ut.next!==null;if(Ho=0,En=Ut=Qe=null,qp=!1,Gd=0,Lu=null,l)throw Error(r(300));i===null||Cn||(i=i.dependencies,i!==null&&Dp(i)&&(Cn=!0))}function YI(i,l,d,h){Qe=i;var v=0;do{if(Du&&(Lu=null),Gd=0,Du=!1,25<=v)throw Error(r(301));if(v+=1,En=Ut=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}$.H=N2,b=l(d,h)}while(Du);return b}function NH(){var i=$.H,l=i.useState()[0];return l=typeof l.then=="function"?Vd(l):l,i=i.useState()[0],(Ut!==null?Ut.memoizedState:null)!==i&&(Qe.flags|=1024),l}function y0(){var i=Wp!==0;return Wp=0,i}function b0(i,l,d){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~d}function S0(i){if(qp){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}qp=!1}Ho=0,En=Ut=Qe=null,Du=!1,Gd=Wp=0,Lu=null}function br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return En===null?Qe.memoizedState=En=i:En=En.next=i,En}function bn(){if(Ut===null){var i=Qe.alternate;i=i!==null?i.memoizedState:null}else i=Ut.next;var l=En===null?Qe.memoizedState:En.next;if(l!==null)En=l,Ut=i;else{if(i===null)throw Qe.alternate===null?Error(r(467)):Error(r(310));Ut=i,i={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},En===null?Qe.memoizedState=En=i:En=En.next=i}return En}function Gp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vd(i){var l=Gd;return Gd+=1,Lu===null&&(Lu=[]),i=zI(Lu,i,l),l=Qe,(En===null?l.memoizedState:En.next)===null&&(l=l.alternate,$.H=l===null||l.memoizedState===null?O2:M0),i}function Vp(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Vd(i);if(i.$$typeof===T)return Yn(i)}throw Error(r(438,String(i)))}function E0(i){var l=null,d=Qe.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var h=Qe.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(l={data:h.data.map(function(v){return v.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Gp(),Qe.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(i),h=0;h<i;h++)d[h]=H;return l.index++,d}function $o(i,l){return typeof l=="function"?l(i):l}function Kp(i){var l=bn();return C0(l,Ut,i)}function C0(i,l,d){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=d;var v=i.baseQueue,b=h.pending;if(b!==null){if(v!==null){var x=v.next;v.next=b.next,b.next=x}l.baseQueue=v=b,h.pending=null}if(b=i.baseState,v===null)i.memoizedState=b;else{l=v.next;var N=x=null,B=null,Q=l,se=!1;do{var ae=Q.lane&-536870913;if(ae!==Q.lane?(ut&ae)===ae:(Ho&ae)===ae){var te=Q.revertLane;if(te===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ae===Ou&&(se=!0);else if((Ho&te)===te){Q=Q.next,te===Ou&&(se=!0);continue}else ae={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(N=B=ae,x=b):B=B.next=ae,Qe.lanes|=te,Ji|=te;ae=Q.action,dl&&d(b,ae),b=Q.hasEagerState?Q.eagerState:d(b,ae)}else te={lane:ae,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(N=B=te,x=b):B=B.next=te,Qe.lanes|=ae,Ji|=ae;Q=Q.next}while(Q!==null&&Q!==l);if(B===null?x=b:B.next=N,!Zr(b,i.memoizedState)&&(Cn=!0,se&&(d=Nu,d!==null)))throw d;i.memoizedState=b,i.baseState=x,i.baseQueue=B,h.lastRenderedState=b}return v===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function w0(i){var l=bn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var h=d.dispatch,v=d.pending,b=l.memoizedState;if(v!==null){d.pending=null;var x=v=v.next;do b=i(b,x.action),x=x.next;while(x!==v);Zr(b,l.memoizedState)||(Cn=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),d.lastRenderedState=b}return[b,h]}function ZI(i,l,d){var h=Qe,v=bn(),b=dt;if(b){if(d===void 0)throw Error(r(407));d=d()}else d=l();var x=!Zr((Ut||v).memoizedState,d);if(x&&(v.memoizedState=d,Cn=!0),v=v.queue,A0(JI.bind(null,h,v,i),[i]),v.getSnapshot!==l||x||En!==null&&En.memoizedState.tag&1){if(h.flags|=2048,Uu(9,{destroy:void 0},QI.bind(null,h,v,d,l),null),qt===null)throw Error(r(349));b||(Ho&127)!==0||XI(h,l,d)}return d}function XI(i,l,d){i.flags|=16384,i={getSnapshot:l,value:d},l=Qe.updateQueue,l===null?(l=Gp(),Qe.updateQueue=l,l.stores=[i]):(d=l.stores,d===null?l.stores=[i]:d.push(i))}function QI(i,l,d,h){l.value=d,l.getSnapshot=h,e2(l)&&t2(i)}function JI(i,l,d){return d(function(){e2(l)&&t2(i)})}function e2(i){var l=i.getSnapshot;i=i.value;try{var d=l();return!Zr(i,d)}catch{return!0}}function t2(i){var l=nl(i,2);l!==null&&Dr(l,i,2)}function x0(i){var l=br();if(typeof i=="function"){var d=i;if(i=d(),dl){Ps(!0);try{d()}finally{Ps(!1)}}}return l.memoizedState=l.baseState=i,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:i},l}function n2(i,l,d,h){return i.baseState=d,C0(i,Ut,typeof h=="function"?h:$o)}function MH(i,l,d,h,v){if(Xp(i))throw Error(r(485));if(i=l.action,i!==null){var b={payload:v,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){b.listeners.push(x)}};$.T!==null?d(!0):b.isTransition=!1,h(b),d=l.pending,d===null?(b.next=l.pending=b,r2(l,b)):(b.next=d.next,l.pending=d.next=b)}}function r2(i,l){var d=l.action,h=l.payload,v=i.state;if(l.isTransition){var b=$.T,x={};$.T=x;try{var N=d(v,h),B=$.S;B!==null&&B(x,N),s2(i,l,N)}catch(Q){_0(i,l,Q)}finally{b!==null&&x.types!==null&&(b.types=x.types),$.T=b}}else try{b=d(v,h),s2(i,l,b)}catch(Q){_0(i,l,Q)}}function s2(i,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(h){o2(i,l,h)},function(h){return _0(i,l,h)}):o2(i,l,d)}function o2(i,l,d){l.status="fulfilled",l.value=d,i2(l),i.state=d,l=i.pending,l!==null&&(d=l.next,d===l?i.pending=null:(d=d.next,l.next=d,r2(i,d)))}function _0(i,l,d){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do l.status="rejected",l.reason=d,i2(l),l=l.next;while(l!==h)}i.action=null}function i2(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function a2(i,l){return l}function l2(i,l){if(dt){var d=qt.formState;if(d!==null){e:{var h=Qe;if(dt){if(Vt){t:{for(var v=Vt,b=bs;v.nodeType!==8;){if(!b){v=null;break t}if(v=Es(v.nextSibling),v===null){v=null;break t}}b=v.data,v=b==="F!"||b==="F"?v:null}if(v){Vt=Es(v.nextSibling),h=v.data==="F!";break e}}qi(h)}h=!1}h&&(l=d[0])}}return d=br(),d.memoizedState=d.baseState=l,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a2,lastRenderedState:l},d.queue=h,d=T2.bind(null,Qe,h),h.dispatch=d,h=x0(!1),b=N0.bind(null,Qe,!1,h.queue),h=br(),v={state:l,dispatch:null,action:i,pending:null},h.queue=v,d=MH.bind(null,Qe,v,b,d),v.dispatch=d,h.memoizedState=i,[l,d,!1]}function u2(i){var l=bn();return c2(l,Ut,i)}function c2(i,l,d){if(l=C0(i,l,a2)[0],i=Kp($o)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var h=Vd(l)}catch(x){throw x===Mu?Fp:x}else h=l;l=bn();var v=l.queue,b=v.dispatch;return d!==l.memoizedState&&(Qe.flags|=2048,Uu(9,{destroy:void 0},PH.bind(null,v,d),null)),[h,b,i]}function PH(i,l){i.action=l}function d2(i){var l=bn(),d=Ut;if(d!==null)return c2(l,d,i);bn(),l=l.memoizedState,d=bn();var h=d.queue.dispatch;return d.memoizedState=i,[l,h,!1]}function Uu(i,l,d,h){return i={tag:i,create:d,deps:h,inst:l,next:null},l=Qe.updateQueue,l===null&&(l=Gp(),Qe.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=i.next=i:(h=d.next,d.next=i,i.next=h,l.lastEffect=i),i}function f2(){return bn().memoizedState}function Yp(i,l,d,h){var v=br();Qe.flags|=i,v.memoizedState=Uu(1|l,{destroy:void 0},d,h===void 0?null:h)}function Zp(i,l,d,h){var v=bn();h=h===void 0?null:h;var b=v.memoizedState.inst;Ut!==null&&h!==null&&m0(h,Ut.memoizedState.deps)?v.memoizedState=Uu(l,b,d,h):(Qe.flags|=i,v.memoizedState=Uu(1|l,b,d,h))}function h2(i,l){Yp(8390656,8,i,l)}function A0(i,l){Zp(2048,8,i,l)}function kH(i){Qe.flags|=4;var l=Qe.updateQueue;if(l===null)l=Gp(),Qe.updateQueue=l,l.events=[i];else{var d=l.events;d===null?l.events=[i]:d.push(i)}}function p2(i){var l=bn().memoizedState;return kH({ref:l,nextImpl:i}),function(){if((Rt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function g2(i,l){return Zp(4,2,i,l)}function m2(i,l){return Zp(4,4,i,l)}function v2(i,l){if(typeof l=="function"){i=i();var d=l(i);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return i=i(),l.current=i,function(){l.current=null}}function y2(i,l,d){d=d!=null?d.concat([i]):null,Zp(4,4,v2.bind(null,l,i),d)}function T0(){}function b2(i,l){var d=bn();l=l===void 0?null:l;var h=d.memoizedState;return l!==null&&m0(l,h[1])?h[0]:(d.memoizedState=[i,l],i)}function S2(i,l){var d=bn();l=l===void 0?null:l;var h=d.memoizedState;if(l!==null&&m0(l,h[1]))return h[0];if(h=i(),dl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[h,l],h}function R0(i,l,d){return d===void 0||(Ho&1073741824)!==0&&(ut&261930)===0?i.memoizedState=l:(i.memoizedState=d,i=EO(),Qe.lanes|=i,Ji|=i,d)}function E2(i,l,d,h){return Zr(d,l)?d:ku.current!==null?(i=R0(i,d,h),Zr(i,l)||(Cn=!0),i):(Ho&42)===0||(Ho&1073741824)!==0&&(ut&261930)===0?(Cn=!0,i.memoizedState=d):(i=EO(),Qe.lanes|=i,Ji|=i,l)}function C2(i,l,d,h,v){var b=ee.p;ee.p=b!==0&&8>b?b:8;var x=$.T,N={};$.T=N,N0(i,!1,l,d);try{var B=v(),Q=$.S;if(Q!==null&&Q(N,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var se=IH(B,h);Kd(i,l,se,ns(i))}else Kd(i,l,h,ns(i))}catch(ae){Kd(i,l,{then:function(){},status:"rejected",reason:ae},ns())}finally{ee.p=b,x!==null&&N.types!==null&&(x.types=N.types),$.T=x}}function DH(){}function I0(i,l,d,h){if(i.tag!==5)throw Error(r(476));var v=w2(i).queue;C2(i,v,l,fe,d===null?DH:function(){return x2(i),d(h)})}function w2(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:fe},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:d},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function x2(i){var l=w2(i);l.next===null&&(l=i.alternate.memoizedState),Kd(i,l.next.queue,{},ns())}function O0(){return Yn(ff)}function _2(){return bn().memoizedState}function A2(){return bn().memoizedState}function LH(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var d=ns();i=Vi(d);var h=Ki(l,i,d);h!==null&&(Dr(h,l,d),$d(h,l,d)),l={cache:o0()},i.payload=l;return}l=l.return}}function UH(i,l,d){var h=ns();d={lane:h,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Xp(i)?R2(l,d):(d=Kb(i,l,d,h),d!==null&&(Dr(d,i,h),I2(d,l,h)))}function T2(i,l,d){var h=ns();Kd(i,l,d,h)}function Kd(i,l,d,h){var v={lane:h,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Xp(i))R2(l,v);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var x=l.lastRenderedState,N=b(x,d);if(v.hasEagerState=!0,v.eagerState=N,Zr(N,x))return Np(i,l,v,0),qt===null&&Op(),!1}catch{}if(d=Kb(i,l,v,h),d!==null)return Dr(d,i,h),I2(d,l,h),!0}return!1}function N0(i,l,d,h){if(h={lane:2,revertLane:u1(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Xp(i)){if(l)throw Error(r(479))}else l=Kb(i,d,h,2),l!==null&&Dr(l,i,2)}function Xp(i){var l=i.alternate;return i===Qe||l!==null&&l===Qe}function R2(i,l){Du=qp=!0;var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}function I2(i,l,d){if((d&4194048)!==0){var h=l.lanes;h&=i.pendingLanes,d|=h,l.lanes=d,yd(i,d)}}var Yd={readContext:Yn,use:Vp,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useLayoutEffect:hn,useInsertionEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useSyncExternalStore:hn,useId:hn,useHostTransitionStatus:hn,useFormState:hn,useActionState:hn,useOptimistic:hn,useMemoCache:hn,useCacheRefresh:hn};Yd.useEffectEvent=hn;var O2={readContext:Yn,use:Vp,useCallback:function(i,l){return br().memoizedState=[i,l===void 0?null:l],i},useContext:Yn,useEffect:h2,useImperativeHandle:function(i,l,d){d=d!=null?d.concat([i]):null,Yp(4194308,4,v2.bind(null,l,i),d)},useLayoutEffect:function(i,l){return Yp(4194308,4,i,l)},useInsertionEffect:function(i,l){Yp(4,2,i,l)},useMemo:function(i,l){var d=br();l=l===void 0?null:l;var h=i();if(dl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[h,l],h},useReducer:function(i,l,d){var h=br();if(d!==void 0){var v=d(l);if(dl){Ps(!0);try{d(l)}finally{Ps(!1)}}}else v=l;return h.memoizedState=h.baseState=v,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:v},h.queue=i,i=i.dispatch=UH.bind(null,Qe,i),[h.memoizedState,i]},useRef:function(i){var l=br();return i={current:i},l.memoizedState=i},useState:function(i){i=x0(i);var l=i.queue,d=T2.bind(null,Qe,l);return l.dispatch=d,[i.memoizedState,d]},useDebugValue:T0,useDeferredValue:function(i,l){var d=br();return R0(d,i,l)},useTransition:function(){var i=x0(!1);return i=C2.bind(null,Qe,i.queue,!0,!1),br().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,d){var h=Qe,v=br();if(dt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),qt===null)throw Error(r(349));(ut&127)!==0||XI(h,l,d)}v.memoizedState=d;var b={value:d,getSnapshot:l};return v.queue=b,h2(JI.bind(null,h,b,i),[i]),h.flags|=2048,Uu(9,{destroy:void 0},QI.bind(null,h,b,d,l),null),d},useId:function(){var i=br(),l=qt.identifierPrefix;if(dt){var d=uo,h=lo;d=(h&~(1<<32-Vn(h)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Wp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=OH++,l="_"+l+"r_"+d.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:O0,useFormState:l2,useActionState:l2,useOptimistic:function(i){var l=br();l.memoizedState=l.baseState=i;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=N0.bind(null,Qe,!0,d),d.dispatch=l,[i,l]},useMemoCache:E0,useCacheRefresh:function(){return br().memoizedState=LH.bind(null,Qe)},useEffectEvent:function(i){var l=br(),d={impl:i};return l.memoizedState=d,function(){if((Rt&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},M0={readContext:Yn,use:Vp,useCallback:b2,useContext:Yn,useEffect:A0,useImperativeHandle:y2,useInsertionEffect:g2,useLayoutEffect:m2,useMemo:S2,useReducer:Kp,useRef:f2,useState:function(){return Kp($o)},useDebugValue:T0,useDeferredValue:function(i,l){var d=bn();return E2(d,Ut.memoizedState,i,l)},useTransition:function(){var i=Kp($o)[0],l=bn().memoizedState;return[typeof i=="boolean"?i:Vd(i),l]},useSyncExternalStore:ZI,useId:_2,useHostTransitionStatus:O0,useFormState:u2,useActionState:u2,useOptimistic:function(i,l){var d=bn();return n2(d,Ut,i,l)},useMemoCache:E0,useCacheRefresh:A2};M0.useEffectEvent=p2;var N2={readContext:Yn,use:Vp,useCallback:b2,useContext:Yn,useEffect:A0,useImperativeHandle:y2,useInsertionEffect:g2,useLayoutEffect:m2,useMemo:S2,useReducer:w0,useRef:f2,useState:function(){return w0($o)},useDebugValue:T0,useDeferredValue:function(i,l){var d=bn();return Ut===null?R0(d,i,l):E2(d,Ut.memoizedState,i,l)},useTransition:function(){var i=w0($o)[0],l=bn().memoizedState;return[typeof i=="boolean"?i:Vd(i),l]},useSyncExternalStore:ZI,useId:_2,useHostTransitionStatus:O0,useFormState:d2,useActionState:d2,useOptimistic:function(i,l){var d=bn();return Ut!==null?n2(d,Ut,i,l):(d.baseState=i,[i,d.queue.dispatch])},useMemoCache:E0,useCacheRefresh:A2};N2.useEffectEvent=p2;function P0(i,l,d,h){l=i.memoizedState,d=d(h,l),d=d==null?l:g({},l,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var k0={enqueueSetState:function(i,l,d){i=i._reactInternals;var h=ns(),v=Vi(h);v.payload=l,d!=null&&(v.callback=d),l=Ki(i,v,h),l!==null&&(Dr(l,i,h),$d(l,i,h))},enqueueReplaceState:function(i,l,d){i=i._reactInternals;var h=ns(),v=Vi(h);v.tag=1,v.payload=l,d!=null&&(v.callback=d),l=Ki(i,v,h),l!==null&&(Dr(l,i,h),$d(l,i,h))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var d=ns(),h=Vi(d);h.tag=2,l!=null&&(h.callback=l),l=Ki(i,h,d),l!==null&&(Dr(l,i,d),$d(l,i,d))}};function M2(i,l,d,h,v,b,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,x):l.prototype&&l.prototype.isPureReactComponent?!Dd(d,h)||!Dd(v,b):!0}function P2(i,l,d,h){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,h),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,h),l.state!==i&&k0.enqueueReplaceState(l,l.state,null)}function fl(i,l){var d=l;if("ref"in l){d={};for(var h in l)h!=="ref"&&(d[h]=l[h])}if(i=i.defaultProps){d===l&&(d=g({},d));for(var v in i)d[v]===void 0&&(d[v]=i[v])}return d}function k2(i){Ip(i)}function D2(i){console.error(i)}function L2(i){Ip(i)}function Qp(i,l){try{var d=i.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(h){setTimeout(function(){throw h})}}function U2(i,l,d){try{var h=i.onCaughtError;h(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function D0(i,l,d){return d=Vi(d),d.tag=3,d.payload={element:null},d.callback=function(){Qp(i,l)},d}function F2(i){return i=Vi(i),i.tag=3,i}function z2(i,l,d,h){var v=d.type.getDerivedStateFromError;if(typeof v=="function"){var b=h.value;i.payload=function(){return v(b)},i.callback=function(){U2(l,d,h)}}var x=d.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(i.callback=function(){U2(l,d,h),typeof v!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var N=h.stack;this.componentDidCatch(h.value,{componentStack:N!==null?N:""})})}function FH(i,l,d,h,v){if(d.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(l=d.alternate,l!==null&&Iu(l,d,v,!0),d=Qr.current,d!==null){switch(d.tag){case 31:case 13:return Ss===null?cg():d.alternate===null&&pn===0&&(pn=3),d.flags&=-257,d.flags|=65536,d.lanes=v,h===zp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([h]):l.add(h),i1(i,h,v)),!1;case 22:return d.flags|=65536,h===zp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([h])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([h]):d.add(h)),i1(i,h,v)),!1}throw Error(r(435,d.tag))}return i1(i,h,v),cg(),!1}if(dt)return l=Qr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=v,h!==e0&&(i=Error(r(422),{cause:h}),Fd(ms(i,d)))):(h!==e0&&(l=Error(r(423),{cause:h}),Fd(ms(l,d))),i=i.current.alternate,i.flags|=65536,v&=-v,i.lanes|=v,h=ms(h,d),v=D0(i.stateNode,h,v),d0(i,v),pn!==4&&(pn=2)),!1;var b=Error(r(520),{cause:h});if(b=ms(b,d),rf===null?rf=[b]:rf.push(b),pn!==4&&(pn=2),l===null)return!0;h=ms(h,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,i=v&-v,d.lanes|=i,i=D0(d.stateNode,h,i),d0(d,i),!1;case 1:if(l=d.type,b=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ea===null||!ea.has(b))))return d.flags|=65536,v&=-v,d.lanes|=v,v=F2(v),z2(v,i,d,h),d0(d,v),!1}d=d.return}while(d!==null);return!1}var L0=Error(r(461)),Cn=!1;function Zn(i,l,d,h){l.child=i===null?$I(l,null,d,h):cl(l,i.child,d,h)}function j2(i,l,d,h,v){d=d.render;var b=l.ref;if("ref"in h){var x={};for(var N in h)N!=="ref"&&(x[N]=h[N])}else x=h;return il(l),h=v0(i,l,d,x,b,v),N=y0(),i!==null&&!Cn?(b0(i,l,v),qo(i,l,v)):(dt&&N&&Qb(l),l.flags|=1,Zn(i,l,h,v),l.child)}function B2(i,l,d,h,v){if(i===null){var b=d.type;return typeof b=="function"&&!Yb(b)&&b.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=b,H2(i,l,b,h,v)):(i=Pp(d.type,null,h,l,l.mode,v),i.ref=l.ref,i.return=l,l.child=i)}if(b=i.child,!q0(i,v)){var x=b.memoizedProps;if(d=d.compare,d=d!==null?d:Dd,d(x,h)&&i.ref===l.ref)return qo(i,l,v)}return l.flags|=1,i=Fo(b,h),i.ref=l.ref,i.return=l,l.child=i}function H2(i,l,d,h,v){if(i!==null){var b=i.memoizedProps;if(Dd(b,h)&&i.ref===l.ref)if(Cn=!1,l.pendingProps=h=b,q0(i,v))(i.flags&131072)!==0&&(Cn=!0);else return l.lanes=i.lanes,qo(i,l,v)}return U0(i,l,d,h,v)}function $2(i,l,d,h){var v=h.children,b=i!==null?i.memoizedState:null;if(i===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((l.flags&128)!==0){if(b=b!==null?b.baseLanes|d:d,i!==null){for(h=l.child=i.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~b}else h=0,l.child=null;return q2(i,l,b,d,h)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&Up(l,b!==null?b.cachePool:null),b!==null?GI(l,b):h0(),VI(l);else return h=l.lanes=536870912,q2(i,l,b!==null?b.baseLanes|d:d,d,h)}else b!==null?(Up(l,b.cachePool),GI(l,b),Zi(),l.memoizedState=null):(i!==null&&Up(l,null),h0(),Zi());return Zn(i,l,v,d),l.child}function Zd(i,l){return i!==null&&i.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function q2(i,l,d,h,v){var b=a0();return b=b===null?null:{parent:Sn._currentValue,pool:b},l.memoizedState={baseLanes:d,cachePool:b},i!==null&&Up(l,null),h0(),VI(l),i!==null&&Iu(i,l,h,!0),l.childLanes=v,null}function Jp(i,l){return l=tg({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function W2(i,l,d){return cl(l,i.child,null,d),i=Jp(l,l.pendingProps),i.flags|=2,Jr(l),l.memoizedState=null,i}function zH(i,l,d){var h=l.pendingProps,v=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(dt){if(h.mode==="hidden")return i=Jp(l,h),l.lanes=536870912,Zd(null,i);if(g0(l),(i=Vt)?(i=rN(i,bs),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:Hi!==null?{id:lo,overflow:uo}:null,retryLane:536870912,hydrationErrors:null},d=RI(i),d.return=l,l.child=d,Kn=l,Vt=null)):i=null,i===null)throw qi(l);return l.lanes=536870912,null}return Jp(l,h)}var b=i.memoizedState;if(b!==null){var x=b.dehydrated;if(g0(l),v)if(l.flags&256)l.flags&=-257,l=W2(i,l,d);else if(l.memoizedState!==null)l.child=i.child,l.flags|=128,l=null;else throw Error(r(558));else if(Cn||Iu(i,l,d,!1),v=(d&i.childLanes)!==0,Cn||v){if(h=qt,h!==null&&(x=gu(h,d),x!==0&&x!==b.retryLane))throw b.retryLane=x,nl(i,x),Dr(h,i,x),L0;cg(),l=W2(i,l,d)}else i=b.treeContext,Vt=Es(x.nextSibling),Kn=l,dt=!0,$i=null,bs=!1,i!==null&&NI(l,i),l=Jp(l,h),l.flags|=4096;return l}return i=Fo(i.child,{mode:h.mode,children:h.children}),i.ref=l.ref,l.child=i,i.return=l,i}function eg(i,l){var d=l.ref;if(d===null)i!==null&&i.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(i===null||i.ref!==d)&&(l.flags|=4194816)}}function U0(i,l,d,h,v){return il(l),d=v0(i,l,d,h,void 0,v),h=y0(),i!==null&&!Cn?(b0(i,l,v),qo(i,l,v)):(dt&&h&&Qb(l),l.flags|=1,Zn(i,l,d,v),l.child)}function G2(i,l,d,h,v,b){return il(l),l.updateQueue=null,d=YI(l,h,d,v),KI(i),h=y0(),i!==null&&!Cn?(b0(i,l,b),qo(i,l,b)):(dt&&h&&Qb(l),l.flags|=1,Zn(i,l,d,b),l.child)}function V2(i,l,d,h,v){if(il(l),l.stateNode===null){var b=_u,x=d.contextType;typeof x=="object"&&x!==null&&(b=Yn(x)),b=new d(h,b),l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=k0,l.stateNode=b,b._reactInternals=l,b=l.stateNode,b.props=h,b.state=l.memoizedState,b.refs={},u0(l),x=d.contextType,b.context=typeof x=="object"&&x!==null?Yn(x):_u,b.state=l.memoizedState,x=d.getDerivedStateFromProps,typeof x=="function"&&(P0(l,d,x,h),b.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(x=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),x!==b.state&&k0.enqueueReplaceState(b,b.state,null),Wd(l,h,b,v),qd(),b.state=l.memoizedState),typeof b.componentDidMount=="function"&&(l.flags|=4194308),h=!0}else if(i===null){b=l.stateNode;var N=l.memoizedProps,B=fl(d,N);b.props=B;var Q=b.context,se=d.contextType;x=_u,typeof se=="object"&&se!==null&&(x=Yn(se));var ae=d.getDerivedStateFromProps;se=typeof ae=="function"||typeof b.getSnapshotBeforeUpdate=="function",N=l.pendingProps!==N,se||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N||Q!==x)&&P2(l,b,h,x),Gi=!1;var te=l.memoizedState;b.state=te,Wd(l,h,b,v),qd(),Q=l.memoizedState,N||te!==Q||Gi?(typeof ae=="function"&&(P0(l,d,ae,h),Q=l.memoizedState),(B=Gi||M2(l,d,B,h,te,Q,x))?(se||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(l.flags|=4194308)):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=h,l.memoizedState=Q),b.props=h,b.state=Q,b.context=x,h=B):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),h=!1)}else{b=l.stateNode,c0(i,l),x=l.memoizedProps,se=fl(d,x),b.props=se,ae=l.pendingProps,te=b.context,Q=d.contextType,B=_u,typeof Q=="object"&&Q!==null&&(B=Yn(Q)),N=d.getDerivedStateFromProps,(Q=typeof N=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(x!==ae||te!==B)&&P2(l,b,h,B),Gi=!1,te=l.memoizedState,b.state=te,Wd(l,h,b,v),qd();var re=l.memoizedState;x!==ae||te!==re||Gi||i!==null&&i.dependencies!==null&&Dp(i.dependencies)?(typeof N=="function"&&(P0(l,d,N,h),re=l.memoizedState),(se=Gi||M2(l,d,se,h,te,re,B)||i!==null&&i.dependencies!==null&&Dp(i.dependencies))?(Q||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(h,re,B),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(h,re,B)),typeof b.componentDidUpdate=="function"&&(l.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof b.componentDidUpdate!="function"||x===i.memoizedProps&&te===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&te===i.memoizedState||(l.flags|=1024),l.memoizedProps=h,l.memoizedState=re),b.props=h,b.state=re,b.context=B,h=se):(typeof b.componentDidUpdate!="function"||x===i.memoizedProps&&te===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&te===i.memoizedState||(l.flags|=1024),h=!1)}return b=h,eg(i,l),h=(l.flags&128)!==0,b||h?(b=l.stateNode,d=h&&typeof d.getDerivedStateFromError!="function"?null:b.render(),l.flags|=1,i!==null&&h?(l.child=cl(l,i.child,null,v),l.child=cl(l,null,d,v)):Zn(i,l,d,v),l.memoizedState=b.state,i=l.child):i=qo(i,l,v),i}function K2(i,l,d,h){return sl(),l.flags|=256,Zn(i,l,d,h),l.child}var F0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function z0(i){return{baseLanes:i,cachePool:UI()}}function j0(i,l,d){return i=i!==null?i.childLanes&~d:0,l&&(i|=ts),i}function Y2(i,l,d){var h=l.pendingProps,v=!1,b=(l.flags&128)!==0,x;if((x=b)||(x=i!==null&&i.memoizedState===null?!1:(yn.current&2)!==0),x&&(v=!0,l.flags&=-129),x=(l.flags&32)!==0,l.flags&=-33,i===null){if(dt){if(v?Yi(l):Zi(),(i=Vt)?(i=rN(i,bs),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:Hi!==null?{id:lo,overflow:uo}:null,retryLane:536870912,hydrationErrors:null},d=RI(i),d.return=l,l.child=d,Kn=l,Vt=null)):i=null,i===null)throw qi(l);return C1(i)?l.lanes=32:l.lanes=536870912,null}var N=h.children;return h=h.fallback,v?(Zi(),v=l.mode,N=tg({mode:"hidden",children:N},v),h=rl(h,v,d,null),N.return=l,h.return=l,N.sibling=h,l.child=N,h=l.child,h.memoizedState=z0(d),h.childLanes=j0(i,x,d),l.memoizedState=F0,Zd(null,h)):(Yi(l),B0(l,N))}var B=i.memoizedState;if(B!==null&&(N=B.dehydrated,N!==null)){if(b)l.flags&256?(Yi(l),l.flags&=-257,l=H0(i,l,d)):l.memoizedState!==null?(Zi(),l.child=i.child,l.flags|=128,l=null):(Zi(),N=h.fallback,v=l.mode,h=tg({mode:"visible",children:h.children},v),N=rl(N,v,d,null),N.flags|=2,h.return=l,N.return=l,h.sibling=N,l.child=h,cl(l,i.child,null,d),h=l.child,h.memoizedState=z0(d),h.childLanes=j0(i,x,d),l.memoizedState=F0,l=Zd(null,h));else if(Yi(l),C1(N)){if(x=N.nextSibling&&N.nextSibling.dataset,x)var Q=x.dgst;x=Q,h=Error(r(419)),h.stack="",h.digest=x,Fd({value:h,source:null,stack:null}),l=H0(i,l,d)}else if(Cn||Iu(i,l,d,!1),x=(d&i.childLanes)!==0,Cn||x){if(x=qt,x!==null&&(h=gu(x,d),h!==0&&h!==B.retryLane))throw B.retryLane=h,nl(i,h),Dr(x,i,h),L0;E1(N)||cg(),l=H0(i,l,d)}else E1(N)?(l.flags|=192,l.child=i.child,l=null):(i=B.treeContext,Vt=Es(N.nextSibling),Kn=l,dt=!0,$i=null,bs=!1,i!==null&&NI(l,i),l=B0(l,h.children),l.flags|=4096);return l}return v?(Zi(),N=h.fallback,v=l.mode,B=i.child,Q=B.sibling,h=Fo(B,{mode:"hidden",children:h.children}),h.subtreeFlags=B.subtreeFlags&65011712,Q!==null?N=Fo(Q,N):(N=rl(N,v,d,null),N.flags|=2),N.return=l,h.return=l,h.sibling=N,l.child=h,Zd(null,h),h=l.child,N=i.child.memoizedState,N===null?N=z0(d):(v=N.cachePool,v!==null?(B=Sn._currentValue,v=v.parent!==B?{parent:B,pool:B}:v):v=UI(),N={baseLanes:N.baseLanes|d,cachePool:v}),h.memoizedState=N,h.childLanes=j0(i,x,d),l.memoizedState=F0,Zd(i.child,h)):(Yi(l),d=i.child,i=d.sibling,d=Fo(d,{mode:"visible",children:h.children}),d.return=l,d.sibling=null,i!==null&&(x=l.deletions,x===null?(l.deletions=[i],l.flags|=16):x.push(i)),l.child=d,l.memoizedState=null,d)}function B0(i,l){return l=tg({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function tg(i,l){return i=Xr(22,i,null,l),i.lanes=0,i}function H0(i,l,d){return cl(l,i.child,null,d),i=B0(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function Z2(i,l,d){i.lanes|=l;var h=i.alternate;h!==null&&(h.lanes|=l),r0(i.return,l,d)}function $0(i,l,d,h,v,b){var x=i.memoizedState;x===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:h,tail:d,tailMode:v,treeForkCount:b}:(x.isBackwards=l,x.rendering=null,x.renderingStartTime=0,x.last=h,x.tail=d,x.tailMode=v,x.treeForkCount=b)}function X2(i,l,d){var h=l.pendingProps,v=h.revealOrder,b=h.tail;h=h.children;var x=yn.current,N=(x&2)!==0;if(N?(x=x&1|2,l.flags|=128):x&=1,K(yn,x),Zn(i,l,h,d),h=dt?Ud:0,!N&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Z2(i,d,l);else if(i.tag===19)Z2(i,d,l);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(v){case"forwards":for(d=l.child,v=null;d!==null;)i=d.alternate,i!==null&&$p(i)===null&&(v=d),d=d.sibling;d=v,d===null?(v=l.child,l.child=null):(v=d.sibling,d.sibling=null),$0(l,!1,v,d,b,h);break;case"backwards":case"unstable_legacy-backwards":for(d=null,v=l.child,l.child=null;v!==null;){if(i=v.alternate,i!==null&&$p(i)===null){l.child=v;break}i=v.sibling,v.sibling=d,d=v,v=i}$0(l,!0,d,null,b,h);break;case"together":$0(l,!1,null,null,void 0,h);break;default:l.memoizedState=null}return l.child}function qo(i,l,d){if(i!==null&&(l.dependencies=i.dependencies),Ji|=l.lanes,(d&l.childLanes)===0)if(i!==null){if(Iu(i,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(i!==null&&l.child!==i.child)throw Error(r(153));if(l.child!==null){for(i=l.child,d=Fo(i,i.pendingProps),l.child=d,d.return=l;i.sibling!==null;)i=i.sibling,d=d.sibling=Fo(i,i.pendingProps),d.return=l;d.sibling=null}return l.child}function q0(i,l){return(i.lanes&l)!==0?!0:(i=i.dependencies,!!(i!==null&&Dp(i)))}function jH(i,l,d){switch(l.tag){case 3:ve(l,l.stateNode.containerInfo),Wi(l,Sn,i.memoizedState.cache),sl();break;case 27:case 5:Xe(l);break;case 4:ve(l,l.stateNode.containerInfo);break;case 10:Wi(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,g0(l),null;break;case 13:var h=l.memoizedState;if(h!==null)return h.dehydrated!==null?(Yi(l),l.flags|=128,null):(d&l.child.childLanes)!==0?Y2(i,l,d):(Yi(l),i=qo(i,l,d),i!==null?i.sibling:null);Yi(l);break;case 19:var v=(i.flags&128)!==0;if(h=(d&l.childLanes)!==0,h||(Iu(i,l,d,!1),h=(d&l.childLanes)!==0),v){if(h)return X2(i,l,d);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),K(yn,yn.current),h)break;return null;case 22:return l.lanes=0,$2(i,l,d,l.pendingProps);case 24:Wi(l,Sn,i.memoizedState.cache)}return qo(i,l,d)}function Q2(i,l,d){if(i!==null)if(i.memoizedProps!==l.pendingProps)Cn=!0;else{if(!q0(i,d)&&(l.flags&128)===0)return Cn=!1,jH(i,l,d);Cn=(i.flags&131072)!==0}else Cn=!1,dt&&(l.flags&1048576)!==0&&OI(l,Ud,l.index);switch(l.lanes=0,l.tag){case 16:e:{var h=l.pendingProps;if(i=ll(l.elementType),l.type=i,typeof i=="function")Yb(i)?(h=fl(i,h),l.tag=1,l=V2(null,l,i,h,d)):(l.tag=0,l=U0(null,l,i,h,d));else{if(i!=null){var v=i.$$typeof;if(v===R){l.tag=11,l=j2(null,l,i,h,d);break e}else if(v===I){l.tag=14,l=B2(null,l,i,h,d);break e}}throw l=Y(i)||i,Error(r(306,l,""))}}return l;case 0:return U0(i,l,l.type,l.pendingProps,d);case 1:return h=l.type,v=fl(h,l.pendingProps),V2(i,l,h,v,d);case 3:e:{if(ve(l,l.stateNode.containerInfo),i===null)throw Error(r(387));h=l.pendingProps;var b=l.memoizedState;v=b.element,c0(i,l),Wd(l,h,null,d);var x=l.memoizedState;if(h=x.cache,Wi(l,Sn,h),h!==b.cache&&s0(l,[Sn],d,!0),qd(),h=x.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:x.cache},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){l=K2(i,l,h,d);break e}else if(h!==v){v=ms(Error(r(424)),l),Fd(v),l=K2(i,l,h,d);break e}else for(i=l.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,Vt=Es(i.firstChild),Kn=l,dt=!0,$i=null,bs=!0,d=$I(l,null,h,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(sl(),h===v){l=qo(i,l,d);break e}Zn(i,l,h,d)}l=l.child}return l;case 26:return eg(i,l),i===null?(d=uN(l.type,null,l.pendingProps,null))?l.memoizedState=d:dt||(d=l.type,i=l.pendingProps,h=vg(he.current).createElement(d),h[In]=l,h[nt]=i,Xn(h,d,i),an(h),l.stateNode=h):l.memoizedState=uN(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return Xe(l),i===null&&dt&&(h=l.stateNode=iN(l.type,l.pendingProps,he.current),Kn=l,bs=!0,v=Vt,sa(l.type)?(w1=v,Vt=Es(h.firstChild)):Vt=v),Zn(i,l,l.pendingProps.children,d),eg(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&dt&&((v=h=Vt)&&(h=m$(h,l.type,l.pendingProps,bs),h!==null?(l.stateNode=h,Kn=l,Vt=Es(h.firstChild),bs=!1,v=!0):v=!1),v||qi(l)),Xe(l),v=l.type,b=l.pendingProps,x=i!==null?i.memoizedProps:null,h=b.children,y1(v,b)?h=null:x!==null&&y1(v,x)&&(l.flags|=32),l.memoizedState!==null&&(v=v0(i,l,NH,null,null,d),ff._currentValue=v),eg(i,l),Zn(i,l,h,d),l.child;case 6:return i===null&&dt&&((i=d=Vt)&&(d=v$(d,l.pendingProps,bs),d!==null?(l.stateNode=d,Kn=l,Vt=null,i=!0):i=!1),i||qi(l)),null;case 13:return Y2(i,l,d);case 4:return ve(l,l.stateNode.containerInfo),h=l.pendingProps,i===null?l.child=cl(l,null,h,d):Zn(i,l,h,d),l.child;case 11:return j2(i,l,l.type,l.pendingProps,d);case 7:return Zn(i,l,l.pendingProps,d),l.child;case 8:return Zn(i,l,l.pendingProps.children,d),l.child;case 12:return Zn(i,l,l.pendingProps.children,d),l.child;case 10:return h=l.pendingProps,Wi(l,l.type,h.value),Zn(i,l,h.children,d),l.child;case 9:return v=l.type._context,h=l.pendingProps.children,il(l),v=Yn(v),h=h(v),l.flags|=1,Zn(i,l,h,d),l.child;case 14:return B2(i,l,l.type,l.pendingProps,d);case 15:return H2(i,l,l.type,l.pendingProps,d);case 19:return X2(i,l,d);case 31:return zH(i,l,d);case 22:return $2(i,l,d,l.pendingProps);case 24:return il(l),h=Yn(Sn),i===null?(v=a0(),v===null&&(v=qt,b=o0(),v.pooledCache=b,b.refCount++,b!==null&&(v.pooledCacheLanes|=d),v=b),l.memoizedState={parent:h,cache:v},u0(l),Wi(l,Sn,v)):((i.lanes&d)!==0&&(c0(i,l),Wd(l,null,null,d),qd()),v=i.memoizedState,b=l.memoizedState,v.parent!==h?(v={parent:h,cache:h},l.memoizedState=v,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=v),Wi(l,Sn,h)):(h=b.cache,Wi(l,Sn,h),h!==v.cache&&s0(l,[Sn],d,!0))),Zn(i,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Wo(i){i.flags|=4}function W0(i,l,d,h,v){if((l=(i.mode&32)!==0)&&(l=!1),l){if(i.flags|=16777216,(v&335544128)===v)if(i.stateNode.complete)i.flags|=8192;else if(_O())i.flags|=8192;else throw ul=zp,l0}else i.flags&=-16777217}function J2(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!pN(l))if(_O())i.flags|=8192;else throw ul=zp,l0}function ng(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?Kr():536870912,i.lanes|=l,Bu|=l)}function Xd(i,l){if(!dt)switch(i.tailMode){case"hidden":l=i.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?i.tail=null:d.sibling=null;break;case"collapsed":d=i.tail;for(var h=null;d!==null;)d.alternate!==null&&(h=d),d=d.sibling;h===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function Kt(i){var l=i.alternate!==null&&i.alternate.child===i.child,d=0,h=0;if(l)for(var v=i.child;v!==null;)d|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=i,v=v.sibling;else for(v=i.child;v!==null;)d|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=i,v=v.sibling;return i.subtreeFlags|=h,i.childLanes=d,l}function BH(i,l,d){var h=l.pendingProps;switch(Jb(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(l),null;case 1:return Kt(l),null;case 3:return d=l.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),Bo(Sn),xe(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Ru(l)?Wo(l):i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,t0())),Kt(l),null;case 26:var v=l.type,b=l.memoizedState;return i===null?(Wo(l),b!==null?(Kt(l),J2(l,b)):(Kt(l),W0(l,v,null,h,d))):b?b!==i.memoizedState?(Wo(l),Kt(l),J2(l,b)):(Kt(l),l.flags&=-16777217):(i=i.memoizedProps,i!==h&&Wo(l),Kt(l),W0(l,v,i,h,d)),null;case 27:if(Ee(l),d=he.current,v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==h&&Wo(l);else{if(!h){if(l.stateNode===null)throw Error(r(166));return Kt(l),null}i=J.current,Ru(l)?MI(l):(i=iN(v,h,d),l.stateNode=i,Wo(l))}return Kt(l),null;case 5:if(Ee(l),v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==h&&Wo(l);else{if(!h){if(l.stateNode===null)throw Error(r(166));return Kt(l),null}if(b=J.current,Ru(l))MI(l);else{var x=vg(he.current);switch(b){case 1:b=x.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:b=x.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":b=x.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":b=x.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":b=x.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof h.is=="string"?x.createElement("select",{is:h.is}):x.createElement("select"),h.multiple?b.multiple=!0:h.size&&(b.size=h.size);break;default:b=typeof h.is=="string"?x.createElement(v,{is:h.is}):x.createElement(v)}}b[In]=l,b[nt]=h;e:for(x=l.child;x!==null;){if(x.tag===5||x.tag===6)b.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===l)break e;for(;x.sibling===null;){if(x.return===null||x.return===l)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}l.stateNode=b;e:switch(Xn(b,v,h),v){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Wo(l)}}return Kt(l),W0(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,d),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==h&&Wo(l);else{if(typeof h!="string"&&l.stateNode===null)throw Error(r(166));if(i=he.current,Ru(l)){if(i=l.stateNode,d=l.memoizedProps,h=null,v=Kn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}i[In]=l,i=!!(i.nodeValue===d||h!==null&&h.suppressHydrationWarning===!0||YO(i.nodeValue,d)),i||qi(l,!0)}else i=vg(i).createTextNode(h),i[In]=l,l.stateNode=i}return Kt(l),null;case 31:if(d=l.memoizedState,i===null||i.memoizedState!==null){if(h=Ru(l),d!==null){if(i===null){if(!h)throw Error(r(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[In]=l}else sl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Kt(l),i=!1}else d=t0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=d),i=!0;if(!i)return l.flags&256?(Jr(l),l):(Jr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Kt(l),null;case 13:if(h=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(v=Ru(l),h!==null&&h.dehydrated!==null){if(i===null){if(!v)throw Error(r(318));if(v=l.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[In]=l}else sl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Kt(l),v=!1}else v=t0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=v),v=!0;if(!v)return l.flags&256?(Jr(l),l):(Jr(l),null)}return Jr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=h!==null,i=i!==null&&i.memoizedState!==null,d&&(h=l.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),b=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(b=h.memoizedState.cachePool.pool),b!==v&&(h.flags|=2048)),d!==i&&d&&(l.child.flags|=8192),ng(l,l.updateQueue),Kt(l),null);case 4:return xe(),i===null&&h1(l.stateNode.containerInfo),Kt(l),null;case 10:return Bo(l.type),Kt(l),null;case 19:if(V(yn),h=l.memoizedState,h===null)return Kt(l),null;if(v=(l.flags&128)!==0,b=h.rendering,b===null)if(v)Xd(h,!1);else{if(pn!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(b=$p(i),b!==null){for(l.flags|=128,Xd(h,!1),i=b.updateQueue,l.updateQueue=i,ng(l,i),l.subtreeFlags=0,i=d,d=l.child;d!==null;)TI(d,i),d=d.sibling;return K(yn,yn.current&1|2),dt&&zo(l,h.treeForkCount),l.child}i=i.sibling}h.tail!==null&&Gt()>ag&&(l.flags|=128,v=!0,Xd(h,!1),l.lanes=4194304)}else{if(!v)if(i=$p(b),i!==null){if(l.flags|=128,v=!0,i=i.updateQueue,l.updateQueue=i,ng(l,i),Xd(h,!0),h.tail===null&&h.tailMode==="hidden"&&!b.alternate&&!dt)return Kt(l),null}else 2*Gt()-h.renderingStartTime>ag&&d!==536870912&&(l.flags|=128,v=!0,Xd(h,!1),l.lanes=4194304);h.isBackwards?(b.sibling=l.child,l.child=b):(i=h.last,i!==null?i.sibling=b:l.child=b,h.last=b)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=Gt(),i.sibling=null,d=yn.current,K(yn,v?d&1|2:d&1),dt&&zo(l,h.treeForkCount),i):(Kt(l),null);case 22:case 23:return Jr(l),p0(),h=l.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(l.flags|=8192):h&&(l.flags|=8192),h?(d&536870912)!==0&&(l.flags&128)===0&&(Kt(l),l.subtreeFlags&6&&(l.flags|=8192)):Kt(l),d=l.updateQueue,d!==null&&ng(l,d.retryQueue),d=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==d&&(l.flags|=2048),i!==null&&V(al),null;case 24:return d=null,i!==null&&(d=i.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Bo(Sn),Kt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function HH(i,l){switch(Jb(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return Bo(Sn),xe(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return Ee(l),null;case 31:if(l.memoizedState!==null){if(Jr(l),l.alternate===null)throw Error(r(340));sl()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(Jr(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));sl()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return V(yn),null;case 4:return xe(),null;case 10:return Bo(l.type),null;case 22:case 23:return Jr(l),p0(),i!==null&&V(al),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return Bo(Sn),null;case 25:return null;default:return null}}function eO(i,l){switch(Jb(l),l.tag){case 3:Bo(Sn),xe();break;case 26:case 27:case 5:Ee(l);break;case 4:xe();break;case 31:l.memoizedState!==null&&Jr(l);break;case 13:Jr(l);break;case 19:V(yn);break;case 10:Bo(l.type);break;case 22:case 23:Jr(l),p0(),i!==null&&V(al);break;case 24:Bo(Sn)}}function Qd(i,l){try{var d=l.updateQueue,h=d!==null?d.lastEffect:null;if(h!==null){var v=h.next;d=v;do{if((d.tag&i)===i){h=void 0;var b=d.create,x=d.inst;h=b(),x.destroy=h}d=d.next}while(d!==v)}}catch(N){Pt(l,l.return,N)}}function Xi(i,l,d){try{var h=l.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var b=v.next;h=b;do{if((h.tag&i)===i){var x=h.inst,N=x.destroy;if(N!==void 0){x.destroy=void 0,v=l;var B=d,Q=N;try{Q()}catch(se){Pt(v,B,se)}}}h=h.next}while(h!==b)}}catch(se){Pt(l,l.return,se)}}function tO(i){var l=i.updateQueue;if(l!==null){var d=i.stateNode;try{WI(l,d)}catch(h){Pt(i,i.return,h)}}}function nO(i,l,d){d.props=fl(i.type,i.memoizedProps),d.state=i.memoizedState;try{d.componentWillUnmount()}catch(h){Pt(i,l,h)}}function Jd(i,l){try{var d=i.ref;if(d!==null){switch(i.tag){case 26:case 27:case 5:var h=i.stateNode;break;case 30:h=i.stateNode;break;default:h=i.stateNode}typeof d=="function"?i.refCleanup=d(h):d.current=h}}catch(v){Pt(i,l,v)}}function co(i,l){var d=i.ref,h=i.refCleanup;if(d!==null)if(typeof h=="function")try{h()}catch(v){Pt(i,l,v)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(v){Pt(i,l,v)}else d.current=null}function rO(i){var l=i.type,d=i.memoizedProps,h=i.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&h.focus();break e;case"img":d.src?h.src=d.src:d.srcSet&&(h.srcset=d.srcSet)}}catch(v){Pt(i,i.return,v)}}function G0(i,l,d){try{var h=i.stateNode;c$(h,i.type,d,l),h[nt]=l}catch(v){Pt(i,i.return,v)}}function sO(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&sa(i.type)||i.tag===4}function V0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||sO(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&sa(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function K0(i,l,d){var h=i.tag;if(h===5||h===6)i=i.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(i,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(i),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=tn));else if(h!==4&&(h===27&&sa(i.type)&&(d=i.stateNode,l=null),i=i.child,i!==null))for(K0(i,l,d),i=i.sibling;i!==null;)K0(i,l,d),i=i.sibling}function rg(i,l,d){var h=i.tag;if(h===5||h===6)i=i.stateNode,l?d.insertBefore(i,l):d.appendChild(i);else if(h!==4&&(h===27&&sa(i.type)&&(d=i.stateNode),i=i.child,i!==null))for(rg(i,l,d),i=i.sibling;i!==null;)rg(i,l,d),i=i.sibling}function oO(i){var l=i.stateNode,d=i.memoizedProps;try{for(var h=i.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);Xn(l,h,d),l[In]=i,l[nt]=d}catch(b){Pt(i,i.return,b)}}var Go=!1,wn=!1,Y0=!1,iO=typeof WeakSet=="function"?WeakSet:Set,Ln=null;function $H(i,l){if(i=i.containerInfo,m1=xg,i=yI(i),Hb(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var h=d.getSelection&&d.getSelection();if(h&&h.rangeCount!==0){d=h.anchorNode;var v=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{d.nodeType,b.nodeType}catch{d=null;break e}var x=0,N=-1,B=-1,Q=0,se=0,ae=i,te=null;t:for(;;){for(var re;ae!==d||v!==0&&ae.nodeType!==3||(N=x+v),ae!==b||h!==0&&ae.nodeType!==3||(B=x+h),ae.nodeType===3&&(x+=ae.nodeValue.length),(re=ae.firstChild)!==null;)te=ae,ae=re;for(;;){if(ae===i)break t;if(te===d&&++Q===v&&(N=x),te===b&&++se===h&&(B=x),(re=ae.nextSibling)!==null)break;ae=te,te=ae.parentNode}ae=re}d=N===-1||B===-1?null:{start:N,end:B}}else d=null}d=d||{start:0,end:0}}else d=null;for(v1={focusedElem:i,selectionRange:d},xg=!1,Ln=l;Ln!==null;)if(l=Ln,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,Ln=i;else for(;Ln!==null;){switch(l=Ln,b=l.alternate,i=l.flags,l.tag){case 0:if((i&4)!==0&&(i=l.updateQueue,i=i!==null?i.events:null,i!==null))for(d=0;d<i.length;d++)v=i[d],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&b!==null){i=void 0,d=l,v=b.memoizedProps,b=b.memoizedState,h=d.stateNode;try{var Re=fl(d.type,v);i=h.getSnapshotBeforeUpdate(Re,b),h.__reactInternalSnapshotBeforeUpdate=i}catch(De){Pt(d,d.return,De)}}break;case 3:if((i&1024)!==0){if(i=l.stateNode.containerInfo,d=i.nodeType,d===9)S1(i);else if(d===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":S1(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=l.sibling,i!==null){i.return=l.return,Ln=i;break}Ln=l.return}}function aO(i,l,d){var h=d.flags;switch(d.tag){case 0:case 11:case 15:Ko(i,d),h&4&&Qd(5,d);break;case 1:if(Ko(i,d),h&4)if(i=d.stateNode,l===null)try{i.componentDidMount()}catch(x){Pt(d,d.return,x)}else{var v=fl(d.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(v,l,i.__reactInternalSnapshotBeforeUpdate)}catch(x){Pt(d,d.return,x)}}h&64&&tO(d),h&512&&Jd(d,d.return);break;case 3:if(Ko(i,d),h&64&&(i=d.updateQueue,i!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{WI(i,l)}catch(x){Pt(d,d.return,x)}}break;case 27:l===null&&h&4&&oO(d);case 26:case 5:Ko(i,d),l===null&&h&4&&rO(d),h&512&&Jd(d,d.return);break;case 12:Ko(i,d);break;case 31:Ko(i,d),h&4&&cO(i,d);break;case 13:Ko(i,d),h&4&&dO(i,d),h&64&&(i=d.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(d=QH.bind(null,d),y$(i,d))));break;case 22:if(h=d.memoizedState!==null||Go,!h){l=l!==null&&l.memoizedState!==null||wn,v=Go;var b=wn;Go=h,(wn=l)&&!b?Yo(i,d,(d.subtreeFlags&8772)!==0):Ko(i,d),Go=v,wn=b}break;case 30:break;default:Ko(i,d)}}function lO(i){var l=i.alternate;l!==null&&(i.alternate=null,lO(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&Cd(l)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var nn=null,Nr=!1;function Vo(i,l,d){for(d=d.child;d!==null;)uO(i,l,d),d=d.sibling}function uO(i,l,d){if(ar&&typeof ar.onCommitFiberUnmount=="function")try{ar.onCommitFiberUnmount(Mi,d)}catch{}switch(d.tag){case 26:wn||co(d,l),Vo(i,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:wn||co(d,l);var h=nn,v=Nr;sa(d.type)&&(nn=d.stateNode,Nr=!1),Vo(i,l,d),uf(d.stateNode),nn=h,Nr=v;break;case 5:wn||co(d,l);case 6:if(h=nn,v=Nr,nn=null,Vo(i,l,d),nn=h,Nr=v,nn!==null)if(Nr)try{(nn.nodeType===9?nn.body:nn.nodeName==="HTML"?nn.ownerDocument.body:nn).removeChild(d.stateNode)}catch(b){Pt(d,l,b)}else try{nn.removeChild(d.stateNode)}catch(b){Pt(d,l,b)}break;case 18:nn!==null&&(Nr?(i=nn,tN(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,d.stateNode),Yu(i)):tN(nn,d.stateNode));break;case 4:h=nn,v=Nr,nn=d.stateNode.containerInfo,Nr=!0,Vo(i,l,d),nn=h,Nr=v;break;case 0:case 11:case 14:case 15:Xi(2,d,l),wn||Xi(4,d,l),Vo(i,l,d);break;case 1:wn||(co(d,l),h=d.stateNode,typeof h.componentWillUnmount=="function"&&nO(d,l,h)),Vo(i,l,d);break;case 21:Vo(i,l,d);break;case 22:wn=(h=wn)||d.memoizedState!==null,Vo(i,l,d),wn=h;break;default:Vo(i,l,d)}}function cO(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Yu(i)}catch(d){Pt(l,l.return,d)}}}function dO(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Yu(i)}catch(d){Pt(l,l.return,d)}}function qH(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new iO),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new iO),l;default:throw Error(r(435,i.tag))}}function sg(i,l){var d=qH(i);l.forEach(function(h){if(!d.has(h)){d.add(h);var v=JH.bind(null,i,h);h.then(v,v)}})}function Mr(i,l){var d=l.deletions;if(d!==null)for(var h=0;h<d.length;h++){var v=d[h],b=i,x=l,N=x;e:for(;N!==null;){switch(N.tag){case 27:if(sa(N.type)){nn=N.stateNode,Nr=!1;break e}break;case 5:nn=N.stateNode,Nr=!1;break e;case 3:case 4:nn=N.stateNode.containerInfo,Nr=!0;break e}N=N.return}if(nn===null)throw Error(r(160));uO(b,x,v),nn=null,Nr=!1,b=v.alternate,b!==null&&(b.return=null),v.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)fO(l,i),l=l.sibling}var Fs=null;function fO(i,l){var d=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Mr(l,i),Pr(i),h&4&&(Xi(3,i,i.return),Qd(3,i),Xi(5,i,i.return));break;case 1:Mr(l,i),Pr(i),h&512&&(wn||d===null||co(d,d.return)),h&64&&Go&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(d=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=d===null?h:d.concat(h))));break;case 26:var v=Fs;if(Mr(l,i),Pr(i),h&512&&(wn||d===null||co(d,d.return)),h&4){var b=d!==null?d.memoizedState:null;if(h=i.memoizedState,d===null)if(h===null)if(i.stateNode===null){e:{h=i.type,d=i.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":b=v.getElementsByTagName("title")[0],(!b||b[Li]||b[In]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=v.createElement(h),v.head.insertBefore(b,v.querySelector("head > title"))),Xn(b,h,d),b[In]=i,an(b),h=b;break e;case"link":var x=fN("link","href",v).get(h+(d.href||""));if(x){for(var N=0;N<x.length;N++)if(b=x[N],b.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&b.getAttribute("rel")===(d.rel==null?null:d.rel)&&b.getAttribute("title")===(d.title==null?null:d.title)&&b.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){x.splice(N,1);break t}}b=v.createElement(h),Xn(b,h,d),v.head.appendChild(b);break;case"meta":if(x=fN("meta","content",v).get(h+(d.content||""))){for(N=0;N<x.length;N++)if(b=x[N],b.getAttribute("content")===(d.content==null?null:""+d.content)&&b.getAttribute("name")===(d.name==null?null:d.name)&&b.getAttribute("property")===(d.property==null?null:d.property)&&b.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&b.getAttribute("charset")===(d.charSet==null?null:d.charSet)){x.splice(N,1);break t}}b=v.createElement(h),Xn(b,h,d),v.head.appendChild(b);break;default:throw Error(r(468,h))}b[In]=i,an(b),h=b}i.stateNode=h}else hN(v,i.type,i.stateNode);else i.stateNode=dN(v,h,i.memoizedProps);else b!==h?(b===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):b.count--,h===null?hN(v,i.type,i.stateNode):dN(v,h,i.memoizedProps)):h===null&&i.stateNode!==null&&G0(i,i.memoizedProps,d.memoizedProps)}break;case 27:Mr(l,i),Pr(i),h&512&&(wn||d===null||co(d,d.return)),d!==null&&h&4&&G0(i,i.memoizedProps,d.memoizedProps);break;case 5:if(Mr(l,i),Pr(i),h&512&&(wn||d===null||co(d,d.return)),i.flags&32){v=i.stateNode;try{Z(v,"")}catch(Re){Pt(i,i.return,Re)}}h&4&&i.stateNode!=null&&(v=i.memoizedProps,G0(i,v,d!==null?d.memoizedProps:v)),h&1024&&(Y0=!0);break;case 6:if(Mr(l,i),Pr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,d=i.stateNode;try{d.nodeValue=h}catch(Re){Pt(i,i.return,Re)}}break;case 3:if(Sg=null,v=Fs,Fs=yg(l.containerInfo),Mr(l,i),Fs=v,Pr(i),h&4&&d!==null&&d.memoizedState.isDehydrated)try{Yu(l.containerInfo)}catch(Re){Pt(i,i.return,Re)}Y0&&(Y0=!1,hO(i));break;case 4:h=Fs,Fs=yg(i.stateNode.containerInfo),Mr(l,i),Pr(i),Fs=h;break;case 12:Mr(l,i),Pr(i);break;case 31:Mr(l,i),Pr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,sg(i,h)));break;case 13:Mr(l,i),Pr(i),i.child.flags&8192&&i.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(ig=Gt()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,sg(i,h)));break;case 22:v=i.memoizedState!==null;var B=d!==null&&d.memoizedState!==null,Q=Go,se=wn;if(Go=Q||v,wn=se||B,Mr(l,i),wn=se,Go=Q,Pr(i),h&8192)e:for(l=i.stateNode,l._visibility=v?l._visibility&-2:l._visibility|1,v&&(d===null||B||Go||wn||hl(i)),d=null,l=i;;){if(l.tag===5||l.tag===26){if(d===null){B=d=l;try{if(b=B.stateNode,v)x=b.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{N=B.stateNode;var ae=B.memoizedProps.style,te=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;N.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(Re){Pt(B,B.return,Re)}}}else if(l.tag===6){if(d===null){B=l;try{B.stateNode.nodeValue=v?"":B.memoizedProps}catch(Re){Pt(B,B.return,Re)}}}else if(l.tag===18){if(d===null){B=l;try{var re=B.stateNode;v?nN(re,!0):nN(B.stateNode,!1)}catch(Re){Pt(B,B.return,Re)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===i)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break e;for(;l.sibling===null;){if(l.return===null||l.return===i)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}h&4&&(h=i.updateQueue,h!==null&&(d=h.retryQueue,d!==null&&(h.retryQueue=null,sg(i,d))));break;case 19:Mr(l,i),Pr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,sg(i,h)));break;case 30:break;case 21:break;default:Mr(l,i),Pr(i)}}function Pr(i){var l=i.flags;if(l&2){try{for(var d,h=i.return;h!==null;){if(sO(h)){d=h;break}h=h.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var v=d.stateNode,b=V0(i);rg(i,b,v);break;case 5:var x=d.stateNode;d.flags&32&&(Z(x,""),d.flags&=-33);var N=V0(i);rg(i,N,x);break;case 3:case 4:var B=d.stateNode.containerInfo,Q=V0(i);K0(i,Q,B);break;default:throw Error(r(161))}}catch(se){Pt(i,i.return,se)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function hO(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;hO(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),i=i.sibling}}function Ko(i,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)aO(i,l.alternate,l),l=l.sibling}function hl(i){for(i=i.child;i!==null;){var l=i;switch(l.tag){case 0:case 11:case 14:case 15:Xi(4,l,l.return),hl(l);break;case 1:co(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&nO(l,l.return,d),hl(l);break;case 27:uf(l.stateNode);case 26:case 5:co(l,l.return),hl(l);break;case 22:l.memoizedState===null&&hl(l);break;case 30:hl(l);break;default:hl(l)}i=i.sibling}}function Yo(i,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var h=l.alternate,v=i,b=l,x=b.flags;switch(b.tag){case 0:case 11:case 15:Yo(v,b,d),Qd(4,b);break;case 1:if(Yo(v,b,d),h=b,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(Q){Pt(h,h.return,Q)}if(h=b,v=h.updateQueue,v!==null){var N=h.stateNode;try{var B=v.shared.hiddenCallbacks;if(B!==null)for(v.shared.hiddenCallbacks=null,v=0;v<B.length;v++)qI(B[v],N)}catch(Q){Pt(h,h.return,Q)}}d&&x&64&&tO(b),Jd(b,b.return);break;case 27:oO(b);case 26:case 5:Yo(v,b,d),d&&h===null&&x&4&&rO(b),Jd(b,b.return);break;case 12:Yo(v,b,d);break;case 31:Yo(v,b,d),d&&x&4&&cO(v,b);break;case 13:Yo(v,b,d),d&&x&4&&dO(v,b);break;case 22:b.memoizedState===null&&Yo(v,b,d),Jd(b,b.return);break;case 30:break;default:Yo(v,b,d)}l=l.sibling}}function Z0(i,l){var d=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==d&&(i!=null&&i.refCount++,d!=null&&zd(d))}function X0(i,l){i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&zd(i))}function zs(i,l,d,h){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)pO(i,l,d,h),l=l.sibling}function pO(i,l,d,h){var v=l.flags;switch(l.tag){case 0:case 11:case 15:zs(i,l,d,h),v&2048&&Qd(9,l);break;case 1:zs(i,l,d,h);break;case 3:zs(i,l,d,h),v&2048&&(i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&zd(i)));break;case 12:if(v&2048){zs(i,l,d,h),i=l.stateNode;try{var b=l.memoizedProps,x=b.id,N=b.onPostCommit;typeof N=="function"&&N(x,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(B){Pt(l,l.return,B)}}else zs(i,l,d,h);break;case 31:zs(i,l,d,h);break;case 13:zs(i,l,d,h);break;case 23:break;case 22:b=l.stateNode,x=l.alternate,l.memoizedState!==null?b._visibility&2?zs(i,l,d,h):ef(i,l):b._visibility&2?zs(i,l,d,h):(b._visibility|=2,Fu(i,l,d,h,(l.subtreeFlags&10256)!==0||!1)),v&2048&&Z0(x,l);break;case 24:zs(i,l,d,h),v&2048&&X0(l.alternate,l);break;default:zs(i,l,d,h)}}function Fu(i,l,d,h,v){for(v=v&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var b=i,x=l,N=d,B=h,Q=x.flags;switch(x.tag){case 0:case 11:case 15:Fu(b,x,N,B,v),Qd(8,x);break;case 23:break;case 22:var se=x.stateNode;x.memoizedState!==null?se._visibility&2?Fu(b,x,N,B,v):ef(b,x):(se._visibility|=2,Fu(b,x,N,B,v)),v&&Q&2048&&Z0(x.alternate,x);break;case 24:Fu(b,x,N,B,v),v&&Q&2048&&X0(x.alternate,x);break;default:Fu(b,x,N,B,v)}l=l.sibling}}function ef(i,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=i,h=l,v=h.flags;switch(h.tag){case 22:ef(d,h),v&2048&&Z0(h.alternate,h);break;case 24:ef(d,h),v&2048&&X0(h.alternate,h);break;default:ef(d,h)}l=l.sibling}}var tf=8192;function zu(i,l,d){if(i.subtreeFlags&tf)for(i=i.child;i!==null;)gO(i,l,d),i=i.sibling}function gO(i,l,d){switch(i.tag){case 26:zu(i,l,d),i.flags&tf&&i.memoizedState!==null&&O$(d,Fs,i.memoizedState,i.memoizedProps);break;case 5:zu(i,l,d);break;case 3:case 4:var h=Fs;Fs=yg(i.stateNode.containerInfo),zu(i,l,d),Fs=h;break;case 22:i.memoizedState===null&&(h=i.alternate,h!==null&&h.memoizedState!==null?(h=tf,tf=16777216,zu(i,l,d),tf=h):zu(i,l,d));break;default:zu(i,l,d)}}function mO(i){var l=i.alternate;if(l!==null&&(i=l.child,i!==null)){l.child=null;do l=i.sibling,i.sibling=null,i=l;while(i!==null)}}function nf(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var h=l[d];Ln=h,yO(h,i)}mO(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)vO(i),i=i.sibling}function vO(i){switch(i.tag){case 0:case 11:case 15:nf(i),i.flags&2048&&Xi(9,i,i.return);break;case 3:nf(i);break;case 12:nf(i);break;case 22:var l=i.stateNode;i.memoizedState!==null&&l._visibility&2&&(i.return===null||i.return.tag!==13)?(l._visibility&=-3,og(i)):nf(i);break;default:nf(i)}}function og(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var h=l[d];Ln=h,yO(h,i)}mO(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:Xi(8,l,l.return),og(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,og(l));break;default:og(l)}i=i.sibling}}function yO(i,l){for(;Ln!==null;){var d=Ln;switch(d.tag){case 0:case 11:case 15:Xi(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var h=d.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:zd(d.memoizedState.cache)}if(h=d.child,h!==null)h.return=d,Ln=h;else e:for(d=i;Ln!==null;){h=Ln;var v=h.sibling,b=h.return;if(lO(h),h===d){Ln=null;break e}if(v!==null){v.return=b,Ln=v;break e}Ln=b}}}var WH={getCacheForType:function(i){var l=Yn(Sn),d=l.data.get(i);return d===void 0&&(d=i(),l.data.set(i,d)),d},cacheSignal:function(){return Yn(Sn).controller.signal}},GH=typeof WeakMap=="function"?WeakMap:Map,Rt=0,qt=null,it=null,ut=0,Mt=0,es=null,Qi=!1,ju=!1,Q0=!1,Zo=0,pn=0,Ji=0,pl=0,J0=0,ts=0,Bu=0,rf=null,kr=null,e1=!1,ig=0,bO=0,ag=1/0,lg=null,ea=null,Nn=0,ta=null,Hu=null,Xo=0,t1=0,n1=null,SO=null,sf=0,r1=null;function ns(){return(Rt&2)!==0&&ut!==0?ut&-ut:$.T!==null?u1():vp()}function EO(){if(ts===0)if((ut&536870912)===0||dt){var i=Va;Va<<=1,(Va&3932160)===0&&(Va=262144),ts=i}else ts=536870912;return i=Qr.current,i!==null&&(i.flags|=32),ts}function Dr(i,l,d){(i===qt&&(Mt===2||Mt===9)||i.cancelPendingCommit!==null)&&($u(i,0),na(i,ut,ts,!1)),Do(i,d),((Rt&2)===0||i!==qt)&&(i===qt&&((Rt&2)===0&&(pl|=d),pn===4&&na(i,ut,ts,!1)),fo(i))}function CO(i,l,d){if((Rt&6)!==0)throw Error(r(327));var h=!d&&(l&127)===0&&(l&i.expiredLanes)===0||ro(i,l),v=h?YH(i,l):o1(i,l,!0),b=h;do{if(v===0){ju&&!h&&na(i,l,0,!1);break}else{if(d=i.current.alternate,b&&!VH(d)){v=o1(i,l,!1),b=!1;continue}if(v===2){if(b=l,i.errorRecoveryDisabledLanes&b)var x=0;else x=i.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){l=x;e:{var N=i;v=rf;var B=N.current.memoizedState.isDehydrated;if(B&&($u(N,x).flags|=256),x=o1(N,x,!1),x!==2){if(Q0&&!B){N.errorRecoveryDisabledLanes|=b,pl|=b,v=4;break e}b=kr,kr=v,b!==null&&(kr===null?kr=b:kr.push.apply(kr,b))}v=x}if(b=!1,v!==2)continue}}if(v===1){$u(i,0),na(i,l,0,!0);break}e:{switch(h=i,b=v,b){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:na(h,l,ts,!Qi);break e;case 2:kr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(v=ig+300-Gt(),10<v)){if(na(h,l,ts,!Qi),Ya(h,0,!0)!==0)break e;Xo=l,h.timeoutHandle=JO(wO.bind(null,h,d,kr,lg,e1,l,ts,pl,Bu,Qi,b,"Throttled",-0,0),v);break e}wO(h,d,kr,lg,e1,l,ts,pl,Bu,Qi,b,null,-0,0)}}break}while(!0);fo(i)}function wO(i,l,d,h,v,b,x,N,B,Q,se,ae,te,re){if(i.timeoutHandle=-1,ae=l.subtreeFlags,ae&8192||(ae&16785408)===16785408){ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tn},gO(l,b,ae);var Re=(b&62914560)===b?ig-Gt():(b&4194048)===b?bO-Gt():0;if(Re=N$(ae,Re),Re!==null){Xo=b,i.cancelPendingCommit=Re(NO.bind(null,i,l,b,d,h,v,x,N,B,se,ae,null,te,re)),na(i,b,x,!Q);return}}NO(i,l,b,d,h,v,x,N,B)}function VH(i){for(var l=i;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var h=0;h<d.length;h++){var v=d[h],b=v.getSnapshot;v=v.value;try{if(!Zr(b(),v))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function na(i,l,d,h){l&=~J0,l&=~pl,i.suspendedLanes|=l,i.pingedLanes&=~l,h&&(i.warmLanes|=l),h=i.expirationTimes;for(var v=l;0<v;){var b=31-Vn(v),x=1<<b;h[b]=-1,v&=~x}d!==0&&mp(i,d,l)}function ug(){return(Rt&6)===0?(of(0),!1):!0}function s1(){if(it!==null){if(Mt===0)var i=it.return;else i=it,jo=ol=null,S0(i),Pu=null,Bd=0,i=it;for(;i!==null;)eO(i.alternate,i),i=i.return;it=null}}function $u(i,l){var d=i.timeoutHandle;d!==-1&&(i.timeoutHandle=-1,h$(d)),d=i.cancelPendingCommit,d!==null&&(i.cancelPendingCommit=null,d()),Xo=0,s1(),qt=i,it=d=Fo(i.current,null),ut=l,Mt=0,es=null,Qi=!1,ju=ro(i,l),Q0=!1,Bu=ts=J0=pl=Ji=pn=0,kr=rf=null,e1=!1,(l&8)!==0&&(l|=l&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=l;0<h;){var v=31-Vn(h),b=1<<v;l|=i[v],h&=~b}return Zo=l,Op(),d}function xO(i,l){Qe=null,$.H=Yd,l===Mu||l===Fp?(l=jI(),Mt=3):l===l0?(l=jI(),Mt=4):Mt=l===L0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,es=l,it===null&&(pn=1,Qp(i,ms(l,i.current)))}function _O(){var i=Qr.current;return i===null?!0:(ut&4194048)===ut?Ss===null:(ut&62914560)===ut||(ut&536870912)!==0?i===Ss:!1}function AO(){var i=$.H;return $.H=Yd,i===null?Yd:i}function TO(){var i=$.A;return $.A=WH,i}function cg(){pn=4,Qi||(ut&4194048)!==ut&&Qr.current!==null||(ju=!0),(Ji&134217727)===0&&(pl&134217727)===0||qt===null||na(qt,ut,ts,!1)}function o1(i,l,d){var h=Rt;Rt|=2;var v=AO(),b=TO();(qt!==i||ut!==l)&&(lg=null,$u(i,l)),l=!1;var x=pn;e:do try{if(Mt!==0&&it!==null){var N=it,B=es;switch(Mt){case 8:s1(),x=6;break e;case 3:case 2:case 9:case 6:Qr.current===null&&(l=!0);var Q=Mt;if(Mt=0,es=null,qu(i,N,B,Q),d&&ju){x=0;break e}break;default:Q=Mt,Mt=0,es=null,qu(i,N,B,Q)}}KH(),x=pn;break}catch(se){xO(i,se)}while(!0);return l&&i.shellSuspendCounter++,jo=ol=null,Rt=h,$.H=v,$.A=b,it===null&&(qt=null,ut=0,Op()),x}function KH(){for(;it!==null;)RO(it)}function YH(i,l){var d=Rt;Rt|=2;var h=AO(),v=TO();qt!==i||ut!==l?(lg=null,ag=Gt()+500,$u(i,l)):ju=ro(i,l);e:do try{if(Mt!==0&&it!==null){l=it;var b=es;t:switch(Mt){case 1:Mt=0,es=null,qu(i,l,b,1);break;case 2:case 9:if(FI(b)){Mt=0,es=null,IO(l);break}l=function(){Mt!==2&&Mt!==9||qt!==i||(Mt=7),fo(i)},b.then(l,l);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:FI(b)?(Mt=0,es=null,IO(l)):(Mt=0,es=null,qu(i,l,b,7));break;case 5:var x=null;switch(it.tag){case 26:x=it.memoizedState;case 5:case 27:var N=it;if(x?pN(x):N.stateNode.complete){Mt=0,es=null;var B=N.sibling;if(B!==null)it=B;else{var Q=N.return;Q!==null?(it=Q,dg(Q)):it=null}break t}}Mt=0,es=null,qu(i,l,b,5);break;case 6:Mt=0,es=null,qu(i,l,b,6);break;case 8:s1(),pn=6;break e;default:throw Error(r(462))}}ZH();break}catch(se){xO(i,se)}while(!0);return jo=ol=null,$.H=h,$.A=v,Rt=d,it!==null?0:(qt=null,ut=0,Op(),pn)}function ZH(){for(;it!==null&&!to();)RO(it)}function RO(i){var l=Q2(i.alternate,i,Zo);i.memoizedProps=i.pendingProps,l===null?dg(i):it=l}function IO(i){var l=i,d=l.alternate;switch(l.tag){case 15:case 0:l=G2(d,l,l.pendingProps,l.type,void 0,ut);break;case 11:l=G2(d,l,l.pendingProps,l.type.render,l.ref,ut);break;case 5:S0(l);default:eO(d,l),l=it=TI(l,Zo),l=Q2(d,l,Zo)}i.memoizedProps=i.pendingProps,l===null?dg(i):it=l}function qu(i,l,d,h){jo=ol=null,S0(l),Pu=null,Bd=0;var v=l.return;try{if(FH(i,v,l,d,ut)){pn=1,Qp(i,ms(d,i.current)),it=null;return}}catch(b){if(v!==null)throw it=v,b;pn=1,Qp(i,ms(d,i.current)),it=null;return}l.flags&32768?(dt||h===1?i=!0:ju||(ut&536870912)!==0?i=!1:(Qi=i=!0,(h===2||h===9||h===3||h===6)&&(h=Qr.current,h!==null&&h.tag===13&&(h.flags|=16384))),OO(l,i)):dg(l)}function dg(i){var l=i;do{if((l.flags&32768)!==0){OO(l,Qi);return}i=l.return;var d=BH(l.alternate,l,Zo);if(d!==null){it=d;return}if(l=l.sibling,l!==null){it=l;return}it=l=i}while(l!==null);pn===0&&(pn=5)}function OO(i,l){do{var d=HH(i.alternate,i);if(d!==null){d.flags&=32767,it=d;return}if(d=i.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(i=i.sibling,i!==null)){it=i;return}it=i=d}while(i!==null);pn=6,it=null}function NO(i,l,d,h,v,b,x,N,B){i.cancelPendingCommit=null;do fg();while(Nn!==0);if((Rt&6)!==0)throw Error(r(327));if(l!==null){if(l===i.current)throw Error(r(177));if(b=l.lanes|l.childLanes,b|=Vb,vd(i,d,b,x,N,B),i===qt&&(it=qt=null,ut=0),Hu=l,ta=i,Xo=d,t1=b,n1=v,SO=h,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,e$(no,function(){return LO(),null})):(i.callbackNode=null,i.callbackPriority=0),h=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||h){h=$.T,$.T=null,v=ee.p,ee.p=2,x=Rt,Rt|=4;try{$H(i,l,d)}finally{Rt=x,ee.p=v,$.T=h}}Nn=1,MO(),PO(),kO()}}function MO(){if(Nn===1){Nn=0;var i=ta,l=Hu,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=$.T,$.T=null;var h=ee.p;ee.p=2;var v=Rt;Rt|=4;try{fO(l,i);var b=v1,x=yI(i.containerInfo),N=b.focusedElem,B=b.selectionRange;if(x!==N&&N&&N.ownerDocument&&vI(N.ownerDocument.documentElement,N)){if(B!==null&&Hb(N)){var Q=B.start,se=B.end;if(se===void 0&&(se=Q),"selectionStart"in N)N.selectionStart=Q,N.selectionEnd=Math.min(se,N.value.length);else{var ae=N.ownerDocument||document,te=ae&&ae.defaultView||window;if(te.getSelection){var re=te.getSelection(),Re=N.textContent.length,De=Math.min(B.start,Re),zt=B.end===void 0?De:Math.min(B.end,Re);!re.extend&&De>zt&&(x=zt,zt=De,De=x);var G=mI(N,De),q=mI(N,zt);if(G&&q&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==q.node||re.focusOffset!==q.offset)){var X=ae.createRange();X.setStart(G.node,G.offset),re.removeAllRanges(),De>zt?(re.addRange(X),re.extend(q.node,q.offset)):(X.setEnd(q.node,q.offset),re.addRange(X))}}}}for(ae=[],re=N;re=re.parentNode;)re.nodeType===1&&ae.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ae.length;N++){var ie=ae[N];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}xg=!!m1,v1=m1=null}finally{Rt=v,ee.p=h,$.T=d}}i.current=l,Nn=2}}function PO(){if(Nn===2){Nn=0;var i=ta,l=Hu,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=$.T,$.T=null;var h=ee.p;ee.p=2;var v=Rt;Rt|=4;try{aO(i,l.alternate,l)}finally{Rt=v,ee.p=h,$.T=d}}Nn=3}}function kO(){if(Nn===4||Nn===3){Nn=0,Tr();var i=ta,l=Hu,d=Xo,h=SO;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Nn=5:(Nn=0,Hu=ta=null,DO(i,i.pendingLanes));var v=i.pendingLanes;if(v===0&&(ea=null),Za(d),l=l.stateNode,ar&&typeof ar.onCommitFiberRoot=="function")try{ar.onCommitFiberRoot(Mi,l,void 0,(l.current.flags&128)===128)}catch{}if(h!==null){l=$.T,v=ee.p,ee.p=2,$.T=null;try{for(var b=i.onRecoverableError,x=0;x<h.length;x++){var N=h[x];b(N.value,{componentStack:N.stack})}}finally{$.T=l,ee.p=v}}(Xo&3)!==0&&fg(),fo(i),v=i.pendingLanes,(d&261930)!==0&&(v&42)!==0?i===r1?sf++:(sf=0,r1=i):sf=0,of(0)}}function DO(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,zd(l)))}function fg(){return MO(),PO(),kO(),LO()}function LO(){if(Nn!==5)return!1;var i=ta,l=t1;t1=0;var d=Za(Xo),h=$.T,v=ee.p;try{ee.p=32>d?32:d,$.T=null,d=n1,n1=null;var b=ta,x=Xo;if(Nn=0,Hu=ta=null,Xo=0,(Rt&6)!==0)throw Error(r(331));var N=Rt;if(Rt|=4,vO(b.current),pO(b,b.current,x,d),Rt=N,of(0,!1),ar&&typeof ar.onPostCommitFiberRoot=="function")try{ar.onPostCommitFiberRoot(Mi,b)}catch{}return!0}finally{ee.p=v,$.T=h,DO(i,l)}}function UO(i,l,d){l=ms(d,l),l=D0(i.stateNode,l,2),i=Ki(i,l,2),i!==null&&(Do(i,2),fo(i))}function Pt(i,l,d){if(i.tag===3)UO(i,i,d);else for(;l!==null;){if(l.tag===3){UO(l,i,d);break}else if(l.tag===1){var h=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ea===null||!ea.has(h))){i=ms(d,i),d=F2(2),h=Ki(l,d,2),h!==null&&(z2(d,h,l,i),Do(h,2),fo(h));break}}l=l.return}}function i1(i,l,d){var h=i.pingCache;if(h===null){h=i.pingCache=new GH;var v=new Set;h.set(l,v)}else v=h.get(l),v===void 0&&(v=new Set,h.set(l,v));v.has(d)||(Q0=!0,v.add(d),i=XH.bind(null,i,l,d),l.then(i,i))}function XH(i,l,d){var h=i.pingCache;h!==null&&h.delete(l),i.pingedLanes|=i.suspendedLanes&d,i.warmLanes&=~d,qt===i&&(ut&d)===d&&(pn===4||pn===3&&(ut&62914560)===ut&&300>Gt()-ig?(Rt&2)===0&&$u(i,0):J0|=d,Bu===ut&&(Bu=0)),fo(i)}function FO(i,l){l===0&&(l=Kr()),i=nl(i,l),i!==null&&(Do(i,l),fo(i))}function QH(i){var l=i.memoizedState,d=0;l!==null&&(d=l.retryLane),FO(i,d)}function JH(i,l){var d=0;switch(i.tag){case 31:case 13:var h=i.stateNode,v=i.memoizedState;v!==null&&(d=v.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(l),FO(i,d)}function e$(i,l){return Gn(i,l)}var hg=null,Wu=null,a1=!1,pg=!1,l1=!1,ra=0;function fo(i){i!==Wu&&i.next===null&&(Wu===null?hg=Wu=i:Wu=Wu.next=i),pg=!0,a1||(a1=!0,n$())}function of(i,l){if(!l1&&pg){l1=!0;do for(var d=!1,h=hg;h!==null;){if(i!==0){var v=h.pendingLanes;if(v===0)var b=0;else{var x=h.suspendedLanes,N=h.pingedLanes;b=(1<<31-Vn(42|i)+1)-1,b&=v&~(x&~N),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(d=!0,HO(h,b))}else b=ut,b=Ya(h,h===qt?b:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(b&3)===0||ro(h,b)||(d=!0,HO(h,b));h=h.next}while(d);l1=!1}}function t$(){zO()}function zO(){pg=a1=!1;var i=0;ra!==0&&f$()&&(i=ra);for(var l=Gt(),d=null,h=hg;h!==null;){var v=h.next,b=jO(h,l);b===0?(h.next=null,d===null?hg=v:d.next=v,v===null&&(Wu=d)):(d=h,(i!==0||(b&3)!==0)&&(pg=!0)),h=v}Nn!==0&&Nn!==5||of(i),ra!==0&&(ra=0)}function jO(i,l){for(var d=i.suspendedLanes,h=i.pingedLanes,v=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var x=31-Vn(b),N=1<<x,B=v[x];B===-1?((N&d)===0||(N&h)!==0)&&(v[x]=pu(N,l)):B<=l&&(i.expiredLanes|=N),b&=~N}if(l=qt,d=ut,d=Ya(i,i===l?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h=i.callbackNode,d===0||i===l&&(Mt===2||Mt===9)||i.cancelPendingCommit!==null)return h!==null&&h!==null&&Ar(h),i.callbackNode=null,i.callbackPriority=0;if((d&3)===0||ro(i,d)){if(l=d&-d,l===i.callbackPriority)return l;switch(h!==null&&Ar(h),Za(d)){case 2:case 8:d=Rr;break;case 32:d=no;break;case 268435456:d=ko;break;default:d=no}return h=BO.bind(null,i),d=Gn(d,h),i.callbackPriority=l,i.callbackNode=d,l}return h!==null&&h!==null&&Ar(h),i.callbackPriority=2,i.callbackNode=null,2}function BO(i,l){if(Nn!==0&&Nn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var d=i.callbackNode;if(fg()&&i.callbackNode!==d)return null;var h=ut;return h=Ya(i,i===qt?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h===0?null:(CO(i,h,l),jO(i,Gt()),i.callbackNode!=null&&i.callbackNode===d?BO.bind(null,i):null)}function HO(i,l){if(fg())return null;CO(i,l,!0)}function n$(){p$(function(){(Rt&6)!==0?Gn(vn,t$):zO()})}function u1(){if(ra===0){var i=Ou;i===0&&(i=ki,ki<<=1,(ki&261888)===0&&(ki=256)),ra=i}return ra}function $O(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:lr(""+i)}function qO(i,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,i.id&&d.setAttribute("form",i.id),l.parentNode.insertBefore(d,l),i=new FormData(i),d.parentNode.removeChild(d),i}function r$(i,l,d,h,v){if(l==="submit"&&d&&d.stateNode===v){var b=$O((v[nt]||null).action),x=h.submitter;x&&(l=(l=x[nt]||null)?$O(l.formAction):x.getAttribute("formAction"),l!==null&&(b=l,x=null));var N=new Ap("action","action",null,h,v);i.push({event:N,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ra!==0){var B=x?qO(v,x):new FormData(v);I0(d,{pending:!0,data:B,method:v.method,action:b},null,B)}}else typeof b=="function"&&(N.preventDefault(),B=x?qO(v,x):new FormData(v),I0(d,{pending:!0,data:B,method:v.method,action:b},b,B))},currentTarget:v}]})}}for(var c1=0;c1<Gb.length;c1++){var d1=Gb[c1],s$=d1.toLowerCase(),o$=d1[0].toUpperCase()+d1.slice(1);Us(s$,"on"+o$)}Us(EI,"onAnimationEnd"),Us(CI,"onAnimationIteration"),Us(wI,"onAnimationStart"),Us("dblclick","onDoubleClick"),Us("focusin","onFocus"),Us("focusout","onBlur"),Us(EH,"onTransitionRun"),Us(CH,"onTransitionStart"),Us(wH,"onTransitionCancel"),Us(xI,"onTransitionEnd"),zi("onMouseEnter",["mouseout","mouseover"]),zi("onMouseLeave",["mouseout","mouseover"]),zi("onPointerEnter",["pointerout","pointerover"]),zi("onPointerLeave",["pointerout","pointerover"]),Ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ds("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var af="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),i$=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(af));function WO(i,l){l=(l&4)!==0;for(var d=0;d<i.length;d++){var h=i[d],v=h.event;h=h.listeners;e:{var b=void 0;if(l)for(var x=h.length-1;0<=x;x--){var N=h[x],B=N.instance,Q=N.currentTarget;if(N=N.listener,B!==b&&v.isPropagationStopped())break e;b=N,v.currentTarget=Q;try{b(v)}catch(se){Ip(se)}v.currentTarget=null,b=B}else for(x=0;x<h.length;x++){if(N=h[x],B=N.instance,Q=N.currentTarget,N=N.listener,B!==b&&v.isPropagationStopped())break e;b=N,v.currentTarget=Q;try{b(v)}catch(se){Ip(se)}v.currentTarget=null,b=B}}}}function at(i,l){var d=l[bd];d===void 0&&(d=l[bd]=new Set);var h=i+"__bubble";d.has(h)||(GO(l,i,2,!1),d.add(h))}function f1(i,l,d){var h=0;l&&(h|=4),GO(d,i,h,l)}var gg="_reactListening"+Math.random().toString(36).slice(2);function h1(i){if(!i[gg]){i[gg]=!0,io.forEach(function(d){d!=="selectionchange"&&(i$.has(d)||f1(d,!1,i),f1(d,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[gg]||(l[gg]=!0,f1("selectionchange",!1,l))}}function GO(i,l,d,h){switch(EN(l)){case 2:var v=k$;break;case 8:v=D$;break;default:v=R1}d=v.bind(null,l,d,i),v=void 0,!Pb||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),h?v!==void 0?i.addEventListener(l,d,{capture:!0,passive:v}):i.addEventListener(l,d,!0):v!==void 0?i.addEventListener(l,d,{passive:v}):i.addEventListener(l,d,!1)}function p1(i,l,d,h,v){var b=h;if((l&1)===0&&(l&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var N=h.stateNode.containerInfo;if(N===v)break;if(x===4)for(x=h.return;x!==null;){var B=x.tag;if((B===3||B===4)&&x.stateNode.containerInfo===v)return;x=x.return}for(;N!==null;){if(x=Ui(N),x===null)return;if(B=x.tag,B===5||B===6||B===26||B===27){h=b=x;continue e}N=N.parentNode}}h=h.return}XR(function(){var Q=b,se=On(d),ae=[];e:{var te=_I.get(i);if(te!==void 0){var re=Ap,Re=i;switch(i){case"keypress":if(xp(d)===0)break e;case"keydown":case"keyup":re=JB;break;case"focusin":Re="focus",re=Ub;break;case"focusout":Re="blur",re=Ub;break;case"beforeblur":case"afterblur":re=Ub;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=eI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=BB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=nH;break;case EI:case CI:case wI:re=qB;break;case xI:re=sH;break;case"scroll":case"scrollend":re=zB;break;case"wheel":re=iH;break;case"copy":case"cut":case"paste":re=GB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=nI;break;case"toggle":case"beforetoggle":re=lH}var De=(l&4)!==0,zt=!De&&(i==="scroll"||i==="scrollend"),G=De?te!==null?te+"Capture":null:te;De=[];for(var q=Q,X;q!==null;){var ie=q;if(X=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||X===null||G===null||(ie=Rd(q,G),ie!=null&&De.push(lf(q,ie,X))),zt)break;q=q.return}0<De.length&&(te=new re(te,Re,null,d,se),ae.push({event:te,listeners:De}))}}if((l&7)===0){e:{if(te=i==="mouseover"||i==="pointerover",re=i==="mouseout"||i==="pointerout",te&&d!==yr&&(Re=d.relatedTarget||d.fromElement)&&(Ui(Re)||Re[Yr]))break e;if((re||te)&&(te=se.window===se?se:(te=se.ownerDocument)?te.defaultView||te.parentWindow:window,re?(Re=d.relatedTarget||d.toElement,re=Q,Re=Re?Ui(Re):null,Re!==null&&(zt=o(Re),De=Re.tag,Re!==zt||De!==5&&De!==27&&De!==6)&&(Re=null)):(re=null,Re=Q),re!==Re)){if(De=eI,ie="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(De=nI,ie="onPointerLeave",G="onPointerEnter",q="pointer"),zt=re==null?te:Xa(re),X=Re==null?te:Xa(Re),te=new De(ie,q+"leave",re,d,se),te.target=zt,te.relatedTarget=X,ie=null,Ui(se)===Q&&(De=new De(G,q+"enter",Re,d,se),De.target=X,De.relatedTarget=zt,ie=De),zt=ie,re&&Re)t:{for(De=a$,G=re,q=Re,X=0,ie=G;ie;ie=De(ie))X++;ie=0;for(var Pe=q;Pe;Pe=De(Pe))ie++;for(;0<X-ie;)G=De(G),X--;for(;0<ie-X;)q=De(q),ie--;for(;X--;){if(G===q||q!==null&&G===q.alternate){De=G;break t}G=De(G),q=De(q)}De=null}else De=null;re!==null&&VO(ae,te,re,De,!1),Re!==null&&zt!==null&&VO(ae,zt,Re,De,!0)}}e:{if(te=Q?Xa(Q):window,re=te.nodeName&&te.nodeName.toLowerCase(),re==="select"||re==="input"&&te.type==="file")var xt=cI;else if(lI(te))if(dI)xt=yH;else{xt=mH;var Ne=gH}else re=te.nodeName,!re||re.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?Q&&Ue(Q.elementType)&&(xt=cI):xt=vH;if(xt&&(xt=xt(i,Q))){uI(ae,xt,d,se);break e}Ne&&Ne(i,te,Q),i==="focusout"&&Q&&te.type==="number"&&Q.memoizedProps.value!=null&&ji(te,"number",te.value)}switch(Ne=Q?Xa(Q):window,i){case"focusin":(lI(Ne)||Ne.contentEditable==="true")&&(Cu=Ne,$b=Q,Ld=null);break;case"focusout":Ld=$b=Cu=null;break;case"mousedown":qb=!0;break;case"contextmenu":case"mouseup":case"dragend":qb=!1,bI(ae,d,se);break;case"selectionchange":if(SH)break;case"keydown":case"keyup":bI(ae,d,se)}var Je;if(zb)e:{switch(i){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else Eu?iI(i,d)&&(ct="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(ct="onCompositionStart");ct&&(rI&&d.locale!=="ko"&&(Eu||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&Eu&&(Je=QR()):(Bi=se,kb="value"in Bi?Bi.value:Bi.textContent,Eu=!0)),Ne=mg(Q,ct),0<Ne.length&&(ct=new tI(ct,i,null,d,se),ae.push({event:ct,listeners:Ne}),Je?ct.data=Je:(Je=aI(d),Je!==null&&(ct.data=Je)))),(Je=cH?dH(i,d):fH(i,d))&&(ct=mg(Q,"onBeforeInput"),0<ct.length&&(Ne=new tI("onBeforeInput","beforeinput",null,d,se),ae.push({event:Ne,listeners:ct}),Ne.data=Je)),r$(ae,i,Q,d,se)}WO(ae,l)})}function lf(i,l,d){return{instance:i,listener:l,currentTarget:d}}function mg(i,l){for(var d=l+"Capture",h=[];i!==null;){var v=i,b=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||b===null||(v=Rd(i,d),v!=null&&h.unshift(lf(i,v,b)),v=Rd(i,l),v!=null&&h.push(lf(i,v,b))),i.tag===3)return h;i=i.return}return[]}function a$(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function VO(i,l,d,h,v){for(var b=l._reactName,x=[];d!==null&&d!==h;){var N=d,B=N.alternate,Q=N.stateNode;if(N=N.tag,B!==null&&B===h)break;N!==5&&N!==26&&N!==27||Q===null||(B=Q,v?(Q=Rd(d,b),Q!=null&&x.unshift(lf(d,Q,B))):v||(Q=Rd(d,b),Q!=null&&x.push(lf(d,Q,B)))),d=d.return}x.length!==0&&i.push({event:l,listeners:x})}var l$=/\r\n?/g,u$=/\u0000|\uFFFD/g;function KO(i){return(typeof i=="string"?i:""+i).replace(l$,`
|
|
224
|
-
`).replace(u$,"")}function YO(i,l){return l=KO(l),KO(i)===l}function Ft(i,l,d,h,v,b){switch(d){case"children":typeof h=="string"?l==="body"||l==="textarea"&&h===""||Z(i,h):(typeof h=="number"||typeof h=="bigint")&&l!=="body"&&Z(i,""+h);break;case"className":Ls(i,"class",h);break;case"tabIndex":Ls(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Ls(i,d,h);break;case"style":ke(i,h,b);break;case"data":if(l!=="object"){Ls(i,"data",h);break}case"src":case"href":if(h===""&&(l!=="a"||d!=="href")){i.removeAttribute(d);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(d);break}h=lr(""+h),i.setAttribute(d,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(d==="formAction"?(l!=="input"&&Ft(i,l,"name",v.name,v,null),Ft(i,l,"formEncType",v.formEncType,v,null),Ft(i,l,"formMethod",v.formMethod,v,null),Ft(i,l,"formTarget",v.formTarget,v,null)):(Ft(i,l,"encType",v.encType,v,null),Ft(i,l,"method",v.method,v,null),Ft(i,l,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(d);break}h=lr(""+h),i.setAttribute(d,h);break;case"onClick":h!=null&&(i.onclick=tn);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}d=lr(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,""+h):i.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,""):i.removeAttribute(d);break;case"capture":case"download":h===!0?i.setAttribute(d,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,h):i.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(d,h):i.removeAttribute(d);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(d):i.setAttribute(d,h);break;case"popover":at("beforetoggle",i),at("toggle",i),Lo(i,"popover",h);break;case"xlinkActuate":vr(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":vr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":vr(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":vr(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":vr(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":vr(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":vr(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":vr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":vr(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Lo(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=en.get(d)||d,Lo(i,d,h))}}function g1(i,l,d,h,v,b){switch(d){case"style":ke(i,h,b);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"children":typeof h=="string"?Z(i,h):(typeof h=="number"||typeof h=="bigint")&&Z(i,""+h);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"onClick":h!=null&&(i.onclick=tn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bp.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(v=d.endsWith("Capture"),l=d.slice(2,v?d.length-7:void 0),b=i[nt]||null,b=b!=null?b[d]:null,typeof b=="function"&&i.removeEventListener(l,b,v),typeof h=="function")){typeof b!="function"&&b!==null&&(d in i?i[d]=null:i.hasAttribute(d)&&i.removeAttribute(d)),i.addEventListener(l,h,v);break e}d in i?i[d]=h:h===!0?i.setAttribute(d,""):Lo(i,d,h)}}}function Xn(i,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",i),at("load",i);var h=!1,v=!1,b;for(b in d)if(d.hasOwnProperty(b)){var x=d[b];if(x!=null)switch(b){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ft(i,l,b,x,d,null)}}v&&Ft(i,l,"srcSet",d.srcSet,d,null),h&&Ft(i,l,"src",d.src,d,null);return;case"input":at("invalid",i);var N=b=x=v=null,B=null,Q=null;for(h in d)if(d.hasOwnProperty(h)){var se=d[h];if(se!=null)switch(h){case"name":v=se;break;case"type":x=se;break;case"checked":B=se;break;case"defaultChecked":Q=se;break;case"value":b=se;break;case"defaultValue":N=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,l));break;default:Ft(i,l,h,se,d,null)}}Td(i,b,N,B,Q,x,v,!1);return;case"select":at("invalid",i),h=x=b=null;for(v in d)if(d.hasOwnProperty(v)&&(N=d[v],N!=null))switch(v){case"value":b=N;break;case"defaultValue":x=N;break;case"multiple":h=N;default:Ft(i,l,v,N,d,null)}l=b,d=x,i.multiple=!!h,l!=null?ao(i,!!h,l,!1):d!=null&&ao(i,!!h,d,!0);return;case"textarea":at("invalid",i),b=v=h=null;for(x in d)if(d.hasOwnProperty(x)&&(N=d[x],N!=null))switch(x){case"value":h=N;break;case"defaultValue":v=N;break;case"children":b=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:Ft(i,l,x,N,d,null)}U(i,h,v,b);return;case"option":for(B in d)d.hasOwnProperty(B)&&(h=d[B],h!=null)&&(B==="selected"?i.selected=h&&typeof h!="function"&&typeof h!="symbol":Ft(i,l,B,h,d,null));return;case"dialog":at("beforetoggle",i),at("toggle",i),at("cancel",i),at("close",i);break;case"iframe":case"object":at("load",i);break;case"video":case"audio":for(h=0;h<af.length;h++)at(af[h],i);break;case"image":at("error",i),at("load",i);break;case"details":at("toggle",i);break;case"embed":case"source":case"link":at("error",i),at("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in d)if(d.hasOwnProperty(Q)&&(h=d[Q],h!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ft(i,l,Q,h,d,null)}return;default:if(Ue(l)){for(se in d)d.hasOwnProperty(se)&&(h=d[se],h!==void 0&&g1(i,l,se,h,d,void 0));return}}for(N in d)d.hasOwnProperty(N)&&(h=d[N],h!=null&&Ft(i,l,N,h,d,null))}function c$(i,l,d,h){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,b=null,x=null,N=null,B=null,Q=null,se=null;for(re in d){var ae=d[re];if(d.hasOwnProperty(re)&&ae!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":B=ae;default:h.hasOwnProperty(re)||Ft(i,l,re,null,h,ae)}}for(var te in h){var re=h[te];if(ae=d[te],h.hasOwnProperty(te)&&(re!=null||ae!=null))switch(te){case"type":b=re;break;case"name":v=re;break;case"checked":Q=re;break;case"defaultChecked":se=re;break;case"value":x=re;break;case"defaultValue":N=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,l));break;default:re!==ae&&Ft(i,l,te,re,h,ae)}}Ad(i,x,N,B,Q,se,b,v);return;case"select":re=x=N=te=null;for(b in d)if(B=d[b],d.hasOwnProperty(b)&&B!=null)switch(b){case"value":break;case"multiple":re=B;default:h.hasOwnProperty(b)||Ft(i,l,b,null,h,B)}for(v in h)if(b=h[v],B=d[v],h.hasOwnProperty(v)&&(b!=null||B!=null))switch(v){case"value":te=b;break;case"defaultValue":N=b;break;case"multiple":x=b;default:b!==B&&Ft(i,l,v,b,h,B)}l=N,d=x,h=re,te!=null?ao(i,!!d,te,!1):!!h!=!!d&&(l!=null?ao(i,!!d,l,!0):ao(i,!!d,d?[]:"",!1));return;case"textarea":re=te=null;for(N in d)if(v=d[N],d.hasOwnProperty(N)&&v!=null&&!h.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Ft(i,l,N,null,h,v)}for(x in h)if(v=h[x],b=d[x],h.hasOwnProperty(x)&&(v!=null||b!=null))switch(x){case"value":te=v;break;case"defaultValue":re=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==b&&Ft(i,l,x,v,h,b)}pe(i,te,re);return;case"option":for(var Re in d)te=d[Re],d.hasOwnProperty(Re)&&te!=null&&!h.hasOwnProperty(Re)&&(Re==="selected"?i.selected=!1:Ft(i,l,Re,null,h,te));for(B in h)te=h[B],re=d[B],h.hasOwnProperty(B)&&te!==re&&(te!=null||re!=null)&&(B==="selected"?i.selected=te&&typeof te!="function"&&typeof te!="symbol":Ft(i,l,B,te,h,re));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var De in d)te=d[De],d.hasOwnProperty(De)&&te!=null&&!h.hasOwnProperty(De)&&Ft(i,l,De,null,h,te);for(Q in h)if(te=h[Q],re=d[Q],h.hasOwnProperty(Q)&&te!==re&&(te!=null||re!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,l));break;default:Ft(i,l,Q,te,h,re)}return;default:if(Ue(l)){for(var zt in d)te=d[zt],d.hasOwnProperty(zt)&&te!==void 0&&!h.hasOwnProperty(zt)&&g1(i,l,zt,void 0,h,te);for(se in h)te=h[se],re=d[se],!h.hasOwnProperty(se)||te===re||te===void 0&&re===void 0||g1(i,l,se,te,h,re);return}}for(var G in d)te=d[G],d.hasOwnProperty(G)&&te!=null&&!h.hasOwnProperty(G)&&Ft(i,l,G,null,h,te);for(ae in h)te=h[ae],re=d[ae],!h.hasOwnProperty(ae)||te===re||te==null&&re==null||Ft(i,l,ae,te,h,re)}function ZO(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function d$(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,d=performance.getEntriesByType("resource"),h=0;h<d.length;h++){var v=d[h],b=v.transferSize,x=v.initiatorType,N=v.duration;if(b&&N&&ZO(x)){for(x=0,N=v.responseEnd,h+=1;h<d.length;h++){var B=d[h],Q=B.startTime;if(Q>N)break;var se=B.transferSize,ae=B.initiatorType;se&&ZO(ae)&&(B=B.responseEnd,x+=se*(B<N?1:(N-Q)/(B-Q)))}if(--h,l+=8*(b+x)/(v.duration/1e3),i++,10<i)break}}if(0<i)return l/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var m1=null,v1=null;function vg(i){return i.nodeType===9?i:i.ownerDocument}function XO(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function QO(i,l){if(i===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&l==="foreignObject"?0:i}function y1(i,l){return i==="textarea"||i==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var b1=null;function f$(){var i=window.event;return i&&i.type==="popstate"?i===b1?!1:(b1=i,!0):(b1=null,!1)}var JO=typeof setTimeout=="function"?setTimeout:void 0,h$=typeof clearTimeout=="function"?clearTimeout:void 0,eN=typeof Promise=="function"?Promise:void 0,p$=typeof queueMicrotask=="function"?queueMicrotask:typeof eN<"u"?function(i){return eN.resolve(null).then(i).catch(g$)}:JO;function g$(i){setTimeout(function(){throw i})}function sa(i){return i==="head"}function tN(i,l){var d=l,h=0;do{var v=d.nextSibling;if(i.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"||d==="/&"){if(h===0){i.removeChild(v),Yu(l);return}h--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")h++;else if(d==="html")uf(i.ownerDocument.documentElement);else if(d==="head"){d=i.ownerDocument.head,uf(d);for(var b=d.firstChild;b;){var x=b.nextSibling,N=b.nodeName;b[Li]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&b.rel.toLowerCase()==="stylesheet"||d.removeChild(b),b=x}}else d==="body"&&uf(i.ownerDocument.body);d=v}while(d);Yu(l)}function nN(i,l){var d=i;i=0;do{var h=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),h&&h.nodeType===8)if(d=h.data,d==="/$"){if(i===0)break;i--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||i++;d=h}while(d)}function S1(i){var l=i.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":S1(d),Cd(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}i.removeChild(d)}}function m$(i,l,d,h){for(;i.nodeType===1;){var v=d;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[Li])switch(l){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==v.rel||i.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||i.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||i.getAttribute("title")!==(v.title==null?null:v.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(b=i.getAttribute("src"),(b!==(v.src==null?null:v.src)||i.getAttribute("type")!==(v.type==null?null:v.type)||i.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(l==="input"&&i.type==="hidden"){var b=v.name==null?null:""+v.name;if(v.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=Es(i.nextSibling),i===null)break}return null}function v$(i,l,d){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!d||(i=Es(i.nextSibling),i===null))return null;return i}function rN(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Es(i.nextSibling),i===null))return null;return i}function E1(i){return i.data==="$?"||i.data==="$~"}function C1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function y$(i,l){var d=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||d.readyState!=="loading")l();else{var h=function(){l(),d.removeEventListener("DOMContentLoaded",h)};d.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}function Es(i){for(;i!=null;i=i.nextSibling){var l=i.nodeType;if(l===1||l===3)break;if(l===8){if(l=i.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return i}var w1=null;function sN(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"||d==="/&"){if(l===0)return Es(i.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}i=i.nextSibling}return null}function oN(i){i=i.previousSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return i;l--}else d!=="/$"&&d!=="/&"||l++}i=i.previousSibling}return null}function iN(i,l,d){switch(l=vg(d),i){case"html":if(i=l.documentElement,!i)throw Error(r(452));return i;case"head":if(i=l.head,!i)throw Error(r(453));return i;case"body":if(i=l.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function uf(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);Cd(i)}var Cs=new Map,aN=new Set;function yg(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Qo=ee.d;ee.d={f:b$,r:S$,D:E$,C:C$,L:w$,m:x$,X:A$,S:_$,M:T$};function b$(){var i=Qo.f(),l=ug();return i||l}function S$(i){var l=Fi(i);l!==null&&l.tag===5&&l.type==="form"?x2(l):Qo.r(i)}var Gu=typeof document>"u"?null:document;function lN(i,l,d){var h=Gu;if(h&&typeof l=="string"&&l){var v=Ir(l);v='link[rel="'+i+'"][href="'+v+'"]',typeof d=="string"&&(v+='[crossorigin="'+d+'"]'),aN.has(v)||(aN.add(v),i={rel:i,crossOrigin:d,href:l},h.querySelector(v)===null&&(l=h.createElement("link"),Xn(l,"link",i),an(l),h.head.appendChild(l)))}}function E$(i){Qo.D(i),lN("dns-prefetch",i,null)}function C$(i,l){Qo.C(i,l),lN("preconnect",i,l)}function w$(i,l,d){Qo.L(i,l,d);var h=Gu;if(h&&i&&l){var v='link[rel="preload"][as="'+Ir(l)+'"]';l==="image"&&d&&d.imageSrcSet?(v+='[imagesrcset="'+Ir(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(v+='[imagesizes="'+Ir(d.imageSizes)+'"]')):v+='[href="'+Ir(i)+'"]';var b=v;switch(l){case"style":b=Vu(i);break;case"script":b=Ku(i)}Cs.has(b)||(i=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),Cs.set(b,i),h.querySelector(v)!==null||l==="style"&&h.querySelector(cf(b))||l==="script"&&h.querySelector(df(b))||(l=h.createElement("link"),Xn(l,"link",i),an(l),h.head.appendChild(l)))}}function x$(i,l){Qo.m(i,l);var d=Gu;if(d&&i){var h=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+Ir(h)+'"][href="'+Ir(i)+'"]',b=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Ku(i)}if(!Cs.has(b)&&(i=g({rel:"modulepreload",href:i},l),Cs.set(b,i),d.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(df(b)))return}h=d.createElement("link"),Xn(h,"link",i),an(h),d.head.appendChild(h)}}}function _$(i,l,d){Qo.S(i,l,d);var h=Gu;if(h&&i){var v=mr(h).hoistableStyles,b=Vu(i);l=l||"default";var x=v.get(b);if(!x){var N={loading:0,preload:null};if(x=h.querySelector(cf(b)))N.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":l},d),(d=Cs.get(b))&&x1(i,d);var B=x=h.createElement("link");an(B),Xn(B,"link",i),B._p=new Promise(function(Q,se){B.onload=Q,B.onerror=se}),B.addEventListener("load",function(){N.loading|=1}),B.addEventListener("error",function(){N.loading|=2}),N.loading|=4,bg(x,l,h)}x={type:"stylesheet",instance:x,count:1,state:N},v.set(b,x)}}}function A$(i,l){Qo.X(i,l);var d=Gu;if(d&&i){var h=mr(d).hoistableScripts,v=Ku(i),b=h.get(v);b||(b=d.querySelector(df(v)),b||(i=g({src:i,async:!0},l),(l=Cs.get(v))&&_1(i,l),b=d.createElement("script"),an(b),Xn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function T$(i,l){Qo.M(i,l);var d=Gu;if(d&&i){var h=mr(d).hoistableScripts,v=Ku(i),b=h.get(v);b||(b=d.querySelector(df(v)),b||(i=g({src:i,async:!0,type:"module"},l),(l=Cs.get(v))&&_1(i,l),b=d.createElement("script"),an(b),Xn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function uN(i,l,d,h){var v=(v=he.current)?yg(v):null;if(!v)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Vu(d.href),d=mr(v).hoistableStyles,h=d.get(l),h||(h={type:"style",instance:null,count:0,state:null},d.set(l,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){i=Vu(d.href);var b=mr(v).hoistableStyles,x=b.get(i);if(x||(v=v.ownerDocument||v,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,x),(b=v.querySelector(cf(i)))&&!b._p&&(x.instance=b,x.state.loading=5),Cs.has(i)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Cs.set(i,d),b||R$(v,i,d,x.state))),l&&h===null)throw Error(r(528,""));return x}if(l&&h!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Ku(d),d=mr(v).hoistableScripts,h=d.get(l),h||(h={type:"script",instance:null,count:0,state:null},d.set(l,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Vu(i){return'href="'+Ir(i)+'"'}function cf(i){return'link[rel="stylesheet"]['+i+"]"}function cN(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function R$(i,l,d,h){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?h.loading=1:(l=i.createElement("link"),h.preload=l,l.addEventListener("load",function(){return h.loading|=1}),l.addEventListener("error",function(){return h.loading|=2}),Xn(l,"link",d),an(l),i.head.appendChild(l))}function Ku(i){return'[src="'+Ir(i)+'"]'}function df(i){return"script[async]"+i}function dN(i,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var h=i.querySelector('style[data-href~="'+Ir(d.href)+'"]');if(h)return l.instance=h,an(h),h;var v=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),an(h),Xn(h,"style",v),bg(h,d.precedence,i),l.instance=h;case"stylesheet":v=Vu(d.href);var b=i.querySelector(cf(v));if(b)return l.state.loading|=4,l.instance=b,an(b),b;h=cN(d),(v=Cs.get(v))&&x1(h,v),b=(i.ownerDocument||i).createElement("link"),an(b);var x=b;return x._p=new Promise(function(N,B){x.onload=N,x.onerror=B}),Xn(b,"link",h),l.state.loading|=4,bg(b,d.precedence,i),l.instance=b;case"script":return b=Ku(d.src),(v=i.querySelector(df(b)))?(l.instance=v,an(v),v):(h=d,(v=Cs.get(b))&&(h=g({},d),_1(h,v)),i=i.ownerDocument||i,v=i.createElement("script"),an(v),Xn(v,"link",h),i.head.appendChild(v),l.instance=v);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(h=l.instance,l.state.loading|=4,bg(h,d.precedence,i));return l.instance}function bg(i,l,d){for(var h=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,b=v,x=0;x<h.length;x++){var N=h[x];if(N.dataset.precedence===l)b=N;else if(b!==v)break}b?b.parentNode.insertBefore(i,b.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(i,l.firstChild))}function x1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function _1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var Sg=null;function fN(i,l,d){if(Sg===null){var h=new Map,v=Sg=new Map;v.set(d,h)}else v=Sg,h=v.get(d),h||(h=new Map,v.set(d,h));if(h.has(i))return h;for(h.set(i,null),d=d.getElementsByTagName(i),v=0;v<d.length;v++){var b=d[v];if(!(b[Li]||b[In]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var x=b.getAttribute(l)||"";x=i+x;var N=h.get(x);N?N.push(b):h.set(x,[b])}}return h}function hN(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function I$(i,l,d){if(d===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(i=l.disabled,typeof l.precedence=="string"&&i==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function pN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function O$(i,l,d,h){if(d.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var v=Vu(h.href),b=l.querySelector(cf(v));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=Eg.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=b,an(b);return}b=l.ownerDocument||l,h=cN(h),(v=Cs.get(v))&&x1(h,v),b=b.createElement("link"),an(b);var x=b;x._p=new Promise(function(N,B){x.onload=N,x.onerror=B}),Xn(b,"link",h),d.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(i.count++,d=Eg.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var A1=0;function N$(i,l){return i.stylesheets&&i.count===0&&wg(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var h=setTimeout(function(){if(i.stylesheets&&wg(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+l);0<i.imgBytes&&A1===0&&(A1=62500*d$());var v=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&wg(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>A1?50:800)+l);return i.unsuspend=d,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Eg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wg(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Cg=null;function wg(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Cg=new Map,l.forEach(M$,i),Cg=null,Eg.call(i))}function M$(i,l){if(!(l.state.loading&4)){var d=Cg.get(i);if(d)var h=d.get(null);else{d=new Map,Cg.set(i,d);for(var v=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var x=v[b];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(d.set(x.dataset.precedence,x),h=x)}h&&d.set(null,h)}v=l.instance,x=v.getAttribute("data-precedence"),b=d.get(x)||h,b===h&&d.set(null,v),d.set(x,v),this.count++,h=Eg.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),b?b.parentNode.insertBefore(v,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(v,i.firstChild)),l.state.loading|=4}}var ff={$$typeof:T,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function P$(i,l,d,h,v,b,x,N,B){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=so(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=so(0),this.hiddenUpdates=so(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function gN(i,l,d,h,v,b,x,N,B,Q,se,ae){return i=new P$(i,l,d,x,B,Q,se,ae,N),l=1,b===!0&&(l|=24),b=Xr(3,null,null,l),i.current=b,b.stateNode=i,l=o0(),l.refCount++,i.pooledCache=l,l.refCount++,b.memoizedState={element:h,isDehydrated:d,cache:l},u0(b),i}function mN(i){return i?(i=_u,i):_u}function vN(i,l,d,h,v,b){v=mN(v),h.context===null?h.context=v:h.pendingContext=v,h=Vi(l),h.payload={element:d},b=b===void 0?null:b,b!==null&&(h.callback=b),d=Ki(i,h,l),d!==null&&(Dr(d,i,l),$d(d,i,l))}function yN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function T1(i,l){yN(i,l),(i=i.alternate)&&yN(i,l)}function bN(i){if(i.tag===13||i.tag===31){var l=nl(i,67108864);l!==null&&Dr(l,i,67108864),T1(i,67108864)}}function SN(i){if(i.tag===13||i.tag===31){var l=ns();l=mu(l);var d=nl(i,l);d!==null&&Dr(d,i,l),T1(i,l)}}var xg=!0;function k$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=2,R1(i,l,d,h)}finally{ee.p=b,$.T=v}}function D$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=8,R1(i,l,d,h)}finally{ee.p=b,$.T=v}}function R1(i,l,d,h){if(xg){var v=I1(h);if(v===null)p1(i,l,h,_g,d),CN(i,h);else if(U$(v,i,l,d,h))h.stopPropagation();else if(CN(i,h),l&4&&-1<L$.indexOf(i)){for(;v!==null;){var b=Fi(v);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var x=ks(b.pendingLanes);if(x!==0){var N=b;for(N.pendingLanes|=2,N.entangledLanes|=2;x;){var B=1<<31-Vn(x);N.entanglements[1]|=B,x&=~B}fo(b),(Rt&6)===0&&(ag=Gt()+500,of(0))}}break;case 31:case 13:N=nl(b,2),N!==null&&Dr(N,b,2),ug(),T1(b,2)}if(b=I1(h),b===null&&p1(i,l,h,_g,d),b===v)break;v=b}v!==null&&h.stopPropagation()}else p1(i,l,h,null,d)}}function I1(i){return i=On(i),O1(i)}var _g=null;function O1(i){if(_g=null,i=Ui(i),i!==null){var l=o(i);if(l===null)i=null;else{var d=l.tag;if(d===13){if(i=a(l),i!==null)return i;i=null}else if(d===31){if(i=u(l),i!==null)return i;i=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;i=null}else l!==i&&(i=null)}}return _g=i,null}function EN(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(gt()){case vn:return 2;case Rr:return 8;case no:case gd:return 32;case ko:return 268435456;default:return 32}default:return 32}}var N1=!1,oa=null,ia=null,aa=null,hf=new Map,pf=new Map,la=[],L$="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function CN(i,l){switch(i){case"focusin":case"focusout":oa=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":hf.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":pf.delete(l.pointerId)}}function gf(i,l,d,h,v,b){return i===null||i.nativeEvent!==b?(i={blockedOn:l,domEventName:d,eventSystemFlags:h,nativeEvent:b,targetContainers:[v]},l!==null&&(l=Fi(l),l!==null&&bN(l)),i):(i.eventSystemFlags|=h,l=i.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),i)}function U$(i,l,d,h,v){switch(l){case"focusin":return oa=gf(oa,i,l,d,h,v),!0;case"dragenter":return ia=gf(ia,i,l,d,h,v),!0;case"mouseover":return aa=gf(aa,i,l,d,h,v),!0;case"pointerover":var b=v.pointerId;return hf.set(b,gf(hf.get(b)||null,i,l,d,h,v)),!0;case"gotpointercapture":return b=v.pointerId,pf.set(b,gf(pf.get(b)||null,i,l,d,h,v)),!0}return!1}function wN(i){var l=Ui(i.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){i.blockedOn=l,Di(i.priority,function(){SN(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,Di(i.priority,function(){SN(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){i.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Ag(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var d=I1(i.nativeEvent);if(d===null){d=i.nativeEvent;var h=new d.constructor(d.type,d);yr=h,d.target.dispatchEvent(h),yr=null}else return l=Fi(d),l!==null&&bN(l),i.blockedOn=d,!1;l.shift()}return!0}function xN(i,l,d){Ag(i)&&d.delete(l)}function F$(){N1=!1,oa!==null&&Ag(oa)&&(oa=null),ia!==null&&Ag(ia)&&(ia=null),aa!==null&&Ag(aa)&&(aa=null),hf.forEach(xN),pf.forEach(xN)}function Tg(i,l){i.blockedOn===l&&(i.blockedOn=null,N1||(N1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,F$)))}var Rg=null;function _N(i){Rg!==i&&(Rg=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Rg===i&&(Rg=null);for(var l=0;l<i.length;l+=3){var d=i[l],h=i[l+1],v=i[l+2];if(typeof h!="function"){if(O1(h||d)===null)continue;break}var b=Fi(d);b!==null&&(i.splice(l,3),l-=3,I0(b,{pending:!0,data:v,method:d.method,action:h},h,v))}}))}function Yu(i){function l(B){return Tg(B,i)}oa!==null&&Tg(oa,i),ia!==null&&Tg(ia,i),aa!==null&&Tg(aa,i),hf.forEach(l),pf.forEach(l);for(var d=0;d<la.length;d++){var h=la[d];h.blockedOn===i&&(h.blockedOn=null)}for(;0<la.length&&(d=la[0],d.blockedOn===null);)wN(d),d.blockedOn===null&&la.shift();if(d=(i.ownerDocument||i).$$reactFormReplay,d!=null)for(h=0;h<d.length;h+=3){var v=d[h],b=d[h+1],x=v[nt]||null;if(typeof b=="function")x||_N(d);else if(x){var N=null;if(b&&b.hasAttribute("formAction")){if(v=b,x=b[nt]||null)N=x.formAction;else if(O1(v)!==null)continue}else N=x.action;typeof N=="function"?d[h+1]=N:(d.splice(h,3),h-=3),_N(d)}}}function AN(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(x){return v=x})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),h||setTimeout(d,20)}function d(){if(!h&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){h=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function M1(i){this._internalRoot=i}Ig.prototype.render=M1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,h=ns();vN(d,h,i,l,null,null)},Ig.prototype.unmount=M1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;vN(i.current,2,null,i,null,null),ug(),l[Yr]=null}};function Ig(i){this._internalRoot=i}Ig.prototype.unstable_scheduleHydration=function(i){if(i){var l=vp();i={blockedOn:null,target:i,priority:l};for(var d=0;d<la.length&&l!==0&&l<la[d].priority;d++);la.splice(d,0,i),d===0&&wN(i)}};var TN=e.version;if(TN!=="19.2.7")throw Error(r(527,TN,"19.2.7"));ee.findDOMNode=function(i){var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(l),i=i!==null?p(i):null,i=i===null?null:i.stateNode,i};var z$={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Og=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Og.isDisabled&&Og.supportsFiber)try{Mi=Og.inject(z$),ar=Og}catch{}}return kf.createRoot=function(i,l){if(!s(i))throw Error(r(299));var d=!1,h="",v=k2,b=D2,x=L2;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),l=gN(i,1,!1,null,null,d,h,null,v,b,x,AN),i[Yr]=l.current,h1(i),new M1(l)},kf.hydrateRoot=function(i,l,d){if(!s(i))throw Error(r(299));var h=!1,v="",b=k2,x=D2,N=L2,B=null;return d!=null&&(d.unstable_strictMode===!0&&(h=!0),d.identifierPrefix!==void 0&&(v=d.identifierPrefix),d.onUncaughtError!==void 0&&(b=d.onUncaughtError),d.onCaughtError!==void 0&&(x=d.onCaughtError),d.onRecoverableError!==void 0&&(N=d.onRecoverableError),d.formState!==void 0&&(B=d.formState)),l=gN(i,1,!0,l,d??null,h,v,B,b,x,N,AN),l.context=mN(null),d=l.current,h=ns(),h=mu(h),v=Vi(h),v.callback=null,Ki(d,v,h),d=h,l.current.lanes=d,Do(l,d),fo(l),i[Yr]=l.current,h1(i),new Ig(l)},kf.version="19.2.7",kf}var gU;function Bpe(){if(gU)return Gw.exports;gU=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Gw.exports=jpe(),Gw.exports}var Hpe=Bpe();const $pe={bodySerializer:t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString():n)},qpe=({onRequest:t,onSseError:e,onSseEvent:n,responseTransformer:r,responseValidator:s,sseDefaultRetryDelay:o,sseMaxRetryAttempts:a,sseMaxRetryDelay:u,sseSleepFn:c,url:f,...p})=>{let g;const m=c??(E=>new Promise(C=>setTimeout(C,E)));return{stream:async function*(){let E=o??3e3,C=0;const w=p.signal??new AbortController().signal;for(;!w.aborted;){C++;const _=p.headers instanceof Headers?p.headers:new Headers(p.headers);g!==void 0&&_.set("Last-Event-ID",g);try{const T={redirect:"follow",...p,body:p.serializedBody,headers:_,signal:w};let R=new Request(f,T);t&&(R=await t(f,T));const O=await(p.fetch??globalThis.fetch)(R);if(!O.ok)throw new Error(`SSE failed: ${O.status} ${O.statusText}`);if(!O.body)throw new Error("No body in SSE response");const I=O.body.pipeThrough(new TextDecoderStream).getReader();let P="";const k=()=>{try{I.cancel()}catch{}};w.addEventListener("abort",k);try{for(;;){const{done:H,value:F}=await I.read();if(H)break;P+=F,P=P.replace(/\r\n/g,`
|
|
224
|
+
`).replace(u$,"")}function YO(i,l){return l=KO(l),KO(i)===l}function Ft(i,l,d,h,v,b){switch(d){case"children":typeof h=="string"?l==="body"||l==="textarea"&&h===""||Z(i,h):(typeof h=="number"||typeof h=="bigint")&&l!=="body"&&Z(i,""+h);break;case"className":Ls(i,"class",h);break;case"tabIndex":Ls(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Ls(i,d,h);break;case"style":ke(i,h,b);break;case"data":if(l!=="object"){Ls(i,"data",h);break}case"src":case"href":if(h===""&&(l!=="a"||d!=="href")){i.removeAttribute(d);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(d);break}h=lr(""+h),i.setAttribute(d,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(d==="formAction"?(l!=="input"&&Ft(i,l,"name",v.name,v,null),Ft(i,l,"formEncType",v.formEncType,v,null),Ft(i,l,"formMethod",v.formMethod,v,null),Ft(i,l,"formTarget",v.formTarget,v,null)):(Ft(i,l,"encType",v.encType,v,null),Ft(i,l,"method",v.method,v,null),Ft(i,l,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(d);break}h=lr(""+h),i.setAttribute(d,h);break;case"onClick":h!=null&&(i.onclick=tn);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}d=lr(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,""+h):i.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,""):i.removeAttribute(d);break;case"capture":case"download":h===!0?i.setAttribute(d,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,h):i.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(d,h):i.removeAttribute(d);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(d):i.setAttribute(d,h);break;case"popover":at("beforetoggle",i),at("toggle",i),Lo(i,"popover",h);break;case"xlinkActuate":vr(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":vr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":vr(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":vr(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":vr(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":vr(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":vr(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":vr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":vr(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Lo(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=en.get(d)||d,Lo(i,d,h))}}function g1(i,l,d,h,v,b){switch(d){case"style":ke(i,h,b);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"children":typeof h=="string"?Z(i,h):(typeof h=="number"||typeof h=="bigint")&&Z(i,""+h);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"onClick":h!=null&&(i.onclick=tn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bp.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(v=d.endsWith("Capture"),l=d.slice(2,v?d.length-7:void 0),b=i[nt]||null,b=b!=null?b[d]:null,typeof b=="function"&&i.removeEventListener(l,b,v),typeof h=="function")){typeof b!="function"&&b!==null&&(d in i?i[d]=null:i.hasAttribute(d)&&i.removeAttribute(d)),i.addEventListener(l,h,v);break e}d in i?i[d]=h:h===!0?i.setAttribute(d,""):Lo(i,d,h)}}}function Xn(i,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",i),at("load",i);var h=!1,v=!1,b;for(b in d)if(d.hasOwnProperty(b)){var x=d[b];if(x!=null)switch(b){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ft(i,l,b,x,d,null)}}v&&Ft(i,l,"srcSet",d.srcSet,d,null),h&&Ft(i,l,"src",d.src,d,null);return;case"input":at("invalid",i);var N=b=x=v=null,B=null,Q=null;for(h in d)if(d.hasOwnProperty(h)){var se=d[h];if(se!=null)switch(h){case"name":v=se;break;case"type":x=se;break;case"checked":B=se;break;case"defaultChecked":Q=se;break;case"value":b=se;break;case"defaultValue":N=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,l));break;default:Ft(i,l,h,se,d,null)}}Td(i,b,N,B,Q,x,v,!1);return;case"select":at("invalid",i),h=x=b=null;for(v in d)if(d.hasOwnProperty(v)&&(N=d[v],N!=null))switch(v){case"value":b=N;break;case"defaultValue":x=N;break;case"multiple":h=N;default:Ft(i,l,v,N,d,null)}l=b,d=x,i.multiple=!!h,l!=null?ao(i,!!h,l,!1):d!=null&&ao(i,!!h,d,!0);return;case"textarea":at("invalid",i),b=v=h=null;for(x in d)if(d.hasOwnProperty(x)&&(N=d[x],N!=null))switch(x){case"value":h=N;break;case"defaultValue":v=N;break;case"children":b=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:Ft(i,l,x,N,d,null)}U(i,h,v,b);return;case"option":for(B in d)d.hasOwnProperty(B)&&(h=d[B],h!=null)&&(B==="selected"?i.selected=h&&typeof h!="function"&&typeof h!="symbol":Ft(i,l,B,h,d,null));return;case"dialog":at("beforetoggle",i),at("toggle",i),at("cancel",i),at("close",i);break;case"iframe":case"object":at("load",i);break;case"video":case"audio":for(h=0;h<af.length;h++)at(af[h],i);break;case"image":at("error",i),at("load",i);break;case"details":at("toggle",i);break;case"embed":case"source":case"link":at("error",i),at("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in d)if(d.hasOwnProperty(Q)&&(h=d[Q],h!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ft(i,l,Q,h,d,null)}return;default:if(Ue(l)){for(se in d)d.hasOwnProperty(se)&&(h=d[se],h!==void 0&&g1(i,l,se,h,d,void 0));return}}for(N in d)d.hasOwnProperty(N)&&(h=d[N],h!=null&&Ft(i,l,N,h,d,null))}function c$(i,l,d,h){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,b=null,x=null,N=null,B=null,Q=null,se=null;for(re in d){var ae=d[re];if(d.hasOwnProperty(re)&&ae!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":B=ae;default:h.hasOwnProperty(re)||Ft(i,l,re,null,h,ae)}}for(var te in h){var re=h[te];if(ae=d[te],h.hasOwnProperty(te)&&(re!=null||ae!=null))switch(te){case"type":b=re;break;case"name":v=re;break;case"checked":Q=re;break;case"defaultChecked":se=re;break;case"value":x=re;break;case"defaultValue":N=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,l));break;default:re!==ae&&Ft(i,l,te,re,h,ae)}}Ad(i,x,N,B,Q,se,b,v);return;case"select":re=x=N=te=null;for(b in d)if(B=d[b],d.hasOwnProperty(b)&&B!=null)switch(b){case"value":break;case"multiple":re=B;default:h.hasOwnProperty(b)||Ft(i,l,b,null,h,B)}for(v in h)if(b=h[v],B=d[v],h.hasOwnProperty(v)&&(b!=null||B!=null))switch(v){case"value":te=b;break;case"defaultValue":N=b;break;case"multiple":x=b;default:b!==B&&Ft(i,l,v,b,h,B)}l=N,d=x,h=re,te!=null?ao(i,!!d,te,!1):!!h!=!!d&&(l!=null?ao(i,!!d,l,!0):ao(i,!!d,d?[]:"",!1));return;case"textarea":re=te=null;for(N in d)if(v=d[N],d.hasOwnProperty(N)&&v!=null&&!h.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Ft(i,l,N,null,h,v)}for(x in h)if(v=h[x],b=d[x],h.hasOwnProperty(x)&&(v!=null||b!=null))switch(x){case"value":te=v;break;case"defaultValue":re=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==b&&Ft(i,l,x,v,h,b)}pe(i,te,re);return;case"option":for(var Re in d)te=d[Re],d.hasOwnProperty(Re)&&te!=null&&!h.hasOwnProperty(Re)&&(Re==="selected"?i.selected=!1:Ft(i,l,Re,null,h,te));for(B in h)te=h[B],re=d[B],h.hasOwnProperty(B)&&te!==re&&(te!=null||re!=null)&&(B==="selected"?i.selected=te&&typeof te!="function"&&typeof te!="symbol":Ft(i,l,B,te,h,re));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var De in d)te=d[De],d.hasOwnProperty(De)&&te!=null&&!h.hasOwnProperty(De)&&Ft(i,l,De,null,h,te);for(Q in h)if(te=h[Q],re=d[Q],h.hasOwnProperty(Q)&&te!==re&&(te!=null||re!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,l));break;default:Ft(i,l,Q,te,h,re)}return;default:if(Ue(l)){for(var zt in d)te=d[zt],d.hasOwnProperty(zt)&&te!==void 0&&!h.hasOwnProperty(zt)&&g1(i,l,zt,void 0,h,te);for(se in h)te=h[se],re=d[se],!h.hasOwnProperty(se)||te===re||te===void 0&&re===void 0||g1(i,l,se,te,h,re);return}}for(var G in d)te=d[G],d.hasOwnProperty(G)&&te!=null&&!h.hasOwnProperty(G)&&Ft(i,l,G,null,h,te);for(ae in h)te=h[ae],re=d[ae],!h.hasOwnProperty(ae)||te===re||te==null&&re==null||Ft(i,l,ae,te,h,re)}function ZO(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function d$(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,d=performance.getEntriesByType("resource"),h=0;h<d.length;h++){var v=d[h],b=v.transferSize,x=v.initiatorType,N=v.duration;if(b&&N&&ZO(x)){for(x=0,N=v.responseEnd,h+=1;h<d.length;h++){var B=d[h],Q=B.startTime;if(Q>N)break;var se=B.transferSize,ae=B.initiatorType;se&&ZO(ae)&&(B=B.responseEnd,x+=se*(B<N?1:(N-Q)/(B-Q)))}if(--h,l+=8*(b+x)/(v.duration/1e3),i++,10<i)break}}if(0<i)return l/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var m1=null,v1=null;function vg(i){return i.nodeType===9?i:i.ownerDocument}function XO(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function QO(i,l){if(i===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&l==="foreignObject"?0:i}function y1(i,l){return i==="textarea"||i==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var b1=null;function f$(){var i=window.event;return i&&i.type==="popstate"?i===b1?!1:(b1=i,!0):(b1=null,!1)}var JO=typeof setTimeout=="function"?setTimeout:void 0,h$=typeof clearTimeout=="function"?clearTimeout:void 0,eN=typeof Promise=="function"?Promise:void 0,p$=typeof queueMicrotask=="function"?queueMicrotask:typeof eN<"u"?function(i){return eN.resolve(null).then(i).catch(g$)}:JO;function g$(i){setTimeout(function(){throw i})}function sa(i){return i==="head"}function tN(i,l){var d=l,h=0;do{var v=d.nextSibling;if(i.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"||d==="/&"){if(h===0){i.removeChild(v),Yu(l);return}h--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")h++;else if(d==="html")uf(i.ownerDocument.documentElement);else if(d==="head"){d=i.ownerDocument.head,uf(d);for(var b=d.firstChild;b;){var x=b.nextSibling,N=b.nodeName;b[Li]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&b.rel.toLowerCase()==="stylesheet"||d.removeChild(b),b=x}}else d==="body"&&uf(i.ownerDocument.body);d=v}while(d);Yu(l)}function nN(i,l){var d=i;i=0;do{var h=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),h&&h.nodeType===8)if(d=h.data,d==="/$"){if(i===0)break;i--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||i++;d=h}while(d)}function S1(i){var l=i.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":S1(d),Cd(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}i.removeChild(d)}}function m$(i,l,d,h){for(;i.nodeType===1;){var v=d;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[Li])switch(l){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==v.rel||i.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||i.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||i.getAttribute("title")!==(v.title==null?null:v.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(b=i.getAttribute("src"),(b!==(v.src==null?null:v.src)||i.getAttribute("type")!==(v.type==null?null:v.type)||i.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(l==="input"&&i.type==="hidden"){var b=v.name==null?null:""+v.name;if(v.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=Es(i.nextSibling),i===null)break}return null}function v$(i,l,d){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!d||(i=Es(i.nextSibling),i===null))return null;return i}function rN(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Es(i.nextSibling),i===null))return null;return i}function E1(i){return i.data==="$?"||i.data==="$~"}function C1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function y$(i,l){var d=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||d.readyState!=="loading")l();else{var h=function(){l(),d.removeEventListener("DOMContentLoaded",h)};d.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}function Es(i){for(;i!=null;i=i.nextSibling){var l=i.nodeType;if(l===1||l===3)break;if(l===8){if(l=i.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return i}var w1=null;function sN(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"||d==="/&"){if(l===0)return Es(i.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}i=i.nextSibling}return null}function oN(i){i=i.previousSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return i;l--}else d!=="/$"&&d!=="/&"||l++}i=i.previousSibling}return null}function iN(i,l,d){switch(l=vg(d),i){case"html":if(i=l.documentElement,!i)throw Error(r(452));return i;case"head":if(i=l.head,!i)throw Error(r(453));return i;case"body":if(i=l.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function uf(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);Cd(i)}var Cs=new Map,aN=new Set;function yg(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Qo=ee.d;ee.d={f:b$,r:S$,D:E$,C:C$,L:w$,m:x$,X:A$,S:_$,M:T$};function b$(){var i=Qo.f(),l=ug();return i||l}function S$(i){var l=Fi(i);l!==null&&l.tag===5&&l.type==="form"?x2(l):Qo.r(i)}var Gu=typeof document>"u"?null:document;function lN(i,l,d){var h=Gu;if(h&&typeof l=="string"&&l){var v=Ir(l);v='link[rel="'+i+'"][href="'+v+'"]',typeof d=="string"&&(v+='[crossorigin="'+d+'"]'),aN.has(v)||(aN.add(v),i={rel:i,crossOrigin:d,href:l},h.querySelector(v)===null&&(l=h.createElement("link"),Xn(l,"link",i),an(l),h.head.appendChild(l)))}}function E$(i){Qo.D(i),lN("dns-prefetch",i,null)}function C$(i,l){Qo.C(i,l),lN("preconnect",i,l)}function w$(i,l,d){Qo.L(i,l,d);var h=Gu;if(h&&i&&l){var v='link[rel="preload"][as="'+Ir(l)+'"]';l==="image"&&d&&d.imageSrcSet?(v+='[imagesrcset="'+Ir(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(v+='[imagesizes="'+Ir(d.imageSizes)+'"]')):v+='[href="'+Ir(i)+'"]';var b=v;switch(l){case"style":b=Vu(i);break;case"script":b=Ku(i)}Cs.has(b)||(i=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),Cs.set(b,i),h.querySelector(v)!==null||l==="style"&&h.querySelector(cf(b))||l==="script"&&h.querySelector(df(b))||(l=h.createElement("link"),Xn(l,"link",i),an(l),h.head.appendChild(l)))}}function x$(i,l){Qo.m(i,l);var d=Gu;if(d&&i){var h=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+Ir(h)+'"][href="'+Ir(i)+'"]',b=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Ku(i)}if(!Cs.has(b)&&(i=g({rel:"modulepreload",href:i},l),Cs.set(b,i),d.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(df(b)))return}h=d.createElement("link"),Xn(h,"link",i),an(h),d.head.appendChild(h)}}}function _$(i,l,d){Qo.S(i,l,d);var h=Gu;if(h&&i){var v=mr(h).hoistableStyles,b=Vu(i);l=l||"default";var x=v.get(b);if(!x){var N={loading:0,preload:null};if(x=h.querySelector(cf(b)))N.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":l},d),(d=Cs.get(b))&&x1(i,d);var B=x=h.createElement("link");an(B),Xn(B,"link",i),B._p=new Promise(function(Q,se){B.onload=Q,B.onerror=se}),B.addEventListener("load",function(){N.loading|=1}),B.addEventListener("error",function(){N.loading|=2}),N.loading|=4,bg(x,l,h)}x={type:"stylesheet",instance:x,count:1,state:N},v.set(b,x)}}}function A$(i,l){Qo.X(i,l);var d=Gu;if(d&&i){var h=mr(d).hoistableScripts,v=Ku(i),b=h.get(v);b||(b=d.querySelector(df(v)),b||(i=g({src:i,async:!0},l),(l=Cs.get(v))&&_1(i,l),b=d.createElement("script"),an(b),Xn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function T$(i,l){Qo.M(i,l);var d=Gu;if(d&&i){var h=mr(d).hoistableScripts,v=Ku(i),b=h.get(v);b||(b=d.querySelector(df(v)),b||(i=g({src:i,async:!0,type:"module"},l),(l=Cs.get(v))&&_1(i,l),b=d.createElement("script"),an(b),Xn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function uN(i,l,d,h){var v=(v=he.current)?yg(v):null;if(!v)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Vu(d.href),d=mr(v).hoistableStyles,h=d.get(l),h||(h={type:"style",instance:null,count:0,state:null},d.set(l,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){i=Vu(d.href);var b=mr(v).hoistableStyles,x=b.get(i);if(x||(v=v.ownerDocument||v,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,x),(b=v.querySelector(cf(i)))&&!b._p&&(x.instance=b,x.state.loading=5),Cs.has(i)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Cs.set(i,d),b||R$(v,i,d,x.state))),l&&h===null)throw Error(r(528,""));return x}if(l&&h!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Ku(d),d=mr(v).hoistableScripts,h=d.get(l),h||(h={type:"script",instance:null,count:0,state:null},d.set(l,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Vu(i){return'href="'+Ir(i)+'"'}function cf(i){return'link[rel="stylesheet"]['+i+"]"}function cN(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function R$(i,l,d,h){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?h.loading=1:(l=i.createElement("link"),h.preload=l,l.addEventListener("load",function(){return h.loading|=1}),l.addEventListener("error",function(){return h.loading|=2}),Xn(l,"link",d),an(l),i.head.appendChild(l))}function Ku(i){return'[src="'+Ir(i)+'"]'}function df(i){return"script[async]"+i}function dN(i,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var h=i.querySelector('style[data-href~="'+Ir(d.href)+'"]');if(h)return l.instance=h,an(h),h;var v=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),an(h),Xn(h,"style",v),bg(h,d.precedence,i),l.instance=h;case"stylesheet":v=Vu(d.href);var b=i.querySelector(cf(v));if(b)return l.state.loading|=4,l.instance=b,an(b),b;h=cN(d),(v=Cs.get(v))&&x1(h,v),b=(i.ownerDocument||i).createElement("link"),an(b);var x=b;return x._p=new Promise(function(N,B){x.onload=N,x.onerror=B}),Xn(b,"link",h),l.state.loading|=4,bg(b,d.precedence,i),l.instance=b;case"script":return b=Ku(d.src),(v=i.querySelector(df(b)))?(l.instance=v,an(v),v):(h=d,(v=Cs.get(b))&&(h=g({},d),_1(h,v)),i=i.ownerDocument||i,v=i.createElement("script"),an(v),Xn(v,"link",h),i.head.appendChild(v),l.instance=v);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(h=l.instance,l.state.loading|=4,bg(h,d.precedence,i));return l.instance}function bg(i,l,d){for(var h=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,b=v,x=0;x<h.length;x++){var N=h[x];if(N.dataset.precedence===l)b=N;else if(b!==v)break}b?b.parentNode.insertBefore(i,b.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(i,l.firstChild))}function x1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function _1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var Sg=null;function fN(i,l,d){if(Sg===null){var h=new Map,v=Sg=new Map;v.set(d,h)}else v=Sg,h=v.get(d),h||(h=new Map,v.set(d,h));if(h.has(i))return h;for(h.set(i,null),d=d.getElementsByTagName(i),v=0;v<d.length;v++){var b=d[v];if(!(b[Li]||b[In]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var x=b.getAttribute(l)||"";x=i+x;var N=h.get(x);N?N.push(b):h.set(x,[b])}}return h}function hN(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function I$(i,l,d){if(d===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(i=l.disabled,typeof l.precedence=="string"&&i==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function pN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function O$(i,l,d,h){if(d.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var v=Vu(h.href),b=l.querySelector(cf(v));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=Eg.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=b,an(b);return}b=l.ownerDocument||l,h=cN(h),(v=Cs.get(v))&&x1(h,v),b=b.createElement("link"),an(b);var x=b;x._p=new Promise(function(N,B){x.onload=N,x.onerror=B}),Xn(b,"link",h),d.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(i.count++,d=Eg.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var A1=0;function N$(i,l){return i.stylesheets&&i.count===0&&wg(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var h=setTimeout(function(){if(i.stylesheets&&wg(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+l);0<i.imgBytes&&A1===0&&(A1=62500*d$());var v=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&wg(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>A1?50:800)+l);return i.unsuspend=d,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Eg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wg(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Cg=null;function wg(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Cg=new Map,l.forEach(M$,i),Cg=null,Eg.call(i))}function M$(i,l){if(!(l.state.loading&4)){var d=Cg.get(i);if(d)var h=d.get(null);else{d=new Map,Cg.set(i,d);for(var v=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var x=v[b];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(d.set(x.dataset.precedence,x),h=x)}h&&d.set(null,h)}v=l.instance,x=v.getAttribute("data-precedence"),b=d.get(x)||h,b===h&&d.set(null,v),d.set(x,v),this.count++,h=Eg.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),b?b.parentNode.insertBefore(v,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(v,i.firstChild)),l.state.loading|=4}}var ff={$$typeof:T,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function P$(i,l,d,h,v,b,x,N,B){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=so(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=so(0),this.hiddenUpdates=so(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function gN(i,l,d,h,v,b,x,N,B,Q,se,ae){return i=new P$(i,l,d,x,B,Q,se,ae,N),l=1,b===!0&&(l|=24),b=Xr(3,null,null,l),i.current=b,b.stateNode=i,l=o0(),l.refCount++,i.pooledCache=l,l.refCount++,b.memoizedState={element:h,isDehydrated:d,cache:l},u0(b),i}function mN(i){return i?(i=_u,i):_u}function vN(i,l,d,h,v,b){v=mN(v),h.context===null?h.context=v:h.pendingContext=v,h=Vi(l),h.payload={element:d},b=b===void 0?null:b,b!==null&&(h.callback=b),d=Ki(i,h,l),d!==null&&(Dr(d,i,l),$d(d,i,l))}function yN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function T1(i,l){yN(i,l),(i=i.alternate)&&yN(i,l)}function bN(i){if(i.tag===13||i.tag===31){var l=nl(i,67108864);l!==null&&Dr(l,i,67108864),T1(i,67108864)}}function SN(i){if(i.tag===13||i.tag===31){var l=ns();l=mu(l);var d=nl(i,l);d!==null&&Dr(d,i,l),T1(i,l)}}var xg=!0;function k$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=2,R1(i,l,d,h)}finally{ee.p=b,$.T=v}}function D$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=8,R1(i,l,d,h)}finally{ee.p=b,$.T=v}}function R1(i,l,d,h){if(xg){var v=I1(h);if(v===null)p1(i,l,h,_g,d),CN(i,h);else if(U$(v,i,l,d,h))h.stopPropagation();else if(CN(i,h),l&4&&-1<L$.indexOf(i)){for(;v!==null;){var b=Fi(v);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var x=ks(b.pendingLanes);if(x!==0){var N=b;for(N.pendingLanes|=2,N.entangledLanes|=2;x;){var B=1<<31-Vn(x);N.entanglements[1]|=B,x&=~B}fo(b),(Rt&6)===0&&(ag=Gt()+500,of(0))}}break;case 31:case 13:N=nl(b,2),N!==null&&Dr(N,b,2),ug(),T1(b,2)}if(b=I1(h),b===null&&p1(i,l,h,_g,d),b===v)break;v=b}v!==null&&h.stopPropagation()}else p1(i,l,h,null,d)}}function I1(i){return i=On(i),O1(i)}var _g=null;function O1(i){if(_g=null,i=Ui(i),i!==null){var l=o(i);if(l===null)i=null;else{var d=l.tag;if(d===13){if(i=a(l),i!==null)return i;i=null}else if(d===31){if(i=u(l),i!==null)return i;i=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;i=null}else l!==i&&(i=null)}}return _g=i,null}function EN(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(gt()){case vn:return 2;case Rr:return 8;case no:case gd:return 32;case ko:return 268435456;default:return 32}default:return 32}}var N1=!1,oa=null,ia=null,aa=null,hf=new Map,pf=new Map,la=[],L$="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function CN(i,l){switch(i){case"focusin":case"focusout":oa=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":hf.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":pf.delete(l.pointerId)}}function gf(i,l,d,h,v,b){return i===null||i.nativeEvent!==b?(i={blockedOn:l,domEventName:d,eventSystemFlags:h,nativeEvent:b,targetContainers:[v]},l!==null&&(l=Fi(l),l!==null&&bN(l)),i):(i.eventSystemFlags|=h,l=i.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),i)}function U$(i,l,d,h,v){switch(l){case"focusin":return oa=gf(oa,i,l,d,h,v),!0;case"dragenter":return ia=gf(ia,i,l,d,h,v),!0;case"mouseover":return aa=gf(aa,i,l,d,h,v),!0;case"pointerover":var b=v.pointerId;return hf.set(b,gf(hf.get(b)||null,i,l,d,h,v)),!0;case"gotpointercapture":return b=v.pointerId,pf.set(b,gf(pf.get(b)||null,i,l,d,h,v)),!0}return!1}function wN(i){var l=Ui(i.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){i.blockedOn=l,Di(i.priority,function(){SN(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,Di(i.priority,function(){SN(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){i.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Ag(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var d=I1(i.nativeEvent);if(d===null){d=i.nativeEvent;var h=new d.constructor(d.type,d);yr=h,d.target.dispatchEvent(h),yr=null}else return l=Fi(d),l!==null&&bN(l),i.blockedOn=d,!1;l.shift()}return!0}function xN(i,l,d){Ag(i)&&d.delete(l)}function F$(){N1=!1,oa!==null&&Ag(oa)&&(oa=null),ia!==null&&Ag(ia)&&(ia=null),aa!==null&&Ag(aa)&&(aa=null),hf.forEach(xN),pf.forEach(xN)}function Tg(i,l){i.blockedOn===l&&(i.blockedOn=null,N1||(N1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,F$)))}var Rg=null;function _N(i){Rg!==i&&(Rg=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Rg===i&&(Rg=null);for(var l=0;l<i.length;l+=3){var d=i[l],h=i[l+1],v=i[l+2];if(typeof h!="function"){if(O1(h||d)===null)continue;break}var b=Fi(d);b!==null&&(i.splice(l,3),l-=3,I0(b,{pending:!0,data:v,method:d.method,action:h},h,v))}}))}function Yu(i){function l(B){return Tg(B,i)}oa!==null&&Tg(oa,i),ia!==null&&Tg(ia,i),aa!==null&&Tg(aa,i),hf.forEach(l),pf.forEach(l);for(var d=0;d<la.length;d++){var h=la[d];h.blockedOn===i&&(h.blockedOn=null)}for(;0<la.length&&(d=la[0],d.blockedOn===null);)wN(d),d.blockedOn===null&&la.shift();if(d=(i.ownerDocument||i).$$reactFormReplay,d!=null)for(h=0;h<d.length;h+=3){var v=d[h],b=d[h+1],x=v[nt]||null;if(typeof b=="function")x||_N(d);else if(x){var N=null;if(b&&b.hasAttribute("formAction")){if(v=b,x=b[nt]||null)N=x.formAction;else if(O1(v)!==null)continue}else N=x.action;typeof N=="function"?d[h+1]=N:(d.splice(h,3),h-=3),_N(d)}}}function AN(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(x){return v=x})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),h||setTimeout(d,20)}function d(){if(!h&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){h=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function M1(i){this._internalRoot=i}Ig.prototype.render=M1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,h=ns();vN(d,h,i,l,null,null)},Ig.prototype.unmount=M1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;vN(i.current,2,null,i,null,null),ug(),l[Yr]=null}};function Ig(i){this._internalRoot=i}Ig.prototype.unstable_scheduleHydration=function(i){if(i){var l=vp();i={blockedOn:null,target:i,priority:l};for(var d=0;d<la.length&&l!==0&&l<la[d].priority;d++);la.splice(d,0,i),d===0&&wN(i)}};var TN=e.version;if(TN!=="19.2.7")throw Error(r(527,TN,"19.2.7"));ee.findDOMNode=function(i){var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(l),i=i!==null?p(i):null,i=i===null?null:i.stateNode,i};var z$={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Og=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Og.isDisabled&&Og.supportsFiber)try{Mi=Og.inject(z$),ar=Og}catch{}}return kf.createRoot=function(i,l){if(!s(i))throw Error(r(299));var d=!1,h="",v=k2,b=D2,x=L2;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),l=gN(i,1,!1,null,null,d,h,null,v,b,x,AN),i[Yr]=l.current,h1(i),new M1(l)},kf.hydrateRoot=function(i,l,d){if(!s(i))throw Error(r(299));var h=!1,v="",b=k2,x=D2,N=L2,B=null;return d!=null&&(d.unstable_strictMode===!0&&(h=!0),d.identifierPrefix!==void 0&&(v=d.identifierPrefix),d.onUncaughtError!==void 0&&(b=d.onUncaughtError),d.onCaughtError!==void 0&&(x=d.onCaughtError),d.onRecoverableError!==void 0&&(N=d.onRecoverableError),d.formState!==void 0&&(B=d.formState)),l=gN(i,1,!0,l,d??null,h,v,B,b,x,N,AN),l.context=mN(null),d=l.current,h=ns(),h=mu(h),v=Vi(h),v.callback=null,Ki(d,v,h),d=h,l.current.lanes=d,Do(l,d),fo(l),i[Yr]=l.current,h1(i),new Ig(l)},kf.version="19.2.7",kf}var g4;function Bpe(){if(g4)return Gw.exports;g4=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Gw.exports=jpe(),Gw.exports}var Hpe=Bpe();const $pe={bodySerializer:t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString():n)},qpe=({onRequest:t,onSseError:e,onSseEvent:n,responseTransformer:r,responseValidator:s,sseDefaultRetryDelay:o,sseMaxRetryAttempts:a,sseMaxRetryDelay:u,sseSleepFn:c,url:f,...p})=>{let g;const m=c??(E=>new Promise(C=>setTimeout(C,E)));return{stream:async function*(){let E=o??3e3,C=0;const w=p.signal??new AbortController().signal;for(;!w.aborted;){C++;const _=p.headers instanceof Headers?p.headers:new Headers(p.headers);g!==void 0&&_.set("Last-Event-ID",g);try{const T={redirect:"follow",...p,body:p.serializedBody,headers:_,signal:w};let R=new Request(f,T);t&&(R=await t(f,T));const O=await(p.fetch??globalThis.fetch)(R);if(!O.ok)throw new Error(`SSE failed: ${O.status} ${O.statusText}`);if(!O.body)throw new Error("No body in SSE response");const I=O.body.pipeThrough(new TextDecoderStream).getReader();let P="";const k=()=>{try{I.cancel()}catch{}};w.addEventListener("abort",k);try{for(;;){const{done:H,value:F}=await I.read();if(H)break;P+=F,P=P.replace(/\r\n/g,`
|
|
225
225
|
`).replace(/\r/g,`
|
|
226
226
|
`);const j=P.split(`
|
|
227
227
|
|
|
228
228
|
`);P=j.pop()??"";for(const W of j){const Y=W.split(`
|
|
229
229
|
`),ne=[];let $;for(const de of Y)if(de.startsWith("data:"))ne.push(de.replace(/^data:\s*/,""));else if(de.startsWith("event:"))$=de.replace(/^event:\s*/,"");else if(de.startsWith("id:"))g=de.replace(/^id:\s*/,"");else if(de.startsWith("retry:")){const Ae=Number.parseInt(de.replace(/^retry:\s*/,""),10);Number.isNaN(Ae)||(E=Ae)}let ee,fe=!1;if(ne.length){const de=ne.join(`
|
|
230
|
-
`);try{ee=JSON.parse(de),fe=!0}catch{ee=de}}fe&&(s&&await s(ee),r&&(ee=await r(ee))),n?.({data:ee,event:$,id:g,retry:E}),ne.length&&(yield ee)}}}finally{w.removeEventListener("abort",k),I.releaseLock()}break}catch(T){if(e?.(T),a!==void 0&&C>=a)break;const R=Math.min(E*2**(C-1),u??3e4);await m(R)}}}()}},Wpe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Gpe=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Vpe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},O7=({allowReserved:t,explode:e,name:n,style:r,value:s})=>{if(!e){const u=(t?s:s.map(c=>encodeURIComponent(c))).join(Gpe(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const o=Wpe(r),a=s.map(u=>r==="label"||r==="simple"?t?u:encodeURIComponent(u):db({allowReserved:t,name:n,value:u})).join(o);return r==="label"||r==="matrix"?o+a:a},db=({allowReserved:t,name:e,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${t?n:encodeURIComponent(n)}`},N7=({allowReserved:t,explode:e,name:n,style:r,value:s,valueOnly:o})=>{if(s instanceof Date)return o?s.toISOString():`${n}=${s.toISOString()}`;if(r!=="deepObject"&&!e){let c=[];Object.entries(s).forEach(([p,g])=>{c=[...c,p,t?g:encodeURIComponent(g)]});const f=c.join(",");switch(r){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}const a=Vpe(r),u=Object.entries(s).map(([c,f])=>db({allowReserved:t,name:r==="deepObject"?`${n}[${c}]`:c,value:f})).join(a);return r==="label"||r==="matrix"?a+u:u},Kpe=/\{[^{}]+\}/g,Ype=({path:t,url:e})=>{let n=e;const r=e.match(Kpe);if(r)for(const s of r){let o=!1,a=s.substring(1,s.length-1),u="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),u="label"):a.startsWith(";")&&(a=a.substring(1),u="matrix");const c=t[a];if(c==null)continue;if(Array.isArray(c)){n=n.replace(s,O7({explode:o,name:a,style:u,value:c}));continue}if(typeof c=="object"){n=n.replace(s,N7({explode:o,name:a,style:u,value:c,valueOnly:!0}));continue}if(u==="matrix"){n=n.replace(s,`;${db({name:a,value:c})}`);continue}const f=encodeURIComponent(u==="label"?`.${c}`:c);n=n.replace(s,f)}return n},Zpe=({baseUrl:t,path:e,query:n,querySerializer:r,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let a=(t??"")+o;e&&(a=Ype({path:e,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function mU(t){const e=t.body!==void 0;if(e&&t.bodySerializer)return"serializedBody"in t?t.serializedBody!==void 0&&t.serializedBody!==""?t.serializedBody:null:t.body!==""?t.body:null;if(e)return t.body}const Xpe=async(t,e)=>{const n=typeof e=="function"?await e(t):e;if(n)return t.scheme==="bearer"?`Bearer ${n}`:t.scheme==="basic"?`Basic ${btoa(n)}`:n},M7=({parameters:t={},...e}={})=>r=>{const s=[];if(r&&typeof r=="object")for(const o in r){const a=r[o];if(a==null)continue;const u=t[o]||e;if(Array.isArray(a)){const c=O7({allowReserved:u.allowReserved,explode:!0,name:o,style:"form",value:a,...u.array});c&&s.push(c)}else if(typeof a=="object"){const c=N7({allowReserved:u.allowReserved,explode:!0,name:o,style:"deepObject",value:a,...u.object});c&&s.push(c)}else{const c=db({allowReserved:u.allowReserved,name:o,value:a});c&&s.push(c)}}return s.join("&")},Qpe=t=>{if(!t)return"stream";const e=t.split(";")[0]?.trim();if(e){if(e.startsWith("application/json")||e.endsWith("+json"))return"json";if(e==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>e.startsWith(n)))return"blob";if(e.startsWith("text/"))return"text"}},Jpe=(t,e)=>e?!!(t.headers.has(e)||t.query?.[e]||t.headers.get("Cookie")?.includes(`${e}=`)):!1,ege=async({security:t,...e})=>{for(const n of t){if(Jpe(e,n.name))continue;const r=await Xpe(n,e.auth);if(!r)continue;const s=n.name??"Authorization";switch(n.in){case"query":e.query||(e.query={}),e.query[s]=r;break;case"cookie":e.headers.append("Cookie",`${s}=${r}`);break;default:e.headers.set(s,r);break}}},vU=t=>Zpe({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:M7(t.querySerializer),url:t.url}),yU=(t,e)=>{const n={...t,...e};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=P7(t.headers,e.headers),n},tge=t=>{const e=[];return t.forEach((n,r)=>{e.push([r,n])}),e},P7=(...t)=>{const e=new Headers;for(const n of t){if(!n)continue;const r=n instanceof Headers?tge(n):Object.entries(n);for(const[s,o]of r)if(o===null)e.delete(s);else if(Array.isArray(o))for(const a of o)e.append(s,a);else o!==void 0&&e.set(s,typeof o=="object"?JSON.stringify(o):o)}return e};class Yw{fns=[];clear(){this.fns=[]}eject(e){const n=this.getInterceptorIndex(e);this.fns[n]&&(this.fns[n]=null)}exists(e){const n=this.getInterceptorIndex(e);return!!this.fns[n]}getInterceptorIndex(e){return typeof e=="number"?this.fns[e]?e:-1:this.fns.indexOf(e)}update(e,n){const r=this.getInterceptorIndex(e);return this.fns[r]?(this.fns[r]=n,e):!1}use(e){return this.fns.push(e),this.fns.length-1}}const nge=()=>({error:new Yw,request:new Yw,response:new Yw}),rge=M7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),sge={"Content-Type":"application/json"},k7=(t={})=>({...$pe,headers:sge,parseAs:"auto",querySerializer:rge,...t}),oge=(t={})=>{let e=yU(k7(),t);const n=()=>({...e}),r=f=>(e=yU(e,f),n()),s=nge(),o=async f=>{const p={...e,...f,fetch:f.fetch??e.fetch??globalThis.fetch,headers:P7(e.headers,f.headers),serializedBody:void 0};p.security&&await ege({...p,security:p.security}),p.requestValidator&&await p.requestValidator(p),p.body!==void 0&&p.bodySerializer&&(p.serializedBody=p.bodySerializer(p.body)),(p.body===void 0||p.serializedBody==="")&&p.headers.delete("Content-Type");const g=vU(p);return{opts:p,url:g}},a=async f=>{const{opts:p,url:g}=await o(f),m={redirect:"follow",...p,body:mU(p)};let y=new Request(g,m);for(const M of s.request.fns)M&&(y=await M(y,p));const S=p.fetch;let E;try{E=await S(y)}catch(M){let O=M;for(const I of s.error.fns)I&&(O=await I(M,void 0,y,p));if(O=O||{},p.throwOnError)throw O;return p.responseStyle==="data"?void 0:{error:O,request:y,response:void 0}}for(const M of s.response.fns)M&&(E=await M(E,y,p));const C={request:y,response:E};if(E.ok){const M=(p.parseAs==="auto"?Qpe(E.headers.get("Content-Type")):p.parseAs)??"json";if(E.status===204||E.headers.get("Content-Length")==="0"){let I;switch(M){case"arrayBuffer":case"blob":case"text":I=await E[M]();break;case"formData":I=new FormData;break;case"stream":I=E.body;break;default:I={};break}return p.responseStyle==="data"?I:{data:I,...C}}let O;switch(M){case"arrayBuffer":case"blob":case"formData":case"text":O=await E[M]();break;case"json":{const I=await E.text();O=I?JSON.parse(I):{};break}case"stream":return p.responseStyle==="data"?E.body:{data:E.body,...C}}return M==="json"&&(p.responseValidator&&await p.responseValidator(O),p.responseTransformer&&(O=await p.responseTransformer(O))),p.responseStyle==="data"?O:{data:O,...C}}const w=await E.text();let _;try{_=JSON.parse(w)}catch{}const T=_??w;let R=T;for(const M of s.error.fns)M&&(R=await M(T,E,y,p));if(R=R||{},p.throwOnError)throw R;return p.responseStyle==="data"?void 0:{error:R,...C}},u=f=>p=>a({...p,method:f}),c=f=>async p=>{const{opts:g,url:m}=await o(p);return qpe({...g,body:g.body,headers:g.headers,method:f,onRequest:async(y,S)=>{let E=new Request(y,S);for(const C of s.request.fns)C&&(E=await C(E,g));return E},serializedBody:mU(g),url:m})};return{buildUrl:vU,connect:u("CONNECT"),delete:u("DELETE"),get:u("GET"),getConfig:n,head:u("HEAD"),interceptors:s,options:u("OPTIONS"),patch:u("PATCH"),post:u("POST"),put:u("PUT"),request:a,setConfig:r,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:u("TRACE")}},Ze=oge(k7({baseUrl:"https://api.remit.example.com"}));let bU=!1;const ige=t=>{bU||(Ze.interceptors.request.use(async e=>{const n=await t.getToken();return n&&e.headers.set("Authorization",`Bearer ${n}`),e}),bU=!0)},age=({children:t})=>D.jsx(D.Fragment,{children:t}),lge={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:age,Account:({fallback:t=null})=>D.jsx(D.Fragment,{children:t})},D7=A.createContext(lge),uge=D7.Provider,bAe=()=>A.useContext(D7),cge=(t,e)=>{X8(t,e.meta)&&Bl(t)},dge=(t,e,n,r)=>{X8(t,r.meta)&&Bl(t)},__=t=>new TextEncoder().encode(t),L7={},A_={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),L7[t]=e,A_[e]=t}function fge(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 A_)e[n/2]=A_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e}function Ll(t){let e="";for(let n=0;n<t.byteLength;n++)e+=L7[t[n]];return e}const Nh=t=>t instanceof Uint8Array?t:typeof t=="string"?__(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),hge=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";class Ei{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const n=new Ei({...e,headers:{...e.headers}});return n.query&&(n.query=pge(n.query)),n}static isInstance(e){if(!e)return!1;const n=e;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Ei.clone(this)}}function pge(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return{...e,[n]:Array.isArray(r)?[...r]:r}},{})}class Mh{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const n=e;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const SU=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Ul=t=>encodeURIComponent(t).replace(/[!'()*]/g,gge),gge=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function aR(t){const e=[];for(let n of Object.keys(t).sort()){const r=t[n];if(n=Ul(n),Array.isArray(r))for(let s=0,o=r.length;s<o;s++)e.push(`${n}=${Ul(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${Ul(r)}`),e.push(s)}}return e.join("&")}const lm="[aws-rum-web:unknown.unknown]";class be{static configure(e){be.debugEnabled=e}static getCallerInfo(){var e,n;try{const r=new Error().stack;if(!r)return lm;const s=r.split(`
|
|
231
|
-
`);if(s.length<4)return lm;const o=s[3];if(!o)return lm;const a=o.match(/at (?:(.+?)\s+\()?/);if(a&&a.length>=2){const u=a[1].trim(),c=u.split(".");if(c.length>=2){const f=(e=c[c.length-2])!==null&&e!==void 0?e:"unknown",p=(n=c[c.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${p}]`}return`[aws-rum-web:${u}]`}}catch{}return lm}static info(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.info(r,e,...n)}static debug(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.debug(r,e,...n)}static warn(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.warn(r,e,...n)}static error(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.error(r,e,...n)}}be.debugEnabled=!1;const EU=2048,CU=.2,mge=()=>typeof CompressionStream<"u",vge=async t=>{const e=new Blob([t]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},yge=async t=>{const e=t.length;if(be.debug(`compressIfBeneficial called, payload size: ${e}B`),!mge())return be.debug("CompressionStream not supported, skipping compression"),{body:t,compressed:!1};if(e<EU)return be.debug(`Payload size ${e}B below threshold ${EU}B, skipping compression`),{body:t,compressed:!1};const n=await vge(t),r=1-n.length/e;return r>=CU?(be.debug(`Compressed ${e}B -> ${n.length}B (${(r*100).toFixed(1)}% reduction)`),{body:n,compressed:!0}):(be.debug(`Compression ratio ${(r*100).toFixed(1)}% below threshold ${CU*100}%, skipping`),{body:t,compressed:!1})},bge="POST",Sge="application/json",Ege="text/plain;charset=UTF-8",Cge=64e3;class wge{constructor(e,n){this.sendFetch=async r=>{var s,o;const a=JSON.stringify(wU(r)),u=(o=(s=this.config.compressionStrategy)===null||s===void 0?void 0:s.enabled)!==null&&o!==void 0?o:!1,{body:c,compressed:f}=u?await yge(a):{body:a,compressed:!1},p=await this.getHttpRequestOptions(r,c,Sge,f);let g=new Ei(p);return this.signing&&(g=await this.signing.sign(g)),this.config.fetchRequestHandler.handle(g)},this.sendBeacon=async r=>{const s=JSON.stringify(wU(r));if(s.length>Cge)throw new Error("Payload too large for sendBeacon");const o=await this.getHttpRequestOptions(r,s,Ege,!1);let a=new Ei(o);return this.signing&&(a=await this.signing.presign(a)),this.config.beaconRequestHandler.handle(a)},this.getHttpRequestOptions=async(r,s,o,a)=>{const u=this.config.endpoint.pathname.replace(/\/$/,""),c=Object.assign({"content-type":o,host:this.config.endpoint.host},this.config.headers);a&&(c["Content-Encoding"]="gzip");const f={method:bge,protocol:this.config.endpoint.protocol,port:Number(this.config.endpoint.port)||void 0,headers:c,hostname:this.config.endpoint.hostname,path:`${u}/appmonitors/${r.AppMonitorDetails.id}`,body:s};return this.signing?Object.assign(Object.assign({},f),{headers:Object.assign(Object.assign({},f.headers),{"X-Amz-Content-Sha256":await this.signing.hashAndEncode(s)})}):f},this.config=e,this.signing=n}}const wU=t=>{const e=[];t.RumEvents.forEach(r=>e.push(xge(r)));let n={BatchId:t.BatchId,AppMonitorDetails:t.AppMonitorDetails,UserDetails:t.UserDetails,RumEvents:e};return t.SessionMetadata&&(n=Object.assign(Object.assign({},n),{SessionMetadata:t.SessionMetadata})),t.Alias&&(n=Object.assign(Object.assign({},n),{Alias:t.Alias})),n},xge=t=>({id:t.id,timestamp:Math.round(t.timestamp.getTime()/1e3),type:t.type,metadata:t.metadata,details:t.details});class _ge{handle(e){const n=this.sendBeacon(e);return new Promise((r,s)=>{n?r({response:new Mh({statusCode:200})}):s()})}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}sendBeacon(e){let n=e.path;if(e.query){const o=aR(e.query);o&&(n+=`?${o}`)}const{port:r}=e,s=`${e.protocol}//${e.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(s,e.body)}}const Age=(t=0)=>new Promise((e,n)=>{t&&setTimeout(()=>{const r=new Error(`Request did not complete within ${t} ms`);r.name="TimeoutError",n(r)},t)});let Tge=class{constructor({fetchFunction:e,requestTimeout:n}={}){this.requestTimeout=n,this.fetchFunction=e}destroy(){}handle(e,{abortSignal:n}={}){const r=this.requestTimeout;if(n?.aborted){const m=new Error("Request aborted");return m.name="AbortError",Promise.reject(m)}let s=e.path;if(e.query){const m=aR(e.query);m&&(s+=`?${m}`)}const{port:o,method:a}=e,u=`${e.protocol}//${e.hostname}${o?`:${o}`:""}${s}`,f={body:a==="GET"||a==="HEAD"?void 0:e.body,headers:new Headers(e.headers),method:a};typeof AbortController<"u"&&(f.signal=n);const p=new Request(u,f),g=[this.fetchFunction.apply(window,[p]).then(m=>{const y=m.headers,S={};for(const C of y.entries())S[C[0]]=C[1];return m.body!==void 0?{response:new Mh({headers:S,statusCode:m.status,body:m.body})}:m.blob().then(C=>({response:new Mh({headers:S,statusCode:m.status,body:C})}))}),Age(r)];return n&&g.push(new Promise((m,y)=>{n.onabort=()=>{const S=new Error("Request aborted");S.name="AbortError",y(S)}})),Promise.race(g)}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}},um;const Rge=new Uint8Array(16);function Ige(){if(!um&&(um=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!um))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return um(Rge)}const Jn=[];for(let t=0;t<256;++t)Jn.push((t+256).toString(16).slice(1));function Oge(t,e=0){return Jn[t[e+0]]+Jn[t[e+1]]+Jn[t[e+2]]+Jn[t[e+3]]+"-"+Jn[t[e+4]]+Jn[t[e+5]]+"-"+Jn[t[e+6]]+Jn[t[e+7]]+"-"+Jn[t[e+8]]+Jn[t[e+9]]+"-"+Jn[t[e+10]]+Jn[t[e+11]]+Jn[t[e+12]]+Jn[t[e+13]]+Jn[t[e+14]]+Jn[t[e+15]]}const Nge=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xU={randomUUID:Nge};function ih(t,e,n){if(xU.randomUUID&&!t)return xU.randomUUID();t=t||{};const r=t.random||(t.rng||Ige)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Oge(r)}const lR=t=>{if(crypto)return crypto.getRandomValues(t);if(msCrypto)return msCrypto.getRandomValues(t);throw new Error("No crypto library found.")},U7=[];for(let t=0;t<256;t++)U7[t]=(t+256).toString(16).substr(1);const fb="X-Amzn-Trace-Id",hb="traceparent",Mge=2,Pge=32,kge=16,Dge=4,F7=(t,e)=>Array.isArray(e)?e.some(n=>n.test(t)):e,z7={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},Lge=t=>200<=t&&t<300,j7=t=>Math.floor(t/100)===4,uR=t=>Math.floor(t/100)===5,cR=t=>t===429,B7=(t,e)=>{const n=e.urlsToInclude.some(s=>s.test(t)),r=e.urlsToExclude.some(s=>s.test(t));return n&&!r},wc=()=>Date.now()/1e3,Uge=(t,e,n)=>{const r={request:{}};return r.request.method=e?.method?e.method:"GET",r.request.traced=n,r.request.url=av(t),r},H7=(t,e,n,r)=>({version:"1.0.0",name:t,origin:"AWS::RUM::AppMonitor",id:W7(),start_time:e,trace_id:n?$ge():Hge(),end_time:void 0,subsegments:[],in_progress:!1}),$7=(t,e,n)=>{const r={id:W7(),name:t,start_time:e,end_time:void 0,in_progress:!1,namespace:t.endsWith(".amazonaws.com")?"aws":"remote"};return n&&(r.http=n),r},q7=t=>{try{return t.hostname?t.hostname:t.url?new URL(t.url).hostname:new URL(t.toString()).hostname}catch{return window.location.hostname}},Fge=(t,e,n,r)=>{t.headers||(t.headers={}),r?t.headers[hb]=fR(e,n):t.headers[fb]=dR(e,n)},zge=(t,e,n,r)=>{r?t.set(hb,fR(e,n)):t.set(fb,dR(e,n))},dR=(t,e)=>"Root="+t+";Parent="+e+";Sampled=1",fR=(t,e)=>"00-"+t+"-"+e+"-01",jge=t=>t?.length===Dge&&t[0].length===Mge&&t[1].length===Pge&&t[2].length===kge&&(t[3]==="00"||t[3]==="01"),Bge=(t,e)=>{var n,r;const s={};if(t)if(e){const o=(n=t.get(hb))===null||n===void 0?void 0:n.split("-");o&&jge(o)&&(s.traceId=o[1],s.segmentId=o[2])}else{const o=(r=t.get(fb))===null||r===void 0?void 0:r.split(";");o?.length===3&&(s.traceId=o[0].split("Root=")[1],s.segmentId=o[1].split("Parent=")[1])}return s},av=t=>t.url?t.url:t.toString(),Hge=()=>`1-${qge()}-${Wge()}`,$ge=()=>{const t=new Uint8Array(16);return lR(t),`${hR(t)}`},W7=()=>{const t=new Uint8Array(8);return lR(t),hR(t)},qge=()=>Math.floor(Date.now()/1e3).toString(16),Wge=()=>{const t=new Uint8Array(12);return lR(t),hR(t)},hR=t=>{let e="";for(let n=0;n<t.length;n++)e+=U7[t[n]];return e};class Gge{constructor(e,n,r=s=>2e3*Math.pow(2,s-1)){this.handler=e,this.retries=n,this.backoff=r}async handle(e){let n=this.retries;for(;;)try{const r=await this.handler.handle(e);if(Lge(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!cR(r)&&!uR(r))throw new Error(`${r}`);if(n<=0)throw r;n--,await this.sleep(this.backoff(this.retries-n))}}async sleep(e){return new Promise(n=>setTimeout(n,e))}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}}const jc="cwr_c",Uv="cwr_i",Fv="cwr_s",zv="cwr_u",Vge=3e4,Kge="arw-module",_U="CWR: Cannot dispatch; no AWS credentials.";class Yge{constructor(e,n,r,s,o){this.disableCodes=["403","404"],this.shouldPurgeCredentials=!0,this.dispatchFetch=async()=>{if(this.doRequest()){const a=this.createRequest();return be.info(`Dispatching ${a.RumEvents.length} events via fetch`),this.rum.sendFetch(a).catch(this.handleReject)}},this.dispatchBeacon=async()=>{if(this.doRequest()){const a=this.createRequest();return be.info(`Dispatching ${a.RumEvents.length} events via beacon`),this.rum.sendBeacon(a).catch(()=>this.rum.sendFetch(a))}},this.dispatchFetchFailSilent=async()=>this.dispatchFetch().catch(a=>{be.error("Dispatch fetch failed silently:",a)}),this.dispatchBeaconFailSilent=async()=>this.dispatchBeacon().catch(a=>{be.error("Dispatch beacon failed silently:",a)}),this.flushSync=()=>{if(document.visibilityState==="hidden"&&this.doRequest(!0)){let a=this.rum.sendBeacon,u=this.rum.sendFetch;this.config.useBeacon||([a,u]=[u,a]);const c=this.createRequest(!0);be.debug(`Flushing ${c.RumEvents.length} events on page hide`),a(c).catch(()=>u(c)).catch(f=>{be.error("Page hide flush failed:",f)})}},this.handleReject=a=>{throw a instanceof Error&&(a.message==="403"&&this.config.signing&&this.shouldPurgeCredentials?(this.shouldPurgeCredentials=!1,this.forceRebuildClient()):this.disableCodes.includes(a.message)&&(be.error("Dispatch failed with status code:",a.message),this.disable())),a},this.defaultClientBuilder=(a,u,c,f)=>{const p=c&&this.signingConfigFactory?this.signingConfigFactory(c,u):void 0;return new wge({fetchRequestHandler:new Gge(new Tge({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new _ge,endpoint:a,region:u,credentials:c,headers:this.headers,compressionStrategy:f},p)},this.applicationId=e,this.region=n,this.endpoint=r,this.eventCache=s,this.enabled=!0,this.buildClient=o.clientBuilder||this.defaultClientBuilder,this.config=o,this.headers=o.headers,this.startDispatchTimer(),o.signing?this.rum={sendFetch:()=>Promise.reject(new Error(_U)),sendBeacon:()=>Promise.reject(new Error(_U))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${jc}_${e}`:jc,this.identityStorageKey=this.config.cookieAttributes.unique?`${Uv}_${e}`:Uv}enable(){this.enabled=!0,this.startDispatchTimer()}disable(){this.stopDispatchTimer(),this.enabled=!1,be.warn("Dispatch disabled")}setAwsCredentials(e){this.credentialProvider=e,this.rum=this.buildClient(this.endpoint,this.region,e,this.config.compressionStrategy),typeof e=="function"&&e()}setCognitoCredentialProviderFactory(e){this.cognitoCredentialProviderFactory=e}setSigningConfigFactory(e){this.signingConfigFactory=e}setCognitoCredentials(e,n){this.identityPoolId=e,this.guestRoleArn=n,this.cognitoCredentialProviderFactory&&this.setAwsCredentials(this.cognitoCredentialProviderFactory(this.config,this.applicationId,e,n))}startDispatchTimer(){document.addEventListener("visibilitychange",this.flushSync),document.addEventListener("pagehide",this.flushSync),!(this.config.dispatchInterval<=0||this.dispatchTimerId)&&(this.dispatchTimerId=window.setInterval(this.dispatchFetchFailSilent,this.config.dispatchInterval))}stopDispatchTimer(){document.removeEventListener("visibilitychange",this.flushSync),document.removeEventListener("pagehide",this.flushSync),this.dispatchTimerId&&(window.clearInterval(this.dispatchTimerId),this.dispatchTimerId=void 0)}doRequest(e=!1){return this.enabled?e&&this.eventCache.hasCandidates()?!0:this.eventCache.hasEvents():!1}createRequest(e=!1){return{BatchId:ih(),AppMonitorDetails:this.eventCache.getAppMonitorDetails(),UserDetails:this.eventCache.getUserDetails(),SessionMetadata:JSON.stringify(this.eventCache.getCommonMetadata()),RumEvents:this.eventCache.getEventBatch(e),Alias:this.config.alias}}forceRebuildClient(){be.warn("Removing credentials from local storage"),localStorage.removeItem(this.credentialStorageKey),this.identityPoolId?(be.info("Rebuilding client with fresh cognito credentials"),localStorage.removeItem(this.identityStorageKey),this.setCognitoCredentials(this.identityPoolId,this.guestRoleArn)):this.credentialProvider&&(be.info("Rebuilding client with most recently passed provider"),this.setAwsCredentials(this.credentialProvider))}}const G7={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),G7[t]=e}function Zge(t){let e="";for(let n=0;n<t.byteLength;n++)e+=G7[t[n]];return e}class Xge{format(e){const n=[];for(const o of Object.keys(e)){const a=__(o);n.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[o]))}const r=new Uint8Array(n.reduce((o,a)=>o+a.byteLength,0));let s=0;for(const o of n)r.set(o,s),s+=o.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?xs.boolTrue:xs.boolFalse]);case"byte":return Uint8Array.from([xs.byte,e.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,xs.short),n.setInt16(1,e.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,xs.integer),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const s=new Uint8Array(9);return s[0]=xs.long,s.set(e.value.bytes,1),s;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,xs.byteArray),o.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(o.buffer);return a.set(e.value,3),a;case"string":const u=__(e.value),c=new DataView(new ArrayBuffer(3+u.byteLength));c.setUint8(0,xs.string),c.setUint16(1,u.byteLength,!1);const f=new Uint8Array(c.buffer);return f.set(u,3),f;case"timestamp":const p=new Uint8Array(9);return p[0]=xs.timestamp,p.set(pR.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!Qge.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=xs.uuid,g.set(fge(e.value.replace(/-/g,"")),1),g}}}var xs;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(xs||(xs={}));const Qge=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class pR{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,s=Math.abs(Math.round(e));r>-1&&s>0;r--,s/=256)n[r]=s;return e<0&&AU(n),new pR(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&AU(e),parseInt(Ll(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function AU(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Jge="X-Amz-Algorithm",eme="X-Amz-Credential",V7="X-Amz-Date",tme="X-Amz-SignedHeaders",nme="X-Amz-Expires",K7="X-Amz-Signature",Y7="X-Amz-Security-Token",Z7="authorization",X7=V7.toLowerCase(),rme="date",sme=[Z7,X7,rme],ome=K7.toLowerCase(),T_="x-amz-content-sha256",ime=Y7.toLowerCase(),ame={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},lme=/^proxy-/,ume=/^sec-/,Zw="AWS4-HMAC-SHA256",cme="AWS4-HMAC-SHA256-PAYLOAD",dme="UNSIGNED-PAYLOAD",fme=50,Q7="aws4_request",hme=3600*24*7,pme=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===ome)continue;const s=Ul(r);e.push(s);const o=t[r];typeof o=="string"?n[s]=`${s}=${Ul(o)}`:Array.isArray(o)&&(n[s]=o.slice(0).reduce((a,u)=>a.concat([`${s}=${Ul(u)}`]),[]).sort().join("&"))}return e.sort().map(r=>n[r]).filter(r=>r).join("&")},gme=t=>mme(t).toISOString().replace(/\.\d{3}Z$/,"Z"),mme=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class vme{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:n,region:r,service:s,sha256:o,uriEscapePath:a=!0}){this.service=s,this.sha256=o,this.uriEscapePath=a,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=SU(r),this.credentialProvider=SU(n)}createCanonicalRequest(e,n,r){const s=Object.keys(n).sort();return`${e.method}
|
|
230
|
+
`);try{ee=JSON.parse(de),fe=!0}catch{ee=de}}fe&&(s&&await s(ee),r&&(ee=await r(ee))),n?.({data:ee,event:$,id:g,retry:E}),ne.length&&(yield ee)}}}finally{w.removeEventListener("abort",k),I.releaseLock()}break}catch(T){if(e?.(T),a!==void 0&&C>=a)break;const R=Math.min(E*2**(C-1),u??3e4);await m(R)}}}()}},Wpe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Gpe=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Vpe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},O7=({allowReserved:t,explode:e,name:n,style:r,value:s})=>{if(!e){const u=(t?s:s.map(c=>encodeURIComponent(c))).join(Gpe(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const o=Wpe(r),a=s.map(u=>r==="label"||r==="simple"?t?u:encodeURIComponent(u):db({allowReserved:t,name:n,value:u})).join(o);return r==="label"||r==="matrix"?o+a:a},db=({allowReserved:t,name:e,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${t?n:encodeURIComponent(n)}`},N7=({allowReserved:t,explode:e,name:n,style:r,value:s,valueOnly:o})=>{if(s instanceof Date)return o?s.toISOString():`${n}=${s.toISOString()}`;if(r!=="deepObject"&&!e){let c=[];Object.entries(s).forEach(([p,g])=>{c=[...c,p,t?g:encodeURIComponent(g)]});const f=c.join(",");switch(r){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}const a=Vpe(r),u=Object.entries(s).map(([c,f])=>db({allowReserved:t,name:r==="deepObject"?`${n}[${c}]`:c,value:f})).join(a);return r==="label"||r==="matrix"?a+u:u},Kpe=/\{[^{}]+\}/g,Ype=({path:t,url:e})=>{let n=e;const r=e.match(Kpe);if(r)for(const s of r){let o=!1,a=s.substring(1,s.length-1),u="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),u="label"):a.startsWith(";")&&(a=a.substring(1),u="matrix");const c=t[a];if(c==null)continue;if(Array.isArray(c)){n=n.replace(s,O7({explode:o,name:a,style:u,value:c}));continue}if(typeof c=="object"){n=n.replace(s,N7({explode:o,name:a,style:u,value:c,valueOnly:!0}));continue}if(u==="matrix"){n=n.replace(s,`;${db({name:a,value:c})}`);continue}const f=encodeURIComponent(u==="label"?`.${c}`:c);n=n.replace(s,f)}return n},Zpe=({baseUrl:t,path:e,query:n,querySerializer:r,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let a=(t??"")+o;e&&(a=Ype({path:e,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function m4(t){const e=t.body!==void 0;if(e&&t.bodySerializer)return"serializedBody"in t?t.serializedBody!==void 0&&t.serializedBody!==""?t.serializedBody:null:t.body!==""?t.body:null;if(e)return t.body}const Xpe=async(t,e)=>{const n=typeof e=="function"?await e(t):e;if(n)return t.scheme==="bearer"?`Bearer ${n}`:t.scheme==="basic"?`Basic ${btoa(n)}`:n},M7=({parameters:t={},...e}={})=>r=>{const s=[];if(r&&typeof r=="object")for(const o in r){const a=r[o];if(a==null)continue;const u=t[o]||e;if(Array.isArray(a)){const c=O7({allowReserved:u.allowReserved,explode:!0,name:o,style:"form",value:a,...u.array});c&&s.push(c)}else if(typeof a=="object"){const c=N7({allowReserved:u.allowReserved,explode:!0,name:o,style:"deepObject",value:a,...u.object});c&&s.push(c)}else{const c=db({allowReserved:u.allowReserved,name:o,value:a});c&&s.push(c)}}return s.join("&")},Qpe=t=>{if(!t)return"stream";const e=t.split(";")[0]?.trim();if(e){if(e.startsWith("application/json")||e.endsWith("+json"))return"json";if(e==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>e.startsWith(n)))return"blob";if(e.startsWith("text/"))return"text"}},Jpe=(t,e)=>e?!!(t.headers.has(e)||t.query?.[e]||t.headers.get("Cookie")?.includes(`${e}=`)):!1,ege=async({security:t,...e})=>{for(const n of t){if(Jpe(e,n.name))continue;const r=await Xpe(n,e.auth);if(!r)continue;const s=n.name??"Authorization";switch(n.in){case"query":e.query||(e.query={}),e.query[s]=r;break;case"cookie":e.headers.append("Cookie",`${s}=${r}`);break;default:e.headers.set(s,r);break}}},v4=t=>Zpe({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:M7(t.querySerializer),url:t.url}),y4=(t,e)=>{const n={...t,...e};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=P7(t.headers,e.headers),n},tge=t=>{const e=[];return t.forEach((n,r)=>{e.push([r,n])}),e},P7=(...t)=>{const e=new Headers;for(const n of t){if(!n)continue;const r=n instanceof Headers?tge(n):Object.entries(n);for(const[s,o]of r)if(o===null)e.delete(s);else if(Array.isArray(o))for(const a of o)e.append(s,a);else o!==void 0&&e.set(s,typeof o=="object"?JSON.stringify(o):o)}return e};class Yw{fns=[];clear(){this.fns=[]}eject(e){const n=this.getInterceptorIndex(e);this.fns[n]&&(this.fns[n]=null)}exists(e){const n=this.getInterceptorIndex(e);return!!this.fns[n]}getInterceptorIndex(e){return typeof e=="number"?this.fns[e]?e:-1:this.fns.indexOf(e)}update(e,n){const r=this.getInterceptorIndex(e);return this.fns[r]?(this.fns[r]=n,e):!1}use(e){return this.fns.push(e),this.fns.length-1}}const nge=()=>({error:new Yw,request:new Yw,response:new Yw}),rge=M7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),sge={"Content-Type":"application/json"},k7=(t={})=>({...$pe,headers:sge,parseAs:"auto",querySerializer:rge,...t}),oge=(t={})=>{let e=y4(k7(),t);const n=()=>({...e}),r=f=>(e=y4(e,f),n()),s=nge(),o=async f=>{const p={...e,...f,fetch:f.fetch??e.fetch??globalThis.fetch,headers:P7(e.headers,f.headers),serializedBody:void 0};p.security&&await ege({...p,security:p.security}),p.requestValidator&&await p.requestValidator(p),p.body!==void 0&&p.bodySerializer&&(p.serializedBody=p.bodySerializer(p.body)),(p.body===void 0||p.serializedBody==="")&&p.headers.delete("Content-Type");const g=v4(p);return{opts:p,url:g}},a=async f=>{const{opts:p,url:g}=await o(f),m={redirect:"follow",...p,body:m4(p)};let y=new Request(g,m);for(const M of s.request.fns)M&&(y=await M(y,p));const S=p.fetch;let E;try{E=await S(y)}catch(M){let O=M;for(const I of s.error.fns)I&&(O=await I(M,void 0,y,p));if(O=O||{},p.throwOnError)throw O;return p.responseStyle==="data"?void 0:{error:O,request:y,response:void 0}}for(const M of s.response.fns)M&&(E=await M(E,y,p));const C={request:y,response:E};if(E.ok){const M=(p.parseAs==="auto"?Qpe(E.headers.get("Content-Type")):p.parseAs)??"json";if(E.status===204||E.headers.get("Content-Length")==="0"){let I;switch(M){case"arrayBuffer":case"blob":case"text":I=await E[M]();break;case"formData":I=new FormData;break;case"stream":I=E.body;break;default:I={};break}return p.responseStyle==="data"?I:{data:I,...C}}let O;switch(M){case"arrayBuffer":case"blob":case"formData":case"text":O=await E[M]();break;case"json":{const I=await E.text();O=I?JSON.parse(I):{};break}case"stream":return p.responseStyle==="data"?E.body:{data:E.body,...C}}return M==="json"&&(p.responseValidator&&await p.responseValidator(O),p.responseTransformer&&(O=await p.responseTransformer(O))),p.responseStyle==="data"?O:{data:O,...C}}const w=await E.text();let _;try{_=JSON.parse(w)}catch{}const T=_??w;let R=T;for(const M of s.error.fns)M&&(R=await M(T,E,y,p));if(R=R||{},p.throwOnError)throw R;return p.responseStyle==="data"?void 0:{error:R,...C}},u=f=>p=>a({...p,method:f}),c=f=>async p=>{const{opts:g,url:m}=await o(p);return qpe({...g,body:g.body,headers:g.headers,method:f,onRequest:async(y,S)=>{let E=new Request(y,S);for(const C of s.request.fns)C&&(E=await C(E,g));return E},serializedBody:m4(g),url:m})};return{buildUrl:v4,connect:u("CONNECT"),delete:u("DELETE"),get:u("GET"),getConfig:n,head:u("HEAD"),interceptors:s,options:u("OPTIONS"),patch:u("PATCH"),post:u("POST"),put:u("PUT"),request:a,setConfig:r,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:u("TRACE")}},Ze=oge(k7({baseUrl:"https://api.remit.example.com"}));let b4=!1;const ige=t=>{b4||(Ze.interceptors.request.use(async e=>{const n=await t.getToken();return n&&e.headers.set("Authorization",`Bearer ${n}`),e}),b4=!0)},age=({children:t})=>D.jsx(D.Fragment,{children:t}),lge={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:age,Account:({fallback:t=null})=>D.jsx(D.Fragment,{children:t})},D7=A.createContext(lge),uge=D7.Provider,bAe=()=>A.useContext(D7),cge=(t,e)=>{X8(t,e.meta)&&Bl(t)},dge=(t,e,n,r)=>{X8(t,r.meta)&&Bl(t)},__=t=>new TextEncoder().encode(t),L7={},A_={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),L7[t]=e,A_[e]=t}function fge(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 A_)e[n/2]=A_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e}function Ll(t){let e="";for(let n=0;n<t.byteLength;n++)e+=L7[t[n]];return e}const Nh=t=>t instanceof Uint8Array?t:typeof t=="string"?__(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),hge=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";class Ei{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const n=new Ei({...e,headers:{...e.headers}});return n.query&&(n.query=pge(n.query)),n}static isInstance(e){if(!e)return!1;const n=e;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Ei.clone(this)}}function pge(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return{...e,[n]:Array.isArray(r)?[...r]:r}},{})}class Mh{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const n=e;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const S4=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Ul=t=>encodeURIComponent(t).replace(/[!'()*]/g,gge),gge=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function aR(t){const e=[];for(let n of Object.keys(t).sort()){const r=t[n];if(n=Ul(n),Array.isArray(r))for(let s=0,o=r.length;s<o;s++)e.push(`${n}=${Ul(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${Ul(r)}`),e.push(s)}}return e.join("&")}const lm="[aws-rum-web:unknown.unknown]";class be{static configure(e){be.debugEnabled=e}static getCallerInfo(){var e,n;try{const r=new Error().stack;if(!r)return lm;const s=r.split(`
|
|
231
|
+
`);if(s.length<4)return lm;const o=s[3];if(!o)return lm;const a=o.match(/at (?:(.+?)\s+\()?/);if(a&&a.length>=2){const u=a[1].trim(),c=u.split(".");if(c.length>=2){const f=(e=c[c.length-2])!==null&&e!==void 0?e:"unknown",p=(n=c[c.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${p}]`}return`[aws-rum-web:${u}]`}}catch{}return lm}static info(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.info(r,e,...n)}static debug(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.debug(r,e,...n)}static warn(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.warn(r,e,...n)}static error(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.error(r,e,...n)}}be.debugEnabled=!1;const E4=2048,C4=.2,mge=()=>typeof CompressionStream<"u",vge=async t=>{const e=new Blob([t]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},yge=async t=>{const e=t.length;if(be.debug(`compressIfBeneficial called, payload size: ${e}B`),!mge())return be.debug("CompressionStream not supported, skipping compression"),{body:t,compressed:!1};if(e<E4)return be.debug(`Payload size ${e}B below threshold ${E4}B, skipping compression`),{body:t,compressed:!1};const n=await vge(t),r=1-n.length/e;return r>=C4?(be.debug(`Compressed ${e}B -> ${n.length}B (${(r*100).toFixed(1)}% reduction)`),{body:n,compressed:!0}):(be.debug(`Compression ratio ${(r*100).toFixed(1)}% below threshold ${C4*100}%, skipping`),{body:t,compressed:!1})},bge="POST",Sge="application/json",Ege="text/plain;charset=UTF-8",Cge=64e3;class wge{constructor(e,n){this.sendFetch=async r=>{var s,o;const a=JSON.stringify(w4(r)),u=(o=(s=this.config.compressionStrategy)===null||s===void 0?void 0:s.enabled)!==null&&o!==void 0?o:!1,{body:c,compressed:f}=u?await yge(a):{body:a,compressed:!1},p=await this.getHttpRequestOptions(r,c,Sge,f);let g=new Ei(p);return this.signing&&(g=await this.signing.sign(g)),this.config.fetchRequestHandler.handle(g)},this.sendBeacon=async r=>{const s=JSON.stringify(w4(r));if(s.length>Cge)throw new Error("Payload too large for sendBeacon");const o=await this.getHttpRequestOptions(r,s,Ege,!1);let a=new Ei(o);return this.signing&&(a=await this.signing.presign(a)),this.config.beaconRequestHandler.handle(a)},this.getHttpRequestOptions=async(r,s,o,a)=>{const u=this.config.endpoint.pathname.replace(/\/$/,""),c=Object.assign({"content-type":o,host:this.config.endpoint.host},this.config.headers);a&&(c["Content-Encoding"]="gzip");const f={method:bge,protocol:this.config.endpoint.protocol,port:Number(this.config.endpoint.port)||void 0,headers:c,hostname:this.config.endpoint.hostname,path:`${u}/appmonitors/${r.AppMonitorDetails.id}`,body:s};return this.signing?Object.assign(Object.assign({},f),{headers:Object.assign(Object.assign({},f.headers),{"X-Amz-Content-Sha256":await this.signing.hashAndEncode(s)})}):f},this.config=e,this.signing=n}}const w4=t=>{const e=[];t.RumEvents.forEach(r=>e.push(xge(r)));let n={BatchId:t.BatchId,AppMonitorDetails:t.AppMonitorDetails,UserDetails:t.UserDetails,RumEvents:e};return t.SessionMetadata&&(n=Object.assign(Object.assign({},n),{SessionMetadata:t.SessionMetadata})),t.Alias&&(n=Object.assign(Object.assign({},n),{Alias:t.Alias})),n},xge=t=>({id:t.id,timestamp:Math.round(t.timestamp.getTime()/1e3),type:t.type,metadata:t.metadata,details:t.details});class _ge{handle(e){const n=this.sendBeacon(e);return new Promise((r,s)=>{n?r({response:new Mh({statusCode:200})}):s()})}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}sendBeacon(e){let n=e.path;if(e.query){const o=aR(e.query);o&&(n+=`?${o}`)}const{port:r}=e,s=`${e.protocol}//${e.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(s,e.body)}}const Age=(t=0)=>new Promise((e,n)=>{t&&setTimeout(()=>{const r=new Error(`Request did not complete within ${t} ms`);r.name="TimeoutError",n(r)},t)});let Tge=class{constructor({fetchFunction:e,requestTimeout:n}={}){this.requestTimeout=n,this.fetchFunction=e}destroy(){}handle(e,{abortSignal:n}={}){const r=this.requestTimeout;if(n?.aborted){const m=new Error("Request aborted");return m.name="AbortError",Promise.reject(m)}let s=e.path;if(e.query){const m=aR(e.query);m&&(s+=`?${m}`)}const{port:o,method:a}=e,u=`${e.protocol}//${e.hostname}${o?`:${o}`:""}${s}`,f={body:a==="GET"||a==="HEAD"?void 0:e.body,headers:new Headers(e.headers),method:a};typeof AbortController<"u"&&(f.signal=n);const p=new Request(u,f),g=[this.fetchFunction.apply(window,[p]).then(m=>{const y=m.headers,S={};for(const C of y.entries())S[C[0]]=C[1];return m.body!==void 0?{response:new Mh({headers:S,statusCode:m.status,body:m.body})}:m.blob().then(C=>({response:new Mh({headers:S,statusCode:m.status,body:C})}))}),Age(r)];return n&&g.push(new Promise((m,y)=>{n.onabort=()=>{const S=new Error("Request aborted");S.name="AbortError",y(S)}})),Promise.race(g)}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}},um;const Rge=new Uint8Array(16);function Ige(){if(!um&&(um=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!um))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return um(Rge)}const Jn=[];for(let t=0;t<256;++t)Jn.push((t+256).toString(16).slice(1));function Oge(t,e=0){return Jn[t[e+0]]+Jn[t[e+1]]+Jn[t[e+2]]+Jn[t[e+3]]+"-"+Jn[t[e+4]]+Jn[t[e+5]]+"-"+Jn[t[e+6]]+Jn[t[e+7]]+"-"+Jn[t[e+8]]+Jn[t[e+9]]+"-"+Jn[t[e+10]]+Jn[t[e+11]]+Jn[t[e+12]]+Jn[t[e+13]]+Jn[t[e+14]]+Jn[t[e+15]]}const Nge=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),x4={randomUUID:Nge};function ih(t,e,n){if(x4.randomUUID&&!t)return x4.randomUUID();t=t||{};const r=t.random||(t.rng||Ige)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Oge(r)}const lR=t=>{if(crypto)return crypto.getRandomValues(t);if(msCrypto)return msCrypto.getRandomValues(t);throw new Error("No crypto library found.")},U7=[];for(let t=0;t<256;t++)U7[t]=(t+256).toString(16).substr(1);const fb="X-Amzn-Trace-Id",hb="traceparent",Mge=2,Pge=32,kge=16,Dge=4,F7=(t,e)=>Array.isArray(e)?e.some(n=>n.test(t)):e,z7={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},Lge=t=>200<=t&&t<300,j7=t=>Math.floor(t/100)===4,uR=t=>Math.floor(t/100)===5,cR=t=>t===429,B7=(t,e)=>{const n=e.urlsToInclude.some(s=>s.test(t)),r=e.urlsToExclude.some(s=>s.test(t));return n&&!r},wc=()=>Date.now()/1e3,Uge=(t,e,n)=>{const r={request:{}};return r.request.method=e?.method?e.method:"GET",r.request.traced=n,r.request.url=av(t),r},H7=(t,e,n,r)=>({version:"1.0.0",name:t,origin:"AWS::RUM::AppMonitor",id:W7(),start_time:e,trace_id:n?$ge():Hge(),end_time:void 0,subsegments:[],in_progress:!1}),$7=(t,e,n)=>{const r={id:W7(),name:t,start_time:e,end_time:void 0,in_progress:!1,namespace:t.endsWith(".amazonaws.com")?"aws":"remote"};return n&&(r.http=n),r},q7=t=>{try{return t.hostname?t.hostname:t.url?new URL(t.url).hostname:new URL(t.toString()).hostname}catch{return window.location.hostname}},Fge=(t,e,n,r)=>{t.headers||(t.headers={}),r?t.headers[hb]=fR(e,n):t.headers[fb]=dR(e,n)},zge=(t,e,n,r)=>{r?t.set(hb,fR(e,n)):t.set(fb,dR(e,n))},dR=(t,e)=>"Root="+t+";Parent="+e+";Sampled=1",fR=(t,e)=>"00-"+t+"-"+e+"-01",jge=t=>t?.length===Dge&&t[0].length===Mge&&t[1].length===Pge&&t[2].length===kge&&(t[3]==="00"||t[3]==="01"),Bge=(t,e)=>{var n,r;const s={};if(t)if(e){const o=(n=t.get(hb))===null||n===void 0?void 0:n.split("-");o&&jge(o)&&(s.traceId=o[1],s.segmentId=o[2])}else{const o=(r=t.get(fb))===null||r===void 0?void 0:r.split(";");o?.length===3&&(s.traceId=o[0].split("Root=")[1],s.segmentId=o[1].split("Parent=")[1])}return s},av=t=>t.url?t.url:t.toString(),Hge=()=>`1-${qge()}-${Wge()}`,$ge=()=>{const t=new Uint8Array(16);return lR(t),`${hR(t)}`},W7=()=>{const t=new Uint8Array(8);return lR(t),hR(t)},qge=()=>Math.floor(Date.now()/1e3).toString(16),Wge=()=>{const t=new Uint8Array(12);return lR(t),hR(t)},hR=t=>{let e="";for(let n=0;n<t.length;n++)e+=U7[t[n]];return e};class Gge{constructor(e,n,r=s=>2e3*Math.pow(2,s-1)){this.handler=e,this.retries=n,this.backoff=r}async handle(e){let n=this.retries;for(;;)try{const r=await this.handler.handle(e);if(Lge(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!cR(r)&&!uR(r))throw new Error(`${r}`);if(n<=0)throw r;n--,await this.sleep(this.backoff(this.retries-n))}}async sleep(e){return new Promise(n=>setTimeout(n,e))}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}}const jc="cwr_c",Uv="cwr_i",Fv="cwr_s",zv="cwr_u",Vge=3e4,Kge="arw-module",_4="CWR: Cannot dispatch; no AWS credentials.";class Yge{constructor(e,n,r,s,o){this.disableCodes=["403","404"],this.shouldPurgeCredentials=!0,this.dispatchFetch=async()=>{if(this.doRequest()){const a=this.createRequest();return be.info(`Dispatching ${a.RumEvents.length} events via fetch`),this.rum.sendFetch(a).catch(this.handleReject)}},this.dispatchBeacon=async()=>{if(this.doRequest()){const a=this.createRequest();return be.info(`Dispatching ${a.RumEvents.length} events via beacon`),this.rum.sendBeacon(a).catch(()=>this.rum.sendFetch(a))}},this.dispatchFetchFailSilent=async()=>this.dispatchFetch().catch(a=>{be.error("Dispatch fetch failed silently:",a)}),this.dispatchBeaconFailSilent=async()=>this.dispatchBeacon().catch(a=>{be.error("Dispatch beacon failed silently:",a)}),this.flushSync=()=>{if(document.visibilityState==="hidden"&&this.doRequest(!0)){let a=this.rum.sendBeacon,u=this.rum.sendFetch;this.config.useBeacon||([a,u]=[u,a]);const c=this.createRequest(!0);be.debug(`Flushing ${c.RumEvents.length} events on page hide`),a(c).catch(()=>u(c)).catch(f=>{be.error("Page hide flush failed:",f)})}},this.handleReject=a=>{throw a instanceof Error&&(a.message==="403"&&this.config.signing&&this.shouldPurgeCredentials?(this.shouldPurgeCredentials=!1,this.forceRebuildClient()):this.disableCodes.includes(a.message)&&(be.error("Dispatch failed with status code:",a.message),this.disable())),a},this.defaultClientBuilder=(a,u,c,f)=>{const p=c&&this.signingConfigFactory?this.signingConfigFactory(c,u):void 0;return new wge({fetchRequestHandler:new Gge(new Tge({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new _ge,endpoint:a,region:u,credentials:c,headers:this.headers,compressionStrategy:f},p)},this.applicationId=e,this.region=n,this.endpoint=r,this.eventCache=s,this.enabled=!0,this.buildClient=o.clientBuilder||this.defaultClientBuilder,this.config=o,this.headers=o.headers,this.startDispatchTimer(),o.signing?this.rum={sendFetch:()=>Promise.reject(new Error(_4)),sendBeacon:()=>Promise.reject(new Error(_4))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${jc}_${e}`:jc,this.identityStorageKey=this.config.cookieAttributes.unique?`${Uv}_${e}`:Uv}enable(){this.enabled=!0,this.startDispatchTimer()}disable(){this.stopDispatchTimer(),this.enabled=!1,be.warn("Dispatch disabled")}setAwsCredentials(e){this.credentialProvider=e,this.rum=this.buildClient(this.endpoint,this.region,e,this.config.compressionStrategy),typeof e=="function"&&e()}setCognitoCredentialProviderFactory(e){this.cognitoCredentialProviderFactory=e}setSigningConfigFactory(e){this.signingConfigFactory=e}setCognitoCredentials(e,n){this.identityPoolId=e,this.guestRoleArn=n,this.cognitoCredentialProviderFactory&&this.setAwsCredentials(this.cognitoCredentialProviderFactory(this.config,this.applicationId,e,n))}startDispatchTimer(){document.addEventListener("visibilitychange",this.flushSync),document.addEventListener("pagehide",this.flushSync),!(this.config.dispatchInterval<=0||this.dispatchTimerId)&&(this.dispatchTimerId=window.setInterval(this.dispatchFetchFailSilent,this.config.dispatchInterval))}stopDispatchTimer(){document.removeEventListener("visibilitychange",this.flushSync),document.removeEventListener("pagehide",this.flushSync),this.dispatchTimerId&&(window.clearInterval(this.dispatchTimerId),this.dispatchTimerId=void 0)}doRequest(e=!1){return this.enabled?e&&this.eventCache.hasCandidates()?!0:this.eventCache.hasEvents():!1}createRequest(e=!1){return{BatchId:ih(),AppMonitorDetails:this.eventCache.getAppMonitorDetails(),UserDetails:this.eventCache.getUserDetails(),SessionMetadata:JSON.stringify(this.eventCache.getCommonMetadata()),RumEvents:this.eventCache.getEventBatch(e),Alias:this.config.alias}}forceRebuildClient(){be.warn("Removing credentials from local storage"),localStorage.removeItem(this.credentialStorageKey),this.identityPoolId?(be.info("Rebuilding client with fresh cognito credentials"),localStorage.removeItem(this.identityStorageKey),this.setCognitoCredentials(this.identityPoolId,this.guestRoleArn)):this.credentialProvider&&(be.info("Rebuilding client with most recently passed provider"),this.setAwsCredentials(this.credentialProvider))}}const G7={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),G7[t]=e}function Zge(t){let e="";for(let n=0;n<t.byteLength;n++)e+=G7[t[n]];return e}class Xge{format(e){const n=[];for(const o of Object.keys(e)){const a=__(o);n.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[o]))}const r=new Uint8Array(n.reduce((o,a)=>o+a.byteLength,0));let s=0;for(const o of n)r.set(o,s),s+=o.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?xs.boolTrue:xs.boolFalse]);case"byte":return Uint8Array.from([xs.byte,e.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,xs.short),n.setInt16(1,e.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,xs.integer),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const s=new Uint8Array(9);return s[0]=xs.long,s.set(e.value.bytes,1),s;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,xs.byteArray),o.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(o.buffer);return a.set(e.value,3),a;case"string":const u=__(e.value),c=new DataView(new ArrayBuffer(3+u.byteLength));c.setUint8(0,xs.string),c.setUint16(1,u.byteLength,!1);const f=new Uint8Array(c.buffer);return f.set(u,3),f;case"timestamp":const p=new Uint8Array(9);return p[0]=xs.timestamp,p.set(pR.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!Qge.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=xs.uuid,g.set(fge(e.value.replace(/-/g,"")),1),g}}}var xs;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(xs||(xs={}));const Qge=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class pR{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,s=Math.abs(Math.round(e));r>-1&&s>0;r--,s/=256)n[r]=s;return e<0&&A4(n),new pR(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&A4(e),parseInt(Ll(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function A4(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Jge="X-Amz-Algorithm",eme="X-Amz-Credential",V7="X-Amz-Date",tme="X-Amz-SignedHeaders",nme="X-Amz-Expires",K7="X-Amz-Signature",Y7="X-Amz-Security-Token",Z7="authorization",X7=V7.toLowerCase(),rme="date",sme=[Z7,X7,rme],ome=K7.toLowerCase(),T_="x-amz-content-sha256",ime=Y7.toLowerCase(),ame={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},lme=/^proxy-/,ume=/^sec-/,Zw="AWS4-HMAC-SHA256",cme="AWS4-HMAC-SHA256-PAYLOAD",dme="UNSIGNED-PAYLOAD",fme=50,Q7="aws4_request",hme=3600*24*7,pme=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===ome)continue;const s=Ul(r);e.push(s);const o=t[r];typeof o=="string"?n[s]=`${s}=${Ul(o)}`:Array.isArray(o)&&(n[s]=o.slice(0).reduce((a,u)=>a.concat([`${s}=${Ul(u)}`]),[]).sort().join("&"))}return e.sort().map(r=>n[r]).filter(r=>r).join("&")},gme=t=>mme(t).toISOString().replace(/\.\d{3}Z$/,"Z"),mme=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class vme{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:n,region:r,service:s,sha256:o,uriEscapePath:a=!0}){this.service=s,this.sha256=o,this.uriEscapePath=a,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=S4(r),this.credentialProvider=S4(n)}createCanonicalRequest(e,n,r){const s=Object.keys(n).sort();return`${e.method}
|
|
232
232
|
${this.getCanonicalPath(e)}
|
|
233
233
|
${pme(e)}
|
|
234
234
|
${s.map(o=>`${o}:${n[o]}`).join(`
|
|
@@ -238,58 +238,58 @@ ${s.join(";")}
|
|
|
238
238
|
${r}`}async createStringToSign(e,n,r,s){const o=new this.sha256;o.update(Nh(r));const a=await o.digest();return`${s}
|
|
239
239
|
${e}
|
|
240
240
|
${n}
|
|
241
|
-
${Ll(a)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const n=[];for(const o of e.split("/"))o?.length!==0&&o!=="."&&(o===".."?n.pop():n.push(o));const r=`${e?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&e?.endsWith("/")?"/":""}`;return Ul(r).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){const n=gme(e).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}const cm={},Xw=[],Qw=(t,e,n)=>`${t}/${e}/${n}/${Q7}`,yme=async(t,e,n,r,s)=>{const o=await
|
|
242
|
-
`);return this.signString(E,{signingDate:r,signingRegion:c,signingService:a,eventStreamCredentials:u})}async signMessage(e,{signingDate:n=new Date,signingRegion:r,signingService:s,eventStreamCredentials:o}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:n,signingRegion:r,signingService:s,priorSignature:e.priorSignature,eventStreamCredentials:o}).then(u=>({message:e.message,signature:u}))}async signString(e,{signingDate:n=new Date,signingRegion:r,signingService:s,eventStreamCredentials:o}={}){const a=o??await this.credentialProvider();this.validateResolvedCredentials(a);const u=r??await this.regionProvider(),{shortDate:c}=this.formatDate(n),f=new this.sha256(await this.getSigningKey(a,u,c,s));return f.update(Nh(e)),Ll(await f.digest())}async signRequest(e,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:s,signingRegion:o,signingService:a}={}){const u=await this.credentialProvider();this.validateResolvedCredentials(u);const c=o??await this.regionProvider(),f=IU(e),{longDate:p,shortDate:g}=this.formatDate(n),m=Qw(g,c,a??this.service);f.headers[X7]=p,u.sessionToken&&(f.headers[ime]=u.sessionToken);const y=await Jw(f,this.sha256);!bme(T_,f.headers)&&this.applyChecksum&&(f.headers[T_]=y);const S=RU(f,s,r),E=await this.getSignature(p,m,this.getSigningKey(u,c,g,a),this.createCanonicalRequest(f,S,y));return f.headers[Z7]=`${Zw} Credential=${u.accessKeyId}/${m}, SignedHeaders=${this.getCanonicalHeaderList(S)}, Signature=${E}`,f}async getSignature(e,n,r,s){const o=await this.createStringToSign(e,n,s,Zw),a=new this.sha256(await r);return a.update(Nh(o)),Ll(await a.digest())}getSigningKey(e,n,r,s){return yme(this.sha256,e,r,n,s||this.service)}}const Cme="rum",wme={expiresIn:60},xme=(t,e)=>{const n=new Eme({applyChecksum:!0,credentials:t,region:e,service:Cme,uriEscapePath:!0,sha256:zl});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,wme),hashAndEncode:async r=>{const s=new zl;return s.update(r),Zge(await s.digest()).toLowerCase()}}};function OU(t,e){return new Request(t,e)}function _me(t=0){return new Promise((e,n)=>{t&&setTimeout(()=>{const r=new Error(`Request did not complete within ${t} ms`);r.name="TimeoutError",n(r)},t)})}const ex={supported:void 0};class pb{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new pb(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(n=>n||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),ex.supported===void 0&&(ex.supported=typeof Request<"u"&&"keepalive"in OU("https://[::1]"))}destroy(){}async handle(e,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const s=r??this.config.requestTimeout,o=this.config.keepAlive===!0,a=this.config.credentials;if(n?.aborted){const _=NU(n);return Promise.reject(_)}let u=e.path;const c=aR(e.query||{});c&&(u+=`?${c}`),e.fragment&&(u+=`#${e.fragment}`);let f="";if(e.username!=null||e.password!=null){const _=e.username??"",T=e.password??"";f=`${_}:${T}@`}const{port:p,method:g}=e,m=`${e.protocol}//${f}${e.hostname}${p?`:${p}`:""}${u}`,y=g==="GET"||g==="HEAD"?void 0:e.body,S={body:y,headers:new Headers(e.headers),method:g,credentials:a};this.config?.cache&&(S.cache=this.config.cache),y&&(S.duplex="half"),typeof AbortController<"u"&&(S.signal=n),ex.supported&&(S.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(e));let E=()=>{};const C=OU(m,S),w=[fetch(C).then(_=>{const T=_.headers,R={};for(const O of T.entries())R[O[0]]=O[1];return _.body!=null?{response:new Mh({headers:R,reason:_.statusText,statusCode:_.status,body:_.body})}:_.blob().then(O=>({response:new Mh({headers:R,reason:_.statusText,statusCode:_.status,body:O})}))}),_me(s)];return n&&w.push(new Promise((_,T)=>{const R=()=>{const M=NU(n);T(M)};if(typeof n.addEventListener=="function"){const M=n;M.addEventListener("abort",R,{once:!0}),E=()=>M.removeEventListener("abort",R)}else n.onabort=R})),Promise.race(w).finally(E)}updateHttpClientConfig(e,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[e]=n,r))}httpHandlerConfigs(){return this.config??{}}}function NU(t){const e=t&&typeof t=="object"&&"reason"in t?t.reason:void 0;if(e){if(e instanceof Error){const s=new Error("Request aborted");return s.name="AbortError",s.cause=e,s}const r=new Error(String(e));return r.name="AbortError",r}const n=new Error("Request aborted");return n.name="AbortError",n}const tx=async t=>{const{value:e}=await t.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},Ame=async t=>{const{value:e}=await t.body.getReader().read();return String.fromCharCode.apply(null,e)},Tme="POST",Rme="application/x-www-form-urlencoded",Ime="https:",Ome="AssumeRoleWithWebIdentity",Nme="2011-06-15";class Mme{constructor(e){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:Ome,Version:Nme}),s=new URLSearchParams(Object.entries(r)).toString(),o=new Ei({method:Tme,headers:{"content-type":Rme,host:this.hostname},protocol:Ime,hostname:this.hostname,body:s}),{response:a}=await this.fetchRequestHandler.handle(o),u=await Ame(a);return{accessKeyId:u.split("<AccessKeyId>")[1].split("</AccessKeyId>")[0],secretAccessKey:u.split("<SecretAccessKey>")[1].split("</SecretAccessKey>")[0],sessionToken:u.split("<SessionToken>")[1].split("</SessionToken>")[0],expiration:new Date(u.split("<Expiration>")[1].split("</Expiration>")[0])}}catch(r){throw new Error(`CWR: Failed to retrieve credentials from STS: ${r}`)}},this.hostname=`sts.${e.region}.amazonaws.com`,this.fetchRequestHandler=e.fetchRequestHandler}}const Pme="POST",kme="application/x-amz-json-1.1",Dme="https:",Lme="AWSCognitoIdentityService.GetId",Ume="AWSCognitoIdentityService.GetOpenIdToken",Fme="AWSCognitoIdentityService.GetCredentialsForIdentity";class zme{constructor(e){var n;this.getId=async r=>{var s;let o=null;try{o=JSON.parse(localStorage.getItem(this.identityStorageKey))}catch(a){!((s=this.config)===null||s===void 0)&&s.debug&&be.error("Failed to parse stored identity:",a)}if(o&&o.IdentityId)return Promise.resolve(o);try{const a=JSON.stringify(r),u=this.getHttpRequest(Lme,a),c=await tx((await this.fetchRequestHandler.handle(u)).response);try{localStorage.setItem(this.identityStorageKey,JSON.stringify({IdentityId:c.IdentityId}))}catch(f){be.error("Failed to store identity:",f)}return c}catch(a){throw new Error(`CWR: Failed to retrieve Cognito identity: ${a}`)}},this.getOpenIdToken=async r=>{try{const s=JSON.stringify(r),o=this.getHttpRequest(Ume,s),{response:a}=await this.fetchRequestHandler.handle(o);return this.validateOpenIdTokenResponse(await tx(a))}catch(s){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve Cognito OpenId token: ${s}`)}},this.getCredentialsForIdentity=async r=>{try{const s=JSON.stringify({IdentityId:r}),o=this.getHttpRequest(Fme,s),{response:a}=await this.fetchRequestHandler.handle(o),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:p}=this.validateCredenentialsResponse(await tx(a));return{accessKeyId:u,secretAccessKey:f,sessionToken:p,expiration:new Date(c*1e3)}}catch(s){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve credentials for Cognito identity: ${s}`)}},this.validateOpenIdTokenResponse=r=>{if("IdentityId"in r&&"Token"in r)return r;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown OpenIdToken response")},this.validateCredenentialsResponse=r=>{if("IdentityId"in r&&"Credentials"in r)return r.Credentials;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown Credentials response")},this.getHttpRequest=(r,s)=>new Ei({method:Pme,headers:{"content-type":kme,"x-amz-target":r},protocol:Dme,hostname:this.hostname,body:s}),this.hostname=`cognito-identity.${e.region}.amazonaws.com`,this.fetchRequestHandler=e.fetchRequestHandler,this.config=e.clientConfig,this.identityStorageKey=!((n=e.clientConfig)===null||n===void 0)&&n.cookieAttributes.unique?`${Uv}_${e.applicationId}`:Uv}}class J7{constructor(e,n){this.ChainAnonymousCredentialsProvider=async()=>this.AnonymousCredentialsProvider().catch(this.AnonymousStorageCredentialsProvider).catch(this.AnonymousCognitoCredentialsProvider),this.AnonymousCredentialsProvider=async()=>new Promise((s,o)=>{if(this.renewCredentials())return o();s(this.credentials)}),this.AnonymousStorageCredentialsProvider=async()=>new Promise((s,o)=>{let a;try{a=JSON.parse(localStorage.getItem(this.credentialStorageKey))}catch{return o()}if(this.credentials=Object.assign(Object.assign({},a),{expiration:new Date(a.expiration)}),this.renewCredentials())return o();s(this.credentials)});const r=e.identityPoolId.split(":")[0];this.config=e,this.cognitoIdentityClient=new zme({fetchRequestHandler:new pb,region:r,clientConfig:e,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${jc}_${n}`:jc}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const e=new Date(this.credentials.expiration.getTime()-Vge);return new Date>e}}class jme extends J7{constructor(e,n){super(e,n),this.AnonymousCognitoCredentialsProvider=async()=>{let s=1;for(;;)try{const o=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),a=await this.cognitoIdentityClient.getOpenIdToken(o),u=await this.stsClient.assumeRoleWithWebIdentity({RoleArn:this.config.guestRoleArn,RoleSessionName:"cwr",WebIdentityToken:a.Token});this.credentials=u;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(u))}catch{}return be.debug("AWS credentials fetched successfully"),u}catch(o){if(s)s--,be.warn("AWS credential fetch failed, retrying");else throw be.error("AWS credential fetch failed:",o),o}};const r=e.identityPoolId.split(":")[0];this.stsClient=new Mme({fetchRequestHandler:new pb,region:r})}}class Bme extends J7{constructor(e,n){super(e,n),this.AnonymousCognitoCredentialsProvider=async()=>{let r=1;for(;;)try{const s=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),o=await this.cognitoIdentityClient.getCredentialsForIdentity(s.IdentityId);this.credentials=o;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(o))}catch{}return be.debug("AWS credentials fetched successfully"),o}catch(s){if(r)r--,be.warn("AWS credential fetch failed, retrying");else throw be.error("AWS credential fetch failed:",s),s}}}}const hs="com.amazon.rum",Hme="com.amazonaws.rum",jv=`${hs}.http_event`,ez=`${hs}.xray_trace_event`,$me=`${hs}.largest_contentful_paint_event`,qme=`${hs}.first_input_delay_event`,Wme=`${hs}.cumulative_layout_shift_event`,Gme=`${hs}.interaction_to_next_paint_event`,R_=`${hs}.performance_navigation_event`,tz=`${hs}.performance_resource_event`,Vme=`${hs}.dom_event`,Kme=`${hs}.js_error_event`,Yme=`${hs}.page_view_event`,I_=`${hs}.session_start_event`,MU=`${hs}.rrweb_event`;class Ns{constructor(e){this.enabled=!0,this.pluginId=Ns.generatePluginId(e)}static generatePluginId(e){return`${Ns.idPrefix}.${e}`}load(e){var n;this.context=e,(n=this.onload)===null||n===void 0||n.call(this)}getPluginId(){return this.pluginId}}Ns.idPrefix=Hme;class Zme{constructor(e){this.context=e,this.plugins=new Map}addPlugin(e){const n=e.getPluginId();if(this.hasPlugin(n))throw new Error(`Plugin "${n}" already defined in the PluginManager`);this.plugins.set(n,e),e.load(this.context),be.debug(`Plugin loaded: ${n}`)}updatePlugin(e,n){var r;const s=this.getPlugin(e);(r=s?.update)===null||r===void 0||r.call(s,n)}enable(){this.plugins.forEach(e=>e.enable())}disable(){this.plugins.forEach(e=>e.disable())}flush(){this.plugins.forEach(e=>{var n;return(n=e.flush)===null||n===void 0?void 0:n.call(e)})}hasPlugin(e){return!!this.getPlugin(e)}record(e,n){const r=this.getPlugin(e);if(r?.record instanceof Function)r.record(n);else throw new Error("AWS RUM Client record: Invalid plugin ID")}getPlugin(e){var n;return(n=this.plugins.get(e))!==null&&n!==void 0?n:this.plugins.get(Ns.generatePluginId(e))}}const PU=(t,e,n,r,s)=>{let o=t+"=";o+=e||"",s!==void 0&&(o+=`; Expires=${s.toUTCString()}`),o+=`; Domain=${n.domain}`,o+=`; Path=${n.path}`,o+=`; SameSite=${n.sameSite}`,o+=n.secure?"; Secure":"",document.cookie=o},Xme=(t,e)=>{let n=t+"=";n+=`; Expires=${new Date(0)}`,n+=`; Domain=${e.domain}`,n+=`; Path=${e.path}`,n+=`; SameSite=${e.sameSite}`,n+=e.secure?"Secure":"",document.cookie=n},kU=t=>{const e=document.cookie.split("; ");for(const n of e){const r=n.split("=");if(r[0]===t)return r[1]}return""};var ah;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(ah||(ah={}));const Qme=()=>{var t,e;const n=navigator.userAgentData;if(!n)return;const r=(t=n.brands)!==null&&t!==void 0?t:[],s=(e=r.find(o=>o.brand!=="Chromium"&&!o.brand.startsWith("Not")))!==null&&e!==void 0?e:r[0];return{browserName:s?.brand,browserVersion:s?.version,osName:n.platform,deviceType:n.mobile?"mobile":"desktop"}},dm="00000000-0000-0000-0000-000000000000",Jme="desktop",eve="web";class tve{constructor(e,n,r,s){this.isSessionIdManual=!1,this.isUserIdManual=!1,this.appMonitorDetails=e,this.config=n,this.recordEvent=r,this.pageManager=s,this.sessionCookieName=this.config.cookieAttributes.unique?`${Fv}_${this.appMonitorDetails.id}`:Fv,this.session={sessionId:dm,record:this.sample(),eventCount:0},this.config.userId||this.initializeUser(),this.collectAttributes(),this.addSessionAttributes(this.config.sessionAttributes),this.getSessionFromCookie(),this.config.userId&&(this.isUserIdManual=!0,this.adoptUser(this.config.userId)),this.config.sessionId&&(this.isSessionIdManual=!0,this.adoptSession(this.config.sessionId))}isSampled(){return this.session.record}getSession(){return this.isSessionIdManual?(new Date>=this.sessionExpiry&&(this.session.eventCount=0,this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie()),this.session):(this.session.sessionId===dm?this.createSession():new Date>=this.sessionExpiry&&this.createSession(),this.session)}getAttributes(){return this.attributes}addSessionAttributes(e){this.attributes=Object.assign(Object.assign({},this.attributes),e)}pinSessionId(e){if(!e){be.warn("pinSessionId called with empty value; ignoring.");return}this.isSessionIdManual=!0,e!==this.session.sessionId&&this.adoptSession(e)}startSession(e){return e?.userId!==void 0&&(e.userId?(this.isUserIdManual=!0,e.userId!==this.userId&&this.adoptUser(e.userId)):be.warn("startSession called with empty userId; ignoring user rotation.")),e?.sessionId!==void 0?e.sessionId?(this.isSessionIdManual=!0,this.adoptSession(e.sessionId),this.config.suppressSessionStartEvent||this.recordEvent(I_,{version:"1.0.0"})):(be.warn("startSession called with empty sessionId; minting a fresh session."),this.isSessionIdManual=!1,this.createSession()):(this.isSessionIdManual=!1,this.createSession()),this.session.sessionId}getUserId(){return this.isUserIdManual?this.userId:this.useCookies()?this.userId:dm}pinUserId(e){if(!e){be.warn("pinUserId called with empty value; ignoring.");return}this.isUserIdManual=!0,e!==this.userId&&this.adoptUser(e)}incrementSessionEventCount(){this.session.eventCount++,this.renewSession()}isLimitExceeded(){return this.session.eventCount>=this.config.sessionEventLimit&&this.config.sessionEventLimit>0}canRecord(){return this.session.record&&!this.isLimitExceeded()}initializeUser(){let e="";this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.config.userIdRetentionDays<=0?this.userId="00000000-0000-0000-0000-000000000000":this.useCookies()?(e=this.getUserIdCookie(),this.userId=e||ih(),this.createOrRenewUserCookie(e,this.userExpiry)):this.userId=ih()}createOrRenewSessionCookie(e,n){btoa&&PU(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(e,n){PU(zv,e,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return kU(zv)}getSessionFromCookie(){if(this.useCookies()){const e=kU(this.sessionCookieName);if(e&&atob)try{this.session=JSON.parse(atob(e)),this.pageManager.resumeSession(this.session.page),be.info(`Restored session: ${this.session.sessionId}`)}catch(n){be.error("Failed to restore session",n)}}}storeSessionAsCookie(){this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),this.useCookies()&&this.createOrRenewSessionCookie(this.session,this.sessionExpiry)}createSession(){this.session={sessionId:ih(),record:this.session.sessionId===dm?this.session.record:this.sample(),eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),be.info(`Session start: ${this.session.sessionId}`),this.session.record||be.warn(`Session is NOT sampled. Consider increasing sessionSampleRate to avoid data loss (currently ${this.config.sessionSampleRate})`),this.config.suppressSessionStartEvent||this.recordEvent(I_,{version:"1.0.0"})}adoptSession(e){this.session={sessionId:e,record:this.session.record,eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),be.info(`Adopted session: ${e}`)}adoptUser(e){this.userId=e,this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),be.info(`Adopted user: ${e}`)}renewSession(){this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.session.page=this.pageManager.getPage(),this.storeSessionAsCookie()}collectAttributes(){var e;const n=Qme();this.attributes={browserLanguage:navigator.language,browserName:n?.browserName,browserVersion:n?.browserVersion,osName:n?.osName,osVersion:n?.osVersion,deviceType:(e=n?.deviceType)!==null&&e!==void 0?e:Jme,platformType:eve,domain:window.location.hostname,"aws:releaseId":this.config.releaseId},n||(this.attributes["aws:userAgent"]=navigator.userAgent)}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}sample(){return Math.random()<this.config.sessionSampleRate}}class nve{constructor(e,n){this.config=e,this.record=n,this.page=void 0,this.resumed=!1,this.recordInteraction=!1}getPage(){return this.page}getAttributes(){return this.attributes}resumeSession(e){this.recordInteraction=!0,e&&(this.page=e,this.resumed=!0)}recordPageView(e){let n;if(typeof e=="string"?n=e:n=e.pageId,be.debug(`recordPageView called with pageId: ${n}`),this.useCookies()&&(this.recordInteraction=!0),!this.page)this.createLandingPage(n),be.info(`Landing page created: ${n}`);else if(this.page.pageId!==n)this.createNextPage(this.page,n),be.debug(`Navigation to new page: ${n}`);else if(this.resumed){be.info(`Resumed session for page: ${n}`),this.collectAttributes(this.page,typeof e=="object"?e:void 0);return}else{be.debug(`No page change detected for: ${n}`);return}this.collectAttributes(this.page,typeof e=="object"?e:void 0),this.recordPageViewEvent(this.page)}createNextPage(e,n){const r=Date.now();be.debug(`Creating next page ${n}, interaction: ${e.interaction+1}`),this.timeOnParentPage=r-e.start,this.resumed=!1,this.page={pageId:n,parentPageId:e.pageId,interaction:e.interaction+1,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:r}}createLandingPage(e){this.page={pageId:e,interaction:0,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:Date.now()}}collectAttributes(e,n){var r;this.attributes={title:!((r=n?.pageAttributes)===null||r===void 0)&&r.title?n.pageAttributes.title:document.title,pageId:e.pageId},this.recordInteraction&&(this.attributes.interaction=e.interaction,e.parentPageId!==void 0&&(this.attributes.parentPageId=e.parentPageId)),n?.pageTags&&(this.attributes.pageTags=n.pageTags),n?.pageAttributes&&(this.attributes=Object.assign(Object.assign({},n.pageAttributes),this.attributes))}createPageViewEvent(e){const n={version:"1.0.0",pageId:e.pageId};return this.recordInteraction&&(n.interaction=e.interaction,n.pageInteractionId=e.pageId+"-"+e.interaction,e.parentPageId!==void 0&&(n.parentPageInteractionId=e.parentPageId+"-"+(e.interaction-1),n.timeOnParentPage=this.timeOnParentPage),n.referrer=document.referrer,n.referrerDomain=this.getDomainFromReferrer()),n}recordPageViewEvent(e){this.record(Yme,this.createPageViewEvent(e))}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}getDomainFromReferrer(){try{return new URL(document.referrer).hostname}catch{return document.referrer==="localhost"?document.referrer:""}}}var Ph;(function(t){t.EVENT="event"})(Ph||(Ph={}));class nz{constructor(){this.subscribers=new Map}subscribe(e,n){var r;const s=(r=this.subscribers.get(e))!==null&&r!==void 0?r:[];s.length||this.subscribers.set(e,s),s.push(n)}unsubscribe(e,n){const r=this.subscribers.get(e);if(r){for(let s=0;s<r.length;s++)if(r[s]===n)return r.splice(s,1),!0}return!1}dispatch(e,n){const r=this.subscribers.get(e);if(r)for(const s of r)s(n)}}const rve="3.1.0",sve=new Set(["pageId","parentPageId","interaction","pageTags","title"]),nx=(t,e)=>{if(!t)return{};const n={};for(const[r,s]of Object.entries(t)){if(r.startsWith("aws:")){be.warn(`Dropping ${e} metadata key "${r}": "aws:" namespace is reserved.`);continue}if((e==="event"||e==="hook")&&sve.has(r)){be.warn(`Dropping ${e} metadata key "${r}": owned by page state.`);continue}const o=typeof s;if(o!=="string"&&o!=="number"&&o!=="boolean"){be.warn(`Dropping ${e} metadata key "${r}": value must be string|number|boolean.`);continue}n[r]=s}return n};class ove{constructor(e,n,r=new nz){this.eventBus=r,this.events=[],this.candidates=new Map,this.droppedEvent=0,this.sessionLimitExceeded=0,this.recordPageView=s=>{this.isCurrentUrlAllowed()&&this.pageManager.recordPageView(s)},this.recordEvent=(s,o,a)=>{this.enabled&&this.isCurrentUrlAllowed()&&(s!==I_&&this.sessionManager.getSession(),this.sessionManager.canRecord()?(this.sessionManager.incrementSessionEventCount(),this.addRecordToCache(s,o,a)):this.sessionLimitExceeded++)},this.recordCandidate=(s,o,a)=>{const u=this.sessionManager.getSession();if(!this.enabled||!this.isCurrentUrlAllowed()||!u.record)return;const[c]=this.createEvent(s,o,a);if(this.candidates.has(s)){this.candidates.set(s,c);return}this.candidates.size<this.config.candidatesCacheSize&&!this.sessionManager.isLimitExceeded()&&(this.candidates.set(s,c),this.sessionManager.incrementSessionEventCount())},this.getSession=()=>{if(this.isCurrentUrlAllowed())return this.sessionManager.getSession()},this.getSessionId=()=>this.sessionManager.getSession().sessionId,this.pinSessionId=s=>{this.sessionManager.pinSessionId(s)},this.startSession=s=>this.sessionManager.startSession(s),this.getUserId=()=>this.sessionManager.getUserId(),this.pinUserId=s=>{this.sessionManager.pinUserId(s)},this.addRecordToCache=(s,o,a)=>{if(!this.enabled)return;if(this.events.length>=this.config.eventCacheSize){this.droppedEvent+=1;return}const[u,c]=this.createEvent(s,o,a);this.eventBus.dispatch(Ph.EVENT,c),this.events.push(u)},this.createEvent=(s,o,a)=>{var u;const c=(u=this.pageManager.getAttributes())!==null&&u!==void 0?u:{},f=nx(a,"event");let p={};if(this.eventMetadataHook)try{const y=Object.freeze(Object.assign({},c)),S=this.eventMetadataHook(s,o,y);S&&(p=nx(S,"hook"))}catch(y){be.warn(`eventMetadataHook threw for type "${s}"; dropping hook output for this event.`,y)}const g=Object.assign(Object.assign(Object.assign({},c),p),f),m={id:ih(),timestamp:new Date,type:s};return[Object.assign(Object.assign({},m),{details:JSON.stringify(o),metadata:JSON.stringify(g)}),Object.assign(Object.assign({},m),{details:o,metadata:g})]},this.appMonitorDetails=e,this.config=n,this.enabled=!0,this.pageManager=new nve(n,this.recordEvent),this.sessionManager=new tve(e,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(nx(n.applicationAttributes,"application"))}enable(){this.enabled=!0}disable(){this.enabled=!1}setPluginFlushHook(e){this.pluginFlushHook=e}isSessionSampled(){return this.sessionManager.isSampled()}hasEvents(){if(this.sessionLimitExceeded>0){const e=this.events.length+this.sessionLimitExceeded;this.sessionManager.isSampled()?be.warn(`Dropped ${this.sessionLimitExceeded} of ${e} recently observed events (${(this.sessionLimitExceeded/e*100).toFixed(2)}%) because the session limit has exceeded. Consider increasing sessionEventLimit (currently ${this.config.sessionEventLimit}) to ${e} or more to avoid data loss.`):be.warn(`Dropped ${this.sessionLimitExceeded} of ${e} recently observed events (${(this.sessionLimitExceeded/e*100).toFixed(2)}%) because current session is not sampled. Consider increasing sessionSampleRate (currently ${this.config.sessionSampleRate}) to capture more user sessions.`),this.sessionLimitExceeded=0}return this.events.length!==0}hasCandidates(){return this.candidates.size!==0}getEventBatch(e=!1){var n;if(this.droppedEvent>0){const s=this.events.length+this.droppedEvent;be.warn(`Dropped ${this.droppedEvent} of ${s} recently observed events (${(this.droppedEvent/s*100).toFixed(2)}%) due to insufficient in-memory queue. Increase eventCacheSize to ${s} (currently ${this.config.eventCacheSize}) to avoid data loss.`),this.droppedEvent=0}let r=[];if(e&&((n=this.pluginFlushHook)===null||n===void 0||n.call(this)),e&&this.hasCandidates())if(this.candidates.size<=this.config.batchLimit)r=Array.from(this.candidates.values()),this.candidates.clear();else{let s=0;for(const o of Array.from(this.candidates.keys())){if(s++>=this.config.batchLimit)break;const a=this.candidates.get(o);a&&(r.push(a),this.candidates.delete(o))}}return this.events.length&&(this.events.length<=this.config.batchLimit-r.length?(r.push(...this.events),this.events=[]):r.push(...this.events.splice(0,this.config.batchLimit-r.length))),r}getAppMonitorDetails(){return this.appMonitorDetails}getUserDetails(){return{userId:this.sessionManager.getUserId(),sessionId:this.sessionManager.getSession().sessionId}}addSessionAttributes(e){this.sessionManager.addSessionAttributes(e)}getCommonMetadata(){return Object.assign(Object.assign(Object.assign({},this.sessionManager.getAttributes()),this.applicationAttributes),{version:"1.0.0","aws:client":this.installationMethod,"aws:clientVersion":rve})}setEventMetadataHook(e){this.eventMetadataHook=e}clearEventMetadataHook(){this.eventMetadataHook=void 0}isCurrentUrlAllowed(){const e=document.location.toString(),n=this.config.pagesToExclude.some(s=>s.test(e));return this.config.pagesToInclude.some(s=>s.test(e))&&!n}}var An;(function(t){t.OTHER="other",t.STYLESHEET="stylesheet",t.DOCUMENT="document",t.SCRIPT="script",t.IMAGE="image",t.FONT="font"})(An||(An={}));var ai;(function(t){t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.FRAME="frame",t.SCRIPT="script",t.CSS="css"})(ai||(ai={}));const DU=t=>[t.startTime,t.duration].join("#"),ive=[{name:An.STYLESHEET,list:["css","less"]},{name:An.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:An.SCRIPT,list:["js"]},{name:An.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:An.FONT,list:["fnt","fon","otf","ttf","woff"]}],LU=(t,e)=>{let n=An.OTHER;if(t){const r=t.substring(t.lastIndexOf("/")+1),s=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];ive.forEach(o=>{o.list.indexOf(s)>-1&&(n=o.name)})}if(e&&n===An.OTHER)switch(e){case ai.IMAGE:case ai.IMG:case ai.INPUT:n=An.IMAGE;break;case ai.IFRAME:case ai.FRAME:n=An.DOCUMENT;break;case ai.SCRIPT:n=An.SCRIPT;break;case ai.CSS:n=An.STYLESHEET;break}return n},ave=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),lve=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,uve=(t,e)=>{try{return new URL(t).hostname===e&&lve.test(t)}catch{return!1}},rz="dom-event",cve={interactionId:()=>"",enableMutationObserver:!1,events:[]};class gR extends Ns{constructor(e){super(rz),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},cve),e)}static getElementInfo(e){const n={name:"UNKNOWN"};return e.target instanceof Node&&(n.name=e.target.nodeName),e.target instanceof Element&&e.target.id&&(n.id=e.target.id),n}enable(){if(document.readyState!=="complete"){window.addEventListener("load",()=>this.enable());return}this.enabled||(this.addListeners(),this.config.enableMutationObserver&&this.observeDOMMutation(),this.enabled=!0)}disable(){this.enabled&&(this.removeListeners(),this.observer&&this.observer.disconnect(),this.enabled=!1)}update(e){e.forEach(n=>{this.addEventHandler(n),this.config.events.push(n)})}onload(){this.enable()}removeListeners(){this.config.events.forEach(e=>this.removeEventHandler(e))}addListeners(){this.config.events.forEach(e=>this.addEventHandler(e))}getEventListener(e){return n=>{var r;const s=gR.getElementInfo(n),o=this.config.interactionId(n),a=Object.assign(Object.assign(Object.assign({version:"1.1.0",event:n.type,element:s.name},s.id?{elementId:s.id}:{}),o?{interactionId:o}:{}),e?{cssLocator:e}:{});!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(Vme,a)}}addEventHandler(e){const n=e.event,r=this.getEventListener(e.cssLocator),s=[],o=this.eventListenerMap.has(e)?this.eventListenerMap.get(e):[];if(e.cssLocator)document.querySelectorAll(e.cssLocator).forEach(u=>{s.push(u)});else if(e.elementId){const a=document.getElementById(e.elementId);a&&s.push(a)}else e.element&&s.push(e.element);s.forEach(a=>{a.addEventListener(n,r),o.push({element:a,eventListener:r})}),this.eventListenerMap.set(e,o)}removeEventHandler(e){const n=this.eventListenerMap.get(e);n&&(n.forEach(r=>{const s=r.element,o=r.eventListener;s.removeEventListener(e.event,o)}),this.eventListenerMap.delete(e))}observeDOMMutation(){this.observer=new MutationObserver(()=>{this.removeListeners(),this.addListeners()}),this.observer.observe(document,{childList:!0,subtree:!0})}}const dve=t=>{const e=typeof t;return(e==="object"||e==="function")&&!!t},fve=t=>{const e={version:"1.0.0",type:"undefined",message:"undefined"};return t.type!==void 0&&(e.type=t.type),t.message!==void 0&&(e.message=t.message),t.filename!==void 0&&(e.filename=t.filename),t.lineno!==void 0&&(e.lineno=t.lineno),t.colno!==void 0&&(e.colno=t.colno),e},hve=(t,e)=>{t.type!=="unhandledrejection"&&(t.type=e.toString()),t.message=e.toString()},pve=(t,e,n)=>{e.name&&(t.type=e.name),e.message&&(t.message=e.message),e.fileName&&(t.filename=e.fileName),e.lineNumber&&(t.lineno=e.lineNumber),e.columnNumber&&(t.colno=e.columnNumber),n&&e.stack&&(t.stack=e.stack.length>n?e.stack.substring(0,n)+"...":e.stack)},sz=t=>t!==Object(t)&&t!==void 0&&t!==null,mR=(t,e)=>{const n=fve(t),r=t.error;return dve(r)?pve(n,r,e):sz(r)&&hve(n,r),n},oz="js-error",gve={stackTraceLength:1e3,ignore:()=>!1};class mve extends Ns{constructor(e){super(oz),this.eventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent(n)},this.promiseRejectEventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent({type:n.type,error:n.reason})},this.config=Object.assign(Object.assign({},gve),e)}enable(){this.enabled||(this.addEventHandler(),this.enabled=!0)}disable(){this.enabled&&(this.removeEventHandler(),this.enabled=!1)}record(e){e instanceof ErrorEvent?this.recordJsErrorEvent(e):this.recordJsErrorEvent({type:"error",error:e})}onload(){this.addEventHandler()}recordJsErrorEvent(e){var n;(n=this.context)===null||n===void 0||n.record(Kme,mR(e,this.config.stackTraceLength))}addEventHandler(){window.addEventListener("error",this.eventHandler),window.addEventListener("unhandledrejection",this.promiseRejectEventHandler)}removeEventHandler(){window.removeEventListener("error",this.eventHandler),window.removeEventListener("unhandledrejection",this.promiseRejectEventHandler)}}const vve=t=>t.entryType==="resource"&&(!/^https?:/.test(t.name)||/^(fetch|xmlhttprequest)$/.test(t.initiatorType)),vR={eventLimit:10,ignore:vve,recordAllTypes:[An.DOCUMENT,An.SCRIPT,An.STYLESHEET,An.FONT],sampleTypes:[An.IMAGE,An.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},yve="navigation",oc="navigation",rx="load";class bve extends Ns{constructor(e){super(yve),this.eventListener=()=>{performance.getEntriesByType(oc).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(s=>s.entryType===oc).filter(s=>!this.config.ignore(s)).forEach(s=>{this.performanceNavigationEventHandlerTimingLevel2(s)})}).observe({entryTypes:[oc]})},this.performanceNavigationEventHandlerTimingLevel1=()=>{setTimeout(()=>{var r;const s=performance.timing,o=s.navigationStart,a={version:"1.0.0",initiatorType:"navigation",startTime:0,unloadEventStart:s.unloadEventStart>0?s.unloadEventStart-o:0,promptForUnload:s.unloadEventEnd-s.unloadEventStart,redirectStart:s.redirectStart>0?s.redirectStart-o:0,redirectTime:s.redirectEnd-s.redirectStart,fetchStart:s.fetchStart>0?s.fetchStart-o:0,domainLookupStart:s.domainLookupStart>0?s.domainLookupStart-o:0,dns:s.domainLookupEnd-s.domainLookupStart,connectStart:s.connectStart>0?s.connectStart-o:0,connect:s.connectEnd-s.connectStart,secureConnectionStart:s.secureConnectionStart>0?s.secureConnectionStart-o:0,tlsTime:s.secureConnectionStart>0?s.connectEnd-s.secureConnectionStart:0,requestStart:s.requestStart>0?s.requestStart-o:0,timeToFirstByte:s.responseStart-s.requestStart,responseStart:s.responseStart>0?s.responseStart-o:0,responseTime:s.responseStart>0?s.responseEnd-s.responseStart:0,domInteractive:s.domInteractive>0?s.domInteractive-o:0,domContentLoadedEventStart:s.domContentLoadedEventStart>0?s.domContentLoadedEventStart-o:0,domContentLoaded:s.domContentLoadedEventEnd-s.domContentLoadedEventStart,domComplete:s.domComplete>0?s.domComplete-o:0,domProcessingTime:s.loadEventStart-s.responseEnd,loadEventStart:s.loadEventStart>0?s.loadEventStart-o:0,loadEventTime:s.loadEventEnd-s.loadEventStart,duration:s.loadEventEnd-s.navigationStart,navigationTimingLevel:1};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(R_,a)},0)},this.performanceNavigationEventHandlerTimingLevel2=n=>{var r;const s={version:"1.0.0",initiatorType:n.initiatorType,navigationType:n.type,startTime:n.startTime,unloadEventStart:n.unloadEventStart,promptForUnload:n.unloadEventEnd-n.unloadEventStart,redirectCount:n.redirectCount,redirectStart:n.redirectStart,redirectTime:n.redirectEnd-n.redirectStart,workerStart:n.workerStart,workerTime:n.workerStart>0?n.fetchStart-n.workerStart:0,fetchStart:n.fetchStart,domainLookupStart:n.domainLookupStart,dns:n.domainLookupEnd-n.domainLookupStart,nextHopProtocol:n.nextHopProtocol,connectStart:n.connectStart,connect:n.connectEnd-n.connectStart,secureConnectionStart:n.secureConnectionStart,tlsTime:n.secureConnectionStart>0?n.connectEnd-n.secureConnectionStart:0,requestStart:n.requestStart,timeToFirstByte:n.responseStart-n.requestStart,responseStart:n.responseStart,responseTime:n.responseStart>0?n.responseEnd-n.responseStart:0,domInteractive:n.domInteractive,domContentLoadedEventStart:n.domContentLoadedEventStart,domContentLoaded:n.domContentLoadedEventEnd-n.domContentLoadedEventStart,domComplete:n.domComplete,domProcessingTime:n.loadEventStart-n.responseEnd,loadEventStart:n.loadEventStart,loadEventTime:n.loadEventEnd-n.loadEventStart,duration:n.duration,headerSize:n.transferSize>0?n.transferSize-n.encodedBodySize:0,transferSize:n.transferSize,compressionRatio:n.encodedBodySize>0?n.decodedBodySize/n.encodedBodySize:0,navigationTimingLevel:2};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(R_,s)},this.config=Object.assign(Object.assign({},vR),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(rx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(rx,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(oc).length?!!window.performance.getEntriesByType(oc)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(oc).filter(e=>!this.config.ignore(e)).forEach(e=>this.performanceNavigationEventHandlerTimingLevel2(e)):window.addEventListener(rx,this.eventListener))}}var sx,UU;function Sve(){if(UU)return sx;UU=1;function t(c){return typeof c=="function"}var e=console.error.bind(console);function n(c,f,p){var g=!!c[f]&&c.propertyIsEnumerable(f);Object.defineProperty(c,f,{configurable:!0,enumerable:g,writable:!0,value:p})}function r(c){c&&c.logger&&(t(c.logger)?e=c.logger:e("new logger isn't a function, not replacing"))}function s(c,f,p){if(!c||!c[f]){e("no original function "+f+" to wrap");return}if(!p){e("no wrapper function"),e(new Error().stack);return}if(!t(c[f])||!t(p)){e("original object and wrapper must be functions");return}var g=c[f],m=p(g,f);return n(m,"__original",g),n(m,"__unwrap",function(){c[f]===m&&n(c,f,g)}),n(m,"__wrapped",!0),n(c,f,m),m}function o(c,f,p){if(c)Array.isArray(c)||(c=[c]);else{e("must provide one or more modules to patch"),e(new Error().stack);return}if(!(f&&Array.isArray(f))){e("must provide one or more functions to wrap on modules");return}c.forEach(function(g){f.forEach(function(m){s(g,m,p)})})}function a(c,f){if(!c||!c[f]){e("no function to unwrap."),e(new Error().stack);return}if(!c[f].__unwrap)e("no original to unwrap to -- has "+f+" already been unwrapped?");else return c[f].__unwrap()}function u(c,f){if(c)Array.isArray(c)||(c=[c]);else{e("must provide one or more modules to patch"),e(new Error().stack);return}if(!(f&&Array.isArray(f))){e("must provide one or more functions to unwrap on modules");return}c.forEach(function(p){f.forEach(function(g){a(p,g)})})}return r.wrap=s,r.massWrap=o,r.unwrap=a,r.massUnwrap=u,sx=r,sx}var Bv=Sve();const Eve=qa(Bv),FU=j5({__proto__:null,default:Eve},[Bv]);class yR extends Ns{constructor(){super(...arguments),this.enable=this.patch.bind(this,!0),this.disable=this.patch.bind(this,!1),this.enabled=!1}patchAll(){const e=Bv.wrap.bind(FU);for(const n of this.patches)e(n.nodule,n.name,n.wrapper())}unpatchAll(){const e=Bv.unwrap.bind(FU);for(const n of this.patches)e(n.nodule,n.name)}patch(e=!0){this.enabled!==e&&(this.enabled=e,e?this.patchAll():this.unpatchAll())}}const Cve="page-view";class wve extends yR{constructor(){super(Cve),this.pushState=()=>{const e=this;return n=>function(r,s,o){const a=n.apply(this,arguments);return e.recordPageView(),a}},this.replaceState=()=>{const e=this;return n=>function(r,s,o){const a=n.apply(this,arguments);return e.recordPageView(),a}},this.popstateListener=e=>{this.recordPageView()},this.recordPageView=()=>{this.context.recordPageView(this.createIdForCurrentPage())},this.enable()}onload(){this.addListener(),this.recordPageView()}get patches(){return[{nodule:History.prototype,name:"pushState",wrapper:this.pushState},{nodule:History.prototype,name:"replaceState",wrapper:this.replaceState}]}addListener(){window.addEventListener("popstate",this.popstateListener)}createIdForCurrentPage(){const e=window.location.pathname,n=window.location.hash;switch(this.context.config.pageIdFormat){case ah.PathAndHash:return e&&n?e+n:e||n||"";case ah.Hash:return n||"";case ah.Path:default:return e||""}}}const xve="resource",ox="resource";class _ve extends Ns{constructor(e){super(xve),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==ox||this.config.ignore(r))return;const{name:s,initiatorType:o}=r,a=LU(s,o);this.config.recordAllTypes.includes(a)?this.recordResourceEvent(r):this.config.sampleTypes.includes(a)&&this.eventCount<this.config.eventLimit&&(this.recordResourceEvent(r),this.eventCount++)})},this.recordResourceEvent=({name:n,startTime:r,initiatorType:s,duration:o,transferSize:a})=>{var u;if(!uve(n,this.context.config.endpointUrl.hostname)&&!((u=this.context)===null||u===void 0)&&u.record){const c={version:"1.0.0",initiatorType:s,startTime:r,duration:o,fileType:LU(n,s),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record(tz,c)}},this.config=Object.assign(Object.assign({},vR),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:ox,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:ox,buffered:!0})}}var O_,zU,gb=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},bR=function(t){if(document.readyState==="loading")return"loading";var e=gb();if(e){if(t<e.domInteractive)return"loading";if(e.domContentLoadedEventStart===0||t<e.domContentLoadedEventStart)return"dom-interactive";if(e.domComplete===0||t<e.domComplete)return"dom-content-loaded"}return"complete"},Ave=function(t){var e=t.nodeName;return t.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},mb=function(t,e){var n="";try{for(;t&&t.nodeType!==9;){var r=t,s=r.id?"#"+r.id:Ave(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+s.length>(e||100)-1)return n||s;if(n=n?s+">"+n:s,r.id)break;t=r.parentNode}}catch{}return n},iz=-1,Tve=function(){return iz},hd=function(t){addEventListener("pageshow",(function(e){e.persisted&&(iz=e.timeStamp,t(e))}),!0)},SR=function(){var t=gb();return t&&t.activationStart||0},Io=function(t,e){var n=gb(),r="navigate";return Tve()>=0?r="back-forward-cache":n&&(document.prerendering||SR()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},lu=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(s){Promise.resolve().then((function(){e(s.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},Oo=function(t,e,n,r){var s,o;return function(a){e.value>=0&&(a||r)&&((o=e.value-(s||0))||s===void 0)&&(s=e.value,e.delta=o,e.rating=(function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"})(e.value,n),t(e))}},ER=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},ap=function(t){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&t()}))},vb=function(t){var e=!1;return function(){e||(t(),e=!0)}},xc=-1,jU=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Hv=function(t){document.visibilityState==="hidden"&&xc>-1&&(xc=t.type==="visibilitychange"?t.timeStamp:0,Rve())},BU=function(){addEventListener("visibilitychange",Hv,!0),addEventListener("prerenderingchange",Hv,!0)},Rve=function(){removeEventListener("visibilitychange",Hv,!0),removeEventListener("prerenderingchange",Hv,!0)},CR=function(){return xc<0&&(xc=jU(),BU(),hd((function(){setTimeout((function(){xc=jU(),BU()}),0)}))),{get firstHiddenTime(){return xc}}},yb=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},HU=[1800,3e3],Ive=function(t,e){e=e||{},yb((function(){var n,r=CR(),s=Io("FCP"),o=lu("paint",(function(a){a.forEach((function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(s.value=Math.max(u.startTime-SR(),0),s.entries.push(u),n(!0)))}))}));o&&(n=Oo(t,s,HU,e.reportAllChanges),hd((function(a){s=Io("FCP"),n=Oo(t,s,HU,e.reportAllChanges),ER((function(){s.value=performance.now()-a.timeStamp,n(!0)}))})))}))},$U=[.1,.25],Ove=function(t,e){(function(n,r){r=r||{},Ive(vb((function(){var s,o=Io("CLS",0),a=0,u=[],c=function(p){p.forEach((function(g){if(!g.hadRecentInput){var m=u[0],y=u[u.length-1];a&&g.startTime-y.startTime<1e3&&g.startTime-m.startTime<5e3?(a+=g.value,u.push(g)):(a=g.value,u=[g])}})),a>o.value&&(o.value=a,o.entries=u,s())},f=lu("layout-shift",c);f&&(s=Oo(n,o,$U,r.reportAllChanges),ap((function(){c(f.takeRecords()),s(!0)})),hd((function(){a=0,o=Io("CLS",0),s=Oo(n,o,$U,r.reportAllChanges),ER((function(){return s()}))})),setTimeout(s,0))})))})((function(n){var r=(function(s){var o,a={};if(s.entries.length){var u=s.entries.reduce((function(f,p){return f&&f.value>p.value?f:p}));if(u&&u.sources&&u.sources.length){var c=(o=u.sources).find((function(f){return f.node&&f.node.nodeType===1}))||o[0];c&&(a={largestShiftTarget:mb(c.node),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:c,largestShiftEntry:u,loadState:bR(u.startTime)})}}return Object.assign(s,{attribution:a})})(n);t(r)}),e)},az=0,ix=1/0,fm=0,Nve=function(t){t.forEach((function(e){e.interactionId&&(ix=Math.min(ix,e.interactionId),fm=Math.max(fm,e.interactionId),az=fm?(fm-ix)/7+1:0)}))},lz=function(){return O_?az:performance.interactionCount||0},Mve=function(){"interactionCount"in performance||O_||(O_=lu("event",Nve,{type:"event",buffered:!0,durationThreshold:0}))},Gs=[],lh=new Map,uz=0,Pve=function(){var t=Math.min(Gs.length-1,Math.floor((lz()-uz)/50));return Gs[t]},cz=[],kve=function(t){if(cz.forEach((function(s){return s(t)})),t.interactionId||t.entryType==="first-input"){var e=Gs[Gs.length-1],n=lh.get(t.interactionId);if(n||Gs.length<10||t.duration>e.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};lh.set(r.id,r),Gs.push(r)}Gs.sort((function(s,o){return o.latency-s.latency})),Gs.length>10&&Gs.splice(10).forEach((function(s){return lh.delete(s.id)}))}}},wR=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=vb(t),document.visibilityState==="hidden"?t():(n=e(t),ap(t)),n},qU=[200,500],Dve=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},yb((function(){var n;Mve();var r,s=Io("INP"),o=function(u){wR((function(){u.forEach(kve);var c=Pve();c&&c.latency!==s.value&&(s.value=c.latency,s.entries=c.entries,r())}))},a=lu("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=Oo(t,s,qU,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),ap((function(){o(a.takeRecords()),r(!0)})),hd((function(){uz=lz(),Gs.length=0,lh.clear(),s=Io("INP"),r=Oo(t,s,qU,e.reportAllChanges)})))})))},Mc=[],xa=[],N_=0,xR=new WeakMap,Pc=new Map,M_=-1,Lve=function(t){Mc=Mc.concat(t),dz()},dz=function(){M_<0&&(M_=wR(Uve))},Uve=function(){Pc.size>10&&Pc.forEach((function(a,u){lh.has(u)||Pc.delete(u)}));var t=Gs.map((function(a){return xR.get(a.entries[0])})),e=xa.length-50;xa=xa.filter((function(a,u){return u>=e||t.includes(a)}));for(var n=new Set,r=0;r<xa.length;r++){var s=xa[r];hz(s.startTime,s.processingEnd).forEach((function(a){n.add(a)}))}var o=Mc.length-1-50;Mc=Mc.filter((function(a,u){return a.startTime>N_&&u>o||n.has(a)})),M_=-1};cz.push((function(t){t.interactionId&&t.target&&!Pc.has(t.interactionId)&&Pc.set(t.interactionId,t.target)}),(function(t){var e,n=t.startTime+t.duration;N_=Math.max(N_,t.processingEnd);for(var r=xa.length-1;r>=0;r--){var s=xa[r];if(Math.abs(n-s.renderTime)<=8){(e=s).startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd),e.entries.push(t);break}}e||(e={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:n,entries:[t]},xa.push(e)),(t.interactionId||t.entryType==="first-input")&&xR.set(t,e),dz()}));var _a,uh,fz,$v,hz=function(t,e){for(var n,r=[],s=0;n=Mc[s];s++)if(!(n.startTime+n.duration<t)){if(n.startTime>e)break;r.push(n)}return r},Fve=function(t,e){zU||(zU=lu("long-animation-frame",Lve)),Dve((function(n){var r=(function(s){var o=s.entries[0],a=xR.get(o),u=o.processingStart,c=a.processingEnd,f=a.entries.sort((function(C,w){return C.processingStart-w.processingStart})),p=hz(o.startTime,c),g=s.entries.find((function(C){return C.target})),m=g&&g.target||Pc.get(o.interactionId),y=[o.startTime+o.duration,c].concat(p.map((function(C){return C.startTime+C.duration}))),S=Math.max.apply(Math,y),E={interactionTarget:mb(m),interactionTargetElement:m,interactionType:o.name.startsWith("key")?"keyboard":"pointer",interactionTime:o.startTime,nextPaintTime:S,processedEventEntries:f,longAnimationFrameEntries:p,inputDelay:u-o.startTime,processingDuration:c-u,presentationDelay:Math.max(S-c,0),loadState:bR(o.startTime)};return Object.assign(s,{attribution:E})})(n);t(r)}),e)},WU=[2500,4e3],ax={},zve=function(t,e){(function(n,r){r=r||{},yb((function(){var s,o=CR(),a=Io("LCP"),u=function(p){r.reportAllChanges||(p=p.slice(-1)),p.forEach((function(g){g.startTime<o.firstHiddenTime&&(a.value=Math.max(g.startTime-SR(),0),a.entries=[g],s())}))},c=lu("largest-contentful-paint",u);if(c){s=Oo(n,a,WU,r.reportAllChanges);var f=vb((function(){ax[a.id]||(u(c.takeRecords()),c.disconnect(),ax[a.id]=!0,s(!0))}));["keydown","click"].forEach((function(p){addEventListener(p,(function(){return wR(f)}),{once:!0,capture:!0})})),ap(f),hd((function(p){a=Io("LCP"),s=Oo(n,a,WU,r.reportAllChanges),ER((function(){a.value=performance.now()-p.timeStamp,ax[a.id]=!0,s(!0)}))}))}}))})((function(n){var r=(function(s){var o={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:s.value};if(s.entries.length){var a=gb();if(a){var u=a.activationStart||0,c=s.entries[s.entries.length-1],f=c.url&&performance.getEntriesByType("resource").filter((function(S){return S.name===c.url}))[0],p=Math.max(0,a.responseStart-u),g=Math.max(p,f?(f.requestStart||f.startTime)-u:0),m=Math.max(g,f?f.responseEnd-u:0),y=Math.max(m,c.startTime-u);o={element:mb(c.element),timeToFirstByte:p,resourceLoadDelay:g-p,resourceLoadDuration:m-g,elementRenderDelay:y-m,navigationEntry:a,lcpEntry:c},c.url&&(o.url=c.url),f&&(o.lcpResourceEntry=f)}}return Object.assign(s,{attribution:o})})(n);t(r)}),e)},Qf={passive:!0,capture:!0},jve=new Date,GU=function(t,e){_a||(_a=e,uh=t,fz=new Date,gz(removeEventListener),pz())},pz=function(){if(uh>=0&&uh<fz-jve){var t={entryType:"first-input",name:_a.type,target:_a.target,cancelable:_a.cancelable,startTime:_a.timeStamp,processingStart:_a.timeStamp+uh};$v.forEach((function(e){e(t)})),$v=[]}},Bve=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?(function(n,r){var s=function(){GU(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",s,Qf),removeEventListener("pointercancel",o,Qf)};addEventListener("pointerup",s,Qf),addEventListener("pointercancel",o,Qf)})(e,t):GU(e,t)}},gz=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,Bve,Qf)}))},VU=[100,300],Hve=function(t,e){e=e||{},yb((function(){var n,r=CR(),s=Io("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(s.value=c.processingStart-c.startTime,s.entries.push(c),n(!0))},a=function(c){c.forEach(o)},u=lu("first-input",a);n=Oo(t,s,VU,e.reportAllChanges),u&&(ap(vb((function(){a(u.takeRecords()),u.disconnect()}))),hd((function(){var c;s=Io("FID"),n=Oo(t,s,VU,e.reportAllChanges),$v=[],uh=-1,_a=null,gz(addEventListener),c=o,$v.push(c),pz()})))}))},$ve=function(t,e){Hve((function(n){var r=(function(s){var o=s.entries[0],a={eventTarget:mb(o.target),eventType:o.name,eventTime:o.startTime,eventEntry:o,loadState:bR(o.startTime)};return Object.assign(s,{attribution:a})})(n);t(r)}),e)};const qve="web-vitals";class Wve extends Ns{constructor(e){super(qve),this.resourceEventIds=new Map,this.cacheLCPCandidates=ave(),this.handleEvent=n=>{switch(n.type){case tz:const r=n.details;this.cacheLCPCandidates&&r.fileType===An.IMAGE&&this.resourceEventIds.set(DU(n.details),n.id);break;case R_:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},vR),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Ph.EVENT,this.handleEvent),zve(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),$ve(e=>this.handleFID(e)),Ove(e=>this.handleCLS(e),{reportAllChanges:!0}),Fve(e=>this.handleINP(e),{reportAllChanges:!0})}handleLCP(e){var n,r;const s=e.attribution,o={element:s?.element,url:s?.url,timeToFirstByte:s?.timeToFirstByte,resourceLoadDelay:s?.resourceLoadDelay,resourceLoadTime:s?.resourceLoadDuration,elementRenderDelay:s?.elementRenderDelay};if(s?.lcpResourceEntry){const a=DU(s?.lcpResourceEntry);o.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(o.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record($me,{version:"1.0.0",value:e.value,attribution:o}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(Ph.EVENT,this.handleEvent),this.resourceEventIds.clear(),this.navigationEventId=void 0}handleCLS(e){const n=e.attribution,{record:r,recordCandidate:s}=this.context;(this.config.reportAllCLS?r:s)(Wme,{version:"1.0.0",value:e.value,attribution:{largestShiftTarget:n?.largestShiftTarget,largestShiftValue:n?.largestShiftValue,largestShiftTime:n?.largestShiftTime,loadState:n?.loadState}})}handleFID(e){var n;const r=e.attribution;(n=this.context)===null||n===void 0||n.record(qme,{version:"1.0.0",value:e.value,attribution:{eventTarget:r?.eventTarget,eventType:r?.eventType,eventTime:r?.eventTime,loadState:r?.loadState}})}handleINP(e){const n=e.attribution,{record:r,recordCandidate:s}=this.context;(this.config.reportAllINP?r:s)(Gme,{version:"1.0.0",value:e.value,attribution:{interactionTarget:n?.interactionTarget,interactionTime:n?.interactionTime,nextPaintTime:n?.nextPaintTime,interactionType:n?.interactionType,inputDelay:n?.inputDelay,processingDuration:n?.processingDuration,presentationDelay:n?.presentationDelay,loadState:n?.loadState}})}}const Gve="fetch";class Vve extends yR{constructor(e){super(Gve),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.beginTrace=(n,r,s)=>{const o=wc(),a=Uge(n,r,!0),u=H7(this.config.logicalServiceName,o,this.context.config.enableW3CTraceId),c=$7(q7(n),o,a);return u.subsegments.push(c),this.isTraceIdHeaderEnabled(n)&&this.addXRayTraceIdHeader(n,r,s,u),u},this.addXRayTraceIdHeader=(n,r,s,o)=>{if(n.headers)return zge(n.headers,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(s,r)),Fge(r,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,s)=>{if(n){const o=wc();if(n.subsegments[0].end_time=o,n.end_time=o,r){n.subsegments[0].http.response={status:r.status},cR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):j7(r.status)?(n.subsegments[0].error=!0,n.error=!0):uR(r.status)&&(n.subsegments[0].fault=!0,n.fault=!0);const a=r.headers.get("Content-Length"),u=a?parseInt(a,10):NaN;isNaN(u)||(n.subsegments[0].http.response.content_length=u)}s&&(n.fault=!0,n.subsegments[0].fault=!0,s instanceof Object?this.appendErrorCauseFromObject(n.subsegments[0],s):sz(s)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],s.toString())),this.context.record(ez,n)}},this.createHttpEvent=(n,r)=>{const s=n;return{version:"1.0.0",request:{url:av(n),method:r?.method?r.method:s.method?s.method:"GET"}}},this.recordHttpEventWithResponse=(n,r)=>{(this.config.recordAllRequests||!r.ok)&&(n.response={status:r.status,statusText:r.statusText},this.context.record(jv,n))},this.recordHttpEventWithError=(n,r)=>{n.error=mR({type:"error",error:r},this.config.stackTraceLength),this.context.record(jv,n)},this.fetch=(n,r,s,o,a)=>{const u=this.createHttpEvent(o,a);let c;if(!B7(av(o),this.config))return n.apply(r,s);const f=Bge(o.headers,this.context.config.enableW3CTraceId);return f.traceId&&f.segmentId?(u.trace_id=f.traceId,u.segment_id=f.segmentId):this.isTracingEnabled()&&this.isSessionRecorded()&&(c=this.beginTrace(o,a,s),u.trace_id=c.trace_id,u.segment_id=c.subsegments[0].id),n.apply(r,s).then(p=>(this.endTrace(c,p,void 0),this.recordHttpEventWithResponse(u,p),p)).catch(p=>{throw this.endTrace(c,void 0,p),this.recordHttpEventWithError(u,p),p})},this.fetchWrapper=()=>{const n=this;return r=>function(s,o){return n.fetch(r,this,arguments,s,o)}},this.config=Object.assign(Object.assign({},z7),e)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(e){const n=av(e);return F7(n,this.config.addXRayTraceIdHeader)}appendErrorCauseFromPrimitive(e,n){e.cause={exceptions:[{type:n}]}}appendErrorCauseFromObject(e,n){e.cause={exceptions:[{type:n.name,message:n.message}]}}}class Kve extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}}const Yve="xhr";class Zve extends yR{constructor(e){super(Yve),this.addXRayTraceIdHeader=n=>F7(n,this.config.addXRayTraceIdHeader),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.handleXhrLoadEvent=n=>{const r=n.target,s=this.xhrMap.get(r);if(s){const o=wc();s.trace.end_time=o,s.trace.subsegments[0].end_time=o,s.trace.subsegments[0].http.response={status:r.status},cR(r.status)?(s.trace.subsegments[0].throttle=!0,s.trace.throttle=!0):j7(r.status)?(s.trace.subsegments[0].error=!0,s.trace.error=!0):uR(r.status)&&(s.trace.subsegments[0].fault=!0,s.trace.fault=!0);const a=r.getResponseHeader("Content-Length"),u=a?parseInt(a,10):NaN;isNaN(u)||(s.trace.subsegments[0].http.response.content_length=u),this.recordTraceEvent(s.trace),this.recordHttpEventWithResponse(s,r)}},this.handleXhrErrorEvent=n=>{const r=n.target,s=this.xhrMap.get(r),o="XMLHttpRequest error",a=r.statusText?r.status.toString()+": "+r.statusText:r.status.toString();if(s){const u=wc();s.trace.fault=!0,s.trace.end_time=u,s.trace.subsegments[0].end_time=u,s.trace.subsegments[0].fault=!0,s.trace.subsegments[0].cause={exceptions:[{type:o,message:a}]},this.recordTraceEvent(s.trace),this.recordHttpEventWithError(s,r,new Kve(a))}},this.handleXhrAbortEvent=n=>{const r=n.target,s=this.xhrMap.get(r);s&&this.handleXhrDetailsOnError(s,r,"XMLHttpRequest abort")},this.handleXhrTimeoutEvent=n=>{const r=n.target,s=this.xhrMap.get(r);this.handleXhrDetailsOnError(s,r,"XMLHttpRequest timeout")},this.initializeTrace=n=>{const r=wc();n.trace=H7(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push($7(q7(n.url),r,{request:{method:n.method,url:n.url,traced:!0}}))},this.sendWrapper=()=>{const n=this;return r=>function(){const s=n.xhrMap.get(this);return s&&(this.addEventListener("load",n.handleXhrLoadEvent),this.addEventListener("error",n.handleXhrErrorEvent),this.addEventListener("abort",n.handleXhrAbortEvent),this.addEventListener("timeout",n.handleXhrTimeoutEvent),n.initializeTrace(s),!n.isSyntheticsUA&&n.isTracingEnabled()&&n.addXRayTraceIdHeader(s.url)&&n.isSessionRecorded()&&(n.context.config.enableW3CTraceId?this.setRequestHeader(hb,fR(s.trace.trace_id,s.trace.subsegments[0].id)):this.setRequestHeader(fb,dR(s.trace.trace_id,s.trace.subsegments[0].id)))),r.apply(this,arguments)}},this.openWrapper=()=>{const n=this;return r=>function(s,o,a){return B7(o,n.config)&&n.xhrMap.set(this,{url:o,method:s,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},z7),e),this.xhrMap=new Map,this.isSyntheticsUA=navigator.userAgent.includes("CloudWatchSynthetics")}onload(){this.enable()}get patches(){return[{nodule:XMLHttpRequest.prototype,name:"send",wrapper:this.sendWrapper},{nodule:XMLHttpRequest.prototype,name:"open",wrapper:this.openWrapper}]}handleXhrDetailsOnError(e,n,r){if(e){const s=wc();e.trace.end_time=s,e.trace.subsegments[0].end_time=s,e.trace.subsegments[0].error=!0,e.trace.subsegments[0].cause={exceptions:[{type:r}]},this.recordTraceEvent(e.trace),this.recordHttpEventWithError(e,n,r)}}statusOk(e){return e>=200&&e<300}recordHttpEventWithResponse(e,n){this.xhrMap.delete(n);const r={version:"1.0.0",request:{method:e.method,url:e.url},response:{status:n.status,statusText:n.statusText}};this.isTracingEnabled()&&(r.trace_id=e.trace.trace_id,r.segment_id=e.trace.subsegments[0].id),(this.config.recordAllRequests||!this.statusOk(n.status))&&this.context.record(jv,r)}recordHttpEventWithError(e,n,r){this.xhrMap.delete(n);const s={version:"1.0.0",request:{method:e.method,url:e.url},error:mR({type:"error",error:r},this.config.stackTraceLength)};this.isTracingEnabled()&&(s.trace_id=e.trace.trace_id,s.segment_id=e.trace.subsegments[0].id),this.context.record(jv,s)}recordTraceEvent(e){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(ez,e)}}var qv={},Xve=Object.defineProperty,Qve=(t,e,n)=>e in t?Xve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e,n)=>Qve(t,typeof e!="symbol"?e+"":e,n),KU,Jve=Object.defineProperty,eye=(t,e,n)=>e in t?Jve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,YU=(t,e,n)=>eye(t,typeof e!="symbol"?e+"":e,n),Pn=(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))(Pn||{});const ZU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},XU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hm={},tye=()=>!!globalThis.Zone;function _R(t){if(hm[t])return hm[t];const e=globalThis[t],n=e.prototype,r=t in ZU?ZU[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 XU?XU[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&&!tye())return hm[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?hm[t]=f:n}catch{return n}}const lx={};function Ii(t,e,n){var r;const s=`${t}.${String(n)}`;if(lx[s])return lx[s].call(e);const o=_R(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(lx[s]=a,a.call(e)):e[n]}const ux={};function mz(t,e,n){const r=`${t}.${String(n)}`;if(ux[r])return ux[r].bind(e);const o=_R(t)[n];return typeof o!="function"?e[n]:(ux[r]=o,o.bind(e))}function nye(t){return Ii("Node",t,"ownerDocument")}function rye(t){return Ii("Node",t,"childNodes")}function sye(t){return Ii("Node",t,"parentNode")}function oye(t){return Ii("Node",t,"parentElement")}function iye(t){return Ii("Node",t,"textContent")}function aye(t,e){return mz("Node",t,"contains")(e)}function lye(t){return mz("Node",t,"getRootNode")()}function uye(t){return!t||!("host"in t)?null:Ii("ShadowRoot",t,"host")}function cye(t){return t.styleSheets}function dye(t){return!t||!("shadowRoot"in t)?null:Ii("Element",t,"shadowRoot")}function fye(t,e){return Ii("Element",t,"querySelector")(e)}function hye(t,e){return Ii("Element",t,"querySelectorAll")(e)}function pye(){return _R("MutationObserver").constructor}function gye(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 cr={ownerDocument:nye,childNodes:rye,parentNode:sye,parentElement:oye,textContent:iye,contains:aye,getRootNode:lye,host:uye,styleSheets:cye,shadowRoot:dye,querySelector:fye,querySelectorAll:hye,mutationObserver:pye,patch:gye};function vz(t){return t.nodeType===t.ELEMENT_NODE}function ch(t){const e=t&&"host"in t&&"mode"in t&&cr.host(t)||null;return!!(e&&"shadowRoot"in e&&cr.shadowRoot(e)===t)}function dh(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function mye(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function vye(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function P_(t){try{const e=t.rules||t.cssRules;if(!e)return null;let n=t.href;!n&&t.ownerNode&&(n=t.ownerNode.baseURI);const r=Array.from(e,s=>yz(s,n)).join("");return mye(r)}catch{return null}}function yz(t,e){if(bye(t)){let n;try{n=P_(t.styleSheet)||vye(t)}catch{n=t.cssText}return t.styleSheet.href?Vv(n,t.styleSheet.href):n}else{let n=t.cssText;return Sye(t)&&t.selectorText.includes(":")&&(n=yye(n)),e?Vv(n,e):n}}function yye(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function bye(t){return"styleSheet"in t}function Sye(t){return"selectorText"in t}class bz{constructor(){YU(this,"idNodeMap",new Map),YU(this,"nodeMetaMap",new WeakMap)}getId(e){var n;return e?((n=this.getMeta(e))==null?void 0:n.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){const r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){const r=this.getNode(e);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Eye(){return new bz}function Wv({element:t,maskInputOptions:e,tagName:n,type:r,value:s,maskInputFn:o}){let a=s||"";const u=r&&Kl(r);return(e[n.toLowerCase()]||u&&e[u])&&(o?a=o(a,t):a="*".repeat(a.length)),a}function Kl(t){return t.toLowerCase()}const QU="__rrweb_original__";function Cye(t){const e=t.getContext("2d");if(!e)return!0;const n=50;for(let r=0;r<t.width;r+=n)for(let s=0;s<t.height;s+=n){const o=e.getImageData,a=QU in o?o[QU]:o;if(new Uint32Array(a.call(e,r,s,Math.min(n,t.width-r),Math.min(n,t.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function Gv(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Kl(e):null}function Sz(t,e){let n;try{n=new URL(t,e??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return s?.[1]??null}function wye(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const xye=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,_ye=/^(?:[a-z+]+:)?\/\//i,Aye=/^www\..*/i,Tye=/^(data:)([^,]*),(.*)/i;function Vv(t,e){return(t||"").replace(xye,(n,r,s,o,a,u)=>{const c=s||a||u,f=r||o||"";if(!c)return n;if(_ye.test(c)||Aye.test(c))return`url(${f}${c}${f})`;if(Tye.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${wye(e)+c}${f})`;const p=e.split("/"),g=c.split("/");p.pop();for(const m of g)m!=="."&&(m===".."?p.pop():p.push(m));return`url(${f}${p.join("/")}${f})`})}function pm(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Rye(t,e,n=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&t&&typeof t=="string"){let a=pm(t,n);const u=a.length/t.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){const f=pm(r[c].textContent,n),p=100;let g=3;for(;g<f.length&&(f[g].match(/[a-zA-Z0-9]/)||f.indexOf(f.substring(0,g),1)!==-1);g++);for(;g<f.length;g++){let m=f.substring(0,g),y=a.split(m),S=-1;if(y.length===2)S=y[0].length;else if(y.length>2&&y[0]===""&&r[c-1].textContent!=="")S=a.indexOf(m,1);else if(y.length===1){if(m=m.substring(0,m.length-1),y=a.split(m),y.length<=1)return s.push(t),s;g=p+1}else g===f.length-1&&(S=a.indexOf(m));if(y.length>=2&&g>p){const E=r[c-1].textContent;if(E&&typeof E=="string"){const C=pm(E).length;S=a.indexOf(m,C)}S===-1&&(S=y[0].length)}if(S!==-1){let E=Math.floor(S/u);for(;E>0&&E<t.length;){if(o+=1,o>50*r.length)return s.push(t),s;const C=pm(t.substring(0,E),n);if(C.length===S){s.push(t.substring(0,E)),t=t.substring(E),a=a.substring(S);break}else C.length<S?E+=Math.max(1,Math.floor((S-C.length)/u)):E-=Math.max(1,Math.floor((C.length-S)*u))}break}}}}return s.push(t),s}function Iye(t,e){return Rye(t,e).join("/* rr_split */")}let Oye=1;const Nye=new RegExp("[^a-z0-9-_:]"),kh=-2;function Ez(){return Oye++}function Mye(t){if(t instanceof HTMLFormElement)return"form";const e=Kl(t.tagName);return Nye.test(e)?"div":e}let ic,JU;const Pye=/^[^ \t\n\r\u000c]+/,kye=/^[, \t\n\r\u000c]+/;function Dye(t,e){if(e.trim()==="")return e;let n=0;function r(o){let a;const u=o.exec(e.substring(n));return u?(a=u[0],n+=a.length,a):""}const s=[];for(;r(kye),!(n>=e.length);){let o=r(Pye);if(o.slice(-1)===",")o=_c(t,o.substring(0,o.length-1)),s.push(o);else{let a="";o=_c(t,o);let u=!1;for(;;){const c=e.charAt(n);if(c===""){s.push((o+a).trim());break}else if(u)c===")"&&(u=!1);else if(c===","){n+=1,s.push((o+a).trim());break}else c==="("&&(u=!0);a+=c,n+=1}}}return s.join(", ")}const e4=new WeakMap;function _c(t,e){return!e||e.trim()===""?e:AR(t,e)}function Lye(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function AR(t,e){let n=e4.get(t);if(n||(n=t.createElement("a"),e4.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function Cz(t,e,n,r){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&["table","td","th"].includes(e)?_c(t,r):n==="srcset"?Dye(t,r):n==="style"?Vv(r,AR(t)):e==="object"&&n==="data"?_c(t,r):r)}function wz(t,e,n){return["video","audio"].includes(t)&&e==="autoplay"}function Uye(t,e,n){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){const s=t.classList[r];if(e.test(s))return!0}if(n)return t.matches(n)}catch{}return!1}function Kv(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Kv(cr.parentNode(t),e,n):!1;for(let r=t.classList.length;r--;){const s=t.classList[r];if(e.test(s))return!0}return n?Kv(cr.parentNode(t),e,n):!1}function xz(t,e,n,r){let s;if(vz(t)){if(s=t,!cr.childNodes(s).length)return!1}else{if(cr.parentElement(t)===null)return!1;s=cr.parentElement(t)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(Kv(s,e,r))return!0;if(n){if(r){if(s.closest(n))return!0}else if(s.matches(n))return!0}}catch{}return!1}function Fye(t,e,n){const r=t.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const u=setTimeout(()=>{s||(e(),s=!0)},n);t.addEventListener("load",()=>{clearTimeout(u),s=!0,e()});return}const a="about:blank";if(r.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function zye(t,e,n){let r=!1,s;try{s=t.sheet}catch{return}if(s)return;const o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function jye(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:f,maskInputFn:p,dataURLOptions:g={},inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E=!1,cssCaptured:C=!1}=e,w=Bye(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Pn.Document,childNodes:[],compatMode:t.compatMode}:{type:Pn.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Pn.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:return $ye(t,{doc:n,blockClass:s,blockSelector:o,inlineStylesheet:u,maskInputOptions:c,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E,rootId:w});case t.TEXT_NODE:return Hye(t,{doc:n,needsMask:a,maskTextFn:f,rootId:w,cssCaptured:C});case t.CDATA_SECTION_NODE:return{type:Pn.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:Pn.Comment,textContent:cr.textContent(t)||"",rootId:w};default:return!1}}function Bye(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function Hye(t,e){const{needsMask:n,maskTextFn:r,rootId:s,cssCaptured:o}=e,a=cr.parentNode(t),u=a&&a.tagName;let c="";const f=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?c="SCRIPT_PLACEHOLDER":o||(c=cr.textContent(t),f&&c&&(c=Vv(c,AR(e.doc)))),!f&&!p&&c&&n&&(c=r?r(c,cr.parentElement(t)):c.replace(/[\S]/g,"*")),{type:Pn.Text,textContent:c||"",rootId:s}}function $ye(t,e){const{doc:n,blockClass:r,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:c={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:y}=e,S=Uye(t,r,s),E=Mye(t);let C={};const w=t.attributes.length;for(let T=0;T<w;T++){const R=t.attributes[T];wz(E,R.name,R.value)||(C[R.name]=Cz(n,E,Kl(R.name),R.value))}if(E==="link"&&o){const T=Array.from(n.styleSheets).find(M=>M.href===t.href);let R=null;T&&(R=P_(T)),R&&(delete C.rel,delete C.href,C._cssText=R)}if(E==="style"&&t.sheet){let T=P_(t.sheet);T&&(t.childNodes.length>1&&(T=Iye(T,t)),C._cssText=T)}if(["input","textarea","select"].includes(E)){const T=t.value,R=t.checked;C.type!=="radio"&&C.type!=="checkbox"&&C.type!=="submit"&&C.type!=="button"&&T?C.value=Wv({element:t,type:Gv(t),tagName:E,value:T,maskInputOptions:a,maskInputFn:u}):R&&(C.checked=R)}if(E==="option"&&(t.selected&&!a.select?C.selected=!0:delete C.selected),E==="dialog"&&t.open&&(C.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(t.__context==="2d")Cye(t)||(C.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){const T=t.toDataURL(c.type,c.quality),R=n.createElement("canvas");R.width=t.width,R.height=t.height;const M=R.toDataURL(c.type,c.quality);T!==M&&(C.rr_dataURL=T)}}if(E==="img"&&f){ic||(ic=n.createElement("canvas"),JU=ic.getContext("2d"));const T=t,R=T.currentSrc||T.getAttribute("src")||"<unknown-src>",M=T.crossOrigin,O=()=>{T.removeEventListener("load",O);try{ic.width=T.naturalWidth,ic.height=T.naturalHeight,JU.drawImage(T,0,0),C.rr_dataURL=ic.toDataURL(c.type,c.quality)}catch(I){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${R}! Error: ${I}`)}T.crossOrigin==="anonymous"&&(M?C.crossOrigin=M:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O)}if(["audio","video"].includes(E)){const T=C;T.rr_mediaState=t.paused?"paused":"played",T.rr_mediaCurrentTime=t.currentTime,T.rr_mediaPlaybackRate=t.playbackRate,T.rr_mediaMuted=t.muted,T.rr_mediaLoop=t.loop,T.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(C.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(C.rr_scrollTop=t.scrollTop)),S){const{width:T,height:R}=t.getBoundingClientRect();C={class:C.class,rr_width:`${T}px`,rr_height:`${R}px`}}E==="iframe"&&!g(C.src)&&(t.contentDocument||(C.rr_src=C.src),delete C.src);let _;try{customElements.get(E)&&(_=!0)}catch{}return{type:Pn.Element,tagName:E,attributes:C,childNodes:[],isSVG:Lye(t)||void 0,needBlock:S,rootId:y,isCustom:_}}function Wt(t){return t==null?"":t.toLowerCase()}function _z(t){return t===!0||t==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:t==="all",headMetaDescKeywords:t==="all",headTitleMutations:t==="all"}:t||{}}function qye(t,e){if(e.comment&&t.type===Pn.Comment)return!0;if(t.type===Pn.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&Sz(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Wt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Wt(t.attributes.name)==="application-name"||Wt(t.attributes.rel)==="icon"||Wt(t.attributes.rel)==="apple-touch-icon"||Wt(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Wt(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Wt(t.attributes.property).match(/^(og|twitter|fb):/)||Wt(t.attributes.name).match(/^(og|twitter):/)||Wt(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Wt(t.attributes.name)==="robots"||Wt(t.attributes.name)==="googlebot"||Wt(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Wt(t.attributes.name)==="author"||Wt(t.attributes.name)==="generator"||Wt(t.attributes.name)==="framework"||Wt(t.attributes.name)==="publisher"||Wt(t.attributes.name)==="progid"||Wt(t.attributes.property).match(/^article:/)||Wt(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Wt(t.attributes.name)==="google-site-verification"||Wt(t.attributes.name)==="yandex-verification"||Wt(t.attributes.name)==="csrf-token"||Wt(t.attributes.name)==="p:domain_verify"||Wt(t.attributes.name)==="verify-v1"||Wt(t.attributes.name)==="verification"||Wt(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ac(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:c=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:I=!1,cssCaptured:P=!1}=e;let{needsMask:k}=e,{preserveWhiteSpace:H=!0}=e;k||(k=xz(t,a,u,k===void 0));const F=jye(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:S,inlineImages:E,recordCanvas:C,keepIframeSrcFn:O,newlyAddedElement:I,cssCaptured:P});if(!F)return console.warn(t,"not serialized"),null;let j;r.hasNode(t)?j=r.getId(t):qye(F,y)||!H&&F.type===Pn.Text&&!F.textContent.replace(/^\s+|\s+$/gm,"").length?j=kh:j=Ez();const W=Object.assign(F,{id:j});if(r.add(t,W),j===kh)return null;w&&w(t);let Y=!c;if(W.type===Pn.Element){Y=Y&&!W.needBlock,delete W.needBlock;const $=cr.shadowRoot(t);$&&dh($)&&(W.isShadowHost=!0)}if((W.type===Pn.Document||W.type===Pn.Element)&&Y){y.headWhitespace&&W.type===Pn.Element&&W.tagName==="head"&&(H=!1);const $={doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:c,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O,cssCaptured:!1};if(!(W.type===Pn.Element&&W.tagName==="textarea"&&W.attributes.value!==void 0)){W.type===Pn.Element&&W.attributes._cssText!==void 0&&typeof W.attributes._cssText=="string"&&($.cssCaptured=!0);for(const fe of Array.from(cr.childNodes(t))){const de=Ac(fe,$);de&&W.childNodes.push(de)}}let ee=null;if(vz(t)&&(ee=cr.shadowRoot(t)))for(const fe of Array.from(cr.childNodes(ee))){const de=Ac(fe,$);de&&(dh(ee)&&(de.isShadow=!0),W.childNodes.push(de))}}const ne=cr.parentNode(t);return ne&&ch(ne)&&dh(ne)&&(W.isShadow=!0),W.type===Pn.Element&&W.tagName==="iframe"&&Fye(t,()=>{const $=t.contentDocument;if($&&_){const ee=Ac($,{doc:$,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O});ee&&_(t,ee)}},T),W.type===Pn.Element&&W.tagName==="link"&&typeof W.attributes.rel=="string"&&(W.attributes.rel==="stylesheet"||W.attributes.rel==="preload"&&typeof W.attributes.href=="string"&&Sz(W.attributes.href)==="css")&&zye(t,()=>{if(R){const $=Ac(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O});$&&R(t,$)}},M),W}function Wye(t,e){const{mirror:n=new bz,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:m,slimDOM:y=!1,dataURLOptions:S,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M=()=>!1}=e||{},O=p===!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}:p===!1?{password:!0}:p,I=_z(y);return Ac(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:O,maskTextFn:g,maskInputFn:m,slimDOMOptions:I,dataURLOptions:S,inlineImages:c,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M,newlyAddedElement:!1})}function Gye(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Vye(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var TR={exports:{}},Zt=String,Az=function(){return{isColorSupported:!1,reset:Zt,bold:Zt,dim:Zt,italic:Zt,underline:Zt,inverse:Zt,hidden:Zt,strikethrough:Zt,black:Zt,red:Zt,green:Zt,yellow:Zt,blue:Zt,magenta:Zt,cyan:Zt,white:Zt,gray:Zt,bgBlack:Zt,bgRed:Zt,bgGreen:Zt,bgYellow:Zt,bgBlue:Zt,bgMagenta:Zt,bgCyan:Zt,bgWhite:Zt}};TR.exports=Az();TR.exports.createColors=Az;var Kye=TR.exports;const Yye={},Zye=Object.freeze(Object.defineProperty({__proto__:null,default:Yye},Symbol.toStringTag,{value:"Module"})),Js=Vye(Zye);let t4=Kye,n4=Js,k_=class Tz extends Error{constructor(e,n,r,s,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Tz)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=t4.isColorSupported),n4&&e&&(n=n4(n));let r=n.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,c;if(e){let{bold:f,gray:p,red:g}=t4.createColors(!0);u=m=>f(g(m)),c=m=>p(m)}else u=c=f=>f;return r.slice(s,o).map((f,p)=>{let g=s+1+p,m=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let y=c(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+c(m)+f+`
|
|
241
|
+
${Ll(a)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const n=[];for(const o of e.split("/"))o?.length!==0&&o!=="."&&(o===".."?n.pop():n.push(o));const r=`${e?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&e?.endsWith("/")?"/":""}`;return Ul(r).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){const n=gme(e).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}const cm={},Xw=[],Qw=(t,e,n)=>`${t}/${e}/${n}/${Q7}`,yme=async(t,e,n,r,s)=>{const o=await T4(t,e.secretAccessKey,e.accessKeyId),a=`${n}:${r}:${s}:${Ll(o)}:${e.sessionToken}`;if(a in cm)return cm[a];for(Xw.push(a);Xw.length>fme;)delete cm[Xw.shift()];let u=`AWS4${e.secretAccessKey}`;for(const c of[n,r,s,Q7])u=await T4(t,u,c);return cm[a]=u},T4=(t,e,n)=>{const r=new t(e);return r.update(Nh(n)),r.digest()},R4=({headers:t},e,n)=>{const r={};for(const s of Object.keys(t).sort()){if(t[s]==null)continue;const o=s.toLowerCase();(o in ame||e?.has(o)||lme.test(o)||ume.test(o))&&(!n||n&&!n.has(o))||(r[o]=t[s].trim().replace(/\s+/g," "))}return r},Jw=async({headers:t,body:e},n)=>{for(const r of Object.keys(t))if(r.toLowerCase()===T_)return t[r];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||hge(e)){const r=new n;return r.update(Nh(e)),Ll(await r.digest())}return dme},bme=(t,e)=>{t=t.toLowerCase();for(const n of Object.keys(e))if(t===n.toLowerCase())return!0;return!1},Sme=(t,e={})=>{const{headers:n,query:r={}}=Ei.clone(t);for(const s of Object.keys(n)){const o=s.toLowerCase();(o.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(o)||e.hoistableHeaders?.has(o))&&(r[s]=n[s],delete n[s])}return{...t,headers:n,query:r}},I4=t=>{t=Ei.clone(t);for(const e of Object.keys(t.headers))sme.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t};class Eme extends vme{headerFormatter=new Xge;constructor({applyChecksum:e,credentials:n,region:r,service:s,sha256:o,uriEscapePath:a=!0}){super({applyChecksum:e,credentials:n,region:r,service:s,sha256:o,uriEscapePath:a})}async presign(e,n={}){const{signingDate:r=new Date,expiresIn:s=3600,unsignableHeaders:o,unhoistableHeaders:a,signableHeaders:u,hoistableHeaders:c,signingRegion:f,signingService:p}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const m=f??await this.regionProvider(),{longDate:y,shortDate:S}=this.formatDate(r);if(s>hme)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=Qw(S,m,p??this.service),C=Sme(I4(e),{unhoistableHeaders:a,hoistableHeaders:c});g.sessionToken&&(C.query[Y7]=g.sessionToken),C.query[Jge]=Zw,C.query[eme]=`${g.accessKeyId}/${E}`,C.query[V7]=y,C.query[nme]=s.toString(10);const w=R4(C,o,u);return C.query[tme]=this.getCanonicalHeaderList(w),C.query[K7]=await this.getSignature(y,E,this.getSigningKey(g,m,S,p),this.createCanonicalRequest(C,w,await Jw(e,this.sha256))),C}async sign(e,n){return typeof e=="string"?this.signString(e,n):e.headers&&e.payload?this.signEvent(e,n):e.message?this.signMessage(e,n):this.signRequest(e,n)}async signEvent({headers:e,payload:n},{signingDate:r=new Date,priorSignature:s,signingRegion:o,signingService:a,eventStreamCredentials:u}){const c=o??await this.regionProvider(),{shortDate:f,longDate:p}=this.formatDate(r),g=Qw(f,c,a??this.service),m=await Jw({headers:{},body:n},this.sha256),y=new this.sha256;y.update(e);const S=Ll(await y.digest()),E=[cme,p,g,s,S,m].join(`
|
|
242
|
+
`);return this.signString(E,{signingDate:r,signingRegion:c,signingService:a,eventStreamCredentials:u})}async signMessage(e,{signingDate:n=new Date,signingRegion:r,signingService:s,eventStreamCredentials:o}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:n,signingRegion:r,signingService:s,priorSignature:e.priorSignature,eventStreamCredentials:o}).then(u=>({message:e.message,signature:u}))}async signString(e,{signingDate:n=new Date,signingRegion:r,signingService:s,eventStreamCredentials:o}={}){const a=o??await this.credentialProvider();this.validateResolvedCredentials(a);const u=r??await this.regionProvider(),{shortDate:c}=this.formatDate(n),f=new this.sha256(await this.getSigningKey(a,u,c,s));return f.update(Nh(e)),Ll(await f.digest())}async signRequest(e,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:s,signingRegion:o,signingService:a}={}){const u=await this.credentialProvider();this.validateResolvedCredentials(u);const c=o??await this.regionProvider(),f=I4(e),{longDate:p,shortDate:g}=this.formatDate(n),m=Qw(g,c,a??this.service);f.headers[X7]=p,u.sessionToken&&(f.headers[ime]=u.sessionToken);const y=await Jw(f,this.sha256);!bme(T_,f.headers)&&this.applyChecksum&&(f.headers[T_]=y);const S=R4(f,s,r),E=await this.getSignature(p,m,this.getSigningKey(u,c,g,a),this.createCanonicalRequest(f,S,y));return f.headers[Z7]=`${Zw} Credential=${u.accessKeyId}/${m}, SignedHeaders=${this.getCanonicalHeaderList(S)}, Signature=${E}`,f}async getSignature(e,n,r,s){const o=await this.createStringToSign(e,n,s,Zw),a=new this.sha256(await r);return a.update(Nh(o)),Ll(await a.digest())}getSigningKey(e,n,r,s){return yme(this.sha256,e,r,n,s||this.service)}}const Cme="rum",wme={expiresIn:60},xme=(t,e)=>{const n=new Eme({applyChecksum:!0,credentials:t,region:e,service:Cme,uriEscapePath:!0,sha256:zl});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,wme),hashAndEncode:async r=>{const s=new zl;return s.update(r),Zge(await s.digest()).toLowerCase()}}};function O4(t,e){return new Request(t,e)}function _me(t=0){return new Promise((e,n)=>{t&&setTimeout(()=>{const r=new Error(`Request did not complete within ${t} ms`);r.name="TimeoutError",n(r)},t)})}const ex={supported:void 0};class pb{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new pb(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(n=>n||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),ex.supported===void 0&&(ex.supported=typeof Request<"u"&&"keepalive"in O4("https://[::1]"))}destroy(){}async handle(e,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const s=r??this.config.requestTimeout,o=this.config.keepAlive===!0,a=this.config.credentials;if(n?.aborted){const _=N4(n);return Promise.reject(_)}let u=e.path;const c=aR(e.query||{});c&&(u+=`?${c}`),e.fragment&&(u+=`#${e.fragment}`);let f="";if(e.username!=null||e.password!=null){const _=e.username??"",T=e.password??"";f=`${_}:${T}@`}const{port:p,method:g}=e,m=`${e.protocol}//${f}${e.hostname}${p?`:${p}`:""}${u}`,y=g==="GET"||g==="HEAD"?void 0:e.body,S={body:y,headers:new Headers(e.headers),method:g,credentials:a};this.config?.cache&&(S.cache=this.config.cache),y&&(S.duplex="half"),typeof AbortController<"u"&&(S.signal=n),ex.supported&&(S.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(e));let E=()=>{};const C=O4(m,S),w=[fetch(C).then(_=>{const T=_.headers,R={};for(const O of T.entries())R[O[0]]=O[1];return _.body!=null?{response:new Mh({headers:R,reason:_.statusText,statusCode:_.status,body:_.body})}:_.blob().then(O=>({response:new Mh({headers:R,reason:_.statusText,statusCode:_.status,body:O})}))}),_me(s)];return n&&w.push(new Promise((_,T)=>{const R=()=>{const M=N4(n);T(M)};if(typeof n.addEventListener=="function"){const M=n;M.addEventListener("abort",R,{once:!0}),E=()=>M.removeEventListener("abort",R)}else n.onabort=R})),Promise.race(w).finally(E)}updateHttpClientConfig(e,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[e]=n,r))}httpHandlerConfigs(){return this.config??{}}}function N4(t){const e=t&&typeof t=="object"&&"reason"in t?t.reason:void 0;if(e){if(e instanceof Error){const s=new Error("Request aborted");return s.name="AbortError",s.cause=e,s}const r=new Error(String(e));return r.name="AbortError",r}const n=new Error("Request aborted");return n.name="AbortError",n}const tx=async t=>{const{value:e}=await t.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},Ame=async t=>{const{value:e}=await t.body.getReader().read();return String.fromCharCode.apply(null,e)},Tme="POST",Rme="application/x-www-form-urlencoded",Ime="https:",Ome="AssumeRoleWithWebIdentity",Nme="2011-06-15";class Mme{constructor(e){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:Ome,Version:Nme}),s=new URLSearchParams(Object.entries(r)).toString(),o=new Ei({method:Tme,headers:{"content-type":Rme,host:this.hostname},protocol:Ime,hostname:this.hostname,body:s}),{response:a}=await this.fetchRequestHandler.handle(o),u=await Ame(a);return{accessKeyId:u.split("<AccessKeyId>")[1].split("</AccessKeyId>")[0],secretAccessKey:u.split("<SecretAccessKey>")[1].split("</SecretAccessKey>")[0],sessionToken:u.split("<SessionToken>")[1].split("</SessionToken>")[0],expiration:new Date(u.split("<Expiration>")[1].split("</Expiration>")[0])}}catch(r){throw new Error(`CWR: Failed to retrieve credentials from STS: ${r}`)}},this.hostname=`sts.${e.region}.amazonaws.com`,this.fetchRequestHandler=e.fetchRequestHandler}}const Pme="POST",kme="application/x-amz-json-1.1",Dme="https:",Lme="AWSCognitoIdentityService.GetId",Ume="AWSCognitoIdentityService.GetOpenIdToken",Fme="AWSCognitoIdentityService.GetCredentialsForIdentity";class zme{constructor(e){var n;this.getId=async r=>{var s;let o=null;try{o=JSON.parse(localStorage.getItem(this.identityStorageKey))}catch(a){!((s=this.config)===null||s===void 0)&&s.debug&&be.error("Failed to parse stored identity:",a)}if(o&&o.IdentityId)return Promise.resolve(o);try{const a=JSON.stringify(r),u=this.getHttpRequest(Lme,a),c=await tx((await this.fetchRequestHandler.handle(u)).response);try{localStorage.setItem(this.identityStorageKey,JSON.stringify({IdentityId:c.IdentityId}))}catch(f){be.error("Failed to store identity:",f)}return c}catch(a){throw new Error(`CWR: Failed to retrieve Cognito identity: ${a}`)}},this.getOpenIdToken=async r=>{try{const s=JSON.stringify(r),o=this.getHttpRequest(Ume,s),{response:a}=await this.fetchRequestHandler.handle(o);return this.validateOpenIdTokenResponse(await tx(a))}catch(s){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve Cognito OpenId token: ${s}`)}},this.getCredentialsForIdentity=async r=>{try{const s=JSON.stringify({IdentityId:r}),o=this.getHttpRequest(Fme,s),{response:a}=await this.fetchRequestHandler.handle(o),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:p}=this.validateCredenentialsResponse(await tx(a));return{accessKeyId:u,secretAccessKey:f,sessionToken:p,expiration:new Date(c*1e3)}}catch(s){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve credentials for Cognito identity: ${s}`)}},this.validateOpenIdTokenResponse=r=>{if("IdentityId"in r&&"Token"in r)return r;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown OpenIdToken response")},this.validateCredenentialsResponse=r=>{if("IdentityId"in r&&"Credentials"in r)return r.Credentials;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown Credentials response")},this.getHttpRequest=(r,s)=>new Ei({method:Pme,headers:{"content-type":kme,"x-amz-target":r},protocol:Dme,hostname:this.hostname,body:s}),this.hostname=`cognito-identity.${e.region}.amazonaws.com`,this.fetchRequestHandler=e.fetchRequestHandler,this.config=e.clientConfig,this.identityStorageKey=!((n=e.clientConfig)===null||n===void 0)&&n.cookieAttributes.unique?`${Uv}_${e.applicationId}`:Uv}}class J7{constructor(e,n){this.ChainAnonymousCredentialsProvider=async()=>this.AnonymousCredentialsProvider().catch(this.AnonymousStorageCredentialsProvider).catch(this.AnonymousCognitoCredentialsProvider),this.AnonymousCredentialsProvider=async()=>new Promise((s,o)=>{if(this.renewCredentials())return o();s(this.credentials)}),this.AnonymousStorageCredentialsProvider=async()=>new Promise((s,o)=>{let a;try{a=JSON.parse(localStorage.getItem(this.credentialStorageKey))}catch{return o()}if(this.credentials=Object.assign(Object.assign({},a),{expiration:new Date(a.expiration)}),this.renewCredentials())return o();s(this.credentials)});const r=e.identityPoolId.split(":")[0];this.config=e,this.cognitoIdentityClient=new zme({fetchRequestHandler:new pb,region:r,clientConfig:e,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${jc}_${n}`:jc}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const e=new Date(this.credentials.expiration.getTime()-Vge);return new Date>e}}class jme extends J7{constructor(e,n){super(e,n),this.AnonymousCognitoCredentialsProvider=async()=>{let s=1;for(;;)try{const o=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),a=await this.cognitoIdentityClient.getOpenIdToken(o),u=await this.stsClient.assumeRoleWithWebIdentity({RoleArn:this.config.guestRoleArn,RoleSessionName:"cwr",WebIdentityToken:a.Token});this.credentials=u;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(u))}catch{}return be.debug("AWS credentials fetched successfully"),u}catch(o){if(s)s--,be.warn("AWS credential fetch failed, retrying");else throw be.error("AWS credential fetch failed:",o),o}};const r=e.identityPoolId.split(":")[0];this.stsClient=new Mme({fetchRequestHandler:new pb,region:r})}}class Bme extends J7{constructor(e,n){super(e,n),this.AnonymousCognitoCredentialsProvider=async()=>{let r=1;for(;;)try{const s=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),o=await this.cognitoIdentityClient.getCredentialsForIdentity(s.IdentityId);this.credentials=o;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(o))}catch{}return be.debug("AWS credentials fetched successfully"),o}catch(s){if(r)r--,be.warn("AWS credential fetch failed, retrying");else throw be.error("AWS credential fetch failed:",s),s}}}}const hs="com.amazon.rum",Hme="com.amazonaws.rum",jv=`${hs}.http_event`,ez=`${hs}.xray_trace_event`,$me=`${hs}.largest_contentful_paint_event`,qme=`${hs}.first_input_delay_event`,Wme=`${hs}.cumulative_layout_shift_event`,Gme=`${hs}.interaction_to_next_paint_event`,R_=`${hs}.performance_navigation_event`,tz=`${hs}.performance_resource_event`,Vme=`${hs}.dom_event`,Kme=`${hs}.js_error_event`,Yme=`${hs}.page_view_event`,I_=`${hs}.session_start_event`,M4=`${hs}.rrweb_event`;class Ns{constructor(e){this.enabled=!0,this.pluginId=Ns.generatePluginId(e)}static generatePluginId(e){return`${Ns.idPrefix}.${e}`}load(e){var n;this.context=e,(n=this.onload)===null||n===void 0||n.call(this)}getPluginId(){return this.pluginId}}Ns.idPrefix=Hme;class Zme{constructor(e){this.context=e,this.plugins=new Map}addPlugin(e){const n=e.getPluginId();if(this.hasPlugin(n))throw new Error(`Plugin "${n}" already defined in the PluginManager`);this.plugins.set(n,e),e.load(this.context),be.debug(`Plugin loaded: ${n}`)}updatePlugin(e,n){var r;const s=this.getPlugin(e);(r=s?.update)===null||r===void 0||r.call(s,n)}enable(){this.plugins.forEach(e=>e.enable())}disable(){this.plugins.forEach(e=>e.disable())}flush(){this.plugins.forEach(e=>{var n;return(n=e.flush)===null||n===void 0?void 0:n.call(e)})}hasPlugin(e){return!!this.getPlugin(e)}record(e,n){const r=this.getPlugin(e);if(r?.record instanceof Function)r.record(n);else throw new Error("AWS RUM Client record: Invalid plugin ID")}getPlugin(e){var n;return(n=this.plugins.get(e))!==null&&n!==void 0?n:this.plugins.get(Ns.generatePluginId(e))}}const P4=(t,e,n,r,s)=>{let o=t+"=";o+=e||"",s!==void 0&&(o+=`; Expires=${s.toUTCString()}`),o+=`; Domain=${n.domain}`,o+=`; Path=${n.path}`,o+=`; SameSite=${n.sameSite}`,o+=n.secure?"; Secure":"",document.cookie=o},Xme=(t,e)=>{let n=t+"=";n+=`; Expires=${new Date(0)}`,n+=`; Domain=${e.domain}`,n+=`; Path=${e.path}`,n+=`; SameSite=${e.sameSite}`,n+=e.secure?"Secure":"",document.cookie=n},k4=t=>{const e=document.cookie.split("; ");for(const n of e){const r=n.split("=");if(r[0]===t)return r[1]}return""};var ah;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(ah||(ah={}));const Qme=()=>{var t,e;const n=navigator.userAgentData;if(!n)return;const r=(t=n.brands)!==null&&t!==void 0?t:[],s=(e=r.find(o=>o.brand!=="Chromium"&&!o.brand.startsWith("Not")))!==null&&e!==void 0?e:r[0];return{browserName:s?.brand,browserVersion:s?.version,osName:n.platform,deviceType:n.mobile?"mobile":"desktop"}},dm="00000000-0000-0000-0000-000000000000",Jme="desktop",eve="web";class tve{constructor(e,n,r,s){this.isSessionIdManual=!1,this.isUserIdManual=!1,this.appMonitorDetails=e,this.config=n,this.recordEvent=r,this.pageManager=s,this.sessionCookieName=this.config.cookieAttributes.unique?`${Fv}_${this.appMonitorDetails.id}`:Fv,this.session={sessionId:dm,record:this.sample(),eventCount:0},this.config.userId||this.initializeUser(),this.collectAttributes(),this.addSessionAttributes(this.config.sessionAttributes),this.getSessionFromCookie(),this.config.userId&&(this.isUserIdManual=!0,this.adoptUser(this.config.userId)),this.config.sessionId&&(this.isSessionIdManual=!0,this.adoptSession(this.config.sessionId))}isSampled(){return this.session.record}getSession(){return this.isSessionIdManual?(new Date>=this.sessionExpiry&&(this.session.eventCount=0,this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie()),this.session):(this.session.sessionId===dm?this.createSession():new Date>=this.sessionExpiry&&this.createSession(),this.session)}getAttributes(){return this.attributes}addSessionAttributes(e){this.attributes=Object.assign(Object.assign({},this.attributes),e)}pinSessionId(e){if(!e){be.warn("pinSessionId called with empty value; ignoring.");return}this.isSessionIdManual=!0,e!==this.session.sessionId&&this.adoptSession(e)}startSession(e){return e?.userId!==void 0&&(e.userId?(this.isUserIdManual=!0,e.userId!==this.userId&&this.adoptUser(e.userId)):be.warn("startSession called with empty userId; ignoring user rotation.")),e?.sessionId!==void 0?e.sessionId?(this.isSessionIdManual=!0,this.adoptSession(e.sessionId),this.config.suppressSessionStartEvent||this.recordEvent(I_,{version:"1.0.0"})):(be.warn("startSession called with empty sessionId; minting a fresh session."),this.isSessionIdManual=!1,this.createSession()):(this.isSessionIdManual=!1,this.createSession()),this.session.sessionId}getUserId(){return this.isUserIdManual?this.userId:this.useCookies()?this.userId:dm}pinUserId(e){if(!e){be.warn("pinUserId called with empty value; ignoring.");return}this.isUserIdManual=!0,e!==this.userId&&this.adoptUser(e)}incrementSessionEventCount(){this.session.eventCount++,this.renewSession()}isLimitExceeded(){return this.session.eventCount>=this.config.sessionEventLimit&&this.config.sessionEventLimit>0}canRecord(){return this.session.record&&!this.isLimitExceeded()}initializeUser(){let e="";this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.config.userIdRetentionDays<=0?this.userId="00000000-0000-0000-0000-000000000000":this.useCookies()?(e=this.getUserIdCookie(),this.userId=e||ih(),this.createOrRenewUserCookie(e,this.userExpiry)):this.userId=ih()}createOrRenewSessionCookie(e,n){btoa&&P4(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(e,n){P4(zv,e,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return k4(zv)}getSessionFromCookie(){if(this.useCookies()){const e=k4(this.sessionCookieName);if(e&&atob)try{this.session=JSON.parse(atob(e)),this.pageManager.resumeSession(this.session.page),be.info(`Restored session: ${this.session.sessionId}`)}catch(n){be.error("Failed to restore session",n)}}}storeSessionAsCookie(){this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),this.useCookies()&&this.createOrRenewSessionCookie(this.session,this.sessionExpiry)}createSession(){this.session={sessionId:ih(),record:this.session.sessionId===dm?this.session.record:this.sample(),eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),be.info(`Session start: ${this.session.sessionId}`),this.session.record||be.warn(`Session is NOT sampled. Consider increasing sessionSampleRate to avoid data loss (currently ${this.config.sessionSampleRate})`),this.config.suppressSessionStartEvent||this.recordEvent(I_,{version:"1.0.0"})}adoptSession(e){this.session={sessionId:e,record:this.session.record,eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),be.info(`Adopted session: ${e}`)}adoptUser(e){this.userId=e,this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),be.info(`Adopted user: ${e}`)}renewSession(){this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.session.page=this.pageManager.getPage(),this.storeSessionAsCookie()}collectAttributes(){var e;const n=Qme();this.attributes={browserLanguage:navigator.language,browserName:n?.browserName,browserVersion:n?.browserVersion,osName:n?.osName,osVersion:n?.osVersion,deviceType:(e=n?.deviceType)!==null&&e!==void 0?e:Jme,platformType:eve,domain:window.location.hostname,"aws:releaseId":this.config.releaseId},n||(this.attributes["aws:userAgent"]=navigator.userAgent)}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}sample(){return Math.random()<this.config.sessionSampleRate}}class nve{constructor(e,n){this.config=e,this.record=n,this.page=void 0,this.resumed=!1,this.recordInteraction=!1}getPage(){return this.page}getAttributes(){return this.attributes}resumeSession(e){this.recordInteraction=!0,e&&(this.page=e,this.resumed=!0)}recordPageView(e){let n;if(typeof e=="string"?n=e:n=e.pageId,be.debug(`recordPageView called with pageId: ${n}`),this.useCookies()&&(this.recordInteraction=!0),!this.page)this.createLandingPage(n),be.info(`Landing page created: ${n}`);else if(this.page.pageId!==n)this.createNextPage(this.page,n),be.debug(`Navigation to new page: ${n}`);else if(this.resumed){be.info(`Resumed session for page: ${n}`),this.collectAttributes(this.page,typeof e=="object"?e:void 0);return}else{be.debug(`No page change detected for: ${n}`);return}this.collectAttributes(this.page,typeof e=="object"?e:void 0),this.recordPageViewEvent(this.page)}createNextPage(e,n){const r=Date.now();be.debug(`Creating next page ${n}, interaction: ${e.interaction+1}`),this.timeOnParentPage=r-e.start,this.resumed=!1,this.page={pageId:n,parentPageId:e.pageId,interaction:e.interaction+1,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:r}}createLandingPage(e){this.page={pageId:e,interaction:0,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:Date.now()}}collectAttributes(e,n){var r;this.attributes={title:!((r=n?.pageAttributes)===null||r===void 0)&&r.title?n.pageAttributes.title:document.title,pageId:e.pageId},this.recordInteraction&&(this.attributes.interaction=e.interaction,e.parentPageId!==void 0&&(this.attributes.parentPageId=e.parentPageId)),n?.pageTags&&(this.attributes.pageTags=n.pageTags),n?.pageAttributes&&(this.attributes=Object.assign(Object.assign({},n.pageAttributes),this.attributes))}createPageViewEvent(e){const n={version:"1.0.0",pageId:e.pageId};return this.recordInteraction&&(n.interaction=e.interaction,n.pageInteractionId=e.pageId+"-"+e.interaction,e.parentPageId!==void 0&&(n.parentPageInteractionId=e.parentPageId+"-"+(e.interaction-1),n.timeOnParentPage=this.timeOnParentPage),n.referrer=document.referrer,n.referrerDomain=this.getDomainFromReferrer()),n}recordPageViewEvent(e){this.record(Yme,this.createPageViewEvent(e))}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}getDomainFromReferrer(){try{return new URL(document.referrer).hostname}catch{return document.referrer==="localhost"?document.referrer:""}}}var Ph;(function(t){t.EVENT="event"})(Ph||(Ph={}));class nz{constructor(){this.subscribers=new Map}subscribe(e,n){var r;const s=(r=this.subscribers.get(e))!==null&&r!==void 0?r:[];s.length||this.subscribers.set(e,s),s.push(n)}unsubscribe(e,n){const r=this.subscribers.get(e);if(r){for(let s=0;s<r.length;s++)if(r[s]===n)return r.splice(s,1),!0}return!1}dispatch(e,n){const r=this.subscribers.get(e);if(r)for(const s of r)s(n)}}const rve="3.1.0",sve=new Set(["pageId","parentPageId","interaction","pageTags","title"]),nx=(t,e)=>{if(!t)return{};const n={};for(const[r,s]of Object.entries(t)){if(r.startsWith("aws:")){be.warn(`Dropping ${e} metadata key "${r}": "aws:" namespace is reserved.`);continue}if((e==="event"||e==="hook")&&sve.has(r)){be.warn(`Dropping ${e} metadata key "${r}": owned by page state.`);continue}const o=typeof s;if(o!=="string"&&o!=="number"&&o!=="boolean"){be.warn(`Dropping ${e} metadata key "${r}": value must be string|number|boolean.`);continue}n[r]=s}return n};class ove{constructor(e,n,r=new nz){this.eventBus=r,this.events=[],this.candidates=new Map,this.droppedEvent=0,this.sessionLimitExceeded=0,this.recordPageView=s=>{this.isCurrentUrlAllowed()&&this.pageManager.recordPageView(s)},this.recordEvent=(s,o,a)=>{this.enabled&&this.isCurrentUrlAllowed()&&(s!==I_&&this.sessionManager.getSession(),this.sessionManager.canRecord()?(this.sessionManager.incrementSessionEventCount(),this.addRecordToCache(s,o,a)):this.sessionLimitExceeded++)},this.recordCandidate=(s,o,a)=>{const u=this.sessionManager.getSession();if(!this.enabled||!this.isCurrentUrlAllowed()||!u.record)return;const[c]=this.createEvent(s,o,a);if(this.candidates.has(s)){this.candidates.set(s,c);return}this.candidates.size<this.config.candidatesCacheSize&&!this.sessionManager.isLimitExceeded()&&(this.candidates.set(s,c),this.sessionManager.incrementSessionEventCount())},this.getSession=()=>{if(this.isCurrentUrlAllowed())return this.sessionManager.getSession()},this.getSessionId=()=>this.sessionManager.getSession().sessionId,this.pinSessionId=s=>{this.sessionManager.pinSessionId(s)},this.startSession=s=>this.sessionManager.startSession(s),this.getUserId=()=>this.sessionManager.getUserId(),this.pinUserId=s=>{this.sessionManager.pinUserId(s)},this.addRecordToCache=(s,o,a)=>{if(!this.enabled)return;if(this.events.length>=this.config.eventCacheSize){this.droppedEvent+=1;return}const[u,c]=this.createEvent(s,o,a);this.eventBus.dispatch(Ph.EVENT,c),this.events.push(u)},this.createEvent=(s,o,a)=>{var u;const c=(u=this.pageManager.getAttributes())!==null&&u!==void 0?u:{},f=nx(a,"event");let p={};if(this.eventMetadataHook)try{const y=Object.freeze(Object.assign({},c)),S=this.eventMetadataHook(s,o,y);S&&(p=nx(S,"hook"))}catch(y){be.warn(`eventMetadataHook threw for type "${s}"; dropping hook output for this event.`,y)}const g=Object.assign(Object.assign(Object.assign({},c),p),f),m={id:ih(),timestamp:new Date,type:s};return[Object.assign(Object.assign({},m),{details:JSON.stringify(o),metadata:JSON.stringify(g)}),Object.assign(Object.assign({},m),{details:o,metadata:g})]},this.appMonitorDetails=e,this.config=n,this.enabled=!0,this.pageManager=new nve(n,this.recordEvent),this.sessionManager=new tve(e,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(nx(n.applicationAttributes,"application"))}enable(){this.enabled=!0}disable(){this.enabled=!1}setPluginFlushHook(e){this.pluginFlushHook=e}isSessionSampled(){return this.sessionManager.isSampled()}hasEvents(){if(this.sessionLimitExceeded>0){const e=this.events.length+this.sessionLimitExceeded;this.sessionManager.isSampled()?be.warn(`Dropped ${this.sessionLimitExceeded} of ${e} recently observed events (${(this.sessionLimitExceeded/e*100).toFixed(2)}%) because the session limit has exceeded. Consider increasing sessionEventLimit (currently ${this.config.sessionEventLimit}) to ${e} or more to avoid data loss.`):be.warn(`Dropped ${this.sessionLimitExceeded} of ${e} recently observed events (${(this.sessionLimitExceeded/e*100).toFixed(2)}%) because current session is not sampled. Consider increasing sessionSampleRate (currently ${this.config.sessionSampleRate}) to capture more user sessions.`),this.sessionLimitExceeded=0}return this.events.length!==0}hasCandidates(){return this.candidates.size!==0}getEventBatch(e=!1){var n;if(this.droppedEvent>0){const s=this.events.length+this.droppedEvent;be.warn(`Dropped ${this.droppedEvent} of ${s} recently observed events (${(this.droppedEvent/s*100).toFixed(2)}%) due to insufficient in-memory queue. Increase eventCacheSize to ${s} (currently ${this.config.eventCacheSize}) to avoid data loss.`),this.droppedEvent=0}let r=[];if(e&&((n=this.pluginFlushHook)===null||n===void 0||n.call(this)),e&&this.hasCandidates())if(this.candidates.size<=this.config.batchLimit)r=Array.from(this.candidates.values()),this.candidates.clear();else{let s=0;for(const o of Array.from(this.candidates.keys())){if(s++>=this.config.batchLimit)break;const a=this.candidates.get(o);a&&(r.push(a),this.candidates.delete(o))}}return this.events.length&&(this.events.length<=this.config.batchLimit-r.length?(r.push(...this.events),this.events=[]):r.push(...this.events.splice(0,this.config.batchLimit-r.length))),r}getAppMonitorDetails(){return this.appMonitorDetails}getUserDetails(){return{userId:this.sessionManager.getUserId(),sessionId:this.sessionManager.getSession().sessionId}}addSessionAttributes(e){this.sessionManager.addSessionAttributes(e)}getCommonMetadata(){return Object.assign(Object.assign(Object.assign({},this.sessionManager.getAttributes()),this.applicationAttributes),{version:"1.0.0","aws:client":this.installationMethod,"aws:clientVersion":rve})}setEventMetadataHook(e){this.eventMetadataHook=e}clearEventMetadataHook(){this.eventMetadataHook=void 0}isCurrentUrlAllowed(){const e=document.location.toString(),n=this.config.pagesToExclude.some(s=>s.test(e));return this.config.pagesToInclude.some(s=>s.test(e))&&!n}}var An;(function(t){t.OTHER="other",t.STYLESHEET="stylesheet",t.DOCUMENT="document",t.SCRIPT="script",t.IMAGE="image",t.FONT="font"})(An||(An={}));var ai;(function(t){t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.FRAME="frame",t.SCRIPT="script",t.CSS="css"})(ai||(ai={}));const D4=t=>[t.startTime,t.duration].join("#"),ive=[{name:An.STYLESHEET,list:["css","less"]},{name:An.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:An.SCRIPT,list:["js"]},{name:An.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:An.FONT,list:["fnt","fon","otf","ttf","woff"]}],L4=(t,e)=>{let n=An.OTHER;if(t){const r=t.substring(t.lastIndexOf("/")+1),s=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];ive.forEach(o=>{o.list.indexOf(s)>-1&&(n=o.name)})}if(e&&n===An.OTHER)switch(e){case ai.IMAGE:case ai.IMG:case ai.INPUT:n=An.IMAGE;break;case ai.IFRAME:case ai.FRAME:n=An.DOCUMENT;break;case ai.SCRIPT:n=An.SCRIPT;break;case ai.CSS:n=An.STYLESHEET;break}return n},ave=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),lve=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,uve=(t,e)=>{try{return new URL(t).hostname===e&&lve.test(t)}catch{return!1}},rz="dom-event",cve={interactionId:()=>"",enableMutationObserver:!1,events:[]};class gR extends Ns{constructor(e){super(rz),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},cve),e)}static getElementInfo(e){const n={name:"UNKNOWN"};return e.target instanceof Node&&(n.name=e.target.nodeName),e.target instanceof Element&&e.target.id&&(n.id=e.target.id),n}enable(){if(document.readyState!=="complete"){window.addEventListener("load",()=>this.enable());return}this.enabled||(this.addListeners(),this.config.enableMutationObserver&&this.observeDOMMutation(),this.enabled=!0)}disable(){this.enabled&&(this.removeListeners(),this.observer&&this.observer.disconnect(),this.enabled=!1)}update(e){e.forEach(n=>{this.addEventHandler(n),this.config.events.push(n)})}onload(){this.enable()}removeListeners(){this.config.events.forEach(e=>this.removeEventHandler(e))}addListeners(){this.config.events.forEach(e=>this.addEventHandler(e))}getEventListener(e){return n=>{var r;const s=gR.getElementInfo(n),o=this.config.interactionId(n),a=Object.assign(Object.assign(Object.assign({version:"1.1.0",event:n.type,element:s.name},s.id?{elementId:s.id}:{}),o?{interactionId:o}:{}),e?{cssLocator:e}:{});!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(Vme,a)}}addEventHandler(e){const n=e.event,r=this.getEventListener(e.cssLocator),s=[],o=this.eventListenerMap.has(e)?this.eventListenerMap.get(e):[];if(e.cssLocator)document.querySelectorAll(e.cssLocator).forEach(u=>{s.push(u)});else if(e.elementId){const a=document.getElementById(e.elementId);a&&s.push(a)}else e.element&&s.push(e.element);s.forEach(a=>{a.addEventListener(n,r),o.push({element:a,eventListener:r})}),this.eventListenerMap.set(e,o)}removeEventHandler(e){const n=this.eventListenerMap.get(e);n&&(n.forEach(r=>{const s=r.element,o=r.eventListener;s.removeEventListener(e.event,o)}),this.eventListenerMap.delete(e))}observeDOMMutation(){this.observer=new MutationObserver(()=>{this.removeListeners(),this.addListeners()}),this.observer.observe(document,{childList:!0,subtree:!0})}}const dve=t=>{const e=typeof t;return(e==="object"||e==="function")&&!!t},fve=t=>{const e={version:"1.0.0",type:"undefined",message:"undefined"};return t.type!==void 0&&(e.type=t.type),t.message!==void 0&&(e.message=t.message),t.filename!==void 0&&(e.filename=t.filename),t.lineno!==void 0&&(e.lineno=t.lineno),t.colno!==void 0&&(e.colno=t.colno),e},hve=(t,e)=>{t.type!=="unhandledrejection"&&(t.type=e.toString()),t.message=e.toString()},pve=(t,e,n)=>{e.name&&(t.type=e.name),e.message&&(t.message=e.message),e.fileName&&(t.filename=e.fileName),e.lineNumber&&(t.lineno=e.lineNumber),e.columnNumber&&(t.colno=e.columnNumber),n&&e.stack&&(t.stack=e.stack.length>n?e.stack.substring(0,n)+"...":e.stack)},sz=t=>t!==Object(t)&&t!==void 0&&t!==null,mR=(t,e)=>{const n=fve(t),r=t.error;return dve(r)?pve(n,r,e):sz(r)&&hve(n,r),n},oz="js-error",gve={stackTraceLength:1e3,ignore:()=>!1};class mve extends Ns{constructor(e){super(oz),this.eventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent(n)},this.promiseRejectEventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent({type:n.type,error:n.reason})},this.config=Object.assign(Object.assign({},gve),e)}enable(){this.enabled||(this.addEventHandler(),this.enabled=!0)}disable(){this.enabled&&(this.removeEventHandler(),this.enabled=!1)}record(e){e instanceof ErrorEvent?this.recordJsErrorEvent(e):this.recordJsErrorEvent({type:"error",error:e})}onload(){this.addEventHandler()}recordJsErrorEvent(e){var n;(n=this.context)===null||n===void 0||n.record(Kme,mR(e,this.config.stackTraceLength))}addEventHandler(){window.addEventListener("error",this.eventHandler),window.addEventListener("unhandledrejection",this.promiseRejectEventHandler)}removeEventHandler(){window.removeEventListener("error",this.eventHandler),window.removeEventListener("unhandledrejection",this.promiseRejectEventHandler)}}const vve=t=>t.entryType==="resource"&&(!/^https?:/.test(t.name)||/^(fetch|xmlhttprequest)$/.test(t.initiatorType)),vR={eventLimit:10,ignore:vve,recordAllTypes:[An.DOCUMENT,An.SCRIPT,An.STYLESHEET,An.FONT],sampleTypes:[An.IMAGE,An.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},yve="navigation",oc="navigation",rx="load";class bve extends Ns{constructor(e){super(yve),this.eventListener=()=>{performance.getEntriesByType(oc).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(s=>s.entryType===oc).filter(s=>!this.config.ignore(s)).forEach(s=>{this.performanceNavigationEventHandlerTimingLevel2(s)})}).observe({entryTypes:[oc]})},this.performanceNavigationEventHandlerTimingLevel1=()=>{setTimeout(()=>{var r;const s=performance.timing,o=s.navigationStart,a={version:"1.0.0",initiatorType:"navigation",startTime:0,unloadEventStart:s.unloadEventStart>0?s.unloadEventStart-o:0,promptForUnload:s.unloadEventEnd-s.unloadEventStart,redirectStart:s.redirectStart>0?s.redirectStart-o:0,redirectTime:s.redirectEnd-s.redirectStart,fetchStart:s.fetchStart>0?s.fetchStart-o:0,domainLookupStart:s.domainLookupStart>0?s.domainLookupStart-o:0,dns:s.domainLookupEnd-s.domainLookupStart,connectStart:s.connectStart>0?s.connectStart-o:0,connect:s.connectEnd-s.connectStart,secureConnectionStart:s.secureConnectionStart>0?s.secureConnectionStart-o:0,tlsTime:s.secureConnectionStart>0?s.connectEnd-s.secureConnectionStart:0,requestStart:s.requestStart>0?s.requestStart-o:0,timeToFirstByte:s.responseStart-s.requestStart,responseStart:s.responseStart>0?s.responseStart-o:0,responseTime:s.responseStart>0?s.responseEnd-s.responseStart:0,domInteractive:s.domInteractive>0?s.domInteractive-o:0,domContentLoadedEventStart:s.domContentLoadedEventStart>0?s.domContentLoadedEventStart-o:0,domContentLoaded:s.domContentLoadedEventEnd-s.domContentLoadedEventStart,domComplete:s.domComplete>0?s.domComplete-o:0,domProcessingTime:s.loadEventStart-s.responseEnd,loadEventStart:s.loadEventStart>0?s.loadEventStart-o:0,loadEventTime:s.loadEventEnd-s.loadEventStart,duration:s.loadEventEnd-s.navigationStart,navigationTimingLevel:1};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(R_,a)},0)},this.performanceNavigationEventHandlerTimingLevel2=n=>{var r;const s={version:"1.0.0",initiatorType:n.initiatorType,navigationType:n.type,startTime:n.startTime,unloadEventStart:n.unloadEventStart,promptForUnload:n.unloadEventEnd-n.unloadEventStart,redirectCount:n.redirectCount,redirectStart:n.redirectStart,redirectTime:n.redirectEnd-n.redirectStart,workerStart:n.workerStart,workerTime:n.workerStart>0?n.fetchStart-n.workerStart:0,fetchStart:n.fetchStart,domainLookupStart:n.domainLookupStart,dns:n.domainLookupEnd-n.domainLookupStart,nextHopProtocol:n.nextHopProtocol,connectStart:n.connectStart,connect:n.connectEnd-n.connectStart,secureConnectionStart:n.secureConnectionStart,tlsTime:n.secureConnectionStart>0?n.connectEnd-n.secureConnectionStart:0,requestStart:n.requestStart,timeToFirstByte:n.responseStart-n.requestStart,responseStart:n.responseStart,responseTime:n.responseStart>0?n.responseEnd-n.responseStart:0,domInteractive:n.domInteractive,domContentLoadedEventStart:n.domContentLoadedEventStart,domContentLoaded:n.domContentLoadedEventEnd-n.domContentLoadedEventStart,domComplete:n.domComplete,domProcessingTime:n.loadEventStart-n.responseEnd,loadEventStart:n.loadEventStart,loadEventTime:n.loadEventEnd-n.loadEventStart,duration:n.duration,headerSize:n.transferSize>0?n.transferSize-n.encodedBodySize:0,transferSize:n.transferSize,compressionRatio:n.encodedBodySize>0?n.decodedBodySize/n.encodedBodySize:0,navigationTimingLevel:2};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(R_,s)},this.config=Object.assign(Object.assign({},vR),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(rx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(rx,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(oc).length?!!window.performance.getEntriesByType(oc)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(oc).filter(e=>!this.config.ignore(e)).forEach(e=>this.performanceNavigationEventHandlerTimingLevel2(e)):window.addEventListener(rx,this.eventListener))}}var sx,U4;function Sve(){if(U4)return sx;U4=1;function t(c){return typeof c=="function"}var e=console.error.bind(console);function n(c,f,p){var g=!!c[f]&&c.propertyIsEnumerable(f);Object.defineProperty(c,f,{configurable:!0,enumerable:g,writable:!0,value:p})}function r(c){c&&c.logger&&(t(c.logger)?e=c.logger:e("new logger isn't a function, not replacing"))}function s(c,f,p){if(!c||!c[f]){e("no original function "+f+" to wrap");return}if(!p){e("no wrapper function"),e(new Error().stack);return}if(!t(c[f])||!t(p)){e("original object and wrapper must be functions");return}var g=c[f],m=p(g,f);return n(m,"__original",g),n(m,"__unwrap",function(){c[f]===m&&n(c,f,g)}),n(m,"__wrapped",!0),n(c,f,m),m}function o(c,f,p){if(c)Array.isArray(c)||(c=[c]);else{e("must provide one or more modules to patch"),e(new Error().stack);return}if(!(f&&Array.isArray(f))){e("must provide one or more functions to wrap on modules");return}c.forEach(function(g){f.forEach(function(m){s(g,m,p)})})}function a(c,f){if(!c||!c[f]){e("no function to unwrap."),e(new Error().stack);return}if(!c[f].__unwrap)e("no original to unwrap to -- has "+f+" already been unwrapped?");else return c[f].__unwrap()}function u(c,f){if(c)Array.isArray(c)||(c=[c]);else{e("must provide one or more modules to patch"),e(new Error().stack);return}if(!(f&&Array.isArray(f))){e("must provide one or more functions to unwrap on modules");return}c.forEach(function(p){f.forEach(function(g){a(p,g)})})}return r.wrap=s,r.massWrap=o,r.unwrap=a,r.massUnwrap=u,sx=r,sx}var Bv=Sve();const Eve=qa(Bv),F4=j5({__proto__:null,default:Eve},[Bv]);class yR extends Ns{constructor(){super(...arguments),this.enable=this.patch.bind(this,!0),this.disable=this.patch.bind(this,!1),this.enabled=!1}patchAll(){const e=Bv.wrap.bind(F4);for(const n of this.patches)e(n.nodule,n.name,n.wrapper())}unpatchAll(){const e=Bv.unwrap.bind(F4);for(const n of this.patches)e(n.nodule,n.name)}patch(e=!0){this.enabled!==e&&(this.enabled=e,e?this.patchAll():this.unpatchAll())}}const Cve="page-view";class wve extends yR{constructor(){super(Cve),this.pushState=()=>{const e=this;return n=>function(r,s,o){const a=n.apply(this,arguments);return e.recordPageView(),a}},this.replaceState=()=>{const e=this;return n=>function(r,s,o){const a=n.apply(this,arguments);return e.recordPageView(),a}},this.popstateListener=e=>{this.recordPageView()},this.recordPageView=()=>{this.context.recordPageView(this.createIdForCurrentPage())},this.enable()}onload(){this.addListener(),this.recordPageView()}get patches(){return[{nodule:History.prototype,name:"pushState",wrapper:this.pushState},{nodule:History.prototype,name:"replaceState",wrapper:this.replaceState}]}addListener(){window.addEventListener("popstate",this.popstateListener)}createIdForCurrentPage(){const e=window.location.pathname,n=window.location.hash;switch(this.context.config.pageIdFormat){case ah.PathAndHash:return e&&n?e+n:e||n||"";case ah.Hash:return n||"";case ah.Path:default:return e||""}}}const xve="resource",ox="resource";class _ve extends Ns{constructor(e){super(xve),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==ox||this.config.ignore(r))return;const{name:s,initiatorType:o}=r,a=L4(s,o);this.config.recordAllTypes.includes(a)?this.recordResourceEvent(r):this.config.sampleTypes.includes(a)&&this.eventCount<this.config.eventLimit&&(this.recordResourceEvent(r),this.eventCount++)})},this.recordResourceEvent=({name:n,startTime:r,initiatorType:s,duration:o,transferSize:a})=>{var u;if(!uve(n,this.context.config.endpointUrl.hostname)&&!((u=this.context)===null||u===void 0)&&u.record){const c={version:"1.0.0",initiatorType:s,startTime:r,duration:o,fileType:L4(n,s),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record(tz,c)}},this.config=Object.assign(Object.assign({},vR),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:ox,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:ox,buffered:!0})}}var O_,z4,gb=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},bR=function(t){if(document.readyState==="loading")return"loading";var e=gb();if(e){if(t<e.domInteractive)return"loading";if(e.domContentLoadedEventStart===0||t<e.domContentLoadedEventStart)return"dom-interactive";if(e.domComplete===0||t<e.domComplete)return"dom-content-loaded"}return"complete"},Ave=function(t){var e=t.nodeName;return t.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},mb=function(t,e){var n="";try{for(;t&&t.nodeType!==9;){var r=t,s=r.id?"#"+r.id:Ave(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+s.length>(e||100)-1)return n||s;if(n=n?s+">"+n:s,r.id)break;t=r.parentNode}}catch{}return n},iz=-1,Tve=function(){return iz},hd=function(t){addEventListener("pageshow",(function(e){e.persisted&&(iz=e.timeStamp,t(e))}),!0)},SR=function(){var t=gb();return t&&t.activationStart||0},Io=function(t,e){var n=gb(),r="navigate";return Tve()>=0?r="back-forward-cache":n&&(document.prerendering||SR()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},lu=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(s){Promise.resolve().then((function(){e(s.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},Oo=function(t,e,n,r){var s,o;return function(a){e.value>=0&&(a||r)&&((o=e.value-(s||0))||s===void 0)&&(s=e.value,e.delta=o,e.rating=(function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"})(e.value,n),t(e))}},ER=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},ap=function(t){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&t()}))},vb=function(t){var e=!1;return function(){e||(t(),e=!0)}},xc=-1,j4=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Hv=function(t){document.visibilityState==="hidden"&&xc>-1&&(xc=t.type==="visibilitychange"?t.timeStamp:0,Rve())},B4=function(){addEventListener("visibilitychange",Hv,!0),addEventListener("prerenderingchange",Hv,!0)},Rve=function(){removeEventListener("visibilitychange",Hv,!0),removeEventListener("prerenderingchange",Hv,!0)},CR=function(){return xc<0&&(xc=j4(),B4(),hd((function(){setTimeout((function(){xc=j4(),B4()}),0)}))),{get firstHiddenTime(){return xc}}},yb=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},H4=[1800,3e3],Ive=function(t,e){e=e||{},yb((function(){var n,r=CR(),s=Io("FCP"),o=lu("paint",(function(a){a.forEach((function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(s.value=Math.max(u.startTime-SR(),0),s.entries.push(u),n(!0)))}))}));o&&(n=Oo(t,s,H4,e.reportAllChanges),hd((function(a){s=Io("FCP"),n=Oo(t,s,H4,e.reportAllChanges),ER((function(){s.value=performance.now()-a.timeStamp,n(!0)}))})))}))},$4=[.1,.25],Ove=function(t,e){(function(n,r){r=r||{},Ive(vb((function(){var s,o=Io("CLS",0),a=0,u=[],c=function(p){p.forEach((function(g){if(!g.hadRecentInput){var m=u[0],y=u[u.length-1];a&&g.startTime-y.startTime<1e3&&g.startTime-m.startTime<5e3?(a+=g.value,u.push(g)):(a=g.value,u=[g])}})),a>o.value&&(o.value=a,o.entries=u,s())},f=lu("layout-shift",c);f&&(s=Oo(n,o,$4,r.reportAllChanges),ap((function(){c(f.takeRecords()),s(!0)})),hd((function(){a=0,o=Io("CLS",0),s=Oo(n,o,$4,r.reportAllChanges),ER((function(){return s()}))})),setTimeout(s,0))})))})((function(n){var r=(function(s){var o,a={};if(s.entries.length){var u=s.entries.reduce((function(f,p){return f&&f.value>p.value?f:p}));if(u&&u.sources&&u.sources.length){var c=(o=u.sources).find((function(f){return f.node&&f.node.nodeType===1}))||o[0];c&&(a={largestShiftTarget:mb(c.node),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:c,largestShiftEntry:u,loadState:bR(u.startTime)})}}return Object.assign(s,{attribution:a})})(n);t(r)}),e)},az=0,ix=1/0,fm=0,Nve=function(t){t.forEach((function(e){e.interactionId&&(ix=Math.min(ix,e.interactionId),fm=Math.max(fm,e.interactionId),az=fm?(fm-ix)/7+1:0)}))},lz=function(){return O_?az:performance.interactionCount||0},Mve=function(){"interactionCount"in performance||O_||(O_=lu("event",Nve,{type:"event",buffered:!0,durationThreshold:0}))},Gs=[],lh=new Map,uz=0,Pve=function(){var t=Math.min(Gs.length-1,Math.floor((lz()-uz)/50));return Gs[t]},cz=[],kve=function(t){if(cz.forEach((function(s){return s(t)})),t.interactionId||t.entryType==="first-input"){var e=Gs[Gs.length-1],n=lh.get(t.interactionId);if(n||Gs.length<10||t.duration>e.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};lh.set(r.id,r),Gs.push(r)}Gs.sort((function(s,o){return o.latency-s.latency})),Gs.length>10&&Gs.splice(10).forEach((function(s){return lh.delete(s.id)}))}}},wR=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=vb(t),document.visibilityState==="hidden"?t():(n=e(t),ap(t)),n},q4=[200,500],Dve=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},yb((function(){var n;Mve();var r,s=Io("INP"),o=function(u){wR((function(){u.forEach(kve);var c=Pve();c&&c.latency!==s.value&&(s.value=c.latency,s.entries=c.entries,r())}))},a=lu("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=Oo(t,s,q4,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),ap((function(){o(a.takeRecords()),r(!0)})),hd((function(){uz=lz(),Gs.length=0,lh.clear(),s=Io("INP"),r=Oo(t,s,q4,e.reportAllChanges)})))})))},Mc=[],xa=[],N_=0,xR=new WeakMap,Pc=new Map,M_=-1,Lve=function(t){Mc=Mc.concat(t),dz()},dz=function(){M_<0&&(M_=wR(Uve))},Uve=function(){Pc.size>10&&Pc.forEach((function(a,u){lh.has(u)||Pc.delete(u)}));var t=Gs.map((function(a){return xR.get(a.entries[0])})),e=xa.length-50;xa=xa.filter((function(a,u){return u>=e||t.includes(a)}));for(var n=new Set,r=0;r<xa.length;r++){var s=xa[r];hz(s.startTime,s.processingEnd).forEach((function(a){n.add(a)}))}var o=Mc.length-1-50;Mc=Mc.filter((function(a,u){return a.startTime>N_&&u>o||n.has(a)})),M_=-1};cz.push((function(t){t.interactionId&&t.target&&!Pc.has(t.interactionId)&&Pc.set(t.interactionId,t.target)}),(function(t){var e,n=t.startTime+t.duration;N_=Math.max(N_,t.processingEnd);for(var r=xa.length-1;r>=0;r--){var s=xa[r];if(Math.abs(n-s.renderTime)<=8){(e=s).startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd),e.entries.push(t);break}}e||(e={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:n,entries:[t]},xa.push(e)),(t.interactionId||t.entryType==="first-input")&&xR.set(t,e),dz()}));var _a,uh,fz,$v,hz=function(t,e){for(var n,r=[],s=0;n=Mc[s];s++)if(!(n.startTime+n.duration<t)){if(n.startTime>e)break;r.push(n)}return r},Fve=function(t,e){z4||(z4=lu("long-animation-frame",Lve)),Dve((function(n){var r=(function(s){var o=s.entries[0],a=xR.get(o),u=o.processingStart,c=a.processingEnd,f=a.entries.sort((function(C,w){return C.processingStart-w.processingStart})),p=hz(o.startTime,c),g=s.entries.find((function(C){return C.target})),m=g&&g.target||Pc.get(o.interactionId),y=[o.startTime+o.duration,c].concat(p.map((function(C){return C.startTime+C.duration}))),S=Math.max.apply(Math,y),E={interactionTarget:mb(m),interactionTargetElement:m,interactionType:o.name.startsWith("key")?"keyboard":"pointer",interactionTime:o.startTime,nextPaintTime:S,processedEventEntries:f,longAnimationFrameEntries:p,inputDelay:u-o.startTime,processingDuration:c-u,presentationDelay:Math.max(S-c,0),loadState:bR(o.startTime)};return Object.assign(s,{attribution:E})})(n);t(r)}),e)},W4=[2500,4e3],ax={},zve=function(t,e){(function(n,r){r=r||{},yb((function(){var s,o=CR(),a=Io("LCP"),u=function(p){r.reportAllChanges||(p=p.slice(-1)),p.forEach((function(g){g.startTime<o.firstHiddenTime&&(a.value=Math.max(g.startTime-SR(),0),a.entries=[g],s())}))},c=lu("largest-contentful-paint",u);if(c){s=Oo(n,a,W4,r.reportAllChanges);var f=vb((function(){ax[a.id]||(u(c.takeRecords()),c.disconnect(),ax[a.id]=!0,s(!0))}));["keydown","click"].forEach((function(p){addEventListener(p,(function(){return wR(f)}),{once:!0,capture:!0})})),ap(f),hd((function(p){a=Io("LCP"),s=Oo(n,a,W4,r.reportAllChanges),ER((function(){a.value=performance.now()-p.timeStamp,ax[a.id]=!0,s(!0)}))}))}}))})((function(n){var r=(function(s){var o={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:s.value};if(s.entries.length){var a=gb();if(a){var u=a.activationStart||0,c=s.entries[s.entries.length-1],f=c.url&&performance.getEntriesByType("resource").filter((function(S){return S.name===c.url}))[0],p=Math.max(0,a.responseStart-u),g=Math.max(p,f?(f.requestStart||f.startTime)-u:0),m=Math.max(g,f?f.responseEnd-u:0),y=Math.max(m,c.startTime-u);o={element:mb(c.element),timeToFirstByte:p,resourceLoadDelay:g-p,resourceLoadDuration:m-g,elementRenderDelay:y-m,navigationEntry:a,lcpEntry:c},c.url&&(o.url=c.url),f&&(o.lcpResourceEntry=f)}}return Object.assign(s,{attribution:o})})(n);t(r)}),e)},Qf={passive:!0,capture:!0},jve=new Date,G4=function(t,e){_a||(_a=e,uh=t,fz=new Date,gz(removeEventListener),pz())},pz=function(){if(uh>=0&&uh<fz-jve){var t={entryType:"first-input",name:_a.type,target:_a.target,cancelable:_a.cancelable,startTime:_a.timeStamp,processingStart:_a.timeStamp+uh};$v.forEach((function(e){e(t)})),$v=[]}},Bve=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?(function(n,r){var s=function(){G4(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",s,Qf),removeEventListener("pointercancel",o,Qf)};addEventListener("pointerup",s,Qf),addEventListener("pointercancel",o,Qf)})(e,t):G4(e,t)}},gz=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,Bve,Qf)}))},V4=[100,300],Hve=function(t,e){e=e||{},yb((function(){var n,r=CR(),s=Io("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(s.value=c.processingStart-c.startTime,s.entries.push(c),n(!0))},a=function(c){c.forEach(o)},u=lu("first-input",a);n=Oo(t,s,V4,e.reportAllChanges),u&&(ap(vb((function(){a(u.takeRecords()),u.disconnect()}))),hd((function(){var c;s=Io("FID"),n=Oo(t,s,V4,e.reportAllChanges),$v=[],uh=-1,_a=null,gz(addEventListener),c=o,$v.push(c),pz()})))}))},$ve=function(t,e){Hve((function(n){var r=(function(s){var o=s.entries[0],a={eventTarget:mb(o.target),eventType:o.name,eventTime:o.startTime,eventEntry:o,loadState:bR(o.startTime)};return Object.assign(s,{attribution:a})})(n);t(r)}),e)};const qve="web-vitals";class Wve extends Ns{constructor(e){super(qve),this.resourceEventIds=new Map,this.cacheLCPCandidates=ave(),this.handleEvent=n=>{switch(n.type){case tz:const r=n.details;this.cacheLCPCandidates&&r.fileType===An.IMAGE&&this.resourceEventIds.set(D4(n.details),n.id);break;case R_:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},vR),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Ph.EVENT,this.handleEvent),zve(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),$ve(e=>this.handleFID(e)),Ove(e=>this.handleCLS(e),{reportAllChanges:!0}),Fve(e=>this.handleINP(e),{reportAllChanges:!0})}handleLCP(e){var n,r;const s=e.attribution,o={element:s?.element,url:s?.url,timeToFirstByte:s?.timeToFirstByte,resourceLoadDelay:s?.resourceLoadDelay,resourceLoadTime:s?.resourceLoadDuration,elementRenderDelay:s?.elementRenderDelay};if(s?.lcpResourceEntry){const a=D4(s?.lcpResourceEntry);o.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(o.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record($me,{version:"1.0.0",value:e.value,attribution:o}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(Ph.EVENT,this.handleEvent),this.resourceEventIds.clear(),this.navigationEventId=void 0}handleCLS(e){const n=e.attribution,{record:r,recordCandidate:s}=this.context;(this.config.reportAllCLS?r:s)(Wme,{version:"1.0.0",value:e.value,attribution:{largestShiftTarget:n?.largestShiftTarget,largestShiftValue:n?.largestShiftValue,largestShiftTime:n?.largestShiftTime,loadState:n?.loadState}})}handleFID(e){var n;const r=e.attribution;(n=this.context)===null||n===void 0||n.record(qme,{version:"1.0.0",value:e.value,attribution:{eventTarget:r?.eventTarget,eventType:r?.eventType,eventTime:r?.eventTime,loadState:r?.loadState}})}handleINP(e){const n=e.attribution,{record:r,recordCandidate:s}=this.context;(this.config.reportAllINP?r:s)(Gme,{version:"1.0.0",value:e.value,attribution:{interactionTarget:n?.interactionTarget,interactionTime:n?.interactionTime,nextPaintTime:n?.nextPaintTime,interactionType:n?.interactionType,inputDelay:n?.inputDelay,processingDuration:n?.processingDuration,presentationDelay:n?.presentationDelay,loadState:n?.loadState}})}}const Gve="fetch";class Vve extends yR{constructor(e){super(Gve),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.beginTrace=(n,r,s)=>{const o=wc(),a=Uge(n,r,!0),u=H7(this.config.logicalServiceName,o,this.context.config.enableW3CTraceId),c=$7(q7(n),o,a);return u.subsegments.push(c),this.isTraceIdHeaderEnabled(n)&&this.addXRayTraceIdHeader(n,r,s,u),u},this.addXRayTraceIdHeader=(n,r,s,o)=>{if(n.headers)return zge(n.headers,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(s,r)),Fge(r,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,s)=>{if(n){const o=wc();if(n.subsegments[0].end_time=o,n.end_time=o,r){n.subsegments[0].http.response={status:r.status},cR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):j7(r.status)?(n.subsegments[0].error=!0,n.error=!0):uR(r.status)&&(n.subsegments[0].fault=!0,n.fault=!0);const a=r.headers.get("Content-Length"),u=a?parseInt(a,10):NaN;isNaN(u)||(n.subsegments[0].http.response.content_length=u)}s&&(n.fault=!0,n.subsegments[0].fault=!0,s instanceof Object?this.appendErrorCauseFromObject(n.subsegments[0],s):sz(s)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],s.toString())),this.context.record(ez,n)}},this.createHttpEvent=(n,r)=>{const s=n;return{version:"1.0.0",request:{url:av(n),method:r?.method?r.method:s.method?s.method:"GET"}}},this.recordHttpEventWithResponse=(n,r)=>{(this.config.recordAllRequests||!r.ok)&&(n.response={status:r.status,statusText:r.statusText},this.context.record(jv,n))},this.recordHttpEventWithError=(n,r)=>{n.error=mR({type:"error",error:r},this.config.stackTraceLength),this.context.record(jv,n)},this.fetch=(n,r,s,o,a)=>{const u=this.createHttpEvent(o,a);let c;if(!B7(av(o),this.config))return n.apply(r,s);const f=Bge(o.headers,this.context.config.enableW3CTraceId);return f.traceId&&f.segmentId?(u.trace_id=f.traceId,u.segment_id=f.segmentId):this.isTracingEnabled()&&this.isSessionRecorded()&&(c=this.beginTrace(o,a,s),u.trace_id=c.trace_id,u.segment_id=c.subsegments[0].id),n.apply(r,s).then(p=>(this.endTrace(c,p,void 0),this.recordHttpEventWithResponse(u,p),p)).catch(p=>{throw this.endTrace(c,void 0,p),this.recordHttpEventWithError(u,p),p})},this.fetchWrapper=()=>{const n=this;return r=>function(s,o){return n.fetch(r,this,arguments,s,o)}},this.config=Object.assign(Object.assign({},z7),e)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(e){const n=av(e);return F7(n,this.config.addXRayTraceIdHeader)}appendErrorCauseFromPrimitive(e,n){e.cause={exceptions:[{type:n}]}}appendErrorCauseFromObject(e,n){e.cause={exceptions:[{type:n.name,message:n.message}]}}}class Kve extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}}const Yve="xhr";class Zve extends yR{constructor(e){super(Yve),this.addXRayTraceIdHeader=n=>F7(n,this.config.addXRayTraceIdHeader),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.handleXhrLoadEvent=n=>{const r=n.target,s=this.xhrMap.get(r);if(s){const o=wc();s.trace.end_time=o,s.trace.subsegments[0].end_time=o,s.trace.subsegments[0].http.response={status:r.status},cR(r.status)?(s.trace.subsegments[0].throttle=!0,s.trace.throttle=!0):j7(r.status)?(s.trace.subsegments[0].error=!0,s.trace.error=!0):uR(r.status)&&(s.trace.subsegments[0].fault=!0,s.trace.fault=!0);const a=r.getResponseHeader("Content-Length"),u=a?parseInt(a,10):NaN;isNaN(u)||(s.trace.subsegments[0].http.response.content_length=u),this.recordTraceEvent(s.trace),this.recordHttpEventWithResponse(s,r)}},this.handleXhrErrorEvent=n=>{const r=n.target,s=this.xhrMap.get(r),o="XMLHttpRequest error",a=r.statusText?r.status.toString()+": "+r.statusText:r.status.toString();if(s){const u=wc();s.trace.fault=!0,s.trace.end_time=u,s.trace.subsegments[0].end_time=u,s.trace.subsegments[0].fault=!0,s.trace.subsegments[0].cause={exceptions:[{type:o,message:a}]},this.recordTraceEvent(s.trace),this.recordHttpEventWithError(s,r,new Kve(a))}},this.handleXhrAbortEvent=n=>{const r=n.target,s=this.xhrMap.get(r);s&&this.handleXhrDetailsOnError(s,r,"XMLHttpRequest abort")},this.handleXhrTimeoutEvent=n=>{const r=n.target,s=this.xhrMap.get(r);this.handleXhrDetailsOnError(s,r,"XMLHttpRequest timeout")},this.initializeTrace=n=>{const r=wc();n.trace=H7(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push($7(q7(n.url),r,{request:{method:n.method,url:n.url,traced:!0}}))},this.sendWrapper=()=>{const n=this;return r=>function(){const s=n.xhrMap.get(this);return s&&(this.addEventListener("load",n.handleXhrLoadEvent),this.addEventListener("error",n.handleXhrErrorEvent),this.addEventListener("abort",n.handleXhrAbortEvent),this.addEventListener("timeout",n.handleXhrTimeoutEvent),n.initializeTrace(s),!n.isSyntheticsUA&&n.isTracingEnabled()&&n.addXRayTraceIdHeader(s.url)&&n.isSessionRecorded()&&(n.context.config.enableW3CTraceId?this.setRequestHeader(hb,fR(s.trace.trace_id,s.trace.subsegments[0].id)):this.setRequestHeader(fb,dR(s.trace.trace_id,s.trace.subsegments[0].id)))),r.apply(this,arguments)}},this.openWrapper=()=>{const n=this;return r=>function(s,o,a){return B7(o,n.config)&&n.xhrMap.set(this,{url:o,method:s,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},z7),e),this.xhrMap=new Map,this.isSyntheticsUA=navigator.userAgent.includes("CloudWatchSynthetics")}onload(){this.enable()}get patches(){return[{nodule:XMLHttpRequest.prototype,name:"send",wrapper:this.sendWrapper},{nodule:XMLHttpRequest.prototype,name:"open",wrapper:this.openWrapper}]}handleXhrDetailsOnError(e,n,r){if(e){const s=wc();e.trace.end_time=s,e.trace.subsegments[0].end_time=s,e.trace.subsegments[0].error=!0,e.trace.subsegments[0].cause={exceptions:[{type:r}]},this.recordTraceEvent(e.trace),this.recordHttpEventWithError(e,n,r)}}statusOk(e){return e>=200&&e<300}recordHttpEventWithResponse(e,n){this.xhrMap.delete(n);const r={version:"1.0.0",request:{method:e.method,url:e.url},response:{status:n.status,statusText:n.statusText}};this.isTracingEnabled()&&(r.trace_id=e.trace.trace_id,r.segment_id=e.trace.subsegments[0].id),(this.config.recordAllRequests||!this.statusOk(n.status))&&this.context.record(jv,r)}recordHttpEventWithError(e,n,r){this.xhrMap.delete(n);const s={version:"1.0.0",request:{method:e.method,url:e.url},error:mR({type:"error",error:r},this.config.stackTraceLength)};this.isTracingEnabled()&&(s.trace_id=e.trace.trace_id,s.segment_id=e.trace.subsegments[0].id),this.context.record(jv,s)}recordTraceEvent(e){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(ez,e)}}var qv={},Xve=Object.defineProperty,Qve=(t,e,n)=>e in t?Xve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e,n)=>Qve(t,typeof e!="symbol"?e+"":e,n),K4,Jve=Object.defineProperty,eye=(t,e,n)=>e in t?Jve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Y4=(t,e,n)=>eye(t,typeof e!="symbol"?e+"":e,n),Pn=(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))(Pn||{});const Z4={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},X4={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hm={},tye=()=>!!globalThis.Zone;function _R(t){if(hm[t])return hm[t];const e=globalThis[t],n=e.prototype,r=t in Z4?Z4[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 X4?X4[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&&!tye())return hm[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?hm[t]=f:n}catch{return n}}const lx={};function Ii(t,e,n){var r;const s=`${t}.${String(n)}`;if(lx[s])return lx[s].call(e);const o=_R(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(lx[s]=a,a.call(e)):e[n]}const ux={};function mz(t,e,n){const r=`${t}.${String(n)}`;if(ux[r])return ux[r].bind(e);const o=_R(t)[n];return typeof o!="function"?e[n]:(ux[r]=o,o.bind(e))}function nye(t){return Ii("Node",t,"ownerDocument")}function rye(t){return Ii("Node",t,"childNodes")}function sye(t){return Ii("Node",t,"parentNode")}function oye(t){return Ii("Node",t,"parentElement")}function iye(t){return Ii("Node",t,"textContent")}function aye(t,e){return mz("Node",t,"contains")(e)}function lye(t){return mz("Node",t,"getRootNode")()}function uye(t){return!t||!("host"in t)?null:Ii("ShadowRoot",t,"host")}function cye(t){return t.styleSheets}function dye(t){return!t||!("shadowRoot"in t)?null:Ii("Element",t,"shadowRoot")}function fye(t,e){return Ii("Element",t,"querySelector")(e)}function hye(t,e){return Ii("Element",t,"querySelectorAll")(e)}function pye(){return _R("MutationObserver").constructor}function gye(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 cr={ownerDocument:nye,childNodes:rye,parentNode:sye,parentElement:oye,textContent:iye,contains:aye,getRootNode:lye,host:uye,styleSheets:cye,shadowRoot:dye,querySelector:fye,querySelectorAll:hye,mutationObserver:pye,patch:gye};function vz(t){return t.nodeType===t.ELEMENT_NODE}function ch(t){const e=t&&"host"in t&&"mode"in t&&cr.host(t)||null;return!!(e&&"shadowRoot"in e&&cr.shadowRoot(e)===t)}function dh(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function mye(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function vye(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function P_(t){try{const e=t.rules||t.cssRules;if(!e)return null;let n=t.href;!n&&t.ownerNode&&(n=t.ownerNode.baseURI);const r=Array.from(e,s=>yz(s,n)).join("");return mye(r)}catch{return null}}function yz(t,e){if(bye(t)){let n;try{n=P_(t.styleSheet)||vye(t)}catch{n=t.cssText}return t.styleSheet.href?Vv(n,t.styleSheet.href):n}else{let n=t.cssText;return Sye(t)&&t.selectorText.includes(":")&&(n=yye(n)),e?Vv(n,e):n}}function yye(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function bye(t){return"styleSheet"in t}function Sye(t){return"selectorText"in t}class bz{constructor(){Y4(this,"idNodeMap",new Map),Y4(this,"nodeMetaMap",new WeakMap)}getId(e){var n;return e?((n=this.getMeta(e))==null?void 0:n.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){const r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){const r=this.getNode(e);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Eye(){return new bz}function Wv({element:t,maskInputOptions:e,tagName:n,type:r,value:s,maskInputFn:o}){let a=s||"";const u=r&&Kl(r);return(e[n.toLowerCase()]||u&&e[u])&&(o?a=o(a,t):a="*".repeat(a.length)),a}function Kl(t){return t.toLowerCase()}const Q4="__rrweb_original__";function Cye(t){const e=t.getContext("2d");if(!e)return!0;const n=50;for(let r=0;r<t.width;r+=n)for(let s=0;s<t.height;s+=n){const o=e.getImageData,a=Q4 in o?o[Q4]:o;if(new Uint32Array(a.call(e,r,s,Math.min(n,t.width-r),Math.min(n,t.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function Gv(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Kl(e):null}function Sz(t,e){let n;try{n=new URL(t,e??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return s?.[1]??null}function wye(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const xye=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,_ye=/^(?:[a-z+]+:)?\/\//i,Aye=/^www\..*/i,Tye=/^(data:)([^,]*),(.*)/i;function Vv(t,e){return(t||"").replace(xye,(n,r,s,o,a,u)=>{const c=s||a||u,f=r||o||"";if(!c)return n;if(_ye.test(c)||Aye.test(c))return`url(${f}${c}${f})`;if(Tye.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${wye(e)+c}${f})`;const p=e.split("/"),g=c.split("/");p.pop();for(const m of g)m!=="."&&(m===".."?p.pop():p.push(m));return`url(${f}${p.join("/")}${f})`})}function pm(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Rye(t,e,n=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&t&&typeof t=="string"){let a=pm(t,n);const u=a.length/t.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){const f=pm(r[c].textContent,n),p=100;let g=3;for(;g<f.length&&(f[g].match(/[a-zA-Z0-9]/)||f.indexOf(f.substring(0,g),1)!==-1);g++);for(;g<f.length;g++){let m=f.substring(0,g),y=a.split(m),S=-1;if(y.length===2)S=y[0].length;else if(y.length>2&&y[0]===""&&r[c-1].textContent!=="")S=a.indexOf(m,1);else if(y.length===1){if(m=m.substring(0,m.length-1),y=a.split(m),y.length<=1)return s.push(t),s;g=p+1}else g===f.length-1&&(S=a.indexOf(m));if(y.length>=2&&g>p){const E=r[c-1].textContent;if(E&&typeof E=="string"){const C=pm(E).length;S=a.indexOf(m,C)}S===-1&&(S=y[0].length)}if(S!==-1){let E=Math.floor(S/u);for(;E>0&&E<t.length;){if(o+=1,o>50*r.length)return s.push(t),s;const C=pm(t.substring(0,E),n);if(C.length===S){s.push(t.substring(0,E)),t=t.substring(E),a=a.substring(S);break}else C.length<S?E+=Math.max(1,Math.floor((S-C.length)/u)):E-=Math.max(1,Math.floor((C.length-S)*u))}break}}}}return s.push(t),s}function Iye(t,e){return Rye(t,e).join("/* rr_split */")}let Oye=1;const Nye=new RegExp("[^a-z0-9-_:]"),kh=-2;function Ez(){return Oye++}function Mye(t){if(t instanceof HTMLFormElement)return"form";const e=Kl(t.tagName);return Nye.test(e)?"div":e}let ic,J4;const Pye=/^[^ \t\n\r\u000c]+/,kye=/^[, \t\n\r\u000c]+/;function Dye(t,e){if(e.trim()==="")return e;let n=0;function r(o){let a;const u=o.exec(e.substring(n));return u?(a=u[0],n+=a.length,a):""}const s=[];for(;r(kye),!(n>=e.length);){let o=r(Pye);if(o.slice(-1)===",")o=_c(t,o.substring(0,o.length-1)),s.push(o);else{let a="";o=_c(t,o);let u=!1;for(;;){const c=e.charAt(n);if(c===""){s.push((o+a).trim());break}else if(u)c===")"&&(u=!1);else if(c===","){n+=1,s.push((o+a).trim());break}else c==="("&&(u=!0);a+=c,n+=1}}}return s.join(", ")}const eU=new WeakMap;function _c(t,e){return!e||e.trim()===""?e:AR(t,e)}function Lye(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function AR(t,e){let n=eU.get(t);if(n||(n=t.createElement("a"),eU.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function Cz(t,e,n,r){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&["table","td","th"].includes(e)?_c(t,r):n==="srcset"?Dye(t,r):n==="style"?Vv(r,AR(t)):e==="object"&&n==="data"?_c(t,r):r)}function wz(t,e,n){return["video","audio"].includes(t)&&e==="autoplay"}function Uye(t,e,n){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){const s=t.classList[r];if(e.test(s))return!0}if(n)return t.matches(n)}catch{}return!1}function Kv(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Kv(cr.parentNode(t),e,n):!1;for(let r=t.classList.length;r--;){const s=t.classList[r];if(e.test(s))return!0}return n?Kv(cr.parentNode(t),e,n):!1}function xz(t,e,n,r){let s;if(vz(t)){if(s=t,!cr.childNodes(s).length)return!1}else{if(cr.parentElement(t)===null)return!1;s=cr.parentElement(t)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(Kv(s,e,r))return!0;if(n){if(r){if(s.closest(n))return!0}else if(s.matches(n))return!0}}catch{}return!1}function Fye(t,e,n){const r=t.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const u=setTimeout(()=>{s||(e(),s=!0)},n);t.addEventListener("load",()=>{clearTimeout(u),s=!0,e()});return}const a="about:blank";if(r.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function zye(t,e,n){let r=!1,s;try{s=t.sheet}catch{return}if(s)return;const o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function jye(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:f,maskInputFn:p,dataURLOptions:g={},inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E=!1,cssCaptured:C=!1}=e,w=Bye(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Pn.Document,childNodes:[],compatMode:t.compatMode}:{type:Pn.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Pn.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:return $ye(t,{doc:n,blockClass:s,blockSelector:o,inlineStylesheet:u,maskInputOptions:c,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E,rootId:w});case t.TEXT_NODE:return Hye(t,{doc:n,needsMask:a,maskTextFn:f,rootId:w,cssCaptured:C});case t.CDATA_SECTION_NODE:return{type:Pn.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:Pn.Comment,textContent:cr.textContent(t)||"",rootId:w};default:return!1}}function Bye(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function Hye(t,e){const{needsMask:n,maskTextFn:r,rootId:s,cssCaptured:o}=e,a=cr.parentNode(t),u=a&&a.tagName;let c="";const f=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?c="SCRIPT_PLACEHOLDER":o||(c=cr.textContent(t),f&&c&&(c=Vv(c,AR(e.doc)))),!f&&!p&&c&&n&&(c=r?r(c,cr.parentElement(t)):c.replace(/[\S]/g,"*")),{type:Pn.Text,textContent:c||"",rootId:s}}function $ye(t,e){const{doc:n,blockClass:r,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:c={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:y}=e,S=Uye(t,r,s),E=Mye(t);let C={};const w=t.attributes.length;for(let T=0;T<w;T++){const R=t.attributes[T];wz(E,R.name,R.value)||(C[R.name]=Cz(n,E,Kl(R.name),R.value))}if(E==="link"&&o){const T=Array.from(n.styleSheets).find(M=>M.href===t.href);let R=null;T&&(R=P_(T)),R&&(delete C.rel,delete C.href,C._cssText=R)}if(E==="style"&&t.sheet){let T=P_(t.sheet);T&&(t.childNodes.length>1&&(T=Iye(T,t)),C._cssText=T)}if(["input","textarea","select"].includes(E)){const T=t.value,R=t.checked;C.type!=="radio"&&C.type!=="checkbox"&&C.type!=="submit"&&C.type!=="button"&&T?C.value=Wv({element:t,type:Gv(t),tagName:E,value:T,maskInputOptions:a,maskInputFn:u}):R&&(C.checked=R)}if(E==="option"&&(t.selected&&!a.select?C.selected=!0:delete C.selected),E==="dialog"&&t.open&&(C.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(t.__context==="2d")Cye(t)||(C.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){const T=t.toDataURL(c.type,c.quality),R=n.createElement("canvas");R.width=t.width,R.height=t.height;const M=R.toDataURL(c.type,c.quality);T!==M&&(C.rr_dataURL=T)}}if(E==="img"&&f){ic||(ic=n.createElement("canvas"),J4=ic.getContext("2d"));const T=t,R=T.currentSrc||T.getAttribute("src")||"<unknown-src>",M=T.crossOrigin,O=()=>{T.removeEventListener("load",O);try{ic.width=T.naturalWidth,ic.height=T.naturalHeight,J4.drawImage(T,0,0),C.rr_dataURL=ic.toDataURL(c.type,c.quality)}catch(I){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${R}! Error: ${I}`)}T.crossOrigin==="anonymous"&&(M?C.crossOrigin=M:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O)}if(["audio","video"].includes(E)){const T=C;T.rr_mediaState=t.paused?"paused":"played",T.rr_mediaCurrentTime=t.currentTime,T.rr_mediaPlaybackRate=t.playbackRate,T.rr_mediaMuted=t.muted,T.rr_mediaLoop=t.loop,T.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(C.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(C.rr_scrollTop=t.scrollTop)),S){const{width:T,height:R}=t.getBoundingClientRect();C={class:C.class,rr_width:`${T}px`,rr_height:`${R}px`}}E==="iframe"&&!g(C.src)&&(t.contentDocument||(C.rr_src=C.src),delete C.src);let _;try{customElements.get(E)&&(_=!0)}catch{}return{type:Pn.Element,tagName:E,attributes:C,childNodes:[],isSVG:Lye(t)||void 0,needBlock:S,rootId:y,isCustom:_}}function Wt(t){return t==null?"":t.toLowerCase()}function _z(t){return t===!0||t==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:t==="all",headMetaDescKeywords:t==="all",headTitleMutations:t==="all"}:t||{}}function qye(t,e){if(e.comment&&t.type===Pn.Comment)return!0;if(t.type===Pn.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&Sz(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Wt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Wt(t.attributes.name)==="application-name"||Wt(t.attributes.rel)==="icon"||Wt(t.attributes.rel)==="apple-touch-icon"||Wt(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Wt(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Wt(t.attributes.property).match(/^(og|twitter|fb):/)||Wt(t.attributes.name).match(/^(og|twitter):/)||Wt(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Wt(t.attributes.name)==="robots"||Wt(t.attributes.name)==="googlebot"||Wt(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Wt(t.attributes.name)==="author"||Wt(t.attributes.name)==="generator"||Wt(t.attributes.name)==="framework"||Wt(t.attributes.name)==="publisher"||Wt(t.attributes.name)==="progid"||Wt(t.attributes.property).match(/^article:/)||Wt(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Wt(t.attributes.name)==="google-site-verification"||Wt(t.attributes.name)==="yandex-verification"||Wt(t.attributes.name)==="csrf-token"||Wt(t.attributes.name)==="p:domain_verify"||Wt(t.attributes.name)==="verify-v1"||Wt(t.attributes.name)==="verification"||Wt(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ac(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:c=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:I=!1,cssCaptured:P=!1}=e;let{needsMask:k}=e,{preserveWhiteSpace:H=!0}=e;k||(k=xz(t,a,u,k===void 0));const F=jye(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:S,inlineImages:E,recordCanvas:C,keepIframeSrcFn:O,newlyAddedElement:I,cssCaptured:P});if(!F)return console.warn(t,"not serialized"),null;let j;r.hasNode(t)?j=r.getId(t):qye(F,y)||!H&&F.type===Pn.Text&&!F.textContent.replace(/^\s+|\s+$/gm,"").length?j=kh:j=Ez();const W=Object.assign(F,{id:j});if(r.add(t,W),j===kh)return null;w&&w(t);let Y=!c;if(W.type===Pn.Element){Y=Y&&!W.needBlock,delete W.needBlock;const $=cr.shadowRoot(t);$&&dh($)&&(W.isShadowHost=!0)}if((W.type===Pn.Document||W.type===Pn.Element)&&Y){y.headWhitespace&&W.type===Pn.Element&&W.tagName==="head"&&(H=!1);const $={doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:c,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O,cssCaptured:!1};if(!(W.type===Pn.Element&&W.tagName==="textarea"&&W.attributes.value!==void 0)){W.type===Pn.Element&&W.attributes._cssText!==void 0&&typeof W.attributes._cssText=="string"&&($.cssCaptured=!0);for(const fe of Array.from(cr.childNodes(t))){const de=Ac(fe,$);de&&W.childNodes.push(de)}}let ee=null;if(vz(t)&&(ee=cr.shadowRoot(t)))for(const fe of Array.from(cr.childNodes(ee))){const de=Ac(fe,$);de&&(dh(ee)&&(de.isShadow=!0),W.childNodes.push(de))}}const ne=cr.parentNode(t);return ne&&ch(ne)&&dh(ne)&&(W.isShadow=!0),W.type===Pn.Element&&W.tagName==="iframe"&&Fye(t,()=>{const $=t.contentDocument;if($&&_){const ee=Ac($,{doc:$,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O});ee&&_(t,ee)}},T),W.type===Pn.Element&&W.tagName==="link"&&typeof W.attributes.rel=="string"&&(W.attributes.rel==="stylesheet"||W.attributes.rel==="preload"&&typeof W.attributes.href=="string"&&Sz(W.attributes.href)==="css")&&zye(t,()=>{if(R){const $=Ac(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O});$&&R(t,$)}},M),W}function Wye(t,e){const{mirror:n=new bz,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:m,slimDOM:y=!1,dataURLOptions:S,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M=()=>!1}=e||{},O=p===!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}:p===!1?{password:!0}:p,I=_z(y);return Ac(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:O,maskTextFn:g,maskInputFn:m,slimDOMOptions:I,dataURLOptions:S,inlineImages:c,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M,newlyAddedElement:!1})}function Gye(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Vye(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var TR={exports:{}},Zt=String,Az=function(){return{isColorSupported:!1,reset:Zt,bold:Zt,dim:Zt,italic:Zt,underline:Zt,inverse:Zt,hidden:Zt,strikethrough:Zt,black:Zt,red:Zt,green:Zt,yellow:Zt,blue:Zt,magenta:Zt,cyan:Zt,white:Zt,gray:Zt,bgBlack:Zt,bgRed:Zt,bgGreen:Zt,bgYellow:Zt,bgBlue:Zt,bgMagenta:Zt,bgCyan:Zt,bgWhite:Zt}};TR.exports=Az();TR.exports.createColors=Az;var Kye=TR.exports;const Yye={},Zye=Object.freeze(Object.defineProperty({__proto__:null,default:Yye},Symbol.toStringTag,{value:"Module"})),Js=Vye(Zye);let tU=Kye,nU=Js,k_=class Tz extends Error{constructor(e,n,r,s,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Tz)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=tU.isColorSupported),nU&&e&&(n=nU(n));let r=n.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,c;if(e){let{bold:f,gray:p,red:g}=tU.createColors(!0);u=m=>f(g(m)),c=m=>p(m)}else u=c=f=>f;return r.slice(s,o).map((f,p)=>{let g=s+1+p,m=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let y=c(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+c(m)+f+`
|
|
243
243
|
`+y+u("^")}return" "+c(m)+f}).join(`
|
|
244
244
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
245
245
|
|
|
246
246
|
`+e+`
|
|
247
|
-
`),this.name+": "+this.message+e}};var RR=k_;k_.default=k_;var lp={};lp.isClean=Symbol("isClean");lp.my=Symbol("my");const
|
|
247
|
+
`),this.name+": "+this.message+e}};var RR=k_;k_.default=k_;var lp={};lp.isClean=Symbol("isClean");lp.my=Symbol("my");const rU={after:`
|
|
248
248
|
`,beforeClose:`
|
|
249
249
|
`,beforeComment:`
|
|
250
250
|
`,beforeDecl:`
|
|
251
251
|
`,beforeOpen:" ",beforeRule:`
|
|
252
252
|
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Xye(t){return t[0].toUpperCase()+t.slice(1)}let D_=class{constructor(e){this.builder=e}atrule(e,n){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(n?";":"");this.builder(r+s+o,e)}}beforeAfter(e,n){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):n==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
|
|
253
|
-
`)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,n){let r=this.raw(e,"between","beforeOpen");this.builder(n+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let n=e.nodes.length-1;for(;n>0&&e.nodes[n].type==="comment";)n-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,n!==s||r)}}comment(e){let n=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+n+e.text+r+"*/",e)}decl(e,n){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),n&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,n,r){let s;if(r||(r=n),n&&(s=e.raws[n],typeof s<"u"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return
|
|
253
|
+
`)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,n){let r=this.raw(e,"between","beforeOpen");this.builder(n+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let n=e.nodes.length-1;for(;n>0&&e.nodes[n].type==="comment";)n-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,n!==s||r)}}comment(e){let n=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+n+e.text+r+"*/",e)}decl(e,n){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),n&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,n,r){let s;if(r||(r=n),n&&(s=e.raws[n],typeof s<"u"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return rU[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+Xye(r);this[u]?s=this[u](a,e):a.walk(c=>{if(s=c.raws[n],typeof s<"u")return!1})}return typeof s>"u"&&(s=rU[r]),a.rawCache[r]=s,s}rawBeforeClose(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
|
|
254
254
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(e,n){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
|
|
255
255
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,n){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
|
|
256
256
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let n;return e.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(e){let n;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
257
257
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(e){let n;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(e){if(e.raws.indent)return e.raws.indent;let n;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
|
|
258
258
|
`);return n=o[o.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(e,n){let r=e[n],s=e.raws[n];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,n){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,n)}};var Rz=D_;D_.default=D_;let Qye=Rz;function L_(t,e){new Qye(e).stringify(t)}var bb=L_;L_.default=L_;let{isClean:gm,my:Jye}=lp,ebe=RR,tbe=Rz,nbe=bb;function U_(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let s=t[r],o=typeof s;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=s:Array.isArray(s)?n[r]=s.map(a=>U_(a,n)):(o==="object"&&s!==null&&(s=U_(s)),n[r]=s)}return n}let F_=class{constructor(e={}){this.raws={},this[gm]=!1,this[Jye]=!0;for(let n in e)if(n==="nodes"){this.nodes=[];for(let r of e[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=e[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let n=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let n in e)this[n]=e[n];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let n=U_(this);for(let r in e)n[r]=e[r];return n}cloneAfter(e={}){let n=this.clone(e);return this.parent.insertAfter(this,n),n}cloneBefore(e={}){let n=this.clone(e);return this.parent.insertBefore(this,n),n}error(e,n={}){if(this.source){let{end:r,start:s}=this.rangeBy(n);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},n)}return new ebe(e)}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:n==="root"?()=>e.root().toProxy():e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&e.markDirty()),!0}}}markDirty(){if(this[gm]){this[gm]=!1;let e=this;for(;e=e.parent;)e[gm]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,n){let r=this.source.start;if(e.index)r=this.positionInside(e.index,n);else if(e.word){n=this.toString();let s=n.indexOf(e.word);s!==-1&&(r=this.positionInside(s,n))}return r}positionInside(e,n){let r=n||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let a=0;a<e;a++)r[a]===`
|
|
259
|
-
`?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(n=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?n={column:e.start.column,line:e.start.line}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(e,n){return new tbe().raw(this,e,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let n=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(n,s),n=s):this.parent.insertBefore(n,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,n){let r={},s=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,n):c);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,n);else if(a==="source"){let c=n.get(u.input);c==null&&(c=o,n.set(u.input,o),o++),r[a]={end:u.end,inputId:c,start:u.start}}else r[a]=u}return s&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=nbe){e.stringify&&(e=e.stringify);let n="";return e(this,r=>{n+=r}),n}warn(e,n,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(n,s)}get proxyOf(){return this}};var Sb=F_;F_.default=F_;let rbe=Sb,z_=class extends rbe{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Eb=z_;z_.default=z_;let sbe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",obe=(t=21)=>{let e="",n=t;for(;n--;)e+=sbe[Math.random()*64|0];return e};var ibe={nanoid:obe};let{SourceMapConsumer:
|
|
260
|
-
`);r=new Array(o.length);let a=0;for(let u=0,c=o.length;u<c;u++)r[u]=a,a+=o[u].length+1;this[fx]=r}n=r[r.length-1];let s=0;if(e>=n)s=r.length-1;else{let o=r.length-2,a;for(;s<o;)if(a=s+(o-s>>1),e<r[a])o=a-1;else if(e>=r[a+1])s=a+1;else{s=a;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:H_(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,r,s){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:s,line:r}));let c;B_(a.source)?c=mm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||mm(this.map.mapFile));let f={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(
|
|
259
|
+
`?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(n=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?n={column:e.start.column,line:e.start.line}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(e,n){return new tbe().raw(this,e,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let n=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(n,s),n=s):this.parent.insertBefore(n,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,n){let r={},s=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,n):c);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,n);else if(a==="source"){let c=n.get(u.input);c==null&&(c=o,n.set(u.input,o),o++),r[a]={end:u.end,inputId:c,start:u.start}}else r[a]=u}return s&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=nbe){e.stringify&&(e=e.stringify);let n="";return e(this,r=>{n+=r}),n}warn(e,n,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(n,s)}get proxyOf(){return this}};var Sb=F_;F_.default=F_;let rbe=Sb,z_=class extends rbe{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Eb=z_;z_.default=z_;let sbe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",obe=(t=21)=>{let e="",n=t;for(;n--;)e+=sbe[Math.random()*64|0];return e};var ibe={nanoid:obe};let{SourceMapConsumer:sU,SourceMapGenerator:oU}=Js,{existsSync:abe,readFileSync:lbe}=Js,{dirname:cx,join:ube}=Js;function cbe(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let j_=class{constructor(e,n){if(n.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,s=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=cx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new sU(this.text)),this.consumerCache}decodeInline(e){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(n.test(e)||r.test(e))return cbe(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let n=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=e.lastIndexOf(n.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=cx(e),abe(e))return this.mapFile=e,lbe(e,"utf-8").toString().trim()}loadMap(e,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(n instanceof sU)return oU.fromSourceMap(n).toString();if(n instanceof oU)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=ube(cx(e),r)),this.loadFile(r)}}}startWith(e,n){return e?e.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Iz=j_;j_.default=j_;let{SourceMapConsumer:dbe,SourceMapGenerator:fbe}=Js,{fileURLToPath:iU,pathToFileURL:mm}=Js,{isAbsolute:B_,resolve:H_}=Js,{nanoid:hbe}=ibe,dx=Js,aU=RR,pbe=Iz,fx=Symbol("fromOffsetCache"),gbe=!!(dbe&&fbe),lU=!!(H_&&B_),Yv=class{constructor(e,n={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!lU||/^\w+:\/\//.test(n.from)||B_(n.from)?this.file=n.from:this.file=H_(n.from)),lU&&gbe){let r=new pbe(this.css,n);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+hbe(6)+">"),this.map&&(this.map.file=this.from)}error(e,n,r,s={}){let o,a,u;if(n&&typeof n=="object"){let f=n,p=r;if(typeof f.offset=="number"){let g=this.fromOffset(f.offset);n=g.line,r=g.col}else n=f.line,r=f.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let c=this.origin(n,r,a,u);return c?o=new aU(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):o=new aU(e,a===void 0?n:{column:r,line:n},a===void 0?r:{column:u,line:a},this.css,this.file,s.plugin),o.input={column:r,endColumn:u,endLine:a,line:n,source:this.css},this.file&&(mm&&(o.input.url=mm(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[fx])r=this[fx];else{let o=this.css.split(`
|
|
260
|
+
`);r=new Array(o.length);let a=0;for(let u=0,c=o.length;u<c;u++)r[u]=a,a+=o[u].length+1;this[fx]=r}n=r[r.length-1];let s=0;if(e>=n)s=r.length-1;else{let o=r.length-2,a;for(;s<o;)if(a=s+(o-s>>1),e<r[a])o=a-1;else if(e>=r[a+1])s=a+1;else{s=a;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:H_(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,r,s){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:s,line:r}));let c;B_(a.source)?c=mm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||mm(this.map.mapFile));let f={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(iU)f.file=iU(c);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(f.source=p),f}toJSON(){let e={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(e[n]=this[n]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Cb=Yv;Yv.default=Yv;dx&&dx.registerInput&&dx.registerInput(Yv);let{SourceMapConsumer:Oz,SourceMapGenerator:lv}=Js,{dirname:uv,relative:Nz,resolve:Mz,sep:Pz}=Js,{pathToFileURL:uU}=Js,mbe=Cb,vbe=!!(Oz&&lv),ybe=!!(uv&&Mz&&Nz&&Pz),bbe=class{constructor(e,n,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let n=`
|
|
261
261
|
`;this.css.includes(`\r
|
|
262
262
|
`)&&(n=`\r
|
|
263
263
|
`),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),r=e.root||uv(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Oz(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let n=this.root.nodes.length-1;n>=0;n--)e=this.root.nodes[n],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ybe&&vbe&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,n=>{e+=n}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=lv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new lv({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new lv({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(u,c,f)=>{if(this.css+=u,c&&f!=="end"&&(s.generated.line=e,s.generated.column=n-1,c.source&&c.source.start?(s.source=this.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=u.match(/\n/g),o?(e+=o.length,a=u.lastIndexOf(`
|
|
264
|
-
`),n=u.length-a):n+=u.length,c&&f!=="start"){let p=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==p.last||p.raws.semicolon)&&(c.source&&c.source.end?(s.source=this.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=e,s.generated.column=n-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let r=this.opts.to?uv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=uv(Mz(r,this.mapOpts.annotation)));let s=Nz(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new mbe(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(u4){let r=u4(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;Pz==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var kz=bbe;let Sbe=Sb,$_=class extends Sbe{constructor(e){super(e),this.type="comment"}};var wb=$_;$_.default=$_;let{isClean:Dz,my:Lz}=lp,Uz=Eb,Fz=wb,Ebe=Sb,zz,IR,OR,jz;function Bz(t){return t.map(e=>(e.nodes&&(e.nodes=Bz(e.nodes)),delete e.source,e))}function Hz(t){if(t[Dz]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Hz(e)}let Ci=class $z extends Ebe{append(...e){for(let n of e){let r=this.normalize(n,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,s;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[n]+=1;return delete this.indexes[n],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(s=>typeof s=="function"?(o,a)=>s(o.toProxy(),a):s)):n==="every"||n==="some"?r=>e[n]((s,...o)=>r(s.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),s=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of s)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+s.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=Bz(zz(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Uz(e)]}else if(e.selector)e=[new IR(e)];else if(e.name)e=[new OR(e)];else if(e.text)e=[new Fz(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Lz]||$z.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Dz]&&Hz(s),typeof s.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(s.raws.before=n.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(s=>{n.props&&!n.props.includes(s.prop)||n.fast&&!s.value.includes(n.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let s;try{s=e(n,r)}catch(o){throw n.addToError(o)}return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="atrule")return n(r,s)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="decl")return n(r,s)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="rule")return n(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ci.registerParse=t=>{zz=t};Ci.registerRule=t=>{IR=t};Ci.registerAtRule=t=>{OR=t};Ci.registerRoot=t=>{jz=t};var uu=Ci;Ci.default=Ci;Ci.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,OR.prototype):t.type==="rule"?Object.setPrototypeOf(t,IR.prototype):t.type==="decl"?Object.setPrototypeOf(t,Uz.prototype):t.type==="comment"?Object.setPrototypeOf(t,Fz.prototype):t.type==="root"&&Object.setPrototypeOf(t,jz.prototype),t[Lz]=!0,t.nodes&&t.nodes.forEach(e=>{Ci.rebuild(e)})};let Cbe=uu,qz,Wz,Dh=class extends Cbe{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new qz(new Wz,this,e).stringify()}};Dh.registerLazyResult=t=>{qz=t};Dh.registerProcessor=t=>{Wz=t};var NR=Dh;Dh.default=Dh;let q_=class{constructor(e,n={}){if(this.type="warning",this.text=e,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Gz=q_;q_.default=q_;let wbe=Gz,W_=class{constructor(e,n,r){this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new wbe(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var MR=W_;W_.default=W_;const hx=39,c4=34,vm=92,d4=47,ym=10,Df=32,bm=12,Sm=9,Em=13,xbe=91,_be=93,Abe=40,Tbe=41,Rbe=123,Ibe=125,Obe=59,Nbe=42,Mbe=58,Pbe=64,Cm=/[\t\n\f\r "#'()/;[\\\]{}]/g,wm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,kbe=/.[\r\n"'(/\\]/,f4=/[\da-f]/i;var Dbe=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,p,g,m,y,S,E=r.length,C=0,w=[],_=[];function T(){return C}function R(P){throw e.error("Unclosed "+P,C)}function M(){return _.length===0&&C>=E}function O(P){if(_.length)return _.pop();if(C>=E)return;let k=P?P.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case ym:case Df:case Sm:case Em:case bm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Df||o===ym||o===Sm||o===Em||o===bm);S=["space",r.slice(C,a)],C=a-1;break}case xbe:case _be:case Rbe:case Ibe:case Mbe:case Obe:case Tbe:{let H=String.fromCharCode(o);S=[H,H,C];break}case Abe:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==hx&&y!==c4&&y!==Df&&y!==ym&&y!==Sm&&y!==bm&&y!==Em){a=C;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(s||k){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===vm;)g-=1,p=!p}while(p);S=["brackets",r.slice(C,a+1),C,a],C=a}else a=r.indexOf(")",C+1),c=r.slice(C,a+1),a===-1||kbe.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case hx:case c4:{u=o===hx?"'":'"',a=C;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(s||k){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===vm;)g-=1,p=!p}while(p);S=["string",r.slice(C,a+1),C,a],C=a;break}case Pbe:{Cm.lastIndex=C+1,Cm.test(r),Cm.lastIndex===0?a=r.length-1:a=Cm.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case vm:{for(a=C,f=!0;r.charCodeAt(a+1)===vm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==d4&&o!==Df&&o!==ym&&o!==Sm&&o!==Em&&o!==bm&&(a+=1,f4.test(r.charAt(a)))){for(;f4.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Df&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===d4&&r.charCodeAt(C+1)===Nbe?(a=r.indexOf("*/",C+2)+1,a===0&&(s||k?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(wm.lastIndex=C+1,wm.test(r),wm.lastIndex===0?a=r.length-1:a=wm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(P){_.push(P)}return{back:I,endOfFile:M,nextToken:O,position:T}};let Vz=uu,Zv=class extends Vz{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var PR=Zv;Zv.default=Zv;Vz.registerAtRule(Zv);let Kz=uu,Yz,Zz,Bc=class extends Kz{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,r){let s=super.normalize(e);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of s)o.raws.before=n.raws.before}return s}removeChild(e,n){let r=this.index(e);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Yz(new Zz,this,e).stringify()}};Bc.registerLazyResult=t=>{Yz=t};Bc.registerProcessor=t=>{Zz=t};var up=Bc;Bc.default=Bc;Kz.registerRoot(Bc);let Lh={comma(t){return Lh.split(t,[","],!0)},space(t){let e=[" ",`
|
|
265
|
-
`," "];return Lh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let p of t)f?f=!1:p==="\\"?f=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=p;return(n||s!=="")&&r.push(s.trim()),r}};var Xz=Lh;Lh.default=Lh;let Qz=uu,Lbe=Xz,Xv=class extends Qz{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Lbe.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var kR=Xv;Xv.default=Xv;Qz.registerRule(Xv);let Ube=Eb,Fbe=Dbe,zbe=wb,jbe=PR,Bbe=up,h4=kR;const p4={empty:!0,space:!0};function Hbe(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let $be=class{constructor(e){this.input=e,this.root=new Bbe,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new jbe;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let r,s,o,a=!1,u=!1,c=[],f=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(c.length>0){for(o=c.length-1,s=c[o];s&&s[0]==="space";)s=c[--o];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(e=c[c.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),u&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let r=0,s;for(let o=n-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let n=0,r,s,o;for(let[a,u]of e.entries()){if(r=u,s=r[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let n=new zbe;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=Fbe(this.input)}decl(e,n){let r=new Ube;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||Hbe(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(o=e[f],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=f;m>0;m--){let y=p[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new h4;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,r=null,s=!1,o=null,a=[],u=e[1].startsWith("--"),c=[],f=e;for(;f;){if(r=f[0],c.push(f),r==="("||r==="[")o||(o=f),a.push(r==="("?")":"]");else if(u&&s&&r==="{")o||(o=f),a.push("}");else if(a.length===0)if(r===";")if(s){this.decl(c,u);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),n=!0;break}else r===":"&&(s=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&s){if(!u)for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,r,s){let o,a,u=r.length,c="",f=!0,p,g;for(let m=0;m<u;m+=1)o=r[m],a=o[0],a==="space"&&m===u-1&&!s?f=!1:a==="comment"?(g=r[m-1]?r[m-1][0]:"empty",p=r[m+1]?r[m+1][0]:"empty",!p4[g]&&!p4[p]?c.slice(-1)===","?f=!1:c+=o[1]:f=!1):c+=o[1];if(!f){let m=r.reduce((y,S)=>y+S[1],"");e.raws[n]={raw:m,value:c}}e[n]=c}rule(e){e.pop();let n=new h4;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let n,r="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],n==="space");)r=e.pop()[1]+r;return r}stringFrom(e,n){let r="";for(let s=n;s<e.length;s++)r+=e[s][1];return e.splice(n,e.length-n),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var qbe=$be;let Wbe=uu,Gbe=qbe,Vbe=Cb;function Qv(t,e){let n=new Vbe(t,e),r=new Gbe(n);try{r.parse()}catch(s){throw s}return r.root}var DR=Qv;Qv.default=Qv;Wbe.registerParse(Qv);let{isClean:vo,my:Kbe}=lp,Ybe=kz,Zbe=bb,Xbe=uu,Qbe=NR,g4=MR,Jbe=DR,e0e=up;const t0e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},n0e={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},r0e={Once:!0,postcssPlugin:!0,prepare:!0},Hc=0;function Lf(t){return typeof t=="object"&&typeof t.then=="function"}function Jz(t){let e=!1,n=t0e[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Hc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Hc,n+"Exit"]:[n,n+"Exit"]}function m4(t){let e;return t.type==="document"?e=["Document",Hc,"DocumentExit"]:t.type==="root"?e=["Root",Hc,"RootExit"]:e=Jz(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function G_(t){return t[vo]=!1,t.nodes&&t.nodes.forEach(e=>G_(e)),t}let V_={},$c=class ej{constructor(e,n,r){this.stringified=!1,this.processed=!1;let s;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))s=G_(n);else if(n instanceof ej||n instanceof g4)s=G_(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=Jbe;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(n,r)}catch(a){this.processed=!0,this.error=a}s&&!s[Kbe]&&Xbe.rebuild(s)}this.result=new g4(e,s,r),this.helpers={...V_,postcss:V_,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(n,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,s])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!n0e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!r0e[r])if(typeof n[r]=="object")for(let s in n[r])s==="*"?e(n,r,n[r][s]):e(n,r+"-"+s.toLowerCase(),n[r][s]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(Lf(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[vo];){e[vo]=!0;let n=[m4(e)];for(;n.length>0;){let r=this.visitTick(n);if(Lf(r))try{await r}catch(s){let o=n[n.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Lf(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=Zbe;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new Ybe(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(Lf(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[vo];)e[vo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Lf(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:s}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&n.visitorIndex<s.length){let[a,u]=s[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[vo]){u[vo]=!0,e.push(m4(u));return}n.iterator=0,delete r.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===Hc){r.nodes&&r.nodes.length&&(r[vo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[vo]=!0;let n=Jz(e);for(let r of n)if(r===Hc)e.nodes&&e.each(s=>{s[vo]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};$c.registerPostcss=t=>{V_=t};var tj=$c;$c.default=$c;e0e.registerLazyResult($c);Qbe.registerLazyResult($c);let s0e=kz,o0e=bb,i0e=DR;const a0e=MR;let K_=class{constructor(e,n,r){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=r,this._map=void 0;let s,o=o0e;this.result=new a0e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new s0e(o,s,this._opts,n);if(u.isMap()){let[c,f]=u.generate();c&&(this.result.css=c),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=i0e;try{e=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var l0e=K_;K_.default=K_;let u0e=l0e,c0e=tj,d0e=NR,f0e=up,Uh=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let n=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(e,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new u0e(this,e,n):new c0e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var h0e=Uh;Uh.default=Uh;f0e.registerProcessor(Uh);d0e.registerProcessor(Uh);let p0e=Eb,g0e=Iz,m0e=wb,v0e=PR,y0e=Cb,b0e=up,S0e=kR;function Fh(t,e){if(Array.isArray(t))return t.map(s=>Fh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:y0e.prototype};o.map&&(o.map={...o.map,__proto__:g0e.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Fh(s,e))),r.source){let{inputId:s,...o}=r.source;r.source=o,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new b0e(r);if(r.type==="decl")return new p0e(r);if(r.type==="rule")return new S0e(r);if(r.type==="comment")return new m0e(r);if(r.type==="atrule")return new v0e(r);throw new Error("Unknown node type: "+t.type)}var E0e=Fh;Fh.default=Fh;let C0e=RR,nj=Eb,w0e=tj,x0e=uu,LR=h0e,_0e=bb,A0e=E0e,rj=NR,T0e=Gz,sj=wb,oj=PR,R0e=MR,I0e=Cb,O0e=DR,N0e=Xz,ij=kR,aj=up,M0e=Sb;function Dt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new LR(t)}Dt.plugin=function(e,n){let r=!1;function s(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
264
|
+
`),n=u.length-a):n+=u.length,c&&f!=="start"){let p=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==p.last||p.raws.semicolon)&&(c.source&&c.source.end?(s.source=this.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=e,s.generated.column=n-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let r=this.opts.to?uv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=uv(Mz(r,this.mapOpts.annotation)));let s=Nz(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new mbe(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(uU){let r=uU(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;Pz==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var kz=bbe;let Sbe=Sb,$_=class extends Sbe{constructor(e){super(e),this.type="comment"}};var wb=$_;$_.default=$_;let{isClean:Dz,my:Lz}=lp,Uz=Eb,Fz=wb,Ebe=Sb,zz,IR,OR,jz;function Bz(t){return t.map(e=>(e.nodes&&(e.nodes=Bz(e.nodes)),delete e.source,e))}function Hz(t){if(t[Dz]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Hz(e)}let Ci=class $z extends Ebe{append(...e){for(let n of e){let r=this.normalize(n,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,s;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[n]+=1;return delete this.indexes[n],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(s=>typeof s=="function"?(o,a)=>s(o.toProxy(),a):s)):n==="every"||n==="some"?r=>e[n]((s,...o)=>r(s.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),s=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of s)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+s.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=Bz(zz(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Uz(e)]}else if(e.selector)e=[new IR(e)];else if(e.name)e=[new OR(e)];else if(e.text)e=[new Fz(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Lz]||$z.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Dz]&&Hz(s),typeof s.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(s.raws.before=n.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(s=>{n.props&&!n.props.includes(s.prop)||n.fast&&!s.value.includes(n.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let s;try{s=e(n,r)}catch(o){throw n.addToError(o)}return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="atrule")return n(r,s)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="decl")return n(r,s)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="rule")return n(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ci.registerParse=t=>{zz=t};Ci.registerRule=t=>{IR=t};Ci.registerAtRule=t=>{OR=t};Ci.registerRoot=t=>{jz=t};var uu=Ci;Ci.default=Ci;Ci.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,OR.prototype):t.type==="rule"?Object.setPrototypeOf(t,IR.prototype):t.type==="decl"?Object.setPrototypeOf(t,Uz.prototype):t.type==="comment"?Object.setPrototypeOf(t,Fz.prototype):t.type==="root"&&Object.setPrototypeOf(t,jz.prototype),t[Lz]=!0,t.nodes&&t.nodes.forEach(e=>{Ci.rebuild(e)})};let Cbe=uu,qz,Wz,Dh=class extends Cbe{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new qz(new Wz,this,e).stringify()}};Dh.registerLazyResult=t=>{qz=t};Dh.registerProcessor=t=>{Wz=t};var NR=Dh;Dh.default=Dh;let q_=class{constructor(e,n={}){if(this.type="warning",this.text=e,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Gz=q_;q_.default=q_;let wbe=Gz,W_=class{constructor(e,n,r){this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new wbe(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var MR=W_;W_.default=W_;const hx=39,cU=34,vm=92,dU=47,ym=10,Df=32,bm=12,Sm=9,Em=13,xbe=91,_be=93,Abe=40,Tbe=41,Rbe=123,Ibe=125,Obe=59,Nbe=42,Mbe=58,Pbe=64,Cm=/[\t\n\f\r "#'()/;[\\\]{}]/g,wm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,kbe=/.[\r\n"'(/\\]/,fU=/[\da-f]/i;var Dbe=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,p,g,m,y,S,E=r.length,C=0,w=[],_=[];function T(){return C}function R(P){throw e.error("Unclosed "+P,C)}function M(){return _.length===0&&C>=E}function O(P){if(_.length)return _.pop();if(C>=E)return;let k=P?P.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case ym:case Df:case Sm:case Em:case bm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Df||o===ym||o===Sm||o===Em||o===bm);S=["space",r.slice(C,a)],C=a-1;break}case xbe:case _be:case Rbe:case Ibe:case Mbe:case Obe:case Tbe:{let H=String.fromCharCode(o);S=[H,H,C];break}case Abe:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==hx&&y!==cU&&y!==Df&&y!==ym&&y!==Sm&&y!==bm&&y!==Em){a=C;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(s||k){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===vm;)g-=1,p=!p}while(p);S=["brackets",r.slice(C,a+1),C,a],C=a}else a=r.indexOf(")",C+1),c=r.slice(C,a+1),a===-1||kbe.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case hx:case cU:{u=o===hx?"'":'"',a=C;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(s||k){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===vm;)g-=1,p=!p}while(p);S=["string",r.slice(C,a+1),C,a],C=a;break}case Pbe:{Cm.lastIndex=C+1,Cm.test(r),Cm.lastIndex===0?a=r.length-1:a=Cm.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case vm:{for(a=C,f=!0;r.charCodeAt(a+1)===vm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==dU&&o!==Df&&o!==ym&&o!==Sm&&o!==Em&&o!==bm&&(a+=1,fU.test(r.charAt(a)))){for(;fU.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Df&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===dU&&r.charCodeAt(C+1)===Nbe?(a=r.indexOf("*/",C+2)+1,a===0&&(s||k?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(wm.lastIndex=C+1,wm.test(r),wm.lastIndex===0?a=r.length-1:a=wm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(P){_.push(P)}return{back:I,endOfFile:M,nextToken:O,position:T}};let Vz=uu,Zv=class extends Vz{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var PR=Zv;Zv.default=Zv;Vz.registerAtRule(Zv);let Kz=uu,Yz,Zz,Bc=class extends Kz{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,r){let s=super.normalize(e);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of s)o.raws.before=n.raws.before}return s}removeChild(e,n){let r=this.index(e);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Yz(new Zz,this,e).stringify()}};Bc.registerLazyResult=t=>{Yz=t};Bc.registerProcessor=t=>{Zz=t};var up=Bc;Bc.default=Bc;Kz.registerRoot(Bc);let Lh={comma(t){return Lh.split(t,[","],!0)},space(t){let e=[" ",`
|
|
265
|
+
`," "];return Lh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let p of t)f?f=!1:p==="\\"?f=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=p;return(n||s!=="")&&r.push(s.trim()),r}};var Xz=Lh;Lh.default=Lh;let Qz=uu,Lbe=Xz,Xv=class extends Qz{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Lbe.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var kR=Xv;Xv.default=Xv;Qz.registerRule(Xv);let Ube=Eb,Fbe=Dbe,zbe=wb,jbe=PR,Bbe=up,hU=kR;const pU={empty:!0,space:!0};function Hbe(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let $be=class{constructor(e){this.input=e,this.root=new Bbe,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new jbe;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let r,s,o,a=!1,u=!1,c=[],f=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(c.length>0){for(o=c.length-1,s=c[o];s&&s[0]==="space";)s=c[--o];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(e=c[c.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),u&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let r=0,s;for(let o=n-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let n=0,r,s,o;for(let[a,u]of e.entries()){if(r=u,s=r[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let n=new zbe;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=Fbe(this.input)}decl(e,n){let r=new Ube;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||Hbe(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(o=e[f],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=f;m>0;m--){let y=p[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new hU;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,r=null,s=!1,o=null,a=[],u=e[1].startsWith("--"),c=[],f=e;for(;f;){if(r=f[0],c.push(f),r==="("||r==="[")o||(o=f),a.push(r==="("?")":"]");else if(u&&s&&r==="{")o||(o=f),a.push("}");else if(a.length===0)if(r===";")if(s){this.decl(c,u);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),n=!0;break}else r===":"&&(s=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&s){if(!u)for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,r,s){let o,a,u=r.length,c="",f=!0,p,g;for(let m=0;m<u;m+=1)o=r[m],a=o[0],a==="space"&&m===u-1&&!s?f=!1:a==="comment"?(g=r[m-1]?r[m-1][0]:"empty",p=r[m+1]?r[m+1][0]:"empty",!pU[g]&&!pU[p]?c.slice(-1)===","?f=!1:c+=o[1]:f=!1):c+=o[1];if(!f){let m=r.reduce((y,S)=>y+S[1],"");e.raws[n]={raw:m,value:c}}e[n]=c}rule(e){e.pop();let n=new hU;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let n,r="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],n==="space");)r=e.pop()[1]+r;return r}stringFrom(e,n){let r="";for(let s=n;s<e.length;s++)r+=e[s][1];return e.splice(n,e.length-n),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var qbe=$be;let Wbe=uu,Gbe=qbe,Vbe=Cb;function Qv(t,e){let n=new Vbe(t,e),r=new Gbe(n);try{r.parse()}catch(s){throw s}return r.root}var DR=Qv;Qv.default=Qv;Wbe.registerParse(Qv);let{isClean:vo,my:Kbe}=lp,Ybe=kz,Zbe=bb,Xbe=uu,Qbe=NR,gU=MR,Jbe=DR,e0e=up;const t0e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},n0e={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},r0e={Once:!0,postcssPlugin:!0,prepare:!0},Hc=0;function Lf(t){return typeof t=="object"&&typeof t.then=="function"}function Jz(t){let e=!1,n=t0e[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Hc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Hc,n+"Exit"]:[n,n+"Exit"]}function mU(t){let e;return t.type==="document"?e=["Document",Hc,"DocumentExit"]:t.type==="root"?e=["Root",Hc,"RootExit"]:e=Jz(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function G_(t){return t[vo]=!1,t.nodes&&t.nodes.forEach(e=>G_(e)),t}let V_={},$c=class ej{constructor(e,n,r){this.stringified=!1,this.processed=!1;let s;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))s=G_(n);else if(n instanceof ej||n instanceof gU)s=G_(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=Jbe;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(n,r)}catch(a){this.processed=!0,this.error=a}s&&!s[Kbe]&&Xbe.rebuild(s)}this.result=new gU(e,s,r),this.helpers={...V_,postcss:V_,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(n,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,s])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!n0e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!r0e[r])if(typeof n[r]=="object")for(let s in n[r])s==="*"?e(n,r,n[r][s]):e(n,r+"-"+s.toLowerCase(),n[r][s]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(Lf(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[vo];){e[vo]=!0;let n=[mU(e)];for(;n.length>0;){let r=this.visitTick(n);if(Lf(r))try{await r}catch(s){let o=n[n.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Lf(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=Zbe;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new Ybe(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(Lf(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[vo];)e[vo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Lf(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:s}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&n.visitorIndex<s.length){let[a,u]=s[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[vo]){u[vo]=!0,e.push(mU(u));return}n.iterator=0,delete r.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===Hc){r.nodes&&r.nodes.length&&(r[vo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[vo]=!0;let n=Jz(e);for(let r of n)if(r===Hc)e.nodes&&e.each(s=>{s[vo]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};$c.registerPostcss=t=>{V_=t};var tj=$c;$c.default=$c;e0e.registerLazyResult($c);Qbe.registerLazyResult($c);let s0e=kz,o0e=bb,i0e=DR;const a0e=MR;let K_=class{constructor(e,n,r){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=r,this._map=void 0;let s,o=o0e;this.result=new a0e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new s0e(o,s,this._opts,n);if(u.isMap()){let[c,f]=u.generate();c&&(this.result.css=c),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=i0e;try{e=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var l0e=K_;K_.default=K_;let u0e=l0e,c0e=tj,d0e=NR,f0e=up,Uh=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let n=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(e,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new u0e(this,e,n):new c0e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var h0e=Uh;Uh.default=Uh;f0e.registerProcessor(Uh);d0e.registerProcessor(Uh);let p0e=Eb,g0e=Iz,m0e=wb,v0e=PR,y0e=Cb,b0e=up,S0e=kR;function Fh(t,e){if(Array.isArray(t))return t.map(s=>Fh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:y0e.prototype};o.map&&(o.map={...o.map,__proto__:g0e.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Fh(s,e))),r.source){let{inputId:s,...o}=r.source;r.source=o,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new b0e(r);if(r.type==="decl")return new p0e(r);if(r.type==="rule")return new S0e(r);if(r.type==="comment")return new m0e(r);if(r.type==="atrule")return new v0e(r);throw new Error("Unknown node type: "+t.type)}var E0e=Fh;Fh.default=Fh;let C0e=RR,nj=Eb,w0e=tj,x0e=uu,LR=h0e,_0e=bb,A0e=E0e,rj=NR,T0e=Gz,sj=wb,oj=PR,R0e=MR,I0e=Cb,O0e=DR,N0e=Xz,ij=kR,aj=up,M0e=Sb;function Dt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new LR(t)}Dt.plugin=function(e,n){let r=!1;function s(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
266
266
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),qv.LANG&&qv.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
267
|
-
https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new LR().version,u}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(a,u,c){return Dt([s(c)]).process(a,u)},s};Dt.stringify=_0e;Dt.parse=O0e;Dt.fromJSON=A0e;Dt.list=N0e;Dt.comment=t=>new sj(t);Dt.atRule=t=>new oj(t);Dt.decl=t=>new nj(t);Dt.rule=t=>new ij(t);Dt.root=t=>new aj(t);Dt.document=t=>new rj(t);Dt.CssSyntaxError=C0e;Dt.Declaration=nj;Dt.Container=x0e;Dt.Processor=LR;Dt.Document=rj;Dt.Comment=sj;Dt.Warning=T0e;Dt.AtRule=oj;Dt.Result=R0e;Dt.Input=I0e;Dt.Rule=ij;Dt.Root=aj;Dt.Node=M0e;w0e.registerPostcss(Dt);var P0e=Dt;Dt.default=Dt;const sn=Gye(P0e);sn.stringify;sn.fromJSON;sn.plugin;sn.parse;sn.list;sn.document;sn.comment;sn.atRule;sn.rule;sn.decl;sn.root;sn.CssSyntaxError;sn.Declaration;sn.Container;sn.Processor;sn.Document;sn.Comment;sn.Warning;sn.AtRule;sn.Result;sn.Input;sn.Rule;sn.Root;sn.Node;var k0e=Object.defineProperty,D0e=(t,e,n)=>e in t?k0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ws=(t,e,n)=>D0e(t,typeof e!="symbol"?e+"":e,n);function L0e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function U0e(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var UR={exports:{}},Xt=String,lj=function(){return{isColorSupported:!1,reset:Xt,bold:Xt,dim:Xt,italic:Xt,underline:Xt,inverse:Xt,hidden:Xt,strikethrough:Xt,black:Xt,red:Xt,green:Xt,yellow:Xt,blue:Xt,magenta:Xt,cyan:Xt,white:Xt,gray:Xt,bgBlack:Xt,bgRed:Xt,bgGreen:Xt,bgYellow:Xt,bgBlue:Xt,bgMagenta:Xt,bgCyan:Xt,bgWhite:Xt}};UR.exports=lj();UR.exports.createColors=lj;var F0e=UR.exports;const z0e={},j0e=Object.freeze(Object.defineProperty({__proto__:null,default:z0e},Symbol.toStringTag,{value:"Module"})),eo=U0e(j0e);let
|
|
267
|
+
https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new LR().version,u}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(a,u,c){return Dt([s(c)]).process(a,u)},s};Dt.stringify=_0e;Dt.parse=O0e;Dt.fromJSON=A0e;Dt.list=N0e;Dt.comment=t=>new sj(t);Dt.atRule=t=>new oj(t);Dt.decl=t=>new nj(t);Dt.rule=t=>new ij(t);Dt.root=t=>new aj(t);Dt.document=t=>new rj(t);Dt.CssSyntaxError=C0e;Dt.Declaration=nj;Dt.Container=x0e;Dt.Processor=LR;Dt.Document=rj;Dt.Comment=sj;Dt.Warning=T0e;Dt.AtRule=oj;Dt.Result=R0e;Dt.Input=I0e;Dt.Rule=ij;Dt.Root=aj;Dt.Node=M0e;w0e.registerPostcss(Dt);var P0e=Dt;Dt.default=Dt;const sn=Gye(P0e);sn.stringify;sn.fromJSON;sn.plugin;sn.parse;sn.list;sn.document;sn.comment;sn.atRule;sn.rule;sn.decl;sn.root;sn.CssSyntaxError;sn.Declaration;sn.Container;sn.Processor;sn.Document;sn.Comment;sn.Warning;sn.AtRule;sn.Result;sn.Input;sn.Rule;sn.Root;sn.Node;var k0e=Object.defineProperty,D0e=(t,e,n)=>e in t?k0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ws=(t,e,n)=>D0e(t,typeof e!="symbol"?e+"":e,n);function L0e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function U0e(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var UR={exports:{}},Xt=String,lj=function(){return{isColorSupported:!1,reset:Xt,bold:Xt,dim:Xt,italic:Xt,underline:Xt,inverse:Xt,hidden:Xt,strikethrough:Xt,black:Xt,red:Xt,green:Xt,yellow:Xt,blue:Xt,magenta:Xt,cyan:Xt,white:Xt,gray:Xt,bgBlack:Xt,bgRed:Xt,bgGreen:Xt,bgYellow:Xt,bgBlue:Xt,bgMagenta:Xt,bgCyan:Xt,bgWhite:Xt}};UR.exports=lj();UR.exports.createColors=lj;var F0e=UR.exports;const z0e={},j0e=Object.freeze(Object.defineProperty({__proto__:null,default:z0e},Symbol.toStringTag,{value:"Module"})),eo=U0e(j0e);let vU=F0e,yU=eo,Y_=class uj extends Error{constructor(e,n,r,s,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,uj)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=vU.isColorSupported),yU&&e&&(n=yU(n));let r=n.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,c;if(e){let{bold:f,gray:p,red:g}=vU.createColors(!0);u=m=>f(g(m)),c=m=>p(m)}else u=c=f=>f;return r.slice(s,o).map((f,p)=>{let g=s+1+p,m=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let y=c(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+c(m)+f+`
|
|
268
268
|
`+y+u("^")}return" "+c(m)+f}).join(`
|
|
269
269
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
270
270
|
|
|
271
271
|
`+e+`
|
|
272
|
-
`),this.name+": "+this.message+e}};var FR=Y_;Y_.default=Y_;var cp={};cp.isClean=Symbol("isClean");cp.my=Symbol("my");const
|
|
272
|
+
`),this.name+": "+this.message+e}};var FR=Y_;Y_.default=Y_;var cp={};cp.isClean=Symbol("isClean");cp.my=Symbol("my");const bU={after:`
|
|
273
273
|
`,beforeClose:`
|
|
274
274
|
`,beforeComment:`
|
|
275
275
|
`,beforeDecl:`
|
|
276
276
|
`,beforeOpen:" ",beforeRule:`
|
|
277
277
|
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function B0e(t){return t[0].toUpperCase()+t.slice(1)}let Z_=class{constructor(e){this.builder=e}atrule(e,n){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(n?";":"");this.builder(r+s+o,e)}}beforeAfter(e,n){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):n==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
|
|
278
|
-
`)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,n){let r=this.raw(e,"between","beforeOpen");this.builder(n+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let n=e.nodes.length-1;for(;n>0&&e.nodes[n].type==="comment";)n-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,n!==s||r)}}comment(e){let n=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+n+e.text+r+"*/",e)}decl(e,n){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),n&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,n,r){let s;if(r||(r=n),n&&(s=e.raws[n],typeof s<"u"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return
|
|
278
|
+
`)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,n){let r=this.raw(e,"between","beforeOpen");this.builder(n+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let n=e.nodes.length-1;for(;n>0&&e.nodes[n].type==="comment";)n-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,n!==s||r)}}comment(e){let n=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+n+e.text+r+"*/",e)}decl(e,n){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),n&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,n,r){let s;if(r||(r=n),n&&(s=e.raws[n],typeof s<"u"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return bU[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+B0e(r);this[u]?s=this[u](a,e):a.walk(c=>{if(s=c.raws[n],typeof s<"u")return!1})}return typeof s>"u"&&(s=bU[r]),a.rawCache[r]=s,s}rawBeforeClose(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
|
|
279
279
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(e,n){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
|
|
280
280
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,n){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
|
|
281
281
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let n;return e.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(e){let n;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
282
282
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(e){let n;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(e){if(e.raws.indent)return e.raws.indent;let n;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
|
|
283
283
|
`);return n=o[o.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(e,n){let r=e[n],s=e.raws[n];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,n){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,n)}};var cj=Z_;Z_.default=Z_;let H0e=cj;function X_(t,e){new H0e(e).stringify(t)}var xb=X_;X_.default=X_;let{isClean:xm,my:$0e}=cp,q0e=FR,W0e=cj,G0e=xb;function Q_(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let s=t[r],o=typeof s;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=s:Array.isArray(s)?n[r]=s.map(a=>Q_(a,n)):(o==="object"&&s!==null&&(s=Q_(s)),n[r]=s)}return n}let J_=class{constructor(e={}){this.raws={},this[xm]=!1,this[$0e]=!0;for(let n in e)if(n==="nodes"){this.nodes=[];for(let r of e[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=e[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let n=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let n in e)this[n]=e[n];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let n=Q_(this);for(let r in e)n[r]=e[r];return n}cloneAfter(e={}){let n=this.clone(e);return this.parent.insertAfter(this,n),n}cloneBefore(e={}){let n=this.clone(e);return this.parent.insertBefore(this,n),n}error(e,n={}){if(this.source){let{end:r,start:s}=this.rangeBy(n);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},n)}return new q0e(e)}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:n==="root"?()=>e.root().toProxy():e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&e.markDirty()),!0}}}markDirty(){if(this[xm]){this[xm]=!1;let e=this;for(;e=e.parent;)e[xm]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,n){let r=this.source.start;if(e.index)r=this.positionInside(e.index,n);else if(e.word){n=this.toString();let s=n.indexOf(e.word);s!==-1&&(r=this.positionInside(s,n))}return r}positionInside(e,n){let r=n||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let a=0;a<e;a++)r[a]===`
|
|
284
|
-
`?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(n=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?n={column:e.start.column,line:e.start.line}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(e,n){return new W0e().raw(this,e,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let n=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(n,s),n=s):this.parent.insertBefore(n,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,n){let r={},s=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,n):c);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,n);else if(a==="source"){let c=n.get(u.input);c==null&&(c=o,n.set(u.input,o),o++),r[a]={end:u.end,inputId:c,start:u.start}}else r[a]=u}return s&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=G0e){e.stringify&&(e=e.stringify);let n="";return e(this,r=>{n+=r}),n}warn(e,n,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(n,s)}get proxyOf(){return this}};var _b=J_;J_.default=J_;let V0e=_b,eA=class extends V0e{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ab=eA;eA.default=eA;let K0e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Y0e=(t=21)=>{let e="",n=t;for(;n--;)e+=K0e[Math.random()*64|0];return e};var Z0e={nanoid:Y0e};let{SourceMapConsumer:
|
|
285
|
-
`);r=new Array(o.length);let a=0;for(let u=0,c=o.length;u<c;u++)r[u]=a,a+=o[u].length+1;this[mx]=r}n=r[r.length-1];let s=0;if(e>=n)s=r.length-1;else{let o=r.length-2,a;for(;s<o;)if(a=s+(o-s>>1),e<r[a])o=a-1;else if(e>=r[a+1])s=a+1;else{s=a;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:rA(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,r,s){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:s,line:r}));let c;nA(a.source)?c=_m(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||_m(this.map.mapFile));let f={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(
|
|
284
|
+
`?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(n=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?n={column:e.start.column,line:e.start.line}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(e,n){return new W0e().raw(this,e,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let n=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(n,s),n=s):this.parent.insertBefore(n,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,n){let r={},s=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,n):c);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,n);else if(a==="source"){let c=n.get(u.input);c==null&&(c=o,n.set(u.input,o),o++),r[a]={end:u.end,inputId:c,start:u.start}}else r[a]=u}return s&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=G0e){e.stringify&&(e=e.stringify);let n="";return e(this,r=>{n+=r}),n}warn(e,n,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(n,s)}get proxyOf(){return this}};var _b=J_;J_.default=J_;let V0e=_b,eA=class extends V0e{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ab=eA;eA.default=eA;let K0e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Y0e=(t=21)=>{let e="",n=t;for(;n--;)e+=K0e[Math.random()*64|0];return e};var Z0e={nanoid:Y0e};let{SourceMapConsumer:SU,SourceMapGenerator:EU}=eo,{existsSync:X0e,readFileSync:Q0e}=eo,{dirname:px,join:J0e}=eo;function e1e(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let tA=class{constructor(e,n){if(n.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,s=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=px(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new SU(this.text)),this.consumerCache}decodeInline(e){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(n.test(e)||r.test(e))return e1e(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let n=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=e.lastIndexOf(n.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=px(e),X0e(e))return this.mapFile=e,Q0e(e,"utf-8").toString().trim()}loadMap(e,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(n instanceof SU)return EU.fromSourceMap(n).toString();if(n instanceof EU)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=J0e(px(e),r)),this.loadFile(r)}}}startWith(e,n){return e?e.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var dj=tA;tA.default=tA;let{SourceMapConsumer:t1e,SourceMapGenerator:n1e}=eo,{fileURLToPath:CU,pathToFileURL:_m}=eo,{isAbsolute:nA,resolve:rA}=eo,{nanoid:r1e}=Z0e,gx=eo,wU=FR,s1e=dj,mx=Symbol("fromOffsetCache"),o1e=!!(t1e&&n1e),xU=!!(rA&&nA),Jv=class{constructor(e,n={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!xU||/^\w+:\/\//.test(n.from)||nA(n.from)?this.file=n.from:this.file=rA(n.from)),xU&&o1e){let r=new s1e(this.css,n);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+r1e(6)+">"),this.map&&(this.map.file=this.from)}error(e,n,r,s={}){let o,a,u;if(n&&typeof n=="object"){let f=n,p=r;if(typeof f.offset=="number"){let g=this.fromOffset(f.offset);n=g.line,r=g.col}else n=f.line,r=f.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let c=this.origin(n,r,a,u);return c?o=new wU(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):o=new wU(e,a===void 0?n:{column:r,line:n},a===void 0?r:{column:u,line:a},this.css,this.file,s.plugin),o.input={column:r,endColumn:u,endLine:a,line:n,source:this.css},this.file&&(_m&&(o.input.url=_m(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[mx])r=this[mx];else{let o=this.css.split(`
|
|
285
|
+
`);r=new Array(o.length);let a=0;for(let u=0,c=o.length;u<c;u++)r[u]=a,a+=o[u].length+1;this[mx]=r}n=r[r.length-1];let s=0;if(e>=n)s=r.length-1;else{let o=r.length-2,a;for(;s<o;)if(a=s+(o-s>>1),e<r[a])o=a-1;else if(e>=r[a+1])s=a+1;else{s=a;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:rA(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,r,s){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:s,line:r}));let c;nA(a.source)?c=_m(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||_m(this.map.mapFile));let f={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(CU)f.file=CU(c);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(f.source=p),f}toJSON(){let e={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(e[n]=this[n]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Tb=Jv;Jv.default=Jv;gx&&gx.registerInput&&gx.registerInput(Jv);let{SourceMapConsumer:fj,SourceMapGenerator:cv}=eo,{dirname:dv,relative:hj,resolve:pj,sep:gj}=eo,{pathToFileURL:_U}=eo,i1e=Tb,a1e=!!(fj&&cv),l1e=!!(dv&&pj&&hj&&gj),u1e=class{constructor(e,n,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let n=`
|
|
286
286
|
`;this.css.includes(`\r
|
|
287
287
|
`)&&(n=`\r
|
|
288
288
|
`),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),r=e.root||dv(e.file),s;this.mapOpts.sourcesContent===!1?(s=new fj(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let n=this.root.nodes.length-1;n>=0;n--)e=this.root.nodes[n],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),l1e&&a1e&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,n=>{e+=n}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=cv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new cv({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new cv({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(u,c,f)=>{if(this.css+=u,c&&f!=="end"&&(s.generated.line=e,s.generated.column=n-1,c.source&&c.source.start?(s.source=this.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=u.match(/\n/g),o?(e+=o.length,a=u.lastIndexOf(`
|
|
289
|
-
`),n=u.length-a):n+=u.length,c&&f!=="start"){let p=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==p.last||p.raws.semicolon)&&(c.source&&c.source.end?(s.source=this.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=e,s.generated.column=n-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let r=this.opts.to?dv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=dv(pj(r,this.mapOpts.annotation)));let s=hj(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new i1e(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(_4){let r=_4(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;gj==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var mj=u1e;let c1e=_b,sA=class extends c1e{constructor(e){super(e),this.type="comment"}};var Rb=sA;sA.default=sA;let{isClean:vj,my:yj}=cp,bj=Ab,Sj=Rb,d1e=_b,Ej,zR,jR,Cj;function wj(t){return t.map(e=>(e.nodes&&(e.nodes=wj(e.nodes)),delete e.source,e))}function xj(t){if(t[vj]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)xj(e)}let wi=class _j extends d1e{append(...e){for(let n of e){let r=this.normalize(n,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,s;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[n]+=1;return delete this.indexes[n],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(s=>typeof s=="function"?(o,a)=>s(o.toProxy(),a):s)):n==="every"||n==="some"?r=>e[n]((s,...o)=>r(s.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),s=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of s)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+s.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=wj(Ej(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new bj(e)]}else if(e.selector)e=[new zR(e)];else if(e.name)e=[new jR(e)];else if(e.text)e=[new Sj(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[yj]||_j.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[vj]&&xj(s),typeof s.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(s.raws.before=n.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(s=>{n.props&&!n.props.includes(s.prop)||n.fast&&!s.value.includes(n.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let s;try{s=e(n,r)}catch(o){throw n.addToError(o)}return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="atrule")return n(r,s)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="decl")return n(r,s)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="rule")return n(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};wi.registerParse=t=>{Ej=t};wi.registerRule=t=>{zR=t};wi.registerAtRule=t=>{jR=t};wi.registerRoot=t=>{Cj=t};var cu=wi;wi.default=wi;wi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,jR.prototype):t.type==="rule"?Object.setPrototypeOf(t,zR.prototype):t.type==="decl"?Object.setPrototypeOf(t,bj.prototype):t.type==="comment"?Object.setPrototypeOf(t,Sj.prototype):t.type==="root"&&Object.setPrototypeOf(t,Cj.prototype),t[yj]=!0,t.nodes&&t.nodes.forEach(e=>{wi.rebuild(e)})};let f1e=cu,Aj,Tj,zh=class extends f1e{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Aj(new Tj,this,e).stringify()}};zh.registerLazyResult=t=>{Aj=t};zh.registerProcessor=t=>{Tj=t};var BR=zh;zh.default=zh;let oA=class{constructor(e,n={}){if(this.type="warning",this.text=e,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Rj=oA;oA.default=oA;let h1e=Rj,iA=class{constructor(e,n,r){this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new h1e(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var HR=iA;iA.default=iA;const vx=39,A4=34,Am=92,T4=47,Tm=10,Uf=32,Rm=12,Im=9,Om=13,p1e=91,g1e=93,m1e=40,v1e=41,y1e=123,b1e=125,S1e=59,E1e=42,C1e=58,w1e=64,Nm=/[\t\n\f\r "#'()/;[\\\]{}]/g,Mm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x1e=/.[\r\n"'(/\\]/,R4=/[\da-f]/i;var _1e=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,p,g,m,y,S,E=r.length,C=0,w=[],_=[];function T(){return C}function R(P){throw e.error("Unclosed "+P,C)}function M(){return _.length===0&&C>=E}function O(P){if(_.length)return _.pop();if(C>=E)return;let k=P?P.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case Tm:case Uf:case Im:case Om:case Rm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Uf||o===Tm||o===Im||o===Om||o===Rm);S=["space",r.slice(C,a)],C=a-1;break}case p1e:case g1e:case y1e:case b1e:case C1e:case S1e:case v1e:{let H=String.fromCharCode(o);S=[H,H,C];break}case m1e:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==vx&&y!==A4&&y!==Uf&&y!==Tm&&y!==Im&&y!==Rm&&y!==Om){a=C;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(s||k){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===Am;)g-=1,p=!p}while(p);S=["brackets",r.slice(C,a+1),C,a],C=a}else a=r.indexOf(")",C+1),c=r.slice(C,a+1),a===-1||x1e.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case vx:case A4:{u=o===vx?"'":'"',a=C;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(s||k){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===Am;)g-=1,p=!p}while(p);S=["string",r.slice(C,a+1),C,a],C=a;break}case w1e:{Nm.lastIndex=C+1,Nm.test(r),Nm.lastIndex===0?a=r.length-1:a=Nm.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case Am:{for(a=C,f=!0;r.charCodeAt(a+1)===Am;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==T4&&o!==Uf&&o!==Tm&&o!==Im&&o!==Om&&o!==Rm&&(a+=1,R4.test(r.charAt(a)))){for(;R4.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Uf&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===T4&&r.charCodeAt(C+1)===E1e?(a=r.indexOf("*/",C+2)+1,a===0&&(s||k?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Mm.lastIndex=C+1,Mm.test(r),Mm.lastIndex===0?a=r.length-1:a=Mm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(P){_.push(P)}return{back:I,endOfFile:M,nextToken:O,position:T}};let Ij=cu,ey=class extends Ij{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var $R=ey;ey.default=ey;Ij.registerAtRule(ey);let Oj=cu,Nj,Mj,qc=class extends Oj{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,r){let s=super.normalize(e);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of s)o.raws.before=n.raws.before}return s}removeChild(e,n){let r=this.index(e);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Nj(new Mj,this,e).stringify()}};qc.registerLazyResult=t=>{Nj=t};qc.registerProcessor=t=>{Mj=t};var dp=qc;qc.default=qc;Oj.registerRoot(qc);let jh={comma(t){return jh.split(t,[","],!0)},space(t){let e=[" ",`
|
|
290
|
-
`," "];return jh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let p of t)f?f=!1:p==="\\"?f=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=p;return(n||s!=="")&&r.push(s.trim()),r}};var Pj=jh;jh.default=jh;let kj=cu,A1e=Pj,ty=class extends kj{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return A1e.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var qR=ty;ty.default=ty;kj.registerRule(ty);let T1e=Ab,R1e=_1e,I1e=Rb,O1e=$R,N1e=dp,I4=qR;const O4={empty:!0,space:!0};function M1e(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let P1e=class{constructor(e){this.input=e,this.root=new N1e,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new O1e;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let r,s,o,a=!1,u=!1,c=[],f=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(c.length>0){for(o=c.length-1,s=c[o];s&&s[0]==="space";)s=c[--o];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(e=c[c.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),u&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let r=0,s;for(let o=n-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let n=0,r,s,o;for(let[a,u]of e.entries()){if(r=u,s=r[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let n=new I1e;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=R1e(this.input)}decl(e,n){let r=new T1e;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||M1e(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(o=e[f],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=f;m>0;m--){let y=p[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new I4;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,r=null,s=!1,o=null,a=[],u=e[1].startsWith("--"),c=[],f=e;for(;f;){if(r=f[0],c.push(f),r==="("||r==="[")o||(o=f),a.push(r==="("?")":"]");else if(u&&s&&r==="{")o||(o=f),a.push("}");else if(a.length===0)if(r===";")if(s){this.decl(c,u);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),n=!0;break}else r===":"&&(s=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&s){if(!u)for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,r,s){let o,a,u=r.length,c="",f=!0,p,g;for(let m=0;m<u;m+=1)o=r[m],a=o[0],a==="space"&&m===u-1&&!s?f=!1:a==="comment"?(g=r[m-1]?r[m-1][0]:"empty",p=r[m+1]?r[m+1][0]:"empty",!O4[g]&&!O4[p]?c.slice(-1)===","?f=!1:c+=o[1]:f=!1):c+=o[1];if(!f){let m=r.reduce((y,S)=>y+S[1],"");e.raws[n]={raw:m,value:c}}e[n]=c}rule(e){e.pop();let n=new I4;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let n,r="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],n==="space");)r=e.pop()[1]+r;return r}stringFrom(e,n){let r="";for(let s=n;s<e.length;s++)r+=e[s][1];return e.splice(n,e.length-n),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var k1e=P1e;let D1e=cu,L1e=k1e,U1e=Tb;function ny(t,e){let n=new U1e(t,e),r=new L1e(n);try{r.parse()}catch(s){throw s}return r.root}var WR=ny;ny.default=ny;D1e.registerParse(ny);let{isClean:yo,my:F1e}=cp,z1e=mj,j1e=xb,B1e=cu,H1e=BR,N4=HR,$1e=WR,q1e=dp;const W1e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},G1e={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},V1e={Once:!0,postcssPlugin:!0,prepare:!0},Wc=0;function Ff(t){return typeof t=="object"&&typeof t.then=="function"}function Dj(t){let e=!1,n=W1e[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Wc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Wc,n+"Exit"]:[n,n+"Exit"]}function M4(t){let e;return t.type==="document"?e=["Document",Wc,"DocumentExit"]:t.type==="root"?e=["Root",Wc,"RootExit"]:e=Dj(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function aA(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(e=>aA(e)),t}let lA={},Gc=class Lj{constructor(e,n,r){this.stringified=!1,this.processed=!1;let s;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))s=aA(n);else if(n instanceof Lj||n instanceof N4)s=aA(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=$1e;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(n,r)}catch(a){this.processed=!0,this.error=a}s&&!s[F1e]&&B1e.rebuild(s)}this.result=new N4(e,s,r),this.helpers={...lA,postcss:lA,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(n,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,s])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!G1e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!V1e[r])if(typeof n[r]=="object")for(let s in n[r])s==="*"?e(n,r,n[r][s]):e(n,r+"-"+s.toLowerCase(),n[r][s]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(Ff(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yo];){e[yo]=!0;let n=[M4(e)];for(;n.length>0;){let r=this.visitTick(n);if(Ff(r))try{await r}catch(s){let o=n[n.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ff(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=j1e;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new z1e(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(Ff(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yo];)e[yo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Ff(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:s}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&n.visitorIndex<s.length){let[a,u]=s[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[yo]){u[yo]=!0,e.push(M4(u));return}n.iterator=0,delete r.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===Wc){r.nodes&&r.nodes.length&&(r[yo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[yo]=!0;let n=Dj(e);for(let r of n)if(r===Wc)e.nodes&&e.each(s=>{s[yo]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Gc.registerPostcss=t=>{lA=t};var Uj=Gc;Gc.default=Gc;q1e.registerLazyResult(Gc);H1e.registerLazyResult(Gc);let K1e=mj,Y1e=xb,Z1e=WR;const X1e=HR;let uA=class{constructor(e,n,r){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=r,this._map=void 0;let s,o=Y1e;this.result=new X1e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new K1e(o,s,this._opts,n);if(u.isMap()){let[c,f]=u.generate();c&&(this.result.css=c),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=Z1e;try{e=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Q1e=uA;uA.default=uA;let J1e=Q1e,eSe=Uj,tSe=BR,nSe=dp,Bh=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let n=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(e,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new J1e(this,e,n):new eSe(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var rSe=Bh;Bh.default=Bh;nSe.registerProcessor(Bh);tSe.registerProcessor(Bh);let sSe=Ab,oSe=dj,iSe=Rb,aSe=$R,lSe=Tb,uSe=dp,cSe=qR;function Hh(t,e){if(Array.isArray(t))return t.map(s=>Hh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:lSe.prototype};o.map&&(o.map={...o.map,__proto__:oSe.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Hh(s,e))),r.source){let{inputId:s,...o}=r.source;r.source=o,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new uSe(r);if(r.type==="decl")return new sSe(r);if(r.type==="rule")return new cSe(r);if(r.type==="comment")return new iSe(r);if(r.type==="atrule")return new aSe(r);throw new Error("Unknown node type: "+t.type)}var dSe=Hh;Hh.default=Hh;let fSe=FR,Fj=Ab,hSe=Uj,pSe=cu,GR=rSe,gSe=xb,mSe=dSe,zj=BR,vSe=Rj,jj=Rb,Bj=$R,ySe=HR,bSe=Tb,SSe=WR,ESe=Pj,Hj=qR,$j=dp,CSe=_b;function Lt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new GR(t)}Lt.plugin=function(e,n){let r=!1;function s(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
289
|
+
`),n=u.length-a):n+=u.length,c&&f!=="start"){let p=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==p.last||p.raws.semicolon)&&(c.source&&c.source.end?(s.source=this.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=e,s.generated.column=n-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let r=this.opts.to?dv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=dv(pj(r,this.mapOpts.annotation)));let s=hj(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new i1e(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(_U){let r=_U(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;gj==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var mj=u1e;let c1e=_b,sA=class extends c1e{constructor(e){super(e),this.type="comment"}};var Rb=sA;sA.default=sA;let{isClean:vj,my:yj}=cp,bj=Ab,Sj=Rb,d1e=_b,Ej,zR,jR,Cj;function wj(t){return t.map(e=>(e.nodes&&(e.nodes=wj(e.nodes)),delete e.source,e))}function xj(t){if(t[vj]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)xj(e)}let wi=class _j extends d1e{append(...e){for(let n of e){let r=this.normalize(n,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,s;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[n]+=1;return delete this.indexes[n],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(s=>typeof s=="function"?(o,a)=>s(o.toProxy(),a):s)):n==="every"||n==="some"?r=>e[n]((s,...o)=>r(s.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),s=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of s)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+s.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=wj(Ej(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new bj(e)]}else if(e.selector)e=[new zR(e)];else if(e.name)e=[new jR(e)];else if(e.text)e=[new Sj(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[yj]||_j.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[vj]&&xj(s),typeof s.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(s.raws.before=n.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(s=>{n.props&&!n.props.includes(s.prop)||n.fast&&!s.value.includes(n.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let s;try{s=e(n,r)}catch(o){throw n.addToError(o)}return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="atrule")return n(r,s)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="decl")return n(r,s)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="rule")return n(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};wi.registerParse=t=>{Ej=t};wi.registerRule=t=>{zR=t};wi.registerAtRule=t=>{jR=t};wi.registerRoot=t=>{Cj=t};var cu=wi;wi.default=wi;wi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,jR.prototype):t.type==="rule"?Object.setPrototypeOf(t,zR.prototype):t.type==="decl"?Object.setPrototypeOf(t,bj.prototype):t.type==="comment"?Object.setPrototypeOf(t,Sj.prototype):t.type==="root"&&Object.setPrototypeOf(t,Cj.prototype),t[yj]=!0,t.nodes&&t.nodes.forEach(e=>{wi.rebuild(e)})};let f1e=cu,Aj,Tj,zh=class extends f1e{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Aj(new Tj,this,e).stringify()}};zh.registerLazyResult=t=>{Aj=t};zh.registerProcessor=t=>{Tj=t};var BR=zh;zh.default=zh;let oA=class{constructor(e,n={}){if(this.type="warning",this.text=e,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Rj=oA;oA.default=oA;let h1e=Rj,iA=class{constructor(e,n,r){this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new h1e(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var HR=iA;iA.default=iA;const vx=39,AU=34,Am=92,TU=47,Tm=10,Uf=32,Rm=12,Im=9,Om=13,p1e=91,g1e=93,m1e=40,v1e=41,y1e=123,b1e=125,S1e=59,E1e=42,C1e=58,w1e=64,Nm=/[\t\n\f\r "#'()/;[\\\]{}]/g,Mm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x1e=/.[\r\n"'(/\\]/,RU=/[\da-f]/i;var _1e=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,p,g,m,y,S,E=r.length,C=0,w=[],_=[];function T(){return C}function R(P){throw e.error("Unclosed "+P,C)}function M(){return _.length===0&&C>=E}function O(P){if(_.length)return _.pop();if(C>=E)return;let k=P?P.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case Tm:case Uf:case Im:case Om:case Rm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Uf||o===Tm||o===Im||o===Om||o===Rm);S=["space",r.slice(C,a)],C=a-1;break}case p1e:case g1e:case y1e:case b1e:case C1e:case S1e:case v1e:{let H=String.fromCharCode(o);S=[H,H,C];break}case m1e:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==vx&&y!==AU&&y!==Uf&&y!==Tm&&y!==Im&&y!==Rm&&y!==Om){a=C;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(s||k){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===Am;)g-=1,p=!p}while(p);S=["brackets",r.slice(C,a+1),C,a],C=a}else a=r.indexOf(")",C+1),c=r.slice(C,a+1),a===-1||x1e.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case vx:case AU:{u=o===vx?"'":'"',a=C;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(s||k){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===Am;)g-=1,p=!p}while(p);S=["string",r.slice(C,a+1),C,a],C=a;break}case w1e:{Nm.lastIndex=C+1,Nm.test(r),Nm.lastIndex===0?a=r.length-1:a=Nm.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case Am:{for(a=C,f=!0;r.charCodeAt(a+1)===Am;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==TU&&o!==Uf&&o!==Tm&&o!==Im&&o!==Om&&o!==Rm&&(a+=1,RU.test(r.charAt(a)))){for(;RU.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Uf&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===TU&&r.charCodeAt(C+1)===E1e?(a=r.indexOf("*/",C+2)+1,a===0&&(s||k?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Mm.lastIndex=C+1,Mm.test(r),Mm.lastIndex===0?a=r.length-1:a=Mm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(P){_.push(P)}return{back:I,endOfFile:M,nextToken:O,position:T}};let Ij=cu,ey=class extends Ij{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var $R=ey;ey.default=ey;Ij.registerAtRule(ey);let Oj=cu,Nj,Mj,qc=class extends Oj{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,r){let s=super.normalize(e);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of s)o.raws.before=n.raws.before}return s}removeChild(e,n){let r=this.index(e);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Nj(new Mj,this,e).stringify()}};qc.registerLazyResult=t=>{Nj=t};qc.registerProcessor=t=>{Mj=t};var dp=qc;qc.default=qc;Oj.registerRoot(qc);let jh={comma(t){return jh.split(t,[","],!0)},space(t){let e=[" ",`
|
|
290
|
+
`," "];return jh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let p of t)f?f=!1:p==="\\"?f=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=p;return(n||s!=="")&&r.push(s.trim()),r}};var Pj=jh;jh.default=jh;let kj=cu,A1e=Pj,ty=class extends kj{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return A1e.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var qR=ty;ty.default=ty;kj.registerRule(ty);let T1e=Ab,R1e=_1e,I1e=Rb,O1e=$R,N1e=dp,IU=qR;const OU={empty:!0,space:!0};function M1e(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let P1e=class{constructor(e){this.input=e,this.root=new N1e,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new O1e;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let r,s,o,a=!1,u=!1,c=[],f=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(c.length>0){for(o=c.length-1,s=c[o];s&&s[0]==="space";)s=c[--o];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(e=c[c.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),u&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let r=0,s;for(let o=n-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let n=0,r,s,o;for(let[a,u]of e.entries()){if(r=u,s=r[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let n=new I1e;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=R1e(this.input)}decl(e,n){let r=new T1e;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||M1e(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(o=e[f],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=f;m>0;m--){let y=p[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new IU;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,r=null,s=!1,o=null,a=[],u=e[1].startsWith("--"),c=[],f=e;for(;f;){if(r=f[0],c.push(f),r==="("||r==="[")o||(o=f),a.push(r==="("?")":"]");else if(u&&s&&r==="{")o||(o=f),a.push("}");else if(a.length===0)if(r===";")if(s){this.decl(c,u);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),n=!0;break}else r===":"&&(s=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&s){if(!u)for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,r,s){let o,a,u=r.length,c="",f=!0,p,g;for(let m=0;m<u;m+=1)o=r[m],a=o[0],a==="space"&&m===u-1&&!s?f=!1:a==="comment"?(g=r[m-1]?r[m-1][0]:"empty",p=r[m+1]?r[m+1][0]:"empty",!OU[g]&&!OU[p]?c.slice(-1)===","?f=!1:c+=o[1]:f=!1):c+=o[1];if(!f){let m=r.reduce((y,S)=>y+S[1],"");e.raws[n]={raw:m,value:c}}e[n]=c}rule(e){e.pop();let n=new IU;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let n,r="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],n==="space");)r=e.pop()[1]+r;return r}stringFrom(e,n){let r="";for(let s=n;s<e.length;s++)r+=e[s][1];return e.splice(n,e.length-n),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var k1e=P1e;let D1e=cu,L1e=k1e,U1e=Tb;function ny(t,e){let n=new U1e(t,e),r=new L1e(n);try{r.parse()}catch(s){throw s}return r.root}var WR=ny;ny.default=ny;D1e.registerParse(ny);let{isClean:yo,my:F1e}=cp,z1e=mj,j1e=xb,B1e=cu,H1e=BR,NU=HR,$1e=WR,q1e=dp;const W1e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},G1e={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},V1e={Once:!0,postcssPlugin:!0,prepare:!0},Wc=0;function Ff(t){return typeof t=="object"&&typeof t.then=="function"}function Dj(t){let e=!1,n=W1e[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Wc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Wc,n+"Exit"]:[n,n+"Exit"]}function MU(t){let e;return t.type==="document"?e=["Document",Wc,"DocumentExit"]:t.type==="root"?e=["Root",Wc,"RootExit"]:e=Dj(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function aA(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(e=>aA(e)),t}let lA={},Gc=class Lj{constructor(e,n,r){this.stringified=!1,this.processed=!1;let s;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))s=aA(n);else if(n instanceof Lj||n instanceof NU)s=aA(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=$1e;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(n,r)}catch(a){this.processed=!0,this.error=a}s&&!s[F1e]&&B1e.rebuild(s)}this.result=new NU(e,s,r),this.helpers={...lA,postcss:lA,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(n,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,s])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!G1e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!V1e[r])if(typeof n[r]=="object")for(let s in n[r])s==="*"?e(n,r,n[r][s]):e(n,r+"-"+s.toLowerCase(),n[r][s]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(Ff(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yo];){e[yo]=!0;let n=[MU(e)];for(;n.length>0;){let r=this.visitTick(n);if(Ff(r))try{await r}catch(s){let o=n[n.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ff(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=j1e;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new z1e(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(Ff(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yo];)e[yo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Ff(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:s}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&n.visitorIndex<s.length){let[a,u]=s[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[yo]){u[yo]=!0,e.push(MU(u));return}n.iterator=0,delete r.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===Wc){r.nodes&&r.nodes.length&&(r[yo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[yo]=!0;let n=Dj(e);for(let r of n)if(r===Wc)e.nodes&&e.each(s=>{s[yo]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Gc.registerPostcss=t=>{lA=t};var Uj=Gc;Gc.default=Gc;q1e.registerLazyResult(Gc);H1e.registerLazyResult(Gc);let K1e=mj,Y1e=xb,Z1e=WR;const X1e=HR;let uA=class{constructor(e,n,r){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=r,this._map=void 0;let s,o=Y1e;this.result=new X1e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new K1e(o,s,this._opts,n);if(u.isMap()){let[c,f]=u.generate();c&&(this.result.css=c),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=Z1e;try{e=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Q1e=uA;uA.default=uA;let J1e=Q1e,eSe=Uj,tSe=BR,nSe=dp,Bh=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let n=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(e,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new J1e(this,e,n):new eSe(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var rSe=Bh;Bh.default=Bh;nSe.registerProcessor(Bh);tSe.registerProcessor(Bh);let sSe=Ab,oSe=dj,iSe=Rb,aSe=$R,lSe=Tb,uSe=dp,cSe=qR;function Hh(t,e){if(Array.isArray(t))return t.map(s=>Hh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:lSe.prototype};o.map&&(o.map={...o.map,__proto__:oSe.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Hh(s,e))),r.source){let{inputId:s,...o}=r.source;r.source=o,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new uSe(r);if(r.type==="decl")return new sSe(r);if(r.type==="rule")return new cSe(r);if(r.type==="comment")return new iSe(r);if(r.type==="atrule")return new aSe(r);throw new Error("Unknown node type: "+t.type)}var dSe=Hh;Hh.default=Hh;let fSe=FR,Fj=Ab,hSe=Uj,pSe=cu,GR=rSe,gSe=xb,mSe=dSe,zj=BR,vSe=Rj,jj=Rb,Bj=$R,ySe=HR,bSe=Tb,SSe=WR,ESe=Pj,Hj=qR,$j=dp,CSe=_b;function Lt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new GR(t)}Lt.plugin=function(e,n){let r=!1;function s(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
291
291
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),qv.LANG&&qv.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
292
|
-
https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new GR().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=gSe;Lt.parse=SSe;Lt.fromJSON=mSe;Lt.list=ESe;Lt.comment=t=>new jj(t);Lt.atRule=t=>new Bj(t);Lt.decl=t=>new Fj(t);Lt.rule=t=>new Hj(t);Lt.root=t=>new $j(t);Lt.document=t=>new zj(t);Lt.CssSyntaxError=fSe;Lt.Declaration=Fj;Lt.Container=pSe;Lt.Processor=GR;Lt.Document=zj;Lt.Comment=jj;Lt.Warning=vSe;Lt.AtRule=Bj;Lt.Result=ySe;Lt.Input=bSe;Lt.Rule=Hj;Lt.Root=$j;Lt.Node=CSe;hSe.registerPostcss(Lt);var wSe=Lt;Lt.default=Lt;const on=L0e(wSe);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 VR{constructor(...e){ws(this,"parentElement",null),ws(this,"parentNode",null),ws(this,"ownerDocument"),ws(this,"firstChild",null),ws(this,"lastChild",null),ws(this,"previousSibling",null),ws(this,"nextSibling",null),ws(this,"ELEMENT_NODE",1),ws(this,"TEXT_NODE",3),ws(this,"nodeType"),ws(this,"nodeName"),ws(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 VR){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
|
|
292
|
+
https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new GR().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=gSe;Lt.parse=SSe;Lt.fromJSON=mSe;Lt.list=ESe;Lt.comment=t=>new jj(t);Lt.atRule=t=>new Bj(t);Lt.decl=t=>new Fj(t);Lt.rule=t=>new Hj(t);Lt.root=t=>new $j(t);Lt.document=t=>new zj(t);Lt.CssSyntaxError=fSe;Lt.Declaration=Fj;Lt.Container=pSe;Lt.Processor=GR;Lt.Document=zj;Lt.Comment=jj;Lt.Warning=vSe;Lt.AtRule=Bj;Lt.Result=ySe;Lt.Input=bSe;Lt.Rule=Hj;Lt.Root=$j;Lt.Node=CSe;hSe.registerPostcss(Lt);var wSe=Lt;Lt.default=Lt;const on=L0e(wSe);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 VR{constructor(...e){ws(this,"parentElement",null),ws(this,"parentNode",null),ws(this,"ownerDocument"),ws(this,"firstChild",null),ws(this,"lastChild",null),ws(this,"previousSibling",null),ws(this,"nextSibling",null),ws(this,"ELEMENT_NODE",1),ws(this,"TEXT_NODE",3),ws(this,"nodeType"),ws(this,"nodeName"),ws(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 VR){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 PU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},kU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Pm={},xSe=()=>!!globalThis.Zone;function KR(t){if(Pm[t])return Pm[t];const e=globalThis[t],n=e.prototype,r=t in PU?PU[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 kU?kU[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&&!xSe())return Pm[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?Pm[t]=f:n}catch{return n}}const yx={};function Oi(t,e,n){var r;const s=`${t}.${String(n)}`;if(yx[s])return yx[s].call(e);const o=KR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(yx[s]=a,a.call(e)):e[n]}const bx={};function qj(t,e,n){const r=`${t}.${String(n)}`;if(bx[r])return bx[r].bind(e);const o=KR(t)[n];return typeof o!="function"?e[n]:(bx[r]=o,o.bind(e))}function _Se(t){return Oi("Node",t,"ownerDocument")}function ASe(t){return Oi("Node",t,"childNodes")}function TSe(t){return Oi("Node",t,"parentNode")}function RSe(t){return Oi("Node",t,"parentElement")}function ISe(t){return Oi("Node",t,"textContent")}function OSe(t,e){return qj("Node",t,"contains")(e)}function NSe(t){return qj("Node",t,"getRootNode")()}function MSe(t){return!t||!("host"in t)?null:Oi("ShadowRoot",t,"host")}function PSe(t){return t.styleSheets}function kSe(t){return!t||!("shadowRoot"in t)?null:Oi("Element",t,"shadowRoot")}function DSe(t,e){return Oi("Element",t,"querySelector")(e)}function LSe(t,e){return Oi("Element",t,"querySelectorAll")(e)}function Wj(){return KR("MutationObserver").constructor}function du(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:_Se,childNodes:ASe,parentNode:TSe,parentElement:RSe,textContent:ISe,contains:OSe,getRootNode:NSe,host:MSe,styleSheets:PSe,shadowRoot:kSe,querySelector:DSe,querySelectorAll:LSe,mutationObserver:Wj,patch:du};function Er(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const mc=`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 D4={map:{},getId(){return console.error(mc),-1},getNode(){return console.error(mc),null},removeNodeFromMap(){console.error(mc)},has(){return console.error(mc),!1},reset(){console.error(mc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(D4=new Proxy(D4,{get(t,e,n){return e==="map"&&console.error(mc),Reflect.get(t,e,n)}}));function $h(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 Ib(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)}}),()=>Ib(t,e,o||{},!0)}let ry=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ry=()=>new Date().getTime());function Gj(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 Vj(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Kj(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Yj(t){return t?t.nodeType===t.ELEMENT_NODE?t:rt.parentElement(t):null}function Cr(t,e,n,r){if(!t)return!1;const s=Yj(t);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(Kv(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function USe(t,e){return e.getId(t)!==-1}function Sx(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===kh}function Zj(t,e){if(ch(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?Zj(r,e):!0}function cA(t){return!!t.changedTouches}function FSe(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 Xj(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Qj(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function dA(t){return t?t instanceof VR&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class zSe{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 Jj(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 jSe(t){let e=t,n;for(;n=Jj(e);)e=n;return e}function BSe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=jSe(t);return rt.contains(e,n)}function eB(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||BSe(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||{}),Lr=(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))(Lr||{}),si=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(si||{}),Vc=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Vc||{}),vc=(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))(vc||{}),tB=(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))(tB||{});function L4(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&&L4(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&&L4(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 U4=(t,e)=>`${t}@${e}`;class $Se{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=kh;for(;p===kh;)f=f&&f.nextSibling,p=f&&this.mirror.getId(f);return p},o=c=>{const f=rt.parentNode(c);if(!f||!eB(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=ch(f)?this.mirror.getId(Jj(c)):this.mirror.getId(f),m=s(c);if(g===-1||m===-1)return r.addNode(c);const y=Ac(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=>{Xj(S,this.mirror)&&this.iframeManager.addIframe(S),Qj(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),dA(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)F4(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!z4(this.droppedSet,c)&&!F4(this.removesSubTreeCache,c,this.mirror)||z4(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=Wv({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Gv(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!Sx(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const n=rt.textContent(e.target);!Cr(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:xz(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,Yj(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=Gv(n);s=Wv({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:s,maskInputFn:this.maskInputFn})}if(Cr(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"),!wz(n.tagName,r))if(o.attributes[r]=Cz(this.doc,Kl(n.tagName),Kl(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(Cr(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=ch(e.target)?this.mirror.getId(rt.host(e.target)):this.mirror.getId(e.target);Cr(e.target,this.blockClass,this.blockSelector,!1)||Sx(n,this.mirror,this.slimDOMOptions)||!USe(n,this.mirror)||(this.addedSet.has(n)?(fA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Zj(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[U4(r,s)]?fA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:ch(e.target)&&dh(e.target)?!0:void 0}),qSe(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(Sx(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[U4(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Cr(e,this.blockClass,this.blockSelector,!1)||(rt.childNodes(e).forEach(r=>this.genAdds(r)),dA(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 fA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>fA(t,n))}function qSe(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 F4(t,e,n){return t.size===0?!1:WSe(t,e)}function WSe(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function z4(t,e){return t.size===0?!1:nB(t,e)}function nB(t,e){const n=rt.parentNode(e);return n?t.has(n)?!0:nB(t,n):!1}let fh;function GSe(t){fh=t}function VSe(){fh=void 0}const vt=t=>fh?(...n)=>{try{return t(...n)}catch(r){if(fh&&fh(r)===!0)return;throw r}}:t,Rl=[];function fp(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 rB(t,e){const n=new $Se;Rl.push(n),n.init(t);const r=new(Wj())(vt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function KSe({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=$h(vt(g=>{const m=Date.now()-u;t(a.map(y=>(y.timeOffset-=m,y)),g),a=[],u=null}),o),f=vt($h(vt(g=>{const m=fp(g),{clientX:y,clientY:S}=cA(g)?g.changedTouches[0]:g;u||(u=ry()),a.push({x:y,y:S,id:r.getId(m),timeOffset:ry()-u}),c(typeof DragEvent<"u"&&g instanceof DragEvent?ft.Drag:g instanceof MouseEvent?ft.MouseMove:ft.TouchMove)}),s,{trailing:!1})),p=[Er("mousemove",f,n),Er("touchmove",f,n),Er("drag",f,n)];return vt(()=>{p.forEach(g=>g())})}function YSe({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=fp(g);if(Cr(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?Lr[p]===Lr.MouseDown?S="TouchStart":Lr[p]===Lr.MouseUp&&(S="TouchEnd"):si.Pen}else cA(g)&&(y=si.Touch);y!==null?(c=y,(S.startsWith("Touch")&&y===si.Touch||S.startsWith("Mouse")&&y===si.Mouse)&&(y=null)):Lr[p]===Lr.Click&&(y=c,c=null);const E=cA(g)?g.changedTouches[0]:g;if(!E)return;const C=n.getId(m),{clientX:w,clientY:_}=E;vt(t)({type:Lr[S],id:C,x:w,y:_,...y!==null&&{pointerType:y}})};return Object.keys(Lr).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&a[p]!==!1).forEach(p=>{let g=Kl(p);const m=f(p);if(window.PointerEvent)switch(Lr[p]){case Lr.MouseDown:case Lr.MouseUp:g=g.replace("mouse","pointer");break;case Lr.TouchStart:case Lr.TouchEnd:return}u.push(Er(g,m,e))}),vt(()=>{u.forEach(p=>p())})}function sB({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){const a=vt($h(vt(u=>{const c=fp(u);if(!c||Cr(c,r,s,!0))return;const f=n.getId(c);if(c===e&&e.defaultView){const p=Gj(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 Er("scroll",a,e)}function ZSe({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=vt($h(vt(()=>{const o=Vj(),a=Kj();(n!==o||r!==a)&&(t({width:Number(a),height:Number(o)}),n=o,r=a)}),200));return Er("resize",s,e)}const XSe=["INPUT","TEXTAREA","SELECT"],j4=new WeakMap;function QSe({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:p}){function g(_){let T=fp(_);const R=_.isTrusted,M=T&&T.tagName;if(T&&M==="OPTION"&&(T=rt.parentElement(T)),!T||!M||XSe.indexOf(M)<0||Cr(T,r,s,!0)||T.classList.contains(o)||a&&T.matches(a))return;let O=T.value,I=!1;const P=Gv(T)||"";P==="radio"||P==="checkbox"?I=T.checked:(u[M.toLowerCase()]||u[P])&&(O=Wv({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(_,T){const R=j4.get(_);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){j4.set(_,T);const M=n.getId(_);vt(t)({...T,id:M})}}const S=(f.input==="last"?["change"]:["input","change"]).map(_=>Er(_,vt(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(_=>_())};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(_=>Ib(_[0],_[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(_=>_())})}function sy(t){const e=[];function n(r,s){if(km("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||km("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||km("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||km("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 JSe({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={};Dm("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Dm("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Dm("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Dm("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:_}=ba(y.parentStyleSheet,e,n.styleMirror);return(w&&w!==-1||_&&_!==-1)&&t({id:w,styleId:_,adds:[{rule:E,index:[...sy(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:[...sy(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 oB({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 eEe({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:sy(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:sy(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function tEe({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:s,doc:o}){const a=vt(c=>$h(vt(f=>{const p=fp(f);if(!p||Cr(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=[Er("play",a(vc.Play),o),Er("pause",a(vc.Pause),o),Er("seeked",a(vc.Seeked),o),Er("volumechange",a(vc.VolumeChange),o),Er("ratechange",a(vc.RateChange),o)];return vt(()=>{u.forEach(c=>c())})}function nEe({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=du(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 rEe(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;Cr(y,r,s,!0)||Cr(E,r,s,!0)||f.push({start:n.getId(y),startOffset:S,end:n.getId(E),endOffset:C})}o({ranges:f})});return u(),Er("selectionchange",u)}function sEe({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:du(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 oEe(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 iEe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};oEe(t,e);let r;t.recordDOM&&(r=rB(t,t.doc));const s=KSe(t),o=YSe(t),a=sB(t),u=ZSe(t,{win:n}),c=QSe(t),f=tEe(t);let p=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(p=JSe(t,{win:n}),g=oB(t,t.doc),m=eEe(t,{win:n}),t.collectFonts&&(y=nEe(t)));const S=rEe(t),E=sEe(t),C=[];for(const w of t.plugins)C.push(w.observer(w.callback,n,w.options));return vt(()=>{Rl.forEach(w=>w.reset()),r?.disconnect(),s(),o(),a(),u(),c(),f(),p(),g(),m(),y(),S(),E(),C.forEach(w=>w())})}function km(t){return typeof window[t]<"u"}function Dm(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class B4{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 aEe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new B4(Ez)),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 B4(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!==tB.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class lEe{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(!dh(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=rB({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(sB({...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(oB({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(du(e.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o),u=rt.shadowRoot(this);return u&&eB(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Tc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uEe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Lm=0;Lm<Tc.length;Lm++)uEe[Tc.charCodeAt(Lm)]=Lm;var cEe=function(t){var e=new Uint8Array(t),n,r=e.length,s="";for(n=0;n<r;n+=3)s+=Tc[e[n]>>2],s+=Tc[(e[n]&3)<<4|e[n+1]>>4],s+=Tc[(e[n+1]&15)<<2|e[n+2]>>6],s+=Tc[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 H4=new Map;function dEe(t,e){let n=H4.get(t);return n||(n=new Map,H4.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const iB=(t,e,n)=>{if(!t||!(lB(t,e)||typeof t=="object"))return;const r=t.constructor.name,s=dEe(n,r);let o=s.indexOf(t);return o===-1&&(o=s.length,s.push(t)),o};function fv(t,e,n){if(t instanceof Array)return t.map(r=>fv(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=cEe(t);return{rr_type:r,base64:s}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[fv(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:[fv(t.data,e,n),t.width,t.height]};if(lB(t,e)||typeof t=="object"){const r=t.constructor.name,s=iB(t,e,n);return{rr_type:r,index:s}}}}return t}const aB=(t,e,n)=>t.map(r=>fv(r,e,n)),lB=(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 fEe(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=du(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return Cr(this.canvas,n,r,!0)||setTimeout(()=>{const p=aB(f,e,this);t(this.canvas,{type:Vc["2D"],property:a,args:p})},0),c.apply(this,f)}});s.push(u)}catch{const u=Ib(e.CanvasRenderingContext2D.prototype,a,{set(c){t(this.canvas,{type:Vc["2D"],property:a,args:[c],setter:!0})}});s.push(u)}return()=>{s.forEach(a=>a())}}function hEe(t){return t==="experimental-webgl"?"webgl":t}function $4(t,e,n,r){const s=[];try{const o=du(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!Cr(this,e,n,!0)){const f=hEe(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 q4(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=du(t,c,function(p){return function(...g){const m=p.apply(this,g);if(iB(m,o,this),"tagName"in this.canvas&&!Cr(this.canvas,r,s,!0)){const y=aB(g,o,this),S={type:e,property:c,args:y};n(this.canvas,S)}return m}});a.push(f)}catch{const f=Ib(t,c,{set(p){n(this.canvas,{type:e,property:c,args:[p],setter:!0})}});a.push(f)}return a}function pEe(t,e,n,r){const s=[];return s.push(...q4(e.WebGLRenderingContext.prototype,Vc.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...q4(e.WebGL2RenderingContext.prototype,Vc.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const uB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",gEe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),W4=typeof window<"u"&&window.Blob&&new Blob([gEe(uB)],{type:"text/javascript;charset=utf-8"});function mEe(t){let e;try{if(e=W4&&(window.URL||window.webkitURL).createObjectURL(W4),!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,"+uB,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class vEe{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=$4(n,r,s,!0),u=new Map,c=new mEe;c.onmessage=S=>{const{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;const{base64:C,type:w,width:_,height:T}=S.data;this.mutationCb({id:E,type:Vc["2D"],commands:[{property:"clearRect",args:[0,0,_,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=>{Cr(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 _=await createImageBitmap(E);c.postMessage({id:w,bitmap:_,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[_])}),g=requestAnimationFrame(y)};g=requestAnimationFrame(y),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=$4(e,n,r,!1),o=fEe(this.processMutation.bind(this),e,n,r),a=pEe(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 yEe{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new zSe),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:yz(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 bEe{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,hv,Ex,oy=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((KU=t.contentWindow)==null?void 0:KU.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Bs=Eye();function hp(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:_={},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:j,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:ne}=t;GSe(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&&_.mousemove===void 0&&(_.mousemove=R),Bs.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=_z(y);FSe();let Ae,L=0;const V=Ee=>{for(const pt of j||[])pt.eventProcessor&&(Ee=pt.eventProcessor(Ee));return w&&!ee&&(Ee=w(Ee)),Ee};gn=(Ee,pt)=>{var Ce;const ze=Ee;if(ze.timestamp=ry(),(Ce=Rl[0])!=null&&Ce.isFrozen()&&ze.type!==Ct.FullSnapshot&&!(ze.type===Ct.IncrementalSnapshot&&ze.data.source===ft.Mutation)&&Rl.forEach(je=>je.unfreeze()),$)e?.(V(ze),pt);else if(ee){const je={type:"rrweb",event:V(ze),origin:window.location.origin,isCheckout:pt};window.parent.postMessage(je,"*")}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 je=r&&L>=r,He=n&&ze.timestamp-Ae.timestamp>n;(je||He)&&hv(!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 yEe({mutationCb:K,adoptedStyleSheetCb:he}),ve=new aEe({mirror:Bs,mutationCb:K,stylesheetManager:ue,recordCrossOriginIframes:I,wrappedEmit:gn});for(const Ee of j||[])Ee.getMirror&&Ee.getMirror({nodeMirror:Bs,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const xe=new bEe;Ex=new vEe({recordCanvas:O,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:Bs,sampling:_.canvas,dataURLOptions:T});const Xe=new lEe({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:_,slimDOMOptions:de,iframeManager:ve,stylesheetManager:ue,canvasManager:Ex,keepIframeSrcFn:W,processedNodeManager:xe},mirror:Bs});hv=(Ee=!1)=>{if(!M)return;gn({type:Ct.Meta,data:{href:window.location.href,width:Kj(),height:Vj()}},Ee),ue.reset(),Xe.init(),Rl.forEach(Ce=>Ce.lock());const pt=Wye(document,{mirror:Bs,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=>{Xj(Ce,Bs)&&ve.addIframe(Ce),Qj(Ce,Bs)&&ue.trackLinkElement(Ce),dA(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:Gj(window)}},Ee),Rl.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,Bs.getId(document))};try{const Ee=[],pt=ze=>{var je;return vt(iEe)({mutationCb:K,mousemoveCb:(He,gr)=>gn({type:Ct.IncrementalSnapshot,data:{source:gr,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:_,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:Bs,iframeManager:ve,stylesheetManager:ue,shadowDomManager:Xe,processedNodeManager:xe,canvasManager:Ex,ignoreCSSAttributes:Y,plugins:((je=j?.filter(He=>He.observer))==null?void 0:je.map(He=>({observer:He.observer,options:He.options,callback:gr=>gn({type:Ct.Plugin,data:{plugin:He.name,payload:gr}})})))||[]},C)};ve.addLoadListener(ze=>{try{Ee.push(pt(ze.contentDocument))}catch(je){console.warn(je)}});const Ce=()=>{hv(),Ee.push(pt(document)),oy=!0};return["interactive","complete"].includes(document.readyState)?Ce():(Ee.push(Er("DOMContentLoaded",()=>{gn({type:Ct.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&Ce()})),Ee.push(Er("load",()=>{gn({type:Ct.Load,data:{}}),P==="load"&&Ce()},window))),()=>{Ee.forEach(ze=>{try{ze()}catch(je){String(je).toLowerCase().includes("cross-origin")||console.warn(je)}}),xe.destroy(),oy=!1,VSe()}}catch(Ee){console.warn(Ee)}}hp.addCustomEvent=(t,e)=>{if(!oy)throw new Error("please add custom event after start recording");gn({type:Ct.Custom,data:{tag:t,payload:e}})};hp.freezePage=()=>{Rl.forEach(t=>t.freeze())};hp.takeFullSnapshot=t=>{if(!oy)throw new Error("please take full snapshot after start recording");hv(t)};hp.mirror=Bs;var G4;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(G4||(G4={}));const SEe="rrweb",EEe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},CEe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},V4=CEe;class wEe extends Ns{constructor(e){super(SEe),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({},V4.recordOptions),e?.recordOptions),EEe);this.config=Object.assign(Object.assign(Object.assign({},V4),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=hp(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(MU,n),be.info("RRWebPlugin events sent to RUM",{eventType:MU,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var xEe=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},hA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(hA||(hA={}));const cB="us-west-2",pA=`https://dataplane.rum.${cB}.amazonaws.com`,dB=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),fB=t=>({allowCookies:!1,batchLimit:100,client:Kge,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:pA,endpointUrl:new URL(pA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:hA.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 _Ee=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=xEe(s,["cookieAttributes"]);this.eventBus=new nz,typeof r>"u"&&(r="us-west-2"),this.applicationId=e;const u=Object.assign(Object.assign({},dB()),o);this.config=Object.assign(Object.assign({fetchFunction:fetch},fB(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:pA.replace(cB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new ove({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;[Fv,zv,jc,`${Fv}_${this.applicationId}`,`${zv}_${this.applicationId}`,`${jc}_${this.applicationId}`].forEach(r=>Xme(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 Yge(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 Zme(r);return this.config.disableAutoPageView||s.addPlugin(new wve),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 K4;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(K4||(K4={}));const AEe=t=>Object.assign(Object.assign({},fB(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class TEe extends _Ee{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},AEe(dB())),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(xme),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new jme(c,o).ChainAnonymousCredentialsProvider:new Bme(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(oz,e)}registerDomEvents(e){this.pluginManager.updatePlugin(rz,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 mve(e)],[Ks.Performance]:e=>[new bve(e),new _ve(e),new Wve(e)],[Ks.Interaction]:e=>[new gR(e)],[Ks.Http]:e=>[new Zve(e),new Vve(e)],[Ks.Replay]:e=>[new wEe(e)]}}}const hB={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},REe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function pB(t){return t.replace(REe,"[redacted]")}function IEe(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 pB(t.slice(0,r))}function OEe(t){const e=pB(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(IEe(e))},recordError(e,n){t.recordError(OEe(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 Y4(t){return t instanceof Error?t:new Error(String(t))}function MEe(t){window.addEventListener("error",e=>{t.recordError(Y4(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(Y4(e.reason))})}function PEe(){const{appMonitorId:t,identityPoolId:e,region:n}=Ay().rum;if(!t)return hB;const r=new TEe(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 MEe(s),s}const gB=A.createContext(hB);function eTe(){return A.useContext(gB)}const gA="remit.theme",kEe="dark";function Z4(){return typeof localStorage>"u"?"system":localStorage.getItem(gA)??"system"}function mA(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(kEe,e)}function tTe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(gA):localStorage.setItem(gA,t)),mA(t)}const DEe=()=>{if(typeof window>"u"||(mA(Z4()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{mA(Z4())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},LEe=(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);Fl(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},X4={},vA=(t,e,n,r)=>{Fl(n)&&X4[n]||(Fl(n)&&(X4[n]=new Date),LEe(t,e,n,r))},mB=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},yA=(t,e,n)=>{t.loadNamespaces(e,mB(t,n))},Q4=(t,e,n,r)=>{if(Fl(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return yA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,mB(t,r))},UEe=(t,e,n={})=>!e.languages||!e.languages.length?(vA(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}}),Fl=t=>typeof t=="string",FEe=t=>typeof t=="object"&&t!==null,zEe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,jEe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},BEe=t=>jEe[t],HEe=t=>t.replace(zEe,BEe);let bA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:HEe};const $Ee=(t={})=>{bA={...bA,...t}},qEe=()=>bA;let vB;const WEe=t=>{vB=t},GEe=()=>vB,VEe={type:"3rdParty",init(t){$Ee(t.options.react),WEe(t)}},KEe=A.createContext();class YEe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const ZEe=(t,e)=>{const n=A.useRef();return A.useEffect(()=>{n.current=t},[t,e]),n.current},yB=(t,e,n,r)=>t.getFixedT(e,n,r),XEe=(t,e,n,r)=>A.useCallback(yB(t,e,n,r),[t,e,n,r]),QEe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=A.useContext(KEe)||{},o=n||r||GEe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new YEe),!o){vA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(O,I)=>Fl(I)?I:FEe(I)&&Fl(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&&vA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...qEe(),...o.options.react,...e},{useSuspense:u,keyPrefix:c}=a;let f=t||s||o.options?.defaultNS;f=Fl(f)?[f]:f||["translation"],o.reportNamespaces.addUsedNamespaces?.(f);const p=(o.isInitialized||o.initializedStoreOnce)&&f.every(R=>UEe(R,o,a)),g=XEe(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),m=()=>g,y=()=>yB(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=ZEe(C),_=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;_.current=!0,!p&&!u&&(e.lng?Q4(o,e.lng,f,()=>{_.current&&E(y)}):yA(o,f,()=>{_.current&&E(y)})),p&&w&&w!==C&&_.current&&E(y);const O=()=>{_.current&&E(y)};return R&&o?.on(R,O),M&&o?.store.on(M,O),()=>{_.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(()=>{_.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()):yA(o,f,()=>R())})},JEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),eCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),tCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),nCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),rCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),sCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),oCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),iCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),aCe=t=>(t.client??Ze).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),lCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),uCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),cCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),dCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),fCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),hCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),pCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),gCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),mCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),vCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),nTe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),yCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),bCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),SCe=t=>(t?.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),ECe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),CCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),wCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),xCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),_Ce=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),ACe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),TCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),RCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),ICe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),OCe=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}),MCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),PCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),kCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),DCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),LCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),rTe=t=>({mutationFn:async n=>{const{data:r}=await JEe({...t,...n,throwOnError:!0});return r}}),hr=(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]},sTe=t=>({mutationFn:async n=>{const{data:r}=await eCe({...t,...n,throwOnError:!0});return r}}),oTe=t=>({mutationFn:async n=>{const{data:r}=await tCe({...t,...n,throwOnError:!0});return r}}),iTe=t=>({mutationFn:async n=>{const{data:r}=await nCe({...t,...n,throwOnError:!0});return r}}),aTe=t=>({mutationFn:async n=>{const{data:r}=await rCe({...t,...n,throwOnError:!0});return r}}),UCe=t=>hr("filterOperationsListFilters",t),lTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await sCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:UCe(t)}),uTe=t=>({mutationFn:async n=>{const{data:r}=await oCe({...t,...n,throwOnError:!0});return r}}),cTe=t=>({mutationFn:async n=>{const{data:r}=await iCe({...t,...n,throwOnError:!0});return r}}),dTe=t=>({mutationFn:async n=>{const{data:r}=await aCe({...t,...n,throwOnError:!0});return r}}),FCe=t=>hr("mailboxOperationsListMailboxes",t),fTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await lCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:FCe(t)}),hTe=t=>({mutationFn:async n=>{const{data:r}=await uCe({...t,...n,throwOnError:!0});return r}}),pTe=t=>({mutationFn:async n=>{const{data:r}=await cCe({...t,...n,throwOnError:!0});return r}}),gTe=t=>({mutationFn:async n=>{const{data:r}=await dCe({...t,...n,throwOnError:!0});return r}}),zCe=t=>hr("organizeJobDetailOperationsGetOrganizeJob",t),mTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await fCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:zCe(t)}),vTe=t=>({mutationFn:async n=>{const{data:r}=await hCe({...t,...n,throwOnError:!0});return r}}),jCe=t=>hr("syncOperationsGetSyncStatus",t),yTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await pCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:jCe(t)}),BCe=t=>hr("addressOperationsSearchAddresses",t),bTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await gCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:BCe(t)}),STe=t=>({mutationFn:async n=>{const{data:r}=await mCe({...t,...n,throwOnError:!0});return r}}),HCe=t=>hr("configOperationsGetConfig",t),$Ce=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await vCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:HCe(t)}),ETe=t=>hr("threadOperationsListThreads",t),qCe=t=>hr("threadOperationsSearchThreads",t),CTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await yCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:qCe(t)}),wTe=t=>({mutationFn:async n=>{const{data:r}=await bCe({...t,...n,throwOnError:!0});return r}}),xTe=t=>({mutationFn:async n=>{const{data:r}=await SCe({...t,...n,throwOnError:!0});return r}}),WCe=t=>hr("meOperationsListVipSuggestions",t),_Te=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await ECe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:WCe(t)}),ATe=t=>({mutationFn:async n=>{const{data:r}=await CCe({...t,...n,throwOnError:!0});return r}}),TTe=t=>({mutationFn:async n=>{const{data:r}=await wCe({...t,...n,throwOnError:!0});return r}}),RTe=t=>({mutationFn:async n=>{const{data:r}=await xCe({...t,...n,throwOnError:!0});return r}}),GCe=t=>hr("messageOperationsDescribeMessage",t),ITe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await _Ce({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:GCe(t)}),OTe=t=>({mutationFn:async n=>{const{data:r}=await ACe({...t,...n,throwOnError:!0});return r}}),VCe=t=>hr("messageOperationsGetRawMessage",t),NTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await TCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:VCe(t)}),bB=t=>hr("outboxOperationsListOutboxMessages",t),MTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await RCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:bB(t)}),PTe=t=>({mutationFn:async n=>{const{data:r}=await ICe({...t,...n,throwOnError:!0});return r}}),kTe=t=>({mutationFn:async n=>{const{data:r}=await OCe({...t,...n,throwOnError:!0});return r}}),KCe=t=>hr("outboxDetailOperationsGetOutboxMessage",t),YCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await NCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:KCe(t)}),DTe=t=>({mutationFn:async n=>{const{data:r}=await MCe({...t,...n,throwOnError:!0});return r}}),LTe=t=>({mutationFn:async n=>{const{data:r}=await PCe({...t,...n,throwOnError:!0});return r}}),ZCe=t=>hr("semanticSearchOperationsSemanticSearch",t),UTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await kCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:ZCe(t)}),XCe=t=>hr("unifiedThreadOperationsListAllThreads",t),QCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await DCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:XCe(t)}),JCe=t=>hr("threadDetailOperationsListThreadMessages",t),FTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await LCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:JCe(t)}),SB=A.createContext(void 0),J4={isOpen:!1,mode:"new"},ewe=2e3,twe=6e4,nwe=({children:t})=>{const[e,n]=A.useState(J4),[r,s]=A.useState(),o=A.useRef(0),a=XF(),{data:u}=qfe({...YCe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>twe?!1:ewe}});A.useEffect(()=>{if(!u||!r)return;(u.status==="sent"||u.status==="failed"||u.status==="blocked")&&(s(void 0),a.invalidateQueries({queryKey:bB()}))},[u,r,a]);const c=A.useCallback(y=>{n({...y,isOpen:!0})},[]),f=A.useCallback(()=>{n(J4)},[]),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(SB.Provider,{value:m,children:t})},zTe=()=>{const t=A.useContext(SB);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},Cx=(...t)=>g8(s8(t)),rwe={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"}},swe={error:cX,warning:SX,info:pX},owe={error:"Error",warning:"Warning",info:"Information"},iwe=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=rwe[e],a=swe[e];return D.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:Cx("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:Cx("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:Cx("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 ${owe[e].toLowerCase()}`,children:D.jsx(mh,{className:"size-4","aria-hidden":"true"})})]})},awe=({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(iwe,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),e5=5,jTe=(t,e,n)=>({title:t,detail:EB(n)??e,error:n}),EB=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}},BTe=t=>{const e=EB(t);return e?e.startsWith("Message not found"):!1},lwe=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,uwe=(t,e)=>{const r=[...t.filter(s=>!lwe(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=e5?r:r.slice(r.length-e5)},cwe=(t,e)=>t.filter(n=>n.id!==e),dwe=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),CB=A.createContext(void 0),fwe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,hwe=({children:t})=>{const[e,n]=A.useState([]),r=A.useCallback(u=>{if(u.error!=null&&Z8(u.error))return Bl(u.error).correlationId;const c=dwe(u,fwe(),Date.now());return n(f=>uwe(f,c)),c.id},[]),s=A.useCallback(u=>{n(c=>cwe(c,u))},[]),o=A.useCallback(()=>{n([])},[]),a=A.useMemo(()=>({errors:e,pushError:r,dismissError:s,clearAll:o}),[e,r,s,o]);return D.jsxs(CB.Provider,{value:a,children:[t,D.jsx(awe,{errors:e,onDismiss:s})]})},HTe=()=>{const t=A.useContext(CB);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},pwe=({error:t,reset:e,info:n})=>{const r=Py(t),s=Bl(t,{recoverable:r,componentStack:n?.componentStack});return D.jsx(r9,{fatal:s,onRetry:r?e:void 0})},pp=ype()({component:mwe,errorComponent:pwe}),gwe=()=>{const{t}=QEe("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 mwe(){return D.jsxs(hwe,{children:[D.jsxs(nwe,{children:[D.jsx(gwe,{}),D.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:D.jsx(A.Suspense,{fallback:D.jsx(JA,{}),children:D.jsx(I7,{})})})]}),D.jsx(n9,{})]})}const vwe=fr("/")({beforeLoad:()=>{throw u7({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 t5;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(t5||(t5={}));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 xi 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 xi))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()}}xi.create=t=>new xi(t);const SA=(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 ywe=SA;function bwe(){return ywe}const Swe=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 _e(t,e){const n=bwe(),r=Swe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===SA?void 0:SA].filter(s=>!!s)});t.common.issues.push(r)}class us{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 us.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"}),Jf=t=>({status:"dirty",value:t}),Ms=t=>({status:"valid",value:t}),n5=t=>t.status==="aborted",r5=t=>t.status==="dirty",Kc=t=>t.status==="valid",iy=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 Ba{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 s5=(t,e)=>{if(Kc(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 xi(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 us,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(iy(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 s5(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 Kc(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=>Kc(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(iy(s)?s:Promise.resolve(s));return s5(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 Xc({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 Qc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xo.create(this)}promise(){return cy.create(this,this._def)}or(e){return ly.create([this,e],this._def)}and(e){return uy.create(this,e,this._def)}transform(e){return new Xc({...st(this._def),schema:this,typeName:Ye.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new CA({...st(this._def),innerType:this,defaultValue:n,typeName:Ye.ZodDefault})}brand(){return new $we({typeName:Ye.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new wA({...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 YR.create(this,e)}readonly(){return xA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ewe=/^c[^\s-]{8,}$/i,Cwe=/^[0-9a-z]+$/,wwe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,xwe=/^[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,_we=/^[a-z0-9_-]{21}$/i,Awe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Twe=/^[-+]?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)?)??$/,Rwe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Iwe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let wx;const Owe=/^(?:(?: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])$/,Mwe=/^(([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]))$/,Pwe=/^(([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])$/,kwe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Dwe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wB="((\\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])))",Lwe=new RegExp(`^${wB}$`);function xB(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 Uwe(t){return new RegExp(`^${xB(t)}$`)}function Fwe(t){let e=`${wB}T${xB(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 zwe(t,e){return!!((e==="v4"||!e)&&Owe.test(t)||(e==="v6"||!e)&&Mwe.test(t))}function jwe(t,e){if(!Awe.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 Bwe(t,e){return!!((e==="v4"||!e)&&Nwe.test(t)||(e==="v6"||!e)&&Pwe.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 _e(o,{code:ge.invalid_type,expected:Oe.string,received:o.parsedType}),Ke}const r=new us;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),_e(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),_e(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?_e(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&_e(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Rwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"email",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")wx||(wx=new RegExp(Iwe,"u")),wx.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"emoji",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")xwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"uuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")_we.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"nanoid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")Ewe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Cwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cuid2",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")wwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(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),_e(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),_e(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),_e(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),_e(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),_e(s,{code:ge.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Fwe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?Lwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Uwe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?Twe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?zwe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"ip",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?jwe(e.data,o.alg)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"jwt",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Bwe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cidr",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?kwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?Dwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(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 Yl 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 _e(o,{code:ge.invalid_type,expected:Oe.number,received:o.parsedType}),Ke}let r;const s=new us;for(const o of this._def.checks)o.kind==="int"?Tt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),_e(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),_e(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),_e(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),_e(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),_e(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 Yl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Yl({...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)}}Yl.create=t=>new Yl({checks:[],typeName:Ye.ZodNumber,coerce:t?.coerce||!1,...st(t)});class Zl 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 us;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),_e(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),_e(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),_e(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 _e(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 Zl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Zl({...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}}Zl.create=t=>new Zl({checks:[],typeName:Ye.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class ay extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Oe.boolean){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.boolean,received:r.parsedType}),Ke}return Ms(e.data)}}ay.create=t=>new ay({typeName:Ye.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class Yc 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 _e(o,{code:ge.invalid_type,expected:Oe.date,received:o.parsedType}),Ke}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return _e(o,{code:ge.invalid_date}),Ke}const r=new us;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),_e(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),_e(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 Yc({...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}}Yc.create=t=>new Yc({checks:[],coerce:t?.coerce||!1,typeName:Ye.ZodDate,...st(t)});class o5 extends wt{_parse(e){if(this._getType(e)!==Oe.symbol){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.symbol,received:r.parsedType}),Ke}return Ms(e.data)}}o5.create=t=>new o5({typeName:Ye.ZodSymbol,...st(t)});class i5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.undefined,received:r.parsedType}),Ke}return Ms(e.data)}}i5.create=t=>new i5({typeName:Ye.ZodUndefined,...st(t)});class a5 extends wt{_parse(e){if(this._getType(e)!==Oe.null){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.null,received:r.parsedType}),Ke}return Ms(e.data)}}a5.create=t=>new a5({typeName:Ye.ZodNull,...st(t)});class l5 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}l5.create=t=>new l5({typeName:Ye.ZodAny,...st(t)});class u5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}u5.create=t=>new u5({typeName:Ye.ZodUnknown,...st(t)});class Ha extends wt{_parse(e){const n=this._getOrReturnCtx(e);return _e(n,{code:ge.invalid_type,expected:Oe.never,received:n.parsedType}),Ke}}Ha.create=t=>new Ha({typeName:Ye.ZodNever,...st(t)});class c5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.void,received:r.parsedType}),Ke}return Ms(e.data)}}c5.create=t=>new c5({typeName:Ye.ZodVoid,...st(t)});class xo extends wt{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==Oe.array)return _e(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)&&(_e(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&&(_e(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&&(_e(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 Ba(n,a,n.path,u)))).then(a=>us.mergeArray(r,a));const o=[...n.data].map((a,u)=>s.type._parseSync(new Ba(n,a,n.path,u)));return us.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new xo({...this._def,minLength:{value:e,message:Me.toString(n)}})}max(e,n){return new xo({...this._def,maxLength:{value:e,message:Me.toString(n)}})}length(e,n){return new xo({...this._def,exactLength:{value:e,message:Me.toString(n)}})}nonempty(e){return this.min(1,e)}}xo.create=(t,e)=>new xo({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ye.ZodArray,...st(e)});function yc(t){if(t instanceof _n){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Ma.create(yc(r))}return new _n({...t._def,shape:()=>e})}else return t instanceof xo?new xo({...t._def,type:yc(t.element)}):t instanceof Ma?Ma.create(yc(t.unwrap())):t instanceof Qc?Qc.create(yc(t.unwrap())):t instanceof Xl?Xl.create(t.items.map(e=>yc(e))):t}class _n 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 _e(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 Ba(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&&(_e(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 Ba(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=>us.mergeObjectSync(r,f)):us.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return Me.errToObj,new _n({...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 _n({...this._def,unknownKeys:"strip"})}passthrough(){return new _n({...this._def,unknownKeys:"passthrough"})}extend(e){return new _n({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new _n({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 _n({...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 _n({...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 _n({...this._def,shape:()=>n})}deepPartial(){return yc(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 _n({...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 _n({...this._def,shape:()=>n})}keyof(){return _B(Tt.objectKeys(this.shape))}}_n.create=(t,e)=>new _n({shape:()=>t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});_n.strictCreate=(t,e)=>new _n({shape:()=>t,unknownKeys:"strict",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});_n.lazycreate=(t,e)=>new _n({shape:t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});class ly 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 xi(u.ctx.common.issues));return _e(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 xi(c));return _e(n,{code:ge.invalid_union,unionErrors:u}),Ke}}get options(){return this._def.options}}ly.create=(t,e)=>new ly({options:t,typeName:Ye.ZodUnion,...st(e)});function EA(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=EA(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=EA(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 uy extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(n5(o)||n5(a))return Ke;const u=EA(o.value,a.value);return u.valid?((r5(o)||r5(a))&&n.dirty(),{status:n.value,value:u.data}):(_e(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}))}}uy.create=(t,e,n)=>new uy({left:t,right:e,typeName:Ye.ZodIntersection,...st(n)});class Xl extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.array)return _e(r,{code:ge.invalid_type,expected:Oe.array,received:r.parsedType}),Ke;if(r.data.length<this._def.items.length)return _e(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&&(_e(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 Ba(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>us.mergeArray(n,a)):us.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new Xl({...this._def,rest:e})}}Xl.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Xl({items:t,typeName:Ye.ZodTuple,rest:null,...st(e)})};class d5 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 _e(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 Ba(r,u,r.path,[f,"key"])),value:o._parse(new Ba(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}}}}d5.create=(t,e,n)=>new d5({valueType:e,keyType:t,typeName:Ye.ZodMap,...st(n)});class qh extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.set)return _e(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&&(_e(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&&(_e(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 Ba(r,c,r.path,f)));return r.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(e,n){return new qh({...this._def,minSize:{value:e,message:Me.toString(n)}})}max(e,n){return new qh({...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)}}qh.create=(t,e)=>new qh({valueType:t,minSize:null,maxSize:null,typeName:Ye.ZodSet,...st(e)});class f5 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})}}f5.create=(t,e)=>new f5({getter:t,typeName:Ye.ZodLazy,...st(e)});class h5 extends wt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return _e(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}}h5.create=(t,e)=>new h5({value:t,typeName:Ye.ZodLiteral,...st(e)});function _B(t,e){return new Zc({values:t,typeName:Ye.ZodEnum,...st(e)})}class Zc extends wt{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return _e(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 _e(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 Zc.create(e,{...this._def,...n})}exclude(e,n=this._def){return Zc.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Zc.create=_B;class p5 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 _e(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 _e(r,{received:r.data,code:ge.invalid_enum_value,options:s}),Ke}return Ms(e.data)}get enum(){return this._def.values}}p5.create=(t,e)=>new p5({values:t,typeName:Ye.ZodNativeEnum,...st(e)});class cy 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 _e(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})))}}cy.create=(t,e)=>new cy({type:t,typeName:Ye.ZodPromise,...st(e)});class Xc 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=>{_e(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"?Jf(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"?Jf(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(!Kc(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=>Kc(a)?Promise.resolve(s.transform(a.value,o)).then(u=>({status:n.value,value:u})):Ke);Tt.assertNever(s)}}Xc.create=(t,e,n)=>new Xc({schema:t,typeName:Ye.ZodEffects,effect:e,...st(n)});Xc.createWithPreprocess=(t,e,n)=>new Xc({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 Qc extends wt{_parse(e){return this._getType(e)===Oe.null?Ms(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Qc.create=(t,e)=>new Qc({innerType:t,typeName:Ye.ZodNullable,...st(e)});class CA 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}}CA.create=(t,e)=>new CA({innerType:t,typeName:Ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class wA 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 iy(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new xi(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new xi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}wA.create=(t,e)=>new wA({innerType:t,typeName:Ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class g5 extends wt{_parse(e){if(this._getType(e)!==Oe.nan){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.nan,received:r.parsedType}),Ke}return{status:"valid",value:e.data}}}g5.create=t=>new g5({typeName:Ye.ZodNaN,...st(t)});class $we 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 YR 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(),Jf(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 YR({in:e,out:n,typeName:Ye.ZodPipeline})}}class xA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Kc(s)&&(s.value=Object.freeze(s.value)),s);return iy(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}xA.create=(t,e)=>new xA({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 wr=hi.create;Yl.create;Zl.create;const qwe=ay.create;Yc.create;Ha.create;xo.create;const pd=_n.create;ly.create;uy.create;Xl.create;Zc.create;cy.create;Ma.create;Qc.create;const $Te={string:(t=>hi.create({...t,coerce:!0})),number:(t=>Yl.create({...t,coerce:!0})),boolean:(t=>ay.create({...t,coerce:!0})),bigint:(t=>Zl.create({...t,coerce:!0})),date:(t=>Yc.create({...t,coerce:!0}))},Wwe=Ay().apiUrl;Ze.setConfig({baseUrl:Wwe,fetch:e8});Ze.interceptors.error.use((t,e)=>{if(t instanceof Kx||!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 Kx(r,e.status,n)});const xx={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},qTe={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},m5=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function Gwe(t){const e=new Map,n=[...t].sort((r,s)=>m5.indexOf(xx[r.role])-m5.indexOf(xx[s.role]));for(const r of n){if(!r.mailboxId||e.has(r.mailboxId))continue;const s=xx[r.role];s&&e.set(r.mailboxId,s)}return e}const Vwe=t=>{const e=t.split("/");return e[e.length-1]||t};function WTe(t,e,n){const r=t.displayNameOverride?.trim();if(r)return r;const s=Vwe(t.fullPath);return!e||!n?s:n(`sidebar.${e}`,s)}const Kwe=new Set(["sent","drafts","trash"]),GTe=t=>t===void 0||!Kwe.has(t),Ywe=new Map;function VTe(t){const e=new Map;for(const n of t){const r=Gwe(n.folderAppointments);for(const[s,o]of r)e.set(s,{role:o});for(const s of n.mailboxes){const o=r.get(s.mailboxId);e.set(s.mailboxId,{...o?{role:o}:{},providerPath:s.fullPath})}}return e}function KTe(t,e){const n=e[0];if(!t)return n?{mailboxId:n}:{};for(const s of e){const o=t.get(s);if(o&&LJ(o)!==void 0)return{mailboxId:s,folder:o}}if(!n)return{};const r=t.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const Zwe=A.createContext(null),YTe=()=>A.useContext(Zwe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:Ywe,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},Xwe=()=>Wn(()=>import("./mail-BpAW5li-.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),Qwe=pd({q:wr().optional()}),Jwe=fr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery($Ce()),t.prefetchQuery({...QCe(),staleTime:6e4})},component:or(Xwe,"component"),validateSearch:Qwe}),exe=()=>Wn(()=>import("./onboarding-BXpr5Krz.js"),__vite__mapDeps([12,13,3,9,5,4])),txe=fr("/onboarding")({component:or(exe,"component")}),nxe=()=>Wn(()=>import("./settings-CwOQfpqn.js"),[]),ZTe=[{id:"accounts",label:"Accounts",icon:D.jsx(l8,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:D.jsx(EX,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:D.jsx(hX,{className:"size-4"})},{id:"filters",label:"Filters",icon:D.jsx(fX,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:D.jsx(mX,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:D.jsx(CX,{className:"size-4"})}],XTe={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},rxe=fr("/settings")({component:or(nxe,"component")}),sxe=()=>Wn(()=>import("./index-BrDcIM7w.js"),__vite__mapDeps([14,7])),oxe=()=>Wn(()=>import("./index-DtqBFgK5.js"),[]),ixe=pd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),selectedMailboxId:wr().optional(),q:wr().optional()}),axe=fr("/mail/")({component:or(oxe,"component"),validateSearch:ixe,errorComponent:or(sxe,"errorComponent")}),lxe=()=>Wn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),uxe=pd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),q:wr().optional()}),cxe=fr("/mail/$mailboxId")({component:or(lxe,"component"),validateSearch:uxe}),dxe=()=>Wn(()=>import("./flagged-Dxz6AwxG.js"),__vite__mapDeps([15,7])),fxe=()=>Wn(()=>import("./flagged-DtqBFgK5.js"),[]),hxe=pd({selectedMessageId:wr().optional(),q:wr().optional()}),pxe=fr("/mail/flagged")({component:or(fxe,"component"),validateSearch:hxe,errorComponent:or(dxe,"errorComponent")}),gxe=()=>Wn(()=>import("./outbox-DtqBFgK5.js"),[]),mxe=pd({selectedOutboxMessageId:wr().optional(),q:wr().optional()}),vxe=fr("/mail/outbox")({component:or(gxe,"component"),validateSearch:mxe}),yxe=()=>Wn(()=>import("./index-DmoNyvcD.js"),[]),bxe=fr("/settings/")({component:or(yxe,"component")}),Sxe=()=>Wn(()=>import("./accounts-CRLsyGdC.js"),__vite__mapDeps([16,6,4,5,17,2,13,3,9,7,8])),Exe=pd({editAccountId:wr().optional(),focusSmtp:qwe().optional(),connected:wr().optional(),oauthError:wr().optional()}),Cxe=fr("/settings/accounts")({component:or(Sxe,"component"),validateSearch:Exe}),wxe=()=>Wn(()=>import("./advanced-Cj7oBz2q.js"),__vite__mapDeps([18,17,2])),xxe=fr("/settings/advanced")({component:or(wxe,"component")}),_xe=()=>Wn(()=>import("./appearance-Ccykc5lF.js"),__vite__mapDeps([19,17,2])),Axe=fr("/settings/appearance")({component:or(_xe,"component")}),Txe=()=>Wn(()=>import("./filters-BYsopZUu.js"),__vite__mapDeps([20,17,2,10,5,7])),Rxe=fr("/settings/filters")({component:or(Txe,"component")}),Ixe=()=>Wn(()=>import("./folders-Cn-bzo8V.js"),__vite__mapDeps([21,9,11,17,2,5,7])),Oxe=fr("/settings/folders")({component:or(Ixe,"component")}),Nxe=()=>Wn(()=>import("./senders-K5nFMPWP.js"),__vite__mapDeps([22,3,17,2,5,7,1,8])),Mxe=fr("/settings/senders")({component:or(Nxe,"component")}),Pxe=()=>Wn(()=>import("./suggested-vips-340kg8Gs.js"),[]),kxe=fr("/settings/suggested-vips")({component:or(Pxe,"component")}),Dxe=vwe.update({id:"/",path:"/",getParentRoute:()=>pp}),gp=Jwe.update({id:"/mail",path:"/mail",getParentRoute:()=>pp}),Lxe=txe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>pp}),Ni=rxe.update({id:"/settings",path:"/settings",getParentRoute:()=>pp}),Uxe=axe.update({id:"/",path:"/",getParentRoute:()=>gp}),Fxe=cxe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>gp}),zxe=pxe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>gp}),jxe=vxe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>gp}),Bxe=bxe.update({id:"/",path:"/",getParentRoute:()=>Ni}),Hxe=Cxe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Ni}),$xe=xxe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Ni}),qxe=Axe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Ni}),Wxe=Rxe.update({id:"/filters",path:"/filters",getParentRoute:()=>Ni}),Gxe=Oxe.update({id:"/folders",path:"/folders",getParentRoute:()=>Ni}),Vxe=Mxe.update({id:"/senders",path:"/senders",getParentRoute:()=>Ni}),Kxe=kxe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Ni}),Yxe={MailMailboxIdRoute:Fxe,MailFlaggedRoute:zxe,MailOutboxRoute:jxe,MailIndexRoute:Uxe},Zxe=gp._addFileChildren(Yxe),Xxe={SettingsAccountsRoute:Hxe,SettingsAdvancedRoute:$xe,SettingsAppearanceRoute:qxe,SettingsFiltersRoute:Wxe,SettingsFoldersRoute:Gxe,SettingsSendersRoute:Vxe,SettingsSuggestedVipsRoute:Kxe,SettingsIndexRoute:Bxe},Qxe=Ni._addFileChildren(Xxe),Jxe={IndexRoute:Dxe,MailRoute:Zxe,OnboardingRoute:Lxe,SettingsRoute:Qxe},e_e=pp._addFileChildren(Jxe)._addFileTypes(),t_e=(t,e)=>{const n=kpe({routeTree:e_e,context:{queryClient:t},defaultPreload:"intent"});return n.subscribe("onResolved",r=>{e.recordPageView(r.toLocation.pathname)}),n},qe=t=>typeof t=="string",zf=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},v5=t=>t==null?"":""+t,n_e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},r_e=/###/g,y5=t=>t&&t.indexOf("###")>-1?t.replace(r_e,"."):t,b5=t=>!t||qe(t),hh=(t,e,n)=>{const r=qe(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(b5(t))return{};const o=y5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return b5(t)?{}:{obj:t,k:y5(r[s])}},S5=(t,e,n)=>{const{obj:r,k:s}=hh(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=hh(t,a,Object);for(;u.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),u=hh(t,a,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},s_e=(t,e,n,r)=>{const{obj:s,k:o}=hh(t,e,Object);s[o]=s[o]||[],s[o].push(n)},dy=(t,e)=>{const{obj:n,k:r}=hh(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},o_e=(t,e,n)=>{const r=dy(t,n);return r!==void 0?r:dy(e,n)},AB=(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]):AB(t[r],e[r],n):t[r]=e[r]);return t},ac=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var i_e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const a_e=t=>qe(t)?t.replace(/[&<>"'\/]/g,e=>i_e[e]):t;class l_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 u_e=[" ",",","?","!",";"],c_e=new l_e(20),d_e=(t,e,n)=>{e=e||"",n=n||"";const r=u_e.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=c_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},_A=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},fy=t=>t?.replace("_","-"),f_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 hy{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||f_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 hy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new hy(this.logger,e)}}var wo=new hy;class Ob{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 E5 extends Ob{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=dy(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:_A(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),S5(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=dy(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?AB(c,r,o):c={...c,...r},S5(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 TB={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 C5={},w5=t=>!qe(t)&&typeof t!="boolean"&&typeof t!="number";class py extends Ob{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),n_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&&!d_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,_=n.count!==void 0&&!qe(n.count),T=py.hasDefaultValue(n),R=_?this.pluralResolver.getSuffix(f,n.count,n):"",M=n.ordinal&&_?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",O=_&&!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=w5(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),j=F?[]:{},W=F?S:y;for(const Y in P)if(Object.prototype.hasOwnProperty.call(P,Y)){const ne=`${W}${o}${Y}`;T&&!m?j[Y]=this.translate(ne,{...n,defaultValue:w5(I)?I[Y]:void 0,joinArrays:!1,ns:u}):j[Y]=this.translate(ne,{...n,joinArrays:!1,ns:u}),j[Y]===ne&&(j[Y]=P[Y])}m=j}}else if(w&&qe(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,e,n,r));else{let F=!1,j=!1;!this.isValidLookup(m)&&T&&(F=!0,m=I),this.isValidLookup(m)||(j=!0,m=a);const Y=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:m,ne=T&&I!==m&&this.options.updateMissing;if(j||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&&_?$.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),j&&m===a&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${a}`),(j||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=TB.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,!C5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(C5[`${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 _=[p];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(_,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&&(_.push(p+R),n.ordinal&&R.indexOf(O)===0&&_.push(p+R.replace(O,this.options.pluralSeparator)),y&&_.push(p+M)),S){const I=`${p}${this.options.contextSeparator}${n.context}`;_.push(I),m&&(_.push(I+R),n.ordinal&&R.indexOf(O)===0&&_.push(I+R.replace(O,this.options.pluralSeparator)),y&&_.push(I+M))}}let T;for(;T=_.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 x5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(e){if(e=fy(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=fy(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 _5={zero:0,one:1,two:2,few:3,many:4,other:5},A5={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class h_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=fy(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!"),A5;if(!e.match(/-|_/))return A5;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)=>_5[s]-_5[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 T5=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=o_e(t,e,n);return!o&&s&&qe(n)&&(o=_A(t,n,r),o===void 0&&(o=_A(e,n,r))),o},_x=t=>t.replace(/\$/g,"$$$$");class p_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:_}=e.interpolation;this.escape=n!==void 0?n:a_e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?ac(o):a||"{{",this.suffix=u?ac(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=p?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=m?ac(m):y||ac("$t("),this.nestingSuffix=S?ac(S):E||ac(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=w||1e3,this.alwaysFormat=_!==void 0?_:!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=T5(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(T5(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=>_x(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?_x(this.escape(y)):_x(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=v5(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=v5(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 g_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}},lc=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(fy(r),s),e[a]=u),u(n)}};class m_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("formatter"),this.options=e,this.formats={number:lc((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:lc((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:lc((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:lc((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:lc((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()]=lc(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}=g_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 v_e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class y_e extends Ob{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=>{s_e(c.loaded,[o],a),v_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 R5=()=>({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}}),I5=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),Um=()=>{},b_e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Wh extends Ob{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=I5(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=R5();this.options={...s,...this.options,...I5(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=m_e;const g=new x5(this.options);this.store=new E5(this.options.resources,this.options);const m=this.services;m.logger=wo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new h_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 p_e(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new y_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 py(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=Um),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=zf(),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]:Um;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=zf();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=Um),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"&&TB.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=zf();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=zf();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=zf();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 x5(R5());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 Wh(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Um;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new Wh(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 E5(u,s),o.services.resourceStore=o.store}return o.translator=new py(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 pr=Wh.createInstance();pr.createInstance=Wh.createInstance;pr.createInstance;pr.dir;pr.init;pr.loadResources;pr.reloadResources;pr.use;pr.changeLanguage;pr.getFixedT;pr.t;pr.exists;pr.setDefaultNamespace;pr.hasLoadedNamespace;pr.loadNamespaces;pr.loadLanguages;const{slice:S_e,forEach:E_e}=[];function C_e(t){return E_e.call(S_e.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function w_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 O5=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,x_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(!O5.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!O5.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},N5={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=x_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 __e={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return N5.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&N5.create(n,t,r,s,o)}},A_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}},T_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 uc=null;const M5=()=>{if(uc!==null)return uc;try{if(uc=typeof window<"u"&&window.localStorage!==null,!uc)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{uc=!1}return uc};var R_e={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&M5())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&M5()&&window.localStorage.setItem(n,t)}};let cc=null;const P5=()=>{if(cc!==null)return cc;try{if(cc=typeof window<"u"&&window.sessionStorage!==null,!cc)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{cc=!1}return cc};var I_e={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&P5())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&P5()&&window.sessionStorage.setItem(n,t)}},O_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}},N_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}},M_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}},P_e={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 RB=!1;try{document.cookie,RB=!0}catch{}const IB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];RB||IB.splice(1,1);const k_e=()=>({order:IB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class OB{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=C_e(n,this.options||{},k_e()),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(__e),this.addDetector(A_e),this.addDetector(R_e),this.addDetector(I_e),this.addDetector(O_e),this.addDetector(N_e),this.addDetector(M_e),this.addDetector(P_e),this.addDetector(T_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&&!w_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)}))}}OB.type="languageDetector";function D_e(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=L_e(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 L_e(t,e){if(t){if(typeof t=="string")return k5(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)?k5(t,e):void 0}}function k5(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 AA(t){"@babel/helpers - typeof";return AA=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},AA(t)}var NB=["__proto__","constructor","prototype"];function MB(t){return!(typeof t!="string"||t.length===0||t.length>128||NB.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function PB(t){return!(!MB(t)||t.indexOf("/")>-1)}function U_e(t){return MB(t)}var F_e={lng:PB,ns:U_e};function Fm(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function z_e(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 kB(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":AA(XMLHttpRequest))==="object"}function j_e(t){return!!t&&typeof t.then=="function"}function B_e(t){return j_e(t)?t:Promise.resolve(t)}var H_e=/\{\{(.+?)\}\}/g;function D5(t,e){var n=!1,r=t.replace(H_e,function(s,o){var a=o.trim();if(NB.indexOf(a)>-1)return s;var u=e[a];if(u==null)return s;var c=F_e[a]||PB,f=String(u).split("+"),p=D_e(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 L5(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 U5(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?L5(Object(n),!0).forEach(function(r){$_e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $_e(t,e,n){return(e=q_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q_e(t){var e=W_e(t,"string");return Ql(e)=="symbol"?e:e+""}function W_e(t,e){if(Ql(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ql(t){"@babel/helpers - typeof";return Ql=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},Ql(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 Gh;kB()&&(typeof global<"u"&&global.XMLHttpRequest?Gh=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Gh=window.XMLHttpRequest));var gy;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?gy=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(gy=window.ActiveXObject));typeof $a!="function"&&($a=void 0);if(!$a&&!Gh&&!gy)try{Wn(()=>import("./browser-ponyfill-DL3vLOqC.js").then(t=>t.b),[]).then(function(t){$a=t.default}).catch(function(){})}catch{}var DB=["__proto__","constructor","prototype"],TA=function(e,n){if(n&&Ql(n)==="object"){for(var r="",s=0,o=Object.keys(n);s<o.length;s++){var a=o[s];DB.indexOf(a)>-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},F5=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)},G_e=function(e,n,r,s){e.queryStringParams&&(n=TA(n,e.queryStringParams));var o=U5({},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=U5({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{F5(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]}),F5(n,u,s,c),e._omitFetchOptions=!0}catch(p){s(p)}}},V_e=function(e,n,r,s){r&&Ql(r)==="object"&&(r=TA("",r).slice(1)),e.queryStringParams&&(n=TA(n,e.queryStringParams));try{var o=Gh?new Gh:new gy("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];DB.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)}},K_e=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},$a&&n.indexOf("file:")!==0)return G_e(e,n,r,s);if(kB()||typeof ActiveXObject=="function")return V_e(e,n,r,s);s(new Error("No fetch and no xhr implementation found!"))};function Jc(t){"@babel/helpers - typeof";return Jc=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},Jc(t)}function z5(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 Ax(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?z5(Object(n),!0).forEach(function(r){LB(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Y_e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z_e(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,UB(r.key),r)}}function X_e(t,e,n){return e&&Z_e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function LB(t,e,n){return(e=UB(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function UB(t){var e=Q_e(t,"string");return Jc(e)=="symbol"?e:e+""}function Q_e(t,e){if(Jc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Jc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var J_e=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 LB({},r,s||"")},parseLoadPayload:function(n,r){},request:K_e,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},FB=(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]:{};Y_e(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return X_e(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=Ax(Ax(Ax({},J_e()),this.options||{}),s),this.allOptions=o,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Jc(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=B_e(c),c.then(function(f){if(!f)return a(null,{});var p=D5(f,{lng:n.join("+"),ns:s.join("+")});if(p==null){var g=n.map(Fm).join(", "),m=s.map(Fm).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=Fm(z_e(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+": "+Fm(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=D5(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)})})})}}}])})();FB.type="backend";pr.use(FB).use(OB).use(VEe).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 eAe=({authProvider:t,rootElementId:e="root"})=>{cee(),DEe(),t.configure(),ige(t);const n=PEe();eee(n);const r=new Nfe({queryCache:new YF({onError:cge}),mutationCache:new KF({onError:dge}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=t_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(gB.Provider,{value:n,children:D.jsxs(Mfe,{client:r,children:[D.jsx(uge,{value:t,children:D.jsx(a,{children:D.jsx(Upe,{router:s})})}),!1]})})}))};eAe({authProvider:lfe});export{Hfe as $,uX as A,Km as B,JM as C,iQ as D,gAe as E,dX as F,ip as G,tr as H,pX as I,f_ as J,jF as K,XF as L,gX as M,Pfe as N,u8 as O,dAe as P,Afe as Q,z as R,yX as S,bX as T,Lfe as U,jfe as V,Ufe as W,mh as X,Ffe as Y,Ur as Z,kN as _,qn as a,gTe as a$,jL as a0,zfe as a1,$fe as a2,fs as a3,Wr as a4,ipe as a5,zTe as a6,iR as a7,fTe as a8,Gwe as a9,XCe as aA,FCe as aB,TTe as aC,JCe as aD,OTe as aE,RTe as aF,ATe as aG,STe as aH,m5 as aI,Vwe as aJ,x7 as aK,NTe as aL,ITe as aM,BTe as aN,FTe as aO,UTe as aP,KTe as aQ,oAe as aR,QCe as aS,Py as aT,BCe as aU,Bl as aV,A7 as aW,DCe as aX,bB as aY,yCe as aZ,CCe as a_,Cx as aa,bAe as ab,IP as ac,pee as ad,w7 as ae,QEe as af,WTe as ag,YTe as ah,eTe as ai,qfe as aj,GCe as ak,e8 as al,PTe as am,DTe as an,MTe as ao,bTe as ap,$Ce as aq,HTe as ar,YCe as as,EB as at,LTe as au,jTe as av,kTe as aw,Wn as ax,ETe as ay,qCe as az,dn as b,By as b$,pTe as b0,mTe as b1,vTe as b2,CTe as b3,pAe as b4,nTe as b5,GTe as b6,VTe as b7,qa as b8,hCe as b9,Z4 as bA,tTe as bB,lTe as bC,UCe as bD,cTe as bE,uTe as bF,MJ as bG,uAe as bH,NJ as bI,dTe as bJ,hTe as bK,xx as bL,qTe as bM,_Te as bN,WCe as bO,xh as bP,Ofe as bQ,HF as bR,Ng as bS,m9 as bT,No as bU,xT as bV,Ai as bW,joe as bX,Ti as bY,Moe as bZ,g9 as b_,X8 as ba,Ay as bb,Zwe as bc,iAe as bd,JA as be,I7 as bf,HCe as bg,vAe as bh,oTe as bi,rTe as bj,aTe as bk,pd as bl,qwe as bm,wr as bn,$Te as bo,wTe as bp,xTe as bq,Cxe as br,sTe as bs,iTe as bt,ZTe as bu,XTe as bv,yTe as bw,KJ as bx,fAe as by,VJ as bz,s8 as c,X9 as c0,nse as c1,qoe as c2,Joe as c3,sse as c4,Xre as c5,Uy as c6,aT as c7,u9 as c8,Zoe as c9,Yy as cA,np as cB,Xoe as cC,ep as cD,Qoe as cE,Woe as cF,Goe as ca,use as cb,Boe as cc,NT as cd,f9 as ce,ose as cf,koe as cg,Doe as ch,Tte as ci,su as cj,yte as ck,vte as cl,iT as cm,tF as cn,Poe as co,Ete as cp,lse as cq,Foe as cr,lT as cs,Loe as ct,nie as cu,iF as cv,sAe as cw,Jh as cx,hAe as cy,TT as cz,cP as d,cX as e,oQ as f,Wx as g,aAe as h,l8 as i,D as j,BQ as k,vX as l,FJ as m,LJ as n,cAe as o,lAe as p,$Q as q,A as r,nS as s,SX as t,WQ as u,J6 as v,i8 as w,tAe as x,nAe as y,mAe as z};
|
|
294
|
+
or you can use record.mirror to access the mirror instance during recording.`;let DU={map:{},getId(){return console.error(mc),-1},getNode(){return console.error(mc),null},removeNodeFromMap(){console.error(mc)},has(){return console.error(mc),!1},reset(){console.error(mc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(DU=new Proxy(DU,{get(t,e,n){return e==="map"&&console.error(mc),Reflect.get(t,e,n)}}));function $h(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 Ib(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)}}),()=>Ib(t,e,o||{},!0)}let ry=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ry=()=>new Date().getTime());function Gj(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 Vj(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Kj(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Yj(t){return t?t.nodeType===t.ELEMENT_NODE?t:rt.parentElement(t):null}function Cr(t,e,n,r){if(!t)return!1;const s=Yj(t);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(Kv(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function USe(t,e){return e.getId(t)!==-1}function Sx(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===kh}function Zj(t,e){if(ch(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?Zj(r,e):!0}function cA(t){return!!t.changedTouches}function FSe(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 Xj(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Qj(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function dA(t){return t?t instanceof VR&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class zSe{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 Jj(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 jSe(t){let e=t,n;for(;n=Jj(e);)e=n;return e}function BSe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=jSe(t);return rt.contains(e,n)}function eB(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||BSe(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||{}),Lr=(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))(Lr||{}),si=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(si||{}),Vc=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Vc||{}),vc=(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))(vc||{}),tB=(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))(tB||{});function LU(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&&LU(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&&LU(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 UU=(t,e)=>`${t}@${e}`;class $Se{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=kh;for(;p===kh;)f=f&&f.nextSibling,p=f&&this.mirror.getId(f);return p},o=c=>{const f=rt.parentNode(c);if(!f||!eB(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=ch(f)?this.mirror.getId(Jj(c)):this.mirror.getId(f),m=s(c);if(g===-1||m===-1)return r.addNode(c);const y=Ac(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=>{Xj(S,this.mirror)&&this.iframeManager.addIframe(S),Qj(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),dA(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)FU(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!zU(this.droppedSet,c)&&!FU(this.removesSubTreeCache,c,this.mirror)||zU(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=Wv({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Gv(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!Sx(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const n=rt.textContent(e.target);!Cr(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:xz(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,Yj(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=Gv(n);s=Wv({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:s,maskInputFn:this.maskInputFn})}if(Cr(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"),!wz(n.tagName,r))if(o.attributes[r]=Cz(this.doc,Kl(n.tagName),Kl(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(Cr(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=ch(e.target)?this.mirror.getId(rt.host(e.target)):this.mirror.getId(e.target);Cr(e.target,this.blockClass,this.blockSelector,!1)||Sx(n,this.mirror,this.slimDOMOptions)||!USe(n,this.mirror)||(this.addedSet.has(n)?(fA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Zj(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[UU(r,s)]?fA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:ch(e.target)&&dh(e.target)?!0:void 0}),qSe(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(Sx(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[UU(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Cr(e,this.blockClass,this.blockSelector,!1)||(rt.childNodes(e).forEach(r=>this.genAdds(r)),dA(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 fA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>fA(t,n))}function qSe(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 FU(t,e,n){return t.size===0?!1:WSe(t,e)}function WSe(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function zU(t,e){return t.size===0?!1:nB(t,e)}function nB(t,e){const n=rt.parentNode(e);return n?t.has(n)?!0:nB(t,n):!1}let fh;function GSe(t){fh=t}function VSe(){fh=void 0}const vt=t=>fh?(...n)=>{try{return t(...n)}catch(r){if(fh&&fh(r)===!0)return;throw r}}:t,Rl=[];function fp(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 rB(t,e){const n=new $Se;Rl.push(n),n.init(t);const r=new(Wj())(vt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function KSe({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=$h(vt(g=>{const m=Date.now()-u;t(a.map(y=>(y.timeOffset-=m,y)),g),a=[],u=null}),o),f=vt($h(vt(g=>{const m=fp(g),{clientX:y,clientY:S}=cA(g)?g.changedTouches[0]:g;u||(u=ry()),a.push({x:y,y:S,id:r.getId(m),timeOffset:ry()-u}),c(typeof DragEvent<"u"&&g instanceof DragEvent?ft.Drag:g instanceof MouseEvent?ft.MouseMove:ft.TouchMove)}),s,{trailing:!1})),p=[Er("mousemove",f,n),Er("touchmove",f,n),Er("drag",f,n)];return vt(()=>{p.forEach(g=>g())})}function YSe({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=fp(g);if(Cr(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?Lr[p]===Lr.MouseDown?S="TouchStart":Lr[p]===Lr.MouseUp&&(S="TouchEnd"):si.Pen}else cA(g)&&(y=si.Touch);y!==null?(c=y,(S.startsWith("Touch")&&y===si.Touch||S.startsWith("Mouse")&&y===si.Mouse)&&(y=null)):Lr[p]===Lr.Click&&(y=c,c=null);const E=cA(g)?g.changedTouches[0]:g;if(!E)return;const C=n.getId(m),{clientX:w,clientY:_}=E;vt(t)({type:Lr[S],id:C,x:w,y:_,...y!==null&&{pointerType:y}})};return Object.keys(Lr).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&a[p]!==!1).forEach(p=>{let g=Kl(p);const m=f(p);if(window.PointerEvent)switch(Lr[p]){case Lr.MouseDown:case Lr.MouseUp:g=g.replace("mouse","pointer");break;case Lr.TouchStart:case Lr.TouchEnd:return}u.push(Er(g,m,e))}),vt(()=>{u.forEach(p=>p())})}function sB({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){const a=vt($h(vt(u=>{const c=fp(u);if(!c||Cr(c,r,s,!0))return;const f=n.getId(c);if(c===e&&e.defaultView){const p=Gj(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 Er("scroll",a,e)}function ZSe({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=vt($h(vt(()=>{const o=Vj(),a=Kj();(n!==o||r!==a)&&(t({width:Number(a),height:Number(o)}),n=o,r=a)}),200));return Er("resize",s,e)}const XSe=["INPUT","TEXTAREA","SELECT"],jU=new WeakMap;function QSe({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:p}){function g(_){let T=fp(_);const R=_.isTrusted,M=T&&T.tagName;if(T&&M==="OPTION"&&(T=rt.parentElement(T)),!T||!M||XSe.indexOf(M)<0||Cr(T,r,s,!0)||T.classList.contains(o)||a&&T.matches(a))return;let O=T.value,I=!1;const P=Gv(T)||"";P==="radio"||P==="checkbox"?I=T.checked:(u[M.toLowerCase()]||u[P])&&(O=Wv({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(_,T){const R=jU.get(_);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){jU.set(_,T);const M=n.getId(_);vt(t)({...T,id:M})}}const S=(f.input==="last"?["change"]:["input","change"]).map(_=>Er(_,vt(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(_=>_())};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(_=>Ib(_[0],_[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(_=>_())})}function sy(t){const e=[];function n(r,s){if(km("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||km("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||km("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||km("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 JSe({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={};Dm("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Dm("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Dm("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Dm("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:_}=ba(y.parentStyleSheet,e,n.styleMirror);return(w&&w!==-1||_&&_!==-1)&&t({id:w,styleId:_,adds:[{rule:E,index:[...sy(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:[...sy(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 oB({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 eEe({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:sy(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:sy(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function tEe({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:s,doc:o}){const a=vt(c=>$h(vt(f=>{const p=fp(f);if(!p||Cr(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=[Er("play",a(vc.Play),o),Er("pause",a(vc.Pause),o),Er("seeked",a(vc.Seeked),o),Er("volumechange",a(vc.VolumeChange),o),Er("ratechange",a(vc.RateChange),o)];return vt(()=>{u.forEach(c=>c())})}function nEe({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=du(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 rEe(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;Cr(y,r,s,!0)||Cr(E,r,s,!0)||f.push({start:n.getId(y),startOffset:S,end:n.getId(E),endOffset:C})}o({ranges:f})});return u(),Er("selectionchange",u)}function sEe({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:du(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 oEe(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 iEe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};oEe(t,e);let r;t.recordDOM&&(r=rB(t,t.doc));const s=KSe(t),o=YSe(t),a=sB(t),u=ZSe(t,{win:n}),c=QSe(t),f=tEe(t);let p=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(p=JSe(t,{win:n}),g=oB(t,t.doc),m=eEe(t,{win:n}),t.collectFonts&&(y=nEe(t)));const S=rEe(t),E=sEe(t),C=[];for(const w of t.plugins)C.push(w.observer(w.callback,n,w.options));return vt(()=>{Rl.forEach(w=>w.reset()),r?.disconnect(),s(),o(),a(),u(),c(),f(),p(),g(),m(),y(),S(),E(),C.forEach(w=>w())})}function km(t){return typeof window[t]<"u"}function Dm(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class BU{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 aEe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new BU(Ez)),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 BU(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!==tB.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class lEe{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(!dh(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=rB({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(sB({...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(oB({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(du(e.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o),u=rt.shadowRoot(this);return u&&eB(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Tc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uEe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Lm=0;Lm<Tc.length;Lm++)uEe[Tc.charCodeAt(Lm)]=Lm;var cEe=function(t){var e=new Uint8Array(t),n,r=e.length,s="";for(n=0;n<r;n+=3)s+=Tc[e[n]>>2],s+=Tc[(e[n]&3)<<4|e[n+1]>>4],s+=Tc[(e[n+1]&15)<<2|e[n+2]>>6],s+=Tc[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 HU=new Map;function dEe(t,e){let n=HU.get(t);return n||(n=new Map,HU.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const iB=(t,e,n)=>{if(!t||!(lB(t,e)||typeof t=="object"))return;const r=t.constructor.name,s=dEe(n,r);let o=s.indexOf(t);return o===-1&&(o=s.length,s.push(t)),o};function fv(t,e,n){if(t instanceof Array)return t.map(r=>fv(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=cEe(t);return{rr_type:r,base64:s}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[fv(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:[fv(t.data,e,n),t.width,t.height]};if(lB(t,e)||typeof t=="object"){const r=t.constructor.name,s=iB(t,e,n);return{rr_type:r,index:s}}}}return t}const aB=(t,e,n)=>t.map(r=>fv(r,e,n)),lB=(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 fEe(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=du(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return Cr(this.canvas,n,r,!0)||setTimeout(()=>{const p=aB(f,e,this);t(this.canvas,{type:Vc["2D"],property:a,args:p})},0),c.apply(this,f)}});s.push(u)}catch{const u=Ib(e.CanvasRenderingContext2D.prototype,a,{set(c){t(this.canvas,{type:Vc["2D"],property:a,args:[c],setter:!0})}});s.push(u)}return()=>{s.forEach(a=>a())}}function hEe(t){return t==="experimental-webgl"?"webgl":t}function $U(t,e,n,r){const s=[];try{const o=du(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!Cr(this,e,n,!0)){const f=hEe(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 qU(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=du(t,c,function(p){return function(...g){const m=p.apply(this,g);if(iB(m,o,this),"tagName"in this.canvas&&!Cr(this.canvas,r,s,!0)){const y=aB(g,o,this),S={type:e,property:c,args:y};n(this.canvas,S)}return m}});a.push(f)}catch{const f=Ib(t,c,{set(p){n(this.canvas,{type:e,property:c,args:[p],setter:!0})}});a.push(f)}return a}function pEe(t,e,n,r){const s=[];return s.push(...qU(e.WebGLRenderingContext.prototype,Vc.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...qU(e.WebGL2RenderingContext.prototype,Vc.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const uB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",gEe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),WU=typeof window<"u"&&window.Blob&&new Blob([gEe(uB)],{type:"text/javascript;charset=utf-8"});function mEe(t){let e;try{if(e=WU&&(window.URL||window.webkitURL).createObjectURL(WU),!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,"+uB,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class vEe{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=$U(n,r,s,!0),u=new Map,c=new mEe;c.onmessage=S=>{const{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;const{base64:C,type:w,width:_,height:T}=S.data;this.mutationCb({id:E,type:Vc["2D"],commands:[{property:"clearRect",args:[0,0,_,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=>{Cr(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 _=await createImageBitmap(E);c.postMessage({id:w,bitmap:_,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[_])}),g=requestAnimationFrame(y)};g=requestAnimationFrame(y),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=$U(e,n,r,!1),o=fEe(this.processMutation.bind(this),e,n,r),a=pEe(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 yEe{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new zSe),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:yz(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 bEe{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,hv,Ex,oy=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((K4=t.contentWindow)==null?void 0:K4.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Bs=Eye();function hp(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:_={},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:j,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:ne}=t;GSe(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&&_.mousemove===void 0&&(_.mousemove=R),Bs.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=_z(y);FSe();let Ae,L=0;const V=Ee=>{for(const pt of j||[])pt.eventProcessor&&(Ee=pt.eventProcessor(Ee));return w&&!ee&&(Ee=w(Ee)),Ee};gn=(Ee,pt)=>{var Ce;const ze=Ee;if(ze.timestamp=ry(),(Ce=Rl[0])!=null&&Ce.isFrozen()&&ze.type!==Ct.FullSnapshot&&!(ze.type===Ct.IncrementalSnapshot&&ze.data.source===ft.Mutation)&&Rl.forEach(je=>je.unfreeze()),$)e?.(V(ze),pt);else if(ee){const je={type:"rrweb",event:V(ze),origin:window.location.origin,isCheckout:pt};window.parent.postMessage(je,"*")}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 je=r&&L>=r,He=n&&ze.timestamp-Ae.timestamp>n;(je||He)&&hv(!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 yEe({mutationCb:K,adoptedStyleSheetCb:he}),ve=new aEe({mirror:Bs,mutationCb:K,stylesheetManager:ue,recordCrossOriginIframes:I,wrappedEmit:gn});for(const Ee of j||[])Ee.getMirror&&Ee.getMirror({nodeMirror:Bs,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const xe=new bEe;Ex=new vEe({recordCanvas:O,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:Bs,sampling:_.canvas,dataURLOptions:T});const Xe=new lEe({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:_,slimDOMOptions:de,iframeManager:ve,stylesheetManager:ue,canvasManager:Ex,keepIframeSrcFn:W,processedNodeManager:xe},mirror:Bs});hv=(Ee=!1)=>{if(!M)return;gn({type:Ct.Meta,data:{href:window.location.href,width:Kj(),height:Vj()}},Ee),ue.reset(),Xe.init(),Rl.forEach(Ce=>Ce.lock());const pt=Wye(document,{mirror:Bs,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=>{Xj(Ce,Bs)&&ve.addIframe(Ce),Qj(Ce,Bs)&&ue.trackLinkElement(Ce),dA(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:Gj(window)}},Ee),Rl.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,Bs.getId(document))};try{const Ee=[],pt=ze=>{var je;return vt(iEe)({mutationCb:K,mousemoveCb:(He,gr)=>gn({type:Ct.IncrementalSnapshot,data:{source:gr,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:_,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:Bs,iframeManager:ve,stylesheetManager:ue,shadowDomManager:Xe,processedNodeManager:xe,canvasManager:Ex,ignoreCSSAttributes:Y,plugins:((je=j?.filter(He=>He.observer))==null?void 0:je.map(He=>({observer:He.observer,options:He.options,callback:gr=>gn({type:Ct.Plugin,data:{plugin:He.name,payload:gr}})})))||[]},C)};ve.addLoadListener(ze=>{try{Ee.push(pt(ze.contentDocument))}catch(je){console.warn(je)}});const Ce=()=>{hv(),Ee.push(pt(document)),oy=!0};return["interactive","complete"].includes(document.readyState)?Ce():(Ee.push(Er("DOMContentLoaded",()=>{gn({type:Ct.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&Ce()})),Ee.push(Er("load",()=>{gn({type:Ct.Load,data:{}}),P==="load"&&Ce()},window))),()=>{Ee.forEach(ze=>{try{ze()}catch(je){String(je).toLowerCase().includes("cross-origin")||console.warn(je)}}),xe.destroy(),oy=!1,VSe()}}catch(Ee){console.warn(Ee)}}hp.addCustomEvent=(t,e)=>{if(!oy)throw new Error("please add custom event after start recording");gn({type:Ct.Custom,data:{tag:t,payload:e}})};hp.freezePage=()=>{Rl.forEach(t=>t.freeze())};hp.takeFullSnapshot=t=>{if(!oy)throw new Error("please take full snapshot after start recording");hv(t)};hp.mirror=Bs;var GU;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(GU||(GU={}));const SEe="rrweb",EEe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},CEe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},VU=CEe;class wEe extends Ns{constructor(e){super(SEe),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({},VU.recordOptions),e?.recordOptions),EEe);this.config=Object.assign(Object.assign(Object.assign({},VU),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=hp(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(M4,n),be.info("RRWebPlugin events sent to RUM",{eventType:M4,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var xEe=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},hA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(hA||(hA={}));const cB="us-west-2",pA=`https://dataplane.rum.${cB}.amazonaws.com`,dB=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),fB=t=>({allowCookies:!1,batchLimit:100,client:Kge,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:pA,endpointUrl:new URL(pA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:hA.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 _Ee=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=xEe(s,["cookieAttributes"]);this.eventBus=new nz,typeof r>"u"&&(r="us-west-2"),this.applicationId=e;const u=Object.assign(Object.assign({},dB()),o);this.config=Object.assign(Object.assign({fetchFunction:fetch},fB(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:pA.replace(cB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new ove({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;[Fv,zv,jc,`${Fv}_${this.applicationId}`,`${zv}_${this.applicationId}`,`${jc}_${this.applicationId}`].forEach(r=>Xme(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 Yge(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 Zme(r);return this.config.disableAutoPageView||s.addPlugin(new wve),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 KU;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(KU||(KU={}));const AEe=t=>Object.assign(Object.assign({},fB(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class TEe extends _Ee{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},AEe(dB())),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(xme),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new jme(c,o).ChainAnonymousCredentialsProvider:new Bme(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(oz,e)}registerDomEvents(e){this.pluginManager.updatePlugin(rz,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 mve(e)],[Ks.Performance]:e=>[new bve(e),new _ve(e),new Wve(e)],[Ks.Interaction]:e=>[new gR(e)],[Ks.Http]:e=>[new Zve(e),new Vve(e)],[Ks.Replay]:e=>[new wEe(e)]}}}const hB={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},REe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function pB(t){return t.replace(REe,"[redacted]")}function IEe(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 pB(t.slice(0,r))}function OEe(t){const e=pB(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(IEe(e))},recordError(e,n){t.recordError(OEe(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 YU(t){return t instanceof Error?t:new Error(String(t))}function MEe(t){window.addEventListener("error",e=>{t.recordError(YU(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(YU(e.reason))})}function PEe(){const{appMonitorId:t,identityPoolId:e,region:n}=Ay().rum;if(!t)return hB;const r=new TEe(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 MEe(s),s}const gB=A.createContext(hB);function eTe(){return A.useContext(gB)}const gA="remit.theme",kEe="dark";function ZU(){return typeof localStorage>"u"?"system":localStorage.getItem(gA)??"system"}function mA(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(kEe,e)}function tTe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(gA):localStorage.setItem(gA,t)),mA(t)}const DEe=()=>{if(typeof window>"u"||(mA(ZU()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{mA(ZU())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},LEe=(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);Fl(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},XU={},vA=(t,e,n,r)=>{Fl(n)&&XU[n]||(Fl(n)&&(XU[n]=new Date),LEe(t,e,n,r))},mB=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},yA=(t,e,n)=>{t.loadNamespaces(e,mB(t,n))},QU=(t,e,n,r)=>{if(Fl(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return yA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,mB(t,r))},UEe=(t,e,n={})=>!e.languages||!e.languages.length?(vA(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}}),Fl=t=>typeof t=="string",FEe=t=>typeof t=="object"&&t!==null,zEe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,jEe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},BEe=t=>jEe[t],HEe=t=>t.replace(zEe,BEe);let bA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:HEe};const $Ee=(t={})=>{bA={...bA,...t}},qEe=()=>bA;let vB;const WEe=t=>{vB=t},GEe=()=>vB,VEe={type:"3rdParty",init(t){$Ee(t.options.react),WEe(t)}},KEe=A.createContext();class YEe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const ZEe=(t,e)=>{const n=A.useRef();return A.useEffect(()=>{n.current=t},[t,e]),n.current},yB=(t,e,n,r)=>t.getFixedT(e,n,r),XEe=(t,e,n,r)=>A.useCallback(yB(t,e,n,r),[t,e,n,r]),QEe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=A.useContext(KEe)||{},o=n||r||GEe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new YEe),!o){vA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(O,I)=>Fl(I)?I:FEe(I)&&Fl(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&&vA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...qEe(),...o.options.react,...e},{useSuspense:u,keyPrefix:c}=a;let f=t||s||o.options?.defaultNS;f=Fl(f)?[f]:f||["translation"],o.reportNamespaces.addUsedNamespaces?.(f);const p=(o.isInitialized||o.initializedStoreOnce)&&f.every(R=>UEe(R,o,a)),g=XEe(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),m=()=>g,y=()=>yB(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=ZEe(C),_=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;_.current=!0,!p&&!u&&(e.lng?QU(o,e.lng,f,()=>{_.current&&E(y)}):yA(o,f,()=>{_.current&&E(y)})),p&&w&&w!==C&&_.current&&E(y);const O=()=>{_.current&&E(y)};return R&&o?.on(R,O),M&&o?.store.on(M,O),()=>{_.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(()=>{_.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?QU(o,e.lng,f,()=>R()):yA(o,f,()=>R())})},JEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),eCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),tCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),nCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),rCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),sCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),oCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),iCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),aCe=t=>(t.client??Ze).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),lCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),uCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),cCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),dCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),fCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),hCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),pCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),gCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),mCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),vCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),nTe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),yCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),bCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),SCe=t=>(t?.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),ECe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),CCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),wCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),xCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),_Ce=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),ACe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),TCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),RCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),ICe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),OCe=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}),MCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),PCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),kCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),DCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),LCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),rTe=t=>({mutationFn:async n=>{const{data:r}=await JEe({...t,...n,throwOnError:!0});return r}}),hr=(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]},sTe=t=>({mutationFn:async n=>{const{data:r}=await eCe({...t,...n,throwOnError:!0});return r}}),oTe=t=>({mutationFn:async n=>{const{data:r}=await tCe({...t,...n,throwOnError:!0});return r}}),iTe=t=>({mutationFn:async n=>{const{data:r}=await nCe({...t,...n,throwOnError:!0});return r}}),aTe=t=>({mutationFn:async n=>{const{data:r}=await rCe({...t,...n,throwOnError:!0});return r}}),UCe=t=>hr("filterOperationsListFilters",t),lTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await sCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:UCe(t)}),uTe=t=>({mutationFn:async n=>{const{data:r}=await oCe({...t,...n,throwOnError:!0});return r}}),cTe=t=>({mutationFn:async n=>{const{data:r}=await iCe({...t,...n,throwOnError:!0});return r}}),dTe=t=>({mutationFn:async n=>{const{data:r}=await aCe({...t,...n,throwOnError:!0});return r}}),FCe=t=>hr("mailboxOperationsListMailboxes",t),fTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await lCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:FCe(t)}),hTe=t=>({mutationFn:async n=>{const{data:r}=await uCe({...t,...n,throwOnError:!0});return r}}),pTe=t=>({mutationFn:async n=>{const{data:r}=await cCe({...t,...n,throwOnError:!0});return r}}),gTe=t=>({mutationFn:async n=>{const{data:r}=await dCe({...t,...n,throwOnError:!0});return r}}),zCe=t=>hr("organizeJobDetailOperationsGetOrganizeJob",t),mTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await fCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:zCe(t)}),vTe=t=>({mutationFn:async n=>{const{data:r}=await hCe({...t,...n,throwOnError:!0});return r}}),jCe=t=>hr("syncOperationsGetSyncStatus",t),yTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await pCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:jCe(t)}),BCe=t=>hr("addressOperationsSearchAddresses",t),bTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await gCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:BCe(t)}),STe=t=>({mutationFn:async n=>{const{data:r}=await mCe({...t,...n,throwOnError:!0});return r}}),HCe=t=>hr("configOperationsGetConfig",t),$Ce=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await vCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:HCe(t)}),ETe=t=>hr("threadOperationsListThreads",t),qCe=t=>hr("threadOperationsSearchThreads",t),CTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await yCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:qCe(t)}),wTe=t=>({mutationFn:async n=>{const{data:r}=await bCe({...t,...n,throwOnError:!0});return r}}),xTe=t=>({mutationFn:async n=>{const{data:r}=await SCe({...t,...n,throwOnError:!0});return r}}),WCe=t=>hr("meOperationsListVipSuggestions",t),_Te=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await ECe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:WCe(t)}),ATe=t=>({mutationFn:async n=>{const{data:r}=await CCe({...t,...n,throwOnError:!0});return r}}),TTe=t=>({mutationFn:async n=>{const{data:r}=await wCe({...t,...n,throwOnError:!0});return r}}),RTe=t=>({mutationFn:async n=>{const{data:r}=await xCe({...t,...n,throwOnError:!0});return r}}),GCe=t=>hr("messageOperationsDescribeMessage",t),ITe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await _Ce({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:GCe(t)}),OTe=t=>({mutationFn:async n=>{const{data:r}=await ACe({...t,...n,throwOnError:!0});return r}}),VCe=t=>hr("messageOperationsGetRawMessage",t),NTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await TCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:VCe(t)}),bB=t=>hr("outboxOperationsListOutboxMessages",t),MTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await RCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:bB(t)}),PTe=t=>({mutationFn:async n=>{const{data:r}=await ICe({...t,...n,throwOnError:!0});return r}}),kTe=t=>({mutationFn:async n=>{const{data:r}=await OCe({...t,...n,throwOnError:!0});return r}}),KCe=t=>hr("outboxDetailOperationsGetOutboxMessage",t),YCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await NCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:KCe(t)}),DTe=t=>({mutationFn:async n=>{const{data:r}=await MCe({...t,...n,throwOnError:!0});return r}}),LTe=t=>({mutationFn:async n=>{const{data:r}=await PCe({...t,...n,throwOnError:!0});return r}}),ZCe=t=>hr("semanticSearchOperationsSemanticSearch",t),UTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await kCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:ZCe(t)}),XCe=t=>hr("unifiedThreadOperationsListAllThreads",t),QCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await DCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:XCe(t)}),JCe=t=>hr("threadDetailOperationsListThreadMessages",t),FTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await LCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:JCe(t)}),SB=A.createContext(void 0),JU={isOpen:!1,mode:"new"},ewe=2e3,twe=6e4,nwe=({children:t})=>{const[e,n]=A.useState(JU),[r,s]=A.useState(),o=A.useRef(0),a=XF(),{data:u}=qfe({...YCe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>twe?!1:ewe}});A.useEffect(()=>{if(!u||!r)return;(u.status==="sent"||u.status==="failed"||u.status==="blocked")&&(s(void 0),a.invalidateQueries({queryKey:bB()}))},[u,r,a]);const c=A.useCallback(y=>{n({...y,isOpen:!0})},[]),f=A.useCallback(()=>{n(JU)},[]),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(SB.Provider,{value:m,children:t})},zTe=()=>{const t=A.useContext(SB);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},Cx=(...t)=>g8(s8(t)),rwe={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"}},swe={error:cX,warning:SX,info:pX},owe={error:"Error",warning:"Warning",info:"Information"},iwe=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=rwe[e],a=swe[e];return D.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:Cx("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:Cx("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:Cx("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 ${owe[e].toLowerCase()}`,children:D.jsx(mh,{className:"size-4","aria-hidden":"true"})})]})},awe=({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(iwe,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),e5=5,jTe=(t,e,n)=>({title:t,detail:EB(n)??e,error:n}),EB=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}},BTe=t=>{const e=EB(t);return e?e.startsWith("Message not found"):!1},lwe=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,uwe=(t,e)=>{const r=[...t.filter(s=>!lwe(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=e5?r:r.slice(r.length-e5)},cwe=(t,e)=>t.filter(n=>n.id!==e),dwe=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),CB=A.createContext(void 0),fwe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,hwe=({children:t})=>{const[e,n]=A.useState([]),r=A.useCallback(u=>{if(u.error!=null&&Z8(u.error))return Bl(u.error).correlationId;const c=dwe(u,fwe(),Date.now());return n(f=>uwe(f,c)),c.id},[]),s=A.useCallback(u=>{n(c=>cwe(c,u))},[]),o=A.useCallback(()=>{n([])},[]),a=A.useMemo(()=>({errors:e,pushError:r,dismissError:s,clearAll:o}),[e,r,s,o]);return D.jsxs(CB.Provider,{value:a,children:[t,D.jsx(awe,{errors:e,onDismiss:s})]})},HTe=()=>{const t=A.useContext(CB);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},pwe=({error:t,reset:e,info:n})=>{const r=Py(t),s=Bl(t,{recoverable:r,componentStack:n?.componentStack});return D.jsx(r9,{fatal:s,onRetry:r?e:void 0})},pp=ype()({component:mwe,errorComponent:pwe}),gwe=()=>{const{t}=QEe("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 mwe(){return D.jsxs(hwe,{children:[D.jsxs(nwe,{children:[D.jsx(gwe,{}),D.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:D.jsx(A.Suspense,{fallback:D.jsx(JA,{}),children:D.jsx(I7,{})})})]}),D.jsx(n9,{})]})}const vwe=fr("/")({beforeLoad:()=>{throw u7({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 t5;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(t5||(t5={}));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 xi 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 xi))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()}}xi.create=t=>new xi(t);const SA=(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 ywe=SA;function bwe(){return ywe}const Swe=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 _e(t,e){const n=bwe(),r=Swe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===SA?void 0:SA].filter(s=>!!s)});t.common.issues.push(r)}class us{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 us.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"}),Jf=t=>({status:"dirty",value:t}),Ms=t=>({status:"valid",value:t}),n5=t=>t.status==="aborted",r5=t=>t.status==="dirty",Kc=t=>t.status==="valid",iy=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 Ba{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 s5=(t,e)=>{if(Kc(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 xi(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 us,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(iy(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 s5(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 Kc(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=>Kc(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(iy(s)?s:Promise.resolve(s));return s5(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 Xc({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 Qc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xo.create(this)}promise(){return cy.create(this,this._def)}or(e){return ly.create([this,e],this._def)}and(e){return uy.create(this,e,this._def)}transform(e){return new Xc({...st(this._def),schema:this,typeName:Ye.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new CA({...st(this._def),innerType:this,defaultValue:n,typeName:Ye.ZodDefault})}brand(){return new $we({typeName:Ye.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new wA({...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 YR.create(this,e)}readonly(){return xA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ewe=/^c[^\s-]{8,}$/i,Cwe=/^[0-9a-z]+$/,wwe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,xwe=/^[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,_we=/^[a-z0-9_-]{21}$/i,Awe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Twe=/^[-+]?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)?)??$/,Rwe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Iwe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let wx;const Owe=/^(?:(?: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])$/,Mwe=/^(([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]))$/,Pwe=/^(([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])$/,kwe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Dwe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wB="((\\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])))",Lwe=new RegExp(`^${wB}$`);function xB(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 Uwe(t){return new RegExp(`^${xB(t)}$`)}function Fwe(t){let e=`${wB}T${xB(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 zwe(t,e){return!!((e==="v4"||!e)&&Owe.test(t)||(e==="v6"||!e)&&Mwe.test(t))}function jwe(t,e){if(!Awe.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 Bwe(t,e){return!!((e==="v4"||!e)&&Nwe.test(t)||(e==="v6"||!e)&&Pwe.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 _e(o,{code:ge.invalid_type,expected:Oe.string,received:o.parsedType}),Ke}const r=new us;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),_e(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),_e(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?_e(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&_e(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Rwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"email",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")wx||(wx=new RegExp(Iwe,"u")),wx.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"emoji",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")xwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"uuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")_we.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"nanoid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")Ewe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Cwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cuid2",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")wwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(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),_e(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),_e(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),_e(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),_e(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),_e(s,{code:ge.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Fwe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?Lwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Uwe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?Twe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?zwe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"ip",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?jwe(e.data,o.alg)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"jwt",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Bwe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cidr",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?kwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?Dwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(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 Yl 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 _e(o,{code:ge.invalid_type,expected:Oe.number,received:o.parsedType}),Ke}let r;const s=new us;for(const o of this._def.checks)o.kind==="int"?Tt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),_e(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),_e(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),_e(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),_e(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),_e(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 Yl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Yl({...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)}}Yl.create=t=>new Yl({checks:[],typeName:Ye.ZodNumber,coerce:t?.coerce||!1,...st(t)});class Zl 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 us;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),_e(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),_e(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),_e(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 _e(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 Zl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Zl({...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}}Zl.create=t=>new Zl({checks:[],typeName:Ye.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class ay extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Oe.boolean){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.boolean,received:r.parsedType}),Ke}return Ms(e.data)}}ay.create=t=>new ay({typeName:Ye.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class Yc 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 _e(o,{code:ge.invalid_type,expected:Oe.date,received:o.parsedType}),Ke}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return _e(o,{code:ge.invalid_date}),Ke}const r=new us;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),_e(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),_e(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 Yc({...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}}Yc.create=t=>new Yc({checks:[],coerce:t?.coerce||!1,typeName:Ye.ZodDate,...st(t)});class o5 extends wt{_parse(e){if(this._getType(e)!==Oe.symbol){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.symbol,received:r.parsedType}),Ke}return Ms(e.data)}}o5.create=t=>new o5({typeName:Ye.ZodSymbol,...st(t)});class i5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.undefined,received:r.parsedType}),Ke}return Ms(e.data)}}i5.create=t=>new i5({typeName:Ye.ZodUndefined,...st(t)});class a5 extends wt{_parse(e){if(this._getType(e)!==Oe.null){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.null,received:r.parsedType}),Ke}return Ms(e.data)}}a5.create=t=>new a5({typeName:Ye.ZodNull,...st(t)});class l5 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}l5.create=t=>new l5({typeName:Ye.ZodAny,...st(t)});class u5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}u5.create=t=>new u5({typeName:Ye.ZodUnknown,...st(t)});class Ha extends wt{_parse(e){const n=this._getOrReturnCtx(e);return _e(n,{code:ge.invalid_type,expected:Oe.never,received:n.parsedType}),Ke}}Ha.create=t=>new Ha({typeName:Ye.ZodNever,...st(t)});class c5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.void,received:r.parsedType}),Ke}return Ms(e.data)}}c5.create=t=>new c5({typeName:Ye.ZodVoid,...st(t)});class xo extends wt{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==Oe.array)return _e(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)&&(_e(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&&(_e(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&&(_e(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 Ba(n,a,n.path,u)))).then(a=>us.mergeArray(r,a));const o=[...n.data].map((a,u)=>s.type._parseSync(new Ba(n,a,n.path,u)));return us.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new xo({...this._def,minLength:{value:e,message:Me.toString(n)}})}max(e,n){return new xo({...this._def,maxLength:{value:e,message:Me.toString(n)}})}length(e,n){return new xo({...this._def,exactLength:{value:e,message:Me.toString(n)}})}nonempty(e){return this.min(1,e)}}xo.create=(t,e)=>new xo({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ye.ZodArray,...st(e)});function yc(t){if(t instanceof _n){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Ma.create(yc(r))}return new _n({...t._def,shape:()=>e})}else return t instanceof xo?new xo({...t._def,type:yc(t.element)}):t instanceof Ma?Ma.create(yc(t.unwrap())):t instanceof Qc?Qc.create(yc(t.unwrap())):t instanceof Xl?Xl.create(t.items.map(e=>yc(e))):t}class _n 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 _e(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 Ba(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&&(_e(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 Ba(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=>us.mergeObjectSync(r,f)):us.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return Me.errToObj,new _n({...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 _n({...this._def,unknownKeys:"strip"})}passthrough(){return new _n({...this._def,unknownKeys:"passthrough"})}extend(e){return new _n({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new _n({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 _n({...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 _n({...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 _n({...this._def,shape:()=>n})}deepPartial(){return yc(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 _n({...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 _n({...this._def,shape:()=>n})}keyof(){return _B(Tt.objectKeys(this.shape))}}_n.create=(t,e)=>new _n({shape:()=>t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});_n.strictCreate=(t,e)=>new _n({shape:()=>t,unknownKeys:"strict",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});_n.lazycreate=(t,e)=>new _n({shape:t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});class ly 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 xi(u.ctx.common.issues));return _e(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 xi(c));return _e(n,{code:ge.invalid_union,unionErrors:u}),Ke}}get options(){return this._def.options}}ly.create=(t,e)=>new ly({options:t,typeName:Ye.ZodUnion,...st(e)});function EA(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=EA(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=EA(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 uy extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(n5(o)||n5(a))return Ke;const u=EA(o.value,a.value);return u.valid?((r5(o)||r5(a))&&n.dirty(),{status:n.value,value:u.data}):(_e(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}))}}uy.create=(t,e,n)=>new uy({left:t,right:e,typeName:Ye.ZodIntersection,...st(n)});class Xl extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.array)return _e(r,{code:ge.invalid_type,expected:Oe.array,received:r.parsedType}),Ke;if(r.data.length<this._def.items.length)return _e(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&&(_e(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 Ba(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>us.mergeArray(n,a)):us.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new Xl({...this._def,rest:e})}}Xl.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Xl({items:t,typeName:Ye.ZodTuple,rest:null,...st(e)})};class d5 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 _e(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 Ba(r,u,r.path,[f,"key"])),value:o._parse(new Ba(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}}}}d5.create=(t,e,n)=>new d5({valueType:e,keyType:t,typeName:Ye.ZodMap,...st(n)});class qh extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.set)return _e(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&&(_e(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&&(_e(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 Ba(r,c,r.path,f)));return r.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(e,n){return new qh({...this._def,minSize:{value:e,message:Me.toString(n)}})}max(e,n){return new qh({...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)}}qh.create=(t,e)=>new qh({valueType:t,minSize:null,maxSize:null,typeName:Ye.ZodSet,...st(e)});class f5 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})}}f5.create=(t,e)=>new f5({getter:t,typeName:Ye.ZodLazy,...st(e)});class h5 extends wt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return _e(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}}h5.create=(t,e)=>new h5({value:t,typeName:Ye.ZodLiteral,...st(e)});function _B(t,e){return new Zc({values:t,typeName:Ye.ZodEnum,...st(e)})}class Zc extends wt{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return _e(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 _e(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 Zc.create(e,{...this._def,...n})}exclude(e,n=this._def){return Zc.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Zc.create=_B;class p5 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 _e(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 _e(r,{received:r.data,code:ge.invalid_enum_value,options:s}),Ke}return Ms(e.data)}get enum(){return this._def.values}}p5.create=(t,e)=>new p5({values:t,typeName:Ye.ZodNativeEnum,...st(e)});class cy 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 _e(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})))}}cy.create=(t,e)=>new cy({type:t,typeName:Ye.ZodPromise,...st(e)});class Xc 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=>{_e(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"?Jf(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"?Jf(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(!Kc(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=>Kc(a)?Promise.resolve(s.transform(a.value,o)).then(u=>({status:n.value,value:u})):Ke);Tt.assertNever(s)}}Xc.create=(t,e,n)=>new Xc({schema:t,typeName:Ye.ZodEffects,effect:e,...st(n)});Xc.createWithPreprocess=(t,e,n)=>new Xc({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 Qc extends wt{_parse(e){return this._getType(e)===Oe.null?Ms(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Qc.create=(t,e)=>new Qc({innerType:t,typeName:Ye.ZodNullable,...st(e)});class CA 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}}CA.create=(t,e)=>new CA({innerType:t,typeName:Ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class wA 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 iy(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new xi(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new xi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}wA.create=(t,e)=>new wA({innerType:t,typeName:Ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class g5 extends wt{_parse(e){if(this._getType(e)!==Oe.nan){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.nan,received:r.parsedType}),Ke}return{status:"valid",value:e.data}}}g5.create=t=>new g5({typeName:Ye.ZodNaN,...st(t)});class $we 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 YR 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(),Jf(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 YR({in:e,out:n,typeName:Ye.ZodPipeline})}}class xA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Kc(s)&&(s.value=Object.freeze(s.value)),s);return iy(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}xA.create=(t,e)=>new xA({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 wr=hi.create;Yl.create;Zl.create;const qwe=ay.create;Yc.create;Ha.create;xo.create;const pd=_n.create;ly.create;uy.create;Xl.create;Zc.create;cy.create;Ma.create;Qc.create;const $Te={string:(t=>hi.create({...t,coerce:!0})),number:(t=>Yl.create({...t,coerce:!0})),boolean:(t=>ay.create({...t,coerce:!0})),bigint:(t=>Zl.create({...t,coerce:!0})),date:(t=>Yc.create({...t,coerce:!0}))},Wwe=Ay().apiUrl;Ze.setConfig({baseUrl:Wwe,fetch:e8});Ze.interceptors.error.use((t,e)=>{if(t instanceof Kx||!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 Kx(r,e.status,n)});const xx={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},qTe={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},m5=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function Gwe(t){const e=new Map,n=[...t].sort((r,s)=>m5.indexOf(xx[r.role])-m5.indexOf(xx[s.role]));for(const r of n){if(!r.mailboxId||e.has(r.mailboxId))continue;const s=xx[r.role];s&&e.set(r.mailboxId,s)}return e}const Vwe=t=>{const e=t.split("/");return e[e.length-1]||t};function WTe(t,e,n){const r=t.displayNameOverride?.trim();if(r)return r;const s=Vwe(t.fullPath);return!e||!n?s:n(`sidebar.${e}`,s)}const Kwe=new Set(["sent","drafts","trash"]),GTe=t=>t===void 0||!Kwe.has(t),Ywe=new Map;function VTe(t){const e=new Map;for(const n of t){const r=Gwe(n.folderAppointments);for(const[s,o]of r)e.set(s,{role:o});for(const s of n.mailboxes){const o=r.get(s.mailboxId);e.set(s.mailboxId,{...o?{role:o}:{},providerPath:s.fullPath})}}return e}function KTe(t,e){const n=e[0];if(!t)return n?{mailboxId:n}:{};for(const s of e){const o=t.get(s);if(o&&LJ(o)!==void 0)return{mailboxId:s,folder:o}}if(!n)return{};const r=t.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const Zwe=A.createContext(null),YTe=()=>A.useContext(Zwe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:Ywe,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},Xwe=()=>Wn(()=>import("./mail-D_PjavXJ.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),Qwe=pd({q:wr().optional()}),Jwe=fr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery($Ce()),t.prefetchQuery({...QCe(),staleTime:6e4})},component:or(Xwe,"component"),validateSearch:Qwe}),exe=()=>Wn(()=>import("./onboarding-SKdeQkz0.js"),__vite__mapDeps([12,13,3,9,5,4])),txe=fr("/onboarding")({component:or(exe,"component")}),nxe=()=>Wn(()=>import("./settings-BwaJSNWB.js"),[]),ZTe=[{id:"accounts",label:"Accounts",icon:D.jsx(l8,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:D.jsx(EX,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:D.jsx(hX,{className:"size-4"})},{id:"filters",label:"Filters",icon:D.jsx(fX,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:D.jsx(mX,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:D.jsx(CX,{className:"size-4"})}],XTe={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},rxe=fr("/settings")({component:or(nxe,"component")}),sxe=()=>Wn(()=>import("./index-B77Nghmt.js"),__vite__mapDeps([14,7])),oxe=()=>Wn(()=>import("./index-DtqBFgK5.js"),[]),ixe=pd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),selectedMailboxId:wr().optional(),q:wr().optional()}),axe=fr("/mail/")({component:or(oxe,"component"),validateSearch:ixe,errorComponent:or(sxe,"errorComponent")}),lxe=()=>Wn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),uxe=pd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),q:wr().optional()}),cxe=fr("/mail/$mailboxId")({component:or(lxe,"component"),validateSearch:uxe}),dxe=()=>Wn(()=>import("./flagged-CQJvFPtw.js"),__vite__mapDeps([15,7])),fxe=()=>Wn(()=>import("./flagged-DtqBFgK5.js"),[]),hxe=pd({selectedMessageId:wr().optional(),q:wr().optional()}),pxe=fr("/mail/flagged")({component:or(fxe,"component"),validateSearch:hxe,errorComponent:or(dxe,"errorComponent")}),gxe=()=>Wn(()=>import("./outbox-DtqBFgK5.js"),[]),mxe=pd({selectedOutboxMessageId:wr().optional(),q:wr().optional()}),vxe=fr("/mail/outbox")({component:or(gxe,"component"),validateSearch:mxe}),yxe=()=>Wn(()=>import("./index-CffBlbpr.js"),[]),bxe=fr("/settings/")({component:or(yxe,"component")}),Sxe=()=>Wn(()=>import("./accounts-ByZa0CEH.js"),__vite__mapDeps([16,6,4,5,17,2,13,3,9,7,8])),Exe=pd({editAccountId:wr().optional(),focusSmtp:qwe().optional(),connected:wr().optional(),oauthError:wr().optional()}),Cxe=fr("/settings/accounts")({component:or(Sxe,"component"),validateSearch:Exe}),wxe=()=>Wn(()=>import("./advanced-CBoT2UpB.js"),__vite__mapDeps([18,17,2])),xxe=fr("/settings/advanced")({component:or(wxe,"component")}),_xe=()=>Wn(()=>import("./appearance-6D67BmVw.js"),__vite__mapDeps([19,17,2])),Axe=fr("/settings/appearance")({component:or(_xe,"component")}),Txe=()=>Wn(()=>import("./filters-Djgem6yu.js"),__vite__mapDeps([20,17,2,10,5,7])),Rxe=fr("/settings/filters")({component:or(Txe,"component")}),Ixe=()=>Wn(()=>import("./folders-D7dx0_Jq.js"),__vite__mapDeps([21,9,11,17,2,5,7])),Oxe=fr("/settings/folders")({component:or(Ixe,"component")}),Nxe=()=>Wn(()=>import("./senders-DiwKIfrY.js"),__vite__mapDeps([22,3,17,2,5,7,1,8])),Mxe=fr("/settings/senders")({component:or(Nxe,"component")}),Pxe=()=>Wn(()=>import("./suggested-vips-BSdj6Ci8.js"),[]),kxe=fr("/settings/suggested-vips")({component:or(Pxe,"component")}),Dxe=vwe.update({id:"/",path:"/",getParentRoute:()=>pp}),gp=Jwe.update({id:"/mail",path:"/mail",getParentRoute:()=>pp}),Lxe=txe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>pp}),Ni=rxe.update({id:"/settings",path:"/settings",getParentRoute:()=>pp}),Uxe=axe.update({id:"/",path:"/",getParentRoute:()=>gp}),Fxe=cxe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>gp}),zxe=pxe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>gp}),jxe=vxe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>gp}),Bxe=bxe.update({id:"/",path:"/",getParentRoute:()=>Ni}),Hxe=Cxe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Ni}),$xe=xxe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Ni}),qxe=Axe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Ni}),Wxe=Rxe.update({id:"/filters",path:"/filters",getParentRoute:()=>Ni}),Gxe=Oxe.update({id:"/folders",path:"/folders",getParentRoute:()=>Ni}),Vxe=Mxe.update({id:"/senders",path:"/senders",getParentRoute:()=>Ni}),Kxe=kxe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Ni}),Yxe={MailMailboxIdRoute:Fxe,MailFlaggedRoute:zxe,MailOutboxRoute:jxe,MailIndexRoute:Uxe},Zxe=gp._addFileChildren(Yxe),Xxe={SettingsAccountsRoute:Hxe,SettingsAdvancedRoute:$xe,SettingsAppearanceRoute:qxe,SettingsFiltersRoute:Wxe,SettingsFoldersRoute:Gxe,SettingsSendersRoute:Vxe,SettingsSuggestedVipsRoute:Kxe,SettingsIndexRoute:Bxe},Qxe=Ni._addFileChildren(Xxe),Jxe={IndexRoute:Dxe,MailRoute:Zxe,OnboardingRoute:Lxe,SettingsRoute:Qxe},e_e=pp._addFileChildren(Jxe)._addFileTypes(),t_e=(t,e)=>{const n=kpe({routeTree:e_e,context:{queryClient:t},defaultPreload:"intent"});return n.subscribe("onResolved",r=>{e.recordPageView(r.toLocation.pathname)}),n},qe=t=>typeof t=="string",zf=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},v5=t=>t==null?"":""+t,n_e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},r_e=/###/g,y5=t=>t&&t.indexOf("###")>-1?t.replace(r_e,"."):t,b5=t=>!t||qe(t),hh=(t,e,n)=>{const r=qe(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(b5(t))return{};const o=y5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return b5(t)?{}:{obj:t,k:y5(r[s])}},S5=(t,e,n)=>{const{obj:r,k:s}=hh(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=hh(t,a,Object);for(;u.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),u=hh(t,a,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},s_e=(t,e,n,r)=>{const{obj:s,k:o}=hh(t,e,Object);s[o]=s[o]||[],s[o].push(n)},dy=(t,e)=>{const{obj:n,k:r}=hh(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},o_e=(t,e,n)=>{const r=dy(t,n);return r!==void 0?r:dy(e,n)},AB=(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]):AB(t[r],e[r],n):t[r]=e[r]);return t},ac=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var i_e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const a_e=t=>qe(t)?t.replace(/[&<>"'\/]/g,e=>i_e[e]):t;class l_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 u_e=[" ",",","?","!",";"],c_e=new l_e(20),d_e=(t,e,n)=>{e=e||"",n=n||"";const r=u_e.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=c_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},_A=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},fy=t=>t?.replace("_","-"),f_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 hy{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||f_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 hy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new hy(this.logger,e)}}var wo=new hy;class Ob{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 E5 extends Ob{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=dy(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:_A(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),S5(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=dy(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?AB(c,r,o):c={...c,...r},S5(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 TB={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 C5={},w5=t=>!qe(t)&&typeof t!="boolean"&&typeof t!="number";class py extends Ob{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),n_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&&!d_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,_=n.count!==void 0&&!qe(n.count),T=py.hasDefaultValue(n),R=_?this.pluralResolver.getSuffix(f,n.count,n):"",M=n.ordinal&&_?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",O=_&&!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=w5(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),j=F?[]:{},W=F?S:y;for(const Y in P)if(Object.prototype.hasOwnProperty.call(P,Y)){const ne=`${W}${o}${Y}`;T&&!m?j[Y]=this.translate(ne,{...n,defaultValue:w5(I)?I[Y]:void 0,joinArrays:!1,ns:u}):j[Y]=this.translate(ne,{...n,joinArrays:!1,ns:u}),j[Y]===ne&&(j[Y]=P[Y])}m=j}}else if(w&&qe(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,e,n,r));else{let F=!1,j=!1;!this.isValidLookup(m)&&T&&(F=!0,m=I),this.isValidLookup(m)||(j=!0,m=a);const Y=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:m,ne=T&&I!==m&&this.options.updateMissing;if(j||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&&_?$.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),j&&m===a&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${a}`),(j||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=TB.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,!C5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(C5[`${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 _=[p];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(_,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&&(_.push(p+R),n.ordinal&&R.indexOf(O)===0&&_.push(p+R.replace(O,this.options.pluralSeparator)),y&&_.push(p+M)),S){const I=`${p}${this.options.contextSeparator}${n.context}`;_.push(I),m&&(_.push(I+R),n.ordinal&&R.indexOf(O)===0&&_.push(I+R.replace(O,this.options.pluralSeparator)),y&&_.push(I+M))}}let T;for(;T=_.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 x5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(e){if(e=fy(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=fy(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 _5={zero:0,one:1,two:2,few:3,many:4,other:5},A5={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class h_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=fy(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!"),A5;if(!e.match(/-|_/))return A5;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)=>_5[s]-_5[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 T5=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=o_e(t,e,n);return!o&&s&&qe(n)&&(o=_A(t,n,r),o===void 0&&(o=_A(e,n,r))),o},_x=t=>t.replace(/\$/g,"$$$$");class p_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:_}=e.interpolation;this.escape=n!==void 0?n:a_e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?ac(o):a||"{{",this.suffix=u?ac(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=p?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=m?ac(m):y||ac("$t("),this.nestingSuffix=S?ac(S):E||ac(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=w||1e3,this.alwaysFormat=_!==void 0?_:!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=T5(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(T5(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=>_x(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?_x(this.escape(y)):_x(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=v5(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=v5(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 g_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}},lc=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(fy(r),s),e[a]=u),u(n)}};class m_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("formatter"),this.options=e,this.formats={number:lc((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:lc((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:lc((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:lc((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:lc((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()]=lc(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}=g_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 v_e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class y_e extends Ob{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=>{s_e(c.loaded,[o],a),v_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 R5=()=>({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}}),I5=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),Um=()=>{},b_e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Wh extends Ob{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=I5(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=R5();this.options={...s,...this.options,...I5(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=m_e;const g=new x5(this.options);this.store=new E5(this.options.resources,this.options);const m=this.services;m.logger=wo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new h_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 p_e(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new y_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 py(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=Um),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=zf(),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]:Um;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=zf();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=Um),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"&&TB.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=zf();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=zf();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=zf();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 x5(R5());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 Wh(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Um;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new Wh(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 E5(u,s),o.services.resourceStore=o.store}return o.translator=new py(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 pr=Wh.createInstance();pr.createInstance=Wh.createInstance;pr.createInstance;pr.dir;pr.init;pr.loadResources;pr.reloadResources;pr.use;pr.changeLanguage;pr.getFixedT;pr.t;pr.exists;pr.setDefaultNamespace;pr.hasLoadedNamespace;pr.loadNamespaces;pr.loadLanguages;const{slice:S_e,forEach:E_e}=[];function C_e(t){return E_e.call(S_e.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function w_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 O5=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,x_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(!O5.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!O5.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},N5={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=x_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 __e={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return N5.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&N5.create(n,t,r,s,o)}},A_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}},T_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 uc=null;const M5=()=>{if(uc!==null)return uc;try{if(uc=typeof window<"u"&&window.localStorage!==null,!uc)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{uc=!1}return uc};var R_e={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&M5())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&M5()&&window.localStorage.setItem(n,t)}};let cc=null;const P5=()=>{if(cc!==null)return cc;try{if(cc=typeof window<"u"&&window.sessionStorage!==null,!cc)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{cc=!1}return cc};var I_e={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&P5())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&P5()&&window.sessionStorage.setItem(n,t)}},O_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}},N_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}},M_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}},P_e={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 RB=!1;try{document.cookie,RB=!0}catch{}const IB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];RB||IB.splice(1,1);const k_e=()=>({order:IB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class OB{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=C_e(n,this.options||{},k_e()),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(__e),this.addDetector(A_e),this.addDetector(R_e),this.addDetector(I_e),this.addDetector(O_e),this.addDetector(N_e),this.addDetector(M_e),this.addDetector(P_e),this.addDetector(T_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&&!w_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)}))}}OB.type="languageDetector";function D_e(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=L_e(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 L_e(t,e){if(t){if(typeof t=="string")return k5(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)?k5(t,e):void 0}}function k5(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 AA(t){"@babel/helpers - typeof";return AA=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},AA(t)}var NB=["__proto__","constructor","prototype"];function MB(t){return!(typeof t!="string"||t.length===0||t.length>128||NB.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function PB(t){return!(!MB(t)||t.indexOf("/")>-1)}function U_e(t){return MB(t)}var F_e={lng:PB,ns:U_e};function Fm(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function z_e(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 kB(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":AA(XMLHttpRequest))==="object"}function j_e(t){return!!t&&typeof t.then=="function"}function B_e(t){return j_e(t)?t:Promise.resolve(t)}var H_e=/\{\{(.+?)\}\}/g;function D5(t,e){var n=!1,r=t.replace(H_e,function(s,o){var a=o.trim();if(NB.indexOf(a)>-1)return s;var u=e[a];if(u==null)return s;var c=F_e[a]||PB,f=String(u).split("+"),p=D_e(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 L5(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 U5(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?L5(Object(n),!0).forEach(function(r){$_e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $_e(t,e,n){return(e=q_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q_e(t){var e=W_e(t,"string");return Ql(e)=="symbol"?e:e+""}function W_e(t,e){if(Ql(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ql(t){"@babel/helpers - typeof";return Ql=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},Ql(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 Gh;kB()&&(typeof global<"u"&&global.XMLHttpRequest?Gh=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Gh=window.XMLHttpRequest));var gy;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?gy=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(gy=window.ActiveXObject));typeof $a!="function"&&($a=void 0);if(!$a&&!Gh&&!gy)try{Wn(()=>import("./browser-ponyfill-jVqk70DF.js").then(t=>t.b),[]).then(function(t){$a=t.default}).catch(function(){})}catch{}var DB=["__proto__","constructor","prototype"],TA=function(e,n){if(n&&Ql(n)==="object"){for(var r="",s=0,o=Object.keys(n);s<o.length;s++){var a=o[s];DB.indexOf(a)>-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},F5=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)},G_e=function(e,n,r,s){e.queryStringParams&&(n=TA(n,e.queryStringParams));var o=U5({},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=U5({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{F5(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]}),F5(n,u,s,c),e._omitFetchOptions=!0}catch(p){s(p)}}},V_e=function(e,n,r,s){r&&Ql(r)==="object"&&(r=TA("",r).slice(1)),e.queryStringParams&&(n=TA(n,e.queryStringParams));try{var o=Gh?new Gh:new gy("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];DB.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)}},K_e=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},$a&&n.indexOf("file:")!==0)return G_e(e,n,r,s);if(kB()||typeof ActiveXObject=="function")return V_e(e,n,r,s);s(new Error("No fetch and no xhr implementation found!"))};function Jc(t){"@babel/helpers - typeof";return Jc=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},Jc(t)}function z5(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 Ax(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?z5(Object(n),!0).forEach(function(r){LB(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Y_e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z_e(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,UB(r.key),r)}}function X_e(t,e,n){return e&&Z_e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function LB(t,e,n){return(e=UB(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function UB(t){var e=Q_e(t,"string");return Jc(e)=="symbol"?e:e+""}function Q_e(t,e){if(Jc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Jc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var J_e=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 LB({},r,s||"")},parseLoadPayload:function(n,r){},request:K_e,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},FB=(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]:{};Y_e(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return X_e(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=Ax(Ax(Ax({},J_e()),this.options||{}),s),this.allOptions=o,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Jc(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=B_e(c),c.then(function(f){if(!f)return a(null,{});var p=D5(f,{lng:n.join("+"),ns:s.join("+")});if(p==null){var g=n.map(Fm).join(", "),m=s.map(Fm).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=Fm(z_e(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+": "+Fm(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=D5(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)})})})}}}])})();FB.type="backend";pr.use(FB).use(OB).use(VEe).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 eAe=({authProvider:t,rootElementId:e="root"})=>{cee(),DEe(),t.configure(),ige(t);const n=PEe();eee(n);const r=new Nfe({queryCache:new YF({onError:cge}),mutationCache:new KF({onError:dge}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=t_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(gB.Provider,{value:n,children:D.jsxs(Mfe,{client:r,children:[D.jsx(uge,{value:t,children:D.jsx(a,{children:D.jsx(Upe,{router:s})})}),!1]})})}))};eAe({authProvider:lfe});export{Hfe as $,uX as A,Km as B,JM as C,iQ as D,gAe as E,dX as F,ip as G,tr as H,pX as I,f_ as J,jF as K,XF as L,gX as M,Pfe as N,u8 as O,dAe as P,Afe as Q,z as R,yX as S,bX as T,Lfe as U,jfe as V,Ufe as W,mh as X,Ffe as Y,Ur as Z,kN as _,qn as a,gTe as a$,jL as a0,zfe as a1,$fe as a2,fs as a3,Wr as a4,ipe as a5,zTe as a6,iR as a7,fTe as a8,Gwe as a9,XCe as aA,FCe as aB,TTe as aC,JCe as aD,OTe as aE,RTe as aF,ATe as aG,STe as aH,m5 as aI,Vwe as aJ,x7 as aK,NTe as aL,ITe as aM,BTe as aN,FTe as aO,UTe as aP,KTe as aQ,oAe as aR,QCe as aS,Py as aT,BCe as aU,Bl as aV,A7 as aW,DCe as aX,bB as aY,yCe as aZ,CCe as a_,Cx as aa,bAe as ab,IP as ac,pee as ad,w7 as ae,QEe as af,WTe as ag,YTe as ah,eTe as ai,qfe as aj,GCe as ak,e8 as al,PTe as am,DTe as an,MTe as ao,bTe as ap,$Ce as aq,HTe as ar,YCe as as,EB as at,LTe as au,jTe as av,kTe as aw,Wn as ax,ETe as ay,qCe as az,dn as b,By as b$,pTe as b0,mTe as b1,vTe as b2,CTe as b3,pAe as b4,nTe as b5,GTe as b6,VTe as b7,qa as b8,hCe as b9,ZU as bA,tTe as bB,lTe as bC,UCe as bD,cTe as bE,uTe as bF,MJ as bG,uAe as bH,NJ as bI,dTe as bJ,hTe as bK,xx as bL,qTe as bM,_Te as bN,WCe as bO,xh as bP,Ofe as bQ,HF as bR,Ng as bS,m9 as bT,No as bU,xT as bV,Ai as bW,joe as bX,Ti as bY,Moe as bZ,g9 as b_,X8 as ba,Ay as bb,Zwe as bc,iAe as bd,JA as be,I7 as bf,HCe as bg,vAe as bh,oTe as bi,rTe as bj,aTe as bk,pd as bl,qwe as bm,wr as bn,$Te as bo,wTe as bp,xTe as bq,Cxe as br,sTe as bs,iTe as bt,ZTe as bu,XTe as bv,yTe as bw,KJ as bx,fAe as by,VJ as bz,s8 as c,X9 as c0,nse as c1,qoe as c2,Joe as c3,sse as c4,Xre as c5,Uy as c6,aT as c7,u9 as c8,Zoe as c9,Yy as cA,np as cB,Xoe as cC,ep as cD,Qoe as cE,Woe as cF,Goe as ca,use as cb,Boe as cc,NT as cd,f9 as ce,ose as cf,koe as cg,Doe as ch,Tte as ci,su as cj,yte as ck,vte as cl,iT as cm,tF as cn,Poe as co,Ete as cp,lse as cq,Foe as cr,lT as cs,Loe as ct,nie as cu,iF as cv,sAe as cw,Jh as cx,hAe as cy,TT as cz,cP as d,cX as e,oQ as f,Wx as g,aAe as h,l8 as i,D as j,BQ as k,vX as l,FJ as m,LJ as n,cAe as o,lAe as p,$Q as q,A as r,nS as s,SX as t,WQ as u,J6 as v,i8 as w,tAe as x,nAe as y,mAe as z};
|