@remit/web-client-dist 0.0.64 → 0.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/assets/{ComposeBody-D5gT-Z1h.js → ComposeBody-DWLNqWy1.js} +1 -1
  2. package/assets/{ErrorState-CWKsH8_D.js → ErrorState-zQ-IFgJ3.js} +1 -1
  3. package/assets/{OnboardingWizard-D6BIlSOh.js → OnboardingWizard-C3N0pWHQ.js} +1 -1
  4. package/assets/{account-form-helpers-XJmZQs_D.js → account-form-helpers-DAFnIqfh.js} +1 -1
  5. package/assets/{accounts-CdGo8uCR.js → accounts-8Ox-gk-o.js} +1 -1
  6. package/assets/{advanced-BFB89Lu6.js → advanced-B6gVjWyH.js} +1 -1
  7. package/assets/{appearance-P5qV4DJc.js → appearance-D5PIZeXN.js} +1 -1
  8. package/assets/{avatar-Diqjfu2j.js → avatar-BfrO48S7.js} +1 -1
  9. package/assets/{browser-ponyfill-BD4ZXkpR.js → browser-ponyfill-Dfy5QWS0.js} +1 -1
  10. package/assets/{filter-status-D4dFdNKu.js → filter-status-DXynX7LO.js} +1 -1
  11. package/assets/{filters-D5AzuakN.js → filters-DHmaj_hM.js} +1 -1
  12. package/assets/{flagged-DfRDTtRo.js → flagged-CNo33zoi.js} +1 -1
  13. package/assets/{folder-kVOTZNEJ.js → folder-B5VC_MA7.js} +1 -1
  14. package/assets/{folders-C5Rcddq7.js → folders-Bw4yKKyN.js} +1 -1
  15. package/assets/{index-1rowJNqr.js → index-By0h5QCQ.js} +24 -24
  16. package/assets/{index-B-zNKpVX.js → index-WbnePXMj.js} +1 -1
  17. package/assets/index-vEi8X3dC.js +1 -0
  18. package/assets/{kbd-CzPudnoN.js → kbd-B7D75neO.js} +1 -1
  19. package/assets/{mail-Cx1godIL.js → mail-B18tS3Yk.js} +4 -4
  20. package/assets/{onboarding-N4ejn3Lf.js → onboarding-0puqjekg.js} +1 -1
  21. package/assets/{select-DQvKf_sX.js → select-CE89vctn.js} +1 -1
  22. package/assets/{senders-Dw0Ikyfj.js → senders-D_eO87MQ.js} +1 -1
  23. package/assets/settings-DdSQDqcM.js +1 -0
  24. package/assets/{settings-screen-BPq1jSQy.js → settings-screen-Bgp_9XC1.js} +1 -1
  25. package/assets/{suggested-vips-CfvFoju2.js → suggested-vips-DjCfgEoc.js} +1 -1
  26. package/assets/{useDebouncedValue-DXZpYBiT.js → useDebouncedValue-CYkzCyoq.js} +1 -1
  27. package/assets/{useMutation-9IG6GBME.js → useMutation-B_hiVZlI.js} +1 -1
  28. package/assets/{useSignature-BXashaM-.js → useSignature-CEIl8V9j.js} +1 -1
  29. package/index.html +1 -1
  30. package/package.json +1 -1
  31. package/assets/index-YHbgggTJ.js +0 -1
  32. package/assets/settings-C10IgfEq.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mail-Cx1godIL.js","assets/useDebouncedValue-DXZpYBiT.js","assets/avatar-Diqjfu2j.js","assets/kbd-CzPudnoN.js","assets/account-form-helpers-XJmZQs_D.js","assets/useMutation-9IG6GBME.js","assets/useSignature-BXashaM-.js","assets/ErrorState-CWKsH8_D.js","assets/format-CnrKvE9L.js","assets/select-DQvKf_sX.js","assets/filter-status-D4dFdNKu.js","assets/folder-kVOTZNEJ.js","assets/onboarding-N4ejn3Lf.js","assets/OnboardingWizard-D6BIlSOh.js","assets/index-B-zNKpVX.js","assets/flagged-DfRDTtRo.js","assets/accounts-CdGo8uCR.js","assets/settings-screen-BPq1jSQy.js","assets/advanced-BFB89Lu6.js","assets/appearance-P5qV4DJc.js","assets/filters-D5AzuakN.js","assets/folders-C5Rcddq7.js","assets/senders-Dw0Ikyfj.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mail-B18tS3Yk.js","assets/useDebouncedValue-CYkzCyoq.js","assets/avatar-BfrO48S7.js","assets/kbd-B7D75neO.js","assets/account-form-helpers-DAFnIqfh.js","assets/useMutation-B_hiVZlI.js","assets/useSignature-CEIl8V9j.js","assets/ErrorState-zQ-IFgJ3.js","assets/format-CnrKvE9L.js","assets/select-CE89vctn.js","assets/filter-status-DXynX7LO.js","assets/folder-B5VC_MA7.js","assets/onboarding-0puqjekg.js","assets/OnboardingWizard-C3N0pWHQ.js","assets/index-WbnePXMj.js","assets/flagged-CNo33zoi.js","assets/accounts-8Ox-gk-o.js","assets/settings-screen-Bgp_9XC1.js","assets/advanced-B6gVjWyH.js","assets/appearance-D5PIZeXN.js","assets/filters-DHmaj_hM.js","assets/folders-Bw4yKKyN.js","assets/senders-D_eO87MQ.js"])))=>i.map(i=>d[i]);
