diff --git a/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/40832dcc5f1fc9627460f54133cdb5ce85c93558a3dcdcec25a46838a21ccc46.sqlite b/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/40832dcc5f1fc9627460f54133cdb5ce85c93558a3dcdcec25a46838a21ccc46.sqlite deleted file mode 100644 index 0b58f0d..0000000 Binary files a/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/40832dcc5f1fc9627460f54133cdb5ce85c93558a3dcdcec25a46838a21ccc46.sqlite and /dev/null differ diff --git a/README.md b/README.md index ef5b644..4b69f9c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ ### 自动部署 (推荐) -本项目已包含一个预先配置好的 GitHub Action 工作流,可以帮助您自动将 vMail 应用部署到 Cloudflare。 +本项目已包含一个预先配置好的 GitHub Action 工作流,可以帮助您自动将 Vmail 应用部署到 Cloudflare。 详细步骤请参考 [GitHub Action 自动部署教程](/docs/github-action-tutorial.md)。 @@ -63,6 +63,16 @@ 5. **配置电子邮件路由** 在您的 Cloudflare 域名管理界面,进入 `Email` -> `Email Routing` -> `Routes`,设置一个 `Catch-all` 规则,将所有发送到您域名的邮件 `Send to a Worker`,选择您刚刚部署的 Worker。 +### 环境变量 + +在部署到 Cloudflare Pages 时,您需要配置以下环境变量: + +- `DATABASE_NAME`: 您的 D1 数据库名称。 +- `DATABASE_ID`: 您的 D1 数据库 ID。 +- `TURNSTILE_KEY`: 您的 Turnstile 站点密钥。 +- `TURNSTILE_SECRET`: 您的 Turnstile 密钥。 +- `COOKIES_SECRET`: 用于签名 Cookie 的密钥。 + ## 🔨 本地运行调试 1. **复制环境变量文件** diff --git a/README_en.md b/README_en.md index 4cd1cd9..bae409e 100644 --- a/README_en.md +++ b/README_en.md @@ -32,7 +32,7 @@ This project is now fully based on Cloudflare Pages and Cloudflare D1, which gre ### Automatic Deployment (Recommended) -This project includes a pre-configured GitHub Action workflow to help you automatically deploy the vMail application to Cloudflare. +This project includes a pre-configured GitHub Action workflow to help you automatically deploy the Vmail application to Cloudflare. For detailed steps, please refer to the [GitHub Action Auto-Deployment Tutorial](/docs/github-action-tutorial.md). @@ -82,6 +82,16 @@ For detailed steps, please refer to the [GitHub Action Auto-Deployment Tutorial] This command starts both the frontend Vite development server and the local Wrangler Worker environment at the same time. +### Environment Variables + +When deploying to Cloudflare Pages, you need to configure the following environment variables: + +- `DATABASE_NAME`: Your D1 database name. +- `DATABASE_ID`: Your D1 database ID. +- `TURNSTILE_KEY`: Your Turnstile site key. +- `TURNSTILE_SECRET`: Your Turnstile secret key. +- `COOKIES_SECRET`: A secret used to sign cookies. + ## Community Group - Discord: https://discord.gg/d68kWCBDEs diff --git a/docs/github-action-tutorial.md b/docs/github-action-tutorial.md index f67fb56..d9ed7f7 100644 --- a/docs/github-action-tutorial.md +++ b/docs/github-action-tutorial.md @@ -1,6 +1,6 @@ # GitHub Action 自动部署教程 -本项目已包含一个预先配置好的 GitHub Action 工作流文件 (`.github/workflows/deploy.yml`),可以帮助您自动将 vMail 应用部署到 Cloudflare Workers。 +本项目已包含一个预先配置好的 GitHub Action 工作流文件 (`.github/workflows/deploy.yml`),可以帮助您自动将 Vmail 应用部署到 Cloudflare Workers。 ## 准备工作 @@ -12,16 +12,16 @@ 前往您的 GitHub 仓库页面,点击 `Settings` -> `Secrets and variables` -> `Actions`,然后添加以下 `Repository secrets`: -| Secret Name | 说明 | 示例值 | -| :----------------- | :------------------------------------------------------------------------------------------------- | :--------------------------------- | -| `CF_API_TOKEN` | Cloudflare API Token,用于授权 Wrangler 操作。请确保该 Token 具有编辑 Workers 和 D1 数据库的权限。 | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` | -| `CF_ACCOUNT_ID` | 您的 Cloudflare 账户 ID,可以在 Cloudflare 控制台主页的右侧找到。 | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` | +| Secret Name | 说明 | 示例值 | +| :----------------- | :------------------------------------------------------------------------------------------------- | :------------------------------------- | +| `CF_API_TOKEN` | Cloudflare API Token,用于授权 Wrangler 操作。请确保该 Token 具有编辑 Workers 和 D1 数据库的权限。 | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` | +| `CF_ACCOUNT_ID` | 您的 Cloudflare 账户 ID,可以在 Cloudflare 控制台主页的右侧找到。 | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` | | `D1_DATABASE_ID` | 您的 D1 数据库 ID。 | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | -| `D1_DATABASE_NAME` | 您的 D1 数据库名称。 | `vmail` | -| `EMAIL_DOMAIN` | 您的邮箱域名,如果多个域名请用逗号隔开。 | `vmail.dev,example.com` | -| `COOKIES_SECRET` | 用于加密 Cookie 的密钥,请设置为一个随机且足够复杂的字符串。 | `a-very-strong-and-random-secret` | -| `TURNSTILE_KEY` | Cloudflare Turnstile 网站密钥 (Site Key)。 | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` | -| `TURNSTILE_SECRET` | Cloudflare Turnstile 密钥 (Secret Key)。 | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` | +| `D1_DATABASE_NAME` | 您的 D1 数据库名称。 | `vmail` | +| `EMAIL_DOMAIN` | 您的邮箱域名,如果多个域名请用逗号隔开。 | `vmail.dev,example.com` | +| `COOKIES_SECRET` | 用于加密 Cookie 的密钥,请设置为一个随机且足够复杂的字符串。 | `a-very-strong-and-random-secret` | +| `TURNSTILE_KEY` | Cloudflare Turnstile 网站密钥 (Site Key)。 | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` | +| `TURNSTILE_SECRET` | Cloudflare Turnstile 密钥 (Secret Key)。 | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` | ## 触发自动部署 diff --git a/frontend/build/client/assets/main-C4MSjDq3.js b/frontend/build/client/assets/main-C4MSjDq3.js deleted file mode 100644 index f0e3d2f..0000000 --- a/frontend/build/client/assets/main-C4MSjDq3.js +++ /dev/null @@ -1,264 +0,0 @@ -var Bx=Object.defineProperty;var kh=e=>{throw TypeError(e)};var zx=(e,t,n)=>t in e?Bx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Eh=(e,t,n)=>zx(e,typeof t!="symbol"?t+"":t,n),eu=(e,t,n)=>t.has(e)||kh("Cannot "+n);var P=(e,t,n)=>(eu(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?kh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),A=(e,t,n,r)=>(eu(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),W=(e,t,n)=>(eu(e,t,"access private method"),n);var Lo=(e,t,n,r)=>({set _(i){A(e,t,i,n)},get _(){return P(e,t,r)}});function Py(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var xs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ky={exports:{}},wl={},Ey={exports:{}},q={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var go=Symbol.for("react.element"),Wx=Symbol.for("react.portal"),Hx=Symbol.for("react.fragment"),Kx=Symbol.for("react.strict_mode"),qx=Symbol.for("react.profiler"),Qx=Symbol.for("react.provider"),Yx=Symbol.for("react.context"),Gx=Symbol.for("react.forward_ref"),Xx=Symbol.for("react.suspense"),Jx=Symbol.for("react.memo"),Zx=Symbol.for("react.lazy"),Th=Symbol.iterator;function e2(e){return e===null||typeof e!="object"?null:(e=Th&&e[Th]||e["@@iterator"],typeof e=="function"?e:null)}var Ty={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Oy=Object.assign,Ry={};function Wi(e,t,n){this.props=e,this.context=t,this.refs=Ry,this.updater=n||Ty}Wi.prototype.isReactComponent={};Wi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jy(){}jy.prototype=Wi.prototype;function If(e,t,n){this.props=e,this.context=t,this.refs=Ry,this.updater=n||Ty}var Vf=If.prototype=new jy;Vf.constructor=If;Oy(Vf,Wi.prototype);Vf.isPureReactComponent=!0;var Oh=Array.isArray,Ny=Object.prototype.hasOwnProperty,Uf={current:null},Ly={key:!0,ref:!0,__self:!0,__source:!0};function Dy(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Ny.call(t,r)&&!Ly.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,J=j[K];if(0>>1;Ki(vn,D))zi(Ye,vn)?(j[K]=Ye,j[z]=D,K=z):(j[K]=vn,j[Pe]=D,K=Pe);else if(zi(Ye,D))j[K]=Ye,j[z]=D,K=z;else break e}}return M}function i(j,M){var D=j.sortIndex-M.sortIndex;return D!==0?D:j.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,d=3,h=!1,p=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(j){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=j)r(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=n(u)}}function S(j){if(w=!1,v(j),!p)if(n(l)!==null)p=!0,N(C);else{var M=n(u);M!==null&&_(S,M.startTime-j)}}function C(j,M){p=!1,w&&(w=!1,g(R),R=-1),h=!0;var D=d;try{for(v(M),f=n(l);f!==null&&(!(f.expirationTime>M)||j&&!G());){var K=f.callback;if(typeof K=="function"){f.callback=null,d=f.priorityLevel;var J=K(f.expirationTime<=M);M=e.unstable_now(),typeof J=="function"?f.callback=J:f===n(l)&&r(l),v(M)}else r(l);f=n(l)}if(f!==null)var ce=!0;else{var Pe=n(u);Pe!==null&&_(S,Pe.startTime-M),ce=!1}return ce}finally{f=null,d=D,h=!1}}var E=!1,T=null,R=-1,F=5,V=-1;function G(){return!(e.unstable_now()-Vj||125K?(j.sortIndex=D,t(u,j),n(l)===null&&j===n(u)&&(w?(g(R),R=-1):w=!0,_(S,D-K))):(j.sortIndex=J,t(l,j),p||h||(p=!0,N(C))),j},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(j){var M=d;return function(){var D=d;d=M;try{return j.apply(this,arguments)}finally{d=D}}}})(_y);Fy.exports=_y;var d2=Fy.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Iy=b,ct=d2;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xu=Object.prototype.hasOwnProperty,h2=/^[: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]*$/,jh={},Nh={};function p2(e){return Xu.call(Nh,e)?!0:Xu.call(jh,e)?!1:h2.test(e)?Nh[e]=!0:(jh[e]=!0,!1)}function m2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function g2(e,t,n,r){if(t===null||typeof t>"u"||m2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qe(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Me[e]=new Qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Me[t]=new Qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Me[e]=new Qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Me[e]=new Qe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Me[e]=new Qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Me[e]=new Qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Me[e]=new Qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Me[e]=new Qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Me[e]=new Qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bf=/[\-:]([a-z])/g;function zf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Bf,zf);Me[t]=new Qe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Bf,zf);Me[t]=new Qe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Bf,zf);Me[t]=new Qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Me[e]=new Qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Me.xlinkHref=new Qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Me[e]=new Qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Wf(e,t,n,r){var i=Me.hasOwnProperty(t)?Me[t]:null;(i!==null?i.type!==0:r||!(2a||i[o]!==s[a]){var l=` -`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{ru=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ds(e):""}function y2(e){switch(e.tag){case 5:return ds(e.type);case 16:return ds("Lazy");case 13:return ds("Suspense");case 19:return ds("SuspenseList");case 0:case 2:case 15:return e=iu(e.type,!1),e;case 11:return e=iu(e.type.render,!1),e;case 1:return e=iu(e.type,!0),e;default:return""}}function tc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Qr:return"Fragment";case qr:return"Portal";case Ju:return"Profiler";case Hf:return"StrictMode";case Zu:return"Suspense";case ec:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $y:return(e.displayName||"Context")+".Consumer";case Uy:return(e._context.displayName||"Context")+".Provider";case Kf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qf:return t=e.displayName||null,t!==null?t:tc(e.type)||"Memo";case Pn:t=e._payload,e=e._init;try{return tc(e(t))}catch{}}return null}function v2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tc(t);case 8:return t===Hf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Qn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function w2(e){var t=zy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ao(e){e._valueTracker||(e._valueTracker=w2(e))}function Wy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=zy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ra(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function nc(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Dh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Qn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hy(e,t){t=t.checked,t!=null&&Wf(e,"checked",t,!1)}function rc(e,t){Hy(e,t);var n=Qn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ic(e,t.type,n):t.hasOwnProperty("defaultValue")&&ic(e,t.type,Qn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ic(e,t,n){(t!=="number"||Ra(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hs=Array.isArray;function ci(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Fo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ss={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},x2=["Webkit","ms","Moz","O"];Object.keys(Ss).forEach(function(e){x2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ss[t]=Ss[e]})});function Yy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ss.hasOwnProperty(e)&&Ss[e]?(""+t).trim():t+"px"}function Gy(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Yy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var S2=pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ac(e,t){if(t){if(S2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function lc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 uc=null;function Qf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cc=null,fi=null,di=null;function _h(e){if(e=wo(e)){if(typeof cc!="function")throw Error(L(280));var t=e.stateNode;t&&(t=Cl(t),cc(e.stateNode,e.type,t))}}function Xy(e){fi?di?di.push(e):di=[e]:fi=e}function Jy(){if(fi){var e=fi,t=di;if(di=fi=null,_h(e),t)for(e=0;e>>=0,e===0?32:31-(L2(e)/D2|0)|0}var _o=64,Io=4194304;function ps(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Da(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=ps(a):(s&=o,s!==0&&(r=ps(s)))}else o=n&~i,o!==0?r=ps(o):s!==0&&(r=ps(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function yo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function _2(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ps),Kh=" ",qh=!1;function v0(e,t){switch(e){case"keyup":return fS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yr=!1;function hS(e,t){switch(e){case"compositionend":return w0(t);case"keypress":return t.which!==32?null:(qh=!0,Kh);case"textInput":return e=t.data,e===Kh&&qh?null:e;default:return null}}function pS(e,t){if(Yr)return e==="compositionend"||!nd&&v0(e,t)?(e=g0(),ua=Zf=Fn=null,Yr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xh(n)}}function P0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?P0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function C0(){for(var e=window,t=Ra();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ra(e.document)}return t}function rd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function PS(e){var t=C0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&P0(n.ownerDocument.documentElement,n)){if(r!==null&&rd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Jh(n,s);var o=Jh(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Gr=null,gc=null,ks=null,yc=!1;function Zh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yc||Gr==null||Gr!==Ra(r)||(r=Gr,"selectionStart"in r&&rd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ks&&Bs(ks,r)||(ks=r,r=Fa(gc,"onSelect"),0Zr||(e.current=Pc[Zr],Pc[Zr]=null,Zr--)}function ne(e,t){Zr++,Pc[Zr]=e.current,e.current=t}var Yn={},$e=er(Yn),Ze=er(!1),Or=Yn;function Li(e,t){var n=e.type.contextTypes;if(!n)return Yn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function et(e){return e=e.childContextTypes,e!=null}function Ia(){ae(Ze),ae($e)}function op(e,t,n){if($e.current!==Yn)throw Error(L(168));ne($e,t),ne(Ze,n)}function D0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(L(108,v2(e)||"Unknown",i));return pe({},n,r)}function Va(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yn,Or=$e.current,ne($e,e),ne(Ze,Ze.current),!0}function ap(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=D0(e,t,Or),r.__reactInternalMemoizedMergedChildContext=e,ae(Ze),ae($e),ne($e,e)):ae(Ze),ne(Ze,n)}var tn=null,kl=!1,vu=!1;function M0(e){tn===null?tn=[e]:tn.push(e)}function AS(e){kl=!0,M0(e)}function tr(){if(!vu&&tn!==null){vu=!0;var e=0,t=ee;try{var n=tn;for(ee=1;e>=o,i-=o,sn=1<<32-Nt(t)+i|n<R?(F=T,T=null):F=T.sibling;var V=d(g,T,v[R],S);if(V===null){T===null&&(T=F);break}e&&T&&V.alternate===null&&t(g,T),y=s(V,y,R),E===null?C=V:E.sibling=V,E=V,T=F}if(R===v.length)return n(g,T),ue&&or(g,R),C;if(T===null){for(;RR?(F=T,T=null):F=T.sibling;var G=d(g,T,V.value,S);if(G===null){T===null&&(T=F);break}e&&T&&G.alternate===null&&t(g,T),y=s(G,y,R),E===null?C=G:E.sibling=G,E=G,T=F}if(V.done)return n(g,T),ue&&or(g,R),C;if(T===null){for(;!V.done;R++,V=v.next())V=f(g,V.value,S),V!==null&&(y=s(V,y,R),E===null?C=V:E.sibling=V,E=V);return ue&&or(g,R),C}for(T=r(g,T);!V.done;R++,V=v.next())V=h(T,g,R,V.value,S),V!==null&&(e&&V.alternate!==null&&T.delete(V.key===null?R:V.key),y=s(V,y,R),E===null?C=V:E.sibling=V,E=V);return e&&T.forEach(function(te){return t(g,te)}),ue&&or(g,R),C}function x(g,y,v,S){if(typeof v=="object"&&v!==null&&v.type===Qr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Mo:e:{for(var C=v.key,E=y;E!==null;){if(E.key===C){if(C=v.type,C===Qr){if(E.tag===7){n(g,E.sibling),y=i(E,v.props.children),y.return=g,g=y;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Pn&&pp(C)===E.type){n(g,E.sibling),y=i(E,v.props),y.ref=is(g,E,v),y.return=g,g=y;break e}n(g,E);break}else t(g,E);E=E.sibling}v.type===Qr?(y=Cr(v.props.children,g.mode,S,v.key),y.return=g,g=y):(S=ya(v.type,v.key,v.props,null,g.mode,S),S.ref=is(g,y,v),S.return=g,g=S)}return o(g);case qr:e:{for(E=v.key;y!==null;){if(y.key===E)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(g,y.sibling),y=i(y,v.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=Eu(v,g.mode,S),y.return=g,g=y}return o(g);case Pn:return E=v._init,x(g,y,E(v._payload),S)}if(hs(v))return p(g,y,v,S);if(Zi(v))return w(g,y,v,S);Ho(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,v),y.return=g,g=y):(n(g,y),y=ku(v,g.mode,S),y.return=g,g=y),o(g)):n(g,y)}return x}var Mi=B0(!0),z0=B0(!1),xo={},Yt=er(xo),Ks=er(xo),qs=er(xo);function hr(e){if(e===xo)throw Error(L(174));return e}function dd(e,t){switch(ne(qs,t),ne(Ks,e),ne(Yt,xo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:oc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=oc(t,e)}ae(Yt),ne(Yt,t)}function Ai(){ae(Yt),ae(Ks),ae(qs)}function W0(e){hr(qs.current);var t=hr(Yt.current),n=oc(t,e.type);t!==n&&(ne(Ks,e),ne(Yt,n))}function hd(e){Ks.current===e&&(ae(Yt),ae(Ks))}var fe=er(0);function Ha(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wu=[];function pd(){for(var e=0;en?n:4,e(!0);var r=xu.transition;xu.transition={};try{e(!1),t()}finally{ee=n,xu.transition=r}}function ov(){return kt().memoizedState}function VS(e,t,n){var r=Hn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},av(e))lv(t,n);else if(n=I0(e,t,n,r),n!==null){var i=Ke();Lt(n,e,r,i),uv(n,t,r)}}function US(e,t,n){var r=Hn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(av(e))lv(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Dt(a,o)){var l=t.interleaved;l===null?(i.next=i,cd(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=I0(e,t,i,r),n!==null&&(i=Ke(),Lt(n,e,r,i),uv(n,t,r))}}function av(e){var t=e.alternate;return e===he||t!==null&&t===he}function lv(e,t){Es=Ka=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uv(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gf(e,n)}}var qa={readContext:Ct,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useInsertionEffect:Ae,useLayoutEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useMutableSource:Ae,useSyncExternalStore:Ae,useId:Ae,unstable_isNewReconciler:!1},$S={readContext:Ct,useCallback:function(e,t){return It().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:gp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ha(4194308,4,tv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ha(4194308,4,e,t)},useInsertionEffect:function(e,t){return ha(4,2,e,t)},useMemo:function(e,t){var n=It();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=It();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=VS.bind(null,he,e),[r.memoizedState,e]},useRef:function(e){var t=It();return e={current:e},t.memoizedState=e},useState:mp,useDebugValue:wd,useDeferredValue:function(e){return It().memoizedState=e},useTransition:function(){var e=mp(!1),t=e[0];return e=IS.bind(null,e[1]),It().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=he,i=It();if(ue){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),je===null)throw Error(L(349));jr&30||q0(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,gp(Y0.bind(null,r,s,e),[e]),r.flags|=2048,Gs(9,Q0.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=It(),t=je.identifierPrefix;if(ue){var n=on,r=sn;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Qs++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[zt]=t,e[Hs]=r,vv(e,t,!1,!1),t.stateNode=e;e:{switch(o=lc(n,r),n){case"dialog":se("cancel",e),se("close",e),i=r;break;case"iframe":case"object":case"embed":se("load",e),i=r;break;case"video":case"audio":for(i=0;i_i&&(t.flags|=128,r=!0,ss(s,!1),t.lanes=4194304)}else{if(!r)if(e=Ha(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ss(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ue)return Fe(t),null}else 2*ve()-s.renderingStartTime>_i&&n!==1073741824&&(t.flags|=128,r=!0,ss(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ve(),t.sibling=null,n=fe.current,ne(fe,r?n&1|2:n&1),t):(Fe(t),null);case 22:case 23:return kd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ot&1073741824&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function YS(e,t){switch(sd(t),t.tag){case 1:return et(t.type)&&Ia(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ai(),ae(Ze),ae($e),pd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hd(t),null;case 13:if(ae(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Di()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(fe),null;case 4:return Ai(),null;case 10:return ud(t.type._context),null;case 22:case 23:return kd(),null;case 24:return null;default:return null}}var qo=!1,Ie=!1,GS=typeof WeakSet=="function"?WeakSet:Set,I=null;function ri(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function Ac(e,t,n){try{n()}catch(r){ge(e,t,r)}}var kp=!1;function XS(e,t){if(vc=Ma,e=C0(),rd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===i&&(a=o),d===s&&++c===r&&(l=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(wc={focusedElem:e,selectionRange:n},Ma=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var w=p.memoizedProps,x=p.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?w:Ot(t.type,w),x);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(S){ge(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return p=kp,kp=!1,p}function Ts(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Ac(t,n,s)}i=i.next}while(i!==r)}}function Ol(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Fc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Sv(e){var t=e.alternate;t!==null&&(e.alternate=null,Sv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[zt],delete t[Hs],delete t[bc],delete t[DS],delete t[MS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function bv(e){return e.tag===5||e.tag===3||e.tag===4}function Ep(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_a));else if(r!==4&&(e=e.child,e!==null))for(_c(e,t,n),e=e.sibling;e!==null;)_c(e,t,n),e=e.sibling}function Ic(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ic(e,t,n),e=e.sibling;e!==null;)Ic(e,t,n),e=e.sibling}var Ne=null,Rt=!1;function wn(e,t,n){for(n=n.child;n!==null;)Pv(e,t,n),n=n.sibling}function Pv(e,t,n){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(xl,n)}catch{}switch(n.tag){case 5:Ie||ri(n,t);case 6:var r=Ne,i=Rt;Ne=null,wn(e,t,n),Ne=r,Rt=i,Ne!==null&&(Rt?(e=Ne,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ne.removeChild(n.stateNode));break;case 18:Ne!==null&&(Rt?(e=Ne,n=n.stateNode,e.nodeType===8?yu(e.parentNode,n):e.nodeType===1&&yu(e,n),Us(e)):yu(Ne,n.stateNode));break;case 4:r=Ne,i=Rt,Ne=n.stateNode.containerInfo,Rt=!0,wn(e,t,n),Ne=r,Rt=i;break;case 0:case 11:case 14:case 15:if(!Ie&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Ac(n,t,o),i=i.next}while(i!==r)}wn(e,t,n);break;case 1:if(!Ie&&(ri(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ge(n,t,a)}wn(e,t,n);break;case 21:wn(e,t,n);break;case 22:n.mode&1?(Ie=(r=Ie)||n.memoizedState!==null,wn(e,t,n),Ie=r):wn(e,t,n);break;default:wn(e,t,n)}}function Tp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new GS),t.forEach(function(r){var i=ob.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Et(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZS(r/1960))-r,10e?16:e,_n===null)var r=!1;else{if(e=_n,_n=null,Ga=0,Y&6)throw Error(L(331));var i=Y;for(Y|=4,I=e.current;I!==null;){var s=I,o=s.child;if(I.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lve()-Pd?Pr(e,0):bd|=n),tt(e,t)}function Nv(e,t){t===0&&(e.mode&1?(t=Io,Io<<=1,!(Io&130023424)&&(Io=4194304)):t=1);var n=Ke();e=hn(e,t),e!==null&&(yo(e,t,n),tt(e,n))}function sb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Nv(e,n)}function ob(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),Nv(e,n)}var Lv;Lv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)Je=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Je=!1,qS(e,t,n);Je=!!(e.flags&131072)}else Je=!1,ue&&t.flags&1048576&&A0(t,$a,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pa(e,t),e=t.pendingProps;var i=Li(t,$e.current);pi(t,n),i=gd(null,t,r,e,i,n);var s=yd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,et(r)?(s=!0,Va(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,fd(t),i.updater=El,t.stateNode=i,i._reactInternals=t,Oc(t,r,e,n),t=Nc(null,t,r,!0,s,n)):(t.tag=0,ue&&s&&id(t),We(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pa(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lb(r),e=Ot(r,e),i){case 0:t=jc(null,t,r,e,n);break e;case 1:t=bp(null,t,r,e,n);break e;case 11:t=xp(null,t,r,e,n);break e;case 14:t=Sp(null,t,r,Ot(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ot(r,i),jc(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ot(r,i),bp(e,t,r,i,n);case 3:e:{if(mv(t),e===null)throw Error(L(387));r=t.pendingProps,s=t.memoizedState,i=s.element,V0(e,t),Wa(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Fi(Error(L(423)),t),t=Pp(e,t,r,n,i);break e}else if(r!==i){i=Fi(Error(L(424)),t),t=Pp(e,t,r,n,i);break e}else for(at=Bn(t.stateNode.containerInfo.firstChild),lt=t,ue=!0,jt=null,n=z0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Di(),r===i){t=pn(e,t,n);break e}We(e,t,r,n)}t=t.child}return t;case 5:return W0(t),e===null&&kc(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,xc(r,i)?o=null:s!==null&&xc(r,s)&&(t.flags|=32),pv(e,t),We(e,t,o,n),t.child;case 6:return e===null&&kc(t),null;case 13:return gv(e,t,n);case 4:return dd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mi(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ot(r,i),xp(e,t,r,i,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,ne(Ba,r._currentValue),r._currentValue=o,s!==null)if(Dt(s.value,o)){if(s.children===i.children&&!Ze.current){t=pn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=an(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ec(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ec(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}We(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,pi(t,n),i=Ct(i),r=r(i),t.flags|=1,We(e,t,r,n),t.child;case 14:return r=t.type,i=Ot(r,t.pendingProps),i=Ot(r.type,i),Sp(e,t,r,i,n);case 15:return dv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ot(r,i),pa(e,t),t.tag=1,et(r)?(e=!0,Va(t)):e=!1,pi(t,n),$0(t,r,i),Oc(t,r,i,n),Nc(null,t,r,!0,e,n);case 19:return yv(e,t,n);case 22:return hv(e,t,n)}throw Error(L(156,t.tag))};function Dv(e,t){return s0(e,t)}function ab(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bt(e,t,n,r){return new ab(e,t,n,r)}function Td(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lb(e){if(typeof e=="function")return Td(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Kf)return 11;if(e===qf)return 14}return 2}function Kn(e,t){var n=e.alternate;return n===null?(n=bt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ya(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Td(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Qr:return Cr(n.children,i,s,t);case Hf:o=8,i|=8;break;case Ju:return e=bt(12,n,t,i|2),e.elementType=Ju,e.lanes=s,e;case Zu:return e=bt(13,n,t,i),e.elementType=Zu,e.lanes=s,e;case ec:return e=bt(19,n,t,i),e.elementType=ec,e.lanes=s,e;case By:return jl(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Uy:o=10;break e;case $y:o=9;break e;case Kf:o=11;break e;case qf:o=14;break e;case Pn:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=bt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Cr(e,t,n,r){return e=bt(7,e,r,t),e.lanes=n,e}function jl(e,t,n,r){return e=bt(22,e,r,t),e.elementType=By,e.lanes=n,e.stateNode={isHidden:!1},e}function ku(e,t,n){return e=bt(6,e,null,t),e.lanes=n,e}function Eu(e,t,n){return t=bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ub(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ou(0),this.expirationTimes=ou(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ou(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Od(e,t,n,r,i,s,o,a,l){return e=new ub(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=bt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fd(s),e}function cb(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_v)}catch(e){console.error(e)}}_v(),Ay.exports=dt;var mb=Ay.exports,Ap=mb;Gu.createRoot=Ap.createRoot,Gu.hydrateRoot=Ap.hydrateRoot;var qi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ii=typeof window>"u"||"Deno"in window;function wt(){}function gb(e,t){return typeof e=="function"?e(t):e}function zc(e){return typeof e=="number"&&e>=0&&e!==1/0}function Iv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fp(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Ld(o,t.options))return!1}else if(!Js(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||s&&!s(t))}function _p(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Dr(t.options.mutationKey)!==Dr(s))return!1}else if(!Js(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ld(e,t){return((t==null?void 0:t.queryKeyHashFn)||Dr)(e)}function Dr(e){return JSON.stringify(e,(t,n)=>Wc(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Js(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Js(e[n],t[n])):!1}function Vv(e,t){if(e===t)return e;const n=Ip(e)&&Ip(t);if(n||Wc(e)&&Wc(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),s=i.length,o=n?[]:{};let a=0;for(let l=0;l"u")return!0;const n=t.prototype;return!(!Vp(n)||!n.hasOwnProperty("isPrototypeOf"))}function Vp(e){return Object.prototype.toString.call(e)==="[object Object]"}function yb(e){return new Promise(t=>{setTimeout(t,e)})}function Hc(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Vv(e,t):t}function vb(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function wb(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var gr,On,yi,hy,xb=(hy=class extends qi{constructor(){super();U(this,gr);U(this,On);U(this,yi);A(this,yi,t=>{if(!Ii&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,On)||this.setEventListener(P(this,yi))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,On))==null||t.call(this),A(this,On,void 0))}setEventListener(t){var n;A(this,yi,t),(n=P(this,On))==null||n.call(this),A(this,On,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,gr)!==t&&(A(this,gr,t),this.onFocus())}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){var t;return typeof P(this,gr)=="boolean"?P(this,gr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},gr=new WeakMap,On=new WeakMap,yi=new WeakMap,hy),el=new xb,vi,Rn,wi,py,Sb=(py=class extends qi{constructor(){super();U(this,vi,!0);U(this,Rn);U(this,wi);A(this,wi,t=>{if(!Ii&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,Rn)||this.setEventListener(P(this,wi))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Rn))==null||t.call(this),A(this,Rn,void 0))}setEventListener(t){var n;A(this,wi,t),(n=P(this,Rn))==null||n.call(this),A(this,Rn,t(this.setOnline.bind(this)))}setOnline(t){P(this,vi)!==t&&(A(this,vi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,vi)}},vi=new WeakMap,Rn=new WeakMap,wi=new WeakMap,py),tl=new Sb;function bb(e){return Math.min(1e3*2**e,3e4)}function Al(e){return(e??"online")==="online"?tl.isOnline():!0}var Uv=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Tu(e){return e instanceof Uv}function $v(e){let t=!1,n=0,r=!1,i,s,o;const a=new Promise((x,g)=>{s=x,o=g}),l=x=>{var g;r||(h(new Uv(x)),(g=e.abort)==null||g.call(e))},u=()=>{t=!0},c=()=>{t=!1},f=()=>!el.isFocused()||e.networkMode!=="always"&&!tl.isOnline(),d=x=>{var g;r||(r=!0,(g=e.onSuccess)==null||g.call(e,x),i==null||i(),s(x))},h=x=>{var g;r||(r=!0,(g=e.onError)==null||g.call(e,x),i==null||i(),o(x))},p=()=>new Promise(x=>{var g;i=y=>{const v=r||!f();return v&&x(y),v},(g=e.onPause)==null||g.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),w=()=>{if(r)return;let x;try{x=e.fn()}catch(g){x=Promise.reject(g)}Promise.resolve(x).then(d).catch(g=>{var E;if(r)return;const y=e.retry??(Ii?0:3),v=e.retryDelay??bb,S=typeof v=="function"?v(n,g):v,C=y===!0||typeof y=="number"&&n{if(f())return p()}).then(()=>{t?h(g):w()})})};return Al(e.networkMode)?w():p().then(w),{promise:a,cancel:l,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:u,continueRetry:c}}function Pb(){let e=[],t=0,n=d=>{d()},r=d=>{d()},i=d=>setTimeout(d,0);const s=d=>{i=d},o=d=>{let h;t++;try{h=d()}finally{t--,t||u()}return h},a=d=>{t?e.push(d):i(()=>{n(d)})},l=d=>(...h)=>{a(()=>{d(...h)})},u=()=>{const d=e;e=[],d.length&&i(()=>{r(()=>{d.forEach(h=>{n(h)})})})};return{batch:o,batchCalls:l,schedule:a,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{r=d},setScheduler:s}}var Ee=Pb(),yr,my,Bv=(my=class{constructor(){U(this,yr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zc(this.gcTime)&&A(this,yr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ii?1/0:5*60*1e3))}clearGcTimeout(){P(this,yr)&&(clearTimeout(P(this,yr)),A(this,yr,void 0))}},yr=new WeakMap,my),xi,Si,gt,jn,yt,Oe,co,vr,He,va,Zt,gy,Cb=(gy=class extends Bv{constructor(t){super();U(this,He);U(this,xi);U(this,Si);U(this,gt);U(this,jn);U(this,yt);U(this,Oe);U(this,co);U(this,vr);A(this,vr,!1),A(this,co,t.defaultOptions),W(this,He,va).call(this,t.options),A(this,Oe,[]),A(this,gt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,A(this,xi,t.state||kb(this.options)),this.state=P(this,xi),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!P(this,Oe).length&&this.state.fetchStatus==="idle"&&P(this,gt).remove(this)}setData(t,n){const r=Hc(this.state.data,t,this.options);return W(this,He,Zt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){W(this,He,Zt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r;const n=P(this,jn);return(r=P(this,yt))==null||r.cancel(t),n?n.then(wt).catch(wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,xi))}isActive(){return P(this,Oe).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||P(this,Oe).some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Iv(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=P(this,Oe).find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,yt))==null||n.continue()}onOnline(){var n;const t=P(this,Oe).find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,yt))==null||n.continue()}addObserver(t){P(this,Oe).includes(t)||(P(this,Oe).push(t),this.clearGcTimeout(),P(this,gt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){P(this,Oe).includes(t)&&(A(this,Oe,P(this,Oe).filter(n=>n!==t)),P(this,Oe).length||(P(this,yt)&&(P(this,vr)?P(this,yt).cancel({revert:!0}):P(this,yt).cancelRetry()),this.scheduleGc()),P(this,gt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return P(this,Oe).length}invalidate(){this.state.isInvalidated||W(this,He,Zt).call(this,{type:"invalidate"})}fetch(t,n){var u,c,f,d;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,jn))return(u=P(this,yt))==null||u.continueRetry(),P(this,jn)}if(t&&W(this,He,va).call(this,t),!this.options.queryFn){const h=P(this,Oe).find(p=>p.options.queryFn);h&&W(this,He,va).call(this,h.options)}const r=new AbortController,i={queryKey:this.queryKey,meta:this.meta},s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(A(this,vr,!0),r.signal)})};s(i);const o=()=>this.options.queryFn?(A(this,vr,!1),this.options.persister?this.options.persister(this.options.queryFn,i,this):this.options.queryFn(i)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};s(a),(c=this.options.behavior)==null||c.onFetch(a,this),A(this,Si,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=a.fetchOptions)==null?void 0:f.meta))&&W(this,He,Zt).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=h=>{var p,w,x,g;Tu(h)&&h.silent||W(this,He,Zt).call(this,{type:"error",error:h}),Tu(h)||((w=(p=P(this,gt).config).onError)==null||w.call(p,h,this),(g=(x=P(this,gt).config).onSettled)==null||g.call(x,this.state.data,h,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return A(this,yt,$v({fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var p,w,x,g;if(typeof h>"u"){l(new Error(`${this.queryHash} data is undefined`));return}this.setData(h),(w=(p=P(this,gt).config).onSuccess)==null||w.call(p,h,this),(g=(x=P(this,gt).config).onSettled)==null||g.call(x,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(h,p)=>{W(this,He,Zt).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{W(this,He,Zt).call(this,{type:"pause"})},onContinue:()=>{W(this,He,Zt).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode})),A(this,jn,P(this,yt).promise),P(this,jn)}},xi=new WeakMap,Si=new WeakMap,gt=new WeakMap,jn=new WeakMap,yt=new WeakMap,Oe=new WeakMap,co=new WeakMap,vr=new WeakMap,He=new WeakSet,va=function(t){this.options={...P(this,co),...t},this.updateGcTime(this.options.gcTime)},Zt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:t.meta??null,fetchStatus:Al(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Tu(i)&&i.revert&&P(this,Si)?{...P(this,Si),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ee.batch(()=>{P(this,Oe).forEach(r=>{r.onQueryUpdate()}),P(this,gt).notify({query:this,type:"updated",action:t})})},gy);function kb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,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 Vt,yy,Eb=(yy=class extends qi{constructor(t={}){super();U(this,Vt);this.config=t,A(this,Vt,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Ld(i,n);let o=this.get(s);return o||(o=new Cb({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){P(this,Vt).has(t.queryHash)||(P(this,Vt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,Vt).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,Vt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ee.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,Vt).get(t)}getAll(){return[...P(this,Vt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Fp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Fp(t,r)):n}notify(t){Ee.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ee.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ee.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Vt=new WeakMap,yy),Ut,fo,it,bi,$t,Sn,vy,Tb=(vy=class extends Bv{constructor(t){super();U(this,$t);U(this,Ut);U(this,fo);U(this,it);U(this,bi);this.mutationId=t.mutationId,A(this,fo,t.defaultOptions),A(this,it,t.mutationCache),A(this,Ut,[]),this.state=t.state||zv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...P(this,fo),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,Ut).includes(t)||(P(this,Ut).push(t),this.clearGcTimeout(),P(this,it).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){A(this,Ut,P(this,Ut).filter(n=>n!==t)),this.scheduleGc(),P(this,it).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,Ut).length||(this.state.status==="pending"?this.scheduleGc():P(this,it).remove(this))}continue(){var t;return((t=P(this,bi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,c,f,d,h,p,w,x,g,y,v,S,C,E,T;const n=()=>(A(this,bi,$v({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,F)=>{W(this,$t,Sn).call(this,{type:"failed",failureCount:R,error:F})},onPause:()=>{W(this,$t,Sn).call(this,{type:"pause"})},onContinue:()=>{W(this,$t,Sn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),P(this,bi).promise),r=this.state.status==="pending";try{if(!r){W(this,$t,Sn).call(this,{type:"pending",variables:t}),await((s=(i=P(this,it).config).onMutate)==null?void 0:s.call(i,t,this));const F=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));F!==this.state.context&&W(this,$t,Sn).call(this,{type:"pending",context:F,variables:t})}const R=await n();return await((u=(l=P(this,it).config).onSuccess)==null?void 0:u.call(l,R,t,this.state.context,this)),await((f=(c=this.options).onSuccess)==null?void 0:f.call(c,R,t,this.state.context)),await((h=(d=P(this,it).config).onSettled)==null?void 0:h.call(d,R,null,this.state.variables,this.state.context,this)),await((w=(p=this.options).onSettled)==null?void 0:w.call(p,R,null,t,this.state.context)),W(this,$t,Sn).call(this,{type:"success",data:R}),R}catch(R){try{throw await((g=(x=P(this,it).config).onError)==null?void 0:g.call(x,R,t,this.state.context,this)),await((v=(y=this.options).onError)==null?void 0:v.call(y,R,t,this.state.context)),await((C=(S=P(this,it).config).onSettled)==null?void 0:C.call(S,void 0,R,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,R,t,this.state.context)),R}finally{W(this,$t,Sn).call(this,{type:"error",error:R})}}}},Ut=new WeakMap,fo=new WeakMap,it=new WeakMap,bi=new WeakMap,$t=new WeakSet,Sn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Al(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ee.batch(()=>{P(this,Ut).forEach(r=>{r.onMutationUpdate(t)}),P(this,it).notify({mutation:this,type:"updated",action:t})})},vy);function zv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vt,ho,wr,wy,Ob=(wy=class extends qi{constructor(t={}){super();U(this,vt);U(this,ho);U(this,wr);this.config=t,A(this,vt,[]),A(this,ho,0)}build(t,n,r){const i=new Tb({mutationCache:this,mutationId:++Lo(this,ho)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){P(this,vt).push(t),this.notify({type:"added",mutation:t})}remove(t){A(this,vt,P(this,vt).filter(n=>n!==t)),this.notify({type:"removed",mutation:t})}clear(){Ee.batch(()=>{P(this,vt).forEach(t=>{this.remove(t)})})}getAll(){return P(this,vt)}find(t){const n={exact:!0,...t};return P(this,vt).find(r=>_p(n,r))}findAll(t={}){return P(this,vt).filter(n=>_p(t,n))}notify(t){Ee.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){return A(this,wr,(P(this,wr)??Promise.resolve()).then(()=>{const t=P(this,vt).filter(n=>n.state.isPaused);return Ee.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(wt)),Promise.resolve()))}).then(()=>{A(this,wr,void 0)})),P(this,wr)}},vt=new WeakMap,ho=new WeakMap,wr=new WeakMap,wy);function Rb(e){return{onFetch:(t,n)=>{const r=async()=>{var p,w,x,g,y;const i=t.options,s=(x=(w=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:w.fetchMore)==null?void 0:x.direction,o=((g=t.state.data)==null?void 0:g.pages)||[],a=((y=t.state.data)==null?void 0:y.pageParams)||[],l={pages:[],pageParams:[]};let u=!1;const c=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},f=t.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`))),d=async(v,S,C)=>{if(u)return Promise.reject();if(S==null&&v.pages.length)return Promise.resolve(v);const E={queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};c(E);const T=await f(E),{maxPages:R}=t.options,F=C?wb:vb;return{pages:F(v.pages,T,R),pageParams:F(v.pageParams,S,R)}};let h;if(s&&o.length){const v=s==="backward",S=v?jb:Up,C={pages:o,pageParams:a},E=S(i,C);h=await d(C,E,v)}else{h=await d(l,a[0]??i.initialPageParam);const v=e??o.length;for(let S=1;S{var i,s;return(s=(i=t.options).persister)==null?void 0:s.call(i,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function Up(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function jb(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}var Ce,Nn,Ln,Pi,Ci,Dn,ki,Ei,xy,Nb=(xy=class{constructor(e={}){U(this,Ce);U(this,Nn);U(this,Ln);U(this,Pi);U(this,Ci);U(this,Dn);U(this,ki);U(this,Ei);A(this,Ce,e.queryCache||new Eb),A(this,Nn,e.mutationCache||new Ob),A(this,Ln,e.defaultOptions||{}),A(this,Pi,new Map),A(this,Ci,new Map),A(this,Dn,0)}mount(){Lo(this,Dn)._++,P(this,Dn)===1&&(A(this,ki,el.subscribe(()=>{el.isFocused()&&(this.resumePausedMutations(),P(this,Ce).onFocus())})),A(this,Ei,tl.subscribe(()=>{tl.isOnline()&&(this.resumePausedMutations(),P(this,Ce).onOnline())})))}unmount(){var e,t;Lo(this,Dn)._--,P(this,Dn)===0&&((e=P(this,ki))==null||e.call(this),A(this,ki,void 0),(t=P(this,Ei))==null||t.call(this),A(this,Ei,void 0))}isFetching(e){return P(this,Ce).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,Nn).findAll({...e,status:"pending"}).length}getQueryData(e){var t;return(t=P(this,Ce).find({queryKey:e}))==null?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);return t!==void 0?Promise.resolve(t):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=P(this,Ce).find({queryKey:e}),i=r==null?void 0:r.state.data,s=gb(t,i);if(typeof s>"u")return;const o=this.defaultQueryOptions({queryKey:e});return P(this,Ce).build(this,o).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Ee.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var t;return(t=P(this,Ce).find({queryKey:e}))==null?void 0:t.state}removeQueries(e){const t=P(this,Ce);Ee.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,Ce),r={type:"active",...e};return Ee.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Ee.batch(()=>P(this,Ce).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(wt).catch(wt)}invalidateQueries(e={},t={}){return Ee.batch(()=>{if(P(this,Ce).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Ee.batch(()=>P(this,Ce).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(wt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);typeof t.retry>"u"&&(t.retry=!1);const n=P(this,Ce).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(wt).catch(wt)}fetchInfiniteQuery(e){return e.behavior=Rb(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(wt).catch(wt)}resumePausedMutations(){return P(this,Nn).resumePausedMutations()}getQueryCache(){return P(this,Ce)}getMutationCache(){return P(this,Nn)}getDefaultOptions(){return P(this,Ln)}setDefaultOptions(e){A(this,Ln,e)}setQueryDefaults(e,t){P(this,Pi).set(Dr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,Pi).values()];let n={};return t.forEach(r=>{Js(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){P(this,Ci).set(Dr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,Ci).values()];let n={};return t.forEach(r=>{Js(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...P(this,Ln).queries,...(e==null?void 0:e.queryKey)&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ld(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.throwOnError>"u"&&(t.throwOnError=!!t.suspense),typeof t.networkMode>"u"&&t.persister&&(t.networkMode="offlineFirst"),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,Ln).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,Ce).clear(),P(this,Nn).clear()}},Ce=new WeakMap,Nn=new WeakMap,Ln=new WeakMap,Pi=new WeakMap,Ci=new WeakMap,Dn=new WeakMap,ki=new WeakMap,Ei=new WeakMap,xy),Ge,oe,po,ze,xr,Ti,Bt,mo,Oi,Ri,Sr,br,Mn,ji,X,gs,Kc,qc,Qc,Yc,Gc,Xc,Jc,Wv,Sy,Lb=(Sy=class extends qi{constructor(t,n){super();U(this,X);U(this,Ge);U(this,oe);U(this,po);U(this,ze);U(this,xr);U(this,Ti);U(this,Bt);U(this,mo);U(this,Oi);U(this,Ri);U(this,Sr);U(this,br);U(this,Mn);U(this,ji,new Set);this.options=n,A(this,Ge,t),A(this,Bt,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,oe).addObserver(this),$p(P(this,oe),this.options)?W(this,X,gs).call(this):this.updateResult(),W(this,X,Yc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zc(P(this,oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zc(P(this,oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,W(this,X,Gc).call(this),W(this,X,Xc).call(this),P(this,oe).removeObserver(this)}setOptions(t,n){const r=this.options,i=P(this,oe);if(this.options=P(this,Ge).defaultQueryOptions(t),Za(r,this.options)||P(this,Ge).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,oe),observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),W(this,X,Jc).call(this);const s=this.hasListeners();s&&Bp(P(this,oe),i,this.options,r)&&W(this,X,gs).call(this),this.updateResult(n),s&&(P(this,oe)!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&W(this,X,Kc).call(this);const o=W(this,X,qc).call(this);s&&(P(this,oe)!==i||this.options.enabled!==r.enabled||o!==P(this,Mn))&&W(this,X,Qc).call(this,o)}getOptimisticResult(t){const n=P(this,Ge).getQueryCache().build(P(this,Ge),t),r=this.createResult(n,t);return Mb(this,r)&&(A(this,ze,r),A(this,Ti,this.options),A(this,xr,P(this,oe).state)),r}getCurrentResult(){return P(this,ze)}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(P(this,ji).add(r),t[r])})}),n}getCurrentQuery(){return P(this,oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=P(this,Ge).defaultQueryOptions(t),r=P(this,Ge).getQueryCache().build(P(this,Ge),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return W(this,X,gs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,ze)))}createResult(t,n){var E;const r=P(this,oe),i=this.options,s=P(this,ze),o=P(this,xr),a=P(this,Ti),u=t!==r?t.state:P(this,po),{state:c}=t;let{error:f,errorUpdatedAt:d,fetchStatus:h,status:p}=c,w=!1,x;if(n._optimisticResults){const T=this.hasListeners(),R=!T&&$p(t,n),F=T&&Bp(t,r,n,i);(R||F)&&(h=Al(t.options.networkMode)?"fetching":"paused",c.dataUpdatedAt||(p="pending")),n._optimisticResults==="isRestoring"&&(h="idle")}if(n.select&&typeof c.data<"u")if(s&&c.data===(o==null?void 0:o.data)&&n.select===P(this,mo))x=P(this,Oi);else try{A(this,mo,n.select),x=n.select(c.data),x=Hc(s==null?void 0:s.data,x,n),A(this,Oi,x),A(this,Bt,null)}catch(T){A(this,Bt,T)}else x=c.data;if(typeof n.placeholderData<"u"&&typeof x>"u"&&p==="pending"){let T;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))T=s.data;else if(T=typeof n.placeholderData=="function"?n.placeholderData((E=P(this,Ri))==null?void 0:E.state.data,P(this,Ri)):n.placeholderData,n.select&&typeof T<"u")try{T=n.select(T),A(this,Bt,null)}catch(R){A(this,Bt,R)}typeof T<"u"&&(p="success",x=Hc(s==null?void 0:s.data,T,n),w=!0)}P(this,Bt)&&(f=P(this,Bt),x=P(this,Oi),d=Date.now(),p="error");const g=h==="fetching",y=p==="pending",v=p==="error",S=y&&g;return{status:p,fetchStatus:h,isPending:y,isSuccess:p==="success",isError:v,isInitialLoading:S,isLoading:S,data:x,dataUpdatedAt:c.dataUpdatedAt,error:f,errorUpdatedAt:d,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!y,isLoadingError:v&&c.dataUpdatedAt===0,isPaused:h==="paused",isPlaceholderData:w,isRefetchError:v&&c.dataUpdatedAt!==0,isStale:Dd(t,n),refetch:this.refetch}}updateResult(t){const n=P(this,ze),r=this.createResult(P(this,oe),this.options);if(A(this,xr,P(this,oe).state),A(this,Ti,this.options),P(this,xr).data!==void 0&&A(this,Ri,P(this,oe)),Za(r,n))return;A(this,ze,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!P(this,ji).size)return!0;const l=new Set(a??P(this,ji));return this.options.throwOnError&&l.add("error"),Object.keys(P(this,ze)).some(u=>{const c=u;return P(this,ze)[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),W(this,X,Wv).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&W(this,X,Yc).call(this)}},Ge=new WeakMap,oe=new WeakMap,po=new WeakMap,ze=new WeakMap,xr=new WeakMap,Ti=new WeakMap,Bt=new WeakMap,mo=new WeakMap,Oi=new WeakMap,Ri=new WeakMap,Sr=new WeakMap,br=new WeakMap,Mn=new WeakMap,ji=new WeakMap,X=new WeakSet,gs=function(t){W(this,X,Jc).call(this);let n=P(this,oe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(wt)),n},Kc=function(){if(W(this,X,Gc).call(this),Ii||P(this,ze).isStale||!zc(this.options.staleTime))return;const n=Iv(P(this,ze).dataUpdatedAt,this.options.staleTime)+1;A(this,Sr,setTimeout(()=>{P(this,ze).isStale||this.updateResult()},n))},qc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,oe)):this.options.refetchInterval)??!1},Qc=function(t){W(this,X,Xc).call(this),A(this,Mn,t),!(Ii||this.options.enabled===!1||!zc(P(this,Mn))||P(this,Mn)===0)&&A(this,br,setInterval(()=>{(this.options.refetchIntervalInBackground||el.isFocused())&&W(this,X,gs).call(this)},P(this,Mn)))},Yc=function(){W(this,X,Kc).call(this),W(this,X,Qc).call(this,W(this,X,qc).call(this))},Gc=function(){P(this,Sr)&&(clearTimeout(P(this,Sr)),A(this,Sr,void 0))},Xc=function(){P(this,br)&&(clearInterval(P(this,br)),A(this,br,void 0))},Jc=function(){const t=P(this,Ge).getQueryCache().build(P(this,Ge),this.options);if(t===P(this,oe))return;const n=P(this,oe);A(this,oe,t),A(this,po,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Wv=function(t){Ee.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(P(this,ze))}),P(this,Ge).getQueryCache().notify({query:P(this,oe),type:"observerResultsUpdated"})})},Sy);function Db(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $p(e,t){return Db(e,t)||e.state.dataUpdatedAt>0&&Zc(e,t,t.refetchOnMount)}function Zc(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Dd(e,t)}return!1}function Bp(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Dd(e,n)}function Dd(e,t){return e.isStaleByTime(t.staleTime)}function Mb(e,t){return!Za(e.getCurrentResult(),t)}var An,nn,st,rn,cn,wa,ef,by,Ab=(by=class extends qi{constructor(n,r){super();U(this,cn);U(this,An);U(this,nn);U(this,st);U(this,rn);A(this,nn,void 0),A(this,An,n),this.setOptions(r),this.bindMethods(),W(this,cn,wa).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=P(this,An).defaultMutationOptions(n),Za(r,this.options)||P(this,An).getMutationCache().notify({type:"observerOptionsUpdated",mutation:P(this,st),observer:this}),(i=P(this,st))==null||i.setOptions(this.options),r!=null&&r.mutationKey&&this.options.mutationKey&&Dr(r.mutationKey)!==Dr(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var n;this.hasListeners()||(n=P(this,st))==null||n.removeObserver(this)}onMutationUpdate(n){W(this,cn,wa).call(this),W(this,cn,ef).call(this,n)}getCurrentResult(){return P(this,nn)}reset(){var n;(n=P(this,st))==null||n.removeObserver(this),A(this,st,void 0),W(this,cn,wa).call(this),W(this,cn,ef).call(this)}mutate(n,r){var i;return A(this,rn,r),(i=P(this,st))==null||i.removeObserver(this),A(this,st,P(this,An).getMutationCache().build(P(this,An),this.options)),P(this,st).addObserver(this),P(this,st).execute(n)}},An=new WeakMap,nn=new WeakMap,st=new WeakMap,rn=new WeakMap,cn=new WeakSet,wa=function(){var r;const n=((r=P(this,st))==null?void 0:r.state)??zv();A(this,nn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},ef=function(n){Ee.batch(()=>{var r,i,s,o,a,l,u,c;if(P(this,rn)&&this.hasListeners()){const f=P(this,nn).variables,d=P(this,nn).context;(n==null?void 0:n.type)==="success"?((i=(r=P(this,rn)).onSuccess)==null||i.call(r,n.data,f,d),(o=(s=P(this,rn)).onSettled)==null||o.call(s,n.data,null,f,d)):(n==null?void 0:n.type)==="error"&&((l=(a=P(this,rn)).onError)==null||l.call(a,n.error,f,d),(c=(u=P(this,rn)).onSettled)==null||c.call(u,void 0,n.error,f,d))}this.listeners.forEach(f=>{f(P(this,nn))})})},by),Hv=b.createContext(void 0),Md=e=>{const t=b.useContext(Hv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Fb=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.createElement(Hv.Provider,{value:e},t)),Kv=b.createContext(!1),_b=()=>b.useContext(Kv);Kv.Provider;function Ib(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Vb=b.createContext(Ib()),Ub=()=>b.useContext(Vb);function qv(e,t){return typeof e=="function"?e(...t):!!e}var $b=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},Bb=e=>{b.useEffect(()=>{e.clearReset()},[e])},zb=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&qv(n,[e.error,r]),Wb=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Hb=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Kb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qb(e,t,n){const r=Md(),i=_b(),s=Ub(),o=r.defaultQueryOptions(e);o._optimisticResults=i?"isRestoring":"optimistic",Wb(o),$b(o,s),Bb(s);const[a]=b.useState(()=>new t(r,o)),l=a.getOptimisticResult(o);if(b.useSyncExternalStore(b.useCallback(u=>{const c=i?()=>{}:a.subscribe(Ee.batchCalls(u));return a.updateResult(),c},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),b.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),Hb(o,l))throw Kb(o,a,s);if(zb({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw l.error;return o.notifyOnChangeProps?l:a.trackResult(l)}function Qb(e,t){return qb(e,Lb)}function Yb(e,t){const n=Md(),[r]=b.useState(()=>new Ab(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const i=b.useSyncExternalStore(b.useCallback(o=>r.subscribe(Ee.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=b.useCallback((o,a)=>{r.mutate(o,a).catch(Gb)},[r]);if(i.error&&qv(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function Gb(){}function Qv(e,t){return function(){return e.apply(t,arguments)}}const{toString:Xb}=Object.prototype,{getPrototypeOf:Ad}=Object,{iterator:Fl,toStringTag:Yv}=Symbol,_l=(e=>t=>{const n=Xb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Mt=e=>(e=e.toLowerCase(),t=>_l(t)===e),Il=e=>t=>typeof t===e,{isArray:Qi}=Array,Vi=Il("undefined");function So(e){return e!==null&&!Vi(e)&&e.constructor!==null&&!Vi(e.constructor)&&nt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Gv=Mt("ArrayBuffer");function Jb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Gv(e.buffer),t}const Zb=Il("string"),nt=Il("function"),Xv=Il("number"),bo=e=>e!==null&&typeof e=="object",eP=e=>e===!0||e===!1,xa=e=>{if(_l(e)!=="object")return!1;const t=Ad(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Yv in e)&&!(Fl in e)},tP=e=>{if(!bo(e)||So(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},nP=Mt("Date"),rP=Mt("File"),iP=Mt("Blob"),sP=Mt("FileList"),oP=e=>bo(e)&&nt(e.pipe),aP=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||nt(e.append)&&((t=_l(e))==="formdata"||t==="object"&&nt(e.toString)&&e.toString()==="[object FormData]"))},lP=Mt("URLSearchParams"),[uP,cP,fP,dP]=["ReadableStream","Request","Response","Headers"].map(Mt),hP=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Po(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Qi(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const pr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zv=e=>!Vi(e)&&e!==pr;function tf(){const{caseless:e,skipUndefined:t}=Zv(this)&&this||{},n={},r=(i,s)=>{const o=e&&Jv(n,s)||s;xa(n[o])&&xa(i)?n[o]=tf(n[o],i):xa(i)?n[o]=tf({},i):Qi(i)?n[o]=i.slice():(!t||!Vi(i))&&(n[o]=i)};for(let i=0,s=arguments.length;i(Po(t,(i,s)=>{n&&nt(i)?e[s]=Qv(i,n):e[s]=i},{allOwnKeys:r}),e),mP=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),gP=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},yP=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Ad(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},vP=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},wP=e=>{if(!e)return null;if(Qi(e))return e;let t=e.length;if(!Xv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},xP=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ad(Uint8Array)),SP=(e,t)=>{const r=(e&&e[Fl]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},bP=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},PP=Mt("HTMLFormElement"),CP=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),zp=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),kP=Mt("RegExp"),e1=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Po(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},EP=e=>{e1(e,(t,n)=>{if(nt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(nt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},TP=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Qi(e)?r(e):r(String(e).split(t)),n},OP=()=>{},RP=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function jP(e){return!!(e&&nt(e.append)&&e[Yv]==="FormData"&&e[Fl])}const NP=e=>{const t=new Array(10),n=(r,i)=>{if(bo(r)){if(t.indexOf(r)>=0)return;if(So(r))return r;if(!("toJSON"in r)){t[i]=r;const s=Qi(r)?[]:{};return Po(r,(o,a)=>{const l=n(o,i+1);!Vi(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},LP=Mt("AsyncFunction"),DP=e=>e&&(bo(e)||nt(e))&&nt(e.then)&&nt(e.catch),t1=((e,t)=>e?setImmediate:t?((n,r)=>(pr.addEventListener("message",({source:i,data:s})=>{i===pr&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),pr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",nt(pr.postMessage)),MP=typeof queueMicrotask<"u"?queueMicrotask.bind(pr):typeof process<"u"&&process.nextTick||t1,AP=e=>e!=null&&nt(e[Fl]),O={isArray:Qi,isArrayBuffer:Gv,isBuffer:So,isFormData:aP,isArrayBufferView:Jb,isString:Zb,isNumber:Xv,isBoolean:eP,isObject:bo,isPlainObject:xa,isEmptyObject:tP,isReadableStream:uP,isRequest:cP,isResponse:fP,isHeaders:dP,isUndefined:Vi,isDate:nP,isFile:rP,isBlob:iP,isRegExp:kP,isFunction:nt,isStream:oP,isURLSearchParams:lP,isTypedArray:xP,isFileList:sP,forEach:Po,merge:tf,extend:pP,trim:hP,stripBOM:mP,inherits:gP,toFlatObject:yP,kindOf:_l,kindOfTest:Mt,endsWith:vP,toArray:wP,forEachEntry:SP,matchAll:bP,isHTMLForm:PP,hasOwnProperty:zp,hasOwnProp:zp,reduceDescriptors:e1,freezeMethods:EP,toObjectSet:TP,toCamelCase:CP,noop:OP,toFiniteNumber:RP,findKey:Jv,global:pr,isContextDefined:Zv,isSpecCompliantForm:jP,toJSONObject:NP,isAsyncFn:LP,isThenable:DP,setImmediate:t1,asap:MP,isIterable:AP};function H(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}O.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.status}}});const n1=H.prototype,r1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{r1[e]={value:e}});Object.defineProperties(H,r1);Object.defineProperty(n1,"isAxiosError",{value:!0});H.from=(e,t,n,r,i,s)=>{const o=Object.create(n1);O.toFlatObject(e,o,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return H.call(o,a,l,n,r,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};const FP=null;function nf(e){return O.isPlainObject(e)||O.isArray(e)}function i1(e){return O.endsWith(e,"[]")?e.slice(0,-2):e}function Wp(e,t,n){return e?e.concat(t).map(function(i,s){return i=i1(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function _P(e){return O.isArray(e)&&!e.some(nf)}const IP=O.toFlatObject(O,{},null,function(t){return/^is[A-Z]/.test(t)});function Vl(e,t,n){if(!O.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=O.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,x){return!O.isUndefined(x[w])});const r=n.metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(t);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(O.isDate(p))return p.toISOString();if(O.isBoolean(p))return p.toString();if(!l&&O.isBlob(p))throw new H("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(p)||O.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,w,x){let g=p;if(p&&!x&&typeof p=="object"){if(O.endsWith(w,"{}"))w=r?w:w.slice(0,-2),p=JSON.stringify(p);else if(O.isArray(p)&&_P(p)||(O.isFileList(p)||O.endsWith(w,"[]"))&&(g=O.toArray(p)))return w=i1(w),g.forEach(function(v,S){!(O.isUndefined(v)||v===null)&&t.append(o===!0?Wp([w],S,s):o===null?w:w+"[]",u(v))}),!1}return nf(p)?!0:(t.append(Wp(x,w,s),u(p)),!1)}const f=[],d=Object.assign(IP,{defaultVisitor:c,convertValue:u,isVisitable:nf});function h(p,w){if(!O.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+w.join("."));f.push(p),O.forEach(p,function(g,y){(!(O.isUndefined(g)||g===null)&&i.call(t,g,O.isString(y)?y.trim():y,w,d))===!0&&h(g,w?w.concat(y):[y])}),f.pop()}}if(!O.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Hp(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Fd(e,t){this._pairs=[],e&&Vl(e,this,t)}const s1=Fd.prototype;s1.append=function(t,n){this._pairs.push([t,n])};s1.toString=function(t){const n=t?function(r){return t.call(this,r,Hp)}:Hp;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function VP(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function o1(e,t,n){if(!t)return e;const r=n&&n.encode||VP;O.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=O.isURLSearchParams(t)?t.toString():new Fd(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Kp{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){O.forEach(this.handlers,function(r){r!==null&&t(r)})}}const a1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},UP=typeof URLSearchParams<"u"?URLSearchParams:Fd,$P=typeof FormData<"u"?FormData:null,BP=typeof Blob<"u"?Blob:null,zP={isBrowser:!0,classes:{URLSearchParams:UP,FormData:$P,Blob:BP},protocols:["http","https","file","blob","url","data"]},_d=typeof window<"u"&&typeof document<"u",rf=typeof navigator=="object"&&navigator||void 0,WP=_d&&(!rf||["ReactNative","NativeScript","NS"].indexOf(rf.product)<0),HP=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",KP=_d&&window.location.href||"http://localhost",qP=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_d,hasStandardBrowserEnv:WP,hasStandardBrowserWebWorkerEnv:HP,navigator:rf,origin:KP},Symbol.toStringTag,{value:"Module"})),Ve={...qP,...zP};function QP(e,t){return Vl(e,new Ve.classes.URLSearchParams,{visitor:function(n,r,i,s){return Ve.isNode&&O.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function YP(e){return O.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function GP(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r=n.length;return o=!o&&O.isArray(i)?i.length:o,l?(O.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!O.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&O.isArray(i[o])&&(i[o]=GP(i[o])),!a)}if(O.isFormData(e)&&O.isFunction(e.entries)){const n={};return O.forEachEntry(e,(r,i)=>{t(YP(r),i,n,0)}),n}return null}function XP(e,t,n){if(O.isString(e))try{return(t||JSON.parse)(e),O.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Co={transitional:a1,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=O.isObject(t);if(s&&O.isHTMLForm(t)&&(t=new FormData(t)),O.isFormData(t))return i?JSON.stringify(l1(t)):t;if(O.isArrayBuffer(t)||O.isBuffer(t)||O.isStream(t)||O.isFile(t)||O.isBlob(t)||O.isReadableStream(t))return t;if(O.isArrayBufferView(t))return t.buffer;if(O.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return QP(t,this.formSerializer).toString();if((a=O.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Vl(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),XP(t)):t}],transformResponse:[function(t){const n=this.transitional||Co.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(O.isResponse(t)||O.isReadableStream(t))return t;if(t&&O.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?H.from(a,H.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ve.classes.FormData,Blob:Ve.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],e=>{Co.headers[e]={}});const JP=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ZP=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&JP[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},qp=Symbol("internals");function as(e){return e&&String(e).trim().toLowerCase()}function Sa(e){return e===!1||e==null?e:O.isArray(e)?e.map(Sa):String(e)}function eC(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const tC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ou(e,t,n,r,i){if(O.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!O.isString(t)){if(O.isString(r))return t.indexOf(r)!==-1;if(O.isRegExp(r))return r.test(t)}}function nC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function rC(e,t){const n=O.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let rt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,u){const c=as(l);if(!c)throw new Error("header name must be a non-empty string");const f=O.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=Sa(a))}const o=(a,l)=>O.forEach(a,(u,c)=>s(u,c,l));if(O.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(O.isString(t)&&(t=t.trim())&&!tC(t))o(ZP(t),n);else if(O.isObject(t)&&O.isIterable(t)){let a={},l,u;for(const c of t){if(!O.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?O.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=as(t),t){const r=O.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return eC(i);if(O.isFunction(n))return n.call(this,i,r);if(O.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=as(t),t){const r=O.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ou(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=as(o),o){const a=O.findKey(r,o);a&&(!n||Ou(r,r[a],a,n))&&(delete r[a],i=!0)}}return O.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||Ou(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return O.forEach(this,(i,s)=>{const o=O.findKey(r,s);if(o){n[o]=Sa(i),delete n[s];return}const a=t?nC(s):String(s).trim();a!==s&&delete n[s],n[a]=Sa(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return O.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&O.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[qp]=this[qp]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=as(o);r[a]||(rC(i,o),r[a]=!0)}return O.isArray(t)?t.forEach(s):s(t),this}};rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(rt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});O.freezeMethods(rt);function Ru(e,t){const n=this||Co,r=t||n,i=rt.from(r.headers);let s=r.data;return O.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function u1(e){return!!(e&&e.__CANCEL__)}function Yi(e,t,n){H.call(this,e??"canceled",H.ERR_CANCELED,t,n),this.name="CanceledError"}O.inherits(Yi,H,{__CANCEL__:!0});function c1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function iC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function sC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[s];o||(o=u),n[i]=l,r[i]=u;let f=s,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o{n=c,i=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?o(u,c):(i=u,s||(s=setTimeout(()=>{s=null,o(i)},r-f)))},()=>i&&o(i)]}const nl=(e,t,n=3)=>{let r=0;const i=sC(50,250);return oC(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,u=i(l),c=o<=a;r=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},n)},Qp=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Yp=e=>(...t)=>O.asap(()=>e(...t)),aC=Ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ve.origin),Ve.navigator&&/(msie|trident)/i.test(Ve.navigator.userAgent)):()=>!0,lC=Ve.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];O.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),O.isString(r)&&o.push("path="+r),O.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uC(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function f1(e,t,n){let r=!uC(t);return e&&(r||n==!1)?cC(e,t):t}const Gp=e=>e instanceof rt?{...e}:e;function Mr(e,t){t=t||{};const n={};function r(u,c,f,d){return O.isPlainObject(u)&&O.isPlainObject(c)?O.merge.call({caseless:d},u,c):O.isPlainObject(c)?O.merge({},c):O.isArray(c)?c.slice():c}function i(u,c,f,d){if(O.isUndefined(c)){if(!O.isUndefined(u))return r(void 0,u,f,d)}else return r(u,c,f,d)}function s(u,c){if(!O.isUndefined(c))return r(void 0,c)}function o(u,c){if(O.isUndefined(c)){if(!O.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,f)=>i(Gp(u),Gp(c),f,!0)};return O.forEach(Object.keys({...e,...t}),function(c){const f=l[c]||i,d=f(e[c],t[c],c);O.isUndefined(d)&&f!==a||(n[c]=d)}),n}const d1=e=>{const t=Mr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=rt.from(o),t.url=o1(f1(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),O.isFormData(n)){if(Ve.hasStandardBrowserEnv||Ve.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(O.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,f])=>{u.includes(c.toLowerCase())&&o.set(c,f)})}}if(Ve.hasStandardBrowserEnv&&(r&&O.isFunction(r)&&(r=r(t)),r||r!==!1&&aC(t.url))){const l=i&&s&&lC.read(s);l&&o.set(i,l)}return t},fC=typeof XMLHttpRequest<"u",dC=fC&&function(e){return new Promise(function(n,r){const i=d1(e);let s=i.data;const o=rt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=i,c,f,d,h,p;function w(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function g(){if(!x)return;const v=rt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:v,config:e,request:x};c1(function(T){n(T),w()},function(T){r(T),w()},C),x=null}"onloadend"in x?x.onloadend=g:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(g)},x.onabort=function(){x&&(r(new H("Request aborted",H.ECONNABORTED,e,x)),x=null)},x.onerror=function(S){const C=S&&S.message?S.message:"Network Error",E=new H(C,H.ERR_NETWORK,e,x);E.event=S||null,r(E),x=null},x.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||a1;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new H(S,C.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,e,x)),x=null},s===void 0&&o.setContentType(null),"setRequestHeader"in x&&O.forEach(o.toJSON(),function(S,C){x.setRequestHeader(C,S)}),O.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),a&&a!=="json"&&(x.responseType=i.responseType),u&&([d,p]=nl(u,!0),x.addEventListener("progress",d)),l&&x.upload&&([f,h]=nl(l),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=v=>{x&&(r(!v||v.type?new Yi(null,e,x):v),x.abort(),x=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const y=iC(i.url);if(y&&Ve.protocols.indexOf(y)===-1){r(new H("Unsupported protocol "+y+":",H.ERR_BAD_REQUEST,e));return}x.send(s||null)})},hC=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof H?c:new Yi(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,s(new H(`timeout ${t} of ms exceeded`,H.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>O.asap(a),l}},pC=function*(e,t){let n=e.byteLength;if(n{const i=mC(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){a(),l.close();return}let f=c.byteLength;if(n){let d=s+=f;n(d)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Jp=64*1024,{isFunction:Go}=O,yC=(({Request:e,Response:t})=>({Request:e,Response:t}))(O.global),{ReadableStream:Zp,TextEncoder:em}=O.global,tm=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vC=e=>{e=O.merge.call({skipUndefined:!0},yC,e);const{fetch:t,Request:n,Response:r}=e,i=t?Go(t):typeof fetch=="function",s=Go(n),o=Go(r);if(!i)return!1;const a=i&&Go(Zp),l=i&&(typeof em=="function"?(p=>w=>p.encode(w))(new em):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=s&&a&&tm(()=>{let p=!1;const w=new n(Ve.origin,{body:new Zp,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!w}),c=o&&a&&tm(()=>O.isReadableStream(new r("").body)),f={stream:c&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!f[p]&&(f[p]=(w,x)=>{let g=w&&w[p];if(g)return g.call(w);throw new H(`Response type '${p}' is not supported`,H.ERR_NOT_SUPPORT,x)})});const d=async p=>{if(p==null)return 0;if(O.isBlob(p))return p.size;if(O.isSpecCompliantForm(p))return(await new n(Ve.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(O.isArrayBufferView(p)||O.isArrayBuffer(p))return p.byteLength;if(O.isURLSearchParams(p)&&(p=p+""),O.isString(p))return(await l(p)).byteLength},h=async(p,w)=>{const x=O.toFiniteNumber(p.getContentLength());return x??d(w)};return async p=>{let{url:w,method:x,data:g,signal:y,cancelToken:v,timeout:S,onDownloadProgress:C,onUploadProgress:E,responseType:T,headers:R,withCredentials:F="same-origin",fetchOptions:V}=d1(p),G=t||fetch;T=T?(T+"").toLowerCase():"text";let te=hC([y,v&&v.toAbortSignal()],S),be=null;const ie=te&&te.unsubscribe&&(()=>{te.unsubscribe()});let k;try{if(E&&u&&x!=="get"&&x!=="head"&&(k=await h(R,g))!==0){let K=new n(w,{method:"POST",body:g,duplex:"half"}),J;if(O.isFormData(g)&&(J=K.headers.get("content-type"))&&R.setContentType(J),K.body){const[ce,Pe]=Qp(k,nl(Yp(E)));g=Xp(K.body,Jp,ce,Pe)}}O.isString(F)||(F=F?"include":"omit");const N=s&&"credentials"in n.prototype,_={...V,signal:te,method:x.toUpperCase(),headers:R.normalize().toJSON(),body:g,duplex:"half",credentials:N?F:void 0};be=s&&new n(w,_);let j=await(s?G(be,V):G(w,_));const M=c&&(T==="stream"||T==="response");if(c&&(C||M&&ie)){const K={};["status","statusText","headers"].forEach(vn=>{K[vn]=j[vn]});const J=O.toFiniteNumber(j.headers.get("content-length")),[ce,Pe]=C&&Qp(J,nl(Yp(C),!0))||[];j=new r(Xp(j.body,Jp,ce,()=>{Pe&&Pe(),ie&&ie()}),K)}T=T||"text";let D=await f[O.findKey(f,T)||"text"](j,p);return!M&&ie&&ie(),await new Promise((K,J)=>{c1(K,J,{data:D,headers:rt.from(j.headers),status:j.status,statusText:j.statusText,config:p,request:be})})}catch(N){throw ie&&ie(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new H("Network Error",H.ERR_NETWORK,p,be),{cause:N.cause||N}):H.from(N,N&&N.code,p,be)}}},wC=new Map,h1=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o=s.length,a=o,l,u,c=wC;for(;a--;)l=s[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:vC(t)),c=u;return u};h1();const sf={http:FP,xhr:dC,fetch:{get:h1}};O.forEach(sf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nm=e=>`- ${e}`,xC=e=>O.isFunction(e)||e===null||e===!1,p1={getAdapter:(e,t)=>{e=O.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since : -`+o.map(nm).join(` -`):" "+nm(o[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:sf};function ju(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Yi(null,e)}function rm(e){return ju(e),e.headers=rt.from(e.headers),e.data=Ru.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),p1.getAdapter(e.adapter||Co.adapter,e)(e).then(function(r){return ju(e),r.data=Ru.call(e,e.transformResponse,r),r.headers=rt.from(r.headers),r},function(r){return u1(r)||(ju(e),r&&r.response&&(r.response.data=Ru.call(e,e.transformResponse,r.response),r.response.headers=rt.from(r.response.headers))),Promise.reject(r)})}const m1="1.12.2",Ul={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ul[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const im={};Ul.transitional=function(t,n,r){function i(s,o){return"[Axios v"+m1+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new H(i(o," has been removed"+(n?" in "+n:"")),H.ERR_DEPRECATED);return n&&!im[o]&&(im[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};Ul.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function SC(e,t,n){if(typeof e!="object")throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new H("option "+s+" must be "+l,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H("Unknown option "+s,H.ERR_BAD_OPTION)}}const ba={assertOptions:SC,validators:Ul},Ft=ba.validators;let kr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Kp,response:new Kp}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Mr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&ba.assertOptions(r,{silentJSONParsing:Ft.transitional(Ft.boolean),forcedJSONParsing:Ft.transitional(Ft.boolean),clarifyTimeoutError:Ft.transitional(Ft.boolean)},!1),i!=null&&(O.isFunction(i)?n.paramsSerializer={serialize:i}:ba.assertOptions(i,{encode:Ft.function,serialize:Ft.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ba.assertOptions(n,{baseUrl:Ft.spelling("baseURL"),withXsrfToken:Ft.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&O.merge(s.common,s[n.method]);s&&O.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=rt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(l=l&&w.synchronous,a.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let c,f=0,d;if(!l){const p=[rm.bind(this),void 0];for(p.unshift(...a),p.push(...u),d=p.length,c=Promise.resolve(n);f{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Yi(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new g1(function(i){t=i}),cancel:t}}};function PC(e){return function(n){return e.apply(null,n)}}function CC(e){return O.isObject(e)&&e.isAxiosError===!0}const of={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(of).forEach(([e,t])=>{of[t]=e});function y1(e){const t=new kr(e),n=Qv(kr.prototype.request,t);return O.extend(n,kr.prototype,t,{allOwnKeys:!0}),O.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return y1(Mr(e,i))},n}const we=y1(Co);we.Axios=kr;we.CanceledError=Yi;we.CancelToken=bC;we.isCancel=u1;we.VERSION=m1;we.toFormData=Vl;we.AxiosError=H;we.Cancel=we.CanceledError;we.all=function(t){return Promise.all(t)};we.spread=PC;we.isAxiosError=CC;we.mergeConfig=Mr;we.AxiosHeaders=rt;we.formToJSON=e=>l1(O.isHTMLForm(e)?new FormData(e):e);we.getAdapter=p1.getAdapter;we.HttpStatusCode=of;we.default=we;const{Axios:HN,AxiosError:KN,CanceledError:qN,isCancel:QN,CancelToken:YN,VERSION:GN,all:XN,Cancel:JN,isAxiosError:ZN,spread:eL,toFormData:tL,AxiosHeaders:nL,HttpStatusCode:rL,formToJSON:iL,getAdapter:sL,mergeConfig:oL}=we;/** - * @remix-run/router v1.23.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Zs(){return Zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function v1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function EC(){return Math.random().toString(36).substr(2,8)}function om(e,t){return{usr:e.state,key:e.key,idx:t}}function af(e,t,n,r){return n===void 0&&(n=null),Zs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Gi(t):t,{state:n,key:t&&t.key||r||EC()})}function rl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Gi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function TC(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=In.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Zs({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){a=In.Pop;let x=c(),g=x==null?null:x-u;u=x,l&&l({action:a,location:w.location,delta:g})}function d(x,g){a=In.Push;let y=af(w.location,x,g);u=c()+1;let v=om(y,u),S=w.createHref(y);try{o.pushState(v,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(S)}s&&l&&l({action:a,location:w.location,delta:1})}function h(x,g){a=In.Replace;let y=af(w.location,x,g);u=c();let v=om(y,u),S=w.createHref(y);o.replaceState(v,"",S),s&&l&&l({action:a,location:w.location,delta:0})}function p(x){let g=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof x=="string"?x:rl(x);return y=y.replace(/ $/,"%20"),Se(g,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,g)}let w={get action(){return a},get location(){return e(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(sm,f),l=x,()=>{i.removeEventListener(sm,f),l=null}},createHref(x){return t(i,x)},createURL:p,encodeLocation(x){let g=p(x);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:h,go(x){return o.go(x)}};return w}var am;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(am||(am={}));function OC(e,t,n){return n===void 0&&(n="/"),RC(e,t,n)}function RC(e,t,n,r){let i=typeof t=="string"?Gi(t):t,s=Id(i.pathname||"/",n);if(s==null)return null;let o=w1(e);jC(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Se(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=qn([r,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(Se(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),w1(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:_C(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of x1(s.path))i(s,o,l)}),t}function x1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=x1(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function jC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:IC(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const NC=/^:[\w-]+$/,LC=3,DC=2,MC=1,AC=10,FC=-2,lm=e=>e==="*";function _C(e,t){let n=e.split("/"),r=n.length;return n.some(lm)&&(r+=FC),t&&(r+=DC),n.filter(i=>!lm(i)).reduce((i,s)=>i+(NC.test(s)?LC:s===""?MC:AC),r)}function IC(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function VC(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a{let{paramName:d,isOptional:h}=c;if(d==="*"){let w=a[f]||"";o=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const p=a[f];return h&&!p?u[d]=void 0:u[d]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function $C(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),v1(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function BC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return v1(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Id(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function zC(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Gi(e):e;return{pathname:n?n.startsWith("/")?n:WC(n,t):t,search:qC(r),hash:QC(i)}}function WC(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Nu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function HC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function S1(e,t){let n=HC(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function b1(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Gi(e):(i=Zs({},e),Se(!i.pathname||!i.pathname.includes("?"),Nu("?","pathname","search",i)),Se(!i.pathname||!i.pathname.includes("#"),Nu("#","pathname","hash",i)),Se(!i.search||!i.search.includes("#"),Nu("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}a=f>=0?t[f]:"/"}let l=zC(i,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const qn=e=>e.join("/").replace(/\/\/+/g,"/"),KC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),qC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,QC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function YC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const P1=["post","put","patch","delete"];new Set(P1);const GC=["get",...P1];new Set(GC);/** - * React Router v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function eo(){return eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),b.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=b1(u,JSON.parse(o),s,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:qn([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,s,e])}const tk=b.createContext(null);function nk(e){let t=b.useContext(nr).outlet;return t&&b.createElement(tk.Provider,{value:e},t)}function E1(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Ur),{matches:i}=b.useContext(nr),{pathname:s}=Bl(),o=JSON.stringify(S1(i,r.v7_relativeSplatPath));return b.useMemo(()=>b1(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function rk(e,t){return ik(e,t)}function ik(e,t,n,r){ko()||Se(!1);let{navigator:i}=b.useContext(Ur),{matches:s}=b.useContext(nr),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Bl(),c;if(t){var f;let x=typeof t=="string"?Gi(t):t;l==="/"||(f=x.pathname)!=null&&f.startsWith(l)||Se(!1),c=x}else c=u;let d=c.pathname||"/",h=d;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(x.length).join("/")}let p=OC(e,{pathname:h}),w=uk(p&&p.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:qn([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:qn([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n,r);return t&&w?b.createElement($l.Provider,{value:{location:eo({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:In.Pop}},w):w}function sk(){let e=hk(),t=YC(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:i},n):null,null)}const ok=b.createElement(sk,null);class ak extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(nr.Provider,{value:this.props.routeContext},b.createElement(C1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lk(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(Vd);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(nr.Provider,{value:t},r)}function uk(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let c=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||Se(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,d)=>{let h,p=!1,w=null,x=null;n&&(h=a&&f.route.id?a[f.route.id]:void 0,w=f.route.errorElement||ok,l&&(u<0&&d===0?(mk("route-fallback"),p=!0,x=null):u===d&&(p=!0,x=f.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,d+1)),y=()=>{let v;return h?v=w:p?v=x:f.route.Component?v=b.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=c,b.createElement(lk,{match:f,routeContext:{outlet:c,matches:g,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?b.createElement(ak,{location:n.location,revalidation:n.revalidation,component:w,error:h,children:y(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):y()},null)}var T1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(T1||{}),O1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(O1||{});function ck(e){let t=b.useContext(Vd);return t||Se(!1),t}function fk(e){let t=b.useContext(XC);return t||Se(!1),t}function dk(e){let t=b.useContext(nr);return t||Se(!1),t}function R1(e){let t=dk(),n=t.matches[t.matches.length-1];return n.route.id||Se(!1),n.route.id}function hk(){var e;let t=b.useContext(C1),n=fk(),r=R1();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function pk(){let{router:e}=ck(T1.UseNavigateStable),t=R1(O1.UseNavigateStable),n=b.useRef(!1);return k1(()=>{n.current=!0}),b.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,eo({fromRouteId:t},s)))},[e,t])}const um={};function mk(e,t,n){um[e]||(um[e]=!0)}function gk(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function yk(e){return nk(e.context)}function lf(e){Se(!1)}function vk(e){let{basename:t="/",children:n=null,location:r,navigationType:i=In.Pop,navigator:s,static:o=!1,future:a}=e;ko()&&Se(!1);let l=t.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:s,static:o,future:eo({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Gi(r));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:p="default"}=r,w=b.useMemo(()=>{let x=Id(c,l);return x==null?null:{location:{pathname:x,search:f,hash:d,state:h,key:p},navigationType:i}},[l,c,f,d,h,p,i]);return w==null?null:b.createElement(Ur.Provider,{value:u},b.createElement($l.Provider,{children:n,value:w}))}function wk(e){let{children:t,location:n}=e;return rk(uf(t),n)}new Promise(()=>{});function uf(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(r,i)=>{if(!b.isValidElement(r))return;let s=[...t,i];if(r.type===b.Fragment){n.push.apply(n,uf(r.props.children,s));return}r.type!==lf&&Se(!1),!r.props.index||!r.props.children||Se(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=uf(r.props.children,s)),n.push(o)}),n}/** - * React Router DOM v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function cf(){return cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Sk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bk(e,t){return e.button===0&&(!t||t==="_self")&&!Sk(e)}const Pk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ck="6";try{window.__reactRouterVersion=Ck}catch{}const kk="startTransition",cm=s2[kk];function Ek(e){let{basename:t,children:n,future:r,window:i}=e,s=b.useRef();s.current==null&&(s.current=kC({window:i,v5Compat:!0}));let o=s.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=b.useCallback(f=>{u&&cm?cm(()=>l(f)):l(f)},[l,u]);return b.useLayoutEffect(()=>o.listen(c),[o,c]),b.useEffect(()=>gk(r),[r]),b.createElement(vk,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const Tk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ok=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,j1=b.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,d=xk(t,Pk),{basename:h}=b.useContext(Ur),p,w=!1;if(typeof u=="string"&&Ok.test(u)&&(p=u,Tk))try{let v=new URL(window.location.href),S=u.startsWith("//")?new URL(v.protocol+u):new URL(u),C=Id(S.pathname,h);S.origin===v.origin&&C!=null?u=C+S.search+S.hash:w=!0}catch{}let x=JC(u,{relative:i}),g=Rk(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:f});function y(v){r&&r(v),v.defaultPrevented||g(v)}return b.createElement("a",cf({},d,{href:p||x,onClick:w||s?r:y,ref:n,target:l}))});var fm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(fm||(fm={}));var dm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dm||(dm={}));function Rk(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=ZC(),u=Bl(),c=E1(e,{relative:o});return b.useCallback(f=>{if(bk(f,n)){f.preventDefault();let d=r!==void 0?r:rl(u)===rl(c);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,c,r,i,n,e,s,o,a])}const hm=["admiring","adoring","affectionate","agitated","amazing","angry","awesome","beautiful","blissful","bold","boring","brave","busy","charming","clever","cool","compassionate","competent","condescending","confident","cranky","crazy","dazzling","determined","distracted","dreamy","eager","ecstatic","elastic","elated","elegant","eloquent","epic","exciting","fervent","festive","flamboyant","focused","friendly","frosty","funny","gallant","gifted","goofy","gracious","great","happy","hardcore","heuristic","hopeful","hungry","infallible","inspiring","interesting","intelligent","jolly","jovial","keen","kind","laughing","loving","lucid","magical","mystifying","modest","musing","naughty","nervous","nice","nifty","nostalgic","objective","optimistic","peaceful","pedantic","pensive","practical","priceless","quirky","quizzical","recursing","relaxed","reverent","romantic","sad","serene","sharp","silly","sleepy","stoic","strange","stupefied","suspicious","sweet","tender","thirsty","trusting","unruffled","upbeat","vibrant","vigilant","vigorous","wizardly","wonderful","xenodochial","youthful","zealous","zen"],pm=["albattani","allen","almeida","antonelli","agnesi","archimedes","ardinghelli","aryabhata","austin","babbage","banach","banzai","bardeen","bartik","bassi","beaver","bell","benz","bhabha","bhaskara","black","blackburn","blackwell","bohr","booth","borg","bose","bouman","boyd","brahmagupta","brattain","brown","buck","burnell","cannon","carson","cartwright","carver","cerf","chandrasekhar","chaplygin","chatelet","chatterjee","chebyshev","cohen","chaum","clarke","colden","cori","cray","curran","curie","darwin","davinci","dewdney","dhawan","diffie","dijkstra","dirac","driscoll","dubinsky","easley","edison","einstein","elbakyan","elgamal","elion","ellis","engelbart","euclid","euler","faraday","feistel","fermat","fermi","feynman","franklin","gagarin","galileo","galois","ganguly","gates","gauss","germain","goldberg","goldstine","goldwasser","golick","goodall","gould","greider","grothendieck","haibt","hamilton","haslett","hawking","hellman","heisenberg","hermann","herschel","hertz","heyrovsky","hodgkin","hofstadter","hoover","hopper","hugle","hypatia","ishizaka","jackson","jang","jemison","jennings","jepsen","johnson","joliot","jones","kalam","kapitsa","kare","keldysh","keller","kepler","khayyam","khorana","kilby","kirch","knuth","kowalevski","lalande","lamarr","lamport","leakey","leavitt","lederberg","lehmann","lewin","lichterman","liskov","lovelace","lumiere","mahavira","margulis","matsumoto","maxwell","mayer","mccarthy","mcclintock","mclaren","mclean","mcnulty","mendel","mendeleev","meitner","meninsky","merkle","mestorf","mirzakhani","montalcini","moore","morse","murdock","moser","napier","nash","neumann","newton","niel","nightingale","nobel","noether","northcutt","noyce","panini","pare","pascal","pasteur","payne","perlman","pike","poincare","poitras","proskuriakova","ptolemy","raman","ramanujan","ride","ritchie","rhodes","robinson","roentgen","rosalind","rubin","saha","sammet","sanderson","satoshi","shamir","shannon","shaw","shirley","shockley","shtern","sinoussi","snyder","solomon","spence","stonebraker","sutherland","swanson","swartz","swirles","taussig","tereshkova","tesla","tharp","thompson","torvalds","tu","turing","varahamihira","vaughan","visvesvaraya","volhard","villani","wescoff","wilbur","wiles","williams","williamson","wilson","wing","wozniak","wright","wu","yalow","yonath","zhukovsky"],N1=(e="",t="-")=>{const n=`${hm[Math.floor(Math.random()*hm.length)]??""}${t}${pm[Math.floor(Math.random()*pm.length)]??""}`;return n===`boring${t}wozniak`?N1(e,t):e.length>0?`${e}${t}${n}`:n};function jk(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},gm=(e,t,n)=>{e.loadNamespaces(t,L1(e,n))},ym=(e,t,n,r)=>{Er(n)&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,L1(e,r))},Nk=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,s=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=t.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(r,e)&&(!i||o(s,e)))},Lk=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(ff("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}):Nk(e,t,n)},Er=e=>typeof e=="string",Dk=e=>typeof e=="object"&&e!==null,Mk=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ak={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Fk=e=>Ak[e],_k=e=>e.replace(Mk,Fk);let df={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:_k};const Ik=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};df={...df,...e}},Vk=()=>df;let D1;const Uk=e=>{D1=e},$k=()=>D1,Bk={type:"3rdParty",init(e){Ik(e.options.react),Uk(e)}},zk=b.createContext();class Wk{constructor(){Eh(this,"getUsedNamespaces",()=>Object.keys(this.usedNamespaces));this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}}const Hk=(e,t)=>{const n=b.useRef();return b.useEffect(()=>{n.current=e},[e,t]),n.current},M1=(e,t,n,r)=>e.getFixedT(t,n,r),Kk=(e,t,n,r)=>b.useCallback(M1(e,t,n,r),[e,t,n,r]),$r=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=b.useContext(zk)||{},s=n||r||$k();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new Wk),!s){ff("You will need to pass in an i18next instance by using initReactI18next");const S=(E,T)=>Er(T)?T:Dk(T)&&Er(T.defaultValue)?T.defaultValue:Array.isArray(E)?E[E.length-1]:E,C=[S,{},!1];return C.t=S,C.i18n={},C.ready=!1,C}s.options.react&&s.options.react.wait!==void 0&&ff("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...Vk(),...s.options.react,...t},{useSuspense:a,keyPrefix:l}=o;let u=i||s.options&&s.options.defaultNS;u=Er(u)?[u]:u||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(u);const c=(s.isInitialized||s.initializedStoreOnce)&&u.every(S=>Lk(S,s,o)),f=Kk(s,t.lng||null,o.nsMode==="fallback"?u:u[0],l),d=()=>f,h=()=>M1(s,t.lng||null,o.nsMode==="fallback"?u:u[0],l),[p,w]=b.useState(d);let x=u.join();t.lng&&(x=`${t.lng}${x}`);const g=Hk(x),y=b.useRef(!0);b.useEffect(()=>{const{bindI18n:S,bindI18nStore:C}=o;y.current=!0,!c&&!a&&(t.lng?ym(s,t.lng,u,()=>{y.current&&w(h)}):gm(s,u,()=>{y.current&&w(h)})),c&&g&&g!==x&&y.current&&w(h);const E=()=>{y.current&&w(h)};return S&&s&&s.on(S,E),C&&s&&s.store.on(C,E),()=>{y.current=!1,S&&s&&S.split(" ").forEach(T=>s.off(T,E)),C&&s&&C.split(" ").forEach(T=>s.store.off(T,E))}},[s,x]),b.useEffect(()=>{y.current&&c&&w(d)},[s,l,c]);const v=[p,s,c];if(v.t=p,v.i18n=s,v.ready=c,c||!c&&!a)return v;throw new Promise(S=>{t.lng?ym(s,t.lng,u,()=>S()):gm(s,u,()=>S())})};/*! js-cookie v3.0.5 | MIT */function Xo(e){for(var t=1;t"u")){o=Xo({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},a=0;a{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Qk},Gk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Xk=/\/\*[^]*?\*\/| +/g,vm=/\n+/g,Tn=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?Tn(o,s):s+"{"+Tn(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=Tn(o,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Tn.p?Tn.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Jt={},A1=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+A1(e[n]);return t}return e},Jk=(e,t,n,r,i)=>{let s=A1(e),o=Jt[s]||(Jt[s]=(l=>{let u=0,c=11;for(;u>>0;return"go"+c})(s));if(!Jt[o]){let l=s!==e?e:(u=>{let c,f,d=[{}];for(;c=Gk.exec(u.replace(Xk,""));)c[4]?d.shift():c[3]?(f=c[3].replace(vm," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][c[1]]=c[2].replace(vm," ").trim();return d[0]})(e);Jt[o]=Tn(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&Jt.g?Jt.g:null;return n&&(Jt.g=Jt[o]),((l,u,c,f)=>{f?u.data=u.data.replace(f,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(Jt[o],t,r,a),o},Zk=(e,t,n)=>e.reduce((r,i,s)=>{let o=t[s];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":Tn(a,""):a===!1?"":a}return r+i+(o??"")},"");function zl(e){let t=this||{},n=e.call?e(t.p):e;return Jk(n.unshift?n.raw?Zk(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Yk(t.target),t.g,t.o,t.k)}let F1,pf,mf;zl.bind({g:1});let mn=zl.bind({k:1});function eE(e,t,n,r){Tn.p=t,F1=e,pf=n,mf=r}function rr(e,t){let n=this||{};return function(){let r=arguments;function i(s,o){let a=Object.assign({},s),l=a.className||i.className;n.p=Object.assign({theme:pf&&pf()},a),n.o=/ *go\d+/.test(l),a.className=zl.apply(n,r)+(l?" "+l:"");let u=e;return e[0]&&(u=a.as||e,delete a.as),mf&&u[0]&&mf(a),F1(u,a)}return i}}var tE=e=>typeof e=="function",il=(e,t)=>tE(e)?e(t):e,nE=(()=>{let e=0;return()=>(++e).toString()})(),_1=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),rE=20,Ud="default",I1=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return I1(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:i}=t;return{...e,toasts:e.toasts.map(o=>o.id===i||i===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},Pa=[],V1={toasts:[],pausedAt:void 0,settings:{toastLimit:rE}},Kt={},U1=(e,t=Ud)=>{Kt[t]=I1(Kt[t]||V1,e),Pa.forEach(([n,r])=>{n===t&&r(Kt[t])})},$1=e=>Object.keys(Kt).forEach(t=>U1(e,t)),iE=e=>Object.keys(Kt).find(t=>Kt[t].toasts.some(n=>n.id===e)),Wl=(e=Ud)=>t=>{U1(t,e)},sE={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},oE=(e={},t=Ud)=>{let[n,r]=b.useState(Kt[t]||V1),i=b.useRef(Kt[t]);b.useEffect(()=>(i.current!==Kt[t]&&r(Kt[t]),Pa.push([t,r]),()=>{let o=Pa.findIndex(([a])=>a===t);o>-1&&Pa.splice(o,1)}),[t]);let s=n.toasts.map(o=>{var a,l,u;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((a=e[o.type])==null?void 0:a.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((l=e[o.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||sE[o.type],style:{...e.style,...(u=e[o.type])==null?void 0:u.style,...o.style}}});return{...n,toasts:s}},aE=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||nE()}),Eo=e=>(t,n)=>{let r=aE(t,e,n);return Wl(r.toasterId||iE(r.id))({type:2,toast:r}),r.id},Q=(e,t)=>Eo("blank")(e,t);Q.error=Eo("error");Q.success=Eo("success");Q.loading=Eo("loading");Q.custom=Eo("custom");Q.dismiss=(e,t)=>{let n={type:3,toastId:e};t?Wl(t)(n):$1(n)};Q.dismissAll=e=>Q.dismiss(void 0,e);Q.remove=(e,t)=>{let n={type:4,toastId:e};t?Wl(t)(n):$1(n)};Q.removeAll=e=>Q.remove(void 0,e);Q.promise=(e,t,n)=>{let r=Q.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let s=t.success?il(t.success,i):void 0;return s?Q.success(s,{id:r,...n,...n==null?void 0:n.success}):Q.dismiss(r),i}).catch(i=>{let s=t.error?il(t.error,i):void 0;s?Q.error(s,{id:r,...n,...n==null?void 0:n.error}):Q.dismiss(r)}),e};var lE=1e3,uE=(e,t="default")=>{let{toasts:n,pausedAt:r}=oE(e,t),i=b.useRef(new Map).current,s=b.useCallback((f,d=lE)=>{if(i.has(f))return;let h=setTimeout(()=>{i.delete(f),o({type:4,toastId:f})},d);i.set(f,h)},[]);b.useEffect(()=>{if(r)return;let f=Date.now(),d=n.map(h=>{if(h.duration===1/0)return;let p=(h.duration||0)+h.pauseDuration-(f-h.createdAt);if(p<0){h.visible&&Q.dismiss(h.id);return}return setTimeout(()=>Q.dismiss(h.id,t),p)});return()=>{d.forEach(h=>h&&clearTimeout(h))}},[n,r,t]);let o=b.useCallback(Wl(t),[t]),a=b.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=b.useCallback((f,d)=>{o({type:1,toast:{id:f,height:d}})},[o]),u=b.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),c=b.useCallback((f,d)=>{let{reverseOrder:h=!1,gutter:p=8,defaultPosition:w}=d||{},x=n.filter(v=>(v.position||w)===(f.position||w)&&v.height),g=x.findIndex(v=>v.id===f.id),y=x.filter((v,S)=>Sv.visible).slice(...h?[y+1]:[0,y]).reduce((v,S)=>v+(S.height||0)+p,0)},[n]);return b.useEffect(()=>{n.forEach(f=>{if(f.dismissed)s(f.id,f.removeDelay);else{let d=i.get(f.id);d&&(clearTimeout(d),i.delete(f.id))}})},[n,s]),{toasts:n,handlers:{updateHeight:l,startPause:a,endPause:u,calculateOffset:c}}},cE=mn` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,fE=mn` -from { - transform: scale(0); - opacity: 0; -} -to { - transform: scale(1); - opacity: 1; -}`,dE=mn` -from { - transform: scale(0) rotate(90deg); - opacity: 0; -} -to { - transform: scale(1) rotate(90deg); - opacity: 1; -}`,hE=rr("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${e=>e.primary||"#ff4b4b"}; - position: relative; - transform: rotate(45deg); - - animation: ${cE} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - - &:after, - &:before { - content: ''; - animation: ${fE} 0.15s ease-out forwards; - animation-delay: 150ms; - position: absolute; - border-radius: 3px; - opacity: 0; - background: ${e=>e.secondary||"#fff"}; - bottom: 9px; - left: 4px; - height: 2px; - width: 12px; - } - - &:before { - animation: ${dE} 0.15s ease-out forwards; - animation-delay: 180ms; - transform: rotate(90deg); - } -`,pE=mn` - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -`,mE=rr("div")` - width: 12px; - height: 12px; - box-sizing: border-box; - border: 2px solid; - border-radius: 100%; - border-color: ${e=>e.secondary||"#e0e0e0"}; - border-right-color: ${e=>e.primary||"#616161"}; - animation: ${pE} 1s linear infinite; -`,gE=mn` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,yE=mn` -0% { - height: 0; - width: 0; - opacity: 0; -} -40% { - height: 0; - width: 6px; - opacity: 1; -} -100% { - opacity: 1; - height: 10px; -}`,vE=rr("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${e=>e.primary||"#61d345"}; - position: relative; - transform: rotate(45deg); - - animation: ${gE} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - &:after { - content: ''; - box-sizing: border-box; - animation: ${yE} 0.2s ease-out forwards; - opacity: 0; - animation-delay: 200ms; - position: absolute; - border-right: 2px solid; - border-bottom: 2px solid; - border-color: ${e=>e.secondary||"#fff"}; - bottom: 6px; - left: 6px; - height: 10px; - width: 6px; - } -`,wE=rr("div")` - position: absolute; -`,xE=rr("div")` - position: relative; - display: flex; - justify-content: center; - align-items: center; - min-width: 20px; - min-height: 20px; -`,SE=mn` -from { - transform: scale(0.6); - opacity: 0.4; -} -to { - transform: scale(1); - opacity: 1; -}`,bE=rr("div")` - position: relative; - transform: scale(0.6); - opacity: 0.4; - min-width: 20px; - animation: ${SE} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; -`,PE=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?b.createElement(bE,null,t):t:n==="blank"?null:b.createElement(xE,null,b.createElement(mE,{...r}),n!=="loading"&&b.createElement(wE,null,n==="error"?b.createElement(hE,{...r}):b.createElement(vE,{...r})))},CE=e=>` -0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} -100% {transform: translate3d(0,0,0) scale(1); opacity:1;} -`,kE=e=>` -0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} -100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} -`,EE="0%{opacity:0;} 100%{opacity:1;}",TE="0%{opacity:1;} 100%{opacity:0;}",OE=rr("div")` - display: flex; - align-items: center; - background: #fff; - color: #363636; - line-height: 1.3; - will-change: transform; - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); - max-width: 350px; - pointer-events: auto; - padding: 8px 10px; - border-radius: 8px; -`,RE=rr("div")` - display: flex; - justify-content: center; - margin: 4px 10px; - color: inherit; - flex: 1 1 auto; - white-space: pre-line; -`,jE=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=_1()?[EE,TE]:[CE(n),kE(n)];return{animation:t?`${mn(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${mn(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},NE=b.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?jE(e.position||t||"top-center",e.visible):{opacity:0},s=b.createElement(PE,{toast:e}),o=b.createElement(RE,{...e.ariaProps},il(e.message,e));return b.createElement(OE,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:s,message:o}):b.createElement(b.Fragment,null,s,o))});eE(b.createElement);var LE=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let s=b.useCallback(o=>{if(o){let a=()=>{let l=o.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return b.createElement("div",{ref:s,className:t,style:n},i)},DE=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:_1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},ME=zl` - z-index: 9999; - > * { - pointer-events: auto; - } -`,Jo=16,AE=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,toasterId:s,containerStyle:o,containerClassName:a})=>{let{toasts:l,handlers:u}=uE(n,s);return b.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:Jo,left:Jo,right:Jo,bottom:Jo,pointerEvents:"none",...o},className:a,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(c=>{let f=c.position||t,d=u.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),h=DE(f,d);return b.createElement(LE,{id:c.id,key:c.id,onHeightUpdate:u.updateHeight,className:c.visible?ME:"",style:h},c.type==="custom"?il(c.message,c):i?i(c):b.createElement(NE,{toast:c,position:f}))}))},FE=Q;function re(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ar(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const B1=6048e5,_E=864e5,Zo=43200,wm=1440;let IE={};function To(){return IE}function Fr(e,t){var a,l,u,c;const n=To(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=re(e),s=i.getDay(),o=(s=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function xm(e){const t=re(e);return t.setHours(0,0,0,0),t}function ol(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function VE(e,t){const n=xm(e),r=xm(t),i=n.getTime()-ol(n),s=r.getTime()-ol(r);return Math.round((i-s)/_E)}function UE(e){const t=z1(e),n=Ar(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),sl(n)}function Ca(e,t){const n=re(e),r=re(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function $E(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function BE(e){if(!$E(e)&&typeof e!="number")return!1;const t=re(e);return!isNaN(Number(t))}function zE(e,t){const n=re(e),r=re(t),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function WE(e){return e?Math[e]:Math.trunc}function HE(e,t){return re(e).getTime()-re(t).getTime()}function KE(e){const t=re(e);return t.setHours(23,59,59,999),t}function qE(e){const t=re(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function QE(e){const t=re(e);return+KE(t)==+qE(t)}function YE(e,t){const n=re(e),r=re(t),i=Ca(n,r),s=Math.abs(zE(n,r));let o;if(s<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);let a=Ca(n,r)===-i;QE(re(e))&&s===1&&Ca(e,r)===1&&(a=!1),o=i*(s-Number(a))}return o===0?0:o}function GE(e,t,n){const r=HE(e,t)/1e3;return WE(n==null?void 0:n.roundingMethod)(r)}function XE(e){const t=re(e),n=Ar(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const JE={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ZE=(e,t,n)=>{let r;const i=JE[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function gi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const e3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},t3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},n3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},r3={date:gi({formats:e3,defaultWidth:"full"}),time:gi({formats:t3,defaultWidth:"full"}),dateTime:gi({formats:n3,defaultWidth:"full"})},i3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},s3=(e,t,n,r)=>i3[e];function Wt(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[o]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const o3={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a3={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},l3={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},u3={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},c3={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},f3={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},d3=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},h3={ordinalNumber:d3,era:Wt({values:o3,defaultWidth:"wide"}),quarter:Wt({values:a3,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Wt({values:l3,defaultWidth:"wide"}),day:Wt({values:u3,defaultWidth:"wide"}),dayPeriod:Wt({values:c3,defaultWidth:"wide",formattingValues:f3,defaultFormattingWidth:"wide"})};function Ht(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?m3(a,f=>f.test(o)):p3(a,f=>f.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function p3(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function m3(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let o=e.valueCallback?e.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const g3=/^(\d+)(th|st|nd|rd)?/i,y3=/\d+/i,v3={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},w3={any:[/^b/i,/^(a|c)/i]},x3={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},S3={any:[/1/i,/2/i,/3/i,/4/i]},b3={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},P3={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},C3={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},k3={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},E3={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},T3={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},O3={ordinalNumber:W1({matchPattern:g3,parsePattern:y3,valueCallback:e=>parseInt(e,10)}),era:Ht({matchPatterns:v3,defaultMatchWidth:"wide",parsePatterns:w3,defaultParseWidth:"any"}),quarter:Ht({matchPatterns:x3,defaultMatchWidth:"wide",parsePatterns:S3,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ht({matchPatterns:b3,defaultMatchWidth:"wide",parsePatterns:P3,defaultParseWidth:"any"}),day:Ht({matchPatterns:C3,defaultMatchWidth:"wide",parsePatterns:k3,defaultParseWidth:"any"}),dayPeriod:Ht({matchPatterns:E3,defaultMatchWidth:"any",parsePatterns:T3,defaultParseWidth:"any"})},H1={code:"en-US",formatDistance:ZE,formatLong:r3,formatRelative:s3,localize:h3,match:O3,options:{weekStartsOn:0,firstWeekContainsDate:1}};function R3(e){const t=re(e);return VE(t,XE(t))+1}function j3(e){const t=re(e),n=sl(t).getTime()-UE(t).getTime();return Math.round(n/B1)+1}function K1(e,t){var c,f,d,h;const n=re(e),r=n.getFullYear(),i=To(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(d=i.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,o=Ar(e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=Fr(o,t),l=Ar(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=Fr(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function N3(e,t){var a,l,u,c;const n=To(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=K1(e,t),s=Ar(e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Fr(s,t)}function L3(e,t){const n=re(e),r=Fr(n,t).getTime()-N3(n,t).getTime();return Math.round(r/B1)+1}function Z(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const xn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Z(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Z(n+1,2)},d(e,t){return Z(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Z(e.getHours()%12||12,t.length)},H(e,t){return Z(e.getHours(),t.length)},m(e,t){return Z(e.getMinutes(),t.length)},s(e,t){return Z(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.floor(r*Math.pow(10,n-3));return Z(i,t.length)}},Wr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},D3={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return xn.y(e,t)},Y:function(e,t,n,r){const i=K1(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Z(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Z(s,t.length)},R:function(e,t){const n=z1(e);return Z(n,t.length)},u:function(e,t){const n=e.getFullYear();return Z(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Z(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Z(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return xn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Z(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=L3(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Z(i,t.length)},I:function(e,t,n){const r=j3(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Z(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):xn.d(e,t)},D:function(e,t,n){const r=R3(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Z(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Z(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Z(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Z(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Wr.noon:r===0?i=Wr.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Wr.evening:r>=12?i=Wr.afternoon:r>=4?i=Wr.morning:i=Wr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return xn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):xn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Z(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Z(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):xn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):xn.s(e,t)},S:function(e,t){return xn.S(e,t)},X:function(e,t,n,r){const s=(r._originalDate||e).getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return bm(s);case"XXXX":case"XX":return lr(s);case"XXXXX":case"XXX":default:return lr(s,":")}},x:function(e,t,n,r){const s=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return bm(s);case"xxxx":case"xx":return lr(s);case"xxxxx":case"xxx":default:return lr(s,":")}},O:function(e,t,n,r){const s=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Sm(s,":");case"OOOO":default:return"GMT"+lr(s,":")}},z:function(e,t,n,r){const s=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Sm(s,":");case"zzzz":default:return"GMT"+lr(s,":")}},t:function(e,t,n,r){const i=r._originalDate||e,s=Math.floor(i.getTime()/1e3);return Z(s,t.length)},T:function(e,t,n,r){const s=(r._originalDate||e).getTime();return Z(s,t.length)}};function Sm(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Z(s,2)}function bm(e,t){return e%60===0?(e>0?"-":"+")+Z(Math.abs(e)/60,2):lr(e,t)}function lr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Z(Math.floor(r/60),2),s=Z(r%60,2);return n+i+t+s}const Pm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},q1=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},M3=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Pm(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Pm(r,t)).replace("{{time}}",q1(i,t))},A3={p:q1,P:M3},F3=/^D+$/,_3=/^Y+$/,I3=["D","DD","YY","YYYY"];function V3(e){return F3.test(e)}function U3(e){return _3.test(e)}function Cm(e,t,n){const r=$3(e,t,n);if(console.warn(r),I3.includes(e))throw new RangeError(r)}function $3(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const B3=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,z3=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,W3=/^'([^]*?)'?$/,H3=/''/g,K3=/[a-zA-Z]/;function q3(e,t,n){var c,f,d,h;const r=To(),i=r.locale??H1,s=r.firstWeekContainsDate??((f=(c=r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,o=r.weekStartsOn??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,a=re(e);if(!BE(a))throw new RangeError("Invalid time value");const l={firstWeekContainsDate:s,weekStartsOn:o,locale:i,_originalDate:a};return t.match(z3).map(function(p){const w=p[0];if(w==="p"||w==="P"){const x=A3[w];return x(p,i.formatLong)}return p}).join("").match(B3).map(function(p){if(p==="''")return"'";const w=p[0];if(w==="'")return Q3(p);const x=D3[w];if(x)return U3(p)&&Cm(p,t,String(e)),V3(p)&&Cm(p,t,String(e)),x(a,p,i.localize,l);if(w.match(K3))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return p}).join("")}function Q3(e){const t=e.match(W3);return t?t[1].replace(H3,"'"):e}function Y3(e,t,n){const r=To(),i=(n==null?void 0:n.locale)??r.locale??H1,s=2520,o=Ca(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:o});let l,u;o>0?(l=re(t),u=re(e)):(l=re(e),u=re(t));const c=GE(u,l),f=(ol(u)-ol(l))/1e3,d=Math.round((c-f)/60);let h;if(d<2)return n!=null&&n.includeSeconds?c<5?i.formatDistance("lessThanXSeconds",5,a):c<10?i.formatDistance("lessThanXSeconds",10,a):c<20?i.formatDistance("lessThanXSeconds",20,a):c<40?i.formatDistance("halfAMinute",0,a):c<60?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",1,a):d===0?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",d,a);if(d<45)return i.formatDistance("xMinutes",d,a);if(d<90)return i.formatDistance("aboutXHours",1,a);if(d{let r;const i=J3[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},eT={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},tT={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},nT={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},rT={date:gi({formats:eT,defaultWidth:"full"}),time:gi({formats:tT,defaultWidth:"full"}),dateTime:gi({formats:nT,defaultWidth:"full"})};function km(e,t,n){const r="eeee p";return X3(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const iT={lastWeek:km,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:km,other:"PP p"},sT=(e,t,n,r)=>{const i=iT[e];return typeof i=="function"?i(t,n,r):i},oT={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},aT={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},lT={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},uT={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},cT={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},fT={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},dT=(e,t)=>{const n=Number(e);switch(t==null?void 0:t.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},hT={ordinalNumber:dT,era:Wt({values:oT,defaultWidth:"wide"}),quarter:Wt({values:aT,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Wt({values:lT,defaultWidth:"wide"}),day:Wt({values:uT,defaultWidth:"wide"}),dayPeriod:Wt({values:cT,defaultWidth:"wide",formattingValues:fT,defaultFormattingWidth:"wide"})},pT=/^(第\s*)?\d+(日|时|分|秒)?/i,mT=/\d+/i,gT={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},yT={any:[/^(前)/i,/^(公元)/i]},vT={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},wT={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},xT={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},ST={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},bT={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},PT={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},CT={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},kT={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},ET={ordinalNumber:W1({matchPattern:pT,parsePattern:mT,valueCallback:e=>parseInt(e,10)}),era:Ht({matchPatterns:gT,defaultMatchWidth:"wide",parsePatterns:yT,defaultParseWidth:"any"}),quarter:Ht({matchPatterns:vT,defaultMatchWidth:"wide",parsePatterns:wT,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ht({matchPatterns:xT,defaultMatchWidth:"wide",parsePatterns:ST,defaultParseWidth:"any"}),day:Ht({matchPatterns:bT,defaultMatchWidth:"wide",parsePatterns:PT,defaultParseWidth:"any"}),dayPeriod:Ht({matchPatterns:CT,defaultMatchWidth:"any",parsePatterns:kT,defaultParseWidth:"any"})},TT={code:"zh-CN",formatDistance:Z3,formatLong:rT,formatRelative:sT,localize:hT,match:ET,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Q1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t${e.text}`,className:"w-full h-[60vh] border-0",sandbox:"allow-popups allow-popups-to-escape-sandbox",title:"Email Content"})})]})}function jT(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"})})}function NT(e){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M20.25 20.25v-4.5m0 4.5h-4.5m4.5 0L15 15M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15m11.25-6L15 9"})})}function LT({emails:e,isLoading:t,isFetching:n,onDelete:r,isDeleting:i,onRefresh:s,selectedIds:o,setSelectedIds:a,isAddressCreated:l,onSelectEmail:u,showViewPasswordButton:c,onShowPassword:f,selectedEmail:d,onCloseDetail:h,onExpand:p}){const{t:w}=$r(),x=v=>{a(S=>S.includes(v)?S.filter(C=>C!==v):[...S,v])},g=()=>{e.length!==0&&(o.length===e.length?a([]):a(e.map(v=>v.id)))},y=()=>d?m.jsx(X1,{email:d,onClose:h}):l?t?m.jsxs("div",{className:"w-full items-center h-full flex-col justify-center flex",children:[m.jsx(Em,{}),m.jsx("p",{className:"text-zinc-400 mt-6",children:w("Waiting for emails...")})]}):e.length===0?m.jsxs("div",{className:"w-full items-center h-full flex-col justify-center flex",children:[m.jsx(Em,{}),m.jsx("p",{className:"text-zinc-400 mt-6",children:w("Waiting for emails...")})]}):e.map(v=>{var S,C;return m.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[m.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-neutral-300 bg-neutral-100 data-[state=checked]:border-neutral-900 data-[state=checked]:bg-neutral-600 data-[state=checked]:text-neutral-100 dark:border-neutral-700 dark:bg-neutral-800 dark:data-[state=checked]:border-neutral-300 dark:data-[state=checked]:bg-neutral-300",checked:o.includes(v.id),onChange:()=>x(v.id)}),m.jsxs("div",{onClick:()=>u(v),className:"cursor-pointer flex-1 flex flex-col items-start gap-2 rounded-lg border border-zinc-600 p-3 text-left text-sm transition-all hover:bg-zinc-700",children:[m.jsxs("div",{className:"flex w-full flex-col gap-1",children:[m.jsxs("div",{className:"flex items-center",children:[m.jsx("div",{className:"flex items-center gap-2",children:m.jsxs("div",{className:"font-semibold",children:[((S=v.from)==null?void 0:S.name)||v.messageFrom," ",((C=v.from)==null?void 0:C.address)&&`(${v.from.address})`]})}),m.jsx("div",{className:"ml-auto text-xs",children:G3(new Date(v.date||v.createdAt),{addSuffix:!0,locale:TT})})]}),m.jsx("div",{className:"text-xs font-medium",children:v.subject})]}),m.jsx("div",{className:"line-clamp-2 text-xs text-zinc-300 font-normal w-full",children:(v.text||v.html||"").substring(0,300)})]})]},v.id)}):m.jsxs("div",{className:"w-full items-center h-full flex-col justify-center flex",children:[m.jsx(OT,{}),m.jsx("p",{className:"text-zinc-400 mt-6",children:"请先创建一个临时邮箱地址"})]});return m.jsxs("div",{className:"rounded-md border border-cyan-50/20 text-white",children:[m.jsxs("div",{className:"w-full rounded-t-md p-2 flex items-center bg-zinc-800 text-zinc-200 gap-2",children:[m.jsxs("div",{className:"flex items-center justify-start gap-2 font-bold",children:[m.jsx(Y1,{className:"size-6"}),w("INBOX"),l&&e.length>0&&!d&&m.jsx("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-zinc-600 rounded-full",children:e.length}),d&&m.jsxs("button",{onClick:h,className:"flex items-center gap-1 text-sm font-semibold text-cyan-400 hover:text-cyan-300 ml-2",children:[m.jsx(jT,{}),"返回邮件列表"]})]}),m.jsx("div",{className:"ml-auto flex items-center gap-2",children:d?m.jsxs(m.Fragment,{children:[m.jsx("button",{onClick:p,className:"p-1 rounded text-cyan-400 hover:text-cyan-300",title:"放大",children:m.jsx(NT,{className:"w-5 h-5"})}),m.jsx("button",{onClick:()=>r([d.id]),disabled:i,className:"p-1 rounded text-red-500 disabled:text-gray-500 hover:text-red-400",title:"删除",children:m.jsx(Tm,{className:"w-5 h-5"})})]}):m.jsxs(m.Fragment,{children:[c&&m.jsx("button",{className:"p-1 rounded text-cyan-400 hover:text-cyan-300",title:"查看密码",onClick:f,children:m.jsx(gf,{className:"w-5 h-5"})}),l&&e.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded bg-zinc-700 border-zinc-600 text-cyan-600 focus:ring-cyan-500",title:"全选",checked:o.length===e.length&&e.length>0,onChange:g}),m.jsx("button",{onClick:()=>r(o),disabled:o.length===0||i,className:"p-1 rounded text-red-500 disabled:text-gray-500 hover:text-red-400",title:"删除选中",children:m.jsx(Tm,{className:"w-5 h-5"})})]}),m.jsx("button",{className:"p-1 rounded",title:"refresh",onClick:s,disabled:!l||n,children:m.jsx(G1,{className:to("size-6",l&&"animate-spin")})})]})})]}),m.jsx("div",{className:to("flex flex-col flex-1 overflow-y-auto p-2",!d&&"grids h-[488px]"),children:y()})]})}function DT(e){return m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[m.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),m.jsx("path",{d:"M5 12l5 5l10 -10"})]})}function MT(e){return m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[m.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),m.jsx("path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z"}),m.jsx("path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1"})]})}function Om({text:e,className:t}){const[n,r]=b.useState(!1),{t:i}=$r(),s=async()=>{try{await navigator.clipboard.writeText(e),r(!0),Q.success(i("Copied to clipboard"))}catch(o){console.error("复制文本失败: ",o)}};return b.useEffect(()=>{if(n){const o=setTimeout(()=>{r(!1)},2e3);return()=>clearTimeout(o)}},[n]),m.jsx("button",{onClick:s,className:to("focus:outline-none focus-visible:outline-none",t),"aria-label":"Copy to clipboard",children:n?m.jsx(DT,{className:"h-5 w-5 text-green-500"}):m.jsx(MT,{className:"h-5 w-5 text-gray-400"})})}const $d="/api";async function AT(e){const t=await fetch(`${$d}/emails`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e})});if(!t.ok)throw new Error("Network response was not ok");return t.json()}async function FT(e){const t=await fetch(`${$d}/delete-emails`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:e})});if(!t.ok)throw new Error("Failed to delete emails");return t.json()}async function _T(e){const t=await fetch(`${$d}/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})});if(!t.ok){const n=await t.json();throw new Error(n.message||"Login failed")}return t.json()}const J1=b.createContext(null),IT=()=>{const e=b.useContext(J1);if(!e)throw new Error("useConfig 必须在 ConfigProvider 内部使用");return e};function VT(){const e="abcdefghijklmnopqrstuvwxyz.";return e.charAt(Math.floor(Math.random()*e.length))}function UT(e,t){let n="";for(let r=0;r{function n(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),{windowSize:e,isMobile:typeof(e==null?void 0:e.width)=="number"&&(e==null?void 0:e.width)<768,isDesktop:typeof(e==null?void 0:e.width)=="number"&&(e==null?void 0:e.width)>=768}}const Bd=b.createContext({});function Hl(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Kl=b.createContext(null),zd=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class BT extends b.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function zT({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),i=b.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=b.useContext(zd);return b.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:u}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return s&&(c.nonce=s),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${l}px !important; - left: ${u}px !important; - } - `),()=>{document.head.removeChild(c)}},[t]),m.jsx(BT,{isPresent:t,childRef:r,sizeRef:i,children:b.cloneElement(e,{ref:r})})}const WT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Hl(HT),l=b.useId(),u=b.useCallback(f=>{a.set(f,!0);for(const d of a.values())if(!d)return;r&&r()},[a,r]),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:u,register:f=>(a.set(f,!1),()=>a.delete(f))}),s?[Math.random(),u]:[n,u]);return b.useMemo(()=>{a.forEach((f,d)=>a.set(d,!1))},[n]),b.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=m.jsx(zT,{isPresent:n,children:e})),m.jsx(Kl.Provider,{value:c,children:e})};function HT(){return new Map}function Z1(e=!0){const t=b.useContext(Kl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=b.useId();b.useEffect(()=>{e&&i(s)},[e]);const o=b.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ea=e=>e.key||"";function Rm(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Wd=typeof window<"u",Hd=Wd?b.useLayoutEffect:b.useEffect,KT=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1})=>{const[a,l]=Z1(o),u=b.useMemo(()=>Rm(e),[e]),c=o&&!a?[]:u.map(ea),f=b.useRef(!0),d=b.useRef(u),h=Hl(()=>new Map),[p,w]=b.useState(u),[x,g]=b.useState(u);Hd(()=>{f.current=!1,d.current=u;for(let S=0;S{const C=ea(S),E=o&&!a?!1:u===x||c.includes(C),T=()=>{if(h.has(C))h.set(C,!0);else return;let R=!0;h.forEach(F=>{F||(R=!1)}),R&&(v==null||v(),g(d.current),o&&(l==null||l()),r&&r())};return m.jsx(WT,{isPresent:E,initial:!f.current||n?void 0:!1,custom:E?void 0:t,presenceAffectsLayout:i,mode:s,onExitComplete:E?void 0:T,children:S},C)})})},ut=e=>e;let ew=ut;function Kd(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ui=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ln=e=>e*1e3,un=e=>e/1e3,qT={useManualTiming:!1};function QT(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,f=!1)=>{const h=f&&r?t:n;return c&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,i&&(i=!1,l.process(u))}};return l}const ta=["read","resolveKeyframes","update","preRender","render","postRender"],YT=40;function tw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=ta.reduce((g,y)=>(g[y]=QT(s),g),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:d}=o,h=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,YT),1),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:ta.reduce((g,y)=>{const v=o[y];return g[y]=(S,C=!1,E=!1)=>(n||p(),v.schedule(S,C,E)),g},{}),cancel:g=>{for(let y=0;yjm[e].some(n=>!!t[n])};function GT(e){for(const t in e)$i[t]={...$i[t],...e[t]}}const XT=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function al(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||XT.has(e)}let rw=e=>!al(e);function JT(e){e&&(rw=t=>t.startsWith("on")?!al(t):e(t))}try{JT(require("@emotion/is-prop-valid").default)}catch{}function ZT(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(rw(i)||n===!0&&al(i)||!t&&!al(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function eO(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const ql=b.createContext({});function no(e){return typeof e=="string"||Array.isArray(e)}function Ql(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const qd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Qd=["initial",...qd];function Yl(e){return Ql(e.animate)||Qd.some(t=>no(e[t]))}function iw(e){return!!(Yl(e)||e.variants)}function tO(e,t){if(Yl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||no(n)?n:void 0,animate:no(r)?r:void 0}}return e.inherit!==!1?t:{}}function nO(e){const{initial:t,animate:n}=tO(e,b.useContext(ql));return b.useMemo(()=>({initial:t,animate:n}),[Nm(t),Nm(n)])}function Nm(e){return Array.isArray(e)?e.join(" "):e}const rO=Symbol.for("motionComponentSymbol");function si(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function iO(e,t,n){return b.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):si(n)&&(n.current=r))},[t])}const Yd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sO="framerAppearId",sw="data-"+Yd(sO),{schedule:Gd}=tw(queueMicrotask,!1),ow=b.createContext({});function oO(e,t,n,r,i){var s,o;const{visualElement:a}=b.useContext(ql),l=b.useContext(nw),u=b.useContext(Kl),c=b.useContext(zd).reducedMotion,f=b.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const d=f.current,h=b.useContext(ow);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&aO(f.current,n,i,h);const p=b.useRef(!1);b.useInsertionEffect(()=>{d&&p.current&&d.update(n,u)});const w=n[sw],x=b.useRef(!!w&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,w))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,w)));return Hd(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Gd.render(d.render),x.current&&d.animationState&&d.animationState.animateChanges())}),b.useEffect(()=>{d&&(!x.current&&d.animationState&&d.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)===null||g===void 0||g.call(window,w)}),x.current=!1))}),d}function aO(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:aw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&si(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function aw(e){if(e)return e.options.allowProjection!==!1?e.projection:aw(e.parent)}function lO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var s,o;e&>(e);function a(u,c){let f;const d={...b.useContext(zd),...u,layoutId:uO(u)},{isStatic:h}=d,p=nO(u),w=r(u,h);if(!h&&Wd){cO();const x=fO(d);f=x.MeasureLayout,p.visualElement=oO(i,w,d,t,x.ProjectionNode)}return m.jsxs(ql.Provider,{value:p,children:[f&&p.visualElement?m.jsx(f,{visualElement:p.visualElement,...d}):null,n(i,u,iO(w,p.visualElement,c),w,h,p.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(o=(s=i.displayName)!==null&&s!==void 0?s:i.name)!==null&&o!==void 0?o:""})`}`;const l=b.forwardRef(a);return l[rO]=i,l}function uO({layoutId:e}){const t=b.useContext(Bd).id;return t&&e!==void 0?t+"-"+e:e}function cO(e,t){b.useContext(nw).strict}function fO(e){const{drag:t,layout:n}=$i;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const dO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Xd(e){return typeof e!="string"||e.includes("-")?!1:!!(dO.indexOf(e)>-1||/[A-Z]/u.test(e))}function Lm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Jd(e,t,n,r){if(typeof t=="function"){const[i,s]=Lm(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Lm(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const yf=e=>Array.isArray(e),hO=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),pO=e=>yf(e)?e[e.length-1]||0:e,Ue=e=>!!(e&&e.getVelocity);function ka(e){const t=Ue(e)?e.get():e;return hO(t)?t.toValue():t}function mO({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:gO(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const lw=e=>(t,n)=>{const r=b.useContext(ql),i=b.useContext(Kl),s=()=>mO(e,t,r,i);return n?s():Hl(s)};function gO(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=ka(s[d]);let{initial:o,animate:a}=e;const l=Yl(e),u=iw(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?a:o;if(f&&typeof f!="boolean"&&!Ql(f)){const d=Array.isArray(f)?f:[f];for(let h=0;ht=>typeof t=="string"&&t.startsWith(e),cw=uw("--"),yO=uw("var(--"),Zd=e=>yO(e)?vO.test(e.split("/*")[0].trim()):!1,vO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,fw=(e,t)=>t&&typeof e=="number"?t.transform(e):e,gn=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},ro={...Ji,transform:e=>gn(0,1,e)},na={...Ji,default:1},Oo=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bn=Oo("deg"),Gt=Oo("%"),$=Oo("px"),wO=Oo("vh"),xO=Oo("vw"),Dm={...Gt,parse:e=>Gt.parse(e)/100,transform:e=>Gt.transform(e*100)},SO={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,radius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,backgroundPositionX:$,backgroundPositionY:$},bO={rotate:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scale:na,scaleX:na,scaleY:na,scaleZ:na,skew:bn,skewX:bn,skewY:bn,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:ro,originX:Dm,originY:Dm,originZ:$},Mm={...Ji,transform:Math.round},eh={...SO,...bO,zIndex:Mm,size:$,fillOpacity:ro,strokeOpacity:ro,numOctaves:Mm},PO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},CO=Xi.length;function kO(e,t,n){let r="",i=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}}),dw=()=>({...rh(),attrs:{}}),ih=e=>typeof e=="string"&&e.toLowerCase()==="svg";function hw(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const pw=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function mw(e,t,n,r){hw(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(pw.has(i)?i:Yd(i),t.attrs[i])}const ll={};function jO(e){Object.assign(ll,e)}function gw(e,{layout:t,layoutId:n}){return Br.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ll[e]||e==="opacity")}function sh(e,t,n){var r;const{style:i}=e,s={};for(const o in i)(Ue(i[o])||t.style&&Ue(t.style[o])||gw(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return s}function yw(e,t,n){const r=sh(e,t,n);for(const i in e)if(Ue(e[i])||Ue(t[i])){const s=Xi.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function NO(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const Fm=["x","y","width","height","cx","cy","r"],LO={useVisualState:lw({scrapeMotionValuesFromProps:yw,createRenderState:dw,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(Br.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a{NO(n,r),le.render(()=>{nh(r,i,ih(n.tagName),e.transformTemplate),mw(n,r)})})}})},DO={useVisualState:lw({scrapeMotionValuesFromProps:sh,createRenderState:rh})};function vw(e,t,n){for(const r in t)!Ue(t[r])&&!gw(r,n)&&(e[r]=t[r])}function MO({transformTemplate:e},t){return b.useMemo(()=>{const n=rh();return th(n,t,e),Object.assign({},n.vars,n.style)},[t])}function AO(e,t){const n=e.style||{},r={};return vw(r,n,e),Object.assign(r,MO(e,t)),r}function FO(e,t){const n={},r=AO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function _O(e,t,n,r){const i=b.useMemo(()=>{const s=dw();return nh(s,t,ih(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};vw(s,e.style,e),i.style={...s,...i.style}}return i}function IO(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Xd(n)?_O:FO)(r,s,o,n),u=ZT(r,typeof n=="string",e),c=n!==b.Fragment?{...u,...l,ref:i}:{},{children:f}=r,d=b.useMemo(()=>Ue(f)?f.get():f,[f]);return b.createElement(n,{...c,children:d})}}function VO(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Xd(r)?LO:DO,preloadedFeatures:e,useRender:IO(i),createVisualElement:t,Component:r};return lO(o)}}function ww(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rwindow.ScrollTimeline!==void 0);class $O{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(UO()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class BO extends $O{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function oh(e,t){return e?e[t]||e.default||e:void 0}const vf=2e4;function xw(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=vf?1/0:t}function ah(e){return typeof e=="function"}function _m(e,t){e.timeline=t,e.onfinish=null}const lh=e=>Array.isArray(e)&&typeof e[0]=="number",zO={linearEasing:void 0};function WO(e,t){const n=Kd(e);return()=>{var r;return(r=zO[t])!==null&&r!==void 0?r:n()}}const ul=WO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Sw=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s`cubic-bezier(${e}, ${t}, ${n}, ${r})`,wf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ys([0,.65,.55,1]),circOut:ys([.55,0,1,.45]),backIn:ys([.31,.01,.66,-.59]),backOut:ys([.33,1.53,.69,.99])};function Pw(e,t){if(e)return typeof e=="function"&&ul()?Sw(e,t):lh(e)?ys(e):Array.isArray(e)?e.map(n=>Pw(n,t)||wf.easeOut):wf[e]}const Tt={x:!1,y:!1};function Cw(){return Tt.x||Tt.y}function HO(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const s=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function kw(e,t){const n=HO(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Im(e){return t=>{t.pointerType==="touch"||Cw()||e(t)}}function KO(e,t,n={}){const[r,i,s]=kw(e,n),o=Im(a=>{const{target:l}=a,u=t(a);if(typeof u!="function"||!l)return;const c=Im(f=>{u(f),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,i)});return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Ew=(e,t)=>t?e===t?!0:Ew(e,t.parentElement):!1,uh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,qO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function QO(e){return qO.has(e.tagName)||e.tabIndex!==-1}const vs=new WeakSet;function Vm(e){return t=>{t.key==="Enter"&&e(t)}}function Du(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const YO=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vm(()=>{if(vs.has(n))return;Du(n,"down");const i=Vm(()=>{Du(n,"up")}),s=()=>Du(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Um(e){return uh(e)&&!Cw()}function GO(e,t,n={}){const[r,i,s]=kw(e,n),o=a=>{const l=a.currentTarget;if(!Um(a)||vs.has(l))return;vs.add(l);const u=t(a),c=(h,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),!(!Um(h)||!vs.has(l))&&(vs.delete(l),typeof u=="function"&&u(h,{success:p}))},f=h=>{c(h,n.useGlobalTarget||Ew(l,h.target))},d=h=>{c(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{!QO(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a.addEventListener("focus",u=>YO(u,i),i)}),s}function XO(e){return e==="x"||e==="y"?Tt[e]?null:(Tt[e]=!0,()=>{Tt[e]=!1}):Tt.x||Tt.y?null:(Tt.x=Tt.y=!0,()=>{Tt.x=Tt.y=!1})}const Tw=new Set(["width","height","top","left","right","bottom",...Xi]);let Ea;function JO(){Ea=void 0}const Xt={now:()=>(Ea===void 0&&Xt.set(Le.isProcessing||qT.useManualTiming?Le.timestamp:performance.now()),Ea),set:e=>{Ea=e,queueMicrotask(JO)}};function ch(e,t){e.indexOf(t)===-1&&e.push(t)}function fh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class dh{constructor(){this.subscriptions=[]}add(t){return ch(this.subscriptions,t),()=>fh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s!isNaN(parseFloat(e));class eR{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Xt.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Xt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ZO(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new dh);const r=this.events[t].add(n);return t==="change"?()=>{r(),le.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Xt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$m)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$m);return Ow(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function io(e,t){return new eR(e,t)}function tR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,io(n))}function hh(e,t){const n=Gl(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=pO(s[o]);tR(e,o,a)}}function nR(e){return!!(Ue(e)&&e.add)}function xf(e,t){const n=e.getValue("willChange");if(nR(n))return n.add(t)}function Rw(e){return e.props[sw]}const jw=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rR=1e-7,iR=12;function sR(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=jw(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>rR&&++asR(s,0,1,e,n);return s=>s===0||s===1?s:jw(i(s),t,r)}const Nw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Lw=e=>t=>1-e(1-t),Dw=Ro(.33,1.53,.69,.99),ph=Lw(Dw),Mw=Nw(ph),Aw=e=>(e*=2)<1?.5*ph(e):.5*(2-Math.pow(2,-10*(e-1))),mh=e=>1-Math.sin(Math.acos(e)),Fw=Lw(mh),_w=Nw(mh),Iw=e=>/^0[^.\s]+$/u.test(e);function oR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Iw(e):!0}const js=e=>Math.round(e*1e5)/1e5,gh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function aR(e){return e==null}const lR=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yh=(e,t)=>n=>!!(typeof n=="string"&&lR.test(n)&&n.startsWith(e)||t&&!aR(n)&&Object.prototype.hasOwnProperty.call(n,t)),Vw=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(gh);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},uR=e=>gn(0,255,e),Mu={...Ji,transform:e=>Math.round(uR(e))},mr={test:yh("rgb","red"),parse:Vw("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mu.transform(e)+", "+Mu.transform(t)+", "+Mu.transform(n)+", "+js(ro.transform(r))+")"};function cR(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Sf={test:yh("#"),parse:cR,transform:mr.transform},oi={test:yh("hsl","hue"),parse:Vw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Gt.transform(js(t))+", "+Gt.transform(js(n))+", "+js(ro.transform(r))+")"},_e={test:e=>mr.test(e)||Sf.test(e)||oi.test(e),parse:e=>mr.test(e)?mr.parse(e):oi.test(e)?oi.parse(e):Sf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mr.transform(e):oi.transform(e)},fR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function dR(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gh))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(fR))===null||n===void 0?void 0:n.length)||0)>0}const Uw="number",$w="color",hR="var",pR="var(",Bm="${}",mR=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function so(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(mR,l=>(_e.test(l)?(r.color.push(s),i.push($w),n.push(_e.parse(l))):l.startsWith(pR)?(r.var.push(s),i.push(hR),n.push(l)):(r.number.push(s),i.push(Uw),n.push(parseFloat(l))),++s,Bm)).split(Bm);return{values:n,split:a,indexes:r,types:i}}function Bw(e){return so(e).values}function zw(e){const{split:t,types:n}=so(e),r=t.length;return i=>{let s="";for(let o=0;otypeof e=="number"?0:e;function yR(e){const t=Bw(e);return zw(e)(t.map(gR))}const Xn={test:dR,parse:Bw,createTransformer:zw,getAnimatableNone:yR},vR=new Set(["brightness","contrast","saturate","opacity"]);function wR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(gh)||[];if(!r)return e;const i=n.replace(r,"");let s=vR.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const xR=/\b([a-z-]*)\(.*?\)/gu,bf={...Xn,getAnimatableNone:e=>{const t=e.match(xR);return t?t.map(wR).join(" "):e}},SR={...eh,color:_e,backgroundColor:_e,outlineColor:_e,fill:_e,stroke:_e,borderColor:_e,borderTopColor:_e,borderRightColor:_e,borderBottomColor:_e,borderLeftColor:_e,filter:bf,WebkitFilter:bf},vh=e=>SR[e];function Ww(e,t){let n=vh(e);return n!==bf&&(n=Xn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const bR=new Set(["auto","none","0"]);function PR(e,t,n){let r=0,i;for(;re===Ji||e===$,Wm=(e,t)=>parseFloat(e.split(", ")[t]),Hm=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Wm(i[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Wm(s[1],e):0}},CR=new Set(["x","y","z"]),kR=Xi.filter(e=>!CR.has(e));function ER(e){const t=[];return kR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Bi={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Hm(4,13),y:Hm(5,14)};Bi.translateX=Bi.x;Bi.translateY=Bi.y;const Tr=new Set;let Pf=!1,Cf=!1;function Hw(){if(Cf){const e=Array.from(Tr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=ER(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Cf=!1,Pf=!1,Tr.forEach(e=>e.complete()),Tr.clear()}function Kw(){Tr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Cf=!0)})}function TR(){Kw(),Hw()}class wh{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Tr.add(this),Pf||(Pf=!0,le.read(Kw),le.resolveKeyframes(Hw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RR(e){const t=OR.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Qw(e,t,n=1){const[r,i]=RR(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return qw(o)?parseFloat(o):o}return Zd(i)?Qw(i,t,n+1):i}const Yw=e=>t=>t.test(e),jR={test:e=>e==="auto",parse:e=>e},Gw=[Ji,$,Gt,bn,xO,wO,jR],Km=e=>Gw.find(Yw(e));class Xw extends wh{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const qm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Xn.test(e)||e==="0")&&!e.startsWith("url("));function NR(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Xl(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(DR),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const MR=40;class Jw{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Xt.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>MR?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&TR(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Xt.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!LR(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Xl(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const de=(e,t,n)=>e+(t-e)*n;function Au(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function AR({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Au(l,a,e+1/3),s=Au(l,a,e),o=Au(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function cl(e,t){return n=>n>0?t:e}const Fu=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},FR=[Sf,mr,oi],_R=e=>FR.find(t=>t.test(e));function Qm(e){const t=_R(e);if(!t)return!1;let n=t.parse(e);return t===oi&&(n=AR(n)),n}const Ym=(e,t)=>{const n=Qm(e),r=Qm(t);if(!n||!r)return cl(e,t);const i={...n};return s=>(i.red=Fu(n.red,r.red,s),i.green=Fu(n.green,r.green,s),i.blue=Fu(n.blue,r.blue,s),i.alpha=de(n.alpha,r.alpha,s),mr.transform(i))},IR=(e,t)=>n=>t(e(n)),jo=(...e)=>e.reduce(IR),kf=new Set(["none","hidden"]);function VR(e,t){return kf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function UR(e,t){return n=>de(e,t,n)}function xh(e){return typeof e=="number"?UR:typeof e=="string"?Zd(e)?cl:_e.test(e)?Ym:zR:Array.isArray(e)?Zw:typeof e=="object"?_e.test(e)?Ym:$R:cl}function Zw(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>xh(s)(s,t[o]));return s=>{for(let o=0;o{for(const s in r)n[s]=r[s](i);return n}}function BR(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s{const n=Xn.createTransformer(t),r=so(e),i=so(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?kf.has(e)&&!i.values.length||kf.has(t)&&!r.values.length?VR(e,t):jo(Zw(BR(r,i),i.values),n):cl(e,t)};function ex(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?de(e,t,n):xh(e)(e,t)}const WR=5;function tx(e,t,n){const r=Math.max(t-WR,0);return Ow(n-e(r),t-r)}const me={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},_u=.001;function HR({duration:e=me.duration,bounce:t=me.bounce,velocity:n=me.velocity,mass:r=me.mass}){let i,s,o=1-t;o=gn(me.minDamping,me.maxDamping,o),e=gn(me.minDuration,me.maxDuration,un(e)),o<1?(i=u=>{const c=u*o,f=c*e,d=c-n,h=Ef(u,o),p=Math.exp(-f);return _u-d/h*p},s=u=>{const f=u*o*e,d=f*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-f),w=Ef(Math.pow(u,2),o);return(-i(u)+_u>0?-1:1)*((d-h)*p)/w}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-_u+c*f},s=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=qR(i,s,a);if(e=ln(e),isNaN(l))return{stiffness:me.stiffness,damping:me.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const KR=12;function qR(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function GR(e){let t={velocity:me.velocity,stiffness:me.stiffness,damping:me.damping,mass:me.mass,isResolvedFromDuration:!1,...e};if(!Gm(e,YR)&&Gm(e,QR))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*gn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:me.mass,stiffness:i,damping:s}}else{const n=HR(e);t={...t,...n,mass:me.mass},t.isResolvedFromDuration=!0}return t}function nx(e=me.visualDuration,t=me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:h}=GR({...n,velocity:-un(n.velocity||0)}),p=d||0,w=u/(2*Math.sqrt(l*c)),x=o-s,g=un(Math.sqrt(l/c)),y=Math.abs(x)<5;r||(r=y?me.restSpeed.granular:me.restSpeed.default),i||(i=y?me.restDelta.granular:me.restDelta.default);let v;if(w<1){const C=Ef(g,w);v=E=>{const T=Math.exp(-w*g*E);return o-T*((p+w*g*x)/C*Math.sin(C*E)+x*Math.cos(C*E))}}else if(w===1)v=C=>o-Math.exp(-g*C)*(x+(p+g*x)*C);else{const C=g*Math.sqrt(w*w-1);v=E=>{const T=Math.exp(-w*g*E),R=Math.min(C*E,300);return o-T*((p+w*g*x)*Math.sinh(R)+C*x*Math.cosh(R))/C}}const S={calculatedDuration:h&&f||null,next:C=>{const E=v(C);if(h)a.done=C>=f;else{let T=0;w<1&&(T=C===0?ln(p):tx(v,C,E));const R=Math.abs(T)<=r,F=Math.abs(o-E)<=i;a.done=R&&F}return a.value=a.done?o:E,a},toString:()=>{const C=Math.min(xw(S),vf),E=Sw(T=>S.next(C*T).value,C,30);return C+"ms "+E}};return S}function Xm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=R=>a!==void 0&&Rl,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)-w*Math.exp(-R/r),v=R=>g+y(R),S=R=>{const F=y(R),V=v(R);d.done=Math.abs(F)<=u,d.value=d.done?g:V};let C,E;const T=R=>{h(d.value)&&(C=R,E=nx({keyframes:[d.value,p(d.value)],velocity:tx(v,R,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:R=>{let F=!1;return!E&&C===void 0&&(F=!0,S(R),T(R)),C!==void 0&&R>=C?E.next(R-C):(!F&&S(R),d)}}}const XR=Ro(.42,0,1,1),JR=Ro(0,0,.58,1),rx=Ro(.42,0,.58,1),ZR=e=>Array.isArray(e)&&typeof e[0]!="number",ej={linear:ut,easeIn:XR,easeInOut:rx,easeOut:JR,circIn:mh,circInOut:_w,circOut:Fw,backIn:ph,backInOut:Mw,backOut:Dw,anticipate:Aw},Jm=e=>{if(lh(e)){ew(e.length===4);const[t,n,r,i]=e;return Ro(t,n,r,i)}else if(typeof e=="string")return ej[e];return e};function tj(e,t,n){const r=[],i=n||ex,s=e.length-1;for(let o=0;ot[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=tj(t,r,i),l=a.length,u=c=>{if(o&&c1)for(;fu(gn(e[0],e[s-1],c)):u}function rj(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ui(0,t,r);e.push(de(n,1,i))}}function ij(e){const t=[0];return rj(t,e.length-1),t}function sj(e,t){return e.map(n=>n*t)}function oj(e,t){return e.map(()=>t||rx).splice(0,e.length-1)}function fl({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=ZR(r)?r.map(Jm):Jm(r),s={done:!1,value:t[0]},o=sj(n&&n.length===t.length?n:ij(t),e),a=nj(o,t,{ease:Array.isArray(i)?i:oj(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const aj=e=>{const t=({timestamp:n})=>e(n);return{start:()=>le.update(t,!0),stop:()=>Gn(t),now:()=>Le.isProcessing?Le.timestamp:Xt.now()}},lj={decay:Xm,inertia:Xm,tween:fl,keyframes:fl,spring:nx},uj=e=>e/100;class Sh extends Jw{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||wh,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=ah(n)?n:lj[n]||fl;let l,u;a!==fl&&typeof t[0]!="number"&&(l=jo(uj,ex(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=xw(c));const{calculatedDuration:f}=c,d=f+i,h=d*(r+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:w,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let v=this.currentTime,S=s;if(h){const R=Math.min(this.currentTime,c)/f;let F=Math.floor(R),V=R%1;!V&&R>=1&&(V=1),V===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(p==="reverse"?(V=1-V,w&&(V-=w/f)):p==="mirror"&&(S=o)),v=gn(0,1,V)*f}const C=y?{done:!1,value:l[0]}:S.next(v);a&&(C.value=a(C.value));let{done:E}=C;!y&&u!==null&&(E=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return T&&i!==void 0&&(C.value=Xl(l,this.options,i)),x&&x(C.value),T&&this.finish(),C}get duration(){const{resolved:t}=this;return t?un(t.calculatedDuration):0}get time(){return un(this.currentTime)}set time(t){t=ln(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=un(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=aj,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const cj=new Set(["opacity","clipPath","filter","transform"]);function fj(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Pw(a,i);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const dj=Kd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),dl=10,hj=2e4;function pj(e){return ah(e.type)||e.type==="spring"||!bw(e.ease)}function mj(e,t){const n=new Sh({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&sthis.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ul()&&gj(s)&&(s=ix[s]),pj(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,element:p,...w}=this.options,x=mj(t,w);t=x.keyframes,t.length===1&&(t[1]=t[0]),r=x.duration,i=x.times,s=x.ease,o="keyframes"}const c=fj(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(_m(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:f}=this.options;a.set(Xl(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return un(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return un(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ln(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ut;const{animation:r}=n;_m(r,t)}return ut}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:d,...h}=this.options,p=new Sh({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),w=ln(this.time);u.setWithVelocity(p.sample(w-dl).value,p.sample(w).value,dl)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return dj()&&r&&cj.has(r)&&!l&&!u&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const yj={type:"spring",stiffness:500,damping:25,restSpeed:10},vj=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wj={type:"keyframes",duration:.8},xj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Sj=(e,{keyframes:t})=>t.length>2?wj:Br.has(e)?e.startsWith("scale")?vj(t[1]):yj:xj;function bj({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const bh=(e,t,n,r={},i,s)=>o=>{const a=oh(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-ln(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};bj(a)||(c={...c,...Sj(e,c)}),c.duration&&(c.duration=ln(c.duration)),c.repeatDelay&&(c.repeatDelay=ln(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const d=Xl(c.keyframes,a);if(d!==void 0)return le.update(()=>{c.onUpdate(d),c.onComplete()}),new BO([])}return!s&&Zm.supports(c)?new Zm(c):new Sh(c)};function Pj({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function sx(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in l){const d=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),h=l[f];if(h===void 0||c&&Pj(c,f))continue;const p={delay:n,...oh(o||{},f)};let w=!1;if(window.MotionHandoffAnimation){const g=Rw(e);if(g){const y=window.MotionHandoffAnimation(g,f,le);y!==null&&(p.startTime=y,w=!0)}}xf(e,f),d.start(bh(f,d,h,e.shouldReduceMotion&&Tw.has(f)?{type:!1}:p,e,w));const x=d.animation;x&&u.push(x)}return a&&Promise.all(u).then(()=>{le.update(()=>{a&&hh(e,a)})}),u}function Tf(e,t,n={}){var r;const i=Gl(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(sx(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=s;return Cj(e,t,c+u,f,d,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function Cj(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(kj).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(Tf(u,t,{...s,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function kj(e,t){return e.sortNodePosition(t)}function ox(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Tf(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Tf(e,t,n);else{const i=typeof t=="function"?Gl(e,t,n.custom):t;r=Promise.all(sx(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Ej=Qd.length;function ax(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ax(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>ox(e,n,r)))}function jj(e){let t=Rj(e),n=eg(),r=!0;const i=l=>(u,c)=>{var f;const d=Gl(e,c,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...w}=d;u={...u,...w,...p}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,c=ax(e.parent)||{},f=[],d=new Set;let h={},p=1/0;for(let x=0;xp&&S,F=!1;const V=Array.isArray(v)?v:[v];let G=V.reduce(i(g),{});C===!1&&(G={});const{prevResolvedValues:te={}}=y,be={...te,...G},ie=_=>{R=!0,d.has(_)&&(F=!0,d.delete(_)),y.needsAnimating[_]=!0;const j=e.getValue(_);j&&(j.liveStyle=!1)};for(const _ in be){const j=G[_],M=te[_];if(h.hasOwnProperty(_))continue;let D=!1;yf(j)&&yf(M)?D=!ww(j,M):D=j!==M,D?j!=null?ie(_):d.add(_):j!==void 0&&d.has(_)?ie(_):y.protectedKeys[_]=!0}y.prevProp=v,y.prevResolvedValues=G,y.isActive&&(h={...h,...G}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(E&&T)||F)&&f.push(...V.map(_=>({animation:_,options:{type:g}})))}if(d.size){const x={};d.forEach(g=>{const y=e.getBaseTarget(g),v=e.getValue(g);v&&(v.liveStyle=!0),x[g]=y??null}),f.push({animation:x})}let w=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(f):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=eg(),r=!0}}}function Nj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ww(t,e):!1}function sr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function eg(){return{animate:sr(!0),whileInView:sr(),whileHover:sr(),whileTap:sr(),whileDrag:sr(),whileFocus:sr(),exit:sr()}}class ir{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Lj extends ir{constructor(t){super(t),t.animationState||(t.animationState=jj(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ql(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Dj=0;class Mj extends ir{constructor(){super(...arguments),this.id=Dj++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Aj={animation:{Feature:Lj},exit:{Feature:Mj}};function oo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function No(e){return{point:{x:e.pageX,y:e.pageY}}}const Fj=e=>t=>uh(t)&&e(t,No(t));function Ns(e,t,n,r){return oo(e,t,Fj(n),r)}const tg=(e,t)=>Math.abs(e-t);function _j(e,t){const n=tg(e.x,t.x),r=tg(e.y,t.y);return Math.sqrt(n**2+r**2)}class lx{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Vu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=_j(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:w}=Le;this.history.push({...p,timestamp:w});const{onStart:x,onMove:g}=this.handlers;d||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Iu(d,this.transformPagePoint),le.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Vu(f.type==="pointercancel"?this.lastMoveEventInfo:Iu(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,x),p&&p(f,x)},!uh(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=No(t),a=Iu(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Le;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Vu(a,this.history)),this.removeListeners=jo(Ns(this.contextWindow,"pointermove",this.handlePointerMove),Ns(this.contextWindow,"pointerup",this.handlePointerUp),Ns(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Gn(this.updatePoint)}}function Iu(e,t){return t?{point:t(e.point)}:e}function ng(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vu({point:e},t){return{point:e,delta:ng(e,ux(t)),offset:ng(e,Ij(t)),velocity:Vj(t,.1)}}function Ij(e){return e[0]}function ux(e){return e[e.length-1]}function Vj(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=ux(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ln(t)));)n--;if(!r)return{x:0,y:0};const s=un(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const cx=1e-4,Uj=1-cx,$j=1+cx,fx=.01,Bj=0-fx,zj=0+fx;function ft(e){return e.max-e.min}function Wj(e,t,n){return Math.abs(e-t)<=n}function rg(e,t,n,r=.5){e.origin=r,e.originPoint=de(t.min,t.max,e.origin),e.scale=ft(n)/ft(t),e.translate=de(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Uj&&e.scale<=$j||isNaN(e.scale))&&(e.scale=1),(e.translate>=Bj&&e.translate<=zj||isNaN(e.translate))&&(e.translate=0)}function Ls(e,t,n,r){rg(e.x,t.x,n.x,r?r.originX:void 0),rg(e.y,t.y,n.y,r?r.originY:void 0)}function ig(e,t,n){e.min=n.min+t.min,e.max=e.min+ft(t)}function Hj(e,t,n){ig(e.x,t.x,n.x),ig(e.y,t.y,n.y)}function sg(e,t,n){e.min=t.min-n.min,e.max=e.min+ft(t)}function Ds(e,t,n){sg(e.x,t.x,n.x),sg(e.y,t.y,n.y)}function Kj(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?de(n,e,r.max):Math.min(e,n)),e}function og(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function qj(e,{top:t,left:n,bottom:r,right:i}){return{x:og(e.x,n,i),y:og(e.y,t,r)}}function ag(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Ui(t.min,t.max-r,e.min):r>i&&(n=Ui(e.min,e.max-i,t.min)),gn(0,1,n)}function Gj(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Of=.35;function Xj(e=Of){return e===!1?e=0:e===!0&&(e=Of),{x:lg(e,"left","right"),y:lg(e,"top","bottom")}}function lg(e,t,n){return{min:ug(e,t),max:ug(e,n)}}function ug(e,t){return typeof e=="number"?e:e[t]||0}const cg=()=>({translate:0,scale:1,origin:0,originPoint:0}),ai=()=>({x:cg(),y:cg()}),fg=()=>({min:0,max:0}),ye=()=>({x:fg(),y:fg()});function mt(e){return[e("x"),e("y")]}function dx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Jj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Zj(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Uu(e){return e===void 0||e===1}function Rf({scale:e,scaleX:t,scaleY:n}){return!Uu(e)||!Uu(t)||!Uu(n)}function ur(e){return Rf(e)||hx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function hx(e){return dg(e.x)||dg(e.y)}function dg(e){return e&&e!=="0%"}function hl(e,t,n){const r=e-n,i=t*r;return n+i}function hg(e,t,n,r,i){return i!==void 0&&(e=hl(e,i,r)),hl(e,n,r)+t}function jf(e,t=0,n=1,r,i){e.min=hg(e.min,t,n,r,i),e.max=hg(e.max,t,n,r,i)}function px(e,{x:t,y:n}){jf(e.x,t.translate,t.scale,t.originPoint),jf(e.y,n.translate,n.scale,n.originPoint)}const pg=.999999999999,mg=1.0000000000001;function e5(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;apg&&(t.x=1),t.ypg&&(t.y=1)}function li(e,t){e.min=e.min+t,e.max=e.max+t}function gg(e,t,n,r,i=.5){const s=de(e.min,e.max,i);jf(e,t,n,s,r)}function ui(e,t){gg(e.x,t.x,t.scaleX,t.scale,t.originX),gg(e.y,t.y,t.scaleY,t.scale,t.originY)}function mx(e,t){return dx(Zj(e.getBoundingClientRect(),t))}function t5(e,t,n){const r=mx(e,n),{scroll:i}=t;return i&&(li(r.x,i.offset.x),li(r.y,i.offset.y)),r}const gx=({current:e})=>e?e.ownerDocument.defaultView:null,n5=new WeakMap;class r5{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ye(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(No(c).point)},s=(c,f)=>{const{drag:d,dragPropagation:h,onDragStart:p}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=XO(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),mt(x=>{let g=this.getAxisMotionValue(x).get()||0;if(Gt.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const v=y.layout.layoutBox[x];v&&(g=ft(v)*(parseFloat(g)/100))}}this.originPoint[x]=g}),p&&le.postRender(()=>p(c,f)),xf(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(c,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:w}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:x}=f;if(h&&this.currentDirection===null){this.currentDirection=i5(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),w&&w(c,f)},a=(c,f)=>this.stop(c,f),l=()=>mt(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new lx(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:gx(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&le.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ra(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Kj(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&si(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=qj(i.layoutBox,n):this.constraints=!1,this.elastic=Xj(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&mt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Gj(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!si(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=t5(r,i.root,this.visualElement.getTransformPagePoint());let o=Qj(i.layout.layoutBox,s);if(n){const a=n(Jj(o));this.hasMutatedConstraints=!!a,a&&(o=dx(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=mt(c=>{if(!ra(c,n,this.currentDirection))return;let f=l&&l[c]||{};o&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return xf(this.visualElement,t),r.start(bh(t,r,0,n,this.visualElement,!1))}stopAnimation(){mt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){mt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){mt(n=>{const{drag:r}=this.getProps();if(!ra(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-de(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!si(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Yj({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),mt(o=>{if(!ra(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(de(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;n5.set(this.visualElement,this);const t=this.visualElement.current,n=Ns(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();si(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),le.read(r);const o=oo(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(mt(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Of,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ra(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function i5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class s5 extends ir{constructor(t){super(t),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new r5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const yg=e=>(t,n)=>{e&&le.postRender(()=>e(t,n))};class o5 extends ir{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(t){this.session=new lx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:gx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:yg(t),onStart:yg(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&le.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ns(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ta={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function vg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ls={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if($.test(e))e=parseFloat(e);else return e;const n=vg(e,t.target.x),r=vg(e,t.target.y);return`${n}% ${r}%`}},a5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Xn.parse(e);if(i.length>5)return r;const s=Xn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=de(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class l5 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;jO(u5),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ta.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||le.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Gd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function yx(e){const[t,n]=Z1(),r=b.useContext(Bd);return m.jsx(l5,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(ow),isPresent:t,safeToRemove:n})}const u5={borderRadius:{...ls,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ls,borderTopRightRadius:ls,borderBottomLeftRadius:ls,borderBottomRightRadius:ls,boxShadow:a5};function c5(e,t,n){const r=Ue(e)?e:io(e);return r.start(bh("",r,t,n)),r.animation}function f5(e){return e instanceof SVGElement&&e.tagName!=="svg"}const d5=(e,t)=>e.depth-t.depth;class h5{constructor(){this.children=[],this.isDirty=!1}add(t){ch(this.children,t),this.isDirty=!0}remove(t){fh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(d5),this.isDirty=!1,this.children.forEach(t)}}function p5(e,t){const n=Xt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Gn(r),e(s-t))};return le.read(r,!0),()=>Gn(r)}const vx=["TopLeft","TopRight","BottomLeft","BottomRight"],m5=vx.length,wg=e=>typeof e=="string"?parseFloat(e):e,xg=e=>typeof e=="number"||$.test(e);function g5(e,t,n,r,i,s){i?(e.opacity=de(0,n.opacity!==void 0?n.opacity:1,y5(r)),e.opacityExit=de(t.opacity!==void 0?t.opacity:1,0,v5(r))):s&&(e.opacity=de(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(Ui(e,t,r))}function bg(e,t){e.min=t.min,e.max=t.max}function pt(e,t){bg(e.x,t.x),bg(e.y,t.y)}function Pg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cg(e,t,n,r,i){return e-=t,e=hl(e,1/n,r),i!==void 0&&(e=hl(e,1/i,r)),e}function w5(e,t=0,n=1,r=.5,i,s=e,o=e){if(Gt.test(t)&&(t=parseFloat(t),t=de(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=de(s.min,s.max,r);e===s&&(a-=t),e.min=Cg(e.min,t,n,a,i),e.max=Cg(e.max,t,n,a,i)}function kg(e,t,[n,r,i],s,o){w5(e,t[n],t[r],t[i],t.scale,s,o)}const x5=["x","scaleX","originX"],S5=["y","scaleY","originY"];function Eg(e,t,n,r){kg(e.x,t,x5,n?n.x:void 0,r?r.x:void 0),kg(e.y,t,S5,n?n.y:void 0,r?r.y:void 0)}function Tg(e){return e.translate===0&&e.scale===1}function xx(e){return Tg(e.x)&&Tg(e.y)}function Og(e,t){return e.min===t.min&&e.max===t.max}function b5(e,t){return Og(e.x,t.x)&&Og(e.y,t.y)}function Rg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Sx(e,t){return Rg(e.x,t.x)&&Rg(e.y,t.y)}function jg(e){return ft(e.x)/ft(e.y)}function Ng(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class P5{constructor(){this.members=[]}add(t){ch(this.members,t),t.scheduleRender()}remove(t){if(fh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function C5(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:h,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const cr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ws=typeof window<"u"&&window.MotionDebug!==void 0,$u=["","X","Y","Z"],k5={visibility:"hidden"},Lg=1e3;let E5=0;function Bu(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function bx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Rw(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",le,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&bx(r)}function Px({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=E5++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ws&&(cr.totalNodes=cr.resolvedTargetDeltas=cr.recalculatedProjection=0),this.nodes.forEach(R5),this.nodes.forEach(M5),this.nodes.forEach(A5),this.nodes.forEach(j5),ws&&window.MotionDebug.record(cr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=p5(d,250),Ta.hasAnimatedSinceResize&&(Ta.hasAnimatedSinceResize=!1,this.nodes.forEach(Mg))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||c.getDefaultTransition()||U5,{onLayoutAnimationStart:x,onLayoutAnimationComplete:g}=c.getProps(),y=!this.targetLayout||!Sx(this.targetLayout,p)||h,v=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const S={...oh(w,"layout"),onPlay:x,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else d||Mg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Gn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(F5),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&bx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const C=S/1e3;Ag(f.x,o.x,C),Ag(f.y,o.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ds(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),I5(this.relativeTarget,this.relativeTargetOrigin,d,C),v&&b5(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=ye()),pt(v,this.relativeTarget)),w&&(this.animationValues=c,g5(c,u,this.latestValues,C,y,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Gn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=le.update(()=>{Ta.hasAnimatedSinceResize=!0,this.currentAnimation=c5(0,Lg,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Lg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Cx(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ye();const f=ft(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const d=ft(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}pt(a,l),ui(a,c),Ls(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new P5),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Bu("z",o,u,this.animationValues);for(let c=0;c<$u.length;c++)Bu(`rotate${$u[c]}`,o,u,this.animationValues),Bu(`skew${$u[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return k5;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ka(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const w={};return this.options.layoutId&&(w.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,w.pointerEvents=ka(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ur(this.latestValues)&&(w.transform=c?c({},""):"none",this.hasProjected=!1),w}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=C5(this.projectionDeltaWithTransform,this.treeScale,d),c&&(u.transform=c(d,u.transform));const{x:h,y:p}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?u.opacity=f===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:u.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const w in ll){if(d[w]===void 0)continue;const{correct:x,applyTo:g}=ll[w],y=u.transform==="none"?d[w]:x(d[w],f);if(g){const v=g.length;for(let S=0;S{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Dg),this.root.sharedNodes.clear()}}}function T5(e){e.updateLayout()}function O5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s==="size"?mt(f=>{const d=o?n.measuredBox[f]:n.layoutBox[f],h=ft(d);d.min=r[f].min,d.max=d.min+h}):Cx(s,n.layoutBox,r)&&mt(f=>{const d=o?n.measuredBox[f]:n.layoutBox[f],h=ft(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=ai();Ls(a,r,n.layoutBox);const l=ai();o?Ls(l,e.applyTransform(i,!0),n.measuredBox):Ls(l,r,n.layoutBox);const u=!xx(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=ye();Ds(p,n.layoutBox,d.layoutBox);const w=ye();Ds(w,r,h.layoutBox),Sx(p,w)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function R5(e){ws&&cr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function j5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function N5(e){e.clearSnapshot()}function Dg(e){e.clearMeasurements()}function L5(e){e.isLayoutDirty=!1}function D5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function M5(e){e.resolveTargetDelta()}function A5(e){e.calcProjection()}function F5(e){e.resetSkewAndRotation()}function _5(e){e.removeLeadSnapshot()}function Ag(e,t,n){e.translate=de(t.translate,0,n),e.scale=de(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fg(e,t,n,r){e.min=de(t.min,n.min,r),e.max=de(t.max,n.max,r)}function I5(e,t,n,r){Fg(e.x,t.x,n.x,r),Fg(e.y,t.y,n.y,r)}function V5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const U5={duration:.45,ease:[.4,0,.1,1]},_g=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ig=_g("applewebkit/")&&!_g("chrome/")?Math.round:ut;function Vg(e){e.min=Ig(e.min),e.max=Ig(e.max)}function $5(e){Vg(e.x),Vg(e.y)}function Cx(e,t,n){return e==="position"||e==="preserve-aspect"&&!Wj(jg(t),jg(n),.2)}function B5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const z5=Px({attachResizeListener:(e,t)=>oo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zu={current:void 0},kx=Px({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zu.current){const e=new z5({});e.mount(window),e.setOptions({layoutScroll:!0}),zu.current=e}return zu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),W5={pan:{Feature:o5},drag:{Feature:s5,ProjectionNode:kx,MeasureLayout:yx}};function Ug(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&le.postRender(()=>s(t,No(t)))}class H5 extends ir{mount(){const{current:t}=this.node;t&&(this.unmount=KO(t,n=>(Ug(this.node,n,"Start"),r=>Ug(this.node,r,"End"))))}unmount(){}}class K5 extends ir{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=jo(oo(this.node.current,"focus",()=>this.onFocus()),oo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $g(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&le.postRender(()=>s(t,No(t)))}class q5 extends ir{mount(){const{current:t}=this.node;t&&(this.unmount=GO(t,n=>($g(this.node,n,"Start"),(r,{success:i})=>$g(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Nf=new WeakMap,Wu=new WeakMap,Q5=e=>{const t=Nf.get(e.target);t&&t(e)},Y5=e=>{e.forEach(Q5)};function G5({root:e,...t}){const n=e||document;Wu.has(n)||Wu.set(n,{});const r=Wu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Y5,{root:e,...t})),r[i]}function X5(e,t,n){const r=G5(t);return Nf.set(e,n),r.observe(e),()=>{Nf.delete(e),r.unobserve(e)}}const J5={some:0,all:1};class Z5 extends ir{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:J5[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return X5(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(e4(t,n))&&this.startObserver()}unmount(){}}function e4({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const t4={inView:{Feature:Z5},tap:{Feature:q5},focus:{Feature:K5},hover:{Feature:H5}},n4={layout:{ProjectionNode:kx,MeasureLayout:yx}},Lf={current:null},Ex={current:!1};function r4(){if(Ex.current=!0,!!Wd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Lf.current=e.matches;e.addListener(t),t()}else Lf.current=!1}const i4=[...Gw,_e,Xn],s4=e=>i4.find(Yw(e)),Bg=new WeakMap;function o4(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Ue(i))e.addValue(r,i);else if(Ue(s))e.addValue(r,io(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,io(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const zg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class a4{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=wh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Xt.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),Ex.current||r4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Lf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Bg.delete(this.current),this.projection&&this.projection.unmount(),Gn(this.notifyUpdate),Gn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Br.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in $i){const n=$i[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ye()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=io(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(qw(i)||Iw(i))?i=parseFloat(i):!s4(i)&&Xn.test(n)&&(i=Ww(t,n)),this.setBaseTarget(t,Ue(i)?i.get():i)),Ue(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Jd(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ue(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new dh),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Tx extends a4{constructor(){super(...arguments),this.KeyframeResolver=Xw}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ue(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function l4(e){return window.getComputedStyle(e)}class u4 extends Tx{constructor(){super(...arguments),this.type="html",this.renderInstance=hw}readValueFromInstance(t,n){if(Br.has(n)){const r=vh(n);return r&&r.default||0}else{const r=l4(t),i=(cw(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return mx(t,n)}build(t,n,r){th(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return sh(t,n,r)}}class c4 extends Tx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ye}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Br.has(n)){const r=vh(n);return r&&r.default||0}return n=pw.has(n)?n:Yd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return yw(t,n,r)}build(t,n,r){nh(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){mw(t,n,r,i)}mount(t){this.isSVGTag=ih(t.tagName),super.mount(t)}}const f4=(e,t)=>Xd(e)?new c4(t):new u4(t,{allowProjection:e!==b.Fragment}),d4=VO({...Aj,...t4,...W5,...n4},f4),Wg=eO(d4);function h4(e){e.values.forEach(t=>t.stop())}function Df(e,t){[...t].reverse().forEach(r=>{const i=e.getVariant(r);i&&hh(e,i),e.variantChildren&&e.variantChildren.forEach(s=>{Df(s,t)})})}function p4(e,t){if(Array.isArray(t))return Df(e,t);if(typeof t=="string")return Df(e,[t]);hh(e,t)}function m4(){const e=new Set,t={subscribe(n){return e.add(n),()=>void e.delete(n)},start(n,r){const i=[];return e.forEach(s=>{i.push(ox(s,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return e.forEach(r=>{p4(r,n)})},stop(){e.forEach(n=>{h4(n)})},mount(){return()=>{t.stop()}}};return t}function g4(){const e=Hl(m4);return Hd(e.mount,[]),e}const y4=g4;function v4({setShow:e,showBlur:t,children:n,theme:r="light"}){const i=b.useRef(null),s=y4(),o={type:"spring",stiffness:500,damping:30};b.useEffect(()=>{s.start({y:20,transition:o})},[]);async function a(l,u){var h;const c=u.offset.y,f=u.velocity.y,d=((h=i.current)==null?void 0:h.getBoundingClientRect().height)||0;c>d/2||f>800?(await s.start({y:"100%",transition:o}),e(!1)):s.start({y:0,transition:o})}return m.jsxs(KT,{children:[m.jsxs(Wg.div,{ref:i,className:to("group fixed inset-x-0 bottom-0 z-40 w-screen cursor-grab overflow-y-scroll pb-5 active:cursor-grabbing sm:hidden",r==="light"?"bg-white":"bg-neutral-800/95"),style:{maxHeight:"95%"},initial:{y:"100%"},animate:s,exit:{y:"100%"},transition:o,drag:"y",dragDirectionLock:!0,onDragEnd:a,dragElastic:{top:0,bottom:1},dragConstraints:{top:0,bottom:0},children:[m.jsxs("div",{className:to("rounded-t-4xl -mb-1 flex h-7 w-full items-center justify-center border-t",r==="light"?"border-gray-200":"border-cyan-50/20"),children:[m.jsx("div",{className:"-mr-1 h-1 w-6 rounded-full bg-gray-300 transition-all group-active:rotate-12"}),m.jsx("div",{className:"h-1 w-6 rounded-full bg-gray-300 transition-all group-active:-rotate-12"})]}),n]},"leaflet"),t&&m.jsx(Wg.div,{className:"fixed inset-0 z-30 bg-gray-100 bg-opacity-10 backdrop-blur",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>e(!1)},"leaflet-backdrop")]})}function Ox({children:e,showModal:t,setShowModal:n,theme:r="light"}){const i=b.useRef(null),{isMobile:s}=$T();b.useEffect(()=>{function a(l){i.current&&!i.current.contains(l.target)&&n(!1)}return document.addEventListener("mousedown",a),()=>{document.removeEventListener("mousedown",a)}},[i,n]);const o=b.useCallback(a=>{a.key==="Escape"&&n(!1)},[n]);return b.useEffect(()=>(document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)),[o]),s?t?m.jsx(v4,{setShow:n,showBlur:!0,theme:r,children:e}):null:m.jsx(m.Fragment,{children:t&&m.jsx("div",{className:"fixed inset-0 z-40 flex items-center justify-center",style:{backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.4)"},children:m.jsx("div",{className:"relative z-50 w-full max-w-lg",ref:i,children:e})})})}function Ph(e){return m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[m.jsx("path",{d:"M18 6 6 18"}),m.jsx("path",{d:"m6 6 12 12"})]})}function w4({showPasswordModal:e,setShowPasswordModal:t,onLogin:n,isLoggingIn:r}){const{t:i}=$r(),[s,o]=b.useState(""),a=async l=>{if(l.preventDefault(),!s){FE.error(i("Password is required"));return}await n(s)};return m.jsx(Ox,{showModal:e,setShowModal:t,children:m.jsxs("div",{className:"w-full overflow-hidden bg-white/95 backdrop-blur-xl shadow-xl p-4 md:max-w-3xl md:rounded-2xl md:border md:border-gray-200",children:[m.jsx(Ph,{className:"absolute top-4 right-4 h-6 w-6 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:()=>t(!1),onPointerDown:l=>l.stopPropagation()}),m.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3 border-b border-gray-200 px-4 py-5 text-center md:px-16",children:[m.jsx("h3",{className:"font-display text-2xl font-bold",children:i("Save password")}),m.jsx("p",{className:"text-gray-500",children:i("Save your password and continue using this email in 1 day")})]}),m.jsxs("form",{onSubmit:a,className:"flex flex-col mt-4 space-y-4 px-4",children:[m.jsx("input",{value:s,onChange:l=>o(l.target.value),type:"text",name:"password",placeholder:i("Enter your password *"),required:!0,className:"rounded-md border border-slate-200 px-3 py-2 shadow-inner w-full"}),m.jsxs("p",{className:"text-sm",children:[i("How to get a password? Click to create a temporary email and receive at least one email to generate a password"),"."]}),m.jsxs("p",{className:"text-sm text-yellow-600",children:[i("Remember your password, otherwise your email will expire and cannot be retrieved"),"."]}),m.jsx("button",{type:"submit",disabled:r,className:"py-2.5 text-white rounded-md w-full bg-cyan-600 hover:opacity-90 disabled:cursor-not-allowed disabled:bg-zinc-500",children:i(r?"Submitting...":"Login")})]})]})})}function x4(){const[e,t]=b.useState(!1),n=b.useCallback(({onLogin:r,isLoggingIn:i})=>m.jsx(w4,{showPasswordModal:e,setShowPasswordModal:t,onLogin:r,isLoggingIn:i}),[e]);return b.useMemo(()=>({showPasswordModal:e,setShowPasswordModal:t,PasswordModal:n}),[t,n,e])}function S4(e){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",children:m.jsx("path",{fill:"#0891b2",d:"M11 17h2v-6h-2zm1-8q.425 0 .713-.288T13 8q0-.425-.288-.712T12 7q-.425 0-.712.288T11 8q0 .425.288.713T12 9m0 13q-3.475-.875-5.738-3.988T4 11.1V5l8-3l8 3v6.1q0 3.8-2.262 6.913T12 22m0-2.1q2.6-.825 4.3-3.3t1.7-5.5V6.375l-6-2.25l-6 2.25V11.1q0 3.025 1.7 5.5t4.3 3.3m0-7.9"})})}function b4(e){return m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 280 117",children:[m.jsx("path",{fill:"#FBAD41",d:"M205.52 50.813c-.858 0-1.705.03-2.551.058c-.137.007-.272.04-.398.094a1.424 1.424 0 0 0-.92.994l-3.628 12.672c-1.565 5.449-.983 10.48 1.646 14.174c2.41 3.416 6.42 5.421 11.289 5.655l19.679 1.194c.585.03 1.092.312 1.4.776a1.92 1.92 0 0 1 .2 1.692a2.496 2.496 0 0 1-2.134 1.662l-20.448 1.193c-11.11.515-23.062 9.58-27.255 20.633l-1.474 3.9a1.092 1.092 0 0 0 .967 1.49h70.425a1.872 1.872 0 0 0 1.81-1.365A51.172 51.172 0 0 0 256 101.828c0-28.16-22.582-50.984-50.449-50.984"}),m.jsx("path",{fill:"#F6821F",d:"m174.782 115.362l1.303-4.583c1.568-5.449.987-10.48-1.639-14.173c-2.418-3.417-6.424-5.422-11.296-5.656l-92.312-1.193a1.822 1.822 0 0 1-1.459-.776a1.919 1.919 0 0 1-.203-1.693a2.496 2.496 0 0 1 2.154-1.662l93.173-1.193c11.063-.511 23.015-9.58 27.208-20.633l5.313-14.04c.214-.596.27-1.238.156-1.86C191.126 20.51 166.91 0 137.96 0C111.269 0 88.626 17.403 80.5 41.596a26.996 26.996 0 0 0-19.156-5.359C48.549 37.524 38.25 47.946 36.979 60.88a27.905 27.905 0 0 0 .702 9.642C16.773 71.145 0 88.454 0 109.726c0 1.923.137 3.818.413 5.667c.115.897.879 1.57 1.783 1.568h170.48a2.223 2.223 0 0 0 2.106-1.63"})]})}function Rx(e){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 22 22",children:m.jsx("path",{fill:"#0891b2",d:"M7.376 6.745c-.447.275 1.197 4.242 1.598 4.888a1.206 1.206 0 0 0 2.053-1.266c-.397-.648-3.205-3.898-3.651-3.622m-.335-4.343a8.98 8.98 0 0 1 5.918 0c.329.114.765-.115.572-.611c-.141-.36-.277-.712-.332-.855c-.131-.339-.6-.619-.804-.665C11.623.097 10.823 0 10 0S8.377.097 7.604.271c-.204.046-.672.326-.803.665l-.332.855c-.193.496.243.726.572.611m12.057.784a10.132 10.132 0 0 0-1.283-1.285c-.153-.129-.603-.234-.888.051l-1.648 1.647a9.27 9.27 0 0 1 1.155.966c.362.361.677.752.966 1.155l1.647-1.647c.286-.286.181-.735.051-.887M10 2.9A8.1 8.1 0 0 0 1.899 11A8.1 8.1 0 0 0 10 19.101A8.1 8.1 0 0 0 10 2.9m0 14.201A6.1 6.1 0 1 1 10.001 4.9A6.1 6.1 0 0 1 10 17.1z"})})}function P4(e){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 26 26",children:m.jsxs("g",{fill:"none",stroke:"#0891b2",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[m.jsx("path",{d:"m12.802 2.165l5.575 2.389c.48.206.863.589 1.07 1.07l2.388 5.574c.22.512.22 1.092 0 1.604l-2.389 5.575c-.206.48-.589.863-1.07 1.07l-5.574 2.388c-.512.22-1.092.22-1.604 0l-5.575-2.389a2.036 2.036 0 0 1-1.07-1.07l-2.388-5.574a2.036 2.036 0 0 1 0-1.604l2.389-5.575c.206-.48.589-.863 1.07-1.07l5.574-2.388a2.036 2.036 0 0 1 1.604 0M12 9h.01"}),m.jsx("path",{d:"M11 12h1v4h1"})]})})}function Oa({showModal:e,setShowModal:t,title:n,children:r}){return m.jsx(Ox,{showModal:e,setShowModal:t,theme:"dark",children:m.jsxs("div",{className:"w-full max-h-[80vh] flex flex-col bg-neutral-800/95 backdrop-blur-xl shadow-xl md:max-w-3xl md:rounded-2xl md:border md:border-cyan-50/20",children:[m.jsxs("div",{className:"flex-shrink-0 flex items-center justify-center p-4 border-b border-cyan-50/20 relative",children:[m.jsx("h3",{className:"font-display text-2xl font-bold text-white",children:n}),m.jsx(Ph,{className:"absolute top-4 right-4 h-6 w-6 text-gray-400 hover:text-white cursor-pointer",onClick:()=>t(!1),onPointerDown:i=>i.stopPropagation()})]}),m.jsx("div",{className:"flex-grow overflow-y-auto text-white p-6",children:m.jsx("div",{className:"text-white",children:r})})]})})}const Hu=e=>e<10?`0${e}`:`${e}`;function C4({expiryTimestamp:e,onReset:t}){const{t:n}=$r(),r=b.useCallback(()=>{const o=e-Date.now();let a={hours:"00",minutes:"00",seconds:"00",expired:o<=0};if(o>0){const l=Math.floor(o/1e3),u=l%60,c=Math.floor(l/60),f=c%60,d=Math.floor(c/60);a={hours:Hu(d),minutes:Hu(f),seconds:Hu(u),expired:!1}}return a},[e]),[i,s]=b.useState(r());return b.useEffect(()=>{s(r());const o=setInterval(()=>{s(r())},1e3);return()=>clearInterval(o)},[e,r]),b.useEffect(()=>{i.expired},[i.expired]),m.jsxs("div",{className:"flex items-center justify-between gap-2 text-sm text-cyan-400 my-4 p-3 bg-white/5 rounded-md border border-cyan-50/20 shadow-inner",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[" ",m.jsx(Rx,{className:"w-5 h-5"}),i.expired?m.jsx("span",{children:n("Email expired")}):m.jsxs("span",{children:[n("Expires in"),": ",i.hours,":",i.minutes,":",i.seconds]})]}),!i.expired&&m.jsxs("button",{onClick:t,className:"p-1 rounded text-cyan-400 hover:text-cyan-300 focus:outline-none focus:ring-1 focus:ring-cyan-500",title:n("Reset validity"),children:[m.jsx(G1,{className:"w-5 h-5"})," "]})]})}function k4(){const e=IT(),{t}=$r(),n=Md(),[r,i]=b.useState(()=>_t.get("userMailbox")),[s,o]=b.useState(()=>{const z=_t.get("emailExpiry");return z?parseInt(z,10):void 0}),[a,l]=b.useState(""),[u,c]=b.useState([]),[f,d]=b.useState(!1),[h,p]=b.useState(null),[w,x]=b.useState(e.emailDomain[0]),[g,y]=b.useState(!1),{PasswordModal:v,setShowPasswordModal:S}=x4(),[C,E]=b.useState(!1),[T,R]=b.useState(!1),{data:F=[],isLoading:V,isFetching:G,refetch:te}=Qb({queryKey:["emails",r],queryFn:()=>AT(r),enabled:!!r,refetchInterval:2e4,onError:z=>{Q.error(`${t("Failed to get emails")}: ${z.message}`,{duration:5e3})},retry:!1}),be=b.useCallback(z=>{Q(Ye=>m.jsxs("div",{className:"w-full max-w-lg p-4 bg-slate-800 text-white rounded-lg shadow-lg border border-slate-700",children:[m.jsxs("div",{className:"flex items-center justify-between pb-2 mb-3 border-b border-slate-700",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(gf,{className:"h-6 w-6 text-cyan-400"}),m.jsx("h3",{className:"text-lg font-semibold",children:t("View password")})]}),m.jsx("button",{onClick:()=>Q.dismiss(Ye.id),className:"p-1 rounded-full text-gray-400 hover:bg-slate-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-cyan-500","aria-label":"Close",children:m.jsx(Ph,{className:"h-5 w-5"})})]}),m.jsxs("div",{children:[m.jsx("p",{className:"text-sm text-gray-300",children:t("Save your password and continue using this email in 1 day")}),m.jsxs("div",{className:"mt-2 flex items-center text-sm bg-slate-700 px-2 py-1 rounded",children:[m.jsx("span",{className:"flex-1 font-mono break-all text-gray-100",children:z}),m.jsx(Om,{text:z,className:"p-1"})]}),m.jsx("p",{className:"mt-3 text-xs text-yellow-400",children:t("Remember your password, otherwise your email will expire and cannot be retrieved")})]})]}),{id:"password-notification",duration:5e3,position:"top-center",style:{background:"transparent",border:"none",padding:0,boxShadow:"none"}})},[t]),ie=b.useRef(F.length);b.useEffect(()=>{if(F.length>0&&!T&&R(!0),!r)R(!1),o(void 0),Q.dismiss("password-notification");else{const z=_t.get("emailExpiry");z&&!s&&o(parseInt(z,10))}ie.current=F.length},[F,r,T,s]);const k=async()=>{try{d(!0);const z=`${N1("",VT())}@${w}`,Zl=Date.now()+24*60*60*1e3;_t.set("userMailbox",z,{expires:1}),_t.set("emailExpiry",Zl.toString(),{expires:1}),i(z),o(Zl),R(!1),Q.success(t("Email created successfully"))}catch(z){Q.error(t("Failed to verify captcha")),console.error("Turnstile verification failed:",z)}},N=()=>{_t.remove("userMailbox"),_t.remove("emailExpiry"),i(void 0),R(!1),p(null),o(void 0),n.invalidateQueries({queryKey:["emails"]})},_=()=>{te(),Q.success(t("Mailbox refreshed"))},j=b.useCallback(()=>{const z=Date.now()+864e5,Ye=new Date(Date.now()+24*60*60*1e3);_t.set("emailExpiry",z.toString(),{expires:Ye}),o(z),Q.success(t("Validity reset successfully"))},[t]),M=Yb({mutationFn:z=>FT(z),onSuccess:()=>{Q.success(t("Emails deleted successfully")),c([]),h&&u.includes(h.id)&&p(null),n.invalidateQueries({queryKey:["emails",r]})},onError:()=>{Q.error(t("Failed to delete emails"))}}),D=z=>{if(z.length===0){Q.error(t("Please select emails to delete"));return}M.mutate(z)},K=async z=>{E(!0);try{const Ye=await _T(z),Ch=Date.now()+24*60*60*1e3;_t.set("userMailbox",Ye.address,{expires:1}),_t.set("emailExpiry",Ch.toString(),{expires:1}),i(Ye.address),o(Ch),S(!1),Q.success(t("Login successful"))}catch(Ye){Q.error(`${t("Login failed")}: ${t(Ye.message)}`)}finally{E(!1)}},J=b.useCallback(()=>r&&e.cookiesSecret?UT(r,e.cookiesSecret):null,[r,e.cookiesSecret]),ce=z=>{p(z)},Pe=()=>{p(null)},vn=()=>{y(!0)};return m.jsxs("div",{className:"h-full flex flex-col gap-4 md:flex-row justify-center items-start mt-24 mx-6 md:mx-10",children:[m.jsx(v,{onLogin:K,isLoggingIn:C}),h&&m.jsx(Oa,{showModal:g,setShowModal:y,title:t("Email Detail"),children:m.jsx(X1,{email:h,onClose:()=>y(!1)})}),m.jsxs("div",{className:"flex flex-col text-white items-start w-full md:w-[350px] mx-auto gap-2",children:[m.jsxs("div",{className:"w-full mb-4 md:max-w-[350px] shrink-0 group group-hover:before:duration-500 group-hover:after:duration-500 after:duration-500 hover:border-cyan-600 hover:before:[box-shadow:_20px_20px_20px_30px_#a21caf] duration-500 before:duration-500 hover:duration-500 hover:after:-right-8 hover:before:right-12 hover:before:-bottom-8 hover:before:blur origin-left hover:decoration-2 relative bg-neutral-800 h-full border text-left p-4 rounded-lg overflow-hidden border-cyan-50/20 before:absolute before:w-12 before:h-12 before:content[''] before:right-1 before:top-1 before:z-10 before:bg-violet-500 before:rounded-full before:blur-lg after:absolute after:z-10 after:w-20 after:h-20 after:content[''] after:bg-rose-300 after:right-8 after:top-3 after:rounded-full after:blur-lg",children:[m.jsx("h1",{className:"text-gray-50 text-xl font-bold mb-7 group-hover:text-cyan-500 duration-500",children:t("Virtual Temporary Email")}),m.jsxs("div",{className:"flex flex-col gap-4 text-sm text-gray-200",children:[m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx(S4,{})," ",t("Privacy friendly")]}),m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx(Rx,{}),t("Valid for 1 Day")]}),m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx(P4,{}),t("AD friendly")]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(b4,{}),t("100% Run on Cloudflare")]})]})]}),r?m.jsxs("div",{className:"w-full md:max-w-[350px] mb-4",children:[m.jsx("div",{className:"mb-4 font-semibold text-sm",children:t("Email address")}),m.jsxs("div",{className:"flex items-center text-zinc-100 bg-white/10 backdrop-blur-xl shadow-inner px-4 py-4 rounded-md w-full",children:[m.jsx("span",{className:"truncate",children:r}),m.jsx(Om,{text:r,className:"p-1 rounded-md ml-auto"})]}),s&&m.jsx(C4,{expiryTimestamp:s,onReset:j}),m.jsx("button",{onClick:N,className:"py-2.5 rounded-md w-full bg-cyan-600 hover:opacity-90 disabled:cursor-not-allowed disabled:bg-zinc-500",children:t("Stop")})]}):m.jsxs("div",{className:"w-full md:max-w-[350px]",children:[m.jsxs("div",{className:"mb-4",children:[m.jsx("div",{className:"mb-3 font-semibold",children:t("Domain")}),m.jsx("select",{value:w,onChange:z=>x(z.target.value),className:"w-full p-2.5 rounded-md bg-white/10 text-white border border-cyan-50/20",children:e.emailDomain.map(z=>m.jsxs("option",{value:z,className:"text-black",children:["@",z]},z))})]}),m.jsxs("div",{className:"text-sm relative mb-4",children:[m.jsx("div",{className:"mb-3 font-semibold",children:t("Validater")}),m.jsx("div",{className:"[&_iframe]:!w-full h-[65px] max-w-[300px] bg-gray-700"})]}),m.jsxs("button",{onClick:k,className:"py-2.5 rounded-md w-full bg-cyan-600 hover:opacity-90 disabled:cursor-not-allowed disabled:bg-zinc-500",children:[t("Create temporary email"),"1"]}),m.jsxs("p",{className:"mt-4 text-sm text-cyan-500 cursor-pointer",onClick:()=>S(!0),children:[m.jsx(gf,{className:"inline-block w-4 h-4 mr-2"}),t("Have a password? Login.")]})]})]}),m.jsx("div",{className:"w-full flex-1 overflow-hidden",children:m.jsx(LT,{isAddressCreated:!!r,emails:F,isLoading:V,isFetching:G,onDelete:D,isDeleting:M.isPending,onRefresh:_,selectedIds:u,setSelectedIds:c,onSelectEmail:ce,showViewPasswordButton:T,onShowPassword:()=>{const z=J();z&&be(z)},selectedEmail:h,onCloseDetail:Pe,onExpand:vn})})]})}function E4(){return m.jsxs("svg",{id:"iconce.com",width:"32",height:"32",viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[m.jsxs("defs",{children:[m.jsxs("linearGradient",{id:"r5",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(45)",style:{transformOrigin:"center center"},children:[m.jsx("stop",{stopColor:"#5C5C5C"}),m.jsx("stop",{offset:"1",stopColor:"#0F1015"})]}),m.jsxs("radialGradient",{id:"r6",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(256) rotate(90) scale(512)",children:[m.jsx("stop",{stopColor:"white"}),m.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]}),m.jsx("rect",{id:"r4",width:"256",height:"256",x:"0",y:"0",rx:"48",fill:"url(#r5)",stroke:"#FFFFFF",strokeWidth:"0",strokeOpacity:"100%",paintOrder:"stroke"}),m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"170",height:"170",viewBox:"0 0 24 24",fill:"none",stroke:"#FFFFFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white",alignmentBaseline:"middle",x:"43",y:"43",children:[m.jsx("path",{d:"M22 17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9.5C2 7 4 5 6.5 5H18c2.2 0 4 1.8 4 4v8Z"}),m.jsx("polyline",{points:"15,9 18,9 18,11"}),m.jsx("path",{d:"M6.5 5C9 5 11 7 11 9.5V17a2 2 0 0 1-2 2v0"}),m.jsx("line",{x1:"6",x2:"7",y1:"10",y2:"10"})]})]})}function T4({className:e}){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mb-[1px]",children:m.jsx("path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"})})}function O4(){return m.jsx("div",{children:m.jsxs("div",{className:"max-w-[1400px] ",children:[m.jsxs("p",{className:"mt-8",children:[m.jsx("strong",{children:"Vmail.DEV "})," is a Virtual temporary email service."," "]}),m.jsxs("p",{className:"mt-4",children:["You can get a temporary email without revealing any personal information, which greatly protects your privacy."," "]}),m.jsxs("p",{className:"mt-4",children:["It supports selecting one domain names, making it convenient for you to use in different scenarios."," "]}),m.jsxs("p",{className:"mt-4",children:["100% running on the ",m.jsx("strong",{children:"Cloudflare "})," network, providing you with a super-fast experience."," "]}),m.jsx("p",{className:"mt-4",children:"Misuse of the temporary email service not only violates our terms of service but can also impact the normal use of other users. We encourage each user to use our services responsibly to ensure that resources are allocated and used appropriately."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"copyrights",children:m.jsx("a",{href:"#copyrights",children:"Copyrights "})}),m.jsxs("p",{className:"mt-4",children:["All copyrights belong to"," ",m.jsxs("a",{href:"https://vmail.dev",rel:"nofollow",children:[m.jsx("strong",{children:"Vmail.DEV "})," "]}),"."," "]})]})})}function R4(){return m.jsx("div",{children:m.jsxs("div",{className:"max-w-[1400px] ",children:[m.jsx("p",{className:"mt-8",children:"At Vmail.DEV, we value the privacy of our users and are committed to protecting their personal information. This Privacy Policy outlines the practices we follow regarding the collection, use, storage, and deletion of data on our one-time email website."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Collection of Information",children:"1. Collection of Information"}),m.jsx("p",{className:"mt-4",children:"We only collect and store an email name for the duration of the session. This information is necessary to facilitate the functioning of our one-time email service."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Storage of Emails",children:"2. Storage of Emails"}),m.jsx("p",{className:"mt-4",children:"All emails sent and received through our one-time email service are temporarily stored in Cloudflare data centers. This storage is essential for the proper delivery and retrieval of emails during the active session."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Deletion of Emails",children:"3. Deletion of Emails"}),m.jsx("p",{className:"mt-4",children:"Once an email expires, we ensure the complete deletion of the email from our system. This means that all associated data, including the email content and any related information, will be permanently removed from our servers."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Data Security",children:"4. Data Security"}),m.jsx("p",{className:"mt-4",children:"We take appropriate measures to protect the personal information and emails stored on our website. However, it is important to note that no method of data transmission or storage is completely secure. While we strive to use commercially acceptable means to protect user data, we cannot guarantee absolute security."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Third-Party Services",children:"5. Third-Party Services"}),m.jsx("p",{className:"mt-4",children:"We may use third-party services, such as Cloudflare, to assist in the operation and maintenance of our website. These third-party services may have access to certain user data, including email names and content, solely for the purpose of providing their services. We ensure that any third-party services we use are reputable and have appropriate data protection measures in place."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"",children:"6. Information Sharing"}),m.jsx("p",{className:"mt-4",children:"We do not share, sell, or disclose any personal information or email content to third parties, except as required by law or as necessary to protect our rights, property, or safety."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Cookies",children:"7. Cookies"}),m.jsx("p",{className:"mt-4",children:"We may use cookies to enhance the user experience on our website. These cookies may collect non-personal information and are used solely for website analytics and functionality purposes."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Children's Privacy",children:"8. Children's Privacy"}),m.jsx("p",{className:"mt-4",children:"Our website is not intended for use by individuals under the age of 13. We do not knowingly collect personal information from children. If you believe that we may have inadvertently collected personal information from a child under 13, please contact us immediately, and we will take appropriate steps to delete such information."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Changes to the Privacy Policy",children:"9. Changes to the Privacy Policy"}),m.jsx("p",{className:"mt-4",children:"We reserve the right to modify or update this Privacy Policy at any time. Any changes made will be effective immediately upon posting the revised Privacy Policy on our website. It is advisable to review this Privacy Policy periodically for any updates."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Contact Us",children:"10. Contact Us"}),m.jsx("p",{className:"mt-4",children:"If you have any questions, concerns, or feedback regarding this Privacy Policy or our website's privacy practices, please contact us."}),m.jsx("p",{className:"mt-8",children:"Last updated: 2024-03-15"})]})})}function j4(){return m.jsx("div",{children:m.jsxs("div",{className:"max-w-[1400px] ",children:[m.jsx("p",{className:"mt-8",children:'Welcome to Vmail.DEV! These Terms of Service ("Terms") govern your access to and use of our website and services. By accessing or using our services, you agree to be bound by these Terms. If you do not agree to these Terms, please do not use our services.'}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Collection of Information",children:"1. Description of Service"}),m.jsx("p",{className:"mt-4",children:"Vmail.DEV is a minimalistic temporary email service that allows you to obtain a temporary email address without disclosing any personal information, ensuring the protection of your privacy. Our service supports the selection of multiple domain names, providing you with the convenience of using it in various scenarios. Additionally, Vmail.DEV operates on the Cloudflare network, guaranteeing a super-fast experience."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Storage of Emails",children:"2. Usage Restrictions"}),m.jsx("p",{className:"mt-4",children:"2.1 Availability: Please note that Vmail.DEV is not available in China Mainland. We apologize for any inconvenience caused."}),m.jsx("p",{className:"mt-4",children:"2.2 Copyright: All copyrights related to Vmail.DEV and its services belong to Vmail.DEV. You may not copy, reproduce, distribute, modify, or create derivative works of Vmail.DEV or any part thereof without explicit permission from Vmail.DEV."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Deletion of Emails",children:"3. User Responsibilities"}),m.jsx("p",{className:"mt-4",children:"3.1 Registration: You are not required to register or provide any personal information to use Vmail.DEV. However, you are solely responsible for maintaining the confidentiality of any temporary email addresses generated through our service."}),m.jsx("p",{className:"mt-4",children:"3.2 Prohibited Activities: While using Vmail.DEV, you agree not to engage in any activities that may violate any applicable laws, regulations, or these Terms. Prohibited activities include, but are not limited to:"}),m.jsxs("ul",{className:"mt-4",children:[m.jsx("li",{children:"a) Sending spam or unsolicited emails. "}),m.jsx("li",{children:"b) Interfering with or disrupting the operation of our services."}),m.jsx("li",{children:"c) Attempting to gain unauthorized access to our systems or networks."})]}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Data Security",children:"4. Disclaimer of Warranty"}),m.jsx("p",{className:"mt-4",children:'Vmail.DEV is provided on an "as is" and "as available" basis. We do not warrant that our services will be uninterrupted, error-free, or secure. Your use of Vmail.DEV is at your own risk, and we disclaim all warranties, whether express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, and non-infringement.'}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Third-Party Services",children:"5. Limitation of Liability"}),m.jsx("p",{className:"mt-4",children:"To the maximum extent permitted by law, in no event shall Vmail.DEV or its affiliates be liable for any indirect, incidental, special, consequential, or punitive damages, including without limitation, loss of profits, data, use, goodwill, or other intangible losses, resulting from your access to or use of Vmail.DEV or any content or services provided through Vmail.DEV."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"",children:"6. Modification of Terms"}),m.jsx("p",{className:"mt-4",children:"We reserve the right to modify these Terms at any time, without prior notice. Any changes to the Terms will be effective immediately upon posting. Your continued use of Vmail.DEV after the posting of any modified Terms constitutes your acceptance of such changes."}),m.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Cookies",children:"7. Governing Law and Jurisdiction"}),m.jsx("p",{className:"mt-4",children:"These Terms shall be governed by and construed in accordance with the laws of the jurisdiction where Vmail.DEV is located. Any disputes arising out of or in connection with these Terms shall be subject to the exclusive jurisdiction of the courts in that jurisdiction."}),m.jsx("p",{className:"mt-4",children:"If you have any questions or concerns regarding these Terms, please contact us."}),m.jsx("p",{className:"mt-8",children:"Last updated: 2024-04-10"})]})})}function N4(){const{t:e}=$r(),[t,n]=b.useState(!1),[r,i]=b.useState(!1),[s,o]=b.useState(!1);return m.jsxs(m.Fragment,{children:[m.jsxs("header",{className:"fixed top-0 z-20 h-20 w-full px-5 backdrop-blur-xl md:px-10 text-white flex items-center justify-between shadow-sm",children:[m.jsxs(j1,{to:"/",className:"font-bold flex items-center justify-center gap-3",children:[m.jsx(E4,{}),m.jsx("button",{className:"cool-btn",children:m.jsx("span",{children:"VMAIL.DEV"})})]}),m.jsxs("nav",{className:"flex items-center",children:[m.jsx("button",{onClick:()=>n(!0),className:"ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400",children:e("About")}),m.jsx("button",{onClick:()=>i(!0),className:"ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400",children:e("Privacy")}),m.jsx("button",{onClick:()=>o(!0),className:"ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400",children:e("Terms")}),m.jsx("a",{className:"ml-3 md:ml-8",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/oiov/vmail",children:m.jsxs("button",{className:"whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-transparent hover:bg-accent hover:text-accent-foreground text-md flex h-[32px] w-[85px] cursor-pointer items-center justify-center rounded-md border-2 p-2 font-semibold hover:opacity-50",children:[m.jsx(T4,{}),m.jsx("div",{className:"ml-1.5 text-sm",children:"Star"})]})})]})]}),m.jsx(Oa,{showModal:t,setShowModal:n,title:e("About"),children:m.jsx(O4,{})}),m.jsx(Oa,{showModal:r,setShowModal:i,title:e("Privacy"),children:m.jsx(R4,{})}),m.jsx(Oa,{showModal:s,setShowModal:o,title:e("Terms"),children:m.jsx(j4,{})})]})}function L4({className:e}){return m.jsx("svg",{width:"512",height:"512",viewBox:"0 0 24 24",className:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{fill:"currentColor",d:"M8.5 2h2.5L11 2h-2.5zM13 2h2.5L15.5 2h-2.5zM10.5 2h5v0h-5zM8.5 2h5v0h-5zM10 2h3.5L13.5 2h-3.5z",children:m.jsx("animate",{fill:"freeze",attributeName:"d",dur:"0.4s",keyTimes:"0;0.3;0.5;1",values:` - M8.5 2h2.5L11 2h-2.5zM13 2h2.5L15.5 2h-2.5zM10.5 2h5v0h-5zM8.5 2h5v0h-5zM10 2h3.5L13.5 2h-3.5z; - M8.5 2h2.5L11 22h-2.5zM13 2h2.5L15.5 22h-2.5zM10.5 2h5v2h-5zM8.5 20h5v2h-5zM10 2h3.5L13.5 22h-3.5z; - M8.5 2h2.5L11 22h-2.5zM13 2h2.5L15.5 22h-2.5zM10.5 2h5v2h-5zM8.5 20h5v2h-5zM10 2h3.5L13.5 22h-3.5z; - M1 2h2.5L18.5 22h-2.5zM5.5 2h2.5L23 22h-2.5zM3 2h5v2h-5zM16 20h5v2h-5zM18.5 2h3.5L5 22h-3.5z`})})})}function D4({className:e}){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 24 24",className:"h-6 w-6",fill:"currentColor",children:m.jsx("path",{d:"M1 150c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z",children:m.jsx("animate",{fill:"freeze",attributeName:"d",dur:"0.4s",keyTimes:"0;0.3;0.5;1",values:`M4 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z; - M8 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z; - M10 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z; - M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z`})})})}function M4(e){return m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[m.jsx("path",{color:"#0070f3",strokeWidth:"3",d:"m12 14 4-4"}),m.jsx("defs",{children:m.jsxs("linearGradient",{id:"gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[m.jsx("stop",{offset:"0%",style:{stopColor:"rgb(35, 35, 35)",stopOpacity:"1"}}),m.jsx("stop",{offset:"100%",style:{stopColor:"rgb(100,100,100)",stopOpacity:"1"}})]})}),m.jsx("path",{d:"M3.34 19a10 10 0 1 1 17.32 0",stroke:"url(#gradient)",strokeWidth:"3"})]})}function A4(){return m.jsxs("div",{className:"text-white w-full mt-auto flex flex-col items-center justify-between px-5 pt-16 mb-10 md:px-10 mx-auto sm:flex-row",children:[m.jsx(j1,{to:"/",className:"text-xl font-black leading-none select-none logo",children:"VMAIL.DEV"})," ",m.jsxs("p",{className:"mt-4 text-sm text-gray-400 sm:ml-4 sm:pl-4 sm:border-l sm:border-gray-200 sm:mt-0",children:["© 2024 Products of"," ",m.jsx("a",{className:"font-semibold underline hover:text-gray-600",href:"https://www.oiov.dev",target:"_blank",rel:"noopener noreferrer",children:"oiov"}),"."]}),m.jsxs("div",{className:"inline-flex justify-center mt-4 space-x-5 sm:ml-auto sm:mt-0 sm:justify-start",children:[m.jsx("a",{href:"https://wr.do",target:"_blank",rel:"noopener noreferrer",title:"WR.DO",className:"text-gray-400 hover:text-gray-500 scale-[1.2]",children:m.jsx(M4,{className:"w-6 h-6"})}),m.jsx("a",{href:"mailto:hi@oiov.dev",title:"Email",className:"text-gray-400 hover:text-gray-500",children:m.jsx(Y1,{className:"w-6 h-6"})}),m.jsx("a",{href:"https://twitter.com/yesmoree",target:"_blank",rel:"noopener noreferrer",title:"Twitter",className:"text-gray-400 hover:text-gray-500",children:m.jsx(L4,{})}),m.jsx("a",{href:"https://github.com/oiov/vmail",target:"_blank",rel:"noopener noreferrer",title:"Github",className:"text-gray-400 hover:text-gray-500",children:m.jsx(D4,{})})]})]})}function F4(){return m.jsxs("div",{className:"mx-auto min-h-screen flex flex-col bg-[#1f2023]",children:[m.jsx(N4,{}),m.jsx(yk,{}),m.jsx(A4,{}),m.jsx(AE,{position:"bottom-right",toastOptions:{style:{background:"#333",color:"#fff"}}})]})}const _4=new Nb;function I4(){const[e,t]=b.useState(null);return b.useEffect(()=>{we.get("/config").then(n=>{t(n.data)})},[]),e?m.jsx(J1.Provider,{value:e,children:m.jsx(Fb,{client:_4,children:m.jsx(Ek,{children:m.jsx(wk,{children:m.jsx(lf,{element:m.jsx(F4,{}),children:m.jsx(lf,{path:"/",element:m.jsx(k4,{})})})})})})}):m.jsx("div",{className:"bg-[#1f2023] text-white w-screen h-screen flex items-center justify-center",children:"Loading..."})}const B=e=>typeof e=="string",us=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Hg=e=>e==null?"":""+e,V4=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},U4=/###/g,Kg=e=>e&&e.indexOf("###")>-1?e.replace(U4,"."):e,qg=e=>!e||B(e),Ms=(e,t,n)=>{const r=B(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=Ms(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let s=t[t.length-1],o=t.slice(0,t.length-1),a=Ms(e,o,Object);for(;a.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=Ms(e,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${s}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=n},$4=(e,t,n,r)=>{const{obj:i,k:s}=Ms(e,t,Object);i[s]=i[s]||[],i[s].push(n)},pl=(e,t)=>{const{obj:n,k:r}=Ms(e,t);if(n)return n[r]},B4=(e,t,n)=>{const r=pl(e,n);return r!==void 0?r:pl(t,n)},jx=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?B(e[r])||e[r]instanceof String||B(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):jx(e[r],t[r],n):e[r]=t[r]);return e},Hr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var z4={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const W4=e=>B(e)?e.replace(/[&<>"'\/]/g,t=>z4[t]):e;class H4{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const K4=[" ",",","?","!",";"],q4=new H4(20),Q4=(e,t,n)=>{t=t||"",n=n||"";const r=K4.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const i=q4.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s},Mf=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let s=0;s-1&&le&&e.replace("_","-"),Y4={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class gl{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Y4,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[a,l]=o;for(let u=0;u{let[a,l]=o;for(let u=0;u1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):B(r)&&s?a.push(...r.split(s)):a.push(r)));const l=pl(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!o||!B(r)?l:Mf(this.data&&this.data[t]&&this.data[t][n],r,s)}addResource(t,n,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),Qg(this.data,a,i),s.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(B(r[s])||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let l=pl(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?jx(l,r,s):l={...l,...r},Qg(this.data,a,l),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var Nx={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,n,r,i))}),t}};const Gg={};class yl extends Jl{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),V4(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=qt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Q4(t,r,i);if(o&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:B(s)?[s]:s};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(i)}return{key:t,namespaces:B(s)?[s]:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const S=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${S}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${S}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:o}const f=this.resolve(t,n);let d=f&&f.res;const h=f&&f.usedKey||o,p=f&&f.exactUsedKey||o,w=Object.prototype.toString.apply(d),x=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!B(d)&&typeof d!="boolean"&&typeof d!="number";if(y&&d&&v&&x.indexOf(w)<0&&!(B(g)&&Array.isArray(d))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,d,{...n,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(f.res=S,f.usedParams=this.getUsedParamsDetails(n),f):S}if(s){const S=Array.isArray(d),C=S?[]:{},E=S?p:h;for(const T in d)if(Object.prototype.hasOwnProperty.call(d,T)){const R=`${E}${s}${T}`;C[T]=this.translate(R,{...n,joinArrays:!1,ns:a}),C[T]===R&&(C[T]=d[T])}d=C}}else if(y&&B(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,t,n,r));else{let S=!1,C=!1;const E=n.count!==void 0&&!B(n.count),T=yl.hasDefaultValue(n),R=E?this.pluralResolver.getSuffix(u,n.count,n):"",F=n.ordinal&&E?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",V=E&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),G=V&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${F}`]||n.defaultValue;!this.isValidLookup(d)&&T&&(S=!0,d=G),this.isValidLookup(d)||(C=!0,d=o);const be=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:d,ie=T&&G!==d&&this.options.updateMissing;if(C||S||ie){if(this.logger.log(ie?"updateKey":"missingKey",u,l,o,ie?G:d),s){const j=this.resolve(o,{...n,keySeparator:!1});j&&j.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 k=[];const N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&N&&N[0])for(let j=0;j{const K=T&&D!==d?D:be;this.options.missingKeyHandler?this.options.missingKeyHandler(j,l,M,K,ie,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(j,l,M,K,ie,n),this.emit("missingKey",j,l,M,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?k.forEach(j=>{const M=this.pluralResolver.getSuffixes(j,n);V&&n[`defaultValue${this.options.pluralSeparator}zero`]&&M.indexOf(`${this.options.pluralSeparator}zero`)<0&&M.push(`${this.options.pluralSeparator}zero`),M.forEach(D=>{_([j],o+D,n[`defaultValue${D}`]||G)})}):_(k,o,G))}d=this.extendTranslation(d,t,n,f,r),C&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${o}`),(C||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,S?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(f.res=d,f.usedParams=this.getUsedParamsDetails(n),f):d}extendTranslation(t,n,r,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=B(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let f=r.replace&&!B(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),u){const d=t.match(this.interpolator.nestingRegexp),h=d&&d.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,o,a;return B(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;i=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=n.count!==void 0&&!B(n.count),h=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(B(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(x=>{this.isValidLookup(r)||(a=x,!Gg[`${w[0]}-${x}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Gg[`${w[0]}-${x}`]=!0,this.logger.warn(`key "${i}" for languages "${w.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),w.forEach(g=>{if(this.isValidLookup(r))return;o=g;const y=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,c,g,x,n);else{let S;d&&(S=this.pluralResolver.getSuffix(g,n.count,n));const C=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(y.push(c+S),n.ordinal&&S.indexOf(E)===0&&y.push(c+S.replace(E,this.options.pluralSeparator)),h&&y.push(c+C)),p){const T=`${c}${this.options.contextSeparator}${n.context}`;y.push(T),d&&(y.push(T+S),n.ordinal&&S.indexOf(E)===0&&y.push(T+S.replace(E,this.options.pluralSeparator)),h&&y.push(T+C))}}let v;for(;v=y.pop();)this.isValidLookup(r)||(s=v,r=this.getResource(g,x,v,n))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=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=t.replace&&!B(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const s of n)delete i[s]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const Ku=e=>e.charAt(0).toUpperCase()+e.slice(1);class Xg{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=qt.create("languageUtils")}getScriptPartFromCode(t){if(t=ml(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=ml(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(B(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ku(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ku(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Ku(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),B(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return B(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):B(t)&&s(this.formatLanguageCode(t)),r.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let G4=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],X4={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const J4=["v1","v2","v3"],Z4=["v4"],Jg={zero:0,one:1,two:2,few:3,many:4,other:5},eN=()=>{const e={};return G4.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:X4[t.fc]}})}),e};class tN{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=qt.create("pluralResolver"),(!this.options.compatibilityJSON||Z4.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=eN(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=ml(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let o;try{o=new Intl.PluralRules(r,{type:i})}catch{if(!t.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,n)}return this.pluralRulesCache[s]=o,o}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,s)=>Jg[i]-Jg[s]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!J4.includes(this.options.compatibilityJSON)}}const Zg=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=B4(e,t,n);return!s&&i&&B(n)&&(s=Mf(e,n,r),s===void 0&&(s=Mf(t,n,r))),s},qu=e=>e.replace(/\$/g,"$$$$");class nN{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=qt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:w,nestingOptionsSeparator:x,maxReplaces:g,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:W4,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Hr(s):o||"{{",this.suffix=a?Hr(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Hr(d):h||Hr("$t("),this.nestingSuffix=p?Hr(p):w||Hr(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=g||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let s,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=h=>{if(h.indexOf(this.formatSeparator)<0){const g=Zg(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,r,{...i,...n,interpolationkey:h}):g}const p=h.split(this.formatSeparator),w=p.shift().trim(),x=p.join(this.formatSeparator).trim();return this.format(Zg(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),x,r,{...i,...n,interpolationkey:w})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>qu(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?qu(this.escape(h)):qu(h)}].forEach(h=>{for(a=0;s=h.regex.exec(t);){const p=s[1].trim();if(o=u(p),o===void 0)if(typeof c=="function"){const x=c(t,s,i);o=B(x)?x:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(f){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),o="";else!B(o)&&!this.useRawValueToEscape&&(o=Hg(o));const w=h.safeValue(o);if(t=t.replace(s[0],w),f?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=s[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const f=l.split(new RegExp(`${c}[ ]*{`));let d=`{${f[1]}`;l=f[0],d=this.interpolate(d,o);const h=d.match(/'/g),p=d.match(/"/g);(h&&h.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${c}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...r},o=o.replace&&!B(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),l=c,u=!0}if(s=n(a.call(this,i[1].trim(),o),o),s&&i[0]===t&&!B(s))return s;B(s)||(s=Hg(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),u&&(s=l.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}const rN=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Kr=e=>{const t={};return(n,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const o=r+JSON.stringify(s);let a=t[o];return a||(a=e(ml(r),i),t[o]=a),a(n)}};class iN{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=qt.create("formatter"),this.options=t,this.formats={number:Kr((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return s=>i.format(s)}),currency:Kr((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>i.format(s)}),datetime:Kr((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return s=>i.format(s)}),relativetime:Kr((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return s=>i.format(s,r.range||"day")}),list:Kr((n,r)=>{const i=new Intl.ListFormat(n,{...r});return s=>i.format(s)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Kr(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(a=>a.indexOf(")")>-1)){const a=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,a)].join(this.formatSeparator)}return s.reduce((a,l)=>{const{formatName:u,formatOptions:c}=rN(l);if(this.formats[u]){let f=a;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=d.locale||d.lng||i.locale||i.lng||r;f=this.formats[u](a,h,{...c,...i,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const sN=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class oN extends Jl{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=qt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const s={},o={},a={},l={};return t.forEach(u=>{let c=!0;n.forEach(f=>{const d=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,c=!1,o[d]===void 0&&(o[d]=!0),s[d]===void 0&&(s[d]=!0),l[f]===void 0&&(l[f]=!0)))}),c||(a[u]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),s=i[0],o=i[1];n&&this.emit("failedLoading",s,o,n),!n&&r&&this.store.addResourceBundle(s,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(l=>{$4(l.loaded,[s],o),sN(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:s,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,s*2,o)},s);return}o(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=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."),i&&i();B(t)&&(t=this.languageUtils.toResolveHierarchy(t)),B(n)&&(n=[n]);const s=this.queueLoad(t,n,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${s} for language ${i}`,a),this.loaded(t,o,a)})}saveMissing(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&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&&this.backend.create){const l={...o,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,i,l):c=u(t,n,r,i),c&&typeof c.then=="function"?c.then(f=>a(null,f)).catch(a):a(null,c)}catch(c){a(c)}else u(t,n,r,i,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const ey=()=>({debug:!1,initImmediate:!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:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),B(e[1])&&(t.defaultValue=e[1]),B(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),ty=e=>(B(e.ns)&&(e.ns=[e.ns]),B(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),B(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ia=()=>{},aN=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ao extends Jl{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ty(t),this.services={},this.logger=qt,this.modules={external:[]},aN(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=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&&n.defaultNS!==!1&&n.ns&&(B(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=ey();this.options={...i,...this.options,...ty(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?qt.init(s(this.modules.logger),this.options):qt.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=iN);const f=new Xg(this.options);this.store=new Yg(this.options.resources,this.options);const d=this.services;d.logger=qt,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new tN(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=s(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new nN(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new oN(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(h){for(var p=arguments.length,w=new Array(p>1?p-1:0),x=1;x1?p-1:0),x=1;x{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ia),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=us(),u=()=>{const c=(f,d)=>{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),l.resolve(d),r(f,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ia;const i=B(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=us();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ia),this.services.backendConnector.reload(t,n,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Nx.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=us();this.emit("languageChanging",t);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=B(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{o(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const s=function(o,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),f=2;f`${l.keyPrefix}${d}${p}`):h=l.keyPrefix?`${l.keyPrefix}${d}${o}`:o,i.t(h,l)};return B(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){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],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!i||o(s,t)))}loadNamespaces(t,n){const r=us();return this.options.ns?(B(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=us();B(t)&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)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&&this.services.languageUtils||new Xg(ey());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new ao(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ia;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new ao(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new Yg(this.store.data,i),s.services.resourceStore=s.store),s.translator=new yl(s.services,i),s.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c0){var a=i.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(i.domain){if(!ny.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!ny.test(i.path))throw new TypeError("option path is invalid");o+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){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 o},ry={create:function(t,n,r,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+r*60*1e3)),i&&(s.domain=i),document.cookie=gN(t,encodeURIComponent(n),s)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),s=i.split("&"),o=0;o0){var l=s[o].substring(0,a);l===t.lookupQuerystring&&(n=s[o].substring(a+1))}}}return n}},cs=null,iy=function(){if(cs!==null)return cs;try{cs=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{cs=!1}return cs},wN={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&iy()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&iy()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},fs=null,sy=function(){if(fs!==null)return fs;try{fs=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{fs=!1}return fs},xN={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&sy()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&sy()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},SN={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},bN={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},PN={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},CN={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},Dx=!1;try{document.cookie,Dx=!0}catch{}var Mx=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Dx||Mx.splice(1,1);function kN(){return{order:Mx,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var Ax=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};lN(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return dN(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=mN(r,this.options||{},kN()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(s){return s.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(yN),this.addDetector(vN),this.addDetector(wN),this.addDetector(xN),this.addDetector(SN),this.addDetector(bN),this.addDetector(PN),this.addDetector(CN)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(s){if(r.detectors[s]){var o=r.detectors[s].lookup(r.options);o&&typeof o=="string"&&(o=[o]),o&&(i=i.concat(o))}}),i=i.map(function(s){return r.options.convertDetectedLanguage(s)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(s){i.detectors[s]&&i.detectors[s].cacheUserLanguage(n,i.options)}))}}])}();Ax.type="languageDetector";function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Af(e)}function Fx(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Af(XMLHttpRequest))==="object"}function EN(e){return!!e&&typeof e.then=="function"}function TN(e){return EN(e)?e:Promise.resolve(e)}function ON(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ff={exports:{}},sa={exports:{}},oy;function RN(){return oy||(oy=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof xs<"u"&&xs,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function u(k){return k&&DataView.prototype.isPrototypeOf(k)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(k){return k&&c.indexOf(Object.prototype.toString.call(k))>-1};function d(k){if(typeof k!="string"&&(k=String(k)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(k)||k==="")throw new TypeError('Invalid character in header field name: "'+k+'"');return k.toLowerCase()}function h(k){return typeof k!="string"&&(k=String(k)),k}function p(k){var N={next:function(){var _=k.shift();return{done:_===void 0,value:_}}};return l.iterable&&(N[Symbol.iterator]=function(){return N}),N}function w(k){this.map={},k instanceof w?k.forEach(function(N,_){this.append(_,N)},this):Array.isArray(k)?k.forEach(function(N){this.append(N[0],N[1])},this):k&&Object.getOwnPropertyNames(k).forEach(function(N){this.append(N,k[N])},this)}w.prototype.append=function(k,N){k=d(k),N=h(N);var _=this.map[k];this.map[k]=_?_+", "+N:N},w.prototype.delete=function(k){delete this.map[d(k)]},w.prototype.get=function(k){return k=d(k),this.has(k)?this.map[k]:null},w.prototype.has=function(k){return this.map.hasOwnProperty(d(k))},w.prototype.set=function(k,N){this.map[d(k)]=h(N)},w.prototype.forEach=function(k,N){for(var _ in this.map)this.map.hasOwnProperty(_)&&k.call(N,this.map[_],_,this)},w.prototype.keys=function(){var k=[];return this.forEach(function(N,_){k.push(_)}),p(k)},w.prototype.values=function(){var k=[];return this.forEach(function(N){k.push(N)}),p(k)},w.prototype.entries=function(){var k=[];return this.forEach(function(N,_){k.push([_,N])}),p(k)},l.iterable&&(w.prototype[Symbol.iterator]=w.prototype.entries);function x(k){if(k.bodyUsed)return Promise.reject(new TypeError("Already read"));k.bodyUsed=!0}function g(k){return new Promise(function(N,_){k.onload=function(){N(k.result)},k.onerror=function(){_(k.error)}})}function y(k){var N=new FileReader,_=g(N);return N.readAsArrayBuffer(k),_}function v(k){var N=new FileReader,_=g(N);return N.readAsText(k),_}function S(k){for(var N=new Uint8Array(k),_=new Array(N.length),j=0;j-1?N:k}function F(k,N){if(!(this instanceof F))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');N=N||{};var _=N.body;if(k instanceof F){if(k.bodyUsed)throw new TypeError("Already read");this.url=k.url,this.credentials=k.credentials,N.headers||(this.headers=new w(k.headers)),this.method=k.method,this.mode=k.mode,this.signal=k.signal,!_&&k._bodyInit!=null&&(_=k._bodyInit,k.bodyUsed=!0)}else this.url=String(k);if(this.credentials=N.credentials||this.credentials||"same-origin",(N.headers||!this.headers)&&(this.headers=new w(N.headers)),this.method=R(N.method||this.method||"GET"),this.mode=N.mode||this.mode||null,this.signal=N.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&_)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(_),(this.method==="GET"||this.method==="HEAD")&&(N.cache==="no-store"||N.cache==="no-cache")){var j=/([?&])_=[^&]*/;if(j.test(this.url))this.url=this.url.replace(j,"$1_="+new Date().getTime());else{var M=/\?/;this.url+=(M.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}F.prototype.clone=function(){return new F(this,{body:this._bodyInit})};function V(k){var N=new FormData;return k.trim().split("&").forEach(function(_){if(_){var j=_.split("="),M=j.shift().replace(/\+/g," "),D=j.join("=").replace(/\+/g," ");N.append(decodeURIComponent(M),decodeURIComponent(D))}}),N}function G(k){var N=new w,_=k.replace(/\r?\n[\t ]+/g," ");return _.split("\r").map(function(j){return j.indexOf(` -`)===0?j.substr(1,j.length):j}).forEach(function(j){var M=j.split(":"),D=M.shift().trim();if(D){var K=M.join(":").trim();N.append(D,K)}}),N}E.call(F.prototype);function te(k,N){if(!(this instanceof te))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');N||(N={}),this.type="default",this.status=N.status===void 0?200:N.status,this.ok=this.status>=200&&this.status<300,this.statusText=N.statusText===void 0?"":""+N.statusText,this.headers=new w(N.headers),this.url=N.url||"",this._initBody(k)}E.call(te.prototype),te.prototype.clone=function(){return new te(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new w(this.headers),url:this.url})},te.error=function(){var k=new te(null,{status:0,statusText:""});return k.type="error",k};var be=[301,302,303,307,308];te.redirect=function(k,N){if(be.indexOf(N)===-1)throw new RangeError("Invalid status code");return new te(null,{status:N,headers:{location:k}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(N,_){this.message=N,this.name=_;var j=Error(N);this.stack=j.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function ie(k,N){return new Promise(function(_,j){var M=new F(k,N);if(M.signal&&M.signal.aborted)return j(new o.DOMException("Aborted","AbortError"));var D=new XMLHttpRequest;function K(){D.abort()}D.onload=function(){var ce={status:D.status,statusText:D.statusText,headers:G(D.getAllResponseHeaders()||"")};ce.url="responseURL"in D?D.responseURL:ce.headers.get("X-Request-URL");var Pe="response"in D?D.response:D.responseText;setTimeout(function(){_(new te(Pe,ce))},0)},D.onerror=function(){setTimeout(function(){j(new TypeError("Network request failed"))},0)},D.ontimeout=function(){setTimeout(function(){j(new TypeError("Network request failed"))},0)},D.onabort=function(){setTimeout(function(){j(new o.DOMException("Aborted","AbortError"))},0)};function J(ce){try{return ce===""&&a.location.href?a.location.href:ce}catch{return ce}}D.open(M.method,J(M.url),!0),M.credentials==="include"?D.withCredentials=!0:M.credentials==="omit"&&(D.withCredentials=!1),"responseType"in D&&(l.blob?D.responseType="blob":l.arrayBuffer&&M.headers.get("Content-Type")&&M.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(D.responseType="arraybuffer")),N&&typeof N.headers=="object"&&!(N.headers instanceof w)?Object.getOwnPropertyNames(N.headers).forEach(function(ce){D.setRequestHeader(ce,h(N.headers[ce]))}):M.headers.forEach(function(ce,Pe){D.setRequestHeader(Pe,ce)}),M.signal&&(M.signal.addEventListener("abort",K),D.onreadystatechange=function(){D.readyState===4&&M.signal.removeEventListener("abort",K)}),D.send(typeof M._bodyInit>"u"?null:M._bodyInit)})}return ie.polyfill=!0,a.fetch||(a.fetch=ie,a.Headers=w,a.Request=F,a.Response=te),o.Headers=w,o.Request=F,o.Response=te,o.fetch=ie,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(sa,sa.exports)),sa.exports}(function(e,t){var n=typeof fetch=="function"?fetch:void 0;if(typeof xs<"u"&&xs.fetch?n=xs.fetch:typeof window<"u"&&window.fetch&&(n=window.fetch),typeof ON<"u"&&typeof window>"u"){var r=n||RN();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Ff,Ff.exports);var _x=Ff.exports;const Ix=Cy(_x),ay=Py({__proto__:null,default:Ix},[_x]);function ly(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uy(e){for(var t=1;t"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,a=uy({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:s},fy?{}:o),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{cy(n,a,i,l)}catch(u){if(!o||Object.keys(o).length===0||!u.message||u.message.indexOf("not implemented")<0)return i(u);try{Object.keys(o).forEach(function(c){delete a[c]}),cy(n,a,i,l),fy=!0}catch(c){i(c)}}},MN=function(t,n,r,i){r&&_r(r)==="object"&&(r=_f("",r).slice(1)),t.queryStringParams&&(n=_f(n,t.queryStringParams));try{var s;uo?s=new uo:s=new vl("MSXML2.XMLHTTP.3.0"),s.open(r?"POST":"GET",n,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,r&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)s.setRequestHeader(a,o[a]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(r)}catch(l){console&&console.log(l)}},AN=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Jn&&n.indexOf("file:")!==0)return DN(t,n,r,i);if(Fx()||typeof ActiveXObject=="function")return MN(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function zi(e){"@babel/helpers - typeof";return zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(e)}function dy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qu(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};FN(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return IN(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Qu(Qu(Qu({},UN()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);zi(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,s,o){var a=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=TN(l),l.then(function(u){if(!u)return o(null,{});var c=a.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});a.loadUrl(c,o,r,s)})}},{key:"loadUrl",value:function(n,r,i,s){var o=this,a=typeof i=="string"?[i]:i,l=typeof s=="string"?[s]:s,u=this.options.parseLoadPayload(a,l);this.options.request(this.options,n,u,function(c,f){if(f&&(f.status>=500&&f.status<600||!f.status))return r("failed loading "+n+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return r("failed loading "+n+"; status code: "+f.status,!1);if(!f&&c&&c.message){var d=c.message.toLowerCase(),h=["failed","fetch","network","load"].find(function(x){return d.indexOf(x)>-1});if(h)return r("failed loading "+n+": "+c.message,!0)}if(c)return r(c,!1);var p,w;try{typeof f.data=="string"?p=o.options.parse(f.data,i,s):p=f.data}catch{w="failed parsing "+n+" to json"}if(w)return r(w,!1);r(null,p)})}},{key:"create",value:function(n,r,i,s,o){var a=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,s),u=0,c=[],f=[];n.forEach(function(d){var h=a.options.addPath;typeof a.options.addPath=="function"&&(h=a.options.addPath(d,r));var p=a.services.interpolator.interpolate(h,{lng:d,ns:r});a.options.request(a.options,p,l,function(w,x){u+=1,c.push(w),f.push(x),u===n.length&&typeof o=="function"&&o(c,f)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,s=r.languageUtils,o=r.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var l=[],u=function(f){var d=s.toResolveHierarchy(f);d.forEach(function(h){l.indexOf(h)<0&&l.push(h)})};u(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),l.forEach(function(c){n.allOptions.ns.forEach(function(f){i.read(c,f,"read",null,null,function(d,h){d&&o.warn("loading namespace ".concat(f," for language ").concat(c," failed"),d),!d&&h&&o.log("loaded namespace ".concat(f," for language ").concat(c),h),i.loaded("".concat(c,"|").concat(f),d,h)})})})}}}])}();$x.type="backend";Be.use($x).use(Ax).use(Bk).init({debug:!0,fallbackLng:"en",ns:["common"],defaultNS:"common",supportedLngs:["en","zh","fr","ja","hi","de","ko","zh-TW","it","pt","tr","ru"],backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["cookie","localStorage","htmlTag","path","subdomain"],caches:["cookie","localStorage"]}});Gu.createRoot(document.getElementById("root")).render(m.jsx(Yu.StrictMode,{children:m.jsx(Yu.Suspense,{fallback:"loading...",children:m.jsx(I4,{})})})); diff --git a/frontend/build/client/assets/main-Cj20Dz1y.js b/frontend/build/client/assets/main-Cj20Dz1y.js new file mode 100644 index 0000000..35875cf --- /dev/null +++ b/frontend/build/client/assets/main-Cj20Dz1y.js @@ -0,0 +1,264 @@ +var Yx=Object.defineProperty;var Rh=e=>{throw TypeError(e)};var Gx=(e,t,n)=>t in e?Yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var jh=(e,t,n)=>Gx(e,typeof t!="symbol"?t+"":t,n),ru=(e,t,n)=>t.has(e)||Rh("Cannot "+n);var P=(e,t,n)=>(ru(e,t,"read from private field"),n?n.call(e):t.get(e)),z=(e,t,n)=>t.has(e)?Rh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),I=(e,t,n,r)=>(ru(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Q=(e,t,n)=>(ru(e,t,"access private method"),n);var Ao=(e,t,n,r)=>({set _(i){I(e,t,i,n)},get _(){return P(e,t,r)}});function Ty(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ry={exports:{}},bl={},jy={exports:{}},G={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var wo=Symbol.for("react.element"),Xx=Symbol.for("react.portal"),Jx=Symbol.for("react.fragment"),Zx=Symbol.for("react.strict_mode"),e2=Symbol.for("react.profiler"),t2=Symbol.for("react.provider"),n2=Symbol.for("react.context"),r2=Symbol.for("react.forward_ref"),i2=Symbol.for("react.suspense"),s2=Symbol.for("react.memo"),o2=Symbol.for("react.lazy"),Nh=Symbol.iterator;function a2(e){return e===null||typeof e!="object"?null:(e=Nh&&e[Nh]||e["@@iterator"],typeof e=="function"?e:null)}var Ny={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ly=Object.assign,Dy={};function Ki(e,t,n){this.props=e,this.context=t,this.refs=Dy,this.updater=n||Ny}Ki.prototype.isReactComponent={};Ki.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ki.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function My(){}My.prototype=Ki.prototype;function Uf(e,t,n){this.props=e,this.context=t,this.refs=Dy,this.updater=n||Ny}var Bf=Uf.prototype=new My;Bf.constructor=Uf;Ly(Bf,Ki.prototype);Bf.isPureReactComponent=!0;var Lh=Array.isArray,Ay=Object.prototype.hasOwnProperty,zf={current:null},Fy={key:!0,ref:!0,__self:!0,__source:!0};function Iy(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Ay.call(t,r)&&!Fy.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,U=j[A];if(0>>1;Ai(pt,D))Wi(Ne,pt)?(j[A]=Ne,j[W]=D,A=W):(j[A]=pt,j[ve]=D,A=ve);else if(Wi(Ne,D))j[A]=Ne,j[W]=D,A=W;else break e}}return M}function i(j,M){var D=j.sortIndex-M.sortIndex;return D!==0?D:j.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,d=3,h=!1,m=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(j){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=j)r(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=n(u)}}function b(j){if(w=!1,v(j),!m)if(n(l)!==null)m=!0,N(C);else{var M=n(u);M!==null&&_(b,M.startTime-j)}}function C(j,M){m=!1,w&&(w=!1,y(O),O=-1),h=!0;var D=d;try{for(v(M),f=n(l);f!==null&&(!(f.expirationTime>M)||j&&!B());){var A=f.callback;if(typeof A=="function"){f.callback=null,d=f.priorityLevel;var U=A(f.expirationTime<=M);M=e.unstable_now(),typeof U=="function"?f.callback=U:f===n(l)&&r(l),v(M)}else r(l);f=n(l)}if(f!==null)var K=!0;else{var ve=n(u);ve!==null&&_(b,ve.startTime-M),K=!1}return K}finally{f=null,d=D,h=!1}}var T=!1,k=null,O=-1,F=5,$=-1;function B(){return!(e.unstable_now()-$j||125A?(j.sortIndex=D,t(u,j),n(l)===null&&j===n(u)&&(w?(y(O),O=-1):w=!0,_(b,D-A))):(j.sortIndex=U,t(l,j),m||h||(m=!0,N(C))),j},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(j){var M=d;return function(){var D=d;d=M;try{return j.apply(this,arguments)}finally{d=D}}}})(Uy);$y.exports=Uy;var w2=$y.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var By=S,ct=w2;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ec=Object.prototype.hasOwnProperty,x2=/^[: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]*$/,Mh={},Ah={};function S2(e){return ec.call(Ah,e)?!0:ec.call(Mh,e)?!1:x2.test(e)?Ah[e]=!0:(Mh[e]=!0,!1)}function b2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function P2(e,t,n,r){if(t===null||typeof t>"u"||b2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ye(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ae[e]=new Ye(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ae[t]=new Ye(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ae[e]=new Ye(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ae[e]=new Ye(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ae[e]=new Ye(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ae[e]=new Ye(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ae[e]=new Ye(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ae[e]=new Ye(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ae[e]=new Ye(e,5,!1,e.toLowerCase(),null,!1,!1)});var Hf=/[\-:]([a-z])/g;function Kf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Hf,Kf);Ae[t]=new Ye(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Hf,Kf);Ae[t]=new Ye(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Hf,Kf);Ae[t]=new Ye(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ae[e]=new Ye(e,1,!1,e.toLowerCase(),null,!1,!1)});Ae.xlinkHref=new Ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ae[e]=new Ye(e,1,!1,e.toLowerCase(),null,!0,!0)});function qf(e,t,n,r){var i=Ae.hasOwnProperty(t)?Ae[t]:null;(i!==null?i.type!==0:r||!(2a||i[o]!==s[a]){var l=` +`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{ou=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ps(e):""}function C2(e){switch(e.tag){case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return ps("Suspense");case 19:return ps("SuspenseList");case 0:case 2:case 15:return e=au(e.type,!1),e;case 11:return e=au(e.type.render,!1),e;case 1:return e=au(e.type,!0),e;default:return""}}function ic(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gr:return"Fragment";case Yr:return"Portal";case tc:return"Profiler";case Qf:return"StrictMode";case nc:return"Suspense";case rc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Hy:return(e.displayName||"Context")+".Consumer";case Wy:return(e._context.displayName||"Context")+".Provider";case Yf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gf:return t=e.displayName||null,t!==null?t:ic(e.type)||"Memo";case Cn:t=e._payload,e=e._init;try{return ic(e(t))}catch{}}return null}function E2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ic(t);case 8:return t===Qf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function k2(e){var t=qy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _o(e){e._valueTracker||(e._valueTracker=k2(e))}function Qy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function La(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function sc(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ih(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Yy(e,t){t=t.checked,t!=null&&qf(e,"checked",t,!1)}function oc(e,t){Yy(e,t);var n=Yn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ac(e,t.type,n):t.hasOwnProperty("defaultValue")&&ac(e,t.type,Yn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _h(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ac(e,t,n){(t!=="number"||La(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ms=Array.isArray;function di(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Vo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ps={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},T2=["Webkit","ms","Moz","O"];Object.keys(Ps).forEach(function(e){T2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ps[t]=Ps[e]})});function Zy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ps.hasOwnProperty(e)&&Ps[e]?(""+t).trim():t+"px"}function e0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Zy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var O2=pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function cc(e,t){if(t){if(O2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function fc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 dc=null;function Xf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hc=null,hi=null,pi=null;function Uh(e){if(e=bo(e)){if(typeof hc!="function")throw Error(L(280));var t=e.stateNode;t&&(t=Tl(t),hc(e.stateNode,e.type,t))}}function t0(e){hi?pi?pi.push(e):pi=[e]:hi=e}function n0(){if(hi){var e=hi,t=pi;if(pi=hi=null,Uh(e),t)for(e=0;e>>=0,e===0?32:31-(V2(e)/$2|0)|0}var $o=64,Uo=4194304;function gs(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fa(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=gs(a):(s&=o,s!==0&&(r=gs(s)))}else o=n&~i,o!==0?r=gs(o):s!==0&&(r=gs(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function xo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=n}function W2(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Es),Gh=" ",Xh=!1;function b0(e,t){switch(e){case"keyup":return vS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function P0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function xS(e,t){switch(e){case"compositionend":return P0(t);case"keypress":return t.which!==32?null:(Xh=!0,Gh);case"textInput":return e=t.data,e===Gh&&Xh?null:e;default:return null}}function SS(e,t){if(Xr)return e==="compositionend"||!sd&&b0(e,t)?(e=x0(),da=nd=In=null,Xr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=tp(n)}}function T0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?T0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function O0(){for(var e=window,t=La();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=La(e.document)}return t}function od(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function jS(e){var t=O0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&T0(n.ownerDocument.documentElement,n)){if(r!==null&&od(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=np(n,s);var o=np(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jr=null,wc=null,Ts=null,xc=!1;function rp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xc||Jr==null||Jr!==La(r)||(r=Jr,"selectionStart"in r&&od(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ts&&Hs(Ts,r)||(Ts=r,r=Va(wc,"onSelect"),0ti||(e.current=kc[ti],kc[ti]=null,ti--)}function ie(e,t){ti++,kc[ti]=e.current,e.current=t}var Gn={},Be=tr(Gn),Ze=tr(!1),jr=Gn;function Mi(e,t){var n=e.type.contextTypes;if(!n)return Gn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function et(e){return e=e.childContextTypes,e!=null}function Ua(){le(Ze),le(Be)}function cp(e,t,n){if(Be.current!==Gn)throw Error(L(168));ie(Be,t),ie(Ze,n)}function I0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(L(108,E2(e)||"Unknown",i));return pe({},n,r)}function Ba(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gn,jr=Be.current,ie(Be,e),ie(Ze,Ze.current),!0}function fp(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=I0(e,t,jr),r.__reactInternalMemoizedMergedChildContext=e,le(Ze),le(Be),ie(Be,e)):le(Ze),ie(Ze,n)}var rn=null,Ol=!1,Su=!1;function _0(e){rn===null?rn=[e]:rn.push(e)}function BS(e){Ol=!0,_0(e)}function nr(){if(!Su&&rn!==null){Su=!0;var e=0,t=re;try{var n=rn;for(re=1;e>=o,i-=o,an=1<<32-Lt(t)+i|n<O?(F=k,k=null):F=k.sibling;var $=d(y,k,v[O],b);if($===null){k===null&&(k=F);break}e&&k&&$.alternate===null&&t(y,k),g=s($,g,O),T===null?C=$:T.sibling=$,T=$,k=F}if(O===v.length)return n(y,k),ce&&lr(y,O),C;if(k===null){for(;OO?(F=k,k=null):F=k.sibling;var B=d(y,k,$.value,b);if(B===null){k===null&&(k=F);break}e&&k&&B.alternate===null&&t(y,k),g=s(B,g,O),T===null?C=B:T.sibling=B,T=B,k=F}if($.done)return n(y,k),ce&&lr(y,O),C;if(k===null){for(;!$.done;O++,$=v.next())$=f(y,$.value,b),$!==null&&(g=s($,g,O),T===null?C=$:T.sibling=$,T=$);return ce&&lr(y,O),C}for(k=r(y,k);!$.done;O++,$=v.next())$=h(k,y,O,$.value,b),$!==null&&(e&&$.alternate!==null&&k.delete($.key===null?O:$.key),g=s($,g,O),T===null?C=$:T.sibling=$,T=$);return e&&k.forEach(function(X){return t(y,X)}),ce&&lr(y,O),C}function x(y,g,v,b){if(typeof v=="object"&&v!==null&&v.type===Gr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Io:e:{for(var C=v.key,T=g;T!==null;){if(T.key===C){if(C=v.type,C===Gr){if(T.tag===7){n(y,T.sibling),g=i(T,v.props.children),g.return=y,y=g;break e}}else if(T.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Cn&&vp(C)===T.type){n(y,T.sibling),g=i(T,v.props),g.ref=os(y,T,v),g.return=y,y=g;break e}n(y,T);break}else t(y,T);T=T.sibling}v.type===Gr?(g=kr(v.props.children,y.mode,b,v.key),g.return=y,y=g):(b=xa(v.type,v.key,v.props,null,y.mode,b),b.ref=os(y,g,v),b.return=y,y=b)}return o(y);case Yr:e:{for(T=v.key;g!==null;){if(g.key===T)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(y,g.sibling),g=i(g,v.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else t(y,g);g=g.sibling}g=Ru(v,y.mode,b),g.return=y,y=g}return o(y);case Cn:return T=v._init,x(y,g,T(v._payload),b)}if(ms(v))return m(y,g,v,b);if(ts(v))return w(y,g,v,b);Qo(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(y,g.sibling),g=i(g,v),g.return=y,y=g):(n(y,g),g=Ou(v,y.mode,b),g.return=y,y=g),o(y)):n(y,g)}return x}var Fi=K0(!0),q0=K0(!1),Po={},Xt=tr(Po),Ys=tr(Po),Gs=tr(Po);function mr(e){if(e===Po)throw Error(L(174));return e}function md(e,t){switch(ie(Gs,t),ie(Ys,e),ie(Xt,Po),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:uc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=uc(t,e)}le(Xt),ie(Xt,t)}function Ii(){le(Xt),le(Ys),le(Gs)}function Q0(e){mr(Gs.current);var t=mr(Xt.current),n=uc(t,e.type);t!==n&&(ie(Ys,e),ie(Xt,n))}function gd(e){Ys.current===e&&(le(Xt),le(Ys))}var fe=tr(0);function Qa(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bu=[];function yd(){for(var e=0;en?n:4,e(!0);var r=Pu.transition;Pu.transition={};try{e(!1),t()}finally{re=n,Pu.transition=r}}function cv(){return kt().memoizedState}function KS(e,t,n){var r=Kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fv(e))dv(t,n);else if(n=B0(e,t,n,r),n!==null){var i=qe();Dt(n,e,r,i),hv(n,t,r)}}function qS(e,t,n){var r=Kn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fv(e))dv(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Mt(a,o)){var l=t.interleaved;l===null?(i.next=i,hd(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=B0(e,t,i,r),n!==null&&(i=qe(),Dt(n,e,r,i),hv(n,t,r))}}function fv(e){var t=e.alternate;return e===he||t!==null&&t===he}function dv(e,t){Os=Ya=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hv(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zf(e,n)}}var Ga={readContext:Et,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},QS={readContext:Et,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:xp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ga(4194308,4,sv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ga(4194308,4,e,t)},useInsertionEffect:function(e,t){return ga(4,2,e,t)},useMemo:function(e,t){var n=$t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=KS.bind(null,he,e),[r.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:wp,useDebugValue:bd,useDeferredValue:function(e){return $t().memoizedState=e},useTransition:function(){var e=wp(!1),t=e[0];return e=HS.bind(null,e[1]),$t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=he,i=$t();if(ce){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),je===null)throw Error(L(349));Lr&30||X0(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,xp(Z0.bind(null,r,s,e),[e]),r.flags|=2048,Zs(9,J0.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=$t(),t=je.identifierPrefix;if(ce){var n=ln,r=an;n=(r&~(1<<32-Lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xs++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ht]=t,e[Qs]=r,bv(e,t,!1,!1),t.stateNode=e;e:{switch(o=fc(n,r),n){case"dialog":oe("cancel",e),oe("close",e),i=r;break;case"iframe":case"object":case"embed":oe("load",e),i=r;break;case"video":case"audio":for(i=0;iVi&&(t.flags|=128,r=!0,as(s,!1),t.lanes=4194304)}else{if(!r)if(e=Qa(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),as(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ce)return Ie(t),null}else 2*xe()-s.renderingStartTime>Vi&&n!==1073741824&&(t.flags|=128,r=!0,as(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=xe(),t.sibling=null,n=fe.current,ie(fe,r?n&1|2:n&1),t):(Ie(t),null);case 22:case 23:return Od(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ot&1073741824&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function nb(e,t){switch(ld(t),t.tag){case 1:return et(t.type)&&Ua(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ii(),le(Ze),le(Be),yd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return gd(t),null;case 13:if(le(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(fe),null;case 4:return Ii(),null;case 10:return dd(t.type._context),null;case 22:case 23:return Od(),null;case 24:return null;default:return null}}var Go=!1,Ve=!1,rb=typeof WeakSet=="function"?WeakSet:Set,V=null;function si(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ye(e,t,r)}else n.current=null}function _c(e,t,n){try{n()}catch(r){ye(e,t,r)}}var Rp=!1;function ib(e,t){if(Sc=Ia,e=O0(),od(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===i&&(a=o),d===s&&++c===r&&(l=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(bc={focusedElem:e,selectionRange:n},Ia=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var w=m.memoizedProps,x=m.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?w:Rt(t.type,w),x);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(b){ye(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return m=Rp,Rp=!1,m}function Rs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&_c(t,n,s)}i=i.next}while(i!==r)}}function Nl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ev(e){var t=e.alternate;t!==null&&(e.alternate=null,Ev(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ht],delete t[Qs],delete t[Ec],delete t[$S],delete t[US])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kv(e){return e.tag===5||e.tag===3||e.tag===4}function jp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$a));else if(r!==4&&(e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function Uc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Uc(e,t,n),e=e.sibling;e!==null;)Uc(e,t,n),e=e.sibling}var Le=null,jt=!1;function xn(e,t,n){for(n=n.child;n!==null;)Tv(e,t,n),n=n.sibling}function Tv(e,t,n){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(Pl,n)}catch{}switch(n.tag){case 5:Ve||si(n,t);case 6:var r=Le,i=jt;Le=null,xn(e,t,n),Le=r,jt=i,Le!==null&&(jt?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(jt?(e=Le,n=n.stateNode,e.nodeType===8?xu(e.parentNode,n):e.nodeType===1&&xu(e,n),zs(e)):xu(Le,n.stateNode));break;case 4:r=Le,i=jt,Le=n.stateNode.containerInfo,jt=!0,xn(e,t,n),Le=r,jt=i;break;case 0:case 11:case 14:case 15:if(!Ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&_c(n,t,o),i=i.next}while(i!==r)}xn(e,t,n);break;case 1:if(!Ve&&(si(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ye(n,t,a)}xn(e,t,n);break;case 21:xn(e,t,n);break;case 22:n.mode&1?(Ve=(r=Ve)||n.memoizedState!==null,xn(e,t,n),Ve=r):xn(e,t,n);break;default:xn(e,t,n)}}function Np(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rb),t.forEach(function(r){var i=hb.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ob(r/1960))-r,10e?16:e,_n===null)var r=!1;else{if(e=_n,_n=null,Za=0,ee&6)throw Error(L(331));var i=ee;for(ee|=4,V=e.current;V!==null;){var s=V,o=s.child;if(V.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lxe()-kd?Er(e,0):Ed|=n),tt(e,t)}function Av(e,t){t===0&&(e.mode&1?(t=Uo,Uo<<=1,!(Uo&130023424)&&(Uo=4194304)):t=1);var n=qe();e=mn(e,t),e!==null&&(xo(e,t,n),tt(e,n))}function db(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Av(e,n)}function hb(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),Av(e,n)}var Fv;Fv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)Je=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Je=!1,eb(e,t,n);Je=!!(e.flags&131072)}else Je=!1,ce&&t.flags&1048576&&V0(t,Wa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ya(e,t),e=t.pendingProps;var i=Mi(t,Be.current);gi(t,n),i=wd(null,t,r,e,i,n);var s=xd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,et(r)?(s=!0,Ba(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,pd(t),i.updater=Rl,t.stateNode=i,i._reactInternals=t,Nc(t,r,e,n),t=Mc(null,t,r,!0,s,n)):(t.tag=0,ce&&s&&ad(t),He(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ya(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=mb(r),e=Rt(r,e),i){case 0:t=Dc(null,t,r,e,n);break e;case 1:t=kp(null,t,r,e,n);break e;case 11:t=Cp(null,t,r,e,n);break e;case 14:t=Ep(null,t,r,Rt(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),Dc(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),kp(e,t,r,i,n);case 3:e:{if(wv(t),e===null)throw Error(L(387));r=t.pendingProps,s=t.memoizedState,i=s.element,z0(e,t),qa(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=_i(Error(L(423)),t),t=Tp(e,t,r,n,i);break e}else if(r!==i){i=_i(Error(L(424)),t),t=Tp(e,t,r,n,i);break e}else for(at=zn(t.stateNode.containerInfo.firstChild),lt=t,ce=!0,Nt=null,n=q0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ai(),r===i){t=gn(e,t,n);break e}He(e,t,r,n)}t=t.child}return t;case 5:return Q0(t),e===null&&Oc(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Pc(r,i)?o=null:s!==null&&Pc(r,s)&&(t.flags|=32),vv(e,t),He(e,t,o,n),t.child;case 6:return e===null&&Oc(t),null;case 13:return xv(e,t,n);case 4:return md(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fi(t,null,r,n):He(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),Cp(e,t,r,i,n);case 7:return He(e,t,t.pendingProps,n),t.child;case 8:return He(e,t,t.pendingProps.children,n),t.child;case 12:return He(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,ie(Ha,r._currentValue),r._currentValue=o,s!==null)if(Mt(s.value,o)){if(s.children===i.children&&!Ze.current){t=gn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=un(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Rc(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Rc(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}He(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,gi(t,n),i=Et(i),r=r(i),t.flags|=1,He(e,t,r,n),t.child;case 14:return r=t.type,i=Rt(r,t.pendingProps),i=Rt(r.type,i),Ep(e,t,r,i,n);case 15:return gv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),ya(e,t),t.tag=1,et(r)?(e=!0,Ba(t)):e=!1,gi(t,n),H0(t,r,i),Nc(t,r,i,n),Mc(null,t,r,!0,e,n);case 19:return Sv(e,t,n);case 22:return yv(e,t,n)}throw Error(L(156,t.tag))};function Iv(e,t){return u0(e,t)}function pb(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(e,t,n,r){return new pb(e,t,n,r)}function jd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mb(e){if(typeof e=="function")return jd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Yf)return 11;if(e===Gf)return 14}return 2}function qn(e,t){var n=e.alternate;return n===null?(n=Pt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xa(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")jd(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Gr:return kr(n.children,i,s,t);case Qf:o=8,i|=8;break;case tc:return e=Pt(12,n,t,i|2),e.elementType=tc,e.lanes=s,e;case nc:return e=Pt(13,n,t,i),e.elementType=nc,e.lanes=s,e;case rc:return e=Pt(19,n,t,i),e.elementType=rc,e.lanes=s,e;case Ky:return Dl(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wy:o=10;break e;case Hy:o=9;break e;case Yf:o=11;break e;case Gf:o=14;break e;case Cn:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=Pt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function kr(e,t,n,r){return e=Pt(7,e,r,t),e.lanes=n,e}function Dl(e,t,n,r){return e=Pt(22,e,r,t),e.elementType=Ky,e.lanes=n,e.stateNode={isHidden:!1},e}function Ou(e,t,n){return e=Pt(6,e,null,t),e.lanes=n,e}function Ru(e,t,n){return t=Pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gb(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=uu(0),this.expirationTimes=uu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Nd(e,t,n,r,i,s,o,a,l){return e=new gb(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Pt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pd(s),e}function yb(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uv)}catch(e){console.error(e)}}Uv(),Vy.exports=dt;var bb=Vy.exports,Vp=bb;Zu.createRoot=Vp.createRoot,Zu.hydrateRoot=Vp.hydrateRoot;var Yi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},$i=typeof window>"u"||"Deno"in window;function xt(){}function Pb(e,t){return typeof e=="function"?e(t):e}function Kc(e){return typeof e=="number"&&e>=0&&e!==1/0}function Bv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $p(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Ad(o,t.options))return!1}else if(!to(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||s&&!s(t))}function Up(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ar(t.options.mutationKey)!==Ar(s))return!1}else if(!to(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ad(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ar)(e)}function Ar(e){return JSON.stringify(e,(t,n)=>qc(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function to(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!to(e[n],t[n])):!1}function zv(e,t){if(e===t)return e;const n=Bp(e)&&Bp(t);if(n||qc(e)&&qc(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),s=i.length,o=n?[]:{};let a=0;for(let l=0;l"u")return!0;const n=t.prototype;return!(!zp(n)||!n.hasOwnProperty("isPrototypeOf"))}function zp(e){return Object.prototype.toString.call(e)==="[object Object]"}function Cb(e){return new Promise(t=>{setTimeout(t,e)})}function Qc(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zv(e,t):t}function Eb(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function kb(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var vr,Rn,wi,yy,Tb=(yy=class extends Yi{constructor(){super();z(this,vr);z(this,Rn);z(this,wi);I(this,wi,t=>{if(!$i&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,Rn)||this.setEventListener(P(this,wi))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Rn))==null||t.call(this),I(this,Rn,void 0))}setEventListener(t){var n;I(this,wi,t),(n=P(this,Rn))==null||n.call(this),I(this,Rn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,vr)!==t&&(I(this,vr,t),this.onFocus())}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){var t;return typeof P(this,vr)=="boolean"?P(this,vr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},vr=new WeakMap,Rn=new WeakMap,wi=new WeakMap,yy),rl=new Tb,xi,jn,Si,vy,Ob=(vy=class extends Yi{constructor(){super();z(this,xi,!0);z(this,jn);z(this,Si);I(this,Si,t=>{if(!$i&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,jn)||this.setEventListener(P(this,Si))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,jn))==null||t.call(this),I(this,jn,void 0))}setEventListener(t){var n;I(this,Si,t),(n=P(this,jn))==null||n.call(this),I(this,jn,t(this.setOnline.bind(this)))}setOnline(t){P(this,xi)!==t&&(I(this,xi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,xi)}},xi=new WeakMap,jn=new WeakMap,Si=new WeakMap,vy),il=new Ob;function Rb(e){return Math.min(1e3*2**e,3e4)}function _l(e){return(e??"online")==="online"?il.isOnline():!0}var Wv=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ju(e){return e instanceof Wv}function Hv(e){let t=!1,n=0,r=!1,i,s,o;const a=new Promise((x,y)=>{s=x,o=y}),l=x=>{var y;r||(h(new Wv(x)),(y=e.abort)==null||y.call(e))},u=()=>{t=!0},c=()=>{t=!1},f=()=>!rl.isFocused()||e.networkMode!=="always"&&!il.isOnline(),d=x=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,x),i==null||i(),s(x))},h=x=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,x),i==null||i(),o(x))},m=()=>new Promise(x=>{var y;i=g=>{const v=r||!f();return v&&x(g),v},(y=e.onPause)==null||y.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),w=()=>{if(r)return;let x;try{x=e.fn()}catch(y){x=Promise.reject(y)}Promise.resolve(x).then(d).catch(y=>{var T;if(r)return;const g=e.retry??($i?0:3),v=e.retryDelay??Rb,b=typeof v=="function"?v(n,y):v,C=g===!0||typeof g=="number"&&n{if(f())return m()}).then(()=>{t?h(y):w()})})};return _l(e.networkMode)?w():m().then(w),{promise:a,cancel:l,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:u,continueRetry:c}}function jb(){let e=[],t=0,n=d=>{d()},r=d=>{d()},i=d=>setTimeout(d,0);const s=d=>{i=d},o=d=>{let h;t++;try{h=d()}finally{t--,t||u()}return h},a=d=>{t?e.push(d):i(()=>{n(d)})},l=d=>(...h)=>{a(()=>{d(...h)})},u=()=>{const d=e;e=[],d.length&&i(()=>{r(()=>{d.forEach(h=>{n(h)})})})};return{batch:o,batchCalls:l,schedule:a,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{r=d},setScheduler:s}}var ke=jb(),wr,wy,Kv=(wy=class{constructor(){z(this,wr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Kc(this.gcTime)&&I(this,wr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($i?1/0:5*60*1e3))}clearGcTimeout(){P(this,wr)&&(clearTimeout(P(this,wr)),I(this,wr,void 0))}},wr=new WeakMap,wy),bi,Pi,yt,Nn,vt,Oe,po,xr,Ke,Sa,tn,xy,Nb=(xy=class extends Kv{constructor(t){super();z(this,Ke);z(this,bi);z(this,Pi);z(this,yt);z(this,Nn);z(this,vt);z(this,Oe);z(this,po);z(this,xr);I(this,xr,!1),I(this,po,t.defaultOptions),Q(this,Ke,Sa).call(this,t.options),I(this,Oe,[]),I(this,yt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,I(this,bi,t.state||Lb(this.options)),this.state=P(this,bi),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!P(this,Oe).length&&this.state.fetchStatus==="idle"&&P(this,yt).remove(this)}setData(t,n){const r=Qc(this.state.data,t,this.options);return Q(this,Ke,tn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Q(this,Ke,tn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r;const n=P(this,Nn);return(r=P(this,vt))==null||r.cancel(t),n?n.then(xt).catch(xt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,bi))}isActive(){return P(this,Oe).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||P(this,Oe).some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Bv(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=P(this,Oe).find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,vt))==null||n.continue()}onOnline(){var n;const t=P(this,Oe).find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,vt))==null||n.continue()}addObserver(t){P(this,Oe).includes(t)||(P(this,Oe).push(t),this.clearGcTimeout(),P(this,yt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){P(this,Oe).includes(t)&&(I(this,Oe,P(this,Oe).filter(n=>n!==t)),P(this,Oe).length||(P(this,vt)&&(P(this,xr)?P(this,vt).cancel({revert:!0}):P(this,vt).cancelRetry()),this.scheduleGc()),P(this,yt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return P(this,Oe).length}invalidate(){this.state.isInvalidated||Q(this,Ke,tn).call(this,{type:"invalidate"})}fetch(t,n){var u,c,f,d;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,Nn))return(u=P(this,vt))==null||u.continueRetry(),P(this,Nn)}if(t&&Q(this,Ke,Sa).call(this,t),!this.options.queryFn){const h=P(this,Oe).find(m=>m.options.queryFn);h&&Q(this,Ke,Sa).call(this,h.options)}const r=new AbortController,i={queryKey:this.queryKey,meta:this.meta},s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(I(this,xr,!0),r.signal)})};s(i);const o=()=>this.options.queryFn?(I(this,xr,!1),this.options.persister?this.options.persister(this.options.queryFn,i,this):this.options.queryFn(i)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};s(a),(c=this.options.behavior)==null||c.onFetch(a,this),I(this,Pi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=a.fetchOptions)==null?void 0:f.meta))&&Q(this,Ke,tn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=h=>{var m,w,x,y;ju(h)&&h.silent||Q(this,Ke,tn).call(this,{type:"error",error:h}),ju(h)||((w=(m=P(this,yt).config).onError)==null||w.call(m,h,this),(y=(x=P(this,yt).config).onSettled)==null||y.call(x,this.state.data,h,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return I(this,vt,Hv({fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var m,w,x,y;if(typeof h>"u"){l(new Error(`${this.queryHash} data is undefined`));return}this.setData(h),(w=(m=P(this,yt).config).onSuccess)==null||w.call(m,h,this),(y=(x=P(this,yt).config).onSettled)==null||y.call(x,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(h,m)=>{Q(this,Ke,tn).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{Q(this,Ke,tn).call(this,{type:"pause"})},onContinue:()=>{Q(this,Ke,tn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode})),I(this,Nn,P(this,vt).promise),P(this,Nn)}},bi=new WeakMap,Pi=new WeakMap,yt=new WeakMap,Nn=new WeakMap,vt=new WeakMap,Oe=new WeakMap,po=new WeakMap,xr=new WeakMap,Ke=new WeakSet,Sa=function(t){this.options={...P(this,po),...t},this.updateGcTime(this.options.gcTime)},tn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:t.meta??null,fetchStatus:_l(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return ju(i)&&i.revert&&P(this,Pi)?{...P(this,Pi),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ke.batch(()=>{P(this,Oe).forEach(r=>{r.onQueryUpdate()}),P(this,yt).notify({query:this,type:"updated",action:t})})},xy);function Lb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,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 Ut,Sy,Db=(Sy=class extends Yi{constructor(t={}){super();z(this,Ut);this.config=t,I(this,Ut,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Ad(i,n);let o=this.get(s);return o||(o=new Nb({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){P(this,Ut).has(t.queryHash)||(P(this,Ut).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,Ut).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,Ut).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,Ut).get(t)}getAll(){return[...P(this,Ut).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>$p(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>$p(t,r)):n}notify(t){ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ut=new WeakMap,Sy),Bt,mo,it,Ci,zt,bn,by,Mb=(by=class extends Kv{constructor(t){super();z(this,zt);z(this,Bt);z(this,mo);z(this,it);z(this,Ci);this.mutationId=t.mutationId,I(this,mo,t.defaultOptions),I(this,it,t.mutationCache),I(this,Bt,[]),this.state=t.state||qv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...P(this,mo),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,Bt).includes(t)||(P(this,Bt).push(t),this.clearGcTimeout(),P(this,it).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){I(this,Bt,P(this,Bt).filter(n=>n!==t)),this.scheduleGc(),P(this,it).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,Bt).length||(this.state.status==="pending"?this.scheduleGc():P(this,it).remove(this))}continue(){var t;return((t=P(this,Ci))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,c,f,d,h,m,w,x,y,g,v,b,C,T,k;const n=()=>(I(this,Ci,Hv({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,F)=>{Q(this,zt,bn).call(this,{type:"failed",failureCount:O,error:F})},onPause:()=>{Q(this,zt,bn).call(this,{type:"pause"})},onContinue:()=>{Q(this,zt,bn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),P(this,Ci).promise),r=this.state.status==="pending";try{if(!r){Q(this,zt,bn).call(this,{type:"pending",variables:t}),await((s=(i=P(this,it).config).onMutate)==null?void 0:s.call(i,t,this));const F=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));F!==this.state.context&&Q(this,zt,bn).call(this,{type:"pending",context:F,variables:t})}const O=await n();return await((u=(l=P(this,it).config).onSuccess)==null?void 0:u.call(l,O,t,this.state.context,this)),await((f=(c=this.options).onSuccess)==null?void 0:f.call(c,O,t,this.state.context)),await((h=(d=P(this,it).config).onSettled)==null?void 0:h.call(d,O,null,this.state.variables,this.state.context,this)),await((w=(m=this.options).onSettled)==null?void 0:w.call(m,O,null,t,this.state.context)),Q(this,zt,bn).call(this,{type:"success",data:O}),O}catch(O){try{throw await((y=(x=P(this,it).config).onError)==null?void 0:y.call(x,O,t,this.state.context,this)),await((v=(g=this.options).onError)==null?void 0:v.call(g,O,t,this.state.context)),await((C=(b=P(this,it).config).onSettled)==null?void 0:C.call(b,void 0,O,this.state.variables,this.state.context,this)),await((k=(T=this.options).onSettled)==null?void 0:k.call(T,void 0,O,t,this.state.context)),O}finally{Q(this,zt,bn).call(this,{type:"error",error:O})}}}},Bt=new WeakMap,mo=new WeakMap,it=new WeakMap,Ci=new WeakMap,zt=new WeakSet,bn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!_l(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ke.batch(()=>{P(this,Bt).forEach(r=>{r.onMutationUpdate(t)}),P(this,it).notify({mutation:this,type:"updated",action:t})})},by);function qv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wt,go,Sr,Py,Ab=(Py=class extends Yi{constructor(t={}){super();z(this,wt);z(this,go);z(this,Sr);this.config=t,I(this,wt,[]),I(this,go,0)}build(t,n,r){const i=new Mb({mutationCache:this,mutationId:++Ao(this,go)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){P(this,wt).push(t),this.notify({type:"added",mutation:t})}remove(t){I(this,wt,P(this,wt).filter(n=>n!==t)),this.notify({type:"removed",mutation:t})}clear(){ke.batch(()=>{P(this,wt).forEach(t=>{this.remove(t)})})}getAll(){return P(this,wt)}find(t){const n={exact:!0,...t};return P(this,wt).find(r=>Up(n,r))}findAll(t={}){return P(this,wt).filter(n=>Up(t,n))}notify(t){ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){return I(this,Sr,(P(this,Sr)??Promise.resolve()).then(()=>{const t=P(this,wt).filter(n=>n.state.isPaused);return ke.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(xt)),Promise.resolve()))}).then(()=>{I(this,Sr,void 0)})),P(this,Sr)}},wt=new WeakMap,go=new WeakMap,Sr=new WeakMap,Py);function Fb(e){return{onFetch:(t,n)=>{const r=async()=>{var m,w,x,y,g;const i=t.options,s=(x=(w=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:w.fetchMore)==null?void 0:x.direction,o=((y=t.state.data)==null?void 0:y.pages)||[],a=((g=t.state.data)==null?void 0:g.pageParams)||[],l={pages:[],pageParams:[]};let u=!1;const c=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},f=t.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`))),d=async(v,b,C)=>{if(u)return Promise.reject();if(b==null&&v.pages.length)return Promise.resolve(v);const T={queryKey:t.queryKey,pageParam:b,direction:C?"backward":"forward",meta:t.options.meta};c(T);const k=await f(T),{maxPages:O}=t.options,F=C?kb:Eb;return{pages:F(v.pages,k,O),pageParams:F(v.pageParams,b,O)}};let h;if(s&&o.length){const v=s==="backward",b=v?Ib:Wp,C={pages:o,pageParams:a},T=b(i,C);h=await d(C,T,v)}else{h=await d(l,a[0]??i.initialPageParam);const v=e??o.length;for(let b=1;b{var i,s;return(s=(i=t.options).persister)==null?void 0:s.call(i,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function Wp(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function Ib(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}var Ce,Ln,Dn,Ei,ki,Mn,Ti,Oi,Cy,_b=(Cy=class{constructor(e={}){z(this,Ce);z(this,Ln);z(this,Dn);z(this,Ei);z(this,ki);z(this,Mn);z(this,Ti);z(this,Oi);I(this,Ce,e.queryCache||new Db),I(this,Ln,e.mutationCache||new Ab),I(this,Dn,e.defaultOptions||{}),I(this,Ei,new Map),I(this,ki,new Map),I(this,Mn,0)}mount(){Ao(this,Mn)._++,P(this,Mn)===1&&(I(this,Ti,rl.subscribe(()=>{rl.isFocused()&&(this.resumePausedMutations(),P(this,Ce).onFocus())})),I(this,Oi,il.subscribe(()=>{il.isOnline()&&(this.resumePausedMutations(),P(this,Ce).onOnline())})))}unmount(){var e,t;Ao(this,Mn)._--,P(this,Mn)===0&&((e=P(this,Ti))==null||e.call(this),I(this,Ti,void 0),(t=P(this,Oi))==null||t.call(this),I(this,Oi,void 0))}isFetching(e){return P(this,Ce).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,Ln).findAll({...e,status:"pending"}).length}getQueryData(e){var t;return(t=P(this,Ce).find({queryKey:e}))==null?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);return t!==void 0?Promise.resolve(t):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=P(this,Ce).find({queryKey:e}),i=r==null?void 0:r.state.data,s=Pb(t,i);if(typeof s>"u")return;const o=this.defaultQueryOptions({queryKey:e});return P(this,Ce).build(this,o).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return ke.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var t;return(t=P(this,Ce).find({queryKey:e}))==null?void 0:t.state}removeQueries(e){const t=P(this,Ce);ke.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,Ce),r={type:"active",...e};return ke.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=ke.batch(()=>P(this,Ce).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(xt).catch(xt)}invalidateQueries(e={},t={}){return ke.batch(()=>{if(P(this,Ce).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=ke.batch(()=>P(this,Ce).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(xt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(xt)}fetchQuery(e){const t=this.defaultQueryOptions(e);typeof t.retry>"u"&&(t.retry=!1);const n=P(this,Ce).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(xt).catch(xt)}fetchInfiniteQuery(e){return e.behavior=Fb(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(xt).catch(xt)}resumePausedMutations(){return P(this,Ln).resumePausedMutations()}getQueryCache(){return P(this,Ce)}getMutationCache(){return P(this,Ln)}getDefaultOptions(){return P(this,Dn)}setDefaultOptions(e){I(this,Dn,e)}setQueryDefaults(e,t){P(this,Ei).set(Ar(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,Ei).values()];let n={};return t.forEach(r=>{to(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){P(this,ki).set(Ar(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,ki).values()];let n={};return t.forEach(r=>{to(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...P(this,Dn).queries,...(e==null?void 0:e.queryKey)&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ad(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.throwOnError>"u"&&(t.throwOnError=!!t.suspense),typeof t.networkMode>"u"&&t.persister&&(t.networkMode="offlineFirst"),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,Dn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,Ce).clear(),P(this,Ln).clear()}},Ce=new WeakMap,Ln=new WeakMap,Dn=new WeakMap,Ei=new WeakMap,ki=new WeakMap,Mn=new WeakMap,Ti=new WeakMap,Oi=new WeakMap,Cy),Ge,ae,yo,We,br,Ri,Wt,vo,ji,Ni,Pr,Cr,An,Li,te,vs,Yc,Gc,Xc,Jc,Zc,ef,tf,Qv,Ey,Vb=(Ey=class extends Yi{constructor(t,n){super();z(this,te);z(this,Ge);z(this,ae);z(this,yo);z(this,We);z(this,br);z(this,Ri);z(this,Wt);z(this,vo);z(this,ji);z(this,Ni);z(this,Pr);z(this,Cr);z(this,An);z(this,Li,new Set);this.options=n,I(this,Ge,t),I(this,Wt,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,ae).addObserver(this),Hp(P(this,ae),this.options)?Q(this,te,vs).call(this):this.updateResult(),Q(this,te,Jc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return nf(P(this,ae),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return nf(P(this,ae),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Q(this,te,Zc).call(this),Q(this,te,ef).call(this),P(this,ae).removeObserver(this)}setOptions(t,n){const r=this.options,i=P(this,ae);if(this.options=P(this,Ge).defaultQueryOptions(t),nl(r,this.options)||P(this,Ge).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,ae),observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),Q(this,te,tf).call(this);const s=this.hasListeners();s&&Kp(P(this,ae),i,this.options,r)&&Q(this,te,vs).call(this),this.updateResult(n),s&&(P(this,ae)!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&Q(this,te,Yc).call(this);const o=Q(this,te,Gc).call(this);s&&(P(this,ae)!==i||this.options.enabled!==r.enabled||o!==P(this,An))&&Q(this,te,Xc).call(this,o)}getOptimisticResult(t){const n=P(this,Ge).getQueryCache().build(P(this,Ge),t),r=this.createResult(n,t);return Ub(this,r)&&(I(this,We,r),I(this,Ri,this.options),I(this,br,P(this,ae).state)),r}getCurrentResult(){return P(this,We)}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(P(this,Li).add(r),t[r])})}),n}getCurrentQuery(){return P(this,ae)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=P(this,Ge).defaultQueryOptions(t),r=P(this,Ge).getQueryCache().build(P(this,Ge),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Q(this,te,vs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,We)))}createResult(t,n){var T;const r=P(this,ae),i=this.options,s=P(this,We),o=P(this,br),a=P(this,Ri),u=t!==r?t.state:P(this,yo),{state:c}=t;let{error:f,errorUpdatedAt:d,fetchStatus:h,status:m}=c,w=!1,x;if(n._optimisticResults){const k=this.hasListeners(),O=!k&&Hp(t,n),F=k&&Kp(t,r,n,i);(O||F)&&(h=_l(t.options.networkMode)?"fetching":"paused",c.dataUpdatedAt||(m="pending")),n._optimisticResults==="isRestoring"&&(h="idle")}if(n.select&&typeof c.data<"u")if(s&&c.data===(o==null?void 0:o.data)&&n.select===P(this,vo))x=P(this,ji);else try{I(this,vo,n.select),x=n.select(c.data),x=Qc(s==null?void 0:s.data,x,n),I(this,ji,x),I(this,Wt,null)}catch(k){I(this,Wt,k)}else x=c.data;if(typeof n.placeholderData<"u"&&typeof x>"u"&&m==="pending"){let k;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))k=s.data;else if(k=typeof n.placeholderData=="function"?n.placeholderData((T=P(this,Ni))==null?void 0:T.state.data,P(this,Ni)):n.placeholderData,n.select&&typeof k<"u")try{k=n.select(k),I(this,Wt,null)}catch(O){I(this,Wt,O)}typeof k<"u"&&(m="success",x=Qc(s==null?void 0:s.data,k,n),w=!0)}P(this,Wt)&&(f=P(this,Wt),x=P(this,ji),d=Date.now(),m="error");const y=h==="fetching",g=m==="pending",v=m==="error",b=g&&y;return{status:m,fetchStatus:h,isPending:g,isSuccess:m==="success",isError:v,isInitialLoading:b,isLoading:b,data:x,dataUpdatedAt:c.dataUpdatedAt,error:f,errorUpdatedAt:d,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!g,isLoadingError:v&&c.dataUpdatedAt===0,isPaused:h==="paused",isPlaceholderData:w,isRefetchError:v&&c.dataUpdatedAt!==0,isStale:Fd(t,n),refetch:this.refetch}}updateResult(t){const n=P(this,We),r=this.createResult(P(this,ae),this.options);if(I(this,br,P(this,ae).state),I(this,Ri,this.options),P(this,br).data!==void 0&&I(this,Ni,P(this,ae)),nl(r,n))return;I(this,We,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!P(this,Li).size)return!0;const l=new Set(a??P(this,Li));return this.options.throwOnError&&l.add("error"),Object.keys(P(this,We)).some(u=>{const c=u;return P(this,We)[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),Q(this,te,Qv).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Q(this,te,Jc).call(this)}},Ge=new WeakMap,ae=new WeakMap,yo=new WeakMap,We=new WeakMap,br=new WeakMap,Ri=new WeakMap,Wt=new WeakMap,vo=new WeakMap,ji=new WeakMap,Ni=new WeakMap,Pr=new WeakMap,Cr=new WeakMap,An=new WeakMap,Li=new WeakMap,te=new WeakSet,vs=function(t){Q(this,te,tf).call(this);let n=P(this,ae).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(xt)),n},Yc=function(){if(Q(this,te,Zc).call(this),$i||P(this,We).isStale||!Kc(this.options.staleTime))return;const n=Bv(P(this,We).dataUpdatedAt,this.options.staleTime)+1;I(this,Pr,setTimeout(()=>{P(this,We).isStale||this.updateResult()},n))},Gc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,ae)):this.options.refetchInterval)??!1},Xc=function(t){Q(this,te,ef).call(this),I(this,An,t),!($i||this.options.enabled===!1||!Kc(P(this,An))||P(this,An)===0)&&I(this,Cr,setInterval(()=>{(this.options.refetchIntervalInBackground||rl.isFocused())&&Q(this,te,vs).call(this)},P(this,An)))},Jc=function(){Q(this,te,Yc).call(this),Q(this,te,Xc).call(this,Q(this,te,Gc).call(this))},Zc=function(){P(this,Pr)&&(clearTimeout(P(this,Pr)),I(this,Pr,void 0))},ef=function(){P(this,Cr)&&(clearInterval(P(this,Cr)),I(this,Cr,void 0))},tf=function(){const t=P(this,Ge).getQueryCache().build(P(this,Ge),this.options);if(t===P(this,ae))return;const n=P(this,ae);I(this,ae,t),I(this,yo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Qv=function(t){ke.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(P(this,We))}),P(this,Ge).getQueryCache().notify({query:P(this,ae),type:"observerResultsUpdated"})})},Ey);function $b(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Hp(e,t){return $b(e,t)||e.state.dataUpdatedAt>0&&nf(e,t,t.refetchOnMount)}function nf(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Fd(e,t)}return!1}function Kp(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Fd(e,n)}function Fd(e,t){return e.isStaleByTime(t.staleTime)}function Ub(e,t){return!nl(e.getCurrentResult(),t)}var Fn,sn,st,on,dn,ba,rf,ky,Bb=(ky=class extends Yi{constructor(n,r){super();z(this,dn);z(this,Fn);z(this,sn);z(this,st);z(this,on);I(this,sn,void 0),I(this,Fn,n),this.setOptions(r),this.bindMethods(),Q(this,dn,ba).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=P(this,Fn).defaultMutationOptions(n),nl(r,this.options)||P(this,Fn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:P(this,st),observer:this}),(i=P(this,st))==null||i.setOptions(this.options),r!=null&&r.mutationKey&&this.options.mutationKey&&Ar(r.mutationKey)!==Ar(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var n;this.hasListeners()||(n=P(this,st))==null||n.removeObserver(this)}onMutationUpdate(n){Q(this,dn,ba).call(this),Q(this,dn,rf).call(this,n)}getCurrentResult(){return P(this,sn)}reset(){var n;(n=P(this,st))==null||n.removeObserver(this),I(this,st,void 0),Q(this,dn,ba).call(this),Q(this,dn,rf).call(this)}mutate(n,r){var i;return I(this,on,r),(i=P(this,st))==null||i.removeObserver(this),I(this,st,P(this,Fn).getMutationCache().build(P(this,Fn),this.options)),P(this,st).addObserver(this),P(this,st).execute(n)}},Fn=new WeakMap,sn=new WeakMap,st=new WeakMap,on=new WeakMap,dn=new WeakSet,ba=function(){var r;const n=((r=P(this,st))==null?void 0:r.state)??qv();I(this,sn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},rf=function(n){ke.batch(()=>{var r,i,s,o,a,l,u,c;if(P(this,on)&&this.hasListeners()){const f=P(this,sn).variables,d=P(this,sn).context;(n==null?void 0:n.type)==="success"?((i=(r=P(this,on)).onSuccess)==null||i.call(r,n.data,f,d),(o=(s=P(this,on)).onSettled)==null||o.call(s,n.data,null,f,d)):(n==null?void 0:n.type)==="error"&&((l=(a=P(this,on)).onError)==null||l.call(a,n.error,f,d),(c=(u=P(this,on)).onSettled)==null||c.call(u,void 0,n.error,f,d))}this.listeners.forEach(f=>{f(P(this,sn))})})},ky),Yv=S.createContext(void 0),Id=e=>{const t=S.useContext(Yv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},zb=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),S.createElement(Yv.Provider,{value:e},t)),Gv=S.createContext(!1),Wb=()=>S.useContext(Gv);Gv.Provider;function Hb(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Kb=S.createContext(Hb()),qb=()=>S.useContext(Kb);function Xv(e,t){return typeof e=="function"?e(...t):!!e}var Qb=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},Yb=e=>{S.useEffect(()=>{e.clearReset()},[e])},Gb=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Xv(n,[e.error,r]),Xb=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Jb=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Zb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function eP(e,t,n){const r=Id(),i=Wb(),s=qb(),o=r.defaultQueryOptions(e);o._optimisticResults=i?"isRestoring":"optimistic",Xb(o),Qb(o,s),Yb(s);const[a]=S.useState(()=>new t(r,o)),l=a.getOptimisticResult(o);if(S.useSyncExternalStore(S.useCallback(u=>{const c=i?()=>{}:a.subscribe(ke.batchCalls(u));return a.updateResult(),c},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),S.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),Jb(o,l))throw Zb(o,a,s);if(Gb({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw l.error;return o.notifyOnChangeProps?l:a.trackResult(l)}function tP(e,t){return eP(e,Vb)}function nP(e,t){const n=Id(),[r]=S.useState(()=>new Bb(n,e));S.useEffect(()=>{r.setOptions(e)},[r,e]);const i=S.useSyncExternalStore(S.useCallback(o=>r.subscribe(ke.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=S.useCallback((o,a)=>{r.mutate(o,a).catch(rP)},[r]);if(i.error&&Xv(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function rP(){}function Jv(e,t){return function(){return e.apply(t,arguments)}}const{toString:iP}=Object.prototype,{getPrototypeOf:_d}=Object,{iterator:Vl,toStringTag:Zv}=Symbol,$l=(e=>t=>{const n=iP.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),At=e=>(e=e.toLowerCase(),t=>$l(t)===e),Ul=e=>t=>typeof t===e,{isArray:Gi}=Array,Ui=Ul("undefined");function Co(e){return e!==null&&!Ui(e)&&e.constructor!==null&&!Ui(e.constructor)&&nt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const e1=At("ArrayBuffer");function sP(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&e1(e.buffer),t}const oP=Ul("string"),nt=Ul("function"),t1=Ul("number"),Eo=e=>e!==null&&typeof e=="object",aP=e=>e===!0||e===!1,Pa=e=>{if($l(e)!=="object")return!1;const t=_d(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Zv in e)&&!(Vl in e)},lP=e=>{if(!Eo(e)||Co(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},uP=At("Date"),cP=At("File"),fP=At("Blob"),dP=At("FileList"),hP=e=>Eo(e)&&nt(e.pipe),pP=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||nt(e.append)&&((t=$l(e))==="formdata"||t==="object"&&nt(e.toString)&&e.toString()==="[object FormData]"))},mP=At("URLSearchParams"),[gP,yP,vP,wP]=["ReadableStream","Request","Response","Headers"].map(At),xP=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ko(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Gi(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const gr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,r1=e=>!Ui(e)&&e!==gr;function sf(){const{caseless:e,skipUndefined:t}=r1(this)&&this||{},n={},r=(i,s)=>{const o=e&&n1(n,s)||s;Pa(n[o])&&Pa(i)?n[o]=sf(n[o],i):Pa(i)?n[o]=sf({},i):Gi(i)?n[o]=i.slice():(!t||!Ui(i))&&(n[o]=i)};for(let i=0,s=arguments.length;i(ko(t,(i,s)=>{n&&nt(i)?e[s]=Jv(i,n):e[s]=i},{allOwnKeys:r}),e),bP=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),PP=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},CP=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&_d(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},EP=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},kP=e=>{if(!e)return null;if(Gi(e))return e;let t=e.length;if(!t1(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},TP=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_d(Uint8Array)),OP=(e,t)=>{const r=(e&&e[Vl]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},RP=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},jP=At("HTMLFormElement"),NP=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),qp=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),LP=At("RegExp"),i1=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ko(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},DP=e=>{i1(e,(t,n)=>{if(nt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(nt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},MP=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Gi(e)?r(e):r(String(e).split(t)),n},AP=()=>{},FP=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function IP(e){return!!(e&&nt(e.append)&&e[Zv]==="FormData"&&e[Vl])}const _P=e=>{const t=new Array(10),n=(r,i)=>{if(Eo(r)){if(t.indexOf(r)>=0)return;if(Co(r))return r;if(!("toJSON"in r)){t[i]=r;const s=Gi(r)?[]:{};return ko(r,(o,a)=>{const l=n(o,i+1);!Ui(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},VP=At("AsyncFunction"),$P=e=>e&&(Eo(e)||nt(e))&&nt(e.then)&&nt(e.catch),s1=((e,t)=>e?setImmediate:t?((n,r)=>(gr.addEventListener("message",({source:i,data:s})=>{i===gr&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),gr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",nt(gr.postMessage)),UP=typeof queueMicrotask<"u"?queueMicrotask.bind(gr):typeof process<"u"&&process.nextTick||s1,BP=e=>e!=null&&nt(e[Vl]),R={isArray:Gi,isArrayBuffer:e1,isBuffer:Co,isFormData:pP,isArrayBufferView:sP,isString:oP,isNumber:t1,isBoolean:aP,isObject:Eo,isPlainObject:Pa,isEmptyObject:lP,isReadableStream:gP,isRequest:yP,isResponse:vP,isHeaders:wP,isUndefined:Ui,isDate:uP,isFile:cP,isBlob:fP,isRegExp:LP,isFunction:nt,isStream:hP,isURLSearchParams:mP,isTypedArray:TP,isFileList:dP,forEach:ko,merge:sf,extend:SP,trim:xP,stripBOM:bP,inherits:PP,toFlatObject:CP,kindOf:$l,kindOfTest:At,endsWith:EP,toArray:kP,forEachEntry:OP,matchAll:RP,isHTMLForm:jP,hasOwnProperty:qp,hasOwnProp:qp,reduceDescriptors:i1,freezeMethods:DP,toObjectSet:MP,toCamelCase:NP,noop:AP,toFiniteNumber:FP,findKey:n1,global:gr,isContextDefined:r1,isSpecCompliantForm:IP,toJSONObject:_P,isAsyncFn:VP,isThenable:$P,setImmediate:s1,asap:UP,isIterable:BP};function Y(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}R.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const o1=Y.prototype,a1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{a1[e]={value:e}});Object.defineProperties(Y,a1);Object.defineProperty(o1,"isAxiosError",{value:!0});Y.from=(e,t,n,r,i,s)=>{const o=Object.create(o1);R.toFlatObject(e,o,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return Y.call(o,a,l,n,r,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};const zP=null;function of(e){return R.isPlainObject(e)||R.isArray(e)}function l1(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Qp(e,t,n){return e?e.concat(t).map(function(i,s){return i=l1(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function WP(e){return R.isArray(e)&&!e.some(of)}const HP=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function Bl(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,x){return!R.isUndefined(x[w])});const r=n.metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(R.isDate(m))return m.toISOString();if(R.isBoolean(m))return m.toString();if(!l&&R.isBlob(m))throw new Y("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(m)||R.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,w,x){let y=m;if(m&&!x&&typeof m=="object"){if(R.endsWith(w,"{}"))w=r?w:w.slice(0,-2),m=JSON.stringify(m);else if(R.isArray(m)&&WP(m)||(R.isFileList(m)||R.endsWith(w,"[]"))&&(y=R.toArray(m)))return w=l1(w),y.forEach(function(v,b){!(R.isUndefined(v)||v===null)&&t.append(o===!0?Qp([w],b,s):o===null?w:w+"[]",u(v))}),!1}return of(m)?!0:(t.append(Qp(x,w,s),u(m)),!1)}const f=[],d=Object.assign(HP,{defaultVisitor:c,convertValue:u,isVisitable:of});function h(m,w){if(!R.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+w.join("."));f.push(m),R.forEach(m,function(y,g){(!(R.isUndefined(y)||y===null)&&i.call(t,y,R.isString(g)?g.trim():g,w,d))===!0&&h(y,w?w.concat(g):[g])}),f.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Yp(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Vd(e,t){this._pairs=[],e&&Bl(e,this,t)}const u1=Vd.prototype;u1.append=function(t,n){this._pairs.push([t,n])};u1.toString=function(t){const n=t?function(r){return t.call(this,r,Yp)}:Yp;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function KP(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function c1(e,t,n){if(!t)return e;const r=n&&n.encode||KP;R.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=R.isURLSearchParams(t)?t.toString():new Vd(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Gp{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}const f1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qP=typeof URLSearchParams<"u"?URLSearchParams:Vd,QP=typeof FormData<"u"?FormData:null,YP=typeof Blob<"u"?Blob:null,GP={isBrowser:!0,classes:{URLSearchParams:qP,FormData:QP,Blob:YP},protocols:["http","https","file","blob","url","data"]},$d=typeof window<"u"&&typeof document<"u",af=typeof navigator=="object"&&navigator||void 0,XP=$d&&(!af||["ReactNative","NativeScript","NS"].indexOf(af.product)<0),JP=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ZP=$d&&window.location.href||"http://localhost",eC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$d,hasStandardBrowserEnv:XP,hasStandardBrowserWebWorkerEnv:JP,navigator:af,origin:ZP},Symbol.toStringTag,{value:"Module"})),$e={...eC,...GP};function tC(e,t){return Bl(e,new $e.classes.URLSearchParams,{visitor:function(n,r,i,s){return $e.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function nC(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rC(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r=n.length;return o=!o&&R.isArray(i)?i.length:o,l?(R.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!R.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&R.isArray(i[o])&&(i[o]=rC(i[o])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,i)=>{t(nC(r),i,n,0)}),n}return null}function iC(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const To={transitional:f1,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=R.isObject(t);if(s&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return i?JSON.stringify(d1(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return tC(t,this.formSerializer).toString();if((a=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Bl(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),iC(t)):t}],transformResponse:[function(t){const n=this.transitional||To.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?Y.from(a,Y.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$e.classes.FormData,Blob:$e.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{To.headers[e]={}});const sC=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oC=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&sC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Xp=Symbol("internals");function us(e){return e&&String(e).trim().toLowerCase()}function Ca(e){return e===!1||e==null?e:R.isArray(e)?e.map(Ca):String(e)}function aC(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const lC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Nu(e,t,n,r,i){if(R.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function uC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function cC(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let rt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,u){const c=us(l);if(!c)throw new Error("header name must be a non-empty string");const f=R.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=Ca(a))}const o=(a,l)=>R.forEach(a,(u,c)=>s(u,c,l));if(R.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(R.isString(t)&&(t=t.trim())&&!lC(t))o(oC(t),n);else if(R.isObject(t)&&R.isIterable(t)){let a={},l,u;for(const c of t){if(!R.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?R.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=us(t),t){const r=R.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return aC(i);if(R.isFunction(n))return n.call(this,i,r);if(R.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=us(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Nu(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=us(o),o){const a=R.findKey(r,o);a&&(!n||Nu(r,r[a],a,n))&&(delete r[a],i=!0)}}return R.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||Nu(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return R.forEach(this,(i,s)=>{const o=R.findKey(r,s);if(o){n[o]=Ca(i),delete n[s];return}const a=t?uC(s):String(s).trim();a!==s&&delete n[s],n[a]=Ca(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Xp]=this[Xp]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=us(o);r[a]||(cC(i,o),r[a]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}};rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(rt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});R.freezeMethods(rt);function Lu(e,t){const n=this||To,r=t||n,i=rt.from(r.headers);let s=r.data;return R.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function h1(e){return!!(e&&e.__CANCEL__)}function Xi(e,t,n){Y.call(this,e??"canceled",Y.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(Xi,Y,{__CANCEL__:!0});function p1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function fC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[s];o||(o=u),n[i]=l,r[i]=u;let f=s,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o{n=c,i=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?o(u,c):(i=u,s||(s=setTimeout(()=>{s=null,o(i)},r-f)))},()=>i&&o(i)]}const sl=(e,t,n=3)=>{let r=0;const i=dC(50,250);return hC(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,u=i(l),c=o<=a;r=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},n)},Jp=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Zp=e=>(...t)=>R.asap(()=>e(...t)),pC=$e.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,$e.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL($e.origin),$e.navigator&&/(msie|trident)/i.test($e.navigator.userAgent)):()=>!0,mC=$e.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),R.isString(r)&&o.push("path="+r),R.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function gC(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function yC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function m1(e,t,n){let r=!gC(t);return e&&(r||n==!1)?yC(e,t):t}const em=e=>e instanceof rt?{...e}:e;function Fr(e,t){t=t||{};const n={};function r(u,c,f,d){return R.isPlainObject(u)&&R.isPlainObject(c)?R.merge.call({caseless:d},u,c):R.isPlainObject(c)?R.merge({},c):R.isArray(c)?c.slice():c}function i(u,c,f,d){if(R.isUndefined(c)){if(!R.isUndefined(u))return r(void 0,u,f,d)}else return r(u,c,f,d)}function s(u,c){if(!R.isUndefined(c))return r(void 0,c)}function o(u,c){if(R.isUndefined(c)){if(!R.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,f)=>i(em(u),em(c),f,!0)};return R.forEach(Object.keys({...e,...t}),function(c){const f=l[c]||i,d=f(e[c],t[c],c);R.isUndefined(d)&&f!==a||(n[c]=d)}),n}const g1=e=>{const t=Fr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=rt.from(o),t.url=c1(m1(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),R.isFormData(n)){if($e.hasStandardBrowserEnv||$e.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(R.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,f])=>{u.includes(c.toLowerCase())&&o.set(c,f)})}}if($e.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&pC(t.url))){const l=i&&s&&mC.read(s);l&&o.set(i,l)}return t},vC=typeof XMLHttpRequest<"u",wC=vC&&function(e){return new Promise(function(n,r){const i=g1(e);let s=i.data;const o=rt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=i,c,f,d,h,m;function w(){h&&h(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function y(){if(!x)return;const v=rt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:v,config:e,request:x};p1(function(k){n(k),w()},function(k){r(k),w()},C),x=null}"onloadend"in x?x.onloadend=y:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(y)},x.onabort=function(){x&&(r(new Y("Request aborted",Y.ECONNABORTED,e,x)),x=null)},x.onerror=function(b){const C=b&&b.message?b.message:"Network Error",T=new Y(C,Y.ERR_NETWORK,e,x);T.event=b||null,r(T),x=null},x.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||f1;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),r(new Y(b,C.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,x)),x=null},s===void 0&&o.setContentType(null),"setRequestHeader"in x&&R.forEach(o.toJSON(),function(b,C){x.setRequestHeader(C,b)}),R.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),a&&a!=="json"&&(x.responseType=i.responseType),u&&([d,m]=sl(u,!0),x.addEventListener("progress",d)),l&&x.upload&&([f,h]=sl(l),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=v=>{x&&(r(!v||v.type?new Xi(null,e,x):v),x.abort(),x=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const g=fC(i.url);if(g&&$e.protocols.indexOf(g)===-1){r(new Y("Unsupported protocol "+g+":",Y.ERR_BAD_REQUEST,e));return}x.send(s||null)})},xC=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Y?c:new Xi(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,s(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>R.asap(a),l}},SC=function*(e,t){let n=e.byteLength;if(n{const i=bC(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){a(),l.close();return}let f=c.byteLength;if(n){let d=s+=f;n(d)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},nm=64*1024,{isFunction:Zo}=R,CC=(({Request:e,Response:t})=>({Request:e,Response:t}))(R.global),{ReadableStream:rm,TextEncoder:im}=R.global,sm=(e,...t)=>{try{return!!e(...t)}catch{return!1}},EC=e=>{e=R.merge.call({skipUndefined:!0},CC,e);const{fetch:t,Request:n,Response:r}=e,i=t?Zo(t):typeof fetch=="function",s=Zo(n),o=Zo(r);if(!i)return!1;const a=i&&Zo(rm),l=i&&(typeof im=="function"?(m=>w=>m.encode(w))(new im):async m=>new Uint8Array(await new n(m).arrayBuffer())),u=s&&a&&sm(()=>{let m=!1;const w=new n($e.origin,{body:new rm,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!w}),c=o&&a&&sm(()=>R.isReadableStream(new r("").body)),f={stream:c&&(m=>m.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!f[m]&&(f[m]=(w,x)=>{let y=w&&w[m];if(y)return y.call(w);throw new Y(`Response type '${m}' is not supported`,Y.ERR_NOT_SUPPORT,x)})});const d=async m=>{if(m==null)return 0;if(R.isBlob(m))return m.size;if(R.isSpecCompliantForm(m))return(await new n($e.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(R.isArrayBufferView(m)||R.isArrayBuffer(m))return m.byteLength;if(R.isURLSearchParams(m)&&(m=m+""),R.isString(m))return(await l(m)).byteLength},h=async(m,w)=>{const x=R.toFiniteNumber(m.getContentLength());return x??d(w)};return async m=>{let{url:w,method:x,data:y,signal:g,cancelToken:v,timeout:b,onDownloadProgress:C,onUploadProgress:T,responseType:k,headers:O,withCredentials:F="same-origin",fetchOptions:$}=g1(m),B=t||fetch;k=k?(k+"").toLowerCase():"text";let X=xC([g,v&&v.toAbortSignal()],b),me=null;const J=X&&X.unsubscribe&&(()=>{X.unsubscribe()});let E;try{if(T&&u&&x!=="get"&&x!=="head"&&(E=await h(O,y))!==0){let A=new n(w,{method:"POST",body:y,duplex:"half"}),U;if(R.isFormData(y)&&(U=A.headers.get("content-type"))&&O.setContentType(U),A.body){const[K,ve]=Jp(E,sl(Zp(T)));y=tm(A.body,nm,K,ve)}}R.isString(F)||(F=F?"include":"omit");const N=s&&"credentials"in n.prototype,_={...$,signal:X,method:x.toUpperCase(),headers:O.normalize().toJSON(),body:y,duplex:"half",credentials:N?F:void 0};me=s&&new n(w,_);let j=await(s?B(me,$):B(w,_));const M=c&&(k==="stream"||k==="response");if(c&&(C||M&&J)){const A={};["status","statusText","headers"].forEach(pt=>{A[pt]=j[pt]});const U=R.toFiniteNumber(j.headers.get("content-length")),[K,ve]=C&&Jp(U,sl(Zp(C),!0))||[];j=new r(tm(j.body,nm,K,()=>{ve&&ve(),J&&J()}),A)}k=k||"text";let D=await f[R.findKey(f,k)||"text"](j,m);return!M&&J&&J(),await new Promise((A,U)=>{p1(A,U,{data:D,headers:rt.from(j.headers),status:j.status,statusText:j.statusText,config:m,request:me})})}catch(N){throw J&&J(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,m,me),{cause:N.cause||N}):Y.from(N,N&&N.code,m,me)}}},kC=new Map,y1=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o=s.length,a=o,l,u,c=kC;for(;a--;)l=s[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:EC(t)),c=u;return u};y1();const lf={http:zP,xhr:wC,fetch:{get:y1}};R.forEach(lf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const om=e=>`- ${e}`,TC=e=>R.isFunction(e)||e===null||e===!1,v1={getAdapter:(e,t)=>{e=R.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since : +`+o.map(om).join(` +`):" "+om(o[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:lf};function Du(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xi(null,e)}function am(e){return Du(e),e.headers=rt.from(e.headers),e.data=Lu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),v1.getAdapter(e.adapter||To.adapter,e)(e).then(function(r){return Du(e),r.data=Lu.call(e,e.transformResponse,r),r.headers=rt.from(r.headers),r},function(r){return h1(r)||(Du(e),r&&r.response&&(r.response.data=Lu.call(e,e.transformResponse,r.response),r.response.headers=rt.from(r.response.headers))),Promise.reject(r)})}const w1="1.12.2",zl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const lm={};zl.transitional=function(t,n,r){function i(s,o){return"[Axios v"+w1+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new Y(i(o," has been removed"+(n?" in "+n:"")),Y.ERR_DEPRECATED);return n&&!lm[o]&&(lm[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};zl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function OC(e,t,n){if(typeof e!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new Y("option "+s+" must be "+l,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y("Unknown option "+s,Y.ERR_BAD_OPTION)}}const Ea={assertOptions:OC,validators:zl},_t=Ea.validators;let Tr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Gp,response:new Gp}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Ea.assertOptions(r,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),i!=null&&(R.isFunction(i)?n.paramsSerializer={serialize:i}:Ea.assertOptions(i,{encode:_t.function,serialize:_t.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ea.assertOptions(n,{baseUrl:_t.spelling("baseURL"),withXsrfToken:_t.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&R.merge(s.common,s[n.method]);s&&R.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=rt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(l=l&&w.synchronous,a.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let c,f=0,d;if(!l){const m=[am.bind(this),void 0];for(m.unshift(...a),m.push(...u),d=m.length,c=Promise.resolve(n);f{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Xi(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new x1(function(i){t=i}),cancel:t}}};function jC(e){return function(n){return e.apply(null,n)}}function NC(e){return R.isObject(e)&&e.isAxiosError===!0}const uf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uf).forEach(([e,t])=>{uf[t]=e});function S1(e){const t=new Tr(e),n=Jv(Tr.prototype.request,t);return R.extend(n,Tr.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return S1(Fr(e,i))},n}const Se=S1(To);Se.Axios=Tr;Se.CanceledError=Xi;Se.CancelToken=RC;Se.isCancel=h1;Se.VERSION=w1;Se.toFormData=Bl;Se.AxiosError=Y;Se.Cancel=Se.CanceledError;Se.all=function(t){return Promise.all(t)};Se.spread=jC;Se.isAxiosError=NC;Se.mergeConfig=Fr;Se.AxiosHeaders=rt;Se.formToJSON=e=>d1(R.isHTMLForm(e)?new FormData(e):e);Se.getAdapter=v1.getAdapter;Se.HttpStatusCode=uf;Se.default=Se;const{Axios:lL,AxiosError:uL,CanceledError:cL,isCancel:fL,CancelToken:dL,VERSION:hL,all:pL,Cancel:mL,isAxiosError:gL,spread:yL,toFormData:vL,AxiosHeaders:wL,HttpStatusCode:xL,formToJSON:SL,getAdapter:bL,mergeConfig:PL}=Se;/** + * @remix-run/router v1.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function b1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function DC(){return Math.random().toString(36).substr(2,8)}function cm(e,t){return{usr:e.state,key:e.key,idx:t}}function cf(e,t,n,r){return n===void 0&&(n=null),no({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ji(t):t,{state:n,key:t&&t.key||r||DC()})}function ol(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ji(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function MC(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=Vn.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(no({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){a=Vn.Pop;let x=c(),y=x==null?null:x-u;u=x,l&&l({action:a,location:w.location,delta:y})}function d(x,y){a=Vn.Push;let g=cf(w.location,x,y);u=c()+1;let v=cm(g,u),b=w.createHref(g);try{o.pushState(v,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(b)}s&&l&&l({action:a,location:w.location,delta:1})}function h(x,y){a=Vn.Replace;let g=cf(w.location,x,y);u=c();let v=cm(g,u),b=w.createHref(g);o.replaceState(v,"",b),s&&l&&l({action:a,location:w.location,delta:0})}function m(x){let y=i.location.origin!=="null"?i.location.origin:i.location.href,g=typeof x=="string"?x:ol(x);return g=g.replace(/ $/,"%20"),Pe(y,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,y)}let w={get action(){return a},get location(){return e(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(um,f),l=x,()=>{i.removeEventListener(um,f),l=null}},createHref(x){return t(i,x)},createURL:m,encodeLocation(x){let y=m(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:h,go(x){return o.go(x)}};return w}var fm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(fm||(fm={}));function AC(e,t,n){return n===void 0&&(n="/"),FC(e,t,n)}function FC(e,t,n,r){let i=typeof t=="string"?Ji(t):t,s=Ud(i.pathname||"/",n);if(s==null)return null;let o=P1(e);IC(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Pe(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Qn([r,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(Pe(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),P1(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:WC(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of C1(s.path))i(s,o,l)}),t}function C1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=C1(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function IC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:HC(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const _C=/^:[\w-]+$/,VC=3,$C=2,UC=1,BC=10,zC=-2,dm=e=>e==="*";function WC(e,t){let n=e.split("/"),r=n.length;return n.some(dm)&&(r+=zC),t&&(r+=$C),n.filter(i=>!dm(i)).reduce((i,s)=>i+(_C.test(s)?VC:s===""?UC:BC),r)}function HC(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function KC(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a{let{paramName:d,isOptional:h}=c;if(d==="*"){let w=a[f]||"";o=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const m=a[f];return h&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function QC(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),b1(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function YC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return b1(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ud(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function GC(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ji(e):e;return{pathname:n?n.startsWith("/")?n:XC(n,t):t,search:eE(r),hash:tE(i)}}function XC(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Mu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function JC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function E1(e,t){let n=JC(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function k1(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ji(e):(i=no({},e),Pe(!i.pathname||!i.pathname.includes("?"),Mu("?","pathname","search",i)),Pe(!i.pathname||!i.pathname.includes("#"),Mu("#","pathname","hash",i)),Pe(!i.search||!i.search.includes("#"),Mu("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}a=f>=0?t[f]:"/"}let l=GC(i,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Qn=e=>e.join("/").replace(/\/\/+/g,"/"),ZC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),eE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,tE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function nE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const T1=["post","put","patch","delete"];new Set(T1);const rE=["get",...T1];new Set(rE);/** + * React Router v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ro(){return ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),S.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=k1(u,JSON.parse(o),s,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Qn([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,s,e])}const lE=S.createContext(null);function uE(e){let t=S.useContext(rr).outlet;return t&&S.createElement(lE.Provider,{value:e},t)}function j1(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=S.useContext(Br),{matches:i}=S.useContext(rr),{pathname:s}=Hl(),o=JSON.stringify(E1(i,r.v7_relativeSplatPath));return S.useMemo(()=>k1(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function cE(e,t){return fE(e,t)}function fE(e,t,n,r){Oo()||Pe(!1);let{navigator:i}=S.useContext(Br),{matches:s}=S.useContext(rr),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Hl(),c;if(t){var f;let x=typeof t=="string"?Ji(t):t;l==="/"||(f=x.pathname)!=null&&f.startsWith(l)||Pe(!1),c=x}else c=u;let d=c.pathname||"/",h=d;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(x.length).join("/")}let m=AC(e,{pathname:h}),w=gE(m&&m.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Qn([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Qn([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n,r);return t&&w?S.createElement(Wl.Provider,{value:{location:ro({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Vn.Pop}},w):w}function dE(){let e=xE(),t=nE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:i},n):null,null)}const hE=S.createElement(dE,null);class pE extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?S.createElement(rr.Provider,{value:this.props.routeContext},S.createElement(O1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mE(e){let{routeContext:t,match:n,children:r}=e,i=S.useContext(Bd);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(rr.Provider,{value:t},r)}function gE(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let c=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||Pe(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,d)=>{let h,m=!1,w=null,x=null;n&&(h=a&&f.route.id?a[f.route.id]:void 0,w=f.route.errorElement||hE,l&&(u<0&&d===0?(bE("route-fallback"),m=!0,x=null):u===d&&(m=!0,x=f.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,d+1)),g=()=>{let v;return h?v=w:m?v=x:f.route.Component?v=S.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=c,S.createElement(mE,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?S.createElement(pE,{location:n.location,revalidation:n.revalidation,component:w,error:h,children:g(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):g()},null)}var N1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(N1||{}),L1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(L1||{});function yE(e){let t=S.useContext(Bd);return t||Pe(!1),t}function vE(e){let t=S.useContext(iE);return t||Pe(!1),t}function wE(e){let t=S.useContext(rr);return t||Pe(!1),t}function D1(e){let t=wE(),n=t.matches[t.matches.length-1];return n.route.id||Pe(!1),n.route.id}function xE(){var e;let t=S.useContext(O1),n=vE(),r=D1();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function SE(){let{router:e}=yE(N1.UseNavigateStable),t=D1(L1.UseNavigateStable),n=S.useRef(!1);return R1(()=>{n.current=!0}),S.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ro({fromRouteId:t},s)))},[e,t])}const hm={};function bE(e,t,n){hm[e]||(hm[e]=!0)}function PE(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function CE(e){return uE(e.context)}function ff(e){Pe(!1)}function EE(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Vn.Pop,navigator:s,static:o=!1,future:a}=e;Oo()&&Pe(!1);let l=t.replace(/^\/*/,"/"),u=S.useMemo(()=>({basename:l,navigator:s,static:o,future:ro({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Ji(r));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:m="default"}=r,w=S.useMemo(()=>{let x=Ud(c,l);return x==null?null:{location:{pathname:x,search:f,hash:d,state:h,key:m},navigationType:i}},[l,c,f,d,h,m,i]);return w==null?null:S.createElement(Br.Provider,{value:u},S.createElement(Wl.Provider,{children:n,value:w}))}function kE(e){let{children:t,location:n}=e;return cE(df(t),n)}new Promise(()=>{});function df(e,t){t===void 0&&(t=[]);let n=[];return S.Children.forEach(e,(r,i)=>{if(!S.isValidElement(r))return;let s=[...t,i];if(r.type===S.Fragment){n.push.apply(n,df(r.props.children,s));return}r.type!==ff&&Pe(!1),!r.props.index||!r.props.children||Pe(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=df(r.props.children,s)),n.push(o)}),n}/** + * React Router DOM v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function hf(){return hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function OE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function RE(e,t){return e.button===0&&(!t||t==="_self")&&!OE(e)}const jE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],NE="6";try{window.__reactRouterVersion=NE}catch{}const LE="startTransition",pm=d2[LE];function DE(e){let{basename:t,children:n,future:r,window:i}=e,s=S.useRef();s.current==null&&(s.current=LC({window:i,v5Compat:!0}));let o=s.current,[a,l]=S.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=S.useCallback(f=>{u&&pm?pm(()=>l(f)):l(f)},[l,u]);return S.useLayoutEffect(()=>o.listen(c),[o,c]),S.useEffect(()=>PE(r),[r]),S.createElement(EE,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const ME=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",AE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,M1=S.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,d=TE(t,jE),{basename:h}=S.useContext(Br),m,w=!1;if(typeof u=="string"&&AE.test(u)&&(m=u,ME))try{let v=new URL(window.location.href),b=u.startsWith("//")?new URL(v.protocol+u):new URL(u),C=Ud(b.pathname,h);b.origin===v.origin&&C!=null?u=C+b.search+b.hash:w=!0}catch{}let x=sE(u,{relative:i}),y=FE(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:f});function g(v){r&&r(v),v.defaultPrevented||y(v)}return S.createElement("a",hf({},d,{href:m||x,onClick:w||s?r:g,ref:n,target:l}))});var mm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(mm||(mm={}));var gm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(gm||(gm={}));function FE(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=oE(),u=Hl(),c=j1(e,{relative:o});return S.useCallback(f=>{if(RE(f,n)){f.preventDefault();let d=r!==void 0?r:ol(u)===ol(c);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,c,r,i,n,e,s,o,a])}var IE=({as:e="div",...t},n)=>p.jsx(e,{...t,ref:n}),_E=S.forwardRef(IE),VE="https://challenges.cloudflare.com/turnstile/v0/api.js",zd="cf-turnstile-script",$E="cf-turnstile",Wd="onloadTurnstileCallback",A1=e=>!!document.getElementById(e),UE=({render:e="explicit",onLoadCallbackName:t=Wd,scriptOptions:{nonce:n="",defer:r=!0,async:i=!0,id:s="",appendTo:o,onError:a,crossOrigin:l=""}={}})=>{let u=s||zd;if(A1(u))return;let c=document.createElement("script");c.id=u,c.src=`${VE}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${c.src}"]`)&&(c.defer=!!r,c.async=!!i,n&&(c.nonce=n),l&&(c.crossOrigin=l),a&&(c.onerror=a,delete window[t]),(o==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(c))},or={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function BE(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function zE(e=zd){let[t,n]=S.useState(!1);return S.useEffect(()=>{let r=()=>{A1(e)&&n(!0)},i=new MutationObserver(r);return i.observe(document,{childList:!0,subtree:!0}),r(),()=>{i.disconnect()}},[e]),t}var Ls="unloaded",F1,WE=new Promise((e,t)=>{F1={resolve:e,reject:t},Ls==="ready"&&e(void 0)}),HE=(e=Wd)=>(Ls==="unloaded"&&(Ls="loading",window[e]=()=>{F1.resolve(),Ls="ready",delete window[e]}),WE),I1=S.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:i,onWidgetLoad:s,onSuccess:o,onExpire:a,onError:l,onBeforeInteractive:u,onAfterInteractive:c,onUnsupported:f,onTimeout:d,onLoadScript:h,id:m,style:w,as:x="div",injectScript:y=!0,rerenderOnCallbackChange:g=!1,...v}=e,b=r.size,C=S.useCallback(()=>typeof b>"u"?{}:r.execution==="execute"?or.invisible:r.appearance==="interaction-only"?or.interactionOnly:or[b],[r.execution,b,r.appearance]),[T,k]=S.useState(C()),O=S.useRef(null),[F,$]=S.useState(!1),B=S.useRef(),X=S.useRef(!1),me=m||$E,J=S.useRef({onSuccess:o,onError:l,onExpire:a,onBeforeInteractive:u,onAfterInteractive:c,onUnsupported:f,onTimeout:d});S.useEffect(()=>{g||(J.current={onSuccess:o,onError:l,onExpire:a,onBeforeInteractive:u,onAfterInteractive:c,onUnsupported:f,onTimeout:d})});let E=(n==null?void 0:n.id)||zd,N=zE(E),_=(n==null?void 0:n.onLoadCallbackName)||Wd,j=r.appearance||"always",M=S.useMemo(()=>({sitekey:i,action:r.action,cData:r.cData,theme:r.theme||"auto",language:r.language||"auto",tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:BE(b),retry:r.retry||"auto","retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||"auto","refresh-timeout":r.refreshTimeout||"auto",execution:r.execution||"render",appearance:r.appearance||"always","feedback-enabled":r.feedbackEnabled||!0,callback:A=>{var U,K;X.current=!0,g?o==null||o(A):(K=(U=J.current).onSuccess)==null||K.call(U,A)},"error-callback":g?l:(...A)=>{var U,K;return(K=(U=J.current).onError)==null?void 0:K.call(U,...A)},"expired-callback":g?a:(...A)=>{var U,K;return(K=(U=J.current).onExpire)==null?void 0:K.call(U,...A)},"before-interactive-callback":g?u:(...A)=>{var U,K;return(K=(U=J.current).onBeforeInteractive)==null?void 0:K.call(U,...A)},"after-interactive-callback":g?c:(...A)=>{var U,K;return(K=(U=J.current).onAfterInteractive)==null?void 0:K.call(U,...A)},"unsupported-callback":g?f:(...A)=>{var U,K;return(K=(U=J.current).onUnsupported)==null?void 0:K.call(U,...A)},"timeout-callback":g?d:(...A)=>{var U,K;return(K=(U=J.current).onTimeout)==null?void 0:K.call(U,...A)}}),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,i,b,g,g?o:null,g?l:null,g?a:null,g?u:null,g?c:null,g?f:null,g?d:null]),D=S.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return S.useEffect(function(){y&&!F&&UE({onLoadCallbackName:_,scriptOptions:{...n,id:E}})},[y,F,n,E]),S.useEffect(function(){Ls!=="ready"&&HE(_).then(()=>$(!0)).catch(console.error)},[]),S.useEffect(function(){if(!O.current||!F)return;let A=!1;return(async()=>{if(A||!O.current)return;let U=window.turnstile.render(O.current,M);B.current=U,B.current&&(s==null||s(B.current))})(),()=>{A=!0,B.current&&(window.turnstile.remove(B.current),X.current=!1)}},[me,F,M]),S.useImperativeHandle(t,()=>{let{turnstile:A}=window;return{getResponse(){if(!(A!=null&&A.getResponse)||!B.current||!D()){console.warn("Turnstile has not been loaded");return}return A.getResponse(B.current)},async getResponsePromise(U=3e4,K=100){return new Promise((ve,pt)=>{let W,Ne=async()=>{if(X.current&&window.turnstile&&B.current)try{let Ft=window.turnstile.getResponse(B.current);return W&&clearTimeout(W),Ft?ve(Ft):pt(new Error("No response received"))}catch(Ft){return W&&clearTimeout(W),console.warn("Failed to get response",Ft),pt(new Error("Failed to get response"))}W||(W=setTimeout(()=>{W&&clearTimeout(W),pt(new Error("Timeout"))},U)),await new Promise(Ft=>setTimeout(Ft,K)),await Ne()};Ne()})},reset(){if(!(A!=null&&A.reset)||!B.current||!D()){console.warn("Turnstile has not been loaded");return}r.execution==="execute"&&k(or.invisible);try{X.current=!1,A.reset(B.current)}catch(U){console.warn(`Failed to reset Turnstile widget ${B}`,U)}},remove(){if(!(A!=null&&A.remove)||!B.current||!D()){console.warn("Turnstile has not been loaded");return}k(or.invisible),X.current=!1,A.remove(B.current),B.current=null},render(){if(!(A!=null&&A.render)||!O.current||!D()||B.current){console.warn("Turnstile has not been loaded or container not found");return}let U=A.render(O.current,M);return B.current=U,B.current&&(s==null||s(B.current)),r.execution!=="execute"&&k(b?or[b]:{}),U},execute(){if(r.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!(A!=null&&A.execute)||!O.current||!B.current||!D()){console.warn("Turnstile has not been loaded or container not found");return}A.execute(O.current,M),k(b?or[b]:{})},isExpired(){return!(A!=null&&A.isExpired)||!B.current||!D()?(console.warn("Turnstile has not been loaded"),!1):A.isExpired(B.current)}}},[B,r.execution,b,M,O,D,F,s]),S.useEffect(()=>{N&&!F&&window.turnstile&&$(!0)},[F,N]),S.useEffect(()=>{k(C())},[r.execution,b,j]),S.useEffect(()=>{!N||typeof h!="function"||h()},[N]),p.jsx(_E,{ref:O,as:x,id:me,style:{...T,...w},...v})});I1.displayName="Turnstile";const ym=["admiring","adoring","affectionate","agitated","amazing","angry","awesome","beautiful","blissful","bold","boring","brave","busy","charming","clever","cool","compassionate","competent","condescending","confident","cranky","crazy","dazzling","determined","distracted","dreamy","eager","ecstatic","elastic","elated","elegant","eloquent","epic","exciting","fervent","festive","flamboyant","focused","friendly","frosty","funny","gallant","gifted","goofy","gracious","great","happy","hardcore","heuristic","hopeful","hungry","infallible","inspiring","interesting","intelligent","jolly","jovial","keen","kind","laughing","loving","lucid","magical","mystifying","modest","musing","naughty","nervous","nice","nifty","nostalgic","objective","optimistic","peaceful","pedantic","pensive","practical","priceless","quirky","quizzical","recursing","relaxed","reverent","romantic","sad","serene","sharp","silly","sleepy","stoic","strange","stupefied","suspicious","sweet","tender","thirsty","trusting","unruffled","upbeat","vibrant","vigilant","vigorous","wizardly","wonderful","xenodochial","youthful","zealous","zen"],vm=["albattani","allen","almeida","antonelli","agnesi","archimedes","ardinghelli","aryabhata","austin","babbage","banach","banzai","bardeen","bartik","bassi","beaver","bell","benz","bhabha","bhaskara","black","blackburn","blackwell","bohr","booth","borg","bose","bouman","boyd","brahmagupta","brattain","brown","buck","burnell","cannon","carson","cartwright","carver","cerf","chandrasekhar","chaplygin","chatelet","chatterjee","chebyshev","cohen","chaum","clarke","colden","cori","cray","curran","curie","darwin","davinci","dewdney","dhawan","diffie","dijkstra","dirac","driscoll","dubinsky","easley","edison","einstein","elbakyan","elgamal","elion","ellis","engelbart","euclid","euler","faraday","feistel","fermat","fermi","feynman","franklin","gagarin","galileo","galois","ganguly","gates","gauss","germain","goldberg","goldstine","goldwasser","golick","goodall","gould","greider","grothendieck","haibt","hamilton","haslett","hawking","hellman","heisenberg","hermann","herschel","hertz","heyrovsky","hodgkin","hofstadter","hoover","hopper","hugle","hypatia","ishizaka","jackson","jang","jemison","jennings","jepsen","johnson","joliot","jones","kalam","kapitsa","kare","keldysh","keller","kepler","khayyam","khorana","kilby","kirch","knuth","kowalevski","lalande","lamarr","lamport","leakey","leavitt","lederberg","lehmann","lewin","lichterman","liskov","lovelace","lumiere","mahavira","margulis","matsumoto","maxwell","mayer","mccarthy","mcclintock","mclaren","mclean","mcnulty","mendel","mendeleev","meitner","meninsky","merkle","mestorf","mirzakhani","montalcini","moore","morse","murdock","moser","napier","nash","neumann","newton","niel","nightingale","nobel","noether","northcutt","noyce","panini","pare","pascal","pasteur","payne","perlman","pike","poincare","poitras","proskuriakova","ptolemy","raman","ramanujan","ride","ritchie","rhodes","robinson","roentgen","rosalind","rubin","saha","sammet","sanderson","satoshi","shamir","shannon","shaw","shirley","shockley","shtern","sinoussi","snyder","solomon","spence","stonebraker","sutherland","swanson","swartz","swirles","taussig","tereshkova","tesla","tharp","thompson","torvalds","tu","turing","varahamihira","vaughan","visvesvaraya","volhard","villani","wescoff","wilbur","wiles","williams","williamson","wilson","wing","wozniak","wright","wu","yalow","yonath","zhukovsky"],_1=(e="",t="-")=>{const n=`${ym[Math.floor(Math.random()*ym.length)]??""}${t}${vm[Math.floor(Math.random()*vm.length)]??""}`;return n===`boring${t}wozniak`?_1(e,t):e.length>0?`${e}${t}${n}`:n};function KE(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},xm=(e,t,n)=>{e.loadNamespaces(t,V1(e,n))},Sm=(e,t,n,r)=>{Or(n)&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,V1(e,r))},qE=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,s=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=t.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(r,e)&&(!i||o(s,e)))},QE=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(pf("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}):qE(e,t,n)},Or=e=>typeof e=="string",YE=e=>typeof e=="object"&&e!==null,GE=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,XE={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},JE=e=>XE[e],ZE=e=>e.replace(GE,JE);let mf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ZE};const ek=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};mf={...mf,...e}},tk=()=>mf;let $1;const nk=e=>{$1=e},rk=()=>$1,ik={type:"3rdParty",init(e){ek(e.options.react),nk(e)}},sk=S.createContext();class ok{constructor(){jh(this,"getUsedNamespaces",()=>Object.keys(this.usedNamespaces));this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}}const ak=(e,t)=>{const n=S.useRef();return S.useEffect(()=>{n.current=e},[e,t]),n.current},U1=(e,t,n,r)=>e.getFixedT(t,n,r),lk=(e,t,n,r)=>S.useCallback(U1(e,t,n,r),[e,t,n,r]),zr=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=S.useContext(sk)||{},s=n||r||rk();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new ok),!s){pf("You will need to pass in an i18next instance by using initReactI18next");const b=(T,k)=>Or(k)?k:YE(k)&&Or(k.defaultValue)?k.defaultValue:Array.isArray(T)?T[T.length-1]:T,C=[b,{},!1];return C.t=b,C.i18n={},C.ready=!1,C}s.options.react&&s.options.react.wait!==void 0&&pf("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...tk(),...s.options.react,...t},{useSuspense:a,keyPrefix:l}=o;let u=i||s.options&&s.options.defaultNS;u=Or(u)?[u]:u||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(u);const c=(s.isInitialized||s.initializedStoreOnce)&&u.every(b=>QE(b,s,o)),f=lk(s,t.lng||null,o.nsMode==="fallback"?u:u[0],l),d=()=>f,h=()=>U1(s,t.lng||null,o.nsMode==="fallback"?u:u[0],l),[m,w]=S.useState(d);let x=u.join();t.lng&&(x=`${t.lng}${x}`);const y=ak(x),g=S.useRef(!0);S.useEffect(()=>{const{bindI18n:b,bindI18nStore:C}=o;g.current=!0,!c&&!a&&(t.lng?Sm(s,t.lng,u,()=>{g.current&&w(h)}):xm(s,u,()=>{g.current&&w(h)})),c&&y&&y!==x&&g.current&&w(h);const T=()=>{g.current&&w(h)};return b&&s&&s.on(b,T),C&&s&&s.store.on(C,T),()=>{g.current=!1,b&&s&&b.split(" ").forEach(k=>s.off(k,T)),C&&s&&C.split(" ").forEach(k=>s.store.off(k,T))}},[s,x]),S.useEffect(()=>{g.current&&c&&w(d)},[s,l,c]);const v=[m,s,c];if(v.t=m,v.i18n=s,v.ready=c,c||!c&&!a)return v;throw new Promise(b=>{t.lng?Sm(s,t.lng,u,()=>b()):xm(s,u,()=>b())})};/*! js-cookie v3.0.5 | MIT */function ea(e){for(var t=1;t"u")){o=ea({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},a=0;a{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||ck},dk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,hk=/\/\*[^]*?\*\/| +/g,bm=/\n+/g,On=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?On(o,s):s+"{"+On(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=On(o,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=On.p?On.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},en={},B1=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+B1(e[n]);return t}return e},pk=(e,t,n,r,i)=>{let s=B1(e),o=en[s]||(en[s]=(l=>{let u=0,c=11;for(;u>>0;return"go"+c})(s));if(!en[o]){let l=s!==e?e:(u=>{let c,f,d=[{}];for(;c=dk.exec(u.replace(hk,""));)c[4]?d.shift():c[3]?(f=c[3].replace(bm," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][c[1]]=c[2].replace(bm," ").trim();return d[0]})(e);en[o]=On(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&en.g?en.g:null;return n&&(en.g=en[o]),((l,u,c,f)=>{f?u.data=u.data.replace(f,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(en[o],t,r,a),o},mk=(e,t,n)=>e.reduce((r,i,s)=>{let o=t[s];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":On(a,""):a===!1?"":a}return r+i+(o??"")},"");function Kl(e){let t=this||{},n=e.call?e(t.p):e;return pk(n.unshift?n.raw?mk(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,fk(t.target),t.g,t.o,t.k)}let z1,yf,vf;Kl.bind({g:1});let yn=Kl.bind({k:1});function gk(e,t,n,r){On.p=t,z1=e,yf=n,vf=r}function ir(e,t){let n=this||{};return function(){let r=arguments;function i(s,o){let a=Object.assign({},s),l=a.className||i.className;n.p=Object.assign({theme:yf&&yf()},a),n.o=/ *go\d+/.test(l),a.className=Kl.apply(n,r)+(l?" "+l:"");let u=e;return e[0]&&(u=a.as||e,delete a.as),vf&&u[0]&&vf(a),z1(u,a)}return i}}var yk=e=>typeof e=="function",al=(e,t)=>yk(e)?e(t):e,vk=(()=>{let e=0;return()=>(++e).toString()})(),W1=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),wk=20,Hd="default",H1=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return H1(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:i}=t;return{...e,toasts:e.toasts.map(o=>o.id===i||i===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},ka=[],K1={toasts:[],pausedAt:void 0,settings:{toastLimit:wk}},Qt={},q1=(e,t=Hd)=>{Qt[t]=H1(Qt[t]||K1,e),ka.forEach(([n,r])=>{n===t&&r(Qt[t])})},Q1=e=>Object.keys(Qt).forEach(t=>q1(e,t)),xk=e=>Object.keys(Qt).find(t=>Qt[t].toasts.some(n=>n.id===e)),ql=(e=Hd)=>t=>{q1(t,e)},Sk={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},bk=(e={},t=Hd)=>{let[n,r]=S.useState(Qt[t]||K1),i=S.useRef(Qt[t]);S.useEffect(()=>(i.current!==Qt[t]&&r(Qt[t]),ka.push([t,r]),()=>{let o=ka.findIndex(([a])=>a===t);o>-1&&ka.splice(o,1)}),[t]);let s=n.toasts.map(o=>{var a,l,u;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((a=e[o.type])==null?void 0:a.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((l=e[o.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||Sk[o.type],style:{...e.style,...(u=e[o.type])==null?void 0:u.style,...o.style}}});return{...n,toasts:s}},Pk=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||vk()}),Ro=e=>(t,n)=>{let r=Pk(t,e,n);return ql(r.toasterId||xk(r.id))({type:2,toast:r}),r.id},Z=(e,t)=>Ro("blank")(e,t);Z.error=Ro("error");Z.success=Ro("success");Z.loading=Ro("loading");Z.custom=Ro("custom");Z.dismiss=(e,t)=>{let n={type:3,toastId:e};t?ql(t)(n):Q1(n)};Z.dismissAll=e=>Z.dismiss(void 0,e);Z.remove=(e,t)=>{let n={type:4,toastId:e};t?ql(t)(n):Q1(n)};Z.removeAll=e=>Z.remove(void 0,e);Z.promise=(e,t,n)=>{let r=Z.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let s=t.success?al(t.success,i):void 0;return s?Z.success(s,{id:r,...n,...n==null?void 0:n.success}):Z.dismiss(r),i}).catch(i=>{let s=t.error?al(t.error,i):void 0;s?Z.error(s,{id:r,...n,...n==null?void 0:n.error}):Z.dismiss(r)}),e};var Ck=1e3,Ek=(e,t="default")=>{let{toasts:n,pausedAt:r}=bk(e,t),i=S.useRef(new Map).current,s=S.useCallback((f,d=Ck)=>{if(i.has(f))return;let h=setTimeout(()=>{i.delete(f),o({type:4,toastId:f})},d);i.set(f,h)},[]);S.useEffect(()=>{if(r)return;let f=Date.now(),d=n.map(h=>{if(h.duration===1/0)return;let m=(h.duration||0)+h.pauseDuration-(f-h.createdAt);if(m<0){h.visible&&Z.dismiss(h.id);return}return setTimeout(()=>Z.dismiss(h.id,t),m)});return()=>{d.forEach(h=>h&&clearTimeout(h))}},[n,r,t]);let o=S.useCallback(ql(t),[t]),a=S.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=S.useCallback((f,d)=>{o({type:1,toast:{id:f,height:d}})},[o]),u=S.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),c=S.useCallback((f,d)=>{let{reverseOrder:h=!1,gutter:m=8,defaultPosition:w}=d||{},x=n.filter(v=>(v.position||w)===(f.position||w)&&v.height),y=x.findIndex(v=>v.id===f.id),g=x.filter((v,b)=>bv.visible).slice(...h?[g+1]:[0,g]).reduce((v,b)=>v+(b.height||0)+m,0)},[n]);return S.useEffect(()=>{n.forEach(f=>{if(f.dismissed)s(f.id,f.removeDelay);else{let d=i.get(f.id);d&&(clearTimeout(d),i.delete(f.id))}})},[n,s]),{toasts:n,handlers:{updateHeight:l,startPause:a,endPause:u,calculateOffset:c}}},kk=yn` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,Tk=yn` +from { + transform: scale(0); + opacity: 0; +} +to { + transform: scale(1); + opacity: 1; +}`,Ok=yn` +from { + transform: scale(0) rotate(90deg); + opacity: 0; +} +to { + transform: scale(1) rotate(90deg); + opacity: 1; +}`,Rk=ir("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#ff4b4b"}; + position: relative; + transform: rotate(45deg); + + animation: ${kk} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + + &:after, + &:before { + content: ''; + animation: ${Tk} 0.15s ease-out forwards; + animation-delay: 150ms; + position: absolute; + border-radius: 3px; + opacity: 0; + background: ${e=>e.secondary||"#fff"}; + bottom: 9px; + left: 4px; + height: 2px; + width: 12px; + } + + &:before { + animation: ${Ok} 0.15s ease-out forwards; + animation-delay: 180ms; + transform: rotate(90deg); + } +`,jk=yn` + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +`,Nk=ir("div")` + width: 12px; + height: 12px; + box-sizing: border-box; + border: 2px solid; + border-radius: 100%; + border-color: ${e=>e.secondary||"#e0e0e0"}; + border-right-color: ${e=>e.primary||"#616161"}; + animation: ${jk} 1s linear infinite; +`,Lk=yn` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,Dk=yn` +0% { + height: 0; + width: 0; + opacity: 0; +} +40% { + height: 0; + width: 6px; + opacity: 1; +} +100% { + opacity: 1; + height: 10px; +}`,Mk=ir("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#61d345"}; + position: relative; + transform: rotate(45deg); + + animation: ${Lk} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + &:after { + content: ''; + box-sizing: border-box; + animation: ${Dk} 0.2s ease-out forwards; + opacity: 0; + animation-delay: 200ms; + position: absolute; + border-right: 2px solid; + border-bottom: 2px solid; + border-color: ${e=>e.secondary||"#fff"}; + bottom: 6px; + left: 6px; + height: 10px; + width: 6px; + } +`,Ak=ir("div")` + position: absolute; +`,Fk=ir("div")` + position: relative; + display: flex; + justify-content: center; + align-items: center; + min-width: 20px; + min-height: 20px; +`,Ik=yn` +from { + transform: scale(0.6); + opacity: 0.4; +} +to { + transform: scale(1); + opacity: 1; +}`,_k=ir("div")` + position: relative; + transform: scale(0.6); + opacity: 0.4; + min-width: 20px; + animation: ${Ik} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; +`,Vk=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?S.createElement(_k,null,t):t:n==="blank"?null:S.createElement(Fk,null,S.createElement(Nk,{...r}),n!=="loading"&&S.createElement(Ak,null,n==="error"?S.createElement(Rk,{...r}):S.createElement(Mk,{...r})))},$k=e=>` +0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} +100% {transform: translate3d(0,0,0) scale(1); opacity:1;} +`,Uk=e=>` +0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} +100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} +`,Bk="0%{opacity:0;} 100%{opacity:1;}",zk="0%{opacity:1;} 100%{opacity:0;}",Wk=ir("div")` + display: flex; + align-items: center; + background: #fff; + color: #363636; + line-height: 1.3; + will-change: transform; + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); + max-width: 350px; + pointer-events: auto; + padding: 8px 10px; + border-radius: 8px; +`,Hk=ir("div")` + display: flex; + justify-content: center; + margin: 4px 10px; + color: inherit; + flex: 1 1 auto; + white-space: pre-line; +`,Kk=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=W1()?[Bk,zk]:[$k(n),Uk(n)];return{animation:t?`${yn(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${yn(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},qk=S.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?Kk(e.position||t||"top-center",e.visible):{opacity:0},s=S.createElement(Vk,{toast:e}),o=S.createElement(Hk,{...e.ariaProps},al(e.message,e));return S.createElement(Wk,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:s,message:o}):S.createElement(S.Fragment,null,s,o))});gk(S.createElement);var Qk=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let s=S.useCallback(o=>{if(o){let a=()=>{let l=o.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return S.createElement("div",{ref:s,className:t,style:n},i)},Yk=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:W1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},Gk=Kl` + z-index: 9999; + > * { + pointer-events: auto; + } +`,ta=16,Xk=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,toasterId:s,containerStyle:o,containerClassName:a})=>{let{toasts:l,handlers:u}=Ek(n,s);return S.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:ta,left:ta,right:ta,bottom:ta,pointerEvents:"none",...o},className:a,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(c=>{let f=c.position||t,d=u.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),h=Yk(f,d);return S.createElement(Qk,{id:c.id,key:c.id,onHeightUpdate:u.updateHeight,className:c.visible?Gk:"",style:h},c.type==="custom"?al(c.message,c):i?i(c):S.createElement(qk,{toast:c,position:f}))}))},Jk=Z;function se(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ir(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Y1=6048e5,Zk=864e5,na=43200,Pm=1440;let eT={};function jo(){return eT}function _r(e,t){var a,l,u,c;const n=jo(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=se(e),s=i.getDay(),o=(s=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Cm(e){const t=se(e);return t.setHours(0,0,0,0),t}function ul(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function tT(e,t){const n=Cm(e),r=Cm(t),i=n.getTime()-ul(n),s=r.getTime()-ul(r);return Math.round((i-s)/Zk)}function nT(e){const t=G1(e),n=Ir(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ll(n)}function Ta(e,t){const n=se(e),r=se(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function rT(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function iT(e){if(!rT(e)&&typeof e!="number")return!1;const t=se(e);return!isNaN(Number(t))}function sT(e,t){const n=se(e),r=se(t),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function oT(e){return e?Math[e]:Math.trunc}function aT(e,t){return se(e).getTime()-se(t).getTime()}function lT(e){const t=se(e);return t.setHours(23,59,59,999),t}function uT(e){const t=se(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function cT(e){const t=se(e);return+lT(t)==+uT(t)}function fT(e,t){const n=se(e),r=se(t),i=Ta(n,r),s=Math.abs(sT(n,r));let o;if(s<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);let a=Ta(n,r)===-i;cT(se(e))&&s===1&&Ta(e,r)===1&&(a=!1),o=i*(s-Number(a))}return o===0?0:o}function dT(e,t,n){const r=aT(e,t)/1e3;return oT(n==null?void 0:n.roundingMethod)(r)}function hT(e){const t=se(e),n=Ir(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const pT={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},mT=(e,t,n)=>{let r;const i=pT[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function vi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const gT={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yT={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vT={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},wT={date:vi({formats:gT,defaultWidth:"full"}),time:vi({formats:yT,defaultWidth:"full"}),dateTime:vi({formats:vT,defaultWidth:"full"})},xT={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ST=(e,t,n,r)=>xT[e];function Kt(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[o]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const bT={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},PT={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CT={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ET={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},kT={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},TT={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},OT=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},RT={ordinalNumber:OT,era:Kt({values:bT,defaultWidth:"wide"}),quarter:Kt({values:PT,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Kt({values:CT,defaultWidth:"wide"}),day:Kt({values:ET,defaultWidth:"wide"}),dayPeriod:Kt({values:kT,defaultWidth:"wide",formattingValues:TT,defaultFormattingWidth:"wide"})};function qt(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?NT(a,f=>f.test(o)):jT(a,f=>f.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function jT(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function NT(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let o=e.valueCallback?e.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const LT=/^(\d+)(th|st|nd|rd)?/i,DT=/\d+/i,MT={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},AT={any:[/^b/i,/^(a|c)/i]},FT={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},IT={any:[/1/i,/2/i,/3/i,/4/i]},_T={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},VT={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},$T={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},UT={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},BT={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},zT={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},WT={ordinalNumber:X1({matchPattern:LT,parsePattern:DT,valueCallback:e=>parseInt(e,10)}),era:qt({matchPatterns:MT,defaultMatchWidth:"wide",parsePatterns:AT,defaultParseWidth:"any"}),quarter:qt({matchPatterns:FT,defaultMatchWidth:"wide",parsePatterns:IT,defaultParseWidth:"any",valueCallback:e=>e+1}),month:qt({matchPatterns:_T,defaultMatchWidth:"wide",parsePatterns:VT,defaultParseWidth:"any"}),day:qt({matchPatterns:$T,defaultMatchWidth:"wide",parsePatterns:UT,defaultParseWidth:"any"}),dayPeriod:qt({matchPatterns:BT,defaultMatchWidth:"any",parsePatterns:zT,defaultParseWidth:"any"})},J1={code:"en-US",formatDistance:mT,formatLong:wT,formatRelative:ST,localize:RT,match:WT,options:{weekStartsOn:0,firstWeekContainsDate:1}};function HT(e){const t=se(e);return tT(t,hT(t))+1}function KT(e){const t=se(e),n=ll(t).getTime()-nT(t).getTime();return Math.round(n/Y1)+1}function Z1(e,t){var c,f,d,h;const n=se(e),r=n.getFullYear(),i=jo(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(d=i.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,o=Ir(e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=_r(o,t),l=Ir(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=_r(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function qT(e,t){var a,l,u,c;const n=jo(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=Z1(e,t),s=Ir(e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),_r(s,t)}function QT(e,t){const n=se(e),r=_r(n,t).getTime()-qT(n,t).getTime();return Math.round(r/Y1)+1}function ne(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Sn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ne(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ne(n+1,2)},d(e,t){return ne(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ne(e.getHours()%12||12,t.length)},H(e,t){return ne(e.getHours(),t.length)},m(e,t){return ne(e.getMinutes(),t.length)},s(e,t){return ne(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.floor(r*Math.pow(10,n-3));return ne(i,t.length)}},Kr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},YT={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Sn.y(e,t)},Y:function(e,t,n,r){const i=Z1(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return ne(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):ne(s,t.length)},R:function(e,t){const n=G1(e);return ne(n,t.length)},u:function(e,t){const n=e.getFullYear();return ne(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ne(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ne(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Sn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ne(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=QT(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):ne(i,t.length)},I:function(e,t,n){const r=KT(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ne(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Sn.d(e,t)},D:function(e,t,n){const r=HT(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ne(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ne(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ne(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return ne(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Kr.noon:r===0?i=Kr.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Kr.evening:r>=12?i=Kr.afternoon:r>=4?i=Kr.morning:i=Kr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Sn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Sn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ne(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ne(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Sn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Sn.s(e,t)},S:function(e,t){return Sn.S(e,t)},X:function(e,t,n,r){const s=(r._originalDate||e).getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return km(s);case"XXXX":case"XX":return cr(s);case"XXXXX":case"XXX":default:return cr(s,":")}},x:function(e,t,n,r){const s=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return km(s);case"xxxx":case"xx":return cr(s);case"xxxxx":case"xxx":default:return cr(s,":")}},O:function(e,t,n,r){const s=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Em(s,":");case"OOOO":default:return"GMT"+cr(s,":")}},z:function(e,t,n,r){const s=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Em(s,":");case"zzzz":default:return"GMT"+cr(s,":")}},t:function(e,t,n,r){const i=r._originalDate||e,s=Math.floor(i.getTime()/1e3);return ne(s,t.length)},T:function(e,t,n,r){const s=(r._originalDate||e).getTime();return ne(s,t.length)}};function Em(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+ne(s,2)}function km(e,t){return e%60===0?(e>0?"-":"+")+ne(Math.abs(e)/60,2):cr(e,t)}function cr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=ne(Math.floor(r/60),2),s=ne(r%60,2);return n+i+t+s}const Tm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ew=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},GT=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Tm(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Tm(r,t)).replace("{{time}}",ew(i,t))},XT={p:ew,P:GT},JT=/^D+$/,ZT=/^Y+$/,e3=["D","DD","YY","YYYY"];function t3(e){return JT.test(e)}function n3(e){return ZT.test(e)}function Om(e,t,n){const r=r3(e,t,n);if(console.warn(r),e3.includes(e))throw new RangeError(r)}function r3(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const i3=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s3=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,o3=/^'([^]*?)'?$/,a3=/''/g,l3=/[a-zA-Z]/;function u3(e,t,n){var c,f,d,h;const r=jo(),i=r.locale??J1,s=r.firstWeekContainsDate??((f=(c=r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,o=r.weekStartsOn??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,a=se(e);if(!iT(a))throw new RangeError("Invalid time value");const l={firstWeekContainsDate:s,weekStartsOn:o,locale:i,_originalDate:a};return t.match(s3).map(function(m){const w=m[0];if(w==="p"||w==="P"){const x=XT[w];return x(m,i.formatLong)}return m}).join("").match(i3).map(function(m){if(m==="''")return"'";const w=m[0];if(w==="'")return c3(m);const x=YT[w];if(x)return n3(m)&&Om(m,t,String(e)),t3(m)&&Om(m,t,String(e)),x(a,m,i.localize,l);if(w.match(l3))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return m}).join("")}function c3(e){const t=e.match(o3);return t?t[1].replace(a3,"'"):e}function f3(e,t,n){const r=jo(),i=(n==null?void 0:n.locale)??r.locale??J1,s=2520,o=Ta(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:o});let l,u;o>0?(l=se(t),u=se(e)):(l=se(e),u=se(t));const c=dT(u,l),f=(ul(u)-ul(l))/1e3,d=Math.round((c-f)/60);let h;if(d<2)return n!=null&&n.includeSeconds?c<5?i.formatDistance("lessThanXSeconds",5,a):c<10?i.formatDistance("lessThanXSeconds",10,a):c<20?i.formatDistance("lessThanXSeconds",20,a):c<40?i.formatDistance("halfAMinute",0,a):c<60?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",1,a):d===0?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",d,a);if(d<45)return i.formatDistance("xMinutes",d,a);if(d<90)return i.formatDistance("aboutXHours",1,a);if(d{let r;const i=p3[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},g3={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},y3={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},v3={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},w3={date:vi({formats:g3,defaultWidth:"full"}),time:vi({formats:y3,defaultWidth:"full"}),dateTime:vi({formats:v3,defaultWidth:"full"})};function Rm(e,t,n){const r="eeee p";return h3(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const x3={lastWeek:Rm,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:Rm,other:"PP p"},S3=(e,t,n,r)=>{const i=x3[e];return typeof i=="function"?i(t,n,r):i},b3={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},P3={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},C3={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},E3={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},k3={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},T3={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},O3=(e,t)=>{const n=Number(e);switch(t==null?void 0:t.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},R3={ordinalNumber:O3,era:Kt({values:b3,defaultWidth:"wide"}),quarter:Kt({values:P3,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Kt({values:C3,defaultWidth:"wide"}),day:Kt({values:E3,defaultWidth:"wide"}),dayPeriod:Kt({values:k3,defaultWidth:"wide",formattingValues:T3,defaultFormattingWidth:"wide"})},j3=/^(第\s*)?\d+(日|时|分|秒)?/i,N3=/\d+/i,L3={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},D3={any:[/^(前)/i,/^(公元)/i]},M3={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},A3={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},F3={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},I3={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},_3={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},V3={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},$3={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},U3={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},B3={ordinalNumber:X1({matchPattern:j3,parsePattern:N3,valueCallback:e=>parseInt(e,10)}),era:qt({matchPatterns:L3,defaultMatchWidth:"wide",parsePatterns:D3,defaultParseWidth:"any"}),quarter:qt({matchPatterns:M3,defaultMatchWidth:"wide",parsePatterns:A3,defaultParseWidth:"any",valueCallback:e=>e+1}),month:qt({matchPatterns:F3,defaultMatchWidth:"wide",parsePatterns:I3,defaultParseWidth:"any"}),day:qt({matchPatterns:_3,defaultMatchWidth:"wide",parsePatterns:V3,defaultParseWidth:"any"}),dayPeriod:qt({matchPatterns:$3,defaultMatchWidth:"any",parsePatterns:U3,defaultParseWidth:"any"})},z3={code:"zh-CN",formatDistance:m3,formatLong:w3,formatRelative:S3,localize:R3,match:B3,options:{weekStartsOn:1,firstWeekContainsDate:4}};function tw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t${e.text}`,className:"w-full h-[60vh] border-0",sandbox:"allow-popups allow-popups-to-escape-sandbox",title:"Email Content"})})]})}function K3(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"})})}function q3(e){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M20.25 20.25v-4.5m0 4.5h-4.5m4.5 0L15 15M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15m11.25-6L15 9"})})}function Q3({emails:e,isLoading:t,isFetching:n,onDelete:r,isDeleting:i,onRefresh:s,selectedIds:o,setSelectedIds:a,isAddressCreated:l,onSelectEmail:u,showViewPasswordButton:c,onShowPassword:f,selectedEmail:d,onCloseDetail:h,onExpand:m}){const{t:w}=zr(),x=v=>{a(b=>b.includes(v)?b.filter(C=>C!==v):[...b,v])},y=()=>{e.length!==0&&(o.length===e.length?a([]):a(e.map(v=>v.id)))},g=()=>d?p.jsx(iw,{email:d,onClose:h}):l?t?p.jsxs("div",{className:"w-full items-center h-full flex-col justify-center flex",children:[p.jsx(jm,{}),p.jsx("p",{className:"text-zinc-400 mt-6",children:w("Waiting for emails...")})]}):e.length===0?p.jsxs("div",{className:"w-full items-center h-full flex-col justify-center flex",children:[p.jsx(jm,{}),p.jsx("p",{className:"text-zinc-400 mt-6",children:w("Waiting for emails...")})]}):e.map(v=>{var b,C;return p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-neutral-300 bg-neutral-100 data-[state=checked]:border-neutral-900 data-[state=checked]:bg-neutral-600 data-[state=checked]:text-neutral-100 dark:border-neutral-700 dark:bg-neutral-800 dark:data-[state=checked]:border-neutral-300 dark:data-[state=checked]:bg-neutral-300",checked:o.includes(v.id),onChange:()=>x(v.id)}),p.jsxs("div",{onClick:()=>u(v),className:"cursor-pointer flex-1 flex flex-col items-start gap-2 rounded-lg border border-zinc-600 p-3 text-left text-sm transition-all hover:bg-zinc-700",children:[p.jsxs("div",{className:"flex w-full flex-col gap-1",children:[p.jsxs("div",{className:"flex items-center",children:[p.jsx("div",{className:"flex items-center gap-2",children:p.jsxs("div",{className:"font-semibold",children:[((b=v.from)==null?void 0:b.name)||v.messageFrom," ",((C=v.from)==null?void 0:C.address)&&`(${v.from.address})`]})}),p.jsx("div",{className:"ml-auto text-xs",children:d3(new Date(v.date||v.createdAt),{addSuffix:!0,locale:z3})})]}),p.jsx("div",{className:"text-xs font-medium",children:v.subject})]}),p.jsx("div",{className:"line-clamp-2 text-xs text-zinc-300 font-normal w-full",children:(v.text||v.html||"").substring(0,300)})]})]},v.id)}):p.jsxs("div",{className:"w-full items-center h-full flex-col justify-center flex",children:[p.jsx(W3,{}),p.jsx("p",{className:"text-zinc-400 mt-6",children:"请先创建一个临时邮箱地址"})]});return p.jsxs("div",{className:"rounded-md border border-cyan-50/20 text-white",children:[p.jsxs("div",{className:"w-full rounded-t-md p-2 flex items-center bg-zinc-800 text-zinc-200 gap-2",children:[p.jsxs("div",{className:"flex items-center justify-start gap-2 font-bold",children:[p.jsx(nw,{className:"size-6"}),w("INBOX"),l&&e.length>0&&!d&&p.jsx("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-zinc-600 rounded-full",children:e.length}),d&&p.jsxs("button",{onClick:h,className:"flex items-center gap-1 text-sm font-semibold text-cyan-400 hover:text-cyan-300 ml-2",children:[p.jsx(K3,{}),"返回邮件列表"]})]}),p.jsx("div",{className:"ml-auto flex items-center gap-2",children:d?p.jsxs(p.Fragment,{children:[p.jsx("button",{onClick:m,className:"p-1 rounded text-cyan-400 hover:text-cyan-300",title:"放大",children:p.jsx(q3,{className:"w-5 h-5"})}),p.jsx("button",{onClick:()=>r([d.id]),disabled:i,className:"p-1 rounded text-red-500 disabled:text-gray-500 hover:text-red-400",title:"删除",children:p.jsx(Nm,{className:"w-5 h-5"})})]}):p.jsxs(p.Fragment,{children:[c&&p.jsx("button",{className:"p-1 rounded text-cyan-400 hover:text-cyan-300",title:"查看密码",onClick:f,children:p.jsx(wf,{className:"w-5 h-5"})}),l&&e.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded bg-zinc-700 border-zinc-600 text-cyan-600 focus:ring-cyan-500",title:"全选",checked:o.length===e.length&&e.length>0,onChange:y}),p.jsx("button",{onClick:()=>r(o),disabled:o.length===0||i,className:"p-1 rounded text-red-500 disabled:text-gray-500 hover:text-red-400",title:"删除选中",children:p.jsx(Nm,{className:"w-5 h-5"})})]}),p.jsx("button",{className:"p-1 rounded",title:"refresh",onClick:s,disabled:!l||n,children:p.jsx(rw,{className:io("size-6",l&&"animate-spin")})})]})})]}),p.jsx("div",{className:io("flex flex-col flex-1 overflow-y-auto p-2",!d&&"grids h-[488px]"),children:g()})]})}function Y3(e){return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[p.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),p.jsx("path",{d:"M5 12l5 5l10 -10"})]})}function G3(e){return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[p.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),p.jsx("path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z"}),p.jsx("path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1"})]})}function Lm({text:e,className:t}){const[n,r]=S.useState(!1),{t:i}=zr(),s=async()=>{try{await navigator.clipboard.writeText(e),r(!0),Z.success(i("Copied to clipboard"))}catch(o){console.error("复制文本失败: ",o)}};return S.useEffect(()=>{if(n){const o=setTimeout(()=>{r(!1)},2e3);return()=>clearTimeout(o)}},[n]),p.jsx("button",{onClick:s,className:io("focus:outline-none focus-visible:outline-none",t),"aria-label":"Copy to clipboard",children:n?p.jsx(Y3,{className:"h-5 w-5 text-green-500"}):p.jsx(G3,{className:"h-5 w-5 text-gray-400"})})}const Ql="/api";async function X3(e){const t=await fetch(`${Ql}/emails`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e})});if(!t.ok)throw new Error("Network response was not ok");return t.json()}async function J3(e){const t=await fetch(`${Ql}/verify`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e})});if(!t.ok){const n=await t.json();throw new Error(n.message||"Turnstile verification failed")}return t.json()}async function Z3(e){const t=await fetch(`${Ql}/delete-emails`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:e})});if(!t.ok)throw new Error("Failed to delete emails");return t.json()}async function eO(e){const t=await fetch(`${Ql}/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})});if(!t.ok){const n=await t.json();throw new Error(n.message||"Login failed")}return t.json()}const sw=S.createContext(null),tO=()=>{const e=S.useContext(sw);if(!e)throw new Error("useConfig 必须在 ConfigProvider 内部使用");return e};function nO(){const e="abcdefghijklmnopqrstuvwxyz.";return e.charAt(Math.floor(Math.random()*e.length))}function rO(e,t){let n="";for(let r=0;r{function n(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),{windowSize:e,isMobile:typeof(e==null?void 0:e.width)=="number"&&(e==null?void 0:e.width)<768,isDesktop:typeof(e==null?void 0:e.width)=="number"&&(e==null?void 0:e.width)>=768}}const Kd=S.createContext({});function Yl(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Gl=S.createContext(null),qd=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class sO extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function oO({children:e,isPresent:t}){const n=S.useId(),r=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=S.useContext(qd);return S.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:u}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return s&&(c.nonce=s),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${l}px !important; + left: ${u}px !important; + } + `),()=>{document.head.removeChild(c)}},[t]),p.jsx(sO,{isPresent:t,childRef:r,sizeRef:i,children:S.cloneElement(e,{ref:r})})}const aO=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Yl(lO),l=S.useId(),u=S.useCallback(f=>{a.set(f,!0);for(const d of a.values())if(!d)return;r&&r()},[a,r]),c=S.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:u,register:f=>(a.set(f,!1),()=>a.delete(f))}),s?[Math.random(),u]:[n,u]);return S.useMemo(()=>{a.forEach((f,d)=>a.set(d,!1))},[n]),S.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=p.jsx(oO,{isPresent:n,children:e})),p.jsx(Gl.Provider,{value:c,children:e})};function lO(){return new Map}function ow(e=!0){const t=S.useContext(Gl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=S.useId();S.useEffect(()=>{e&&i(s)},[e]);const o=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ra=e=>e.key||"";function Dm(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Qd=typeof window<"u",Yd=Qd?S.useLayoutEffect:S.useEffect,uO=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1})=>{const[a,l]=ow(o),u=S.useMemo(()=>Dm(e),[e]),c=o&&!a?[]:u.map(ra),f=S.useRef(!0),d=S.useRef(u),h=Yl(()=>new Map),[m,w]=S.useState(u),[x,y]=S.useState(u);Yd(()=>{f.current=!1,d.current=u;for(let b=0;b{const C=ra(b),T=o&&!a?!1:u===x||c.includes(C),k=()=>{if(h.has(C))h.set(C,!0);else return;let O=!0;h.forEach(F=>{F||(O=!1)}),O&&(v==null||v(),y(d.current),o&&(l==null||l()),r&&r())};return p.jsx(aO,{isPresent:T,initial:!f.current||n?void 0:!1,custom:T?void 0:t,presenceAffectsLayout:i,mode:s,onExitComplete:T?void 0:k,children:b},C)})})},ut=e=>e;let aw=ut;function Gd(e){let t;return()=>(t===void 0&&(t=e()),t)}const Bi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},cn=e=>e*1e3,fn=e=>e/1e3,cO={useManualTiming:!1};function fO(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,f=!1)=>{const h=f&&r?t:n;return c&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,i&&(i=!1,l.process(u))}};return l}const ia=["read","resolveKeyframes","update","preRender","render","postRender"],dO=40;function lw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=ia.reduce((y,g)=>(y[g]=fO(s),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:d}=o,h=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,dO),1),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:ia.reduce((y,g)=>{const v=o[g];return y[g]=(b,C=!1,T=!1)=>(n||m(),v.schedule(b,C,T)),y},{}),cancel:y=>{for(let g=0;gMm[e].some(n=>!!t[n])};function hO(e){for(const t in e)zi[t]={...zi[t],...e[t]}}const pO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function cl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pO.has(e)}let cw=e=>!cl(e);function mO(e){e&&(cw=t=>t.startsWith("on")?!cl(t):e(t))}try{mO(require("@emotion/is-prop-valid").default)}catch{}function gO(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(cw(i)||n===!0&&cl(i)||!t&&!cl(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function yO(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Xl=S.createContext({});function so(e){return typeof e=="string"||Array.isArray(e)}function Jl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Xd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Jd=["initial",...Xd];function Zl(e){return Jl(e.animate)||Jd.some(t=>so(e[t]))}function fw(e){return!!(Zl(e)||e.variants)}function vO(e,t){if(Zl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||so(n)?n:void 0,animate:so(r)?r:void 0}}return e.inherit!==!1?t:{}}function wO(e){const{initial:t,animate:n}=vO(e,S.useContext(Xl));return S.useMemo(()=>({initial:t,animate:n}),[Am(t),Am(n)])}function Am(e){return Array.isArray(e)?e.join(" "):e}const xO=Symbol.for("motionComponentSymbol");function ai(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function SO(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ai(n)&&(n.current=r))},[t])}const Zd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),bO="framerAppearId",dw="data-"+Zd(bO),{schedule:eh}=lw(queueMicrotask,!1),hw=S.createContext({});function PO(e,t,n,r,i){var s,o;const{visualElement:a}=S.useContext(Xl),l=S.useContext(uw),u=S.useContext(Gl),c=S.useContext(qd).reducedMotion,f=S.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const d=f.current,h=S.useContext(hw);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&CO(f.current,n,i,h);const m=S.useRef(!1);S.useInsertionEffect(()=>{d&&m.current&&d.update(n,u)});const w=n[dw],x=S.useRef(!!w&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,w))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,w)));return Yd(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),eh.render(d.render),x.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!x.current&&d.animationState&&d.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,w)}),x.current=!1))}),d}function CO(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:pw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&ai(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function pw(e){if(e)return e.options.allowProjection!==!1?e.projection:pw(e.parent)}function EO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var s,o;e&&hO(e);function a(u,c){let f;const d={...S.useContext(qd),...u,layoutId:kO(u)},{isStatic:h}=d,m=wO(u),w=r(u,h);if(!h&&Qd){TO();const x=OO(d);f=x.MeasureLayout,m.visualElement=PO(i,w,d,t,x.ProjectionNode)}return p.jsxs(Xl.Provider,{value:m,children:[f&&m.visualElement?p.jsx(f,{visualElement:m.visualElement,...d}):null,n(i,u,SO(w,m.visualElement,c),w,h,m.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(o=(s=i.displayName)!==null&&s!==void 0?s:i.name)!==null&&o!==void 0?o:""})`}`;const l=S.forwardRef(a);return l[xO]=i,l}function kO({layoutId:e}){const t=S.useContext(Kd).id;return t&&e!==void 0?t+"-"+e:e}function TO(e,t){S.useContext(uw).strict}function OO(e){const{drag:t,layout:n}=zi;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const RO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function th(e){return typeof e!="string"||e.includes("-")?!1:!!(RO.indexOf(e)>-1||/[A-Z]/u.test(e))}function Fm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function nh(e,t,n,r){if(typeof t=="function"){const[i,s]=Fm(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Fm(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const xf=e=>Array.isArray(e),jO=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),NO=e=>xf(e)?e[e.length-1]||0:e,Ue=e=>!!(e&&e.getVelocity);function Oa(e){const t=Ue(e)?e.get():e;return jO(t)?t.toValue():t}function LO({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:DO(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const mw=e=>(t,n)=>{const r=S.useContext(Xl),i=S.useContext(Gl),s=()=>LO(e,t,r,i);return n?s():Yl(s)};function DO(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Oa(s[d]);let{initial:o,animate:a}=e;const l=Zl(e),u=fw(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?a:o;if(f&&typeof f!="boolean"&&!Jl(f)){const d=Array.isArray(f)?f:[f];for(let h=0;ht=>typeof t=="string"&&t.startsWith(e),yw=gw("--"),MO=gw("var(--"),rh=e=>MO(e)?AO.test(e.split("/*")[0].trim()):!1,AO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,vw=(e,t)=>t&&typeof e=="number"?t.transform(e):e,vn=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},oo={...es,transform:e=>vn(0,1,e)},sa={...es,default:1},No=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pn=No("deg"),Jt=No("%"),H=No("px"),FO=No("vh"),IO=No("vw"),Im={...Jt,parse:e=>Jt.parse(e)/100,transform:e=>Jt.transform(e*100)},_O={borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,radius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,top:H,right:H,bottom:H,left:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,backgroundPositionX:H,backgroundPositionY:H},VO={rotate:Pn,rotateX:Pn,rotateY:Pn,rotateZ:Pn,scale:sa,scaleX:sa,scaleY:sa,scaleZ:sa,skew:Pn,skewX:Pn,skewY:Pn,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:oo,originX:Im,originY:Im,originZ:H},_m={...es,transform:Math.round},ih={..._O,...VO,zIndex:_m,size:H,fillOpacity:oo,strokeOpacity:oo,numOctaves:_m},$O={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},UO=Zi.length;function BO(e,t,n){let r="",i=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}}),ww=()=>({...ah(),attrs:{}}),lh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xw(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Sw=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function bw(e,t,n,r){xw(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Sw.has(i)?i:Zd(i),t.attrs[i])}const fl={};function qO(e){Object.assign(fl,e)}function Pw(e,{layout:t,layoutId:n}){return Wr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!fl[e]||e==="opacity")}function uh(e,t,n){var r;const{style:i}=e,s={};for(const o in i)(Ue(i[o])||t.style&&Ue(t.style[o])||Pw(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return s}function Cw(e,t,n){const r=uh(e,t,n);for(const i in e)if(Ue(e[i])||Ue(t[i])){const s=Zi.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function QO(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const $m=["x","y","width","height","cx","cy","r"],YO={useVisualState:mw({scrapeMotionValuesFromProps:Cw,createRenderState:ww,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(Wr.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<$m.length;a++){const l=$m[a];e[l]!==t[l]&&(o=!0)}o&&ue.read(()=>{QO(n,r),ue.render(()=>{oh(r,i,lh(n.tagName),e.transformTemplate),bw(n,r)})})}})},GO={useVisualState:mw({scrapeMotionValuesFromProps:uh,createRenderState:ah})};function Ew(e,t,n){for(const r in t)!Ue(t[r])&&!Pw(r,n)&&(e[r]=t[r])}function XO({transformTemplate:e},t){return S.useMemo(()=>{const n=ah();return sh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function JO(e,t){const n=e.style||{},r={};return Ew(r,n,e),Object.assign(r,XO(e,t)),r}function ZO(e,t){const n={},r=JO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function eR(e,t,n,r){const i=S.useMemo(()=>{const s=ww();return oh(s,t,lh(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Ew(s,e.style,e),i.style={...s,...i.style}}return i}function tR(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(th(n)?eR:ZO)(r,s,o,n),u=gO(r,typeof n=="string",e),c=n!==S.Fragment?{...u,...l,ref:i}:{},{children:f}=r,d=S.useMemo(()=>Ue(f)?f.get():f,[f]);return S.createElement(n,{...c,children:d})}}function nR(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...th(r)?YO:GO,preloadedFeatures:e,useRender:tR(i),createVisualElement:t,Component:r};return EO(o)}}function kw(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rwindow.ScrollTimeline!==void 0);class iR{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(rR()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class sR extends iR{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function ch(e,t){return e?e[t]||e.default||e:void 0}const Sf=2e4;function Tw(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Sf?1/0:t}function fh(e){return typeof e=="function"}function Um(e,t){e.timeline=t,e.onfinish=null}const dh=e=>Array.isArray(e)&&typeof e[0]=="number",oR={linearEasing:void 0};function aR(e,t){const n=Gd(e);return()=>{var r;return(r=oR[t])!==null&&r!==void 0?r:n()}}const dl=aR(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ow=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s`cubic-bezier(${e}, ${t}, ${n}, ${r})`,bf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ws([0,.65,.55,1]),circOut:ws([.55,0,1,.45]),backIn:ws([.31,.01,.66,-.59]),backOut:ws([.33,1.53,.69,.99])};function jw(e,t){if(e)return typeof e=="function"&&dl()?Ow(e,t):dh(e)?ws(e):Array.isArray(e)?e.map(n=>jw(n,t)||bf.easeOut):bf[e]}const Ot={x:!1,y:!1};function Nw(){return Ot.x||Ot.y}function lR(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const s=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function Lw(e,t){const n=lR(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Bm(e){return t=>{t.pointerType==="touch"||Nw()||e(t)}}function uR(e,t,n={}){const[r,i,s]=Lw(e,n),o=Bm(a=>{const{target:l}=a,u=t(a);if(typeof u!="function"||!l)return;const c=Bm(f=>{u(f),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,i)});return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Dw=(e,t)=>t?e===t?!0:Dw(e,t.parentElement):!1,hh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,cR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fR(e){return cR.has(e.tagName)||e.tabIndex!==-1}const xs=new WeakSet;function zm(e){return t=>{t.key==="Enter"&&e(t)}}function Fu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const dR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=zm(()=>{if(xs.has(n))return;Fu(n,"down");const i=zm(()=>{Fu(n,"up")}),s=()=>Fu(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Wm(e){return hh(e)&&!Nw()}function hR(e,t,n={}){const[r,i,s]=Lw(e,n),o=a=>{const l=a.currentTarget;if(!Wm(a)||xs.has(l))return;xs.add(l);const u=t(a),c=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),!(!Wm(h)||!xs.has(l))&&(xs.delete(l),typeof u=="function"&&u(h,{success:m}))},f=h=>{c(h,n.useGlobalTarget||Dw(l,h.target))},d=h=>{c(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{!fR(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a.addEventListener("focus",u=>dR(u,i),i)}),s}function pR(e){return e==="x"||e==="y"?Ot[e]?null:(Ot[e]=!0,()=>{Ot[e]=!1}):Ot.x||Ot.y?null:(Ot.x=Ot.y=!0,()=>{Ot.x=Ot.y=!1})}const Mw=new Set(["width","height","top","left","right","bottom",...Zi]);let Ra;function mR(){Ra=void 0}const Zt={now:()=>(Ra===void 0&&Zt.set(De.isProcessing||cO.useManualTiming?De.timestamp:performance.now()),Ra),set:e=>{Ra=e,queueMicrotask(mR)}};function ph(e,t){e.indexOf(t)===-1&&e.push(t)}function mh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class gh{constructor(){this.subscriptions=[]}add(t){return ph(this.subscriptions,t),()=>mh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s!isNaN(parseFloat(e));class yR{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Zt.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Zt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=gR(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new gh);const r=this.events[t].add(n);return t==="change"?()=>{r(),ue.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Zt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Hm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hm);return Aw(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ao(e,t){return new yR(e,t)}function vR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ao(n))}function yh(e,t){const n=eu(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=NO(s[o]);vR(e,o,a)}}function wR(e){return!!(Ue(e)&&e.add)}function Pf(e,t){const n=e.getValue("willChange");if(wR(n))return n.add(t)}function Fw(e){return e.props[dw]}const Iw=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,xR=1e-7,SR=12;function bR(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Iw(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>xR&&++abR(s,0,1,e,n);return s=>s===0||s===1?s:Iw(i(s),t,r)}const _w=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Vw=e=>t=>1-e(1-t),$w=Lo(.33,1.53,.69,.99),vh=Vw($w),Uw=_w(vh),Bw=e=>(e*=2)<1?.5*vh(e):.5*(2-Math.pow(2,-10*(e-1))),wh=e=>1-Math.sin(Math.acos(e)),zw=Vw(wh),Ww=_w(wh),Hw=e=>/^0[^.\s]+$/u.test(e);function PR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Hw(e):!0}const Ds=e=>Math.round(e*1e5)/1e5,xh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function CR(e){return e==null}const ER=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Sh=(e,t)=>n=>!!(typeof n=="string"&&ER.test(n)&&n.startsWith(e)||t&&!CR(n)&&Object.prototype.hasOwnProperty.call(n,t)),Kw=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(xh);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},kR=e=>vn(0,255,e),Iu={...es,transform:e=>Math.round(kR(e))},yr={test:Sh("rgb","red"),parse:Kw("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Iu.transform(e)+", "+Iu.transform(t)+", "+Iu.transform(n)+", "+Ds(oo.transform(r))+")"};function TR(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Cf={test:Sh("#"),parse:TR,transform:yr.transform},li={test:Sh("hsl","hue"),parse:Kw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Jt.transform(Ds(t))+", "+Jt.transform(Ds(n))+", "+Ds(oo.transform(r))+")"},_e={test:e=>yr.test(e)||Cf.test(e)||li.test(e),parse:e=>yr.test(e)?yr.parse(e):li.test(e)?li.parse(e):Cf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?yr.transform(e):li.transform(e)},OR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function RR(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xh))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(OR))===null||n===void 0?void 0:n.length)||0)>0}const qw="number",Qw="color",jR="var",NR="var(",Km="${}",LR=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function lo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(LR,l=>(_e.test(l)?(r.color.push(s),i.push(Qw),n.push(_e.parse(l))):l.startsWith(NR)?(r.var.push(s),i.push(jR),n.push(l)):(r.number.push(s),i.push(qw),n.push(parseFloat(l))),++s,Km)).split(Km);return{values:n,split:a,indexes:r,types:i}}function Yw(e){return lo(e).values}function Gw(e){const{split:t,types:n}=lo(e),r=t.length;return i=>{let s="";for(let o=0;otypeof e=="number"?0:e;function MR(e){const t=Yw(e);return Gw(e)(t.map(DR))}const Jn={test:RR,parse:Yw,createTransformer:Gw,getAnimatableNone:MR},AR=new Set(["brightness","contrast","saturate","opacity"]);function FR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(xh)||[];if(!r)return e;const i=n.replace(r,"");let s=AR.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const IR=/\b([a-z-]*)\(.*?\)/gu,Ef={...Jn,getAnimatableNone:e=>{const t=e.match(IR);return t?t.map(FR).join(" "):e}},_R={...ih,color:_e,backgroundColor:_e,outlineColor:_e,fill:_e,stroke:_e,borderColor:_e,borderTopColor:_e,borderRightColor:_e,borderBottomColor:_e,borderLeftColor:_e,filter:Ef,WebkitFilter:Ef},bh=e=>_R[e];function Xw(e,t){let n=bh(e);return n!==Ef&&(n=Jn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const VR=new Set(["auto","none","0"]);function $R(e,t,n){let r=0,i;for(;re===es||e===H,Qm=(e,t)=>parseFloat(e.split(", ")[t]),Ym=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Qm(i[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Qm(s[1],e):0}},UR=new Set(["x","y","z"]),BR=Zi.filter(e=>!UR.has(e));function zR(e){const t=[];return BR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Wi={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ym(4,13),y:Ym(5,14)};Wi.translateX=Wi.x;Wi.translateY=Wi.y;const Rr=new Set;let kf=!1,Tf=!1;function Jw(){if(Tf){const e=Array.from(Rr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=zR(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Tf=!1,kf=!1,Rr.forEach(e=>e.complete()),Rr.clear()}function Zw(){Rr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tf=!0)})}function WR(){Zw(),Jw()}class Ph{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Rr.add(this),kf||(kf=!0,ue.read(Zw),ue.resolveKeyframes(Jw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),HR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function KR(e){const t=HR.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function tx(e,t,n=1){const[r,i]=KR(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return ex(o)?parseFloat(o):o}return rh(i)?tx(i,t,n+1):i}const nx=e=>t=>t.test(e),qR={test:e=>e==="auto",parse:e=>e},rx=[es,H,Jt,Pn,IO,FO,qR],Gm=e=>rx.find(nx(e));class ix extends Ph{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Xm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jn.test(e)||e==="0")&&!e.startsWith("url("));function QR(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function tu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(GR),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const XR=40;class sx{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Zt.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>XR?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&WR(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Zt.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!YR(t,r,i,s))if(o)this.options.duration=0;else{l&&l(tu(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const de=(e,t,n)=>e+(t-e)*n;function _u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function JR({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=_u(l,a,e+1/3),s=_u(l,a,e),o=_u(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function hl(e,t){return n=>n>0?t:e}const Vu=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ZR=[Cf,yr,li],ej=e=>ZR.find(t=>t.test(e));function Jm(e){const t=ej(e);if(!t)return!1;let n=t.parse(e);return t===li&&(n=JR(n)),n}const Zm=(e,t)=>{const n=Jm(e),r=Jm(t);if(!n||!r)return hl(e,t);const i={...n};return s=>(i.red=Vu(n.red,r.red,s),i.green=Vu(n.green,r.green,s),i.blue=Vu(n.blue,r.blue,s),i.alpha=de(n.alpha,r.alpha,s),yr.transform(i))},tj=(e,t)=>n=>t(e(n)),Do=(...e)=>e.reduce(tj),Of=new Set(["none","hidden"]);function nj(e,t){return Of.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function rj(e,t){return n=>de(e,t,n)}function Ch(e){return typeof e=="number"?rj:typeof e=="string"?rh(e)?hl:_e.test(e)?Zm:oj:Array.isArray(e)?ox:typeof e=="object"?_e.test(e)?Zm:ij:hl}function ox(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Ch(s)(s,t[o]));return s=>{for(let o=0;o{for(const s in r)n[s]=r[s](i);return n}}function sj(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s{const n=Jn.createTransformer(t),r=lo(e),i=lo(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Of.has(e)&&!i.values.length||Of.has(t)&&!r.values.length?nj(e,t):Do(ox(sj(r,i),i.values),n):hl(e,t)};function ax(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?de(e,t,n):Ch(e)(e,t)}const aj=5;function lx(e,t,n){const r=Math.max(t-aj,0);return Aw(n-e(r),t-r)}const ge={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},$u=.001;function lj({duration:e=ge.duration,bounce:t=ge.bounce,velocity:n=ge.velocity,mass:r=ge.mass}){let i,s,o=1-t;o=vn(ge.minDamping,ge.maxDamping,o),e=vn(ge.minDuration,ge.maxDuration,fn(e)),o<1?(i=u=>{const c=u*o,f=c*e,d=c-n,h=Rf(u,o),m=Math.exp(-f);return $u-d/h*m},s=u=>{const f=u*o*e,d=f*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-f),w=Rf(Math.pow(u,2),o);return(-i(u)+$u>0?-1:1)*((d-h)*m)/w}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-$u+c*f},s=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=cj(i,s,a);if(e=cn(e),isNaN(l))return{stiffness:ge.stiffness,damping:ge.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const uj=12;function cj(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function hj(e){let t={velocity:ge.velocity,stiffness:ge.stiffness,damping:ge.damping,mass:ge.mass,isResolvedFromDuration:!1,...e};if(!eg(e,dj)&&eg(e,fj))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*vn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ge.mass,stiffness:i,damping:s}}else{const n=lj(e);t={...t,...n,mass:ge.mass},t.isResolvedFromDuration=!0}return t}function ux(e=ge.visualDuration,t=ge.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:h}=hj({...n,velocity:-fn(n.velocity||0)}),m=d||0,w=u/(2*Math.sqrt(l*c)),x=o-s,y=fn(Math.sqrt(l/c)),g=Math.abs(x)<5;r||(r=g?ge.restSpeed.granular:ge.restSpeed.default),i||(i=g?ge.restDelta.granular:ge.restDelta.default);let v;if(w<1){const C=Rf(y,w);v=T=>{const k=Math.exp(-w*y*T);return o-k*((m+w*y*x)/C*Math.sin(C*T)+x*Math.cos(C*T))}}else if(w===1)v=C=>o-Math.exp(-y*C)*(x+(m+y*x)*C);else{const C=y*Math.sqrt(w*w-1);v=T=>{const k=Math.exp(-w*y*T),O=Math.min(C*T,300);return o-k*((m+w*y*x)*Math.sinh(O)+C*x*Math.cosh(O))/C}}const b={calculatedDuration:h&&f||null,next:C=>{const T=v(C);if(h)a.done=C>=f;else{let k=0;w<1&&(k=C===0?cn(m):lx(v,C,T));const O=Math.abs(k)<=r,F=Math.abs(o-T)<=i;a.done=O&&F}return a.value=a.done?o:T,a},toString:()=>{const C=Math.min(Tw(b),Sf),T=Ow(k=>b.next(C*k).value,C,30);return C+"ms "+T}};return b}function tg({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=O=>a!==void 0&&Ol,m=O=>a===void 0?l:l===void 0||Math.abs(a-O)-w*Math.exp(-O/r),v=O=>y+g(O),b=O=>{const F=g(O),$=v(O);d.done=Math.abs(F)<=u,d.value=d.done?y:$};let C,T;const k=O=>{h(d.value)&&(C=O,T=ux({keyframes:[d.value,m(d.value)],velocity:lx(v,O,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:O=>{let F=!1;return!T&&C===void 0&&(F=!0,b(O),k(O)),C!==void 0&&O>=C?T.next(O-C):(!F&&b(O),d)}}}const pj=Lo(.42,0,1,1),mj=Lo(0,0,.58,1),cx=Lo(.42,0,.58,1),gj=e=>Array.isArray(e)&&typeof e[0]!="number",yj={linear:ut,easeIn:pj,easeInOut:cx,easeOut:mj,circIn:wh,circInOut:Ww,circOut:zw,backIn:vh,backInOut:Uw,backOut:$w,anticipate:Bw},ng=e=>{if(dh(e)){aw(e.length===4);const[t,n,r,i]=e;return Lo(t,n,r,i)}else if(typeof e=="string")return yj[e];return e};function vj(e,t,n){const r=[],i=n||ax,s=e.length-1;for(let o=0;ot[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=vj(t,r,i),l=a.length,u=c=>{if(o&&c1)for(;fu(vn(e[0],e[s-1],c)):u}function xj(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Bi(0,t,r);e.push(de(n,1,i))}}function Sj(e){const t=[0];return xj(t,e.length-1),t}function bj(e,t){return e.map(n=>n*t)}function Pj(e,t){return e.map(()=>t||cx).splice(0,e.length-1)}function pl({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=gj(r)?r.map(ng):ng(r),s={done:!1,value:t[0]},o=bj(n&&n.length===t.length?n:Sj(t),e),a=wj(o,t,{ease:Array.isArray(i)?i:Pj(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Cj=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ue.update(t,!0),stop:()=>Xn(t),now:()=>De.isProcessing?De.timestamp:Zt.now()}},Ej={decay:tg,inertia:tg,tween:pl,keyframes:pl,spring:ux},kj=e=>e/100;class Eh extends sx{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Ph,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=fh(n)?n:Ej[n]||pl;let l,u;a!==pl&&typeof t[0]!="number"&&(l=Do(kj,ax(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Tw(c));const{calculatedDuration:f}=c,d=f+i,h=d*(r+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:w,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?y<0:y>c;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let v=this.currentTime,b=s;if(h){const O=Math.min(this.currentTime,c)/f;let F=Math.floor(O),$=O%1;!$&&O>=1&&($=1),$===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(m==="reverse"?($=1-$,w&&($-=w/f)):m==="mirror"&&(b=o)),v=vn(0,1,$)*f}const C=g?{done:!1,value:l[0]}:b.next(v);a&&(C.value=a(C.value));let{done:T}=C;!g&&u!==null&&(T=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return k&&i!==void 0&&(C.value=tu(l,this.options,i)),x&&x(C.value),k&&this.finish(),C}get duration(){const{resolved:t}=this;return t?fn(t.calculatedDuration):0}get time(){return fn(this.currentTime)}set time(t){t=cn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=fn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Cj,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Tj=new Set(["opacity","clipPath","filter","transform"]);function Oj(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=jw(a,i);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const Rj=Gd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ml=10,jj=2e4;function Nj(e){return fh(e.type)||e.type==="spring"||!Rw(e.ease)}function Lj(e,t){const n=new Eh({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&sthis.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&dl()&&Dj(s)&&(s=fx[s]),Nj(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,element:m,...w}=this.options,x=Lj(t,w);t=x.keyframes,t.length===1&&(t[1]=t[0]),r=x.duration,i=x.times,s=x.ease,o="keyframes"}const c=Oj(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(Um(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:f}=this.options;a.set(tu(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return fn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return fn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=cn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ut;const{animation:r}=n;Um(r,t)}return ut}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:d,...h}=this.options,m=new Eh({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),w=cn(this.time);u.setWithVelocity(m.sample(w-ml).value,m.sample(w).value,ml)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return Rj()&&r&&Tj.has(r)&&!l&&!u&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const Mj={type:"spring",stiffness:500,damping:25,restSpeed:10},Aj=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fj={type:"keyframes",duration:.8},Ij={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_j=(e,{keyframes:t})=>t.length>2?Fj:Wr.has(e)?e.startsWith("scale")?Aj(t[1]):Mj:Ij;function Vj({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const kh=(e,t,n,r={},i,s)=>o=>{const a=ch(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-cn(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};Vj(a)||(c={...c,..._j(e,c)}),c.duration&&(c.duration=cn(c.duration)),c.repeatDelay&&(c.repeatDelay=cn(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const d=tu(c.keyframes,a);if(d!==void 0)return ue.update(()=>{c.onUpdate(d),c.onComplete()}),new sR([])}return!s&&rg.supports(c)?new rg(c):new Eh(c)};function $j({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function dx(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in l){const d=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),h=l[f];if(h===void 0||c&&$j(c,f))continue;const m={delay:n,...ch(o||{},f)};let w=!1;if(window.MotionHandoffAnimation){const y=Fw(e);if(y){const g=window.MotionHandoffAnimation(y,f,ue);g!==null&&(m.startTime=g,w=!0)}}Pf(e,f),d.start(kh(f,d,h,e.shouldReduceMotion&&Mw.has(f)?{type:!1}:m,e,w));const x=d.animation;x&&u.push(x)}return a&&Promise.all(u).then(()=>{ue.update(()=>{a&&yh(e,a)})}),u}function jf(e,t,n={}){var r;const i=eu(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(dx(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=s;return Uj(e,t,c+u,f,d,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function Uj(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(Bj).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(jf(u,t,{...s,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function Bj(e,t){return e.sortNodePosition(t)}function hx(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>jf(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=jf(e,t,n);else{const i=typeof t=="function"?eu(e,t,n.custom):t;r=Promise.all(dx(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const zj=Jd.length;function px(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?px(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>hx(e,n,r)))}function qj(e){let t=Kj(e),n=ig(),r=!0;const i=l=>(u,c)=>{var f;const d=eu(e,c,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:m,...w}=d;u={...u,...w,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,c=px(e.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let x=0;xm&&b,F=!1;const $=Array.isArray(v)?v:[v];let B=$.reduce(i(y),{});C===!1&&(B={});const{prevResolvedValues:X={}}=g,me={...X,...B},J=_=>{O=!0,d.has(_)&&(F=!0,d.delete(_)),g.needsAnimating[_]=!0;const j=e.getValue(_);j&&(j.liveStyle=!1)};for(const _ in me){const j=B[_],M=X[_];if(h.hasOwnProperty(_))continue;let D=!1;xf(j)&&xf(M)?D=!kw(j,M):D=j!==M,D?j!=null?J(_):d.add(_):j!==void 0&&d.has(_)?J(_):g.protectedKeys[_]=!0}g.prevProp=v,g.prevResolvedValues=B,g.isActive&&(h={...h,...B}),r&&e.blockInitialAnimation&&(O=!1),O&&(!(T&&k)||F)&&f.push(...$.map(_=>({animation:_,options:{type:y}})))}if(d.size){const x={};d.forEach(y=>{const g=e.getBaseTarget(y),v=e.getValue(y);v&&(v.liveStyle=!0),x[y]=g??null}),f.push({animation:x})}let w=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(f):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ig(),r=!0}}}function Qj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kw(t,e):!1}function ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ig(){return{animate:ar(!0),whileInView:ar(),whileHover:ar(),whileTap:ar(),whileDrag:ar(),whileFocus:ar(),exit:ar()}}class sr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Yj extends sr{constructor(t){super(t),t.animationState||(t.animationState=qj(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Jl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Gj=0;class Xj extends sr{constructor(){super(...arguments),this.id=Gj++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Jj={animation:{Feature:Yj},exit:{Feature:Xj}};function uo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Mo(e){return{point:{x:e.pageX,y:e.pageY}}}const Zj=e=>t=>hh(t)&&e(t,Mo(t));function Ms(e,t,n,r){return uo(e,t,Zj(n),r)}const sg=(e,t)=>Math.abs(e-t);function e5(e,t){const n=sg(e.x,t.x),r=sg(e.y,t.y);return Math.sqrt(n**2+r**2)}class mx{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Bu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=e5(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=f,{timestamp:w}=De;this.history.push({...m,timestamp:w});const{onStart:x,onMove:y}=this.handlers;d||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Uu(d,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Bu(f.type==="pointercancel"?this.lastMoveEventInfo:Uu(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,x),m&&m(f,x)},!hh(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Mo(t),a=Uu(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=De;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Bu(a,this.history)),this.removeListeners=Do(Ms(this.contextWindow,"pointermove",this.handlePointerMove),Ms(this.contextWindow,"pointerup",this.handlePointerUp),Ms(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Xn(this.updatePoint)}}function Uu(e,t){return t?{point:t(e.point)}:e}function og(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bu({point:e},t){return{point:e,delta:og(e,gx(t)),offset:og(e,t5(t)),velocity:n5(t,.1)}}function t5(e){return e[0]}function gx(e){return e[e.length-1]}function n5(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=gx(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>cn(t)));)n--;if(!r)return{x:0,y:0};const s=fn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const yx=1e-4,r5=1-yx,i5=1+yx,vx=.01,s5=0-vx,o5=0+vx;function ft(e){return e.max-e.min}function a5(e,t,n){return Math.abs(e-t)<=n}function ag(e,t,n,r=.5){e.origin=r,e.originPoint=de(t.min,t.max,e.origin),e.scale=ft(n)/ft(t),e.translate=de(n.min,n.max,e.origin)-e.originPoint,(e.scale>=r5&&e.scale<=i5||isNaN(e.scale))&&(e.scale=1),(e.translate>=s5&&e.translate<=o5||isNaN(e.translate))&&(e.translate=0)}function As(e,t,n,r){ag(e.x,t.x,n.x,r?r.originX:void 0),ag(e.y,t.y,n.y,r?r.originY:void 0)}function lg(e,t,n){e.min=n.min+t.min,e.max=e.min+ft(t)}function l5(e,t,n){lg(e.x,t.x,n.x),lg(e.y,t.y,n.y)}function ug(e,t,n){e.min=t.min-n.min,e.max=e.min+ft(t)}function Fs(e,t,n){ug(e.x,t.x,n.x),ug(e.y,t.y,n.y)}function u5(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?de(n,e,r.max):Math.min(e,n)),e}function cg(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function c5(e,{top:t,left:n,bottom:r,right:i}){return{x:cg(e.x,n,i),y:cg(e.y,t,r)}}function fg(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Bi(t.min,t.max-r,e.min):r>i&&(n=Bi(e.min,e.max-i,t.min)),vn(0,1,n)}function h5(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Nf=.35;function p5(e=Nf){return e===!1?e=0:e===!0&&(e=Nf),{x:dg(e,"left","right"),y:dg(e,"top","bottom")}}function dg(e,t,n){return{min:hg(e,t),max:hg(e,n)}}function hg(e,t){return typeof e=="number"?e:e[t]||0}const pg=()=>({translate:0,scale:1,origin:0,originPoint:0}),ui=()=>({x:pg(),y:pg()}),mg=()=>({min:0,max:0}),we=()=>({x:mg(),y:mg()});function gt(e){return[e("x"),e("y")]}function wx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function m5({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function g5(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function zu(e){return e===void 0||e===1}function Lf({scale:e,scaleX:t,scaleY:n}){return!zu(e)||!zu(t)||!zu(n)}function fr(e){return Lf(e)||xx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function xx(e){return gg(e.x)||gg(e.y)}function gg(e){return e&&e!=="0%"}function gl(e,t,n){const r=e-n,i=t*r;return n+i}function yg(e,t,n,r,i){return i!==void 0&&(e=gl(e,i,r)),gl(e,n,r)+t}function Df(e,t=0,n=1,r,i){e.min=yg(e.min,t,n,r,i),e.max=yg(e.max,t,n,r,i)}function Sx(e,{x:t,y:n}){Df(e.x,t.translate,t.scale,t.originPoint),Df(e.y,n.translate,n.scale,n.originPoint)}const vg=.999999999999,wg=1.0000000000001;function y5(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;avg&&(t.x=1),t.yvg&&(t.y=1)}function ci(e,t){e.min=e.min+t,e.max=e.max+t}function xg(e,t,n,r,i=.5){const s=de(e.min,e.max,i);Df(e,t,n,s,r)}function fi(e,t){xg(e.x,t.x,t.scaleX,t.scale,t.originX),xg(e.y,t.y,t.scaleY,t.scale,t.originY)}function bx(e,t){return wx(g5(e.getBoundingClientRect(),t))}function v5(e,t,n){const r=bx(e,n),{scroll:i}=t;return i&&(ci(r.x,i.offset.x),ci(r.y,i.offset.y)),r}const Px=({current:e})=>e?e.ownerDocument.defaultView:null,w5=new WeakMap;class x5{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=we(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Mo(c).point)},s=(c,f)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pR(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gt(x=>{let y=this.getAxisMotionValue(x).get()||0;if(Jt.test(y)){const{projection:g}=this.visualElement;if(g&&g.layout){const v=g.layout.layoutBox[x];v&&(y=ft(v)*(parseFloat(y)/100))}}this.originPoint[x]=y}),m&&ue.postRender(()=>m(c,f)),Pf(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(c,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:w}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:x}=f;if(h&&this.currentDirection===null){this.currentDirection=S5(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),w&&w(c,f)},a=(c,f)=>this.stop(c,f),l=()=>gt(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new mx(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Px(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&ue.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!oa(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=u5(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ai(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=c5(i.layoutBox,n):this.constraints=!1,this.elastic=p5(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&>(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=h5(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ai(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=v5(r,i.root,this.visualElement.getTransformPagePoint());let o=f5(i.layout.layoutBox,s);if(n){const a=n(m5(o));this.hasMutatedConstraints=!!a,a&&(o=wx(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=gt(c=>{if(!oa(c,n,this.currentDirection))return;let f=l&&l[c]||{};o&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Pf(this.visualElement,t),r.start(kh(t,r,0,n,this.visualElement,!1))}stopAnimation(){gt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){gt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){gt(n=>{const{drag:r}=this.getProps();if(!oa(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-de(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ai(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};gt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=d5({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),gt(o=>{if(!oa(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(de(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;w5.set(this.visualElement,this);const t=this.visualElement.current,n=Ms(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ai(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ue.read(r);const o=uo(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(gt(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Nf,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function oa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function S5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class b5 extends sr{constructor(t){super(t),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new x5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const Sg=e=>(t,n)=>{e&&ue.postRender(()=>e(t,n))};class P5 extends sr{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(t){this.session=new mx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Px(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Sg(t),onStart:Sg(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&ue.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ms(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ja={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function bg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(H.test(e))e=parseFloat(e);else return e;const n=bg(e,t.target.x),r=bg(e,t.target.y);return`${n}% ${r}%`}},C5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Jn.parse(e);if(i.length>5)return r;const s=Jn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=de(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class E5 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;qO(k5),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ja.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ue.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),eh.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cx(e){const[t,n]=ow(),r=S.useContext(Kd);return p.jsx(E5,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(hw),isPresent:t,safeToRemove:n})}const k5={borderRadius:{...cs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cs,borderTopRightRadius:cs,borderBottomLeftRadius:cs,borderBottomRightRadius:cs,boxShadow:C5};function T5(e,t,n){const r=Ue(e)?e:ao(e);return r.start(kh("",r,t,n)),r.animation}function O5(e){return e instanceof SVGElement&&e.tagName!=="svg"}const R5=(e,t)=>e.depth-t.depth;class j5{constructor(){this.children=[],this.isDirty=!1}add(t){ph(this.children,t),this.isDirty=!0}remove(t){mh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(R5),this.isDirty=!1,this.children.forEach(t)}}function N5(e,t){const n=Zt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Xn(r),e(s-t))};return ue.read(r,!0),()=>Xn(r)}const Ex=["TopLeft","TopRight","BottomLeft","BottomRight"],L5=Ex.length,Pg=e=>typeof e=="string"?parseFloat(e):e,Cg=e=>typeof e=="number"||H.test(e);function D5(e,t,n,r,i,s){i?(e.opacity=de(0,n.opacity!==void 0?n.opacity:1,M5(r)),e.opacityExit=de(t.opacity!==void 0?t.opacity:1,0,A5(r))):s&&(e.opacity=de(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(Bi(e,t,r))}function kg(e,t){e.min=t.min,e.max=t.max}function mt(e,t){kg(e.x,t.x),kg(e.y,t.y)}function Tg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Og(e,t,n,r,i){return e-=t,e=gl(e,1/n,r),i!==void 0&&(e=gl(e,1/i,r)),e}function F5(e,t=0,n=1,r=.5,i,s=e,o=e){if(Jt.test(t)&&(t=parseFloat(t),t=de(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=de(s.min,s.max,r);e===s&&(a-=t),e.min=Og(e.min,t,n,a,i),e.max=Og(e.max,t,n,a,i)}function Rg(e,t,[n,r,i],s,o){F5(e,t[n],t[r],t[i],t.scale,s,o)}const I5=["x","scaleX","originX"],_5=["y","scaleY","originY"];function jg(e,t,n,r){Rg(e.x,t,I5,n?n.x:void 0,r?r.x:void 0),Rg(e.y,t,_5,n?n.y:void 0,r?r.y:void 0)}function Ng(e){return e.translate===0&&e.scale===1}function Tx(e){return Ng(e.x)&&Ng(e.y)}function Lg(e,t){return e.min===t.min&&e.max===t.max}function V5(e,t){return Lg(e.x,t.x)&&Lg(e.y,t.y)}function Dg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ox(e,t){return Dg(e.x,t.x)&&Dg(e.y,t.y)}function Mg(e){return ft(e.x)/ft(e.y)}function Ag(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $5{constructor(){this.members=[]}add(t){ph(this.members,t),t.scheduleRender()}remove(t){if(mh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function U5(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const dr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ss=typeof window<"u"&&window.MotionDebug!==void 0,Wu=["","X","Y","Z"],B5={visibility:"hidden"},Fg=1e3;let z5=0;function Hu(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Rx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Fw(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ue,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Rx(r)}function jx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=z5++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ss&&(dr.totalNodes=dr.resolvedTargetDeltas=dr.recalculatedProjection=0),this.nodes.forEach(K5),this.nodes.forEach(X5),this.nodes.forEach(J5),this.nodes.forEach(q5),Ss&&window.MotionDebug.record(dr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=N5(d,250),ja.hasAnimatedSinceResize&&(ja.hasAnimatedSinceResize=!1,this.nodes.forEach(_g))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||c.getDefaultTransition()||r4,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=c.getProps(),g=!this.targetLayout||!Ox(this.targetLayout,m)||h,v=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const b={...ch(w,"layout"),onPlay:x,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else d||_g(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Z5),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Rx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const C=b/1e3;Vg(f.x,o.x,C),Vg(f.y,o.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fs(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),t4(this.relativeTarget,this.relativeTargetOrigin,d,C),v&&V5(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=we()),mt(v,this.relativeTarget)),w&&(this.animationValues=c,D5(c,u,this.latestValues,C,g,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Xn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{ja.hasAnimatedSinceResize=!0,this.currentAnimation=T5(0,Fg,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Fg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Nx(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||we();const f=ft(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const d=ft(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}mt(a,l),fi(a,c),As(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $5),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Hu("z",o,u,this.animationValues);for(let c=0;c{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Ig),this.root.sharedNodes.clear()}}}function W5(e){e.updateLayout()}function H5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s==="size"?gt(f=>{const d=o?n.measuredBox[f]:n.layoutBox[f],h=ft(d);d.min=r[f].min,d.max=d.min+h}):Nx(s,n.layoutBox,r)&>(f=>{const d=o?n.measuredBox[f]:n.layoutBox[f],h=ft(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=ui();As(a,r,n.layoutBox);const l=ui();o?As(l,e.applyTransform(i,!0),n.measuredBox):As(l,r,n.layoutBox);const u=!Tx(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const m=we();Fs(m,n.layoutBox,d.layoutBox);const w=we();Fs(w,r,h.layoutBox),Ox(m,w)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function K5(e){Ss&&dr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function q5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Q5(e){e.clearSnapshot()}function Ig(e){e.clearMeasurements()}function Y5(e){e.isLayoutDirty=!1}function G5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function _g(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function X5(e){e.resolveTargetDelta()}function J5(e){e.calcProjection()}function Z5(e){e.resetSkewAndRotation()}function e4(e){e.removeLeadSnapshot()}function Vg(e,t,n){e.translate=de(t.translate,0,n),e.scale=de(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $g(e,t,n,r){e.min=de(t.min,n.min,r),e.max=de(t.max,n.max,r)}function t4(e,t,n,r){$g(e.x,t.x,n.x,r),$g(e.y,t.y,n.y,r)}function n4(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const r4={duration:.45,ease:[.4,0,.1,1]},Ug=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Bg=Ug("applewebkit/")&&!Ug("chrome/")?Math.round:ut;function zg(e){e.min=Bg(e.min),e.max=Bg(e.max)}function i4(e){zg(e.x),zg(e.y)}function Nx(e,t,n){return e==="position"||e==="preserve-aspect"&&!a5(Mg(t),Mg(n),.2)}function s4(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const o4=jx({attachResizeListener:(e,t)=>uo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ku={current:void 0},Lx=jx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ku.current){const e=new o4({});e.mount(window),e.setOptions({layoutScroll:!0}),Ku.current=e}return Ku.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),a4={pan:{Feature:P5},drag:{Feature:b5,ProjectionNode:Lx,MeasureLayout:Cx}};function Wg(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ue.postRender(()=>s(t,Mo(t)))}class l4 extends sr{mount(){const{current:t}=this.node;t&&(this.unmount=uR(t,n=>(Wg(this.node,n,"Start"),r=>Wg(this.node,r,"End"))))}unmount(){}}class u4 extends sr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Do(uo(this.node.current,"focus",()=>this.onFocus()),uo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hg(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ue.postRender(()=>s(t,Mo(t)))}class c4 extends sr{mount(){const{current:t}=this.node;t&&(this.unmount=hR(t,n=>(Hg(this.node,n,"Start"),(r,{success:i})=>Hg(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mf=new WeakMap,qu=new WeakMap,f4=e=>{const t=Mf.get(e.target);t&&t(e)},d4=e=>{e.forEach(f4)};function h4({root:e,...t}){const n=e||document;qu.has(n)||qu.set(n,{});const r=qu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(d4,{root:e,...t})),r[i]}function p4(e,t,n){const r=h4(t);return Mf.set(e,n),r.observe(e),()=>{Mf.delete(e),r.unobserve(e)}}const m4={some:0,all:1};class g4 extends sr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:m4[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return p4(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(y4(t,n))&&this.startObserver()}unmount(){}}function y4({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const v4={inView:{Feature:g4},tap:{Feature:c4},focus:{Feature:u4},hover:{Feature:l4}},w4={layout:{ProjectionNode:Lx,MeasureLayout:Cx}},Af={current:null},Dx={current:!1};function x4(){if(Dx.current=!0,!!Qd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Af.current=e.matches;e.addListener(t),t()}else Af.current=!1}const S4=[...rx,_e,Jn],b4=e=>S4.find(nx(e)),Kg=new WeakMap;function P4(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Ue(i))e.addValue(r,i);else if(Ue(s))e.addValue(r,ao(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,ao(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const qg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class C4{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ph,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Zt.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),Dx.current||x4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Af.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Kg.delete(this.current),this.projection&&this.projection.unmount(),Xn(this.notifyUpdate),Xn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Wr.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in zi){const n=zi[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):we()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ao(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(ex(i)||Hw(i))?i=parseFloat(i):!b4(i)&&Jn.test(n)&&(i=Xw(t,n)),this.setBaseTarget(t,Ue(i)?i.get():i)),Ue(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=nh(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ue(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new gh),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Mx extends C4{constructor(){super(...arguments),this.KeyframeResolver=ix}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ue(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function E4(e){return window.getComputedStyle(e)}class k4 extends Mx{constructor(){super(...arguments),this.type="html",this.renderInstance=xw}readValueFromInstance(t,n){if(Wr.has(n)){const r=bh(n);return r&&r.default||0}else{const r=E4(t),i=(yw(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return bx(t,n)}build(t,n,r){sh(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return uh(t,n,r)}}class T4 extends Mx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=we}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Wr.has(n)){const r=bh(n);return r&&r.default||0}return n=Sw.has(n)?n:Zd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Cw(t,n,r)}build(t,n,r){oh(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){bw(t,n,r,i)}mount(t){this.isSVGTag=lh(t.tagName),super.mount(t)}}const O4=(e,t)=>th(e)?new T4(t):new k4(t,{allowProjection:e!==S.Fragment}),R4=nR({...Jj,...v4,...a4,...w4},O4),Qg=yO(R4);function j4(e){e.values.forEach(t=>t.stop())}function Ff(e,t){[...t].reverse().forEach(r=>{const i=e.getVariant(r);i&&yh(e,i),e.variantChildren&&e.variantChildren.forEach(s=>{Ff(s,t)})})}function N4(e,t){if(Array.isArray(t))return Ff(e,t);if(typeof t=="string")return Ff(e,[t]);yh(e,t)}function L4(){const e=new Set,t={subscribe(n){return e.add(n),()=>void e.delete(n)},start(n,r){const i=[];return e.forEach(s=>{i.push(hx(s,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return e.forEach(r=>{N4(r,n)})},stop(){e.forEach(n=>{j4(n)})},mount(){return()=>{t.stop()}}};return t}function D4(){const e=Yl(L4);return Yd(e.mount,[]),e}const M4=D4;function A4({setShow:e,showBlur:t,children:n,theme:r="light"}){const i=S.useRef(null),s=M4(),o={type:"spring",stiffness:500,damping:30};S.useEffect(()=>{s.start({y:20,transition:o})},[]);async function a(l,u){var h;const c=u.offset.y,f=u.velocity.y,d=((h=i.current)==null?void 0:h.getBoundingClientRect().height)||0;c>d/2||f>800?(await s.start({y:"100%",transition:o}),e(!1)):s.start({y:0,transition:o})}return p.jsxs(uO,{children:[p.jsxs(Qg.div,{ref:i,className:io("group fixed inset-x-0 bottom-0 z-40 w-screen cursor-grab overflow-y-scroll pb-5 active:cursor-grabbing sm:hidden",r==="light"?"bg-white":"bg-neutral-800/95"),style:{maxHeight:"95%"},initial:{y:"100%"},animate:s,exit:{y:"100%"},transition:o,drag:"y",dragDirectionLock:!0,onDragEnd:a,dragElastic:{top:0,bottom:1},dragConstraints:{top:0,bottom:0},children:[p.jsxs("div",{className:io("rounded-t-4xl -mb-1 flex h-7 w-full items-center justify-center border-t",r==="light"?"border-gray-200":"border-cyan-50/20"),children:[p.jsx("div",{className:"-mr-1 h-1 w-6 rounded-full bg-gray-300 transition-all group-active:rotate-12"}),p.jsx("div",{className:"h-1 w-6 rounded-full bg-gray-300 transition-all group-active:-rotate-12"})]}),n]},"leaflet"),t&&p.jsx(Qg.div,{className:"fixed inset-0 z-30 bg-gray-100 bg-opacity-10 backdrop-blur",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>e(!1)},"leaflet-backdrop")]})}function Ax({children:e,showModal:t,setShowModal:n,theme:r="light"}){const i=S.useRef(null),{isMobile:s}=iO();S.useEffect(()=>{function a(l){i.current&&!i.current.contains(l.target)&&n(!1)}return document.addEventListener("mousedown",a),()=>{document.removeEventListener("mousedown",a)}},[i,n]);const o=S.useCallback(a=>{a.key==="Escape"&&n(!1)},[n]);return S.useEffect(()=>(document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)),[o]),s?t?p.jsx(A4,{setShow:n,showBlur:!0,theme:r,children:e}):null:p.jsx(p.Fragment,{children:t&&p.jsx("div",{className:"fixed inset-0 z-40 flex items-center justify-center",style:{backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.4)"},children:p.jsx("div",{className:"relative z-50 w-full max-w-lg",ref:i,children:e})})})}function Th(e){return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[p.jsx("path",{d:"M18 6 6 18"}),p.jsx("path",{d:"m6 6 12 12"})]})}function F4({showPasswordModal:e,setShowPasswordModal:t,onLogin:n,isLoggingIn:r}){const{t:i}=zr(),[s,o]=S.useState(""),a=async l=>{if(l.preventDefault(),!s){Jk.error(i("Password is required"));return}await n(s)};return p.jsx(Ax,{showModal:e,setShowModal:t,children:p.jsxs("div",{className:"w-full overflow-hidden bg-white/95 backdrop-blur-xl shadow-xl p-4 md:max-w-3xl md:rounded-2xl md:border md:border-gray-200",children:[p.jsx(Th,{className:"absolute top-4 right-4 h-6 w-6 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:()=>t(!1),onPointerDown:l=>l.stopPropagation()}),p.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3 border-b border-gray-200 px-4 py-5 text-center md:px-16",children:[p.jsx("h3",{className:"font-display text-2xl font-bold",children:i("Save password")}),p.jsx("p",{className:"text-gray-500",children:i("Save your password and continue using this email in 1 day")})]}),p.jsxs("form",{onSubmit:a,className:"flex flex-col mt-4 space-y-4 px-4",children:[p.jsx("input",{value:s,onChange:l=>o(l.target.value),type:"text",name:"password",placeholder:i("Enter your password *"),required:!0,className:"rounded-md border border-slate-200 px-3 py-2 shadow-inner w-full"}),p.jsxs("p",{className:"text-sm",children:[i("How to get a password? Click to create a temporary email and receive at least one email to generate a password"),"."]}),p.jsxs("p",{className:"text-sm text-yellow-600",children:[i("Remember your password, otherwise your email will expire and cannot be retrieved"),"."]}),p.jsx("button",{type:"submit",disabled:r,className:"py-2.5 text-white rounded-md w-full bg-cyan-600 hover:opacity-90 disabled:cursor-not-allowed disabled:bg-zinc-500",children:i(r?"Submitting...":"Login")})]})]})})}function I4(){const[e,t]=S.useState(!1),n=S.useCallback(({onLogin:r,isLoggingIn:i})=>p.jsx(F4,{showPasswordModal:e,setShowPasswordModal:t,onLogin:r,isLoggingIn:i}),[e]);return S.useMemo(()=>({showPasswordModal:e,setShowPasswordModal:t,PasswordModal:n}),[t,n,e])}function _4(e){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",children:p.jsx("path",{fill:"#0891b2",d:"M11 17h2v-6h-2zm1-8q.425 0 .713-.288T13 8q0-.425-.288-.712T12 7q-.425 0-.712.288T11 8q0 .425.288.713T12 9m0 13q-3.475-.875-5.738-3.988T4 11.1V5l8-3l8 3v6.1q0 3.8-2.262 6.913T12 22m0-2.1q2.6-.825 4.3-3.3t1.7-5.5V6.375l-6-2.25l-6 2.25V11.1q0 3.025 1.7 5.5t4.3 3.3m0-7.9"})})}function V4(e){return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 280 117",children:[p.jsx("path",{fill:"#FBAD41",d:"M205.52 50.813c-.858 0-1.705.03-2.551.058c-.137.007-.272.04-.398.094a1.424 1.424 0 0 0-.92.994l-3.628 12.672c-1.565 5.449-.983 10.48 1.646 14.174c2.41 3.416 6.42 5.421 11.289 5.655l19.679 1.194c.585.03 1.092.312 1.4.776a1.92 1.92 0 0 1 .2 1.692a2.496 2.496 0 0 1-2.134 1.662l-20.448 1.193c-11.11.515-23.062 9.58-27.255 20.633l-1.474 3.9a1.092 1.092 0 0 0 .967 1.49h70.425a1.872 1.872 0 0 0 1.81-1.365A51.172 51.172 0 0 0 256 101.828c0-28.16-22.582-50.984-50.449-50.984"}),p.jsx("path",{fill:"#F6821F",d:"m174.782 115.362l1.303-4.583c1.568-5.449.987-10.48-1.639-14.173c-2.418-3.417-6.424-5.422-11.296-5.656l-92.312-1.193a1.822 1.822 0 0 1-1.459-.776a1.919 1.919 0 0 1-.203-1.693a2.496 2.496 0 0 1 2.154-1.662l93.173-1.193c11.063-.511 23.015-9.58 27.208-20.633l5.313-14.04c.214-.596.27-1.238.156-1.86C191.126 20.51 166.91 0 137.96 0C111.269 0 88.626 17.403 80.5 41.596a26.996 26.996 0 0 0-19.156-5.359C48.549 37.524 38.25 47.946 36.979 60.88a27.905 27.905 0 0 0 .702 9.642C16.773 71.145 0 88.454 0 109.726c0 1.923.137 3.818.413 5.667c.115.897.879 1.57 1.783 1.568h170.48a2.223 2.223 0 0 0 2.106-1.63"})]})}function Fx(e){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 22 22",children:p.jsx("path",{fill:"#0891b2",d:"M7.376 6.745c-.447.275 1.197 4.242 1.598 4.888a1.206 1.206 0 0 0 2.053-1.266c-.397-.648-3.205-3.898-3.651-3.622m-.335-4.343a8.98 8.98 0 0 1 5.918 0c.329.114.765-.115.572-.611c-.141-.36-.277-.712-.332-.855c-.131-.339-.6-.619-.804-.665C11.623.097 10.823 0 10 0S8.377.097 7.604.271c-.204.046-.672.326-.803.665l-.332.855c-.193.496.243.726.572.611m12.057.784a10.132 10.132 0 0 0-1.283-1.285c-.153-.129-.603-.234-.888.051l-1.648 1.647a9.27 9.27 0 0 1 1.155.966c.362.361.677.752.966 1.155l1.647-1.647c.286-.286.181-.735.051-.887M10 2.9A8.1 8.1 0 0 0 1.899 11A8.1 8.1 0 0 0 10 19.101A8.1 8.1 0 0 0 10 2.9m0 14.201A6.1 6.1 0 1 1 10.001 4.9A6.1 6.1 0 0 1 10 17.1z"})})}function $4(e){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 26 26",children:p.jsxs("g",{fill:"none",stroke:"#0891b2",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[p.jsx("path",{d:"m12.802 2.165l5.575 2.389c.48.206.863.589 1.07 1.07l2.388 5.574c.22.512.22 1.092 0 1.604l-2.389 5.575c-.206.48-.589.863-1.07 1.07l-5.574 2.388c-.512.22-1.092.22-1.604 0l-5.575-2.389a2.036 2.036 0 0 1-1.07-1.07l-2.388-5.574a2.036 2.036 0 0 1 0-1.604l2.389-5.575c.206-.48.589-.863 1.07-1.07l5.574-2.388a2.036 2.036 0 0 1 1.604 0M12 9h.01"}),p.jsx("path",{d:"M11 12h1v4h1"})]})})}function Na({showModal:e,setShowModal:t,title:n,children:r}){return p.jsx(Ax,{showModal:e,setShowModal:t,theme:"dark",children:p.jsxs("div",{className:"w-full max-h-[80vh] flex flex-col bg-neutral-800/95 backdrop-blur-xl shadow-xl md:max-w-3xl md:rounded-2xl md:border md:border-cyan-50/20",children:[p.jsxs("div",{className:"flex-shrink-0 flex items-center justify-center p-4 border-b border-cyan-50/20 relative",children:[p.jsx("h3",{className:"font-display text-2xl font-bold text-white",children:n}),p.jsx(Th,{className:"absolute top-4 right-4 h-6 w-6 text-gray-400 hover:text-white cursor-pointer",onClick:()=>t(!1),onPointerDown:i=>i.stopPropagation()})]}),p.jsx("div",{className:"flex-grow overflow-y-auto text-white p-6",children:p.jsx("div",{className:"text-white",children:r})})]})})}const Qu=e=>e<10?`0${e}`:`${e}`;function U4({expiryTimestamp:e,onReset:t}){const{t:n}=zr(),r=S.useCallback(()=>{const o=e-Date.now();let a={hours:"00",minutes:"00",seconds:"00",expired:o<=0};if(o>0){const l=Math.floor(o/1e3),u=l%60,c=Math.floor(l/60),f=c%60,d=Math.floor(c/60);a={hours:Qu(d),minutes:Qu(f),seconds:Qu(u),expired:!1}}return a},[e]),[i,s]=S.useState(r());return S.useEffect(()=>{s(r());const o=setInterval(()=>{s(r())},1e3);return()=>clearInterval(o)},[e,r]),S.useEffect(()=>{i.expired},[i.expired]),p.jsxs("div",{className:"flex items-center justify-between gap-2 text-sm text-cyan-400 my-4 p-3 bg-white/5 rounded-md border border-cyan-50/20 shadow-inner",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[" ",p.jsx(Fx,{className:"w-5 h-5"}),i.expired?p.jsx("span",{children:n("Email expired")}):p.jsxs("span",{children:[n("Expires in"),": ",i.hours,":",i.minutes,":",i.seconds]})]}),!i.expired&&p.jsxs("button",{onClick:t,className:"p-1 rounded text-cyan-400 hover:text-cyan-300 focus:outline-none focus:ring-1 focus:ring-cyan-500",title:n("Reset validity"),children:[p.jsx(rw,{className:"w-5 h-5"})," "]})]})}function B4(){const e=tO(),{t}=zr(),n=Id(),[r,i]=S.useState(()=>Vt.get("userMailbox")),[s,o]=S.useState(()=>{const W=Vt.get("emailExpiry");return W?parseInt(W,10):void 0}),[a,l]=S.useState(""),[u,c]=S.useState([]),[f,d]=S.useState(!1),[h,m]=S.useState(null),[w,x]=S.useState(e.emailDomain[0]),[y,g]=S.useState(!1),{PasswordModal:v,setShowPasswordModal:b}=I4(),[C,T]=S.useState(!1),[k,O]=S.useState(!1),{data:F=[],isLoading:$,isFetching:B,refetch:X}=tP({queryKey:["emails",r],queryFn:()=>X3(r),enabled:!!r,refetchInterval:2e4,onError:W=>{Z.error(`${t("Failed to get emails")}: ${W.message}`,{duration:5e3})},retry:!1}),me=S.useCallback(W=>{Z(Ne=>p.jsxs("div",{className:"w-full max-w-lg p-4 bg-slate-800 text-white rounded-lg shadow-lg border border-slate-700",children:[p.jsxs("div",{className:"flex items-center justify-between pb-2 mb-3 border-b border-slate-700",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(wf,{className:"h-6 w-6 text-cyan-400"}),p.jsx("h3",{className:"text-lg font-semibold",children:t("View password")})]}),p.jsx("button",{onClick:()=>Z.dismiss(Ne.id),className:"p-1 rounded-full text-gray-400 hover:bg-slate-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-cyan-500","aria-label":"Close",children:p.jsx(Th,{className:"h-5 w-5"})})]}),p.jsxs("div",{children:[p.jsx("p",{className:"text-sm text-gray-300",children:t("Save your password and continue using this email in 1 day")}),p.jsxs("div",{className:"mt-2 flex items-center text-sm bg-slate-700 px-2 py-1 rounded",children:[p.jsx("span",{className:"flex-1 font-mono break-all text-gray-100",children:W}),p.jsx(Lm,{text:W,className:"p-1"})]}),p.jsx("p",{className:"mt-3 text-xs text-yellow-400",children:t("Remember your password, otherwise your email will expire and cannot be retrieved")})]})]}),{id:"password-notification",duration:5e3,position:"top-center",style:{background:"transparent",border:"none",padding:0,boxShadow:"none"}})},[t]),J=S.useRef(F.length);S.useEffect(()=>{if(F.length>0&&!k&&O(!0),!r)O(!1),o(void 0),Z.dismiss("password-notification");else{const W=Vt.get("emailExpiry");W&&!s&&o(parseInt(W,10))}J.current=F.length},[F,r,k,s]);const E=async()=>{if(!a){Z.error(t("No captcha response"));return}try{await J3(a),d(!0);const W=`${_1("",nO())}@${w}`,Ft=Date.now()+24*60*60*1e3;Vt.set("userMailbox",W,{expires:1}),Vt.set("emailExpiry",Ft.toString(),{expires:1}),i(W),o(Ft),O(!1),Z.success(t("Email created successfully"))}catch(W){Z.error(t("Failed to verify captcha")),console.error("Turnstile verification failed:",W)}},N=()=>{Vt.remove("userMailbox"),Vt.remove("emailExpiry"),i(void 0),O(!1),m(null),o(void 0),n.invalidateQueries({queryKey:["emails"]})},_=()=>{X(),Z.success(t("Mailbox refreshed"))},j=S.useCallback(()=>{const W=Date.now()+864e5,Ne=new Date(Date.now()+24*60*60*1e3);Vt.set("emailExpiry",W.toString(),{expires:Ne}),o(W),Z.success(t("Validity reset successfully"))},[t]),M=nP({mutationFn:W=>Z3(W),onSuccess:()=>{Z.success(t("Emails deleted successfully")),c([]),h&&u.includes(h.id)&&m(null),n.invalidateQueries({queryKey:["emails",r]})},onError:()=>{Z.error(t("Failed to delete emails"))}}),D=W=>{if(W.length===0){Z.error(t("Please select emails to delete"));return}M.mutate(W)},A=async W=>{T(!0);try{const Ne=await eO(W),Oh=Date.now()+24*60*60*1e3;Vt.set("userMailbox",Ne.address,{expires:1}),Vt.set("emailExpiry",Oh.toString(),{expires:1}),i(Ne.address),o(Oh),b(!1),Z.success(t("Login successful"))}catch(Ne){Z.error(`${t("Login failed")}: ${t(Ne.message)}`)}finally{T(!1)}},U=S.useCallback(()=>r&&e.cookiesSecret?rO(r,e.cookiesSecret):null,[r,e.cookiesSecret]),K=W=>{m(W)},ve=()=>{m(null)},pt=()=>{g(!0)};return p.jsxs("div",{className:"h-full flex flex-col gap-4 md:flex-row justify-center items-start mt-24 mx-6 md:mx-10",children:[p.jsx(v,{onLogin:A,isLoggingIn:C}),h&&p.jsx(Na,{showModal:y,setShowModal:g,title:t("Email Detail"),children:p.jsx(iw,{email:h,onClose:()=>g(!1)})}),p.jsxs("div",{className:"flex flex-col text-white items-start w-full md:w-[350px] mx-auto gap-2",children:[p.jsxs("div",{className:"w-full mb-4 md:max-w-[350px] shrink-0 group group-hover:before:duration-500 group-hover:after:duration-500 after:duration-500 hover:border-cyan-600 hover:before:[box-shadow:_20px_20px_20px_30px_#a21caf] duration-500 before:duration-500 hover:duration-500 hover:after:-right-8 hover:before:right-12 hover:before:-bottom-8 hover:before:blur origin-left hover:decoration-2 relative bg-neutral-800 h-full border text-left p-4 rounded-lg overflow-hidden border-cyan-50/20 before:absolute before:w-12 before:h-12 before:content[''] before:right-1 before:top-1 before:z-10 before:bg-violet-500 before:rounded-full before:blur-lg after:absolute after:z-10 after:w-20 after:h-20 after:content[''] after:bg-rose-300 after:right-8 after:top-3 after:rounded-full after:blur-lg",children:[p.jsx("h1",{className:"text-gray-50 text-xl font-bold mb-7 group-hover:text-cyan-500 duration-500",children:t("Virtual Temporary Email")}),p.jsxs("div",{className:"flex flex-col gap-4 text-sm text-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(_4,{})," ",t("Privacy friendly")]}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(Fx,{}),t("Valid for 1 Day")]}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx($4,{}),t("AD friendly")]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(V4,{}),t("100% Run on Cloudflare")]})]})]}),r?p.jsxs("div",{className:"w-full md:max-w-[350px] mb-4",children:[p.jsx("div",{className:"mb-4 font-semibold text-sm",children:t("Email address")}),p.jsxs("div",{className:"flex items-center text-zinc-100 bg-white/10 backdrop-blur-xl shadow-inner px-4 py-4 rounded-md w-full",children:[p.jsx("span",{className:"truncate",children:r}),p.jsx(Lm,{text:r,className:"p-1 rounded-md ml-auto"})]}),s&&p.jsx(U4,{expiryTimestamp:s,onReset:j}),p.jsx("button",{onClick:N,className:"py-2.5 rounded-md w-full bg-cyan-600 hover:opacity-90 disabled:cursor-not-allowed disabled:bg-zinc-500",children:t("Stop")})]}):p.jsxs("div",{className:"w-full md:max-w-[350px]",children:[p.jsxs("div",{className:"mb-4",children:[p.jsx("div",{className:"mb-3 font-semibold",children:t("Domain")}),p.jsx("select",{value:w,onChange:W=>x(W.target.value),className:"w-full p-2.5 rounded-md bg-white/10 text-white border border-cyan-50/20",children:e.emailDomain.map(W=>p.jsxs("option",{value:W,className:"text-black",children:["@",W]},W))})]}),p.jsxs("div",{className:"text-sm relative mb-4",children:[p.jsx("div",{className:"mb-3 font-semibold",children:t("Validater")}),p.jsx("div",{className:"[&_iframe]:!w-full h-[65px] max-w-[300px] bg-gray-700",children:p.jsx(I1,{siteKey:e.turnstileKey,onSuccess:l,options:{theme:"dark"}})})]}),p.jsx("button",{onClick:E,disabled:!a,className:"py-2.5 rounded-md w-full bg-cyan-600 hover:opacity-90 disabled:cursor-not-allowed disabled:bg-zinc-500",children:t("Create temporary email")}),p.jsxs("p",{className:"mt-4 text-sm text-cyan-500 cursor-pointer",onClick:()=>b(!0),children:[p.jsx(wf,{className:"inline-block w-4 h-4 mr-2"}),t("Have a password? Login.")]})]})]}),p.jsx("div",{className:"w-full flex-1 overflow-hidden",children:p.jsx(Q3,{isAddressCreated:!!r,emails:F,isLoading:$,isFetching:B,onDelete:D,isDeleting:M.isPending,onRefresh:_,selectedIds:u,setSelectedIds:c,onSelectEmail:K,showViewPasswordButton:k,onShowPassword:()=>{const W=U();W&&me(W)},selectedEmail:h,onCloseDetail:ve,onExpand:pt})})]})}function z4(){return p.jsxs("svg",{id:"iconce.com",width:"32",height:"32",viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"r5",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(45)",style:{transformOrigin:"center center"},children:[p.jsx("stop",{stopColor:"#5C5C5C"}),p.jsx("stop",{offset:"1",stopColor:"#0F1015"})]}),p.jsxs("radialGradient",{id:"r6",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(256) rotate(90) scale(512)",children:[p.jsx("stop",{stopColor:"white"}),p.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]}),p.jsx("rect",{id:"r4",width:"256",height:"256",x:"0",y:"0",rx:"48",fill:"url(#r5)",stroke:"#FFFFFF",strokeWidth:"0",strokeOpacity:"100%",paintOrder:"stroke"}),p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"170",height:"170",viewBox:"0 0 24 24",fill:"none",stroke:"#FFFFFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white",alignmentBaseline:"middle",x:"43",y:"43",children:[p.jsx("path",{d:"M22 17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9.5C2 7 4 5 6.5 5H18c2.2 0 4 1.8 4 4v8Z"}),p.jsx("polyline",{points:"15,9 18,9 18,11"}),p.jsx("path",{d:"M6.5 5C9 5 11 7 11 9.5V17a2 2 0 0 1-2 2v0"}),p.jsx("line",{x1:"6",x2:"7",y1:"10",y2:"10"})]})]})}function W4({className:e}){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mb-[1px]",children:p.jsx("path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"})})}function H4(){return p.jsx("div",{children:p.jsxs("div",{className:"max-w-[1400px] ",children:[p.jsxs("p",{className:"mt-8",children:[p.jsx("strong",{children:"Vmail.DEV "})," is a Virtual temporary email service."," "]}),p.jsxs("p",{className:"mt-4",children:["You can get a temporary email without revealing any personal information, which greatly protects your privacy."," "]}),p.jsxs("p",{className:"mt-4",children:["It supports selecting one domain names, making it convenient for you to use in different scenarios."," "]}),p.jsxs("p",{className:"mt-4",children:["100% running on the ",p.jsx("strong",{children:"Cloudflare "})," network, providing you with a super-fast experience."," "]}),p.jsx("p",{className:"mt-4",children:"Misuse of the temporary email service not only violates our terms of service but can also impact the normal use of other users. We encourage each user to use our services responsibly to ensure that resources are allocated and used appropriately."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"copyrights",children:p.jsx("a",{href:"#copyrights",children:"Copyrights "})}),p.jsxs("p",{className:"mt-4",children:["All copyrights belong to"," ",p.jsxs("a",{href:"https://vmail.dev",rel:"nofollow",children:[p.jsx("strong",{children:"Vmail.DEV "})," "]}),"."," "]})]})})}function K4(){return p.jsx("div",{children:p.jsxs("div",{className:"max-w-[1400px] ",children:[p.jsx("p",{className:"mt-8",children:"At Vmail.DEV, we value the privacy of our users and are committed to protecting their personal information. This Privacy Policy outlines the practices we follow regarding the collection, use, storage, and deletion of data on our one-time email website."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Collection of Information",children:"1. Collection of Information"}),p.jsx("p",{className:"mt-4",children:"We only collect and store an email name for the duration of the session. This information is necessary to facilitate the functioning of our one-time email service."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Storage of Emails",children:"2. Storage of Emails"}),p.jsx("p",{className:"mt-4",children:"All emails sent and received through our one-time email service are temporarily stored in Cloudflare data centers. This storage is essential for the proper delivery and retrieval of emails during the active session."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Deletion of Emails",children:"3. Deletion of Emails"}),p.jsx("p",{className:"mt-4",children:"Once an email expires, we ensure the complete deletion of the email from our system. This means that all associated data, including the email content and any related information, will be permanently removed from our servers."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Data Security",children:"4. Data Security"}),p.jsx("p",{className:"mt-4",children:"We take appropriate measures to protect the personal information and emails stored on our website. However, it is important to note that no method of data transmission or storage is completely secure. While we strive to use commercially acceptable means to protect user data, we cannot guarantee absolute security."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Third-Party Services",children:"5. Third-Party Services"}),p.jsx("p",{className:"mt-4",children:"We may use third-party services, such as Cloudflare, to assist in the operation and maintenance of our website. These third-party services may have access to certain user data, including email names and content, solely for the purpose of providing their services. We ensure that any third-party services we use are reputable and have appropriate data protection measures in place."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"",children:"6. Information Sharing"}),p.jsx("p",{className:"mt-4",children:"We do not share, sell, or disclose any personal information or email content to third parties, except as required by law or as necessary to protect our rights, property, or safety."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Cookies",children:"7. Cookies"}),p.jsx("p",{className:"mt-4",children:"We may use cookies to enhance the user experience on our website. These cookies may collect non-personal information and are used solely for website analytics and functionality purposes."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Children's Privacy",children:"8. Children's Privacy"}),p.jsx("p",{className:"mt-4",children:"Our website is not intended for use by individuals under the age of 13. We do not knowingly collect personal information from children. If you believe that we may have inadvertently collected personal information from a child under 13, please contact us immediately, and we will take appropriate steps to delete such information."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Changes to the Privacy Policy",children:"9. Changes to the Privacy Policy"}),p.jsx("p",{className:"mt-4",children:"We reserve the right to modify or update this Privacy Policy at any time. Any changes made will be effective immediately upon posting the revised Privacy Policy on our website. It is advisable to review this Privacy Policy periodically for any updates."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Contact Us",children:"10. Contact Us"}),p.jsx("p",{className:"mt-4",children:"If you have any questions, concerns, or feedback regarding this Privacy Policy or our website's privacy practices, please contact us."}),p.jsx("p",{className:"mt-8",children:"Last updated: 2024-03-15"})]})})}function q4(){return p.jsx("div",{children:p.jsxs("div",{className:"max-w-[1400px] ",children:[p.jsx("p",{className:"mt-8",children:'Welcome to Vmail.DEV! These Terms of Service ("Terms") govern your access to and use of our website and services. By accessing or using our services, you agree to be bound by these Terms. If you do not agree to these Terms, please do not use our services.'}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Collection of Information",children:"1. Description of Service"}),p.jsx("p",{className:"mt-4",children:"Vmail.DEV is a minimalistic temporary email service that allows you to obtain a temporary email address without disclosing any personal information, ensuring the protection of your privacy. Our service supports the selection of multiple domain names, providing you with the convenience of using it in various scenarios. Additionally, Vmail.DEV operates on the Cloudflare network, guaranteeing a super-fast experience."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Storage of Emails",children:"2. Usage Restrictions"}),p.jsx("p",{className:"mt-4",children:"2.1 Availability: Please note that Vmail.DEV is not available in China Mainland. We apologize for any inconvenience caused."}),p.jsx("p",{className:"mt-4",children:"2.2 Copyright: All copyrights related to Vmail.DEV and its services belong to Vmail.DEV. You may not copy, reproduce, distribute, modify, or create derivative works of Vmail.DEV or any part thereof without explicit permission from Vmail.DEV."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Deletion of Emails",children:"3. User Responsibilities"}),p.jsx("p",{className:"mt-4",children:"3.1 Registration: You are not required to register or provide any personal information to use Vmail.DEV. However, you are solely responsible for maintaining the confidentiality of any temporary email addresses generated through our service."}),p.jsx("p",{className:"mt-4",children:"3.2 Prohibited Activities: While using Vmail.DEV, you agree not to engage in any activities that may violate any applicable laws, regulations, or these Terms. Prohibited activities include, but are not limited to:"}),p.jsxs("ul",{className:"mt-4",children:[p.jsx("li",{children:"a) Sending spam or unsolicited emails. "}),p.jsx("li",{children:"b) Interfering with or disrupting the operation of our services."}),p.jsx("li",{children:"c) Attempting to gain unauthorized access to our systems or networks."})]}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Data Security",children:"4. Disclaimer of Warranty"}),p.jsx("p",{className:"mt-4",children:'Vmail.DEV is provided on an "as is" and "as available" basis. We do not warrant that our services will be uninterrupted, error-free, or secure. Your use of Vmail.DEV is at your own risk, and we disclaim all warranties, whether express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, and non-infringement.'}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Third-Party Services",children:"5. Limitation of Liability"}),p.jsx("p",{className:"mt-4",children:"To the maximum extent permitted by law, in no event shall Vmail.DEV or its affiliates be liable for any indirect, incidental, special, consequential, or punitive damages, including without limitation, loss of profits, data, use, goodwill, or other intangible losses, resulting from your access to or use of Vmail.DEV or any content or services provided through Vmail.DEV."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"",children:"6. Modification of Terms"}),p.jsx("p",{className:"mt-4",children:"We reserve the right to modify these Terms at any time, without prior notice. Any changes to the Terms will be effective immediately upon posting. Your continued use of Vmail.DEV after the posting of any modified Terms constitutes your acceptance of such changes."}),p.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Cookies",children:"7. Governing Law and Jurisdiction"}),p.jsx("p",{className:"mt-4",children:"These Terms shall be governed by and construed in accordance with the laws of the jurisdiction where Vmail.DEV is located. Any disputes arising out of or in connection with these Terms shall be subject to the exclusive jurisdiction of the courts in that jurisdiction."}),p.jsx("p",{className:"mt-4",children:"If you have any questions or concerns regarding these Terms, please contact us."}),p.jsx("p",{className:"mt-8",children:"Last updated: 2024-04-10"})]})})}function Q4(){const{t:e}=zr(),[t,n]=S.useState(!1),[r,i]=S.useState(!1),[s,o]=S.useState(!1);return p.jsxs(p.Fragment,{children:[p.jsxs("header",{className:"fixed top-0 z-20 h-20 w-full px-5 backdrop-blur-xl md:px-10 text-white flex items-center justify-between shadow-sm",children:[p.jsxs(M1,{to:"/",className:"font-bold flex items-center justify-center gap-3",children:[p.jsx(z4,{}),p.jsx("button",{className:"cool-btn",children:p.jsx("span",{children:"VMAIL.DEV"})})]}),p.jsxs("nav",{className:"flex items-center",children:[p.jsx("button",{onClick:()=>n(!0),className:"ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400",children:e("About")}),p.jsx("button",{onClick:()=>i(!0),className:"ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400",children:e("Privacy")}),p.jsx("button",{onClick:()=>o(!0),className:"ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400",children:e("Terms")}),p.jsx("a",{className:"ml-3 md:ml-8",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/oiov/vmail",children:p.jsxs("button",{className:"whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-transparent hover:bg-accent hover:text-accent-foreground text-md flex h-[32px] w-[85px] cursor-pointer items-center justify-center rounded-md border-2 p-2 font-semibold hover:opacity-50",children:[p.jsx(W4,{}),p.jsx("div",{className:"ml-1.5 text-sm",children:"Star"})]})})]})]}),p.jsx(Na,{showModal:t,setShowModal:n,title:e("About"),children:p.jsx(H4,{})}),p.jsx(Na,{showModal:r,setShowModal:i,title:e("Privacy"),children:p.jsx(K4,{})}),p.jsx(Na,{showModal:s,setShowModal:o,title:e("Terms"),children:p.jsx(q4,{})})]})}function Y4({className:e}){return p.jsx("svg",{width:"512",height:"512",viewBox:"0 0 24 24",className:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{fill:"currentColor",d:"M8.5 2h2.5L11 2h-2.5zM13 2h2.5L15.5 2h-2.5zM10.5 2h5v0h-5zM8.5 2h5v0h-5zM10 2h3.5L13.5 2h-3.5z",children:p.jsx("animate",{fill:"freeze",attributeName:"d",dur:"0.4s",keyTimes:"0;0.3;0.5;1",values:` + M8.5 2h2.5L11 2h-2.5zM13 2h2.5L15.5 2h-2.5zM10.5 2h5v0h-5zM8.5 2h5v0h-5zM10 2h3.5L13.5 2h-3.5z; + M8.5 2h2.5L11 22h-2.5zM13 2h2.5L15.5 22h-2.5zM10.5 2h5v2h-5zM8.5 20h5v2h-5zM10 2h3.5L13.5 22h-3.5z; + M8.5 2h2.5L11 22h-2.5zM13 2h2.5L15.5 22h-2.5zM10.5 2h5v2h-5zM8.5 20h5v2h-5zM10 2h3.5L13.5 22h-3.5z; + M1 2h2.5L18.5 22h-2.5zM5.5 2h2.5L23 22h-2.5zM3 2h5v2h-5zM16 20h5v2h-5zM18.5 2h3.5L5 22h-3.5z`})})})}function G4({className:e}){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 24 24",className:"h-6 w-6",fill:"currentColor",children:p.jsx("path",{d:"M1 150c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z",children:p.jsx("animate",{fill:"freeze",attributeName:"d",dur:"0.4s",keyTimes:"0;0.3;0.5;1",values:`M4 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z; + M8 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z; + M10 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z; + M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z`})})})}function X4(e){return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("path",{color:"#0070f3",strokeWidth:"3",d:"m12 14 4-4"}),p.jsx("defs",{children:p.jsxs("linearGradient",{id:"gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p.jsx("stop",{offset:"0%",style:{stopColor:"rgb(35, 35, 35)",stopOpacity:"1"}}),p.jsx("stop",{offset:"100%",style:{stopColor:"rgb(100,100,100)",stopOpacity:"1"}})]})}),p.jsx("path",{d:"M3.34 19a10 10 0 1 1 17.32 0",stroke:"url(#gradient)",strokeWidth:"3"})]})}function J4(){return p.jsxs("div",{className:"text-white w-full mt-auto flex flex-col items-center justify-between px-5 pt-16 mb-10 md:px-10 mx-auto sm:flex-row",children:[p.jsx(M1,{to:"/",className:"text-xl font-black leading-none select-none logo",children:"VMAIL.DEV"})," ",p.jsxs("p",{className:"mt-4 text-sm text-gray-400 sm:ml-4 sm:pl-4 sm:border-l sm:border-gray-200 sm:mt-0",children:["© 2024 Products of"," ",p.jsx("a",{className:"font-semibold underline hover:text-gray-600",href:"https://www.oiov.dev",target:"_blank",rel:"noopener noreferrer",children:"oiov"}),"."]}),p.jsxs("div",{className:"inline-flex justify-center mt-4 space-x-5 sm:ml-auto sm:mt-0 sm:justify-start",children:[p.jsx("a",{href:"https://wr.do",target:"_blank",rel:"noopener noreferrer",title:"WR.DO",className:"text-gray-400 hover:text-gray-500 scale-[1.2]",children:p.jsx(X4,{className:"w-6 h-6"})}),p.jsx("a",{href:"mailto:hi@oiov.dev",title:"Email",className:"text-gray-400 hover:text-gray-500",children:p.jsx(nw,{className:"w-6 h-6"})}),p.jsx("a",{href:"https://twitter.com/yesmoree",target:"_blank",rel:"noopener noreferrer",title:"Twitter",className:"text-gray-400 hover:text-gray-500",children:p.jsx(Y4,{})}),p.jsx("a",{href:"https://github.com/oiov/vmail",target:"_blank",rel:"noopener noreferrer",title:"Github",className:"text-gray-400 hover:text-gray-500",children:p.jsx(G4,{})})]})]})}function Z4(){return p.jsxs("div",{className:"mx-auto min-h-screen flex flex-col bg-[#1f2023]",children:[p.jsx(Q4,{}),p.jsx(CE,{}),p.jsx(J4,{}),p.jsx(Xk,{position:"bottom-right",toastOptions:{style:{background:"#333",color:"#fff"}}})]})}const eN=new _b;function tN(){const[e,t]=S.useState(null);return S.useEffect(()=>{Se.get("/config").then(n=>{t(n.data)})},[]),e?p.jsx(sw.Provider,{value:e,children:p.jsx(zb,{client:eN,children:p.jsx(DE,{children:p.jsx(kE,{children:p.jsx(ff,{element:p.jsx(Z4,{}),children:p.jsx(ff,{path:"/",element:p.jsx(B4,{})})})})})})}):p.jsx("div",{className:"bg-[#1f2023] text-white w-screen h-screen flex items-center justify-center",children:"Loading..."})}const q=e=>typeof e=="string",fs=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Yg=e=>e==null?"":""+e,nN=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},rN=/###/g,Gg=e=>e&&e.indexOf("###")>-1?e.replace(rN,"."):e,Xg=e=>!e||q(e),Is=(e,t,n)=>{const r=q(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=Is(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let s=t[t.length-1],o=t.slice(0,t.length-1),a=Is(e,o,Object);for(;a.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=Is(e,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${s}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=n},iN=(e,t,n,r)=>{const{obj:i,k:s}=Is(e,t,Object);i[s]=i[s]||[],i[s].push(n)},yl=(e,t)=>{const{obj:n,k:r}=Is(e,t);if(n)return n[r]},sN=(e,t,n)=>{const r=yl(e,n);return r!==void 0?r:yl(t,n)},Ix=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?q(e[r])||e[r]instanceof String||q(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Ix(e[r],t[r],n):e[r]=t[r]);return e},qr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var oN={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const aN=e=>q(e)?e.replace(/[&<>"'\/]/g,t=>oN[t]):e;class lN{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const uN=[" ",",","?","!",";"],cN=new lN(20),fN=(e,t,n)=>{t=t||"",n=n||"";const r=uN.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const i=cN.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s},If=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let s=0;s-1&&le&&e.replace("_","-"),dN={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class wl{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||dN,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[a,l]=o;for(let u=0;u{let[a,l]=o;for(let u=0;u1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):q(r)&&s?a.push(...r.split(s)):a.push(r)));const l=yl(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!o||!q(r)?l:If(this.data&&this.data[t]&&this.data[t][n],r,s)}addResource(t,n,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),Jg(this.data,a,i),s.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(q(r[s])||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let l=yl(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Ix(l,r,s):l={...l,...r},Jg(this.data,a,l),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var _x={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,n,r,i))}),t}};const ey={};class xl extends nu{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),nN(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Yt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!fN(t,r,i);if(o&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:q(s)?[s]:s};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(i)}return{key:t,namespaces:q(s)?[s]:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const b=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${b}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${b}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:o}const f=this.resolve(t,n);let d=f&&f.res;const h=f&&f.usedKey||o,m=f&&f.exactUsedKey||o,w=Object.prototype.toString.apply(d),x=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!q(d)&&typeof d!="boolean"&&typeof d!="number";if(g&&d&&v&&x.indexOf(w)<0&&!(q(y)&&Array.isArray(d))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,d,{...n,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(f.res=b,f.usedParams=this.getUsedParamsDetails(n),f):b}if(s){const b=Array.isArray(d),C=b?[]:{},T=b?m:h;for(const k in d)if(Object.prototype.hasOwnProperty.call(d,k)){const O=`${T}${s}${k}`;C[k]=this.translate(O,{...n,joinArrays:!1,ns:a}),C[k]===O&&(C[k]=d[k])}d=C}}else if(g&&q(y)&&Array.isArray(d))d=d.join(y),d&&(d=this.extendTranslation(d,t,n,r));else{let b=!1,C=!1;const T=n.count!==void 0&&!q(n.count),k=xl.hasDefaultValue(n),O=T?this.pluralResolver.getSuffix(u,n.count,n):"",F=n.ordinal&&T?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",$=T&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),B=$&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${O}`]||n[`defaultValue${F}`]||n.defaultValue;!this.isValidLookup(d)&&k&&(b=!0,d=B),this.isValidLookup(d)||(C=!0,d=o);const me=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:d,J=k&&B!==d&&this.options.updateMissing;if(C||b||J){if(this.logger.log(J?"updateKey":"missingKey",u,l,o,J?B:d),s){const j=this.resolve(o,{...n,keySeparator:!1});j&&j.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 E=[];const N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&N&&N[0])for(let j=0;j{const A=k&&D!==d?D:me;this.options.missingKeyHandler?this.options.missingKeyHandler(j,l,M,A,J,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(j,l,M,A,J,n),this.emit("missingKey",j,l,M,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?E.forEach(j=>{const M=this.pluralResolver.getSuffixes(j,n);$&&n[`defaultValue${this.options.pluralSeparator}zero`]&&M.indexOf(`${this.options.pluralSeparator}zero`)<0&&M.push(`${this.options.pluralSeparator}zero`),M.forEach(D=>{_([j],o+D,n[`defaultValue${D}`]||B)})}):_(E,o,B))}d=this.extendTranslation(d,t,n,f,r),C&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${o}`),(C||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,b?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(f.res=d,f.usedParams=this.getUsedParamsDetails(n),f):d}extendTranslation(t,n,r,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=q(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let f=r.replace&&!q(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),u){const d=t.match(this.interpolator.nestingRegexp),h=d&&d.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,o,a;return q(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;i=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=n.count!==void 0&&!q(n.count),h=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(q(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(x=>{this.isValidLookup(r)||(a=x,!ey[`${w[0]}-${x}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(ey[`${w[0]}-${x}`]=!0,this.logger.warn(`key "${i}" for languages "${w.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),w.forEach(y=>{if(this.isValidLookup(r))return;o=y;const g=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(g,c,y,x,n);else{let b;d&&(b=this.pluralResolver.getSuffix(y,n.count,n));const C=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(g.push(c+b),n.ordinal&&b.indexOf(T)===0&&g.push(c+b.replace(T,this.options.pluralSeparator)),h&&g.push(c+C)),m){const k=`${c}${this.options.contextSeparator}${n.context}`;g.push(k),d&&(g.push(k+b),n.ordinal&&b.indexOf(T)===0&&g.push(k+b.replace(T,this.options.pluralSeparator)),h&&g.push(k+C))}}let v;for(;v=g.pop();)this.isValidLookup(r)||(s=v,r=this.getResource(y,x,v,n))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=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=t.replace&&!q(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const s of n)delete i[s]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const Yu=e=>e.charAt(0).toUpperCase()+e.slice(1);class ty{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yt.create("languageUtils")}getScriptPartFromCode(t){if(t=vl(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=vl(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(q(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Yu(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Yu(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Yu(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),q(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return q(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):q(t)&&s(this.formatLanguageCode(t)),r.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let hN=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],pN={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const mN=["v1","v2","v3"],gN=["v4"],ny={zero:0,one:1,two:2,few:3,many:4,other:5},yN=()=>{const e={};return hN.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:pN[t.fc]}})}),e};class vN{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Yt.create("pluralResolver"),(!this.options.compatibilityJSON||gN.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=yN(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=vl(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let o;try{o=new Intl.PluralRules(r,{type:i})}catch{if(!t.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,n)}return this.pluralRulesCache[s]=o,o}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,s)=>ny[i]-ny[s]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!mN.includes(this.options.compatibilityJSON)}}const ry=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=sN(e,t,n);return!s&&i&&q(n)&&(s=If(e,n,r),s===void 0&&(s=If(t,n,r))),s},Gu=e=>e.replace(/\$/g,"$$$$");class wN{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:m,nestingSuffixEscaped:w,nestingOptionsSeparator:x,maxReplaces:y,alwaysFormat:g}=t.interpolation;this.escape=n!==void 0?n:aN,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?qr(s):o||"{{",this.suffix=a?qr(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?qr(d):h||qr("$t("),this.nestingSuffix=m?qr(m):w||qr(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=y||1e3,this.alwaysFormat=g!==void 0?g:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let s,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=h=>{if(h.indexOf(this.formatSeparator)<0){const y=ry(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...i,...n,interpolationkey:h}):y}const m=h.split(this.formatSeparator),w=m.shift().trim(),x=m.join(this.formatSeparator).trim();return this.format(ry(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),x,r,{...i,...n,interpolationkey:w})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>Gu(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?Gu(this.escape(h)):Gu(h)}].forEach(h=>{for(a=0;s=h.regex.exec(t);){const m=s[1].trim();if(o=u(m),o===void 0)if(typeof c=="function"){const x=c(t,s,i);o=q(x)?x:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))o="";else if(f){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),o="";else!q(o)&&!this.useRawValueToEscape&&(o=Yg(o));const w=h.safeValue(o);if(t=t.replace(s[0],w),f?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=s[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const f=l.split(new RegExp(`${c}[ ]*{`));let d=`{${f[1]}`;l=f[0],d=this.interpolate(d,o);const h=d.match(/'/g),m=d.match(/"/g);(h&&h.length%2===0&&!m||m.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${c}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...r},o=o.replace&&!q(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),l=c,u=!0}if(s=n(a.call(this,i[1].trim(),o),o),s&&i[0]===t&&!q(s))return s;q(s)||(s=Yg(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),u&&(s=l.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}const xN=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Qr=e=>{const t={};return(n,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const o=r+JSON.stringify(s);let a=t[o];return a||(a=e(vl(r),i),t[o]=a),a(n)}};class SN{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yt.create("formatter"),this.options=t,this.formats={number:Qr((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return s=>i.format(s)}),currency:Qr((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>i.format(s)}),datetime:Qr((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return s=>i.format(s)}),relativetime:Qr((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return s=>i.format(s,r.range||"day")}),list:Qr((n,r)=>{const i=new Intl.ListFormat(n,{...r});return s=>i.format(s)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Qr(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(a=>a.indexOf(")")>-1)){const a=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,a)].join(this.formatSeparator)}return s.reduce((a,l)=>{const{formatName:u,formatOptions:c}=xN(l);if(this.formats[u]){let f=a;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=d.locale||d.lng||i.locale||i.lng||r;f=this.formats[u](a,h,{...c,...i,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const bN=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class PN extends nu{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Yt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const s={},o={},a={},l={};return t.forEach(u=>{let c=!0;n.forEach(f=>{const d=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,c=!1,o[d]===void 0&&(o[d]=!0),s[d]===void 0&&(s[d]=!0),l[f]===void 0&&(l[f]=!0)))}),c||(a[u]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),s=i[0],o=i[1];n&&this.emit("failedLoading",s,o,n),!n&&r&&this.store.addResourceBundle(s,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(l=>{iN(l.loaded,[s],o),bN(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:s,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,s*2,o)},s);return}o(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=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."),i&&i();q(t)&&(t=this.languageUtils.toResolveHierarchy(t)),q(n)&&(n=[n]);const s=this.queueLoad(t,n,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${s} for language ${i}`,a),this.loaded(t,o,a)})}saveMissing(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&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&&this.backend.create){const l={...o,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,i,l):c=u(t,n,r,i),c&&typeof c.then=="function"?c.then(f=>a(null,f)).catch(a):a(null,c)}catch(c){a(c)}else u(t,n,r,i,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const iy=()=>({debug:!1,initImmediate:!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:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),q(e[1])&&(t.defaultValue=e[1]),q(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),sy=e=>(q(e.ns)&&(e.ns=[e.ns]),q(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),q(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),aa=()=>{},CN=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class co extends nu{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=sy(t),this.services={},this.logger=Yt,this.modules={external:[]},CN(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=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&&n.defaultNS!==!1&&n.ns&&(q(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=iy();this.options={...i,...this.options,...sy(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Yt.init(s(this.modules.logger),this.options):Yt.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=SN);const f=new ty(this.options);this.store=new Zg(this.options.resources,this.options);const d=this.services;d.logger=Yt,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new vN(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=s(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new wN(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new PN(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(h){for(var m=arguments.length,w=new Array(m>1?m-1:0),x=1;x1?m-1:0),x=1;x{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=aa),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=fs(),u=()=>{const c=(f,d)=>{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),l.resolve(d),r(f,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:aa;const i=q(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=fs();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=aa),this.services.backendConnector.reload(t,n,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&_x.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=fs();this.emit("languageChanging",t);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=q(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{o(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const s=function(o,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),f=2;f`${l.keyPrefix}${d}${m}`):h=l.keyPrefix?`${l.keyPrefix}${d}${o}`:o,i.t(h,l)};return q(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){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],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!i||o(s,t)))}loadNamespaces(t,n){const r=fs();return this.options.ns?(q(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=fs();q(t)&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)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&&this.services.languageUtils||new ty(iy());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new co(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:aa;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new co(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new Zg(this.store.data,i),s.services.resourceStore=s.store),s.translator=new xl(s.services,i),s.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c0){var a=i.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(i.domain){if(!oy.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!oy.test(i.path))throw new TypeError("option path is invalid");o+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){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 o},ay={create:function(t,n,r,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+r*60*1e3)),i&&(s.domain=i),document.cookie=DN(t,encodeURIComponent(n),s)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),s=i.split("&"),o=0;o0){var l=s[o].substring(0,a);l===t.lookupQuerystring&&(n=s[o].substring(a+1))}}}return n}},ds=null,ly=function(){if(ds!==null)return ds;try{ds=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{ds=!1}return ds},FN={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&ly()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&ly()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},hs=null,uy=function(){if(hs!==null)return hs;try{hs=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{hs=!1}return hs},IN={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&uy()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&uy()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},_N={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},VN={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},$N={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},UN={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},$x=!1;try{document.cookie,$x=!0}catch{}var Ux=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];$x||Ux.splice(1,1);function BN(){return{order:Ux,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var Bx=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};EN(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return RN(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=LN(r,this.options||{},BN()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(s){return s.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(MN),this.addDetector(AN),this.addDetector(FN),this.addDetector(IN),this.addDetector(_N),this.addDetector(VN),this.addDetector($N),this.addDetector(UN)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(s){if(r.detectors[s]){var o=r.detectors[s].lookup(r.options);o&&typeof o=="string"&&(o=[o]),o&&(i=i.concat(o))}}),i=i.map(function(s){return r.options.convertDetectedLanguage(s)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(s){i.detectors[s]&&i.detectors[s].cacheUserLanguage(n,i.options)}))}}])}();Bx.type="languageDetector";function _f(e){"@babel/helpers - typeof";return _f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_f(e)}function zx(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":_f(XMLHttpRequest))==="object"}function zN(e){return!!e&&typeof e.then=="function"}function WN(e){return zN(e)?e:Promise.resolve(e)}function HN(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Vf={exports:{}},la={exports:{}},cy;function KN(){return cy||(cy=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof bs<"u"&&bs,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function u(E){return E&&DataView.prototype.isPrototypeOf(E)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(E){return E&&c.indexOf(Object.prototype.toString.call(E))>-1};function d(E){if(typeof E!="string"&&(E=String(E)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(E)||E==="")throw new TypeError('Invalid character in header field name: "'+E+'"');return E.toLowerCase()}function h(E){return typeof E!="string"&&(E=String(E)),E}function m(E){var N={next:function(){var _=E.shift();return{done:_===void 0,value:_}}};return l.iterable&&(N[Symbol.iterator]=function(){return N}),N}function w(E){this.map={},E instanceof w?E.forEach(function(N,_){this.append(_,N)},this):Array.isArray(E)?E.forEach(function(N){this.append(N[0],N[1])},this):E&&Object.getOwnPropertyNames(E).forEach(function(N){this.append(N,E[N])},this)}w.prototype.append=function(E,N){E=d(E),N=h(N);var _=this.map[E];this.map[E]=_?_+", "+N:N},w.prototype.delete=function(E){delete this.map[d(E)]},w.prototype.get=function(E){return E=d(E),this.has(E)?this.map[E]:null},w.prototype.has=function(E){return this.map.hasOwnProperty(d(E))},w.prototype.set=function(E,N){this.map[d(E)]=h(N)},w.prototype.forEach=function(E,N){for(var _ in this.map)this.map.hasOwnProperty(_)&&E.call(N,this.map[_],_,this)},w.prototype.keys=function(){var E=[];return this.forEach(function(N,_){E.push(_)}),m(E)},w.prototype.values=function(){var E=[];return this.forEach(function(N){E.push(N)}),m(E)},w.prototype.entries=function(){var E=[];return this.forEach(function(N,_){E.push([_,N])}),m(E)},l.iterable&&(w.prototype[Symbol.iterator]=w.prototype.entries);function x(E){if(E.bodyUsed)return Promise.reject(new TypeError("Already read"));E.bodyUsed=!0}function y(E){return new Promise(function(N,_){E.onload=function(){N(E.result)},E.onerror=function(){_(E.error)}})}function g(E){var N=new FileReader,_=y(N);return N.readAsArrayBuffer(E),_}function v(E){var N=new FileReader,_=y(N);return N.readAsText(E),_}function b(E){for(var N=new Uint8Array(E),_=new Array(N.length),j=0;j-1?N:E}function F(E,N){if(!(this instanceof F))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');N=N||{};var _=N.body;if(E instanceof F){if(E.bodyUsed)throw new TypeError("Already read");this.url=E.url,this.credentials=E.credentials,N.headers||(this.headers=new w(E.headers)),this.method=E.method,this.mode=E.mode,this.signal=E.signal,!_&&E._bodyInit!=null&&(_=E._bodyInit,E.bodyUsed=!0)}else this.url=String(E);if(this.credentials=N.credentials||this.credentials||"same-origin",(N.headers||!this.headers)&&(this.headers=new w(N.headers)),this.method=O(N.method||this.method||"GET"),this.mode=N.mode||this.mode||null,this.signal=N.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&_)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(_),(this.method==="GET"||this.method==="HEAD")&&(N.cache==="no-store"||N.cache==="no-cache")){var j=/([?&])_=[^&]*/;if(j.test(this.url))this.url=this.url.replace(j,"$1_="+new Date().getTime());else{var M=/\?/;this.url+=(M.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}F.prototype.clone=function(){return new F(this,{body:this._bodyInit})};function $(E){var N=new FormData;return E.trim().split("&").forEach(function(_){if(_){var j=_.split("="),M=j.shift().replace(/\+/g," "),D=j.join("=").replace(/\+/g," ");N.append(decodeURIComponent(M),decodeURIComponent(D))}}),N}function B(E){var N=new w,_=E.replace(/\r?\n[\t ]+/g," ");return _.split("\r").map(function(j){return j.indexOf(` +`)===0?j.substr(1,j.length):j}).forEach(function(j){var M=j.split(":"),D=M.shift().trim();if(D){var A=M.join(":").trim();N.append(D,A)}}),N}T.call(F.prototype);function X(E,N){if(!(this instanceof X))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');N||(N={}),this.type="default",this.status=N.status===void 0?200:N.status,this.ok=this.status>=200&&this.status<300,this.statusText=N.statusText===void 0?"":""+N.statusText,this.headers=new w(N.headers),this.url=N.url||"",this._initBody(E)}T.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new w(this.headers),url:this.url})},X.error=function(){var E=new X(null,{status:0,statusText:""});return E.type="error",E};var me=[301,302,303,307,308];X.redirect=function(E,N){if(me.indexOf(N)===-1)throw new RangeError("Invalid status code");return new X(null,{status:N,headers:{location:E}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(N,_){this.message=N,this.name=_;var j=Error(N);this.stack=j.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function J(E,N){return new Promise(function(_,j){var M=new F(E,N);if(M.signal&&M.signal.aborted)return j(new o.DOMException("Aborted","AbortError"));var D=new XMLHttpRequest;function A(){D.abort()}D.onload=function(){var K={status:D.status,statusText:D.statusText,headers:B(D.getAllResponseHeaders()||"")};K.url="responseURL"in D?D.responseURL:K.headers.get("X-Request-URL");var ve="response"in D?D.response:D.responseText;setTimeout(function(){_(new X(ve,K))},0)},D.onerror=function(){setTimeout(function(){j(new TypeError("Network request failed"))},0)},D.ontimeout=function(){setTimeout(function(){j(new TypeError("Network request failed"))},0)},D.onabort=function(){setTimeout(function(){j(new o.DOMException("Aborted","AbortError"))},0)};function U(K){try{return K===""&&a.location.href?a.location.href:K}catch{return K}}D.open(M.method,U(M.url),!0),M.credentials==="include"?D.withCredentials=!0:M.credentials==="omit"&&(D.withCredentials=!1),"responseType"in D&&(l.blob?D.responseType="blob":l.arrayBuffer&&M.headers.get("Content-Type")&&M.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(D.responseType="arraybuffer")),N&&typeof N.headers=="object"&&!(N.headers instanceof w)?Object.getOwnPropertyNames(N.headers).forEach(function(K){D.setRequestHeader(K,h(N.headers[K]))}):M.headers.forEach(function(K,ve){D.setRequestHeader(ve,K)}),M.signal&&(M.signal.addEventListener("abort",A),D.onreadystatechange=function(){D.readyState===4&&M.signal.removeEventListener("abort",A)}),D.send(typeof M._bodyInit>"u"?null:M._bodyInit)})}return J.polyfill=!0,a.fetch||(a.fetch=J,a.Headers=w,a.Request=F,a.Response=X),o.Headers=w,o.Request=F,o.Response=X,o.fetch=J,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(la,la.exports)),la.exports}(function(e,t){var n=typeof fetch=="function"?fetch:void 0;if(typeof bs<"u"&&bs.fetch?n=bs.fetch:typeof window<"u"&&window.fetch&&(n=window.fetch),typeof HN<"u"&&typeof window>"u"){var r=n||KN();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Vf,Vf.exports);var Wx=Vf.exports;const Hx=Oy(Wx),fy=Ty({__proto__:null,default:Hx},[Wx]);function dy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hy(e){for(var t=1;t"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,a=hy({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:s},my?{}:o),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{py(n,a,i,l)}catch(u){if(!o||Object.keys(o).length===0||!u.message||u.message.indexOf("not implemented")<0)return i(u);try{Object.keys(o).forEach(function(c){delete a[c]}),py(n,a,i,l),my=!0}catch(c){i(c)}}},XN=function(t,n,r,i){r&&Vr(r)==="object"&&(r=$f("",r).slice(1)),t.queryStringParams&&(n=$f(n,t.queryStringParams));try{var s;ho?s=new ho:s=new Sl("MSXML2.XMLHTTP.3.0"),s.open(r?"POST":"GET",n,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,r&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)s.setRequestHeader(a,o[a]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(r)}catch(l){console&&console.log(l)}},JN=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Zn&&n.indexOf("file:")!==0)return GN(t,n,r,i);if(zx()||typeof ActiveXObject=="function")return XN(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Hi(e){"@babel/helpers - typeof";return Hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hi(e)}function gy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xu(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ZN(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return tL(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Xu(Xu(Xu({},rL()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);Hi(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,s,o){var a=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=WN(l),l.then(function(u){if(!u)return o(null,{});var c=a.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});a.loadUrl(c,o,r,s)})}},{key:"loadUrl",value:function(n,r,i,s){var o=this,a=typeof i=="string"?[i]:i,l=typeof s=="string"?[s]:s,u=this.options.parseLoadPayload(a,l);this.options.request(this.options,n,u,function(c,f){if(f&&(f.status>=500&&f.status<600||!f.status))return r("failed loading "+n+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return r("failed loading "+n+"; status code: "+f.status,!1);if(!f&&c&&c.message){var d=c.message.toLowerCase(),h=["failed","fetch","network","load"].find(function(x){return d.indexOf(x)>-1});if(h)return r("failed loading "+n+": "+c.message,!0)}if(c)return r(c,!1);var m,w;try{typeof f.data=="string"?m=o.options.parse(f.data,i,s):m=f.data}catch{w="failed parsing "+n+" to json"}if(w)return r(w,!1);r(null,m)})}},{key:"create",value:function(n,r,i,s,o){var a=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,s),u=0,c=[],f=[];n.forEach(function(d){var h=a.options.addPath;typeof a.options.addPath=="function"&&(h=a.options.addPath(d,r));var m=a.services.interpolator.interpolate(h,{lng:d,ns:r});a.options.request(a.options,m,l,function(w,x){u+=1,c.push(w),f.push(x),u===n.length&&typeof o=="function"&&o(c,f)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,s=r.languageUtils,o=r.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var l=[],u=function(f){var d=s.toResolveHierarchy(f);d.forEach(function(h){l.indexOf(h)<0&&l.push(h)})};u(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),l.forEach(function(c){n.allOptions.ns.forEach(function(f){i.read(c,f,"read",null,null,function(d,h){d&&o.warn("loading namespace ".concat(f," for language ").concat(c," failed"),d),!d&&h&&o.log("loaded namespace ".concat(f," for language ").concat(c),h),i.loaded("".concat(c,"|").concat(f),d,h)})})})}}}])}();Qx.type="backend";ze.use(Qx).use(Bx).use(ik).init({debug:!0,fallbackLng:"en",ns:["common"],defaultNS:"common",supportedLngs:["en","zh","fr","ja","hi","de","ko","zh-TW","it","pt","tr","ru"],backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["cookie","localStorage","htmlTag","path","subdomain"],caches:["cookie","localStorage"]}});Zu.createRoot(document.getElementById("root")).render(p.jsx(Ju.StrictMode,{children:p.jsx(Ju.Suspense,{fallback:"loading...",children:p.jsx(tN,{})})})); diff --git a/frontend/build/client/index.html b/frontend/build/client/index.html index 92f4e66..eccdd5b 100644 --- a/frontend/build/client/index.html +++ b/frontend/build/client/index.html @@ -1,14 +1,14 @@ - + - vMail - 临时邮箱 - + Vmail - 临时邮箱 +
- \ No newline at end of file + diff --git a/frontend/index.html b/frontend/index.html index 1b829d3..ea63051 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,13 +1,13 @@ - + - vMail - 临时邮箱 + Vmail - 临时邮箱
- \ No newline at end of file +