2
2
  function F5(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 M1={exports:{}},mf={};var _N;function B$(){if(_N)return mf;_N=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 AN;function H$(){return AN||(AN=1,M1.exports=B$()),M1.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 TN={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=TN[r];if(!(TN[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 gy=(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 z5{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 z5("__default__"),pv=new z5("internal-hub"),TA=()=>{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."})},RA={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."}},IA=gy(K$);function lt(t){let e=!0;t?e=!!t.userPoolId&&!!t.userPoolClientId:e=!1,IA(e,Eo.AuthUserPoolException)}function my(t){const e=!!t?.loginWith?.oauth?.domain&&!!t?.loginWith?.oauth?.redirectSignOut&&!!t?.loginWith?.oauth?.redirectSignIn&&!!t?.loginWith?.oauth?.responseType;IA(e,Eo.OAuthNotConfigureException)}function zm(t){const e=!!t?.identityPoolId;IA(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(RA.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 j5=t=>{const e=Reflect.ownKeys(t);for(const n of e){const r=t[n];(r&&typeof r=="object"||typeof r=="function")&&j5(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},RN=t=>t?.split(",")??[],Q$=({domain:t,scope:e,redirectSignIn:n,redirectSignOut:r,responseType:s})=>({domain:t,scopes:e,redirectSignIn:RN(n),redirectSignOut:RN(r),responseType:s}),J$=t=>t.map(e=>{const n=e.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),B5=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 P1;const tq=new Uint8Array(16);function nq(){if(!P1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");P1=crypto.getRandomValues.bind(crypto)}return P1(tq)}const rq=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),IN={randomUUID:rq};function sq(t,e,n){if(IN.randomUUID&&!e&&!t)return IN.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:H5(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:H5(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 H5(t){return pq[t]}const ON={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function gq(t=[]){return t.reduce((e,n)=>(ON[n]!==void 0&&e.push(ON[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 $5=t=>Object.keys(t).some(e=>e.startsWith("aws_"))?X$(t):oq(t)?hq(t):t;var NN=function(){return NN=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},NN.apply(this,arguments)};function J_e(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 eAe(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 q5(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(q5(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=q5(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 MN;(function(t){t.Record="1",t.IdentifyUser="2"})(MN||(MN={}));var PN;(function(t){t.GraphQl="1",t.Get="2",t.Post="3",t.Put="4",t.Patch="5",t.Del="6",t.Head="7"})(PN||(PN={}));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 kN;(function(t){t.Subscribe="1",t.GraphQl="2"})(kN||(kN={}));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 Ax;(function(t){t.SyncMessages="1",t.IdentifyUser="2",t.NotifyMessageInteraction="3"})(Ax||(Ax={}));var DN;(function(t){t.None="0"})(DN||(DN={}));var LN;(function(t){t.Convert="1",t.Identify="2",t.Interpret="3"})(LN||(LN={}));var UN;(function(t){t.Subscribe="1"})(UN||(UN={}));var FN;(function(t){t.InitializePushNotifications="1",t.IdentifyUser="2"})(FN||(FN={}));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",vy=()=>typeof global<"u",ed=()=>typeof window<"u",W5=()=>typeof document<"u",OA=()=>typeof process<"u",ph=(t,e)=>!!Object.keys(t).find(n=>n.startsWith(e));var zN={};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 W5()&&n().some(e)}function Oq(){return OA()&&typeof zN<"u"&&!!Object.keys(zN).find(t=>t.includes("react"))}function Nq(){return ed()&&ph(window,"__VUE")}function Mq(){return vy()&&ph(global,"__VUE")}var jN={};function Pq(){return ed()&&ph(window,"__SVELTE")}function kq(){return OA()&&typeof jN<"u"&&!!Object.keys(jN).find(t=>t.includes("svelte"))}function Dq(){return ed()&&window.next&&typeof window.next=="object"}function Lq(){return vy()&&(ph(global,"__next")||ph(global,"__NEXT"))}function Uq(){return ed()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function Fq(){return vy()&&typeof global.__NUXT_PATHS__<"u"}var BN={};function zq(){const t=!!(W5()&&document.querySelector("[ng-version]")),e=!!(ed()&&typeof window.ng<"u");return t||e}function jq(){return OA()&&typeof BN=="object"&&BN.npm_lifecycle_script?.startsWith("ng ")||!1}function Bq(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function Hq(){return vy()&&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 k1=[];let Tx=!1;const Gq=10,Vq=10,Kq=1e3,G5=()=>{if(!th){if(th=Wq(),Tx)for(;k1.length;)k1.pop()?.();else k1.forEach(t=>{t()});HN(xn.ServerSideUnknown,Gq),HN(xn.WebUnknown,Vq)}return th};function Yq(){th=void 0}function HN(t,e){th===t&&!Tx&&setTimeout(()=>{Yq(),Tx=!0,setTimeout(G5,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",G5()]),t&&e){const r=Zq(t,e);r&&r.forEach(s=>{n.push(s)})}return n},yy=t=>Jq(t).map(([r,s])=>r&&s?`${r}/${s}`:r).join(" "),by=()=>typeof window<"u"&&typeof window.document<"u",$N=new rr("Auth");class eW{configure(e,n){this.authConfig=e,this.authOptions=n,e&&e.Cognito?.userPoolEndpoint&&$N.warn(qN("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&$N.warn(qN("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 qN=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=$5(e);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=j5(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}[B5](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,V5=(t,e)=>t.Auth.fetchAuthSession(e),Sy=t=>V5(Ht,t);function K5(){return Ht.Auth.clearCredentials()}const Ey=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:Ey(t)})},Vh=async t=>{if(!t.body)throw new Error("Missing response payload");const e=await t.body.json();return Object.assign(e,{$metadata:Ey(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 Y5=3,WN="amz-sdk-invocation-id",oW="amz-sdk-request",GN=300*1e3,Z5=t=>{const n=sW(GN)(t);return n===!1?GN:n},iW=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],aW=t=>!!t&&iW.includes(t),X5=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),Q5="cognito-identity",J5={service:Q5,retryDecider:X5(td),computeDelay:Z5,cache:"no-store"},hW=({maxAttempts:t=Y5,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 VN(p,f),p;throw VN(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},VN=(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[WN]||(n.headers[WN]=gW()),t(n)},vW=({maxAttempts:t=Y5})=>(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)}},NA=(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)},D1=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:D1(()=>u.text()),blob:D1(()=>u.blob()),json:D1(()=>u.json())});return{...f,body:p}},e6=NA(SW,[yW,mW,hW,vW]),EW=()=>t=>async function(n){return n.headers["cache-control"]="no-store",t(n)},t6=NA(e6,[EW]),n6=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"}),KN=t=>Rn(t6,n6("GetCredentialsForIdentity"),xW,{...J5,...t,userAgentValue:yy()}),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:Ey(t)}},_W=({Expiration:t,...e}={})=>({...e,Expiration:t&&new Date(t*1e3)}),AW=t=>Rn(t6,n6("GetId"),TW,{...J5,...t,userAgentValue:yy()}),TW=async t=>{if(t.statusCode>=300)throw await td(t);return{IdentityId:(await Vh(t)).IdentityId,$metadata:Ey(t)}},r6={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},RW={partitions:[r6,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},s6=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 r6.outputs.dnsSuffix},Wa=URL,IW=({region:t})=>({url:new Wa(`https://${Q5}.${t}.${s6(t)}`)});class jf extends Hr{constructor(){super({name:Pa.PlatformNotSupported,message:"Function not supported on current platform"})}}class o6{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 i6{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 a6=new rr("CoreStorageUtils"),OW=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{a6.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new i6},l6=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return a6.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new i6}};class NW extends o6{constructor(){super(OW())}}class MW extends o6{constructor(){super(l6())}}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(l6())}}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 Rx(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 Rx(this.converter,Mg({},this.attributes,s))},withConverter:function(s){return Rx(Mg({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Pg=Rx(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=gy(zW),YN=new rr("I18n");let Dg={language:null},js=null,u6=class bl{static configure(e){return YN.debug("configure I18n"),e&&(Dg=Object.assign({},Dg,e.I18n||e),bl.createInstance()),Dg}static getModuleName(){return"I18n"}static createInstance(){YN.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}};u6.createInstance();const jW=t=>{const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(t);TA().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 ZN({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 TA().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 MA{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 MA(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 c6={[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}=c6[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 Ix(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 XN(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 QN;(function(t){t.ConcurrentModificationException="ConcurrentModificationException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(QN||(QN={}));var JN;(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"})(JN||(JN={}));var eM;(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"})(eM||(eM={}));var tM;(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"})(tM||(tM={}));var nM;(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"})(nM||(nM={}));var rM;(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"})(rM||(rM={}));var sM;(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"})(sM||(sM={}));var oM;(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"})(oM||(oM={}));var iM;(function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotFoundException="UserNotFoundException"})(iM||(iM={}));var aM;(function(t){t.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.ExternalServiceException="ExternalServiceException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceConflictException="ResourceConflictException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException"})(lM||(lM={}));var uM;(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"})(uM||(uM={}));var cM;(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"})(cM||(cM={}));var dM;(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"})(dM||(dM={}));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 fM;(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"})(fM||(fM={}));var hM;(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"})(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.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"})(pM||(pM={}));var Ox;(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"})(Ox||(Ox={}));var gM;(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"})(gM||(gM={}));var mM;(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"})(mM||(mM={}));var vM;(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"})(vM||(vM={}));var yM;(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"})(yM||(yM={}));var bM;(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"})(bM||(bM={}));const Cy="UserUnAuthenticatedException",YW="UserAlreadyAuthenticatedException",ZW="DeviceMetadataNotFoundException",d6="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:Cy,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:Cy,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:Cy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function f6(t){if(dG(t))throw aG;if(!cG(t))throw lG}function h6(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 p6(t){return t?.accessToken||t?.idToken}function cG(t){return p6(t)&&t?.refreshToken}function dG(t){return p6(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 wy=async()=>fG(Ht),Nt=(t,e)=>yy({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=NA(e6,[mG]),g6="cognito-idp",Hn={service:g6,retryDecider:X5(td),computeDelay:Z5,get userAgentValue(){return yy()},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://${g6}.${t}.${s6(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);f6(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=gy(xG),SM="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(SM,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){lt(this.authConfig?.Cognito);const e=this.authConfig.Cognito.userPoolClientId;return`${SM}.${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)=>PA(wG)(`${t}`,e);function PA(t){const e=Object.values({...t});return(n,r)=>e.reduce((s,o)=>({...s,[o]:`${n}.${r}.${o}`}),{})}const EM="amplify-signin-with-hostedUI",ho="CognitoIdentityServiceProvider";class m6{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(EM),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(EM),[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)=>PA(uG)(t,e),Fr=new m6(Kh),Nx=[],RG=t=>{Nx.push(t)},v6=()=>{for(;Nx.length;)Nx.pop()?.()};class IG{constructor(){this.waitForInflightOAuth=by()?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&&ZN({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),o=ZN({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 wy()},"Auth",_o)}catch(t){throw t.name===Cy?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 y6(){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 y6();default:return t}},PG=t=>{let e=t(y6(),{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 b6(),kA();default:return t}},LG=t=>{const e=Number(t),n=Date.now();return e<=n},Qs=()=>{Ro.dispatch({type:"RESET_STATE"})},b6=()=>{for(const t of Object.values(di))ci.removeItem(t)},kA=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),UG=()=>{const t=ci.getItem(di.expiry);if(!t||LG(t))return b6(),kA();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(kA(),{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)))},CM="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 L1="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",wM="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:CM},[jt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:wM},[jt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:wM},[jt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:CM},[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:L1},[jt.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:L1},[jt.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:L1},[jt.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},rd=gy(Dc,Rs),S6=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 S6(t)},E6=()=>by()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Co=t=>kc.convert(new Uint8Array(t),{urlSafe:!0,skipPadding:!0}),nh=t=>Uint8Array.from(RA.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=E6();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,xM=(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 _M=typeof navigator<"u";_M&&xM&&navigator.appName==="Microsoft Internet Explorer"?(Ie.prototype.am=XG,Ia=30):_M&&xM&&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 DA=52;Ie.prototype.FV=Math.pow(2,DA);Ie.prototype.F1=DA-Ia;Ie.prototype.F2=2*Ia-DA;const JG="0123456789abcdefghijklmnopqrstuvwxyz",xy=[];let sd,As;sd=48;for(As=0;As<=9;++As)xy[sd++]=As;sd=97;for(As=10;As<36;++As)xy[sd++]=As;sd=65;for(As=10;As<36;++As)xy[sd++]=As;function AM(t){return JG.charAt(t)}function eV(t,e){const n=xy[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 LA(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=AM(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+=AM(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 UA(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)+UA(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-UA(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=LA(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=UA(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=LA(0);Ie.ONE=LA(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",C6={},Mx={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),C6[t]=e,Mx[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 Mx)e[n/2]=Mx[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e},FA=t=>{let e="";for(let n=0;n<t.byteLength;n++)e+=C6[t[n]];return e},Px=t=>{const e=new zl;e.update(t);const n=e.digestSync(),r=FA(n);return new Array(64-r.length).join("0")+r},$m=t=>Px(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)},zA=t=>{const e=new MA().random(t).toString();return Lc(e)},UV=()=>kc.convert(zA(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=Px(r),o=FA(zA(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=Px(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=FA(zA(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"],w6=()=>{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}`},x6=({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=RA.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);h6(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);h6(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=w6(),C={USERNAME:e?.USERNAME??t,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:x6({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 jA(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=w6(),C={USERNAME:y,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:x6({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 _6({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(jA,[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(jA,[e,S.ChallengeParameters,n,S.Session,p,r,o],E,o):S}const kx="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 _6({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(jA,[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=TM(RM(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:TM(RM(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(kx)?n.replace(kx,""):n):[]}function iK(t){if(!t)return{};const e={};return Object.entries(t).forEach(([n,r])=>{r&&(e[`${kx}${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(HJ);var uAe=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(jJ,null):u,f=t.pullingContent,p=f===void 0?z.createElement(BJ,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 $J=()=>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))]}),qJ=()=>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))}),ZA=()=>D.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[D.jsx($J,{}),D.jsx(qJ,{})]}),XA="e7385e1f8345490b4de7e2c1deddd0ccd69e4137",WJ="2026-07-20T22:45:24.679Z",GJ=XA.slice(0,7),cAe=`https://github.com/remit-mail/reader/commit/${XA}`,VJ="https://github.com/remit-mail/reader/issues/new";class Vx 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 Vx)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,My=t=>{const e=ud(t);return e!==void 0&&e>=500&&e<=599},Py=t=>!!(typeof DOMException<"u"&&t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"),KJ=()=>typeof navigator<"u"&&navigator.onLine===!1,Y8=t=>Py(t)||K8(t)?!1:t instanceof Q6?!0:KJ(),YJ=t=>!K8(t)&&!Py(t)&&!Y8(t),Z8=t=>My(t)||YJ(t),ZJ=t=>t?.softError===!0,X8=(t,e)=>My(t)?!0:Py(t)||Y8(t)?!1:Z8(t)?!0:!ZJ(e),XJ=t=>My(t),Kx=new Set;let Q8=null,J8=null;const QJ=t=>{J8=t},JJ=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.",eee=()=>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:eee(),at:Date.now(),recoverable:e?.recoverable??XJ(t),stack:t instanceof Error?t.stack:void 0,componentStack:e?.componentStack};Q8=n,iee(`Fatal: ${n.message} [${n.correlationId}]`),J8?.recordError(JJ(t),{fatal:"true",correlationId:n.correlationId});for(const r of Kx)r(n);return n},tee=t=>(Kx.add(t),()=>{Kx.delete(t)}),nee=()=>Q8,ree=20,Ym=[],see=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function oee(t){return typeof t!="string"?!1:see.has(t.replace(/\.\s*$/,""))}function Zm(t){Ym.push(t),Ym.length>ree&&Ym.shift()}function iee(t){Zm(t)}function aee(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 lee(){const t=console.error.bind(console);console.error=(...e)=>{Zm(aee(e)),t(...e)},window.addEventListener("error",e=>{oee(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 uee(){return Ym.slice()}const aS=7500,AP=`
148
+ }`;V8(HJ);var uAe=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(jJ,null):u,f=t.pullingContent,p=f===void 0?z.createElement(BJ,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 $J=()=>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))]}),qJ=()=>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))}),ZA=()=>D.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[D.jsx($J,{}),D.jsx(qJ,{})]}),XA="cc679080e253fd69ecec4f9ae4863c48ca53e9be",WJ="2026-07-21T07:06:02.174Z",GJ=XA.slice(0,7),cAe=`https://github.com/remit-mail/reader/commit/${XA}`,VJ="https://github.com/remit-mail/reader/issues/new";class Vx 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 Vx)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,My=t=>{const e=ud(t);return e!==void 0&&e>=500&&e<=599},Py=t=>!!(typeof DOMException<"u"&&t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"),KJ=()=>typeof navigator<"u"&&navigator.onLine===!1,Y8=t=>Py(t)||K8(t)?!1:t instanceof Q6?!0:KJ(),YJ=t=>!K8(t)&&!Py(t)&&!Y8(t),Z8=t=>My(t)||YJ(t),ZJ=t=>t?.softError===!0,X8=(t,e)=>My(t)?!0:Py(t)||Y8(t)?!1:Z8(t)?!0:!ZJ(e),XJ=t=>My(t),Kx=new Set;let Q8=null,J8=null;const QJ=t=>{J8=t},JJ=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.",eee=()=>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:eee(),at:Date.now(),recoverable:e?.recoverable??XJ(t),stack:t instanceof Error?t.stack:void 0,componentStack:e?.componentStack};Q8=n,iee(`Fatal: ${n.message} [${n.correlationId}]`),J8?.recordError(JJ(t),{fatal:"true",correlationId:n.correlationId});for(const r of Kx)r(n);return n},tee=t=>(Kx.add(t),()=>{Kx.delete(t)}),nee=()=>Q8,ree=20,Ym=[],see=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function oee(t){return typeof t!="string"?!1:see.has(t.replace(/\.\s*$/,""))}function Zm(t){Ym.push(t),Ym.length>ree&&Ym.shift()}function iee(t){Zm(t)}function aee(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 lee(){const t=console.error.bind(console);console.error=(...e)=>{Zm(aee(e)),t(...e)},window.addEventListener("error",e=>{oee(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 uee(){return Ym.slice()}const aS=7500,AP=`
149
149
  … (truncated — the copy action on this screen has the full report)`;function TP(t){return{appSha:XA,appShortSha:GJ,appBuildTime:WJ,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:uee(),errorMessage:t?.errorMessage,stack:t?.stack,componentStack:t?.componentStack,quarantine:t?.quarantine,title:t?.title}}function lS(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,"",lS(o),"",t.quarantine.disclaimer,"")}const s=e?.stack??t.stack;return s&&r.push("## Stacktrace",lS(s),""),t.componentStack&&r.push("## Component stack",lS(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)}},Nw=n,N
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 hw.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)},hw}var Pw={},kw={},EL;function PF(){return EL||(EL=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}}})(kw)),kw}var CL;function uce(){return CL||(CL=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)}})(Pw)),Pw}var Dw={},wL;function cce(){if(wL)return Dw;wL=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 Dw.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},Dw}var xL;function dce(){if(xL)return nc;xL=1;const t=que(),e=lce(),n=uce(),r=cce();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 fce=dce();const hce=qa(fce),pce=t=>t==="signIn"||t==="signUp",VT=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:gce,getConfirmingText:mce,getBackToSignInText:vce,getResendCodeText:yce}=kn,ob=()=>{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=VT(n)&&a&&r;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:mce()},gce()),u&&z.createElement(Jt,{onClick:r,type:"button"},yce()),z.createElement(Jt,{onClick:e,type:"button",variation:"link",size:"small"},vce()))},bce=new rr("SetupTotp-logger"),{getSetupTotpText:Sce,getCopiedText:Ece,getLoadingText:Cce}=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=fre(C,w,n),M=await hce.toDataURL(R);y(M)}catch(R){bce.error(R)}finally{g(!1)}},[C,w,n]);A.useEffect(()=>{m||_()},[_,m]);const T=()=>{navigator.clipboard.writeText(n),E(Ece())};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,Cce(),"…"):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(ob,null),A.createElement(f,null))))};Ua.Header=function(){return A.createElement(_r,{level:3},Sce())};Ua.Footer=function(){return null};const{getSubmitText:wce,getSubmittingText:xce}=kn,ib=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,xce(),"…"):z.createElement(z.Fragment,null,wce()),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)))},_ce=()=>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"})),Ace=()=>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"})),Tce=()=>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"}),Rce=()=>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(Tce,null):e==="google"?a=z.createElement(Ace,null):e==="amazon"?a=z.createElement(Rce,null):e==="apple"&&(a=z.createElement(_ce,null)),z.createElement(Jt,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,z.createElement(Ts,{as:"span"},r))},{getSignInWithFederationText:em,getOrText:Ice}=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(FT,{size:"small",label:Ice()}))}const{getSignInText:tm,getSigningInText:Oce,getForgotPasswordText:Nce,getSignInWithEmailText:Mce,getSignInWithSmsText:Pce,getSignInWithPasskeyText:kce,getOtherSignInOptionsText:Dce,getEnterUsernameFirstText:Lce}=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 Mce();case"SMS_OTP":return Pce();case"WEB_AUTHN":return kce();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(rb,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:Oce()},g?S():tm()),g&&z.createElement(Jt,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:Lce()},Dce()),z.createElement(f,null))))}const Uce=()=>{const{toForgotPassword:t}=St(e=>[e.toForgotPassword]);return z.createElement($e,{"data-amplify-footer":""},z.createElement(Jt,{onClick:t,size:"small",variation:"link"},Nce()))};Si.Footer=Uce;Si.Header=function(){return null};const{getCreateAccountText:_L,getCreatingAccountText:Fce,getCreateAccountWithEmailText:zce,getCreateAccountWithPasswordText:jce,getCreateAccountWithSmsText:Bce,getOrText:Hce}=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 zce();case"SMS_OTP":return Bce();case"PASSWORD":return m?jce():_L();default:return _L()}},_=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:Fce(),onClick:_(y)},w(y)),m&&S.length>0&&z.createElement(z.Fragment,null,z.createElement(Fe,{justifyContent:"center",padding:"medium 0"},Hce()),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:$ce,getSignUpTabText:qce}=kn,Wce=({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"},$ce()),z.createElement(Sl.Item,{value:"signUp"},qce())),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:Gce,getSkipText:Vce}=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(ib,{cancelButtonText:Vce(),cancelButtonSendType:"SKIP"}),z.createElement(a,null))))};ql.Header=function(){return z.createElement(_r,{level:3},Gce())};ql.Footer=function(){return null};const{getSkipText:Kce,getVerifyText:Yce,getVerifyContactText:Zce,getAccountRecoveryInfoText:Xce}=kn,Qce=t=>Object.entries(t).map(([e,n],r)=>{const s=Gy[e].label;return z.createElement(jT,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",cre(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,Yce()),f=z.createElement(BT,{legend:Zce(),name:"verify_context",isDisabled:s,legendHidden:!0},Qce(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(ib,{cancelButtonText:Kce(),cancelButtonSendType:"SKIP",submitButtonText:c}),z.createElement(r,null))))};Wl.Header=function(){return z.createElement(_r,{level:3},Xce())};Wl.Footer=function(){return null};const{getChallengeText:Jce,getDeliveryMessageText:ede,getDeliveryMethodText:tde}=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=VT(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"},ede(s)),z.createElement(Mo,null),z.createElement(Gr,null)),z.createElement(ob,null),z.createElement(c,null))))};function nde(){const{challengeName:t,codeDeliveryDetails:e}=St(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=VT(t)&&e;return z.createElement(z.Fragment,null,z.createElement(_r,{level:3},Jce(t)),n&&z.createElement(_r,{level:5},tde(e)))}Gl.Header=nde;Gl.Footer=function(){return null};const{getResendCodeText:rde,getResetYourPasswordText:sde}=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(ib,{cancelButtonSendType:"RESEND",cancelButtonText:rde()}),z.createElement(u,null))))};Vl.Header=function(){const e=sde();return z.createElement(_r,{level:3},e)};Vl.Footer=function(){return null};const{getBackToSignInText:ode,getSendingText:ide,getSendCodeText:ade,getResetYourPasswordText:lde}=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(ib,{cancelButtonText:ode(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?z.createElement(z.Fragment,null,ide(),"…"):z.createElement(z.Fragment,null,ade())}),z.createElement(a,null))))};Fa.Header=function(){return z.createElement(_r,{level:3},lde())};Fa.Footer=function(){return null};const{getMfaTypeLabelByValue:ude,getSelectMfaTypeByChallengeName:cde,getSelectMfaTypeText:dde}=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(BT,{name:"mfa_type",legend:dde(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>A.createElement(jT,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},ude(c)))),A.createElement(Gr,null)),A.createElement(ob,null),A.createElement(u,null))))};za.Header=function(){const{challengeName:e}=St(n=>[n.challengeName]);return A.createElement(_r,{level:3},cde(e))};za.Footer=function(){return null};const{getSetupEmailText:fde}=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(ob,null),A.createElement(a,null))))};ja.Header=function(){return A.createElement(_r,{level:3},fde())};ja.Footer=function(){return null};const{getSignInWithPasswordText:u_,getSignInWithEmailText:hde,getSignInWithSmsText:pde,getSignInWithPasskeyText:gde,getSigningInText:mde,getBackToSignInText:vde,getOrText:yde,getUsernameLabelByLoginMechanism:bde}=kn,Sde=t=>{switch(t){case"EMAIL_OTP":return hde();case"SMS_OTP":return pde();case"WEB_AUTHN":return gde();case"PASSWORD":return u_();default:return u_()}},Ede=({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=bde(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(zT,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),z.createElement(Jt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:mde()},u_())),g&&m.length>0&&z.createElement(FT,{label:yde()}),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)},Sde(E)))),z.createElement(Gr,null),z.createElement(Jt,{onClick:o,size:"small",variation:"link",isDisabled:n},vde()))))},Cde=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"})))},wde=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:xde,getPasskeyPromptDescriptionText:_de,getCreatePasskeyText:Ade,getRegisteringText:Tde,getContinueWithoutPasskeyText:Rde,getPasskeyCreatedSuccessText:Ide,getPasskeyRegisteredText:Ode,getPasskeyRegistrationFailedText:Nde,getPasskeyLabelText:Mde,getExistingPasskeysText:Pde,getSetupAnotherPasskeyText:kde,getContinueText:Dde}=kn;function Lde({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 vT();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 Nne(),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(Nde())}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(Cde,{className:"amplify-authenticator__passkey-success-icon"}),z.createElement(_r,{level:4},Ide()),z.createElement(Ts,null,Ode())),c.length>0&&z.createElement($e,{marginTop:"large"},z.createElement(_r,{level:5},Pde()),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??`${Mde()} ${_+1}`))))),z.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},z.createElement(Jt,{onClick:()=>{r(!1),E()},variation:"link"},kde()),z.createElement(Jt,{onClick:()=>S(),variation:"primary",isFullWidth:!0},Dde()))));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},xde()),z.createElement(Ts,null,_de()),z.createElement(Fe,{justifyContent:"center"},z.createElement(wde,{className:"amplify-authenticator__passkey-icon"})),z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(Jt,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:Tde()},Ade()),z.createElement(Jt,{onClick:y,variation:"link",isDisabled:C},Rde()),s&&z.createElement(Ts,{className:"amplify-authenticator__passkey-error"},s),z.createElement(Gr,null)))))}function AL(){return null}const Ude=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return AL;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 Wce;case"signInSelectAuthFactor":return Ede;case"passkeyPrompt":return Lde;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}`),AL}};function Fde({className:t,hideSignUp:e,variation:n}){const{route:r}=St(({route:o})=>[o]),s=A.useMemo(()=>Ude(r),[r]);return z.createElement(s,{className:t,hideSignUp:pce(r)?e:void 0,variation:n})}const zde={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 jde({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}){kue({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]);dle({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:p,signUpAttributes:f,socialProviders:g,formFields:r});const C=A.useMemo(()=>({components:{...zde,...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(Fde,{className:e,hideSignUp:s,variation:m}))}function Po(t){return hle({componentName:"Authenticator",packageName:"react",version:Pue}),A.createElement(cF,null,A.createElement(jde,{...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 Bde({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=A.useMemo(()=>({theme:Qy(s),colorMode:e}),[s,e]);return A.createElement(dF.Provider,{value:o},A.createElement(cue,{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 Hde=({configured:t,authStatus:e})=>e==="authenticated",$de=t=>t?t.signInDetails?.loginId??t.username??null:null,qde=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=St(o=>[o.authStatus,o.signOut,o.user]);return Hde({configured:!0,authStatus:n})?D.jsx(D.Fragment,{children:t({email:$de(s),signOut:()=>r()})}):D.jsx(D.Fragment,{children:e})},Wde=({children:t,fallback:e=null})=>Ay()?D.jsx(qde,{fallback:e,children:t}):D.jsx(D.Fragment,{children:e}),TL='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ri=t=>`var(${t})`,un=Ri("--accent"),Gde=Ri("--accent-hover"),RL=Ri("--accent-soft"),If=Ri("--accent-fg"),IL=Ri("--surface"),rc=Ri("--fg"),Vde=Ri("--surface-sunken"),nm=Ri("--fg-muted"),Of=Ri("--line"),Kde=Qy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:RL},20:{value:RL},40:{value:un},60:{value:un},80:{value:un},90:{value:un},100:{value:un}}},background:{primary:{value:IL},secondary:{value:Vde}},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:TL},static:{value:TL}}},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:IL}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:nm}}},button:{color:{value:rc},primary:{backgroundColor:{value:un},color:{value:If},_hover:{backgroundColor:{value:Gde},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}}}}}),Yde={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"}}},Zde=()=>D.jsx(qx,{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"})]})}),Xde=()=>D.jsx($8,{note:s9({betterAuthEnabled:!1,cognitoConfigured:Ay()})}),Qde=({children:t})=>{const{authStatus:e}=St(n=>[n.authStatus]);return e==="authenticated"?D.jsx(D.Fragment,{children:t}):e==="configuring"?D.jsx(ZA,{}):D.jsx(Bde,{theme:Kde,children:D.jsxs(H8,{children:[D.jsx(q8,{}),D.jsx(Po,{hideSignUp:!1,formFields:Yde,components:{Footer:Xde}})]})})},Jde=({children:t})=>Ay()?D.jsx(Po.Provider,{children:D.jsx(Qde,{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(Zde,{}),t]}),UF=60;let Oc=null;const FF=()=>Math.floor(Date.now()/1e3),efe=t=>t!==null&&t.expiresAt-UF>FF(),tfe=async()=>{const e=(await Sy()).tokens?.idToken;return e?(Oc={value:e.toString(),expiresAt:e.payload.exp??FF()+UF},Oc.value):(Oc=null,null)},nfe=async()=>Ay()?efe(Oc)?Oc.value:tfe():null,rfe=()=>{Oc=null},Rv={configure:q6,getToken:nfe,resetToken:rfe,Shell:Jde,Account:Wde},sfe=({children:t})=>Ty()?D.jsx(Ev.Shell,{children:t}):D.jsx(Rv.Shell,{children:t}),ofe=t=>Ty()?D.jsx(Ev.Account,{...t}):D.jsx(Rv.Account,{...t}),ife={configure:q6,getToken:()=>Ty()?Ev.getToken():Rv.getToken(),resetToken:()=>{Ev.resetToken(),Rv.resetToken()},Shell:sfe,Account:ofe};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(){}},afe=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"}},KT=new afe,lfe={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},ufe=class{#e=lfe;#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 ufe;function cfe(t){setTimeout(t,0)}var dfe=typeof window>"u"||"Deno"in globalThis;function Ur(){}function ffe(t,e){return typeof t=="function"?t(e):t}function c_(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 OL(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==YT(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 NL(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 YT(t,e){return(e?.queryKeyHashFn||xh)(t)}function xh(t){return JSON.stringify(t,(e,n)=>f_(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 hfe=Object.prototype.hasOwnProperty;function jF(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=ML(t)&&ML(e);if(!r&&!(f_(t)&&f_(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:hfe.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 d_(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 ML(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function f_(t){if(!PL(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!PL(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function PL(t){return Object.prototype.toString.call(t)==="[object Object]"}function pfe(t){return new Promise(e=>{xl.setTimeout(e,t)})}function h_(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?jF(t,e):e}function fAe(t){return t}function gfe(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function mfe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var ZT=Symbol();function BF(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===ZT?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function HF(t,e){return typeof t=="function"?t(...e):!!t}function vfe(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=()=>dfe;return{isServer(){return t()},setIsServer(e){t=e}}})();function p_(){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 yfe=cfe;function bfe(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=yfe;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=bfe(),Sfe=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}},Iv=new Sfe;function Efe(t){return Math.min(1e3*2**t,3e4)}function $F(t){return(t??"online")==="online"?Iv.isOnline():!0}var g_=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=p_(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new g_(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>KT.isFocused()&&(t.networkMode==="always"||Iv.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??Efe,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),pfe(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(),c_(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 Cfe(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=>{vfe(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?mfe:gfe;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?GF:m_,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:m_(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 m_(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 hAe(t,e){return e?m_(t,e)!=null:!1}function pAe(t,e){return!e||!t.getPreviousPageParam?!1:GF(t,e)!=null}var wfe=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=DL(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=DL(this.options);e.data!==void 0&&(this.setState(kL(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=h_(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===ZT||!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"?Cfe(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 g_&&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 g_){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,...kL(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 kL(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function DL(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 xfe=class extends ip{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=p_(),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),LL(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return v_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return v_(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&&!d_(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&UL(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 Afe(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||!c_(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||!c_(this.#u)||this.#u===0)&&(this.#f=xl.setInterval(()=>{(this.options.refetchIntervalInBackground||KT.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&&LL(t,e),H=P&&UL(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=h_(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=h_(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:XT(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=p_();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),d_(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 _fe(t,e){return is(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&is(e.retryOnMount,t)===!1)}function LL(t,e){return _fe(t,e)||t.state.data!==void 0&&v_(t,e,e.refetchOnMount)}function v_(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&&XT(t,e)}return!1}function UL(t,e,n,r){return(t!==e||is(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&XT(t,n)}function XT(t,e){return is(e.enabled,t)!==!1&&t.isStaleByTime(Oa(e.staleTime,t))}function Afe(t,e){return!d_(t.getCurrentResult(),e)}var Tfe=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||Rfe(),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 Rfe(){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 Tfe({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=>NL(e,n))}findAll(t={}){return this.getAll().filter(e=>NL(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??YT(r,e);let o=this.get(s);return o||(o=new wfe({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=>OL(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>OL(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()})})}},Ife=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=KT.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Iv.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=ffe(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 Iv.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=YT(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===ZT&&(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},Ofe=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),D.jsx(ZF.Provider,{value:t,children:e})),QF=A.createContext(!1),Nfe=()=>A.useContext(QF);QF.Provider;function Mfe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Pfe=A.createContext(Mfe()),kfe=()=>A.useContext(Pfe),Dfe=(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))},Lfe=t=>{A.useEffect(()=>{t.clearReset()},[t])},Ufe=({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])),Ffe=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))}},zfe=(t,e)=>t.isLoading&&t.isFetching&&!e,jfe=(t,e)=>t?.suspense&&e.isPending,FL=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Bfe(t,e,n){const r=Nfe(),s=kfe(),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,Ffe(a),Dfe(a,s,u),Lfe(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]),jfe(a,g))throw FL(a,p,s);if(Ufe({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()&&zfe(g,r)&&(f?FL(a,p,s):u?.promise)?.catch(Ur).finally(()=>{p.updateResult()}),a.notifyOnChangeProps?g:p.trackResult(g)}function Hfe(t,e){return Bfe(t,xfe)}const $fe="modulepreload",qfe=function(t){return"/"+t},zL={},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=qfe(f),f in zL)return;zL[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":$fe,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 jL=A.use,Cc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Lw(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 Wfe(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 Gfe(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 Vfe(t){return typeof t=="function"}function _l(t,e){return Vfe(t)?t(e):t}const e7=Object.prototype.hasOwnProperty,BL=Object.prototype.propertyIsEnumerable;function t7(t){for(const e in t)if(e7.call(t,e))return!0;return!1}const Kfe=()=>Object.create(null),yl=(t,e)=>Al(t,e,Kfe);function Al(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=qL(t)&&qL(s);if(!o&&!(Ov(t)&&Ov(s)))return s;const a=o?t:HL(t);if(!a)return s;const u=o?s:HL(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 HL(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!BL.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(!BL.call(t,s))return!1;r.push(s)}return r}function Ov(t){if(!$L(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!$L(n)||!n.hasOwnProperty("isPrototypeOf"))}function $L(t){return Object.prototype.toString.call(t)==="[object Object]"}function qL(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(Ov(t)&&Ov(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 Yfe(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 Zfe=/[\x00-\x1f\x7f"<>`{}]/g;function Xfe(t){return t.replace(Zfe,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function WL(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 Xfe(e)}const Qfe=["http:","https:","mailto:","tel:"];function Nv(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+=WL(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+WL(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function Jfe(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function ehe(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 the(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=the(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 ab(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=Fw(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=Fw(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=Fw(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)ab(t,e,c,u,s,o,a)}function Uw(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(Uw);for(const e of t.dynamic)ya(e)}if(t.optional?.length){t.optional.sort(Uw);for(const e of t.optional)ya(e)}if(t.wildcard?.length){t.wildcard.sort(Uw);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 Fw(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 nhe(t,e){const n=Tl("/"),r=new Uint16Array(6);for(const s of t)ab(!1,r,s,1,n,0);ya(n),e.masksTree=n,e.flatCache=Ih(1e3)}function rhe(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=QT(t,e.masksTree);return e.flatCache.set(t,r),r}function she(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Tl("/"),ab(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),QT(r,a,n)}function ohe(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=QT(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 ihe(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function ahe(t,e=!1,n){const r=Tl(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return ab(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=ihe(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 QT(t,e,n=!1){const r=t.split("/"),s=uhe(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=lhe(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 lhe(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function uhe(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(!GL(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&&(GL(t,e,I)||(P=!1)),P){if(!C&&!w&&!y&&che(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 che(t,e){return t===2**(e-1)-1}function GL(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 JT(t.filter(e=>e!==void 0).join("/"))}function JT(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 Mv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function dhe(t,e,n){return Mv(t,n)===Mv(e,n)}function fhe({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=JT(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function hhe(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 zw(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=>KL(s,n)).join("/"):KL(r,n)}function VL({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=zw("_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=zw(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=zw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function KL(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function dr(t){return t?.isNotFound===!0}function phe(){try{return sessionStorage}catch{return}}const ghe="tsr-scroll-restoration-v1_3",l7=phe();function mhe(){try{return JSON.parse(l7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function vhe(){try{l7?.setItem(ghe,JSON.stringify(pc))}catch{}}const pc=mhe(),YL="data-scroll-restoration-id",yhe=t=>t.state.__TSR_key||t.href;function bhe(t){const e=t.getAttribute(YL);if(e)return`[${YL}="${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 y_(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function ZL(t){const e=new Set;for(const n of t){if(n===rv)continue;const r=y_(n);r&&e.add(r)}return e}function She(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||yhe,o=new Set,a=u=>{const c=pc[u]||={};for(const f of o)f===document?c[rv]={scrollX,scrollY}:f.isConnected&&(c[bhe(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())),vhe()})),!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 _=y_(w);if(!_||p&&f&&(m??=ZL(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??=ZL(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=y_(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 Ehe(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 jw(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function Che(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]=jw(s):Array.isArray(o)?o.push(jw(s)):n[r]=[o,jw(s)]}return n}const whe=_he(JSON.parse),xhe=Ahe(JSON.stringify,JSON.parse);function _he(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=Che(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function Ahe(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=Ehe(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 The(t){return{input:({url:e})=>{for(const n of t)e=b_(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=c7(t[n],e);return e}}}function Rhe(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 b_(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 Ihe(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(()=>Bw(a,w.get())),M=r(()=>Bw(u,_.get())),O=r(()=>Bw(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){Hw(ee,a,w,n,s)}function ne(ee){Hw(ee,u,_,n,s)}function $(ee){Hw(ee,c,T,n,s)}return W}function Bw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function Hw(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)}ehe(n.get(),o)||n.set(o)})}const S_=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Ohe=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),lb=(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},XL=(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)},QL=(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&&!lb(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(()=>{S_(t)},s);r._nonReactive.pendingTimeout=o}},Nhe=(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()},Mhe=(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=lb(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)},Phe=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>Mhe(t,n,e,s),u=()=>{if(d7(t,n))return;const c=Nhe(t,n,s);return Rh(c)?c.then(a):a()};return o()},khe=(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=lb(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}},JL=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)}},Dhe=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 JL(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 JL(t,e,s,n,w):QL(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];QL(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=lb(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 e4(t){const e=t,n=[];Ohe(e.router)&&S_(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=Phe(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?XL(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(Dhe(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=XL(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=khe(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=S_(e);if(Rh(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function t4(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=t4(t,sv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():t4(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",n4="popstate",r4="beforeunload";function Lhe(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=Pv(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=s4(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=s4(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 s4(t,e){e||(e={});const n=eR();return{...e,key:n,__TSR_key:n,[Na]:t}}function Uhe(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=(()=>Pv(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const P=eR();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=Pv(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=Lhe({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(r4,O,{capture:!0}),e.removeEventListener(n4,M)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(r4,O,{capture:!0}),e.addEventListener(n4,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 Fhe(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Pv(t,e){const n=Fhe(t),r=n.indexOf("#"),s=n.indexOf("?"),o=eR();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 eR(){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 zhe=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=hhe(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Uhe()),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=Ihe(Bhe(this.latestLocation),p),She(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(Rhe({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:The(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=ahe(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&nhe(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=b_(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)=>fhe({base:n,to:r.includes("//")?JT(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=>Hhe({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(VL({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}_=$he({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=Jfe(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=rhe(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=Pv(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=b_(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(Nv(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 e4({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&&Nv(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 e4({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=she(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??xhe,parseSearch:t.parseSearch??whe,protocolAllowlist:t.protocolAllowlist??Qfe}),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?Whe(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 kv||(ne=new kv(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}=VL({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{o4(g,I)}catch(j){if(dr(j)||zr(j)?P=j:P=new jhe(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{o4(m,g)}catch{}f=g}const p={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,p]),p}},kv=class extends Error{},jhe=class extends Error{};function Bhe(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 kv("Async validation not supported");if(n.issues)throw new kv(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 Hhe({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=fi(t);let o;const a=ohe(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function $he({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return qhe(n)(t,e,r??!1)}function qhe(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 Whe(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 o4(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 Ghe="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.")}},Vhe=class extends g7{constructor(t){super(t)}};function tR(t){const e=t.errorComponent??nR;return D.jsx(Khe,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?A.createElement(e,{error:n,reset:r}):t.children})}var Khe=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 nR({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 Yhe({children:t,fallback:e=null}){return m7()?D.jsx(z.Fragment,{children:t}):D.jsx(z.Fragment,{children:e})}function m7(){return z.useSyncExternalStore(Zhe,()=>!0,()=>!1)}function Zhe(){return()=>{}}var v7=A.createContext(null);function fs(t){return A.useContext(v7)}var ub=A.createContext(void 0),Xhe=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 Qhe({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 Jhe(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 E_=[];let iv=0;const{link:i4,unlink:epe,propagate:tpe,checkDirty:y7,shallowPropagate:a4}=Qhe({update(t){return t._update()},notify(t){E_[C_++]=t,t.flags&=~rn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=rn.Mutable|rn.Dirty,Dv(t))}});let am=0,C_=0,So,w_=0;function b7(t){try{++w_,t()}finally{--w_||S7()}}function Dv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=epe(n,t)}function S7(){if(!(w_>0)){for(;am<C_;){const t=E_[am];E_[am++]=void 0,t.notify()}am=0,C_=0}}function l4(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&&i4(s,So,iv),s._snapshot},subscribe(o){const a=Jhe(o),u={current:!1},c=npe(()=>{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),Dv(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&&a4(a)}}else o&rn.Pending&&(s.flags=o&~rn.Pending);return So!==void 0&&i4(s,So,iv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(tpe(a),a4(a),S7())}},s}function npe(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,Dv(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,Dv(this)}};return e(),n}function rpe(t,e){return t===e}function Wr(t,e,n=rpe){const r=A.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=A.useCallback(()=>t?.get(),[t]);return uT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var $w={get(){},subscribe(){return{unsubscribe(){}}}};function spe(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?Xhe:ub),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=spe(t,e),o=Wr(r??$w,a=>a?s(a):$w);if(o!==$w)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 rR(t){const e=fs();return A.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function gAe(t){const e=fs(),n=rR(),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 ope(t,e){const n=fs(),r=Gfe(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(()=>dpe(he,ue,n.history,_),[_,ue,he,n.history]),xe=A.useMemo(()=>{if(ve?.external)return Nv(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!fpe(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Nv(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=A.useMemo(()=>{if(xe)return!1;if(a?.exact){if(!dhe(J.pathname,oe.pathname,n.basepath))return!1}else{const gt=Mv(J.pathname,n.basepath),vn=Mv(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,{})??ipe:qw,pt=Xe?qw:_l(o,{})??qw,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(Ghe)})},[n,K,oe]);Wfe(r,A.useCallback(gt=>{gt?.isIntersecting&&Gn()},[Gn]),cpe,{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(!_&&!hpe(gt)&&!gt.defaultPrevented&&(!Rr||Rr==="_self")&&gt.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},..._&&ape,...Xe&&lpe,...V&&je&&upe}}var qw={},ipe={className:"active"},ape={role:"link","aria-disabled":!0},lpe={"data-status":"active","aria-current":"page"},upe={"data-transitioning":"transitioning"},Pf=new WeakMap,cpe={rootMargin:"100px"},sc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function dpe(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function fpe(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}=ope(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 hpe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var ppe=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=()=>rR({from:this.fullPath}),this.Link=z.forwardRef((n,r)=>D.jsx(A7,{ref:r,from:this.fullPath,...n}))}};function gpe(t){return new ppe(t)}function mpe(){return t=>ype(t)}var vpe=class extends Vhe{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=()=>rR({from:this.fullPath}),this.Link=z.forwardRef((e,n)=>D.jsx(A7,{ref:n,from:this.fullPath,...e}))}};function ype(t){return new vpe(t)}function fr(t){return new bpe(t,{silent:!0}).createRoute}var bpe=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=gpe(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,Yfe(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(jL)jL(a());else throw a();return A.createElement(r,f)};return u.preload=a,u}function Spe(t){const e=fs(),n=`not-found-${Wr(e.stores.location,r=>r.pathname)}-${Wr(e.stores.status,r=>r)}`;return D.jsx(tR,{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 Epe(){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(Epe,{})}function Cpe(t){return null}function wpe(){return Cpe(fs()),null}var xpe=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,_pe=(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,xpe);return D.jsx(Ape,{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 Ape({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?tR:gc,y=f?Spe:gc;return D.jsxs(s.isRoot?s.options.shellComponent??gc:gc,{children:[D.jsx(ub.Provider,{value:e,children:D.jsx(g,{fallback:a,children:D.jsx(m,{getResetKey:()=>n,errorComponent:u||nR,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(Yhe,{fallback:a,children:D.jsx(u4,{matchId:e})}):D.jsx(u4,{matchId:e})})})})}),r.parentRouteId===kl?D.jsxs(D.Fragment,{children:[D.jsx(Tpe,{}),t.options.scrollRestoration&&JF?D.jsx(wpe,{}):null]}):null]})}function Tpe(){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 u4=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(ub);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],_pe),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 Rpe(){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=Lw(s),u=s||n||o,c=Lw(u),f=s||o,p=Lw(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 Ipe(){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(Rpe,{}),D.jsx(Ope,{})]});return t.options.InnerWrap?D.jsx(t.options.InnerWrap,{children:r}):r}function Ope(){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(ub.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:D.jsx(tR,{getResetKey:()=>n,errorComponent:nR,onCatch:void 0,children:r})})}var Npe=t=>({createMutableStore:l4,createReadonlyStore:l4,batch:b7}),Mpe=t=>new Ppe(t),Ppe=class extends zhe{constructor(t){super(t,Npe)}};function kpe({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 Dpe({router:t,...e}){return D.jsx(kpe,{router:t,...e,children:D.jsx(Ipe,{})})}var Ww={exports:{}},kf={},Gw={exports:{}},Vw={};var c4;function Lpe(){return c4||(c4=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}}}})(Vw)),Vw}var d4;function Upe(){return d4||(d4=1,Gw.exports=Lpe()),Gw.exports}var f4;function Fpe(){if(f4)return kf;f4=1;var t=Upe(),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)?KO(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=KO(l),i=YO(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=YO(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},Dw}var xL;function dce(){if(xL)return nc;xL=1;const t=que(),e=lce(),n=uce(),r=cce();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 fce=dce();const hce=qa(fce),pce=t=>t==="signIn"||t==="signUp",VT=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:gce,getConfirmingText:mce,getBackToSignInText:vce,getResendCodeText:yce}=kn,ob=()=>{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=VT(n)&&a&&r;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:mce()},gce()),u&&z.createElement(Jt,{onClick:r,type:"button"},yce()),z.createElement(Jt,{onClick:e,type:"button",variation:"link",size:"small"},vce()))},bce=new rr("SetupTotp-logger"),{getSetupTotpText:Sce,getCopiedText:Ece,getLoadingText:Cce}=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=fre(C,w,n),M=await hce.toDataURL(R);y(M)}catch(R){bce.error(R)}finally{g(!1)}},[C,w,n]);A.useEffect(()=>{m||_()},[_,m]);const T=()=>{navigator.clipboard.writeText(n),E(Ece())};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,Cce(),"…"):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(ob,null),A.createElement(f,null))))};Ua.Header=function(){return A.createElement(_r,{level:3},Sce())};Ua.Footer=function(){return null};const{getSubmitText:wce,getSubmittingText:xce}=kn,ib=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,xce(),"…"):z.createElement(z.Fragment,null,wce()),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)))},_ce=()=>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"})),Ace=()=>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"})),Tce=()=>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"}),Rce=()=>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(Tce,null):e==="google"?a=z.createElement(Ace,null):e==="amazon"?a=z.createElement(Rce,null):e==="apple"&&(a=z.createElement(_ce,null)),z.createElement(Jt,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,z.createElement(Ts,{as:"span"},r))},{getSignInWithFederationText:em,getOrText:Ice}=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(FT,{size:"small",label:Ice()}))}const{getSignInText:tm,getSigningInText:Oce,getForgotPasswordText:Nce,getSignInWithEmailText:Mce,getSignInWithSmsText:Pce,getSignInWithPasskeyText:kce,getOtherSignInOptionsText:Dce,getEnterUsernameFirstText:Lce}=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 Mce();case"SMS_OTP":return Pce();case"WEB_AUTHN":return kce();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(rb,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:Oce()},g?S():tm()),g&&z.createElement(Jt,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:Lce()},Dce()),z.createElement(f,null))))}const Uce=()=>{const{toForgotPassword:t}=St(e=>[e.toForgotPassword]);return z.createElement($e,{"data-amplify-footer":""},z.createElement(Jt,{onClick:t,size:"small",variation:"link"},Nce()))};Si.Footer=Uce;Si.Header=function(){return null};const{getCreateAccountText:_L,getCreatingAccountText:Fce,getCreateAccountWithEmailText:zce,getCreateAccountWithPasswordText:jce,getCreateAccountWithSmsText:Bce,getOrText:Hce}=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 zce();case"SMS_OTP":return Bce();case"PASSWORD":return m?jce():_L();default:return _L()}},_=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:Fce(),onClick:_(y)},w(y)),m&&S.length>0&&z.createElement(z.Fragment,null,z.createElement(Fe,{justifyContent:"center",padding:"medium 0"},Hce()),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:$ce,getSignUpTabText:qce}=kn,Wce=({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"},$ce()),z.createElement(Sl.Item,{value:"signUp"},qce())),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:Gce,getSkipText:Vce}=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(ib,{cancelButtonText:Vce(),cancelButtonSendType:"SKIP"}),z.createElement(a,null))))};ql.Header=function(){return z.createElement(_r,{level:3},Gce())};ql.Footer=function(){return null};const{getSkipText:Kce,getVerifyText:Yce,getVerifyContactText:Zce,getAccountRecoveryInfoText:Xce}=kn,Qce=t=>Object.entries(t).map(([e,n],r)=>{const s=Gy[e].label;return z.createElement(jT,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",cre(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,Yce()),f=z.createElement(BT,{legend:Zce(),name:"verify_context",isDisabled:s,legendHidden:!0},Qce(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(ib,{cancelButtonText:Kce(),cancelButtonSendType:"SKIP",submitButtonText:c}),z.createElement(r,null))))};Wl.Header=function(){return z.createElement(_r,{level:3},Xce())};Wl.Footer=function(){return null};const{getChallengeText:Jce,getDeliveryMessageText:ede,getDeliveryMethodText:tde}=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=VT(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"},ede(s)),z.createElement(Mo,null),z.createElement(Gr,null)),z.createElement(ob,null),z.createElement(c,null))))};function nde(){const{challengeName:t,codeDeliveryDetails:e}=St(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=VT(t)&&e;return z.createElement(z.Fragment,null,z.createElement(_r,{level:3},Jce(t)),n&&z.createElement(_r,{level:5},tde(e)))}Gl.Header=nde;Gl.Footer=function(){return null};const{getResendCodeText:rde,getResetYourPasswordText:sde}=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(ib,{cancelButtonSendType:"RESEND",cancelButtonText:rde()}),z.createElement(u,null))))};Vl.Header=function(){const e=sde();return z.createElement(_r,{level:3},e)};Vl.Footer=function(){return null};const{getBackToSignInText:ode,getSendingText:ide,getSendCodeText:ade,getResetYourPasswordText:lde}=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(ib,{cancelButtonText:ode(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?z.createElement(z.Fragment,null,ide(),"…"):z.createElement(z.Fragment,null,ade())}),z.createElement(a,null))))};Fa.Header=function(){return z.createElement(_r,{level:3},lde())};Fa.Footer=function(){return null};const{getMfaTypeLabelByValue:ude,getSelectMfaTypeByChallengeName:cde,getSelectMfaTypeText:dde}=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(BT,{name:"mfa_type",legend:dde(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>A.createElement(jT,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},ude(c)))),A.createElement(Gr,null)),A.createElement(ob,null),A.createElement(u,null))))};za.Header=function(){const{challengeName:e}=St(n=>[n.challengeName]);return A.createElement(_r,{level:3},cde(e))};za.Footer=function(){return null};const{getSetupEmailText:fde}=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(ob,null),A.createElement(a,null))))};ja.Header=function(){return A.createElement(_r,{level:3},fde())};ja.Footer=function(){return null};const{getSignInWithPasswordText:u_,getSignInWithEmailText:hde,getSignInWithSmsText:pde,getSignInWithPasskeyText:gde,getSigningInText:mde,getBackToSignInText:vde,getOrText:yde,getUsernameLabelByLoginMechanism:bde}=kn,Sde=t=>{switch(t){case"EMAIL_OTP":return hde();case"SMS_OTP":return pde();case"WEB_AUTHN":return gde();case"PASSWORD":return u_();default:return u_()}},Ede=({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=bde(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(zT,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),z.createElement(Jt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:mde()},u_())),g&&m.length>0&&z.createElement(FT,{label:yde()}),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)},Sde(E)))),z.createElement(Gr,null),z.createElement(Jt,{onClick:o,size:"small",variation:"link",isDisabled:n},vde()))))},Cde=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"})))},wde=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:xde,getPasskeyPromptDescriptionText:_de,getCreatePasskeyText:Ade,getRegisteringText:Tde,getContinueWithoutPasskeyText:Rde,getPasskeyCreatedSuccessText:Ide,getPasskeyRegisteredText:Ode,getPasskeyRegistrationFailedText:Nde,getPasskeyLabelText:Mde,getExistingPasskeysText:Pde,getSetupAnotherPasskeyText:kde,getContinueText:Dde}=kn;function Lde({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 vT();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 Nne(),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(Nde())}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(Cde,{className:"amplify-authenticator__passkey-success-icon"}),z.createElement(_r,{level:4},Ide()),z.createElement(Ts,null,Ode())),c.length>0&&z.createElement($e,{marginTop:"large"},z.createElement(_r,{level:5},Pde()),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??`${Mde()} ${_+1}`))))),z.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},z.createElement(Jt,{onClick:()=>{r(!1),E()},variation:"link"},kde()),z.createElement(Jt,{onClick:()=>S(),variation:"primary",isFullWidth:!0},Dde()))));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},xde()),z.createElement(Ts,null,_de()),z.createElement(Fe,{justifyContent:"center"},z.createElement(wde,{className:"amplify-authenticator__passkey-icon"})),z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(Jt,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:Tde()},Ade()),z.createElement(Jt,{onClick:y,variation:"link",isDisabled:C},Rde()),s&&z.createElement(Ts,{className:"amplify-authenticator__passkey-error"},s),z.createElement(Gr,null)))))}function AL(){return null}const Ude=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return AL;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 Wce;case"signInSelectAuthFactor":return Ede;case"passkeyPrompt":return Lde;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}`),AL}};function Fde({className:t,hideSignUp:e,variation:n}){const{route:r}=St(({route:o})=>[o]),s=A.useMemo(()=>Ude(r),[r]);return z.createElement(s,{className:t,hideSignUp:pce(r)?e:void 0,variation:n})}const zde={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 jde({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}){kue({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]);dle({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:p,signUpAttributes:f,socialProviders:g,formFields:r});const C=A.useMemo(()=>({components:{...zde,...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(Fde,{className:e,hideSignUp:s,variation:m}))}function Po(t){return hle({componentName:"Authenticator",packageName:"react",version:Pue}),A.createElement(cF,null,A.createElement(jde,{...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 Bde({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=A.useMemo(()=>({theme:Qy(s),colorMode:e}),[s,e]);return A.createElement(dF.Provider,{value:o},A.createElement(cue,{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 Hde=({configured:t,authStatus:e})=>e==="authenticated",$de=t=>t?t.signInDetails?.loginId??t.username??null:null,qde=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=St(o=>[o.authStatus,o.signOut,o.user]);return Hde({configured:!0,authStatus:n})?D.jsx(D.Fragment,{children:t({email:$de(s),signOut:()=>r()})}):D.jsx(D.Fragment,{children:e})},Wde=({children:t,fallback:e=null})=>Ay()?D.jsx(qde,{fallback:e,children:t}):D.jsx(D.Fragment,{children:e}),TL='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ri=t=>`var(${t})`,un=Ri("--accent"),Gde=Ri("--accent-hover"),RL=Ri("--accent-soft"),If=Ri("--accent-fg"),IL=Ri("--surface"),rc=Ri("--fg"),Vde=Ri("--surface-sunken"),nm=Ri("--fg-muted"),Of=Ri("--line"),Kde=Qy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:RL},20:{value:RL},40:{value:un},60:{value:un},80:{value:un},90:{value:un},100:{value:un}}},background:{primary:{value:IL},secondary:{value:Vde}},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:TL},static:{value:TL}}},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:IL}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:nm}}},button:{color:{value:rc},primary:{backgroundColor:{value:un},color:{value:If},_hover:{backgroundColor:{value:Gde},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}}}}}),Yde={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"}}},Zde=()=>D.jsx(qx,{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"})]})}),Xde=()=>D.jsx($8,{note:s9({betterAuthEnabled:!1,cognitoConfigured:Ay()})}),Qde=({children:t})=>{const{authStatus:e}=St(n=>[n.authStatus]);return e==="authenticated"?D.jsx(D.Fragment,{children:t}):e==="configuring"?D.jsx(ZA,{}):D.jsx(Bde,{theme:Kde,children:D.jsxs(H8,{children:[D.jsx(q8,{}),D.jsx(Po,{hideSignUp:!1,formFields:Yde,components:{Footer:Xde}})]})})},Jde=({children:t})=>Ay()?D.jsx(Po.Provider,{children:D.jsx(Qde,{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(Zde,{}),t]}),UF=60;let Oc=null;const FF=()=>Math.floor(Date.now()/1e3),efe=t=>t!==null&&t.expiresAt-UF>FF(),tfe=async()=>{const e=(await Sy()).tokens?.idToken;return e?(Oc={value:e.toString(),expiresAt:e.payload.exp??FF()+UF},Oc.value):(Oc=null,null)},nfe=async()=>Ay()?efe(Oc)?Oc.value:tfe():null,rfe=()=>{Oc=null},Rv={configure:q6,getToken:nfe,resetToken:rfe,Shell:Jde,Account:Wde},sfe=({children:t})=>Ty()?D.jsx(Ev.Shell,{children:t}):D.jsx(Rv.Shell,{children:t}),ofe=t=>Ty()?D.jsx(Ev.Account,{...t}):D.jsx(Rv.Account,{...t}),ife={configure:q6,getToken:()=>Ty()?Ev.getToken():Rv.getToken(),resetToken:()=>{Ev.resetToken(),Rv.resetToken()},Shell:sfe,Account:ofe};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(){}},afe=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"}},KT=new afe,lfe={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},ufe=class{#e=lfe;#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 ufe;function cfe(t){setTimeout(t,0)}var dfe=typeof window>"u"||"Deno"in globalThis;function Ur(){}function ffe(t,e){return typeof t=="function"?t(e):t}function c_(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 OL(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==YT(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 NL(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 YT(t,e){return(e?.queryKeyHashFn||xh)(t)}function xh(t){return JSON.stringify(t,(e,n)=>f_(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 hfe=Object.prototype.hasOwnProperty;function jF(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=ML(t)&&ML(e);if(!r&&!(f_(t)&&f_(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:hfe.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 d_(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 ML(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function f_(t){if(!PL(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!PL(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function PL(t){return Object.prototype.toString.call(t)==="[object Object]"}function pfe(t){return new Promise(e=>{xl.setTimeout(e,t)})}function h_(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?jF(t,e):e}function fAe(t){return t}function gfe(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function mfe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var ZT=Symbol();function BF(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===ZT?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function HF(t,e){return typeof t=="function"?t(...e):!!t}function vfe(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=()=>dfe;return{isServer(){return t()},setIsServer(e){t=e}}})();function p_(){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 yfe=cfe;function bfe(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=yfe;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=bfe(),Sfe=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}},Iv=new Sfe;function Efe(t){return Math.min(1e3*2**t,3e4)}function $F(t){return(t??"online")==="online"?Iv.isOnline():!0}var g_=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=p_(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new g_(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>KT.isFocused()&&(t.networkMode==="always"||Iv.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??Efe,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),pfe(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(),c_(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 Cfe(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=>{vfe(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?mfe:gfe;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?GF:m_,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:m_(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 m_(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 hAe(t,e){return e?m_(t,e)!=null:!1}function pAe(t,e){return!e||!t.getPreviousPageParam?!1:GF(t,e)!=null}var wfe=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=DL(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=DL(this.options);e.data!==void 0&&(this.setState(kL(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=h_(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===ZT||!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"?Cfe(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 g_&&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 g_){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,...kL(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 kL(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function DL(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 xfe=class extends ip{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=p_(),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),LL(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return v_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return v_(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&&!d_(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&UL(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 Afe(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||!c_(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||!c_(this.#u)||this.#u===0)&&(this.#f=xl.setInterval(()=>{(this.options.refetchIntervalInBackground||KT.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&&LL(t,e),H=P&&UL(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=h_(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=h_(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:XT(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=p_();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),d_(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 _fe(t,e){return is(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&is(e.retryOnMount,t)===!1)}function LL(t,e){return _fe(t,e)||t.state.data!==void 0&&v_(t,e,e.refetchOnMount)}function v_(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&&XT(t,e)}return!1}function UL(t,e,n,r){return(t!==e||is(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&XT(t,n)}function XT(t,e){return is(e.enabled,t)!==!1&&t.isStaleByTime(Oa(e.staleTime,t))}function Afe(t,e){return!d_(t.getCurrentResult(),e)}var Tfe=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||Rfe(),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 Rfe(){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 Tfe({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=>NL(e,n))}findAll(t={}){return this.getAll().filter(e=>NL(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??YT(r,e);let o=this.get(s);return o||(o=new wfe({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=>OL(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>OL(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()})})}},Ife=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=KT.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Iv.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=ffe(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 Iv.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=YT(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===ZT&&(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},Ofe=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),D.jsx(ZF.Provider,{value:t,children:e})),QF=A.createContext(!1),Nfe=()=>A.useContext(QF);QF.Provider;function Mfe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Pfe=A.createContext(Mfe()),kfe=()=>A.useContext(Pfe),Dfe=(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))},Lfe=t=>{A.useEffect(()=>{t.clearReset()},[t])},Ufe=({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])),Ffe=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))}},zfe=(t,e)=>t.isLoading&&t.isFetching&&!e,jfe=(t,e)=>t?.suspense&&e.isPending,FL=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Bfe(t,e,n){const r=Nfe(),s=kfe(),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,Ffe(a),Dfe(a,s,u),Lfe(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]),jfe(a,g))throw FL(a,p,s);if(Ufe({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()&&zfe(g,r)&&(f?FL(a,p,s):u?.promise)?.catch(Ur).finally(()=>{p.updateResult()}),a.notifyOnChangeProps?g:p.trackResult(g)}function Hfe(t,e){return Bfe(t,xfe)}const $fe="modulepreload",qfe=function(t){return"/"+t},zL={},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=qfe(f),f in zL)return;zL[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":$fe,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 jL=A.use,Cc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Lw(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 Wfe(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 Gfe(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 Vfe(t){return typeof t=="function"}function _l(t,e){return Vfe(t)?t(e):t}const e7=Object.prototype.hasOwnProperty,BL=Object.prototype.propertyIsEnumerable;function t7(t){for(const e in t)if(e7.call(t,e))return!0;return!1}const Kfe=()=>Object.create(null),yl=(t,e)=>Al(t,e,Kfe);function Al(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=qL(t)&&qL(s);if(!o&&!(Ov(t)&&Ov(s)))return s;const a=o?t:HL(t);if(!a)return s;const u=o?s:HL(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 HL(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!BL.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(!BL.call(t,s))return!1;r.push(s)}return r}function Ov(t){if(!$L(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!$L(n)||!n.hasOwnProperty("isPrototypeOf"))}function $L(t){return Object.prototype.toString.call(t)==="[object Object]"}function qL(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(Ov(t)&&Ov(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 Yfe(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 Zfe=/[\x00-\x1f\x7f"<>`{}]/g;function Xfe(t){return t.replace(Zfe,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function WL(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 Xfe(e)}const Qfe=["http:","https:","mailto:","tel:"];function Nv(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+=WL(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+WL(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function Jfe(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function ehe(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 the(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=the(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 ab(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=Fw(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=Fw(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=Fw(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)ab(t,e,c,u,s,o,a)}function Uw(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(Uw);for(const e of t.dynamic)ya(e)}if(t.optional?.length){t.optional.sort(Uw);for(const e of t.optional)ya(e)}if(t.wildcard?.length){t.wildcard.sort(Uw);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 Fw(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 nhe(t,e){const n=Tl("/"),r=new Uint16Array(6);for(const s of t)ab(!1,r,s,1,n,0);ya(n),e.masksTree=n,e.flatCache=Ih(1e3)}function rhe(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=QT(t,e.masksTree);return e.flatCache.set(t,r),r}function she(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Tl("/"),ab(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),QT(r,a,n)}function ohe(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=QT(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 ihe(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function ahe(t,e=!1,n){const r=Tl(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return ab(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=ihe(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 QT(t,e,n=!1){const r=t.split("/"),s=uhe(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=lhe(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 lhe(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function uhe(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(!GL(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&&(GL(t,e,I)||(P=!1)),P){if(!C&&!w&&!y&&che(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 che(t,e){return t===2**(e-1)-1}function GL(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 JT(t.filter(e=>e!==void 0).join("/"))}function JT(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 Mv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function dhe(t,e,n){return Mv(t,n)===Mv(e,n)}function fhe({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=JT(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function hhe(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 zw(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=>KL(s,n)).join("/"):KL(r,n)}function VL({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=zw("_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=zw(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=zw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function KL(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function dr(t){return t?.isNotFound===!0}function phe(){try{return sessionStorage}catch{return}}const ghe="tsr-scroll-restoration-v1_3",l7=phe();function mhe(){try{return JSON.parse(l7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function vhe(){try{l7?.setItem(ghe,JSON.stringify(pc))}catch{}}const pc=mhe(),YL="data-scroll-restoration-id",yhe=t=>t.state.__TSR_key||t.href;function bhe(t){const e=t.getAttribute(YL);if(e)return`[${YL}="${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 y_(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function ZL(t){const e=new Set;for(const n of t){if(n===rv)continue;const r=y_(n);r&&e.add(r)}return e}function She(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||yhe,o=new Set,a=u=>{const c=pc[u]||={};for(const f of o)f===document?c[rv]={scrollX,scrollY}:f.isConnected&&(c[bhe(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())),vhe()})),!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 _=y_(w);if(!_||p&&f&&(m??=ZL(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??=ZL(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=y_(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 Ehe(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 jw(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function Che(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]=jw(s):Array.isArray(o)?o.push(jw(s)):n[r]=[o,jw(s)]}return n}const whe=_he(JSON.parse),xhe=Ahe(JSON.stringify,JSON.parse);function _he(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=Che(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function Ahe(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=Ehe(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 The(t){return{input:({url:e})=>{for(const n of t)e=b_(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=c7(t[n],e);return e}}}function Rhe(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 b_(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 Ihe(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(()=>Bw(a,w.get())),M=r(()=>Bw(u,_.get())),O=r(()=>Bw(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){Hw(ee,a,w,n,s)}function ne(ee){Hw(ee,u,_,n,s)}function $(ee){Hw(ee,c,T,n,s)}return W}function Bw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function Hw(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)}ehe(n.get(),o)||n.set(o)})}const S_=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Ohe=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),lb=(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},XL=(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)},QL=(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&&!lb(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(()=>{S_(t)},s);r._nonReactive.pendingTimeout=o}},Nhe=(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()},Mhe=(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=lb(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)},Phe=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>Mhe(t,n,e,s),u=()=>{if(d7(t,n))return;const c=Nhe(t,n,s);return Rh(c)?c.then(a):a()};return o()},khe=(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=lb(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}},JL=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)}},Dhe=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 JL(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 JL(t,e,s,n,w):QL(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];QL(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=lb(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 eU(t){const e=t,n=[];Ohe(e.router)&&S_(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=Phe(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?XL(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(Dhe(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=XL(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=khe(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=S_(e);if(Rh(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function tU(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=tU(t,sv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():tU(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",nU="popstate",rU="beforeunload";function Lhe(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=Pv(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=sU(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=sU(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 sU(t,e){e||(e={});const n=eR();return{...e,key:n,__TSR_key:n,[Na]:t}}function Uhe(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=(()=>Pv(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const P=eR();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=Pv(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=Lhe({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(rU,O,{capture:!0}),e.removeEventListener(nU,M)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(rU,O,{capture:!0}),e.addEventListener(nU,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 Fhe(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Pv(t,e){const n=Fhe(t),r=n.indexOf("#"),s=n.indexOf("?"),o=eR();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 eR(){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 zhe=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=hhe(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Uhe()),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=Ihe(Bhe(this.latestLocation),p),She(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(Rhe({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:The(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=ahe(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&nhe(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=b_(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)=>fhe({base:n,to:r.includes("//")?JT(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=>Hhe({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(VL({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}_=$he({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=Jfe(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=rhe(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=Pv(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=b_(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(Nv(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 eU({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&&Nv(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 eU({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=she(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??xhe,parseSearch:t.parseSearch??whe,protocolAllowlist:t.protocolAllowlist??Qfe}),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?Whe(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 kv||(ne=new kv(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}=VL({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{oU(g,I)}catch(j){if(dr(j)||zr(j)?P=j:P=new jhe(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{oU(m,g)}catch{}f=g}const p={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,p]),p}},kv=class extends Error{},jhe=class extends Error{};function Bhe(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 kv("Async validation not supported");if(n.issues)throw new kv(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 Hhe({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=fi(t);let o;const a=ohe(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function $he({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return qhe(n)(t,e,r??!1)}function qhe(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 Whe(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 oU(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 Ghe="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.")}},Vhe=class extends g7{constructor(t){super(t)}};function tR(t){const e=t.errorComponent??nR;return D.jsx(Khe,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?A.createElement(e,{error:n,reset:r}):t.children})}var Khe=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 nR({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 Yhe({children:t,fallback:e=null}){return m7()?D.jsx(z.Fragment,{children:t}):D.jsx(z.Fragment,{children:e})}function m7(){return z.useSyncExternalStore(Zhe,()=>!0,()=>!1)}function Zhe(){return()=>{}}var v7=A.createContext(null);function fs(t){return A.useContext(v7)}var ub=A.createContext(void 0),Xhe=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 Qhe({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 Jhe(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 E_=[];let iv=0;const{link:iU,unlink:epe,propagate:tpe,checkDirty:y7,shallowPropagate:aU}=Qhe({update(t){return t._update()},notify(t){E_[C_++]=t,t.flags&=~rn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=rn.Mutable|rn.Dirty,Dv(t))}});let am=0,C_=0,So,w_=0;function b7(t){try{++w_,t()}finally{--w_||S7()}}function Dv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=epe(n,t)}function S7(){if(!(w_>0)){for(;am<C_;){const t=E_[am];E_[am++]=void 0,t.notify()}am=0,C_=0}}function lU(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&&iU(s,So,iv),s._snapshot},subscribe(o){const a=Jhe(o),u={current:!1},c=npe(()=>{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),Dv(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&&aU(a)}}else o&rn.Pending&&(s.flags=o&~rn.Pending);return So!==void 0&&iU(s,So,iv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(tpe(a),aU(a),S7())}},s}function npe(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,Dv(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,Dv(this)}};return e(),n}function rpe(t,e){return t===e}function Wr(t,e,n=rpe){const r=A.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=A.useCallback(()=>t?.get(),[t]);return uT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var $w={get(){},subscribe(){return{unsubscribe(){}}}};function spe(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?Xhe:ub),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=spe(t,e),o=Wr(r??$w,a=>a?s(a):$w);if(o!==$w)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 rR(t){const e=fs();return A.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function gAe(t){const e=fs(),n=rR(),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 ope(t,e){const n=fs(),r=Gfe(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(()=>dpe(he,ue,n.history,_),[_,ue,he,n.history]),xe=A.useMemo(()=>{if(ve?.external)return Nv(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!fpe(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Nv(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=A.useMemo(()=>{if(xe)return!1;if(a?.exact){if(!dhe(J.pathname,oe.pathname,n.basepath))return!1}else{const gt=Mv(J.pathname,n.basepath),vn=Mv(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,{})??ipe:qw,pt=Xe?qw:_l(o,{})??qw,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(Ghe)})},[n,K,oe]);Wfe(r,A.useCallback(gt=>{gt?.isIntersecting&&Gn()},[Gn]),cpe,{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(!_&&!hpe(gt)&&!gt.defaultPrevented&&(!Rr||Rr==="_self")&&gt.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},..._&&ape,...Xe&&lpe,...V&&je&&upe}}var qw={},ipe={className:"active"},ape={role:"link","aria-disabled":!0},lpe={"data-status":"active","aria-current":"page"},upe={"data-transitioning":"transitioning"},Pf=new WeakMap,cpe={rootMargin:"100px"},sc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function dpe(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function fpe(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}=ope(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 hpe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var ppe=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=()=>rR({from:this.fullPath}),this.Link=z.forwardRef((n,r)=>D.jsx(A7,{ref:r,from:this.fullPath,...n}))}};function gpe(t){return new ppe(t)}function mpe(){return t=>ype(t)}var vpe=class extends Vhe{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=()=>rR({from:this.fullPath}),this.Link=z.forwardRef((e,n)=>D.jsx(A7,{ref:n,from:this.fullPath,...e}))}};function ype(t){return new vpe(t)}function fr(t){return new bpe(t,{silent:!0}).createRoute}var bpe=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=gpe(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,Yfe(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(jL)jL(a());else throw a();return A.createElement(r,f)};return u.preload=a,u}function Spe(t){const e=fs(),n=`not-found-${Wr(e.stores.location,r=>r.pathname)}-${Wr(e.stores.status,r=>r)}`;return D.jsx(tR,{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 Epe(){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(Epe,{})}function Cpe(t){return null}function wpe(){return Cpe(fs()),null}var xpe=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,_pe=(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,xpe);return D.jsx(Ape,{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 Ape({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?tR:gc,y=f?Spe:gc;return D.jsxs(s.isRoot?s.options.shellComponent??gc:gc,{children:[D.jsx(ub.Provider,{value:e,children:D.jsx(g,{fallback:a,children:D.jsx(m,{getResetKey:()=>n,errorComponent:u||nR,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(Yhe,{fallback:a,children:D.jsx(uU,{matchId:e})}):D.jsx(uU,{matchId:e})})})})}),r.parentRouteId===kl?D.jsxs(D.Fragment,{children:[D.jsx(Tpe,{}),t.options.scrollRestoration&&JF?D.jsx(wpe,{}):null]}):null]})}function Tpe(){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 uU=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(ub);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],_pe),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 Rpe(){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=Lw(s),u=s||n||o,c=Lw(u),f=s||o,p=Lw(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 Ipe(){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(Rpe,{}),D.jsx(Ope,{})]});return t.options.InnerWrap?D.jsx(t.options.InnerWrap,{children:r}):r}function Ope(){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(ub.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:D.jsx(tR,{getResetKey:()=>n,errorComponent:nR,onCatch:void 0,children:r})})}var Npe=t=>({createMutableStore:lU,createReadonlyStore:lU,batch:b7}),Mpe=t=>new Ppe(t),Ppe=class extends zhe{constructor(t){super(t,Npe)}};function kpe({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 Dpe({router:t,...e}){return D.jsx(kpe,{router:t,...e,children:D.jsx(Ipe,{})})}var Ww={exports:{}},kf={},Gw={exports:{}},Vw={};var cU;function Lpe(){return cU||(cU=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}}}})(Vw)),Vw}var dU;function Upe(){return dU||(dU=1,Gw.exports=Lpe()),Gw.exports}var fU;function Fpe(){if(fU)return kf;fU=1;var t=Upe(),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)?KO(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=KO(l),i=YO(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=YO(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:yN(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=nN(i);i!==null;){if(d=i[In])return d;i=nN(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 Ob(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=Ob(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 VR(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 Nb=!1;function KR(i,l,d){if(Nb)return i(l,d);Nb=!0;try{var h=i(l);return h}finally{if(Nb=!1,(bu!==null||Su!==null)&&(ug(),bu&&(l=bu,i=Su,Su=bu=null,VR(l),i)))for(l=0;l<i.length;l++)VR(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"),Mb=!1;if(Uo)try{var Id={};Object.defineProperty(Id,"passive",{get:function(){Mb=!0}}),window.addEventListener("test",Id,Id),window.removeEventListener("test",Id,Id)}catch{Mb=!1}var Bi=null,Pb=null,wp=null;function YR(){if(wp)return wp;var i,l=Pb,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 ZR(){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:ZR,this.isPropagationStopped=ZR,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),kb,Db,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:Ub,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"?(kb=i.screenX-Nd.screenX,Db=i.screenY-Nd.screenY):Db=kb=0,Nd=i),kb)},movementY:function(i){return"movementY"in i?i.movementY:Db}}),XR=Or(Tp),jB=g({},Tp,{dataTransfer:0}),BB=Or(jB),HB=g({},Od,{relatedTarget:0}),Lb=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}),QR=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 Ub(){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:Ub,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}),JR=Or(eH),tH=g({},Od,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ub}),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],Fb=Uo&&"CompositionEvent"in window,Md=null;Uo&&"documentMode"in document&&(Md=document.documentMode);var cH=Uo&&"TextEvent"in window&&!Md,eI=Uo&&(!Fb||Md&&8<Md&&11>=Md),tI=" ",nI=!1;function rI(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 sI(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 sI(l);case"keypress":return l.which!==32?null:(nI=!0,tI);case"textInput":return i=l.data,i===tI&&nI?null:i;default:return null}}function fH(i,l){if(Eu)return i==="compositionend"||!Fb&&rI(i,l)?(i=YR(),wp=Pb=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 eI&&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 oI(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!hH[i.type]:l==="textarea"}function iI(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){HO(i,0)}function Rp(i){var l=Xa(i);if(_d(l))return i}function aI(i,l){if(i==="change")return l}var lI=!1;if(Uo){var zb;if(Uo){var jb="oninput"in document;if(!jb){var uI=document.createElement("div");uI.setAttribute("oninput","return;"),jb=typeof uI.oninput=="function"}zb=jb}else zb=!1;lI=zb&&(!document.documentMode||9<document.documentMode)}function cI(){Pd&&(Pd.detachEvent("onpropertychange",dI),kd=Pd=null)}function dI(i){if(i.propertyName==="value"&&Rp(kd)){var l=[];iI(l,kd,i,On(i)),KR(pH,l)}}function gH(i,l,d){i==="focusin"?(cI(),Pd=l,kd=d,Pd.attachEvent("onpropertychange",dI)):i==="focusout"&&cI()}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 fI(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function hI(i,l){var d=fI(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=fI(d)}}function pI(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?pI(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function gI(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 Bb(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,Hb=null,Ld=null,$b=!1;function mI(i,l,d){var h=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;$b||Cu==null||Cu!==yu(h)||(h=Cu,"selectionStart"in h&&Bb(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(Hb,"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")},qb={},vI={};Uo&&(vI=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(qb[i])return qb[i];if(!wu[i])return i;var l=wu[i],d;for(d in l)if(l.hasOwnProperty(d)&&d in vI)return qb[i]=l[d];return i}var yI=tl("animationend"),bI=tl("animationiteration"),SI=tl("animationstart"),EH=tl("transitionrun"),CH=tl("transitionstart"),wH=tl("transitioncancel"),EI=tl("transitionend"),CI=new Map,Wb="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(" ");Wb.push("scrollEnd");function Us(i,l){CI.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,Gb=0;function Op(){for(var i=xu,l=Gb=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&&wI(d,v,b)}}function Np(i,l,d,h){gs[xu++]=i,gs[xu++]=l,gs[xu++]=d,gs[xu++]=h,Gb|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function Vb(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 wI(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,n1=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 Kb(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 xI(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")Kb(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 Yb(i,l,d){return i=Xr(6,i,null,l),i.lanes=d,i}function _I(i){var l=Xr(18,null,null,0);return l.stateNode=i,l}function Zb(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 AI=new WeakMap;function ms(i,l){if(typeof i=="object"&&i!==null){var d=AI.get(i);return d!==void 0?d:(l={value:i,source:l,stack:Et(l)},AI.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 TI(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 Xb(i){i.return!==null&&(zo(i,1),TI(i,1,0))}function Qb(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 RI(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,Jb=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)),Jb}function II(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||GO(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 OI(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 OI(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")||v1(i.type,i.memoizedProps)),d=!d),d&&Vt&&qi(i),OI(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Vt=tN(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Vt=tN(i)}else l===27?(l=Vt,sa(i.type)?(i=C1,C1=null,Vt=i):Vt=l):Vt=Kn?Es(i.stateNode.nextSibling):null;return!0}function sl(){Vt=Kn=null,dt=!1}function e0(){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 t0=L(null),ol=null,jo=null;function Wi(i,l,d){K(t0,l._currentValue),l._currentValue=d}function Bo(i){i._currentValue=t0.current,V(t0)}function n0(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 r0(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),n0(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),n0(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&&r0(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 NI(ol,i)}function Lp(i,l){return ol===null&&il(i),NI(i,l)}function NI(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 s0(){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,o0=0,Ou=0,Nu=null;function RH(i,l){if(jd===null){var d=jd=[];o0=0,Ou=l1(),Nu={status:"pending",value:void 0,then:function(h){d.push(h)}}}return o0++,l.then(MI,MI),l}function MI(){if(--o0===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 PI=$.S;$.S=function(i,l){mO=Gt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&RH(i,l),PI!==null&&PI(i,l)};var al=L(null);function i0(){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 kI(){var i=i0();return i===null?null:{parent:Sn._currentValue,pool:i}}var Mu=Error(r(460)),a0=Error(r(474)),Fp=Error(r(542)),zp={then:function(){}};function DI(i){return i=i.status,i==="fulfilled"||i==="rejected"}function LI(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,FI(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,FI(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 UI(){if(ul===null)throw Error(r(459));var i=ul;return ul=null,i}function FI(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=[]),LI(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 zI(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=Yb(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=Zb(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=Yb(""+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=Zb(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=Zb(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=Yb(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=zI(!0),jI=zI(!1),Gi=!1;function l0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function u0(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),wI(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 c0(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 d0=!1;function qd(){if(d0){var i=Nu;if(i!==null)throw i}}function Wd(i,l,d,h){d0=!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&&(d0=!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 BI(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function HI(i,l){var d=i.callbacks;if(d!==null)for(i.callbacks=null,i=0;i<d.length;i++)BI(d[i],l)}var ku=L(null),Hp=L(0);function $I(i,l){i=Zo,K(Hp,i),K(ku,l),Zo=i|l.baseLanes}function f0(){K(Hp,Zo),K(ku,ku.current)}function h0(){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 p0(i){K(yn,yn.current),K(Qr,i),Ss===null&&(Ss=i)}function qI(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||S1(d)||E1(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 g0(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 m0(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?T2:N0,dl=!1,b=d(h,v),dl=!1,Du&&(b=GI(l,d,h,v)),WI(i),b}function WI(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 GI(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=R2,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 v0(){var i=Wp!==0;return Wp=0,i}function y0(i,l,d){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~d}function b0(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=LI(Lu,i,l),l=Qe,(En===null?l.memoizedState:En.next)===null&&(l=l.alternate,$.H=l===null||l.memoizedState===null?T2:N0),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 S0(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 E0(l,Ut,i)}function E0(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 C0(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 VI(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,_0(ZI.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},YI.bind(null,h,v,d,l),null),qt===null)throw Error(r(349));b||(Ho&127)!==0||KI(h,l,d)}return d}function KI(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 YI(i,l,d,h){l.value=d,l.getSnapshot=h,XI(l)&&QI(i)}function ZI(i,l,d){return d(function(){XI(l)&&QI(i)})}function XI(i){var l=i.getSnapshot;i=i.value;try{var d=l();return!Zr(i,d)}catch{return!0}}function QI(i){var l=nl(i,2);l!==null&&Dr(l,i,2)}function w0(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 JI(i,l,d,h){return i.baseState=d,E0(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,e2(l,b)):(b.next=d.next,l.pending=d.next=b)}}function e2(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),t2(i,l,N)}catch(Q){x0(i,l,Q)}finally{b!==null&&x.types!==null&&(b.types=x.types),$.T=b}}else try{b=d(v,h),t2(i,l,b)}catch(Q){x0(i,l,Q)}}function t2(i,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(h){n2(i,l,h)},function(h){return x0(i,l,h)}):n2(i,l,d)}function n2(i,l,d){l.status="fulfilled",l.value=d,r2(l),i.state=d,l=i.pending,l!==null&&(d=l.next,d===l?i.pending=null:(d=d.next,l.next=d,e2(i,d)))}function x0(i,l,d){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do l.status="rejected",l.reason=d,r2(l),l=l.next;while(l!==h)}i.action=null}function r2(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function s2(i,l){return l}function o2(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:s2,lastRenderedState:l},d.queue=h,d=x2.bind(null,Qe,h),h.dispatch=d,h=w0(!1),b=O0.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 i2(i){var l=bn();return a2(l,Ut,i)}function a2(i,l,d){if(l=E0(i,l,s2)[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 l2(i){var l=bn(),d=Ut;if(d!==null)return a2(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 u2(){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&&g0(h,Ut.memoizedState.deps)?v.memoizedState=Uu(l,b,d,h):(Qe.flags|=i,v.memoizedState=Uu(1|l,b,d,h))}function c2(i,l){Yp(8390656,8,i,l)}function _0(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 d2(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 f2(i,l){return Zp(4,2,i,l)}function h2(i,l){return Zp(4,4,i,l)}function p2(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 g2(i,l,d){d=d!=null?d.concat([i]):null,Zp(4,4,p2.bind(null,l,i),d)}function A0(){}function m2(i,l){var d=bn();l=l===void 0?null:l;var h=d.memoizedState;return l!==null&&g0(l,h[1])?h[0]:(d.memoizedState=[i,l],i)}function v2(i,l){var d=bn();l=l===void 0?null:l;var h=d.memoizedState;if(l!==null&&g0(l,h[1]))return h[0];if(h=i(),dl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[h,l],h}function T0(i,l,d){return d===void 0||(Ho&1073741824)!==0&&(ut&261930)===0?i.memoizedState=l:(i.memoizedState=d,i=yO(),Qe.lanes|=i,Ji|=i,d)}function y2(i,l,d,h){return Zr(d,l)?d:ku.current!==null?(i=T0(i,d,h),Zr(i,l)||(Cn=!0),i):(Ho&42)===0||(Ho&1073741824)!==0&&(ut&261930)===0?(Cn=!0,i.memoizedState=d):(i=yO(),Qe.lanes|=i,Ji|=i,l)}function b2(i,l,d,h,v){var b=ee.p;ee.p=b!==0&&8>b?b:8;var x=$.T,N={};$.T=N,O0(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 R0(i,l,d,h){if(i.tag!==5)throw Error(r(476));var v=S2(i).queue;b2(i,v,l,fe,d===null?DH:function(){return E2(i),d(h)})}function S2(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 E2(i){var l=S2(i);l.next===null&&(l=i.alternate.memoizedState),Kd(i,l.next.queue,{},ns())}function I0(){return Yn(ff)}function C2(){return bn().memoizedState}function w2(){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:s0()},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)?_2(l,d):(d=Vb(i,l,d,h),d!==null&&(Dr(d,i,h),A2(d,l,h)))}function x2(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))_2(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=Vb(i,l,v,h),d!==null)return Dr(d,i,h),A2(d,l,h),!0}return!1}function O0(i,l,d,h){if(h={lane:2,revertLane:l1(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Xp(i)){if(l)throw Error(r(479))}else l=Vb(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 _2(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 A2(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 T2={readContext:Yn,use:Vp,useCallback:function(i,l){return br().memoizedState=[i,l===void 0?null:l],i},useContext:Yn,useEffect:c2,useImperativeHandle:function(i,l,d){d=d!=null?d.concat([i]):null,Yp(4194308,4,p2.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=w0(i);var l=i.queue,d=x2.bind(null,Qe,l);return l.dispatch=d,[i.memoizedState,d]},useDebugValue:A0,useDeferredValue:function(i,l){var d=br();return T0(d,i,l)},useTransition:function(){var i=w0(!1);return i=b2.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||KI(h,l,d)}v.memoizedState=d;var b={value:d,getSnapshot:l};return v.queue=b,c2(ZI.bind(null,h,b,i),[i]),h.flags|=2048,Uu(9,{destroy:void 0},YI.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:I0,useFormState:o2,useActionState:o2,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=O0.bind(null,Qe,!0,d),d.dispatch=l,[i,l]},useMemoCache:S0,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)}}},N0={readContext:Yn,use:Vp,useCallback:m2,useContext:Yn,useEffect:_0,useImperativeHandle:g2,useInsertionEffect:f2,useLayoutEffect:h2,useMemo:v2,useReducer:Kp,useRef:u2,useState:function(){return Kp($o)},useDebugValue:A0,useDeferredValue:function(i,l){var d=bn();return y2(d,Ut.memoizedState,i,l)},useTransition:function(){var i=Kp($o)[0],l=bn().memoizedState;return[typeof i=="boolean"?i:Vd(i),l]},useSyncExternalStore:VI,useId:C2,useHostTransitionStatus:I0,useFormState:i2,useActionState:i2,useOptimistic:function(i,l){var d=bn();return JI(d,Ut,i,l)},useMemoCache:S0,useCacheRefresh:w2};N0.useEffectEvent=d2;var R2={readContext:Yn,use:Vp,useCallback:m2,useContext:Yn,useEffect:_0,useImperativeHandle:g2,useInsertionEffect:f2,useLayoutEffect:h2,useMemo:v2,useReducer:C0,useRef:u2,useState:function(){return C0($o)},useDebugValue:A0,useDeferredValue:function(i,l){var d=bn();return Ut===null?T0(d,i,l):y2(d,Ut.memoizedState,i,l)},useTransition:function(){var i=C0($o)[0],l=bn().memoizedState;return[typeof i=="boolean"?i:Vd(i),l]},useSyncExternalStore:VI,useId:C2,useHostTransitionStatus:I0,useFormState:l2,useActionState:l2,useOptimistic:function(i,l){var d=bn();return Ut!==null?JI(d,Ut,i,l):(d.baseState=i,[i,d.queue.dispatch])},useMemoCache:S0,useCacheRefresh:w2};R2.useEffectEvent=d2;function M0(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 P0={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 I2(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 O2(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&&P0.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 N2(i){Ip(i)}function M2(i){console.error(i)}function P2(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 k2(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 k0(i,l,d){return d=Vi(d),d.tag=3,d.payload={element:null},d.callback=function(){Qp(i,l)},d}function D2(i){return i=Vi(i),i.tag=3,i}function L2(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(){k2(l,d,h)}}var x=d.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(i.callback=function(){k2(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),o1(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)),o1(i,h,v)),!1}throw Error(r(435,d.tag))}return o1(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!==Jb&&(i=Error(r(422),{cause:h}),Fd(ms(i,d)))):(h!==Jb&&(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=k0(i.stateNode,h,v),c0(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=k0(d.stateNode,h,i),c0(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=D2(v),L2(v,i,d,h),c0(d,v),!1}d=d.return}while(d!==null);return!1}var D0=Error(r(461)),Cn=!1;function Zn(i,l,d,h){l.child=i===null?jI(l,null,d,h):cl(l,i.child,d,h)}function U2(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=m0(i,l,d,x,b,v),N=v0(),i!==null&&!Cn?(y0(i,l,v),qo(i,l,v)):(dt&&N&&Xb(l),l.flags|=1,Zn(i,l,h,v),l.child)}function F2(i,l,d,h,v){if(i===null){var b=d.type;return typeof b=="function"&&!Kb(b)&&b.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=b,z2(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,!$0(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 z2(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,$0(i,v))(i.flags&131072)!==0&&(Cn=!0);else return l.lanes=i.lanes,qo(i,l,v)}return L0(i,l,d,h,v)}function j2(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 B2(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?$I(l,b):f0(),qI(l);else return h=l.lanes=536870912,B2(i,l,b!==null?b.baseLanes|d:d,d,h)}else b!==null?(Up(l,b.cachePool),$I(l,b),Zi(),l.memoizedState=null):(i!==null&&Up(l,null),f0(),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 B2(i,l,d,h,v){var b=i0();return b=b===null?null:{parent:Sn._currentValue,pool:b},l.memoizedState={baseLanes:d,cachePool:b},i!==null&&Up(l,null),f0(),qI(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 H2(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(p0(l),(i=Vt)?(i=eN(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=_I(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(p0(l),v)if(l.flags&256)l.flags&=-257,l=H2(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),D0;cg(),l=H2(i,l,d)}else i=b.treeContext,Vt=Es(x.nextSibling),Kn=l,dt=!0,$i=null,bs=!1,i!==null&&RI(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 L0(i,l,d,h,v){return il(l),d=m0(i,l,d,h,void 0,v),h=v0(),i!==null&&!Cn?(y0(i,l,v),qo(i,l,v)):(dt&&h&&Xb(l),l.flags|=1,Zn(i,l,d,v),l.child)}function $2(i,l,d,h,v,b){return il(l),l.updateQueue=null,d=GI(l,h,d,v),WI(i),h=v0(),i!==null&&!Cn?(y0(i,l,b),qo(i,l,b)):(dt&&h&&Xb(l),l.flags|=1,Zn(i,l,d,b),l.child)}function q2(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=P0,l.stateNode=b,b._reactInternals=l,b=l.stateNode,b.props=h,b.state=l.memoizedState,b.refs={},l0(l),x=d.contextType,b.context=typeof x=="object"&&x!==null?Yn(x):_u,b.state=l.memoizedState,x=d.getDerivedStateFromProps,typeof x=="function"&&(M0(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&&P0.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)&&O2(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"&&(M0(l,d,ae,h),Q=l.memoizedState),(B=Gi||I2(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,u0(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)&&O2(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"&&(M0(l,d,N,h),re=l.memoizedState),(se=Gi||I2(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 W2(i,l,d,h){return sl(),l.flags|=256,Zn(i,l,d,h),l.child}var U0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function F0(i){return{baseLanes:i,cachePool:kI()}}function z0(i,l,d){return i=i!==null?i.childLanes&~d:0,l&&(i|=ts),i}function G2(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=eN(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=_I(i),d.return=l,l.child=d,Kn=l,Vt=null)):i=null,i===null)throw qi(l);return E1(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=F0(d),h.childLanes=z0(i,x,d),l.memoizedState=U0,Zd(null,h)):(Yi(l),j0(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=B0(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=F0(d),h.childLanes=z0(i,x,d),l.memoizedState=U0,l=Zd(null,h));else if(Yi(l),E1(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=B0(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),D0;S1(N)||cg(),l=B0(i,l,d)}else S1(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&&RI(l,i),l=j0(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=F0(d):(v=N.cachePool,v!==null?(B=Sn._currentValue,v=v.parent!==B?{parent:B,pool:B}:v):v=kI(),N={baseLanes:N.baseLanes|d,cachePool:v}),h.memoizedState=N,h.childLanes=z0(i,x,d),l.memoizedState=U0,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 j0(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 B0(i,l,d){return cl(l,i.child,null,d),i=j0(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function V2(i,l,d){i.lanes|=l;var h=i.alternate;h!==null&&(h.lanes|=l),n0(i.return,l,d)}function H0(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 K2(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&&V2(i,d,l);else if(i.tag===19)V2(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),H0(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}H0(l,!0,d,null,b,h);break;case"together":H0(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 $0(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,p0(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?G2(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 K2(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,j2(i,l,d,l.pendingProps);case 24:Wi(l,Sn,i.memoizedState.cache)}return qo(i,l,d)}function Y2(i,l,d){if(i!==null)if(i.memoizedProps!==l.pendingProps)Cn=!0;else{if(!$0(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&&TI(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")Kb(i)?(h=fl(i,h),l.tag=1,l=q2(null,l,i,h,d)):(l.tag=0,l=L0(null,l,i,h,d));else{if(i!=null){var v=i.$$typeof;if(v===R){l.tag=11,l=U2(null,l,i,h,d);break e}else if(v===I){l.tag=14,l=F2(null,l,i,h,d);break e}}throw l=Y(i)||i,Error(r(306,l,""))}}return l;case 0:return L0(i,l,l.type,l.pendingProps,d);case 1:return h=l.type,v=fl(h,l.pendingProps),q2(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,u0(i,l),Wd(l,h,null,d);var x=l.memoizedState;if(h=x.cache,Wi(l,Sn,h),h!==b.cache&&r0(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=W2(i,l,h,d);break e}else if(h!==v){v=ms(Error(r(424)),l),Fd(v),l=W2(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=jI(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=iN(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=iN(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return Xe(l),i===null&&dt&&(h=l.stateNode=rN(l.type,l.pendingProps,he.current),Kn=l,bs=!0,v=Vt,sa(l.type)?(C1=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,v1(v,b)?h=null:x!==null&&v1(v,x)&&(l.flags|=32),l.memoizedState!==null&&(v=m0(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 G2(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 U2(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 F2(i,l,l.type,l.pendingProps,d);case 15:return z2(i,l,l.type,l.pendingProps,d);case 19:return K2(i,l,d);case 31:return zH(i,l,d);case 22:return j2(i,l,d,l.pendingProps);case 24:return il(l),h=Yn(Sn),i===null?(v=i0(),v===null&&(v=qt,b=s0(),v.pooledCache=b,b.refCount++,b!==null&&(v.pooledCacheLanes|=d),v=b),l.memoizedState={parent:h,cache:v},l0(l),Wi(l,Sn,v)):((i.lanes&d)!==0&&(u0(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&&r0(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 q0(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(CO())i.flags|=8192;else throw ul=zp,a0}else i.flags&=-16777217}function Z2(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!dN(l))if(CO())i.flags|=8192;else throw ul=zp,a0}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(Qb(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,e0())),Kt(l),null;case 26:var v=l.type,b=l.memoizedState;return i===null?(Wo(l),b!==null?(Kt(l),Z2(l,b)):(Kt(l),q0(l,v,null,h,d))):b?b!==i.memoizedState?(Wo(l),Kt(l),Z2(l,b)):(Kt(l),l.flags&=-16777217):(i=i.memoizedProps,i!==h&&Wo(l),Kt(l),q0(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)?II(l):(i=rN(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))II(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),q0(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||GO(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=e0(),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=e0(),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&&f1(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;)xI(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),h0(),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(Qb(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),h0(),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 X2(i,l){switch(Qb(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),h0(),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 Q2(i){var l=i.updateQueue;if(l!==null){var d=i.stateNode;try{HI(l,d)}catch(h){Pt(i,i.return,h)}}}function J2(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 eO(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 W0(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 tO(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&sa(i.type)||i.tag===4}function G0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||tO(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 V0(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(V0(i,l,d),i=i.sibling;i!==null;)V0(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 nO(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,K0=!1,rO=typeof WeakSet=="function"?WeakSet:Set,Ln=null;function $H(i,l){if(i=i.containerInfo,g1=xg,i=gI(i),Bb(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(m1={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)b1(i);else if(d===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":b1(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 sO(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&&Q2(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{HI(i,l)}catch(x){Pt(d,d.return,x)}}break;case 27:l===null&&h&4&&nO(d);case 26:case 5:Ko(i,d),l===null&&h&4&&eO(d),h&512&&Jd(d,d.return);break;case 12:Ko(i,d);break;case 31:Ko(i,d),h&4&&aO(i,d);break;case 13:Ko(i,d),h&4&&lO(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 oO(i){var l=i.alternate;l!==null&&(i.alternate=null,oO(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;)iO(i,l,d),d=d.sibling}function iO(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,QO(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,d.stateNode),Yu(i)):QO(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"&&J2(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 aO(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 lO(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 rO),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new rO),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));iO(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;)uO(l,i),l=l.sibling}var Fs=null;function uO(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=uN("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=uN("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 cN(v,i.type,i.stateNode);else i.stateNode=lN(v,h,i.memoizedProps);else b!==h?(b===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):b.count--,h===null?cN(v,i.type,i.stateNode):lN(v,h,i.memoizedProps)):h===null&&i.stateNode!==null&&W0(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&&W0(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,W0(i,v,d!==null?d.memoizedProps:v)),h&1024&&(K0=!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)}K0&&(K0=!1,cO(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?JO(re,!0):JO(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(tO(h)){d=h;break}h=h.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var v=d.stateNode,b=G0(i);rg(i,b,v);break;case 5:var x=d.stateNode;d.flags&32&&(Z(x,""),d.flags&=-33);var N=G0(i);rg(i,N,x);break;case 3:case 4:var B=d.stateNode.containerInfo,Q=G0(i);V0(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 cO(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;cO(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;)sO(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"&&J2(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++)BI(B[v],N)}catch(Q){Pt(h,h.return,Q)}}d&&x&64&&Q2(b),Jd(b,b.return);break;case 27:nO(b);case 26:case 5:Yo(v,b,d),d&&h===null&&x&4&&eO(b),Jd(b,b.return);break;case 12:Yo(v,b,d);break;case 31:Yo(v,b,d),d&&x&4&&aO(v,b);break;case 13:Yo(v,b,d),d&&x&4&&lO(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 Y0(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 Z0(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;)dO(i,l,d,h),l=l.sibling}function dO(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&&Y0(x,l);break;case 24:zs(i,l,d,h),v&2048&&Z0(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&&Y0(x.alternate,x);break;case 24:Fu(b,x,N,B,v),v&&Q&2048&&Z0(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&&Y0(h.alternate,h);break;case 24:ef(d,h),v&2048&&Z0(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;)fO(i,l,d),i=i.sibling}function fO(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 hO(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,gO(h,i)}hO(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)pO(i),i=i.sibling}function pO(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,gO(h,i)}hO(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 gO(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(oO(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,X0=!1,Zo=0,pn=0,Ji=0,pl=0,Q0=0,ts=0,Bu=0,rf=null,kr=null,J0=!1,ig=0,mO=0,ag=1/0,lg=null,ea=null,Nn=0,ta=null,Hu=null,Xo=0,e1=0,t1=null,vO=null,sf=0,n1=null;function ns(){return(Rt&2)!==0&&ut!==0?ut&-ut:$.T!==null?l1():vp()}function yO(){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 bO(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):s1(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=s1(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=s1(N,x,!1),x!==2){if(X0&&!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=ZO(SO.bind(null,h,d,kr,lg,J0,l,ts,pl,Bu,Qi,b,"Throttled",-0,0),v);break e}SO(h,d,kr,lg,J0,l,ts,pl,Bu,Qi,b,null,-0,0)}}break}while(!0);fo(i)}function SO(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},fO(l,b,ae);var Re=(b&62914560)===b?ig-Gt():(b&4194048)===b?mO-Gt():0;if(Re=N$(ae,Re),Re!==null){Xo=b,i.cancelPendingCommit=Re(RO.bind(null,i,l,b,d,h,v,x,N,B,se,ae,null,te,re)),na(i,b,x,!Q);return}}RO(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&=~Q0,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 r1(){if(it!==null){if(Mt===0)var i=it.return;else i=it,jo=ol=null,b0(i),Pu=null,Bd=0,i=it;for(;i!==null;)X2(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,r1(),qt=i,it=d=Fo(i.current,null),ut=l,Mt=0,es=null,Qi=!1,ju=ro(i,l),X0=!1,Bu=ts=Q0=pl=Ji=pn=0,kr=rf=null,J0=!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 EO(i,l){Qe=null,$.H=Yd,l===Mu||l===Fp?(l=UI(),Mt=3):l===a0?(l=UI(),Mt=4):Mt=l===D0?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 CO(){var i=Qr.current;return i===null?!0:(ut&4194048)===ut?Ss===null:(ut&62914560)===ut||(ut&536870912)!==0?i===Ss:!1}function wO(){var i=$.H;return $.H=Yd,i===null?Yd:i}function xO(){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 s1(i,l,d){var h=Rt;Rt|=2;var v=wO(),b=xO();(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:r1(),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){EO(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;)_O(it)}function YH(i,l){var d=Rt;Rt|=2;var h=wO(),v=xO();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(DI(b)){Mt=0,es=null,AO(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:DI(b)?(Mt=0,es=null,AO(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?dN(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:r1(),pn=6;break e;default:throw Error(r(462))}}ZH();break}catch(se){EO(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();)_O(it)}function _O(i){var l=Y2(i.alternate,i,Zo);i.memoizedProps=i.pendingProps,l===null?dg(i):it=l}function AO(i){var l=i,d=l.alternate;switch(l.tag){case 15:case 0:l=$2(d,l,l.pendingProps,l.type,void 0,ut);break;case 11:l=$2(d,l,l.pendingProps,l.type.render,l.ref,ut);break;case 5:b0(l);default:X2(d,l),l=it=xI(l,Zo),l=Y2(d,l,Zo)}i.memoizedProps=i.pendingProps,l===null?dg(i):it=l}function qu(i,l,d,h){jo=ol=null,b0(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))),TO(l,i)):dg(l)}function dg(i){var l=i;do{if((l.flags&32768)!==0){TO(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 TO(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 RO(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|=Gb,vd(i,d,b,x,N,B),i===qt&&(it=qt=null,ut=0),Hu=l,ta=i,Xo=d,e1=b,t1=v,vO=h,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,e$(no,function(){return PO(),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,IO(),OO(),NO()}}function IO(){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{uO(l,i);var b=m1,x=gI(i.containerInfo),N=b.focusedElem,B=b.selectionRange;if(x!==N&&N&&N.ownerDocument&&pI(N.ownerDocument.documentElement,N)){if(B!==null&&Bb(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=hI(N,De),q=hI(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=!!g1,m1=g1=null}finally{Rt=v,ee.p=h,$.T=d}}i.current=l,Nn=2}}function OO(){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{sO(i,l.alternate,l)}finally{Rt=v,ee.p=h,$.T=d}}Nn=3}}function NO(){if(Nn===4||Nn===3){Nn=0,Tr();var i=ta,l=Hu,d=Xo,h=vO;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Nn=5:(Nn=0,Hu=ta=null,MO(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===n1?sf++:(sf=0,n1=i):sf=0,of(0)}}function MO(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,zd(l)))}function fg(){return IO(),OO(),NO(),PO()}function PO(){if(Nn!==5)return!1;var i=ta,l=e1;e1=0;var d=Za(Xo),h=$.T,v=ee.p;try{ee.p=32>d?32:d,$.T=null,d=t1,t1=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,pO(b.current),dO(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,MO(i,l)}}function kO(i,l,d){l=ms(d,l),l=k0(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)kO(i,i,d);else for(;l!==null;){if(l.tag===3){kO(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=D2(2),h=Ki(l,d,2),h!==null&&(L2(d,h,l,i),Do(h,2),fo(h));break}}l=l.return}}function o1(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)||(X0=!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):Q0|=d,Bu===ut&&(Bu=0)),fo(i)}function DO(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),DO(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),DO(i,d)}function e$(i,l){return Gn(i,l)}var hg=null,Wu=null,i1=!1,pg=!1,a1=!1,ra=0;function fo(i){i!==Wu&&i.next===null&&(Wu===null?hg=Wu=i:Wu=Wu.next=i),pg=!0,i1||(i1=!0,n$())}function of(i,l){if(!a1&&pg){a1=!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,zO(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,zO(h,b));h=h.next}while(d);a1=!1}}function t$(){LO()}function LO(){pg=i1=!1;var i=0;ra!==0&&f$()&&(i=ra);for(var l=Gt(),d=null,h=hg;h!==null;){var v=h.next,b=UO(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 UO(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=FO.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 FO(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:(bO(i,h,l),UO(i,Gt()),i.callbackNode!=null&&i.callbackNode===d?FO.bind(null,i):null)}function zO(i,l){if(fg())return null;bO(i,l,!0)}function n$(){p$(function(){(Rt&6)!==0?Gn(vn,t$):LO()})}function l1(){if(ra===0){var i=Ou;i===0&&(i=ki,ki<<=1,(ki&261888)===0&&(ki=256)),ra=i}return ra}function jO(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:lr(""+i)}function BO(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=jO((v[nt]||null).action),x=h.submitter;x&&(l=(l=x[nt]||null)?jO(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?BO(v,x):new FormData(v);R0(d,{pending:!0,data:B,method:v.method,action:b},null,B)}}else typeof b=="function"&&(N.preventDefault(),B=x?BO(v,x):new FormData(v),R0(d,{pending:!0,data:B,method:v.method,action:b},b,B))},currentTarget:v}]})}}for(var u1=0;u1<Wb.length;u1++){var c1=Wb[u1],s$=c1.toLowerCase(),o$=c1[0].toUpperCase()+c1.slice(1);Us(s$,"on"+o$)}Us(yI,"onAnimationEnd"),Us(bI,"onAnimationIteration"),Us(SI,"onAnimationStart"),Us("dblclick","onDoubleClick"),Us("focusin","onFocus"),Us("focusout","onBlur"),Us(EH,"onTransitionRun"),Us(CH,"onTransitionStart"),Us(wH,"onTransitionCancel"),Us(EI,"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 HO(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)||($O(l,i,2,!1),d.add(h))}function d1(i,l,d){var h=0;l&&(h|=4),$O(d,i,h,l)}var gg="_reactListening"+Math.random().toString(36).slice(2);function f1(i){if(!i[gg]){i[gg]=!0,io.forEach(function(d){d!=="selectionchange"&&(i$.has(d)||d1(d,!1,i),d1(d,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[gg]||(l[gg]=!0,d1("selectionchange",!1,l))}}function $O(i,l,d,h){switch(yN(l)){case 2:var v=k$;break;case 8:v=D$;break;default:v=T1}d=v.bind(null,l,d,i),v=void 0,!Mb||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 h1(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}KR(function(){var Q=b,se=On(d),ae=[];e:{var te=CI.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=Lb;break;case"focusout":Re="blur",re=Lb;break;case"beforeblur":case"afterblur":re=Lb;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=XR;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 yI:case bI:case SI:re=qB;break;case EI: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=JR;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=XR,ie="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(De=JR,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&&qO(ae,te,re,De,!1),Re!==null&&zt!==null&&qO(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=aI;else if(oI(te))if(lI)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=aI):xt=vH;if(xt&&(xt=xt(i,Q))){iI(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":(oI(Ne)||Ne.contentEditable==="true")&&(Cu=Ne,Hb=Q,Ld=null);break;case"focusout":Ld=Hb=Cu=null;break;case"mousedown":$b=!0;break;case"contextmenu":case"mouseup":case"dragend":$b=!1,mI(ae,d,se);break;case"selectionchange":if(SH)break;case"keydown":case"keyup":mI(ae,d,se)}var Je;if(Fb)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?rI(i,d)&&(ct="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(ct="onCompositionStart");ct&&(eI&&d.locale!=="ko"&&(Eu||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&Eu&&(Je=YR()):(Bi=se,Pb="value"in Bi?Bi.value:Bi.textContent,Eu=!0)),Ne=mg(Q,ct),0<Ne.length&&(ct=new QR(ct,i,null,d,se),ae.push({event:ct,listeners:Ne}),Je?ct.data=Je:(Je=sI(d),Je!==null&&(ct.data=Je)))),(Je=cH?dH(i,d):fH(i,d))&&(ct=mg(Q,"onBeforeInput"),0<ct.length&&(Ne=new QR("onBeforeInput","beforeinput",null,d,se),ae.push({event:Ne,listeners:ct}),Ne.data=Je)),r$(ae,i,Q,d,se)}HO(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 qO(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 WO(i){return(typeof i=="string"?i:""+i).replace(l$,`
224
- `).replace(u$,"")}function GO(i,l){return l=WO(l),WO(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 p1(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&&p1(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)&&p1(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||p1(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 VO(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&&VO(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&&VO(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 g1=null,m1=null;function vg(i){return i.nodeType===9?i:i.ownerDocument}function KO(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 YO(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 v1(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 y1=null;function f$(){var i=window.event;return i&&i.type==="popstate"?i===y1?!1:(y1=i,!0):(y1=null,!1)}var ZO=typeof setTimeout=="function"?setTimeout:void 0,h$=typeof clearTimeout=="function"?clearTimeout:void 0,XO=typeof Promise=="function"?Promise:void 0,p$=typeof queueMicrotask=="function"?queueMicrotask:typeof XO<"u"?function(i){return XO.resolve(null).then(i).catch(g$)}:ZO;function g$(i){setTimeout(function(){throw i})}function sa(i){return i==="head"}function QO(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 JO(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 b1(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":b1(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 eN(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 S1(i){return i.data==="$?"||i.data==="$~"}function E1(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 C1=null;function tN(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 nN(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 rN(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,sN=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"?E2(l):Qo.r(i)}var Gu=typeof document>"u"?null:document;function oN(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+'"]'),sN.has(v)||(sN.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),oN("dns-prefetch",i,null)}function C$(i,l){Qo.C(i,l),oN("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))&&w1(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))&&x1(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))&&x1(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 iN(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 aN(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 lN(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=aN(d),(v=Cs.get(v))&&w1(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),x1(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 w1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function x1(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 uN(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 cN(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 dN(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=aN(h),(v=Cs.get(v))&&w1(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 _1=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&&_1===0&&(_1=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>_1?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 fN(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=s0(),l.refCount++,i.pooledCache=l,l.refCount++,b.memoizedState={element:h,isDehydrated:d,cache:l},l0(b),i}function hN(i){return i?(i=_u,i):_u}function pN(i,l,d,h,v,b){v=hN(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 gN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function A1(i,l){gN(i,l),(i=i.alternate)&&gN(i,l)}function mN(i){if(i.tag===13||i.tag===31){var l=nl(i,67108864);l!==null&&Dr(l,i,67108864),A1(i,67108864)}}function vN(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),A1(i,l)}}var xg=!0;function k$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=2,T1(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,T1(i,l,d,h)}finally{ee.p=b,$.T=v}}function T1(i,l,d,h){if(xg){var v=R1(h);if(v===null)h1(i,l,h,_g,d),bN(i,h);else if(U$(v,i,l,d,h))h.stopPropagation();else if(bN(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(),A1(b,2)}if(b=R1(h),b===null&&h1(i,l,h,_g,d),b===v)break;v=b}v!==null&&h.stopPropagation()}else h1(i,l,h,null,d)}}function R1(i){return i=On(i),I1(i)}var _g=null;function I1(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 yN(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 O1=!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 bN(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&&mN(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 SN(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(){vN(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,Di(i.priority,function(){vN(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=R1(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&&mN(l),i.blockedOn=d,!1;l.shift()}return!0}function EN(i,l,d){Ag(i)&&d.delete(l)}function F$(){O1=!1,oa!==null&&Ag(oa)&&(oa=null),ia!==null&&Ag(ia)&&(ia=null),aa!==null&&Ag(aa)&&(aa=null),hf.forEach(EN),pf.forEach(EN)}function Tg(i,l){i.blockedOn===l&&(i.blockedOn=null,O1||(O1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,F$)))}var Rg=null;function CN(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(I1(h||d)===null)continue;break}var b=Fi(d);b!==null&&(i.splice(l,3),l-=3,R0(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);)SN(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||CN(d);else if(x){var N=null;if(b&&b.hasAttribute("formAction")){if(v=b,x=b[nt]||null)N=x.formAction;else if(I1(v)!==null)continue}else N=x.action;typeof N=="function"?d[h+1]=N:(d.splice(h,3),h-=3),CN(d)}}}function wN(){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 N1(i){this._internalRoot=i}Ig.prototype.render=N1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,h=ns();pN(d,h,i,l,null,null)},Ig.prototype.unmount=N1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;pN(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&&SN(i)}};var xN=e.version;if(xN!=="19.2.7")throw Error(r(527,xN,"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=N2,b=M2,x=P2;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=fN(i,1,!1,null,null,d,h,null,v,b,x,wN),i[Yr]=l.current,f1(i),new N1(l)},kf.hydrateRoot=function(i,l,d){if(!s(i))throw Error(r(299));var h=!1,v="",b=N2,x=M2,N=P2,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=fN(i,1,!0,l,d??null,h,v,B,b,x,N,wN),l.context=hN(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,f1(i),new Ig(l)},kf.version="19.2.7",kf}var h4;function zpe(){if(h4)return Ww.exports;h4=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(),Ww.exports=Fpe(),Ww.exports}var jpe=zpe();const Bpe={bodySerializer:t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString():n)},Hpe=({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 GO(i,l){return l=WO(l),WO(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 p1(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&&p1(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)&&p1(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||p1(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 VO(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&&VO(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&&VO(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 g1=null,m1=null;function vg(i){return i.nodeType===9?i:i.ownerDocument}function KO(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 YO(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 v1(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 y1=null;function f$(){var i=window.event;return i&&i.type==="popstate"?i===y1?!1:(y1=i,!0):(y1=null,!1)}var ZO=typeof setTimeout=="function"?setTimeout:void 0,h$=typeof clearTimeout=="function"?clearTimeout:void 0,XO=typeof Promise=="function"?Promise:void 0,p$=typeof queueMicrotask=="function"?queueMicrotask:typeof XO<"u"?function(i){return XO.resolve(null).then(i).catch(g$)}:ZO;function g$(i){setTimeout(function(){throw i})}function sa(i){return i==="head"}function QO(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 JO(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 b1(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":b1(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 eN(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 S1(i){return i.data==="$?"||i.data==="$~"}function E1(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 C1=null;function tN(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 nN(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 rN(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,sN=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"?E2(l):Qo.r(i)}var Gu=typeof document>"u"?null:document;function oN(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+'"]'),sN.has(v)||(sN.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),oN("dns-prefetch",i,null)}function C$(i,l){Qo.C(i,l),oN("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))&&w1(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))&&x1(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))&&x1(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 iN(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 aN(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 lN(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=aN(d),(v=Cs.get(v))&&w1(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),x1(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 w1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function x1(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 uN(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 cN(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 dN(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=aN(h),(v=Cs.get(v))&&w1(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 _1=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&&_1===0&&(_1=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>_1?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 fN(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=s0(),l.refCount++,i.pooledCache=l,l.refCount++,b.memoizedState={element:h,isDehydrated:d,cache:l},l0(b),i}function hN(i){return i?(i=_u,i):_u}function pN(i,l,d,h,v,b){v=hN(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 gN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function A1(i,l){gN(i,l),(i=i.alternate)&&gN(i,l)}function mN(i){if(i.tag===13||i.tag===31){var l=nl(i,67108864);l!==null&&Dr(l,i,67108864),A1(i,67108864)}}function vN(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),A1(i,l)}}var xg=!0;function k$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=2,T1(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,T1(i,l,d,h)}finally{ee.p=b,$.T=v}}function T1(i,l,d,h){if(xg){var v=R1(h);if(v===null)h1(i,l,h,_g,d),bN(i,h);else if(U$(v,i,l,d,h))h.stopPropagation();else if(bN(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(),A1(b,2)}if(b=R1(h),b===null&&h1(i,l,h,_g,d),b===v)break;v=b}v!==null&&h.stopPropagation()}else h1(i,l,h,null,d)}}function R1(i){return i=On(i),I1(i)}var _g=null;function I1(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 yN(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 O1=!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 bN(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&&mN(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 SN(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(){vN(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,Di(i.priority,function(){vN(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=R1(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&&mN(l),i.blockedOn=d,!1;l.shift()}return!0}function EN(i,l,d){Ag(i)&&d.delete(l)}function F$(){O1=!1,oa!==null&&Ag(oa)&&(oa=null),ia!==null&&Ag(ia)&&(ia=null),aa!==null&&Ag(aa)&&(aa=null),hf.forEach(EN),pf.forEach(EN)}function Tg(i,l){i.blockedOn===l&&(i.blockedOn=null,O1||(O1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,F$)))}var Rg=null;function CN(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(I1(h||d)===null)continue;break}var b=Fi(d);b!==null&&(i.splice(l,3),l-=3,R0(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);)SN(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||CN(d);else if(x){var N=null;if(b&&b.hasAttribute("formAction")){if(v=b,x=b[nt]||null)N=x.formAction;else if(I1(v)!==null)continue}else N=x.action;typeof N=="function"?d[h+1]=N:(d.splice(h,3),h-=3),CN(d)}}}function wN(){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 N1(i){this._internalRoot=i}Ig.prototype.render=N1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,h=ns();pN(d,h,i,l,null,null)},Ig.prototype.unmount=N1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;pN(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&&SN(i)}};var xN=e.version;if(xN!=="19.2.7")throw Error(r(527,xN,"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=N2,b=M2,x=P2;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=fN(i,1,!1,null,null,d,h,null,v,b,x,wN),i[Yr]=l.current,f1(i),new N1(l)},kf.hydrateRoot=function(i,l,d){if(!s(i))throw Error(r(299));var h=!1,v="",b=N2,x=M2,N=P2,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=fN(i,1,!0,l,d??null,h,v,B,b,x,N,wN),l.context=hN(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,f1(i),new Ig(l)},kf.version="19.2.7",kf}var hU;function zpe(){if(hU)return Ww.exports;hU=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(),Ww.exports=Fpe(),Ww.exports}var jpe=zpe();const Bpe={bodySerializer:t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString():n)},Hpe=({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)}}}()}},$pe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},qpe=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Wpe=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(qpe(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const o=$pe(r),a=s.map(u=>r==="label"||r==="simple"?t?u:encodeURIComponent(u):cb({allowReserved:t,name:n,value:u})).join(o);return r==="label"||r==="matrix"?o+a:a},cb=({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=Wpe(r),u=Object.entries(s).map(([c,f])=>cb({allowReserved:t,name:r==="deepObject"?`${n}[${c}]`:c,value:f})).join(a);return r==="label"||r==="matrix"?a+u:u},Gpe=/\{[^{}]+\}/g,Vpe=({path:t,url:e})=>{let n=e;const r=e.match(Gpe);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,`;${cb({name:a,value:c})}`);continue}const f=encodeURIComponent(u==="label"?`.${c}`:c);n=n.replace(s,f)}return n},Kpe=({baseUrl:t,path:e,query:n,querySerializer:r,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let a=(t??"")+o;e&&(a=Vpe({path:e,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function p4(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 Ype=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=cb({allowReserved:u.allowReserved,name:o,value:a});c&&s.push(c)}}return s.join("&")},Zpe=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"}},Xpe=(t,e)=>e?!!(t.headers.has(e)||t.query?.[e]||t.headers.get("Cookie")?.includes(`${e}=`)):!1,Qpe=async({security:t,...e})=>{for(const n of t){if(Xpe(e,n.name))continue;const r=await Ype(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}}},g4=t=>Kpe({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:M7(t.querySerializer),url:t.url}),m4=(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},Jpe=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?Jpe(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 Kw{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 ege=()=>({error:new Kw,request:new Kw,response:new Kw}),tge=M7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),nge={"Content-Type":"application/json"},k7=(t={})=>({...Bpe,headers:nge,parseAs:"auto",querySerializer:tge,...t}),rge=(t={})=>{let e=m4(k7(),t);const n=()=>({...e}),r=f=>(e=m4(e,f),n()),s=ege(),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 Qpe({...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=g4(p);return{opts:p,url:g}},a=async f=>{const{opts:p,url:g}=await o(f),m={redirect:"follow",...p,body:p4(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"?Zpe(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 Hpe({...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:p4(g),url:m})};return{buildUrl:g4,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=rge(k7({baseUrl:"https://api.remit.example.com"}));let v4=!1;const sge=t=>{v4||(Ze.interceptors.request.use(async e=>{const n=await t.getToken();return n&&e.headers.set("Authorization",`Bearer ${n}`),e}),v4=!0)},oge=({children:t})=>D.jsx(D.Fragment,{children:t}),ige={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:oge,Account:({fallback:t=null})=>D.jsx(D.Fragment,{children:t})},D7=A.createContext(ige),age=D7.Provider,vAe=()=>A.useContext(D7),lge=(t,e)=>{X8(t,e.meta)&&Bl(t)},uge=(t,e,n,r)=>{X8(t,r.meta)&&Bl(t)},x_=t=>new TextEncoder().encode(t),L7={},__={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),L7[t]=e,__[e]=t}function cge(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 __)e[n/2]=__[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"?x_(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),dge=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=fge(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 fge(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 y4=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Ul=t=>encodeURIComponent(t).replace(/[!'()*]/g,hge),hge=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function sR(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 b4=2048,S4=.2,pge=()=>typeof CompressionStream<"u",gge=async t=>{const e=new Blob([t]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},mge=async t=>{const e=t.length;if(be.debug(`compressIfBeneficial called, payload size: ${e}B`),!pge())return be.debug("CompressionStream not supported, skipping compression"),{body:t,compressed:!1};if(e<b4)return be.debug(`Payload size ${e}B below threshold ${b4}B, skipping compression`),{body:t,compressed:!1};const n=await gge(t),r=1-n.length/e;return r>=S4?(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 ${S4*100}%, skipping`),{body:t,compressed:!1})},vge="POST",yge="application/json",bge="text/plain;charset=UTF-8",Sge=64e3;class Ege{constructor(e,n){this.sendFetch=async r=>{var s,o;const a=JSON.stringify(E4(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 mge(a):{body:a,compressed:!1},p=await this.getHttpRequestOptions(r,c,yge,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(E4(r));if(s.length>Sge)throw new Error("Payload too large for sendBeacon");const o=await this.getHttpRequestOptions(r,s,bge,!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:vge,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 E4=t=>{const e=[];t.RumEvents.forEach(r=>e.push(Cge(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},Cge=t=>({id:t.id,timestamp:Math.round(t.timestamp.getTime()/1e3),type:t.type,metadata:t.metadata,details:t.details});class wge{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=sR(e.query);o&&(n+=`?${o}`)}const{port:r}=e,s=`${e.protocol}//${e.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(s,e.body)}}const xge=(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 _ge=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=sR(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})}))}),xge(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 Age=new Uint8Array(16);function Tge(){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(Age)}const Jn=[];for(let t=0;t<256;++t)Jn.push((t+256).toString(16).slice(1));function Rge(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 Ige=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),C4={randomUUID:Ige};function ih(t,e,n){if(C4.randomUUID&&!t)return C4.randomUUID();t=t||{};const r=t.random||(t.rng||Tge)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Rge(r)}const oR=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 db="X-Amzn-Trace-Id",fb="traceparent",Oge=2,Nge=32,Mge=16,Pge=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},kge=t=>200<=t&&t<300,j7=t=>Math.floor(t/100)===4,iR=t=>Math.floor(t/100)===5,aR=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,Dge=(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?Bge():jge(),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}},Lge=(t,e,n,r)=>{t.headers||(t.headers={}),r?t.headers[fb]=uR(e,n):t.headers[db]=lR(e,n)},Uge=(t,e,n,r)=>{r?t.set(fb,uR(e,n)):t.set(db,lR(e,n))},lR=(t,e)=>"Root="+t+";Parent="+e+";Sampled=1",uR=(t,e)=>"00-"+t+"-"+e+"-01",Fge=t=>t?.length===Pge&&t[0].length===Oge&&t[1].length===Nge&&t[2].length===Mge&&(t[3]==="00"||t[3]==="01"),zge=(t,e)=>{var n,r;const s={};if(t)if(e){const o=(n=t.get(fb))===null||n===void 0?void 0:n.split("-");o&&Fge(o)&&(s.traceId=o[1],s.segmentId=o[2])}else{const o=(r=t.get(db))===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(),jge=()=>`1-${Hge()}-${$ge()}`,Bge=()=>{const t=new Uint8Array(16);return oR(t),`${cR(t)}`},W7=()=>{const t=new Uint8Array(8);return oR(t),cR(t)},Hge=()=>Math.floor(Date.now()/1e3).toString(16),$ge=()=>{const t=new Uint8Array(12);return oR(t),cR(t)},cR=t=>{let e="";for(let n=0;n<t.length;n++)e+=U7[t[n]];return e};class qge{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(kge(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!aR(r)&&!iR(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",Lv="cwr_i",Uv="cwr_s",Fv="cwr_u",Wge=3e4,Gge="arw-module",w4="CWR: Cannot dispatch; no AWS credentials.";class Vge{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 Ege({fetchRequestHandler:new qge(new _ge({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new wge,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(w4)),sendBeacon:()=>Promise.reject(new Error(w4))}: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?`${Lv}_${e}`:Lv}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 Kge(t){let e="";for(let n=0;n<t.byteLength;n++)e+=G7[t[n]];return e}class Yge{format(e){const n=[];for(const o of Object.keys(e)){const a=x_(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=x_(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(dR.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!Zge.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=xs.uuid,g.set(cge(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 Zge=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class dR{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&&x4(n),new dR(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&x4(e),parseInt(Ll(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function x4(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Xge="X-Amz-Algorithm",Qge="X-Amz-Credential",V7="X-Amz-Date",Jge="X-Amz-SignedHeaders",eme="X-Amz-Expires",K7="X-Amz-Signature",Y7="X-Amz-Security-Token",Z7="authorization",X7=V7.toLowerCase(),tme="date",nme=[Z7,X7,tme],rme=K7.toLowerCase(),A_="x-amz-content-sha256",sme=Y7.toLowerCase(),ome={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},ime=/^proxy-/,ame=/^sec-/,Yw="AWS4-HMAC-SHA256",lme="AWS4-HMAC-SHA256-PAYLOAD",ume="UNSIGNED-PAYLOAD",cme=50,Q7="aws4_request",dme=3600*24*7,fme=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===rme)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("&")},hme=t=>pme(t).toISOString().replace(/\.\d{3}Z$/,"Z"),pme=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class gme{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=y4(r),this.credentialProvider=y4(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)}}}()}},$pe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},qpe=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Wpe=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(qpe(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const o=$pe(r),a=s.map(u=>r==="label"||r==="simple"?t?u:encodeURIComponent(u):cb({allowReserved:t,name:n,value:u})).join(o);return r==="label"||r==="matrix"?o+a:a},cb=({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=Wpe(r),u=Object.entries(s).map(([c,f])=>cb({allowReserved:t,name:r==="deepObject"?`${n}[${c}]`:c,value:f})).join(a);return r==="label"||r==="matrix"?a+u:u},Gpe=/\{[^{}]+\}/g,Vpe=({path:t,url:e})=>{let n=e;const r=e.match(Gpe);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,`;${cb({name:a,value:c})}`);continue}const f=encodeURIComponent(u==="label"?`.${c}`:c);n=n.replace(s,f)}return n},Kpe=({baseUrl:t,path:e,query:n,querySerializer:r,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let a=(t??"")+o;e&&(a=Vpe({path:e,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function pU(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 Ype=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=cb({allowReserved:u.allowReserved,name:o,value:a});c&&s.push(c)}}return s.join("&")},Zpe=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"}},Xpe=(t,e)=>e?!!(t.headers.has(e)||t.query?.[e]||t.headers.get("Cookie")?.includes(`${e}=`)):!1,Qpe=async({security:t,...e})=>{for(const n of t){if(Xpe(e,n.name))continue;const r=await Ype(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}}},gU=t=>Kpe({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:M7(t.querySerializer),url:t.url}),mU=(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},Jpe=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?Jpe(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 Kw{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 ege=()=>({error:new Kw,request:new Kw,response:new Kw}),tge=M7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),nge={"Content-Type":"application/json"},k7=(t={})=>({...Bpe,headers:nge,parseAs:"auto",querySerializer:tge,...t}),rge=(t={})=>{let e=mU(k7(),t);const n=()=>({...e}),r=f=>(e=mU(e,f),n()),s=ege(),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 Qpe({...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=gU(p);return{opts:p,url:g}},a=async f=>{const{opts:p,url:g}=await o(f),m={redirect:"follow",...p,body:pU(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"?Zpe(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 Hpe({...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:pU(g),url:m})};return{buildUrl:gU,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=rge(k7({baseUrl:"https://api.remit.example.com"}));let vU=!1;const sge=t=>{vU||(Ze.interceptors.request.use(async e=>{const n=await t.getToken();return n&&e.headers.set("Authorization",`Bearer ${n}`),e}),vU=!0)},oge=({children:t})=>D.jsx(D.Fragment,{children:t}),ige={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:oge,Account:({fallback:t=null})=>D.jsx(D.Fragment,{children:t})},D7=A.createContext(ige),age=D7.Provider,vAe=()=>A.useContext(D7),lge=(t,e)=>{X8(t,e.meta)&&Bl(t)},uge=(t,e,n,r)=>{X8(t,r.meta)&&Bl(t)},x_=t=>new TextEncoder().encode(t),L7={},__={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),L7[t]=e,__[e]=t}function cge(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 __)e[n/2]=__[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"?x_(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),dge=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=fge(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 fge(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 yU=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Ul=t=>encodeURIComponent(t).replace(/[!'()*]/g,hge),hge=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function sR(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 bU=2048,SU=.2,pge=()=>typeof CompressionStream<"u",gge=async t=>{const e=new Blob([t]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},mge=async t=>{const e=t.length;if(be.debug(`compressIfBeneficial called, payload size: ${e}B`),!pge())return be.debug("CompressionStream not supported, skipping compression"),{body:t,compressed:!1};if(e<bU)return be.debug(`Payload size ${e}B below threshold ${bU}B, skipping compression`),{body:t,compressed:!1};const n=await gge(t),r=1-n.length/e;return r>=SU?(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 ${SU*100}%, skipping`),{body:t,compressed:!1})},vge="POST",yge="application/json",bge="text/plain;charset=UTF-8",Sge=64e3;class Ege{constructor(e,n){this.sendFetch=async r=>{var s,o;const a=JSON.stringify(EU(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 mge(a):{body:a,compressed:!1},p=await this.getHttpRequestOptions(r,c,yge,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(EU(r));if(s.length>Sge)throw new Error("Payload too large for sendBeacon");const o=await this.getHttpRequestOptions(r,s,bge,!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:vge,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 EU=t=>{const e=[];t.RumEvents.forEach(r=>e.push(Cge(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},Cge=t=>({id:t.id,timestamp:Math.round(t.timestamp.getTime()/1e3),type:t.type,metadata:t.metadata,details:t.details});class wge{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=sR(e.query);o&&(n+=`?${o}`)}const{port:r}=e,s=`${e.protocol}//${e.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(s,e.body)}}const xge=(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 _ge=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=sR(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})}))}),xge(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 Age=new Uint8Array(16);function Tge(){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(Age)}const Jn=[];for(let t=0;t<256;++t)Jn.push((t+256).toString(16).slice(1));function Rge(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 Ige=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),CU={randomUUID:Ige};function ih(t,e,n){if(CU.randomUUID&&!t)return CU.randomUUID();t=t||{};const r=t.random||(t.rng||Tge)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Rge(r)}const oR=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 db="X-Amzn-Trace-Id",fb="traceparent",Oge=2,Nge=32,Mge=16,Pge=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},kge=t=>200<=t&&t<300,j7=t=>Math.floor(t/100)===4,iR=t=>Math.floor(t/100)===5,aR=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,Dge=(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?Bge():jge(),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}},Lge=(t,e,n,r)=>{t.headers||(t.headers={}),r?t.headers[fb]=uR(e,n):t.headers[db]=lR(e,n)},Uge=(t,e,n,r)=>{r?t.set(fb,uR(e,n)):t.set(db,lR(e,n))},lR=(t,e)=>"Root="+t+";Parent="+e+";Sampled=1",uR=(t,e)=>"00-"+t+"-"+e+"-01",Fge=t=>t?.length===Pge&&t[0].length===Oge&&t[1].length===Nge&&t[2].length===Mge&&(t[3]==="00"||t[3]==="01"),zge=(t,e)=>{var n,r;const s={};if(t)if(e){const o=(n=t.get(fb))===null||n===void 0?void 0:n.split("-");o&&Fge(o)&&(s.traceId=o[1],s.segmentId=o[2])}else{const o=(r=t.get(db))===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(),jge=()=>`1-${Hge()}-${$ge()}`,Bge=()=>{const t=new Uint8Array(16);return oR(t),`${cR(t)}`},W7=()=>{const t=new Uint8Array(8);return oR(t),cR(t)},Hge=()=>Math.floor(Date.now()/1e3).toString(16),$ge=()=>{const t=new Uint8Array(12);return oR(t),cR(t)},cR=t=>{let e="";for(let n=0;n<t.length;n++)e+=U7[t[n]];return e};class qge{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(kge(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!aR(r)&&!iR(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",Lv="cwr_i",Uv="cwr_s",Fv="cwr_u",Wge=3e4,Gge="arw-module",wU="CWR: Cannot dispatch; no AWS credentials.";class Vge{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 Ege({fetchRequestHandler:new qge(new _ge({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new wge,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(wU)),sendBeacon:()=>Promise.reject(new Error(wU))}: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?`${Lv}_${e}`:Lv}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 Kge(t){let e="";for(let n=0;n<t.byteLength;n++)e+=G7[t[n]];return e}class Yge{format(e){const n=[];for(const o of Object.keys(e)){const a=x_(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=x_(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(dR.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!Zge.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=xs.uuid,g.set(cge(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 Zge=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class dR{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&&xU(n),new dR(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&xU(e),parseInt(Ll(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function xU(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Xge="X-Amz-Algorithm",Qge="X-Amz-Credential",V7="X-Amz-Date",Jge="X-Amz-SignedHeaders",eme="X-Amz-Expires",K7="X-Amz-Signature",Y7="X-Amz-Security-Token",Z7="authorization",X7=V7.toLowerCase(),tme="date",nme=[Z7,X7,tme],rme=K7.toLowerCase(),A_="x-amz-content-sha256",sme=Y7.toLowerCase(),ome={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},ime=/^proxy-/,ame=/^sec-/,Yw="AWS4-HMAC-SHA256",lme="AWS4-HMAC-SHA256-PAYLOAD",ume="UNSIGNED-PAYLOAD",cme=50,Q7="aws4_request",dme=3600*24*7,fme=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===rme)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("&")},hme=t=>pme(t).toISOString().replace(/\.\d{3}Z$/,"Z"),pme=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class gme{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=yU(r),this.credentialProvider=yU(n)}createCanonicalRequest(e,n,r){const s=Object.keys(n).sort();return`${e.method}
232
232
  ${this.getCanonicalPath(e)}
233
233
  ${fme(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=hme(e).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}const cm={},Zw=[],Xw=(t,e,n)=>`${t}/${e}/${n}/${Q7}`,mme=async(t,e,n,r,s)=>{const o=await _4(t,e.secretAccessKey,e.accessKeyId),a=`${n}:${r}:${s}:${Ll(o)}:${e.sessionToken}`;if(a in cm)return cm[a];for(Zw.push(a);Zw.length>cme;)delete cm[Zw.shift()];let u=`AWS4${e.secretAccessKey}`;for(const c of[n,r,s,Q7])u=await _4(t,u,c);return cm[a]=u},_4=(t,e,n)=>{const r=new t(e);return r.update(Nh(n)),r.digest()},A4=({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 ome||e?.has(o)||ime.test(o)||ame.test(o))&&(!n||n&&!n.has(o))||(r[o]=t[s].trim().replace(/\s+/g," "))}return r},Qw=async({headers:t,body:e},n)=>{for(const r of Object.keys(t))if(r.toLowerCase()===A_)return t[r];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||dge(e)){const r=new n;return r.update(Nh(e)),Ll(await r.digest())}return ume},vme=(t,e)=>{t=t.toLowerCase();for(const n of Object.keys(e))if(t===n.toLowerCase())return!0;return!1},yme=(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}},T4=t=>{t=Ei.clone(t);for(const e of Object.keys(t.headers))nme.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t};class bme extends gme{headerFormatter=new Yge;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>dme)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=Xw(S,m,p??this.service),C=yme(T4(e),{unhoistableHeaders:a,hoistableHeaders:c});g.sessionToken&&(C.query[Y7]=g.sessionToken),C.query[Xge]=Yw,C.query[Qge]=`${g.accessKeyId}/${E}`,C.query[V7]=y,C.query[eme]=s.toString(10);const w=A4(C,o,u);return C.query[Jge]=this.getCanonicalHeaderList(w),C.query[K7]=await this.getSignature(y,E,this.getSigningKey(g,m,S,p),this.createCanonicalRequest(C,w,await Qw(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=Xw(f,c,a??this.service),m=await Qw({headers:{},body:n},this.sha256),y=new this.sha256;y.update(e);const S=Ll(await y.digest()),E=[lme,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=T4(e),{longDate:p,shortDate:g}=this.formatDate(n),m=Xw(g,c,a??this.service);f.headers[X7]=p,u.sessionToken&&(f.headers[sme]=u.sessionToken);const y=await Qw(f,this.sha256);!vme(A_,f.headers)&&this.applyChecksum&&(f.headers[A_]=y);const S=A4(f,s,r),E=await this.getSignature(p,m,this.getSigningKey(u,c,g,a),this.createCanonicalRequest(f,S,y));return f.headers[Z7]=`${Yw} 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,Yw),a=new this.sha256(await r);return a.update(Nh(o)),Ll(await a.digest())}getSigningKey(e,n,r,s){return mme(this.sha256,e,r,n,s||this.service)}}const Sme="rum",Eme={expiresIn:60},Cme=(t,e)=>{const n=new bme({applyChecksum:!0,credentials:t,region:e,service:Sme,uriEscapePath:!0,sha256:zl});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,Eme),hashAndEncode:async r=>{const s=new zl;return s.update(r),Kge(await s.digest()).toLowerCase()}}};function R4(t,e){return new Request(t,e)}function wme(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 Jw={supported:void 0};class hb{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new hb(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(n=>n||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),Jw.supported===void 0&&(Jw.supported=typeof Request<"u"&&"keepalive"in R4("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 _=I4(n);return Promise.reject(_)}let u=e.path;const c=sR(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),Jw.supported&&(S.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(e));let E=()=>{};const C=R4(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})}))}),wme(s)];return n&&w.push(new Promise((_,T)=>{const R=()=>{const M=I4(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 I4(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 ex=async t=>{const{value:e}=await t.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},xme=async t=>{const{value:e}=await t.body.getReader().read();return String.fromCharCode.apply(null,e)},_me="POST",Ame="application/x-www-form-urlencoded",Tme="https:",Rme="AssumeRoleWithWebIdentity",Ime="2011-06-15";class Ome{constructor(e){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:Rme,Version:Ime}),s=new URLSearchParams(Object.entries(r)).toString(),o=new Ei({method:_me,headers:{"content-type":Ame,host:this.hostname},protocol:Tme,hostname:this.hostname,body:s}),{response:a}=await this.fetchRequestHandler.handle(o),u=await xme(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 Nme="POST",Mme="application/x-amz-json-1.1",Pme="https:",kme="AWSCognitoIdentityService.GetId",Dme="AWSCognitoIdentityService.GetOpenIdToken",Lme="AWSCognitoIdentityService.GetCredentialsForIdentity";class Ume{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(kme,a),c=await ex((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(Dme,s),{response:a}=await this.fetchRequestHandler.handle(o);return this.validateOpenIdTokenResponse(await ex(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(Lme,s),{response:a}=await this.fetchRequestHandler.handle(o),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:p}=this.validateCredenentialsResponse(await ex(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:Nme,headers:{"content-type":Mme,"x-amz-target":r},protocol:Pme,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?`${Lv}_${e.applicationId}`:Lv}}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 Ume({fetchRequestHandler:new hb,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()-Wge);return new Date>e}}class Fme 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 Ome({fetchRequestHandler:new hb,region:r})}}class zme 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",jme="com.amazonaws.rum",zv=`${hs}.http_event`,ez=`${hs}.xray_trace_event`,Bme=`${hs}.largest_contentful_paint_event`,Hme=`${hs}.first_input_delay_event`,$me=`${hs}.cumulative_layout_shift_event`,qme=`${hs}.interaction_to_next_paint_event`,T_=`${hs}.performance_navigation_event`,tz=`${hs}.performance_resource_event`,Wme=`${hs}.dom_event`,Gme=`${hs}.js_error_event`,Vme=`${hs}.page_view_event`,R_=`${hs}.session_start_event`,O4=`${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=jme;class Kme{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 N4=(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},Yme=(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},M4=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 Zme=()=>{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",Xme="desktop",Qme="web";class Jme{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?`${Uv}_${this.appMonitorDetails.id}`:Uv,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(R_,{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&&N4(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(e,n){N4(Fv,e,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return M4(Fv)}getSessionFromCookie(){if(this.useCookies()){const e=M4(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(R_,{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=Zme();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:Xme,platformType:Qme,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 eve{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(Vme,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 tve="3.1.0",nve=new Set(["pageId","parentPageId","interaction","pageTags","title"]),tx=(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")&&nve.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 rve{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!==R_&&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=tx(a,"event");let p={};if(this.eventMetadataHook)try{const y=Object.freeze(Object.assign({},c)),S=this.eventMetadataHook(s,o,y);S&&(p=tx(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 eve(n,this.recordEvent),this.sessionManager=new Jme(e,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(tx(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":tve})}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 P4=t=>[t.startTime,t.duration].join("#"),sve=[{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"]}],k4=(t,e)=>{let n=An.OTHER;if(t){const r=t.substring(t.lastIndexOf("/")+1),s=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];sve.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},ove=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),ive=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,ave=(t,e)=>{try{return new URL(t).hostname===e&&ive.test(t)}catch{return!1}},rz="dom-event",lve={interactionId:()=>"",enableMutationObserver:!1,events:[]};class fR extends Ns{constructor(e){super(rz),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},lve),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=fR.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(Wme,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 uve=t=>{const e=typeof t;return(e==="object"||e==="function")&&!!t},cve=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},dve=(t,e)=>{t.type!=="unhandledrejection"&&(t.type=e.toString()),t.message=e.toString()},fve=(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,hR=(t,e)=>{const n=cve(t),r=t.error;return uve(r)?fve(n,r,e):sz(r)&&dve(n,r),n},oz="js-error",hve={stackTraceLength:1e3,ignore:()=>!1};class pve 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({},hve),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(Gme,hR(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 gve=t=>t.entryType==="resource"&&(!/^https?:/.test(t.name)||/^(fetch|xmlhttprequest)$/.test(t.initiatorType)),pR={eventLimit:10,ignore:gve,recordAllTypes:[An.DOCUMENT,An.SCRIPT,An.STYLESHEET,An.FONT],sampleTypes:[An.IMAGE,An.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},mve="navigation",oc="navigation",nx="load";class vve extends Ns{constructor(e){super(mve),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(T_,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(T_,s)},this.config=Object.assign(Object.assign({},pR),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(nx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(nx,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(nx,this.eventListener))}}var rx,D4;function yve(){if(D4)return rx;D4=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,rx=r,rx}var jv=yve();const bve=qa(jv),L4=F5({__proto__:null,default:bve},[jv]);class gR 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=jv.wrap.bind(L4);for(const n of this.patches)e(n.nodule,n.name,n.wrapper())}unpatchAll(){const e=jv.unwrap.bind(L4);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 Sve="page-view";class Eve extends gR{constructor(){super(Sve),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 Cve="resource",sx="resource";class wve extends Ns{constructor(e){super(Cve),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==sx||this.config.ignore(r))return;const{name:s,initiatorType:o}=r,a=k4(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(!ave(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:k4(n,s),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record(tz,c)}},this.config=Object.assign(Object.assign({},pR),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:sx,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:sx,buffered:!0})}}var I_,U4,pb=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},mR=function(t){if(document.readyState==="loading")return"loading";var e=pb();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"},xve=function(t){var e=t.nodeName;return t.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},gb=function(t,e){var n="";try{for(;t&&t.nodeType!==9;){var r=t,s=r.id?"#"+r.id:xve(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,_ve=function(){return iz},hd=function(t){addEventListener("pageshow",(function(e){e.persisted&&(iz=e.timeStamp,t(e))}),!0)},vR=function(){var t=pb();return t&&t.activationStart||0},Io=function(t,e){var n=pb(),r="navigate";return _ve()>=0?r="back-forward-cache":n&&(document.prerendering||vR()>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))}},yR=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},ap=function(t){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&t()}))},mb=function(t){var e=!1;return function(){e||(t(),e=!0)}},xc=-1,F4=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Bv=function(t){document.visibilityState==="hidden"&&xc>-1&&(xc=t.type==="visibilitychange"?t.timeStamp:0,Ave())},z4=function(){addEventListener("visibilitychange",Bv,!0),addEventListener("prerenderingchange",Bv,!0)},Ave=function(){removeEventListener("visibilitychange",Bv,!0),removeEventListener("prerenderingchange",Bv,!0)},bR=function(){return xc<0&&(xc=F4(),z4(),hd((function(){setTimeout((function(){xc=F4(),z4()}),0)}))),{get firstHiddenTime(){return xc}}},vb=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},j4=[1800,3e3],Tve=function(t,e){e=e||{},vb((function(){var n,r=bR(),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-vR(),0),s.entries.push(u),n(!0)))}))}));o&&(n=Oo(t,s,j4,e.reportAllChanges),hd((function(a){s=Io("FCP"),n=Oo(t,s,j4,e.reportAllChanges),yR((function(){s.value=performance.now()-a.timeStamp,n(!0)}))})))}))},B4=[.1,.25],Rve=function(t,e){(function(n,r){r=r||{},Tve(mb((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,B4,r.reportAllChanges),ap((function(){c(f.takeRecords()),s(!0)})),hd((function(){a=0,o=Io("CLS",0),s=Oo(n,o,B4,r.reportAllChanges),yR((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:gb(c.node),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:c,largestShiftEntry:u,loadState:mR(u.startTime)})}}return Object.assign(s,{attribution:a})})(n);t(r)}),e)},az=0,ox=1/0,fm=0,Ive=function(t){t.forEach((function(e){e.interactionId&&(ox=Math.min(ox,e.interactionId),fm=Math.max(fm,e.interactionId),az=fm?(fm-ox)/7+1:0)}))},lz=function(){return I_?az:performance.interactionCount||0},Ove=function(){"interactionCount"in performance||I_||(I_=lu("event",Ive,{type:"event",buffered:!0,durationThreshold:0}))},Gs=[],lh=new Map,uz=0,Nve=function(){var t=Math.min(Gs.length-1,Math.floor((lz()-uz)/50));return Gs[t]},cz=[],Mve=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)}))}}},SR=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=mb(t),document.visibilityState==="hidden"?t():(n=e(t),ap(t)),n},H4=[200,500],Pve=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},vb((function(){var n;Ove();var r,s=Io("INP"),o=function(u){SR((function(){u.forEach(Mve);var c=Nve();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,H4,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,H4,e.reportAllChanges)})))})))},Mc=[],xa=[],O_=0,ER=new WeakMap,Pc=new Map,N_=-1,kve=function(t){Mc=Mc.concat(t),dz()},dz=function(){N_<0&&(N_=SR(Dve))},Dve=function(){Pc.size>10&&Pc.forEach((function(a,u){lh.has(u)||Pc.delete(u)}));var t=Gs.map((function(a){return ER.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>O_&&u>o||n.has(a)})),N_=-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;O_=Math.max(O_,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")&&ER.set(t,e),dz()}));var _a,uh,fz,Hv,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},Lve=function(t,e){U4||(U4=lu("long-animation-frame",kve)),Pve((function(n){var r=(function(s){var o=s.entries[0],a=ER.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:gb(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:mR(o.startTime)};return Object.assign(s,{attribution:E})})(n);t(r)}),e)},$4=[2500,4e3],ix={},Uve=function(t,e){(function(n,r){r=r||{},vb((function(){var s,o=bR(),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-vR(),0),a.entries=[g],s())}))},c=lu("largest-contentful-paint",u);if(c){s=Oo(n,a,$4,r.reportAllChanges);var f=mb((function(){ix[a.id]||(u(c.takeRecords()),c.disconnect(),ix[a.id]=!0,s(!0))}));["keydown","click"].forEach((function(p){addEventListener(p,(function(){return SR(f)}),{once:!0,capture:!0})})),ap(f),hd((function(p){a=Io("LCP"),s=Oo(n,a,$4,r.reportAllChanges),yR((function(){a.value=performance.now()-p.timeStamp,ix[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=pb();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:gb(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},Fve=new Date,q4=function(t,e){_a||(_a=e,uh=t,fz=new Date,gz(removeEventListener),pz())},pz=function(){if(uh>=0&&uh<fz-Fve){var t={entryType:"first-input",name:_a.type,target:_a.target,cancelable:_a.cancelable,startTime:_a.timeStamp,processingStart:_a.timeStamp+uh};Hv.forEach((function(e){e(t)})),Hv=[]}},zve=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(){q4(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):q4(e,t)}},gz=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,zve,Qf)}))},W4=[100,300],jve=function(t,e){e=e||{},vb((function(){var n,r=bR(),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,W4,e.reportAllChanges),u&&(ap(mb((function(){a(u.takeRecords()),u.disconnect()}))),hd((function(){var c;s=Io("FID"),n=Oo(t,s,W4,e.reportAllChanges),Hv=[],uh=-1,_a=null,gz(addEventListener),c=o,Hv.push(c),pz()})))}))},Bve=function(t,e){jve((function(n){var r=(function(s){var o=s.entries[0],a={eventTarget:gb(o.target),eventType:o.name,eventTime:o.startTime,eventEntry:o,loadState:mR(o.startTime)};return Object.assign(s,{attribution:a})})(n);t(r)}),e)};const Hve="web-vitals";class $ve extends Ns{constructor(e){super(Hve),this.resourceEventIds=new Map,this.cacheLCPCandidates=ove(),this.handleEvent=n=>{switch(n.type){case tz:const r=n.details;this.cacheLCPCandidates&&r.fileType===An.IMAGE&&this.resourceEventIds.set(P4(n.details),n.id);break;case T_:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},pR),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Ph.EVENT,this.handleEvent),Uve(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),Bve(e=>this.handleFID(e)),Rve(e=>this.handleCLS(e),{reportAllChanges:!0}),Lve(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=P4(s?.lcpResourceEntry);o.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(o.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(Bme,{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)($me,{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(Hme,{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)(qme,{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 qve="fetch";class Wve extends gR{constructor(e){super(qve),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=Dge(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 Uge(n.headers,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(s,r)),Lge(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},aR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):j7(r.status)?(n.subsegments[0].error=!0,n.error=!0):iR(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(zv,n))},this.recordHttpEventWithError=(n,r)=>{n.error=hR({type:"error",error:r},this.config.stackTraceLength),this.context.record(zv,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=zge(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 Gve extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}}const Vve="xhr";class Kve extends gR{constructor(e){super(Vve),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},aR(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):iR(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 Gve(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(fb,uR(s.trace.trace_id,s.trace.subsegments[0].id)):this.setRequestHeader(db,lR(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(zv,r)}recordHttpEventWithError(e,n,r){this.xhrMap.delete(n);const s={version:"1.0.0",request:{method:e.method,url:e.url},error:hR({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(zv,s)}recordTraceEvent(e){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(ez,e)}}var $v={},Yve=Object.defineProperty,Zve=(t,e,n)=>e in t?Yve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e,n)=>Zve(t,typeof e!="symbol"?e+"":e,n),G4,Xve=Object.defineProperty,Qve=(t,e,n)=>e in t?Xve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V4=(t,e,n)=>Qve(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 K4={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Y4={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hm={},Jve=()=>!!globalThis.Zone;function CR(t){if(hm[t])return hm[t];const e=globalThis[t],n=e.prototype,r=t in K4?K4[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 Y4?Y4[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&&!Jve())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 ax={};function Ii(t,e,n){var r;const s=`${t}.${String(n)}`;if(ax[s])return ax[s].call(e);const o=CR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(ax[s]=a,a.call(e)):e[n]}const lx={};function mz(t,e,n){const r=`${t}.${String(n)}`;if(lx[r])return lx[r].bind(e);const o=CR(t)[n];return typeof o!="function"?e[n]:(lx[r]=o,o.bind(e))}function eye(t){return Ii("Node",t,"ownerDocument")}function tye(t){return Ii("Node",t,"childNodes")}function nye(t){return Ii("Node",t,"parentNode")}function rye(t){return Ii("Node",t,"parentElement")}function sye(t){return Ii("Node",t,"textContent")}function oye(t,e){return mz("Node",t,"contains")(e)}function iye(t){return mz("Node",t,"getRootNode")()}function aye(t){return!t||!("host"in t)?null:Ii("ShadowRoot",t,"host")}function lye(t){return t.styleSheets}function uye(t){return!t||!("shadowRoot"in t)?null:Ii("Element",t,"shadowRoot")}function cye(t,e){return Ii("Element",t,"querySelector")(e)}function dye(t,e){return Ii("Element",t,"querySelectorAll")(e)}function fye(){return CR("MutationObserver").constructor}function hye(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:eye,childNodes:tye,parentNode:nye,parentElement:rye,textContent:sye,contains:oye,getRootNode:iye,host:aye,styleSheets:lye,shadowRoot:uye,querySelector:cye,querySelectorAll:dye,mutationObserver:fye,patch:hye};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 pye(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 gye(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 M_(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 pye(r)}catch{return null}}function yz(t,e){if(vye(t)){let n;try{n=M_(t.styleSheet)||gye(t)}catch{n=t.cssText}return t.styleSheet.href?Gv(n,t.styleSheet.href):n}else{let n=t.cssText;return yye(t)&&t.selectorText.includes(":")&&(n=mye(n)),e?Gv(n,e):n}}function mye(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function vye(t){return"styleSheet"in t}function yye(t){return"selectorText"in t}class bz{constructor(){V4(this,"idNodeMap",new Map),V4(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 bye(){return new bz}function qv({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 Z4="__rrweb_original__";function Sye(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=Z4 in o?o[Z4]: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 Wv(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 Eye(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const Cye=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,wye=/^(?:[a-z+]+:)?\/\//i,xye=/^www\..*/i,_ye=/^(data:)([^,]*),(.*)/i;function Gv(t,e){return(t||"").replace(Cye,(n,r,s,o,a,u)=>{const c=s||a||u,f=r||o||"";if(!c)return n;if(wye.test(c)||xye.test(c))return`url(${f}${c}${f})`;if(_ye.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${Eye(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 Aye(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 Tye(t,e){return Aye(t,e).join("/* rr_split */")}let Rye=1;const Iye=new RegExp("[^a-z0-9-_:]"),kh=-2;function Ez(){return Rye++}function Oye(t){if(t instanceof HTMLFormElement)return"form";const e=Kl(t.tagName);return Iye.test(e)?"div":e}let ic,X4;const Nye=/^[^ \t\n\r\u000c]+/,Mye=/^[, \t\n\r\u000c]+/;function Pye(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(Mye),!(n>=e.length);){let o=r(Nye);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 Q4=new WeakMap;function _c(t,e){return!e||e.trim()===""?e:wR(t,e)}function kye(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function wR(t,e){let n=Q4.get(t);if(n||(n=t.createElement("a"),Q4.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"?Pye(t,r):n==="style"?Gv(r,wR(t)):e==="object"&&n==="data"?_c(t,r):r)}function wz(t,e,n){return["video","audio"].includes(t)&&e==="autoplay"}function Dye(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 Vv(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Vv(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?Vv(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(Vv(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 Lye(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 Uye(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 Fye(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=zye(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 Bye(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 jye(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 zye(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function jye(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=Gv(c,wR(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 Bye(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=Dye(t,r,s),E=Oye(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=M_(T)),R&&(delete C.rel,delete C.href,C._cssText=R)}if(E==="style"&&t.sheet){let T=M_(t.sheet);T&&(t.childNodes.length>1&&(T=Tye(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=qv({element:t,type:Wv(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")Sye(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"),X4=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,X4.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:kye(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 Hye(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=Fye(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):Hye(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"&&Lye(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")&&Uye(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 $ye(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 qye(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Wye(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 xR={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}};xR.exports=Az();xR.exports.createColors=Az;var Gye=xR.exports;const Vye={},Kye=Object.freeze(Object.defineProperty({__proto__:null,default:Vye},Symbol.toStringTag,{value:"Module"})),Js=Wye(Kye);let J4=Gye,eU=Js,P_=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=J4.isColorSupported),eU&&e&&(n=eU(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}=J4.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=hme(e).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}const cm={},Zw=[],Xw=(t,e,n)=>`${t}/${e}/${n}/${Q7}`,mme=async(t,e,n,r,s)=>{const o=await _U(t,e.secretAccessKey,e.accessKeyId),a=`${n}:${r}:${s}:${Ll(o)}:${e.sessionToken}`;if(a in cm)return cm[a];for(Zw.push(a);Zw.length>cme;)delete cm[Zw.shift()];let u=`AWS4${e.secretAccessKey}`;for(const c of[n,r,s,Q7])u=await _U(t,u,c);return cm[a]=u},_U=(t,e,n)=>{const r=new t(e);return r.update(Nh(n)),r.digest()},AU=({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 ome||e?.has(o)||ime.test(o)||ame.test(o))&&(!n||n&&!n.has(o))||(r[o]=t[s].trim().replace(/\s+/g," "))}return r},Qw=async({headers:t,body:e},n)=>{for(const r of Object.keys(t))if(r.toLowerCase()===A_)return t[r];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||dge(e)){const r=new n;return r.update(Nh(e)),Ll(await r.digest())}return ume},vme=(t,e)=>{t=t.toLowerCase();for(const n of Object.keys(e))if(t===n.toLowerCase())return!0;return!1},yme=(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}},TU=t=>{t=Ei.clone(t);for(const e of Object.keys(t.headers))nme.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t};class bme extends gme{headerFormatter=new Yge;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>dme)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=Xw(S,m,p??this.service),C=yme(TU(e),{unhoistableHeaders:a,hoistableHeaders:c});g.sessionToken&&(C.query[Y7]=g.sessionToken),C.query[Xge]=Yw,C.query[Qge]=`${g.accessKeyId}/${E}`,C.query[V7]=y,C.query[eme]=s.toString(10);const w=AU(C,o,u);return C.query[Jge]=this.getCanonicalHeaderList(w),C.query[K7]=await this.getSignature(y,E,this.getSigningKey(g,m,S,p),this.createCanonicalRequest(C,w,await Qw(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=Xw(f,c,a??this.service),m=await Qw({headers:{},body:n},this.sha256),y=new this.sha256;y.update(e);const S=Ll(await y.digest()),E=[lme,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=TU(e),{longDate:p,shortDate:g}=this.formatDate(n),m=Xw(g,c,a??this.service);f.headers[X7]=p,u.sessionToken&&(f.headers[sme]=u.sessionToken);const y=await Qw(f,this.sha256);!vme(A_,f.headers)&&this.applyChecksum&&(f.headers[A_]=y);const S=AU(f,s,r),E=await this.getSignature(p,m,this.getSigningKey(u,c,g,a),this.createCanonicalRequest(f,S,y));return f.headers[Z7]=`${Yw} 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,Yw),a=new this.sha256(await r);return a.update(Nh(o)),Ll(await a.digest())}getSigningKey(e,n,r,s){return mme(this.sha256,e,r,n,s||this.service)}}const Sme="rum",Eme={expiresIn:60},Cme=(t,e)=>{const n=new bme({applyChecksum:!0,credentials:t,region:e,service:Sme,uriEscapePath:!0,sha256:zl});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,Eme),hashAndEncode:async r=>{const s=new zl;return s.update(r),Kge(await s.digest()).toLowerCase()}}};function RU(t,e){return new Request(t,e)}function wme(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 Jw={supported:void 0};class hb{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new hb(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(n=>n||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),Jw.supported===void 0&&(Jw.supported=typeof Request<"u"&&"keepalive"in RU("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 _=IU(n);return Promise.reject(_)}let u=e.path;const c=sR(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),Jw.supported&&(S.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(e));let E=()=>{};const C=RU(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})}))}),wme(s)];return n&&w.push(new Promise((_,T)=>{const R=()=>{const M=IU(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 IU(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 ex=async t=>{const{value:e}=await t.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},xme=async t=>{const{value:e}=await t.body.getReader().read();return String.fromCharCode.apply(null,e)},_me="POST",Ame="application/x-www-form-urlencoded",Tme="https:",Rme="AssumeRoleWithWebIdentity",Ime="2011-06-15";class Ome{constructor(e){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:Rme,Version:Ime}),s=new URLSearchParams(Object.entries(r)).toString(),o=new Ei({method:_me,headers:{"content-type":Ame,host:this.hostname},protocol:Tme,hostname:this.hostname,body:s}),{response:a}=await this.fetchRequestHandler.handle(o),u=await xme(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 Nme="POST",Mme="application/x-amz-json-1.1",Pme="https:",kme="AWSCognitoIdentityService.GetId",Dme="AWSCognitoIdentityService.GetOpenIdToken",Lme="AWSCognitoIdentityService.GetCredentialsForIdentity";class Ume{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(kme,a),c=await ex((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(Dme,s),{response:a}=await this.fetchRequestHandler.handle(o);return this.validateOpenIdTokenResponse(await ex(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(Lme,s),{response:a}=await this.fetchRequestHandler.handle(o),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:p}=this.validateCredenentialsResponse(await ex(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:Nme,headers:{"content-type":Mme,"x-amz-target":r},protocol:Pme,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?`${Lv}_${e.applicationId}`:Lv}}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 Ume({fetchRequestHandler:new hb,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()-Wge);return new Date>e}}class Fme 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 Ome({fetchRequestHandler:new hb,region:r})}}class zme 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",jme="com.amazonaws.rum",zv=`${hs}.http_event`,ez=`${hs}.xray_trace_event`,Bme=`${hs}.largest_contentful_paint_event`,Hme=`${hs}.first_input_delay_event`,$me=`${hs}.cumulative_layout_shift_event`,qme=`${hs}.interaction_to_next_paint_event`,T_=`${hs}.performance_navigation_event`,tz=`${hs}.performance_resource_event`,Wme=`${hs}.dom_event`,Gme=`${hs}.js_error_event`,Vme=`${hs}.page_view_event`,R_=`${hs}.session_start_event`,OU=`${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=jme;class Kme{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 NU=(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},Yme=(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},MU=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 Zme=()=>{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",Xme="desktop",Qme="web";class Jme{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?`${Uv}_${this.appMonitorDetails.id}`:Uv,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(R_,{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&&NU(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(e,n){NU(Fv,e,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return MU(Fv)}getSessionFromCookie(){if(this.useCookies()){const e=MU(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(R_,{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=Zme();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:Xme,platformType:Qme,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 eve{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(Vme,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 tve="3.1.0",nve=new Set(["pageId","parentPageId","interaction","pageTags","title"]),tx=(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")&&nve.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 rve{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!==R_&&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=tx(a,"event");let p={};if(this.eventMetadataHook)try{const y=Object.freeze(Object.assign({},c)),S=this.eventMetadataHook(s,o,y);S&&(p=tx(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 eve(n,this.recordEvent),this.sessionManager=new Jme(e,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(tx(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":tve})}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 PU=t=>[t.startTime,t.duration].join("#"),sve=[{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"]}],kU=(t,e)=>{let n=An.OTHER;if(t){const r=t.substring(t.lastIndexOf("/")+1),s=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];sve.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},ove=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),ive=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,ave=(t,e)=>{try{return new URL(t).hostname===e&&ive.test(t)}catch{return!1}},rz="dom-event",lve={interactionId:()=>"",enableMutationObserver:!1,events:[]};class fR extends Ns{constructor(e){super(rz),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},lve),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=fR.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(Wme,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 uve=t=>{const e=typeof t;return(e==="object"||e==="function")&&!!t},cve=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},dve=(t,e)=>{t.type!=="unhandledrejection"&&(t.type=e.toString()),t.message=e.toString()},fve=(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,hR=(t,e)=>{const n=cve(t),r=t.error;return uve(r)?fve(n,r,e):sz(r)&&dve(n,r),n},oz="js-error",hve={stackTraceLength:1e3,ignore:()=>!1};class pve 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({},hve),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(Gme,hR(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 gve=t=>t.entryType==="resource"&&(!/^https?:/.test(t.name)||/^(fetch|xmlhttprequest)$/.test(t.initiatorType)),pR={eventLimit:10,ignore:gve,recordAllTypes:[An.DOCUMENT,An.SCRIPT,An.STYLESHEET,An.FONT],sampleTypes:[An.IMAGE,An.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},mve="navigation",oc="navigation",nx="load";class vve extends Ns{constructor(e){super(mve),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(T_,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(T_,s)},this.config=Object.assign(Object.assign({},pR),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(nx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(nx,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(nx,this.eventListener))}}var rx,DU;function yve(){if(DU)return rx;DU=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,rx=r,rx}var jv=yve();const bve=qa(jv),LU=F5({__proto__:null,default:bve},[jv]);class gR 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=jv.wrap.bind(LU);for(const n of this.patches)e(n.nodule,n.name,n.wrapper())}unpatchAll(){const e=jv.unwrap.bind(LU);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 Sve="page-view";class Eve extends gR{constructor(){super(Sve),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 Cve="resource",sx="resource";class wve extends Ns{constructor(e){super(Cve),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==sx||this.config.ignore(r))return;const{name:s,initiatorType:o}=r,a=kU(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(!ave(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:kU(n,s),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record(tz,c)}},this.config=Object.assign(Object.assign({},pR),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:sx,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:sx,buffered:!0})}}var I_,UU,pb=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},mR=function(t){if(document.readyState==="loading")return"loading";var e=pb();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"},xve=function(t){var e=t.nodeName;return t.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},gb=function(t,e){var n="";try{for(;t&&t.nodeType!==9;){var r=t,s=r.id?"#"+r.id:xve(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,_ve=function(){return iz},hd=function(t){addEventListener("pageshow",(function(e){e.persisted&&(iz=e.timeStamp,t(e))}),!0)},vR=function(){var t=pb();return t&&t.activationStart||0},Io=function(t,e){var n=pb(),r="navigate";return _ve()>=0?r="back-forward-cache":n&&(document.prerendering||vR()>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))}},yR=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},ap=function(t){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&t()}))},mb=function(t){var e=!1;return function(){e||(t(),e=!0)}},xc=-1,FU=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Bv=function(t){document.visibilityState==="hidden"&&xc>-1&&(xc=t.type==="visibilitychange"?t.timeStamp:0,Ave())},zU=function(){addEventListener("visibilitychange",Bv,!0),addEventListener("prerenderingchange",Bv,!0)},Ave=function(){removeEventListener("visibilitychange",Bv,!0),removeEventListener("prerenderingchange",Bv,!0)},bR=function(){return xc<0&&(xc=FU(),zU(),hd((function(){setTimeout((function(){xc=FU(),zU()}),0)}))),{get firstHiddenTime(){return xc}}},vb=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},jU=[1800,3e3],Tve=function(t,e){e=e||{},vb((function(){var n,r=bR(),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-vR(),0),s.entries.push(u),n(!0)))}))}));o&&(n=Oo(t,s,jU,e.reportAllChanges),hd((function(a){s=Io("FCP"),n=Oo(t,s,jU,e.reportAllChanges),yR((function(){s.value=performance.now()-a.timeStamp,n(!0)}))})))}))},BU=[.1,.25],Rve=function(t,e){(function(n,r){r=r||{},Tve(mb((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,BU,r.reportAllChanges),ap((function(){c(f.takeRecords()),s(!0)})),hd((function(){a=0,o=Io("CLS",0),s=Oo(n,o,BU,r.reportAllChanges),yR((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:gb(c.node),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:c,largestShiftEntry:u,loadState:mR(u.startTime)})}}return Object.assign(s,{attribution:a})})(n);t(r)}),e)},az=0,ox=1/0,fm=0,Ive=function(t){t.forEach((function(e){e.interactionId&&(ox=Math.min(ox,e.interactionId),fm=Math.max(fm,e.interactionId),az=fm?(fm-ox)/7+1:0)}))},lz=function(){return I_?az:performance.interactionCount||0},Ove=function(){"interactionCount"in performance||I_||(I_=lu("event",Ive,{type:"event",buffered:!0,durationThreshold:0}))},Gs=[],lh=new Map,uz=0,Nve=function(){var t=Math.min(Gs.length-1,Math.floor((lz()-uz)/50));return Gs[t]},cz=[],Mve=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)}))}}},SR=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=mb(t),document.visibilityState==="hidden"?t():(n=e(t),ap(t)),n},HU=[200,500],Pve=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},vb((function(){var n;Ove();var r,s=Io("INP"),o=function(u){SR((function(){u.forEach(Mve);var c=Nve();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,HU,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,HU,e.reportAllChanges)})))})))},Mc=[],xa=[],O_=0,ER=new WeakMap,Pc=new Map,N_=-1,kve=function(t){Mc=Mc.concat(t),dz()},dz=function(){N_<0&&(N_=SR(Dve))},Dve=function(){Pc.size>10&&Pc.forEach((function(a,u){lh.has(u)||Pc.delete(u)}));var t=Gs.map((function(a){return ER.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>O_&&u>o||n.has(a)})),N_=-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;O_=Math.max(O_,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")&&ER.set(t,e),dz()}));var _a,uh,fz,Hv,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},Lve=function(t,e){UU||(UU=lu("long-animation-frame",kve)),Pve((function(n){var r=(function(s){var o=s.entries[0],a=ER.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:gb(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:mR(o.startTime)};return Object.assign(s,{attribution:E})})(n);t(r)}),e)},$U=[2500,4e3],ix={},Uve=function(t,e){(function(n,r){r=r||{},vb((function(){var s,o=bR(),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-vR(),0),a.entries=[g],s())}))},c=lu("largest-contentful-paint",u);if(c){s=Oo(n,a,$U,r.reportAllChanges);var f=mb((function(){ix[a.id]||(u(c.takeRecords()),c.disconnect(),ix[a.id]=!0,s(!0))}));["keydown","click"].forEach((function(p){addEventListener(p,(function(){return SR(f)}),{once:!0,capture:!0})})),ap(f),hd((function(p){a=Io("LCP"),s=Oo(n,a,$U,r.reportAllChanges),yR((function(){a.value=performance.now()-p.timeStamp,ix[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=pb();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:gb(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},Fve=new Date,qU=function(t,e){_a||(_a=e,uh=t,fz=new Date,gz(removeEventListener),pz())},pz=function(){if(uh>=0&&uh<fz-Fve){var t={entryType:"first-input",name:_a.type,target:_a.target,cancelable:_a.cancelable,startTime:_a.timeStamp,processingStart:_a.timeStamp+uh};Hv.forEach((function(e){e(t)})),Hv=[]}},zve=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(){qU(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):qU(e,t)}},gz=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,zve,Qf)}))},WU=[100,300],jve=function(t,e){e=e||{},vb((function(){var n,r=bR(),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,WU,e.reportAllChanges),u&&(ap(mb((function(){a(u.takeRecords()),u.disconnect()}))),hd((function(){var c;s=Io("FID"),n=Oo(t,s,WU,e.reportAllChanges),Hv=[],uh=-1,_a=null,gz(addEventListener),c=o,Hv.push(c),pz()})))}))},Bve=function(t,e){jve((function(n){var r=(function(s){var o=s.entries[0],a={eventTarget:gb(o.target),eventType:o.name,eventTime:o.startTime,eventEntry:o,loadState:mR(o.startTime)};return Object.assign(s,{attribution:a})})(n);t(r)}),e)};const Hve="web-vitals";class $ve extends Ns{constructor(e){super(Hve),this.resourceEventIds=new Map,this.cacheLCPCandidates=ove(),this.handleEvent=n=>{switch(n.type){case tz:const r=n.details;this.cacheLCPCandidates&&r.fileType===An.IMAGE&&this.resourceEventIds.set(PU(n.details),n.id);break;case T_:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},pR),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Ph.EVENT,this.handleEvent),Uve(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),Bve(e=>this.handleFID(e)),Rve(e=>this.handleCLS(e),{reportAllChanges:!0}),Lve(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=PU(s?.lcpResourceEntry);o.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(o.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(Bme,{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)($me,{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(Hme,{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)(qme,{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 qve="fetch";class Wve extends gR{constructor(e){super(qve),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=Dge(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 Uge(n.headers,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(s,r)),Lge(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},aR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):j7(r.status)?(n.subsegments[0].error=!0,n.error=!0):iR(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(zv,n))},this.recordHttpEventWithError=(n,r)=>{n.error=hR({type:"error",error:r},this.config.stackTraceLength),this.context.record(zv,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=zge(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 Gve extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}}const Vve="xhr";class Kve extends gR{constructor(e){super(Vve),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},aR(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):iR(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 Gve(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(fb,uR(s.trace.trace_id,s.trace.subsegments[0].id)):this.setRequestHeader(db,lR(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(zv,r)}recordHttpEventWithError(e,n,r){this.xhrMap.delete(n);const s={version:"1.0.0",request:{method:e.method,url:e.url},error:hR({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(zv,s)}recordTraceEvent(e){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(ez,e)}}var $v={},Yve=Object.defineProperty,Zve=(t,e,n)=>e in t?Yve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e,n)=>Zve(t,typeof e!="symbol"?e+"":e,n),GU,Xve=Object.defineProperty,Qve=(t,e,n)=>e in t?Xve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VU=(t,e,n)=>Qve(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 KU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},YU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hm={},Jve=()=>!!globalThis.Zone;function CR(t){if(hm[t])return hm[t];const e=globalThis[t],n=e.prototype,r=t in KU?KU[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 YU?YU[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&&!Jve())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 ax={};function Ii(t,e,n){var r;const s=`${t}.${String(n)}`;if(ax[s])return ax[s].call(e);const o=CR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(ax[s]=a,a.call(e)):e[n]}const lx={};function mz(t,e,n){const r=`${t}.${String(n)}`;if(lx[r])return lx[r].bind(e);const o=CR(t)[n];return typeof o!="function"?e[n]:(lx[r]=o,o.bind(e))}function eye(t){return Ii("Node",t,"ownerDocument")}function tye(t){return Ii("Node",t,"childNodes")}function nye(t){return Ii("Node",t,"parentNode")}function rye(t){return Ii("Node",t,"parentElement")}function sye(t){return Ii("Node",t,"textContent")}function oye(t,e){return mz("Node",t,"contains")(e)}function iye(t){return mz("Node",t,"getRootNode")()}function aye(t){return!t||!("host"in t)?null:Ii("ShadowRoot",t,"host")}function lye(t){return t.styleSheets}function uye(t){return!t||!("shadowRoot"in t)?null:Ii("Element",t,"shadowRoot")}function cye(t,e){return Ii("Element",t,"querySelector")(e)}function dye(t,e){return Ii("Element",t,"querySelectorAll")(e)}function fye(){return CR("MutationObserver").constructor}function hye(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:eye,childNodes:tye,parentNode:nye,parentElement:rye,textContent:sye,contains:oye,getRootNode:iye,host:aye,styleSheets:lye,shadowRoot:uye,querySelector:cye,querySelectorAll:dye,mutationObserver:fye,patch:hye};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 pye(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 gye(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 M_(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 pye(r)}catch{return null}}function yz(t,e){if(vye(t)){let n;try{n=M_(t.styleSheet)||gye(t)}catch{n=t.cssText}return t.styleSheet.href?Gv(n,t.styleSheet.href):n}else{let n=t.cssText;return yye(t)&&t.selectorText.includes(":")&&(n=mye(n)),e?Gv(n,e):n}}function mye(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function vye(t){return"styleSheet"in t}function yye(t){return"selectorText"in t}class bz{constructor(){VU(this,"idNodeMap",new Map),VU(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 bye(){return new bz}function qv({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 ZU="__rrweb_original__";function Sye(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=ZU in o?o[ZU]: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 Wv(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 Eye(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const Cye=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,wye=/^(?:[a-z+]+:)?\/\//i,xye=/^www\..*/i,_ye=/^(data:)([^,]*),(.*)/i;function Gv(t,e){return(t||"").replace(Cye,(n,r,s,o,a,u)=>{const c=s||a||u,f=r||o||"";if(!c)return n;if(wye.test(c)||xye.test(c))return`url(${f}${c}${f})`;if(_ye.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${Eye(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 Aye(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 Tye(t,e){return Aye(t,e).join("/* rr_split */")}let Rye=1;const Iye=new RegExp("[^a-z0-9-_:]"),kh=-2;function Ez(){return Rye++}function Oye(t){if(t instanceof HTMLFormElement)return"form";const e=Kl(t.tagName);return Iye.test(e)?"div":e}let ic,XU;const Nye=/^[^ \t\n\r\u000c]+/,Mye=/^[, \t\n\r\u000c]+/;function Pye(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(Mye),!(n>=e.length);){let o=r(Nye);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 QU=new WeakMap;function _c(t,e){return!e||e.trim()===""?e:wR(t,e)}function kye(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function wR(t,e){let n=QU.get(t);if(n||(n=t.createElement("a"),QU.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"?Pye(t,r):n==="style"?Gv(r,wR(t)):e==="object"&&n==="data"?_c(t,r):r)}function wz(t,e,n){return["video","audio"].includes(t)&&e==="autoplay"}function Dye(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 Vv(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Vv(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?Vv(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(Vv(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 Lye(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 Uye(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 Fye(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=zye(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 Bye(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 jye(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 zye(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function jye(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=Gv(c,wR(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 Bye(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=Dye(t,r,s),E=Oye(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=M_(T)),R&&(delete C.rel,delete C.href,C._cssText=R)}if(E==="style"&&t.sheet){let T=M_(t.sheet);T&&(t.childNodes.length>1&&(T=Tye(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=qv({element:t,type:Wv(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")Sye(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"),XU=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,XU.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:kye(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 Hye(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=Fye(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):Hye(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"&&Lye(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")&&Uye(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 $ye(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 qye(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Wye(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 xR={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}};xR.exports=Az();xR.exports.createColors=Az;var Gye=xR.exports;const Vye={},Kye=Object.freeze(Object.defineProperty({__proto__:null,default:Vye},Symbol.toStringTag,{value:"Module"})),Js=Wye(Kye);let JU=Gye,e4=Js,P_=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=JU.isColorSupported),e4&&e&&(n=e4(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}=JU.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 _R=P_;P_.default=P_;var lp={};lp.isClean=Symbol("isClean");lp.my=Symbol("my");const tU={after:`
247
+ `),this.name+": "+this.message+e}};var _R=P_;P_.default=P_;var lp={};lp.isClean=Symbol("isClean");lp.my=Symbol("my");const t4={after:`
248
248
  `,beforeClose:`
249
249
  `,beforeComment:`
250
250
  `,beforeDecl:`
251
251
  `,beforeOpen:" ",beforeRule:`
252
252
  `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Yye(t){return t[0].toUpperCase()+t.slice(1)}let k_=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 tU[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"+Yye(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=tU[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(`
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 t4[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"+Yye(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=t4[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=k_;k_.default=k_;let Zye=Rz;function D_(t,e){new Zye(e).stringify(t)}var yb=D_;D_.default=D_;let{isClean:gm,my:Xye}=lp,Qye=_R,Jye=Rz,ebe=yb;function L_(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=>L_(a,n)):(o==="object"&&s!==null&&(s=L_(s)),n[r]=s)}return n}let U_=class{constructor(e={}){this.raws={},this[gm]=!1,this[Xye]=!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=L_(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 Qye(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 Jye().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=ebe){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 bb=U_;U_.default=U_;let tbe=bb,F_=class extends tbe{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 Sb=F_;F_.default=F_;let nbe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",rbe=(t=21)=>{let e="",n=t;for(;n--;)e+=nbe[Math.random()*64|0];return e};var sbe={nanoid:rbe};let{SourceMapConsumer:nU,SourceMapGenerator:rU}=Js,{existsSync:obe,readFileSync:ibe}=Js,{dirname:ux,join:abe}=Js;function lbe(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let z_=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=ux(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new nU(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 lbe(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=ux(e),obe(e))return this.mapFile=e,ibe(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 nU)return rU.fromSourceMap(n).toString();if(n instanceof rU)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=abe(ux(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=z_;z_.default=z_;let{SourceMapConsumer:ube,SourceMapGenerator:cbe}=Js,{fileURLToPath:sU,pathToFileURL:mm}=Js,{isAbsolute:j_,resolve:B_}=Js,{nanoid:dbe}=sbe,cx=Js,oU=_R,fbe=Iz,dx=Symbol("fromOffsetCache"),hbe=!!(ube&&cbe),iU=!!(B_&&j_),Kv=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&&(!iU||/^\w+:\/\//.test(n.from)||j_(n.from)?this.file=n.from:this.file=B_(n.from)),iU&&hbe){let r=new fbe(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 "+dbe(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 oU(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 oU(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[dx])r=this[dx];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[dx]=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:B_(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;j_(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(sU)f.file=sU(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 Eb=Kv;Kv.default=Kv;cx&&cx.registerInput&&cx.registerInput(Kv);let{SourceMapConsumer:Oz,SourceMapGenerator:lv}=Js,{dirname:uv,relative:Nz,resolve:Mz,sep:Pz}=Js,{pathToFileURL:aU}=Js,pbe=Eb,gbe=!!(Oz&&lv),mbe=!!(uv&&Mz&&Nz&&Pz),vbe=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=`
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 Jye().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=ebe){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 bb=U_;U_.default=U_;let tbe=bb,F_=class extends tbe{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 Sb=F_;F_.default=F_;let nbe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",rbe=(t=21)=>{let e="",n=t;for(;n--;)e+=nbe[Math.random()*64|0];return e};var sbe={nanoid:rbe};let{SourceMapConsumer:n4,SourceMapGenerator:r4}=Js,{existsSync:obe,readFileSync:ibe}=Js,{dirname:ux,join:abe}=Js;function lbe(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let z_=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=ux(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new n4(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 lbe(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=ux(e),obe(e))return this.mapFile=e,ibe(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 n4)return r4.fromSourceMap(n).toString();if(n instanceof r4)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=abe(ux(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=z_;z_.default=z_;let{SourceMapConsumer:ube,SourceMapGenerator:cbe}=Js,{fileURLToPath:s4,pathToFileURL:mm}=Js,{isAbsolute:j_,resolve:B_}=Js,{nanoid:dbe}=sbe,cx=Js,o4=_R,fbe=Iz,dx=Symbol("fromOffsetCache"),hbe=!!(ube&&cbe),i4=!!(B_&&j_),Kv=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&&(!i4||/^\w+:\/\//.test(n.from)||j_(n.from)?this.file=n.from:this.file=B_(n.from)),i4&&hbe){let r=new fbe(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 "+dbe(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 o4(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 o4(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[dx])r=this[dx];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[dx]=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:B_(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;j_(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(s4)f.file=s4(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 Eb=Kv;Kv.default=Kv;cx&&cx.registerInput&&cx.registerInput(Kv);let{SourceMapConsumer:Oz,SourceMapGenerator:lv}=Js,{dirname:uv,relative:Nz,resolve:Mz,sep:Pz}=Js,{pathToFileURL:a4}=Js,pbe=Eb,gbe=!!(Oz&&lv),mbe=!!(uv&&Mz&&Nz&&Pz),vbe=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(),mbe&&gbe&&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 pbe(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(aU){let r=aU(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=vbe;let ybe=bb,H_=class extends ybe{constructor(e){super(e),this.type="comment"}};var Cb=H_;H_.default=H_;let{isClean:Dz,my:Lz}=lp,Uz=Sb,Fz=Cb,bbe=bb,zz,AR,TR,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 bbe{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 AR(e)];else if(e.name)e=[new TR(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=>{AR=t};Ci.registerAtRule=t=>{TR=t};Ci.registerRoot=t=>{jz=t};var uu=Ci;Ci.default=Ci;Ci.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,TR.prototype):t.type==="rule"?Object.setPrototypeOf(t,AR.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 Sbe=uu,qz,Wz,Dh=class extends Sbe{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 RR=Dh;Dh.default=Dh;let $_=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=$_;$_.default=$_;let Ebe=Gz,q_=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 Ebe(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var IR=q_;q_.default=q_;const fx=39,lU=34,vm=92,uU=47,ym=10,Df=32,bm=12,Sm=9,Em=13,Cbe=91,wbe=93,xbe=40,_be=41,Abe=123,Tbe=125,Rbe=59,Ibe=42,Obe=58,Nbe=64,Cm=/[\t\n\f\r "#'()/;[\\\]{}]/g,wm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Mbe=/.[\r\n"'(/\\]/,cU=/[\da-f]/i;var Pbe=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 Cbe:case wbe:case Abe:case Tbe:case Obe:case Rbe:case _be:{let H=String.fromCharCode(o);S=[H,H,C];break}case xbe:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==fx&&y!==lU&&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||Mbe.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case fx:case lU:{u=o===fx?"'":'"',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 Nbe:{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!==uU&&o!==Df&&o!==ym&&o!==Sm&&o!==Em&&o!==bm&&(a+=1,cU.test(r.charAt(a)))){for(;cU.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===uU&&r.charCodeAt(C+1)===Ibe?(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,Yv=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 OR=Yv;Yv.default=Yv;Vz.registerAtRule(Yv);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,kbe=Xz,Zv=class extends Qz{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return kbe.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 NR=Zv;Zv.default=Zv;Qz.registerRule(Zv);let Dbe=Sb,Lbe=Pbe,Ube=Cb,Fbe=OR,zbe=up,dU=NR;const fU={empty:!0,space:!0};function jbe(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let Bbe=class{constructor(e){this.input=e,this.root=new zbe,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 Fbe;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 Ube;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=Lbe(this.input)}decl(e,n){let r=new Dbe;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]||jbe(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 dU;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",!fU[g]&&!fU[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 dU;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 Hbe=Bbe;let $be=uu,qbe=Hbe,Wbe=Eb;function Xv(t,e){let n=new Wbe(t,e),r=new qbe(n);try{r.parse()}catch(s){throw s}return r.root}var MR=Xv;Xv.default=Xv;$be.registerParse(Xv);let{isClean:vo,my:Gbe}=lp,Vbe=kz,Kbe=yb,Ybe=uu,Zbe=RR,hU=IR,Xbe=MR,Qbe=up;const Jbe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},e0e={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},t0e={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=Jbe[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 pU(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 W_(t){return t[vo]=!1,t.nodes&&t.nodes.forEach(e=>W_(e)),t}let G_={},$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=W_(n);else if(n instanceof ej||n instanceof hU)s=W_(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=Xbe;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[Gbe]&&Ybe.rebuild(s)}this.result=new hU(e,s,r),this.helpers={...G_,postcss:G_,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(!e0e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!t0e[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=[pU(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=Kbe;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new Vbe(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(pU(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=>{G_=t};var tj=$c;$c.default=$c;Qbe.registerLazyResult($c);Zbe.registerLazyResult($c);let n0e=kz,r0e=yb,s0e=MR;const o0e=IR;let V_=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=r0e;this.result=new o0e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new n0e(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=s0e;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 i0e=V_;V_.default=V_;let a0e=i0e,l0e=tj,u0e=RR,c0e=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 a0e(this,e,n):new l0e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var d0e=Uh;Uh.default=Uh;c0e.registerProcessor(Uh);u0e.registerProcessor(Uh);let f0e=Sb,h0e=Iz,p0e=Cb,g0e=OR,m0e=Eb,v0e=up,y0e=NR;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__:m0e.prototype};o.map&&(o.map={...o.map,__proto__:h0e.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 v0e(r);if(r.type==="decl")return new f0e(r);if(r.type==="rule")return new y0e(r);if(r.type==="comment")return new p0e(r);if(r.type==="atrule")return new g0e(r);throw new Error("Unknown node type: "+t.type)}var b0e=Fh;Fh.default=Fh;let S0e=_R,nj=Sb,E0e=tj,C0e=uu,PR=d0e,w0e=yb,x0e=b0e,rj=RR,_0e=Gz,sj=Cb,oj=OR,A0e=IR,T0e=Eb,R0e=MR,I0e=Xz,ij=NR,aj=up,O0e=bb;function Dt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new PR(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 pbe(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(a4){let r=a4(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=vbe;let ybe=bb,H_=class extends ybe{constructor(e){super(e),this.type="comment"}};var Cb=H_;H_.default=H_;let{isClean:Dz,my:Lz}=lp,Uz=Sb,Fz=Cb,bbe=bb,zz,AR,TR,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 bbe{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 AR(e)];else if(e.name)e=[new TR(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=>{AR=t};Ci.registerAtRule=t=>{TR=t};Ci.registerRoot=t=>{jz=t};var uu=Ci;Ci.default=Ci;Ci.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,TR.prototype):t.type==="rule"?Object.setPrototypeOf(t,AR.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 Sbe=uu,qz,Wz,Dh=class extends Sbe{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 RR=Dh;Dh.default=Dh;let $_=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=$_;$_.default=$_;let Ebe=Gz,q_=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 Ebe(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var IR=q_;q_.default=q_;const fx=39,l4=34,vm=92,u4=47,ym=10,Df=32,bm=12,Sm=9,Em=13,Cbe=91,wbe=93,xbe=40,_be=41,Abe=123,Tbe=125,Rbe=59,Ibe=42,Obe=58,Nbe=64,Cm=/[\t\n\f\r "#'()/;[\\\]{}]/g,wm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Mbe=/.[\r\n"'(/\\]/,c4=/[\da-f]/i;var Pbe=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 Cbe:case wbe:case Abe:case Tbe:case Obe:case Rbe:case _be:{let H=String.fromCharCode(o);S=[H,H,C];break}case xbe:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==fx&&y!==l4&&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||Mbe.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case fx:case l4:{u=o===fx?"'":'"',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 Nbe:{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!==u4&&o!==Df&&o!==ym&&o!==Sm&&o!==Em&&o!==bm&&(a+=1,c4.test(r.charAt(a)))){for(;c4.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===u4&&r.charCodeAt(C+1)===Ibe?(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,Yv=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 OR=Yv;Yv.default=Yv;Vz.registerAtRule(Yv);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,kbe=Xz,Zv=class extends Qz{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return kbe.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 NR=Zv;Zv.default=Zv;Qz.registerRule(Zv);let Dbe=Sb,Lbe=Pbe,Ube=Cb,Fbe=OR,zbe=up,d4=NR;const f4={empty:!0,space:!0};function jbe(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let Bbe=class{constructor(e){this.input=e,this.root=new zbe,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 Fbe;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 Ube;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=Lbe(this.input)}decl(e,n){let r=new Dbe;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]||jbe(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 d4;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",!f4[g]&&!f4[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 d4;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 Hbe=Bbe;let $be=uu,qbe=Hbe,Wbe=Eb;function Xv(t,e){let n=new Wbe(t,e),r=new qbe(n);try{r.parse()}catch(s){throw s}return r.root}var MR=Xv;Xv.default=Xv;$be.registerParse(Xv);let{isClean:vo,my:Gbe}=lp,Vbe=kz,Kbe=yb,Ybe=uu,Zbe=RR,h4=IR,Xbe=MR,Qbe=up;const Jbe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},e0e={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},t0e={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=Jbe[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 p4(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 W_(t){return t[vo]=!1,t.nodes&&t.nodes.forEach(e=>W_(e)),t}let G_={},$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=W_(n);else if(n instanceof ej||n instanceof h4)s=W_(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=Xbe;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[Gbe]&&Ybe.rebuild(s)}this.result=new h4(e,s,r),this.helpers={...G_,postcss:G_,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(!e0e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!t0e[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=[p4(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=Kbe;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new Vbe(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(p4(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=>{G_=t};var tj=$c;$c.default=$c;Qbe.registerLazyResult($c);Zbe.registerLazyResult($c);let n0e=kz,r0e=yb,s0e=MR;const o0e=IR;let V_=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=r0e;this.result=new o0e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new n0e(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=s0e;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 i0e=V_;V_.default=V_;let a0e=i0e,l0e=tj,u0e=RR,c0e=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 a0e(this,e,n):new l0e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var d0e=Uh;Uh.default=Uh;c0e.registerProcessor(Uh);u0e.registerProcessor(Uh);let f0e=Sb,h0e=Iz,p0e=Cb,g0e=OR,m0e=Eb,v0e=up,y0e=NR;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__:m0e.prototype};o.map&&(o.map={...o.map,__proto__:h0e.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 v0e(r);if(r.type==="decl")return new f0e(r);if(r.type==="rule")return new y0e(r);if(r.type==="comment")return new p0e(r);if(r.type==="atrule")return new g0e(r);throw new Error("Unknown node type: "+t.type)}var b0e=Fh;Fh.default=Fh;let S0e=_R,nj=Sb,E0e=tj,C0e=uu,PR=d0e,w0e=yb,x0e=b0e,rj=RR,_0e=Gz,sj=Cb,oj=OR,A0e=IR,T0e=Eb,R0e=MR,I0e=Xz,ij=NR,aj=up,O0e=bb;function Dt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new PR(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`),$v.LANG&&$v.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 PR().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=w0e;Dt.parse=R0e;Dt.fromJSON=x0e;Dt.list=I0e;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=S0e;Dt.Declaration=nj;Dt.Container=C0e;Dt.Processor=PR;Dt.Document=rj;Dt.Comment=sj;Dt.Warning=_0e;Dt.AtRule=oj;Dt.Result=A0e;Dt.Input=T0e;Dt.Rule=ij;Dt.Root=aj;Dt.Node=O0e;E0e.registerPostcss(Dt);var N0e=Dt;Dt.default=Dt;const sn=qye(N0e);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 M0e=Object.defineProperty,P0e=(t,e,n)=>e in t?M0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ws=(t,e,n)=>P0e(t,typeof e!="symbol"?e+"":e,n);function k0e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function D0e(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 kR={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}};kR.exports=lj();kR.exports.createColors=lj;var L0e=kR.exports;const U0e={},F0e=Object.freeze(Object.defineProperty({__proto__:null,default:U0e},Symbol.toStringTag,{value:"Module"})),eo=D0e(F0e);let gU=L0e,mU=eo,K_=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=gU.isColorSupported),mU&&e&&(n=mU(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}=gU.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+`
267
+ https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new PR().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=w0e;Dt.parse=R0e;Dt.fromJSON=x0e;Dt.list=I0e;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=S0e;Dt.Declaration=nj;Dt.Container=C0e;Dt.Processor=PR;Dt.Document=rj;Dt.Comment=sj;Dt.Warning=_0e;Dt.AtRule=oj;Dt.Result=A0e;Dt.Input=T0e;Dt.Rule=ij;Dt.Root=aj;Dt.Node=O0e;E0e.registerPostcss(Dt);var N0e=Dt;Dt.default=Dt;const sn=qye(N0e);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 M0e=Object.defineProperty,P0e=(t,e,n)=>e in t?M0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ws=(t,e,n)=>P0e(t,typeof e!="symbol"?e+"":e,n);function k0e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function D0e(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 kR={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}};kR.exports=lj();kR.exports.createColors=lj;var L0e=kR.exports;const U0e={},F0e=Object.freeze(Object.defineProperty({__proto__:null,default:U0e},Symbol.toStringTag,{value:"Module"})),eo=D0e(F0e);let g4=L0e,m4=eo,K_=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=g4.isColorSupported),m4&&e&&(n=m4(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}=g4.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 DR=K_;K_.default=K_;var cp={};cp.isClean=Symbol("isClean");cp.my=Symbol("my");const vU={after:`
272
+ `),this.name+": "+this.message+e}};var DR=K_;K_.default=K_;var cp={};cp.isClean=Symbol("isClean");cp.my=Symbol("my");const v4={after:`
273
273
  `,beforeClose:`
274
274
  `,beforeComment:`
275
275
  `,beforeDecl:`
276
276
  `,beforeOpen:" ",beforeRule:`
277
277
  `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function z0e(t){return t[0].toUpperCase()+t.slice(1)}let Y_=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 vU[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"+z0e(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=vU[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(`
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 v4[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"+z0e(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=v4[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=Y_;Y_.default=Y_;let j0e=cj;function Z_(t,e){new j0e(e).stringify(t)}var wb=Z_;Z_.default=Z_;let{isClean:xm,my:B0e}=cp,H0e=DR,$0e=cj,q0e=wb;function X_(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=>X_(a,n)):(o==="object"&&s!==null&&(s=X_(s)),n[r]=s)}return n}let Q_=class{constructor(e={}){this.raws={},this[xm]=!1,this[B0e]=!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=X_(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 H0e(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 $0e().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=q0e){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 xb=Q_;Q_.default=Q_;let W0e=xb,J_=class extends W0e{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 _b=J_;J_.default=J_;let G0e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",V0e=(t=21)=>{let e="",n=t;for(;n--;)e+=G0e[Math.random()*64|0];return e};var K0e={nanoid:V0e};let{SourceMapConsumer:yU,SourceMapGenerator:bU}=eo,{existsSync:Y0e,readFileSync:Z0e}=eo,{dirname:hx,join:X0e}=eo;function Q0e(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let eA=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=hx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new yU(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 Q0e(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=hx(e),Y0e(e))return this.mapFile=e,Z0e(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 yU)return bU.fromSourceMap(n).toString();if(n instanceof bU)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=X0e(hx(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=eA;eA.default=eA;let{SourceMapConsumer:J0e,SourceMapGenerator:e1e}=eo,{fileURLToPath:SU,pathToFileURL:_m}=eo,{isAbsolute:tA,resolve:nA}=eo,{nanoid:t1e}=K0e,px=eo,EU=DR,n1e=dj,gx=Symbol("fromOffsetCache"),r1e=!!(J0e&&e1e),CU=!!(nA&&tA),Qv=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&&(!CU||/^\w+:\/\//.test(n.from)||tA(n.from)?this.file=n.from:this.file=nA(n.from)),CU&&r1e){let r=new n1e(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 "+t1e(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 EU(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 EU(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[gx])r=this[gx];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[gx]=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:nA(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;tA(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(SU)f.file=SU(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 Ab=Qv;Qv.default=Qv;px&&px.registerInput&&px.registerInput(Qv);let{SourceMapConsumer:fj,SourceMapGenerator:cv}=eo,{dirname:dv,relative:hj,resolve:pj,sep:gj}=eo,{pathToFileURL:wU}=eo,s1e=Ab,o1e=!!(fj&&cv),i1e=!!(dv&&pj&&hj&&gj),a1e=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=`
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 $0e().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=q0e){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 xb=Q_;Q_.default=Q_;let W0e=xb,J_=class extends W0e{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 _b=J_;J_.default=J_;let G0e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",V0e=(t=21)=>{let e="",n=t;for(;n--;)e+=G0e[Math.random()*64|0];return e};var K0e={nanoid:V0e};let{SourceMapConsumer:y4,SourceMapGenerator:b4}=eo,{existsSync:Y0e,readFileSync:Z0e}=eo,{dirname:hx,join:X0e}=eo;function Q0e(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let eA=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=hx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new y4(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 Q0e(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=hx(e),Y0e(e))return this.mapFile=e,Z0e(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 y4)return b4.fromSourceMap(n).toString();if(n instanceof b4)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=X0e(hx(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=eA;eA.default=eA;let{SourceMapConsumer:J0e,SourceMapGenerator:e1e}=eo,{fileURLToPath:S4,pathToFileURL:_m}=eo,{isAbsolute:tA,resolve:nA}=eo,{nanoid:t1e}=K0e,px=eo,E4=DR,n1e=dj,gx=Symbol("fromOffsetCache"),r1e=!!(J0e&&e1e),C4=!!(nA&&tA),Qv=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&&(!C4||/^\w+:\/\//.test(n.from)||tA(n.from)?this.file=n.from:this.file=nA(n.from)),C4&&r1e){let r=new n1e(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 "+t1e(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 E4(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 E4(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[gx])r=this[gx];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[gx]=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:nA(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;tA(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(S4)f.file=S4(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 Ab=Qv;Qv.default=Qv;px&&px.registerInput&&px.registerInput(Qv);let{SourceMapConsumer:fj,SourceMapGenerator:cv}=eo,{dirname:dv,relative:hj,resolve:pj,sep:gj}=eo,{pathToFileURL:w4}=eo,s1e=Ab,o1e=!!(fj&&cv),i1e=!!(dv&&pj&&hj&&gj),a1e=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(),i1e&&o1e&&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 s1e(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(wU){let r=wU(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=a1e;let l1e=xb,rA=class extends l1e{constructor(e){super(e),this.type="comment"}};var Tb=rA;rA.default=rA;let{isClean:vj,my:yj}=cp,bj=_b,Sj=Tb,u1e=xb,Ej,LR,UR,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 u1e{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 LR(e)];else if(e.name)e=[new UR(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=>{LR=t};wi.registerAtRule=t=>{UR=t};wi.registerRoot=t=>{Cj=t};var cu=wi;wi.default=wi;wi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,UR.prototype):t.type==="rule"?Object.setPrototypeOf(t,LR.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 c1e=cu,Aj,Tj,zh=class extends c1e{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 FR=zh;zh.default=zh;let sA=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=sA;sA.default=sA;let d1e=Rj,oA=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 d1e(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var zR=oA;oA.default=oA;const mx=39,xU=34,Am=92,_U=47,Tm=10,Uf=32,Rm=12,Im=9,Om=13,f1e=91,h1e=93,p1e=40,g1e=41,m1e=123,v1e=125,y1e=59,b1e=42,S1e=58,E1e=64,Nm=/[\t\n\f\r "#'()/;[\\\]{}]/g,Mm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C1e=/.[\r\n"'(/\\]/,AU=/[\da-f]/i;var w1e=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 f1e:case h1e:case m1e:case v1e:case S1e:case y1e:case g1e:{let H=String.fromCharCode(o);S=[H,H,C];break}case p1e:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==mx&&y!==xU&&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||C1e.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case mx:case xU:{u=o===mx?"'":'"',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 E1e:{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!==_U&&o!==Uf&&o!==Tm&&o!==Im&&o!==Om&&o!==Rm&&(a+=1,AU.test(r.charAt(a)))){for(;AU.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===_U&&r.charCodeAt(C+1)===b1e?(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,Jv=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 jR=Jv;Jv.default=Jv;Ij.registerAtRule(Jv);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,x1e=Pj,ey=class extends kj{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return x1e.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 BR=ey;ey.default=ey;kj.registerRule(ey);let _1e=_b,A1e=w1e,T1e=Tb,R1e=jR,I1e=dp,TU=BR;const RU={empty:!0,space:!0};function O1e(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let N1e=class{constructor(e){this.input=e,this.root=new I1e,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 R1e;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 T1e;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=A1e(this.input)}decl(e,n){let r=new _1e;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]||O1e(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 TU;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",!RU[g]&&!RU[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 TU;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 M1e=N1e;let P1e=cu,k1e=M1e,D1e=Ab;function ty(t,e){let n=new D1e(t,e),r=new k1e(n);try{r.parse()}catch(s){throw s}return r.root}var HR=ty;ty.default=ty;P1e.registerParse(ty);let{isClean:yo,my:L1e}=cp,U1e=mj,F1e=wb,z1e=cu,j1e=FR,IU=zR,B1e=HR,H1e=dp;const $1e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},q1e={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},W1e={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=$1e[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 OU(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 iA(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(e=>iA(e)),t}let aA={},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=iA(n);else if(n instanceof Lj||n instanceof IU)s=iA(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=B1e;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[L1e]&&z1e.rebuild(s)}this.result=new IU(e,s,r),this.helpers={...aA,postcss:aA,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(!q1e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!W1e[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=[OU(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=F1e;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new U1e(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(OU(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=>{aA=t};var Uj=Gc;Gc.default=Gc;H1e.registerLazyResult(Gc);j1e.registerLazyResult(Gc);let G1e=mj,V1e=wb,K1e=HR;const Y1e=zR;let lA=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=V1e;this.result=new Y1e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new G1e(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=K1e;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 Z1e=lA;lA.default=lA;let X1e=Z1e,Q1e=Uj,J1e=FR,eSe=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 X1e(this,e,n):new Q1e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var tSe=Bh;Bh.default=Bh;eSe.registerProcessor(Bh);J1e.registerProcessor(Bh);let nSe=_b,rSe=dj,sSe=Tb,oSe=jR,iSe=Ab,aSe=dp,lSe=BR;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__:iSe.prototype};o.map&&(o.map={...o.map,__proto__:rSe.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 aSe(r);if(r.type==="decl")return new nSe(r);if(r.type==="rule")return new lSe(r);if(r.type==="comment")return new sSe(r);if(r.type==="atrule")return new oSe(r);throw new Error("Unknown node type: "+t.type)}var uSe=Hh;Hh.default=Hh;let cSe=DR,Fj=_b,dSe=Uj,fSe=cu,$R=tSe,hSe=wb,pSe=uSe,zj=FR,gSe=Rj,jj=Tb,Bj=jR,mSe=zR,vSe=Ab,ySe=HR,bSe=Pj,Hj=BR,$j=dp,SSe=xb;function Lt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new $R(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 s1e(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(w4){let r=w4(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=a1e;let l1e=xb,rA=class extends l1e{constructor(e){super(e),this.type="comment"}};var Tb=rA;rA.default=rA;let{isClean:vj,my:yj}=cp,bj=_b,Sj=Tb,u1e=xb,Ej,LR,UR,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 u1e{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 LR(e)];else if(e.name)e=[new UR(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=>{LR=t};wi.registerAtRule=t=>{UR=t};wi.registerRoot=t=>{Cj=t};var cu=wi;wi.default=wi;wi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,UR.prototype):t.type==="rule"?Object.setPrototypeOf(t,LR.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 c1e=cu,Aj,Tj,zh=class extends c1e{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 FR=zh;zh.default=zh;let sA=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=sA;sA.default=sA;let d1e=Rj,oA=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 d1e(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var zR=oA;oA.default=oA;const mx=39,x4=34,Am=92,_4=47,Tm=10,Uf=32,Rm=12,Im=9,Om=13,f1e=91,h1e=93,p1e=40,g1e=41,m1e=123,v1e=125,y1e=59,b1e=42,S1e=58,E1e=64,Nm=/[\t\n\f\r "#'()/;[\\\]{}]/g,Mm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C1e=/.[\r\n"'(/\\]/,A4=/[\da-f]/i;var w1e=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 f1e:case h1e:case m1e:case v1e:case S1e:case y1e:case g1e:{let H=String.fromCharCode(o);S=[H,H,C];break}case p1e:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==mx&&y!==x4&&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||C1e.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case mx:case x4:{u=o===mx?"'":'"',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 E1e:{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!==_4&&o!==Uf&&o!==Tm&&o!==Im&&o!==Om&&o!==Rm&&(a+=1,A4.test(r.charAt(a)))){for(;A4.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===_4&&r.charCodeAt(C+1)===b1e?(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,Jv=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 jR=Jv;Jv.default=Jv;Ij.registerAtRule(Jv);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,x1e=Pj,ey=class extends kj{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return x1e.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 BR=ey;ey.default=ey;kj.registerRule(ey);let _1e=_b,A1e=w1e,T1e=Tb,R1e=jR,I1e=dp,T4=BR;const R4={empty:!0,space:!0};function O1e(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let N1e=class{constructor(e){this.input=e,this.root=new I1e,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 R1e;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 T1e;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=A1e(this.input)}decl(e,n){let r=new _1e;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]||O1e(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 T4;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",!R4[g]&&!R4[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 T4;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 M1e=N1e;let P1e=cu,k1e=M1e,D1e=Ab;function ty(t,e){let n=new D1e(t,e),r=new k1e(n);try{r.parse()}catch(s){throw s}return r.root}var HR=ty;ty.default=ty;P1e.registerParse(ty);let{isClean:yo,my:L1e}=cp,U1e=mj,F1e=wb,z1e=cu,j1e=FR,I4=zR,B1e=HR,H1e=dp;const $1e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},q1e={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},W1e={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=$1e[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 O4(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 iA(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(e=>iA(e)),t}let aA={},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=iA(n);else if(n instanceof Lj||n instanceof I4)s=iA(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=B1e;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[L1e]&&z1e.rebuild(s)}this.result=new I4(e,s,r),this.helpers={...aA,postcss:aA,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(!q1e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!W1e[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=[O4(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=F1e;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new U1e(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(O4(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=>{aA=t};var Uj=Gc;Gc.default=Gc;H1e.registerLazyResult(Gc);j1e.registerLazyResult(Gc);let G1e=mj,V1e=wb,K1e=HR;const Y1e=zR;let lA=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=V1e;this.result=new Y1e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new G1e(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=K1e;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 Z1e=lA;lA.default=lA;let X1e=Z1e,Q1e=Uj,J1e=FR,eSe=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 X1e(this,e,n):new Q1e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var tSe=Bh;Bh.default=Bh;eSe.registerProcessor(Bh);J1e.registerProcessor(Bh);let nSe=_b,rSe=dj,sSe=Tb,oSe=jR,iSe=Ab,aSe=dp,lSe=BR;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__:iSe.prototype};o.map&&(o.map={...o.map,__proto__:rSe.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 aSe(r);if(r.type==="decl")return new nSe(r);if(r.type==="rule")return new lSe(r);if(r.type==="comment")return new sSe(r);if(r.type==="atrule")return new oSe(r);throw new Error("Unknown node type: "+t.type)}var uSe=Hh;Hh.default=Hh;let cSe=DR,Fj=_b,dSe=Uj,fSe=cu,$R=tSe,hSe=wb,pSe=uSe,zj=FR,gSe=Rj,jj=Tb,Bj=jR,mSe=zR,vSe=Ab,ySe=HR,bSe=Pj,Hj=BR,$j=dp,SSe=xb;function Lt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new $R(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`),$v.LANG&&$v.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 $R().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=hSe;Lt.parse=ySe;Lt.fromJSON=pSe;Lt.list=bSe;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=cSe;Lt.Declaration=Fj;Lt.Container=fSe;Lt.Processor=$R;Lt.Document=zj;Lt.Comment=jj;Lt.Warning=gSe;Lt.AtRule=Bj;Lt.Result=mSe;Lt.Input=vSe;Lt.Rule=Hj;Lt.Root=$j;Lt.Node=SSe;dSe.registerPostcss(Lt);var ESe=Lt;Lt.default=Lt;const on=k0e(ESe);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 qR{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 qR){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 NU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},MU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Pm={},CSe=()=>!!globalThis.Zone;function WR(t){if(Pm[t])return Pm[t];const e=globalThis[t],n=e.prototype,r=t in NU?NU[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 MU?MU[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&&!CSe())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 vx={};function Oi(t,e,n){var r;const s=`${t}.${String(n)}`;if(vx[s])return vx[s].call(e);const o=WR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(vx[s]=a,a.call(e)):e[n]}const yx={};function qj(t,e,n){const r=`${t}.${String(n)}`;if(yx[r])return yx[r].bind(e);const o=WR(t)[n];return typeof o!="function"?e[n]:(yx[r]=o,o.bind(e))}function wSe(t){return Oi("Node",t,"ownerDocument")}function xSe(t){return Oi("Node",t,"childNodes")}function _Se(t){return Oi("Node",t,"parentNode")}function ASe(t){return Oi("Node",t,"parentElement")}function TSe(t){return Oi("Node",t,"textContent")}function RSe(t,e){return qj("Node",t,"contains")(e)}function ISe(t){return qj("Node",t,"getRootNode")()}function OSe(t){return!t||!("host"in t)?null:Oi("ShadowRoot",t,"host")}function NSe(t){return t.styleSheets}function MSe(t){return!t||!("shadowRoot"in t)?null:Oi("Element",t,"shadowRoot")}function PSe(t,e){return Oi("Element",t,"querySelector")(e)}function kSe(t,e){return Oi("Element",t,"querySelectorAll")(e)}function Wj(){return WR("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:wSe,childNodes:xSe,parentNode:_Se,parentElement:ASe,textContent:TSe,contains:RSe,getRootNode:ISe,host:OSe,styleSheets:NSe,shadowRoot:MSe,querySelector:PSe,querySelectorAll:kSe,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
292
+ https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new $R().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=hSe;Lt.parse=ySe;Lt.fromJSON=pSe;Lt.list=bSe;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=cSe;Lt.Declaration=Fj;Lt.Container=fSe;Lt.Processor=$R;Lt.Document=zj;Lt.Comment=jj;Lt.Warning=gSe;Lt.AtRule=Bj;Lt.Result=mSe;Lt.Input=vSe;Lt.Rule=Hj;Lt.Root=$j;Lt.Node=SSe;dSe.registerPostcss(Lt);var ESe=Lt;Lt.default=Lt;const on=k0e(ESe);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 qR{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 qR){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 N4={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},M4={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Pm={},CSe=()=>!!globalThis.Zone;function WR(t){if(Pm[t])return Pm[t];const e=globalThis[t],n=e.prototype,r=t in N4?N4[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 M4?M4[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&&!CSe())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 vx={};function Oi(t,e,n){var r;const s=`${t}.${String(n)}`;if(vx[s])return vx[s].call(e);const o=WR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(vx[s]=a,a.call(e)):e[n]}const yx={};function qj(t,e,n){const r=`${t}.${String(n)}`;if(yx[r])return yx[r].bind(e);const o=WR(t)[n];return typeof o!="function"?e[n]:(yx[r]=o,o.bind(e))}function wSe(t){return Oi("Node",t,"ownerDocument")}function xSe(t){return Oi("Node",t,"childNodes")}function _Se(t){return Oi("Node",t,"parentNode")}function ASe(t){return Oi("Node",t,"parentElement")}function TSe(t){return Oi("Node",t,"textContent")}function RSe(t,e){return qj("Node",t,"contains")(e)}function ISe(t){return qj("Node",t,"getRootNode")()}function OSe(t){return!t||!("host"in t)?null:Oi("ShadowRoot",t,"host")}function NSe(t){return t.styleSheets}function MSe(t){return!t||!("shadowRoot"in t)?null:Oi("Element",t,"shadowRoot")}function PSe(t,e){return Oi("Element",t,"querySelector")(e)}function kSe(t,e){return Oi("Element",t,"querySelectorAll")(e)}function Wj(){return WR("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:wSe,childNodes:xSe,parentNode:_Se,parentElement:ASe,textContent:TSe,contains:RSe,getRootNode:ISe,host:OSe,styleSheets:NSe,shadowRoot:MSe,querySelector:PSe,querySelectorAll:kSe,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 PU={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&&(PU=new Proxy(PU,{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 Rb(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)}}),()=>Rb(t,e,o||{},!0)}let ny=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ny=()=>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(Vv(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function DSe(t,e){return e.getId(t)!==-1}function bx(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 uA(t){return!!t.changedTouches}function LSe(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 cA(t){return t?t instanceof qR&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class USe{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 FSe(t){let e=t,n;for(;n=Jj(e);)e=n;return e}function zSe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=FSe(t);return rt.contains(e,n)}function eB(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||zSe(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 kU(t){return"__ln"in t}class jSe{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&&kU(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&&kU(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 DU=(t,e)=>`${t}@${e}`;class BSe{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 jSe,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),cA(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)LU(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!UU(this.droppedSet,c)&&!LU(this.removesSubTreeCache,c,this.mirror)||UU(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=qv({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Wv(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!bx(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=Wv(n);s=qv({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)||bx(n,this.mirror,this.slimDOMOptions)||!DSe(n,this.mirror)||(this.addedSet.has(n)?(dA(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[DU(r,s)]?dA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:ch(e.target)&&dh(e.target)?!0:void 0}),HSe(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(bx(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[DU(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)),cA(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 dA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>dA(t,n))}function HSe(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 LU(t,e,n){return t.size===0?!1:$Se(t,e)}function $Se(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function UU(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 qSe(t){fh=t}function WSe(){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 BSe;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 GSe({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}=uA(g)?g.changedTouches[0]:g;u||(u=ny()),a.push({x:y,y:S,id:r.getId(m),timeOffset:ny()-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 VSe({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 uA(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=uA(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 KSe({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 YSe=["INPUT","TEXTAREA","SELECT"],FU=new WeakMap;function ZSe({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||YSe.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=Wv(T)||"";P==="radio"||P==="checkbox"?I=T.checked:(u[M.toLowerCase()]||u[P])&&(O=qv({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=FU.get(_);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){FU.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(_=>Rb(_[0],_[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(_=>_())})}function ry(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 XSe({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:[...ry(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:[...ry(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 QSe({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:ry(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:ry(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function JSe({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 eEe({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 tEe(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 nEe({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 rEe(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 sEe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};rEe(t,e);let r;t.recordDOM&&(r=rB(t,t.doc));const s=GSe(t),o=VSe(t),a=sB(t),u=KSe(t,{win:n}),c=ZSe(t),f=JSe(t);let p=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(p=XSe(t,{win:n}),g=oB(t,t.doc),m=QSe(t,{win:n}),t.collectFonts&&(y=eEe(t)));const S=tEe(t),E=nEe(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 zU{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 oEe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new zU(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 zU(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 iEe{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+/",aEe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Lm=0;Lm<Tc.length;Lm++)aEe[Tc.charCodeAt(Lm)]=Lm;var lEe=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 jU=new Map;function uEe(t,e){let n=jU.get(t);return n||(n=new Map,jU.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=uEe(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=lEe(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 cEe(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=Rb(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 dEe(t){return t==="experimental-webgl"?"webgl":t}function BU(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=dEe(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 HU(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=Rb(t,c,{set(p){n(this.canvas,{type:e,property:c,args:[p],setter:!0})}});a.push(f)}return a}function fEe(t,e,n,r){const s=[];return s.push(...HU(e.WebGLRenderingContext.prototype,Vc.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...HU(e.WebGL2RenderingContext.prototype,Vc.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const uB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",hEe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),$U=typeof window<"u"&&window.Blob&&new Blob([hEe(uB)],{type:"text/javascript;charset=utf-8"});function pEe(t){let e;try{if(e=$U&&(window.URL||window.webkitURL).createObjectURL($U),!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 gEe{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=BU(n,r,s,!0),u=new Map,c=new pEe;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=BU(e,n,r,!1),o=cEe(this.processMutation.bind(this),e,n,r),a=fEe(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 mEe{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new USe),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 vEe{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,Sx,sy=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((G4=t.contentWindow)==null?void 0:G4.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Bs=bye();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;qSe(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);LSe();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=ny(),(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 mEe({mutationCb:K,adoptedStyleSheetCb:he}),ve=new oEe({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 vEe;Sx=new gEe({recordCanvas:O,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:Bs,sampling:_.canvas,dataURLOptions:T});const Xe=new iEe({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:Sx,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=$ye(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),cA(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(sEe)({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:Sx,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)),sy=!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(),sy=!1,WSe()}}catch(Ee){console.warn(Ee)}}hp.addCustomEvent=(t,e)=>{if(!sy)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(!sy)throw new Error("please take full snapshot after start recording");hv(t)};hp.mirror=Bs;var qU;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(qU||(qU={}));const yEe="rrweb",bEe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},SEe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},WU=SEe;class EEe extends Ns{constructor(e){super(yEe),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({},WU.recordOptions),e?.recordOptions),bEe);this.config=Object.assign(Object.assign(Object.assign({},WU),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(O4,n),be.info("RRWebPlugin events sent to RUM",{eventType:O4,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var CEe=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},fA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(fA||(fA={}));const cB="us-west-2",hA=`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:Gge,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:hA,endpointUrl:new URL(hA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:fA.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 wEe=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=CEe(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:hA.replace(cB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new rve({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;[Uv,Fv,jc,`${Uv}_${this.applicationId}`,`${Fv}_${this.applicationId}`,`${jc}_${this.applicationId}`].forEach(r=>Yme(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 Vge(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 Kme(r);return this.config.disableAutoPageView||s.addPlugin(new Eve),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 GU;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(GU||(GU={}));const xEe=t=>Object.assign(Object.assign({},fB(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class _Ee extends wEe{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},xEe(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(Cme),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new Fme(c,o).ChainAnonymousCredentialsProvider:new zme(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 pve(e)],[Ks.Performance]:e=>[new vve(e),new wve(e),new $ve(e)],[Ks.Interaction]:e=>[new fR(e)],[Ks.Http]:e=>[new Kve(e),new Wve(e)],[Ks.Replay]:e=>[new EEe(e)]}}}const hB={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},AEe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function pB(t){return t.replace(AEe,"[redacted]")}function TEe(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 REe(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 IEe(t){return{recordPageView(e){t.recordPageView(TEe(e))},recordError(e,n){t.recordError(REe(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 VU(t){return t instanceof Error?t:new Error(String(t))}function OEe(t){window.addEventListener("error",e=>{t.recordError(VU(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(VU(e.reason))})}function NEe(){const{appMonitorId:t,identityPoolId:e,region:n}=_y().rum;if(!t)return hB;const r=new _Ee(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=IEe(r);return OEe(s),s}const gB=A.createContext(hB);function QAe(){return A.useContext(gB)}const pA="remit.theme",MEe="dark";function KU(){return typeof localStorage>"u"?"system":localStorage.getItem(pA)??"system"}function gA(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(MEe,e)}function JAe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(pA):localStorage.setItem(pA,t)),gA(t)}const PEe=()=>{if(typeof window>"u"||(gA(KU()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{gA(KU())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},kEe=(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)},YU={},mA=(t,e,n,r)=>{Fl(n)&&YU[n]||(Fl(n)&&(YU[n]=new Date),kEe(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)}},vA=(t,e,n)=>{t.loadNamespaces(e,mB(t,n))},ZU=(t,e,n,r)=>{if(Fl(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return vA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,mB(t,r))},DEe=(t,e,n={})=>!e.languages||!e.languages.length?(mA(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",LEe=t=>typeof t=="object"&&t!==null,UEe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,FEe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},zEe=t=>FEe[t],jEe=t=>t.replace(UEe,zEe);let yA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:jEe};const BEe=(t={})=>{yA={...yA,...t}},HEe=()=>yA;let vB;const $Ee=t=>{vB=t},qEe=()=>vB,WEe={type:"3rdParty",init(t){BEe(t.options.react),$Ee(t)}},GEe=A.createContext();class VEe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const KEe=(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),YEe=(t,e,n,r)=>A.useCallback(yB(t,e,n,r),[t,e,n,r]),ZEe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=A.useContext(GEe)||{},o=n||r||qEe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new VEe),!o){mA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(O,I)=>Fl(I)?I:LEe(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&&mA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...HEe(),...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=>DEe(R,o,a)),g=YEe(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=KEe(C),_=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;_.current=!0,!p&&!u&&(e.lng?ZU(o,e.lng,f,()=>{_.current&&E(y)}):vA(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?ZU(o,e.lng,f,()=>R()):vA(o,f,()=>R())})},XEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),QEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),JEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),eCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),tCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),nCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),rCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),sCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),oCe=t=>(t.client??Ze).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),iCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),aCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),lCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),uCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),cCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),dCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),fCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),hCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),pCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),gCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),eTe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),mCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),vCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),yCe=t=>(t?.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),bCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),SCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),ECe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),CCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),wCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),xCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),_Ce=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),ACe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),TCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),RCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),ICe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),OCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),NCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),MCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),PCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),kCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),tTe=t=>({mutationFn:async n=>{const{data:r}=await XEe({...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]},nTe=t=>({mutationFn:async n=>{const{data:r}=await QEe({...t,...n,throwOnError:!0});return r}}),rTe=t=>({mutationFn:async n=>{const{data:r}=await JEe({...t,...n,throwOnError:!0});return r}}),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}}),DCe=t=>hr("filterOperationsListFilters",t),iTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await nCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:DCe(t)}),aTe=t=>({mutationFn:async n=>{const{data:r}=await rCe({...t,...n,throwOnError:!0});return r}}),lTe=t=>({mutationFn:async n=>{const{data:r}=await sCe({...t,...n,throwOnError:!0});return r}}),uTe=t=>({mutationFn:async n=>{const{data:r}=await oCe({...t,...n,throwOnError:!0});return r}}),LCe=t=>hr("mailboxOperationsListMailboxes",t),cTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await iCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:LCe(t)}),dTe=t=>({mutationFn:async n=>{const{data:r}=await aCe({...t,...n,throwOnError:!0});return r}}),fTe=t=>({mutationFn:async n=>{const{data:r}=await lCe({...t,...n,throwOnError:!0});return r}}),hTe=t=>({mutationFn:async n=>{const{data:r}=await uCe({...t,...n,throwOnError:!0});return r}}),UCe=t=>hr("organizeJobDetailOperationsGetOrganizeJob",t),pTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await cCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:UCe(t)}),gTe=t=>({mutationFn:async n=>{const{data:r}=await dCe({...t,...n,throwOnError:!0});return r}}),FCe=t=>hr("syncOperationsGetSyncStatus",t),mTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await fCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:FCe(t)}),zCe=t=>hr("addressOperationsSearchAddresses",t),vTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await hCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:zCe(t)}),yTe=t=>({mutationFn:async n=>{const{data:r}=await pCe({...t,...n,throwOnError:!0});return r}}),jCe=t=>hr("configOperationsGetConfig",t),BCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await gCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:jCe(t)}),bTe=t=>hr("threadOperationsListThreads",t),HCe=t=>hr("threadOperationsSearchThreads",t),STe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await mCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:HCe(t)}),ETe=t=>({mutationFn:async n=>{const{data:r}=await vCe({...t,...n,throwOnError:!0});return r}}),CTe=t=>({mutationFn:async n=>{const{data:r}=await yCe({...t,...n,throwOnError:!0});return r}}),$Ce=t=>hr("meOperationsListVipSuggestions",t),wTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await bCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:$Ce(t)}),xTe=t=>({mutationFn:async n=>{const{data:r}=await SCe({...t,...n,throwOnError:!0});return r}}),_Te=t=>({mutationFn:async n=>{const{data:r}=await ECe({...t,...n,throwOnError:!0});return r}}),ATe=t=>({mutationFn:async n=>{const{data:r}=await CCe({...t,...n,throwOnError:!0});return r}}),qCe=t=>hr("messageOperationsDescribeMessage",t),TTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await wCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:qCe(t)}),RTe=t=>({mutationFn:async n=>{const{data:r}=await xCe({...t,...n,throwOnError:!0});return r}}),WCe=t=>hr("messageOperationsGetRawMessage",t),ITe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await _Ce({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:WCe(t)}),bB=t=>hr("outboxOperationsListOutboxMessages",t),OTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await ACe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:bB(t)}),NTe=t=>({mutationFn:async n=>{const{data:r}=await TCe({...t,...n,throwOnError:!0});return r}}),MTe=t=>({mutationFn:async n=>{const{data:r}=await RCe({...t,...n,throwOnError:!0});return r}}),GCe=t=>hr("outboxDetailOperationsGetOutboxMessage",t),VCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await ICe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:GCe(t)}),PTe=t=>({mutationFn:async n=>{const{data:r}=await OCe({...t,...n,throwOnError:!0});return r}}),kTe=t=>({mutationFn:async n=>{const{data:r}=await NCe({...t,...n,throwOnError:!0});return r}}),KCe=t=>hr("semanticSearchOperationsSemanticSearch",t),DTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await MCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:KCe(t)}),YCe=t=>hr("unifiedThreadOperationsListAllThreads",t),ZCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await PCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:YCe(t)}),XCe=t=>hr("threadDetailOperationsListThreadMessages",t),LTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await kCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:XCe(t)}),SB=A.createContext(void 0),XU={isOpen:!1,mode:"new"},QCe=2e3,JCe=6e4,ewe=({children:t})=>{const[e,n]=A.useState(XU),[r,s]=A.useState(),o=A.useRef(0),a=XF(),{data:u}=Hfe({...VCe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>JCe?!1:QCe}});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(XU)},[]),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})},UTe=()=>{const t=A.useContext(SB);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},Ex=(...t)=>g8(s8(t)),twe={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"}},nwe={error:lX,warning:yX,info:fX},rwe={error:"Error",warning:"Warning",info:"Information"},swe=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=twe[e],a=nwe[e];return D.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:Ex("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:Ex("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:Ex("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 ${rwe[e].toLowerCase()}`,children:D.jsx(mh,{className:"size-4","aria-hidden":"true"})})]})},owe=({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(swe,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),QU=5,FTe=(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}},zTe=t=>{const e=EB(t);return e?e.startsWith("Message not found"):!1},iwe=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,awe=(t,e)=>{const r=[...t.filter(s=>!iwe(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=QU?r:r.slice(r.length-QU)},lwe=(t,e)=>t.filter(n=>n.id!==e),uwe=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),CB=A.createContext(void 0),cwe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,dwe=({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=uwe(u,cwe(),Date.now());return n(f=>awe(f,c)),c.id},[]),s=A.useCallback(u=>{n(c=>lwe(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(owe,{errors:e,onDismiss:s})]})},jTe=()=>{const t=A.useContext(CB);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},fwe=({error:t,reset:e,info:n})=>{const r=My(t),s=Bl(t,{recoverable:r,componentStack:n?.componentStack});return D.jsx(r9,{fatal:s,onRetry:r?e:void 0})},pp=mpe()({component:pwe,errorComponent:fwe}),hwe=()=>{const{t}=ZEe("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 pwe(){return D.jsxs(dwe,{children:[D.jsxs(ewe,{children:[D.jsx(hwe,{}),D.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:D.jsx(A.Suspense,{fallback:D.jsx(ZA,{}),children:D.jsx(I7,{})})})]}),D.jsx(n9,{})]})}const gwe=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 JU;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(JU||(JU={}));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 bA=(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 mwe=bA;function vwe(){return mwe}const ywe=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=vwe(),r=ywe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===bA?void 0:bA].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}),e5=t=>t.status==="aborted",t5=t=>t.status==="dirty",Kc=t=>t.status==="valid",oy=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 n5=(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(oy(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 n5(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(oy(s)?s:Promise.resolve(s));return n5(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 uy.create(this,this._def)}or(e){return ay.create([this,e],this._def)}and(e){return ly.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 EA({...st(this._def),innerType:this,defaultValue:n,typeName:Ye.ZodDefault})}brand(){return new Bwe({typeName:Ye.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new CA({...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 GR.create(this,e)}readonly(){return wA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const bwe=/^c[^\s-]{8,}$/i,Swe=/^[0-9a-z]+$/,Ewe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cwe=/^[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,wwe=/^[a-z0-9_-]{21}$/i,xwe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_we=/^[-+]?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)?)??$/,Awe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Twe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Cx;const Rwe=/^(?:(?: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])$/,Iwe=/^(?:(?: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])$/,Owe=/^(([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]))$/,Nwe=/^(([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])$/,Mwe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Pwe=/^([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])))",kwe=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 Dwe(t){return new RegExp(`^${xB(t)}$`)}function Lwe(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 Uwe(t,e){return!!((e==="v4"||!e)&&Rwe.test(t)||(e==="v6"||!e)&&Owe.test(t))}function Fwe(t,e){if(!xwe.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 zwe(t,e){return!!((e==="v4"||!e)&&Iwe.test(t)||(e==="v6"||!e)&&Nwe.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")Awe.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")Cx||(Cx=new RegExp(Twe,"u")),Cx.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")Cwe.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")wwe.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")bwe.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")Swe.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")Ewe.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"?Lwe(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"?kwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Dwe(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"?_we.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Uwe(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"?Fwe(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"?zwe(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"?Mwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?Pwe.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 jwe(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"?jwe(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 iy 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)}}iy.create=t=>new iy({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 r5 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)}}r5.create=t=>new r5({typeName:Ye.ZodSymbol,...st(t)});class s5 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)}}s5.create=t=>new s5({typeName:Ye.ZodUndefined,...st(t)});class o5 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)}}o5.create=t=>new o5({typeName:Ye.ZodNull,...st(t)});class i5 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}i5.create=t=>new i5({typeName:Ye.ZodAny,...st(t)});class a5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}a5.create=t=>new a5({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 l5 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)}}l5.create=t=>new l5({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 ay 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}}ay.create=(t,e)=>new ay({options:t,typeName:Ye.ZodUnion,...st(e)});function SA(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=SA(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=SA(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 ly extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(e5(o)||e5(a))return Ke;const u=SA(o.value,a.value);return u.valid?((t5(o)||t5(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}))}}ly.create=(t,e,n)=>new ly({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 u5 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}}}}u5.create=(t,e,n)=>new u5({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 c5 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})}}c5.create=(t,e)=>new c5({getter:t,typeName:Ye.ZodLazy,...st(e)});class d5 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}}d5.create=(t,e)=>new d5({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 f5 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}}f5.create=(t,e)=>new f5({values:t,typeName:Ye.ZodNativeEnum,...st(e)});class uy 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})))}}uy.create=(t,e)=>new uy({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 EA 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}}EA.create=(t,e)=>new EA({innerType:t,typeName:Ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class CA 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 oy(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}}CA.create=(t,e)=>new CA({innerType:t,typeName:Ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class h5 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}}}h5.create=t=>new h5({typeName:Ye.ZodNaN,...st(t)});class Bwe 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 GR 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 GR({in:e,out:n,typeName:Ye.ZodPipeline})}}class wA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Kc(s)&&(s.value=Object.freeze(s.value)),s);return oy(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}wA.create=(t,e)=>new wA({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 Hwe=iy.create;Yc.create;Ha.create;xo.create;const pd=_n.create;ay.create;ly.create;Xl.create;Zc.create;uy.create;Ma.create;Qc.create;const BTe={string:(t=>hi.create({...t,coerce:!0})),number:(t=>Yl.create({...t,coerce:!0})),boolean:(t=>iy.create({...t,coerce:!0})),bigint:(t=>Zl.create({...t,coerce:!0})),date:(t=>Yc.create({...t,coerce:!0}))},$we=_y().apiUrl;Ze.setConfig({baseUrl:$we,fetch:J6});Ze.interceptors.error.use((t,e)=>{if(t instanceof Vx||!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 Vx(r,e.status,n)});const wx={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},HTe={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},p5=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function qwe(t){const e=new Map,n=[...t].sort((r,s)=>p5.indexOf(wx[r.role])-p5.indexOf(wx[s.role]));for(const r of n){if(!r.mailboxId||e.has(r.mailboxId))continue;const s=wx[r.role];s&&e.set(r.mailboxId,s)}return e}const Wwe=t=>{const e=t.split("/");return e[e.length-1]||t};function $Te(t,e,n){const r=t.displayNameOverride?.trim();if(r)return r;const s=Wwe(t.fullPath);return!e||!n?s:n(`sidebar.${e}`,s)}const Gwe=new Set(["sent","drafts","trash"]),qTe=t=>t===void 0||!Gwe.has(t),Vwe=new Map;function WTe(t){const e=new Map;for(const n of t){const r=qwe(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 GTe(t,e){const n=e[0];if(!t)return n?{mailboxId:n}:{};for(const s of e){const o=t.get(s);if(o&&kJ(o)!==void 0)return{mailboxId:s,folder:o}}if(!n)return{};const r=t.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const Kwe=A.createContext(null),VTe=()=>A.useContext(Kwe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:Vwe,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},Ywe=()=>Wn(()=>import("./mail-Cx1godIL.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),Zwe=pd({q:wr().optional()}),Xwe=fr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery(BCe()),t.prefetchQuery({...ZCe(),staleTime:6e4})},component:or(Ywe,"component"),validateSearch:Zwe}),Qwe=()=>Wn(()=>import("./onboarding-N4ejn3Lf.js"),__vite__mapDeps([12,13,3,9,5,4])),Jwe=fr("/onboarding")({component:or(Qwe,"component")}),exe=()=>Wn(()=>import("./settings-C10IgfEq.js"),[]),KTe=[{id:"accounts",label:"Accounts",icon:D.jsx(l8,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:D.jsx(bX,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:D.jsx(dX,{className:"size-4"})},{id:"filters",label:"Filters",icon:D.jsx(cX,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:D.jsx(pX,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:D.jsx(SX,{className:"size-4"})}],YTe={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},txe=fr("/settings")({component:or(exe,"component")}),nxe=()=>Wn(()=>import("./index-B-zNKpVX.js"),__vite__mapDeps([14,7])),rxe=()=>Wn(()=>import("./index-DtqBFgK5.js"),[]),sxe=pd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),selectedMailboxId:wr().optional(),q:wr().optional()}),oxe=fr("/mail/")({component:or(rxe,"component"),validateSearch:sxe,errorComponent:or(nxe,"errorComponent")}),ixe=()=>Wn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),axe=pd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),q:wr().optional()}),lxe=fr("/mail/$mailboxId")({component:or(ixe,"component"),validateSearch:axe}),uxe=()=>Wn(()=>import("./flagged-DfRDTtRo.js"),__vite__mapDeps([15,7])),cxe=()=>Wn(()=>import("./flagged-DtqBFgK5.js"),[]),dxe=pd({selectedMessageId:wr().optional(),q:wr().optional()}),fxe=fr("/mail/flagged")({component:or(cxe,"component"),validateSearch:dxe,errorComponent:or(uxe,"errorComponent")}),hxe=()=>Wn(()=>import("./outbox-DtqBFgK5.js"),[]),pxe=pd({selectedOutboxMessageId:wr().optional(),q:wr().optional()}),gxe=fr("/mail/outbox")({component:or(hxe,"component"),validateSearch:pxe}),mxe=()=>Wn(()=>import("./index-YHbgggTJ.js"),[]),vxe=fr("/settings/")({component:or(mxe,"component")}),yxe=()=>Wn(()=>import("./accounts-CdGo8uCR.js"),__vite__mapDeps([16,6,4,5,17,2,13,3,9,7,8])),bxe=pd({editAccountId:wr().optional(),focusSmtp:Hwe().optional(),connected:wr().optional(),oauthError:wr().optional()}),Sxe=fr("/settings/accounts")({component:or(yxe,"component"),validateSearch:bxe}),Exe=()=>Wn(()=>import("./advanced-BFB89Lu6.js"),__vite__mapDeps([18,17,2])),Cxe=fr("/settings/advanced")({component:or(Exe,"component")}),wxe=()=>Wn(()=>import("./appearance-P5qV4DJc.js"),__vite__mapDeps([19,17,2])),xxe=fr("/settings/appearance")({component:or(wxe,"component")}),_xe=()=>Wn(()=>import("./filters-D5AzuakN.js"),__vite__mapDeps([20,17,2,10,5,7])),Axe=fr("/settings/filters")({component:or(_xe,"component")}),Txe=()=>Wn(()=>import("./folders-C5Rcddq7.js"),__vite__mapDeps([21,9,11,17,2,5,7])),Rxe=fr("/settings/folders")({component:or(Txe,"component")}),Ixe=()=>Wn(()=>import("./senders-Dw0Ikyfj.js"),__vite__mapDeps([22,3,17,2,5,7,1,8])),Oxe=fr("/settings/senders")({component:or(Ixe,"component")}),Nxe=()=>Wn(()=>import("./suggested-vips-CfvFoju2.js"),[]),Mxe=fr("/settings/suggested-vips")({component:or(Nxe,"component")}),Pxe=gwe.update({id:"/",path:"/",getParentRoute:()=>pp}),gp=Xwe.update({id:"/mail",path:"/mail",getParentRoute:()=>pp}),kxe=Jwe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>pp}),Ni=txe.update({id:"/settings",path:"/settings",getParentRoute:()=>pp}),Dxe=oxe.update({id:"/",path:"/",getParentRoute:()=>gp}),Lxe=lxe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>gp}),Uxe=fxe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>gp}),Fxe=gxe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>gp}),zxe=vxe.update({id:"/",path:"/",getParentRoute:()=>Ni}),jxe=Sxe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Ni}),Bxe=Cxe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Ni}),Hxe=xxe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Ni}),$xe=Axe.update({id:"/filters",path:"/filters",getParentRoute:()=>Ni}),qxe=Rxe.update({id:"/folders",path:"/folders",getParentRoute:()=>Ni}),Wxe=Oxe.update({id:"/senders",path:"/senders",getParentRoute:()=>Ni}),Gxe=Mxe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Ni}),Vxe={MailMailboxIdRoute:Lxe,MailFlaggedRoute:Uxe,MailOutboxRoute:Fxe,MailIndexRoute:Dxe},Kxe=gp._addFileChildren(Vxe),Yxe={SettingsAccountsRoute:jxe,SettingsAdvancedRoute:Bxe,SettingsAppearanceRoute:Hxe,SettingsFiltersRoute:$xe,SettingsFoldersRoute:qxe,SettingsSendersRoute:Wxe,SettingsSuggestedVipsRoute:Gxe,SettingsIndexRoute:zxe},Zxe=Ni._addFileChildren(Yxe),Xxe={IndexRoute:Pxe,MailRoute:Kxe,OnboardingRoute:kxe,SettingsRoute:Zxe},Qxe=pp._addFileChildren(Xxe)._addFileTypes(),Jxe=(t,e)=>{const n=Mpe({routeTree:Qxe,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},g5=t=>t==null?"":""+t,e_e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},t_e=/###/g,m5=t=>t&&t.indexOf("###")>-1?t.replace(t_e,"."):t,v5=t=>!t||qe(t),hh=(t,e,n)=>{const r=qe(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(v5(t))return{};const o=m5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return v5(t)?{}:{obj:t,k:m5(r[s])}},y5=(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},n_e=(t,e,n,r)=>{const{obj:s,k:o}=hh(t,e,Object);s[o]=s[o]||[],s[o].push(n)},cy=(t,e)=>{const{obj:n,k:r}=hh(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},r_e=(t,e,n)=>{const r=cy(t,n);return r!==void 0?r:cy(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 s_e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const o_e=t=>qe(t)?t.replace(/[&<>"'\/]/g,e=>s_e[e]):t;class i_e{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const a_e=[" ",",","?","!",";"],l_e=new i_e(20),u_e=(t,e,n)=>{e=e||"",n=n||"";const r=a_e.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=l_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},xA=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},dy=t=>t?.replace("_","-"),c_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 fy{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||c_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 fy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new fy(this.logger,e)}}var wo=new fy;class Ib{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 b5 extends Ib{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=cy(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:xA(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),y5(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=cy(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?AB(c,r,o):c={...c,...r},y5(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 S5={},E5=t=>!qe(t)&&typeof t!="boolean"&&typeof t!="number";class hy extends Ib{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),e_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&&!u_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=hy.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=E5(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:E5(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,!S5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(S5[`${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 C5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(e){if(e=dy(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=dy(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 w5={zero:0,one:1,two:2,few:3,many:4,other:5},x5={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class d_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=dy(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!"),x5;if(!e.match(/-|_/))return x5;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)=>w5[s]-w5[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 _5=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=r_e(t,e,n);return!o&&s&&qe(n)&&(o=xA(t,n,r),o===void 0&&(o=xA(e,n,r))),o},xx=t=>t.replace(/\$/g,"$$$$");class f_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:o_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=_5(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(_5(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=>xx(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?xx(this.escape(y)):xx(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=g5(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=g5(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 h_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(dy(r),s),e[a]=u),u(n)}};class p_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}=h_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 g_e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class m_e extends Ib{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=>{n_e(c.loaded,[o],a),g_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 A5=()=>({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}}),T5=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=()=>{},v_e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Wh extends Ib{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=T5(e),this.services={},this.logger=wo,this.modules={external:[]},v_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=A5();this.options={...s,...this.options,...T5(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=p_e;const g=new C5(this.options);this.store=new b5(this.options.resources,this.options);const m=this.services;m.logger=wo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new d_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 f_e(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new m_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 hy(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 C5(A5());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 b5(u,s),o.services.resourceStore=o.store}return o.translator=new hy(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:y_e,forEach:b_e}=[];function S_e(t){return b_e.call(y_e.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function E_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 R5=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,C_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(!R5.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!R5.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},I5={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=C_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 w_e={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return I5.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&I5.create(n,t,r,s,o)}},x_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}},__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 O5=()=>{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 A_e={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&O5())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&O5()&&window.localStorage.setItem(n,t)}};let cc=null;const N5=()=>{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 T_e={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&N5())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&N5()&&window.sessionStorage.setItem(n,t)}},R_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}},I_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}},O_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}},N_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 M_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=S_e(n,this.options||{},M_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(w_e),this.addDetector(x_e),this.addDetector(A_e),this.addDetector(T_e),this.addDetector(R_e),this.addDetector(I_e),this.addDetector(O_e),this.addDetector(N_e),this.addDetector(__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&&!E_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 P_e(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=k_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 k_e(t,e){if(t){if(typeof t=="string")return M5(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)?M5(t,e):void 0}}function M5(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 _A(t){"@babel/helpers - typeof";return _A=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},_A(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 D_e(t){return MB(t)}var L_e={lng:PB,ns:D_e};function Fm(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function U_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":_A(XMLHttpRequest))==="object"}function F_e(t){return!!t&&typeof t.then=="function"}function z_e(t){return F_e(t)?t:Promise.resolve(t)}var j_e=/\{\{(.+?)\}\}/g;function P5(t,e){var n=!1,r=t.replace(j_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=L_e[a]||PB,f=String(u).split("+"),p=P_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 k5(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 D5(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?k5(Object(n),!0).forEach(function(r){B_e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function B_e(t,e,n){return(e=H_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H_e(t){var e=$_e(t,"string");return Ql(e)=="symbol"?e:e+""}function $_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 py;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?py=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(py=window.ActiveXObject));typeof $a!="function"&&($a=void 0);if(!$a&&!Gh&&!py)try{Wn(()=>import("./browser-ponyfill-BD4ZXkpR.js").then(t=>t.b),[]).then(function(t){$a=t.default}).catch(function(){})}catch{}var DB=["__proto__","constructor","prototype"],AA=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},L5=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)},q_e=function(e,n,r,s){e.queryStringParams&&(n=AA(n,e.queryStringParams));var o=D5({},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=D5({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{L5(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]}),L5(n,u,s,c),e._omitFetchOptions=!0}catch(p){s(p)}}},W_e=function(e,n,r,s){r&&Ql(r)==="object"&&(r=AA("",r).slice(1)),e.queryStringParams&&(n=AA(n,e.queryStringParams));try{var o=Gh?new Gh:new py("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)}},G_e=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},$a&&n.indexOf("file:")!==0)return q_e(e,n,r,s);if(kB()||typeof ActiveXObject=="function")return W_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 U5(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 _x(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?U5(Object(n),!0).forEach(function(r){LB(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):U5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function V_e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K_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 Y_e(t,e,n){return e&&K_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=Z_e(t,"string");return Jc(e)=="symbol"?e:e+""}function Z_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 X_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:G_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]:{};V_e(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return Y_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=_x(_x(_x({},X_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=z_e(c),c.then(function(f){if(!f)return a(null,{});var p=P5(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(U_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=P5(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(WEe).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 Q_e=({authProvider:t,rootElementId:e="root"})=>{lee(),PEe(),t.configure(),sge(t);const n=NEe();QJ(n);const r=new Ife({queryCache:new YF({onError:lge}),mutationCache:new KF({onError:uge}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=Jxe(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;jpe.createRoot(o).render(D.jsx(A.StrictMode,{children:D.jsx(gB.Provider,{value:n,children:D.jsxs(Ofe,{client:r,children:[D.jsx(age,{value:t,children:D.jsx(a,{children:D.jsx(Dpe,{router:s})})}),!1]})})}))};Q_e({authProvider:ife});export{jfe as $,aX as A,Km as B,XM as C,sQ as D,hAe as E,uX as F,ip as G,tr as H,fX as I,d_ as J,jF as K,XF as L,hX as M,Nfe as N,u8 as O,uAe as P,xfe as Q,z as R,mX as S,vX as T,kfe as U,Ffe as V,Dfe as W,mh as X,Lfe as Y,Ur as Z,NN as _,qn as a,hTe as a$,FL as a0,Ufe as a1,Bfe as a2,fs as a3,Wr as a4,spe as a5,UTe as a6,rR as a7,cTe as a8,qwe as a9,YCe as aA,LCe as aB,_Te as aC,XCe as aD,RTe as aE,ATe as aF,xTe as aG,yTe as aH,p5 as aI,Wwe as aJ,x7 as aK,ITe as aL,TTe as aM,zTe as aN,LTe as aO,DTe as aP,GTe as aQ,rAe as aR,ZCe as aS,My as aT,zCe as aU,Bl as aV,A7 as aW,PCe as aX,bB as aY,mCe as aZ,SCe as a_,Ex as aa,vAe as ab,TP as ac,fee as ad,w7 as ae,ZEe as af,$Te as ag,VTe as ah,QAe as ai,Hfe as aj,qCe as ak,J6 as al,NTe as am,PTe as an,OTe as ao,vTe as ap,BCe as aq,jTe as ar,VCe as as,EB as at,kTe as au,FTe as av,MTe as aw,Wn as ax,bTe as ay,HCe as az,dn as b,jy as b$,fTe as b0,pTe as b1,gTe as b2,STe as b3,fAe as b4,eTe as b5,qTe as b6,WTe as b7,qa as b8,dCe as b9,KU as bA,JAe as bB,iTe as bC,DCe as bD,lTe as bE,aTe as bF,OJ as bG,aAe as bH,IJ as bI,uTe as bJ,dTe as bK,wx as bL,HTe as bM,wTe as bN,$Ce as bO,xh as bP,Rfe as bQ,HF as bR,Ng as bS,m9 as bT,No as bU,ET as bV,Ai as bW,Foe as bX,Ti as bY,Ooe as bZ,g9 as b_,X8 as ba,_y as bb,Kwe as bc,sAe as bd,ZA as be,I7 as bf,jCe as bg,gAe as bh,rTe as bi,tTe as bj,oTe as bk,pd as bl,Hwe as bm,wr as bn,BTe as bo,ETe as bp,CTe as bq,Sxe as br,nTe as bs,sTe as bt,KTe as bu,YTe as bv,mTe as bw,GJ as bx,cAe as by,WJ as bz,s8 as c,X9 as c0,ese as c1,Hoe as c2,Xoe as c3,nse as c4,Yre as c5,Ly as c6,sT as c7,u9 as c8,Koe as c9,Ky as cA,np as cB,Yoe as cC,ep as cD,Zoe as cE,$oe as cF,qoe as ca,ase as cb,zoe as cc,RT as cd,f9 as ce,rse as cf,Moe as cg,Poe as ch,_te as ci,su as cj,mte as ck,gte as cl,rT as cm,tF as cn,Noe as co,bte as cp,ise as cq,Loe as cr,oT as cs,koe as ct,eie as cu,iF as cv,nAe as cw,Jh as cx,dAe as cy,xT as cz,lP as d,lX as e,rQ as f,qx as g,oAe as h,l8 as i,D as j,zQ as k,gX as l,LJ as m,kJ as n,lAe as o,iAe as p,BQ as q,A as r,tS as s,yX as t,$Q as u,X6 as v,i8 as w,J_e as x,eAe as y,pAe as z};
294
+ or you can use record.mirror to access the mirror instance during recording.`;let P4={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&&(P4=new Proxy(P4,{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 Rb(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)}}),()=>Rb(t,e,o||{},!0)}let ny=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ny=()=>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(Vv(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function DSe(t,e){return e.getId(t)!==-1}function bx(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 uA(t){return!!t.changedTouches}function LSe(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 cA(t){return t?t instanceof qR&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class USe{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 FSe(t){let e=t,n;for(;n=Jj(e);)e=n;return e}function zSe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=FSe(t);return rt.contains(e,n)}function eB(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||zSe(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 k4(t){return"__ln"in t}class jSe{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&&k4(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&&k4(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 D4=(t,e)=>`${t}@${e}`;class BSe{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 jSe,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),cA(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)L4(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!U4(this.droppedSet,c)&&!L4(this.removesSubTreeCache,c,this.mirror)||U4(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=qv({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Wv(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!bx(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=Wv(n);s=qv({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)||bx(n,this.mirror,this.slimDOMOptions)||!DSe(n,this.mirror)||(this.addedSet.has(n)?(dA(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[D4(r,s)]?dA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:ch(e.target)&&dh(e.target)?!0:void 0}),HSe(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(bx(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[D4(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)),cA(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 dA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>dA(t,n))}function HSe(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 L4(t,e,n){return t.size===0?!1:$Se(t,e)}function $Se(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function U4(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 qSe(t){fh=t}function WSe(){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 BSe;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 GSe({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}=uA(g)?g.changedTouches[0]:g;u||(u=ny()),a.push({x:y,y:S,id:r.getId(m),timeOffset:ny()-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 VSe({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 uA(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=uA(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 KSe({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 YSe=["INPUT","TEXTAREA","SELECT"],F4=new WeakMap;function ZSe({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||YSe.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=Wv(T)||"";P==="radio"||P==="checkbox"?I=T.checked:(u[M.toLowerCase()]||u[P])&&(O=qv({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=F4.get(_);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){F4.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(_=>Rb(_[0],_[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(_=>_())})}function ry(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 XSe({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:[...ry(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:[...ry(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 QSe({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:ry(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:ry(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function JSe({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 eEe({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 tEe(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 nEe({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 rEe(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 sEe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};rEe(t,e);let r;t.recordDOM&&(r=rB(t,t.doc));const s=GSe(t),o=VSe(t),a=sB(t),u=KSe(t,{win:n}),c=ZSe(t),f=JSe(t);let p=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(p=XSe(t,{win:n}),g=oB(t,t.doc),m=QSe(t,{win:n}),t.collectFonts&&(y=eEe(t)));const S=tEe(t),E=nEe(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 z4{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 oEe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new z4(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 z4(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 iEe{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+/",aEe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Lm=0;Lm<Tc.length;Lm++)aEe[Tc.charCodeAt(Lm)]=Lm;var lEe=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 j4=new Map;function uEe(t,e){let n=j4.get(t);return n||(n=new Map,j4.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=uEe(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=lEe(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 cEe(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=Rb(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 dEe(t){return t==="experimental-webgl"?"webgl":t}function B4(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=dEe(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 H4(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=Rb(t,c,{set(p){n(this.canvas,{type:e,property:c,args:[p],setter:!0})}});a.push(f)}return a}function fEe(t,e,n,r){const s=[];return s.push(...H4(e.WebGLRenderingContext.prototype,Vc.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...H4(e.WebGL2RenderingContext.prototype,Vc.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const uB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",hEe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),$4=typeof window<"u"&&window.Blob&&new Blob([hEe(uB)],{type:"text/javascript;charset=utf-8"});function pEe(t){let e;try{if(e=$4&&(window.URL||window.webkitURL).createObjectURL($4),!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 gEe{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=B4(n,r,s,!0),u=new Map,c=new pEe;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=B4(e,n,r,!1),o=cEe(this.processMutation.bind(this),e,n,r),a=fEe(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 mEe{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new USe),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 vEe{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,Sx,sy=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((GU=t.contentWindow)==null?void 0:GU.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Bs=bye();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;qSe(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);LSe();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=ny(),(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 mEe({mutationCb:K,adoptedStyleSheetCb:he}),ve=new oEe({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 vEe;Sx=new gEe({recordCanvas:O,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:Bs,sampling:_.canvas,dataURLOptions:T});const Xe=new iEe({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:Sx,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=$ye(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),cA(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(sEe)({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:Sx,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)),sy=!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(),sy=!1,WSe()}}catch(Ee){console.warn(Ee)}}hp.addCustomEvent=(t,e)=>{if(!sy)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(!sy)throw new Error("please take full snapshot after start recording");hv(t)};hp.mirror=Bs;var q4;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(q4||(q4={}));const yEe="rrweb",bEe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},SEe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},W4=SEe;class EEe extends Ns{constructor(e){super(yEe),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({},W4.recordOptions),e?.recordOptions),bEe);this.config=Object.assign(Object.assign(Object.assign({},W4),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(OU,n),be.info("RRWebPlugin events sent to RUM",{eventType:OU,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var CEe=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},fA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(fA||(fA={}));const cB="us-west-2",hA=`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:Gge,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:hA,endpointUrl:new URL(hA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:fA.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 wEe=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=CEe(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:hA.replace(cB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new rve({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;[Uv,Fv,jc,`${Uv}_${this.applicationId}`,`${Fv}_${this.applicationId}`,`${jc}_${this.applicationId}`].forEach(r=>Yme(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 Vge(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 Kme(r);return this.config.disableAutoPageView||s.addPlugin(new Eve),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 G4;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(G4||(G4={}));const xEe=t=>Object.assign(Object.assign({},fB(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class _Ee extends wEe{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},xEe(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(Cme),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new Fme(c,o).ChainAnonymousCredentialsProvider:new zme(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 pve(e)],[Ks.Performance]:e=>[new vve(e),new wve(e),new $ve(e)],[Ks.Interaction]:e=>[new fR(e)],[Ks.Http]:e=>[new Kve(e),new Wve(e)],[Ks.Replay]:e=>[new EEe(e)]}}}const hB={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},AEe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function pB(t){return t.replace(AEe,"[redacted]")}function TEe(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 REe(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 IEe(t){return{recordPageView(e){t.recordPageView(TEe(e))},recordError(e,n){t.recordError(REe(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 V4(t){return t instanceof Error?t:new Error(String(t))}function OEe(t){window.addEventListener("error",e=>{t.recordError(V4(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(V4(e.reason))})}function NEe(){const{appMonitorId:t,identityPoolId:e,region:n}=_y().rum;if(!t)return hB;const r=new _Ee(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=IEe(r);return OEe(s),s}const gB=A.createContext(hB);function QAe(){return A.useContext(gB)}const pA="remit.theme",MEe="dark";function K4(){return typeof localStorage>"u"?"system":localStorage.getItem(pA)??"system"}function gA(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(MEe,e)}function JAe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(pA):localStorage.setItem(pA,t)),gA(t)}const PEe=()=>{if(typeof window>"u"||(gA(K4()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{gA(K4())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},kEe=(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)},Y4={},mA=(t,e,n,r)=>{Fl(n)&&Y4[n]||(Fl(n)&&(Y4[n]=new Date),kEe(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)}},vA=(t,e,n)=>{t.loadNamespaces(e,mB(t,n))},Z4=(t,e,n,r)=>{if(Fl(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return vA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,mB(t,r))},DEe=(t,e,n={})=>!e.languages||!e.languages.length?(mA(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",LEe=t=>typeof t=="object"&&t!==null,UEe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,FEe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},zEe=t=>FEe[t],jEe=t=>t.replace(UEe,zEe);let yA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:jEe};const BEe=(t={})=>{yA={...yA,...t}},HEe=()=>yA;let vB;const $Ee=t=>{vB=t},qEe=()=>vB,WEe={type:"3rdParty",init(t){BEe(t.options.react),$Ee(t)}},GEe=A.createContext();class VEe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const KEe=(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),YEe=(t,e,n,r)=>A.useCallback(yB(t,e,n,r),[t,e,n,r]),ZEe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=A.useContext(GEe)||{},o=n||r||qEe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new VEe),!o){mA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(O,I)=>Fl(I)?I:LEe(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&&mA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...HEe(),...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=>DEe(R,o,a)),g=YEe(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=KEe(C),_=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;_.current=!0,!p&&!u&&(e.lng?Z4(o,e.lng,f,()=>{_.current&&E(y)}):vA(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?Z4(o,e.lng,f,()=>R()):vA(o,f,()=>R())})},XEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),QEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),JEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),eCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),tCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),nCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),rCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),sCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),oCe=t=>(t.client??Ze).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),iCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),aCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),lCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),uCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),cCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),dCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),fCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),hCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),pCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),gCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),eTe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),mCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),vCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),yCe=t=>(t?.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),bCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),SCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),ECe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),CCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),wCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),xCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),_Ce=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),ACe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),TCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),RCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),ICe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),OCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),NCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),MCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),PCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),kCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),tTe=t=>({mutationFn:async n=>{const{data:r}=await XEe({...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]},nTe=t=>({mutationFn:async n=>{const{data:r}=await QEe({...t,...n,throwOnError:!0});return r}}),rTe=t=>({mutationFn:async n=>{const{data:r}=await JEe({...t,...n,throwOnError:!0});return r}}),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}}),DCe=t=>hr("filterOperationsListFilters",t),iTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await nCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:DCe(t)}),aTe=t=>({mutationFn:async n=>{const{data:r}=await rCe({...t,...n,throwOnError:!0});return r}}),lTe=t=>({mutationFn:async n=>{const{data:r}=await sCe({...t,...n,throwOnError:!0});return r}}),uTe=t=>({mutationFn:async n=>{const{data:r}=await oCe({...t,...n,throwOnError:!0});return r}}),LCe=t=>hr("mailboxOperationsListMailboxes",t),cTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await iCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:LCe(t)}),dTe=t=>({mutationFn:async n=>{const{data:r}=await aCe({...t,...n,throwOnError:!0});return r}}),fTe=t=>({mutationFn:async n=>{const{data:r}=await lCe({...t,...n,throwOnError:!0});return r}}),hTe=t=>({mutationFn:async n=>{const{data:r}=await uCe({...t,...n,throwOnError:!0});return r}}),UCe=t=>hr("organizeJobDetailOperationsGetOrganizeJob",t),pTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await cCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:UCe(t)}),gTe=t=>({mutationFn:async n=>{const{data:r}=await dCe({...t,...n,throwOnError:!0});return r}}),FCe=t=>hr("syncOperationsGetSyncStatus",t),mTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await fCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:FCe(t)}),zCe=t=>hr("addressOperationsSearchAddresses",t),vTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await hCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:zCe(t)}),yTe=t=>({mutationFn:async n=>{const{data:r}=await pCe({...t,...n,throwOnError:!0});return r}}),jCe=t=>hr("configOperationsGetConfig",t),BCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await gCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:jCe(t)}),bTe=t=>hr("threadOperationsListThreads",t),HCe=t=>hr("threadOperationsSearchThreads",t),STe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await mCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:HCe(t)}),ETe=t=>({mutationFn:async n=>{const{data:r}=await vCe({...t,...n,throwOnError:!0});return r}}),CTe=t=>({mutationFn:async n=>{const{data:r}=await yCe({...t,...n,throwOnError:!0});return r}}),$Ce=t=>hr("meOperationsListVipSuggestions",t),wTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await bCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:$Ce(t)}),xTe=t=>({mutationFn:async n=>{const{data:r}=await SCe({...t,...n,throwOnError:!0});return r}}),_Te=t=>({mutationFn:async n=>{const{data:r}=await ECe({...t,...n,throwOnError:!0});return r}}),ATe=t=>({mutationFn:async n=>{const{data:r}=await CCe({...t,...n,throwOnError:!0});return r}}),qCe=t=>hr("messageOperationsDescribeMessage",t),TTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await wCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:qCe(t)}),RTe=t=>({mutationFn:async n=>{const{data:r}=await xCe({...t,...n,throwOnError:!0});return r}}),WCe=t=>hr("messageOperationsGetRawMessage",t),ITe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await _Ce({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:WCe(t)}),bB=t=>hr("outboxOperationsListOutboxMessages",t),OTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await ACe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:bB(t)}),NTe=t=>({mutationFn:async n=>{const{data:r}=await TCe({...t,...n,throwOnError:!0});return r}}),MTe=t=>({mutationFn:async n=>{const{data:r}=await RCe({...t,...n,throwOnError:!0});return r}}),GCe=t=>hr("outboxDetailOperationsGetOutboxMessage",t),VCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await ICe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:GCe(t)}),PTe=t=>({mutationFn:async n=>{const{data:r}=await OCe({...t,...n,throwOnError:!0});return r}}),kTe=t=>({mutationFn:async n=>{const{data:r}=await NCe({...t,...n,throwOnError:!0});return r}}),KCe=t=>hr("semanticSearchOperationsSemanticSearch",t),DTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await MCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:KCe(t)}),YCe=t=>hr("unifiedThreadOperationsListAllThreads",t),ZCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await PCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:YCe(t)}),XCe=t=>hr("threadDetailOperationsListThreadMessages",t),LTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await kCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:XCe(t)}),SB=A.createContext(void 0),X4={isOpen:!1,mode:"new"},QCe=2e3,JCe=6e4,ewe=({children:t})=>{const[e,n]=A.useState(X4),[r,s]=A.useState(),o=A.useRef(0),a=XF(),{data:u}=Hfe({...VCe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>JCe?!1:QCe}});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(X4)},[]),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})},UTe=()=>{const t=A.useContext(SB);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},Ex=(...t)=>g8(s8(t)),twe={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"}},nwe={error:lX,warning:yX,info:fX},rwe={error:"Error",warning:"Warning",info:"Information"},swe=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=twe[e],a=nwe[e];return D.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:Ex("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:Ex("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:Ex("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 ${rwe[e].toLowerCase()}`,children:D.jsx(mh,{className:"size-4","aria-hidden":"true"})})]})},owe=({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(swe,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),Q4=5,FTe=(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}},zTe=t=>{const e=EB(t);return e?e.startsWith("Message not found"):!1},iwe=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,awe=(t,e)=>{const r=[...t.filter(s=>!iwe(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=Q4?r:r.slice(r.length-Q4)},lwe=(t,e)=>t.filter(n=>n.id!==e),uwe=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),CB=A.createContext(void 0),cwe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,dwe=({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=uwe(u,cwe(),Date.now());return n(f=>awe(f,c)),c.id},[]),s=A.useCallback(u=>{n(c=>lwe(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(owe,{errors:e,onDismiss:s})]})},jTe=()=>{const t=A.useContext(CB);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},fwe=({error:t,reset:e,info:n})=>{const r=My(t),s=Bl(t,{recoverable:r,componentStack:n?.componentStack});return D.jsx(r9,{fatal:s,onRetry:r?e:void 0})},pp=mpe()({component:pwe,errorComponent:fwe}),hwe=()=>{const{t}=ZEe("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 pwe(){return D.jsxs(dwe,{children:[D.jsxs(ewe,{children:[D.jsx(hwe,{}),D.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:D.jsx(A.Suspense,{fallback:D.jsx(ZA,{}),children:D.jsx(I7,{})})})]}),D.jsx(n9,{})]})}const gwe=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 J4;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(J4||(J4={}));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 bA=(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 mwe=bA;function vwe(){return mwe}const ywe=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=vwe(),r=ywe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===bA?void 0:bA].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}),e5=t=>t.status==="aborted",t5=t=>t.status==="dirty",Kc=t=>t.status==="valid",oy=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 n5=(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(oy(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 n5(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(oy(s)?s:Promise.resolve(s));return n5(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 uy.create(this,this._def)}or(e){return ay.create([this,e],this._def)}and(e){return ly.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 EA({...st(this._def),innerType:this,defaultValue:n,typeName:Ye.ZodDefault})}brand(){return new Bwe({typeName:Ye.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new CA({...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 GR.create(this,e)}readonly(){return wA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const bwe=/^c[^\s-]{8,}$/i,Swe=/^[0-9a-z]+$/,Ewe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cwe=/^[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,wwe=/^[a-z0-9_-]{21}$/i,xwe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_we=/^[-+]?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)?)??$/,Awe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Twe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Cx;const Rwe=/^(?:(?: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])$/,Iwe=/^(?:(?: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])$/,Owe=/^(([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]))$/,Nwe=/^(([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])$/,Mwe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Pwe=/^([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])))",kwe=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 Dwe(t){return new RegExp(`^${xB(t)}$`)}function Lwe(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 Uwe(t,e){return!!((e==="v4"||!e)&&Rwe.test(t)||(e==="v6"||!e)&&Owe.test(t))}function Fwe(t,e){if(!xwe.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 zwe(t,e){return!!((e==="v4"||!e)&&Iwe.test(t)||(e==="v6"||!e)&&Nwe.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")Awe.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")Cx||(Cx=new RegExp(Twe,"u")),Cx.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")Cwe.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")wwe.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")bwe.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")Swe.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")Ewe.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"?Lwe(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"?kwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Dwe(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"?_we.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Uwe(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"?Fwe(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"?zwe(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"?Mwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?Pwe.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 jwe(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"?jwe(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 iy 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)}}iy.create=t=>new iy({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 r5 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)}}r5.create=t=>new r5({typeName:Ye.ZodSymbol,...st(t)});class s5 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)}}s5.create=t=>new s5({typeName:Ye.ZodUndefined,...st(t)});class o5 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)}}o5.create=t=>new o5({typeName:Ye.ZodNull,...st(t)});class i5 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}i5.create=t=>new i5({typeName:Ye.ZodAny,...st(t)});class a5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}a5.create=t=>new a5({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 l5 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)}}l5.create=t=>new l5({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 ay 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}}ay.create=(t,e)=>new ay({options:t,typeName:Ye.ZodUnion,...st(e)});function SA(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=SA(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=SA(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 ly extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(e5(o)||e5(a))return Ke;const u=SA(o.value,a.value);return u.valid?((t5(o)||t5(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}))}}ly.create=(t,e,n)=>new ly({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 u5 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}}}}u5.create=(t,e,n)=>new u5({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 c5 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})}}c5.create=(t,e)=>new c5({getter:t,typeName:Ye.ZodLazy,...st(e)});class d5 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}}d5.create=(t,e)=>new d5({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 f5 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}}f5.create=(t,e)=>new f5({values:t,typeName:Ye.ZodNativeEnum,...st(e)});class uy 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})))}}uy.create=(t,e)=>new uy({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 EA 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}}EA.create=(t,e)=>new EA({innerType:t,typeName:Ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class CA 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 oy(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}}CA.create=(t,e)=>new CA({innerType:t,typeName:Ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class h5 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}}}h5.create=t=>new h5({typeName:Ye.ZodNaN,...st(t)});class Bwe 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 GR 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 GR({in:e,out:n,typeName:Ye.ZodPipeline})}}class wA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Kc(s)&&(s.value=Object.freeze(s.value)),s);return oy(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}wA.create=(t,e)=>new wA({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 Hwe=iy.create;Yc.create;Ha.create;xo.create;const pd=_n.create;ay.create;ly.create;Xl.create;Zc.create;uy.create;Ma.create;Qc.create;const BTe={string:(t=>hi.create({...t,coerce:!0})),number:(t=>Yl.create({...t,coerce:!0})),boolean:(t=>iy.create({...t,coerce:!0})),bigint:(t=>Zl.create({...t,coerce:!0})),date:(t=>Yc.create({...t,coerce:!0}))},$we=_y().apiUrl;Ze.setConfig({baseUrl:$we,fetch:J6});Ze.interceptors.error.use((t,e)=>{if(t instanceof Vx||!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 Vx(r,e.status,n)});const wx={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},HTe={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},p5=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function qwe(t){const e=new Map,n=[...t].sort((r,s)=>p5.indexOf(wx[r.role])-p5.indexOf(wx[s.role]));for(const r of n){if(!r.mailboxId||e.has(r.mailboxId))continue;const s=wx[r.role];s&&e.set(r.mailboxId,s)}return e}const Wwe=t=>{const e=t.split("/");return e[e.length-1]||t};function $Te(t,e,n){const r=t.displayNameOverride?.trim();if(r)return r;const s=Wwe(t.fullPath);return!e||!n?s:n(`sidebar.${e}`,s)}const Gwe=new Set(["sent","drafts","trash"]),qTe=t=>t===void 0||!Gwe.has(t),Vwe=new Map;function WTe(t){const e=new Map;for(const n of t){const r=qwe(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 GTe(t,e){const n=e[0];if(!t)return n?{mailboxId:n}:{};for(const s of e){const o=t.get(s);if(o&&kJ(o)!==void 0)return{mailboxId:s,folder:o}}if(!n)return{};const r=t.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const Kwe=A.createContext(null),VTe=()=>A.useContext(Kwe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:Vwe,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},Ywe=()=>Wn(()=>import("./mail-B18tS3Yk.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),Zwe=pd({q:wr().optional()}),Xwe=fr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery(BCe()),t.prefetchQuery({...ZCe(),staleTime:6e4})},component:or(Ywe,"component"),validateSearch:Zwe}),Qwe=()=>Wn(()=>import("./onboarding-0puqjekg.js"),__vite__mapDeps([12,13,3,9,5,4])),Jwe=fr("/onboarding")({component:or(Qwe,"component")}),exe=()=>Wn(()=>import("./settings-DdSQDqcM.js"),[]),KTe=[{id:"accounts",label:"Accounts",icon:D.jsx(l8,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:D.jsx(bX,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:D.jsx(dX,{className:"size-4"})},{id:"filters",label:"Filters",icon:D.jsx(cX,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:D.jsx(pX,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:D.jsx(SX,{className:"size-4"})}],YTe={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},txe=fr("/settings")({component:or(exe,"component")}),nxe=()=>Wn(()=>import("./index-WbnePXMj.js"),__vite__mapDeps([14,7])),rxe=()=>Wn(()=>import("./index-DtqBFgK5.js"),[]),sxe=pd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),selectedMailboxId:wr().optional(),q:wr().optional()}),oxe=fr("/mail/")({component:or(rxe,"component"),validateSearch:sxe,errorComponent:or(nxe,"errorComponent")}),ixe=()=>Wn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),axe=pd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),q:wr().optional()}),lxe=fr("/mail/$mailboxId")({component:or(ixe,"component"),validateSearch:axe}),uxe=()=>Wn(()=>import("./flagged-CNo33zoi.js"),__vite__mapDeps([15,7])),cxe=()=>Wn(()=>import("./flagged-DtqBFgK5.js"),[]),dxe=pd({selectedMessageId:wr().optional(),q:wr().optional()}),fxe=fr("/mail/flagged")({component:or(cxe,"component"),validateSearch:dxe,errorComponent:or(uxe,"errorComponent")}),hxe=()=>Wn(()=>import("./outbox-DtqBFgK5.js"),[]),pxe=pd({selectedOutboxMessageId:wr().optional(),q:wr().optional()}),gxe=fr("/mail/outbox")({component:or(hxe,"component"),validateSearch:pxe}),mxe=()=>Wn(()=>import("./index-vEi8X3dC.js"),[]),vxe=fr("/settings/")({component:or(mxe,"component")}),yxe=()=>Wn(()=>import("./accounts-8Ox-gk-o.js"),__vite__mapDeps([16,6,4,5,17,2,13,3,9,7,8])),bxe=pd({editAccountId:wr().optional(),focusSmtp:Hwe().optional(),connected:wr().optional(),oauthError:wr().optional()}),Sxe=fr("/settings/accounts")({component:or(yxe,"component"),validateSearch:bxe}),Exe=()=>Wn(()=>import("./advanced-B6gVjWyH.js"),__vite__mapDeps([18,17,2])),Cxe=fr("/settings/advanced")({component:or(Exe,"component")}),wxe=()=>Wn(()=>import("./appearance-D5PIZeXN.js"),__vite__mapDeps([19,17,2])),xxe=fr("/settings/appearance")({component:or(wxe,"component")}),_xe=()=>Wn(()=>import("./filters-DHmaj_hM.js"),__vite__mapDeps([20,17,2,10,5,7])),Axe=fr("/settings/filters")({component:or(_xe,"component")}),Txe=()=>Wn(()=>import("./folders-Bw4yKKyN.js"),__vite__mapDeps([21,9,11,17,2,5,7])),Rxe=fr("/settings/folders")({component:or(Txe,"component")}),Ixe=()=>Wn(()=>import("./senders-D_eO87MQ.js"),__vite__mapDeps([22,3,17,2,5,7,1,8])),Oxe=fr("/settings/senders")({component:or(Ixe,"component")}),Nxe=()=>Wn(()=>import("./suggested-vips-DjCfgEoc.js"),[]),Mxe=fr("/settings/suggested-vips")({component:or(Nxe,"component")}),Pxe=gwe.update({id:"/",path:"/",getParentRoute:()=>pp}),gp=Xwe.update({id:"/mail",path:"/mail",getParentRoute:()=>pp}),kxe=Jwe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>pp}),Ni=txe.update({id:"/settings",path:"/settings",getParentRoute:()=>pp}),Dxe=oxe.update({id:"/",path:"/",getParentRoute:()=>gp}),Lxe=lxe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>gp}),Uxe=fxe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>gp}),Fxe=gxe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>gp}),zxe=vxe.update({id:"/",path:"/",getParentRoute:()=>Ni}),jxe=Sxe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Ni}),Bxe=Cxe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Ni}),Hxe=xxe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Ni}),$xe=Axe.update({id:"/filters",path:"/filters",getParentRoute:()=>Ni}),qxe=Rxe.update({id:"/folders",path:"/folders",getParentRoute:()=>Ni}),Wxe=Oxe.update({id:"/senders",path:"/senders",getParentRoute:()=>Ni}),Gxe=Mxe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Ni}),Vxe={MailMailboxIdRoute:Lxe,MailFlaggedRoute:Uxe,MailOutboxRoute:Fxe,MailIndexRoute:Dxe},Kxe=gp._addFileChildren(Vxe),Yxe={SettingsAccountsRoute:jxe,SettingsAdvancedRoute:Bxe,SettingsAppearanceRoute:Hxe,SettingsFiltersRoute:$xe,SettingsFoldersRoute:qxe,SettingsSendersRoute:Wxe,SettingsSuggestedVipsRoute:Gxe,SettingsIndexRoute:zxe},Zxe=Ni._addFileChildren(Yxe),Xxe={IndexRoute:Pxe,MailRoute:Kxe,OnboardingRoute:kxe,SettingsRoute:Zxe},Qxe=pp._addFileChildren(Xxe)._addFileTypes(),Jxe=(t,e)=>{const n=Mpe({routeTree:Qxe,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},g5=t=>t==null?"":""+t,e_e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},t_e=/###/g,m5=t=>t&&t.indexOf("###")>-1?t.replace(t_e,"."):t,v5=t=>!t||qe(t),hh=(t,e,n)=>{const r=qe(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(v5(t))return{};const o=m5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return v5(t)?{}:{obj:t,k:m5(r[s])}},y5=(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},n_e=(t,e,n,r)=>{const{obj:s,k:o}=hh(t,e,Object);s[o]=s[o]||[],s[o].push(n)},cy=(t,e)=>{const{obj:n,k:r}=hh(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},r_e=(t,e,n)=>{const r=cy(t,n);return r!==void 0?r:cy(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 s_e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const o_e=t=>qe(t)?t.replace(/[&<>"'\/]/g,e=>s_e[e]):t;class i_e{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const a_e=[" ",",","?","!",";"],l_e=new i_e(20),u_e=(t,e,n)=>{e=e||"",n=n||"";const r=a_e.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=l_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},xA=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},dy=t=>t?.replace("_","-"),c_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 fy{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||c_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 fy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new fy(this.logger,e)}}var wo=new fy;class Ib{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 b5 extends Ib{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=cy(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:xA(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),y5(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=cy(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?AB(c,r,o):c={...c,...r},y5(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 S5={},E5=t=>!qe(t)&&typeof t!="boolean"&&typeof t!="number";class hy extends Ib{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),e_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&&!u_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=hy.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=E5(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:E5(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,!S5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(S5[`${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 C5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(e){if(e=dy(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=dy(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 w5={zero:0,one:1,two:2,few:3,many:4,other:5},x5={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class d_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=dy(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!"),x5;if(!e.match(/-|_/))return x5;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)=>w5[s]-w5[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 _5=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=r_e(t,e,n);return!o&&s&&qe(n)&&(o=xA(t,n,r),o===void 0&&(o=xA(e,n,r))),o},xx=t=>t.replace(/\$/g,"$$$$");class f_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:o_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=_5(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(_5(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=>xx(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?xx(this.escape(y)):xx(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=g5(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=g5(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 h_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(dy(r),s),e[a]=u),u(n)}};class p_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}=h_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 g_e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class m_e extends Ib{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=>{n_e(c.loaded,[o],a),g_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 A5=()=>({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}}),T5=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=()=>{},v_e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Wh extends Ib{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=T5(e),this.services={},this.logger=wo,this.modules={external:[]},v_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=A5();this.options={...s,...this.options,...T5(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=p_e;const g=new C5(this.options);this.store=new b5(this.options.resources,this.options);const m=this.services;m.logger=wo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new d_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 f_e(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new m_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 hy(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 C5(A5());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 b5(u,s),o.services.resourceStore=o.store}return o.translator=new hy(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:y_e,forEach:b_e}=[];function S_e(t){return b_e.call(y_e.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function E_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 R5=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,C_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(!R5.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!R5.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},I5={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=C_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 w_e={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return I5.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&I5.create(n,t,r,s,o)}},x_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}},__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 O5=()=>{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 A_e={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&O5())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&O5()&&window.localStorage.setItem(n,t)}};let cc=null;const N5=()=>{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 T_e={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&N5())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&N5()&&window.sessionStorage.setItem(n,t)}},R_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}},I_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}},O_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}},N_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 M_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=S_e(n,this.options||{},M_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(w_e),this.addDetector(x_e),this.addDetector(A_e),this.addDetector(T_e),this.addDetector(R_e),this.addDetector(I_e),this.addDetector(O_e),this.addDetector(N_e),this.addDetector(__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&&!E_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 P_e(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=k_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 k_e(t,e){if(t){if(typeof t=="string")return M5(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)?M5(t,e):void 0}}function M5(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 _A(t){"@babel/helpers - typeof";return _A=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},_A(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 D_e(t){return MB(t)}var L_e={lng:PB,ns:D_e};function Fm(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function U_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":_A(XMLHttpRequest))==="object"}function F_e(t){return!!t&&typeof t.then=="function"}function z_e(t){return F_e(t)?t:Promise.resolve(t)}var j_e=/\{\{(.+?)\}\}/g;function P5(t,e){var n=!1,r=t.replace(j_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=L_e[a]||PB,f=String(u).split("+"),p=P_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 k5(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 D5(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?k5(Object(n),!0).forEach(function(r){B_e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function B_e(t,e,n){return(e=H_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H_e(t){var e=$_e(t,"string");return Ql(e)=="symbol"?e:e+""}function $_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 py;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?py=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(py=window.ActiveXObject));typeof $a!="function"&&($a=void 0);if(!$a&&!Gh&&!py)try{Wn(()=>import("./browser-ponyfill-Dfy5QWS0.js").then(t=>t.b),[]).then(function(t){$a=t.default}).catch(function(){})}catch{}var DB=["__proto__","constructor","prototype"],AA=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},L5=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)},q_e=function(e,n,r,s){e.queryStringParams&&(n=AA(n,e.queryStringParams));var o=D5({},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=D5({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{L5(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]}),L5(n,u,s,c),e._omitFetchOptions=!0}catch(p){s(p)}}},W_e=function(e,n,r,s){r&&Ql(r)==="object"&&(r=AA("",r).slice(1)),e.queryStringParams&&(n=AA(n,e.queryStringParams));try{var o=Gh?new Gh:new py("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)}},G_e=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},$a&&n.indexOf("file:")!==0)return q_e(e,n,r,s);if(kB()||typeof ActiveXObject=="function")return W_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 U5(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 _x(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?U5(Object(n),!0).forEach(function(r){LB(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):U5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function V_e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K_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 Y_e(t,e,n){return e&&K_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=Z_e(t,"string");return Jc(e)=="symbol"?e:e+""}function Z_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 X_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:G_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]:{};V_e(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return Y_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=_x(_x(_x({},X_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=z_e(c),c.then(function(f){if(!f)return a(null,{});var p=P5(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(U_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=P5(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(WEe).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 Q_e=({authProvider:t,rootElementId:e="root"})=>{lee(),PEe(),t.configure(),sge(t);const n=NEe();QJ(n);const r=new Ife({queryCache:new YF({onError:lge}),mutationCache:new KF({onError:uge}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=Jxe(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;jpe.createRoot(o).render(D.jsx(A.StrictMode,{children:D.jsx(gB.Provider,{value:n,children:D.jsxs(Ofe,{client:r,children:[D.jsx(age,{value:t,children:D.jsx(a,{children:D.jsx(Dpe,{router:s})})}),!1]})})}))};Q_e({authProvider:ife});export{jfe as $,aX as A,Km as B,XM as C,sQ as D,hAe as E,uX as F,ip as G,tr as H,fX as I,d_ as J,jF as K,XF as L,hX as M,Nfe as N,u8 as O,uAe as P,xfe as Q,z as R,mX as S,vX as T,kfe as U,Ffe as V,Dfe as W,mh as X,Lfe as Y,Ur as Z,NN as _,qn as a,hTe as a$,FL as a0,Ufe as a1,Bfe as a2,fs as a3,Wr as a4,spe as a5,UTe as a6,rR as a7,cTe as a8,qwe as a9,YCe as aA,LCe as aB,_Te as aC,XCe as aD,RTe as aE,ATe as aF,xTe as aG,yTe as aH,p5 as aI,Wwe as aJ,x7 as aK,ITe as aL,TTe as aM,zTe as aN,LTe as aO,DTe as aP,GTe as aQ,rAe as aR,ZCe as aS,My as aT,zCe as aU,Bl as aV,A7 as aW,PCe as aX,bB as aY,mCe as aZ,SCe as a_,Ex as aa,vAe as ab,TP as ac,fee as ad,w7 as ae,ZEe as af,$Te as ag,VTe as ah,QAe as ai,Hfe as aj,qCe as ak,J6 as al,NTe as am,PTe as an,OTe as ao,vTe as ap,BCe as aq,jTe as ar,VCe as as,EB as at,kTe as au,FTe as av,MTe as aw,Wn as ax,bTe as ay,HCe as az,dn as b,jy as b$,fTe as b0,pTe as b1,gTe as b2,STe as b3,fAe as b4,eTe as b5,qTe as b6,WTe as b7,qa as b8,dCe as b9,K4 as bA,JAe as bB,iTe as bC,DCe as bD,lTe as bE,aTe as bF,OJ as bG,aAe as bH,IJ as bI,uTe as bJ,dTe as bK,wx as bL,HTe as bM,wTe as bN,$Ce as bO,xh as bP,Rfe as bQ,HF as bR,Ng as bS,m9 as bT,No as bU,ET as bV,Ai as bW,Foe as bX,Ti as bY,Ooe as bZ,g9 as b_,X8 as ba,_y as bb,Kwe as bc,sAe as bd,ZA as be,I7 as bf,jCe as bg,gAe as bh,rTe as bi,tTe as bj,oTe as bk,pd as bl,Hwe as bm,wr as bn,BTe as bo,ETe as bp,CTe as bq,Sxe as br,nTe as bs,sTe as bt,KTe as bu,YTe as bv,mTe as bw,GJ as bx,cAe as by,WJ as bz,s8 as c,X9 as c0,ese as c1,Hoe as c2,Xoe as c3,nse as c4,Yre as c5,Ly as c6,sT as c7,u9 as c8,Koe as c9,Ky as cA,np as cB,Yoe as cC,ep as cD,Zoe as cE,$oe as cF,qoe as ca,ase as cb,zoe as cc,RT as cd,f9 as ce,rse as cf,Moe as cg,Poe as ch,_te as ci,su as cj,mte as ck,gte as cl,rT as cm,tF as cn,Noe as co,bte as cp,ise as cq,Loe as cr,oT as cs,koe as ct,eie as cu,iF as cv,nAe as cw,Jh as cx,dAe as cy,xT as cz,lP as d,lX as e,rQ as f,qx as g,oAe as h,l8 as i,D as j,zQ as k,gX as l,LJ as m,kJ as n,lAe as o,iAe as p,BQ as q,A as r,tS as s,yX as t,$Q as u,X6 as v,i8 as w,J_e as x,eAe as y,pAe as z};