@decocms/mesh 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DxJIdkjA.js → AlertCircle-DIUuKH85.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CrgZDDUZ.js → ArrowLeft-CkUzXRaI.js} +1 -1
- package/dist/client/assets/{ChevronDown-B2VaHCqC.js → ChevronDown-BvW0ckZD.js} +1 -1
- package/dist/client/assets/ChevronRight-CZtzKGIu.js +1 -0
- package/dist/client/assets/{Copy01-DfnjsOeR.js → Copy01-CuJ0g2xO.js} +1 -1
- package/dist/client/assets/DotsHorizontal-DYEmF2Ja.js +1 -0
- package/dist/client/assets/{DotsVertical-DIWcHGKr.js → DotsVertical-BeEwh9bI.js} +1 -1
- package/dist/client/assets/{File06-DSeIH9xM.js → File06-CRLpAcG8.js} +1 -1
- package/dist/client/assets/FilterLines-Dunahtdb.js +1 -0
- package/dist/client/assets/{FlipBackward-s0RSv_vj.js → FlipBackward-BNVbTeUf.js} +1 -1
- package/dist/client/assets/{GitBranch01-CeFBxnqq.js → GitBranch01-C6HWIzG8.js} +1 -1
- package/dist/client/assets/{Grid01-Ch9rI6P9.js → Grid01-abxNmH9m.js} +1 -1
- package/dist/client/assets/{Inbox01-7z9hTUsw.js → Inbox01-BgT9AcaM.js} +1 -1
- package/dist/client/assets/{InfoCircle-DQaxWpv9.js → InfoCircle-BsiOwq0l.js} +1 -1
- package/dist/client/assets/{Key01-CH9qCC00.js → Key01-B5WpAxl2.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DZDUBWQO.js → LinkExternal01-CZ9G6wJu.js} +1 -1
- package/dist/client/assets/{Loading01-B0dLQInZ.js → Loading01-moxMTYJZ.js} +1 -1
- package/dist/client/assets/{Lock01-wpG8qO-9.js → Lock01-DK8m996z.js} +1 -1
- package/dist/client/assets/Play-ZrtDSXtF.js +1 -0
- package/dist/client/assets/{Plus-D_XbrIfI.js → Plus-CmJGP3Pi.js} +1 -1
- package/dist/client/assets/{Terminal-BSL9-A7C.js → Terminal-D78hWJeY.js} +1 -1
- package/dist/client/assets/{Trash01-aTCf1hVv.js → Trash01-D5RX1AvX.js} +1 -1
- package/dist/client/assets/{X-BgwVwwIy.js → X-DYwfZFnc.js} +1 -1
- package/dist/client/assets/XClose-Blj-z_Lg.js +1 -0
- package/dist/client/assets/{alert-dialog-DIexFXOj.js → alert-dialog-2_Xl_cUo.js} +3 -3
- package/dist/client/assets/auth-CPKE7Qi_.js +1 -0
- package/dist/client/assets/{auth-catchall-Cp5vKmTi.js → auth-catchall-asPM_Gpt.js} +1 -1
- package/dist/client/assets/{avatar-Bf0qQU4w.js → avatar-NJ2X4Ohl.js} +1 -1
- package/dist/client/assets/{badge-CgEtLuTw.js → badge-CSFb4yoL.js} +1 -1
- package/dist/client/assets/button-B6d9pLjw.js +1 -0
- package/dist/client/assets/{card-ciO_SNWh.js → card-D98cnfOH.js} +1 -1
- package/dist/client/assets/checkbox-B3KsIzSA.js +1 -0
- package/dist/client/assets/{collection-detail-msiVYwQa.js → collection-detail-7jpdrsjG.js} +4 -4
- package/dist/client/assets/collection-display-button-B_3aOLS4.js +1 -0
- package/dist/client/assets/{collection-header-BkZGWAxm.js → collection-header-Dofk8u1h.js} +1 -1
- package/dist/client/assets/{collection-page-CREYFoHa.js → collection-page-B1QnvJAf.js} +1 -1
- package/dist/client/assets/collection-search-DT3IVSbs.js +1 -0
- package/dist/client/assets/collection-tab-2aj2IyYN.js +1 -0
- package/dist/client/assets/{collection-table-wrapper-Dnmr37nE.js → collection-table-wrapper-DzYv1LYJ.js} +1 -1
- package/dist/client/assets/{connection-card-Dcrw1pJ1.js → connection-card-DoZG4KYv.js} +1 -1
- package/dist/client/assets/connection-detail-CG5F7eYm.js +1 -0
- package/dist/client/assets/connections-DBqko-au.js +1 -0
- package/dist/client/assets/constants-CRMW04Tq.js +1 -0
- package/dist/client/assets/{create-organization-dialog-CYQoklT3.js → create-organization-dialog-chOw1gL3.js} +1 -1
- package/dist/client/assets/{dialog-D4dy2US8.js → dialog-CaCpZWVz.js} +1 -1
- package/dist/client/assets/dropdown-menu-DKq7y9Ab.js +1 -0
- package/dist/client/assets/{empty-state-CA7indKP.js → empty-state-xLD9BV9Z.js} +1 -1
- package/dist/client/assets/env-vars-editor-BIyKC4Rz.js +1 -0
- package/dist/client/assets/{error-boundary-Ba_T3BIS.js → error-boundary-ZHp5NunN.js} +1 -1
- package/dist/client/assets/extract-connection-data-DaYEiIhd.js +1 -0
- package/dist/client/assets/{form-rbCVC2Lc.js → form-C_Mz-Re1.js} +1 -1
- package/dist/client/assets/{formatDistanceToNow-Bsssu-td.js → formatDistanceToNow-CxfQwfjE.js} +1 -1
- package/dist/client/assets/gateway-detail-BH34ou9a.js +1 -0
- package/dist/client/assets/gateway-selector-DgKTRIKP.js +1 -0
- package/dist/client/assets/gateways-D_z8EWpe.js +1 -0
- package/dist/client/assets/github-icon-BrF3LMLL.js +1 -0
- package/dist/client/assets/{home-0xYKq0nN.js → home-DwiZZ6Lk.js} +1 -1
- package/dist/client/assets/index-BjKus4OW.css +1 -0
- package/dist/client/assets/{index-BGmLHZvN.js → index-CjDpnJWb.js} +5 -5
- package/dist/client/assets/{index-B9fZ40p9.js → index-CytkXEgd.js} +21 -21
- package/dist/client/assets/index-DFBaadWa.js +1 -0
- package/dist/client/assets/{input-C3lfdgit.js → input-hiMZ1V63.js} +1 -1
- package/dist/client/assets/{layout-BgUF9JkX.js → layout-DEsRSKAp.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-Buv6v3mS.js → lazy-highlighter-CgR5ZMfY.js} +1 -1
- package/dist/client/assets/{localstorage-keys-BGRuWcRT.js → localstorage-keys-CpCKetOn.js} +1 -1
- package/dist/client/assets/{login-fFNSXfGP.js → login-9yN2SgKi.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DacADfyW.js → mcp-oauth-D_E4Op0m.js} +1 -1
- package/dist/client/assets/mcp-server-detail-DPNY9vgF.js +1 -0
- package/dist/client/assets/members-VwgW_g24.js +3 -0
- package/dist/client/assets/{monaco-editor-uZe9l_bJ.js → monaco-editor-DAqCldiN.js} +4 -4
- package/dist/client/assets/monitoring-BdaWFgQZ.js +49 -0
- package/dist/client/assets/{oauth-callback-zUOuo71p.js → oauth-callback-C_lwUhYa.js} +1 -1
- package/dist/client/assets/page-BH17Xeeo.js +35 -0
- package/dist/client/assets/page-CRqZQKSl.js +1 -0
- package/dist/client/assets/pin-to-sidebar-button-Dmct01St.js +1 -0
- package/dist/client/assets/popover-Clubonj7.js +1 -0
- package/dist/client/assets/project-context-provider-DtvnTwVB.js +1 -0
- package/dist/client/assets/resizable-BPaAYZlg.js +1 -0
- package/dist/client/assets/{resource-tabs-ltvgVmlK.js → resource-tabs-D70FgHGt.js} +1 -1
- package/dist/client/assets/select-DSYJVHKu.js +1 -0
- package/dist/client/assets/settings-D8ofqvqO.js +1 -0
- package/dist/client/assets/shell-layout-GW5ptB5d.js +19 -0
- package/dist/client/assets/{spinner-CDnZnQfr.js → spinner-wRRUlECI.js} +1 -1
- package/dist/client/assets/switch-DBKcBjJ4.js +1 -0
- package/dist/client/assets/{textarea-CvmD-TCl.js → textarea-YnyjDZNX.js} +1 -1
- package/dist/client/assets/{thread-history-popover-BQKKEP-v.js → thread-history-popover-MOKjUScw.js} +37 -37
- package/dist/client/assets/tools-list-CurlBMu7.js +1 -0
- package/dist/client/assets/{use-binding-BWHEOuVA.js → use-binding-DQAwqqzW.js} +1 -1
- package/dist/client/assets/use-connection-CD_z3y8h.js +2 -0
- package/dist/client/assets/{use-connection-resources-DbXXhKLF.js → use-connection-resources-vGIbHphJ.js} +1 -1
- package/dist/client/assets/use-gateway-DTR5dTeA.js +1 -0
- package/dist/client/assets/{use-list-state-vrSW0egR.js → use-list-state-Da9AxEO9.js} +1 -1
- package/dist/client/assets/{use-mcp-BXJqKT0W.js → use-mcp-BX-QiIqs.js} +1 -1
- package/dist/client/assets/use-members-CCurAGbi.js +1 -0
- package/dist/client/assets/{use-mobile-CG0P5-tt.js → use-mobile-h7BkfBcD.js} +1 -1
- package/dist/client/assets/{use-organization-settings-jxyxG3Do.js → use-organization-settings-B9z0BdMT.js} +1 -1
- package/dist/client/assets/{use-tool-call-vWU--CYB.js → use-tool-call-NuFBLRMj.js} +1 -1
- package/dist/client/assets/useQuery-DUm3_rZs.js +1 -0
- package/dist/client/assets/value-BH4rnske.js +1 -0
- package/dist/client/assets/{view-mode-toggle-CTKggGXJ.js → view-mode-toggle-DZJhL4Oe.js} +1 -1
- package/dist/client/assets/{well-known-mcp-VNRT0JrW.js → well-known-mcp-D13f-8h2.js} +1 -1
- package/dist/client/assets/workflow-Btak9-NU.js +1 -0
- package/dist/client/index.html +2 -2
- package/package.json +2 -3
- package/dist/client/assets/Clock-CafJ8d76.js +0 -1
- package/dist/client/assets/Code01-BHMAmoGH.js +0 -1
- package/dist/client/assets/CpuChip02-qVpLCR0_.js +0 -1
- package/dist/client/assets/Play-DSXQEflq.js +0 -1
- package/dist/client/assets/SearchMd-BJbLhbUT.js +0 -1
- package/dist/client/assets/XClose-sskkBH5X.js +0 -1
- package/dist/client/assets/auth-BnF0Tfz9.js +0 -1
- package/dist/client/assets/button-O0CudEuW.js +0 -1
- package/dist/client/assets/checkbox-DUc30Qpz.js +0 -1
- package/dist/client/assets/collection-display-button-BVgPIpv0.js +0 -1
- package/dist/client/assets/collection-search-s9G5Psps.js +0 -1
- package/dist/client/assets/collection-tab-T_hhyR7G.js +0 -1
- package/dist/client/assets/connection-detail-ByP6chqW.js +0 -1
- package/dist/client/assets/connections-DYOzkJYx.js +0 -1
- package/dist/client/assets/constants-BG4081pg.js +0 -1
- package/dist/client/assets/dropdown-menu-DjELCVXr.js +0 -1
- package/dist/client/assets/env-vars-editor-CFmirc3J.js +0 -1
- package/dist/client/assets/extract-connection-data-Bm1qZWCV.js +0 -1
- package/dist/client/assets/gateway-detail-JYrV5S3_.js +0 -1
- package/dist/client/assets/gateways--haP9jLk.js +0 -1
- package/dist/client/assets/index-BNguAQBW.js +0 -1
- package/dist/client/assets/index-C9WZdaPe.js +0 -1
- package/dist/client/assets/index-CmUsR6rx.css +0 -1
- package/dist/client/assets/members-CAufZALX.js +0 -3
- package/dist/client/assets/monitoring-DTJtueom.js +0 -4
- package/dist/client/assets/page-BP6lcPxY.js +0 -21
- package/dist/client/assets/pin-to-sidebar-button-DcWM6FTO.js +0 -1
- package/dist/client/assets/popover-BRnyFKtN.js +0 -1
- package/dist/client/assets/registry-utils-ulDDT0d8.js +0 -1
- package/dist/client/assets/resizable-Bcc9SJfZ.js +0 -1
- package/dist/client/assets/responsive-select-BbaQnOfE.js +0 -1
- package/dist/client/assets/select-Dsuiuagq.js +0 -1
- package/dist/client/assets/settings-Br4mx_yy.js +0 -1
- package/dist/client/assets/shell-layout-CM_S8ji4.js +0 -19
- package/dist/client/assets/store-CJqU95FV.js +0 -1
- package/dist/client/assets/store-app-detail-Bb4mx26e.js +0 -1
- package/dist/client/assets/switch-DhyQ2_hE.js +0 -1
- package/dist/client/assets/tools-list-zpc-T8zT.js +0 -1
- package/dist/client/assets/tooltip-DaImUyOX.js +0 -1
- package/dist/client/assets/types-BDHiECry.js +0 -46
- package/dist/client/assets/use-connection-9XNP6qUi.js +0 -2
- package/dist/client/assets/use-gateway-BU92tNo7.js +0 -1
- package/dist/client/assets/use-members-eTAFi1HF.js +0 -1
- package/dist/client/assets/useQuery-nlt5lRkW.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-o35GYPjZ.js +0 -1
- package/dist/client/assets/workflow-DTYA39cO.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-9yN2SgKi.js","assets/button-B6d9pLjw.js","assets/input-hiMZ1V63.js","assets/shell-layout-GW5ptB5d.js","assets/error-boundary-ZHp5NunN.js","assets/File06-CRLpAcG8.js","assets/X-DYwfZFnc.js","assets/use-mobile-h7BkfBcD.js","assets/project-context-provider-DtvnTwVB.js","assets/use-organization-settings-B9z0BdMT.js","assets/use-connection-CD_z3y8h.js","assets/use-gateway-DTR5dTeA.js","assets/create-organization-dialog-chOw1gL3.js","assets/alert-dialog-2_Xl_cUo.js","assets/form-C_Mz-Re1.js","assets/spinner-wRRUlECI.js","assets/popover-Clubonj7.js","assets/avatar-NJ2X4Ohl.js","assets/Grid01-abxNmH9m.js","assets/gateway-selector-DgKTRIKP.js","assets/select-DSYJVHKu.js","assets/ChevronDown-BvW0ckZD.js","assets/dropdown-menu-DKq7y9Ab.js","assets/ChevronRight-CZtzKGIu.js","assets/Copy01-CuJ0g2xO.js","assets/LinkExternal01-CZ9G6wJu.js","assets/dialog-CaCpZWVz.js","assets/localstorage-keys-CpCKetOn.js","assets/useQuery-DUm3_rZs.js","assets/thread-history-popover-MOKjUScw.js","assets/use-binding-DQAwqqzW.js","assets/auth-CPKE7Qi_.js","assets/AlertCircle-DIUuKH85.js","assets/textarea-YnyjDZNX.js","assets/Terminal-D78hWJeY.js","assets/monaco-editor-DAqCldiN.js","assets/InfoCircle-BsiOwq0l.js","assets/well-known-mcp-D13f-8h2.js","assets/generate-id-Dyweu44Y.js","assets/Trash01-D5RX1AvX.js","assets/resizable-BPaAYZlg.js","assets/Loading01-moxMTYJZ.js","assets/Plus-CmJGP3Pi.js","assets/home-DwiZZ6Lk.js","assets/card-D98cnfOH.js","assets/page-BH17Xeeo.js","assets/view-mode-toggle-DZJhL4Oe.js","assets/GitBranch01-C6HWIzG8.js","assets/use-tool-call-NuFBLRMj.js","assets/value-BH4rnske.js","assets/page-BZV40eAE.css","assets/members-VwgW_g24.js","assets/collection-header-Dofk8u1h.js","assets/collection-display-button-B_3aOLS4.js","assets/collection-page-B1QnvJAf.js","assets/collection-search-DT3IVSbs.js","assets/collection-table-wrapper-DzYv1LYJ.js","assets/switch-DBKcBjJ4.js","assets/checkbox-B3KsIzSA.js","assets/ArrowLeft-CkUzXRaI.js","assets/use-members-CCurAGbi.js","assets/badge-CSFb4yoL.js","assets/DotsHorizontal-DYEmF2Ja.js","assets/Lock01-DK8m996z.js","assets/DotsVertical-BeEwh9bI.js","assets/Key01-B5WpAxl2.js","assets/XClose-Blj-z_Lg.js","assets/connections-DBqko-au.js","assets/connection-card-DoZG4KYv.js","assets/use-list-state-Da9AxEO9.js","assets/env-vars-editor-BIyKC4Rz.js","assets/settings-D8ofqvqO.js","assets/monitoring-BdaWFgQZ.js","assets/FilterLines-Dunahtdb.js","assets/Play-ZrtDSXtF.js","assets/index-DFBaadWa.js","assets/resource-tabs-D70FgHGt.js","assets/page-CRqZQKSl.js","assets/Inbox01-BgT9AcaM.js","assets/github-icon-BrF3LMLL.js","assets/slugify-CEUa2lfQ.js","assets/app-name-gTETL9So.js","assets/mcp-server-detail-DPNY9vgF.js","assets/tools-list-CurlBMu7.js","assets/layout-DEsRSKAp.js","assets/tools-list-CSRUKxnt.css","assets/use-mcp-BX-QiIqs.js","assets/extract-connection-data-DaYEiIhd.js","assets/constants-CRMW04Tq.js","assets/connection-detail-CG5F7eYm.js","assets/index-CjDpnJWb.js","assets/mcp-oauth-D_E4Op0m.js","assets/pin-to-sidebar-button-Dmct01St.js","assets/formatDistanceToNow-CxfQwfjE.js","assets/use-connection-resources-vGIbHphJ.js","assets/collection-tab-2aj2IyYN.js","assets/empty-state-xLD9BV9Z.js","assets/collection-detail-7jpdrsjG.js","assets/FlipBackward-BNVbTeUf.js","assets/gateways-D_z8EWpe.js","assets/gateway-detail-BH34ou9a.js","assets/workflow-Btak9-NU.js","assets/oauth-callback-C_lwUhYa.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function i4(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(o,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>o[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"]'))o(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();const s4="modulepreload",l4=function(e){return"/"+e},d_={},Tn=function(t,n,o){let i=Promise.resolve();if(n&&n.length>0){let c=function(h){return Promise.all(h.map(v=>Promise.resolve(v).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");i=c(n.map(h=>{if(h=l4(h),h in d_)return;d_[h]=!0;const v=h.endsWith(".css"),p=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const y=document.createElement("link");if(y.rel=v?"stylesheet":s4,v||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),document.head.appendChild(y),v)return new Promise((_,S)=>{y.addEventListener("load",_),y.addEventListener("error",()=>S(Error(`Unable to preload CSS for ${h}`)))})}))}function l(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return i.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};var oH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kp={exports:{}},Cl={};var f_;function c4(){if(f_)return Cl;f_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,i,l){var c=null;if(l!==void 0&&(c=""+l),i.key!==void 0&&(c=""+i.key),"key"in i){l={};for(var d in i)d!=="key"&&(l[d]=i[d])}else l=i;return i=l.ref,{$$typeof:e,type:o,key:c,ref:i!==void 0?i:null,props:l}}return Cl.Fragment=t,Cl.jsx=n,Cl.jsxs=n,Cl}var h_;function u4(){return h_||(h_=1,Kp.exports=c4()),Kp.exports}var b=u4(),Wp={exports:{}},Il={},Qp={exports:{}},Xp={};var p_;function d4(){return p_||(p_=1,(function(e){function t(L,F){var G=L.length;L.push(F);e:for(;0<G;){var re=G-1>>>1,ye=L[re];if(0<i(ye,F))L[re]=F,L[G]=ye,G=re;else break e}}function n(L){return L.length===0?null:L[0]}function o(L){if(L.length===0)return null;var F=L[0],G=L.pop();if(G!==F){L[0]=G;e:for(var re=0,ye=L.length,P=ye>>>1;re<P;){var Q=2*(re+1)-1,te=L[Q],se=Q+1,me=L[se];if(0>i(te,G))se<ye&&0>i(me,te)?(L[re]=me,L[se]=G,re=se):(L[re]=te,L[Q]=G,re=Q);else if(se<ye&&0>i(me,G))L[re]=me,L[se]=G,re=se;else break e}}return F}function i(L,F){var G=L.sortIndex-F.sortIndex;return G!==0?G:L.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],v=1,p=null,y=3,_=!1,S=!1,w=!1,T=!1,O=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function R(L){for(var F=n(h);F!==null;){if(F.callback===null)o(h);else if(F.startTime<=L)o(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function I(L){if(w=!1,R(L),!S)if(n(f)!==null)S=!0,k||(k=!0,q());else{var F=n(h);F!==null&&oe(I,F.startTime-L)}}var k=!1,D=-1,N=5,z=-1;function W(){return T?!0:!(e.unstable_now()-z<N)}function $(){if(T=!1,k){var L=e.unstable_now();z=L;var F=!0;try{e:{S=!1,w&&(w=!1,A(D),D=-1),_=!0;var G=y;try{t:{for(R(L),p=n(f);p!==null&&!(p.expirationTime>L&&W());){var re=p.callback;if(typeof re=="function"){p.callback=null,y=p.priorityLevel;var ye=re(p.expirationTime<=L);if(L=e.unstable_now(),typeof ye=="function"){p.callback=ye,R(L),F=!0;break t}p===n(f)&&o(f),R(L)}else o(f);p=n(f)}if(p!==null)F=!0;else{var P=n(h);P!==null&&oe(I,P.startTime-L),F=!1}}break e}finally{p=null,y=G,_=!1}F=void 0}}finally{F?q():k=!1}}}var q;if(typeof C=="function")q=function(){C($)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,X=j.port2;j.port1.onmessage=$,q=function(){X.postMessage(null)}}else q=function(){O($,0)};function oe(L,F){D=O(function(){L(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(L){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var G=y;y=F;try{return L()}finally{y=G}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(L,F){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var G=y;y=L;try{return F()}finally{y=G}},e.unstable_scheduleCallback=function(L,F,G){var re=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?re+G:re):G=re,L){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=G+ye,L={id:v++,callback:F,priorityLevel:L,startTime:G,expirationTime:ye,sortIndex:-1},G>re?(L.sortIndex=G,t(h,L),n(f)===null&&L===n(h)&&(w?(A(D),D=-1):w=!0,oe(I,G-re))):(L.sortIndex=ye,t(f,L),S||_||(S=!0,k||(k=!0,q()))),L},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(L){var F=y;return function(){var G=y;y=F;try{return L.apply(this,arguments)}finally{y=G}}}})(Xp)),Xp}var m_;function f4(){return m_||(m_=1,Qp.exports=d4()),Qp.exports}var Jp={exports:{}},Fe={};var v_;function h4(){if(v_)return Fe;v_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function _(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,T={};function O(P,Q,te){this.props=P,this.context=Q,this.refs=T,this.updater=te||S}O.prototype.isReactComponent={},O.prototype.setState=function(P,Q){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,Q,"setState")},O.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=O.prototype;function C(P,Q,te){this.props=P,this.context=Q,this.refs=T,this.updater=te||S}var R=C.prototype=new A;R.constructor=C,w(R,O.prototype),R.isPureReactComponent=!0;var I=Array.isArray;function k(){}var D={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function z(P,Q,te){var se=te.ref;return{$$typeof:e,type:P,key:Q,ref:se!==void 0?se:null,props:te}}function W(P,Q){return z(P.type,Q,P.props)}function $(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function q(P){var Q={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(te){return Q[te]})}var j=/\/+/g;function X(P,Q){return typeof P=="object"&&P!==null&&P.key!=null?q(""+P.key):Q.toString(36)}function oe(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(k,k):(P.status="pending",P.then(function(Q){P.status==="pending"&&(P.status="fulfilled",P.value=Q)},function(Q){P.status==="pending"&&(P.status="rejected",P.reason=Q)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function L(P,Q,te,se,me){var _e=typeof P;(_e==="undefined"||_e==="boolean")&&(P=null);var be=!1;if(P===null)be=!0;else switch(_e){case"bigint":case"string":case"number":be=!0;break;case"object":switch(P.$$typeof){case e:case t:be=!0;break;case v:return be=P._init,L(be(P._payload),Q,te,se,me)}}if(be)return me=me(P),be=se===""?"."+X(P,0):se,I(me)?(te="",be!=null&&(te=be.replace(j,"$&/")+"/"),L(me,Q,te,"",function(Le){return Le})):me!=null&&($(me)&&(me=W(me,te+(me.key==null||P&&P.key===me.key?"":(""+me.key).replace(j,"$&/")+"/")+be)),Q.push(me)),1;be=0;var Se=se===""?".":se+":";if(I(P))for(var De=0;De<P.length;De++)se=P[De],_e=Se+X(se,De),be+=L(se,Q,te,_e,me);else if(De=_(P),typeof De=="function")for(P=De.call(P),De=0;!(se=P.next()).done;)se=se.value,_e=Se+X(se,De++),be+=L(se,Q,te,_e,me);else if(_e==="object"){if(typeof P.then=="function")return L(oe(P),Q,te,se,me);throw Q=String(P),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return be}function F(P,Q,te){if(P==null)return P;var se=[],me=0;return L(P,se,"","",function(_e){return Q.call(te,_e,me++)}),se}function G(P){if(P._status===-1){var Q=P._result;Q=Q(),Q.then(function(te){(P._status===0||P._status===-1)&&(P._status=1,P._result=te)},function(te){(P._status===0||P._status===-1)&&(P._status=2,P._result=te)}),P._status===-1&&(P._status=0,P._result=Q)}if(P._status===1)return P._result.default;throw P._result}var re=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},ye={map:F,forEach:function(P,Q,te){F(P,function(){Q.apply(this,arguments)},te)},count:function(P){var Q=0;return F(P,function(){Q++}),Q},toArray:function(P){return F(P,function(Q){return Q})||[]},only:function(P){if(!$(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Fe.Activity=p,Fe.Children=ye,Fe.Component=O,Fe.Fragment=n,Fe.Profiler=i,Fe.PureComponent=C,Fe.StrictMode=o,Fe.Suspense=f,Fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Fe.__COMPILER_RUNTIME={__proto__:null,c:function(P){return D.H.useMemoCache(P)}},Fe.cache=function(P){return function(){return P.apply(null,arguments)}},Fe.cacheSignal=function(){return null},Fe.cloneElement=function(P,Q,te){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var se=w({},P.props),me=P.key;if(Q!=null)for(_e in Q.key!==void 0&&(me=""+Q.key),Q)!N.call(Q,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&Q.ref===void 0||(se[_e]=Q[_e]);var _e=arguments.length-2;if(_e===1)se.children=te;else if(1<_e){for(var be=Array(_e),Se=0;Se<_e;Se++)be[Se]=arguments[Se+2];se.children=be}return z(P.type,me,se)},Fe.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:l,_context:P},P},Fe.createElement=function(P,Q,te){var se,me={},_e=null;if(Q!=null)for(se in Q.key!==void 0&&(_e=""+Q.key),Q)N.call(Q,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(me[se]=Q[se]);var be=arguments.length-2;if(be===1)me.children=te;else if(1<be){for(var Se=Array(be),De=0;De<be;De++)Se[De]=arguments[De+2];me.children=Se}if(P&&P.defaultProps)for(se in be=P.defaultProps,be)me[se]===void 0&&(me[se]=be[se]);return z(P,_e,me)},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(P){return{$$typeof:d,render:P}},Fe.isValidElement=$,Fe.lazy=function(P){return{$$typeof:v,_payload:{_status:-1,_result:P},_init:G}},Fe.memo=function(P,Q){return{$$typeof:h,type:P,compare:Q===void 0?null:Q}},Fe.startTransition=function(P){var Q=D.T,te={};D.T=te;try{var se=P(),me=D.S;me!==null&&me(te,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(k,re)}catch(_e){re(_e)}finally{Q!==null&&te.types!==null&&(Q.types=te.types),D.T=Q}},Fe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Fe.use=function(P){return D.H.use(P)},Fe.useActionState=function(P,Q,te){return D.H.useActionState(P,Q,te)},Fe.useCallback=function(P,Q){return D.H.useCallback(P,Q)},Fe.useContext=function(P){return D.H.useContext(P)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(P,Q){return D.H.useDeferredValue(P,Q)},Fe.useEffect=function(P,Q){return D.H.useEffect(P,Q)},Fe.useEffectEvent=function(P){return D.H.useEffectEvent(P)},Fe.useId=function(){return D.H.useId()},Fe.useImperativeHandle=function(P,Q,te){return D.H.useImperativeHandle(P,Q,te)},Fe.useInsertionEffect=function(P,Q){return D.H.useInsertionEffect(P,Q)},Fe.useLayoutEffect=function(P,Q){return D.H.useLayoutEffect(P,Q)},Fe.useMemo=function(P,Q){return D.H.useMemo(P,Q)},Fe.useOptimistic=function(P,Q){return D.H.useOptimistic(P,Q)},Fe.useReducer=function(P,Q,te){return D.H.useReducer(P,Q,te)},Fe.useRef=function(P){return D.H.useRef(P)},Fe.useState=function(P){return D.H.useState(P)},Fe.useSyncExternalStore=function(P,Q,te){return D.H.useSyncExternalStore(P,Q,te)},Fe.useTransition=function(){return D.H.useTransition()},Fe.version="19.2.3",Fe}var g_;function ka(){return g_||(g_=1,Jp.exports=h4()),Jp.exports}var em={exports:{}},Dn={};var y_;function p4(){if(y_)return Dn;y_=1;var e=ka();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var o={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function l(f,h,v){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:f,containerInfo:h,implementation:v}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Dn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Dn.createPortal=function(f,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,v)},Dn.flushSync=function(f){var h=c.T,v=o.p;try{if(c.T=null,o.p=2,f)return f()}finally{c.T=h,o.p=v,o.d.f()}},Dn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(f,h))},Dn.prefetchDNS=function(f){typeof f=="string"&&o.d.D(f)},Dn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var v=h.as,p=d(v,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?o.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:_}):v==="script"&&o.d.X(f,{crossOrigin:p,integrity:y,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Dn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=d(h.as,h.crossOrigin);o.d.M(f,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(f)},Dn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,p=d(v,h.crossOrigin);o.d.L(f,v,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Dn.preloadModule=function(f,h){if(typeof f=="string")if(h){var v=d(h.as,h.crossOrigin);o.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(f)},Dn.requestFormReset=function(f){o.d.r(f)},Dn.unstable_batchedUpdates=function(f,h){return f(h)},Dn.useFormState=function(f,h,v){return c.H.useFormState(f,h,v)},Dn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Dn.version="19.2.3",Dn}var b_;function vw(){if(b_)return em.exports;b_=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),em.exports=p4(),em.exports}var __;function m4(){if(__)return Il;__=1;var e=f4(),t=ka(),n=vw();function o(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var a=r,s=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(s=a.return),r=a.return;while(r)}return a.tag===3?s:null}function c(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(o(188))}function h(r){var a=r.alternate;if(!a){if(a=l(r),a===null)throw Error(o(188));return a!==r?null:r}for(var s=r,u=a;;){var m=s.return;if(m===null)break;var g=m.alternate;if(g===null){if(u=m.return,u!==null){s=u;continue}break}if(m.child===g.child){for(g=m.child;g;){if(g===s)return f(m),r;if(g===u)return f(m),a;g=g.sibling}throw Error(o(188))}if(s.return!==u.return)s=m,u=g;else{for(var x=!1,M=m.child;M;){if(M===s){x=!0,s=m,u=g;break}if(M===u){x=!0,u=m,s=g;break}M=M.sibling}if(!x){for(M=g.child;M;){if(M===s){x=!0,s=g,u=m;break}if(M===u){x=!0,u=g,s=m;break}M=M.sibling}if(!x)throw Error(o(189))}}if(s.alternate!==u)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?r:a}function v(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=v(r),a!==null)return a;r=r.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),C=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function q(r){return r===null||typeof r!="object"?null:(r=$&&r[$]||r["@@iterator"],typeof r=="function"?r:null)}var j=Symbol.for("react.client.reference");function X(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===j?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case O:return"Profiler";case T:return"StrictMode";case I:return"Suspense";case k:return"SuspenseList";case z:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case C:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case R:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case D:return a=r.displayName||null,a!==null?a:X(r.type)||"Memo";case N:a=r._payload,r=r._init;try{return X(r(a))}catch{}}return null}var oe=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},re=[],ye=-1;function P(r){return{current:r}}function Q(r){0>ye||(r.current=re[ye],re[ye]=null,ye--)}function te(r,a){ye++,re[ye]=r.current,r.current=a}var se=P(null),me=P(null),_e=P(null),be=P(null);function Se(r,a){switch(te(_e,a),te(me,r),te(se,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?Lb(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=Lb(a),r=Pb(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Q(se),te(se,r)}function De(){Q(se),Q(me),Q(_e)}function Le(r){r.memoizedState!==null&&te(be,r);var a=se.current,s=Pb(a,r.type);a!==s&&(te(me,r),te(se,s))}function Ee(r){me.current===r&&(Q(se),Q(me)),be.current===r&&(Q(be),Rl._currentValue=G)}var ze,Nt;function ge(r){if(ze===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);ze=a&&a[1]||"",Nt=-1<s.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+ze+r+Nt}var ve=!1;function Re(r,a){if(!r||ve)return"";ve=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ae){var ne=ae}Reflect.construct(r,[],de)}else{try{de.call()}catch(ae){ne=ae}r.call(de.prototype)}}else{try{throw Error()}catch(ae){ne=ae}(de=r())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ae){if(ae&&ne&&typeof ae.stack=="string")return[ae.stack,ne.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=u.DetermineComponentFrameRoot(),x=g[0],M=g[1];if(x&&M){var B=x.split(`
|
|
@@ -6,10 +6,10 @@ function i4(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&
|
|
|
6
6
|
`);for(m=u=0;u<B.length&&!B[u].includes("DetermineComponentFrameRoot");)u++;for(;m<ee.length&&!ee[m].includes("DetermineComponentFrameRoot");)m++;if(u===B.length||m===ee.length)for(u=B.length-1,m=ee.length-1;1<=u&&0<=m&&B[u]!==ee[m];)m--;for(;1<=u&&0<=m;u--,m--)if(B[u]!==ee[m]){if(u!==1||m!==1)do if(u--,m--,0>m||B[u]!==ee[m]){var le=`
|
|
7
7
|
`+B[u].replace(" at new "," at ");return r.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",r.displayName)),le}while(1<=u&&0<=m);break}}}finally{ve=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?ge(s):""}function ke(r,a){switch(r.tag){case 26:case 27:case 5:return ge(r.type);case 16:return ge("Lazy");case 13:return r.child!==a&&a!==null?ge("Suspense Fallback"):ge("Suspense");case 19:return ge("SuspenseList");case 0:case 15:return Re(r.type,!1);case 11:return Re(r.type.render,!1);case 1:return Re(r.type,!0);case 31:return ge("Activity");default:return""}}function et(r){try{var a="",s=null;do a+=ke(r,s),s=r,r=r.return;while(r);return a}catch(u){return`
|
|
8
8
|
Error generating stack: `+u.message+`
|
|
9
|
-
`+u.stack}}var Ue=Object.prototype.hasOwnProperty,Qe=e.unstable_scheduleCallback,U=e.unstable_cancelCallback,Z=e.unstable_shouldYield,Y=e.unstable_requestPaint,ue=e.unstable_now,pe=e.unstable_getCurrentPriorityLevel,he=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,Be=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,ft=e.unstable_IdlePriority,Mn=e.log,Tt=e.unstable_setDisableYieldValue,Zt=null,At=null;function an(r){if(typeof Mn=="function"&&Tt(r),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(Zt,r)}catch{}}var Yt=Math.clz32?Math.clz32:Ie,qo=Math.log,_o=Math.LN2;function Ie(r){return r>>>=0,r===0?32:31-(qo(r)/_o|0)|0}var tt=256,it=262144,Ye=4194304;function st(r){var a=r&42;if(a!==0)return a;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Me(r,a,s){var u=r.pendingLanes;if(u===0)return 0;var m=0,g=r.suspendedLanes,x=r.pingedLanes;r=r.warmLanes;var M=u&134217727;return M!==0?(u=M&~g,u!==0?m=st(u):(x&=M,x!==0?m=st(x):s||(s=M&~r,s!==0&&(m=st(s))))):(M=u&~g,M!==0?m=st(M):x!==0?m=st(x):s||(s=u&~r,s!==0&&(m=st(s)))),m===0?0:a!==0&&a!==m&&(a&g)===0&&(g=m&-m,s=a&-a,g>=s||g===32&&(s&4194048)!==0)?a:m}function Ke(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function xt(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bt(){var r=Ye;return Ye<<=1,(Ye&62914560)===0&&(Ye=4194304),r}function Nn(r){for(var a=[],s=0;31>s;s++)a.push(r);return a}function lt(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Ct(r,a,s,u,m,g){var x=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var M=r.entanglements,B=r.expirationTimes,ee=r.hiddenUpdates;for(s=x&~s;0<s;){var le=31-Yt(s),de=1<<le;M[le]=0,B[le]=-1;var ne=ee[le];if(ne!==null)for(ee[le]=null,le=0;le<ne.length;le++){var ae=ne[le];ae!==null&&(ae.lane&=-536870913)}s&=~de}u!==0&&br(r,u,0),g!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=g&~(x&~a))}function br(r,a,s){r.pendingLanes|=a,r.suspendedLanes&=~a;var u=31-Yt(a);r.entangledLanes|=a,r.entanglements[u]=r.entanglements[u]|1073741824|s&261930}function _n(r,a){var s=r.entangledLanes|=a;for(r=r.entanglements;s;){var u=31-Yt(s),m=1<<u;m&a|r[u]&a&&(r[u]|=a),s&=~m}}function Bn(r,a){var s=a&-a;return s=(s&42)!==0?1:Ri(s),(s&(r.suspendedLanes|a))!==0?0:s}function Ri(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function zr(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Uf(){var r=F.p;return r!==0?r:(r=window.event,r===void 0?32:o_(r.type))}function _0(r,a){var s=F.p;try{return F.p=r,a()}finally{F.p=s}}var Zo=Math.random().toString(36).slice(2),En="__reactFiber$"+Zo,Fn="__reactProps$"+Zo,Oi="__reactContainer$"+Zo,Bf="__reactEvents$"+Zo,KT="__reactListeners$"+Zo,WT="__reactHandles$"+Zo,E0="__reactResources$"+Zo,Bs="__reactMarker$"+Zo;function Ff(r){delete r[En],delete r[Fn],delete r[Bf],delete r[KT],delete r[WT]}function Ti(r){var a=r[En];if(a)return a;for(var s=r.parentNode;s;){if(a=s[Oi]||s[En]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(r=$b(r);r!==null;){if(s=r[En])return s;r=$b(r)}return a}r=s,s=r.parentNode}return null}function Ai(r){if(r=r[En]||r[Oi]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function Fs(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(o(33))}function Ci(r){var a=r[E0];return a||(a=r[E0]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function fn(r){r[Bs]=!0}var S0=new Set,w0={};function Fa(r,a){Ii(r,a),Ii(r+"Capture",a)}function Ii(r,a){for(w0[r]=a,r=0;r<a.length;r++)S0.add(a[r])}var QT=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),x0={},R0={};function XT(r){return Ue.call(R0,r)?!0:Ue.call(x0,r)?!1:QT.test(r)?R0[r]=!0:(x0[r]=!0,!1)}function Ic(r,a,s){if(XT(a))if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+s)}}function Mc(r,a,s){if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+s)}}function Eo(r,a,s,u){if(u===null)r.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(a,s,""+u)}}function _r(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function O0(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function JT(r,a,s){var u=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,g=u.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return m.call(this)},set:function(x){s=""+x,g.call(this,x)}}),Object.defineProperty(r,a,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(x){s=""+x},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function $f(r){if(!r._valueTracker){var a=O0(r)?"checked":"value";r._valueTracker=JT(r,a,""+r[a])}}function T0(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var s=a.getValue(),u="";return r&&(u=O0(r)?r.checked?"true":"false":r.value),r=u,r!==s?(a.setValue(r),!0):!1}function Nc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var eA=/[\n"\\]/g;function Er(r){return r.replace(eA,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Vf(r,a,s,u,m,g,x,M){r.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?r.type=x:r.removeAttribute("type"),a!=null?x==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+_r(a)):r.value!==""+_r(a)&&(r.value=""+_r(a)):x!=="submit"&&x!=="reset"||r.removeAttribute("value"),a!=null?Hf(r,x,_r(a)):s!=null?Hf(r,x,_r(s)):u!=null&&r.removeAttribute("value"),m==null&&g!=null&&(r.defaultChecked=!!g),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?r.name=""+_r(M):r.removeAttribute("name")}function A0(r,a,s,u,m,g,x,M){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(r.type=g),a!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){$f(r);return}s=s!=null?""+_r(s):"",a=a!=null?""+_r(a):s,M||a===r.value||(r.value=a),r.defaultValue=a}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=M?r.checked:!!u,r.defaultChecked=!!u,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(r.name=x),$f(r)}function Hf(r,a,s){a==="number"&&Nc(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function Mi(r,a,s,u){if(r=r.options,a){a={};for(var m=0;m<s.length;m++)a["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=a.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&u&&(r[s].defaultSelected=!0)}else{for(s=""+_r(s),a=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,u&&(r[m].defaultSelected=!0);return}a!==null||r[m].disabled||(a=r[m])}a!==null&&(a.selected=!0)}}function C0(r,a,s){if(a!=null&&(a=""+_r(a),a!==r.value&&(r.value=a),s==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=s!=null?""+_r(s):""}function I0(r,a,s,u){if(a==null){if(u!=null){if(s!=null)throw Error(o(92));if(oe(u)){if(1<u.length)throw Error(o(93));u=u[0]}s=u}s==null&&(s=""),a=s}s=_r(a),r.defaultValue=s,u=r.textContent,u===s&&u!==""&&u!==null&&(r.value=u),$f(r)}function Ni(r,a){if(a){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=a;return}}r.textContent=a}var tA=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function M0(r,a,s){var u=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":u?r.setProperty(a,s):typeof s!="number"||s===0||tA.has(a)?a==="float"?r.cssFloat=s:r[a]=(""+s).trim():r[a]=s+"px"}function N0(r,a,s){if(a!=null&&typeof a!="object")throw Error(o(62));if(r=r.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?r.setProperty(u,""):u==="float"?r.cssFloat="":r[u]="");for(var m in a)u=a[m],a.hasOwnProperty(m)&&s[m]!==u&&M0(r,m,u)}else for(var g in a)a.hasOwnProperty(g)&&M0(r,g,a[g])}function Gf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 nA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),rA=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Dc(r){return rA.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function So(){}var qf=null;function Zf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Di=null,Li=null;function D0(r){var a=Ai(r);if(a&&(r=a.stateNode)){var s=r[Fn]||null;e:switch(r=a.stateNode,a.type){case"input":if(Vf(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Er(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var u=s[a];if(u!==r&&u.form===r.form){var m=u[Fn]||null;if(!m)throw Error(o(90));Vf(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(a=0;a<s.length;a++)u=s[a],u.form===r.form&&T0(u)}break e;case"textarea":C0(r,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Mi(r,!!s.multiple,a,!1)}}}var Yf=!1;function L0(r,a,s){if(Yf)return r(a,s);Yf=!0;try{var u=r(a);return u}finally{if(Yf=!1,(Di!==null||Li!==null)&&(_u(),Di&&(a=Di,r=Li,Li=Di=null,D0(a),r)))for(a=0;a<r.length;a++)D0(r[a])}}function $s(r,a){var s=r.stateNode;if(s===null)return null;var u=s[Fn]||null;if(u===null)return null;s=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(o(231,a,typeof s));return s}var wo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kf=!1;if(wo)try{var Vs={};Object.defineProperty(Vs,"passive",{get:function(){Kf=!0}}),window.addEventListener("test",Vs,Vs),window.removeEventListener("test",Vs,Vs)}catch{Kf=!1}var Yo=null,Wf=null,Lc=null;function P0(){if(Lc)return Lc;var r,a=Wf,s=a.length,u,m="value"in Yo?Yo.value:Yo.textContent,g=m.length;for(r=0;r<s&&a[r]===m[r];r++);var x=s-r;for(u=1;u<=x&&a[s-u]===m[g-u];u++);return Lc=m.slice(r,1<u?1-u:void 0)}function Pc(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function kc(){return!0}function k0(){return!1}function $n(r){function a(s,u,m,g,x){this._reactName=s,this._targetInst=m,this.type=u,this.nativeEvent=g,this.target=x,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(s=r[M],this[M]=s?s(g):g[M]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?kc:k0,this.isPropagationStopped=k0,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=kc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=kc)},persist:function(){},isPersistent:kc}),a}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jc=$n($a),Hs=p({},$a,{view:0,detail:0}),oA=$n(Hs),Qf,Xf,Gs,zc=p({},Hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eh,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Gs&&(Gs&&r.type==="mousemove"?(Qf=r.screenX-Gs.screenX,Xf=r.screenY-Gs.screenY):Xf=Qf=0,Gs=r),Qf)},movementY:function(r){return"movementY"in r?r.movementY:Xf}}),j0=$n(zc),aA=p({},zc,{dataTransfer:0}),iA=$n(aA),sA=p({},Hs,{relatedTarget:0}),Jf=$n(sA),lA=p({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),cA=$n(lA),uA=p({},$a,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),dA=$n(uA),fA=p({},$a,{data:0}),z0=$n(fA),hA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pA={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vA(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=mA[r])?!!a[r]:!1}function eh(){return vA}var gA=p({},Hs,{key:function(r){if(r.key){var a=hA[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=Pc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?pA[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eh,charCode:function(r){return r.type==="keypress"?Pc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Pc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),yA=$n(gA),bA=p({},zc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),U0=$n(bA),_A=p({},Hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eh}),EA=$n(_A),SA=p({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),wA=$n(SA),xA=p({},zc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),RA=$n(xA),OA=p({},$a,{newState:0,oldState:0}),TA=$n(OA),AA=[9,13,27,32],th=wo&&"CompositionEvent"in window,qs=null;wo&&"documentMode"in document&&(qs=document.documentMode);var CA=wo&&"TextEvent"in window&&!qs,B0=wo&&(!th||qs&&8<qs&&11>=qs),F0=" ",$0=!1;function V0(r,a){switch(r){case"keyup":return AA.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function H0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Pi=!1;function IA(r,a){switch(r){case"compositionend":return H0(a);case"keypress":return a.which!==32?null:($0=!0,F0);case"textInput":return r=a.data,r===F0&&$0?null:r;default:return null}}function MA(r,a){if(Pi)return r==="compositionend"||!th&&V0(r,a)?(r=P0(),Lc=Wf=Yo=null,Pi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return B0&&a.locale!=="ko"?null:a.data;default:return null}}var NA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function G0(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!NA[r.type]:a==="textarea"}function q0(r,a,s,u){Di?Li?Li.push(u):Li=[u]:Di=u,a=Tu(a,"onChange"),0<a.length&&(s=new jc("onChange","change",null,s,u),r.push({event:s,listeners:a}))}var Zs=null,Ys=null;function DA(r){Ab(r,0)}function Uc(r){var a=Fs(r);if(T0(a))return r}function Z0(r,a){if(r==="change")return a}var Y0=!1;if(wo){var nh;if(wo){var rh="oninput"in document;if(!rh){var K0=document.createElement("div");K0.setAttribute("oninput","return;"),rh=typeof K0.oninput=="function"}nh=rh}else nh=!1;Y0=nh&&(!document.documentMode||9<document.documentMode)}function W0(){Zs&&(Zs.detachEvent("onpropertychange",Q0),Ys=Zs=null)}function Q0(r){if(r.propertyName==="value"&&Uc(Ys)){var a=[];q0(a,Ys,r,Zf(r)),L0(DA,a)}}function LA(r,a,s){r==="focusin"?(W0(),Zs=a,Ys=s,Zs.attachEvent("onpropertychange",Q0)):r==="focusout"&&W0()}function PA(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Uc(Ys)}function kA(r,a){if(r==="click")return Uc(a)}function jA(r,a){if(r==="input"||r==="change")return Uc(a)}function zA(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var tr=typeof Object.is=="function"?Object.is:zA;function Ks(r,a){if(tr(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var s=Object.keys(r),u=Object.keys(a);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var m=s[u];if(!Ue.call(a,m)||!tr(r[m],a[m]))return!1}return!0}function X0(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function J0(r,a){var s=X0(r);r=0;for(var u;s;){if(s.nodeType===3){if(u=r+s.textContent.length,r<=a&&u>=a)return{node:s,offset:a-r};r=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=X0(s)}}function ey(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?ey(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function ty(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Nc(r.document);a instanceof r.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)r=a.contentWindow;else break;a=Nc(r.document)}return a}function oh(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var UA=wo&&"documentMode"in document&&11>=document.documentMode,ki=null,ah=null,Ws=null,ih=!1;function ny(r,a,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ih||ki==null||ki!==Nc(u)||(u=ki,"selectionStart"in u&&oh(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ws&&Ks(Ws,u)||(Ws=u,u=Tu(ah,"onSelect"),0<u.length&&(a=new jc("onSelect","select",null,a,s),r.push({event:a,listeners:u}),a.target=ki)))}function Va(r,a){var s={};return s[r.toLowerCase()]=a.toLowerCase(),s["Webkit"+r]="webkit"+a,s["Moz"+r]="moz"+a,s}var ji={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},sh={},ry={};wo&&(ry=document.createElement("div").style,"AnimationEvent"in window||(delete ji.animationend.animation,delete ji.animationiteration.animation,delete ji.animationstart.animation),"TransitionEvent"in window||delete ji.transitionend.transition);function Ha(r){if(sh[r])return sh[r];if(!ji[r])return r;var a=ji[r],s;for(s in a)if(a.hasOwnProperty(s)&&s in ry)return sh[r]=a[s];return r}var oy=Ha("animationend"),ay=Ha("animationiteration"),iy=Ha("animationstart"),BA=Ha("transitionrun"),FA=Ha("transitionstart"),$A=Ha("transitioncancel"),sy=Ha("transitionend"),ly=new Map,lh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");lh.push("scrollEnd");function Ur(r,a){ly.set(r,a),Fa(a,[r])}var Bc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Sr=[],zi=0,ch=0;function Fc(){for(var r=zi,a=ch=zi=0;a<r;){var s=Sr[a];Sr[a++]=null;var u=Sr[a];Sr[a++]=null;var m=Sr[a];Sr[a++]=null;var g=Sr[a];if(Sr[a++]=null,u!==null&&m!==null){var x=u.pending;x===null?m.next=m:(m.next=x.next,x.next=m),u.pending=m}g!==0&&cy(s,m,g)}}function $c(r,a,s,u){Sr[zi++]=r,Sr[zi++]=a,Sr[zi++]=s,Sr[zi++]=u,ch|=u,r.lanes|=u,r=r.alternate,r!==null&&(r.lanes|=u)}function uh(r,a,s,u){return $c(r,a,s,u),Vc(r)}function Ga(r,a){return $c(r,null,null,a),Vc(r)}function cy(r,a,s){r.lanes|=s;var u=r.alternate;u!==null&&(u.lanes|=s);for(var m=!1,g=r.return;g!==null;)g.childLanes|=s,u=g.alternate,u!==null&&(u.childLanes|=s),g.tag===22&&(r=g.stateNode,r===null||r._visibility&1||(m=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,m&&a!==null&&(m=31-Yt(s),r=g.hiddenUpdates,u=r[m],u===null?r[m]=[a]:u.push(a),a.lane=s|536870912),g):null}function Vc(r){if(50<yl)throw yl=0,bp=null,Error(o(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var Ui={};function VA(r,a,s,u){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nr(r,a,s,u){return new VA(r,a,s,u)}function dh(r){return r=r.prototype,!(!r||!r.isReactComponent)}function xo(r,a){var s=r.alternate;return s===null?(s=nr(r.tag,a,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=a,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,a=r.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function uy(r,a){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,a=s.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function Hc(r,a,s,u,m,g){var x=0;if(u=r,typeof r=="function")dh(r)&&(x=1);else if(typeof r=="string")x=YC(r,s,se.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case z:return r=nr(31,s,a,m),r.elementType=z,r.lanes=g,r;case w:return qa(s.children,m,g,a);case T:x=8,m|=24;break;case O:return r=nr(12,s,a,m|2),r.elementType=O,r.lanes=g,r;case I:return r=nr(13,s,a,m),r.elementType=I,r.lanes=g,r;case k:return r=nr(19,s,a,m),r.elementType=k,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case C:x=10;break e;case A:x=9;break e;case R:x=11;break e;case D:x=14;break e;case N:x=16,u=null;break e}x=29,s=Error(o(130,r===null?"null":typeof r,"")),u=null}return a=nr(x,s,a,m),a.elementType=r,a.type=u,a.lanes=g,a}function qa(r,a,s,u){return r=nr(7,r,u,a),r.lanes=s,r}function fh(r,a,s){return r=nr(6,r,null,a),r.lanes=s,r}function dy(r){var a=nr(18,null,null,0);return a.stateNode=r,a}function hh(r,a,s){return a=nr(4,r.children!==null?r.children:[],r.key,a),a.lanes=s,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var fy=new WeakMap;function wr(r,a){if(typeof r=="object"&&r!==null){var s=fy.get(r);return s!==void 0?s:(a={value:r,source:a,stack:et(a)},fy.set(r,a),a)}return{value:r,source:a,stack:et(a)}}var Bi=[],Fi=0,Gc=null,Qs=0,xr=[],Rr=0,Ko=null,eo=1,to="";function Ro(r,a){Bi[Fi++]=Qs,Bi[Fi++]=Gc,Gc=r,Qs=a}function hy(r,a,s){xr[Rr++]=eo,xr[Rr++]=to,xr[Rr++]=Ko,Ko=r;var u=eo;r=to;var m=32-Yt(u)-1;u&=~(1<<m),s+=1;var g=32-Yt(a)+m;if(30<g){var x=m-m%5;g=(u&(1<<x)-1).toString(32),u>>=x,m-=x,eo=1<<32-Yt(a)+m|s<<m|u,to=g+r}else eo=1<<g|s<<m|u,to=r}function ph(r){r.return!==null&&(Ro(r,1),hy(r,1,0))}function mh(r){for(;r===Gc;)Gc=Bi[--Fi],Bi[Fi]=null,Qs=Bi[--Fi],Bi[Fi]=null;for(;r===Ko;)Ko=xr[--Rr],xr[Rr]=null,to=xr[--Rr],xr[Rr]=null,eo=xr[--Rr],xr[Rr]=null}function py(r,a){xr[Rr++]=eo,xr[Rr++]=to,xr[Rr++]=Ko,eo=a.id,to=a.overflow,Ko=r}var Sn=null,It=null,ot=!1,Wo=null,Or=!1,vh=Error(o(519));function Qo(r){var a=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xs(wr(a,r)),vh}function my(r){var a=r.stateNode,s=r.type,u=r.memoizedProps;switch(a[En]=r,a[Fn]=u,s){case"dialog":Je("cancel",a),Je("close",a);break;case"iframe":case"object":case"embed":Je("load",a);break;case"video":case"audio":for(s=0;s<_l.length;s++)Je(_l[s],a);break;case"source":Je("error",a);break;case"img":case"image":case"link":Je("error",a),Je("load",a);break;case"details":Je("toggle",a);break;case"input":Je("invalid",a),A0(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Je("invalid",a);break;case"textarea":Je("invalid",a),I0(a,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||u.suppressHydrationWarning===!0||Nb(a.textContent,s)?(u.popover!=null&&(Je("beforetoggle",a),Je("toggle",a)),u.onScroll!=null&&Je("scroll",a),u.onScrollEnd!=null&&Je("scrollend",a),u.onClick!=null&&(a.onclick=So),a=!0):a=!1,a||Qo(r,!0)}function vy(r){for(Sn=r.return;Sn;)switch(Sn.tag){case 5:case 31:case 13:Or=!1;return;case 27:case 3:Or=!0;return;default:Sn=Sn.return}}function $i(r){if(r!==Sn)return!1;if(!ot)return vy(r),ot=!0,!1;var a=r.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||Lp(r.type,r.memoizedProps)),s=!s),s&&It&&Qo(r),vy(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));It=Fb(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));It=Fb(r)}else a===27?(a=It,da(r.type)?(r=Up,Up=null,It=r):It=a):It=Sn?Ar(r.stateNode.nextSibling):null;return!0}function Za(){It=Sn=null,ot=!1}function gh(){var r=Wo;return r!==null&&(qn===null?qn=r:qn.push.apply(qn,r),Wo=null),r}function Xs(r){Wo===null?Wo=[r]:Wo.push(r)}var yh=P(null),Ya=null,Oo=null;function Xo(r,a,s){te(yh,a._currentValue),a._currentValue=s}function To(r){r._currentValue=yh.current,Q(yh)}function bh(r,a,s){for(;r!==null;){var u=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),r===s)break;r=r.return}}function _h(r,a,s,u){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var g=m.dependencies;if(g!==null){var x=m.child;g=g.firstContext;e:for(;g!==null;){var M=g;g=m;for(var B=0;B<a.length;B++)if(M.context===a[B]){g.lanes|=s,M=g.alternate,M!==null&&(M.lanes|=s),bh(g.return,s,r),u||(x=null);break e}g=M.next}}else if(m.tag===18){if(x=m.return,x===null)throw Error(o(341));x.lanes|=s,g=x.alternate,g!==null&&(g.lanes|=s),bh(x,s,r),x=null}else x=m.child;if(x!==null)x.return=m;else for(x=m;x!==null;){if(x===r){x=null;break}if(m=x.sibling,m!==null){m.return=x.return,x=m;break}x=x.return}m=x}}function Vi(r,a,s,u){r=null;for(var m=a,g=!1;m!==null;){if(!g){if((m.flags&524288)!==0)g=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var x=m.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var M=m.type;tr(m.pendingProps.value,x.value)||(r!==null?r.push(M):r=[M])}}else if(m===be.current){if(x=m.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Rl):r=[Rl])}m=m.return}r!==null&&_h(a,r,s,u),a.flags|=262144}function qc(r){for(r=r.firstContext;r!==null;){if(!tr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Ka(r){Ya=r,Oo=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function wn(r){return gy(Ya,r)}function Zc(r,a){return Ya===null&&Ka(r),gy(r,a)}function gy(r,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},Oo===null){if(r===null)throw Error(o(308));Oo=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Oo=Oo.next=a;return s}var HA=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(s,u){r.push(u)}};this.abort=function(){a.aborted=!0,r.forEach(function(s){return s()})}},GA=e.unstable_scheduleCallback,qA=e.unstable_NormalPriority,Kt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eh(){return{controller:new HA,data:new Map,refCount:0}}function Js(r){r.refCount--,r.refCount===0&&GA(qA,function(){r.controller.abort()})}var el=null,Sh=0,Hi=0,Gi=null;function ZA(r,a){if(el===null){var s=el=[];Sh=0,Hi=Rp(),Gi={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Sh++,a.then(yy,yy),a}function yy(){if(--Sh===0&&el!==null){Gi!==null&&(Gi.status="fulfilled");var r=el;el=null,Hi=0,Gi=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function YA(r,a){var s=[],u={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){u.status="fulfilled",u.value=a;for(var m=0;m<s.length;m++)(0,s[m])(a)},function(m){for(u.status="rejected",u.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),u}var by=L.S;L.S=function(r,a){nb=ue(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&ZA(r,a),by!==null&&by(r,a)};var Wa=P(null);function wh(){var r=Wa.current;return r!==null?r:Rt.pooledCache}function Yc(r,a){a===null?te(Wa,Wa.current):te(Wa,a.pool)}function _y(){var r=wh();return r===null?null:{parent:Kt._currentValue,pool:r}}var qi=Error(o(460)),xh=Error(o(474)),Kc=Error(o(542)),Wc={then:function(){}};function Ey(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Sy(r,a,s){switch(s=r[s],s===void 0?r.push(a):s!==a&&(a.then(So,So),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,xy(r),r;default:if(typeof a.status=="string")a.then(So,So);else{if(r=Rt,r!==null&&100<r.shellSuspendCounter)throw Error(o(482));r=a,r.status="pending",r.then(function(u){if(a.status==="pending"){var m=a;m.status="fulfilled",m.value=u}},function(u){if(a.status==="pending"){var m=a;m.status="rejected",m.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,xy(r),r}throw Xa=a,qi}}function Qa(r){try{var a=r._init;return a(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Xa=s,qi):s}}var Xa=null;function wy(){if(Xa===null)throw Error(o(459));var r=Xa;return Xa=null,r}function xy(r){if(r===qi||r===Kc)throw Error(o(483))}var Zi=null,tl=0;function Qc(r){var a=tl;return tl+=1,Zi===null&&(Zi=[]),Sy(Zi,r,a)}function nl(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function Xc(r,a){throw a.$$typeof===y?Error(o(525)):(r=Object.prototype.toString.call(a),Error(o(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function Ry(r){function a(K,H){if(r){var J=K.deletions;J===null?(K.deletions=[H],K.flags|=16):J.push(H)}}function s(K,H){if(!r)return null;for(;H!==null;)a(K,H),H=H.sibling;return null}function u(K){for(var H=new Map;K!==null;)K.key!==null?H.set(K.key,K):H.set(K.index,K),K=K.sibling;return H}function m(K,H){return K=xo(K,H),K.index=0,K.sibling=null,K}function g(K,H,J){return K.index=J,r?(J=K.alternate,J!==null?(J=J.index,J<H?(K.flags|=67108866,H):J):(K.flags|=67108866,H)):(K.flags|=1048576,H)}function x(K){return r&&K.alternate===null&&(K.flags|=67108866),K}function M(K,H,J,ce){return H===null||H.tag!==6?(H=fh(J,K.mode,ce),H.return=K,H):(H=m(H,J),H.return=K,H)}function B(K,H,J,ce){var Pe=J.type;return Pe===w?le(K,H,J.props.children,ce,J.key):H!==null&&(H.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===N&&Qa(Pe)===H.type)?(H=m(H,J.props),nl(H,J),H.return=K,H):(H=Hc(J.type,J.key,J.props,null,K.mode,ce),nl(H,J),H.return=K,H)}function ee(K,H,J,ce){return H===null||H.tag!==4||H.stateNode.containerInfo!==J.containerInfo||H.stateNode.implementation!==J.implementation?(H=hh(J,K.mode,ce),H.return=K,H):(H=m(H,J.children||[]),H.return=K,H)}function le(K,H,J,ce,Pe){return H===null||H.tag!==7?(H=qa(J,K.mode,ce,Pe),H.return=K,H):(H=m(H,J),H.return=K,H)}function de(K,H,J){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=fh(""+H,K.mode,J),H.return=K,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return J=Hc(H.type,H.key,H.props,null,K.mode,J),nl(J,H),J.return=K,J;case S:return H=hh(H,K.mode,J),H.return=K,H;case N:return H=Qa(H),de(K,H,J)}if(oe(H)||q(H))return H=qa(H,K.mode,J,null),H.return=K,H;if(typeof H.then=="function")return de(K,Qc(H),J);if(H.$$typeof===C)return de(K,Zc(K,H),J);Xc(K,H)}return null}function ne(K,H,J,ce){var Pe=H!==null?H.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Pe!==null?null:M(K,H,""+J,ce);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case _:return J.key===Pe?B(K,H,J,ce):null;case S:return J.key===Pe?ee(K,H,J,ce):null;case N:return J=Qa(J),ne(K,H,J,ce)}if(oe(J)||q(J))return Pe!==null?null:le(K,H,J,ce,null);if(typeof J.then=="function")return ne(K,H,Qc(J),ce);if(J.$$typeof===C)return ne(K,H,Zc(K,J),ce);Xc(K,J)}return null}function ae(K,H,J,ce,Pe){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return K=K.get(J)||null,M(H,K,""+ce,Pe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:return K=K.get(ce.key===null?J:ce.key)||null,B(H,K,ce,Pe);case S:return K=K.get(ce.key===null?J:ce.key)||null,ee(H,K,ce,Pe);case N:return ce=Qa(ce),ae(K,H,J,ce,Pe)}if(oe(ce)||q(ce))return K=K.get(J)||null,le(H,K,ce,Pe,null);if(typeof ce.then=="function")return ae(K,H,J,Qc(ce),Pe);if(ce.$$typeof===C)return ae(K,H,J,Zc(H,ce),Pe);Xc(H,ce)}return null}function Te(K,H,J,ce){for(var Pe=null,ct=null,Ne=H,He=H=0,rt=null;Ne!==null&&He<J.length;He++){Ne.index>He?(rt=Ne,Ne=null):rt=Ne.sibling;var ut=ne(K,Ne,J[He],ce);if(ut===null){Ne===null&&(Ne=rt);break}r&&Ne&&ut.alternate===null&&a(K,Ne),H=g(ut,H,He),ct===null?Pe=ut:ct.sibling=ut,ct=ut,Ne=rt}if(He===J.length)return s(K,Ne),ot&&Ro(K,He),Pe;if(Ne===null){for(;He<J.length;He++)Ne=de(K,J[He],ce),Ne!==null&&(H=g(Ne,H,He),ct===null?Pe=Ne:ct.sibling=Ne,ct=Ne);return ot&&Ro(K,He),Pe}for(Ne=u(Ne);He<J.length;He++)rt=ae(Ne,K,He,J[He],ce),rt!==null&&(r&&rt.alternate!==null&&Ne.delete(rt.key===null?He:rt.key),H=g(rt,H,He),ct===null?Pe=rt:ct.sibling=rt,ct=rt);return r&&Ne.forEach(function(va){return a(K,va)}),ot&&Ro(K,He),Pe}function je(K,H,J,ce){if(J==null)throw Error(o(151));for(var Pe=null,ct=null,Ne=H,He=H=0,rt=null,ut=J.next();Ne!==null&&!ut.done;He++,ut=J.next()){Ne.index>He?(rt=Ne,Ne=null):rt=Ne.sibling;var va=ne(K,Ne,ut.value,ce);if(va===null){Ne===null&&(Ne=rt);break}r&&Ne&&va.alternate===null&&a(K,Ne),H=g(va,H,He),ct===null?Pe=va:ct.sibling=va,ct=va,Ne=rt}if(ut.done)return s(K,Ne),ot&&Ro(K,He),Pe;if(Ne===null){for(;!ut.done;He++,ut=J.next())ut=de(K,ut.value,ce),ut!==null&&(H=g(ut,H,He),ct===null?Pe=ut:ct.sibling=ut,ct=ut);return ot&&Ro(K,He),Pe}for(Ne=u(Ne);!ut.done;He++,ut=J.next())ut=ae(Ne,K,He,ut.value,ce),ut!==null&&(r&&ut.alternate!==null&&Ne.delete(ut.key===null?He:ut.key),H=g(ut,H,He),ct===null?Pe=ut:ct.sibling=ut,ct=ut);return r&&Ne.forEach(function(a4){return a(K,a4)}),ot&&Ro(K,He),Pe}function St(K,H,J,ce){if(typeof J=="object"&&J!==null&&J.type===w&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case _:e:{for(var Pe=J.key;H!==null;){if(H.key===Pe){if(Pe=J.type,Pe===w){if(H.tag===7){s(K,H.sibling),ce=m(H,J.props.children),ce.return=K,K=ce;break e}}else if(H.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===N&&Qa(Pe)===H.type){s(K,H.sibling),ce=m(H,J.props),nl(ce,J),ce.return=K,K=ce;break e}s(K,H);break}else a(K,H);H=H.sibling}J.type===w?(ce=qa(J.props.children,K.mode,ce,J.key),ce.return=K,K=ce):(ce=Hc(J.type,J.key,J.props,null,K.mode,ce),nl(ce,J),ce.return=K,K=ce)}return x(K);case S:e:{for(Pe=J.key;H!==null;){if(H.key===Pe)if(H.tag===4&&H.stateNode.containerInfo===J.containerInfo&&H.stateNode.implementation===J.implementation){s(K,H.sibling),ce=m(H,J.children||[]),ce.return=K,K=ce;break e}else{s(K,H);break}else a(K,H);H=H.sibling}ce=hh(J,K.mode,ce),ce.return=K,K=ce}return x(K);case N:return J=Qa(J),St(K,H,J,ce)}if(oe(J))return Te(K,H,J,ce);if(q(J)){if(Pe=q(J),typeof Pe!="function")throw Error(o(150));return J=Pe.call(J),je(K,H,J,ce)}if(typeof J.then=="function")return St(K,H,Qc(J),ce);if(J.$$typeof===C)return St(K,H,Zc(K,J),ce);Xc(K,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,H!==null&&H.tag===6?(s(K,H.sibling),ce=m(H,J),ce.return=K,K=ce):(s(K,H),ce=fh(J,K.mode,ce),ce.return=K,K=ce),x(K)):s(K,H)}return function(K,H,J,ce){try{tl=0;var Pe=St(K,H,J,ce);return Zi=null,Pe}catch(Ne){if(Ne===qi||Ne===Kc)throw Ne;var ct=nr(29,Ne,null,K.mode);return ct.lanes=ce,ct.return=K,ct}}}var Ja=Ry(!0),Oy=Ry(!1),Jo=!1;function Rh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oh(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ea(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ta(r,a,s){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(dt&2)!==0){var m=u.pending;return m===null?a.next=a:(a.next=m.next,m.next=a),u.pending=a,a=Vc(r),cy(r,null,s),a}return $c(r,u,a,s),Vc(r)}function rl(r,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var u=a.lanes;u&=r.pendingLanes,s|=u,a.lanes=s,_n(r,s)}}function Th(r,a){var s=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var m=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?m=g=x:g=g.next=x,s=s.next}while(s!==null);g===null?m=g=a:g=g.next=a}else m=g=a;s={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:g,shared:u.shared,callbacks:u.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=a:r.next=a,s.lastBaseUpdate=a}var Ah=!1;function ol(){if(Ah){var r=Gi;if(r!==null)throw r}}function al(r,a,s,u){Ah=!1;var m=r.updateQueue;Jo=!1;var g=m.firstBaseUpdate,x=m.lastBaseUpdate,M=m.shared.pending;if(M!==null){m.shared.pending=null;var B=M,ee=B.next;B.next=null,x===null?g=ee:x.next=ee,x=B;var le=r.alternate;le!==null&&(le=le.updateQueue,M=le.lastBaseUpdate,M!==x&&(M===null?le.firstBaseUpdate=ee:M.next=ee,le.lastBaseUpdate=B))}if(g!==null){var de=m.baseState;x=0,le=ee=B=null,M=g;do{var ne=M.lane&-536870913,ae=ne!==M.lane;if(ae?(nt&ne)===ne:(u&ne)===ne){ne!==0&&ne===Hi&&(Ah=!0),le!==null&&(le=le.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var Te=r,je=M;ne=a;var St=s;switch(je.tag){case 1:if(Te=je.payload,typeof Te=="function"){de=Te.call(St,de,ne);break e}de=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=je.payload,ne=typeof Te=="function"?Te.call(St,de,ne):Te,ne==null)break e;de=p({},de,ne);break e;case 2:Jo=!0}}ne=M.callback,ne!==null&&(r.flags|=64,ae&&(r.flags|=8192),ae=m.callbacks,ae===null?m.callbacks=[ne]:ae.push(ne))}else ae={lane:ne,tag:M.tag,payload:M.payload,callback:M.callback,next:null},le===null?(ee=le=ae,B=de):le=le.next=ae,x|=ne;if(M=M.next,M===null){if(M=m.shared.pending,M===null)break;ae=M,M=ae.next,ae.next=null,m.lastBaseUpdate=ae,m.shared.pending=null}}while(!0);le===null&&(B=de),m.baseState=B,m.firstBaseUpdate=ee,m.lastBaseUpdate=le,g===null&&(m.shared.lanes=0),ia|=x,r.lanes=x,r.memoizedState=de}}function Ty(r,a){if(typeof r!="function")throw Error(o(191,r));r.call(a)}function Ay(r,a){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Ty(s[r],a)}var Yi=P(null),Jc=P(0);function Cy(r,a){r=ko,te(Jc,r),te(Yi,a),ko=r|a.baseLanes}function Ch(){te(Jc,ko),te(Yi,Yi.current)}function Ih(){ko=Jc.current,Q(Yi),Q(Jc)}var rr=P(null),Tr=null;function na(r){var a=r.alternate;te($t,$t.current&1),te(rr,r),Tr===null&&(a===null||Yi.current!==null||a.memoizedState!==null)&&(Tr=r)}function Mh(r){te($t,$t.current),te(rr,r),Tr===null&&(Tr=r)}function Iy(r){r.tag===22?(te($t,$t.current),te(rr,r),Tr===null&&(Tr=r)):ra()}function ra(){te($t,$t.current),te(rr,rr.current)}function or(r){Q(rr),Tr===r&&(Tr=null),Q($t)}var $t=P(0);function eu(r){for(var a=r;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||jp(s)||zp(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Ao=0,$e=null,_t=null,Wt=null,tu=!1,Ki=!1,ei=!1,nu=0,il=0,Wi=null,KA=0;function Bt(){throw Error(o(321))}function Nh(r,a){if(a===null)return!1;for(var s=0;s<a.length&&s<r.length;s++)if(!tr(r[s],a[s]))return!1;return!0}function Dh(r,a,s,u,m,g){return Ao=g,$e=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,L.H=r===null||r.memoizedState===null?h1:Yh,ei=!1,g=s(u,m),ei=!1,Ki&&(g=Ny(a,s,u,m)),My(r),g}function My(r){L.H=cl;var a=_t!==null&&_t.next!==null;if(Ao=0,Wt=_t=$e=null,tu=!1,il=0,Wi=null,a)throw Error(o(300));r===null||Qt||(r=r.dependencies,r!==null&&qc(r)&&(Qt=!0))}function Ny(r,a,s,u){$e=r;var m=0;do{if(Ki&&(Wi=null),il=0,Ki=!1,25<=m)throw Error(o(301));if(m+=1,Wt=_t=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}L.H=p1,g=a(s,u)}while(Ki);return g}function WA(){var r=L.H,a=r.useState()[0];return a=typeof a.then=="function"?sl(a):a,r=r.useState()[0],(_t!==null?_t.memoizedState:null)!==r&&($e.flags|=1024),a}function Lh(){var r=nu!==0;return nu=0,r}function Ph(r,a,s){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~s}function kh(r){if(tu){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}tu=!1}Ao=0,Wt=_t=$e=null,Ki=!1,il=nu=0,Wi=null}function kn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?$e.memoizedState=Wt=r:Wt=Wt.next=r,Wt}function Vt(){if(_t===null){var r=$e.alternate;r=r!==null?r.memoizedState:null}else r=_t.next;var a=Wt===null?$e.memoizedState:Wt.next;if(a!==null)Wt=a,_t=r;else{if(r===null)throw $e.alternate===null?Error(o(467)):Error(o(310));_t=r,r={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},Wt===null?$e.memoizedState=Wt=r:Wt=Wt.next=r}return Wt}function ru(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sl(r){var a=il;return il+=1,Wi===null&&(Wi=[]),r=Sy(Wi,r,a),a=$e,(Wt===null?a.memoizedState:Wt.next)===null&&(a=a.alternate,L.H=a===null||a.memoizedState===null?h1:Yh),r}function ou(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return sl(r);if(r.$$typeof===C)return wn(r)}throw Error(o(438,String(r)))}function jh(r){var a=null,s=$e.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var u=$e.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(m){return m.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=ru(),$e.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(r),u=0;u<r;u++)s[u]=W;return a.index++,s}function Co(r,a){return typeof a=="function"?a(r):a}function au(r){var a=Vt();return zh(a,_t,r)}function zh(r,a,s){var u=r.queue;if(u===null)throw Error(o(311));u.lastRenderedReducer=s;var m=r.baseQueue,g=u.pending;if(g!==null){if(m!==null){var x=m.next;m.next=g.next,g.next=x}a.baseQueue=m=g,u.pending=null}if(g=r.baseState,m===null)r.memoizedState=g;else{a=m.next;var M=x=null,B=null,ee=a,le=!1;do{var de=ee.lane&-536870913;if(de!==ee.lane?(nt&de)===de:(Ao&de)===de){var ne=ee.revertLane;if(ne===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),de===Hi&&(le=!0);else if((Ao&ne)===ne){ee=ee.next,ne===Hi&&(le=!0);continue}else de={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},B===null?(M=B=de,x=g):B=B.next=de,$e.lanes|=ne,ia|=ne;de=ee.action,ei&&s(g,de),g=ee.hasEagerState?ee.eagerState:s(g,de)}else ne={lane:de,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},B===null?(M=B=ne,x=g):B=B.next=ne,$e.lanes|=de,ia|=de;ee=ee.next}while(ee!==null&&ee!==a);if(B===null?x=g:B.next=M,!tr(g,r.memoizedState)&&(Qt=!0,le&&(s=Gi,s!==null)))throw s;r.memoizedState=g,r.baseState=x,r.baseQueue=B,u.lastRenderedState=g}return m===null&&(u.lanes=0),[r.memoizedState,u.dispatch]}function Uh(r){var a=Vt(),s=a.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=r;var u=s.dispatch,m=s.pending,g=a.memoizedState;if(m!==null){s.pending=null;var x=m=m.next;do g=r(g,x.action),x=x.next;while(x!==m);tr(g,a.memoizedState)||(Qt=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),s.lastRenderedState=g}return[g,u]}function Dy(r,a,s){var u=$e,m=Vt(),g=ot;if(g){if(s===void 0)throw Error(o(407));s=s()}else s=a();var x=!tr((_t||m).memoizedState,s);if(x&&(m.memoizedState=s,Qt=!0),m=m.queue,$h(ky.bind(null,u,m,r),[r]),m.getSnapshot!==a||x||Wt!==null&&Wt.memoizedState.tag&1){if(u.flags|=2048,Qi(9,{destroy:void 0},Py.bind(null,u,m,s,a),null),Rt===null)throw Error(o(349));g||(Ao&127)!==0||Ly(u,a,s)}return s}function Ly(r,a,s){r.flags|=16384,r={getSnapshot:a,value:s},a=$e.updateQueue,a===null?(a=ru(),$e.updateQueue=a,a.stores=[r]):(s=a.stores,s===null?a.stores=[r]:s.push(r))}function Py(r,a,s,u){a.value=s,a.getSnapshot=u,jy(a)&&zy(r)}function ky(r,a,s){return s(function(){jy(a)&&zy(r)})}function jy(r){var a=r.getSnapshot;r=r.value;try{var s=a();return!tr(r,s)}catch{return!0}}function zy(r){var a=Ga(r,2);a!==null&&Zn(a,r,2)}function Bh(r){var a=kn();if(typeof r=="function"){var s=r;if(r=s(),ei){an(!0);try{s()}finally{an(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:r},a}function Uy(r,a,s,u){return r.baseState=s,zh(r,_t,typeof u=="function"?u:Co)}function QA(r,a,s,u,m){if(lu(r))throw Error(o(485));if(r=a.action,r!==null){var g={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){g.listeners.push(x)}};L.T!==null?s(!0):g.isTransition=!1,u(g),s=a.pending,s===null?(g.next=a.pending=g,By(a,g)):(g.next=s.next,a.pending=s.next=g)}}function By(r,a){var s=a.action,u=a.payload,m=r.state;if(a.isTransition){var g=L.T,x={};L.T=x;try{var M=s(m,u),B=L.S;B!==null&&B(x,M),Fy(r,a,M)}catch(ee){Fh(r,a,ee)}finally{g!==null&&x.types!==null&&(g.types=x.types),L.T=g}}else try{g=s(m,u),Fy(r,a,g)}catch(ee){Fh(r,a,ee)}}function Fy(r,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){$y(r,a,u)},function(u){return Fh(r,a,u)}):$y(r,a,s)}function $y(r,a,s){a.status="fulfilled",a.value=s,Vy(a),r.state=s,a=r.pending,a!==null&&(s=a.next,s===a?r.pending=null:(s=s.next,a.next=s,By(r,s)))}function Fh(r,a,s){var u=r.pending;if(r.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=s,Vy(a),a=a.next;while(a!==u)}r.action=null}function Vy(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function Hy(r,a){return a}function Gy(r,a){if(ot){var s=Rt.formState;if(s!==null){e:{var u=$e;if(ot){if(It){t:{for(var m=It,g=Or;m.nodeType!==8;){if(!g){m=null;break t}if(m=Ar(m.nextSibling),m===null){m=null;break t}}g=m.data,m=g==="F!"||g==="F"?m:null}if(m){It=Ar(m.nextSibling),u=m.data==="F!";break e}}Qo(u)}u=!1}u&&(a=s[0])}}return s=kn(),s.memoizedState=s.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hy,lastRenderedState:a},s.queue=u,s=u1.bind(null,$e,u),u.dispatch=s,u=Bh(!1),g=Zh.bind(null,$e,!1,u.queue),u=kn(),m={state:a,dispatch:null,action:r,pending:null},u.queue=m,s=QA.bind(null,$e,m,g,s),m.dispatch=s,u.memoizedState=r,[a,s,!1]}function qy(r){var a=Vt();return Zy(a,_t,r)}function Zy(r,a,s){if(a=zh(r,a,Hy)[0],r=au(Co)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=sl(a)}catch(x){throw x===qi?Kc:x}else u=a;a=Vt();var m=a.queue,g=m.dispatch;return s!==a.memoizedState&&($e.flags|=2048,Qi(9,{destroy:void 0},XA.bind(null,m,s),null)),[u,g,r]}function XA(r,a){r.action=a}function Yy(r){var a=Vt(),s=_t;if(s!==null)return Zy(a,s,r);Vt(),a=a.memoizedState,s=Vt();var u=s.queue.dispatch;return s.memoizedState=r,[a,u,!1]}function Qi(r,a,s,u){return r={tag:r,create:s,deps:u,inst:a,next:null},a=$e.updateQueue,a===null&&(a=ru(),$e.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=r.next=r:(u=s.next,s.next=r,r.next=u,a.lastEffect=r),r}function Ky(){return Vt().memoizedState}function iu(r,a,s,u){var m=kn();$e.flags|=r,m.memoizedState=Qi(1|a,{destroy:void 0},s,u===void 0?null:u)}function su(r,a,s,u){var m=Vt();u=u===void 0?null:u;var g=m.memoizedState.inst;_t!==null&&u!==null&&Nh(u,_t.memoizedState.deps)?m.memoizedState=Qi(a,g,s,u):($e.flags|=r,m.memoizedState=Qi(1|a,g,s,u))}function Wy(r,a){iu(8390656,8,r,a)}function $h(r,a){su(2048,8,r,a)}function JA(r){$e.flags|=4;var a=$e.updateQueue;if(a===null)a=ru(),$e.updateQueue=a,a.events=[r];else{var s=a.events;s===null?a.events=[r]:s.push(r)}}function Qy(r){var a=Vt().memoizedState;return JA({ref:a,nextImpl:r}),function(){if((dt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}function Xy(r,a){return su(4,2,r,a)}function Jy(r,a){return su(4,4,r,a)}function e1(r,a){if(typeof a=="function"){r=r();var s=a(r);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function t1(r,a,s){s=s!=null?s.concat([r]):null,su(4,4,e1.bind(null,a,r),s)}function Vh(){}function n1(r,a){var s=Vt();a=a===void 0?null:a;var u=s.memoizedState;return a!==null&&Nh(a,u[1])?u[0]:(s.memoizedState=[r,a],r)}function r1(r,a){var s=Vt();a=a===void 0?null:a;var u=s.memoizedState;if(a!==null&&Nh(a,u[1]))return u[0];if(u=r(),ei){an(!0);try{r()}finally{an(!1)}}return s.memoizedState=[u,a],u}function Hh(r,a,s){return s===void 0||(Ao&1073741824)!==0&&(nt&261930)===0?r.memoizedState=a:(r.memoizedState=s,r=ob(),$e.lanes|=r,ia|=r,s)}function o1(r,a,s,u){return tr(s,a)?s:Yi.current!==null?(r=Hh(r,s,u),tr(r,a)||(Qt=!0),r):(Ao&42)===0||(Ao&1073741824)!==0&&(nt&261930)===0?(Qt=!0,r.memoizedState=s):(r=ob(),$e.lanes|=r,ia|=r,a)}function a1(r,a,s,u,m){var g=F.p;F.p=g!==0&&8>g?g:8;var x=L.T,M={};L.T=M,Zh(r,!1,a,s);try{var B=m(),ee=L.S;if(ee!==null&&ee(M,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var le=YA(B,u);ll(r,a,le,sr(r))}else ll(r,a,u,sr(r))}catch(de){ll(r,a,{then:function(){},status:"rejected",reason:de},sr())}finally{F.p=g,x!==null&&M.types!==null&&(x.types=M.types),L.T=x}}function eC(){}function Gh(r,a,s,u){if(r.tag!==5)throw Error(o(476));var m=i1(r).queue;a1(r,m,a,G,s===null?eC:function(){return s1(r),s(u)})}function i1(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:G},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:s},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function s1(r){var a=i1(r);a.next===null&&(a=r.alternate.memoizedState),ll(r,a.next.queue,{},sr())}function qh(){return wn(Rl)}function l1(){return Vt().memoizedState}function c1(){return Vt().memoizedState}function tC(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var s=sr();r=ea(s);var u=ta(a,r,s);u!==null&&(Zn(u,a,s),rl(u,a,s)),a={cache:Eh()},r.payload=a;return}a=a.return}}function nC(r,a,s){var u=sr();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},lu(r)?d1(a,s):(s=uh(r,a,s,u),s!==null&&(Zn(s,r,u),f1(s,a,u)))}function u1(r,a,s){var u=sr();ll(r,a,s,u)}function ll(r,a,s,u){var m={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(lu(r))d1(a,m);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var x=a.lastRenderedState,M=g(x,s);if(m.hasEagerState=!0,m.eagerState=M,tr(M,x))return $c(r,a,m,0),Rt===null&&Fc(),!1}catch{}if(s=uh(r,a,m,u),s!==null)return Zn(s,r,u),f1(s,a,u),!0}return!1}function Zh(r,a,s,u){if(u={lane:2,revertLane:Rp(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},lu(r)){if(a)throw Error(o(479))}else a=uh(r,s,u,2),a!==null&&Zn(a,r,2)}function lu(r){var a=r.alternate;return r===$e||a!==null&&a===$e}function d1(r,a){Ki=tu=!0;var s=r.pending;s===null?a.next=a:(a.next=s.next,s.next=a),r.pending=a}function f1(r,a,s){if((s&4194048)!==0){var u=a.lanes;u&=r.pendingLanes,s|=u,a.lanes=s,_n(r,s)}}var cl={readContext:wn,use:ou,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useLayoutEffect:Bt,useInsertionEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useSyncExternalStore:Bt,useId:Bt,useHostTransitionStatus:Bt,useFormState:Bt,useActionState:Bt,useOptimistic:Bt,useMemoCache:Bt,useCacheRefresh:Bt};cl.useEffectEvent=Bt;var h1={readContext:wn,use:ou,useCallback:function(r,a){return kn().memoizedState=[r,a===void 0?null:a],r},useContext:wn,useEffect:Wy,useImperativeHandle:function(r,a,s){s=s!=null?s.concat([r]):null,iu(4194308,4,e1.bind(null,a,r),s)},useLayoutEffect:function(r,a){return iu(4194308,4,r,a)},useInsertionEffect:function(r,a){iu(4,2,r,a)},useMemo:function(r,a){var s=kn();a=a===void 0?null:a;var u=r();if(ei){an(!0);try{r()}finally{an(!1)}}return s.memoizedState=[u,a],u},useReducer:function(r,a,s){var u=kn();if(s!==void 0){var m=s(a);if(ei){an(!0);try{s(a)}finally{an(!1)}}}else m=a;return u.memoizedState=u.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},u.queue=r,r=r.dispatch=nC.bind(null,$e,r),[u.memoizedState,r]},useRef:function(r){var a=kn();return r={current:r},a.memoizedState=r},useState:function(r){r=Bh(r);var a=r.queue,s=u1.bind(null,$e,a);return a.dispatch=s,[r.memoizedState,s]},useDebugValue:Vh,useDeferredValue:function(r,a){var s=kn();return Hh(s,r,a)},useTransition:function(){var r=Bh(!1);return r=a1.bind(null,$e,r.queue,!0,!1),kn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,s){var u=$e,m=kn();if(ot){if(s===void 0)throw Error(o(407));s=s()}else{if(s=a(),Rt===null)throw Error(o(349));(nt&127)!==0||Ly(u,a,s)}m.memoizedState=s;var g={value:s,getSnapshot:a};return m.queue=g,Wy(ky.bind(null,u,g,r),[r]),u.flags|=2048,Qi(9,{destroy:void 0},Py.bind(null,u,g,s,a),null),s},useId:function(){var r=kn(),a=Rt.identifierPrefix;if(ot){var s=to,u=eo;s=(u&~(1<<32-Yt(u)-1)).toString(32)+s,a="_"+a+"R_"+s,s=nu++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=KA++,a="_"+a+"r_"+s.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:qh,useFormState:Gy,useActionState:Gy,useOptimistic:function(r){var a=kn();a.memoizedState=a.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Zh.bind(null,$e,!0,s),s.dispatch=a,[r,a]},useMemoCache:jh,useCacheRefresh:function(){return kn().memoizedState=tC.bind(null,$e)},useEffectEvent:function(r){var a=kn(),s={impl:r};return a.memoizedState=s,function(){if((dt&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},Yh={readContext:wn,use:ou,useCallback:n1,useContext:wn,useEffect:$h,useImperativeHandle:t1,useInsertionEffect:Xy,useLayoutEffect:Jy,useMemo:r1,useReducer:au,useRef:Ky,useState:function(){return au(Co)},useDebugValue:Vh,useDeferredValue:function(r,a){var s=Vt();return o1(s,_t.memoizedState,r,a)},useTransition:function(){var r=au(Co)[0],a=Vt().memoizedState;return[typeof r=="boolean"?r:sl(r),a]},useSyncExternalStore:Dy,useId:l1,useHostTransitionStatus:qh,useFormState:qy,useActionState:qy,useOptimistic:function(r,a){var s=Vt();return Uy(s,_t,r,a)},useMemoCache:jh,useCacheRefresh:c1};Yh.useEffectEvent=Qy;var p1={readContext:wn,use:ou,useCallback:n1,useContext:wn,useEffect:$h,useImperativeHandle:t1,useInsertionEffect:Xy,useLayoutEffect:Jy,useMemo:r1,useReducer:Uh,useRef:Ky,useState:function(){return Uh(Co)},useDebugValue:Vh,useDeferredValue:function(r,a){var s=Vt();return _t===null?Hh(s,r,a):o1(s,_t.memoizedState,r,a)},useTransition:function(){var r=Uh(Co)[0],a=Vt().memoizedState;return[typeof r=="boolean"?r:sl(r),a]},useSyncExternalStore:Dy,useId:l1,useHostTransitionStatus:qh,useFormState:Yy,useActionState:Yy,useOptimistic:function(r,a){var s=Vt();return _t!==null?Uy(s,_t,r,a):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:jh,useCacheRefresh:c1};p1.useEffectEvent=Qy;function Kh(r,a,s,u){a=r.memoizedState,s=s(u,a),s=s==null?a:p({},a,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var Wh={enqueueSetState:function(r,a,s){r=r._reactInternals;var u=sr(),m=ea(u);m.payload=a,s!=null&&(m.callback=s),a=ta(r,m,u),a!==null&&(Zn(a,r,u),rl(a,r,u))},enqueueReplaceState:function(r,a,s){r=r._reactInternals;var u=sr(),m=ea(u);m.tag=1,m.payload=a,s!=null&&(m.callback=s),a=ta(r,m,u),a!==null&&(Zn(a,r,u),rl(a,r,u))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var s=sr(),u=ea(s);u.tag=2,a!=null&&(u.callback=a),a=ta(r,u,s),a!==null&&(Zn(a,r,s),rl(a,r,s))}};function m1(r,a,s,u,m,g,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,g,x):a.prototype&&a.prototype.isPureReactComponent?!Ks(s,u)||!Ks(m,g):!0}function v1(r,a,s,u){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,u),a.state!==r&&Wh.enqueueReplaceState(a,a.state,null)}function ti(r,a){var s=a;if("ref"in a){s={};for(var u in a)u!=="ref"&&(s[u]=a[u])}if(r=r.defaultProps){s===a&&(s=p({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function g1(r){Bc(r)}function y1(r){console.error(r)}function b1(r){Bc(r)}function cu(r,a){try{var s=r.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function _1(r,a,s){try{var u=r.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Qh(r,a,s){return s=ea(s),s.tag=3,s.payload={element:null},s.callback=function(){cu(r,a)},s}function E1(r){return r=ea(r),r.tag=3,r}function S1(r,a,s,u){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var g=u.value;r.payload=function(){return m(g)},r.callback=function(){_1(a,s,u)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(r.callback=function(){_1(a,s,u),typeof m!="function"&&(sa===null?sa=new Set([this]):sa.add(this));var M=u.stack;this.componentDidCatch(u.value,{componentStack:M!==null?M:""})})}function rC(r,a,s,u,m){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=s.alternate,a!==null&&Vi(a,s,m,!0),s=rr.current,s!==null){switch(s.tag){case 31:case 13:return Tr===null?Eu():s.alternate===null&&Ft===0&&(Ft=3),s.flags&=-257,s.flags|=65536,s.lanes=m,u===Wc?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([u]):a.add(u),Sp(r,u,m)),!1;case 22:return s.flags|=65536,u===Wc?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([u]):s.add(u)),Sp(r,u,m)),!1}throw Error(o(435,s.tag))}return Sp(r,u,m),Eu(),!1}if(ot)return a=rr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=m,u!==vh&&(r=Error(o(422),{cause:u}),Xs(wr(r,s)))):(u!==vh&&(a=Error(o(423),{cause:u}),Xs(wr(a,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,u=wr(u,s),m=Qh(r.stateNode,u,m),Th(r,m),Ft!==4&&(Ft=2)),!1;var g=Error(o(520),{cause:u});if(g=wr(g,s),gl===null?gl=[g]:gl.push(g),Ft!==4&&(Ft=2),a===null)return!0;u=wr(u,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=Qh(s.stateNode,u,r),Th(s,r),!1;case 1:if(a=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(sa===null||!sa.has(g))))return s.flags|=65536,m&=-m,s.lanes|=m,m=E1(m),S1(m,r,s,u),Th(s,m),!1}s=s.return}while(s!==null);return!1}var Xh=Error(o(461)),Qt=!1;function xn(r,a,s,u){a.child=r===null?Oy(a,null,s,u):Ja(a,r.child,s,u)}function w1(r,a,s,u,m){s=s.render;var g=a.ref;if("ref"in u){var x={};for(var M in u)M!=="ref"&&(x[M]=u[M])}else x=u;return Ka(a),u=Dh(r,a,s,x,g,m),M=Lh(),r!==null&&!Qt?(Ph(r,a,m),Io(r,a,m)):(ot&&M&&ph(a),a.flags|=1,xn(r,a,u,m),a.child)}function x1(r,a,s,u,m){if(r===null){var g=s.type;return typeof g=="function"&&!dh(g)&&g.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=g,R1(r,a,g,u,m)):(r=Hc(s.type,null,u,a,a.mode,m),r.ref=a.ref,r.return=a,a.child=r)}if(g=r.child,!ip(r,m)){var x=g.memoizedProps;if(s=s.compare,s=s!==null?s:Ks,s(x,u)&&r.ref===a.ref)return Io(r,a,m)}return a.flags|=1,r=xo(g,u),r.ref=a.ref,r.return=a,a.child=r}function R1(r,a,s,u,m){if(r!==null){var g=r.memoizedProps;if(Ks(g,u)&&r.ref===a.ref)if(Qt=!1,a.pendingProps=u=g,ip(r,m))(r.flags&131072)!==0&&(Qt=!0);else return a.lanes=r.lanes,Io(r,a,m)}return Jh(r,a,s,u,m)}function O1(r,a,s,u){var m=u.children,g=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,r!==null){for(u=a.child=r.child,m=0;u!==null;)m=m|u.lanes|u.childLanes,u=u.sibling;u=m&~g}else u=0,a.child=null;return T1(r,a,g,s,u)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&Yc(a,g!==null?g.cachePool:null),g!==null?Cy(a,g):Ch(),Iy(a);else return u=a.lanes=536870912,T1(r,a,g!==null?g.baseLanes|s:s,s,u)}else g!==null?(Yc(a,g.cachePool),Cy(a,g),ra(),a.memoizedState=null):(r!==null&&Yc(a,null),Ch(),ra());return xn(r,a,m,s),a.child}function ul(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function T1(r,a,s,u,m){var g=wh();return g=g===null?null:{parent:Kt._currentValue,pool:g},a.memoizedState={baseLanes:s,cachePool:g},r!==null&&Yc(a,null),Ch(),Iy(a),r!==null&&Vi(r,a,u,!0),a.childLanes=m,null}function uu(r,a){return a=fu({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function A1(r,a,s){return Ja(a,r.child,null,s),r=uu(a,a.pendingProps),r.flags|=2,or(a),a.memoizedState=null,r}function oC(r,a,s){var u=a.pendingProps,m=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(ot){if(u.mode==="hidden")return r=uu(a,u),a.lanes=536870912,ul(null,r);if(Mh(a),(r=It)?(r=Bb(r,Or),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Ko!==null?{id:eo,overflow:to}:null,retryLane:536870912,hydrationErrors:null},s=dy(r),s.return=a,a.child=s,Sn=a,It=null)):r=null,r===null)throw Qo(a);return a.lanes=536870912,null}return uu(a,u)}var g=r.memoizedState;if(g!==null){var x=g.dehydrated;if(Mh(a),m)if(a.flags&256)a.flags&=-257,a=A1(r,a,s);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(o(558));else if(Qt||Vi(r,a,s,!1),m=(s&r.childLanes)!==0,Qt||m){if(u=Rt,u!==null&&(x=Bn(u,s),x!==0&&x!==g.retryLane))throw g.retryLane=x,Ga(r,x),Zn(u,r,x),Xh;Eu(),a=A1(r,a,s)}else r=g.treeContext,It=Ar(x.nextSibling),Sn=a,ot=!0,Wo=null,Or=!1,r!==null&&py(a,r),a=uu(a,u),a.flags|=4096;return a}return r=xo(r.child,{mode:u.mode,children:u.children}),r.ref=a.ref,a.child=r,r.return=a,r}function du(r,a){var s=a.ref;if(s===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(r===null||r.ref!==s)&&(a.flags|=4194816)}}function Jh(r,a,s,u,m){return Ka(a),s=Dh(r,a,s,u,void 0,m),u=Lh(),r!==null&&!Qt?(Ph(r,a,m),Io(r,a,m)):(ot&&u&&ph(a),a.flags|=1,xn(r,a,s,m),a.child)}function C1(r,a,s,u,m,g){return Ka(a),a.updateQueue=null,s=Ny(a,u,s,m),My(r),u=Lh(),r!==null&&!Qt?(Ph(r,a,g),Io(r,a,g)):(ot&&u&&ph(a),a.flags|=1,xn(r,a,s,g),a.child)}function I1(r,a,s,u,m){if(Ka(a),a.stateNode===null){var g=Ui,x=s.contextType;typeof x=="object"&&x!==null&&(g=wn(x)),g=new s(u,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Wh,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=u,g.state=a.memoizedState,g.refs={},Rh(a),x=s.contextType,g.context=typeof x=="object"&&x!==null?wn(x):Ui,g.state=a.memoizedState,x=s.getDerivedStateFromProps,typeof x=="function"&&(Kh(a,s,x,u),g.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(x=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),x!==g.state&&Wh.enqueueReplaceState(g,g.state,null),al(a,u,g,m),ol(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(r===null){g=a.stateNode;var M=a.memoizedProps,B=ti(s,M);g.props=B;var ee=g.context,le=s.contextType;x=Ui,typeof le=="object"&&le!==null&&(x=wn(le));var de=s.getDerivedStateFromProps;le=typeof de=="function"||typeof g.getSnapshotBeforeUpdate=="function",M=a.pendingProps!==M,le||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(M||ee!==x)&&v1(a,g,u,x),Jo=!1;var ne=a.memoizedState;g.state=ne,al(a,u,g,m),ol(),ee=a.memoizedState,M||ne!==ee||Jo?(typeof de=="function"&&(Kh(a,s,de,u),ee=a.memoizedState),(B=Jo||m1(a,s,B,u,ne,ee,x))?(le||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=ee),g.props=u,g.state=ee,g.context=x,u=B):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{g=a.stateNode,Oh(r,a),x=a.memoizedProps,le=ti(s,x),g.props=le,de=a.pendingProps,ne=g.context,ee=s.contextType,B=Ui,typeof ee=="object"&&ee!==null&&(B=wn(ee)),M=s.getDerivedStateFromProps,(ee=typeof M=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(x!==de||ne!==B)&&v1(a,g,u,B),Jo=!1,ne=a.memoizedState,g.state=ne,al(a,u,g,m),ol();var ae=a.memoizedState;x!==de||ne!==ae||Jo||r!==null&&r.dependencies!==null&&qc(r.dependencies)?(typeof M=="function"&&(Kh(a,s,M,u),ae=a.memoizedState),(le=Jo||m1(a,s,le,u,ne,ae,B)||r!==null&&r.dependencies!==null&&qc(r.dependencies))?(ee||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(u,ae,B),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(u,ae,B)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=ae),g.props=u,g.state=ae,g.context=B,u=le):(typeof g.componentDidUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(a.flags|=1024),u=!1)}return g=u,du(r,a),u=(a.flags&128)!==0,g||u?(g=a.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,r!==null&&u?(a.child=Ja(a,r.child,null,m),a.child=Ja(a,null,s,m)):xn(r,a,s,m),a.memoizedState=g.state,r=a.child):r=Io(r,a,m),r}function M1(r,a,s,u){return Za(),a.flags|=256,xn(r,a,s,u),a.child}var ep={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tp(r){return{baseLanes:r,cachePool:_y()}}function np(r,a,s){return r=r!==null?r.childLanes&~s:0,a&&(r|=ir),r}function N1(r,a,s){var u=a.pendingProps,m=!1,g=(a.flags&128)!==0,x;if((x=g)||(x=r!==null&&r.memoizedState===null?!1:($t.current&2)!==0),x&&(m=!0,a.flags&=-129),x=(a.flags&32)!==0,a.flags&=-33,r===null){if(ot){if(m?na(a):ra(),(r=It)?(r=Bb(r,Or),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Ko!==null?{id:eo,overflow:to}:null,retryLane:536870912,hydrationErrors:null},s=dy(r),s.return=a,a.child=s,Sn=a,It=null)):r=null,r===null)throw Qo(a);return zp(r)?a.lanes=32:a.lanes=536870912,null}var M=u.children;return u=u.fallback,m?(ra(),m=a.mode,M=fu({mode:"hidden",children:M},m),u=qa(u,m,s,null),M.return=a,u.return=a,M.sibling=u,a.child=M,u=a.child,u.memoizedState=tp(s),u.childLanes=np(r,x,s),a.memoizedState=ep,ul(null,u)):(na(a),rp(a,M))}var B=r.memoizedState;if(B!==null&&(M=B.dehydrated,M!==null)){if(g)a.flags&256?(na(a),a.flags&=-257,a=op(r,a,s)):a.memoizedState!==null?(ra(),a.child=r.child,a.flags|=128,a=null):(ra(),M=u.fallback,m=a.mode,u=fu({mode:"visible",children:u.children},m),M=qa(M,m,s,null),M.flags|=2,u.return=a,M.return=a,u.sibling=M,a.child=u,Ja(a,r.child,null,s),u=a.child,u.memoizedState=tp(s),u.childLanes=np(r,x,s),a.memoizedState=ep,a=ul(null,u));else if(na(a),zp(M)){if(x=M.nextSibling&&M.nextSibling.dataset,x)var ee=x.dgst;x=ee,u=Error(o(419)),u.stack="",u.digest=x,Xs({value:u,source:null,stack:null}),a=op(r,a,s)}else if(Qt||Vi(r,a,s,!1),x=(s&r.childLanes)!==0,Qt||x){if(x=Rt,x!==null&&(u=Bn(x,s),u!==0&&u!==B.retryLane))throw B.retryLane=u,Ga(r,u),Zn(x,r,u),Xh;jp(M)||Eu(),a=op(r,a,s)}else jp(M)?(a.flags|=192,a.child=r.child,a=null):(r=B.treeContext,It=Ar(M.nextSibling),Sn=a,ot=!0,Wo=null,Or=!1,r!==null&&py(a,r),a=rp(a,u.children),a.flags|=4096);return a}return m?(ra(),M=u.fallback,m=a.mode,B=r.child,ee=B.sibling,u=xo(B,{mode:"hidden",children:u.children}),u.subtreeFlags=B.subtreeFlags&65011712,ee!==null?M=xo(ee,M):(M=qa(M,m,s,null),M.flags|=2),M.return=a,u.return=a,u.sibling=M,a.child=u,ul(null,u),u=a.child,M=r.child.memoizedState,M===null?M=tp(s):(m=M.cachePool,m!==null?(B=Kt._currentValue,m=m.parent!==B?{parent:B,pool:B}:m):m=_y(),M={baseLanes:M.baseLanes|s,cachePool:m}),u.memoizedState=M,u.childLanes=np(r,x,s),a.memoizedState=ep,ul(r.child,u)):(na(a),s=r.child,r=s.sibling,s=xo(s,{mode:"visible",children:u.children}),s.return=a,s.sibling=null,r!==null&&(x=a.deletions,x===null?(a.deletions=[r],a.flags|=16):x.push(r)),a.child=s,a.memoizedState=null,s)}function rp(r,a){return a=fu({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function fu(r,a){return r=nr(22,r,null,a),r.lanes=0,r}function op(r,a,s){return Ja(a,r.child,null,s),r=rp(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function D1(r,a,s){r.lanes|=a;var u=r.alternate;u!==null&&(u.lanes|=a),bh(r.return,a,s)}function ap(r,a,s,u,m,g){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:m,treeForkCount:g}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=s,x.tailMode=m,x.treeForkCount=g)}function L1(r,a,s){var u=a.pendingProps,m=u.revealOrder,g=u.tail;u=u.children;var x=$t.current,M=(x&2)!==0;if(M?(x=x&1|2,a.flags|=128):x&=1,te($t,x),xn(r,a,u,s),u=ot?Qs:0,!M&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&D1(r,s,a);else if(r.tag===19)D1(r,s,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=a.child,m=null;s!==null;)r=s.alternate,r!==null&&eu(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=a.child,a.child=null):(m=s.sibling,s.sibling=null),ap(a,!1,m,s,g,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=a.child,a.child=null;m!==null;){if(r=m.alternate,r!==null&&eu(r)===null){a.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}ap(a,!0,s,null,g,u);break;case"together":ap(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function Io(r,a,s){if(r!==null&&(a.dependencies=r.dependencies),ia|=a.lanes,(s&a.childLanes)===0)if(r!==null){if(Vi(r,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(o(153));if(a.child!==null){for(r=a.child,s=xo(r,r.pendingProps),a.child=s,s.return=a;r.sibling!==null;)r=r.sibling,s=s.sibling=xo(r,r.pendingProps),s.return=a;s.sibling=null}return a.child}function ip(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&qc(r)))}function aC(r,a,s){switch(a.tag){case 3:Se(a,a.stateNode.containerInfo),Xo(a,Kt,r.memoizedState.cache),Za();break;case 27:case 5:Le(a);break;case 4:Se(a,a.stateNode.containerInfo);break;case 10:Xo(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Mh(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(na(a),a.flags|=128,null):(s&a.child.childLanes)!==0?N1(r,a,s):(na(a),r=Io(r,a,s),r!==null?r.sibling:null);na(a);break;case 19:var m=(r.flags&128)!==0;if(u=(s&a.childLanes)!==0,u||(Vi(r,a,s,!1),u=(s&a.childLanes)!==0),m){if(u)return L1(r,a,s);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),te($t,$t.current),u)break;return null;case 22:return a.lanes=0,O1(r,a,s,a.pendingProps);case 24:Xo(a,Kt,r.memoizedState.cache)}return Io(r,a,s)}function P1(r,a,s){if(r!==null)if(r.memoizedProps!==a.pendingProps)Qt=!0;else{if(!ip(r,s)&&(a.flags&128)===0)return Qt=!1,aC(r,a,s);Qt=(r.flags&131072)!==0}else Qt=!1,ot&&(a.flags&1048576)!==0&&hy(a,Qs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(r=Qa(a.elementType),a.type=r,typeof r=="function")dh(r)?(u=ti(r,u),a.tag=1,a=I1(null,a,r,u,s)):(a.tag=0,a=Jh(null,a,r,u,s));else{if(r!=null){var m=r.$$typeof;if(m===R){a.tag=11,a=w1(null,a,r,u,s);break e}else if(m===D){a.tag=14,a=x1(null,a,r,u,s);break e}}throw a=X(r)||r,Error(o(306,a,""))}}return a;case 0:return Jh(r,a,a.type,a.pendingProps,s);case 1:return u=a.type,m=ti(u,a.pendingProps),I1(r,a,u,m,s);case 3:e:{if(Se(a,a.stateNode.containerInfo),r===null)throw Error(o(387));u=a.pendingProps;var g=a.memoizedState;m=g.element,Oh(r,a),al(a,u,null,s);var x=a.memoizedState;if(u=x.cache,Xo(a,Kt,u),u!==g.cache&&_h(a,[Kt],s,!0),ol(),u=x.element,g.isDehydrated)if(g={element:u,isDehydrated:!1,cache:x.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=M1(r,a,u,s);break e}else if(u!==m){m=wr(Error(o(424)),a),Xs(m),a=M1(r,a,u,s);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,It=Ar(r.firstChild),Sn=a,ot=!0,Wo=null,Or=!0,s=Oy(a,null,u,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Za(),u===m){a=Io(r,a,s);break e}xn(r,a,u,s)}a=a.child}return a;case 26:return du(r,a),r===null?(s=qb(a.type,null,a.pendingProps,null))?a.memoizedState=s:ot||(s=a.type,r=a.pendingProps,u=Au(_e.current).createElement(s),u[En]=a,u[Fn]=r,Rn(u,s,r),fn(u),a.stateNode=u):a.memoizedState=qb(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return Le(a),r===null&&ot&&(u=a.stateNode=Vb(a.type,a.pendingProps,_e.current),Sn=a,Or=!0,m=It,da(a.type)?(Up=m,It=Ar(u.firstChild)):It=m),xn(r,a,a.pendingProps.children,s),du(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&ot&&((m=u=It)&&(u=PC(u,a.type,a.pendingProps,Or),u!==null?(a.stateNode=u,Sn=a,It=Ar(u.firstChild),Or=!1,m=!0):m=!1),m||Qo(a)),Le(a),m=a.type,g=a.pendingProps,x=r!==null?r.memoizedProps:null,u=g.children,Lp(m,g)?u=null:x!==null&&Lp(m,x)&&(a.flags|=32),a.memoizedState!==null&&(m=Dh(r,a,WA,null,null,s),Rl._currentValue=m),du(r,a),xn(r,a,u,s),a.child;case 6:return r===null&&ot&&((r=s=It)&&(s=kC(s,a.pendingProps,Or),s!==null?(a.stateNode=s,Sn=a,It=null,r=!0):r=!1),r||Qo(a)),null;case 13:return N1(r,a,s);case 4:return Se(a,a.stateNode.containerInfo),u=a.pendingProps,r===null?a.child=Ja(a,null,u,s):xn(r,a,u,s),a.child;case 11:return w1(r,a,a.type,a.pendingProps,s);case 7:return xn(r,a,a.pendingProps,s),a.child;case 8:return xn(r,a,a.pendingProps.children,s),a.child;case 12:return xn(r,a,a.pendingProps.children,s),a.child;case 10:return u=a.pendingProps,Xo(a,a.type,u.value),xn(r,a,u.children,s),a.child;case 9:return m=a.type._context,u=a.pendingProps.children,Ka(a),m=wn(m),u=u(m),a.flags|=1,xn(r,a,u,s),a.child;case 14:return x1(r,a,a.type,a.pendingProps,s);case 15:return R1(r,a,a.type,a.pendingProps,s);case 19:return L1(r,a,s);case 31:return oC(r,a,s);case 22:return O1(r,a,s,a.pendingProps);case 24:return Ka(a),u=wn(Kt),r===null?(m=wh(),m===null&&(m=Rt,g=Eh(),m.pooledCache=g,g.refCount++,g!==null&&(m.pooledCacheLanes|=s),m=g),a.memoizedState={parent:u,cache:m},Rh(a),Xo(a,Kt,m)):((r.lanes&s)!==0&&(Oh(r,a),al(a,null,null,s),ol()),m=r.memoizedState,g=a.memoizedState,m.parent!==u?(m={parent:u,cache:u},a.memoizedState=m,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=m),Xo(a,Kt,u)):(u=g.cache,Xo(a,Kt,u),u!==m.cache&&_h(a,[Kt],s,!0))),xn(r,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(o(156,a.tag))}function Mo(r){r.flags|=4}function sp(r,a,s,u,m){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(lb())r.flags|=8192;else throw Xa=Wc,xh}else r.flags&=-16777217}function k1(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Qb(a))if(lb())r.flags|=8192;else throw Xa=Wc,xh}function hu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?bt():536870912,r.lanes|=a,ts|=a)}function dl(r,a){if(!ot)switch(r.tailMode){case"hidden":a=r.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function Mt(r){var a=r.alternate!==null&&r.alternate.child===r.child,s=0,u=0;if(a)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=u,r.childLanes=s,a}function iC(r,a,s){var u=a.pendingProps;switch(mh(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(a),null;case 1:return Mt(a),null;case 3:return s=a.stateNode,u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),To(Kt),De(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&($i(a)?Mo(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,gh())),Mt(a),null;case 26:var m=a.type,g=a.memoizedState;return r===null?(Mo(a),g!==null?(Mt(a),k1(a,g)):(Mt(a),sp(a,m,null,u,s))):g?g!==r.memoizedState?(Mo(a),Mt(a),k1(a,g)):(Mt(a),a.flags&=-16777217):(r=r.memoizedProps,r!==u&&Mo(a),Mt(a),sp(a,m,r,u,s)),null;case 27:if(Ee(a),s=_e.current,m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==u&&Mo(a);else{if(!u){if(a.stateNode===null)throw Error(o(166));return Mt(a),null}r=se.current,$i(a)?my(a):(r=Vb(m,u,s),a.stateNode=r,Mo(a))}return Mt(a),null;case 5:if(Ee(a),m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==u&&Mo(a);else{if(!u){if(a.stateNode===null)throw Error(o(166));return Mt(a),null}if(g=se.current,$i(a))my(a);else{var x=Au(_e.current);switch(g){case 1:g=x.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:g=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":g=x.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":g=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":g=x.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof u.is=="string"?x.createElement("select",{is:u.is}):x.createElement("select"),u.multiple?g.multiple=!0:u.size&&(g.size=u.size);break;default:g=typeof u.is=="string"?x.createElement(m,{is:u.is}):x.createElement(m)}}g[En]=a,g[Fn]=u;e:for(x=a.child;x!==null;){if(x.tag===5||x.tag===6)g.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===a)break e;for(;x.sibling===null;){if(x.return===null||x.return===a)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}a.stateNode=g;e:switch(Rn(g,m,u),m){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Mo(a)}}return Mt(a),sp(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,s),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==u&&Mo(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(o(166));if(r=_e.current,$i(a)){if(r=a.stateNode,s=a.memoizedProps,u=null,m=Sn,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}r[En]=a,r=!!(r.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||Nb(r.nodeValue,s)),r||Qo(a,!0)}else r=Au(r).createTextNode(u),r[En]=a,a.stateNode=r}return Mt(a),null;case 31:if(s=a.memoizedState,r===null||r.memoizedState!==null){if(u=$i(a),s!==null){if(r===null){if(!u)throw Error(o(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(557));r[En]=a}else Za(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mt(a),r=!1}else s=gh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return a.flags&256?(or(a),a):(or(a),null);if((a.flags&128)!==0)throw Error(o(558))}return Mt(a),null;case 13:if(u=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=$i(a),u!==null&&u.dehydrated!==null){if(r===null){if(!m)throw Error(o(318));if(m=a.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[En]=a}else Za(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mt(a),m=!1}else m=gh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return a.flags&256?(or(a),a):(or(a),null)}return or(a),(a.flags&128)!==0?(a.lanes=s,a):(s=u!==null,r=r!==null&&r.memoizedState!==null,s&&(u=a.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048)),s!==r&&s&&(a.child.flags|=8192),hu(a,a.updateQueue),Mt(a),null);case 4:return De(),r===null&&Cp(a.stateNode.containerInfo),Mt(a),null;case 10:return To(a.type),Mt(a),null;case 19:if(Q($t),u=a.memoizedState,u===null)return Mt(a),null;if(m=(a.flags&128)!==0,g=u.rendering,g===null)if(m)dl(u,!1);else{if(Ft!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(g=eu(r),g!==null){for(a.flags|=128,dl(u,!1),r=g.updateQueue,a.updateQueue=r,hu(a,r),a.subtreeFlags=0,r=s,s=a.child;s!==null;)uy(s,r),s=s.sibling;return te($t,$t.current&1|2),ot&&Ro(a,u.treeForkCount),a.child}r=r.sibling}u.tail!==null&&ue()>yu&&(a.flags|=128,m=!0,dl(u,!1),a.lanes=4194304)}else{if(!m)if(r=eu(g),r!==null){if(a.flags|=128,m=!0,r=r.updateQueue,a.updateQueue=r,hu(a,r),dl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!g.alternate&&!ot)return Mt(a),null}else 2*ue()-u.renderingStartTime>yu&&s!==536870912&&(a.flags|=128,m=!0,dl(u,!1),a.lanes=4194304);u.isBackwards?(g.sibling=a.child,a.child=g):(r=u.last,r!==null?r.sibling=g:a.child=g,u.last=g)}return u.tail!==null?(r=u.tail,u.rendering=r,u.tail=r.sibling,u.renderingStartTime=ue(),r.sibling=null,s=$t.current,te($t,m?s&1|2:s&1),ot&&Ro(a,u.treeForkCount),r):(Mt(a),null);case 22:case 23:return or(a),Ih(),u=a.memoizedState!==null,r!==null?r.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(s&536870912)!==0&&(a.flags&128)===0&&(Mt(a),a.subtreeFlags&6&&(a.flags|=8192)):Mt(a),s=a.updateQueue,s!==null&&hu(a,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==s&&(a.flags|=2048),r!==null&&Q(Wa),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),To(Kt),Mt(a),null;case 25:return null;case 30:return null}throw Error(o(156,a.tag))}function sC(r,a){switch(mh(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return To(Kt),De(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return Ee(a),null;case 31:if(a.memoizedState!==null){if(or(a),a.alternate===null)throw Error(o(340));Za()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(or(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(o(340));Za()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return Q($t),null;case 4:return De(),null;case 10:return To(a.type),null;case 22:case 23:return or(a),Ih(),r!==null&&Q(Wa),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return To(Kt),null;case 25:return null;default:return null}}function j1(r,a){switch(mh(a),a.tag){case 3:To(Kt),De();break;case 26:case 27:case 5:Ee(a);break;case 4:De();break;case 31:a.memoizedState!==null&&or(a);break;case 13:or(a);break;case 19:Q($t);break;case 10:To(a.type);break;case 22:case 23:or(a),Ih(),r!==null&&Q(Wa);break;case 24:To(Kt)}}function fl(r,a){try{var s=a.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var m=u.next;s=m;do{if((s.tag&r)===r){u=void 0;var g=s.create,x=s.inst;u=g(),x.destroy=u}s=s.next}while(s!==m)}}catch(M){vt(a,a.return,M)}}function oa(r,a,s){try{var u=a.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var g=m.next;u=g;do{if((u.tag&r)===r){var x=u.inst,M=x.destroy;if(M!==void 0){x.destroy=void 0,m=a;var B=s,ee=M;try{ee()}catch(le){vt(m,B,le)}}}u=u.next}while(u!==g)}}catch(le){vt(a,a.return,le)}}function z1(r){var a=r.updateQueue;if(a!==null){var s=r.stateNode;try{Ay(a,s)}catch(u){vt(r,r.return,u)}}}function U1(r,a,s){s.props=ti(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(u){vt(r,a,u)}}function hl(r,a){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var u=r.stateNode;break;case 30:u=r.stateNode;break;default:u=r.stateNode}typeof s=="function"?r.refCleanup=s(u):s.current=u}}catch(m){vt(r,a,m)}}function no(r,a){var s=r.ref,u=r.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(m){vt(r,a,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){vt(r,a,m)}else s.current=null}function B1(r){var a=r.type,s=r.memoizedProps,u=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(m){vt(r,r.return,m)}}function lp(r,a,s){try{var u=r.stateNode;CC(u,r.type,s,a),u[Fn]=a}catch(m){vt(r,r.return,m)}}function F1(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&da(r.type)||r.tag===4}function cp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||F1(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&da(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function up(r,a,s){var u=r.tag;if(u===5||u===6)r=r.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(r),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=So));else if(u!==4&&(u===27&&da(r.type)&&(s=r.stateNode,a=null),r=r.child,r!==null))for(up(r,a,s),r=r.sibling;r!==null;)up(r,a,s),r=r.sibling}function pu(r,a,s){var u=r.tag;if(u===5||u===6)r=r.stateNode,a?s.insertBefore(r,a):s.appendChild(r);else if(u!==4&&(u===27&&da(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(pu(r,a,s),r=r.sibling;r!==null;)pu(r,a,s),r=r.sibling}function $1(r){var a=r.stateNode,s=r.memoizedProps;try{for(var u=r.type,m=a.attributes;m.length;)a.removeAttributeNode(m[0]);Rn(a,u,s),a[En]=r,a[Fn]=s}catch(g){vt(r,r.return,g)}}var No=!1,Xt=!1,dp=!1,V1=typeof WeakSet=="function"?WeakSet:Set,hn=null;function lC(r,a){if(r=r.containerInfo,Np=Pu,r=ty(r),oh(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var m=u.anchorOffset,g=u.focusNode;u=u.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var x=0,M=-1,B=-1,ee=0,le=0,de=r,ne=null;t:for(;;){for(var ae;de!==s||m!==0&&de.nodeType!==3||(M=x+m),de!==g||u!==0&&de.nodeType!==3||(B=x+u),de.nodeType===3&&(x+=de.nodeValue.length),(ae=de.firstChild)!==null;)ne=de,de=ae;for(;;){if(de===r)break t;if(ne===s&&++ee===m&&(M=x),ne===g&&++le===u&&(B=x),(ae=de.nextSibling)!==null)break;de=ne,ne=de.parentNode}de=ae}s=M===-1||B===-1?null:{start:M,end:B}}else s=null}s=s||{start:0,end:0}}else s=null;for(Dp={focusedElem:r,selectionRange:s},Pu=!1,hn=a;hn!==null;)if(a=hn,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,hn=r;else for(;hn!==null;){switch(a=hn,g=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)m=r[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&g!==null){r=void 0,s=a,m=g.memoizedProps,g=g.memoizedState,u=s.stateNode;try{var Te=ti(s.type,m);r=u.getSnapshotBeforeUpdate(Te,g),u.__reactInternalSnapshotBeforeUpdate=r}catch(je){vt(s,s.return,je)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,s=r.nodeType,s===9)kp(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":kp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(o(163))}if(r=a.sibling,r!==null){r.return=a.return,hn=r;break}hn=a.return}}function H1(r,a,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:Lo(r,s),u&4&&fl(5,s);break;case 1:if(Lo(r,s),u&4)if(r=s.stateNode,a===null)try{r.componentDidMount()}catch(x){vt(s,s.return,x)}else{var m=ti(s.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(m,a,r.__reactInternalSnapshotBeforeUpdate)}catch(x){vt(s,s.return,x)}}u&64&&z1(s),u&512&&hl(s,s.return);break;case 3:if(Lo(r,s),u&64&&(r=s.updateQueue,r!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{Ay(r,a)}catch(x){vt(s,s.return,x)}}break;case 27:a===null&&u&4&&$1(s);case 26:case 5:Lo(r,s),a===null&&u&4&&B1(s),u&512&&hl(s,s.return);break;case 12:Lo(r,s);break;case 31:Lo(r,s),u&4&&Z1(r,s);break;case 13:Lo(r,s),u&4&&Y1(r,s),u&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=gC.bind(null,s),jC(r,s))));break;case 22:if(u=s.memoizedState!==null||No,!u){a=a!==null&&a.memoizedState!==null||Xt,m=No;var g=Xt;No=u,(Xt=a)&&!g?Po(r,s,(s.subtreeFlags&8772)!==0):Lo(r,s),No=m,Xt=g}break;case 30:break;default:Lo(r,s)}}function G1(r){var a=r.alternate;a!==null&&(r.alternate=null,G1(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&Ff(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Dt=null,Vn=!1;function Do(r,a,s){for(s=s.child;s!==null;)q1(r,a,s),s=s.sibling}function q1(r,a,s){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Zt,s)}catch{}switch(s.tag){case 26:Xt||no(s,a),Do(r,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Xt||no(s,a);var u=Dt,m=Vn;da(s.type)&&(Dt=s.stateNode,Vn=!1),Do(r,a,s),Sl(s.stateNode),Dt=u,Vn=m;break;case 5:Xt||no(s,a);case 6:if(u=Dt,m=Vn,Dt=null,Do(r,a,s),Dt=u,Vn=m,Dt!==null)if(Vn)try{(Dt.nodeType===9?Dt.body:Dt.nodeName==="HTML"?Dt.ownerDocument.body:Dt).removeChild(s.stateNode)}catch(g){vt(s,a,g)}else try{Dt.removeChild(s.stateNode)}catch(g){vt(s,a,g)}break;case 18:Dt!==null&&(Vn?(r=Dt,zb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),cs(r)):zb(Dt,s.stateNode));break;case 4:u=Dt,m=Vn,Dt=s.stateNode.containerInfo,Vn=!0,Do(r,a,s),Dt=u,Vn=m;break;case 0:case 11:case 14:case 15:oa(2,s,a),Xt||oa(4,s,a),Do(r,a,s);break;case 1:Xt||(no(s,a),u=s.stateNode,typeof u.componentWillUnmount=="function"&&U1(s,a,u)),Do(r,a,s);break;case 21:Do(r,a,s);break;case 22:Xt=(u=Xt)||s.memoizedState!==null,Do(r,a,s),Xt=u;break;default:Do(r,a,s)}}function Z1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{cs(r)}catch(s){vt(a,a.return,s)}}}function Y1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{cs(r)}catch(s){vt(a,a.return,s)}}function cC(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new V1),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new V1),a;default:throw Error(o(435,r.tag))}}function mu(r,a){var s=cC(r);a.forEach(function(u){if(!s.has(u)){s.add(u);var m=yC.bind(null,r,u);u.then(m,m)}})}function Hn(r,a){var s=a.deletions;if(s!==null)for(var u=0;u<s.length;u++){var m=s[u],g=r,x=a,M=x;e:for(;M!==null;){switch(M.tag){case 27:if(da(M.type)){Dt=M.stateNode,Vn=!1;break e}break;case 5:Dt=M.stateNode,Vn=!1;break e;case 3:case 4:Dt=M.stateNode.containerInfo,Vn=!0;break e}M=M.return}if(Dt===null)throw Error(o(160));q1(g,x,m),Dt=null,Vn=!1,g=m.alternate,g!==null&&(g.return=null),m.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)K1(a,r),a=a.sibling}var Br=null;function K1(r,a){var s=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Hn(a,r),Gn(r),u&4&&(oa(3,r,r.return),fl(3,r),oa(5,r,r.return));break;case 1:Hn(a,r),Gn(r),u&512&&(Xt||s===null||no(s,s.return)),u&64&&No&&(r=r.updateQueue,r!==null&&(u=r.callbacks,u!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var m=Br;if(Hn(a,r),Gn(r),u&512&&(Xt||s===null||no(s,s.return)),u&4){var g=s!==null?s.memoizedState:null;if(u=r.memoizedState,s===null)if(u===null)if(r.stateNode===null){e:{u=r.type,s=r.memoizedProps,m=m.ownerDocument||m;t:switch(u){case"title":g=m.getElementsByTagName("title")[0],(!g||g[Bs]||g[En]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=m.createElement(u),m.head.insertBefore(g,m.querySelector("head > title"))),Rn(g,u,s),g[En]=r,fn(g),u=g;break e;case"link":var x=Kb("link","href",m).get(u+(s.href||""));if(x){for(var M=0;M<x.length;M++)if(g=x[M],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){x.splice(M,1);break t}}g=m.createElement(u),Rn(g,u,s),m.head.appendChild(g);break;case"meta":if(x=Kb("meta","content",m).get(u+(s.content||""))){for(M=0;M<x.length;M++)if(g=x[M],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){x.splice(M,1);break t}}g=m.createElement(u),Rn(g,u,s),m.head.appendChild(g);break;default:throw Error(o(468,u))}g[En]=r,fn(g),u=g}r.stateNode=u}else Wb(m,r.type,r.stateNode);else r.stateNode=Yb(m,u,r.memoizedProps);else g!==u?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,u===null?Wb(m,r.type,r.stateNode):Yb(m,u,r.memoizedProps)):u===null&&r.stateNode!==null&&lp(r,r.memoizedProps,s.memoizedProps)}break;case 27:Hn(a,r),Gn(r),u&512&&(Xt||s===null||no(s,s.return)),s!==null&&u&4&&lp(r,r.memoizedProps,s.memoizedProps);break;case 5:if(Hn(a,r),Gn(r),u&512&&(Xt||s===null||no(s,s.return)),r.flags&32){m=r.stateNode;try{Ni(m,"")}catch(Te){vt(r,r.return,Te)}}u&4&&r.stateNode!=null&&(m=r.memoizedProps,lp(r,m,s!==null?s.memoizedProps:m)),u&1024&&(dp=!0);break;case 6:if(Hn(a,r),Gn(r),u&4){if(r.stateNode===null)throw Error(o(162));u=r.memoizedProps,s=r.stateNode;try{s.nodeValue=u}catch(Te){vt(r,r.return,Te)}}break;case 3:if(Mu=null,m=Br,Br=Cu(a.containerInfo),Hn(a,r),Br=m,Gn(r),u&4&&s!==null&&s.memoizedState.isDehydrated)try{cs(a.containerInfo)}catch(Te){vt(r,r.return,Te)}dp&&(dp=!1,W1(r));break;case 4:u=Br,Br=Cu(r.stateNode.containerInfo),Hn(a,r),Gn(r),Br=u;break;case 12:Hn(a,r),Gn(r);break;case 31:Hn(a,r),Gn(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,mu(r,u)));break;case 13:Hn(a,r),Gn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(gu=ue()),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,mu(r,u)));break;case 22:m=r.memoizedState!==null;var B=s!==null&&s.memoizedState!==null,ee=No,le=Xt;if(No=ee||m,Xt=le||B,Hn(a,r),Xt=le,No=ee,Gn(r),u&8192)e:for(a=r.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,m&&(s===null||B||No||Xt||ni(r)),s=null,a=r;;){if(a.tag===5||a.tag===26){if(s===null){B=s=a;try{if(g=B.stateNode,m)x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{M=B.stateNode;var de=B.memoizedProps.style,ne=de!=null&&de.hasOwnProperty("display")?de.display:null;M.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(Te){vt(B,B.return,Te)}}}else if(a.tag===6){if(s===null){B=a;try{B.stateNode.nodeValue=m?"":B.memoizedProps}catch(Te){vt(B,B.return,Te)}}}else if(a.tag===18){if(s===null){B=a;try{var ae=B.stateNode;m?Ub(ae,!0):Ub(B.stateNode,!1)}catch(Te){vt(B,B.return,Te)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=r.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,mu(r,s))));break;case 19:Hn(a,r),Gn(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,mu(r,u)));break;case 30:break;case 21:break;default:Hn(a,r),Gn(r)}}function Gn(r){var a=r.flags;if(a&2){try{for(var s,u=r.return;u!==null;){if(F1(u)){s=u;break}u=u.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var m=s.stateNode,g=cp(r);pu(r,g,m);break;case 5:var x=s.stateNode;s.flags&32&&(Ni(x,""),s.flags&=-33);var M=cp(r);pu(r,M,x);break;case 3:case 4:var B=s.stateNode.containerInfo,ee=cp(r);up(r,ee,B);break;default:throw Error(o(161))}}catch(le){vt(r,r.return,le)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function W1(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;W1(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Lo(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)H1(r,a.alternate,a),a=a.sibling}function ni(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:oa(4,a,a.return),ni(a);break;case 1:no(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&U1(a,a.return,s),ni(a);break;case 27:Sl(a.stateNode);case 26:case 5:no(a,a.return),ni(a);break;case 22:a.memoizedState===null&&ni(a);break;case 30:ni(a);break;default:ni(a)}r=r.sibling}}function Po(r,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,m=r,g=a,x=g.flags;switch(g.tag){case 0:case 11:case 15:Po(m,g,s),fl(4,g);break;case 1:if(Po(m,g,s),u=g,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(ee){vt(u,u.return,ee)}if(u=g,m=u.updateQueue,m!==null){var M=u.stateNode;try{var B=m.shared.hiddenCallbacks;if(B!==null)for(m.shared.hiddenCallbacks=null,m=0;m<B.length;m++)Ty(B[m],M)}catch(ee){vt(u,u.return,ee)}}s&&x&64&&z1(g),hl(g,g.return);break;case 27:$1(g);case 26:case 5:Po(m,g,s),s&&u===null&&x&4&&B1(g),hl(g,g.return);break;case 12:Po(m,g,s);break;case 31:Po(m,g,s),s&&x&4&&Z1(m,g);break;case 13:Po(m,g,s),s&&x&4&&Y1(m,g);break;case 22:g.memoizedState===null&&Po(m,g,s),hl(g,g.return);break;case 30:break;default:Po(m,g,s)}a=a.sibling}}function fp(r,a){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&Js(s))}function hp(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Js(r))}function Fr(r,a,s,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Q1(r,a,s,u),a=a.sibling}function Q1(r,a,s,u){var m=a.flags;switch(a.tag){case 0:case 11:case 15:Fr(r,a,s,u),m&2048&&fl(9,a);break;case 1:Fr(r,a,s,u);break;case 3:Fr(r,a,s,u),m&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Js(r)));break;case 12:if(m&2048){Fr(r,a,s,u),r=a.stateNode;try{var g=a.memoizedProps,x=g.id,M=g.onPostCommit;typeof M=="function"&&M(x,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(B){vt(a,a.return,B)}}else Fr(r,a,s,u);break;case 31:Fr(r,a,s,u);break;case 13:Fr(r,a,s,u);break;case 23:break;case 22:g=a.stateNode,x=a.alternate,a.memoizedState!==null?g._visibility&2?Fr(r,a,s,u):pl(r,a):g._visibility&2?Fr(r,a,s,u):(g._visibility|=2,Xi(r,a,s,u,(a.subtreeFlags&10256)!==0||!1)),m&2048&&fp(x,a);break;case 24:Fr(r,a,s,u),m&2048&&hp(a.alternate,a);break;default:Fr(r,a,s,u)}}function Xi(r,a,s,u,m){for(m=m&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=r,x=a,M=s,B=u,ee=x.flags;switch(x.tag){case 0:case 11:case 15:Xi(g,x,M,B,m),fl(8,x);break;case 23:break;case 22:var le=x.stateNode;x.memoizedState!==null?le._visibility&2?Xi(g,x,M,B,m):pl(g,x):(le._visibility|=2,Xi(g,x,M,B,m)),m&&ee&2048&&fp(x.alternate,x);break;case 24:Xi(g,x,M,B,m),m&&ee&2048&&hp(x.alternate,x);break;default:Xi(g,x,M,B,m)}a=a.sibling}}function pl(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=r,u=a,m=u.flags;switch(u.tag){case 22:pl(s,u),m&2048&&fp(u.alternate,u);break;case 24:pl(s,u),m&2048&&hp(u.alternate,u);break;default:pl(s,u)}a=a.sibling}}var ml=8192;function Ji(r,a,s){if(r.subtreeFlags&ml)for(r=r.child;r!==null;)X1(r,a,s),r=r.sibling}function X1(r,a,s){switch(r.tag){case 26:Ji(r,a,s),r.flags&ml&&r.memoizedState!==null&&KC(s,Br,r.memoizedState,r.memoizedProps);break;case 5:Ji(r,a,s);break;case 3:case 4:var u=Br;Br=Cu(r.stateNode.containerInfo),Ji(r,a,s),Br=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=ml,ml=16777216,Ji(r,a,s),ml=u):Ji(r,a,s));break;default:Ji(r,a,s)}}function J1(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function vl(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];hn=u,tb(u,r)}J1(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)eb(r),r=r.sibling}function eb(r){switch(r.tag){case 0:case 11:case 15:vl(r),r.flags&2048&&oa(9,r,r.return);break;case 3:vl(r);break;case 12:vl(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,vu(r)):vl(r);break;default:vl(r)}}function vu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];hn=u,tb(u,r)}J1(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:oa(8,a,a.return),vu(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,vu(a));break;default:vu(a)}r=r.sibling}}function tb(r,a){for(;hn!==null;){var s=hn;switch(s.tag){case 0:case 11:case 15:oa(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Js(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,hn=u;else e:for(s=r;hn!==null;){u=hn;var m=u.sibling,g=u.return;if(G1(u),u===s){hn=null;break e}if(m!==null){m.return=g,hn=m;break e}hn=g}}}var uC={getCacheForType:function(r){var a=wn(Kt),s=a.data.get(r);return s===void 0&&(s=r(),a.data.set(r,s)),s},cacheSignal:function(){return wn(Kt).controller.signal}},dC=typeof WeakMap=="function"?WeakMap:Map,dt=0,Rt=null,Xe=null,nt=0,mt=0,ar=null,aa=!1,es=!1,pp=!1,ko=0,Ft=0,ia=0,ri=0,mp=0,ir=0,ts=0,gl=null,qn=null,vp=!1,gu=0,nb=0,yu=1/0,bu=null,sa=null,sn=0,la=null,ns=null,jo=0,gp=0,yp=null,rb=null,yl=0,bp=null;function sr(){return(dt&2)!==0&&nt!==0?nt&-nt:L.T!==null?Rp():Uf()}function ob(){if(ir===0)if((nt&536870912)===0||ot){var r=it;it<<=1,(it&3932160)===0&&(it=262144),ir=r}else ir=536870912;return r=rr.current,r!==null&&(r.flags|=32),ir}function Zn(r,a,s){(r===Rt&&(mt===2||mt===9)||r.cancelPendingCommit!==null)&&(rs(r,0),ca(r,nt,ir,!1)),lt(r,s),((dt&2)===0||r!==Rt)&&(r===Rt&&((dt&2)===0&&(ri|=s),Ft===4&&ca(r,nt,ir,!1)),ro(r))}function ab(r,a,s){if((dt&6)!==0)throw Error(o(327));var u=!s&&(a&127)===0&&(a&r.expiredLanes)===0||Ke(r,a),m=u?pC(r,a):Ep(r,a,!0),g=u;do{if(m===0){es&&!u&&ca(r,a,0,!1);break}else{if(s=r.current.alternate,g&&!fC(s)){m=Ep(r,a,!1),g=!1;continue}if(m===2){if(g=a,r.errorRecoveryDisabledLanes&g)var x=0;else x=r.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){a=x;e:{var M=r;m=gl;var B=M.current.memoizedState.isDehydrated;if(B&&(rs(M,x).flags|=256),x=Ep(M,x,!1),x!==2){if(pp&&!B){M.errorRecoveryDisabledLanes|=g,ri|=g,m=4;break e}g=qn,qn=m,g!==null&&(qn===null?qn=g:qn.push.apply(qn,g))}m=x}if(g=!1,m!==2)continue}}if(m===1){rs(r,0),ca(r,a,0,!0);break}e:{switch(u=r,g=m,g){case 0:case 1:throw Error(o(345));case 4:if((a&4194048)!==a)break;case 6:ca(u,a,ir,!aa);break e;case 2:qn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((a&62914560)===a&&(m=gu+300-ue(),10<m)){if(ca(u,a,ir,!aa),Me(u,0,!0)!==0)break e;jo=a,u.timeoutHandle=kb(ib.bind(null,u,s,qn,bu,vp,a,ir,ri,ts,aa,g,"Throttled",-0,0),m);break e}ib(u,s,qn,bu,vp,a,ir,ri,ts,aa,g,null,-0,0)}}break}while(!0);ro(r)}function ib(r,a,s,u,m,g,x,M,B,ee,le,de,ne,ae){if(r.timeoutHandle=-1,de=a.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:So},X1(a,g,de);var Te=(g&62914560)===g?gu-ue():(g&4194048)===g?nb-ue():0;if(Te=WC(de,Te),Te!==null){jo=g,r.cancelPendingCommit=Te(pb.bind(null,r,a,g,s,u,m,x,M,B,le,de,null,ne,ae)),ca(r,g,x,!ee);return}}pb(r,a,g,s,u,m,x,M,B)}function fC(r){for(var a=r;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var m=s[u],g=m.getSnapshot;m=m.value;try{if(!tr(g(),m))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ca(r,a,s,u){a&=~mp,a&=~ri,r.suspendedLanes|=a,r.pingedLanes&=~a,u&&(r.warmLanes|=a),u=r.expirationTimes;for(var m=a;0<m;){var g=31-Yt(m),x=1<<g;u[g]=-1,m&=~x}s!==0&&br(r,s,a)}function _u(){return(dt&6)===0?(bl(0),!1):!0}function _p(){if(Xe!==null){if(mt===0)var r=Xe.return;else r=Xe,Oo=Ya=null,kh(r),Zi=null,tl=0,r=Xe;for(;r!==null;)j1(r.alternate,r),r=r.return;Xe=null}}function rs(r,a){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,NC(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),jo=0,_p(),Rt=r,Xe=s=xo(r.current,null),nt=a,mt=0,ar=null,aa=!1,es=Ke(r,a),pp=!1,ts=ir=mp=ri=ia=Ft=0,qn=gl=null,vp=!1,(a&8)!==0&&(a|=a&32);var u=r.entangledLanes;if(u!==0)for(r=r.entanglements,u&=a;0<u;){var m=31-Yt(u),g=1<<m;a|=r[m],u&=~g}return ko=a,Fc(),s}function sb(r,a){$e=null,L.H=cl,a===qi||a===Kc?(a=wy(),mt=3):a===xh?(a=wy(),mt=4):mt=a===Xh?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ar=a,Xe===null&&(Ft=1,cu(r,wr(a,r.current)))}function lb(){var r=rr.current;return r===null?!0:(nt&4194048)===nt?Tr===null:(nt&62914560)===nt||(nt&536870912)!==0?r===Tr:!1}function cb(){var r=L.H;return L.H=cl,r===null?cl:r}function ub(){var r=L.A;return L.A=uC,r}function Eu(){Ft=4,aa||(nt&4194048)!==nt&&rr.current!==null||(es=!0),(ia&134217727)===0&&(ri&134217727)===0||Rt===null||ca(Rt,nt,ir,!1)}function Ep(r,a,s){var u=dt;dt|=2;var m=cb(),g=ub();(Rt!==r||nt!==a)&&(bu=null,rs(r,a)),a=!1;var x=Ft;e:do try{if(mt!==0&&Xe!==null){var M=Xe,B=ar;switch(mt){case 8:_p(),x=6;break e;case 3:case 2:case 9:case 6:rr.current===null&&(a=!0);var ee=mt;if(mt=0,ar=null,os(r,M,B,ee),s&&es){x=0;break e}break;default:ee=mt,mt=0,ar=null,os(r,M,B,ee)}}hC(),x=Ft;break}catch(le){sb(r,le)}while(!0);return a&&r.shellSuspendCounter++,Oo=Ya=null,dt=u,L.H=m,L.A=g,Xe===null&&(Rt=null,nt=0,Fc()),x}function hC(){for(;Xe!==null;)db(Xe)}function pC(r,a){var s=dt;dt|=2;var u=cb(),m=ub();Rt!==r||nt!==a?(bu=null,yu=ue()+500,rs(r,a)):es=Ke(r,a);e:do try{if(mt!==0&&Xe!==null){a=Xe;var g=ar;t:switch(mt){case 1:mt=0,ar=null,os(r,a,g,1);break;case 2:case 9:if(Ey(g)){mt=0,ar=null,fb(a);break}a=function(){mt!==2&&mt!==9||Rt!==r||(mt=7),ro(r)},g.then(a,a);break e;case 3:mt=7;break e;case 4:mt=5;break e;case 7:Ey(g)?(mt=0,ar=null,fb(a)):(mt=0,ar=null,os(r,a,g,7));break;case 5:var x=null;switch(Xe.tag){case 26:x=Xe.memoizedState;case 5:case 27:var M=Xe;if(x?Qb(x):M.stateNode.complete){mt=0,ar=null;var B=M.sibling;if(B!==null)Xe=B;else{var ee=M.return;ee!==null?(Xe=ee,Su(ee)):Xe=null}break t}}mt=0,ar=null,os(r,a,g,5);break;case 6:mt=0,ar=null,os(r,a,g,6);break;case 8:_p(),Ft=6;break e;default:throw Error(o(462))}}mC();break}catch(le){sb(r,le)}while(!0);return Oo=Ya=null,L.H=u,L.A=m,dt=s,Xe!==null?0:(Rt=null,nt=0,Fc(),Ft)}function mC(){for(;Xe!==null&&!Z();)db(Xe)}function db(r){var a=P1(r.alternate,r,ko);r.memoizedProps=r.pendingProps,a===null?Su(r):Xe=a}function fb(r){var a=r,s=a.alternate;switch(a.tag){case 15:case 0:a=C1(s,a,a.pendingProps,a.type,void 0,nt);break;case 11:a=C1(s,a,a.pendingProps,a.type.render,a.ref,nt);break;case 5:kh(a);default:j1(s,a),a=Xe=uy(a,ko),a=P1(s,a,ko)}r.memoizedProps=r.pendingProps,a===null?Su(r):Xe=a}function os(r,a,s,u){Oo=Ya=null,kh(a),Zi=null,tl=0;var m=a.return;try{if(rC(r,m,a,s,nt)){Ft=1,cu(r,wr(s,r.current)),Xe=null;return}}catch(g){if(m!==null)throw Xe=m,g;Ft=1,cu(r,wr(s,r.current)),Xe=null;return}a.flags&32768?(ot||u===1?r=!0:es||(nt&536870912)!==0?r=!1:(aa=r=!0,(u===2||u===9||u===3||u===6)&&(u=rr.current,u!==null&&u.tag===13&&(u.flags|=16384))),hb(a,r)):Su(a)}function Su(r){var a=r;do{if((a.flags&32768)!==0){hb(a,aa);return}r=a.return;var s=iC(a.alternate,a,ko);if(s!==null){Xe=s;return}if(a=a.sibling,a!==null){Xe=a;return}Xe=a=r}while(a!==null);Ft===0&&(Ft=5)}function hb(r,a){do{var s=sC(r.alternate,r);if(s!==null){s.flags&=32767,Xe=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(r=r.sibling,r!==null)){Xe=r;return}Xe=r=s}while(r!==null);Ft=6,Xe=null}function pb(r,a,s,u,m,g,x,M,B){r.cancelPendingCommit=null;do wu();while(sn!==0);if((dt&6)!==0)throw Error(o(327));if(a!==null){if(a===r.current)throw Error(o(177));if(g=a.lanes|a.childLanes,g|=ch,Ct(r,s,g,x,M,B),r===Rt&&(Xe=Rt=null,nt=0),ns=a,la=r,jo=s,gp=g,yp=m,rb=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,bC(Be,function(){return bb(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=L.T,L.T=null,m=F.p,F.p=2,x=dt,dt|=4;try{lC(r,a,s)}finally{dt=x,F.p=m,L.T=u}}sn=1,mb(),vb(),gb()}}function mb(){if(sn===1){sn=0;var r=la,a=ns,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=L.T,L.T=null;var u=F.p;F.p=2;var m=dt;dt|=4;try{K1(a,r);var g=Dp,x=ty(r.containerInfo),M=g.focusedElem,B=g.selectionRange;if(x!==M&&M&&M.ownerDocument&&ey(M.ownerDocument.documentElement,M)){if(B!==null&&oh(M)){var ee=B.start,le=B.end;if(le===void 0&&(le=ee),"selectionStart"in M)M.selectionStart=ee,M.selectionEnd=Math.min(le,M.value.length);else{var de=M.ownerDocument||document,ne=de&&de.defaultView||window;if(ne.getSelection){var ae=ne.getSelection(),Te=M.textContent.length,je=Math.min(B.start,Te),St=B.end===void 0?je:Math.min(B.end,Te);!ae.extend&&je>St&&(x=St,St=je,je=x);var K=J0(M,je),H=J0(M,St);if(K&&H&&(ae.rangeCount!==1||ae.anchorNode!==K.node||ae.anchorOffset!==K.offset||ae.focusNode!==H.node||ae.focusOffset!==H.offset)){var J=de.createRange();J.setStart(K.node,K.offset),ae.removeAllRanges(),je>St?(ae.addRange(J),ae.extend(H.node,H.offset)):(J.setEnd(H.node,H.offset),ae.addRange(J))}}}}for(de=[],ae=M;ae=ae.parentNode;)ae.nodeType===1&&de.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<de.length;M++){var ce=de[M];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Pu=!!Np,Dp=Np=null}finally{dt=m,F.p=u,L.T=s}}r.current=a,sn=2}}function vb(){if(sn===2){sn=0;var r=la,a=ns,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=L.T,L.T=null;var u=F.p;F.p=2;var m=dt;dt|=4;try{H1(r,a.alternate,a)}finally{dt=m,F.p=u,L.T=s}}sn=3}}function gb(){if(sn===4||sn===3){sn=0,Y();var r=la,a=ns,s=jo,u=rb;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?sn=5:(sn=0,ns=la=null,yb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(sa=null),zr(s),a=a.stateNode,At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(Zt,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=L.T,m=F.p,F.p=2,L.T=null;try{for(var g=r.onRecoverableError,x=0;x<u.length;x++){var M=u[x];g(M.value,{componentStack:M.stack})}}finally{L.T=a,F.p=m}}(jo&3)!==0&&wu(),ro(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===bp?yl++:(yl=0,bp=r):yl=0,bl(0)}}function yb(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,Js(a)))}function wu(){return mb(),vb(),gb(),bb()}function bb(){if(sn!==5)return!1;var r=la,a=gp;gp=0;var s=zr(jo),u=L.T,m=F.p;try{F.p=32>s?32:s,L.T=null,s=yp,yp=null;var g=la,x=jo;if(sn=0,ns=la=null,jo=0,(dt&6)!==0)throw Error(o(331));var M=dt;if(dt|=4,eb(g.current),Q1(g,g.current,x,s),dt=M,bl(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Zt,g)}catch{}return!0}finally{F.p=m,L.T=u,yb(r,a)}}function _b(r,a,s){a=wr(s,a),a=Qh(r.stateNode,a,2),r=ta(r,a,2),r!==null&&(lt(r,2),ro(r))}function vt(r,a,s){if(r.tag===3)_b(r,r,s);else for(;a!==null;){if(a.tag===3){_b(a,r,s);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(sa===null||!sa.has(u))){r=wr(s,r),s=E1(2),u=ta(a,s,2),u!==null&&(S1(s,u,a,r),lt(u,2),ro(u));break}}a=a.return}}function Sp(r,a,s){var u=r.pingCache;if(u===null){u=r.pingCache=new dC;var m=new Set;u.set(a,m)}else m=u.get(a),m===void 0&&(m=new Set,u.set(a,m));m.has(s)||(pp=!0,m.add(s),r=vC.bind(null,r,a,s),a.then(r,r))}function vC(r,a,s){var u=r.pingCache;u!==null&&u.delete(a),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,Rt===r&&(nt&s)===s&&(Ft===4||Ft===3&&(nt&62914560)===nt&&300>ue()-gu?(dt&2)===0&&rs(r,0):mp|=s,ts===nt&&(ts=0)),ro(r)}function Eb(r,a){a===0&&(a=bt()),r=Ga(r,a),r!==null&&(lt(r,a),ro(r))}function gC(r){var a=r.memoizedState,s=0;a!==null&&(s=a.retryLane),Eb(r,s)}function yC(r,a){var s=0;switch(r.tag){case 31:case 13:var u=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:u=r.stateNode;break;case 22:u=r.stateNode._retryCache;break;default:throw Error(o(314))}u!==null&&u.delete(a),Eb(r,s)}function bC(r,a){return Qe(r,a)}var xu=null,as=null,wp=!1,Ru=!1,xp=!1,ua=0;function ro(r){r!==as&&r.next===null&&(as===null?xu=as=r:as=as.next=r),Ru=!0,wp||(wp=!0,EC())}function bl(r,a){if(!xp&&Ru){xp=!0;do for(var s=!1,u=xu;u!==null;){if(r!==0){var m=u.pendingLanes;if(m===0)var g=0;else{var x=u.suspendedLanes,M=u.pingedLanes;g=(1<<31-Yt(42|r)+1)-1,g&=m&~(x&~M),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,Rb(u,g))}else g=nt,g=Me(u,u===Rt?g:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(g&3)===0||Ke(u,g)||(s=!0,Rb(u,g));u=u.next}while(s);xp=!1}}function _C(){Sb()}function Sb(){Ru=wp=!1;var r=0;ua!==0&&MC()&&(r=ua);for(var a=ue(),s=null,u=xu;u!==null;){var m=u.next,g=wb(u,a);g===0?(u.next=null,s===null?xu=m:s.next=m,m===null&&(as=s)):(s=u,(r!==0||(g&3)!==0)&&(Ru=!0)),u=m}sn!==0&&sn!==5||bl(r),ua!==0&&(ua=0)}function wb(r,a){for(var s=r.suspendedLanes,u=r.pingedLanes,m=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var x=31-Yt(g),M=1<<x,B=m[x];B===-1?((M&s)===0||(M&u)!==0)&&(m[x]=xt(M,a)):B<=a&&(r.expiredLanes|=M),g&=~M}if(a=Rt,s=nt,s=Me(r,r===a?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u=r.callbackNode,s===0||r===a&&(mt===2||mt===9)||r.cancelPendingCommit!==null)return u!==null&&u!==null&&U(u),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Ke(r,s)){if(a=s&-s,a===r.callbackPriority)return a;switch(u!==null&&U(u),zr(s)){case 2:case 8:s=xe;break;case 32:s=Be;break;case 268435456:s=ft;break;default:s=Be}return u=xb.bind(null,r),s=Qe(s,u),r.callbackPriority=a,r.callbackNode=s,a}return u!==null&&u!==null&&U(u),r.callbackPriority=2,r.callbackNode=null,2}function xb(r,a){if(sn!==0&&sn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(wu()&&r.callbackNode!==s)return null;var u=nt;return u=Me(r,r===Rt?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u===0?null:(ab(r,u,a),wb(r,ue()),r.callbackNode!=null&&r.callbackNode===s?xb.bind(null,r):null)}function Rb(r,a){if(wu())return null;ab(r,a,!0)}function EC(){DC(function(){(dt&6)!==0?Qe(he,_C):Sb()})}function Rp(){if(ua===0){var r=Hi;r===0&&(r=tt,tt<<=1,(tt&261888)===0&&(tt=256)),ua=r}return ua}function Ob(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Dc(""+r)}function Tb(r,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,r.id&&s.setAttribute("form",r.id),a.parentNode.insertBefore(s,a),r=new FormData(r),s.parentNode.removeChild(s),r}function SC(r,a,s,u,m){if(a==="submit"&&s&&s.stateNode===m){var g=Ob((m[Fn]||null).action),x=u.submitter;x&&(a=(a=x[Fn]||null)?Ob(a.formAction):x.getAttribute("formAction"),a!==null&&(g=a,x=null));var M=new jc("action","action",null,u,m);r.push({event:M,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ua!==0){var B=x?Tb(m,x):new FormData(m);Gh(s,{pending:!0,data:B,method:m.method,action:g},null,B)}}else typeof g=="function"&&(M.preventDefault(),B=x?Tb(m,x):new FormData(m),Gh(s,{pending:!0,data:B,method:m.method,action:g},g,B))},currentTarget:m}]})}}for(var Op=0;Op<lh.length;Op++){var Tp=lh[Op],wC=Tp.toLowerCase(),xC=Tp[0].toUpperCase()+Tp.slice(1);Ur(wC,"on"+xC)}Ur(oy,"onAnimationEnd"),Ur(ay,"onAnimationIteration"),Ur(iy,"onAnimationStart"),Ur("dblclick","onDoubleClick"),Ur("focusin","onFocus"),Ur("focusout","onBlur"),Ur(BA,"onTransitionRun"),Ur(FA,"onTransitionStart"),Ur($A,"onTransitionCancel"),Ur(sy,"onTransitionEnd"),Ii("onMouseEnter",["mouseout","mouseover"]),Ii("onMouseLeave",["mouseout","mouseover"]),Ii("onPointerEnter",["pointerout","pointerover"]),Ii("onPointerLeave",["pointerout","pointerover"]),Fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _l="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),RC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_l));function Ab(r,a){a=(a&4)!==0;for(var s=0;s<r.length;s++){var u=r[s],m=u.event;u=u.listeners;e:{var g=void 0;if(a)for(var x=u.length-1;0<=x;x--){var M=u[x],B=M.instance,ee=M.currentTarget;if(M=M.listener,B!==g&&m.isPropagationStopped())break e;g=M,m.currentTarget=ee;try{g(m)}catch(le){Bc(le)}m.currentTarget=null,g=B}else for(x=0;x<u.length;x++){if(M=u[x],B=M.instance,ee=M.currentTarget,M=M.listener,B!==g&&m.isPropagationStopped())break e;g=M,m.currentTarget=ee;try{g(m)}catch(le){Bc(le)}m.currentTarget=null,g=B}}}}function Je(r,a){var s=a[Bf];s===void 0&&(s=a[Bf]=new Set);var u=r+"__bubble";s.has(u)||(Cb(a,r,2,!1),s.add(u))}function Ap(r,a,s){var u=0;a&&(u|=4),Cb(s,r,u,a)}var Ou="_reactListening"+Math.random().toString(36).slice(2);function Cp(r){if(!r[Ou]){r[Ou]=!0,S0.forEach(function(s){s!=="selectionchange"&&(RC.has(s)||Ap(s,!1,r),Ap(s,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Ou]||(a[Ou]=!0,Ap("selectionchange",!1,a))}}function Cb(r,a,s,u){switch(o_(a)){case 2:var m=JC;break;case 8:m=e4;break;default:m=Hp}s=m.bind(null,a,s,r),m=void 0,!Kf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(m=!0),u?m!==void 0?r.addEventListener(a,s,{capture:!0,passive:m}):r.addEventListener(a,s,!0):m!==void 0?r.addEventListener(a,s,{passive:m}):r.addEventListener(a,s,!1)}function Ip(r,a,s,u,m){var g=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var x=u.tag;if(x===3||x===4){var M=u.stateNode.containerInfo;if(M===m)break;if(x===4)for(x=u.return;x!==null;){var B=x.tag;if((B===3||B===4)&&x.stateNode.containerInfo===m)return;x=x.return}for(;M!==null;){if(x=Ti(M),x===null)return;if(B=x.tag,B===5||B===6||B===26||B===27){u=g=x;continue e}M=M.parentNode}}u=u.return}L0(function(){var ee=g,le=Zf(s),de=[];e:{var ne=ly.get(r);if(ne!==void 0){var ae=jc,Te=r;switch(r){case"keypress":if(Pc(s)===0)break e;case"keydown":case"keyup":ae=yA;break;case"focusin":Te="focus",ae=Jf;break;case"focusout":Te="blur",ae=Jf;break;case"beforeblur":case"afterblur":ae=Jf;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=j0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=iA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=EA;break;case oy:case ay:case iy:ae=cA;break;case sy:ae=wA;break;case"scroll":case"scrollend":ae=oA;break;case"wheel":ae=RA;break;case"copy":case"cut":case"paste":ae=dA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=U0;break;case"toggle":case"beforetoggle":ae=TA}var je=(a&4)!==0,St=!je&&(r==="scroll"||r==="scrollend"),K=je?ne!==null?ne+"Capture":null:ne;je=[];for(var H=ee,J;H!==null;){var ce=H;if(J=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||J===null||K===null||(ce=$s(H,K),ce!=null&&je.push(El(H,ce,J))),St)break;H=H.return}0<je.length&&(ne=new ae(ne,Te,null,s,le),de.push({event:ne,listeners:je}))}}if((a&7)===0){e:{if(ne=r==="mouseover"||r==="pointerover",ae=r==="mouseout"||r==="pointerout",ne&&s!==qf&&(Te=s.relatedTarget||s.fromElement)&&(Ti(Te)||Te[Oi]))break e;if((ae||ne)&&(ne=le.window===le?le:(ne=le.ownerDocument)?ne.defaultView||ne.parentWindow:window,ae?(Te=s.relatedTarget||s.toElement,ae=ee,Te=Te?Ti(Te):null,Te!==null&&(St=l(Te),je=Te.tag,Te!==St||je!==5&&je!==27&&je!==6)&&(Te=null)):(ae=null,Te=ee),ae!==Te)){if(je=j0,ce="onMouseLeave",K="onMouseEnter",H="mouse",(r==="pointerout"||r==="pointerover")&&(je=U0,ce="onPointerLeave",K="onPointerEnter",H="pointer"),St=ae==null?ne:Fs(ae),J=Te==null?ne:Fs(Te),ne=new je(ce,H+"leave",ae,s,le),ne.target=St,ne.relatedTarget=J,ce=null,Ti(le)===ee&&(je=new je(K,H+"enter",Te,s,le),je.target=J,je.relatedTarget=St,ce=je),St=ce,ae&&Te)t:{for(je=OC,K=ae,H=Te,J=0,ce=K;ce;ce=je(ce))J++;ce=0;for(var Pe=H;Pe;Pe=je(Pe))ce++;for(;0<J-ce;)K=je(K),J--;for(;0<ce-J;)H=je(H),ce--;for(;J--;){if(K===H||H!==null&&K===H.alternate){je=K;break t}K=je(K),H=je(H)}je=null}else je=null;ae!==null&&Ib(de,ne,ae,je,!1),Te!==null&&St!==null&&Ib(de,St,Te,je,!0)}}e:{if(ne=ee?Fs(ee):window,ae=ne.nodeName&&ne.nodeName.toLowerCase(),ae==="select"||ae==="input"&&ne.type==="file")var ct=Z0;else if(G0(ne))if(Y0)ct=jA;else{ct=PA;var Ne=LA}else ae=ne.nodeName,!ae||ae.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?ee&&Gf(ee.elementType)&&(ct=Z0):ct=kA;if(ct&&(ct=ct(r,ee))){q0(de,ct,s,le);break e}Ne&&Ne(r,ne,ee),r==="focusout"&&ee&&ne.type==="number"&&ee.memoizedProps.value!=null&&Hf(ne,"number",ne.value)}switch(Ne=ee?Fs(ee):window,r){case"focusin":(G0(Ne)||Ne.contentEditable==="true")&&(ki=Ne,ah=ee,Ws=null);break;case"focusout":Ws=ah=ki=null;break;case"mousedown":ih=!0;break;case"contextmenu":case"mouseup":case"dragend":ih=!1,ny(de,s,le);break;case"selectionchange":if(UA)break;case"keydown":case"keyup":ny(de,s,le)}var He;if(th)e:{switch(r){case"compositionstart":var rt="onCompositionStart";break e;case"compositionend":rt="onCompositionEnd";break e;case"compositionupdate":rt="onCompositionUpdate";break e}rt=void 0}else Pi?V0(r,s)&&(rt="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(rt="onCompositionStart");rt&&(B0&&s.locale!=="ko"&&(Pi||rt!=="onCompositionStart"?rt==="onCompositionEnd"&&Pi&&(He=P0()):(Yo=le,Wf="value"in Yo?Yo.value:Yo.textContent,Pi=!0)),Ne=Tu(ee,rt),0<Ne.length&&(rt=new z0(rt,r,null,s,le),de.push({event:rt,listeners:Ne}),He?rt.data=He:(He=H0(s),He!==null&&(rt.data=He)))),(He=CA?IA(r,s):MA(r,s))&&(rt=Tu(ee,"onBeforeInput"),0<rt.length&&(Ne=new z0("onBeforeInput","beforeinput",null,s,le),de.push({event:Ne,listeners:rt}),Ne.data=He)),SC(de,r,ee,s,le)}Ab(de,a)})}function El(r,a,s){return{instance:r,listener:a,currentTarget:s}}function Tu(r,a){for(var s=a+"Capture",u=[];r!==null;){var m=r,g=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||g===null||(m=$s(r,s),m!=null&&u.unshift(El(r,m,g)),m=$s(r,a),m!=null&&u.push(El(r,m,g))),r.tag===3)return u;r=r.return}return[]}function OC(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Ib(r,a,s,u,m){for(var g=a._reactName,x=[];s!==null&&s!==u;){var M=s,B=M.alternate,ee=M.stateNode;if(M=M.tag,B!==null&&B===u)break;M!==5&&M!==26&&M!==27||ee===null||(B=ee,m?(ee=$s(s,g),ee!=null&&x.unshift(El(s,ee,B))):m||(ee=$s(s,g),ee!=null&&x.push(El(s,ee,B)))),s=s.return}x.length!==0&&r.push({event:a,listeners:x})}var TC=/\r\n?/g,AC=/\u0000|\uFFFD/g;function Mb(r){return(typeof r=="string"?r:""+r).replace(TC,`
|
|
10
|
-
`).replace(AC,"")}function Nb(r,a){return a=Mb(a),Mb(r)===a}function Et(r,a,s,u,m,g){switch(s){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Ni(r,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Ni(r,""+u);break;case"className":Mc(r,"class",u);break;case"tabIndex":Mc(r,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Mc(r,s,u);break;case"style":N0(r,u,g);break;case"data":if(a!=="object"){Mc(r,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||s!=="href")){r.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(s);break}u=Dc(""+u),r.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){r.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(s==="formAction"?(a!=="input"&&Et(r,a,"name",m.name,m,null),Et(r,a,"formEncType",m.formEncType,m,null),Et(r,a,"formMethod",m.formMethod,m,null),Et(r,a,"formTarget",m.formTarget,m,null)):(Et(r,a,"encType",m.encType,m,null),Et(r,a,"method",m.method,m,null),Et(r,a,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(s);break}u=Dc(""+u),r.setAttribute(s,u);break;case"onClick":u!=null&&(r.onclick=So);break;case"onScroll":u!=null&&Je("scroll",r);break;case"onScrollEnd":u!=null&&Je("scrollend",r);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=s}}break;case"multiple":r.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":r.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){r.removeAttribute("xlink:href");break}s=Dc(""+u),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,""+u):r.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":u===!0?r.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,u):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?r.setAttribute(s,u):r.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?r.removeAttribute(s):r.setAttribute(s,u);break;case"popover":Je("beforetoggle",r),Je("toggle",r),Ic(r,"popover",u);break;case"xlinkActuate":Eo(r,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Eo(r,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Eo(r,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Eo(r,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Eo(r,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Eo(r,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Eo(r,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Eo(r,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Eo(r,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Ic(r,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=nA.get(s)||s,Ic(r,s,u))}}function Mp(r,a,s,u,m,g){switch(s){case"style":N0(r,u,g);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=s}}break;case"children":typeof u=="string"?Ni(r,u):(typeof u=="number"||typeof u=="bigint")&&Ni(r,""+u);break;case"onScroll":u!=null&&Je("scroll",r);break;case"onScrollEnd":u!=null&&Je("scrollend",r);break;case"onClick":u!=null&&(r.onclick=So);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!w0.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),a=s.slice(2,m?s.length-7:void 0),g=r[Fn]||null,g=g!=null?g[s]:null,typeof g=="function"&&r.removeEventListener(a,g,m),typeof u=="function")){typeof g!="function"&&g!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(a,u,m);break e}s in r?r[s]=u:u===!0?r.setAttribute(s,""):Ic(r,s,u)}}}function Rn(r,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Je("error",r),Je("load",r);var u=!1,m=!1,g;for(g in s)if(s.hasOwnProperty(g)){var x=s[g];if(x!=null)switch(g){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Et(r,a,g,x,s,null)}}m&&Et(r,a,"srcSet",s.srcSet,s,null),u&&Et(r,a,"src",s.src,s,null);return;case"input":Je("invalid",r);var M=g=x=m=null,B=null,ee=null;for(u in s)if(s.hasOwnProperty(u)){var le=s[u];if(le!=null)switch(u){case"name":m=le;break;case"type":x=le;break;case"checked":B=le;break;case"defaultChecked":ee=le;break;case"value":g=le;break;case"defaultValue":M=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,a));break;default:Et(r,a,u,le,s,null)}}A0(r,g,M,B,ee,x,m,!1);return;case"select":Je("invalid",r),u=x=g=null;for(m in s)if(s.hasOwnProperty(m)&&(M=s[m],M!=null))switch(m){case"value":g=M;break;case"defaultValue":x=M;break;case"multiple":u=M;default:Et(r,a,m,M,s,null)}a=g,s=x,r.multiple=!!u,a!=null?Mi(r,!!u,a,!1):s!=null&&Mi(r,!!u,s,!0);return;case"textarea":Je("invalid",r),g=m=u=null;for(x in s)if(s.hasOwnProperty(x)&&(M=s[x],M!=null))switch(x){case"value":u=M;break;case"defaultValue":m=M;break;case"children":g=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(91));break;default:Et(r,a,x,M,s,null)}I0(r,u,m,g);return;case"option":for(B in s)s.hasOwnProperty(B)&&(u=s[B],u!=null)&&(B==="selected"?r.selected=u&&typeof u!="function"&&typeof u!="symbol":Et(r,a,B,u,s,null));return;case"dialog":Je("beforetoggle",r),Je("toggle",r),Je("cancel",r),Je("close",r);break;case"iframe":case"object":Je("load",r);break;case"video":case"audio":for(u=0;u<_l.length;u++)Je(_l[u],r);break;case"image":Je("error",r),Je("load",r);break;case"details":Je("toggle",r);break;case"embed":case"source":case"link":Je("error",r),Je("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in s)if(s.hasOwnProperty(ee)&&(u=s[ee],u!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Et(r,a,ee,u,s,null)}return;default:if(Gf(a)){for(le in s)s.hasOwnProperty(le)&&(u=s[le],u!==void 0&&Mp(r,a,le,u,s,void 0));return}}for(M in s)s.hasOwnProperty(M)&&(u=s[M],u!=null&&Et(r,a,M,u,s,null))}function CC(r,a,s,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,g=null,x=null,M=null,B=null,ee=null,le=null;for(ae in s){var de=s[ae];if(s.hasOwnProperty(ae)&&de!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":B=de;default:u.hasOwnProperty(ae)||Et(r,a,ae,null,u,de)}}for(var ne in u){var ae=u[ne];if(de=s[ne],u.hasOwnProperty(ne)&&(ae!=null||de!=null))switch(ne){case"type":g=ae;break;case"name":m=ae;break;case"checked":ee=ae;break;case"defaultChecked":le=ae;break;case"value":x=ae;break;case"defaultValue":M=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,a));break;default:ae!==de&&Et(r,a,ne,ae,u,de)}}Vf(r,x,M,B,ee,le,g,m);return;case"select":ae=x=M=ne=null;for(g in s)if(B=s[g],s.hasOwnProperty(g)&&B!=null)switch(g){case"value":break;case"multiple":ae=B;default:u.hasOwnProperty(g)||Et(r,a,g,null,u,B)}for(m in u)if(g=u[m],B=s[m],u.hasOwnProperty(m)&&(g!=null||B!=null))switch(m){case"value":ne=g;break;case"defaultValue":M=g;break;case"multiple":x=g;default:g!==B&&Et(r,a,m,g,u,B)}a=M,s=x,u=ae,ne!=null?Mi(r,!!s,ne,!1):!!u!=!!s&&(a!=null?Mi(r,!!s,a,!0):Mi(r,!!s,s?[]:"",!1));return;case"textarea":ae=ne=null;for(M in s)if(m=s[M],s.hasOwnProperty(M)&&m!=null&&!u.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Et(r,a,M,null,u,m)}for(x in u)if(m=u[x],g=s[x],u.hasOwnProperty(x)&&(m!=null||g!=null))switch(x){case"value":ne=m;break;case"defaultValue":ae=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:m!==g&&Et(r,a,x,m,u,g)}C0(r,ne,ae);return;case"option":for(var Te in s)ne=s[Te],s.hasOwnProperty(Te)&&ne!=null&&!u.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:Et(r,a,Te,null,u,ne));for(B in u)ne=u[B],ae=s[B],u.hasOwnProperty(B)&&ne!==ae&&(ne!=null||ae!=null)&&(B==="selected"?r.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":Et(r,a,B,ne,u,ae));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var je in s)ne=s[je],s.hasOwnProperty(je)&&ne!=null&&!u.hasOwnProperty(je)&&Et(r,a,je,null,u,ne);for(ee in u)if(ne=u[ee],ae=s[ee],u.hasOwnProperty(ee)&&ne!==ae&&(ne!=null||ae!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(o(137,a));break;default:Et(r,a,ee,ne,u,ae)}return;default:if(Gf(a)){for(var St in s)ne=s[St],s.hasOwnProperty(St)&&ne!==void 0&&!u.hasOwnProperty(St)&&Mp(r,a,St,void 0,u,ne);for(le in u)ne=u[le],ae=s[le],!u.hasOwnProperty(le)||ne===ae||ne===void 0&&ae===void 0||Mp(r,a,le,ne,u,ae);return}}for(var K in s)ne=s[K],s.hasOwnProperty(K)&&ne!=null&&!u.hasOwnProperty(K)&&Et(r,a,K,null,u,ne);for(de in u)ne=u[de],ae=s[de],!u.hasOwnProperty(de)||ne===ae||ne==null&&ae==null||Et(r,a,de,ne,u,ae)}function Db(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function IC(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var m=s[u],g=m.transferSize,x=m.initiatorType,M=m.duration;if(g&&M&&Db(x)){for(x=0,M=m.responseEnd,u+=1;u<s.length;u++){var B=s[u],ee=B.startTime;if(ee>M)break;var le=B.transferSize,de=B.initiatorType;le&&Db(de)&&(B=B.responseEnd,x+=le*(B<M?1:(M-ee)/(B-ee)))}if(--u,a+=8*(g+x)/(m.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Np=null,Dp=null;function Au(r){return r.nodeType===9?r:r.ownerDocument}function Lb(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Pb(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function Lp(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Pp=null;function MC(){var r=window.event;return r&&r.type==="popstate"?r===Pp?!1:(Pp=r,!0):(Pp=null,!1)}var kb=typeof setTimeout=="function"?setTimeout:void 0,NC=typeof clearTimeout=="function"?clearTimeout:void 0,jb=typeof Promise=="function"?Promise:void 0,DC=typeof queueMicrotask=="function"?queueMicrotask:typeof jb<"u"?function(r){return jb.resolve(null).then(r).catch(LC)}:kb;function LC(r){setTimeout(function(){throw r})}function da(r){return r==="head"}function zb(r,a){var s=a,u=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(u===0){r.removeChild(m),cs(a);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Sl(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Sl(s);for(var g=s.firstChild;g;){var x=g.nextSibling,M=g.nodeName;g[Bs]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=x}}else s==="body"&&Sl(r.ownerDocument.body);s=m}while(s);cs(a)}function Ub(r,a){var s=r;r=0;do{var u=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=u}while(s)}function kp(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":kp(s),Ff(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function PC(r,a,s,u){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(u){if(!r[Bs])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(g!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var g=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;if(r=Ar(r.nextSibling),r===null)break}return null}function kC(r,a,s){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Ar(r.nextSibling),r===null))return null;return r}function Bb(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Ar(r.nextSibling),r===null))return null;return r}function jp(r){return r.data==="$?"||r.data==="$~"}function zp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function jC(r,a){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||s.readyState!=="loading")a();else{var u=function(){a(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),r._reactRetry=u}}function Ar(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var Up=null;function Fb(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(a===0)return Ar(r.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}r=r.nextSibling}return null}function $b(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return r;a--}else s!=="/$"&&s!=="/&"||a++}r=r.previousSibling}return null}function Vb(r,a,s){switch(a=Au(s),r){case"html":if(r=a.documentElement,!r)throw Error(o(452));return r;case"head":if(r=a.head,!r)throw Error(o(453));return r;case"body":if(r=a.body,!r)throw Error(o(454));return r;default:throw Error(o(451))}}function Sl(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);Ff(r)}var Cr=new Map,Hb=new Set;function Cu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var zo=F.d;F.d={f:zC,r:UC,D:BC,C:FC,L:$C,m:VC,X:GC,S:HC,M:qC};function zC(){var r=zo.f(),a=_u();return r||a}function UC(r){var a=Ai(r);a!==null&&a.tag===5&&a.type==="form"?s1(a):zo.r(r)}var is=typeof document>"u"?null:document;function Gb(r,a,s){var u=is;if(u&&typeof a=="string"&&a){var m=Er(a);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Hb.has(m)||(Hb.add(m),r={rel:r,crossOrigin:s,href:a},u.querySelector(m)===null&&(a=u.createElement("link"),Rn(a,"link",r),fn(a),u.head.appendChild(a)))}}function BC(r){zo.D(r),Gb("dns-prefetch",r,null)}function FC(r,a){zo.C(r,a),Gb("preconnect",r,a)}function $C(r,a,s){zo.L(r,a,s);var u=is;if(u&&r&&a){var m='link[rel="preload"][as="'+Er(a)+'"]';a==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Er(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Er(s.imageSizes)+'"]')):m+='[href="'+Er(r)+'"]';var g=m;switch(a){case"style":g=ss(r);break;case"script":g=ls(r)}Cr.has(g)||(r=p({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:r,as:a},s),Cr.set(g,r),u.querySelector(m)!==null||a==="style"&&u.querySelector(wl(g))||a==="script"&&u.querySelector(xl(g))||(a=u.createElement("link"),Rn(a,"link",r),fn(a),u.head.appendChild(a)))}}function VC(r,a){zo.m(r,a);var s=is;if(s&&r){var u=a&&typeof a.as=="string"?a.as:"script",m='link[rel="modulepreload"][as="'+Er(u)+'"][href="'+Er(r)+'"]',g=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=ls(r)}if(!Cr.has(g)&&(r=p({rel:"modulepreload",href:r},a),Cr.set(g,r),s.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(xl(g)))return}u=s.createElement("link"),Rn(u,"link",r),fn(u),s.head.appendChild(u)}}}function HC(r,a,s){zo.S(r,a,s);var u=is;if(u&&r){var m=Ci(u).hoistableStyles,g=ss(r);a=a||"default";var x=m.get(g);if(!x){var M={loading:0,preload:null};if(x=u.querySelector(wl(g)))M.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":a},s),(s=Cr.get(g))&&Bp(r,s);var B=x=u.createElement("link");fn(B),Rn(B,"link",r),B._p=new Promise(function(ee,le){B.onload=ee,B.onerror=le}),B.addEventListener("load",function(){M.loading|=1}),B.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Iu(x,a,u)}x={type:"stylesheet",instance:x,count:1,state:M},m.set(g,x)}}}function GC(r,a){zo.X(r,a);var s=is;if(s&&r){var u=Ci(s).hoistableScripts,m=ls(r),g=u.get(m);g||(g=s.querySelector(xl(m)),g||(r=p({src:r,async:!0},a),(a=Cr.get(m))&&Fp(r,a),g=s.createElement("script"),fn(g),Rn(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(m,g))}}function qC(r,a){zo.M(r,a);var s=is;if(s&&r){var u=Ci(s).hoistableScripts,m=ls(r),g=u.get(m);g||(g=s.querySelector(xl(m)),g||(r=p({src:r,async:!0,type:"module"},a),(a=Cr.get(m))&&Fp(r,a),g=s.createElement("script"),fn(g),Rn(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(m,g))}}function qb(r,a,s,u){var m=(m=_e.current)?Cu(m):null;if(!m)throw Error(o(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=ss(s.href),s=Ci(m).hoistableStyles,u=s.get(a),u||(u={type:"style",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=ss(s.href);var g=Ci(m).hoistableStyles,x=g.get(r);if(x||(m=m.ownerDocument||m,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(r,x),(g=m.querySelector(wl(r)))&&!g._p&&(x.instance=g,x.state.loading=5),Cr.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Cr.set(r,s),g||ZC(m,r,s,x.state))),a&&u===null)throw Error(o(528,""));return x}if(a&&u!==null)throw Error(o(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=ls(s),s=Ci(m).hoistableScripts,u=s.get(a),u||(u={type:"script",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,r))}}function ss(r){return'href="'+Er(r)+'"'}function wl(r){return'link[rel="stylesheet"]['+r+"]"}function Zb(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function ZC(r,a,s,u){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=r.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Rn(a,"link",s),fn(a),r.head.appendChild(a))}function ls(r){return'[src="'+Er(r)+'"]'}function xl(r){return"script[async]"+r}function Yb(r,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var u=r.querySelector('style[data-href~="'+Er(s.href)+'"]');if(u)return a.instance=u,fn(u),u;var m=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(r.ownerDocument||r).createElement("style"),fn(u),Rn(u,"style",m),Iu(u,s.precedence,r),a.instance=u;case"stylesheet":m=ss(s.href);var g=r.querySelector(wl(m));if(g)return a.state.loading|=4,a.instance=g,fn(g),g;u=Zb(s),(m=Cr.get(m))&&Bp(u,m),g=(r.ownerDocument||r).createElement("link"),fn(g);var x=g;return x._p=new Promise(function(M,B){x.onload=M,x.onerror=B}),Rn(g,"link",u),a.state.loading|=4,Iu(g,s.precedence,r),a.instance=g;case"script":return g=ls(s.src),(m=r.querySelector(xl(g)))?(a.instance=m,fn(m),m):(u=s,(m=Cr.get(g))&&(u=p({},s),Fp(u,m)),r=r.ownerDocument||r,m=r.createElement("script"),fn(m),Rn(m,"link",u),r.head.appendChild(m),a.instance=m);case"void":return null;default:throw Error(o(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Iu(u,s.precedence,r));return a.instance}function Iu(r,a,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=u.length?u[u.length-1]:null,g=m,x=0;x<u.length;x++){var M=u[x];if(M.dataset.precedence===a)g=M;else if(g!==m)break}g?g.parentNode.insertBefore(r,g.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(r,a.firstChild))}function Bp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function Fp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Mu=null;function Kb(r,a,s){if(Mu===null){var u=new Map,m=Mu=new Map;m.set(s,u)}else m=Mu,u=m.get(s),u||(u=new Map,m.set(s,u));if(u.has(r))return u;for(u.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var g=s[m];if(!(g[Bs]||g[En]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var x=g.getAttribute(a)||"";x=r+x;var M=u.get(x);M?M.push(g):u.set(x,[g])}}return u}function Wb(r,a,s){r=r.ownerDocument||r,r.head.insertBefore(s,a==="title"?r.querySelector("head > title"):null)}function YC(r,a,s){if(s===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Qb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function KC(r,a,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=ss(u.href),g=a.querySelector(wl(m));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Nu.bind(r),a.then(r,r)),s.state.loading|=4,s.instance=g,fn(g);return}g=a.ownerDocument||a,u=Zb(u),(m=Cr.get(m))&&Bp(u,m),g=g.createElement("link"),fn(g);var x=g;x._p=new Promise(function(M,B){x.onload=M,x.onerror=B}),Rn(g,"link",u),s.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Nu.bind(r),a.addEventListener("load",s),a.addEventListener("error",s))}}var $p=0;function WC(r,a){return r.stylesheets&&r.count===0&&Lu(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var u=setTimeout(function(){if(r.stylesheets&&Lu(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+a);0<r.imgBytes&&$p===0&&($p=62500*IC());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Lu(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>$p?50:800)+a);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(u),clearTimeout(m)}}:null}function Nu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Du=null;function Lu(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Du=new Map,a.forEach(QC,r),Du=null,Nu.call(r))}function QC(r,a){if(!(a.state.loading&4)){var s=Du.get(r);if(s)var u=s.get(null);else{s=new Map,Du.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<m.length;g++){var x=m[g];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(s.set(x.dataset.precedence,x),u=x)}u&&s.set(null,u)}m=a.instance,x=m.getAttribute("data-precedence"),g=s.get(x)||u,g===u&&s.set(null,m),s.set(x,m),this.count++,u=Nu.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),g?g.parentNode.insertBefore(m,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),a.state.loading|=4}}var Rl={$$typeof:C,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function XC(r,a,s,u,m,g,x,M,B){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Nn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nn(0),this.hiddenUpdates=Nn(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=g,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function Xb(r,a,s,u,m,g,x,M,B,ee,le,de){return r=new XC(r,a,s,x,B,ee,le,de,M),a=1,g===!0&&(a|=24),g=nr(3,null,null,a),r.current=g,g.stateNode=r,a=Eh(),a.refCount++,r.pooledCache=a,a.refCount++,g.memoizedState={element:u,isDehydrated:s,cache:a},Rh(g),r}function Jb(r){return r?(r=Ui,r):Ui}function e_(r,a,s,u,m,g){m=Jb(m),u.context===null?u.context=m:u.pendingContext=m,u=ea(a),u.payload={element:s},g=g===void 0?null:g,g!==null&&(u.callback=g),s=ta(r,u,a),s!==null&&(Zn(s,r,a),rl(s,r,a))}function t_(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<a?s:a}}function Vp(r,a){t_(r,a),(r=r.alternate)&&t_(r,a)}function n_(r){if(r.tag===13||r.tag===31){var a=Ga(r,67108864);a!==null&&Zn(a,r,67108864),Vp(r,67108864)}}function r_(r){if(r.tag===13||r.tag===31){var a=sr();a=Ri(a);var s=Ga(r,a);s!==null&&Zn(s,r,a),Vp(r,a)}}var Pu=!0;function JC(r,a,s,u){var m=L.T;L.T=null;var g=F.p;try{F.p=2,Hp(r,a,s,u)}finally{F.p=g,L.T=m}}function e4(r,a,s,u){var m=L.T;L.T=null;var g=F.p;try{F.p=8,Hp(r,a,s,u)}finally{F.p=g,L.T=m}}function Hp(r,a,s,u){if(Pu){var m=Gp(u);if(m===null)Ip(r,a,u,ku,s),a_(r,u);else if(n4(m,r,a,s,u))u.stopPropagation();else if(a_(r,u),a&4&&-1<t4.indexOf(r)){for(;m!==null;){var g=Ai(m);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var x=st(g.pendingLanes);if(x!==0){var M=g;for(M.pendingLanes|=2,M.entangledLanes|=2;x;){var B=1<<31-Yt(x);M.entanglements[1]|=B,x&=~B}ro(g),(dt&6)===0&&(yu=ue()+500,bl(0))}}break;case 31:case 13:M=Ga(g,2),M!==null&&Zn(M,g,2),_u(),Vp(g,2)}if(g=Gp(u),g===null&&Ip(r,a,u,ku,s),g===m)break;m=g}m!==null&&u.stopPropagation()}else Ip(r,a,u,null,s)}}function Gp(r){return r=Zf(r),qp(r)}var ku=null;function qp(r){if(ku=null,r=Ti(r),r!==null){var a=l(r);if(a===null)r=null;else{var s=a.tag;if(s===13){if(r=c(a),r!==null)return r;r=null}else if(s===31){if(r=d(a),r!==null)return r;r=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return ku=r,null}function o_(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(pe()){case he:return 2;case xe:return 8;case Be:case Ze:return 32;case ft:return 268435456;default:return 32}default:return 32}}var Zp=!1,fa=null,ha=null,pa=null,Ol=new Map,Tl=new Map,ma=[],t4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function a_(r,a){switch(r){case"focusin":case"focusout":fa=null;break;case"dragenter":case"dragleave":ha=null;break;case"mouseover":case"mouseout":pa=null;break;case"pointerover":case"pointerout":Ol.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tl.delete(a.pointerId)}}function Al(r,a,s,u,m,g){return r===null||r.nativeEvent!==g?(r={blockedOn:a,domEventName:s,eventSystemFlags:u,nativeEvent:g,targetContainers:[m]},a!==null&&(a=Ai(a),a!==null&&n_(a)),r):(r.eventSystemFlags|=u,a=r.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),r)}function n4(r,a,s,u,m){switch(a){case"focusin":return fa=Al(fa,r,a,s,u,m),!0;case"dragenter":return ha=Al(ha,r,a,s,u,m),!0;case"mouseover":return pa=Al(pa,r,a,s,u,m),!0;case"pointerover":var g=m.pointerId;return Ol.set(g,Al(Ol.get(g)||null,r,a,s,u,m)),!0;case"gotpointercapture":return g=m.pointerId,Tl.set(g,Al(Tl.get(g)||null,r,a,s,u,m)),!0}return!1}function i_(r){var a=Ti(r.target);if(a!==null){var s=l(a);if(s!==null){if(a=s.tag,a===13){if(a=c(s),a!==null){r.blockedOn=a,_0(r.priority,function(){r_(s)});return}}else if(a===31){if(a=d(s),a!==null){r.blockedOn=a,_0(r.priority,function(){r_(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function ju(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var s=Gp(r.nativeEvent);if(s===null){s=r.nativeEvent;var u=new s.constructor(s.type,s);qf=u,s.target.dispatchEvent(u),qf=null}else return a=Ai(s),a!==null&&n_(a),r.blockedOn=s,!1;a.shift()}return!0}function s_(r,a,s){ju(r)&&s.delete(a)}function r4(){Zp=!1,fa!==null&&ju(fa)&&(fa=null),ha!==null&&ju(ha)&&(ha=null),pa!==null&&ju(pa)&&(pa=null),Ol.forEach(s_),Tl.forEach(s_)}function zu(r,a){r.blockedOn===a&&(r.blockedOn=null,Zp||(Zp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,r4)))}var Uu=null;function l_(r){Uu!==r&&(Uu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Uu===r&&(Uu=null);for(var a=0;a<r.length;a+=3){var s=r[a],u=r[a+1],m=r[a+2];if(typeof u!="function"){if(qp(u||s)===null)continue;break}var g=Ai(s);g!==null&&(r.splice(a,3),a-=3,Gh(g,{pending:!0,data:m,method:s.method,action:u},u,m))}}))}function cs(r){function a(B){return zu(B,r)}fa!==null&&zu(fa,r),ha!==null&&zu(ha,r),pa!==null&&zu(pa,r),Ol.forEach(a),Tl.forEach(a);for(var s=0;s<ma.length;s++){var u=ma[s];u.blockedOn===r&&(u.blockedOn=null)}for(;0<ma.length&&(s=ma[0],s.blockedOn===null);)i_(s),s.blockedOn===null&&ma.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var m=s[u],g=s[u+1],x=m[Fn]||null;if(typeof g=="function")x||l_(s);else if(x){var M=null;if(g&&g.hasAttribute("formAction")){if(m=g,x=g[Fn]||null)M=x.formAction;else if(qp(m)!==null)continue}else M=x.action;typeof M=="function"?s[u+1]=M:(s.splice(u,3),u-=3),l_(s)}}}function c_(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(x){return m=x})},focusReset:"manual",scroll:"manual"})}function a(){m!==null&&(m(),m=null),u||setTimeout(s,20)}function s(){if(!u&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),m!==null&&(m(),m=null)}}}function Yp(r){this._internalRoot=r}Bu.prototype.render=Yp.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(o(409));var s=a.current,u=sr();e_(s,u,r,a,null,null)},Bu.prototype.unmount=Yp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;e_(r.current,2,null,r,null,null),_u(),a[Oi]=null}};function Bu(r){this._internalRoot=r}Bu.prototype.unstable_scheduleHydration=function(r){if(r){var a=Uf();r={blockedOn:null,target:r,priority:a};for(var s=0;s<ma.length&&a!==0&&a<ma[s].priority;s++);ma.splice(s,0,r),s===0&&i_(r)}};var u_=t.version;if(u_!=="19.2.3")throw Error(o(527,u_,"19.2.3"));F.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(o(188)):(r=Object.keys(r).join(","),Error(o(268,r)));return r=h(a),r=r!==null?v(r):null,r=r===null?null:r.stateNode,r};var o4={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{Zt=Fu.inject(o4),At=Fu}catch{}}return Il.createRoot=function(r,a){if(!i(r))throw Error(o(299));var s=!1,u="",m=g1,g=y1,x=b1;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),a=Xb(r,1,!1,null,null,s,u,null,m,g,x,c_),r[Oi]=a.current,Cp(r),new Yp(a)},Il.hydrateRoot=function(r,a,s){if(!i(r))throw Error(o(299));var u=!1,m="",g=g1,x=y1,M=b1,B=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError),s.formState!==void 0&&(B=s.formState)),a=Xb(r,1,!0,a,s??null,u,m,B,g,x,M,c_),a.context=Jb(null),s=a.current,u=sr(),u=Ri(u),m=ea(u),m.callback=null,ta(s,m,u),s=u,a.current.lanes=s,lt(a,s),ro(a),r[Oi]=a.current,Cp(r),new Bu(a)},Il.version="19.2.3",Il}var E_;function v4(){if(E_)return Wp.exports;E_=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Wp.exports=m4(),Wp.exports}var g4=v4(),E=ka();const V=_i(E),eg=i4({__proto__:null,default:V},[E]);var tm={exports:{}},nm={};var S_;function y4(){if(S_)return nm;S_=1;var e=ka().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return nm.c=function(t){return e.H.useMemoCache(t)},nm}var w_;function b4(){return w_||(w_=1,tm.exports=y4()),tm.exports}var cf=b4(),pc=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(){}},_4={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},E4=class{#e=_4;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},si=new E4;function S4(e){setTimeout(e,0)}var pi=typeof window>"u"||"Deno"in globalThis;function Qn(){}function w4(e,t){return typeof e=="function"?e(t):e}function av(e){return typeof e=="number"&&e>=0&&e!==1/0}function gw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ta(e,t){return typeof e=="function"?e(t):e}function Dr(e,t){return typeof e=="function"?e(t):e}function x_(e,t){const{type:n="all",exact:o,fetchStatus:i,predicate:l,queryKey:c,stale:d}=e;if(c){if(o){if(t.queryHash!==tg(c,t.options))return!1}else if(!nc(t.queryKey,c))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||i&&i!==t.state.fetchStatus||l&&!l(t))}function R_(e,t){const{exact:n,status:o,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(tc(t.options.mutationKey)!==tc(l))return!1}else if(!nc(t.options.mutationKey,l))return!1}return!(o&&t.state.status!==o||i&&!i(t))}function tg(e,t){return(t?.queryKeyHashFn||tc)(e)}function tc(e){return JSON.stringify(e,(t,n)=>sv(n)?Object.keys(n).sort().reduce((o,i)=>(o[i]=n[i],o),{}):n)}function nc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nc(e[n],t[n])):!1}var x4=Object.prototype.hasOwnProperty;function yw(e,t){if(e===t)return e;const n=O_(e)&&O_(t);if(!n&&!(sv(e)&&sv(t)))return t;const i=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),c=l.length,d=n?new Array(c):{};let f=0;for(let h=0;h<c;h++){const v=n?h:l[h],p=e[v],y=t[v];if(p===y){d[v]=p,(n?h<i:x4.call(e,v))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){d[v]=y;continue}const _=yw(p,y);d[v]=_,_===p&&f++}return i===c&&f===i?e:d}function iv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function O_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sv(e){if(!T_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!T_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function T_(e){return Object.prototype.toString.call(e)==="[object Object]"}function R4(e){return new Promise(t=>{si.setTimeout(t,e)})}function lv(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?yw(e,t):t}function O4(e,t,n=0){const o=[...e,t];return n&&o.length>n?o.slice(1):o}function T4(e,t,n=0){const o=[t,...e];return n&&o.length>n?o.slice(0,-1):o}var ng=Symbol();function bw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ng?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _w(e,t){return typeof e=="function"?e(...t):!!e}function A4(e,t,n){let o=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),o||(o=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var C4=class extends pc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!pi&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},rg=new C4;function cv(){let e,t;const n=new Promise((i,l)=>{e=i,t=l});n.status="pending",n.catch(()=>{});function o(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{o({status:"fulfilled",value:i}),e(i)},n.reject=i=>{o({status:"rejected",reason:i}),t(i)},n}var I4=S4;function M4(){let e=[],t=0,n=d=>{d()},o=d=>{d()},i=I4;const l=d=>{t?e.push(d):i(()=>{n(d)})},c=()=>{const d=e;e=[],d.length&&i(()=>{o(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||c()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{o=d},setScheduler:d=>{i=d}}}var On=M4(),N4=class extends pc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!pi&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Ad=new N4;function D4(e){return Math.min(1e3*2**e,3e4)}function Ew(e){return(e??"online")==="online"?Ad.isOnline():!0}var uv=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Sw(e){let t=!1,n=0,o;const i=cv(),l=()=>i.status!=="pending",c=w=>{if(!l()){const T=new uv(w);y(T),e.onCancel?.(T)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>rg.isFocused()&&(e.networkMode==="always"||Ad.isOnline())&&e.canRun(),v=()=>Ew(e.networkMode)&&e.canRun(),p=w=>{l()||(o?.(),i.resolve(w))},y=w=>{l()||(o?.(),i.reject(w))},_=()=>new Promise(w=>{o=T=>{(l()||h())&&w(T)},e.onPause?.()}).then(()=>{o=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let w;const T=n===0?e.initialPromise:void 0;try{w=T??e.fn()}catch(O){w=Promise.reject(O)}Promise.resolve(w).then(p).catch(O=>{if(l())return;const A=e.retry??(pi?0:3),C=e.retryDelay??D4,R=typeof C=="function"?C(n,O):C,I=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,O);if(t||!I){y(O);return}n++,e.onFail?.(n,O),R4(R).then(()=>h()?void 0:_()).then(()=>{t?y(O):S()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(o?.(),i),cancelRetry:d,continueRetry:f,canStart:v,start:()=>(v()?S():_().then(S),i)}}var ww=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),av(this.gcTime)&&(this.#e=si.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(si.clearTimeout(this.#e),this.#e=void 0)}},L4=class extends ww{#e;#t;#n;#o;#r;#s;#i;constructor(e){super(),this.#i=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=C_(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=C_(this.options);t.data!==void 0&&(this.setState(A_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=lv(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Qn).catch(Qn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Dr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ng||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ta(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!gw(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#i?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},i=()=>{const d=bw(this.options,t),h=(()=>{const v={client:this.#o,queryKey:this.queryKey,meta:this.meta};return o(v),v})();return this.#i=!1,this.options.persister?this.options.persister(d,h,this):d(h)},c=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:i};return o(d),d})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=Sw({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof uv&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#a({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof uv){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#a({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...xw(n.data,this.options),fetchMeta:e.meta??null};case"success":const o={...n,...A_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?o:void 0,o;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),On.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function xw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ew(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function A_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function C_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,o=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var P4=class extends pc{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#i=cv(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#s;#i;#a;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),I_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dv(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#E(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!iv(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&M_(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),o&&(this.#t!==n||Dr(this.options.enabled,this.#t)!==Dr(t.enabled,this.#t)||Ta(this.options.staleTime,this.#t)!==Ta(t.staleTime,this.#t))&&this.#v();const i=this.#g();o&&(this.#t!==n||Dr(this.options.enabled,this.#t)!==Dr(t.enabled,this.#t)||i!==this.#l)&&this.#y(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return j4(this,n)&&(this.#o=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,o)=>(this.trackProp(o),t?.(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,o))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Qn)),t}#v(){this.#_();const e=Ta(this.options.staleTime,this.#t);if(pi||this.#o.isStale||!av(e))return;const n=gw(this.#o.dataUpdatedAt,e)+1;this.#c=si.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#l=e,!(pi||Dr(this.options.enabled,this.#t)===!1||!av(this.#l)||this.#l===0)&&(this.#u=si.setInterval(()=>{(this.options.refetchIntervalInBackground||rg.isFocused())&&this.#d()},this.#l))}#b(){this.#v(),this.#y(this.#g())}#_(){this.#c&&(si.clearTimeout(this.#c),this.#c=void 0)}#E(){this.#u&&(si.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,o=this.options,i=this.#o,l=this.#r,c=this.#s,f=e!==n?e.state:this.#n,{state:h}=e;let v={...h},p=!1,y;if(t._optimisticResults){const N=this.hasListeners(),z=!N&&I_(e,t),W=N&&M_(e,n,t,o);(z||W)&&(v={...v,...xw(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:_,errorUpdatedAt:S,status:w}=v;y=v.data;let T=!1;if(t.placeholderData!==void 0&&y===void 0&&w==="pending"){let N;i?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(N=i.data,T=!0):N=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,N!==void 0&&(w="success",y=lv(i?.data,N,t),p=!0)}if(t.select&&y!==void 0&&!T)if(i&&y===l?.data&&t.select===this.#m)y=this.#f;else try{this.#m=t.select,y=t.select(y),y=lv(i?.data,y,t),this.#f=y,this.#a=null}catch(N){this.#a=N}this.#a&&(_=this.#a,y=this.#f,S=Date.now(),w="error");const O=v.fetchStatus==="fetching",A=w==="pending",C=w==="error",R=A&&O,I=y!==void 0,D={status:w,fetchStatus:v.fetchStatus,isPending:A,isSuccess:w==="success",isError:C,isInitialLoading:R,isLoading:R,data:y,dataUpdatedAt:v.dataUpdatedAt,error:_,errorUpdatedAt:S,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>f.dataUpdateCount||v.errorUpdateCount>f.errorUpdateCount,isFetching:O,isRefetching:O&&!A,isLoadingError:C&&!I,isPaused:v.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&I,isStale:og(e,t),refetch:this.refetch,promise:this.#i,isEnabled:Dr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const N=$=>{D.status==="error"?$.reject(D.error):D.data!==void 0&&$.resolve(D.data)},z=()=>{const $=this.#i=D.promise=cv();N($)},W=this.#i;switch(W.status){case"pending":e.queryHash===n.queryHash&&N(W);break;case"fulfilled":(D.status==="error"||D.data!==W.value)&&z();break;case"rejected":(D.status!=="error"||D.error!==W.reason)&&z();break}}return D}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),iv(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!this.#p.size)return!0;const l=new Set(i??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#o).some(c=>{const d=c;return this.#o[d]!==e[d]&&l.has(d)})};this.#w({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#w(e){On.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function k4(e,t){return Dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function I_(e,t){return k4(e,t)||e.state.data!==void 0&&dv(e,t,t.refetchOnMount)}function dv(e,t,n){if(Dr(t.enabled,e)!==!1&&Ta(t.staleTime,e)!=="static"){const o=typeof n=="function"?n(e):n;return o==="always"||o!==!1&&og(e,t)}return!1}function M_(e,t,n,o){return(e!==t||Dr(o.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&og(e,n)}function og(e,t){return Dr(t.enabled,e)!==!1&&e.isStaleByTime(Ta(t.staleTime,e))}function j4(e,t){return!iv(e.getCurrentResult(),t)}function N_(e){return{onFetch:(t,n)=>{const o=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let v=!1;const p=S=>{A4(S,()=>t.signal,()=>v=!0)},y=bw(t.options,t.fetchOptions),_=async(S,w,T)=>{if(v)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const A=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:w,direction:T?"backward":"forward",meta:t.options.meta};return p(k),k})(),C=await y(A),{maxPages:R}=t.options,I=T?T4:O4;return{pages:I(S.pages,C,R),pageParams:I(S.pageParams,w,R)}};if(i&&l.length){const S=i==="backward",w=S?Rw:fv,T={pages:l,pageParams:c},O=w(o,T);d=await _(T,O,S)}else{const S=e??l.length;do{const w=f===0?c[0]??o.initialPageParam:fv(o,d);if(f>0&&w==null)break;d=await _(d,w),f++}while(f<S)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function fv(e,{pages:t,pageParams:n}){const o=t.length-1;return t.length>0?e.getNextPageParam(t[o],t,n[o],n):void 0}function Rw(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function aH(e,t){return t?fv(e,t)!=null:!1}function iH(e,t){return!t||!e.getPreviousPageParam?!1:Rw(e,t)!=null}var z4=class extends ww{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||U4(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=Sw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const o=this.state.status==="pending",i=!this.#o.canStart();try{if(o)t();else{this.#r({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:i})}const l=await this.#o.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),On.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function U4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var B4=class extends pc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const o=new z4({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(o),o}add(e){this.#e.add(e);const t=$u(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=$u(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const o=n.indexOf(e);o!==-1&&n.splice(o,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=$u(e);if(typeof t=="string"){const o=this.#t.get(t)?.find(i=>i.state.status==="pending");return!o||o===e}else return!0}runNext(e){const t=$u(e);return typeof t=="string"?this.#t.get(t)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){On.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>R_(t,n))}findAll(e={}){return this.getAll().filter(t=>R_(e,t))}notify(e){On.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return On.batch(()=>Promise.all(e.map(t=>t.continue().catch(Qn))))}};function $u(e){return e.options.scope?.id}var F4=class extends pc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const o=t.queryKey,i=t.queryHash??tg(o,t);let l=this.get(i);return l||(l=new L4({client:e,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){On.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>x_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>x_(e,n)):t}notify(e){On.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){On.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){On.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},$4=class{#e;#t;#n;#o;#r;#s;#i;#a;constructor(e={}){this.#e=e.queryCache||new F4,this.#t=e.mutationCache||new B4,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#i=rg.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Ad.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#i?.(),this.#i=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),o=n.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ta(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const o=n.data;return[t,o]})}setQueryData(e,t,n){const o=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(o.queryHash)?.state.data,c=w4(t,l);if(c!==void 0)return this.#e.build(this,o).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return On.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;On.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return On.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},o=On.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(o).then(Qn).catch(Qn)}invalidateQueries(e,t={}){return On.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},o=On.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,n);return n.throwOnError||(l=l.catch(Qn)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(o).then(Qn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ta(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qn).catch(Qn)}fetchInfiniteQuery(e){return e.behavior=N_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qn).catch(Qn)}ensureInfiniteQueryData(e){return e.behavior=N_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ad.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(tc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(o=>{nc(e,o.queryKey)&&Object.assign(n,o.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(tc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(o=>{nc(e,o.mutationKey)&&Object.assign(n,o.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tg(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ng&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ow=E.createContext(void 0),V4=e=>{const t=E.useContext(Ow);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},H4=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(Ow.Provider,{value:e,children:t})),Tw=E.createContext(!1),G4=()=>E.useContext(Tw);Tw.Provider;function q4(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Z4=E.createContext(q4()),Y4=()=>E.useContext(Z4),K4=(e,t,n)=>{const o=n?.state.error&&typeof e.throwOnError=="function"?_w(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(t.isReset()||(e.retryOnMount=!1))},W4=e=>{E.useEffect(()=>{e.clearReset()},[e])},Q4=({result:e,errorResetBoundary:t,throwOnError:n,query:o,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(i&&e.data===void 0||_w(n,[e.error,o])),X4=(e,t)=>t.state.data===void 0,J4=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...i)=>n(o(...i)):n(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},e3=(e,t)=>e.isLoading&&e.isFetching&&!t,t3=(e,t)=>e?.suspense&&t.isPending,D_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function n3(e,t,n){const o=G4(),i=Y4(),l=V4(n),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const d=l.getQueryCache().get(c.queryHash);c._optimisticResults=o?"isRestoring":"optimistic",J4(c),K4(c,i,d),W4(i);const f=!l.getQueryCache().get(c.queryHash),[h]=E.useState(()=>new t(l,c)),v=h.getOptimisticResult(c),p=!o&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(y=>{const _=p?h.subscribe(On.batchCalls(y)):Qn;return h.updateResult(),_},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),E.useEffect(()=>{h.setOptions(c)},[c,h]),t3(c,v))throw D_(c,h,i);if(Q4({result:v,errorResetBoundary:i,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw v.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,v),c.experimental_prefetchInRender&&!pi&&e3(v,o)&&(f?D_(c,h,i):d?.promise)?.catch(Qn).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?v:h.trackResult(v)}function r3(e,t){return n3({...e,enabled:!0,suspense:!0,throwOnError:X4,placeholderData:void 0},P4,t)}const o3={authConfig:()=>["authConfig"],threads:e=>["threads",e],gatewayThreads:(e,t)=>["threads",e,"gateway",t],thread:(e,t)=>["thread",e,t],threadMessages:(e,t)=>["thread-messages",e,t],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,o)=>[e,t,"collection",n,o],collectionList:(e,t,n,o)=>[e,t,"collection",n,"list",o],collectionListInfinite:(e,t,n,o)=>[e,t,"collection",n,"list-infinite",o],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],gatewayPrompts:e=>["gateway",e,"prompts"],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e]},Aw=E.createContext(void 0);async function a3(){const e=await fetch("/api/auth/custom/config");if(!e.ok)throw new Error("Failed to load auth configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load auth configuration");return t.config}function i3(e){const t=cf.c(4),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:o3.authConfig(),queryFn:a3,staleTime:1/0},t[0]=o):o=t[0];const{data:i}=r3(o);let l;return t[1]!==i||t[2]!==n?(l=b.jsx(Aw.Provider,{value:i,children:n}),t[1]=i,t[2]=n,t[3]=l):l=t[3],l}function sH(){const e=E.useContext(Aw);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const hv=new WeakMap,s3=new WeakMap,Cd={current:[]};let rm=!1,Yl=0;const Vl=new Set,Vu=new Map;function Cw(e){for(const t of e){if(Cd.current.includes(t))continue;Cd.current.push(t),t.recompute();const n=s3.get(t);if(n)for(const o of n){const i=hv.get(o);i?.length&&Cw(i)}}}function l3(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function c3(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function Iw(e){if(Yl>0&&!Vu.has(e)&&Vu.set(e,e.prevState),Vl.add(e),!(Yl>0)&&!rm)try{for(rm=!0;Vl.size>0;){const t=Array.from(Vl);Vl.clear();for(const n of t){const o=Vu.get(n)??n.prevState;n.prevState=o,l3(n)}for(const n of t){const o=hv.get(n);o&&(Cd.current.push(n),Cw(o))}for(const n of t){const o=hv.get(n);if(o)for(const i of o)c3(i)}}}finally{rm=!1,Cd.current=[],Vu.clear()}}function Kl(e){Yl++;try{e()}finally{if(Yl--,Yl===0){const t=Vl.values().next().value;t&&Iw(t)}}}function u3(e){return typeof e=="function"}class d3{constructor(t,n){this.listeners=new Set,this.subscribe=o=>{var i,l;this.listeners.add(o);const c=(l=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:l.call(i,o,this);return()=>{this.listeners.delete(o),c?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,o,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):u3(t)?this.state=t(this.prevState):this.state=t,(i=(o=this.options)==null?void 0:o.onUpdate)==null||i.call(o),Iw(this)}}const Aa="__TSR_index",L_="popstate",P_="beforeunload";function f3(e){let t=e.getLocation();const n=new Set,o=c=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:c}))},i=c=>{e.notifyOnIndexChange??!0?o(c):t=e.getLocation()},l=async({task:c,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){c();return}const v=e.getBlockers?.()??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&v.length&&p)for(const y of v){const _=Id(f.path,f.state);if(await y.blockerFn({currentLocation:t,nextLocation:_,action:f.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,d,f)=>{const h=t.state[Aa];d=k_(h+1,d),l({task:()=>{e.pushState(c,d),o({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:c,state:d})},replace:(c,d,f)=>{const h=t.state[Aa];d=k_(h,d),l({task:()=>{e.replaceState(c,d),o({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:c,state:d})},go:(c,d)=>{l({task:()=>{e.go(c),i({type:"GO",index:c})},navigateOpts:d,type:"GO"})},back:c=>{l({task:()=>{e.back(c?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{l({task:()=>{e.forward(c?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[Aa]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,c]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(h=>h!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:o}}function k_(e,t){t||(t={});const n=ag();return{...t,key:n,__TSR_key:n,[Aa]:e}}function h3(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,o=t.history.replaceState;let i=[];const l=()=>i,c=N=>i=N,d=(N=>N),f=(()=>Id(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const N=ag();t.history.replaceState({[Aa]:0,key:N,__TSR_key:N},"")}let h=f(),v,p=!1,y=!1,_=!1,S=!1;const w=()=>h;let T,O;const A=()=>{T&&(D._ignoreSubscribers=!0,(T.isPush?t.history.pushState:t.history.replaceState)(T.state,"",T.href),D._ignoreSubscribers=!1,T=void 0,O=void 0,v=void 0)},C=(N,z,W)=>{const $=d(z);O||(v=h),h=Id(z,W),T={href:$,state:W,isPush:T?.isPush||N==="push"},O||(O=Promise.resolve().then(()=>A()))},R=N=>{h=f(),D.notify({type:N})},I=async()=>{if(y){y=!1;return}const N=f(),z=N.state[Aa]-h.state[Aa],W=z===1,$=z===-1,q=!W&&!$||p;p=!1;const j=q?"GO":$?"BACK":"FORWARD",X=q?{type:"GO",index:z}:{type:$?"BACK":"FORWARD"};if(_)_=!1;else{const oe=l();if(typeof document<"u"&&oe.length){for(const L of oe)if(await L.blockerFn({currentLocation:h,nextLocation:N,action:j})){y=!0,t.history.go(1),D.notify(X);return}}}h=f(),D.notify(X)},k=N=>{if(S){S=!1;return}let z=!1;const W=l();if(typeof document<"u"&&W.length)for(const $ of W){const q=$.enableBeforeUnload??!0;if(q===!0){z=!0;break}if(typeof q=="function"&&q()===!0){z=!0;break}}if(z)return N.preventDefault(),N.returnValue=""},D=f3({getLocation:w,getLength:()=>t.history.length,pushState:(N,z)=>C("push",N,z),replaceState:(N,z)=>C("replace",N,z),back:N=>(N&&(_=!0),S=!0,t.history.back()),forward:N=>{N&&(_=!0),S=!0,t.history.forward()},go:N=>{p=!0,t.history.go(N)},createHref:N=>d(N),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=o,t.removeEventListener(P_,k,{capture:!0}),t.removeEventListener(L_,I)},onBlocked:()=>{v&&h!==v&&(h=v)},getBlockers:l,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(P_,k,{capture:!0}),t.addEventListener(L_,I),t.history.pushState=function(...N){const z=n.apply(t.history,N);return D._ignoreSubscribers||R("PUSH"),z},t.history.replaceState=function(...N){const z=o.apply(t.history,N);return D._ignoreSubscribers||R("REPLACE"),z},D}function p3(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Id(e,t){const n=p3(e),o=n.indexOf("#"),i=n.indexOf("?"),l=ag();return{href:n,pathname:n.substring(0,o>0?i>0?Math.min(o,i):o:i>0?i:n.length),hash:o>-1?n.substring(o):"",search:i>-1?n.slice(i,o===-1?void 0:o):"",state:t||{[Aa]:0,key:l,__TSR_key:l}}}function ag(){return(Math.random()+1).toString(36).substring(7)}function Md(e){return e[e.length-1]}function m3(e){return typeof e=="function"}function Ra(e,t){return m3(e)?e(t):e}const v3=Object.prototype.hasOwnProperty;function Nr(e,t){if(e===t)return e;const n=t,o=U_(e)&&U_(n);if(!o&&!(Nd(e)&&Nd(n)))return n;const i=o?e:j_(e);if(!i)return n;const l=o?n:j_(n);if(!l)return n;const c=i.length,d=l.length,f=o?new Array(d):{};let h=0;for(let v=0;v<d;v++){const p=o?v:l[v],y=e[p],_=n[p];if(y===_){f[p]=y,(o?v<c:v3.call(e,p))&&h++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){f[p]=_;continue}const S=Nr(y,_);f[p]=S,S===y&&h++}return c===d&&h===c?e:f}function j_(e){const t=[],n=Object.getOwnPropertyNames(e);for(const i of n){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}const o=Object.getOwnPropertySymbols(e);for(const i of o){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}return t}function Nd(e){if(!z_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!z_(n)||!n.hasOwnProperty("isPrototypeOf"))}function z_(e){return Object.prototype.toString.call(e)==="[object Object]"}function U_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function di(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let o=0,i=e.length;o<i;o++)if(!di(e[o],t[o],n))return!1;return!0}if(Nd(e)&&Nd(t)){const o=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!o||t[c]!==void 0)&&!di(e[c],t[c],n))return!1;return!0}let i=0;if(!o)i=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&i++;let l=0;for(const c in t)if((!o||t[c]!==void 0)&&(l++,l>i||!di(e[c],t[c],n)))return!1;return i===l}return!1}function Cs(e){let t,n;const o=new Promise((i,l)=>{t=i,n=l});return o.status="pending",o.resolve=i=>{o.status="resolved",o.value=i,t(i),e?.(i)},o.reject=i=>{o.status="rejected",n(i)},o}function g3(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Ca(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function y3(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function B_(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return y3(t)}function F_(e,t){if(!e)return e;const n=/%25|%5C/gi;let o=0,i="",l;for(;(l=n.exec(e))!==null;)i+=B_(e.slice(o,l.index))+l[0],o=n.lastIndex;return i=i+B_(o?e.slice(o):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}var b3="Invariant failed";function Fo(e,t){if(!e)throw new Error(b3)}function Dd(e){const t=new Map;let n,o;const i=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,o&&(o.next=l,l.prev=o)):(l.next.prev=void 0,n=l.next,l.next=void 0,o&&(l.prev=o,o.next=l)),o=l)};return{get(l){const c=t.get(l);if(c)return i(c),c.value},set(l,c){if(t.size>=e&&n){const f=n;t.delete(f.key),f.next&&(n=f.next,f.next.prev=void 0),f===o&&(o=void 0)}const d=t.get(l);if(d)d.value=c,i(d);else{const f={key:l,value:c,prev:o};o&&(o.next=f),o=f,n||(n=f),t.set(l,f)}},clear(){t.clear(),n=void 0,o=void 0}}}const Is=0,mi=1,vi=2,rc=3,Es=4,_3=5,E3=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,S3=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,w3=/^([^{]*)\{\$\}([^}]*)$/;function ig(e,t,n=new Uint16Array(6)){const o=e.indexOf("/",t),i=o===-1?e.length:o,l=e.substring(t,i);if(!l||!l.includes("$"))return n[0]=Is,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(l==="$"){const h=e.length;return n[0]=vi,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=mi,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const c=l.match(w3);if(c){const v=c[1].length;return n[0]=vi,n[1]=t+v,n[2]=t+v+1,n[3]=t+v+2,n[4]=t+v+3,n[5]=e.length,n}const d=l.match(S3);if(d){const h=d[1],v=d[2],p=d[3],y=h.length;return n[0]=rc,n[1]=t+y,n[2]=t+y+3,n[3]=t+y+3+v.length,n[4]=i-p.length,n[5]=i,n}const f=l.match(E3);if(f){const h=f[1],v=f[2],p=f[3],y=h.length;return n[0]=mi,n[1]=t+y,n[2]=t+y+2,n[3]=t+y+2+v.length,n[4]=i-p.length,n[5]=i,n}return n[0]=Is,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function uf(e,t,n,o,i,l,c){c?.(n);let d=o;{const f=n.fullPath??n.from,h=f.length,v=n.options?.caseSensitive??e,p=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;d<h;){const _=ig(f,d,t);let S;const w=d,T=_[5];switch(d=T+1,l++,_[0]){case Is:{const A=f.substring(_[2],_[3]);if(v){const C=i.static?.get(A);if(C)S=C;else{i.static??=new Map;const R=li(n.fullPath??n.from);R.parent=i,R.depth=l,S=R,i.static.set(A,R)}}else{const C=A.toLowerCase(),R=i.staticInsensitive?.get(C);if(R)S=R;else{i.staticInsensitive??=new Map;const I=li(n.fullPath??n.from);I.parent=i,I.depth=l,S=I,i.staticInsensitive.set(C,I)}}break}case mi:{const A=f.substring(w,_[1]),C=f.substring(_[4],T),R=v&&!!(A||C),I=A?R?A:A.toLowerCase():void 0,k=C?R?C:C.toLowerCase():void 0,D=!p&&i.dynamic?.find(N=>!N.skipOnParamError&&N.caseSensitive===R&&N.prefix===I&&N.suffix===k);if(D)S=D;else{const N=am(mi,n.fullPath??n.from,R,I,k);S=N,N.depth=l,N.parent=i,i.dynamic??=[],i.dynamic.push(N)}break}case rc:{const A=f.substring(w,_[1]),C=f.substring(_[4],T),R=v&&!!(A||C),I=A?R?A:A.toLowerCase():void 0,k=C?R?C:C.toLowerCase():void 0,D=!p&&i.optional?.find(N=>!N.skipOnParamError&&N.caseSensitive===R&&N.prefix===I&&N.suffix===k);if(D)S=D;else{const N=am(rc,n.fullPath??n.from,R,I,k);S=N,N.parent=i,N.depth=l,i.optional??=[],i.optional.push(N)}break}case vi:{const A=f.substring(w,_[1]),C=f.substring(_[4],T),R=v&&!!(A||C),I=A?R?A:A.toLowerCase():void 0,k=C?R?C:C.toLowerCase():void 0,D=am(vi,n.fullPath??n.from,R,I,k);S=D,D.parent=i,D.depth=l,i.wildcard??=[],i.wildcard.push(D)}}i=S}if(p&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const _=li(n.fullPath??n.from);_.kind=_3,_.parent=i,l++,_.depth=l,i.pathless??=[],i.pathless.push(_),i=_}const y=(n.path||!n.children)&&!n.isRoot;if(y&&f.endsWith("/")){const _=li(n.fullPath??n.from);_.kind=Es,_.parent=i,l++,_.depth=l,i.index=_,i=_}i.parse=n.options?.params?.parse??null,i.skipOnParamError=p,i.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,y&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const f of n.children)uf(e,t,f,d,i,l,c)}function om(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Sa(e){if(e.pathless)for(const t of e.pathless)Sa(t);if(e.static)for(const t of e.static.values())Sa(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Sa(t);if(e.dynamic?.length){e.dynamic.sort(om);for(const t of e.dynamic)Sa(t)}if(e.optional?.length){e.optional.sort(om);for(const t of e.optional)Sa(t)}if(e.wildcard?.length){e.wildcard.sort(om);for(const t of e.wildcard)Sa(t)}}function li(e){return{kind:Is,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function am(e,t,n,o,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:o,suffix:i}}function x3(e,t){const n=li("/"),o=new Uint16Array(6);for(const i of e)uf(!1,o,i,1,n,0);Sa(n),t.masksTree=n,t.flatCache=Dd(1e3)}function R3(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const o=sg(e,t.masksTree);return t.flatCache.set(e,o),o}function O3(e,t,n,o,i){e||="/",o||="/";const l=t?`case\0${e}`:e;let c=i.singleCache.get(l);if(!c){c=li("/");const d=new Uint16Array(6);uf(t,d,{from:e},1,c,0),i.singleCache.set(l,c)}return sg(o,c,n)}function T3(e,t,n=!1){const o=n?e:`nofuzz\0${e}`,i=t.matchCache.get(o);if(i!==void 0)return i;e||="/";const l=sg(e,t.segmentTree,n);return l&&(l.branch=I3(l.route)),t.matchCache.set(o,l),l}function A3(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function C3(e,t=!1,n){const o=li(e.fullPath),i=new Uint16Array(6),l={},c={};let d=0;return uf(t,i,e,1,o,0,h=>{if(n?.(h,d),Fo(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,d!==0&&h.path){const v=A3(h.fullPath);(!c[v]||h.fullPath.endsWith("/"))&&(c[v]=h)}d++}),Sa(o),{processedTree:{segmentTree:o,singleCache:Dd(1e3),matchCache:Dd(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:c}}function sg(e,t,n=!1){const o=e.split("/"),i=N3(e,o,t,n);if(!i)return null;const[l]=Mw(e,o,i);return{route:i.node.route,rawParams:l,parsedParams:i.parsedParams}}function Mw(e,t,n){const o=M3(n.node);let i=null;const l={};let c=n.extract?.part??0,d=n.extract?.node??0,f=n.extract?.path??0;for(;d<o.length;c++,d++,f++){const h=o[d],v=t[c],p=f;if(v&&(f+=v.length),h.kind===mi){i??=n.node.fullPath.split("/");const y=i[d],_=h.prefix?.length??0;if(y.charCodeAt(_)===123){const w=h.suffix?.length??0,T=y.substring(_+2,y.length-w-1),O=v.substring(_,v.length-w);l[T]=decodeURIComponent(O)}else{const w=y.substring(1);l[w]=decodeURIComponent(v)}}else if(h.kind===rc){if(n.skipped&1<<d){c--;continue}i??=n.node.fullPath.split("/");const y=i[d],_=h.prefix?.length??0,S=h.suffix?.length??0,w=y.substring(_+3,y.length-S-1),T=h.suffix||h.prefix?v.substring(_,v.length-S):v;T&&(l[w]=decodeURIComponent(T))}else if(h.kind===vi){const y=h,_=e.substring(p+(y.prefix?.length??0),e.length-(y.suffix?.length??0)),S=decodeURIComponent(_);l["*"]=S,l._splat=S;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:c,node:d,path:f}]}function I3(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function M3(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function N3(e,t,n,o){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!Md(t),l=i&&e!=="/",c=t.length-(i?1:0),d=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,h=null,v=null;for(;d.length;){const p=d.pop(),{node:y,index:_,skipped:S,depth:w,statics:T,dynamics:O,optionals:A}=p;let{extract:C,rawParams:R,parsedParams:I}=p;if(y.skipOnParamError){if(!im(e,t,p))continue;R=p.rawParams,C=p.extract,I=p.parsedParams}o&&y.route&&y.kind!==Es&&Ml(h,p)&&(h=p);const k=_===c;if(k&&(y.route&&!l&&Ml(v,p)&&(v=p),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const D=k?void 0:t[_];let N;if(k&&y.index){const z={node:y.index,index:_,skipped:S,depth:w+1,statics:T,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I};if(y.index.skipOnParamError&&!im(e,t,z))continue;if(T===c&&!O&&!A&&!S)return z;Ml(v,z)&&(v=z)}if(y.wildcard&&Ml(f,p))for(const z of y.wildcard){const{prefix:W,suffix:$}=z;if(W&&(k||!(z.caseSensitive?D:N??=D.toLowerCase()).startsWith(W)))continue;if($){if(k)continue;const j=t.slice(_).join("/").slice(-$.length);if((z.caseSensitive?j:j.toLowerCase())!==$)continue}const q={node:z,index:c,skipped:S,depth:w,statics:T,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I};if(!(z.skipOnParamError&&!im(e,t,q))){f=q;break}}if(y.optional){const z=S|1<<w,W=w+1;for(let $=y.optional.length-1;$>=0;$--){const q=y.optional[$];d.push({node:q,index:_,skipped:z,depth:W,statics:T,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I})}if(!k)for(let $=y.optional.length-1;$>=0;$--){const q=y.optional[$],{prefix:j,suffix:X}=q;if(j||X){const oe=q.caseSensitive?D:N??=D.toLowerCase();if(j&&!oe.startsWith(j)||X&&!oe.endsWith(X))continue}d.push({node:q,index:_+1,skipped:S,depth:W,statics:T,dynamics:O,optionals:A+1,extract:C,rawParams:R,parsedParams:I})}}if(!k&&y.dynamic&&D)for(let z=y.dynamic.length-1;z>=0;z--){const W=y.dynamic[z],{prefix:$,suffix:q}=W;if($||q){const j=W.caseSensitive?D:N??=D.toLowerCase();if($&&!j.startsWith($)||q&&!j.endsWith(q))continue}d.push({node:W,index:_+1,skipped:S,depth:w+1,statics:T,dynamics:O+1,optionals:A,extract:C,rawParams:R,parsedParams:I})}if(!k&&y.staticInsensitive){const z=y.staticInsensitive.get(N??=D.toLowerCase());z&&d.push({node:z,index:_+1,skipped:S,depth:w+1,statics:T+1,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I})}if(!k&&y.static){const z=y.static.get(D);z&&d.push({node:z,index:_+1,skipped:S,depth:w+1,statics:T+1,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I})}if(y.pathless){const z=w+1;for(let W=y.pathless.length-1;W>=0;W--){const $=y.pathless[W];d.push({node:$,index:_,skipped:S,depth:z,statics:T,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I})}}}if(v&&f)return Ml(f,v)?v:f;if(v)return v;if(f)return f;if(o&&h){let p=h.index;for(let _=0;_<h.index;_++)p+=t[_].length;const y=p===e.length?"/":e.slice(p);return h.rawParams??={},h.rawParams["**"]=decodeURIComponent(y),h}return null}function im(e,t,n){try{const[o,i]=Mw(e,t,n);n.rawParams=o,n.extract=i;const l=n.node.parse(o);return n.parsedParams=Object.assign({},n.parsedParams,l),!0}catch{return null}}function Ml(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Es)>(e.node.kind===Es)||t.node.kind===Es==(e.node.kind===Es)&&t.depth>e.depth))):!0}function gd(e){return lg(e.filter(t=>t!==void 0).join("/"))}function lg(e){return e.replace(/\/{2,}/g,"/")}function Nw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function fi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Dw(e){return fi(Nw(e))}function Ld(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function D3(e,t,n){return Ld(e,n)===Ld(t,n)}function L3({base:e,to:t,trailingSlash:n="never",cache:o}){const i=t.startsWith("/"),l=!i&&t===".";let c;if(o){c=i?t:l?e:e+"\0"+t;const p=o.get(c);if(p)return p}let d;if(l)d=e.split("/");else if(i)d=t.split("/");else{for(d=e.split("/");d.length>1&&Md(d)==="";)d.pop();const p=t.split("/");for(let y=0,_=p.length;y<_;y++){const S=p[y];S===""?y?y===_-1&&d.push(S):d=[S]:S===".."?d.pop():S==="."||d.push(S)}}d.length>1&&(Md(d)===""?n==="never"&&d.pop():n==="always"&&d.push(""));let f,h="";for(let p=0;p<d.length;p++){p>0&&(h+="/");const y=d[p];if(!y)continue;f=ig(y,0,f);const _=f[0];if(_===Is){h+=y;continue}const S=f[5],w=y.substring(0,f[1]),T=y.substring(f[4],S),O=y.substring(f[2],f[3]);_===mi?h+=w||T?`${w}{$${O}}${T}`:`$${O}`:_===vi?h+=w||T?`${w}{$}${T}`:"$":h+=`${w}{-$${O}}${T}`}h=lg(h);const v=h||"/";return c&&o&&o.set(c,v),v}function sm(e,t,n){const o=t[e];return typeof o!="string"?o:e==="_splat"?encodeURI(o):P3(o,n)}function lm({path:e,params:t,decodeCharMap:n}){let o=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:o};const l=e.length;let c=0,d,f="";for(;c<l;){const v=c;d=ig(e,v,d);const p=d[5];if(c=p+1,v===p)continue;const y=d[0];if(y===Is){f+="/"+e.substring(v,p);continue}if(y===vi){const _=t._splat;i._splat=_,i["*"]=_;const S=e.substring(v,d[1]),w=e.substring(d[4],p);if(!_){o=!0,(S||w)&&(f+="/"+S+w);continue}const T=sm("_splat",t,n);f+="/"+S+T+w;continue}if(y===mi){const _=e.substring(d[2],d[3]);!o&&!(_ in t)&&(o=!0),i[_]=t[_];const S=e.substring(v,d[1]),w=e.substring(d[4],p),T=sm(_,t,n)??"undefined";f+="/"+S+T+w;continue}if(y===rc){const _=e.substring(d[2],d[3]),S=t[_];if(S==null)continue;i[_]=S;const w=e.substring(v,d[1]),T=e.substring(d[4],p),O=sm(_,t,n)??"";f+="/"+w+O+T;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:i,interpolatedPath:f||"/",isMissingParams:o}}function P3(e,t){let n=encodeURIComponent(e);if(t)for(const[o,i]of t)n=n.replaceAll(o,i);return n}function vr(e){return!!e?.isNotFound}function k3(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Pd="tsr-scroll-restoration-v1_3",j3=(e,t)=>{let n;return(...o)=>{n||(n=setTimeout(()=>{e(...o),n=null},t))}};function z3(){const e=k3();if(!e)return null;const t=e.getItem(Pd);let n=t?JSON.parse(t):{};return{state:n,set:o=>{n=Ra(o,n)||n;try{e.setItem(Pd,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Hu=z3(),pv=e=>e.state.__TSR_key||e.href;function U3(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let kd=!1;function Lw({storageKey:e,key:t,behavior:n,shouldScrollRestoration:o,scrollToTopSelectors:i,location:l}){let c;try{c=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const d=t||window.history.state?.__TSR_key,f=c[d];kd=!0;e:{if(o&&f&&Object.keys(f).length>0){for(const p in f){const y=f[p];if(p==="window")window.scrollTo({top:y.scrollY,left:y.scrollX,behavior:n});else if(p){const _=document.querySelector(p);_&&(_.scrollLeft=y.scrollX,_.scrollTop=y.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const y=document.getElementById(h);y&&y.scrollIntoView(p)}break e}const v={top:0,left:0,behavior:n};if(window.scrollTo(v),i)for(const p of i){if(p==="window")continue;const y=typeof p=="function"?p():document.querySelector(p);y&&y.scrollTo(v)}}kd=!1}function B3(e,t){if(!Hu&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Hu))return;e.isScrollRestorationSetup=!0,kd=!1;const o=e.options.getScrollRestorationKey||pv;window.history.scrollRestoration="manual";const i=l=>{if(kd||!e.isScrollRestoring)return;let c="";if(l.target===document||l.target===window)c="window";else{const f=l.target.getAttribute("data-scroll-restoration-id");f?c=`[data-scroll-restoration-id="${f}"]`:c=U3(l.target)}const d=o(e.state.location);Hu.set(f=>{const h=f[d]||={},v=h[c]||={};if(c==="window")v.scrollX=window.scrollX||0,v.scrollY=window.scrollY||0;else if(c){const p=document.querySelector(c);p&&(v.scrollX=p.scrollLeft||0,v.scrollY=p.scrollTop||0)}return f})};typeof document<"u"&&document.addEventListener("scroll",j3(i,100),!0),e.subscribe("onRendered",l=>{const c=o(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Lw({storageKey:Pd,key:c,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Hu.set(d=>(d[c]||={},d)))})}function F3(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function $3(e,t=String){const n=new URLSearchParams;for(const o in e){const i=e[o];i!==void 0&&n.set(o,t(i))}return n.toString()}function cm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function V3(e){const t=new URLSearchParams(e),n={};for(const[o,i]of t.entries()){const l=n[o];l==null?n[o]=cm(i):Array.isArray(l)?l.push(cm(i)):n[o]=[l,cm(i)]}return n}const H3=q3(JSON.parse),G3=Z3(JSON.stringify,JSON.parse);function q3(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=V3(t);for(const o in n){const i=n[o];if(typeof i=="string")try{n[o]=e(i)}catch{}}return n}}function Z3(e,t){const n=typeof t=="function";function o(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const l=$3(i,o);return l?`?${l}`:""}}const ur="__root__";function Y3(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Pr(e){return e instanceof Response&&!!e.options}const yd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},df=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),cg=(e,t,n=!0)=>{const o={...e.router.options.context??{}},i=n?t:t-1;for(let l=0;l<=i;l++){const c=e.matches[l];if(!c)continue;const d=e.router.getMatch(c.id);d&&Object.assign(o,d.__routeContext,d.__beforeLoadContext)}return o},Pw=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Fo(n.options.notFoundComponent);const o=e.matches.find(i=>i.routeId===n.id);Fo(o,"Could not find match for route: "+n.id),e.updateMatch(o.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,Pw(e,t))},Oa=(e,t,n)=>{if(!(!Pr(n)&&!vr(n))){if(Pr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const o=Pr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:o,isFetching:!1,error:n})),vr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Pr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(Pw(e,n),n)}},kw=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Nl=(e,t,n,o)=>{const{id:i,routeId:l}=e.matches[t],c=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=o,e.firstBadMatchIndex??=t,Oa(e,e.router.getMatch(i),n);try{c.options.onError?.(n)}catch(d){n=d,Oa(e,e.router.getMatch(i),n)}e.updateMatch(i,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},K3=(e,t,n,o)=>{const i=e.router.getMatch(t),l=e.matches[n-1]?.id,c=l?e.router.getMatch(l):void 0;if(e.router.isShell()){i.ssr=o.id===ur;return}if(c?.ssr===!1){i.ssr=!1;return}const d=_=>_===!0&&c?.ssr==="data-only"?"data-only":_,f=e.router.options.defaultSsr??!0;if(o.options.ssr===void 0){i.ssr=d(f);return}if(typeof o.options.ssr!="function"){i.ssr=d(o.options.ssr);return}const{search:h,params:v}=i,p={search:Gu(h,i.searchError),params:Gu(v,i.paramsError),location:e.location,matches:e.matches.map(_=>({index:_.index,pathname:_.pathname,fullPath:_.fullPath,staticData:_.staticData,id:_.id,routeId:_.routeId,search:Gu(_.search,_.searchError),params:Gu(_.params,_.paramsError),ssr:_.ssr}))},y=o.options.ssr(p);if(Ca(y))return y.then(_=>{i.ssr=d(_??f)});i.ssr=d(y??f)},jw=(e,t,n,o)=>{if(o._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!df(e,t)&&(n.options.loader||n.options.beforeLoad||Bw(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{yd(e)},i);o._nonReactive.pendingTimeout=c}},W3=(e,t,n)=>{const o=e.router.getMatch(t);if(!o._nonReactive.beforeLoadPromise&&!o._nonReactive.loaderPromise)return;jw(e,t,n,o);const i=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Oa(e,l,l.error)};return o._nonReactive.beforeLoadPromise?o._nonReactive.beforeLoadPromise.then(i):i()},Q3=(e,t,n,o)=>{const i=e.router.getMatch(t),l=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Cs(()=>{l?.resolve()});const{paramsError:c,searchError:d}=i;c&&Nl(e,n,c,"PARSE_PARAMS"),d&&Nl(e,n,d,"VALIDATE_SEARCH"),jw(e,t,o,i);const f=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let p=!1;const y=()=>{p||(p=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:f})))},_=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!o.options.beforeLoad){Kl(()=>{y(),_()});return}i._nonReactive.beforeLoadPromise=Cs();const S={...cg(e,n,!1),...i.__routeContext},{search:w,params:T,cause:O}=i,A=df(e,t),C={search:w,abortController:f,params:T,preload:A,context:S,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":O,matches:e.matches,...e.router.options.additionalContext},R=k=>{if(k===void 0){Kl(()=>{y(),_()});return}(Pr(k)||vr(k))&&(y(),Nl(e,n,k,"BEFORE_LOAD")),Kl(()=>{y(),e.updateMatch(t,D=>({...D,__beforeLoadContext:k})),_()})};let I;try{if(I=o.options.beforeLoad(C),Ca(I))return y(),I.catch(k=>{Nl(e,n,k,"BEFORE_LOAD")}).then(R)}catch(k){y(),Nl(e,n,k,"BEFORE_LOAD")}R(I)},X3=(e,t)=>{const{id:n,routeId:o}=e.matches[t],i=e.router.looseRoutesById[o],l=()=>{if(e.router.isServer){const f=K3(e,n,t,i);if(Ca(f))return f.then(d)}return d()},c=()=>Q3(e,n,t,i),d=()=>{if(kw(e,n))return;const f=W3(e,n,i);return Ca(f)?f.then(c):c()};return l()},J3=(e,t,n)=>{const o=e.router.getMatch(t);if(!o||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={matches:e.matches,match:o,params:o.params,loaderData:o.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([l,c,d])=>{const f=l?.meta,h=l?.links,v=l?.scripts,p=l?.styles;return{meta:f,links:h,headScripts:v,headers:d,scripts:c,styles:p}})},zw=(e,t,n,o)=>{const i=e.matchPromises[n-1],{params:l,loaderDeps:c,abortController:d,cause:f}=e.router.getMatch(t),h=cg(e,n),v=df(e,t);return{params:l,deps:c,preload:!!v,parentMatchPromise:i,abortController:d,context:h,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:v?"preload":f,route:o,...e.router.options.additionalContext}},$_=async(e,t,n,o)=>{try{const i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&Uw(o);const l=o.options.loader?.(zw(e,t,n,o)),c=o.options.loader&&Ca(l);if((c||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),o.options.loader){const h=c?await l:l;Oa(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,v=>({...v,loaderData:h}))}o._lazyPromise&&await o._lazyPromise;const f=i._nonReactive.minPendingPromise;f&&await f,o._componentsPromise&&await o._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;if(c?.name==="AbortError"){e.updateMatch(t,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1}));return}const d=i._nonReactive.minPendingPromise;d&&await d,vr(l)&&await o.options.notFoundComponent?.preload?.(),Oa(e,e.router.getMatch(t),l);try{o.options.onError?.(l)}catch(f){c=f,Oa(e,e.router.getMatch(t),f)}e.updateMatch(t,f=>({...f,error:c,status:"error",isFetching:!1}))}}catch(i){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),Oa(e,l,i)}},e5=async(e,t)=>{const{id:n,routeId:o}=e.matches[t];let i=!1,l=!1;const c=e.router.looseRoutesById[o],d=()=>{e.updateMatch(n,v=>({...v,context:cg(e,t)}))};if(kw(e,n)){if(e.router.isServer)return e.router.getMatch(n)}else{const v=e.router.getMatch(n);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload)return v;await v._nonReactive.loaderPromise;const p=e.router.getMatch(n),y=p._nonReactive.error||p.error;y&&Oa(e,p,y)}else{const p=Date.now()-v.updatedAt,y=df(e,n),_=y?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,S=c.options.shouldReload,w=typeof S=="function"?S(zw(e,n,t,c)):S,T=!!y&&!e.router.state.matches.some(R=>R.id===n),O=e.router.getMatch(n);O._nonReactive.loaderPromise=Cs(),T!==O.preload&&e.updateMatch(n,R=>({...R,preload:T}));const{status:A,invalid:C}=O;i=A==="success"&&(C||(w??p>_)),y&&c.options.preload===!1||(i&&!e.sync?(l=!0,(async()=>{try{await $_(e,n,t,c),d();const R=e.router.getMatch(n);R._nonReactive.loaderPromise?.resolve(),R._nonReactive.loadPromise?.resolve(),R._nonReactive.loaderPromise=void 0}catch(R){Pr(R)&&await e.router.navigate(R.options)}})()):(A!=="success"||i&&e.sync)&&await $_(e,n,t,c))}}const f=e.router.getMatch(n);l||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,l||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0,l||d();const h=l?f.isFetching:!1;return h!==f.isFetching||f.invalid!==!1?(e.updateMatch(n,v=>({...v,isFetching:h,invalid:!1})),e.router.getMatch(n)):f};async function V_(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&yd(t);try{for(let d=0;d<t.matches.length;d++){const f=X3(t,d);Ca(f)&&await f}const n=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<n;d++)t.matchPromises.push(e5(t,d));const i=(await Promise.allSettled(t.matchPromises)).filter(d=>d.status==="rejected").map(d=>d.reason);let l;for(const d of i){if(Pr(d))throw d;!l&&vr(d)&&(l=d)}for(const d of t.matches){const{id:f,routeId:h}=d,v=t.router.looseRoutesById[h];try{const p=J3(t,f,v);if(p){const y=await p;t.updateMatch(f,_=>({..._,...y}))}}catch(p){console.error(`Error executing head for route ${h}:`,p)}}if(l)throw l;const c=yd(t);Ca(c)&&await c}catch(n){if(vr(n)&&!t.preload){const o=yd(t);throw Ca(o)&&await o,n}if(Pr(n))throw n}return t.matches}async function Uw(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...o}=t.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const o of Fw){const i=e.options[o]?.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Gu(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function Bw(e){for(const t of Fw)if(e.options[t]?.preload)return!0;return!1}const Fw=["component","errorComponent","pendingComponent","notFoundComponent"];function t5(e){return{input:({url:t})=>{for(const n of e)t=$w(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Vw(e[n],t);return t}}}function n5(e){const t=Dw(e.basepath),n=`/${t}`,o=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?o:o.toLowerCase();return{input:({url:c})=>{const d=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return d===i?c.pathname="/":d.startsWith(l)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=gd(["/",t,c.pathname]),c)}}function $w(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Vw(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function hi(e){const t=e.resolvedLocation,n=e.location,o=t?.pathname!==n.pathname,i=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:o,hrefChanged:i,hashChanged:l}}class r5{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const o=this.options,i=this.basepath??o?.basepath??"/",l=this.basepath===void 0,c=o?.rewrite;this.options={...o,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(y=>[encodeURIComponent(y),y])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=h3())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new d3(a5(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(y=>!["redirected"].includes(y.status))}}}),B3(this));let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||i!==f||c!==h){this.basepath=f;const y=[];Dw(f)!==""&&y.push(n5({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:t5(y),this.history&&this.updateLatestLocation(),d=!0}d&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:o,processedTree:i}=C3(this.routeTree,this.options.caseSensitive,(c,d)=>{c.init({originalIndex:d})});this.options.routeMasks&&x3(this.options.routeMasks,i),this.routesById=n,this.routesByPath=o,this.processedTree=i;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,o)=>{const i={eventType:n,fn:o};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(o=>{o.eventType===n.type&&o.fn(n)})},this.parseLocation=(n,o)=>{const i=({href:f,state:h})=>{const v=new URL(f,this.origin),p=$w(this.rewrite,v),y=this.options.parseSearch(p.search),_=this.options.stringifySearch(y);return p.search=_,{href:p.href.replace(p.origin,""),publicHref:f,url:p,pathname:F_(p.pathname),searchStr:_,search:Nr(o?.search,y),hash:p.hash.split("#").reverse()[0]??"",state:Nr(o?.state,h)}},l=i(n),{__tempLocation:c,__tempKey:d}=l.state;if(c&&(!d||d===this.tempLocationKey)){const f=i(c);return f.state.key=l.state.key,f.state.__TSR_key=l.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:l}}return l},this.resolvePathCache=Dd(1e3),this.resolvePathWithBase=(n,o)=>L3({base:n,to:lg(o),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,o,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:o},i):this.matchRoutesInternal(n,o),this.getMatchedRoutes=n=>i5({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const o=this.getMatch(n);o&&(o.abortController.abort(),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),o=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...o]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const o=(l={})=>{const c=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutes(c,{_buildLocation:!0}),f=Md(d);l.from;const h=l.unsafeRelative==="path"?c.pathname:l.from??f.fullPath,v=this.resolvePathWithBase(h,"."),p=f.search,y={...f.params},_=l.to?this.resolvePathWithBase(v,`${l.to}`):this.resolvePathWithBase(v,"."),S=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,Ra(l.params,y)),w=lm({path:_,params:S}).interpolatedPath,T=this.matchRoutes(w,void 0,{_buildLocation:!0}).map(W=>this.looseRoutesById[W.routeId]);if(Object.keys(S).length>0)for(const W of T){const $=W.options.params?.stringify??W.options.stringifyParams;$&&Object.assign(S,$(S))}const O=n.leaveParams?_:F_(lm({path:_,params:S,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let A=p;if(n._includeValidateSearch&&this.options.search?.strict){const W={};T.forEach($=>{if($.options.validateSearch)try{Object.assign(W,mv($.options.validateSearch,{...W,...A}))}catch{}}),A=W}A=s5({search:A,dest:l,destRoutes:T,_includeValidateSearch:n._includeValidateSearch}),A=Nr(p,A);const C=this.options.stringifySearch(A),R=l.hash===!0?c.hash:l.hash?Ra(l.hash,c.hash):void 0,I=R?`#${R}`:"";let k=l.state===!0?c.state:l.state?Ra(l.state,c.state):{};k=Nr(c.state,k);const D=`${O}${C}${I}`,N=new URL(D,this.origin),z=Vw(this.rewrite,N);return{publicHref:z.pathname+z.search+z.hash,href:D,url:z,pathname:O,search:A,searchStr:C,state:k,hash:R??"",unmaskOnReload:l.unmaskOnReload}},i=(l={},c)=>{const d=o(l);let f=c?o(c):void 0;if(!f){const h={};if(this.options.routeMasks){const v=R3(d.pathname,this.processedTree);if(v){Object.assign(h,v.rawParams);const{from:p,params:y,..._}=v.route,S=y===!1||y===null?{}:(y??!0)===!0?h:Object.assign(h,Ra(y,h));c={from:n.from,..._,params:S},f=o(c)}}}return f&&(d.maskedLocation=f),d};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:o,...i})=>{const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(v=>{i.state[v]=this.latestLocation.state[v]});const h=di(i.state,this.latestLocation.state);return f.forEach(v=>{delete i.state[v]}),h},c=fi(this.latestLocation.href)===fi(i.href),d=this.commitLocationPromise;if(this.commitLocationPromise=Cs(()=>{d?.resolve()}),c&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,url:v,...p}=i;f&&(p={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:o})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:o,hashScrollIntoView:i,viewTransition:l,ignoreBlocker:c,href:d,...f}={})=>{if(d){const p=this.history.location.state.__TSR_index,y=Id(d,{__TSR_index:n?p:p+1});f.to=y.pathname,f.search=this.options.parseSearch(y.search),f.hash=y.hash.slice(1)}const h=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const v=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:o,hashScrollIntoView:i,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),v},this.navigate=async({to:n,reloadDocument:o,href:i,publicHref:l,...c})=>{let d=!1;if(i)try{new URL(`${i}`),d=!0}catch{}if(d&&!o&&(o=!0),o){if(!i||!l&&!d){const h=this.buildLocation({to:n,...c});i=i??h.url.href,l=l??h.url.href}const f=!d&&l?l:i;if(!c.ignoreBlocker){const v=this.history.getBlockers?.()??[];for(const p of v)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...c,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const o=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==o.publicHref||o.url.origin!==this.origin){const i=this.getParsedLocationHref(o);throw Y3({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(o=>({...o,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:o.cachedMatches.filter(i=>!n.some(l=>l.id===i.id))}))},this.load=async n=>{let o,i,l;for(l=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const f=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...hi({resolvedLocation:h,location:f})}),this.emit({type:"onBeforeLoad",...hi({resolvedLocation:h,location:f})}),await V_({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let v=[],p=[],y=[];Kl(()=>{this.__store.setState(_=>{const S=_.matches,w=_.pendingMatches||_.matches;return v=S.filter(T=>!w.some(O=>O.id===T.id)),p=w.filter(T=>!S.some(O=>O.id===T.id)),y=w.filter(T=>S.some(O=>O.id===T.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...v.filter(T=>T.status!=="error"&&T.status!=="notFound")]}}),this.clearExpiredCache()}),[[v,"onLeave"],[p,"onEnter"],[y,"onStay"]].forEach(([_,S])=>{_.forEach(w=>{this.looseRoutesById[w.routeId].options[S]?.(w)})})})})}})}catch(f){Pr(f)?(o=f,this.isServer||this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):vr(f)&&(i=f),this.__store.setState(h=>({...h,statusCode:o?o.status:i?404:h.matches.some(v=>v.status==="error")?500:200,redirect:o}))}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.__store.state.matches.some(d=>d.status==="error")&&(c=500),c!==void 0&&this.__store.setState(d=>({...d,statusCode:c}))},this.startViewTransition=n=>{const o=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,o&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof o=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,c=this.state.resolvedLocation,d=typeof o.types=="function"?o.types(hi({resolvedLocation:c,location:l})):o.types;if(d===!1){n();return}i={update:n,types:d}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,o)=>{this.startTransition(()=>{const i=this.state.pendingMatches?.some(l=>l.id===n)?"pendingMatches":this.state.matches.some(l=>l.id===n)?"matches":this.state.cachedMatches.some(l=>l.id===n)?"cachedMatches":"";i&&this.__store.setState(l=>({...l,[i]:l[i]?.map(c=>c.id===n?o(c):c)}))})},this.getMatch=n=>{const o=i=>i.id===n;return this.state.cachedMatches.find(o)??this.state.pendingMatches?.find(o)??this.state.matches.find(o)},this.invalidate=n=>{const o=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(o),cachedMatches:i.cachedMatches.map(o),pendingMatches:i.pendingMatches?.map(o)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let o=n.url.href;return this.origin&&n.url.origin===this.origin&&(o=o.replace(this.origin,"")||"/"),o},this.resolveRedirect=n=>{if(!n.options.href){const o=this.buildLocation(n.options),i=this.getParsedLocationHref(o);n.options.href=o.href,n.headers.set("Location",i)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const o=n?.filter;o!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(l=>!o(l))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=o=>{const i=this.looseRoutesById[o.routeId];if(!i.options.loader)return!0;const l=(o.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:Date.now()-o.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=Uw,this.preloadRoute=async n=>{const o=this.buildLocation(n);let i=this.matchRoutes(o,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(d=>d.id)),c=new Set([...l,...this.state.cachedMatches.map(d=>d.id)]);Kl(()=>{i.forEach(d=>{c.has(d.id)||this.__store.setState(f=>({...f,cachedMatches:[...f.cachedMatches,d]}))})});try{return i=await V_({router:this,matches:i,location:o,preload:!0,updateMatch:(d,f)=>{l.has(d)?i=i.map(h=>h.id===d?f(h):h):this.updateMatch(d,f)}}),i}catch(d){if(Pr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:o});vr(d)||console.error(d);return}},this.matchRoute=(n,o)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(i);if(o?.pending&&this.state.status!=="pending")return!1;const d=(o?.pending===void 0?!this.state.isLoading:o.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,f=O3(l.pathname,o?.caseSensitive??!1,o?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!di(f.rawParams,n.params,{partial:!0})?!1:o?.includeSearch??!0?di(d.search,l.search,{partial:!0})?f.rawParams:!1:f.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??G3,parseSearch:t.parseSearch??H3}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const o=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:l,parsedParams:c}=o;let{matchedRoutes:d}=o,f=!1;(i?i.path!=="/"&&l["**"]:fi(t.pathname))&&(this.options.notFoundRoute?d=[...d,this.options.notFoundRoute]:f=!0);const h=(()=>{if(f){if(this.options.notFoundMode!=="root")for(let y=d.length-1;y>=0;y--){const _=d[y];if(_.children)return _.id}return ur}})(),v=[],p=y=>y?.id?y.context??this.options.context??void 0:this.options.context??void 0;return d.forEach((y,_)=>{const S=v[_-1],[w,T,O]=(()=>{const X=S?.search??t.search,oe=S?._strictSearch??void 0;try{const L=mv(y.options.validateSearch,{...X})??void 0;return[{...X,...L},{...oe,...L},void 0]}catch(L){let F=L;if(L instanceof jd||(F=new jd(L.message,{cause:L})),n?.throwOnError)throw F;return[X,{},F]}})(),A=y.options.loaderDeps?.({search:w})??"",C=A?JSON.stringify(A):"",{interpolatedPath:R,usedParams:I}=lm({path:y.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),k=y.id+R+C,D=this.getMatch(k),N=this.state.matches.find(X=>X.routeId===y.id),z=D?._strictParams??I;let W;if(!D)if(y.options.skipRouteOnParseError)for(const X in I)X in c&&(z[X]=c[X]);else{const X=y.options.params?.parse??y.options.parseParams;if(X)try{Object.assign(z,X(z))}catch(oe){if(vr(oe)||Pr(oe)?W=oe:W=new o5(oe.message,{cause:oe}),n?.throwOnError)throw W}}Object.assign(l,z);const $=N?"stay":"enter";let q;if(D)q={...D,cause:$,params:N?Nr(N.params,l):l,_strictParams:z,search:Nr(N?N.search:D.search,w),_strictSearch:T};else{const X=y.options.loader||y.options.beforeLoad||y.lazyFn||Bw(y)?"pending":"success";q={id:k,ssr:this.isServer?void 0:y.options.ssr,index:_,routeId:y.id,params:N?Nr(N.params,l):l,_strictParams:z,pathname:R,updatedAt:Date.now(),search:N?Nr(N.search,w):w,_strictSearch:T,searchError:void 0,status:X,isFetching:!1,error:void 0,paramsError:W,__routeContext:void 0,_nonReactive:{loadPromise:Cs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:$,loaderDeps:N?Nr(N.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:y.options.staticData||{},fullPath:y.fullPath}}n?.preload||(q.globalNotFound=h===y.id),q.searchError=O;const j=p(S);q.context={...j,...q.__routeContext,...q.__beforeLoadContext},v.push(q)}),v.forEach((y,_)=>{const S=this.looseRoutesById[y.routeId];if(!this.getMatch(y.id)&&n?._buildLocation!==!0){const T=v[_-1],O=p(T);if(S.options.context){const A={deps:y.loaderDeps,params:y.params,context:O??{},location:t,navigate:C=>this.navigate({...C,_fromLocation:t}),buildLocation:this.buildLocation,cause:y.cause,abortController:y.abortController,preload:!!y.preload,matches:v};y.__routeContext=S.options.context(A)??void 0}y.context={...O,...y.__routeContext,...y.__beforeLoadContext}}}),v}}class jd extends Error{}class o5 extends Error{}function a5(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function mv(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new jd("Async validation not supported");if(n.issues)throw new jd(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function i5({pathname:e,routesById:t,processedTree:n}){const o={},i=fi(e);let l,c;const d=T3(i,n,!0);return d&&(l=d.route,Object.assign(o,d.rawParams),c=Object.assign({},d.parsedParams)),{matchedRoutes:d?.branch||[t[ur]],routeParams:o,foundRoute:l,parsedParams:c}}function s5({search:e,dest:t,destRoutes:n,_includeValidateSearch:o}){const i=n.reduce((d,f)=>{const h=[];if("search"in f.options)f.options.search?.middlewares&&h.push(...f.options.search.middlewares);else if(f.options.preSearchFilters||f.options.postSearchFilters){const v=({search:p,next:y})=>{let _=p;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(_=f.options.preSearchFilters.reduce((w,T)=>T(w),p));const S=y(_);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((w,T)=>T(w),S):S};h.push(v)}if(o&&f.options.validateSearch){const v=({search:p,next:y})=>{const _=y(p);try{return{..._,...mv(f.options.validateSearch,_)??void 0}}catch{return _}};h.push(v)}return d.concat(h)},[])??[],l=({search:d})=>t.search?t.search===!0?d:Ra(t.search,d):{};i.push(l);const c=(d,f)=>{if(d>=i.length)return f;const h=i[d];return h({search:f,next:p=>c(d+1,p)})};return c(0,e)}const l5="Error preloading route! ☝️";class Hw{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const o=this.options,i=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=ur:this.parentRoute||Fo(!1);let l=i?ur:o?.path;l&&l!=="/"&&(l=Nw(l));const c=o?.id||l;let d=i?ur:gd([this.parentRoute.id===ur?"":this.parentRoute.id,c]);l===ur&&(l="/"),d!==ur&&(d=gd(["/",d]));const f=d===ur?"/":gd([this.parentRoute.fullPath,l]);this._path=l,this._id=d,this._fullPath=f,this._to=f},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class c5 extends Hw{constructor(t){super(t)}}function ug(e){const t=e.errorComponent??ff;return b.jsx(u5,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:o})=>n?E.createElement(t,{error:n,reset:o}):e.children})}class u5 extends E.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function ff({error:e}){const[t,n]=E.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(o=>!o),children:t?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),t?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?b.jsx("code",{children:e.message}):null})}):null]})}function d5({children:e,fallback:t=null}){return f5()?b.jsx(V.Fragment,{children:e}):b.jsx(V.Fragment,{children:t})}function f5(){return V.useSyncExternalStore(h5,()=>!0,()=>!1)}function h5(){return()=>{}}var um={exports:{}},dm={},fm={exports:{}},hm={};var H_;function p5(){if(H_)return hm;H_=1;var e=ka();function t(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,i=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function d(p,y){var _=y(),S=o({inst:{value:_,getSnapshot:y}}),w=S[0].inst,T=S[1];return l(function(){w.value=_,w.getSnapshot=y,f(w)&&T({inst:w})},[p,_,y]),i(function(){return f(w)&&T({inst:w}),p(function(){f(w)&&T({inst:w})})},[p]),c(_),_}function f(p){var y=p.getSnapshot;p=p.value;try{var _=y();return!n(p,_)}catch{return!0}}function h(p,y){return y()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return hm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,hm}var G_;function Gw(){return G_||(G_=1,fm.exports=p5()),fm.exports}var q_;function m5(){if(q_)return dm;q_=1;var e=ka(),t=Gw();function n(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}var o=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,l=e.useRef,c=e.useEffect,d=e.useMemo,f=e.useDebugValue;return dm.useSyncExternalStoreWithSelector=function(h,v,p,y,_){var S=l(null);if(S.current===null){var w={hasValue:!1,value:null};S.current=w}else w=S.current;S=d(function(){function O(k){if(!A){if(A=!0,C=k,k=y(k),_!==void 0&&w.hasValue){var D=w.value;if(_(D,k))return R=D}return R=k}if(D=R,o(C,k))return D;var N=y(k);return _!==void 0&&_(D,N)?(C=k,D):(C=k,R=N)}var A=!1,C,R,I=p===void 0?null:p;return[function(){return O(v())},I===null?void 0:function(){return O(I())}]},[v,p,y,_]);var T=i(h,S[0],S[1]);return c(function(){w.hasValue=!0,w.value=T},[T]),f(T),T},dm}var Z_;function v5(){return Z_||(Z_=1,um.exports=m5()),um.exports}var qw=v5();const lH=_i(qw);function g5(e,t=o=>o,n={}){const o=n.equal??y5;return qw.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,o)}function y5(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,i]of e)if(!t.has(o)||!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Y_(e);if(n.length!==Y_(t).length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Object.is(e[n[o]],t[n[o]]))return!1;return!0}function Y_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const pm=E.createContext(null);function Zw(){return typeof document>"u"?pm:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=pm,pm)}function er(e){const t=E.useContext(Zw());return e?.warn,t}function Jn(e){const t=er({warn:e?.router===void 0}),n=e?.router||t,o=E.useRef(void 0);return g5(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Nr(o.current,e.select(i));return o.current=l,l}return e.select(i)}return i})}const hf=E.createContext(void 0),b5=E.createContext(void 0);function ho(e){const t=E.useContext(e.from?b5:hf);return Jn({select:o=>{const i=o.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(Fo(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function dg(e){return ho({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function fg(e){const{select:t,...n}=e;return ho({...n,select:o=>t?t(o.loaderDeps):o.loaderDeps})}function hg(e){return ho({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function pg(e){return ho({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Hl=typeof window<"u"?E.useLayoutEffect:E.useEffect;function mm(e){const t=E.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function _5(e,t,n={},o={}){E.useEffect(()=>{if(!e.current||o.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([l])=>{t(l)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,o.disabled,e])}function E5(e){const t=E.useRef(null);return E.useImperativeHandle(e,()=>t.current,[]),t}function mc(e){const t=er();return E.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function cH(e){const t=er(),n=mc(),o=E.useRef(null);return Hl(()=>{o.current!==e&&(n(e),o.current=e)},[t,e,n]),null}var pf=vw();const Yw=_i(pf);function S5(e,t){const n=er(),[o,i]=E.useState(!1),l=E.useRef(!1),c=E5(t),{activeProps:d,inactiveProps:f,activeOptions:h,to:v,preload:p,preloadDelay:y,hashScrollIntoView:_,replace:S,startTransition:w,resetScroll:T,viewTransition:O,children:A,target:C,disabled:R,style:I,className:k,onClick:D,onFocus:N,onMouseEnter:z,onMouseLeave:W,onTouchStart:$,ignoreBlocker:q,params:j,search:X,hash:oe,state:L,mask:F,reloadDocument:G,unsafeRelative:re,from:ye,_fromLocation:P,...Q}=e,te=Jn({select:Y=>Y.location.search,structuralSharing:!0}),se=e.from,me=E.useMemo(()=>({...e,from:se}),[n,te,se,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),_e=E.useMemo(()=>n.buildLocation({...me}),[n,me]),be=E.useMemo(()=>{if(R)return;let Y=_e.maskedLocation?_e.maskedLocation.url.href:_e.url.href,ue=!1;return n.origin&&(Y.startsWith(n.origin)?Y=n.history.createHref(Y.replace(n.origin,""))||"/":ue=!0),{href:Y,external:ue}},[R,_e.maskedLocation,_e.url,n.origin,n.history]),Se=E.useMemo(()=>{if(be?.external)return be.href;try{return new URL(v),v}catch{}},[v,be]),De=e.reloadDocument||Se?!1:p??n.options.defaultPreload,Le=y??n.options.defaultPreloadDelay??0,Ee=Jn({select:Y=>{if(Se)return!1;if(h?.exact){if(!D3(Y.location.pathname,_e.pathname,n.basepath))return!1}else{const ue=Ld(Y.location.pathname,n.basepath),pe=Ld(_e.pathname,n.basepath);if(!(ue.startsWith(pe)&&(ue.length===pe.length||ue[pe.length]==="/")))return!1}return(h?.includeSearch??!0)&&!di(Y.location.search,_e.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Y.location.hash===_e.hash:!0}}),ze=E.useCallback(()=>{n.preloadRoute({...me}).catch(Y=>{console.warn(Y),console.warn(l5)})},[n,me]),Nt=E.useCallback(Y=>{Y?.isIntersecting&&ze()},[ze]);_5(c,Nt,T5,{disabled:!!R||De!=="viewport"}),E.useEffect(()=>{l.current||!R&&De==="render"&&(ze(),l.current=!0)},[R,ze,De]);const ge=Y=>{const ue=Y.currentTarget.getAttribute("target"),pe=C!==void 0?C:ue;if(!R&&!A5(Y)&&!Y.defaultPrevented&&(!pe||pe==="_self")&&Y.button===0){Y.preventDefault(),pf.flushSync(()=>{i(!0)});const he=n.subscribe("onResolved",()=>{he(),i(!1)});n.navigate({...me,replace:S,resetScroll:T,hashScrollIntoView:_,startTransition:w,viewTransition:O,ignoreBlocker:q})}};if(Se)return{...Q,ref:c,href:Se,...A&&{children:A},...C&&{target:C},...R&&{disabled:R},...I&&{style:I},...k&&{className:k},...D&&{onClick:D},...N&&{onFocus:N},...z&&{onMouseEnter:z},...W&&{onMouseLeave:W},...$&&{onTouchStart:$}};const ve=Y=>{R||De&&ze()},Re=ve,ke=Y=>{if(!(R||!De))if(!Le)ze();else{const ue=Y.target;if(Dl.has(ue))return;const pe=setTimeout(()=>{Dl.delete(ue),ze()},Le);Dl.set(ue,pe)}},et=Y=>{if(R||!De||!Le)return;const ue=Y.target,pe=Dl.get(ue);pe&&(clearTimeout(pe),Dl.delete(ue))},Ue=Ee?Ra(d,{})??w5:vm,Qe=Ee?vm:Ra(f,{})??vm,U=[k,Ue.className,Qe.className].filter(Boolean).join(" "),Z=(I||Ue.style||Qe.style)&&{...I,...Ue.style,...Qe.style};return{...Q,...Ue,...Qe,href:be?.href,ref:c,onClick:Ll([D,ge]),onFocus:Ll([N,ve]),onMouseEnter:Ll([z,ke]),onMouseLeave:Ll([W,et]),onTouchStart:Ll([$,Re]),disabled:!!R,target:C,...Z&&{style:Z},...U&&{className:U},...R&&x5,...Ee&&R5,...o&&O5}}const vm={},w5={className:"active"},x5={role:"link","aria-disabled":!0},R5={"data-status":"active","aria-current":"page"},O5={"data-transitioning":"transitioning"},Dl=new WeakMap,T5={rootMargin:"100px"},Ll=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},mg=E.forwardRef((e,t)=>{const{_asChild:n,...o}=e,{type:i,ref:l,...c}=S5(o,t),d=typeof o.children=="function"?o.children({isActive:c["data-status"]==="active"}):o.children;return n===void 0&&delete c.disabled,E.createElement(n||"a",{...c,ref:l},d)});function A5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class C5 extends Hw{constructor(t){super(t),this.useMatch=n=>ho({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ho({...n,from:this.id,select:o=>n?.select?n.select(o.context):o.context}),this.useSearch=n=>pg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>fg({...n,from:this.id}),this.useLoaderData=n=>dg({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=V.forwardRef((n,o)=>b.jsx(mg,{ref:o,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function yn(e){return new C5(e)}class I5 extends c5{constructor(t){super(t),this.useMatch=n=>ho({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ho({...n,from:this.id,select:o=>n?.select?n.select(o.context):o.context}),this.useSearch=n=>pg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>fg({...n,from:this.id}),this.useLoaderData=n=>dg({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=V.forwardRef((n,o)=>b.jsx(mg,{ref:o,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function M5(e){return new I5(e)}function K_(e){return typeof e=="object"?new W_(e,{silent:!0}).createRoute(e):new W_(e,{silent:!0}).createRoute}class W_{constructor(t,n){this.path=t,this.createRoute=o=>{this.silent;const i=yn(o);return i.isRoot=!1,i},this.silent=n?.silent}}class Q_{constructor(t){this.useMatch=n=>ho({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ho({from:this.options.id,select:o=>n?.select?n.select(o.context):o.context}),this.useSearch=n=>pg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>fg({...n,from:this.options.id}),this.useLoaderData=n=>dg({...n,from:this.options.id}),this.useNavigate=()=>{const n=er();return mc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function X_(e){return typeof e=="object"?new Q_(e):t=>new Q_({id:e,...t})}function An(e,t){let n,o,i,l;const c=()=>(n||(n=e().then(f=>{n=void 0,o=f.default}).catch(f=>{if(i=f,g3(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),l=!0)}})),n),d=function(h){if(l)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!o)if(E.use)E.use(c());else throw c();return E.createElement(o,h)};return d.preload=c,d}function N5(){const e=er(),t=E.useRef({router:e,mounted:!1}),[n,o]=E.useState(!1),{hasPendingMatches:i,isLoading:l}=Jn({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(y=>y.status==="pending")}),structuralSharing:!0}),c=mm(l),d=l||n||i,f=mm(d),h=l||i,v=mm(h);return e.startTransition=p=>{o(!0),E.startTransition(()=>{p(),o(!1)})},E.useEffect(()=>{const p=e.history.subscribe(e.load),y=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return fi(e.latestLocation.publicHref)!==fi(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{p()}},[e,e.history]),Hl(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(y){console.error(y)}})()},[e]),Hl(()=>{c&&!l&&e.emit({type:"onLoad",...hi(e.state)})},[c,e,l]),Hl(()=>{v&&!h&&e.emit({type:"onBeforeRouteMount",...hi(e.state)})},[h,v,e]),Hl(()=>{if(f&&!d){const p=hi(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),p.hrefChanged&&F3(e)}},[d,f,e]),null}function D5(e){const t=Jn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(ug,{getResetKey:()=>t,onCatch:(n,o)=>{if(vr(n))e.onCatch?.(n,o);else throw n},errorComponent:({error:n})=>{if(vr(n))return e.fallback?.(n);throw n},children:e.children})}function L5(){return b.jsx("p",{children:"Not Found"})}function bs(e){return b.jsx(b.Fragment,{children:e.children})}function Kw(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(L5,{})}function P5({children:e}){const t=er();return t.isServer?b.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function k5(){const e=er();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||pv)(e.latestLocation),o=n!==pv(e.latestLocation)?n:void 0,i={storageKey:Pd,shouldScrollRestoration:!0};return o&&(i.key=o),b.jsx(P5,{children:`(${Lw.toString()})(${JSON.stringify(i)})`})}const Ww=E.memo(function({matchId:t}){const n=er(),o=Jn({select:O=>{const A=O.matches.find(C=>C.id===t);return Fo(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),i=n.routesById[o.routeId],l=i.options.pendingComponent??n.options.defaultPendingComponent,c=l?b.jsx(l,{}):null,d=i.options.errorComponent??n.options.defaultErrorComponent,f=i.options.onCatch??n.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,v=o.ssr===!1||o.ssr==="data-only",p=(!i.isRoot||i.options.wrapInSuspense||v)&&(i.options.wrapInSuspense??l??(i.options.errorComponent?.preload||v))?E.Suspense:bs,y=d?ug:bs,_=h?D5:bs,S=Jn({select:O=>O.loadedAt}),w=Jn({select:O=>{const A=O.matches.findIndex(C=>C.id===t);return O.matches[A-1]?.routeId}}),T=i.isRoot?i.options.shellComponent??bs:bs;return b.jsxs(T,{children:[b.jsx(hf.Provider,{value:t,children:b.jsx(p,{fallback:c,children:b.jsx(y,{getResetKey:()=>S,errorComponent:d||ff,onCatch:(O,A)=>{if(vr(O))throw O;f?.(O,A)},children:b.jsx(_,{fallback:O=>{if(!h||O.routeId&&O.routeId!==o.routeId||!O.routeId&&!i.isRoot)throw O;return E.createElement(h,O)},children:v||o._displayPending?b.jsx(d5,{fallback:c,children:b.jsx(J_,{matchId:t})}):b.jsx(J_,{matchId:t})})})})}),w===ur&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(j5,{}),b.jsx(k5,{})]}):null]})});function j5(){const e=er(),t=E.useRef(void 0);return b.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...hi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const J_=E.memo(function({matchId:t}){const n=er(),{match:o,key:i,routeId:l}=Jn({select:f=>{const h=f.matches.find(S=>S.id===t),v=h.routeId,y=(n.routesById[v].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:v,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:y?JSON.stringify(y):void 0,routeId:v,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),c=n.routesById[l],d=E.useMemo(()=>{const f=c.options.component??n.options.defaultComponent;return f?b.jsx(f,{},i):b.jsx(Qw,{})},[i,c.options.component,n.options.defaultComponent]);if(o._displayPending)throw n.getMatch(o.id)?._nonReactive.displayPendingPromise;if(o._forcePending)throw n.getMatch(o.id)?._nonReactive.minPendingPromise;if(o.status==="pending"){const f=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const h=n.getMatch(o.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const v=Cs();h._nonReactive.minPendingPromise=v,setTimeout(()=>{v.resolve(),h._nonReactive.minPendingPromise=void 0},f)}}throw n.getMatch(o.id)?._nonReactive.loadPromise}if(o.status==="notFound")return Fo(vr(o.error)),Kw(n,c,o.error);if(o.status==="redirected")throw Fo(Pr(o.error)),n.getMatch(o.id)?._nonReactive.loadPromise;if(o.status==="error"){if(n.isServer){const f=(c.options.errorComponent??n.options.defaultErrorComponent)||ff;return b.jsx(f,{error:o.error,reset:void 0,info:{componentStack:""}})}throw o.error}return d}),Qw=E.memo(function(){const t=er(),n=E.useContext(hf),o=Jn({select:h=>h.matches.find(v=>v.id===n)?.routeId}),i=t.routesById[o],l=Jn({select:h=>{const p=h.matches.find(y=>y.id===n);return Fo(p),p.globalNotFound}}),c=Jn({select:h=>{const v=h.matches,p=v.findIndex(y=>y.id===n);return v[p+1]?.id}}),d=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(l)return Kw(t,i,void 0);if(!c)return null;const f=b.jsx(Ww,{matchId:c});return o===ur?b.jsx(E.Suspense,{fallback:d,children:f}):f});function z5(){const e=er(),n=e.routesById[ur].options.pendingComponent??e.options.defaultPendingComponent,o=n?b.jsx(n,{}):null,i=e.isServer||typeof document<"u"&&e.ssr?bs:E.Suspense,l=b.jsxs(i,{fallback:o,children:[!e.isServer&&b.jsx(N5,{}),b.jsx(U5,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:l}):l}function U5(){const e=er(),t=Jn({select:i=>i.matches[0]?.id}),n=Jn({select:i=>i.loadedAt}),o=t?b.jsx(Ww,{matchId:t}):null;return b.jsx(hf.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?o:b.jsx(ug,{getResetKey:()=>n,errorComponent:ff,onCatch:i=>{i.message||i.toString()},children:o})})}const B5=e=>new F5(e);class F5 extends r5{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=K_,globalThis.createLazyFileRoute=X_):typeof window<"u"&&(window.createFileRoute=K_,window.createLazyFileRoute=X_);function $5({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const o=Zw(),i=b.jsx(o.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:i}):i}function V5({router:e,...t}){return b.jsx($5,{router:e,...t,children:b.jsx(z5,{})})}var H5={},eE={};const bd=Object.create(null),Pl=e=>H5||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?bd:globalThis),Lr=new Proxy(bd,{get(e,t){return Pl()[t]??bd[t]},has(e,t){return t in Pl()||t in bd},set(e,t,n){const o=Pl(!0);return o[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=Pl(!0);return delete n[t],!0},ownKeys(){const e=Pl(!0);return Object.keys(e)}});function Jt(e,t){return typeof process<"u"&&eE?eE[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const kl=1,mn=4,so=8,fr=24,tE={eterm:mn,cons25:mn,console:mn,cygwin:mn,dtterm:mn,gnome:mn,hurd:mn,jfbterm:mn,konsole:mn,kterm:mn,mlterm:mn,mosh:fr,putty:mn,st:mn,"rxvt-unicode-24bit":fr,terminator:fr,"xterm-kitty":fr},G5=new Map(Object.entries({APPVEYOR:so,BUILDKITE:so,CIRCLECI:fr,DRONE:so,GITEA_ACTIONS:fr,GITHUB_ACTIONS:fr,GITLAB_CI:so,TRAVIS:so})),q5=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function Z5(){if(Jt("FORCE_COLOR")!==void 0)switch(Jt("FORCE_COLOR")){case"":case"1":case"true":return mn;case"2":return so;case"3":return fr;default:return kl}if(Jt("NODE_DISABLE_COLORS")!==void 0&&Jt("NODE_DISABLE_COLORS")!==""||Jt("NO_COLOR")!==void 0&&Jt("NO_COLOR")!==""||Jt("TERM")==="dumb")return kl;if(Jt("TMUX"))return fr;if("TF_BUILD"in Lr&&"AGENT_NAME"in Lr)return mn;if("CI"in Lr){for(const{0:e,1:t}of G5)if(e in Lr)return t;return Jt("CI_NAME")==="codeship"?so:kl}if("TEAMCITY_VERSION"in Lr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Jt("TEAMCITY_VERSION"))!==null?mn:kl;switch(Jt("TERM_PROGRAM")){case"iTerm.app":return!Jt("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Jt("TERM_PROGRAM_VERSION"))!==null?so:fr;case"HyperTerm":case"MacTerm":return fr;case"Apple_Terminal":return so}if(Jt("COLORTERM")==="truecolor"||Jt("COLORTERM")==="24bit")return fr;if(Jt("TERM")){if(/truecolor/.exec(Jt("TERM"))!==null)return fr;if(/^xterm-256/.exec(Jt("TERM"))!==null)return so;const e=Jt("TERM").toLowerCase();if(tE[e])return tE[e];if(q5.some(t=>t.exec(e)!==null))return mn}return Jt("COLORTERM")?mn:kl}const lo={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},vv=["debug","info","success","warn","error"];function Y5(e,t){return vv.indexOf(t)>=vv.indexOf(e)}const K5={info:lo.fg.blue,success:lo.fg.green,warn:lo.fg.yellow,error:lo.fg.red,debug:lo.fg.magenta},W5=(e,t,n)=>{const o=new Date().toISOString();return n?`${lo.dim}${o}${lo.reset} ${K5[e]}${e.toUpperCase()}${lo.reset} ${lo.bright}[Better Auth]:${lo.reset} ${t}`:`${o} ${e.toUpperCase()} [Better Auth]: ${t}`},Q5=e=>{const t="error",n=Z5()!==1,o=(i,l,c=[])=>{if(!Y5(t,i))return;const d=W5(i,l,n);{i==="error"?console.error(d,...c):i==="warn"?console.warn(d,...c):console.log(d,...c);return}};return{...Object.fromEntries(vv.map(i=>[i,(...[l,...c])=>o(i,l,c)])),get level(){return t}}};Q5();var Wl=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function X5(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Wl(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function J5(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Wl(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Wl?t:new Wl(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function gm(e,t="/api/auth"){if(J5(e),X5(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function e6(e,t,n,o,i){if(e)return gm(e,t);{const l=Lr.BETTER_AUTH_URL||Lr.NEXT_PUBLIC_BETTER_AUTH_URL||Lr.PUBLIC_BETTER_AUTH_URL||Lr.NUXT_PUBLIC_BETTER_AUTH_URL||Lr.NUXT_PUBLIC_AUTH_URL||(Lr.BASE_URL!=="/"?Lr.BASE_URL:void 0);if(l)return gm(l,t)}if(typeof window<"u"&&window.location)return gm(window.location.origin,t)}const t6={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},n6=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,nE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},r6=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function o6(e){return e instanceof Date&&!isNaN(e.getTime())}function a6(e){const t=r6.exec(e);if(!t)return null;const[,n,o,i,l,c,d,f,h,v,p]=t;let y=new Date(Date.UTC(parseInt(n,10),parseInt(o,10)-1,parseInt(i,10),parseInt(l,10),parseInt(c,10),parseInt(d,10),f?parseInt(f.padEnd(3,"0"),10):0));if(h){const _=(parseInt(v,10)*60+parseInt(p,10))*(h==="+"?-1:1);y.setUTCMinutes(y.getUTCMinutes()+_)}return o6(y)?y:null}function i6(e,t={}){const{strict:n=!1,warnings:o=!1,reviver:i,parseDates:l=!0}=t;if(typeof e!="string")return e;const c=e.trim();if(c.length>0&&c[0]==='"'&&c.endsWith('"')&&!c.slice(1,-1).includes('"'))return c.slice(1,-1);const d=c.toLowerCase();if(d.length<=9&&d in nE)return nE[d];if(!n6.test(c)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(t6).some(([f,h])=>{const v=h.test(c);return v&&o&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${f} pattern`),v})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(c,(h,v)=>{if(h==="__proto__"||h==="constructor"&&v&&typeof v=="object"&&"prototype"in v){o&&console.warn(`[better-json] Dropping "${h}" key to prevent prototype pollution`);return}if(l&&typeof v=="string"){const p=a6(v);if(p)return p}return i?i(h,v):v})}catch(f){if(n)throw f;return e}}function s6(e,t={strict:!0}){return i6(e,t)}let $r=[],ga=0;const qu=4,Ss=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(o){return n.lc=t.push(o),()=>{for(let l=ga+qu;l<$r.length;)$r[l]===o?$r.splice(l,qu):l+=qu;let i=t.indexOf(o);~i&&(t.splice(i,1),--n.lc||n.off())}},notify(o,i){let l=!$r.length;for(let c of t)$r.push(c,n.value,o,i);if(l){for(ga=0;ga<$r.length;ga+=qu)$r[ga]($r[ga+1],$r[ga+2],$r[ga+3]);$r.length=0}},off(){},set(o){let i=n.value;i!==o&&(n.value=o,n.notify(i))},subscribe(o){let i=n.listen(o);return o(n.value),i},value:e};return n},l6=5,Zu=6,Yu=10;let c6=(e,t,n,o)=>(e.events=e.events||{},e.events[n+Yu]||(e.events[n+Yu]=o(i=>{e.events[n].reduceRight((l,c)=>(c(l),l),{shared:{},...i})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let i=e.events[n],l=i.indexOf(t);i.splice(l,1),i.length||(delete e.events[n],e.events[n+Yu](),delete e.events[n+Yu])}),u6=1e3,Xw=(e,t)=>c6(e,o=>{let i=t(o);i&&e.events[Zu].push(i)},l6,o=>{let i=e.listen;e.listen=(...c)=>(!e.lc&&!e.active&&(e.active=!0,o()),i(...c));let l=e.off;return e.events[Zu]=[],e.off=()=>{l(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let c of e.events[Zu])c();e.events[Zu]=[]}},u6)},()=>{e.listen=i,e.off=l}});function d6(e,t,n){let o=new Set(t).add(void 0);return e.listen((i,l,c)=>{o.has(c)&&n(i,l,c)})}var f6=Object.defineProperty,h6=Object.defineProperties,p6=Object.getOwnPropertyDescriptors,rE=Object.getOwnPropertySymbols,m6=Object.prototype.hasOwnProperty,v6=Object.prototype.propertyIsEnumerable,oE=(e,t,n)=>t in e?f6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gr=(e,t)=>{for(var n in t||(t={}))m6.call(t,n)&&oE(e,n,t[n]);if(rE)for(var n of rE(t))v6.call(t,n)&&oE(e,n,t[n]);return e},io=(e,t)=>h6(e,p6(t)),g6=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},y6=async(e,t)=>{var n,o,i,l,c,d;let f=t||{};const h={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:f,hooks:h};for(const v of t?.plugins||[]){if(v.init){const p=await((n=v.init)==null?void 0:n.call(v,e.toString(),t));f=p.options||f,e=p.url}h.onRequest.push((o=v.hooks)==null?void 0:o.onRequest),h.onResponse.push((i=v.hooks)==null?void 0:i.onResponse),h.onSuccess.push((l=v.hooks)==null?void 0:l.onSuccess),h.onError.push((c=v.hooks)==null?void 0:c.onError),h.onRetry.push((d=v.hooks)==null?void 0:d.onRetry)}return{url:e,options:f,hooks:h}},aE=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},b6=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function _6(e){if(typeof e=="number")return new aE({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new aE(e);case"exponential":return new b6(e);default:throw new Error("Invalid retry strategy")}}var E6=async e=>{const t={},n=async o=>typeof o=="function"?await o():o;if(e?.auth){if(e.auth.type==="Bearer"){const o=await n(e.auth.token);if(!o)return t;t.authorization=`Bearer ${o}`}else if(e.auth.type==="Basic"){const o=n(e.auth.username),i=n(e.auth.password);if(!o||!i)return t;t.authorization=`Basic ${btoa(`${o}:${i}`)}`}else if(e.auth.type==="Custom"){const o=n(e.auth.value);if(!o)return t;t.authorization=`${n(e.auth.prefix)} ${o}`}}return t},S6=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function w6(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const o=t.split(";").shift()||"";return S6.test(o)?"json":n.has(o)||o.startsWith("text/")?"text":"blob"}function x6(e){try{return JSON.parse(e),!0}catch{return!1}}function Jw(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function iE(e){try{return JSON.parse(e)}catch{return e}}function sE(e){return typeof e=="function"}function R6(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&sE(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&sE(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function O6(e){const t=new Headers(e?.headers),n=await E6(e);for(const[o,i]of Object.entries(n||{}))t.set(o,i);if(!t.has("content-type")){const o=T6(e?.body);o&&t.set("content-type",o)}return t}function T6(e){return Jw(e)?"application/json":null}function A6(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(Jw(e.body)&&!t.has("content-type")){for(const[n,o]of Object.entries(e?.body))o instanceof Date&&(e.body[n]=o.toISOString());return JSON.stringify(e.body)}return e.body}function C6(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const o=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return tx.includes(o)?o.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function I6(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var M6=class ex extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,ex.prototype)}};async function _d(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new M6(n.issues);return n.value}var tx=["get","post","put","patch","delete"],N6=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var o,i,l,c;const d=((i=(o=e.plugins)==null?void 0:o.find(f=>{var h;return(h=f.schema)!=null&&h.config?t.startsWith(f.schema.config.baseURL||"")||t.startsWith(f.schema.config.prefix||""):!1}))==null?void 0:i.schema)||e.schema;if(d){let f=t;(l=d.config)!=null&&l.prefix&&f.startsWith(d.config.prefix)&&(f=f.replace(d.config.prefix,""),d.config.baseURL&&(t=t.replace(d.config.prefix,d.config.baseURL))),(c=d.config)!=null&&c.baseURL&&f.startsWith(d.config.baseURL)&&(f=f.replace(d.config.baseURL,""));const h=d.schema[f];if(h){let v=io(Gr({},n),{method:h.method,output:h.output});return n?.disableValidation||(v=io(Gr({},v),{body:h.input?await _d(h.input,n?.body):n?.body,params:h.params?await _d(h.params,n?.params):n?.params,query:h.query?await _d(h.query,n?.query):n?.query})),{url:t,options:v}}}return{url:t,options:n}}}),D6=e=>{async function t(n,o){const i=io(Gr(Gr({},e),o),{plugins:[...e?.plugins||[],N6(e||{})]});if(e?.catchAllError)try{return await gv(n,i)}catch(l){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:l}}}return await gv(n,i)}return t};function L6(e,t){let{baseURL:n,params:o,query:i}=t||{query:{},params:{},baseURL:""},l=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];tx.includes(p)&&(e=e.replace(`@${p}/`,"/"))}l.endsWith("/")||(l+="/");let[c,d]=e.replace(l,"").split("?");const f=new URLSearchParams(d);for(const[p,y]of Object.entries(i||{}))y!=null&&f.set(p,String(y));if(o)if(Array.isArray(o)){const p=c.split("/").filter(y=>y.startsWith(":"));for(const[y,_]of p.entries()){const S=o[y];c=c.replace(_,S)}}else for(const[p,y]of Object.entries(o))c=c.replace(`:${p}`,String(y));c=c.split("/").map(encodeURIComponent).join("/"),c.startsWith("/")&&(c=c.slice(1));let h=f.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",l.startsWith("http")?new URL(`${c}${h}`,l):`${l}${c}${h}`}var gv=async(e,t)=>{var n,o,i,l,c,d,f,h;const{hooks:v,url:p,options:y}=await y6(e,t),_=R6(y),S=new AbortController,w=(n=y.signal)!=null?n:S.signal,T=L6(p,y),O=A6(y),A=await O6(y),C=C6(p,y);let R=io(Gr({},y),{url:T,headers:A,body:O,method:C,signal:w});for(const j of v.onRequest)if(j){const X=await j(R);X instanceof Object&&(R=X)}("pipeTo"in R&&typeof R.pipeTo=="function"||typeof((o=t?.body)==null?void 0:o.pipe)=="function")&&("duplex"in R||(R.duplex="half"));const{clearTimeout:I}=I6(y,S);let k=await _(R.url,R);I();const D={response:k,request:R};for(const j of v.onResponse)if(j){const X=await j(io(Gr({},D),{response:(i=t?.hookOptions)!=null&&i.cloneResponse?k.clone():k}));X instanceof Response?k=X:X instanceof Object&&(k=X.response)}if(k.ok){if(!(R.method!=="HEAD"))return{data:"",error:null};const X=w6(k),oe={data:"",response:k,request:R};if(X==="json"||X==="text"){const L=await k.text(),G=await((l=R.jsonParser)!=null?l:iE)(L);oe.data=G}else oe.data=await k[X]();R?.output&&R.output&&!R.disableValidation&&(oe.data=await _d(R.output,oe.data));for(const L of v.onSuccess)L&&await L(io(Gr({},oe),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?k.clone():k}));return t?.throw?oe.data:{data:oe.data,error:null}}const N=(d=t?.jsonParser)!=null?d:iE,z=await k.text(),W=x6(z),$=W?await N(z):null,q={response:k,responseText:z,request:R,error:io(Gr({},$),{status:k.status,statusText:k.statusText})};for(const j of v.onError)j&&await j(io(Gr({},q),{response:(f=t?.hookOptions)!=null&&f.cloneResponse?k.clone():k}));if(t?.retry){const j=_6(t.retry),X=(h=t.retryAttempt)!=null?h:0;if(await j.shouldAttemptRetry(X,k)){for(const L of v.onRetry)L&&await L(D);const oe=j.getDelay(X);return await new Promise(L=>setTimeout(L,oe)),await gv(e,io(Gr({},t),{retryAttempt:X+1}))}}if(t?.throw)throw new g6(k.status,k.statusText,W?$:z);return{data:null,error:io(Gr({},$),{status:k.status,statusText:k.statusText})}};const ym=Symbol.for("better-auth:broadcast-channel"),P6=()=>Math.floor(Date.now()/1e3);var k6=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:P6()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(o=>o(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function bm(e="better-auth.message"){return globalThis[ym]||(globalThis[ym]=new k6(e)),globalThis[ym]}const _m=Symbol.for("better-auth:focus-manager");var j6=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function lE(){return globalThis[_m]||(globalThis[_m]=new j6),globalThis[_m]}const Em=Symbol.for("better-auth:online-manager");var z6=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function Sm(){return globalThis[Em]||(globalThis[Em]=new z6),globalThis[Em]}const U6=()=>typeof window>"u",Gl=(e,t,n,o)=>{const i=Ss({data:null,error:null,isPending:!0,isRefetching:!1,refetch:d=>l(d)}),l=async d=>new Promise(f=>{const h=typeof o=="function"?o({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):o;n(t,{...h,query:{...h?.query,...d?.query},async onSuccess(v){i.set({data:v.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await h?.onSuccess?.(v)},async onError(v){const{request:p}=v,y=typeof p.retry=="number"?p.retry:p.retry?.attempts,_=p.retryAttempt||0;y&&_<y||(i.set({error:v.error,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await h?.onError?.(v))},async onRequest(v){const p=i.get();i.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await h?.onRequest?.(v)}}).catch(v=>{i.set({error:v,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{f(void 0)})});e=Array.isArray(e)?e:[e];let c=!1;for(const d of e)d.subscribe(async()=>{U6()||(c?await l():Xw(i,()=>{const f=setTimeout(async()=>{c||(await l(),c=!0)},0);return()=>{i.off(),d.off(),clearTimeout(f)}}))});return i},us=()=>Math.floor(Date.now()/1e3),B6=5;function F6(e){const{sessionAtom:t,sessionSignal:n,$fetch:o,options:i={}}=e,l=i.sessionOptions?.refetchInterval??0,c=i.sessionOptions?.refetchOnWindowFocus??!0,d=i.sessionOptions?.refetchWhenOffline??!1,f={lastSync:0,lastSessionRequest:0,cachedSession:void 0},h=()=>d||Sm().isOnline,v=A=>{if(!h())return;if(A?.event==="storage"){f.lastSync=us(),n.set(!n.get());return}const C=t.get();if(A?.event==="poll"){f.lastSessionRequest=us(),o("/get-session").then(R=>{t.set({...C,data:R.data,error:R.error||null}),f.lastSync=us(),n.set(!n.get())}).catch(()=>{});return}A?.event==="visibilitychange"&&us()-f.lastSessionRequest<B6&&C?.data!==null&&C?.data!==void 0||(C?.data===null||C?.data===void 0||A?.event==="visibilitychange")&&(A?.event==="visibilitychange"&&(f.lastSessionRequest=us()),f.lastSync=us(),n.set(!n.get()))},p=A=>{bm().post({event:"session",data:{trigger:A},clientId:Math.random().toString(36).substring(7)})},y=()=>{l&&l>0&&(f.pollInterval=setInterval(()=>{t.get()?.data&&v({event:"poll"})},l*1e3))},_=()=>{f.unsubscribeBroadcast=bm().subscribe(()=>{v({event:"storage"})})},S=()=>{c&&(f.unsubscribeFocus=lE().subscribe(()=>{v({event:"visibilitychange"})}))},w=()=>{f.unsubscribeOnline=Sm().subscribe(A=>{A&&v({event:"visibilitychange"})})};return{init:()=>{y(),_(),S(),w(),bm().setup(),lE().setup(),Sm().setup()},cleanup:()=>{f.pollInterval&&(clearInterval(f.pollInterval),f.pollInterval=void 0),f.unsubscribeBroadcast&&(f.unsubscribeBroadcast(),f.unsubscribeBroadcast=void 0),f.unsubscribeFocus&&(f.unsubscribeFocus(),f.unsubscribeFocus=void 0),f.unsubscribeOnline&&(f.unsubscribeOnline(),f.unsubscribeOnline=void 0),f.lastSync=0,f.lastSessionRequest=0,f.cachedSession=void 0},triggerRefetch:v,broadcastSessionUpdate:p}}const $6={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function V6(e,t){const n=Ss(!1),o=Gl(n,"/get-session",e,{method:"GET"});return Xw(o,()=>{const i=F6({sessionAtom:o,sessionSignal:n,$fetch:e,options:t});return i.init(),()=>{i.cleanup()}}),{session:o,$sessionSignal:n}}const H6=(e,t)=>{const n="credentials"in Request.prototype,o=e6(e?.baseURL,e?.basePath)??"/api/auth",i=e?.plugins?.flatMap(R=>R.fetchPlugins).filter(R=>R!==void 0)||[],l={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:c,onError:d,onRequest:f,onResponse:h,...v}=e?.fetchOptions||{},p=D6({baseURL:o,...n?{credentials:"include"}:{},method:"GET",jsonParser(R){return R?s6(R,{strict:!1}):null},customFetchImpl:fetch,...v,plugins:[l,...v.plugins||[],...e?.disableDefaultFetchPlugins?[]:[$6],...i]}),{$sessionSignal:y,session:_}=V6(p,e),S=e?.plugins||[];let w={},T={$sessionSignal:y,session:_},O={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const A=[{signal:"$sessionSignal",matcher(R){return R==="/sign-out"||R==="/update-user"||R==="/sign-up/email"||R==="/sign-in/email"||R==="/delete-user"||R==="/verify-email"||R==="/revoke-sessions"||R==="/revoke-session"||R==="/change-email"}}];for(const R of S)R.getAtoms&&Object.assign(T,R.getAtoms?.(p)),R.pathMethods&&Object.assign(O,R.pathMethods),R.atomListeners&&A.push(...R.atomListeners);const C={notify:R=>{T[R].set(!T[R].get())},listen:(R,I)=>{T[R].subscribe(I)},atoms:T};for(const R of S)R.getActions&&Object.assign(w,R.getActions?.(p,C,e));return{get baseURL(){return o},pluginsActions:w,pluginsAtoms:T,pluginPathMethods:O,atomListeners:A,$fetch:p,$store:C}};function G6(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function q6(e,t,n){const o=t[e],{fetchOptions:i,query:l,...c}=n||{};return o||(i?.method?i.method:c&&Object.keys(c).length>0?"POST":"GET")}function Z6(e,t,n,o,i){function l(c=[]){return new Proxy(function(){},{get(d,f){if(typeof f!="string"||f==="then"||f==="catch"||f==="finally")return;const h=[...c,f];let v=e;for(const p of h)if(v&&typeof v=="object"&&p in v)v=v[p];else{v=void 0;break}return typeof v=="function"||G6(v)?v:l(h)},apply:async(d,f,h)=>{const v="/"+c.map(A=>A.replace(/[A-Z]/g,C=>`-${C.toLowerCase()}`)).join("/"),p=h[0]||{},y=h[1]||{},{query:_,fetchOptions:S,...w}=p,T={...y,...S},O=q6(v,n,p);return await t(v,{...T,body:O==="GET"?void 0:{...w,...T?.body||{}},query:_||T?.query,method:O,async onSuccess(A){if(await T?.onSuccess?.(A),!i||T.disableSignal)return;const C=i.filter(R=>R.matcher(v));if(C.length)for(const R of C){const I=o[R.signal];if(!I)return;const k=I.get();setTimeout(()=>{I.set(!k)},10)}}})}})}return l()}function Y6(e,t={}){let n=E.useRef(e.get());const{keys:o,deps:i=[e,o]}=t;let l=E.useCallback(d=>{const f=h=>{n.current!==h&&(n.current=h,d())};return f(e.value),o?.length?d6(e,o,f):e.listen(f)},i),c=()=>n.current;return E.useSyncExternalStore(l,c,c)}function K6(e){return`use${W6(e)}`}function W6(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Q6(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:o,$fetch:i,$store:l,atomListeners:c}=H6(e);let d={};for(const[f,h]of Object.entries(o))d[K6(f)]=()=>Y6(h);return Z6({...n,...d,$fetch:i,$store:l},i,t,o,c)}function X6(e){return{authorize(t,n="AND"){let o=!1;for(const[i,l]of Object.entries(t)){const c=e[i];if(!c)return{success:!1,error:`You are not allowed to access resource: ${i}`};if(Array.isArray(l))o=l.every(d=>c.includes(d));else if(typeof l=="object"){const d=l;d.connector==="OR"?o=d.actions.some(f=>c.includes(f)):o=d.actions.every(f=>c.includes(f))}else throw new Wl("Invalid access control request");if(o&&n==="OR")return{success:o};if(!o&&n==="AND")return{success:!1,error:`unauthorized to access resource "${i}"`}}return o?{success:o}:{success:!1,error:"Not authorized"}},statements:e}}function nx(e){return{newRole(t){return X6(t)},statements:e}}const J6={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},rx=nx(J6),ox=rx.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),ax=rx.newRole({user:[],session:[]}),eI={admin:ox,user:ax},tI=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||eI;for(const o of t)if(n[o]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},nI={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},vg=nx(nI),ix=vg.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),sx=vg.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),lx=vg.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),rI={admin:ix,owner:sx,member:lx},oI=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),o=e.options.creatorRole||"owner",i=n.includes(o),l=e.allowCreatorAllPermissions||!1;if(i&&l)return!0;for(const c of n)if(t[c]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},aI=e=>{const t={admin:ox,user:ax,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>tI({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},iI=()=>({id:"magic-link",$InferServerPlugin:{}}),sI=e=>oI(e,e.options.roles||rI),lI=e=>{const t=Ss(!1),n=Ss(!1),o=Ss(!1),i=Ss(!1),l={admin:ix,member:lx,owner:sx,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(c,d,f)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:h=>sI({role:h.role,options:{ac:e?.ac,roles:l},permissions:h.permissions??h.permission})}}),getAtoms:c=>{const d=Gl(t,"/organization/list",c,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:o,$activeMemberRoleSignal:i,activeOrganization:Gl([n],"/organization/get-full-organization",c,()=>({method:"GET"})),listOrganizations:d,activeMember:Gl([o],"/organization/get-active-member",c,{method:"GET"}),activeMemberRole:Gl([i],"/organization/get-active-member-role",c,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(c){return c==="/organization/create"||c==="/organization/delete"||c==="/organization/update"},signal:"$listOrg"},{matcher(c){return c.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(c){return c.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},cI=e=>({id:"sso-client",$InferServerPlugin:{}}),uI=Q6({plugins:[lI({}),aI(),cI(),iI()]});function cx(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=cx(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function ux(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=cx(e))&&(o&&(o+=" "),o+=t);return o}const dI=(e,t)=>{const n=new Array(e.length+t.length);for(let o=0;o<e.length;o++)n[o]=e[o];for(let o=0;o<t.length;o++)n[e.length+o]=t[o];return n},fI=(e,t)=>({classGroupId:e,validator:t}),dx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),zd="-",cE=[],hI="arbitrary..",pI=e=>{const t=vI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return mI(c);const d=c.split(zd),f=d[0]===""&&d.length>1?1:0;return fx(d,f,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const f=o[c],h=n[c];return f?h?dI(h,f):f:h||cE}return n[c]||cE}}},fx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],l=n.nextPart.get(i);if(l){const h=fx(e,t+1,l);if(h)return h}const c=n.validators;if(c===null)return;const d=t===0?e.join(zd):e.slice(t).join(zd),f=c.length;for(let h=0;h<f;h++){const v=c[h];if(v.validator(d))return v.classGroupId}},mI=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?hI+o:void 0})(),vI=e=>{const{theme:t,classGroups:n}=e;return gI(n,t)},gI=(e,t)=>{const n=dx();for(const o in e){const i=e[o];gg(i,n,o,t)}return n},gg=(e,t,n,o)=>{const i=e.length;for(let l=0;l<i;l++){const c=e[l];yI(c,t,n,o)}},yI=(e,t,n,o)=>{if(typeof e=="string"){bI(e,t,n);return}if(typeof e=="function"){_I(e,t,n,o);return}EI(e,t,n,o)},bI=(e,t,n)=>{const o=e===""?t:hx(t,e);o.classGroupId=n},_I=(e,t,n,o)=>{if(SI(e)){gg(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(fI(n,e))},EI=(e,t,n,o)=>{const i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){const[d,f]=i[c];gg(f,hx(t,d),n,o)}},hx=(e,t)=>{let n=e;const o=t.split(zd),i=o.length;for(let l=0;l<i;l++){const c=o[l];let d=n.nextPart.get(c);d||(d=dx(),n.nextPart.set(c,d)),n=d}return n},SI=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,wI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const i=(l,c)=>{n[l]=c,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=o[l])!==void 0)return i(l,c),c},set(l,c){l in n?n[l]=c:i(l,c)}}},yv="!",uE=":",xI=[],dE=(e,t,n,o,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:i}),RI=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=i=>{const l=[];let c=0,d=0,f=0,h;const v=i.length;for(let w=0;w<v;w++){const T=i[w];if(c===0&&d===0){if(T===uE){l.push(i.slice(f,w)),f=w+1;continue}if(T==="/"){h=w;continue}}T==="["?c++:T==="]"?c--:T==="("?d++:T===")"&&d--}const p=l.length===0?i:i.slice(f);let y=p,_=!1;p.endsWith(yv)?(y=p.slice(0,-1),_=!0):p.startsWith(yv)&&(y=p.slice(1),_=!0);const S=h&&h>f?h-f:void 0;return dE(l,_,y,S)};if(t){const i=t+uE,l=o;o=c=>c.startsWith(i)?l(c.slice(i.length)):dE(xI,!1,c,void 0,!0)}if(n){const i=o;o=l=>n({className:l,parseClassName:i})}return o},OI=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,o)=>{t.set(n,1e6+o)}),n=>{const o=[];let i=[];for(let l=0;l<n.length;l++){const c=n[l],d=c[0]==="[",f=t.has(c);d||f?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(c)):i.push(c)}return i.length>0&&(i.sort(),o.push(...i)),o}},TI=e=>({cache:wI(e.cacheSize),parseClassName:RI(e),sortModifiers:OI(e),...pI(e)}),AI=/\s+/,CI=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:l}=t,c=[],d=e.trim().split(AI);let f="";for(let h=d.length-1;h>=0;h-=1){const v=d[h],{isExternal:p,modifiers:y,hasImportantModifier:_,baseClassName:S,maybePostfixModifierPosition:w}=n(v);if(p){f=v+(f.length>0?" "+f:f);continue}let T=!!w,O=o(T?S.substring(0,w):S);if(!O){if(!T){f=v+(f.length>0?" "+f:f);continue}if(O=o(S),!O){f=v+(f.length>0?" "+f:f);continue}T=!1}const A=y.length===0?"":y.length===1?y[0]:l(y).join(":"),C=_?A+yv:A,R=C+O;if(c.indexOf(R)>-1)continue;c.push(R);const I=i(O,T);for(let k=0;k<I.length;++k){const D=I[k];c.push(C+D)}f=v+(f.length>0?" "+f:f)}return f},II=(...e)=>{let t=0,n,o,i="";for(;t<e.length;)(n=e[t++])&&(o=px(n))&&(i&&(i+=" "),i+=o);return i},px=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=px(e[o]))&&(n&&(n+=" "),n+=t);return n},MI=(e,...t)=>{let n,o,i,l;const c=f=>{const h=t.reduce((v,p)=>p(v),e());return n=TI(h),o=n.cache.get,i=n.cache.set,l=d,d(f)},d=f=>{const h=o(f);if(h)return h;const v=CI(f,n);return i(f,v),v};return l=c,(...f)=>l(II(...f))},NI=[],ln=e=>{const t=n=>n[e]||NI;return t.isThemeGetter=!0,t},mx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,DI=/^\d+\/\d+$/,LI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ds=e=>DI.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),ya=e=>!!e&&Number.isInteger(Number(e)),wm=e=>e.endsWith("%")&&We(e.slice(0,-1)),Uo=e=>LI.test(e),UI=()=>!0,BI=e=>PI.test(e)&&!kI.test(e),gx=()=>!1,FI=e=>jI.test(e),$I=e=>zI.test(e),VI=e=>!Ae(e)&&!Ce(e),HI=e=>Ps(e,_x,gx),Ae=e=>mx.test(e),oi=e=>Ps(e,Ex,BI),xm=e=>Ps(e,KI,We),fE=e=>Ps(e,yx,gx),GI=e=>Ps(e,bx,$I),Ku=e=>Ps(e,Sx,FI),Ce=e=>vx.test(e),jl=e=>ks(e,Ex),qI=e=>ks(e,WI),hE=e=>ks(e,yx),ZI=e=>ks(e,_x),YI=e=>ks(e,bx),Wu=e=>ks(e,Sx,!0),Ps=(e,t,n)=>{const o=mx.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},ks=(e,t,n=!1)=>{const o=vx.exec(e);return o?o[1]?t(o[1]):n:!1},yx=e=>e==="position"||e==="percentage",bx=e=>e==="image"||e==="url",_x=e=>e==="length"||e==="size"||e==="bg-size",Ex=e=>e==="length",KI=e=>e==="number",WI=e=>e==="family-name",Sx=e=>e==="shadow",QI=()=>{const e=ln("color"),t=ln("font"),n=ln("text"),o=ln("font-weight"),i=ln("tracking"),l=ln("leading"),c=ln("breakpoint"),d=ln("container"),f=ln("spacing"),h=ln("radius"),v=ln("shadow"),p=ln("inset-shadow"),y=ln("text-shadow"),_=ln("drop-shadow"),S=ln("blur"),w=ln("perspective"),T=ln("aspect"),O=ln("ease"),A=ln("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...R(),Ce,Ae],k=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],N=()=>[Ce,Ae,f],z=()=>[ds,"full","auto",...N()],W=()=>[ya,"none","subgrid",Ce,Ae],$=()=>["auto",{span:["full",ya,Ce,Ae]},ya,Ce,Ae],q=()=>[ya,"auto",Ce,Ae],j=()=>["auto","min","max","fr",Ce,Ae],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...N()],F=()=>[ds,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],G=()=>[e,Ce,Ae],re=()=>[...R(),hE,fE,{position:[Ce,Ae]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",ZI,HI,{size:[Ce,Ae]}],Q=()=>[wm,jl,oi],te=()=>["","none","full",h,Ce,Ae],se=()=>["",We,jl,oi],me=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[We,wm,hE,fE],Se=()=>["","none",S,Ce,Ae],De=()=>["none",We,Ce,Ae],Le=()=>["none",We,Ce,Ae],Ee=()=>[We,Ce,Ae],ze=()=>[ds,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Uo],breakpoint:[Uo],color:[UI],container:[Uo],"drop-shadow":[Uo],ease:["in","out","in-out"],font:[VI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Uo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Uo],shadow:[Uo],spacing:["px",We],text:[Uo],"text-shadow":[Uo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ds,Ae,Ce,T]}],container:["container"],columns:[{columns:[We,Ae,Ce,d]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[ya,"auto",Ce,Ae]}],basis:[{basis:[ds,"full","auto",d,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,ds,"auto","initial","none",Ae]}],grow:[{grow:["",We,Ce,Ae]}],shrink:[{shrink:["",We,Ce,Ae]}],order:[{order:[ya,"first","last","none",Ce,Ae]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[d,"screen",...F()]}],"min-w":[{"min-w":[d,"screen","none",...F()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,jl,oi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ce,xm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wm,Ae]}],"font-family":[{font:[qI,Ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ce,Ae]}],"line-clamp":[{"line-clamp":[We,"none",Ce,xm]}],leading:[{leading:[l,...N()]}],"list-image":[{"list-image":["none",Ce,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Ce,oi]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[We,"auto",Ce,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce,Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ce,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ye()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ya,Ce,Ae],radial:["",Ce,Ae],conic:[ya,Ce,Ae]},YI,GI]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Ce,Ae]}],"outline-w":[{outline:["",We,jl,oi]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",v,Wu,Ku]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",p,Wu,Ku]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[We,oi]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",y,Wu,Ku]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[We,Ce,Ae]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Ce,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ye()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Ae]}],filter:[{filter:["","none",Ce,Ae]}],blur:[{blur:Se()}],brightness:[{brightness:[We,Ce,Ae]}],contrast:[{contrast:[We,Ce,Ae]}],"drop-shadow":[{"drop-shadow":["","none",_,Wu,Ku]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",We,Ce,Ae]}],"hue-rotate":[{"hue-rotate":[We,Ce,Ae]}],invert:[{invert:["",We,Ce,Ae]}],saturate:[{saturate:[We,Ce,Ae]}],sepia:[{sepia:["",We,Ce,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ae]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[We,Ce,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[We,Ce,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Ce,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Ce,Ae]}],"backdrop-invert":[{"backdrop-invert":["",We,Ce,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[We,Ce,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[We,Ce,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Ce,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ce,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Ce,Ae]}],ease:[{ease:["linear","initial",O,Ce,Ae]}],delay:[{delay:[We,Ce,Ae]}],animate:[{animate:["none",A,Ce,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Ce,Ae]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Le()}],"scale-x":[{"scale-x":Le()}],"scale-y":[{"scale-y":Le()}],"scale-z":[{"scale-z":Le()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[Ce,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ce,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ce,Ae]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[We,jl,oi,xm]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},XI=MI(QI),uH=Object.freeze({status:"aborted"});function ie(e,t,n){function o(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);const h=c.prototype,v=Object.keys(h);for(let p=0;p<v.length;p++){const y=v[p];y in d||(d[y]=h[y].bind(d))}}const i=n?.Parent??Object;class l extends i{}Object.defineProperty(l,"name",{value:e});function c(d){var f;const h=n?.Parent?new l:this;o(h,d),(f=h._zod).deferred??(f.deferred=[]);for(const v of h._zod.deferred)v();return h}return Object.defineProperty(c,"init",{value:o}),Object.defineProperty(c,Symbol.hasInstance,{value:d=>n?.Parent&&d instanceof n.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class xs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class wx extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const xx={};function Na(e){return xx}function Rx(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,i])=>t.indexOf(+o)===-1).map(([o,i])=>i)}function bv(e,t){return typeof t=="bigint"?t.toString():t}function mf(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function vc(e){return e==null}function yg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function JI(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let i=(o.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(o)){const f=o.match(/\d?e-(\d?)/);f?.[1]&&(i=Number.parseInt(f[1]))}const l=n>i?n:i,c=Number.parseInt(e.toFixed(l).replace(".","")),d=Number.parseInt(t.toFixed(l).replace(".",""));return c%d/10**l}const pE=Symbol("evaluating");function at(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==pE)return o===void 0&&(o=pE,o=n()),o},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Ei(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ja(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function mE(e){return JSON.stringify(e)}function eM(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ox="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function oc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const tM=mf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ms(e){if(oc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(oc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Tx(e){return Ms(e)?{...e}:Array.isArray(e)?[...e]:e}const nM=new Set(["string","number","symbol"]);function Ns(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function za(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function Oe(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function rM(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const oM={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function aM(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=ja(e._zod.def,{get shape(){const c={};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&(c[d]=n.shape[d])}return Ei(this,"shape",c),c},checks:[]});return za(e,l)}function iM(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=ja(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&delete c[d]}return Ei(this,"shape",c),c},checks:[]});return za(e,l)}function sM(e,t){if(!Ms(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const l=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(l,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=ja(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return Ei(this,"shape",l),l}});return za(e,i)}function lM(e,t){if(!Ms(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ja(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Ei(this,"shape",o),o}});return za(e,n)}function cM(e,t){const n=ja(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Ei(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return za(e,n)}function uM(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=ja(t._zod.def,{get shape(){const d=t._zod.def.shape,f={...d};if(n)for(const h in n){if(!(h in d))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(f[h]=e?new e({type:"optional",innerType:d[h]}):d[h])}else for(const h in d)f[h]=e?new e({type:"optional",innerType:d[h]}):d[h];return Ei(this,"shape",f),f},checks:[]});return za(t,c)}function dM(e,t,n){const o=ja(t._zod.def,{get shape(){const i=t._zod.def.shape,l={...i};if(n)for(const c in n){if(!(c in l))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=new e({type:"nonoptional",innerType:i[c]}))}else for(const c in i)l[c]=new e({type:"nonoptional",innerType:i[c]});return Ei(this,"shape",l),l}});return za(t,o)}function ws(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ci(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Qu(e){return typeof e=="string"?e:e?.message}function Da(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const i=Qu(e.inst?._zod.def?.error?.(e))??Qu(t?.error?.(e))??Qu(n.customError?.(e))??Qu(n.localeError?.(e))??"Invalid input";o.message=i}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Ax(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function bg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ac(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const Cx=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,bv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_g=ie("$ZodError",Cx),vf=ie("$ZodError",Cx,{Parent:Error});function fM(e,t=n=>n.message){const n={},o=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):o.push(t(i));return{formErrors:o,fieldErrors:n}}function hM(e,t=n=>n.message){const n={_errors:[]},o=i=>{for(const l of i.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>o({issues:c}));else if(l.code==="invalid_key")o({issues:l.issues});else if(l.code==="invalid_element")o({issues:l.issues});else if(l.path.length===0)n._errors.push(t(l));else{let c=n,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(t(l))):c[f]=c[f]||{_errors:[]},c=c[f],d++}}};return o(e),n}const gf=e=>(t,n,o,i)=>{const l=o?Object.assign(o,{async:!1}):{async:!1},c=t._zod.run({value:n,issues:[]},l);if(c instanceof Promise)throw new xs;if(c.issues.length){const d=new(i?.Err??e)(c.issues.map(f=>Da(f,l,Na())));throw Ox(d,i?.callee),d}return c.value},pM=gf(vf),yf=e=>async(t,n,o,i)=>{const l=o?Object.assign(o,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},l);if(c instanceof Promise&&(c=await c),c.issues.length){const d=new(i?.Err??e)(c.issues.map(f=>Da(f,l,Na())));throw Ox(d,i?.callee),d}return c.value},mM=yf(vf),bf=e=>(t,n,o)=>{const i=o?{...o,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new xs;return l.issues.length?{success:!1,error:new(e??_g)(l.issues.map(c=>Da(c,i,Na())))}:{success:!0,data:l.value}},vM=bf(vf),_f=e=>async(t,n,o)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},i);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(c=>Da(c,i,Na())))}:{success:!0,data:l.value}},gM=_f(vf),yM=e=>(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return gf(e)(t,n,i)},bM=e=>(t,n,o)=>gf(e)(t,n,o),_M=e=>async(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return yf(e)(t,n,i)},EM=e=>async(t,n,o)=>yf(e)(t,n,o),SM=e=>(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return bf(e)(t,n,i)},wM=e=>(t,n,o)=>bf(e)(t,n,o),xM=e=>async(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return _f(e)(t,n,i)},RM=e=>async(t,n,o)=>_f(e)(t,n,o),OM=/^[cC][^\s-]{8,}$/,TM=/^[0-9a-z]+$/,AM=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,CM=/^[0-9a-vA-V]{20}$/,IM=/^[A-Za-z0-9]{27}$/,MM=/^[a-zA-Z0-9_-]{21}$/,NM=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,DM=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,vE=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,LM=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,PM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function kM(){return new RegExp(PM,"u")}const jM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,UM=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,BM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,FM=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ix=/^[A-Za-z0-9_-]*$/,$M=/^\+[1-9]\d{6,14}$/,Mx="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",VM=new RegExp(`^${Mx}$`);function Nx(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function HM(e){return new RegExp(`^${Nx(e)}$`)}function GM(e){const t=Nx({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Mx}T(?:${o})$`)}const qM=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ZM=/^-?\d+$/,Dx=/^-?\d+(?:\.\d+)?$/,YM=/^(?:true|false)$/i,KM=/^null$/i,WM=/^[^A-Z]*$/,QM=/^[^a-z]*$/,Cn=ie("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Lx={number:"number",bigint:"bigint",object:"date"},Px=ie("$ZodCheckLessThan",(e,t)=>{Cn.init(e,t);const n=Lx[typeof t.value];e._zod.onattach.push(o=>{const i=o._zod.bag,l=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),kx=ie("$ZodCheckGreaterThan",(e,t)=>{Cn.init(e,t);const n=Lx[typeof t.value];e._zod.onattach.push(o=>{const i=o._zod.bag,l=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),XM=ie("$ZodCheckMultipleOf",(e,t)=>{Cn.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):JI(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),JM=ie("$ZodCheckNumberFormat",(e,t)=>{Cn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[i,l]=oM[t.format];e._zod.onattach.push(c=>{const d=c._zod.bag;d.format=t.format,d.minimum=i,d.maximum=l,n&&(d.pattern=ZM)}),e._zod.check=c=>{const d=c.value;if(n){if(!Number.isInteger(d)){c.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?c.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):c.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}d<i&&c.issues.push({origin:"number",input:d,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),d>l&&c.issues.push({origin:"number",input:d,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),eN=ie("$ZodCheckMaxSize",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!vc(i)&&i.size!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const i=o.value;i.size<=t.maximum||o.issues.push({origin:Ax(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),tN=ie("$ZodCheckMinSize",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!vc(i)&&i.size!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const i=o.value;i.size>=t.minimum||o.issues.push({origin:Ax(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),nN=ie("$ZodCheckMaxLength",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!vc(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const i=o.value;if(i.length<=t.maximum)return;const c=bg(i);o.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),rN=ie("$ZodCheckMinLength",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!vc(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const i=o.value;if(i.length>=t.minimum)return;const c=bg(i);o.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),oN=ie("$ZodCheckLengthEquals",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!vc(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=o=>{const i=o.value,l=i.length;if(l===t.length)return;const c=bg(i),d=l>t.length;o.issues.push({origin:c,...d?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Ef=ie("$ZodCheckStringFormat",(e,t)=>{var n,o;Cn.init(e,t),e._zod.onattach.push(i=>{const l=i._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),aN=ie("$ZodCheckRegex",(e,t)=>{Ef.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),iN=ie("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=WM),Ef.init(e,t)}),sN=ie("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=QM),Ef.init(e,t)}),lN=ie("$ZodCheckIncludes",(e,t)=>{Cn.init(e,t);const n=Ns(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(i=>{const l=i._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(o)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),cN=ie("$ZodCheckStartsWith",(e,t)=>{Cn.init(e,t);const n=new RegExp(`^${Ns(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),uN=ie("$ZodCheckEndsWith",(e,t)=>{Cn.init(e,t);const n=new RegExp(`.*${Ns(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),dN=ie("$ZodCheckMimeType",(e,t)=>{Cn.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),fN=ie("$ZodCheckOverwrite",(e,t)=>{Cn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class hN{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(`
|
|
9
|
+
`+u.stack}}var Ue=Object.prototype.hasOwnProperty,Qe=e.unstable_scheduleCallback,U=e.unstable_cancelCallback,Z=e.unstable_shouldYield,Y=e.unstable_requestPaint,ue=e.unstable_now,pe=e.unstable_getCurrentPriorityLevel,he=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,Be=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,ft=e.unstable_IdlePriority,Mn=e.log,Tt=e.unstable_setDisableYieldValue,Zt=null,At=null;function an(r){if(typeof Mn=="function"&&Tt(r),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(Zt,r)}catch{}}var Yt=Math.clz32?Math.clz32:Ie,qo=Math.log,_o=Math.LN2;function Ie(r){return r>>>=0,r===0?32:31-(qo(r)/_o|0)|0}var tt=256,it=262144,Ye=4194304;function st(r){var a=r&42;if(a!==0)return a;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Me(r,a,s){var u=r.pendingLanes;if(u===0)return 0;var m=0,g=r.suspendedLanes,x=r.pingedLanes;r=r.warmLanes;var M=u&134217727;return M!==0?(u=M&~g,u!==0?m=st(u):(x&=M,x!==0?m=st(x):s||(s=M&~r,s!==0&&(m=st(s))))):(M=u&~g,M!==0?m=st(M):x!==0?m=st(x):s||(s=u&~r,s!==0&&(m=st(s)))),m===0?0:a!==0&&a!==m&&(a&g)===0&&(g=m&-m,s=a&-a,g>=s||g===32&&(s&4194048)!==0)?a:m}function Ke(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function xt(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bt(){var r=Ye;return Ye<<=1,(Ye&62914560)===0&&(Ye=4194304),r}function Nn(r){for(var a=[],s=0;31>s;s++)a.push(r);return a}function lt(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Ct(r,a,s,u,m,g){var x=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var M=r.entanglements,B=r.expirationTimes,ee=r.hiddenUpdates;for(s=x&~s;0<s;){var le=31-Yt(s),de=1<<le;M[le]=0,B[le]=-1;var ne=ee[le];if(ne!==null)for(ee[le]=null,le=0;le<ne.length;le++){var ae=ne[le];ae!==null&&(ae.lane&=-536870913)}s&=~de}u!==0&&br(r,u,0),g!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=g&~(x&~a))}function br(r,a,s){r.pendingLanes|=a,r.suspendedLanes&=~a;var u=31-Yt(a);r.entangledLanes|=a,r.entanglements[u]=r.entanglements[u]|1073741824|s&261930}function _n(r,a){var s=r.entangledLanes|=a;for(r=r.entanglements;s;){var u=31-Yt(s),m=1<<u;m&a|r[u]&a&&(r[u]|=a),s&=~m}}function Bn(r,a){var s=a&-a;return s=(s&42)!==0?1:Ri(s),(s&(r.suspendedLanes|a))!==0?0:s}function Ri(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function zr(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Uf(){var r=F.p;return r!==0?r:(r=window.event,r===void 0?32:o_(r.type))}function _0(r,a){var s=F.p;try{return F.p=r,a()}finally{F.p=s}}var Zo=Math.random().toString(36).slice(2),En="__reactFiber$"+Zo,Fn="__reactProps$"+Zo,Oi="__reactContainer$"+Zo,Bf="__reactEvents$"+Zo,KT="__reactListeners$"+Zo,WT="__reactHandles$"+Zo,E0="__reactResources$"+Zo,Bs="__reactMarker$"+Zo;function Ff(r){delete r[En],delete r[Fn],delete r[Bf],delete r[KT],delete r[WT]}function Ti(r){var a=r[En];if(a)return a;for(var s=r.parentNode;s;){if(a=s[Oi]||s[En]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(r=$b(r);r!==null;){if(s=r[En])return s;r=$b(r)}return a}r=s,s=r.parentNode}return null}function Ai(r){if(r=r[En]||r[Oi]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function Fs(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(o(33))}function Ci(r){var a=r[E0];return a||(a=r[E0]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function fn(r){r[Bs]=!0}var S0=new Set,w0={};function Fa(r,a){Ii(r,a),Ii(r+"Capture",a)}function Ii(r,a){for(w0[r]=a,r=0;r<a.length;r++)S0.add(a[r])}var QT=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),x0={},R0={};function XT(r){return Ue.call(R0,r)?!0:Ue.call(x0,r)?!1:QT.test(r)?R0[r]=!0:(x0[r]=!0,!1)}function Mc(r,a,s){if(XT(a))if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+s)}}function Nc(r,a,s){if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+s)}}function Eo(r,a,s,u){if(u===null)r.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(a,s,""+u)}}function _r(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function O0(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function JT(r,a,s){var u=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,g=u.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return m.call(this)},set:function(x){s=""+x,g.call(this,x)}}),Object.defineProperty(r,a,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(x){s=""+x},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function $f(r){if(!r._valueTracker){var a=O0(r)?"checked":"value";r._valueTracker=JT(r,a,""+r[a])}}function T0(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var s=a.getValue(),u="";return r&&(u=O0(r)?r.checked?"true":"false":r.value),r=u,r!==s?(a.setValue(r),!0):!1}function Dc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var eA=/[\n"\\]/g;function Er(r){return r.replace(eA,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Vf(r,a,s,u,m,g,x,M){r.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?r.type=x:r.removeAttribute("type"),a!=null?x==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+_r(a)):r.value!==""+_r(a)&&(r.value=""+_r(a)):x!=="submit"&&x!=="reset"||r.removeAttribute("value"),a!=null?Hf(r,x,_r(a)):s!=null?Hf(r,x,_r(s)):u!=null&&r.removeAttribute("value"),m==null&&g!=null&&(r.defaultChecked=!!g),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?r.name=""+_r(M):r.removeAttribute("name")}function A0(r,a,s,u,m,g,x,M){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(r.type=g),a!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){$f(r);return}s=s!=null?""+_r(s):"",a=a!=null?""+_r(a):s,M||a===r.value||(r.value=a),r.defaultValue=a}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=M?r.checked:!!u,r.defaultChecked=!!u,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(r.name=x),$f(r)}function Hf(r,a,s){a==="number"&&Dc(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function Mi(r,a,s,u){if(r=r.options,a){a={};for(var m=0;m<s.length;m++)a["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=a.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&u&&(r[s].defaultSelected=!0)}else{for(s=""+_r(s),a=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,u&&(r[m].defaultSelected=!0);return}a!==null||r[m].disabled||(a=r[m])}a!==null&&(a.selected=!0)}}function C0(r,a,s){if(a!=null&&(a=""+_r(a),a!==r.value&&(r.value=a),s==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=s!=null?""+_r(s):""}function I0(r,a,s,u){if(a==null){if(u!=null){if(s!=null)throw Error(o(92));if(oe(u)){if(1<u.length)throw Error(o(93));u=u[0]}s=u}s==null&&(s=""),a=s}s=_r(a),r.defaultValue=s,u=r.textContent,u===s&&u!==""&&u!==null&&(r.value=u),$f(r)}function Ni(r,a){if(a){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=a;return}}r.textContent=a}var tA=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function M0(r,a,s){var u=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":u?r.setProperty(a,s):typeof s!="number"||s===0||tA.has(a)?a==="float"?r.cssFloat=s:r[a]=(""+s).trim():r[a]=s+"px"}function N0(r,a,s){if(a!=null&&typeof a!="object")throw Error(o(62));if(r=r.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?r.setProperty(u,""):u==="float"?r.cssFloat="":r[u]="");for(var m in a)u=a[m],a.hasOwnProperty(m)&&s[m]!==u&&M0(r,m,u)}else for(var g in a)a.hasOwnProperty(g)&&M0(r,g,a[g])}function Gf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 nA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),rA=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Lc(r){return rA.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function So(){}var qf=null;function Zf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Di=null,Li=null;function D0(r){var a=Ai(r);if(a&&(r=a.stateNode)){var s=r[Fn]||null;e:switch(r=a.stateNode,a.type){case"input":if(Vf(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Er(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var u=s[a];if(u!==r&&u.form===r.form){var m=u[Fn]||null;if(!m)throw Error(o(90));Vf(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(a=0;a<s.length;a++)u=s[a],u.form===r.form&&T0(u)}break e;case"textarea":C0(r,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Mi(r,!!s.multiple,a,!1)}}}var Yf=!1;function L0(r,a,s){if(Yf)return r(a,s);Yf=!0;try{var u=r(a);return u}finally{if(Yf=!1,(Di!==null||Li!==null)&&(Eu(),Di&&(a=Di,r=Li,Li=Di=null,D0(a),r)))for(a=0;a<r.length;a++)D0(r[a])}}function $s(r,a){var s=r.stateNode;if(s===null)return null;var u=s[Fn]||null;if(u===null)return null;s=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(o(231,a,typeof s));return s}var wo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kf=!1;if(wo)try{var Vs={};Object.defineProperty(Vs,"passive",{get:function(){Kf=!0}}),window.addEventListener("test",Vs,Vs),window.removeEventListener("test",Vs,Vs)}catch{Kf=!1}var Yo=null,Wf=null,Pc=null;function P0(){if(Pc)return Pc;var r,a=Wf,s=a.length,u,m="value"in Yo?Yo.value:Yo.textContent,g=m.length;for(r=0;r<s&&a[r]===m[r];r++);var x=s-r;for(u=1;u<=x&&a[s-u]===m[g-u];u++);return Pc=m.slice(r,1<u?1-u:void 0)}function kc(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function jc(){return!0}function k0(){return!1}function $n(r){function a(s,u,m,g,x){this._reactName=s,this._targetInst=m,this.type=u,this.nativeEvent=g,this.target=x,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(s=r[M],this[M]=s?s(g):g[M]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?jc:k0,this.isPropagationStopped=k0,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=jc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=jc)},persist:function(){},isPersistent:jc}),a}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zc=$n($a),Hs=p({},$a,{view:0,detail:0}),oA=$n(Hs),Qf,Xf,Gs,Uc=p({},Hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eh,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Gs&&(Gs&&r.type==="mousemove"?(Qf=r.screenX-Gs.screenX,Xf=r.screenY-Gs.screenY):Xf=Qf=0,Gs=r),Qf)},movementY:function(r){return"movementY"in r?r.movementY:Xf}}),j0=$n(Uc),aA=p({},Uc,{dataTransfer:0}),iA=$n(aA),sA=p({},Hs,{relatedTarget:0}),Jf=$n(sA),lA=p({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),cA=$n(lA),uA=p({},$a,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),dA=$n(uA),fA=p({},$a,{data:0}),z0=$n(fA),hA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pA={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vA(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=mA[r])?!!a[r]:!1}function eh(){return vA}var gA=p({},Hs,{key:function(r){if(r.key){var a=hA[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=kc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?pA[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eh,charCode:function(r){return r.type==="keypress"?kc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?kc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),yA=$n(gA),bA=p({},Uc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),U0=$n(bA),_A=p({},Hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eh}),EA=$n(_A),SA=p({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),wA=$n(SA),xA=p({},Uc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),RA=$n(xA),OA=p({},$a,{newState:0,oldState:0}),TA=$n(OA),AA=[9,13,27,32],th=wo&&"CompositionEvent"in window,qs=null;wo&&"documentMode"in document&&(qs=document.documentMode);var CA=wo&&"TextEvent"in window&&!qs,B0=wo&&(!th||qs&&8<qs&&11>=qs),F0=" ",$0=!1;function V0(r,a){switch(r){case"keyup":return AA.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function H0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Pi=!1;function IA(r,a){switch(r){case"compositionend":return H0(a);case"keypress":return a.which!==32?null:($0=!0,F0);case"textInput":return r=a.data,r===F0&&$0?null:r;default:return null}}function MA(r,a){if(Pi)return r==="compositionend"||!th&&V0(r,a)?(r=P0(),Pc=Wf=Yo=null,Pi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return B0&&a.locale!=="ko"?null:a.data;default:return null}}var NA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function G0(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!NA[r.type]:a==="textarea"}function q0(r,a,s,u){Di?Li?Li.push(u):Li=[u]:Di=u,a=Au(a,"onChange"),0<a.length&&(s=new zc("onChange","change",null,s,u),r.push({event:s,listeners:a}))}var Zs=null,Ys=null;function DA(r){Ab(r,0)}function Bc(r){var a=Fs(r);if(T0(a))return r}function Z0(r,a){if(r==="change")return a}var Y0=!1;if(wo){var nh;if(wo){var rh="oninput"in document;if(!rh){var K0=document.createElement("div");K0.setAttribute("oninput","return;"),rh=typeof K0.oninput=="function"}nh=rh}else nh=!1;Y0=nh&&(!document.documentMode||9<document.documentMode)}function W0(){Zs&&(Zs.detachEvent("onpropertychange",Q0),Ys=Zs=null)}function Q0(r){if(r.propertyName==="value"&&Bc(Ys)){var a=[];q0(a,Ys,r,Zf(r)),L0(DA,a)}}function LA(r,a,s){r==="focusin"?(W0(),Zs=a,Ys=s,Zs.attachEvent("onpropertychange",Q0)):r==="focusout"&&W0()}function PA(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Bc(Ys)}function kA(r,a){if(r==="click")return Bc(a)}function jA(r,a){if(r==="input"||r==="change")return Bc(a)}function zA(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var tr=typeof Object.is=="function"?Object.is:zA;function Ks(r,a){if(tr(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var s=Object.keys(r),u=Object.keys(a);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var m=s[u];if(!Ue.call(a,m)||!tr(r[m],a[m]))return!1}return!0}function X0(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function J0(r,a){var s=X0(r);r=0;for(var u;s;){if(s.nodeType===3){if(u=r+s.textContent.length,r<=a&&u>=a)return{node:s,offset:a-r};r=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=X0(s)}}function ey(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?ey(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function ty(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Dc(r.document);a instanceof r.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)r=a.contentWindow;else break;a=Dc(r.document)}return a}function oh(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var UA=wo&&"documentMode"in document&&11>=document.documentMode,ki=null,ah=null,Ws=null,ih=!1;function ny(r,a,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ih||ki==null||ki!==Dc(u)||(u=ki,"selectionStart"in u&&oh(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ws&&Ks(Ws,u)||(Ws=u,u=Au(ah,"onSelect"),0<u.length&&(a=new zc("onSelect","select",null,a,s),r.push({event:a,listeners:u}),a.target=ki)))}function Va(r,a){var s={};return s[r.toLowerCase()]=a.toLowerCase(),s["Webkit"+r]="webkit"+a,s["Moz"+r]="moz"+a,s}var ji={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},sh={},ry={};wo&&(ry=document.createElement("div").style,"AnimationEvent"in window||(delete ji.animationend.animation,delete ji.animationiteration.animation,delete ji.animationstart.animation),"TransitionEvent"in window||delete ji.transitionend.transition);function Ha(r){if(sh[r])return sh[r];if(!ji[r])return r;var a=ji[r],s;for(s in a)if(a.hasOwnProperty(s)&&s in ry)return sh[r]=a[s];return r}var oy=Ha("animationend"),ay=Ha("animationiteration"),iy=Ha("animationstart"),BA=Ha("transitionrun"),FA=Ha("transitionstart"),$A=Ha("transitioncancel"),sy=Ha("transitionend"),ly=new Map,lh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");lh.push("scrollEnd");function Ur(r,a){ly.set(r,a),Fa(a,[r])}var Fc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Sr=[],zi=0,ch=0;function $c(){for(var r=zi,a=ch=zi=0;a<r;){var s=Sr[a];Sr[a++]=null;var u=Sr[a];Sr[a++]=null;var m=Sr[a];Sr[a++]=null;var g=Sr[a];if(Sr[a++]=null,u!==null&&m!==null){var x=u.pending;x===null?m.next=m:(m.next=x.next,x.next=m),u.pending=m}g!==0&&cy(s,m,g)}}function Vc(r,a,s,u){Sr[zi++]=r,Sr[zi++]=a,Sr[zi++]=s,Sr[zi++]=u,ch|=u,r.lanes|=u,r=r.alternate,r!==null&&(r.lanes|=u)}function uh(r,a,s,u){return Vc(r,a,s,u),Hc(r)}function Ga(r,a){return Vc(r,null,null,a),Hc(r)}function cy(r,a,s){r.lanes|=s;var u=r.alternate;u!==null&&(u.lanes|=s);for(var m=!1,g=r.return;g!==null;)g.childLanes|=s,u=g.alternate,u!==null&&(u.childLanes|=s),g.tag===22&&(r=g.stateNode,r===null||r._visibility&1||(m=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,m&&a!==null&&(m=31-Yt(s),r=g.hiddenUpdates,u=r[m],u===null?r[m]=[a]:u.push(a),a.lane=s|536870912),g):null}function Hc(r){if(50<yl)throw yl=0,bp=null,Error(o(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var Ui={};function VA(r,a,s,u){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nr(r,a,s,u){return new VA(r,a,s,u)}function dh(r){return r=r.prototype,!(!r||!r.isReactComponent)}function xo(r,a){var s=r.alternate;return s===null?(s=nr(r.tag,a,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=a,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,a=r.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function uy(r,a){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,a=s.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function Gc(r,a,s,u,m,g){var x=0;if(u=r,typeof r=="function")dh(r)&&(x=1);else if(typeof r=="string")x=YC(r,s,se.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case z:return r=nr(31,s,a,m),r.elementType=z,r.lanes=g,r;case w:return qa(s.children,m,g,a);case T:x=8,m|=24;break;case O:return r=nr(12,s,a,m|2),r.elementType=O,r.lanes=g,r;case I:return r=nr(13,s,a,m),r.elementType=I,r.lanes=g,r;case k:return r=nr(19,s,a,m),r.elementType=k,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case C:x=10;break e;case A:x=9;break e;case R:x=11;break e;case D:x=14;break e;case N:x=16,u=null;break e}x=29,s=Error(o(130,r===null?"null":typeof r,"")),u=null}return a=nr(x,s,a,m),a.elementType=r,a.type=u,a.lanes=g,a}function qa(r,a,s,u){return r=nr(7,r,u,a),r.lanes=s,r}function fh(r,a,s){return r=nr(6,r,null,a),r.lanes=s,r}function dy(r){var a=nr(18,null,null,0);return a.stateNode=r,a}function hh(r,a,s){return a=nr(4,r.children!==null?r.children:[],r.key,a),a.lanes=s,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var fy=new WeakMap;function wr(r,a){if(typeof r=="object"&&r!==null){var s=fy.get(r);return s!==void 0?s:(a={value:r,source:a,stack:et(a)},fy.set(r,a),a)}return{value:r,source:a,stack:et(a)}}var Bi=[],Fi=0,qc=null,Qs=0,xr=[],Rr=0,Ko=null,eo=1,to="";function Ro(r,a){Bi[Fi++]=Qs,Bi[Fi++]=qc,qc=r,Qs=a}function hy(r,a,s){xr[Rr++]=eo,xr[Rr++]=to,xr[Rr++]=Ko,Ko=r;var u=eo;r=to;var m=32-Yt(u)-1;u&=~(1<<m),s+=1;var g=32-Yt(a)+m;if(30<g){var x=m-m%5;g=(u&(1<<x)-1).toString(32),u>>=x,m-=x,eo=1<<32-Yt(a)+m|s<<m|u,to=g+r}else eo=1<<g|s<<m|u,to=r}function ph(r){r.return!==null&&(Ro(r,1),hy(r,1,0))}function mh(r){for(;r===qc;)qc=Bi[--Fi],Bi[Fi]=null,Qs=Bi[--Fi],Bi[Fi]=null;for(;r===Ko;)Ko=xr[--Rr],xr[Rr]=null,to=xr[--Rr],xr[Rr]=null,eo=xr[--Rr],xr[Rr]=null}function py(r,a){xr[Rr++]=eo,xr[Rr++]=to,xr[Rr++]=Ko,eo=a.id,to=a.overflow,Ko=r}var Sn=null,It=null,ot=!1,Wo=null,Or=!1,vh=Error(o(519));function Qo(r){var a=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xs(wr(a,r)),vh}function my(r){var a=r.stateNode,s=r.type,u=r.memoizedProps;switch(a[En]=r,a[Fn]=u,s){case"dialog":Je("cancel",a),Je("close",a);break;case"iframe":case"object":case"embed":Je("load",a);break;case"video":case"audio":for(s=0;s<_l.length;s++)Je(_l[s],a);break;case"source":Je("error",a);break;case"img":case"image":case"link":Je("error",a),Je("load",a);break;case"details":Je("toggle",a);break;case"input":Je("invalid",a),A0(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Je("invalid",a);break;case"textarea":Je("invalid",a),I0(a,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||u.suppressHydrationWarning===!0||Nb(a.textContent,s)?(u.popover!=null&&(Je("beforetoggle",a),Je("toggle",a)),u.onScroll!=null&&Je("scroll",a),u.onScrollEnd!=null&&Je("scrollend",a),u.onClick!=null&&(a.onclick=So),a=!0):a=!1,a||Qo(r,!0)}function vy(r){for(Sn=r.return;Sn;)switch(Sn.tag){case 5:case 31:case 13:Or=!1;return;case 27:case 3:Or=!0;return;default:Sn=Sn.return}}function $i(r){if(r!==Sn)return!1;if(!ot)return vy(r),ot=!0,!1;var a=r.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||Lp(r.type,r.memoizedProps)),s=!s),s&&It&&Qo(r),vy(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));It=Fb(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));It=Fb(r)}else a===27?(a=It,da(r.type)?(r=Up,Up=null,It=r):It=a):It=Sn?Ar(r.stateNode.nextSibling):null;return!0}function Za(){It=Sn=null,ot=!1}function gh(){var r=Wo;return r!==null&&(qn===null?qn=r:qn.push.apply(qn,r),Wo=null),r}function Xs(r){Wo===null?Wo=[r]:Wo.push(r)}var yh=P(null),Ya=null,Oo=null;function Xo(r,a,s){te(yh,a._currentValue),a._currentValue=s}function To(r){r._currentValue=yh.current,Q(yh)}function bh(r,a,s){for(;r!==null;){var u=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),r===s)break;r=r.return}}function _h(r,a,s,u){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var g=m.dependencies;if(g!==null){var x=m.child;g=g.firstContext;e:for(;g!==null;){var M=g;g=m;for(var B=0;B<a.length;B++)if(M.context===a[B]){g.lanes|=s,M=g.alternate,M!==null&&(M.lanes|=s),bh(g.return,s,r),u||(x=null);break e}g=M.next}}else if(m.tag===18){if(x=m.return,x===null)throw Error(o(341));x.lanes|=s,g=x.alternate,g!==null&&(g.lanes|=s),bh(x,s,r),x=null}else x=m.child;if(x!==null)x.return=m;else for(x=m;x!==null;){if(x===r){x=null;break}if(m=x.sibling,m!==null){m.return=x.return,x=m;break}x=x.return}m=x}}function Vi(r,a,s,u){r=null;for(var m=a,g=!1;m!==null;){if(!g){if((m.flags&524288)!==0)g=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var x=m.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var M=m.type;tr(m.pendingProps.value,x.value)||(r!==null?r.push(M):r=[M])}}else if(m===be.current){if(x=m.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Rl):r=[Rl])}m=m.return}r!==null&&_h(a,r,s,u),a.flags|=262144}function Zc(r){for(r=r.firstContext;r!==null;){if(!tr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Ka(r){Ya=r,Oo=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function wn(r){return gy(Ya,r)}function Yc(r,a){return Ya===null&&Ka(r),gy(r,a)}function gy(r,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},Oo===null){if(r===null)throw Error(o(308));Oo=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Oo=Oo.next=a;return s}var HA=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(s,u){r.push(u)}};this.abort=function(){a.aborted=!0,r.forEach(function(s){return s()})}},GA=e.unstable_scheduleCallback,qA=e.unstable_NormalPriority,Kt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eh(){return{controller:new HA,data:new Map,refCount:0}}function Js(r){r.refCount--,r.refCount===0&&GA(qA,function(){r.controller.abort()})}var el=null,Sh=0,Hi=0,Gi=null;function ZA(r,a){if(el===null){var s=el=[];Sh=0,Hi=Rp(),Gi={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Sh++,a.then(yy,yy),a}function yy(){if(--Sh===0&&el!==null){Gi!==null&&(Gi.status="fulfilled");var r=el;el=null,Hi=0,Gi=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function YA(r,a){var s=[],u={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){u.status="fulfilled",u.value=a;for(var m=0;m<s.length;m++)(0,s[m])(a)},function(m){for(u.status="rejected",u.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),u}var by=L.S;L.S=function(r,a){nb=ue(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&ZA(r,a),by!==null&&by(r,a)};var Wa=P(null);function wh(){var r=Wa.current;return r!==null?r:Rt.pooledCache}function Kc(r,a){a===null?te(Wa,Wa.current):te(Wa,a.pool)}function _y(){var r=wh();return r===null?null:{parent:Kt._currentValue,pool:r}}var qi=Error(o(460)),xh=Error(o(474)),Wc=Error(o(542)),Qc={then:function(){}};function Ey(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Sy(r,a,s){switch(s=r[s],s===void 0?r.push(a):s!==a&&(a.then(So,So),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,xy(r),r;default:if(typeof a.status=="string")a.then(So,So);else{if(r=Rt,r!==null&&100<r.shellSuspendCounter)throw Error(o(482));r=a,r.status="pending",r.then(function(u){if(a.status==="pending"){var m=a;m.status="fulfilled",m.value=u}},function(u){if(a.status==="pending"){var m=a;m.status="rejected",m.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,xy(r),r}throw Xa=a,qi}}function Qa(r){try{var a=r._init;return a(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Xa=s,qi):s}}var Xa=null;function wy(){if(Xa===null)throw Error(o(459));var r=Xa;return Xa=null,r}function xy(r){if(r===qi||r===Wc)throw Error(o(483))}var Zi=null,tl=0;function Xc(r){var a=tl;return tl+=1,Zi===null&&(Zi=[]),Sy(Zi,r,a)}function nl(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function Jc(r,a){throw a.$$typeof===y?Error(o(525)):(r=Object.prototype.toString.call(a),Error(o(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function Ry(r){function a(K,H){if(r){var J=K.deletions;J===null?(K.deletions=[H],K.flags|=16):J.push(H)}}function s(K,H){if(!r)return null;for(;H!==null;)a(K,H),H=H.sibling;return null}function u(K){for(var H=new Map;K!==null;)K.key!==null?H.set(K.key,K):H.set(K.index,K),K=K.sibling;return H}function m(K,H){return K=xo(K,H),K.index=0,K.sibling=null,K}function g(K,H,J){return K.index=J,r?(J=K.alternate,J!==null?(J=J.index,J<H?(K.flags|=67108866,H):J):(K.flags|=67108866,H)):(K.flags|=1048576,H)}function x(K){return r&&K.alternate===null&&(K.flags|=67108866),K}function M(K,H,J,ce){return H===null||H.tag!==6?(H=fh(J,K.mode,ce),H.return=K,H):(H=m(H,J),H.return=K,H)}function B(K,H,J,ce){var Pe=J.type;return Pe===w?le(K,H,J.props.children,ce,J.key):H!==null&&(H.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===N&&Qa(Pe)===H.type)?(H=m(H,J.props),nl(H,J),H.return=K,H):(H=Gc(J.type,J.key,J.props,null,K.mode,ce),nl(H,J),H.return=K,H)}function ee(K,H,J,ce){return H===null||H.tag!==4||H.stateNode.containerInfo!==J.containerInfo||H.stateNode.implementation!==J.implementation?(H=hh(J,K.mode,ce),H.return=K,H):(H=m(H,J.children||[]),H.return=K,H)}function le(K,H,J,ce,Pe){return H===null||H.tag!==7?(H=qa(J,K.mode,ce,Pe),H.return=K,H):(H=m(H,J),H.return=K,H)}function de(K,H,J){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=fh(""+H,K.mode,J),H.return=K,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return J=Gc(H.type,H.key,H.props,null,K.mode,J),nl(J,H),J.return=K,J;case S:return H=hh(H,K.mode,J),H.return=K,H;case N:return H=Qa(H),de(K,H,J)}if(oe(H)||q(H))return H=qa(H,K.mode,J,null),H.return=K,H;if(typeof H.then=="function")return de(K,Xc(H),J);if(H.$$typeof===C)return de(K,Yc(K,H),J);Jc(K,H)}return null}function ne(K,H,J,ce){var Pe=H!==null?H.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Pe!==null?null:M(K,H,""+J,ce);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case _:return J.key===Pe?B(K,H,J,ce):null;case S:return J.key===Pe?ee(K,H,J,ce):null;case N:return J=Qa(J),ne(K,H,J,ce)}if(oe(J)||q(J))return Pe!==null?null:le(K,H,J,ce,null);if(typeof J.then=="function")return ne(K,H,Xc(J),ce);if(J.$$typeof===C)return ne(K,H,Yc(K,J),ce);Jc(K,J)}return null}function ae(K,H,J,ce,Pe){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return K=K.get(J)||null,M(H,K,""+ce,Pe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:return K=K.get(ce.key===null?J:ce.key)||null,B(H,K,ce,Pe);case S:return K=K.get(ce.key===null?J:ce.key)||null,ee(H,K,ce,Pe);case N:return ce=Qa(ce),ae(K,H,J,ce,Pe)}if(oe(ce)||q(ce))return K=K.get(J)||null,le(H,K,ce,Pe,null);if(typeof ce.then=="function")return ae(K,H,J,Xc(ce),Pe);if(ce.$$typeof===C)return ae(K,H,J,Yc(H,ce),Pe);Jc(H,ce)}return null}function Te(K,H,J,ce){for(var Pe=null,ct=null,Ne=H,He=H=0,rt=null;Ne!==null&&He<J.length;He++){Ne.index>He?(rt=Ne,Ne=null):rt=Ne.sibling;var ut=ne(K,Ne,J[He],ce);if(ut===null){Ne===null&&(Ne=rt);break}r&&Ne&&ut.alternate===null&&a(K,Ne),H=g(ut,H,He),ct===null?Pe=ut:ct.sibling=ut,ct=ut,Ne=rt}if(He===J.length)return s(K,Ne),ot&&Ro(K,He),Pe;if(Ne===null){for(;He<J.length;He++)Ne=de(K,J[He],ce),Ne!==null&&(H=g(Ne,H,He),ct===null?Pe=Ne:ct.sibling=Ne,ct=Ne);return ot&&Ro(K,He),Pe}for(Ne=u(Ne);He<J.length;He++)rt=ae(Ne,K,He,J[He],ce),rt!==null&&(r&&rt.alternate!==null&&Ne.delete(rt.key===null?He:rt.key),H=g(rt,H,He),ct===null?Pe=rt:ct.sibling=rt,ct=rt);return r&&Ne.forEach(function(va){return a(K,va)}),ot&&Ro(K,He),Pe}function je(K,H,J,ce){if(J==null)throw Error(o(151));for(var Pe=null,ct=null,Ne=H,He=H=0,rt=null,ut=J.next();Ne!==null&&!ut.done;He++,ut=J.next()){Ne.index>He?(rt=Ne,Ne=null):rt=Ne.sibling;var va=ne(K,Ne,ut.value,ce);if(va===null){Ne===null&&(Ne=rt);break}r&&Ne&&va.alternate===null&&a(K,Ne),H=g(va,H,He),ct===null?Pe=va:ct.sibling=va,ct=va,Ne=rt}if(ut.done)return s(K,Ne),ot&&Ro(K,He),Pe;if(Ne===null){for(;!ut.done;He++,ut=J.next())ut=de(K,ut.value,ce),ut!==null&&(H=g(ut,H,He),ct===null?Pe=ut:ct.sibling=ut,ct=ut);return ot&&Ro(K,He),Pe}for(Ne=u(Ne);!ut.done;He++,ut=J.next())ut=ae(Ne,K,He,ut.value,ce),ut!==null&&(r&&ut.alternate!==null&&Ne.delete(ut.key===null?He:ut.key),H=g(ut,H,He),ct===null?Pe=ut:ct.sibling=ut,ct=ut);return r&&Ne.forEach(function(a4){return a(K,a4)}),ot&&Ro(K,He),Pe}function St(K,H,J,ce){if(typeof J=="object"&&J!==null&&J.type===w&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case _:e:{for(var Pe=J.key;H!==null;){if(H.key===Pe){if(Pe=J.type,Pe===w){if(H.tag===7){s(K,H.sibling),ce=m(H,J.props.children),ce.return=K,K=ce;break e}}else if(H.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===N&&Qa(Pe)===H.type){s(K,H.sibling),ce=m(H,J.props),nl(ce,J),ce.return=K,K=ce;break e}s(K,H);break}else a(K,H);H=H.sibling}J.type===w?(ce=qa(J.props.children,K.mode,ce,J.key),ce.return=K,K=ce):(ce=Gc(J.type,J.key,J.props,null,K.mode,ce),nl(ce,J),ce.return=K,K=ce)}return x(K);case S:e:{for(Pe=J.key;H!==null;){if(H.key===Pe)if(H.tag===4&&H.stateNode.containerInfo===J.containerInfo&&H.stateNode.implementation===J.implementation){s(K,H.sibling),ce=m(H,J.children||[]),ce.return=K,K=ce;break e}else{s(K,H);break}else a(K,H);H=H.sibling}ce=hh(J,K.mode,ce),ce.return=K,K=ce}return x(K);case N:return J=Qa(J),St(K,H,J,ce)}if(oe(J))return Te(K,H,J,ce);if(q(J)){if(Pe=q(J),typeof Pe!="function")throw Error(o(150));return J=Pe.call(J),je(K,H,J,ce)}if(typeof J.then=="function")return St(K,H,Xc(J),ce);if(J.$$typeof===C)return St(K,H,Yc(K,J),ce);Jc(K,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,H!==null&&H.tag===6?(s(K,H.sibling),ce=m(H,J),ce.return=K,K=ce):(s(K,H),ce=fh(J,K.mode,ce),ce.return=K,K=ce),x(K)):s(K,H)}return function(K,H,J,ce){try{tl=0;var Pe=St(K,H,J,ce);return Zi=null,Pe}catch(Ne){if(Ne===qi||Ne===Wc)throw Ne;var ct=nr(29,Ne,null,K.mode);return ct.lanes=ce,ct.return=K,ct}}}var Ja=Ry(!0),Oy=Ry(!1),Jo=!1;function Rh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oh(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ea(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ta(r,a,s){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(dt&2)!==0){var m=u.pending;return m===null?a.next=a:(a.next=m.next,m.next=a),u.pending=a,a=Hc(r),cy(r,null,s),a}return Vc(r,u,a,s),Hc(r)}function rl(r,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var u=a.lanes;u&=r.pendingLanes,s|=u,a.lanes=s,_n(r,s)}}function Th(r,a){var s=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var m=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?m=g=x:g=g.next=x,s=s.next}while(s!==null);g===null?m=g=a:g=g.next=a}else m=g=a;s={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:g,shared:u.shared,callbacks:u.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=a:r.next=a,s.lastBaseUpdate=a}var Ah=!1;function ol(){if(Ah){var r=Gi;if(r!==null)throw r}}function al(r,a,s,u){Ah=!1;var m=r.updateQueue;Jo=!1;var g=m.firstBaseUpdate,x=m.lastBaseUpdate,M=m.shared.pending;if(M!==null){m.shared.pending=null;var B=M,ee=B.next;B.next=null,x===null?g=ee:x.next=ee,x=B;var le=r.alternate;le!==null&&(le=le.updateQueue,M=le.lastBaseUpdate,M!==x&&(M===null?le.firstBaseUpdate=ee:M.next=ee,le.lastBaseUpdate=B))}if(g!==null){var de=m.baseState;x=0,le=ee=B=null,M=g;do{var ne=M.lane&-536870913,ae=ne!==M.lane;if(ae?(nt&ne)===ne:(u&ne)===ne){ne!==0&&ne===Hi&&(Ah=!0),le!==null&&(le=le.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var Te=r,je=M;ne=a;var St=s;switch(je.tag){case 1:if(Te=je.payload,typeof Te=="function"){de=Te.call(St,de,ne);break e}de=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=je.payload,ne=typeof Te=="function"?Te.call(St,de,ne):Te,ne==null)break e;de=p({},de,ne);break e;case 2:Jo=!0}}ne=M.callback,ne!==null&&(r.flags|=64,ae&&(r.flags|=8192),ae=m.callbacks,ae===null?m.callbacks=[ne]:ae.push(ne))}else ae={lane:ne,tag:M.tag,payload:M.payload,callback:M.callback,next:null},le===null?(ee=le=ae,B=de):le=le.next=ae,x|=ne;if(M=M.next,M===null){if(M=m.shared.pending,M===null)break;ae=M,M=ae.next,ae.next=null,m.lastBaseUpdate=ae,m.shared.pending=null}}while(!0);le===null&&(B=de),m.baseState=B,m.firstBaseUpdate=ee,m.lastBaseUpdate=le,g===null&&(m.shared.lanes=0),ia|=x,r.lanes=x,r.memoizedState=de}}function Ty(r,a){if(typeof r!="function")throw Error(o(191,r));r.call(a)}function Ay(r,a){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Ty(s[r],a)}var Yi=P(null),eu=P(0);function Cy(r,a){r=ko,te(eu,r),te(Yi,a),ko=r|a.baseLanes}function Ch(){te(eu,ko),te(Yi,Yi.current)}function Ih(){ko=eu.current,Q(Yi),Q(eu)}var rr=P(null),Tr=null;function na(r){var a=r.alternate;te($t,$t.current&1),te(rr,r),Tr===null&&(a===null||Yi.current!==null||a.memoizedState!==null)&&(Tr=r)}function Mh(r){te($t,$t.current),te(rr,r),Tr===null&&(Tr=r)}function Iy(r){r.tag===22?(te($t,$t.current),te(rr,r),Tr===null&&(Tr=r)):ra()}function ra(){te($t,$t.current),te(rr,rr.current)}function or(r){Q(rr),Tr===r&&(Tr=null),Q($t)}var $t=P(0);function tu(r){for(var a=r;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||jp(s)||zp(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Ao=0,$e=null,_t=null,Wt=null,nu=!1,Ki=!1,ei=!1,ru=0,il=0,Wi=null,KA=0;function Bt(){throw Error(o(321))}function Nh(r,a){if(a===null)return!1;for(var s=0;s<a.length&&s<r.length;s++)if(!tr(r[s],a[s]))return!1;return!0}function Dh(r,a,s,u,m,g){return Ao=g,$e=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,L.H=r===null||r.memoizedState===null?h1:Yh,ei=!1,g=s(u,m),ei=!1,Ki&&(g=Ny(a,s,u,m)),My(r),g}function My(r){L.H=cl;var a=_t!==null&&_t.next!==null;if(Ao=0,Wt=_t=$e=null,nu=!1,il=0,Wi=null,a)throw Error(o(300));r===null||Qt||(r=r.dependencies,r!==null&&Zc(r)&&(Qt=!0))}function Ny(r,a,s,u){$e=r;var m=0;do{if(Ki&&(Wi=null),il=0,Ki=!1,25<=m)throw Error(o(301));if(m+=1,Wt=_t=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}L.H=p1,g=a(s,u)}while(Ki);return g}function WA(){var r=L.H,a=r.useState()[0];return a=typeof a.then=="function"?sl(a):a,r=r.useState()[0],(_t!==null?_t.memoizedState:null)!==r&&($e.flags|=1024),a}function Lh(){var r=ru!==0;return ru=0,r}function Ph(r,a,s){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~s}function kh(r){if(nu){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}nu=!1}Ao=0,Wt=_t=$e=null,Ki=!1,il=ru=0,Wi=null}function kn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?$e.memoizedState=Wt=r:Wt=Wt.next=r,Wt}function Vt(){if(_t===null){var r=$e.alternate;r=r!==null?r.memoizedState:null}else r=_t.next;var a=Wt===null?$e.memoizedState:Wt.next;if(a!==null)Wt=a,_t=r;else{if(r===null)throw $e.alternate===null?Error(o(467)):Error(o(310));_t=r,r={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},Wt===null?$e.memoizedState=Wt=r:Wt=Wt.next=r}return Wt}function ou(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sl(r){var a=il;return il+=1,Wi===null&&(Wi=[]),r=Sy(Wi,r,a),a=$e,(Wt===null?a.memoizedState:Wt.next)===null&&(a=a.alternate,L.H=a===null||a.memoizedState===null?h1:Yh),r}function au(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return sl(r);if(r.$$typeof===C)return wn(r)}throw Error(o(438,String(r)))}function jh(r){var a=null,s=$e.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var u=$e.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(m){return m.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=ou(),$e.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(r),u=0;u<r;u++)s[u]=W;return a.index++,s}function Co(r,a){return typeof a=="function"?a(r):a}function iu(r){var a=Vt();return zh(a,_t,r)}function zh(r,a,s){var u=r.queue;if(u===null)throw Error(o(311));u.lastRenderedReducer=s;var m=r.baseQueue,g=u.pending;if(g!==null){if(m!==null){var x=m.next;m.next=g.next,g.next=x}a.baseQueue=m=g,u.pending=null}if(g=r.baseState,m===null)r.memoizedState=g;else{a=m.next;var M=x=null,B=null,ee=a,le=!1;do{var de=ee.lane&-536870913;if(de!==ee.lane?(nt&de)===de:(Ao&de)===de){var ne=ee.revertLane;if(ne===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),de===Hi&&(le=!0);else if((Ao&ne)===ne){ee=ee.next,ne===Hi&&(le=!0);continue}else de={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},B===null?(M=B=de,x=g):B=B.next=de,$e.lanes|=ne,ia|=ne;de=ee.action,ei&&s(g,de),g=ee.hasEagerState?ee.eagerState:s(g,de)}else ne={lane:de,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},B===null?(M=B=ne,x=g):B=B.next=ne,$e.lanes|=de,ia|=de;ee=ee.next}while(ee!==null&&ee!==a);if(B===null?x=g:B.next=M,!tr(g,r.memoizedState)&&(Qt=!0,le&&(s=Gi,s!==null)))throw s;r.memoizedState=g,r.baseState=x,r.baseQueue=B,u.lastRenderedState=g}return m===null&&(u.lanes=0),[r.memoizedState,u.dispatch]}function Uh(r){var a=Vt(),s=a.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=r;var u=s.dispatch,m=s.pending,g=a.memoizedState;if(m!==null){s.pending=null;var x=m=m.next;do g=r(g,x.action),x=x.next;while(x!==m);tr(g,a.memoizedState)||(Qt=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),s.lastRenderedState=g}return[g,u]}function Dy(r,a,s){var u=$e,m=Vt(),g=ot;if(g){if(s===void 0)throw Error(o(407));s=s()}else s=a();var x=!tr((_t||m).memoizedState,s);if(x&&(m.memoizedState=s,Qt=!0),m=m.queue,$h(ky.bind(null,u,m,r),[r]),m.getSnapshot!==a||x||Wt!==null&&Wt.memoizedState.tag&1){if(u.flags|=2048,Qi(9,{destroy:void 0},Py.bind(null,u,m,s,a),null),Rt===null)throw Error(o(349));g||(Ao&127)!==0||Ly(u,a,s)}return s}function Ly(r,a,s){r.flags|=16384,r={getSnapshot:a,value:s},a=$e.updateQueue,a===null?(a=ou(),$e.updateQueue=a,a.stores=[r]):(s=a.stores,s===null?a.stores=[r]:s.push(r))}function Py(r,a,s,u){a.value=s,a.getSnapshot=u,jy(a)&&zy(r)}function ky(r,a,s){return s(function(){jy(a)&&zy(r)})}function jy(r){var a=r.getSnapshot;r=r.value;try{var s=a();return!tr(r,s)}catch{return!0}}function zy(r){var a=Ga(r,2);a!==null&&Zn(a,r,2)}function Bh(r){var a=kn();if(typeof r=="function"){var s=r;if(r=s(),ei){an(!0);try{s()}finally{an(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:r},a}function Uy(r,a,s,u){return r.baseState=s,zh(r,_t,typeof u=="function"?u:Co)}function QA(r,a,s,u,m){if(cu(r))throw Error(o(485));if(r=a.action,r!==null){var g={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){g.listeners.push(x)}};L.T!==null?s(!0):g.isTransition=!1,u(g),s=a.pending,s===null?(g.next=a.pending=g,By(a,g)):(g.next=s.next,a.pending=s.next=g)}}function By(r,a){var s=a.action,u=a.payload,m=r.state;if(a.isTransition){var g=L.T,x={};L.T=x;try{var M=s(m,u),B=L.S;B!==null&&B(x,M),Fy(r,a,M)}catch(ee){Fh(r,a,ee)}finally{g!==null&&x.types!==null&&(g.types=x.types),L.T=g}}else try{g=s(m,u),Fy(r,a,g)}catch(ee){Fh(r,a,ee)}}function Fy(r,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){$y(r,a,u)},function(u){return Fh(r,a,u)}):$y(r,a,s)}function $y(r,a,s){a.status="fulfilled",a.value=s,Vy(a),r.state=s,a=r.pending,a!==null&&(s=a.next,s===a?r.pending=null:(s=s.next,a.next=s,By(r,s)))}function Fh(r,a,s){var u=r.pending;if(r.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=s,Vy(a),a=a.next;while(a!==u)}r.action=null}function Vy(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function Hy(r,a){return a}function Gy(r,a){if(ot){var s=Rt.formState;if(s!==null){e:{var u=$e;if(ot){if(It){t:{for(var m=It,g=Or;m.nodeType!==8;){if(!g){m=null;break t}if(m=Ar(m.nextSibling),m===null){m=null;break t}}g=m.data,m=g==="F!"||g==="F"?m:null}if(m){It=Ar(m.nextSibling),u=m.data==="F!";break e}}Qo(u)}u=!1}u&&(a=s[0])}}return s=kn(),s.memoizedState=s.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hy,lastRenderedState:a},s.queue=u,s=u1.bind(null,$e,u),u.dispatch=s,u=Bh(!1),g=Zh.bind(null,$e,!1,u.queue),u=kn(),m={state:a,dispatch:null,action:r,pending:null},u.queue=m,s=QA.bind(null,$e,m,g,s),m.dispatch=s,u.memoizedState=r,[a,s,!1]}function qy(r){var a=Vt();return Zy(a,_t,r)}function Zy(r,a,s){if(a=zh(r,a,Hy)[0],r=iu(Co)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=sl(a)}catch(x){throw x===qi?Wc:x}else u=a;a=Vt();var m=a.queue,g=m.dispatch;return s!==a.memoizedState&&($e.flags|=2048,Qi(9,{destroy:void 0},XA.bind(null,m,s),null)),[u,g,r]}function XA(r,a){r.action=a}function Yy(r){var a=Vt(),s=_t;if(s!==null)return Zy(a,s,r);Vt(),a=a.memoizedState,s=Vt();var u=s.queue.dispatch;return s.memoizedState=r,[a,u,!1]}function Qi(r,a,s,u){return r={tag:r,create:s,deps:u,inst:a,next:null},a=$e.updateQueue,a===null&&(a=ou(),$e.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=r.next=r:(u=s.next,s.next=r,r.next=u,a.lastEffect=r),r}function Ky(){return Vt().memoizedState}function su(r,a,s,u){var m=kn();$e.flags|=r,m.memoizedState=Qi(1|a,{destroy:void 0},s,u===void 0?null:u)}function lu(r,a,s,u){var m=Vt();u=u===void 0?null:u;var g=m.memoizedState.inst;_t!==null&&u!==null&&Nh(u,_t.memoizedState.deps)?m.memoizedState=Qi(a,g,s,u):($e.flags|=r,m.memoizedState=Qi(1|a,g,s,u))}function Wy(r,a){su(8390656,8,r,a)}function $h(r,a){lu(2048,8,r,a)}function JA(r){$e.flags|=4;var a=$e.updateQueue;if(a===null)a=ou(),$e.updateQueue=a,a.events=[r];else{var s=a.events;s===null?a.events=[r]:s.push(r)}}function Qy(r){var a=Vt().memoizedState;return JA({ref:a,nextImpl:r}),function(){if((dt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}function Xy(r,a){return lu(4,2,r,a)}function Jy(r,a){return lu(4,4,r,a)}function e1(r,a){if(typeof a=="function"){r=r();var s=a(r);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function t1(r,a,s){s=s!=null?s.concat([r]):null,lu(4,4,e1.bind(null,a,r),s)}function Vh(){}function n1(r,a){var s=Vt();a=a===void 0?null:a;var u=s.memoizedState;return a!==null&&Nh(a,u[1])?u[0]:(s.memoizedState=[r,a],r)}function r1(r,a){var s=Vt();a=a===void 0?null:a;var u=s.memoizedState;if(a!==null&&Nh(a,u[1]))return u[0];if(u=r(),ei){an(!0);try{r()}finally{an(!1)}}return s.memoizedState=[u,a],u}function Hh(r,a,s){return s===void 0||(Ao&1073741824)!==0&&(nt&261930)===0?r.memoizedState=a:(r.memoizedState=s,r=ob(),$e.lanes|=r,ia|=r,s)}function o1(r,a,s,u){return tr(s,a)?s:Yi.current!==null?(r=Hh(r,s,u),tr(r,a)||(Qt=!0),r):(Ao&42)===0||(Ao&1073741824)!==0&&(nt&261930)===0?(Qt=!0,r.memoizedState=s):(r=ob(),$e.lanes|=r,ia|=r,a)}function a1(r,a,s,u,m){var g=F.p;F.p=g!==0&&8>g?g:8;var x=L.T,M={};L.T=M,Zh(r,!1,a,s);try{var B=m(),ee=L.S;if(ee!==null&&ee(M,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var le=YA(B,u);ll(r,a,le,sr(r))}else ll(r,a,u,sr(r))}catch(de){ll(r,a,{then:function(){},status:"rejected",reason:de},sr())}finally{F.p=g,x!==null&&M.types!==null&&(x.types=M.types),L.T=x}}function eC(){}function Gh(r,a,s,u){if(r.tag!==5)throw Error(o(476));var m=i1(r).queue;a1(r,m,a,G,s===null?eC:function(){return s1(r),s(u)})}function i1(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:G},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:s},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function s1(r){var a=i1(r);a.next===null&&(a=r.alternate.memoizedState),ll(r,a.next.queue,{},sr())}function qh(){return wn(Rl)}function l1(){return Vt().memoizedState}function c1(){return Vt().memoizedState}function tC(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var s=sr();r=ea(s);var u=ta(a,r,s);u!==null&&(Zn(u,a,s),rl(u,a,s)),a={cache:Eh()},r.payload=a;return}a=a.return}}function nC(r,a,s){var u=sr();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},cu(r)?d1(a,s):(s=uh(r,a,s,u),s!==null&&(Zn(s,r,u),f1(s,a,u)))}function u1(r,a,s){var u=sr();ll(r,a,s,u)}function ll(r,a,s,u){var m={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(cu(r))d1(a,m);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var x=a.lastRenderedState,M=g(x,s);if(m.hasEagerState=!0,m.eagerState=M,tr(M,x))return Vc(r,a,m,0),Rt===null&&$c(),!1}catch{}if(s=uh(r,a,m,u),s!==null)return Zn(s,r,u),f1(s,a,u),!0}return!1}function Zh(r,a,s,u){if(u={lane:2,revertLane:Rp(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},cu(r)){if(a)throw Error(o(479))}else a=uh(r,s,u,2),a!==null&&Zn(a,r,2)}function cu(r){var a=r.alternate;return r===$e||a!==null&&a===$e}function d1(r,a){Ki=nu=!0;var s=r.pending;s===null?a.next=a:(a.next=s.next,s.next=a),r.pending=a}function f1(r,a,s){if((s&4194048)!==0){var u=a.lanes;u&=r.pendingLanes,s|=u,a.lanes=s,_n(r,s)}}var cl={readContext:wn,use:au,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useLayoutEffect:Bt,useInsertionEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useSyncExternalStore:Bt,useId:Bt,useHostTransitionStatus:Bt,useFormState:Bt,useActionState:Bt,useOptimistic:Bt,useMemoCache:Bt,useCacheRefresh:Bt};cl.useEffectEvent=Bt;var h1={readContext:wn,use:au,useCallback:function(r,a){return kn().memoizedState=[r,a===void 0?null:a],r},useContext:wn,useEffect:Wy,useImperativeHandle:function(r,a,s){s=s!=null?s.concat([r]):null,su(4194308,4,e1.bind(null,a,r),s)},useLayoutEffect:function(r,a){return su(4194308,4,r,a)},useInsertionEffect:function(r,a){su(4,2,r,a)},useMemo:function(r,a){var s=kn();a=a===void 0?null:a;var u=r();if(ei){an(!0);try{r()}finally{an(!1)}}return s.memoizedState=[u,a],u},useReducer:function(r,a,s){var u=kn();if(s!==void 0){var m=s(a);if(ei){an(!0);try{s(a)}finally{an(!1)}}}else m=a;return u.memoizedState=u.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},u.queue=r,r=r.dispatch=nC.bind(null,$e,r),[u.memoizedState,r]},useRef:function(r){var a=kn();return r={current:r},a.memoizedState=r},useState:function(r){r=Bh(r);var a=r.queue,s=u1.bind(null,$e,a);return a.dispatch=s,[r.memoizedState,s]},useDebugValue:Vh,useDeferredValue:function(r,a){var s=kn();return Hh(s,r,a)},useTransition:function(){var r=Bh(!1);return r=a1.bind(null,$e,r.queue,!0,!1),kn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,s){var u=$e,m=kn();if(ot){if(s===void 0)throw Error(o(407));s=s()}else{if(s=a(),Rt===null)throw Error(o(349));(nt&127)!==0||Ly(u,a,s)}m.memoizedState=s;var g={value:s,getSnapshot:a};return m.queue=g,Wy(ky.bind(null,u,g,r),[r]),u.flags|=2048,Qi(9,{destroy:void 0},Py.bind(null,u,g,s,a),null),s},useId:function(){var r=kn(),a=Rt.identifierPrefix;if(ot){var s=to,u=eo;s=(u&~(1<<32-Yt(u)-1)).toString(32)+s,a="_"+a+"R_"+s,s=ru++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=KA++,a="_"+a+"r_"+s.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:qh,useFormState:Gy,useActionState:Gy,useOptimistic:function(r){var a=kn();a.memoizedState=a.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Zh.bind(null,$e,!0,s),s.dispatch=a,[r,a]},useMemoCache:jh,useCacheRefresh:function(){return kn().memoizedState=tC.bind(null,$e)},useEffectEvent:function(r){var a=kn(),s={impl:r};return a.memoizedState=s,function(){if((dt&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},Yh={readContext:wn,use:au,useCallback:n1,useContext:wn,useEffect:$h,useImperativeHandle:t1,useInsertionEffect:Xy,useLayoutEffect:Jy,useMemo:r1,useReducer:iu,useRef:Ky,useState:function(){return iu(Co)},useDebugValue:Vh,useDeferredValue:function(r,a){var s=Vt();return o1(s,_t.memoizedState,r,a)},useTransition:function(){var r=iu(Co)[0],a=Vt().memoizedState;return[typeof r=="boolean"?r:sl(r),a]},useSyncExternalStore:Dy,useId:l1,useHostTransitionStatus:qh,useFormState:qy,useActionState:qy,useOptimistic:function(r,a){var s=Vt();return Uy(s,_t,r,a)},useMemoCache:jh,useCacheRefresh:c1};Yh.useEffectEvent=Qy;var p1={readContext:wn,use:au,useCallback:n1,useContext:wn,useEffect:$h,useImperativeHandle:t1,useInsertionEffect:Xy,useLayoutEffect:Jy,useMemo:r1,useReducer:Uh,useRef:Ky,useState:function(){return Uh(Co)},useDebugValue:Vh,useDeferredValue:function(r,a){var s=Vt();return _t===null?Hh(s,r,a):o1(s,_t.memoizedState,r,a)},useTransition:function(){var r=Uh(Co)[0],a=Vt().memoizedState;return[typeof r=="boolean"?r:sl(r),a]},useSyncExternalStore:Dy,useId:l1,useHostTransitionStatus:qh,useFormState:Yy,useActionState:Yy,useOptimistic:function(r,a){var s=Vt();return _t!==null?Uy(s,_t,r,a):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:jh,useCacheRefresh:c1};p1.useEffectEvent=Qy;function Kh(r,a,s,u){a=r.memoizedState,s=s(u,a),s=s==null?a:p({},a,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var Wh={enqueueSetState:function(r,a,s){r=r._reactInternals;var u=sr(),m=ea(u);m.payload=a,s!=null&&(m.callback=s),a=ta(r,m,u),a!==null&&(Zn(a,r,u),rl(a,r,u))},enqueueReplaceState:function(r,a,s){r=r._reactInternals;var u=sr(),m=ea(u);m.tag=1,m.payload=a,s!=null&&(m.callback=s),a=ta(r,m,u),a!==null&&(Zn(a,r,u),rl(a,r,u))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var s=sr(),u=ea(s);u.tag=2,a!=null&&(u.callback=a),a=ta(r,u,s),a!==null&&(Zn(a,r,s),rl(a,r,s))}};function m1(r,a,s,u,m,g,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,g,x):a.prototype&&a.prototype.isPureReactComponent?!Ks(s,u)||!Ks(m,g):!0}function v1(r,a,s,u){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,u),a.state!==r&&Wh.enqueueReplaceState(a,a.state,null)}function ti(r,a){var s=a;if("ref"in a){s={};for(var u in a)u!=="ref"&&(s[u]=a[u])}if(r=r.defaultProps){s===a&&(s=p({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function g1(r){Fc(r)}function y1(r){console.error(r)}function b1(r){Fc(r)}function uu(r,a){try{var s=r.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function _1(r,a,s){try{var u=r.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Qh(r,a,s){return s=ea(s),s.tag=3,s.payload={element:null},s.callback=function(){uu(r,a)},s}function E1(r){return r=ea(r),r.tag=3,r}function S1(r,a,s,u){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var g=u.value;r.payload=function(){return m(g)},r.callback=function(){_1(a,s,u)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(r.callback=function(){_1(a,s,u),typeof m!="function"&&(sa===null?sa=new Set([this]):sa.add(this));var M=u.stack;this.componentDidCatch(u.value,{componentStack:M!==null?M:""})})}function rC(r,a,s,u,m){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=s.alternate,a!==null&&Vi(a,s,m,!0),s=rr.current,s!==null){switch(s.tag){case 31:case 13:return Tr===null?Su():s.alternate===null&&Ft===0&&(Ft=3),s.flags&=-257,s.flags|=65536,s.lanes=m,u===Qc?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([u]):a.add(u),Sp(r,u,m)),!1;case 22:return s.flags|=65536,u===Qc?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([u]):s.add(u)),Sp(r,u,m)),!1}throw Error(o(435,s.tag))}return Sp(r,u,m),Su(),!1}if(ot)return a=rr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=m,u!==vh&&(r=Error(o(422),{cause:u}),Xs(wr(r,s)))):(u!==vh&&(a=Error(o(423),{cause:u}),Xs(wr(a,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,u=wr(u,s),m=Qh(r.stateNode,u,m),Th(r,m),Ft!==4&&(Ft=2)),!1;var g=Error(o(520),{cause:u});if(g=wr(g,s),gl===null?gl=[g]:gl.push(g),Ft!==4&&(Ft=2),a===null)return!0;u=wr(u,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=Qh(s.stateNode,u,r),Th(s,r),!1;case 1:if(a=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(sa===null||!sa.has(g))))return s.flags|=65536,m&=-m,s.lanes|=m,m=E1(m),S1(m,r,s,u),Th(s,m),!1}s=s.return}while(s!==null);return!1}var Xh=Error(o(461)),Qt=!1;function xn(r,a,s,u){a.child=r===null?Oy(a,null,s,u):Ja(a,r.child,s,u)}function w1(r,a,s,u,m){s=s.render;var g=a.ref;if("ref"in u){var x={};for(var M in u)M!=="ref"&&(x[M]=u[M])}else x=u;return Ka(a),u=Dh(r,a,s,x,g,m),M=Lh(),r!==null&&!Qt?(Ph(r,a,m),Io(r,a,m)):(ot&&M&&ph(a),a.flags|=1,xn(r,a,u,m),a.child)}function x1(r,a,s,u,m){if(r===null){var g=s.type;return typeof g=="function"&&!dh(g)&&g.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=g,R1(r,a,g,u,m)):(r=Gc(s.type,null,u,a,a.mode,m),r.ref=a.ref,r.return=a,a.child=r)}if(g=r.child,!ip(r,m)){var x=g.memoizedProps;if(s=s.compare,s=s!==null?s:Ks,s(x,u)&&r.ref===a.ref)return Io(r,a,m)}return a.flags|=1,r=xo(g,u),r.ref=a.ref,r.return=a,a.child=r}function R1(r,a,s,u,m){if(r!==null){var g=r.memoizedProps;if(Ks(g,u)&&r.ref===a.ref)if(Qt=!1,a.pendingProps=u=g,ip(r,m))(r.flags&131072)!==0&&(Qt=!0);else return a.lanes=r.lanes,Io(r,a,m)}return Jh(r,a,s,u,m)}function O1(r,a,s,u){var m=u.children,g=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,r!==null){for(u=a.child=r.child,m=0;u!==null;)m=m|u.lanes|u.childLanes,u=u.sibling;u=m&~g}else u=0,a.child=null;return T1(r,a,g,s,u)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&Kc(a,g!==null?g.cachePool:null),g!==null?Cy(a,g):Ch(),Iy(a);else return u=a.lanes=536870912,T1(r,a,g!==null?g.baseLanes|s:s,s,u)}else g!==null?(Kc(a,g.cachePool),Cy(a,g),ra(),a.memoizedState=null):(r!==null&&Kc(a,null),Ch(),ra());return xn(r,a,m,s),a.child}function ul(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function T1(r,a,s,u,m){var g=wh();return g=g===null?null:{parent:Kt._currentValue,pool:g},a.memoizedState={baseLanes:s,cachePool:g},r!==null&&Kc(a,null),Ch(),Iy(a),r!==null&&Vi(r,a,u,!0),a.childLanes=m,null}function du(r,a){return a=hu({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function A1(r,a,s){return Ja(a,r.child,null,s),r=du(a,a.pendingProps),r.flags|=2,or(a),a.memoizedState=null,r}function oC(r,a,s){var u=a.pendingProps,m=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(ot){if(u.mode==="hidden")return r=du(a,u),a.lanes=536870912,ul(null,r);if(Mh(a),(r=It)?(r=Bb(r,Or),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Ko!==null?{id:eo,overflow:to}:null,retryLane:536870912,hydrationErrors:null},s=dy(r),s.return=a,a.child=s,Sn=a,It=null)):r=null,r===null)throw Qo(a);return a.lanes=536870912,null}return du(a,u)}var g=r.memoizedState;if(g!==null){var x=g.dehydrated;if(Mh(a),m)if(a.flags&256)a.flags&=-257,a=A1(r,a,s);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(o(558));else if(Qt||Vi(r,a,s,!1),m=(s&r.childLanes)!==0,Qt||m){if(u=Rt,u!==null&&(x=Bn(u,s),x!==0&&x!==g.retryLane))throw g.retryLane=x,Ga(r,x),Zn(u,r,x),Xh;Su(),a=A1(r,a,s)}else r=g.treeContext,It=Ar(x.nextSibling),Sn=a,ot=!0,Wo=null,Or=!1,r!==null&&py(a,r),a=du(a,u),a.flags|=4096;return a}return r=xo(r.child,{mode:u.mode,children:u.children}),r.ref=a.ref,a.child=r,r.return=a,r}function fu(r,a){var s=a.ref;if(s===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(r===null||r.ref!==s)&&(a.flags|=4194816)}}function Jh(r,a,s,u,m){return Ka(a),s=Dh(r,a,s,u,void 0,m),u=Lh(),r!==null&&!Qt?(Ph(r,a,m),Io(r,a,m)):(ot&&u&&ph(a),a.flags|=1,xn(r,a,s,m),a.child)}function C1(r,a,s,u,m,g){return Ka(a),a.updateQueue=null,s=Ny(a,u,s,m),My(r),u=Lh(),r!==null&&!Qt?(Ph(r,a,g),Io(r,a,g)):(ot&&u&&ph(a),a.flags|=1,xn(r,a,s,g),a.child)}function I1(r,a,s,u,m){if(Ka(a),a.stateNode===null){var g=Ui,x=s.contextType;typeof x=="object"&&x!==null&&(g=wn(x)),g=new s(u,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Wh,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=u,g.state=a.memoizedState,g.refs={},Rh(a),x=s.contextType,g.context=typeof x=="object"&&x!==null?wn(x):Ui,g.state=a.memoizedState,x=s.getDerivedStateFromProps,typeof x=="function"&&(Kh(a,s,x,u),g.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(x=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),x!==g.state&&Wh.enqueueReplaceState(g,g.state,null),al(a,u,g,m),ol(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(r===null){g=a.stateNode;var M=a.memoizedProps,B=ti(s,M);g.props=B;var ee=g.context,le=s.contextType;x=Ui,typeof le=="object"&&le!==null&&(x=wn(le));var de=s.getDerivedStateFromProps;le=typeof de=="function"||typeof g.getSnapshotBeforeUpdate=="function",M=a.pendingProps!==M,le||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(M||ee!==x)&&v1(a,g,u,x),Jo=!1;var ne=a.memoizedState;g.state=ne,al(a,u,g,m),ol(),ee=a.memoizedState,M||ne!==ee||Jo?(typeof de=="function"&&(Kh(a,s,de,u),ee=a.memoizedState),(B=Jo||m1(a,s,B,u,ne,ee,x))?(le||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=ee),g.props=u,g.state=ee,g.context=x,u=B):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{g=a.stateNode,Oh(r,a),x=a.memoizedProps,le=ti(s,x),g.props=le,de=a.pendingProps,ne=g.context,ee=s.contextType,B=Ui,typeof ee=="object"&&ee!==null&&(B=wn(ee)),M=s.getDerivedStateFromProps,(ee=typeof M=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(x!==de||ne!==B)&&v1(a,g,u,B),Jo=!1,ne=a.memoizedState,g.state=ne,al(a,u,g,m),ol();var ae=a.memoizedState;x!==de||ne!==ae||Jo||r!==null&&r.dependencies!==null&&Zc(r.dependencies)?(typeof M=="function"&&(Kh(a,s,M,u),ae=a.memoizedState),(le=Jo||m1(a,s,le,u,ne,ae,B)||r!==null&&r.dependencies!==null&&Zc(r.dependencies))?(ee||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(u,ae,B),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(u,ae,B)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=ae),g.props=u,g.state=ae,g.context=B,u=le):(typeof g.componentDidUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(a.flags|=1024),u=!1)}return g=u,fu(r,a),u=(a.flags&128)!==0,g||u?(g=a.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,r!==null&&u?(a.child=Ja(a,r.child,null,m),a.child=Ja(a,null,s,m)):xn(r,a,s,m),a.memoizedState=g.state,r=a.child):r=Io(r,a,m),r}function M1(r,a,s,u){return Za(),a.flags|=256,xn(r,a,s,u),a.child}var ep={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tp(r){return{baseLanes:r,cachePool:_y()}}function np(r,a,s){return r=r!==null?r.childLanes&~s:0,a&&(r|=ir),r}function N1(r,a,s){var u=a.pendingProps,m=!1,g=(a.flags&128)!==0,x;if((x=g)||(x=r!==null&&r.memoizedState===null?!1:($t.current&2)!==0),x&&(m=!0,a.flags&=-129),x=(a.flags&32)!==0,a.flags&=-33,r===null){if(ot){if(m?na(a):ra(),(r=It)?(r=Bb(r,Or),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Ko!==null?{id:eo,overflow:to}:null,retryLane:536870912,hydrationErrors:null},s=dy(r),s.return=a,a.child=s,Sn=a,It=null)):r=null,r===null)throw Qo(a);return zp(r)?a.lanes=32:a.lanes=536870912,null}var M=u.children;return u=u.fallback,m?(ra(),m=a.mode,M=hu({mode:"hidden",children:M},m),u=qa(u,m,s,null),M.return=a,u.return=a,M.sibling=u,a.child=M,u=a.child,u.memoizedState=tp(s),u.childLanes=np(r,x,s),a.memoizedState=ep,ul(null,u)):(na(a),rp(a,M))}var B=r.memoizedState;if(B!==null&&(M=B.dehydrated,M!==null)){if(g)a.flags&256?(na(a),a.flags&=-257,a=op(r,a,s)):a.memoizedState!==null?(ra(),a.child=r.child,a.flags|=128,a=null):(ra(),M=u.fallback,m=a.mode,u=hu({mode:"visible",children:u.children},m),M=qa(M,m,s,null),M.flags|=2,u.return=a,M.return=a,u.sibling=M,a.child=u,Ja(a,r.child,null,s),u=a.child,u.memoizedState=tp(s),u.childLanes=np(r,x,s),a.memoizedState=ep,a=ul(null,u));else if(na(a),zp(M)){if(x=M.nextSibling&&M.nextSibling.dataset,x)var ee=x.dgst;x=ee,u=Error(o(419)),u.stack="",u.digest=x,Xs({value:u,source:null,stack:null}),a=op(r,a,s)}else if(Qt||Vi(r,a,s,!1),x=(s&r.childLanes)!==0,Qt||x){if(x=Rt,x!==null&&(u=Bn(x,s),u!==0&&u!==B.retryLane))throw B.retryLane=u,Ga(r,u),Zn(x,r,u),Xh;jp(M)||Su(),a=op(r,a,s)}else jp(M)?(a.flags|=192,a.child=r.child,a=null):(r=B.treeContext,It=Ar(M.nextSibling),Sn=a,ot=!0,Wo=null,Or=!1,r!==null&&py(a,r),a=rp(a,u.children),a.flags|=4096);return a}return m?(ra(),M=u.fallback,m=a.mode,B=r.child,ee=B.sibling,u=xo(B,{mode:"hidden",children:u.children}),u.subtreeFlags=B.subtreeFlags&65011712,ee!==null?M=xo(ee,M):(M=qa(M,m,s,null),M.flags|=2),M.return=a,u.return=a,u.sibling=M,a.child=u,ul(null,u),u=a.child,M=r.child.memoizedState,M===null?M=tp(s):(m=M.cachePool,m!==null?(B=Kt._currentValue,m=m.parent!==B?{parent:B,pool:B}:m):m=_y(),M={baseLanes:M.baseLanes|s,cachePool:m}),u.memoizedState=M,u.childLanes=np(r,x,s),a.memoizedState=ep,ul(r.child,u)):(na(a),s=r.child,r=s.sibling,s=xo(s,{mode:"visible",children:u.children}),s.return=a,s.sibling=null,r!==null&&(x=a.deletions,x===null?(a.deletions=[r],a.flags|=16):x.push(r)),a.child=s,a.memoizedState=null,s)}function rp(r,a){return a=hu({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function hu(r,a){return r=nr(22,r,null,a),r.lanes=0,r}function op(r,a,s){return Ja(a,r.child,null,s),r=rp(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function D1(r,a,s){r.lanes|=a;var u=r.alternate;u!==null&&(u.lanes|=a),bh(r.return,a,s)}function ap(r,a,s,u,m,g){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:m,treeForkCount:g}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=s,x.tailMode=m,x.treeForkCount=g)}function L1(r,a,s){var u=a.pendingProps,m=u.revealOrder,g=u.tail;u=u.children;var x=$t.current,M=(x&2)!==0;if(M?(x=x&1|2,a.flags|=128):x&=1,te($t,x),xn(r,a,u,s),u=ot?Qs:0,!M&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&D1(r,s,a);else if(r.tag===19)D1(r,s,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=a.child,m=null;s!==null;)r=s.alternate,r!==null&&tu(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=a.child,a.child=null):(m=s.sibling,s.sibling=null),ap(a,!1,m,s,g,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=a.child,a.child=null;m!==null;){if(r=m.alternate,r!==null&&tu(r)===null){a.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}ap(a,!0,s,null,g,u);break;case"together":ap(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function Io(r,a,s){if(r!==null&&(a.dependencies=r.dependencies),ia|=a.lanes,(s&a.childLanes)===0)if(r!==null){if(Vi(r,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(o(153));if(a.child!==null){for(r=a.child,s=xo(r,r.pendingProps),a.child=s,s.return=a;r.sibling!==null;)r=r.sibling,s=s.sibling=xo(r,r.pendingProps),s.return=a;s.sibling=null}return a.child}function ip(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Zc(r)))}function aC(r,a,s){switch(a.tag){case 3:Se(a,a.stateNode.containerInfo),Xo(a,Kt,r.memoizedState.cache),Za();break;case 27:case 5:Le(a);break;case 4:Se(a,a.stateNode.containerInfo);break;case 10:Xo(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Mh(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(na(a),a.flags|=128,null):(s&a.child.childLanes)!==0?N1(r,a,s):(na(a),r=Io(r,a,s),r!==null?r.sibling:null);na(a);break;case 19:var m=(r.flags&128)!==0;if(u=(s&a.childLanes)!==0,u||(Vi(r,a,s,!1),u=(s&a.childLanes)!==0),m){if(u)return L1(r,a,s);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),te($t,$t.current),u)break;return null;case 22:return a.lanes=0,O1(r,a,s,a.pendingProps);case 24:Xo(a,Kt,r.memoizedState.cache)}return Io(r,a,s)}function P1(r,a,s){if(r!==null)if(r.memoizedProps!==a.pendingProps)Qt=!0;else{if(!ip(r,s)&&(a.flags&128)===0)return Qt=!1,aC(r,a,s);Qt=(r.flags&131072)!==0}else Qt=!1,ot&&(a.flags&1048576)!==0&&hy(a,Qs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(r=Qa(a.elementType),a.type=r,typeof r=="function")dh(r)?(u=ti(r,u),a.tag=1,a=I1(null,a,r,u,s)):(a.tag=0,a=Jh(null,a,r,u,s));else{if(r!=null){var m=r.$$typeof;if(m===R){a.tag=11,a=w1(null,a,r,u,s);break e}else if(m===D){a.tag=14,a=x1(null,a,r,u,s);break e}}throw a=X(r)||r,Error(o(306,a,""))}}return a;case 0:return Jh(r,a,a.type,a.pendingProps,s);case 1:return u=a.type,m=ti(u,a.pendingProps),I1(r,a,u,m,s);case 3:e:{if(Se(a,a.stateNode.containerInfo),r===null)throw Error(o(387));u=a.pendingProps;var g=a.memoizedState;m=g.element,Oh(r,a),al(a,u,null,s);var x=a.memoizedState;if(u=x.cache,Xo(a,Kt,u),u!==g.cache&&_h(a,[Kt],s,!0),ol(),u=x.element,g.isDehydrated)if(g={element:u,isDehydrated:!1,cache:x.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=M1(r,a,u,s);break e}else if(u!==m){m=wr(Error(o(424)),a),Xs(m),a=M1(r,a,u,s);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,It=Ar(r.firstChild),Sn=a,ot=!0,Wo=null,Or=!0,s=Oy(a,null,u,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Za(),u===m){a=Io(r,a,s);break e}xn(r,a,u,s)}a=a.child}return a;case 26:return fu(r,a),r===null?(s=qb(a.type,null,a.pendingProps,null))?a.memoizedState=s:ot||(s=a.type,r=a.pendingProps,u=Cu(_e.current).createElement(s),u[En]=a,u[Fn]=r,Rn(u,s,r),fn(u),a.stateNode=u):a.memoizedState=qb(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return Le(a),r===null&&ot&&(u=a.stateNode=Vb(a.type,a.pendingProps,_e.current),Sn=a,Or=!0,m=It,da(a.type)?(Up=m,It=Ar(u.firstChild)):It=m),xn(r,a,a.pendingProps.children,s),fu(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&ot&&((m=u=It)&&(u=PC(u,a.type,a.pendingProps,Or),u!==null?(a.stateNode=u,Sn=a,It=Ar(u.firstChild),Or=!1,m=!0):m=!1),m||Qo(a)),Le(a),m=a.type,g=a.pendingProps,x=r!==null?r.memoizedProps:null,u=g.children,Lp(m,g)?u=null:x!==null&&Lp(m,x)&&(a.flags|=32),a.memoizedState!==null&&(m=Dh(r,a,WA,null,null,s),Rl._currentValue=m),fu(r,a),xn(r,a,u,s),a.child;case 6:return r===null&&ot&&((r=s=It)&&(s=kC(s,a.pendingProps,Or),s!==null?(a.stateNode=s,Sn=a,It=null,r=!0):r=!1),r||Qo(a)),null;case 13:return N1(r,a,s);case 4:return Se(a,a.stateNode.containerInfo),u=a.pendingProps,r===null?a.child=Ja(a,null,u,s):xn(r,a,u,s),a.child;case 11:return w1(r,a,a.type,a.pendingProps,s);case 7:return xn(r,a,a.pendingProps,s),a.child;case 8:return xn(r,a,a.pendingProps.children,s),a.child;case 12:return xn(r,a,a.pendingProps.children,s),a.child;case 10:return u=a.pendingProps,Xo(a,a.type,u.value),xn(r,a,u.children,s),a.child;case 9:return m=a.type._context,u=a.pendingProps.children,Ka(a),m=wn(m),u=u(m),a.flags|=1,xn(r,a,u,s),a.child;case 14:return x1(r,a,a.type,a.pendingProps,s);case 15:return R1(r,a,a.type,a.pendingProps,s);case 19:return L1(r,a,s);case 31:return oC(r,a,s);case 22:return O1(r,a,s,a.pendingProps);case 24:return Ka(a),u=wn(Kt),r===null?(m=wh(),m===null&&(m=Rt,g=Eh(),m.pooledCache=g,g.refCount++,g!==null&&(m.pooledCacheLanes|=s),m=g),a.memoizedState={parent:u,cache:m},Rh(a),Xo(a,Kt,m)):((r.lanes&s)!==0&&(Oh(r,a),al(a,null,null,s),ol()),m=r.memoizedState,g=a.memoizedState,m.parent!==u?(m={parent:u,cache:u},a.memoizedState=m,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=m),Xo(a,Kt,u)):(u=g.cache,Xo(a,Kt,u),u!==m.cache&&_h(a,[Kt],s,!0))),xn(r,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(o(156,a.tag))}function Mo(r){r.flags|=4}function sp(r,a,s,u,m){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(lb())r.flags|=8192;else throw Xa=Qc,xh}else r.flags&=-16777217}function k1(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Qb(a))if(lb())r.flags|=8192;else throw Xa=Qc,xh}function pu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?bt():536870912,r.lanes|=a,ts|=a)}function dl(r,a){if(!ot)switch(r.tailMode){case"hidden":a=r.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function Mt(r){var a=r.alternate!==null&&r.alternate.child===r.child,s=0,u=0;if(a)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=u,r.childLanes=s,a}function iC(r,a,s){var u=a.pendingProps;switch(mh(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(a),null;case 1:return Mt(a),null;case 3:return s=a.stateNode,u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),To(Kt),De(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&($i(a)?Mo(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,gh())),Mt(a),null;case 26:var m=a.type,g=a.memoizedState;return r===null?(Mo(a),g!==null?(Mt(a),k1(a,g)):(Mt(a),sp(a,m,null,u,s))):g?g!==r.memoizedState?(Mo(a),Mt(a),k1(a,g)):(Mt(a),a.flags&=-16777217):(r=r.memoizedProps,r!==u&&Mo(a),Mt(a),sp(a,m,r,u,s)),null;case 27:if(Ee(a),s=_e.current,m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==u&&Mo(a);else{if(!u){if(a.stateNode===null)throw Error(o(166));return Mt(a),null}r=se.current,$i(a)?my(a):(r=Vb(m,u,s),a.stateNode=r,Mo(a))}return Mt(a),null;case 5:if(Ee(a),m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==u&&Mo(a);else{if(!u){if(a.stateNode===null)throw Error(o(166));return Mt(a),null}if(g=se.current,$i(a))my(a);else{var x=Cu(_e.current);switch(g){case 1:g=x.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:g=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":g=x.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":g=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":g=x.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof u.is=="string"?x.createElement("select",{is:u.is}):x.createElement("select"),u.multiple?g.multiple=!0:u.size&&(g.size=u.size);break;default:g=typeof u.is=="string"?x.createElement(m,{is:u.is}):x.createElement(m)}}g[En]=a,g[Fn]=u;e:for(x=a.child;x!==null;){if(x.tag===5||x.tag===6)g.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===a)break e;for(;x.sibling===null;){if(x.return===null||x.return===a)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}a.stateNode=g;e:switch(Rn(g,m,u),m){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Mo(a)}}return Mt(a),sp(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,s),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==u&&Mo(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(o(166));if(r=_e.current,$i(a)){if(r=a.stateNode,s=a.memoizedProps,u=null,m=Sn,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}r[En]=a,r=!!(r.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||Nb(r.nodeValue,s)),r||Qo(a,!0)}else r=Cu(r).createTextNode(u),r[En]=a,a.stateNode=r}return Mt(a),null;case 31:if(s=a.memoizedState,r===null||r.memoizedState!==null){if(u=$i(a),s!==null){if(r===null){if(!u)throw Error(o(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(557));r[En]=a}else Za(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mt(a),r=!1}else s=gh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return a.flags&256?(or(a),a):(or(a),null);if((a.flags&128)!==0)throw Error(o(558))}return Mt(a),null;case 13:if(u=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=$i(a),u!==null&&u.dehydrated!==null){if(r===null){if(!m)throw Error(o(318));if(m=a.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[En]=a}else Za(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mt(a),m=!1}else m=gh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return a.flags&256?(or(a),a):(or(a),null)}return or(a),(a.flags&128)!==0?(a.lanes=s,a):(s=u!==null,r=r!==null&&r.memoizedState!==null,s&&(u=a.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048)),s!==r&&s&&(a.child.flags|=8192),pu(a,a.updateQueue),Mt(a),null);case 4:return De(),r===null&&Cp(a.stateNode.containerInfo),Mt(a),null;case 10:return To(a.type),Mt(a),null;case 19:if(Q($t),u=a.memoizedState,u===null)return Mt(a),null;if(m=(a.flags&128)!==0,g=u.rendering,g===null)if(m)dl(u,!1);else{if(Ft!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(g=tu(r),g!==null){for(a.flags|=128,dl(u,!1),r=g.updateQueue,a.updateQueue=r,pu(a,r),a.subtreeFlags=0,r=s,s=a.child;s!==null;)uy(s,r),s=s.sibling;return te($t,$t.current&1|2),ot&&Ro(a,u.treeForkCount),a.child}r=r.sibling}u.tail!==null&&ue()>bu&&(a.flags|=128,m=!0,dl(u,!1),a.lanes=4194304)}else{if(!m)if(r=tu(g),r!==null){if(a.flags|=128,m=!0,r=r.updateQueue,a.updateQueue=r,pu(a,r),dl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!g.alternate&&!ot)return Mt(a),null}else 2*ue()-u.renderingStartTime>bu&&s!==536870912&&(a.flags|=128,m=!0,dl(u,!1),a.lanes=4194304);u.isBackwards?(g.sibling=a.child,a.child=g):(r=u.last,r!==null?r.sibling=g:a.child=g,u.last=g)}return u.tail!==null?(r=u.tail,u.rendering=r,u.tail=r.sibling,u.renderingStartTime=ue(),r.sibling=null,s=$t.current,te($t,m?s&1|2:s&1),ot&&Ro(a,u.treeForkCount),r):(Mt(a),null);case 22:case 23:return or(a),Ih(),u=a.memoizedState!==null,r!==null?r.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(s&536870912)!==0&&(a.flags&128)===0&&(Mt(a),a.subtreeFlags&6&&(a.flags|=8192)):Mt(a),s=a.updateQueue,s!==null&&pu(a,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==s&&(a.flags|=2048),r!==null&&Q(Wa),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),To(Kt),Mt(a),null;case 25:return null;case 30:return null}throw Error(o(156,a.tag))}function sC(r,a){switch(mh(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return To(Kt),De(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return Ee(a),null;case 31:if(a.memoizedState!==null){if(or(a),a.alternate===null)throw Error(o(340));Za()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(or(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(o(340));Za()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return Q($t),null;case 4:return De(),null;case 10:return To(a.type),null;case 22:case 23:return or(a),Ih(),r!==null&&Q(Wa),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return To(Kt),null;case 25:return null;default:return null}}function j1(r,a){switch(mh(a),a.tag){case 3:To(Kt),De();break;case 26:case 27:case 5:Ee(a);break;case 4:De();break;case 31:a.memoizedState!==null&&or(a);break;case 13:or(a);break;case 19:Q($t);break;case 10:To(a.type);break;case 22:case 23:or(a),Ih(),r!==null&&Q(Wa);break;case 24:To(Kt)}}function fl(r,a){try{var s=a.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var m=u.next;s=m;do{if((s.tag&r)===r){u=void 0;var g=s.create,x=s.inst;u=g(),x.destroy=u}s=s.next}while(s!==m)}}catch(M){vt(a,a.return,M)}}function oa(r,a,s){try{var u=a.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var g=m.next;u=g;do{if((u.tag&r)===r){var x=u.inst,M=x.destroy;if(M!==void 0){x.destroy=void 0,m=a;var B=s,ee=M;try{ee()}catch(le){vt(m,B,le)}}}u=u.next}while(u!==g)}}catch(le){vt(a,a.return,le)}}function z1(r){var a=r.updateQueue;if(a!==null){var s=r.stateNode;try{Ay(a,s)}catch(u){vt(r,r.return,u)}}}function U1(r,a,s){s.props=ti(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(u){vt(r,a,u)}}function hl(r,a){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var u=r.stateNode;break;case 30:u=r.stateNode;break;default:u=r.stateNode}typeof s=="function"?r.refCleanup=s(u):s.current=u}}catch(m){vt(r,a,m)}}function no(r,a){var s=r.ref,u=r.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(m){vt(r,a,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){vt(r,a,m)}else s.current=null}function B1(r){var a=r.type,s=r.memoizedProps,u=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(m){vt(r,r.return,m)}}function lp(r,a,s){try{var u=r.stateNode;CC(u,r.type,s,a),u[Fn]=a}catch(m){vt(r,r.return,m)}}function F1(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&da(r.type)||r.tag===4}function cp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||F1(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&da(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function up(r,a,s){var u=r.tag;if(u===5||u===6)r=r.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(r),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=So));else if(u!==4&&(u===27&&da(r.type)&&(s=r.stateNode,a=null),r=r.child,r!==null))for(up(r,a,s),r=r.sibling;r!==null;)up(r,a,s),r=r.sibling}function mu(r,a,s){var u=r.tag;if(u===5||u===6)r=r.stateNode,a?s.insertBefore(r,a):s.appendChild(r);else if(u!==4&&(u===27&&da(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(mu(r,a,s),r=r.sibling;r!==null;)mu(r,a,s),r=r.sibling}function $1(r){var a=r.stateNode,s=r.memoizedProps;try{for(var u=r.type,m=a.attributes;m.length;)a.removeAttributeNode(m[0]);Rn(a,u,s),a[En]=r,a[Fn]=s}catch(g){vt(r,r.return,g)}}var No=!1,Xt=!1,dp=!1,V1=typeof WeakSet=="function"?WeakSet:Set,hn=null;function lC(r,a){if(r=r.containerInfo,Np=ku,r=ty(r),oh(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var m=u.anchorOffset,g=u.focusNode;u=u.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var x=0,M=-1,B=-1,ee=0,le=0,de=r,ne=null;t:for(;;){for(var ae;de!==s||m!==0&&de.nodeType!==3||(M=x+m),de!==g||u!==0&&de.nodeType!==3||(B=x+u),de.nodeType===3&&(x+=de.nodeValue.length),(ae=de.firstChild)!==null;)ne=de,de=ae;for(;;){if(de===r)break t;if(ne===s&&++ee===m&&(M=x),ne===g&&++le===u&&(B=x),(ae=de.nextSibling)!==null)break;de=ne,ne=de.parentNode}de=ae}s=M===-1||B===-1?null:{start:M,end:B}}else s=null}s=s||{start:0,end:0}}else s=null;for(Dp={focusedElem:r,selectionRange:s},ku=!1,hn=a;hn!==null;)if(a=hn,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,hn=r;else for(;hn!==null;){switch(a=hn,g=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)m=r[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&g!==null){r=void 0,s=a,m=g.memoizedProps,g=g.memoizedState,u=s.stateNode;try{var Te=ti(s.type,m);r=u.getSnapshotBeforeUpdate(Te,g),u.__reactInternalSnapshotBeforeUpdate=r}catch(je){vt(s,s.return,je)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,s=r.nodeType,s===9)kp(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":kp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(o(163))}if(r=a.sibling,r!==null){r.return=a.return,hn=r;break}hn=a.return}}function H1(r,a,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:Lo(r,s),u&4&&fl(5,s);break;case 1:if(Lo(r,s),u&4)if(r=s.stateNode,a===null)try{r.componentDidMount()}catch(x){vt(s,s.return,x)}else{var m=ti(s.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(m,a,r.__reactInternalSnapshotBeforeUpdate)}catch(x){vt(s,s.return,x)}}u&64&&z1(s),u&512&&hl(s,s.return);break;case 3:if(Lo(r,s),u&64&&(r=s.updateQueue,r!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{Ay(r,a)}catch(x){vt(s,s.return,x)}}break;case 27:a===null&&u&4&&$1(s);case 26:case 5:Lo(r,s),a===null&&u&4&&B1(s),u&512&&hl(s,s.return);break;case 12:Lo(r,s);break;case 31:Lo(r,s),u&4&&Z1(r,s);break;case 13:Lo(r,s),u&4&&Y1(r,s),u&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=gC.bind(null,s),jC(r,s))));break;case 22:if(u=s.memoizedState!==null||No,!u){a=a!==null&&a.memoizedState!==null||Xt,m=No;var g=Xt;No=u,(Xt=a)&&!g?Po(r,s,(s.subtreeFlags&8772)!==0):Lo(r,s),No=m,Xt=g}break;case 30:break;default:Lo(r,s)}}function G1(r){var a=r.alternate;a!==null&&(r.alternate=null,G1(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&Ff(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Dt=null,Vn=!1;function Do(r,a,s){for(s=s.child;s!==null;)q1(r,a,s),s=s.sibling}function q1(r,a,s){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Zt,s)}catch{}switch(s.tag){case 26:Xt||no(s,a),Do(r,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Xt||no(s,a);var u=Dt,m=Vn;da(s.type)&&(Dt=s.stateNode,Vn=!1),Do(r,a,s),Sl(s.stateNode),Dt=u,Vn=m;break;case 5:Xt||no(s,a);case 6:if(u=Dt,m=Vn,Dt=null,Do(r,a,s),Dt=u,Vn=m,Dt!==null)if(Vn)try{(Dt.nodeType===9?Dt.body:Dt.nodeName==="HTML"?Dt.ownerDocument.body:Dt).removeChild(s.stateNode)}catch(g){vt(s,a,g)}else try{Dt.removeChild(s.stateNode)}catch(g){vt(s,a,g)}break;case 18:Dt!==null&&(Vn?(r=Dt,zb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),cs(r)):zb(Dt,s.stateNode));break;case 4:u=Dt,m=Vn,Dt=s.stateNode.containerInfo,Vn=!0,Do(r,a,s),Dt=u,Vn=m;break;case 0:case 11:case 14:case 15:oa(2,s,a),Xt||oa(4,s,a),Do(r,a,s);break;case 1:Xt||(no(s,a),u=s.stateNode,typeof u.componentWillUnmount=="function"&&U1(s,a,u)),Do(r,a,s);break;case 21:Do(r,a,s);break;case 22:Xt=(u=Xt)||s.memoizedState!==null,Do(r,a,s),Xt=u;break;default:Do(r,a,s)}}function Z1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{cs(r)}catch(s){vt(a,a.return,s)}}}function Y1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{cs(r)}catch(s){vt(a,a.return,s)}}function cC(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new V1),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new V1),a;default:throw Error(o(435,r.tag))}}function vu(r,a){var s=cC(r);a.forEach(function(u){if(!s.has(u)){s.add(u);var m=yC.bind(null,r,u);u.then(m,m)}})}function Hn(r,a){var s=a.deletions;if(s!==null)for(var u=0;u<s.length;u++){var m=s[u],g=r,x=a,M=x;e:for(;M!==null;){switch(M.tag){case 27:if(da(M.type)){Dt=M.stateNode,Vn=!1;break e}break;case 5:Dt=M.stateNode,Vn=!1;break e;case 3:case 4:Dt=M.stateNode.containerInfo,Vn=!0;break e}M=M.return}if(Dt===null)throw Error(o(160));q1(g,x,m),Dt=null,Vn=!1,g=m.alternate,g!==null&&(g.return=null),m.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)K1(a,r),a=a.sibling}var Br=null;function K1(r,a){var s=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Hn(a,r),Gn(r),u&4&&(oa(3,r,r.return),fl(3,r),oa(5,r,r.return));break;case 1:Hn(a,r),Gn(r),u&512&&(Xt||s===null||no(s,s.return)),u&64&&No&&(r=r.updateQueue,r!==null&&(u=r.callbacks,u!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var m=Br;if(Hn(a,r),Gn(r),u&512&&(Xt||s===null||no(s,s.return)),u&4){var g=s!==null?s.memoizedState:null;if(u=r.memoizedState,s===null)if(u===null)if(r.stateNode===null){e:{u=r.type,s=r.memoizedProps,m=m.ownerDocument||m;t:switch(u){case"title":g=m.getElementsByTagName("title")[0],(!g||g[Bs]||g[En]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=m.createElement(u),m.head.insertBefore(g,m.querySelector("head > title"))),Rn(g,u,s),g[En]=r,fn(g),u=g;break e;case"link":var x=Kb("link","href",m).get(u+(s.href||""));if(x){for(var M=0;M<x.length;M++)if(g=x[M],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){x.splice(M,1);break t}}g=m.createElement(u),Rn(g,u,s),m.head.appendChild(g);break;case"meta":if(x=Kb("meta","content",m).get(u+(s.content||""))){for(M=0;M<x.length;M++)if(g=x[M],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){x.splice(M,1);break t}}g=m.createElement(u),Rn(g,u,s),m.head.appendChild(g);break;default:throw Error(o(468,u))}g[En]=r,fn(g),u=g}r.stateNode=u}else Wb(m,r.type,r.stateNode);else r.stateNode=Yb(m,u,r.memoizedProps);else g!==u?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,u===null?Wb(m,r.type,r.stateNode):Yb(m,u,r.memoizedProps)):u===null&&r.stateNode!==null&&lp(r,r.memoizedProps,s.memoizedProps)}break;case 27:Hn(a,r),Gn(r),u&512&&(Xt||s===null||no(s,s.return)),s!==null&&u&4&&lp(r,r.memoizedProps,s.memoizedProps);break;case 5:if(Hn(a,r),Gn(r),u&512&&(Xt||s===null||no(s,s.return)),r.flags&32){m=r.stateNode;try{Ni(m,"")}catch(Te){vt(r,r.return,Te)}}u&4&&r.stateNode!=null&&(m=r.memoizedProps,lp(r,m,s!==null?s.memoizedProps:m)),u&1024&&(dp=!0);break;case 6:if(Hn(a,r),Gn(r),u&4){if(r.stateNode===null)throw Error(o(162));u=r.memoizedProps,s=r.stateNode;try{s.nodeValue=u}catch(Te){vt(r,r.return,Te)}}break;case 3:if(Nu=null,m=Br,Br=Iu(a.containerInfo),Hn(a,r),Br=m,Gn(r),u&4&&s!==null&&s.memoizedState.isDehydrated)try{cs(a.containerInfo)}catch(Te){vt(r,r.return,Te)}dp&&(dp=!1,W1(r));break;case 4:u=Br,Br=Iu(r.stateNode.containerInfo),Hn(a,r),Gn(r),Br=u;break;case 12:Hn(a,r),Gn(r);break;case 31:Hn(a,r),Gn(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,vu(r,u)));break;case 13:Hn(a,r),Gn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(yu=ue()),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,vu(r,u)));break;case 22:m=r.memoizedState!==null;var B=s!==null&&s.memoizedState!==null,ee=No,le=Xt;if(No=ee||m,Xt=le||B,Hn(a,r),Xt=le,No=ee,Gn(r),u&8192)e:for(a=r.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,m&&(s===null||B||No||Xt||ni(r)),s=null,a=r;;){if(a.tag===5||a.tag===26){if(s===null){B=s=a;try{if(g=B.stateNode,m)x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{M=B.stateNode;var de=B.memoizedProps.style,ne=de!=null&&de.hasOwnProperty("display")?de.display:null;M.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(Te){vt(B,B.return,Te)}}}else if(a.tag===6){if(s===null){B=a;try{B.stateNode.nodeValue=m?"":B.memoizedProps}catch(Te){vt(B,B.return,Te)}}}else if(a.tag===18){if(s===null){B=a;try{var ae=B.stateNode;m?Ub(ae,!0):Ub(B.stateNode,!1)}catch(Te){vt(B,B.return,Te)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=r.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,vu(r,s))));break;case 19:Hn(a,r),Gn(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,vu(r,u)));break;case 30:break;case 21:break;default:Hn(a,r),Gn(r)}}function Gn(r){var a=r.flags;if(a&2){try{for(var s,u=r.return;u!==null;){if(F1(u)){s=u;break}u=u.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var m=s.stateNode,g=cp(r);mu(r,g,m);break;case 5:var x=s.stateNode;s.flags&32&&(Ni(x,""),s.flags&=-33);var M=cp(r);mu(r,M,x);break;case 3:case 4:var B=s.stateNode.containerInfo,ee=cp(r);up(r,ee,B);break;default:throw Error(o(161))}}catch(le){vt(r,r.return,le)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function W1(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;W1(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Lo(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)H1(r,a.alternate,a),a=a.sibling}function ni(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:oa(4,a,a.return),ni(a);break;case 1:no(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&U1(a,a.return,s),ni(a);break;case 27:Sl(a.stateNode);case 26:case 5:no(a,a.return),ni(a);break;case 22:a.memoizedState===null&&ni(a);break;case 30:ni(a);break;default:ni(a)}r=r.sibling}}function Po(r,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,m=r,g=a,x=g.flags;switch(g.tag){case 0:case 11:case 15:Po(m,g,s),fl(4,g);break;case 1:if(Po(m,g,s),u=g,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(ee){vt(u,u.return,ee)}if(u=g,m=u.updateQueue,m!==null){var M=u.stateNode;try{var B=m.shared.hiddenCallbacks;if(B!==null)for(m.shared.hiddenCallbacks=null,m=0;m<B.length;m++)Ty(B[m],M)}catch(ee){vt(u,u.return,ee)}}s&&x&64&&z1(g),hl(g,g.return);break;case 27:$1(g);case 26:case 5:Po(m,g,s),s&&u===null&&x&4&&B1(g),hl(g,g.return);break;case 12:Po(m,g,s);break;case 31:Po(m,g,s),s&&x&4&&Z1(m,g);break;case 13:Po(m,g,s),s&&x&4&&Y1(m,g);break;case 22:g.memoizedState===null&&Po(m,g,s),hl(g,g.return);break;case 30:break;default:Po(m,g,s)}a=a.sibling}}function fp(r,a){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&Js(s))}function hp(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Js(r))}function Fr(r,a,s,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Q1(r,a,s,u),a=a.sibling}function Q1(r,a,s,u){var m=a.flags;switch(a.tag){case 0:case 11:case 15:Fr(r,a,s,u),m&2048&&fl(9,a);break;case 1:Fr(r,a,s,u);break;case 3:Fr(r,a,s,u),m&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Js(r)));break;case 12:if(m&2048){Fr(r,a,s,u),r=a.stateNode;try{var g=a.memoizedProps,x=g.id,M=g.onPostCommit;typeof M=="function"&&M(x,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(B){vt(a,a.return,B)}}else Fr(r,a,s,u);break;case 31:Fr(r,a,s,u);break;case 13:Fr(r,a,s,u);break;case 23:break;case 22:g=a.stateNode,x=a.alternate,a.memoizedState!==null?g._visibility&2?Fr(r,a,s,u):pl(r,a):g._visibility&2?Fr(r,a,s,u):(g._visibility|=2,Xi(r,a,s,u,(a.subtreeFlags&10256)!==0||!1)),m&2048&&fp(x,a);break;case 24:Fr(r,a,s,u),m&2048&&hp(a.alternate,a);break;default:Fr(r,a,s,u)}}function Xi(r,a,s,u,m){for(m=m&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=r,x=a,M=s,B=u,ee=x.flags;switch(x.tag){case 0:case 11:case 15:Xi(g,x,M,B,m),fl(8,x);break;case 23:break;case 22:var le=x.stateNode;x.memoizedState!==null?le._visibility&2?Xi(g,x,M,B,m):pl(g,x):(le._visibility|=2,Xi(g,x,M,B,m)),m&&ee&2048&&fp(x.alternate,x);break;case 24:Xi(g,x,M,B,m),m&&ee&2048&&hp(x.alternate,x);break;default:Xi(g,x,M,B,m)}a=a.sibling}}function pl(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=r,u=a,m=u.flags;switch(u.tag){case 22:pl(s,u),m&2048&&fp(u.alternate,u);break;case 24:pl(s,u),m&2048&&hp(u.alternate,u);break;default:pl(s,u)}a=a.sibling}}var ml=8192;function Ji(r,a,s){if(r.subtreeFlags&ml)for(r=r.child;r!==null;)X1(r,a,s),r=r.sibling}function X1(r,a,s){switch(r.tag){case 26:Ji(r,a,s),r.flags&ml&&r.memoizedState!==null&&KC(s,Br,r.memoizedState,r.memoizedProps);break;case 5:Ji(r,a,s);break;case 3:case 4:var u=Br;Br=Iu(r.stateNode.containerInfo),Ji(r,a,s),Br=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=ml,ml=16777216,Ji(r,a,s),ml=u):Ji(r,a,s));break;default:Ji(r,a,s)}}function J1(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function vl(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];hn=u,tb(u,r)}J1(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)eb(r),r=r.sibling}function eb(r){switch(r.tag){case 0:case 11:case 15:vl(r),r.flags&2048&&oa(9,r,r.return);break;case 3:vl(r);break;case 12:vl(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,gu(r)):vl(r);break;default:vl(r)}}function gu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];hn=u,tb(u,r)}J1(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:oa(8,a,a.return),gu(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,gu(a));break;default:gu(a)}r=r.sibling}}function tb(r,a){for(;hn!==null;){var s=hn;switch(s.tag){case 0:case 11:case 15:oa(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Js(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,hn=u;else e:for(s=r;hn!==null;){u=hn;var m=u.sibling,g=u.return;if(G1(u),u===s){hn=null;break e}if(m!==null){m.return=g,hn=m;break e}hn=g}}}var uC={getCacheForType:function(r){var a=wn(Kt),s=a.data.get(r);return s===void 0&&(s=r(),a.data.set(r,s)),s},cacheSignal:function(){return wn(Kt).controller.signal}},dC=typeof WeakMap=="function"?WeakMap:Map,dt=0,Rt=null,Xe=null,nt=0,mt=0,ar=null,aa=!1,es=!1,pp=!1,ko=0,Ft=0,ia=0,ri=0,mp=0,ir=0,ts=0,gl=null,qn=null,vp=!1,yu=0,nb=0,bu=1/0,_u=null,sa=null,sn=0,la=null,ns=null,jo=0,gp=0,yp=null,rb=null,yl=0,bp=null;function sr(){return(dt&2)!==0&&nt!==0?nt&-nt:L.T!==null?Rp():Uf()}function ob(){if(ir===0)if((nt&536870912)===0||ot){var r=it;it<<=1,(it&3932160)===0&&(it=262144),ir=r}else ir=536870912;return r=rr.current,r!==null&&(r.flags|=32),ir}function Zn(r,a,s){(r===Rt&&(mt===2||mt===9)||r.cancelPendingCommit!==null)&&(rs(r,0),ca(r,nt,ir,!1)),lt(r,s),((dt&2)===0||r!==Rt)&&(r===Rt&&((dt&2)===0&&(ri|=s),Ft===4&&ca(r,nt,ir,!1)),ro(r))}function ab(r,a,s){if((dt&6)!==0)throw Error(o(327));var u=!s&&(a&127)===0&&(a&r.expiredLanes)===0||Ke(r,a),m=u?pC(r,a):Ep(r,a,!0),g=u;do{if(m===0){es&&!u&&ca(r,a,0,!1);break}else{if(s=r.current.alternate,g&&!fC(s)){m=Ep(r,a,!1),g=!1;continue}if(m===2){if(g=a,r.errorRecoveryDisabledLanes&g)var x=0;else x=r.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){a=x;e:{var M=r;m=gl;var B=M.current.memoizedState.isDehydrated;if(B&&(rs(M,x).flags|=256),x=Ep(M,x,!1),x!==2){if(pp&&!B){M.errorRecoveryDisabledLanes|=g,ri|=g,m=4;break e}g=qn,qn=m,g!==null&&(qn===null?qn=g:qn.push.apply(qn,g))}m=x}if(g=!1,m!==2)continue}}if(m===1){rs(r,0),ca(r,a,0,!0);break}e:{switch(u=r,g=m,g){case 0:case 1:throw Error(o(345));case 4:if((a&4194048)!==a)break;case 6:ca(u,a,ir,!aa);break e;case 2:qn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((a&62914560)===a&&(m=yu+300-ue(),10<m)){if(ca(u,a,ir,!aa),Me(u,0,!0)!==0)break e;jo=a,u.timeoutHandle=kb(ib.bind(null,u,s,qn,_u,vp,a,ir,ri,ts,aa,g,"Throttled",-0,0),m);break e}ib(u,s,qn,_u,vp,a,ir,ri,ts,aa,g,null,-0,0)}}break}while(!0);ro(r)}function ib(r,a,s,u,m,g,x,M,B,ee,le,de,ne,ae){if(r.timeoutHandle=-1,de=a.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:So},X1(a,g,de);var Te=(g&62914560)===g?yu-ue():(g&4194048)===g?nb-ue():0;if(Te=WC(de,Te),Te!==null){jo=g,r.cancelPendingCommit=Te(pb.bind(null,r,a,g,s,u,m,x,M,B,le,de,null,ne,ae)),ca(r,g,x,!ee);return}}pb(r,a,g,s,u,m,x,M,B)}function fC(r){for(var a=r;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var m=s[u],g=m.getSnapshot;m=m.value;try{if(!tr(g(),m))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ca(r,a,s,u){a&=~mp,a&=~ri,r.suspendedLanes|=a,r.pingedLanes&=~a,u&&(r.warmLanes|=a),u=r.expirationTimes;for(var m=a;0<m;){var g=31-Yt(m),x=1<<g;u[g]=-1,m&=~x}s!==0&&br(r,s,a)}function Eu(){return(dt&6)===0?(bl(0),!1):!0}function _p(){if(Xe!==null){if(mt===0)var r=Xe.return;else r=Xe,Oo=Ya=null,kh(r),Zi=null,tl=0,r=Xe;for(;r!==null;)j1(r.alternate,r),r=r.return;Xe=null}}function rs(r,a){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,NC(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),jo=0,_p(),Rt=r,Xe=s=xo(r.current,null),nt=a,mt=0,ar=null,aa=!1,es=Ke(r,a),pp=!1,ts=ir=mp=ri=ia=Ft=0,qn=gl=null,vp=!1,(a&8)!==0&&(a|=a&32);var u=r.entangledLanes;if(u!==0)for(r=r.entanglements,u&=a;0<u;){var m=31-Yt(u),g=1<<m;a|=r[m],u&=~g}return ko=a,$c(),s}function sb(r,a){$e=null,L.H=cl,a===qi||a===Wc?(a=wy(),mt=3):a===xh?(a=wy(),mt=4):mt=a===Xh?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ar=a,Xe===null&&(Ft=1,uu(r,wr(a,r.current)))}function lb(){var r=rr.current;return r===null?!0:(nt&4194048)===nt?Tr===null:(nt&62914560)===nt||(nt&536870912)!==0?r===Tr:!1}function cb(){var r=L.H;return L.H=cl,r===null?cl:r}function ub(){var r=L.A;return L.A=uC,r}function Su(){Ft=4,aa||(nt&4194048)!==nt&&rr.current!==null||(es=!0),(ia&134217727)===0&&(ri&134217727)===0||Rt===null||ca(Rt,nt,ir,!1)}function Ep(r,a,s){var u=dt;dt|=2;var m=cb(),g=ub();(Rt!==r||nt!==a)&&(_u=null,rs(r,a)),a=!1;var x=Ft;e:do try{if(mt!==0&&Xe!==null){var M=Xe,B=ar;switch(mt){case 8:_p(),x=6;break e;case 3:case 2:case 9:case 6:rr.current===null&&(a=!0);var ee=mt;if(mt=0,ar=null,os(r,M,B,ee),s&&es){x=0;break e}break;default:ee=mt,mt=0,ar=null,os(r,M,B,ee)}}hC(),x=Ft;break}catch(le){sb(r,le)}while(!0);return a&&r.shellSuspendCounter++,Oo=Ya=null,dt=u,L.H=m,L.A=g,Xe===null&&(Rt=null,nt=0,$c()),x}function hC(){for(;Xe!==null;)db(Xe)}function pC(r,a){var s=dt;dt|=2;var u=cb(),m=ub();Rt!==r||nt!==a?(_u=null,bu=ue()+500,rs(r,a)):es=Ke(r,a);e:do try{if(mt!==0&&Xe!==null){a=Xe;var g=ar;t:switch(mt){case 1:mt=0,ar=null,os(r,a,g,1);break;case 2:case 9:if(Ey(g)){mt=0,ar=null,fb(a);break}a=function(){mt!==2&&mt!==9||Rt!==r||(mt=7),ro(r)},g.then(a,a);break e;case 3:mt=7;break e;case 4:mt=5;break e;case 7:Ey(g)?(mt=0,ar=null,fb(a)):(mt=0,ar=null,os(r,a,g,7));break;case 5:var x=null;switch(Xe.tag){case 26:x=Xe.memoizedState;case 5:case 27:var M=Xe;if(x?Qb(x):M.stateNode.complete){mt=0,ar=null;var B=M.sibling;if(B!==null)Xe=B;else{var ee=M.return;ee!==null?(Xe=ee,wu(ee)):Xe=null}break t}}mt=0,ar=null,os(r,a,g,5);break;case 6:mt=0,ar=null,os(r,a,g,6);break;case 8:_p(),Ft=6;break e;default:throw Error(o(462))}}mC();break}catch(le){sb(r,le)}while(!0);return Oo=Ya=null,L.H=u,L.A=m,dt=s,Xe!==null?0:(Rt=null,nt=0,$c(),Ft)}function mC(){for(;Xe!==null&&!Z();)db(Xe)}function db(r){var a=P1(r.alternate,r,ko);r.memoizedProps=r.pendingProps,a===null?wu(r):Xe=a}function fb(r){var a=r,s=a.alternate;switch(a.tag){case 15:case 0:a=C1(s,a,a.pendingProps,a.type,void 0,nt);break;case 11:a=C1(s,a,a.pendingProps,a.type.render,a.ref,nt);break;case 5:kh(a);default:j1(s,a),a=Xe=uy(a,ko),a=P1(s,a,ko)}r.memoizedProps=r.pendingProps,a===null?wu(r):Xe=a}function os(r,a,s,u){Oo=Ya=null,kh(a),Zi=null,tl=0;var m=a.return;try{if(rC(r,m,a,s,nt)){Ft=1,uu(r,wr(s,r.current)),Xe=null;return}}catch(g){if(m!==null)throw Xe=m,g;Ft=1,uu(r,wr(s,r.current)),Xe=null;return}a.flags&32768?(ot||u===1?r=!0:es||(nt&536870912)!==0?r=!1:(aa=r=!0,(u===2||u===9||u===3||u===6)&&(u=rr.current,u!==null&&u.tag===13&&(u.flags|=16384))),hb(a,r)):wu(a)}function wu(r){var a=r;do{if((a.flags&32768)!==0){hb(a,aa);return}r=a.return;var s=iC(a.alternate,a,ko);if(s!==null){Xe=s;return}if(a=a.sibling,a!==null){Xe=a;return}Xe=a=r}while(a!==null);Ft===0&&(Ft=5)}function hb(r,a){do{var s=sC(r.alternate,r);if(s!==null){s.flags&=32767,Xe=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(r=r.sibling,r!==null)){Xe=r;return}Xe=r=s}while(r!==null);Ft=6,Xe=null}function pb(r,a,s,u,m,g,x,M,B){r.cancelPendingCommit=null;do xu();while(sn!==0);if((dt&6)!==0)throw Error(o(327));if(a!==null){if(a===r.current)throw Error(o(177));if(g=a.lanes|a.childLanes,g|=ch,Ct(r,s,g,x,M,B),r===Rt&&(Xe=Rt=null,nt=0),ns=a,la=r,jo=s,gp=g,yp=m,rb=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,bC(Be,function(){return bb(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=L.T,L.T=null,m=F.p,F.p=2,x=dt,dt|=4;try{lC(r,a,s)}finally{dt=x,F.p=m,L.T=u}}sn=1,mb(),vb(),gb()}}function mb(){if(sn===1){sn=0;var r=la,a=ns,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=L.T,L.T=null;var u=F.p;F.p=2;var m=dt;dt|=4;try{K1(a,r);var g=Dp,x=ty(r.containerInfo),M=g.focusedElem,B=g.selectionRange;if(x!==M&&M&&M.ownerDocument&&ey(M.ownerDocument.documentElement,M)){if(B!==null&&oh(M)){var ee=B.start,le=B.end;if(le===void 0&&(le=ee),"selectionStart"in M)M.selectionStart=ee,M.selectionEnd=Math.min(le,M.value.length);else{var de=M.ownerDocument||document,ne=de&&de.defaultView||window;if(ne.getSelection){var ae=ne.getSelection(),Te=M.textContent.length,je=Math.min(B.start,Te),St=B.end===void 0?je:Math.min(B.end,Te);!ae.extend&&je>St&&(x=St,St=je,je=x);var K=J0(M,je),H=J0(M,St);if(K&&H&&(ae.rangeCount!==1||ae.anchorNode!==K.node||ae.anchorOffset!==K.offset||ae.focusNode!==H.node||ae.focusOffset!==H.offset)){var J=de.createRange();J.setStart(K.node,K.offset),ae.removeAllRanges(),je>St?(ae.addRange(J),ae.extend(H.node,H.offset)):(J.setEnd(H.node,H.offset),ae.addRange(J))}}}}for(de=[],ae=M;ae=ae.parentNode;)ae.nodeType===1&&de.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<de.length;M++){var ce=de[M];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}ku=!!Np,Dp=Np=null}finally{dt=m,F.p=u,L.T=s}}r.current=a,sn=2}}function vb(){if(sn===2){sn=0;var r=la,a=ns,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=L.T,L.T=null;var u=F.p;F.p=2;var m=dt;dt|=4;try{H1(r,a.alternate,a)}finally{dt=m,F.p=u,L.T=s}}sn=3}}function gb(){if(sn===4||sn===3){sn=0,Y();var r=la,a=ns,s=jo,u=rb;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?sn=5:(sn=0,ns=la=null,yb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(sa=null),zr(s),a=a.stateNode,At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(Zt,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=L.T,m=F.p,F.p=2,L.T=null;try{for(var g=r.onRecoverableError,x=0;x<u.length;x++){var M=u[x];g(M.value,{componentStack:M.stack})}}finally{L.T=a,F.p=m}}(jo&3)!==0&&xu(),ro(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===bp?yl++:(yl=0,bp=r):yl=0,bl(0)}}function yb(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,Js(a)))}function xu(){return mb(),vb(),gb(),bb()}function bb(){if(sn!==5)return!1;var r=la,a=gp;gp=0;var s=zr(jo),u=L.T,m=F.p;try{F.p=32>s?32:s,L.T=null,s=yp,yp=null;var g=la,x=jo;if(sn=0,ns=la=null,jo=0,(dt&6)!==0)throw Error(o(331));var M=dt;if(dt|=4,eb(g.current),Q1(g,g.current,x,s),dt=M,bl(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Zt,g)}catch{}return!0}finally{F.p=m,L.T=u,yb(r,a)}}function _b(r,a,s){a=wr(s,a),a=Qh(r.stateNode,a,2),r=ta(r,a,2),r!==null&&(lt(r,2),ro(r))}function vt(r,a,s){if(r.tag===3)_b(r,r,s);else for(;a!==null;){if(a.tag===3){_b(a,r,s);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(sa===null||!sa.has(u))){r=wr(s,r),s=E1(2),u=ta(a,s,2),u!==null&&(S1(s,u,a,r),lt(u,2),ro(u));break}}a=a.return}}function Sp(r,a,s){var u=r.pingCache;if(u===null){u=r.pingCache=new dC;var m=new Set;u.set(a,m)}else m=u.get(a),m===void 0&&(m=new Set,u.set(a,m));m.has(s)||(pp=!0,m.add(s),r=vC.bind(null,r,a,s),a.then(r,r))}function vC(r,a,s){var u=r.pingCache;u!==null&&u.delete(a),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,Rt===r&&(nt&s)===s&&(Ft===4||Ft===3&&(nt&62914560)===nt&&300>ue()-yu?(dt&2)===0&&rs(r,0):mp|=s,ts===nt&&(ts=0)),ro(r)}function Eb(r,a){a===0&&(a=bt()),r=Ga(r,a),r!==null&&(lt(r,a),ro(r))}function gC(r){var a=r.memoizedState,s=0;a!==null&&(s=a.retryLane),Eb(r,s)}function yC(r,a){var s=0;switch(r.tag){case 31:case 13:var u=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:u=r.stateNode;break;case 22:u=r.stateNode._retryCache;break;default:throw Error(o(314))}u!==null&&u.delete(a),Eb(r,s)}function bC(r,a){return Qe(r,a)}var Ru=null,as=null,wp=!1,Ou=!1,xp=!1,ua=0;function ro(r){r!==as&&r.next===null&&(as===null?Ru=as=r:as=as.next=r),Ou=!0,wp||(wp=!0,EC())}function bl(r,a){if(!xp&&Ou){xp=!0;do for(var s=!1,u=Ru;u!==null;){if(r!==0){var m=u.pendingLanes;if(m===0)var g=0;else{var x=u.suspendedLanes,M=u.pingedLanes;g=(1<<31-Yt(42|r)+1)-1,g&=m&~(x&~M),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,Rb(u,g))}else g=nt,g=Me(u,u===Rt?g:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(g&3)===0||Ke(u,g)||(s=!0,Rb(u,g));u=u.next}while(s);xp=!1}}function _C(){Sb()}function Sb(){Ou=wp=!1;var r=0;ua!==0&&MC()&&(r=ua);for(var a=ue(),s=null,u=Ru;u!==null;){var m=u.next,g=wb(u,a);g===0?(u.next=null,s===null?Ru=m:s.next=m,m===null&&(as=s)):(s=u,(r!==0||(g&3)!==0)&&(Ou=!0)),u=m}sn!==0&&sn!==5||bl(r),ua!==0&&(ua=0)}function wb(r,a){for(var s=r.suspendedLanes,u=r.pingedLanes,m=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var x=31-Yt(g),M=1<<x,B=m[x];B===-1?((M&s)===0||(M&u)!==0)&&(m[x]=xt(M,a)):B<=a&&(r.expiredLanes|=M),g&=~M}if(a=Rt,s=nt,s=Me(r,r===a?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u=r.callbackNode,s===0||r===a&&(mt===2||mt===9)||r.cancelPendingCommit!==null)return u!==null&&u!==null&&U(u),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Ke(r,s)){if(a=s&-s,a===r.callbackPriority)return a;switch(u!==null&&U(u),zr(s)){case 2:case 8:s=xe;break;case 32:s=Be;break;case 268435456:s=ft;break;default:s=Be}return u=xb.bind(null,r),s=Qe(s,u),r.callbackPriority=a,r.callbackNode=s,a}return u!==null&&u!==null&&U(u),r.callbackPriority=2,r.callbackNode=null,2}function xb(r,a){if(sn!==0&&sn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(xu()&&r.callbackNode!==s)return null;var u=nt;return u=Me(r,r===Rt?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u===0?null:(ab(r,u,a),wb(r,ue()),r.callbackNode!=null&&r.callbackNode===s?xb.bind(null,r):null)}function Rb(r,a){if(xu())return null;ab(r,a,!0)}function EC(){DC(function(){(dt&6)!==0?Qe(he,_C):Sb()})}function Rp(){if(ua===0){var r=Hi;r===0&&(r=tt,tt<<=1,(tt&261888)===0&&(tt=256)),ua=r}return ua}function Ob(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Lc(""+r)}function Tb(r,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,r.id&&s.setAttribute("form",r.id),a.parentNode.insertBefore(s,a),r=new FormData(r),s.parentNode.removeChild(s),r}function SC(r,a,s,u,m){if(a==="submit"&&s&&s.stateNode===m){var g=Ob((m[Fn]||null).action),x=u.submitter;x&&(a=(a=x[Fn]||null)?Ob(a.formAction):x.getAttribute("formAction"),a!==null&&(g=a,x=null));var M=new zc("action","action",null,u,m);r.push({event:M,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ua!==0){var B=x?Tb(m,x):new FormData(m);Gh(s,{pending:!0,data:B,method:m.method,action:g},null,B)}}else typeof g=="function"&&(M.preventDefault(),B=x?Tb(m,x):new FormData(m),Gh(s,{pending:!0,data:B,method:m.method,action:g},g,B))},currentTarget:m}]})}}for(var Op=0;Op<lh.length;Op++){var Tp=lh[Op],wC=Tp.toLowerCase(),xC=Tp[0].toUpperCase()+Tp.slice(1);Ur(wC,"on"+xC)}Ur(oy,"onAnimationEnd"),Ur(ay,"onAnimationIteration"),Ur(iy,"onAnimationStart"),Ur("dblclick","onDoubleClick"),Ur("focusin","onFocus"),Ur("focusout","onBlur"),Ur(BA,"onTransitionRun"),Ur(FA,"onTransitionStart"),Ur($A,"onTransitionCancel"),Ur(sy,"onTransitionEnd"),Ii("onMouseEnter",["mouseout","mouseover"]),Ii("onMouseLeave",["mouseout","mouseover"]),Ii("onPointerEnter",["pointerout","pointerover"]),Ii("onPointerLeave",["pointerout","pointerover"]),Fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _l="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),RC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_l));function Ab(r,a){a=(a&4)!==0;for(var s=0;s<r.length;s++){var u=r[s],m=u.event;u=u.listeners;e:{var g=void 0;if(a)for(var x=u.length-1;0<=x;x--){var M=u[x],B=M.instance,ee=M.currentTarget;if(M=M.listener,B!==g&&m.isPropagationStopped())break e;g=M,m.currentTarget=ee;try{g(m)}catch(le){Fc(le)}m.currentTarget=null,g=B}else for(x=0;x<u.length;x++){if(M=u[x],B=M.instance,ee=M.currentTarget,M=M.listener,B!==g&&m.isPropagationStopped())break e;g=M,m.currentTarget=ee;try{g(m)}catch(le){Fc(le)}m.currentTarget=null,g=B}}}}function Je(r,a){var s=a[Bf];s===void 0&&(s=a[Bf]=new Set);var u=r+"__bubble";s.has(u)||(Cb(a,r,2,!1),s.add(u))}function Ap(r,a,s){var u=0;a&&(u|=4),Cb(s,r,u,a)}var Tu="_reactListening"+Math.random().toString(36).slice(2);function Cp(r){if(!r[Tu]){r[Tu]=!0,S0.forEach(function(s){s!=="selectionchange"&&(RC.has(s)||Ap(s,!1,r),Ap(s,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Tu]||(a[Tu]=!0,Ap("selectionchange",!1,a))}}function Cb(r,a,s,u){switch(o_(a)){case 2:var m=JC;break;case 8:m=e4;break;default:m=Hp}s=m.bind(null,a,s,r),m=void 0,!Kf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(m=!0),u?m!==void 0?r.addEventListener(a,s,{capture:!0,passive:m}):r.addEventListener(a,s,!0):m!==void 0?r.addEventListener(a,s,{passive:m}):r.addEventListener(a,s,!1)}function Ip(r,a,s,u,m){var g=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var x=u.tag;if(x===3||x===4){var M=u.stateNode.containerInfo;if(M===m)break;if(x===4)for(x=u.return;x!==null;){var B=x.tag;if((B===3||B===4)&&x.stateNode.containerInfo===m)return;x=x.return}for(;M!==null;){if(x=Ti(M),x===null)return;if(B=x.tag,B===5||B===6||B===26||B===27){u=g=x;continue e}M=M.parentNode}}u=u.return}L0(function(){var ee=g,le=Zf(s),de=[];e:{var ne=ly.get(r);if(ne!==void 0){var ae=zc,Te=r;switch(r){case"keypress":if(kc(s)===0)break e;case"keydown":case"keyup":ae=yA;break;case"focusin":Te="focus",ae=Jf;break;case"focusout":Te="blur",ae=Jf;break;case"beforeblur":case"afterblur":ae=Jf;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=j0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=iA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=EA;break;case oy:case ay:case iy:ae=cA;break;case sy:ae=wA;break;case"scroll":case"scrollend":ae=oA;break;case"wheel":ae=RA;break;case"copy":case"cut":case"paste":ae=dA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=U0;break;case"toggle":case"beforetoggle":ae=TA}var je=(a&4)!==0,St=!je&&(r==="scroll"||r==="scrollend"),K=je?ne!==null?ne+"Capture":null:ne;je=[];for(var H=ee,J;H!==null;){var ce=H;if(J=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||J===null||K===null||(ce=$s(H,K),ce!=null&&je.push(El(H,ce,J))),St)break;H=H.return}0<je.length&&(ne=new ae(ne,Te,null,s,le),de.push({event:ne,listeners:je}))}}if((a&7)===0){e:{if(ne=r==="mouseover"||r==="pointerover",ae=r==="mouseout"||r==="pointerout",ne&&s!==qf&&(Te=s.relatedTarget||s.fromElement)&&(Ti(Te)||Te[Oi]))break e;if((ae||ne)&&(ne=le.window===le?le:(ne=le.ownerDocument)?ne.defaultView||ne.parentWindow:window,ae?(Te=s.relatedTarget||s.toElement,ae=ee,Te=Te?Ti(Te):null,Te!==null&&(St=l(Te),je=Te.tag,Te!==St||je!==5&&je!==27&&je!==6)&&(Te=null)):(ae=null,Te=ee),ae!==Te)){if(je=j0,ce="onMouseLeave",K="onMouseEnter",H="mouse",(r==="pointerout"||r==="pointerover")&&(je=U0,ce="onPointerLeave",K="onPointerEnter",H="pointer"),St=ae==null?ne:Fs(ae),J=Te==null?ne:Fs(Te),ne=new je(ce,H+"leave",ae,s,le),ne.target=St,ne.relatedTarget=J,ce=null,Ti(le)===ee&&(je=new je(K,H+"enter",Te,s,le),je.target=J,je.relatedTarget=St,ce=je),St=ce,ae&&Te)t:{for(je=OC,K=ae,H=Te,J=0,ce=K;ce;ce=je(ce))J++;ce=0;for(var Pe=H;Pe;Pe=je(Pe))ce++;for(;0<J-ce;)K=je(K),J--;for(;0<ce-J;)H=je(H),ce--;for(;J--;){if(K===H||H!==null&&K===H.alternate){je=K;break t}K=je(K),H=je(H)}je=null}else je=null;ae!==null&&Ib(de,ne,ae,je,!1),Te!==null&&St!==null&&Ib(de,St,Te,je,!0)}}e:{if(ne=ee?Fs(ee):window,ae=ne.nodeName&&ne.nodeName.toLowerCase(),ae==="select"||ae==="input"&&ne.type==="file")var ct=Z0;else if(G0(ne))if(Y0)ct=jA;else{ct=PA;var Ne=LA}else ae=ne.nodeName,!ae||ae.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?ee&&Gf(ee.elementType)&&(ct=Z0):ct=kA;if(ct&&(ct=ct(r,ee))){q0(de,ct,s,le);break e}Ne&&Ne(r,ne,ee),r==="focusout"&&ee&&ne.type==="number"&&ee.memoizedProps.value!=null&&Hf(ne,"number",ne.value)}switch(Ne=ee?Fs(ee):window,r){case"focusin":(G0(Ne)||Ne.contentEditable==="true")&&(ki=Ne,ah=ee,Ws=null);break;case"focusout":Ws=ah=ki=null;break;case"mousedown":ih=!0;break;case"contextmenu":case"mouseup":case"dragend":ih=!1,ny(de,s,le);break;case"selectionchange":if(UA)break;case"keydown":case"keyup":ny(de,s,le)}var He;if(th)e:{switch(r){case"compositionstart":var rt="onCompositionStart";break e;case"compositionend":rt="onCompositionEnd";break e;case"compositionupdate":rt="onCompositionUpdate";break e}rt=void 0}else Pi?V0(r,s)&&(rt="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(rt="onCompositionStart");rt&&(B0&&s.locale!=="ko"&&(Pi||rt!=="onCompositionStart"?rt==="onCompositionEnd"&&Pi&&(He=P0()):(Yo=le,Wf="value"in Yo?Yo.value:Yo.textContent,Pi=!0)),Ne=Au(ee,rt),0<Ne.length&&(rt=new z0(rt,r,null,s,le),de.push({event:rt,listeners:Ne}),He?rt.data=He:(He=H0(s),He!==null&&(rt.data=He)))),(He=CA?IA(r,s):MA(r,s))&&(rt=Au(ee,"onBeforeInput"),0<rt.length&&(Ne=new z0("onBeforeInput","beforeinput",null,s,le),de.push({event:Ne,listeners:rt}),Ne.data=He)),SC(de,r,ee,s,le)}Ab(de,a)})}function El(r,a,s){return{instance:r,listener:a,currentTarget:s}}function Au(r,a){for(var s=a+"Capture",u=[];r!==null;){var m=r,g=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||g===null||(m=$s(r,s),m!=null&&u.unshift(El(r,m,g)),m=$s(r,a),m!=null&&u.push(El(r,m,g))),r.tag===3)return u;r=r.return}return[]}function OC(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Ib(r,a,s,u,m){for(var g=a._reactName,x=[];s!==null&&s!==u;){var M=s,B=M.alternate,ee=M.stateNode;if(M=M.tag,B!==null&&B===u)break;M!==5&&M!==26&&M!==27||ee===null||(B=ee,m?(ee=$s(s,g),ee!=null&&x.unshift(El(s,ee,B))):m||(ee=$s(s,g),ee!=null&&x.push(El(s,ee,B)))),s=s.return}x.length!==0&&r.push({event:a,listeners:x})}var TC=/\r\n?/g,AC=/\u0000|\uFFFD/g;function Mb(r){return(typeof r=="string"?r:""+r).replace(TC,`
|
|
10
|
+
`).replace(AC,"")}function Nb(r,a){return a=Mb(a),Mb(r)===a}function Et(r,a,s,u,m,g){switch(s){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Ni(r,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Ni(r,""+u);break;case"className":Nc(r,"class",u);break;case"tabIndex":Nc(r,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Nc(r,s,u);break;case"style":N0(r,u,g);break;case"data":if(a!=="object"){Nc(r,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||s!=="href")){r.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(s);break}u=Lc(""+u),r.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){r.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(s==="formAction"?(a!=="input"&&Et(r,a,"name",m.name,m,null),Et(r,a,"formEncType",m.formEncType,m,null),Et(r,a,"formMethod",m.formMethod,m,null),Et(r,a,"formTarget",m.formTarget,m,null)):(Et(r,a,"encType",m.encType,m,null),Et(r,a,"method",m.method,m,null),Et(r,a,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(s);break}u=Lc(""+u),r.setAttribute(s,u);break;case"onClick":u!=null&&(r.onclick=So);break;case"onScroll":u!=null&&Je("scroll",r);break;case"onScrollEnd":u!=null&&Je("scrollend",r);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=s}}break;case"multiple":r.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":r.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){r.removeAttribute("xlink:href");break}s=Lc(""+u),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,""+u):r.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":u===!0?r.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,u):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?r.setAttribute(s,u):r.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?r.removeAttribute(s):r.setAttribute(s,u);break;case"popover":Je("beforetoggle",r),Je("toggle",r),Mc(r,"popover",u);break;case"xlinkActuate":Eo(r,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Eo(r,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Eo(r,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Eo(r,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Eo(r,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Eo(r,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Eo(r,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Eo(r,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Eo(r,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Mc(r,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=nA.get(s)||s,Mc(r,s,u))}}function Mp(r,a,s,u,m,g){switch(s){case"style":N0(r,u,g);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=s}}break;case"children":typeof u=="string"?Ni(r,u):(typeof u=="number"||typeof u=="bigint")&&Ni(r,""+u);break;case"onScroll":u!=null&&Je("scroll",r);break;case"onScrollEnd":u!=null&&Je("scrollend",r);break;case"onClick":u!=null&&(r.onclick=So);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!w0.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),a=s.slice(2,m?s.length-7:void 0),g=r[Fn]||null,g=g!=null?g[s]:null,typeof g=="function"&&r.removeEventListener(a,g,m),typeof u=="function")){typeof g!="function"&&g!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(a,u,m);break e}s in r?r[s]=u:u===!0?r.setAttribute(s,""):Mc(r,s,u)}}}function Rn(r,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Je("error",r),Je("load",r);var u=!1,m=!1,g;for(g in s)if(s.hasOwnProperty(g)){var x=s[g];if(x!=null)switch(g){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Et(r,a,g,x,s,null)}}m&&Et(r,a,"srcSet",s.srcSet,s,null),u&&Et(r,a,"src",s.src,s,null);return;case"input":Je("invalid",r);var M=g=x=m=null,B=null,ee=null;for(u in s)if(s.hasOwnProperty(u)){var le=s[u];if(le!=null)switch(u){case"name":m=le;break;case"type":x=le;break;case"checked":B=le;break;case"defaultChecked":ee=le;break;case"value":g=le;break;case"defaultValue":M=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,a));break;default:Et(r,a,u,le,s,null)}}A0(r,g,M,B,ee,x,m,!1);return;case"select":Je("invalid",r),u=x=g=null;for(m in s)if(s.hasOwnProperty(m)&&(M=s[m],M!=null))switch(m){case"value":g=M;break;case"defaultValue":x=M;break;case"multiple":u=M;default:Et(r,a,m,M,s,null)}a=g,s=x,r.multiple=!!u,a!=null?Mi(r,!!u,a,!1):s!=null&&Mi(r,!!u,s,!0);return;case"textarea":Je("invalid",r),g=m=u=null;for(x in s)if(s.hasOwnProperty(x)&&(M=s[x],M!=null))switch(x){case"value":u=M;break;case"defaultValue":m=M;break;case"children":g=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(91));break;default:Et(r,a,x,M,s,null)}I0(r,u,m,g);return;case"option":for(B in s)s.hasOwnProperty(B)&&(u=s[B],u!=null)&&(B==="selected"?r.selected=u&&typeof u!="function"&&typeof u!="symbol":Et(r,a,B,u,s,null));return;case"dialog":Je("beforetoggle",r),Je("toggle",r),Je("cancel",r),Je("close",r);break;case"iframe":case"object":Je("load",r);break;case"video":case"audio":for(u=0;u<_l.length;u++)Je(_l[u],r);break;case"image":Je("error",r),Je("load",r);break;case"details":Je("toggle",r);break;case"embed":case"source":case"link":Je("error",r),Je("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in s)if(s.hasOwnProperty(ee)&&(u=s[ee],u!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Et(r,a,ee,u,s,null)}return;default:if(Gf(a)){for(le in s)s.hasOwnProperty(le)&&(u=s[le],u!==void 0&&Mp(r,a,le,u,s,void 0));return}}for(M in s)s.hasOwnProperty(M)&&(u=s[M],u!=null&&Et(r,a,M,u,s,null))}function CC(r,a,s,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,g=null,x=null,M=null,B=null,ee=null,le=null;for(ae in s){var de=s[ae];if(s.hasOwnProperty(ae)&&de!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":B=de;default:u.hasOwnProperty(ae)||Et(r,a,ae,null,u,de)}}for(var ne in u){var ae=u[ne];if(de=s[ne],u.hasOwnProperty(ne)&&(ae!=null||de!=null))switch(ne){case"type":g=ae;break;case"name":m=ae;break;case"checked":ee=ae;break;case"defaultChecked":le=ae;break;case"value":x=ae;break;case"defaultValue":M=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,a));break;default:ae!==de&&Et(r,a,ne,ae,u,de)}}Vf(r,x,M,B,ee,le,g,m);return;case"select":ae=x=M=ne=null;for(g in s)if(B=s[g],s.hasOwnProperty(g)&&B!=null)switch(g){case"value":break;case"multiple":ae=B;default:u.hasOwnProperty(g)||Et(r,a,g,null,u,B)}for(m in u)if(g=u[m],B=s[m],u.hasOwnProperty(m)&&(g!=null||B!=null))switch(m){case"value":ne=g;break;case"defaultValue":M=g;break;case"multiple":x=g;default:g!==B&&Et(r,a,m,g,u,B)}a=M,s=x,u=ae,ne!=null?Mi(r,!!s,ne,!1):!!u!=!!s&&(a!=null?Mi(r,!!s,a,!0):Mi(r,!!s,s?[]:"",!1));return;case"textarea":ae=ne=null;for(M in s)if(m=s[M],s.hasOwnProperty(M)&&m!=null&&!u.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Et(r,a,M,null,u,m)}for(x in u)if(m=u[x],g=s[x],u.hasOwnProperty(x)&&(m!=null||g!=null))switch(x){case"value":ne=m;break;case"defaultValue":ae=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:m!==g&&Et(r,a,x,m,u,g)}C0(r,ne,ae);return;case"option":for(var Te in s)ne=s[Te],s.hasOwnProperty(Te)&&ne!=null&&!u.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:Et(r,a,Te,null,u,ne));for(B in u)ne=u[B],ae=s[B],u.hasOwnProperty(B)&&ne!==ae&&(ne!=null||ae!=null)&&(B==="selected"?r.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":Et(r,a,B,ne,u,ae));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var je in s)ne=s[je],s.hasOwnProperty(je)&&ne!=null&&!u.hasOwnProperty(je)&&Et(r,a,je,null,u,ne);for(ee in u)if(ne=u[ee],ae=s[ee],u.hasOwnProperty(ee)&&ne!==ae&&(ne!=null||ae!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(o(137,a));break;default:Et(r,a,ee,ne,u,ae)}return;default:if(Gf(a)){for(var St in s)ne=s[St],s.hasOwnProperty(St)&&ne!==void 0&&!u.hasOwnProperty(St)&&Mp(r,a,St,void 0,u,ne);for(le in u)ne=u[le],ae=s[le],!u.hasOwnProperty(le)||ne===ae||ne===void 0&&ae===void 0||Mp(r,a,le,ne,u,ae);return}}for(var K in s)ne=s[K],s.hasOwnProperty(K)&&ne!=null&&!u.hasOwnProperty(K)&&Et(r,a,K,null,u,ne);for(de in u)ne=u[de],ae=s[de],!u.hasOwnProperty(de)||ne===ae||ne==null&&ae==null||Et(r,a,de,ne,u,ae)}function Db(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function IC(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var m=s[u],g=m.transferSize,x=m.initiatorType,M=m.duration;if(g&&M&&Db(x)){for(x=0,M=m.responseEnd,u+=1;u<s.length;u++){var B=s[u],ee=B.startTime;if(ee>M)break;var le=B.transferSize,de=B.initiatorType;le&&Db(de)&&(B=B.responseEnd,x+=le*(B<M?1:(M-ee)/(B-ee)))}if(--u,a+=8*(g+x)/(m.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Np=null,Dp=null;function Cu(r){return r.nodeType===9?r:r.ownerDocument}function Lb(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Pb(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function Lp(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Pp=null;function MC(){var r=window.event;return r&&r.type==="popstate"?r===Pp?!1:(Pp=r,!0):(Pp=null,!1)}var kb=typeof setTimeout=="function"?setTimeout:void 0,NC=typeof clearTimeout=="function"?clearTimeout:void 0,jb=typeof Promise=="function"?Promise:void 0,DC=typeof queueMicrotask=="function"?queueMicrotask:typeof jb<"u"?function(r){return jb.resolve(null).then(r).catch(LC)}:kb;function LC(r){setTimeout(function(){throw r})}function da(r){return r==="head"}function zb(r,a){var s=a,u=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(u===0){r.removeChild(m),cs(a);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Sl(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Sl(s);for(var g=s.firstChild;g;){var x=g.nextSibling,M=g.nodeName;g[Bs]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=x}}else s==="body"&&Sl(r.ownerDocument.body);s=m}while(s);cs(a)}function Ub(r,a){var s=r;r=0;do{var u=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=u}while(s)}function kp(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":kp(s),Ff(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function PC(r,a,s,u){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(u){if(!r[Bs])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(g!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var g=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;if(r=Ar(r.nextSibling),r===null)break}return null}function kC(r,a,s){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Ar(r.nextSibling),r===null))return null;return r}function Bb(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Ar(r.nextSibling),r===null))return null;return r}function jp(r){return r.data==="$?"||r.data==="$~"}function zp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function jC(r,a){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||s.readyState!=="loading")a();else{var u=function(){a(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),r._reactRetry=u}}function Ar(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var Up=null;function Fb(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(a===0)return Ar(r.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}r=r.nextSibling}return null}function $b(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return r;a--}else s!=="/$"&&s!=="/&"||a++}r=r.previousSibling}return null}function Vb(r,a,s){switch(a=Cu(s),r){case"html":if(r=a.documentElement,!r)throw Error(o(452));return r;case"head":if(r=a.head,!r)throw Error(o(453));return r;case"body":if(r=a.body,!r)throw Error(o(454));return r;default:throw Error(o(451))}}function Sl(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);Ff(r)}var Cr=new Map,Hb=new Set;function Iu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var zo=F.d;F.d={f:zC,r:UC,D:BC,C:FC,L:$C,m:VC,X:GC,S:HC,M:qC};function zC(){var r=zo.f(),a=Eu();return r||a}function UC(r){var a=Ai(r);a!==null&&a.tag===5&&a.type==="form"?s1(a):zo.r(r)}var is=typeof document>"u"?null:document;function Gb(r,a,s){var u=is;if(u&&typeof a=="string"&&a){var m=Er(a);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Hb.has(m)||(Hb.add(m),r={rel:r,crossOrigin:s,href:a},u.querySelector(m)===null&&(a=u.createElement("link"),Rn(a,"link",r),fn(a),u.head.appendChild(a)))}}function BC(r){zo.D(r),Gb("dns-prefetch",r,null)}function FC(r,a){zo.C(r,a),Gb("preconnect",r,a)}function $C(r,a,s){zo.L(r,a,s);var u=is;if(u&&r&&a){var m='link[rel="preload"][as="'+Er(a)+'"]';a==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Er(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Er(s.imageSizes)+'"]')):m+='[href="'+Er(r)+'"]';var g=m;switch(a){case"style":g=ss(r);break;case"script":g=ls(r)}Cr.has(g)||(r=p({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:r,as:a},s),Cr.set(g,r),u.querySelector(m)!==null||a==="style"&&u.querySelector(wl(g))||a==="script"&&u.querySelector(xl(g))||(a=u.createElement("link"),Rn(a,"link",r),fn(a),u.head.appendChild(a)))}}function VC(r,a){zo.m(r,a);var s=is;if(s&&r){var u=a&&typeof a.as=="string"?a.as:"script",m='link[rel="modulepreload"][as="'+Er(u)+'"][href="'+Er(r)+'"]',g=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=ls(r)}if(!Cr.has(g)&&(r=p({rel:"modulepreload",href:r},a),Cr.set(g,r),s.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(xl(g)))return}u=s.createElement("link"),Rn(u,"link",r),fn(u),s.head.appendChild(u)}}}function HC(r,a,s){zo.S(r,a,s);var u=is;if(u&&r){var m=Ci(u).hoistableStyles,g=ss(r);a=a||"default";var x=m.get(g);if(!x){var M={loading:0,preload:null};if(x=u.querySelector(wl(g)))M.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":a},s),(s=Cr.get(g))&&Bp(r,s);var B=x=u.createElement("link");fn(B),Rn(B,"link",r),B._p=new Promise(function(ee,le){B.onload=ee,B.onerror=le}),B.addEventListener("load",function(){M.loading|=1}),B.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Mu(x,a,u)}x={type:"stylesheet",instance:x,count:1,state:M},m.set(g,x)}}}function GC(r,a){zo.X(r,a);var s=is;if(s&&r){var u=Ci(s).hoistableScripts,m=ls(r),g=u.get(m);g||(g=s.querySelector(xl(m)),g||(r=p({src:r,async:!0},a),(a=Cr.get(m))&&Fp(r,a),g=s.createElement("script"),fn(g),Rn(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(m,g))}}function qC(r,a){zo.M(r,a);var s=is;if(s&&r){var u=Ci(s).hoistableScripts,m=ls(r),g=u.get(m);g||(g=s.querySelector(xl(m)),g||(r=p({src:r,async:!0,type:"module"},a),(a=Cr.get(m))&&Fp(r,a),g=s.createElement("script"),fn(g),Rn(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(m,g))}}function qb(r,a,s,u){var m=(m=_e.current)?Iu(m):null;if(!m)throw Error(o(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=ss(s.href),s=Ci(m).hoistableStyles,u=s.get(a),u||(u={type:"style",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=ss(s.href);var g=Ci(m).hoistableStyles,x=g.get(r);if(x||(m=m.ownerDocument||m,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(r,x),(g=m.querySelector(wl(r)))&&!g._p&&(x.instance=g,x.state.loading=5),Cr.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Cr.set(r,s),g||ZC(m,r,s,x.state))),a&&u===null)throw Error(o(528,""));return x}if(a&&u!==null)throw Error(o(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=ls(s),s=Ci(m).hoistableScripts,u=s.get(a),u||(u={type:"script",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,r))}}function ss(r){return'href="'+Er(r)+'"'}function wl(r){return'link[rel="stylesheet"]['+r+"]"}function Zb(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function ZC(r,a,s,u){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=r.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Rn(a,"link",s),fn(a),r.head.appendChild(a))}function ls(r){return'[src="'+Er(r)+'"]'}function xl(r){return"script[async]"+r}function Yb(r,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var u=r.querySelector('style[data-href~="'+Er(s.href)+'"]');if(u)return a.instance=u,fn(u),u;var m=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(r.ownerDocument||r).createElement("style"),fn(u),Rn(u,"style",m),Mu(u,s.precedence,r),a.instance=u;case"stylesheet":m=ss(s.href);var g=r.querySelector(wl(m));if(g)return a.state.loading|=4,a.instance=g,fn(g),g;u=Zb(s),(m=Cr.get(m))&&Bp(u,m),g=(r.ownerDocument||r).createElement("link"),fn(g);var x=g;return x._p=new Promise(function(M,B){x.onload=M,x.onerror=B}),Rn(g,"link",u),a.state.loading|=4,Mu(g,s.precedence,r),a.instance=g;case"script":return g=ls(s.src),(m=r.querySelector(xl(g)))?(a.instance=m,fn(m),m):(u=s,(m=Cr.get(g))&&(u=p({},s),Fp(u,m)),r=r.ownerDocument||r,m=r.createElement("script"),fn(m),Rn(m,"link",u),r.head.appendChild(m),a.instance=m);case"void":return null;default:throw Error(o(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Mu(u,s.precedence,r));return a.instance}function Mu(r,a,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=u.length?u[u.length-1]:null,g=m,x=0;x<u.length;x++){var M=u[x];if(M.dataset.precedence===a)g=M;else if(g!==m)break}g?g.parentNode.insertBefore(r,g.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(r,a.firstChild))}function Bp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function Fp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Nu=null;function Kb(r,a,s){if(Nu===null){var u=new Map,m=Nu=new Map;m.set(s,u)}else m=Nu,u=m.get(s),u||(u=new Map,m.set(s,u));if(u.has(r))return u;for(u.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var g=s[m];if(!(g[Bs]||g[En]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var x=g.getAttribute(a)||"";x=r+x;var M=u.get(x);M?M.push(g):u.set(x,[g])}}return u}function Wb(r,a,s){r=r.ownerDocument||r,r.head.insertBefore(s,a==="title"?r.querySelector("head > title"):null)}function YC(r,a,s){if(s===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Qb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function KC(r,a,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=ss(u.href),g=a.querySelector(wl(m));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Du.bind(r),a.then(r,r)),s.state.loading|=4,s.instance=g,fn(g);return}g=a.ownerDocument||a,u=Zb(u),(m=Cr.get(m))&&Bp(u,m),g=g.createElement("link"),fn(g);var x=g;x._p=new Promise(function(M,B){x.onload=M,x.onerror=B}),Rn(g,"link",u),s.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Du.bind(r),a.addEventListener("load",s),a.addEventListener("error",s))}}var $p=0;function WC(r,a){return r.stylesheets&&r.count===0&&Pu(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var u=setTimeout(function(){if(r.stylesheets&&Pu(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+a);0<r.imgBytes&&$p===0&&($p=62500*IC());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Pu(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>$p?50:800)+a);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(u),clearTimeout(m)}}:null}function Du(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Pu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Lu=null;function Pu(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Lu=new Map,a.forEach(QC,r),Lu=null,Du.call(r))}function QC(r,a){if(!(a.state.loading&4)){var s=Lu.get(r);if(s)var u=s.get(null);else{s=new Map,Lu.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<m.length;g++){var x=m[g];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(s.set(x.dataset.precedence,x),u=x)}u&&s.set(null,u)}m=a.instance,x=m.getAttribute("data-precedence"),g=s.get(x)||u,g===u&&s.set(null,m),s.set(x,m),this.count++,u=Du.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),g?g.parentNode.insertBefore(m,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),a.state.loading|=4}}var Rl={$$typeof:C,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function XC(r,a,s,u,m,g,x,M,B){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Nn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nn(0),this.hiddenUpdates=Nn(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=g,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function Xb(r,a,s,u,m,g,x,M,B,ee,le,de){return r=new XC(r,a,s,x,B,ee,le,de,M),a=1,g===!0&&(a|=24),g=nr(3,null,null,a),r.current=g,g.stateNode=r,a=Eh(),a.refCount++,r.pooledCache=a,a.refCount++,g.memoizedState={element:u,isDehydrated:s,cache:a},Rh(g),r}function Jb(r){return r?(r=Ui,r):Ui}function e_(r,a,s,u,m,g){m=Jb(m),u.context===null?u.context=m:u.pendingContext=m,u=ea(a),u.payload={element:s},g=g===void 0?null:g,g!==null&&(u.callback=g),s=ta(r,u,a),s!==null&&(Zn(s,r,a),rl(s,r,a))}function t_(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<a?s:a}}function Vp(r,a){t_(r,a),(r=r.alternate)&&t_(r,a)}function n_(r){if(r.tag===13||r.tag===31){var a=Ga(r,67108864);a!==null&&Zn(a,r,67108864),Vp(r,67108864)}}function r_(r){if(r.tag===13||r.tag===31){var a=sr();a=Ri(a);var s=Ga(r,a);s!==null&&Zn(s,r,a),Vp(r,a)}}var ku=!0;function JC(r,a,s,u){var m=L.T;L.T=null;var g=F.p;try{F.p=2,Hp(r,a,s,u)}finally{F.p=g,L.T=m}}function e4(r,a,s,u){var m=L.T;L.T=null;var g=F.p;try{F.p=8,Hp(r,a,s,u)}finally{F.p=g,L.T=m}}function Hp(r,a,s,u){if(ku){var m=Gp(u);if(m===null)Ip(r,a,u,ju,s),a_(r,u);else if(n4(m,r,a,s,u))u.stopPropagation();else if(a_(r,u),a&4&&-1<t4.indexOf(r)){for(;m!==null;){var g=Ai(m);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var x=st(g.pendingLanes);if(x!==0){var M=g;for(M.pendingLanes|=2,M.entangledLanes|=2;x;){var B=1<<31-Yt(x);M.entanglements[1]|=B,x&=~B}ro(g),(dt&6)===0&&(bu=ue()+500,bl(0))}}break;case 31:case 13:M=Ga(g,2),M!==null&&Zn(M,g,2),Eu(),Vp(g,2)}if(g=Gp(u),g===null&&Ip(r,a,u,ju,s),g===m)break;m=g}m!==null&&u.stopPropagation()}else Ip(r,a,u,null,s)}}function Gp(r){return r=Zf(r),qp(r)}var ju=null;function qp(r){if(ju=null,r=Ti(r),r!==null){var a=l(r);if(a===null)r=null;else{var s=a.tag;if(s===13){if(r=c(a),r!==null)return r;r=null}else if(s===31){if(r=d(a),r!==null)return r;r=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return ju=r,null}function o_(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(pe()){case he:return 2;case xe:return 8;case Be:case Ze:return 32;case ft:return 268435456;default:return 32}default:return 32}}var Zp=!1,fa=null,ha=null,pa=null,Ol=new Map,Tl=new Map,ma=[],t4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function a_(r,a){switch(r){case"focusin":case"focusout":fa=null;break;case"dragenter":case"dragleave":ha=null;break;case"mouseover":case"mouseout":pa=null;break;case"pointerover":case"pointerout":Ol.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tl.delete(a.pointerId)}}function Al(r,a,s,u,m,g){return r===null||r.nativeEvent!==g?(r={blockedOn:a,domEventName:s,eventSystemFlags:u,nativeEvent:g,targetContainers:[m]},a!==null&&(a=Ai(a),a!==null&&n_(a)),r):(r.eventSystemFlags|=u,a=r.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),r)}function n4(r,a,s,u,m){switch(a){case"focusin":return fa=Al(fa,r,a,s,u,m),!0;case"dragenter":return ha=Al(ha,r,a,s,u,m),!0;case"mouseover":return pa=Al(pa,r,a,s,u,m),!0;case"pointerover":var g=m.pointerId;return Ol.set(g,Al(Ol.get(g)||null,r,a,s,u,m)),!0;case"gotpointercapture":return g=m.pointerId,Tl.set(g,Al(Tl.get(g)||null,r,a,s,u,m)),!0}return!1}function i_(r){var a=Ti(r.target);if(a!==null){var s=l(a);if(s!==null){if(a=s.tag,a===13){if(a=c(s),a!==null){r.blockedOn=a,_0(r.priority,function(){r_(s)});return}}else if(a===31){if(a=d(s),a!==null){r.blockedOn=a,_0(r.priority,function(){r_(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function zu(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var s=Gp(r.nativeEvent);if(s===null){s=r.nativeEvent;var u=new s.constructor(s.type,s);qf=u,s.target.dispatchEvent(u),qf=null}else return a=Ai(s),a!==null&&n_(a),r.blockedOn=s,!1;a.shift()}return!0}function s_(r,a,s){zu(r)&&s.delete(a)}function r4(){Zp=!1,fa!==null&&zu(fa)&&(fa=null),ha!==null&&zu(ha)&&(ha=null),pa!==null&&zu(pa)&&(pa=null),Ol.forEach(s_),Tl.forEach(s_)}function Uu(r,a){r.blockedOn===a&&(r.blockedOn=null,Zp||(Zp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,r4)))}var Bu=null;function l_(r){Bu!==r&&(Bu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Bu===r&&(Bu=null);for(var a=0;a<r.length;a+=3){var s=r[a],u=r[a+1],m=r[a+2];if(typeof u!="function"){if(qp(u||s)===null)continue;break}var g=Ai(s);g!==null&&(r.splice(a,3),a-=3,Gh(g,{pending:!0,data:m,method:s.method,action:u},u,m))}}))}function cs(r){function a(B){return Uu(B,r)}fa!==null&&Uu(fa,r),ha!==null&&Uu(ha,r),pa!==null&&Uu(pa,r),Ol.forEach(a),Tl.forEach(a);for(var s=0;s<ma.length;s++){var u=ma[s];u.blockedOn===r&&(u.blockedOn=null)}for(;0<ma.length&&(s=ma[0],s.blockedOn===null);)i_(s),s.blockedOn===null&&ma.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var m=s[u],g=s[u+1],x=m[Fn]||null;if(typeof g=="function")x||l_(s);else if(x){var M=null;if(g&&g.hasAttribute("formAction")){if(m=g,x=g[Fn]||null)M=x.formAction;else if(qp(m)!==null)continue}else M=x.action;typeof M=="function"?s[u+1]=M:(s.splice(u,3),u-=3),l_(s)}}}function c_(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(x){return m=x})},focusReset:"manual",scroll:"manual"})}function a(){m!==null&&(m(),m=null),u||setTimeout(s,20)}function s(){if(!u&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),m!==null&&(m(),m=null)}}}function Yp(r){this._internalRoot=r}Fu.prototype.render=Yp.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(o(409));var s=a.current,u=sr();e_(s,u,r,a,null,null)},Fu.prototype.unmount=Yp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;e_(r.current,2,null,r,null,null),Eu(),a[Oi]=null}};function Fu(r){this._internalRoot=r}Fu.prototype.unstable_scheduleHydration=function(r){if(r){var a=Uf();r={blockedOn:null,target:r,priority:a};for(var s=0;s<ma.length&&a!==0&&a<ma[s].priority;s++);ma.splice(s,0,r),s===0&&i_(r)}};var u_=t.version;if(u_!=="19.2.3")throw Error(o(527,u_,"19.2.3"));F.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(o(188)):(r=Object.keys(r).join(","),Error(o(268,r)));return r=h(a),r=r!==null?v(r):null,r=r===null?null:r.stateNode,r};var o4={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$u.isDisabled&&$u.supportsFiber)try{Zt=$u.inject(o4),At=$u}catch{}}return Il.createRoot=function(r,a){if(!i(r))throw Error(o(299));var s=!1,u="",m=g1,g=y1,x=b1;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),a=Xb(r,1,!1,null,null,s,u,null,m,g,x,c_),r[Oi]=a.current,Cp(r),new Yp(a)},Il.hydrateRoot=function(r,a,s){if(!i(r))throw Error(o(299));var u=!1,m="",g=g1,x=y1,M=b1,B=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError),s.formState!==void 0&&(B=s.formState)),a=Xb(r,1,!0,a,s??null,u,m,B,g,x,M,c_),a.context=Jb(null),s=a.current,u=sr(),u=Ri(u),m=ea(u),m.callback=null,ta(s,m,u),s=u,a.current.lanes=s,lt(a,s),ro(a),r[Oi]=a.current,Cp(r),new Fu(a)},Il.version="19.2.3",Il}var E_;function v4(){if(E_)return Wp.exports;E_=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Wp.exports=m4(),Wp.exports}var g4=v4(),E=ka();const V=_i(E),eg=i4({__proto__:null,default:V},[E]);var tm={exports:{}},nm={};var S_;function y4(){if(S_)return nm;S_=1;var e=ka().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return nm.c=function(t){return e.H.useMemoCache(t)},nm}var w_;function b4(){return w_||(w_=1,tm.exports=y4()),tm.exports}var uf=b4(),mc=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(){}},_4={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},E4=class{#e=_4;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},si=new E4;function S4(e){setTimeout(e,0)}var pi=typeof window>"u"||"Deno"in globalThis;function Qn(){}function w4(e,t){return typeof e=="function"?e(t):e}function av(e){return typeof e=="number"&&e>=0&&e!==1/0}function gw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ta(e,t){return typeof e=="function"?e(t):e}function Dr(e,t){return typeof e=="function"?e(t):e}function x_(e,t){const{type:n="all",exact:o,fetchStatus:i,predicate:l,queryKey:c,stale:d}=e;if(c){if(o){if(t.queryHash!==tg(c,t.options))return!1}else if(!nc(t.queryKey,c))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||i&&i!==t.state.fetchStatus||l&&!l(t))}function R_(e,t){const{exact:n,status:o,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(tc(t.options.mutationKey)!==tc(l))return!1}else if(!nc(t.options.mutationKey,l))return!1}return!(o&&t.state.status!==o||i&&!i(t))}function tg(e,t){return(t?.queryKeyHashFn||tc)(e)}function tc(e){return JSON.stringify(e,(t,n)=>sv(n)?Object.keys(n).sort().reduce((o,i)=>(o[i]=n[i],o),{}):n)}function nc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nc(e[n],t[n])):!1}var x4=Object.prototype.hasOwnProperty;function yw(e,t){if(e===t)return e;const n=O_(e)&&O_(t);if(!n&&!(sv(e)&&sv(t)))return t;const i=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),c=l.length,d=n?new Array(c):{};let f=0;for(let h=0;h<c;h++){const v=n?h:l[h],p=e[v],y=t[v];if(p===y){d[v]=p,(n?h<i:x4.call(e,v))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){d[v]=y;continue}const _=yw(p,y);d[v]=_,_===p&&f++}return i===c&&f===i?e:d}function iv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function O_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sv(e){if(!T_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!T_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function T_(e){return Object.prototype.toString.call(e)==="[object Object]"}function R4(e){return new Promise(t=>{si.setTimeout(t,e)})}function lv(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?yw(e,t):t}function aH(e){return e}function O4(e,t,n=0){const o=[...e,t];return n&&o.length>n?o.slice(1):o}function T4(e,t,n=0){const o=[t,...e];return n&&o.length>n?o.slice(0,-1):o}var ng=Symbol();function bw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ng?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _w(e,t){return typeof e=="function"?e(...t):!!e}function A4(e,t,n){let o=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),o||(o=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var C4=class extends mc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!pi&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},rg=new C4;function cv(){let e,t;const n=new Promise((i,l)=>{e=i,t=l});n.status="pending",n.catch(()=>{});function o(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{o({status:"fulfilled",value:i}),e(i)},n.reject=i=>{o({status:"rejected",reason:i}),t(i)},n}var I4=S4;function M4(){let e=[],t=0,n=d=>{d()},o=d=>{d()},i=I4;const l=d=>{t?e.push(d):i(()=>{n(d)})},c=()=>{const d=e;e=[],d.length&&i(()=>{o(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||c()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{o=d},setScheduler:d=>{i=d}}}var On=M4(),N4=class extends mc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!pi&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Cd=new N4;function D4(e){return Math.min(1e3*2**e,3e4)}function Ew(e){return(e??"online")==="online"?Cd.isOnline():!0}var uv=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Sw(e){let t=!1,n=0,o;const i=cv(),l=()=>i.status!=="pending",c=w=>{if(!l()){const T=new uv(w);y(T),e.onCancel?.(T)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>rg.isFocused()&&(e.networkMode==="always"||Cd.isOnline())&&e.canRun(),v=()=>Ew(e.networkMode)&&e.canRun(),p=w=>{l()||(o?.(),i.resolve(w))},y=w=>{l()||(o?.(),i.reject(w))},_=()=>new Promise(w=>{o=T=>{(l()||h())&&w(T)},e.onPause?.()}).then(()=>{o=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let w;const T=n===0?e.initialPromise:void 0;try{w=T??e.fn()}catch(O){w=Promise.reject(O)}Promise.resolve(w).then(p).catch(O=>{if(l())return;const A=e.retry??(pi?0:3),C=e.retryDelay??D4,R=typeof C=="function"?C(n,O):C,I=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,O);if(t||!I){y(O);return}n++,e.onFail?.(n,O),R4(R).then(()=>h()?void 0:_()).then(()=>{t?y(O):S()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(o?.(),i),cancelRetry:d,continueRetry:f,canStart:v,start:()=>(v()?S():_().then(S),i)}}var ww=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),av(this.gcTime)&&(this.#e=si.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(si.clearTimeout(this.#e),this.#e=void 0)}},L4=class extends ww{#e;#t;#n;#o;#r;#s;#i;constructor(e){super(),this.#i=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=C_(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=C_(this.options);t.data!==void 0&&(this.setState(A_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=lv(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Qn).catch(Qn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Dr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ng||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ta(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!gw(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#i?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},i=()=>{const d=bw(this.options,t),h=(()=>{const v={client:this.#o,queryKey:this.queryKey,meta:this.meta};return o(v),v})();return this.#i=!1,this.options.persister?this.options.persister(d,h,this):d(h)},c=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:i};return o(d),d})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=Sw({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof uv&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#a({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof uv){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#a({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...xw(n.data,this.options),fetchMeta:e.meta??null};case"success":const o={...n,...A_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?o:void 0,o;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),On.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function xw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ew(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function A_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function C_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,o=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var P4=class extends mc{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#i=cv(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#s;#i;#a;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),I_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dv(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#E(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!iv(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&M_(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),o&&(this.#t!==n||Dr(this.options.enabled,this.#t)!==Dr(t.enabled,this.#t)||Ta(this.options.staleTime,this.#t)!==Ta(t.staleTime,this.#t))&&this.#v();const i=this.#g();o&&(this.#t!==n||Dr(this.options.enabled,this.#t)!==Dr(t.enabled,this.#t)||i!==this.#l)&&this.#y(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return j4(this,n)&&(this.#o=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,o)=>(this.trackProp(o),t?.(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,o))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Qn)),t}#v(){this.#_();const e=Ta(this.options.staleTime,this.#t);if(pi||this.#o.isStale||!av(e))return;const n=gw(this.#o.dataUpdatedAt,e)+1;this.#c=si.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#l=e,!(pi||Dr(this.options.enabled,this.#t)===!1||!av(this.#l)||this.#l===0)&&(this.#u=si.setInterval(()=>{(this.options.refetchIntervalInBackground||rg.isFocused())&&this.#d()},this.#l))}#b(){this.#v(),this.#y(this.#g())}#_(){this.#c&&(si.clearTimeout(this.#c),this.#c=void 0)}#E(){this.#u&&(si.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,o=this.options,i=this.#o,l=this.#r,c=this.#s,f=e!==n?e.state:this.#n,{state:h}=e;let v={...h},p=!1,y;if(t._optimisticResults){const N=this.hasListeners(),z=!N&&I_(e,t),W=N&&M_(e,n,t,o);(z||W)&&(v={...v,...xw(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:_,errorUpdatedAt:S,status:w}=v;y=v.data;let T=!1;if(t.placeholderData!==void 0&&y===void 0&&w==="pending"){let N;i?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(N=i.data,T=!0):N=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,N!==void 0&&(w="success",y=lv(i?.data,N,t),p=!0)}if(t.select&&y!==void 0&&!T)if(i&&y===l?.data&&t.select===this.#m)y=this.#f;else try{this.#m=t.select,y=t.select(y),y=lv(i?.data,y,t),this.#f=y,this.#a=null}catch(N){this.#a=N}this.#a&&(_=this.#a,y=this.#f,S=Date.now(),w="error");const O=v.fetchStatus==="fetching",A=w==="pending",C=w==="error",R=A&&O,I=y!==void 0,D={status:w,fetchStatus:v.fetchStatus,isPending:A,isSuccess:w==="success",isError:C,isInitialLoading:R,isLoading:R,data:y,dataUpdatedAt:v.dataUpdatedAt,error:_,errorUpdatedAt:S,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>f.dataUpdateCount||v.errorUpdateCount>f.errorUpdateCount,isFetching:O,isRefetching:O&&!A,isLoadingError:C&&!I,isPaused:v.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&I,isStale:og(e,t),refetch:this.refetch,promise:this.#i,isEnabled:Dr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const N=$=>{D.status==="error"?$.reject(D.error):D.data!==void 0&&$.resolve(D.data)},z=()=>{const $=this.#i=D.promise=cv();N($)},W=this.#i;switch(W.status){case"pending":e.queryHash===n.queryHash&&N(W);break;case"fulfilled":(D.status==="error"||D.data!==W.value)&&z();break;case"rejected":(D.status!=="error"||D.error!==W.reason)&&z();break}}return D}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),iv(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!this.#p.size)return!0;const l=new Set(i??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#o).some(c=>{const d=c;return this.#o[d]!==e[d]&&l.has(d)})};this.#w({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#w(e){On.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function k4(e,t){return Dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function I_(e,t){return k4(e,t)||e.state.data!==void 0&&dv(e,t,t.refetchOnMount)}function dv(e,t,n){if(Dr(t.enabled,e)!==!1&&Ta(t.staleTime,e)!=="static"){const o=typeof n=="function"?n(e):n;return o==="always"||o!==!1&&og(e,t)}return!1}function M_(e,t,n,o){return(e!==t||Dr(o.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&og(e,n)}function og(e,t){return Dr(t.enabled,e)!==!1&&e.isStaleByTime(Ta(t.staleTime,e))}function j4(e,t){return!iv(e.getCurrentResult(),t)}function N_(e){return{onFetch:(t,n)=>{const o=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let v=!1;const p=S=>{A4(S,()=>t.signal,()=>v=!0)},y=bw(t.options,t.fetchOptions),_=async(S,w,T)=>{if(v)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const A=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:w,direction:T?"backward":"forward",meta:t.options.meta};return p(k),k})(),C=await y(A),{maxPages:R}=t.options,I=T?T4:O4;return{pages:I(S.pages,C,R),pageParams:I(S.pageParams,w,R)}};if(i&&l.length){const S=i==="backward",w=S?Rw:fv,T={pages:l,pageParams:c},O=w(o,T);d=await _(T,O,S)}else{const S=e??l.length;do{const w=f===0?c[0]??o.initialPageParam:fv(o,d);if(f>0&&w==null)break;d=await _(d,w),f++}while(f<S)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function fv(e,{pages:t,pageParams:n}){const o=t.length-1;return t.length>0?e.getNextPageParam(t[o],t,n[o],n):void 0}function Rw(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function iH(e,t){return t?fv(e,t)!=null:!1}function sH(e,t){return!t||!e.getPreviousPageParam?!1:Rw(e,t)!=null}var z4=class extends ww{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||U4(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=Sw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const o=this.state.status==="pending",i=!this.#o.canStart();try{if(o)t();else{this.#r({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:i})}const l=await this.#o.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),On.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function U4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var B4=class extends mc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const o=new z4({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(o),o}add(e){this.#e.add(e);const t=Vu(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Vu(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const o=n.indexOf(e);o!==-1&&n.splice(o,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Vu(e);if(typeof t=="string"){const o=this.#t.get(t)?.find(i=>i.state.status==="pending");return!o||o===e}else return!0}runNext(e){const t=Vu(e);return typeof t=="string"?this.#t.get(t)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){On.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>R_(t,n))}findAll(e={}){return this.getAll().filter(t=>R_(e,t))}notify(e){On.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return On.batch(()=>Promise.all(e.map(t=>t.continue().catch(Qn))))}};function Vu(e){return e.options.scope?.id}var F4=class extends mc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const o=t.queryKey,i=t.queryHash??tg(o,t);let l=this.get(i);return l||(l=new L4({client:e,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){On.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>x_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>x_(e,n)):t}notify(e){On.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){On.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){On.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},$4=class{#e;#t;#n;#o;#r;#s;#i;#a;constructor(e={}){this.#e=e.queryCache||new F4,this.#t=e.mutationCache||new B4,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#i=rg.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Cd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#i?.(),this.#i=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),o=n.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ta(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const o=n.data;return[t,o]})}setQueryData(e,t,n){const o=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(o.queryHash)?.state.data,c=w4(t,l);if(c!==void 0)return this.#e.build(this,o).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return On.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;On.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return On.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},o=On.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(o).then(Qn).catch(Qn)}invalidateQueries(e,t={}){return On.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},o=On.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,n);return n.throwOnError||(l=l.catch(Qn)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(o).then(Qn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ta(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qn).catch(Qn)}fetchInfiniteQuery(e){return e.behavior=N_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qn).catch(Qn)}ensureInfiniteQueryData(e){return e.behavior=N_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Cd.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(tc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(o=>{nc(e,o.queryKey)&&Object.assign(n,o.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(tc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(o=>{nc(e,o.mutationKey)&&Object.assign(n,o.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tg(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ng&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ow=E.createContext(void 0),V4=e=>{const t=E.useContext(Ow);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},H4=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(Ow.Provider,{value:e,children:t})),Tw=E.createContext(!1),G4=()=>E.useContext(Tw);Tw.Provider;function q4(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Z4=E.createContext(q4()),Y4=()=>E.useContext(Z4),K4=(e,t,n)=>{const o=n?.state.error&&typeof e.throwOnError=="function"?_w(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(t.isReset()||(e.retryOnMount=!1))},W4=e=>{E.useEffect(()=>{e.clearReset()},[e])},Q4=({result:e,errorResetBoundary:t,throwOnError:n,query:o,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(i&&e.data===void 0||_w(n,[e.error,o])),X4=(e,t)=>t.state.data===void 0,J4=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...i)=>n(o(...i)):n(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},e3=(e,t)=>e.isLoading&&e.isFetching&&!t,t3=(e,t)=>e?.suspense&&t.isPending,D_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function n3(e,t,n){const o=G4(),i=Y4(),l=V4(n),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const d=l.getQueryCache().get(c.queryHash);c._optimisticResults=o?"isRestoring":"optimistic",J4(c),K4(c,i,d),W4(i);const f=!l.getQueryCache().get(c.queryHash),[h]=E.useState(()=>new t(l,c)),v=h.getOptimisticResult(c),p=!o&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(y=>{const _=p?h.subscribe(On.batchCalls(y)):Qn;return h.updateResult(),_},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),E.useEffect(()=>{h.setOptions(c)},[c,h]),t3(c,v))throw D_(c,h,i);if(Q4({result:v,errorResetBoundary:i,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw v.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,v),c.experimental_prefetchInRender&&!pi&&e3(v,o)&&(f?D_(c,h,i):d?.promise)?.catch(Qn).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?v:h.trackResult(v)}function r3(e,t){return n3({...e,enabled:!0,suspense:!0,throwOnError:X4,placeholderData:void 0},P4,t)}const o3={authConfig:()=>["authConfig"],threads:e=>["threads",e],gatewayThreads:(e,t)=>["threads",e,"gateway",t],thread:(e,t)=>["thread",e,t],threadMessages:(e,t)=>["thread-messages",e,t],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,o)=>[e,t,"collection",n,o],collectionList:(e,t,n,o)=>[e,t,"collection",n,"list",o],collectionListInfinite:(e,t,n,o)=>[e,t,"collection",n,"list-infinite",o],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],gatewayPrompts:e=>["gateway",e,"prompts"],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e]},Aw=E.createContext(void 0);async function a3(){const e=await fetch("/api/auth/custom/config");if(!e.ok)throw new Error("Failed to load auth configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load auth configuration");return t.config}function i3(e){const t=uf.c(4),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:o3.authConfig(),queryFn:a3,staleTime:1/0},t[0]=o):o=t[0];const{data:i}=r3(o);let l;return t[1]!==i||t[2]!==n?(l=b.jsx(Aw.Provider,{value:i,children:n}),t[1]=i,t[2]=n,t[3]=l):l=t[3],l}function lH(){const e=E.useContext(Aw);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const hv=new WeakMap,s3=new WeakMap,Id={current:[]};let rm=!1,Yl=0;const Vl=new Set,Hu=new Map;function Cw(e){for(const t of e){if(Id.current.includes(t))continue;Id.current.push(t),t.recompute();const n=s3.get(t);if(n)for(const o of n){const i=hv.get(o);i?.length&&Cw(i)}}}function l3(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function c3(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function Iw(e){if(Yl>0&&!Hu.has(e)&&Hu.set(e,e.prevState),Vl.add(e),!(Yl>0)&&!rm)try{for(rm=!0;Vl.size>0;){const t=Array.from(Vl);Vl.clear();for(const n of t){const o=Hu.get(n)??n.prevState;n.prevState=o,l3(n)}for(const n of t){const o=hv.get(n);o&&(Id.current.push(n),Cw(o))}for(const n of t){const o=hv.get(n);if(o)for(const i of o)c3(i)}}}finally{rm=!1,Id.current=[],Hu.clear()}}function Kl(e){Yl++;try{e()}finally{if(Yl--,Yl===0){const t=Vl.values().next().value;t&&Iw(t)}}}function u3(e){return typeof e=="function"}class d3{constructor(t,n){this.listeners=new Set,this.subscribe=o=>{var i,l;this.listeners.add(o);const c=(l=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:l.call(i,o,this);return()=>{this.listeners.delete(o),c?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,o,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):u3(t)?this.state=t(this.prevState):this.state=t,(i=(o=this.options)==null?void 0:o.onUpdate)==null||i.call(o),Iw(this)}}const Aa="__TSR_index",L_="popstate",P_="beforeunload";function f3(e){let t=e.getLocation();const n=new Set,o=c=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:c}))},i=c=>{e.notifyOnIndexChange??!0?o(c):t=e.getLocation()},l=async({task:c,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){c();return}const v=e.getBlockers?.()??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&v.length&&p)for(const y of v){const _=Md(f.path,f.state);if(await y.blockerFn({currentLocation:t,nextLocation:_,action:f.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,d,f)=>{const h=t.state[Aa];d=k_(h+1,d),l({task:()=>{e.pushState(c,d),o({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:c,state:d})},replace:(c,d,f)=>{const h=t.state[Aa];d=k_(h,d),l({task:()=>{e.replaceState(c,d),o({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:c,state:d})},go:(c,d)=>{l({task:()=>{e.go(c),i({type:"GO",index:c})},navigateOpts:d,type:"GO"})},back:c=>{l({task:()=>{e.back(c?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{l({task:()=>{e.forward(c?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[Aa]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,c]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(h=>h!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:o}}function k_(e,t){t||(t={});const n=ag();return{...t,key:n,__TSR_key:n,[Aa]:e}}function h3(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,o=t.history.replaceState;let i=[];const l=()=>i,c=N=>i=N,d=(N=>N),f=(()=>Md(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const N=ag();t.history.replaceState({[Aa]:0,key:N,__TSR_key:N},"")}let h=f(),v,p=!1,y=!1,_=!1,S=!1;const w=()=>h;let T,O;const A=()=>{T&&(D._ignoreSubscribers=!0,(T.isPush?t.history.pushState:t.history.replaceState)(T.state,"",T.href),D._ignoreSubscribers=!1,T=void 0,O=void 0,v=void 0)},C=(N,z,W)=>{const $=d(z);O||(v=h),h=Md(z,W),T={href:$,state:W,isPush:T?.isPush||N==="push"},O||(O=Promise.resolve().then(()=>A()))},R=N=>{h=f(),D.notify({type:N})},I=async()=>{if(y){y=!1;return}const N=f(),z=N.state[Aa]-h.state[Aa],W=z===1,$=z===-1,q=!W&&!$||p;p=!1;const j=q?"GO":$?"BACK":"FORWARD",X=q?{type:"GO",index:z}:{type:$?"BACK":"FORWARD"};if(_)_=!1;else{const oe=l();if(typeof document<"u"&&oe.length){for(const L of oe)if(await L.blockerFn({currentLocation:h,nextLocation:N,action:j})){y=!0,t.history.go(1),D.notify(X);return}}}h=f(),D.notify(X)},k=N=>{if(S){S=!1;return}let z=!1;const W=l();if(typeof document<"u"&&W.length)for(const $ of W){const q=$.enableBeforeUnload??!0;if(q===!0){z=!0;break}if(typeof q=="function"&&q()===!0){z=!0;break}}if(z)return N.preventDefault(),N.returnValue=""},D=f3({getLocation:w,getLength:()=>t.history.length,pushState:(N,z)=>C("push",N,z),replaceState:(N,z)=>C("replace",N,z),back:N=>(N&&(_=!0),S=!0,t.history.back()),forward:N=>{N&&(_=!0),S=!0,t.history.forward()},go:N=>{p=!0,t.history.go(N)},createHref:N=>d(N),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=o,t.removeEventListener(P_,k,{capture:!0}),t.removeEventListener(L_,I)},onBlocked:()=>{v&&h!==v&&(h=v)},getBlockers:l,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(P_,k,{capture:!0}),t.addEventListener(L_,I),t.history.pushState=function(...N){const z=n.apply(t.history,N);return D._ignoreSubscribers||R("PUSH"),z},t.history.replaceState=function(...N){const z=o.apply(t.history,N);return D._ignoreSubscribers||R("REPLACE"),z},D}function p3(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Md(e,t){const n=p3(e),o=n.indexOf("#"),i=n.indexOf("?"),l=ag();return{href:n,pathname:n.substring(0,o>0?i>0?Math.min(o,i):o:i>0?i:n.length),hash:o>-1?n.substring(o):"",search:i>-1?n.slice(i,o===-1?void 0:o):"",state:t||{[Aa]:0,key:l,__TSR_key:l}}}function ag(){return(Math.random()+1).toString(36).substring(7)}function Nd(e){return e[e.length-1]}function m3(e){return typeof e=="function"}function Ra(e,t){return m3(e)?e(t):e}const v3=Object.prototype.hasOwnProperty;function Nr(e,t){if(e===t)return e;const n=t,o=U_(e)&&U_(n);if(!o&&!(Dd(e)&&Dd(n)))return n;const i=o?e:j_(e);if(!i)return n;const l=o?n:j_(n);if(!l)return n;const c=i.length,d=l.length,f=o?new Array(d):{};let h=0;for(let v=0;v<d;v++){const p=o?v:l[v],y=e[p],_=n[p];if(y===_){f[p]=y,(o?v<c:v3.call(e,p))&&h++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){f[p]=_;continue}const S=Nr(y,_);f[p]=S,S===y&&h++}return c===d&&h===c?e:f}function j_(e){const t=[],n=Object.getOwnPropertyNames(e);for(const i of n){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}const o=Object.getOwnPropertySymbols(e);for(const i of o){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}return t}function Dd(e){if(!z_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!z_(n)||!n.hasOwnProperty("isPrototypeOf"))}function z_(e){return Object.prototype.toString.call(e)==="[object Object]"}function U_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function di(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let o=0,i=e.length;o<i;o++)if(!di(e[o],t[o],n))return!1;return!0}if(Dd(e)&&Dd(t)){const o=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!o||t[c]!==void 0)&&!di(e[c],t[c],n))return!1;return!0}let i=0;if(!o)i=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&i++;let l=0;for(const c in t)if((!o||t[c]!==void 0)&&(l++,l>i||!di(e[c],t[c],n)))return!1;return i===l}return!1}function Cs(e){let t,n;const o=new Promise((i,l)=>{t=i,n=l});return o.status="pending",o.resolve=i=>{o.status="resolved",o.value=i,t(i),e?.(i)},o.reject=i=>{o.status="rejected",n(i)},o}function g3(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Ca(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function y3(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function B_(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return y3(t)}function F_(e,t){if(!e)return e;const n=/%25|%5C/gi;let o=0,i="",l;for(;(l=n.exec(e))!==null;)i+=B_(e.slice(o,l.index))+l[0],o=n.lastIndex;return i=i+B_(o?e.slice(o):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}var b3="Invariant failed";function Fo(e,t){if(!e)throw new Error(b3)}function Ld(e){const t=new Map;let n,o;const i=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,o&&(o.next=l,l.prev=o)):(l.next.prev=void 0,n=l.next,l.next=void 0,o&&(l.prev=o,o.next=l)),o=l)};return{get(l){const c=t.get(l);if(c)return i(c),c.value},set(l,c){if(t.size>=e&&n){const f=n;t.delete(f.key),f.next&&(n=f.next,f.next.prev=void 0),f===o&&(o=void 0)}const d=t.get(l);if(d)d.value=c,i(d);else{const f={key:l,value:c,prev:o};o&&(o.next=f),o=f,n||(n=f),t.set(l,f)}},clear(){t.clear(),n=void 0,o=void 0}}}const Is=0,mi=1,vi=2,rc=3,Es=4,_3=5,E3=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,S3=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,w3=/^([^{]*)\{\$\}([^}]*)$/;function ig(e,t,n=new Uint16Array(6)){const o=e.indexOf("/",t),i=o===-1?e.length:o,l=e.substring(t,i);if(!l||!l.includes("$"))return n[0]=Is,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(l==="$"){const h=e.length;return n[0]=vi,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=mi,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const c=l.match(w3);if(c){const v=c[1].length;return n[0]=vi,n[1]=t+v,n[2]=t+v+1,n[3]=t+v+2,n[4]=t+v+3,n[5]=e.length,n}const d=l.match(S3);if(d){const h=d[1],v=d[2],p=d[3],y=h.length;return n[0]=rc,n[1]=t+y,n[2]=t+y+3,n[3]=t+y+3+v.length,n[4]=i-p.length,n[5]=i,n}const f=l.match(E3);if(f){const h=f[1],v=f[2],p=f[3],y=h.length;return n[0]=mi,n[1]=t+y,n[2]=t+y+2,n[3]=t+y+2+v.length,n[4]=i-p.length,n[5]=i,n}return n[0]=Is,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function df(e,t,n,o,i,l,c){c?.(n);let d=o;{const f=n.fullPath??n.from,h=f.length,v=n.options?.caseSensitive??e,p=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;d<h;){const _=ig(f,d,t);let S;const w=d,T=_[5];switch(d=T+1,l++,_[0]){case Is:{const A=f.substring(_[2],_[3]);if(v){const C=i.static?.get(A);if(C)S=C;else{i.static??=new Map;const R=li(n.fullPath??n.from);R.parent=i,R.depth=l,S=R,i.static.set(A,R)}}else{const C=A.toLowerCase(),R=i.staticInsensitive?.get(C);if(R)S=R;else{i.staticInsensitive??=new Map;const I=li(n.fullPath??n.from);I.parent=i,I.depth=l,S=I,i.staticInsensitive.set(C,I)}}break}case mi:{const A=f.substring(w,_[1]),C=f.substring(_[4],T),R=v&&!!(A||C),I=A?R?A:A.toLowerCase():void 0,k=C?R?C:C.toLowerCase():void 0,D=!p&&i.dynamic?.find(N=>!N.skipOnParamError&&N.caseSensitive===R&&N.prefix===I&&N.suffix===k);if(D)S=D;else{const N=am(mi,n.fullPath??n.from,R,I,k);S=N,N.depth=l,N.parent=i,i.dynamic??=[],i.dynamic.push(N)}break}case rc:{const A=f.substring(w,_[1]),C=f.substring(_[4],T),R=v&&!!(A||C),I=A?R?A:A.toLowerCase():void 0,k=C?R?C:C.toLowerCase():void 0,D=!p&&i.optional?.find(N=>!N.skipOnParamError&&N.caseSensitive===R&&N.prefix===I&&N.suffix===k);if(D)S=D;else{const N=am(rc,n.fullPath??n.from,R,I,k);S=N,N.parent=i,N.depth=l,i.optional??=[],i.optional.push(N)}break}case vi:{const A=f.substring(w,_[1]),C=f.substring(_[4],T),R=v&&!!(A||C),I=A?R?A:A.toLowerCase():void 0,k=C?R?C:C.toLowerCase():void 0,D=am(vi,n.fullPath??n.from,R,I,k);S=D,D.parent=i,D.depth=l,i.wildcard??=[],i.wildcard.push(D)}}i=S}if(p&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const _=li(n.fullPath??n.from);_.kind=_3,_.parent=i,l++,_.depth=l,i.pathless??=[],i.pathless.push(_),i=_}const y=(n.path||!n.children)&&!n.isRoot;if(y&&f.endsWith("/")){const _=li(n.fullPath??n.from);_.kind=Es,_.parent=i,l++,_.depth=l,i.index=_,i=_}i.parse=n.options?.params?.parse??null,i.skipOnParamError=p,i.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,y&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const f of n.children)df(e,t,f,d,i,l,c)}function om(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Sa(e){if(e.pathless)for(const t of e.pathless)Sa(t);if(e.static)for(const t of e.static.values())Sa(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Sa(t);if(e.dynamic?.length){e.dynamic.sort(om);for(const t of e.dynamic)Sa(t)}if(e.optional?.length){e.optional.sort(om);for(const t of e.optional)Sa(t)}if(e.wildcard?.length){e.wildcard.sort(om);for(const t of e.wildcard)Sa(t)}}function li(e){return{kind:Is,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function am(e,t,n,o,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:o,suffix:i}}function x3(e,t){const n=li("/"),o=new Uint16Array(6);for(const i of e)df(!1,o,i,1,n,0);Sa(n),t.masksTree=n,t.flatCache=Ld(1e3)}function R3(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const o=sg(e,t.masksTree);return t.flatCache.set(e,o),o}function O3(e,t,n,o,i){e||="/",o||="/";const l=t?`case\0${e}`:e;let c=i.singleCache.get(l);if(!c){c=li("/");const d=new Uint16Array(6);df(t,d,{from:e},1,c,0),i.singleCache.set(l,c)}return sg(o,c,n)}function T3(e,t,n=!1){const o=n?e:`nofuzz\0${e}`,i=t.matchCache.get(o);if(i!==void 0)return i;e||="/";const l=sg(e,t.segmentTree,n);return l&&(l.branch=I3(l.route)),t.matchCache.set(o,l),l}function A3(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function C3(e,t=!1,n){const o=li(e.fullPath),i=new Uint16Array(6),l={},c={};let d=0;return df(t,i,e,1,o,0,h=>{if(n?.(h,d),Fo(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,d!==0&&h.path){const v=A3(h.fullPath);(!c[v]||h.fullPath.endsWith("/"))&&(c[v]=h)}d++}),Sa(o),{processedTree:{segmentTree:o,singleCache:Ld(1e3),matchCache:Ld(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:c}}function sg(e,t,n=!1){const o=e.split("/"),i=N3(e,o,t,n);if(!i)return null;const[l]=Mw(e,o,i);return{route:i.node.route,rawParams:l,parsedParams:i.parsedParams}}function Mw(e,t,n){const o=M3(n.node);let i=null;const l={};let c=n.extract?.part??0,d=n.extract?.node??0,f=n.extract?.path??0;for(;d<o.length;c++,d++,f++){const h=o[d],v=t[c],p=f;if(v&&(f+=v.length),h.kind===mi){i??=n.node.fullPath.split("/");const y=i[d],_=h.prefix?.length??0;if(y.charCodeAt(_)===123){const w=h.suffix?.length??0,T=y.substring(_+2,y.length-w-1),O=v.substring(_,v.length-w);l[T]=decodeURIComponent(O)}else{const w=y.substring(1);l[w]=decodeURIComponent(v)}}else if(h.kind===rc){if(n.skipped&1<<d){c--;continue}i??=n.node.fullPath.split("/");const y=i[d],_=h.prefix?.length??0,S=h.suffix?.length??0,w=y.substring(_+3,y.length-S-1),T=h.suffix||h.prefix?v.substring(_,v.length-S):v;T&&(l[w]=decodeURIComponent(T))}else if(h.kind===vi){const y=h,_=e.substring(p+(y.prefix?.length??0),e.length-(y.suffix?.length??0)),S=decodeURIComponent(_);l["*"]=S,l._splat=S;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:c,node:d,path:f}]}function I3(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function M3(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function N3(e,t,n,o){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!Nd(t),l=i&&e!=="/",c=t.length-(i?1:0),d=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,h=null,v=null;for(;d.length;){const p=d.pop(),{node:y,index:_,skipped:S,depth:w,statics:T,dynamics:O,optionals:A}=p;let{extract:C,rawParams:R,parsedParams:I}=p;if(y.skipOnParamError){if(!im(e,t,p))continue;R=p.rawParams,C=p.extract,I=p.parsedParams}o&&y.route&&y.kind!==Es&&Ml(h,p)&&(h=p);const k=_===c;if(k&&(y.route&&!l&&Ml(v,p)&&(v=p),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const D=k?void 0:t[_];let N;if(k&&y.index){const z={node:y.index,index:_,skipped:S,depth:w+1,statics:T,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I};if(y.index.skipOnParamError&&!im(e,t,z))continue;if(T===c&&!O&&!A&&!S)return z;Ml(v,z)&&(v=z)}if(y.wildcard&&Ml(f,p))for(const z of y.wildcard){const{prefix:W,suffix:$}=z;if(W&&(k||!(z.caseSensitive?D:N??=D.toLowerCase()).startsWith(W)))continue;if($){if(k)continue;const j=t.slice(_).join("/").slice(-$.length);if((z.caseSensitive?j:j.toLowerCase())!==$)continue}const q={node:z,index:c,skipped:S,depth:w,statics:T,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I};if(!(z.skipOnParamError&&!im(e,t,q))){f=q;break}}if(y.optional){const z=S|1<<w,W=w+1;for(let $=y.optional.length-1;$>=0;$--){const q=y.optional[$];d.push({node:q,index:_,skipped:z,depth:W,statics:T,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I})}if(!k)for(let $=y.optional.length-1;$>=0;$--){const q=y.optional[$],{prefix:j,suffix:X}=q;if(j||X){const oe=q.caseSensitive?D:N??=D.toLowerCase();if(j&&!oe.startsWith(j)||X&&!oe.endsWith(X))continue}d.push({node:q,index:_+1,skipped:S,depth:W,statics:T,dynamics:O,optionals:A+1,extract:C,rawParams:R,parsedParams:I})}}if(!k&&y.dynamic&&D)for(let z=y.dynamic.length-1;z>=0;z--){const W=y.dynamic[z],{prefix:$,suffix:q}=W;if($||q){const j=W.caseSensitive?D:N??=D.toLowerCase();if($&&!j.startsWith($)||q&&!j.endsWith(q))continue}d.push({node:W,index:_+1,skipped:S,depth:w+1,statics:T,dynamics:O+1,optionals:A,extract:C,rawParams:R,parsedParams:I})}if(!k&&y.staticInsensitive){const z=y.staticInsensitive.get(N??=D.toLowerCase());z&&d.push({node:z,index:_+1,skipped:S,depth:w+1,statics:T+1,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I})}if(!k&&y.static){const z=y.static.get(D);z&&d.push({node:z,index:_+1,skipped:S,depth:w+1,statics:T+1,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I})}if(y.pathless){const z=w+1;for(let W=y.pathless.length-1;W>=0;W--){const $=y.pathless[W];d.push({node:$,index:_,skipped:S,depth:z,statics:T,dynamics:O,optionals:A,extract:C,rawParams:R,parsedParams:I})}}}if(v&&f)return Ml(f,v)?v:f;if(v)return v;if(f)return f;if(o&&h){let p=h.index;for(let _=0;_<h.index;_++)p+=t[_].length;const y=p===e.length?"/":e.slice(p);return h.rawParams??={},h.rawParams["**"]=decodeURIComponent(y),h}return null}function im(e,t,n){try{const[o,i]=Mw(e,t,n);n.rawParams=o,n.extract=i;const l=n.node.parse(o);return n.parsedParams=Object.assign({},n.parsedParams,l),!0}catch{return null}}function Ml(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Es)>(e.node.kind===Es)||t.node.kind===Es==(e.node.kind===Es)&&t.depth>e.depth))):!0}function yd(e){return lg(e.filter(t=>t!==void 0).join("/"))}function lg(e){return e.replace(/\/{2,}/g,"/")}function Nw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function fi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Dw(e){return fi(Nw(e))}function Pd(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function D3(e,t,n){return Pd(e,n)===Pd(t,n)}function L3({base:e,to:t,trailingSlash:n="never",cache:o}){const i=t.startsWith("/"),l=!i&&t===".";let c;if(o){c=i?t:l?e:e+"\0"+t;const p=o.get(c);if(p)return p}let d;if(l)d=e.split("/");else if(i)d=t.split("/");else{for(d=e.split("/");d.length>1&&Nd(d)==="";)d.pop();const p=t.split("/");for(let y=0,_=p.length;y<_;y++){const S=p[y];S===""?y?y===_-1&&d.push(S):d=[S]:S===".."?d.pop():S==="."||d.push(S)}}d.length>1&&(Nd(d)===""?n==="never"&&d.pop():n==="always"&&d.push(""));let f,h="";for(let p=0;p<d.length;p++){p>0&&(h+="/");const y=d[p];if(!y)continue;f=ig(y,0,f);const _=f[0];if(_===Is){h+=y;continue}const S=f[5],w=y.substring(0,f[1]),T=y.substring(f[4],S),O=y.substring(f[2],f[3]);_===mi?h+=w||T?`${w}{$${O}}${T}`:`$${O}`:_===vi?h+=w||T?`${w}{$}${T}`:"$":h+=`${w}{-$${O}}${T}`}h=lg(h);const v=h||"/";return c&&o&&o.set(c,v),v}function sm(e,t,n){const o=t[e];return typeof o!="string"?o:e==="_splat"?encodeURI(o):P3(o,n)}function lm({path:e,params:t,decodeCharMap:n}){let o=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:o};const l=e.length;let c=0,d,f="";for(;c<l;){const v=c;d=ig(e,v,d);const p=d[5];if(c=p+1,v===p)continue;const y=d[0];if(y===Is){f+="/"+e.substring(v,p);continue}if(y===vi){const _=t._splat;i._splat=_,i["*"]=_;const S=e.substring(v,d[1]),w=e.substring(d[4],p);if(!_){o=!0,(S||w)&&(f+="/"+S+w);continue}const T=sm("_splat",t,n);f+="/"+S+T+w;continue}if(y===mi){const _=e.substring(d[2],d[3]);!o&&!(_ in t)&&(o=!0),i[_]=t[_];const S=e.substring(v,d[1]),w=e.substring(d[4],p),T=sm(_,t,n)??"undefined";f+="/"+S+T+w;continue}if(y===rc){const _=e.substring(d[2],d[3]),S=t[_];if(S==null)continue;i[_]=S;const w=e.substring(v,d[1]),T=e.substring(d[4],p),O=sm(_,t,n)??"";f+="/"+w+O+T;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:i,interpolatedPath:f||"/",isMissingParams:o}}function P3(e,t){let n=encodeURIComponent(e);if(t)for(const[o,i]of t)n=n.replaceAll(o,i);return n}function vr(e){return!!e?.isNotFound}function k3(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const kd="tsr-scroll-restoration-v1_3",j3=(e,t)=>{let n;return(...o)=>{n||(n=setTimeout(()=>{e(...o),n=null},t))}};function z3(){const e=k3();if(!e)return null;const t=e.getItem(kd);let n=t?JSON.parse(t):{};return{state:n,set:o=>{n=Ra(o,n)||n;try{e.setItem(kd,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Gu=z3(),pv=e=>e.state.__TSR_key||e.href;function U3(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let jd=!1;function Lw({storageKey:e,key:t,behavior:n,shouldScrollRestoration:o,scrollToTopSelectors:i,location:l}){let c;try{c=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const d=t||window.history.state?.__TSR_key,f=c[d];jd=!0;e:{if(o&&f&&Object.keys(f).length>0){for(const p in f){const y=f[p];if(p==="window")window.scrollTo({top:y.scrollY,left:y.scrollX,behavior:n});else if(p){const _=document.querySelector(p);_&&(_.scrollLeft=y.scrollX,_.scrollTop=y.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const y=document.getElementById(h);y&&y.scrollIntoView(p)}break e}const v={top:0,left:0,behavior:n};if(window.scrollTo(v),i)for(const p of i){if(p==="window")continue;const y=typeof p=="function"?p():document.querySelector(p);y&&y.scrollTo(v)}}jd=!1}function B3(e,t){if(!Gu&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Gu))return;e.isScrollRestorationSetup=!0,jd=!1;const o=e.options.getScrollRestorationKey||pv;window.history.scrollRestoration="manual";const i=l=>{if(jd||!e.isScrollRestoring)return;let c="";if(l.target===document||l.target===window)c="window";else{const f=l.target.getAttribute("data-scroll-restoration-id");f?c=`[data-scroll-restoration-id="${f}"]`:c=U3(l.target)}const d=o(e.state.location);Gu.set(f=>{const h=f[d]||={},v=h[c]||={};if(c==="window")v.scrollX=window.scrollX||0,v.scrollY=window.scrollY||0;else if(c){const p=document.querySelector(c);p&&(v.scrollX=p.scrollLeft||0,v.scrollY=p.scrollTop||0)}return f})};typeof document<"u"&&document.addEventListener("scroll",j3(i,100),!0),e.subscribe("onRendered",l=>{const c=o(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Lw({storageKey:kd,key:c,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Gu.set(d=>(d[c]||={},d)))})}function F3(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function $3(e,t=String){const n=new URLSearchParams;for(const o in e){const i=e[o];i!==void 0&&n.set(o,t(i))}return n.toString()}function cm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function V3(e){const t=new URLSearchParams(e),n={};for(const[o,i]of t.entries()){const l=n[o];l==null?n[o]=cm(i):Array.isArray(l)?l.push(cm(i)):n[o]=[l,cm(i)]}return n}const H3=q3(JSON.parse),G3=Z3(JSON.stringify,JSON.parse);function q3(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=V3(t);for(const o in n){const i=n[o];if(typeof i=="string")try{n[o]=e(i)}catch{}}return n}}function Z3(e,t){const n=typeof t=="function";function o(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const l=$3(i,o);return l?`?${l}`:""}}const ur="__root__";function Y3(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Pr(e){return e instanceof Response&&!!e.options}const bd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},ff=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),cg=(e,t,n=!0)=>{const o={...e.router.options.context??{}},i=n?t:t-1;for(let l=0;l<=i;l++){const c=e.matches[l];if(!c)continue;const d=e.router.getMatch(c.id);d&&Object.assign(o,d.__routeContext,d.__beforeLoadContext)}return o},Pw=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Fo(n.options.notFoundComponent);const o=e.matches.find(i=>i.routeId===n.id);Fo(o,"Could not find match for route: "+n.id),e.updateMatch(o.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,Pw(e,t))},Oa=(e,t,n)=>{if(!(!Pr(n)&&!vr(n))){if(Pr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const o=Pr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:o,isFetching:!1,error:n})),vr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Pr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(Pw(e,n),n)}},kw=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Nl=(e,t,n,o)=>{const{id:i,routeId:l}=e.matches[t],c=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=o,e.firstBadMatchIndex??=t,Oa(e,e.router.getMatch(i),n);try{c.options.onError?.(n)}catch(d){n=d,Oa(e,e.router.getMatch(i),n)}e.updateMatch(i,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},K3=(e,t,n,o)=>{const i=e.router.getMatch(t),l=e.matches[n-1]?.id,c=l?e.router.getMatch(l):void 0;if(e.router.isShell()){i.ssr=o.id===ur;return}if(c?.ssr===!1){i.ssr=!1;return}const d=_=>_===!0&&c?.ssr==="data-only"?"data-only":_,f=e.router.options.defaultSsr??!0;if(o.options.ssr===void 0){i.ssr=d(f);return}if(typeof o.options.ssr!="function"){i.ssr=d(o.options.ssr);return}const{search:h,params:v}=i,p={search:qu(h,i.searchError),params:qu(v,i.paramsError),location:e.location,matches:e.matches.map(_=>({index:_.index,pathname:_.pathname,fullPath:_.fullPath,staticData:_.staticData,id:_.id,routeId:_.routeId,search:qu(_.search,_.searchError),params:qu(_.params,_.paramsError),ssr:_.ssr}))},y=o.options.ssr(p);if(Ca(y))return y.then(_=>{i.ssr=d(_??f)});i.ssr=d(y??f)},jw=(e,t,n,o)=>{if(o._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!ff(e,t)&&(n.options.loader||n.options.beforeLoad||Bw(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{bd(e)},i);o._nonReactive.pendingTimeout=c}},W3=(e,t,n)=>{const o=e.router.getMatch(t);if(!o._nonReactive.beforeLoadPromise&&!o._nonReactive.loaderPromise)return;jw(e,t,n,o);const i=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Oa(e,l,l.error)};return o._nonReactive.beforeLoadPromise?o._nonReactive.beforeLoadPromise.then(i):i()},Q3=(e,t,n,o)=>{const i=e.router.getMatch(t),l=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Cs(()=>{l?.resolve()});const{paramsError:c,searchError:d}=i;c&&Nl(e,n,c,"PARSE_PARAMS"),d&&Nl(e,n,d,"VALIDATE_SEARCH"),jw(e,t,o,i);const f=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let p=!1;const y=()=>{p||(p=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:f})))},_=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!o.options.beforeLoad){Kl(()=>{y(),_()});return}i._nonReactive.beforeLoadPromise=Cs();const S={...cg(e,n,!1),...i.__routeContext},{search:w,params:T,cause:O}=i,A=ff(e,t),C={search:w,abortController:f,params:T,preload:A,context:S,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":O,matches:e.matches,...e.router.options.additionalContext},R=k=>{if(k===void 0){Kl(()=>{y(),_()});return}(Pr(k)||vr(k))&&(y(),Nl(e,n,k,"BEFORE_LOAD")),Kl(()=>{y(),e.updateMatch(t,D=>({...D,__beforeLoadContext:k})),_()})};let I;try{if(I=o.options.beforeLoad(C),Ca(I))return y(),I.catch(k=>{Nl(e,n,k,"BEFORE_LOAD")}).then(R)}catch(k){y(),Nl(e,n,k,"BEFORE_LOAD")}R(I)},X3=(e,t)=>{const{id:n,routeId:o}=e.matches[t],i=e.router.looseRoutesById[o],l=()=>{if(e.router.isServer){const f=K3(e,n,t,i);if(Ca(f))return f.then(d)}return d()},c=()=>Q3(e,n,t,i),d=()=>{if(kw(e,n))return;const f=W3(e,n,i);return Ca(f)?f.then(c):c()};return l()},J3=(e,t,n)=>{const o=e.router.getMatch(t);if(!o||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={matches:e.matches,match:o,params:o.params,loaderData:o.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([l,c,d])=>{const f=l?.meta,h=l?.links,v=l?.scripts,p=l?.styles;return{meta:f,links:h,headScripts:v,headers:d,scripts:c,styles:p}})},zw=(e,t,n,o)=>{const i=e.matchPromises[n-1],{params:l,loaderDeps:c,abortController:d,cause:f}=e.router.getMatch(t),h=cg(e,n),v=ff(e,t);return{params:l,deps:c,preload:!!v,parentMatchPromise:i,abortController:d,context:h,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:v?"preload":f,route:o,...e.router.options.additionalContext}},$_=async(e,t,n,o)=>{try{const i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&Uw(o);const l=o.options.loader?.(zw(e,t,n,o)),c=o.options.loader&&Ca(l);if((c||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),o.options.loader){const h=c?await l:l;Oa(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,v=>({...v,loaderData:h}))}o._lazyPromise&&await o._lazyPromise;const f=i._nonReactive.minPendingPromise;f&&await f,o._componentsPromise&&await o._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;if(c?.name==="AbortError"){e.updateMatch(t,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1}));return}const d=i._nonReactive.minPendingPromise;d&&await d,vr(l)&&await o.options.notFoundComponent?.preload?.(),Oa(e,e.router.getMatch(t),l);try{o.options.onError?.(l)}catch(f){c=f,Oa(e,e.router.getMatch(t),f)}e.updateMatch(t,f=>({...f,error:c,status:"error",isFetching:!1}))}}catch(i){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),Oa(e,l,i)}},e5=async(e,t)=>{const{id:n,routeId:o}=e.matches[t];let i=!1,l=!1;const c=e.router.looseRoutesById[o],d=()=>{e.updateMatch(n,v=>({...v,context:cg(e,t)}))};if(kw(e,n)){if(e.router.isServer)return e.router.getMatch(n)}else{const v=e.router.getMatch(n);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload)return v;await v._nonReactive.loaderPromise;const p=e.router.getMatch(n),y=p._nonReactive.error||p.error;y&&Oa(e,p,y)}else{const p=Date.now()-v.updatedAt,y=ff(e,n),_=y?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,S=c.options.shouldReload,w=typeof S=="function"?S(zw(e,n,t,c)):S,T=!!y&&!e.router.state.matches.some(R=>R.id===n),O=e.router.getMatch(n);O._nonReactive.loaderPromise=Cs(),T!==O.preload&&e.updateMatch(n,R=>({...R,preload:T}));const{status:A,invalid:C}=O;i=A==="success"&&(C||(w??p>_)),y&&c.options.preload===!1||(i&&!e.sync?(l=!0,(async()=>{try{await $_(e,n,t,c),d();const R=e.router.getMatch(n);R._nonReactive.loaderPromise?.resolve(),R._nonReactive.loadPromise?.resolve(),R._nonReactive.loaderPromise=void 0}catch(R){Pr(R)&&await e.router.navigate(R.options)}})()):(A!=="success"||i&&e.sync)&&await $_(e,n,t,c))}}const f=e.router.getMatch(n);l||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,l||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0,l||d();const h=l?f.isFetching:!1;return h!==f.isFetching||f.invalid!==!1?(e.updateMatch(n,v=>({...v,isFetching:h,invalid:!1})),e.router.getMatch(n)):f};async function V_(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&bd(t);try{for(let d=0;d<t.matches.length;d++){const f=X3(t,d);Ca(f)&&await f}const n=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<n;d++)t.matchPromises.push(e5(t,d));const i=(await Promise.allSettled(t.matchPromises)).filter(d=>d.status==="rejected").map(d=>d.reason);let l;for(const d of i){if(Pr(d))throw d;!l&&vr(d)&&(l=d)}for(const d of t.matches){const{id:f,routeId:h}=d,v=t.router.looseRoutesById[h];try{const p=J3(t,f,v);if(p){const y=await p;t.updateMatch(f,_=>({..._,...y}))}}catch(p){console.error(`Error executing head for route ${h}:`,p)}}if(l)throw l;const c=bd(t);Ca(c)&&await c}catch(n){if(vr(n)&&!t.preload){const o=bd(t);throw Ca(o)&&await o,n}if(Pr(n))throw n}return t.matches}async function Uw(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...o}=t.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const o of Fw){const i=e.options[o]?.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function qu(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function Bw(e){for(const t of Fw)if(e.options[t]?.preload)return!0;return!1}const Fw=["component","errorComponent","pendingComponent","notFoundComponent"];function t5(e){return{input:({url:t})=>{for(const n of e)t=$w(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Vw(e[n],t);return t}}}function n5(e){const t=Dw(e.basepath),n=`/${t}`,o=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?o:o.toLowerCase();return{input:({url:c})=>{const d=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return d===i?c.pathname="/":d.startsWith(l)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=yd(["/",t,c.pathname]),c)}}function $w(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Vw(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function hi(e){const t=e.resolvedLocation,n=e.location,o=t?.pathname!==n.pathname,i=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:o,hrefChanged:i,hashChanged:l}}class r5{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const o=this.options,i=this.basepath??o?.basepath??"/",l=this.basepath===void 0,c=o?.rewrite;this.options={...o,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(y=>[encodeURIComponent(y),y])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=h3())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new d3(a5(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(y=>!["redirected"].includes(y.status))}}}),B3(this));let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||i!==f||c!==h){this.basepath=f;const y=[];Dw(f)!==""&&y.push(n5({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:t5(y),this.history&&this.updateLatestLocation(),d=!0}d&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:o,processedTree:i}=C3(this.routeTree,this.options.caseSensitive,(c,d)=>{c.init({originalIndex:d})});this.options.routeMasks&&x3(this.options.routeMasks,i),this.routesById=n,this.routesByPath=o,this.processedTree=i;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,o)=>{const i={eventType:n,fn:o};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(o=>{o.eventType===n.type&&o.fn(n)})},this.parseLocation=(n,o)=>{const i=({href:f,state:h})=>{const v=new URL(f,this.origin),p=$w(this.rewrite,v),y=this.options.parseSearch(p.search),_=this.options.stringifySearch(y);return p.search=_,{href:p.href.replace(p.origin,""),publicHref:f,url:p,pathname:F_(p.pathname),searchStr:_,search:Nr(o?.search,y),hash:p.hash.split("#").reverse()[0]??"",state:Nr(o?.state,h)}},l=i(n),{__tempLocation:c,__tempKey:d}=l.state;if(c&&(!d||d===this.tempLocationKey)){const f=i(c);return f.state.key=l.state.key,f.state.__TSR_key=l.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:l}}return l},this.resolvePathCache=Ld(1e3),this.resolvePathWithBase=(n,o)=>L3({base:n,to:lg(o),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,o,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:o},i):this.matchRoutesInternal(n,o),this.getMatchedRoutes=n=>i5({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const o=this.getMatch(n);o&&(o.abortController.abort(),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),o=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...o]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const o=(l={})=>{const c=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutes(c,{_buildLocation:!0}),f=Nd(d);l.from;const h=l.unsafeRelative==="path"?c.pathname:l.from??f.fullPath,v=this.resolvePathWithBase(h,"."),p=f.search,y={...f.params},_=l.to?this.resolvePathWithBase(v,`${l.to}`):this.resolvePathWithBase(v,"."),S=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,Ra(l.params,y)),w=lm({path:_,params:S}).interpolatedPath,T=this.matchRoutes(w,void 0,{_buildLocation:!0}).map(W=>this.looseRoutesById[W.routeId]);if(Object.keys(S).length>0)for(const W of T){const $=W.options.params?.stringify??W.options.stringifyParams;$&&Object.assign(S,$(S))}const O=n.leaveParams?_:F_(lm({path:_,params:S,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let A=p;if(n._includeValidateSearch&&this.options.search?.strict){const W={};T.forEach($=>{if($.options.validateSearch)try{Object.assign(W,mv($.options.validateSearch,{...W,...A}))}catch{}}),A=W}A=s5({search:A,dest:l,destRoutes:T,_includeValidateSearch:n._includeValidateSearch}),A=Nr(p,A);const C=this.options.stringifySearch(A),R=l.hash===!0?c.hash:l.hash?Ra(l.hash,c.hash):void 0,I=R?`#${R}`:"";let k=l.state===!0?c.state:l.state?Ra(l.state,c.state):{};k=Nr(c.state,k);const D=`${O}${C}${I}`,N=new URL(D,this.origin),z=Vw(this.rewrite,N);return{publicHref:z.pathname+z.search+z.hash,href:D,url:z,pathname:O,search:A,searchStr:C,state:k,hash:R??"",unmaskOnReload:l.unmaskOnReload}},i=(l={},c)=>{const d=o(l);let f=c?o(c):void 0;if(!f){const h={};if(this.options.routeMasks){const v=R3(d.pathname,this.processedTree);if(v){Object.assign(h,v.rawParams);const{from:p,params:y,..._}=v.route,S=y===!1||y===null?{}:(y??!0)===!0?h:Object.assign(h,Ra(y,h));c={from:n.from,..._,params:S},f=o(c)}}}return f&&(d.maskedLocation=f),d};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:o,...i})=>{const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(v=>{i.state[v]=this.latestLocation.state[v]});const h=di(i.state,this.latestLocation.state);return f.forEach(v=>{delete i.state[v]}),h},c=fi(this.latestLocation.href)===fi(i.href),d=this.commitLocationPromise;if(this.commitLocationPromise=Cs(()=>{d?.resolve()}),c&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,url:v,...p}=i;f&&(p={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:o})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:o,hashScrollIntoView:i,viewTransition:l,ignoreBlocker:c,href:d,...f}={})=>{if(d){const p=this.history.location.state.__TSR_index,y=Md(d,{__TSR_index:n?p:p+1});f.to=y.pathname,f.search=this.options.parseSearch(y.search),f.hash=y.hash.slice(1)}const h=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const v=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:o,hashScrollIntoView:i,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),v},this.navigate=async({to:n,reloadDocument:o,href:i,publicHref:l,...c})=>{let d=!1;if(i)try{new URL(`${i}`),d=!0}catch{}if(d&&!o&&(o=!0),o){if(!i||!l&&!d){const h=this.buildLocation({to:n,...c});i=i??h.url.href,l=l??h.url.href}const f=!d&&l?l:i;if(!c.ignoreBlocker){const v=this.history.getBlockers?.()??[];for(const p of v)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...c,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const o=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==o.publicHref||o.url.origin!==this.origin){const i=this.getParsedLocationHref(o);throw Y3({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(o=>({...o,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:o.cachedMatches.filter(i=>!n.some(l=>l.id===i.id))}))},this.load=async n=>{let o,i,l;for(l=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const f=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...hi({resolvedLocation:h,location:f})}),this.emit({type:"onBeforeLoad",...hi({resolvedLocation:h,location:f})}),await V_({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let v=[],p=[],y=[];Kl(()=>{this.__store.setState(_=>{const S=_.matches,w=_.pendingMatches||_.matches;return v=S.filter(T=>!w.some(O=>O.id===T.id)),p=w.filter(T=>!S.some(O=>O.id===T.id)),y=w.filter(T=>S.some(O=>O.id===T.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...v.filter(T=>T.status!=="error"&&T.status!=="notFound")]}}),this.clearExpiredCache()}),[[v,"onLeave"],[p,"onEnter"],[y,"onStay"]].forEach(([_,S])=>{_.forEach(w=>{this.looseRoutesById[w.routeId].options[S]?.(w)})})})})}})}catch(f){Pr(f)?(o=f,this.isServer||this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):vr(f)&&(i=f),this.__store.setState(h=>({...h,statusCode:o?o.status:i?404:h.matches.some(v=>v.status==="error")?500:200,redirect:o}))}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.__store.state.matches.some(d=>d.status==="error")&&(c=500),c!==void 0&&this.__store.setState(d=>({...d,statusCode:c}))},this.startViewTransition=n=>{const o=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,o&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof o=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,c=this.state.resolvedLocation,d=typeof o.types=="function"?o.types(hi({resolvedLocation:c,location:l})):o.types;if(d===!1){n();return}i={update:n,types:d}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,o)=>{this.startTransition(()=>{const i=this.state.pendingMatches?.some(l=>l.id===n)?"pendingMatches":this.state.matches.some(l=>l.id===n)?"matches":this.state.cachedMatches.some(l=>l.id===n)?"cachedMatches":"";i&&this.__store.setState(l=>({...l,[i]:l[i]?.map(c=>c.id===n?o(c):c)}))})},this.getMatch=n=>{const o=i=>i.id===n;return this.state.cachedMatches.find(o)??this.state.pendingMatches?.find(o)??this.state.matches.find(o)},this.invalidate=n=>{const o=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(o),cachedMatches:i.cachedMatches.map(o),pendingMatches:i.pendingMatches?.map(o)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let o=n.url.href;return this.origin&&n.url.origin===this.origin&&(o=o.replace(this.origin,"")||"/"),o},this.resolveRedirect=n=>{if(!n.options.href){const o=this.buildLocation(n.options),i=this.getParsedLocationHref(o);n.options.href=o.href,n.headers.set("Location",i)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const o=n?.filter;o!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(l=>!o(l))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=o=>{const i=this.looseRoutesById[o.routeId];if(!i.options.loader)return!0;const l=(o.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:Date.now()-o.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=Uw,this.preloadRoute=async n=>{const o=this.buildLocation(n);let i=this.matchRoutes(o,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(d=>d.id)),c=new Set([...l,...this.state.cachedMatches.map(d=>d.id)]);Kl(()=>{i.forEach(d=>{c.has(d.id)||this.__store.setState(f=>({...f,cachedMatches:[...f.cachedMatches,d]}))})});try{return i=await V_({router:this,matches:i,location:o,preload:!0,updateMatch:(d,f)=>{l.has(d)?i=i.map(h=>h.id===d?f(h):h):this.updateMatch(d,f)}}),i}catch(d){if(Pr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:o});vr(d)||console.error(d);return}},this.matchRoute=(n,o)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(i);if(o?.pending&&this.state.status!=="pending")return!1;const d=(o?.pending===void 0?!this.state.isLoading:o.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,f=O3(l.pathname,o?.caseSensitive??!1,o?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!di(f.rawParams,n.params,{partial:!0})?!1:o?.includeSearch??!0?di(d.search,l.search,{partial:!0})?f.rawParams:!1:f.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??G3,parseSearch:t.parseSearch??H3}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const o=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:l,parsedParams:c}=o;let{matchedRoutes:d}=o,f=!1;(i?i.path!=="/"&&l["**"]:fi(t.pathname))&&(this.options.notFoundRoute?d=[...d,this.options.notFoundRoute]:f=!0);const h=(()=>{if(f){if(this.options.notFoundMode!=="root")for(let y=d.length-1;y>=0;y--){const _=d[y];if(_.children)return _.id}return ur}})(),v=[],p=y=>y?.id?y.context??this.options.context??void 0:this.options.context??void 0;return d.forEach((y,_)=>{const S=v[_-1],[w,T,O]=(()=>{const X=S?.search??t.search,oe=S?._strictSearch??void 0;try{const L=mv(y.options.validateSearch,{...X})??void 0;return[{...X,...L},{...oe,...L},void 0]}catch(L){let F=L;if(L instanceof zd||(F=new zd(L.message,{cause:L})),n?.throwOnError)throw F;return[X,{},F]}})(),A=y.options.loaderDeps?.({search:w})??"",C=A?JSON.stringify(A):"",{interpolatedPath:R,usedParams:I}=lm({path:y.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),k=y.id+R+C,D=this.getMatch(k),N=this.state.matches.find(X=>X.routeId===y.id),z=D?._strictParams??I;let W;if(!D)if(y.options.skipRouteOnParseError)for(const X in I)X in c&&(z[X]=c[X]);else{const X=y.options.params?.parse??y.options.parseParams;if(X)try{Object.assign(z,X(z))}catch(oe){if(vr(oe)||Pr(oe)?W=oe:W=new o5(oe.message,{cause:oe}),n?.throwOnError)throw W}}Object.assign(l,z);const $=N?"stay":"enter";let q;if(D)q={...D,cause:$,params:N?Nr(N.params,l):l,_strictParams:z,search:Nr(N?N.search:D.search,w),_strictSearch:T};else{const X=y.options.loader||y.options.beforeLoad||y.lazyFn||Bw(y)?"pending":"success";q={id:k,ssr:this.isServer?void 0:y.options.ssr,index:_,routeId:y.id,params:N?Nr(N.params,l):l,_strictParams:z,pathname:R,updatedAt:Date.now(),search:N?Nr(N.search,w):w,_strictSearch:T,searchError:void 0,status:X,isFetching:!1,error:void 0,paramsError:W,__routeContext:void 0,_nonReactive:{loadPromise:Cs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:$,loaderDeps:N?Nr(N.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:y.options.staticData||{},fullPath:y.fullPath}}n?.preload||(q.globalNotFound=h===y.id),q.searchError=O;const j=p(S);q.context={...j,...q.__routeContext,...q.__beforeLoadContext},v.push(q)}),v.forEach((y,_)=>{const S=this.looseRoutesById[y.routeId];if(!this.getMatch(y.id)&&n?._buildLocation!==!0){const T=v[_-1],O=p(T);if(S.options.context){const A={deps:y.loaderDeps,params:y.params,context:O??{},location:t,navigate:C=>this.navigate({...C,_fromLocation:t}),buildLocation:this.buildLocation,cause:y.cause,abortController:y.abortController,preload:!!y.preload,matches:v};y.__routeContext=S.options.context(A)??void 0}y.context={...O,...y.__routeContext,...y.__beforeLoadContext}}}),v}}class zd extends Error{}class o5 extends Error{}function a5(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function mv(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new zd("Async validation not supported");if(n.issues)throw new zd(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function i5({pathname:e,routesById:t,processedTree:n}){const o={},i=fi(e);let l,c;const d=T3(i,n,!0);return d&&(l=d.route,Object.assign(o,d.rawParams),c=Object.assign({},d.parsedParams)),{matchedRoutes:d?.branch||[t[ur]],routeParams:o,foundRoute:l,parsedParams:c}}function s5({search:e,dest:t,destRoutes:n,_includeValidateSearch:o}){const i=n.reduce((d,f)=>{const h=[];if("search"in f.options)f.options.search?.middlewares&&h.push(...f.options.search.middlewares);else if(f.options.preSearchFilters||f.options.postSearchFilters){const v=({search:p,next:y})=>{let _=p;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(_=f.options.preSearchFilters.reduce((w,T)=>T(w),p));const S=y(_);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((w,T)=>T(w),S):S};h.push(v)}if(o&&f.options.validateSearch){const v=({search:p,next:y})=>{const _=y(p);try{return{..._,...mv(f.options.validateSearch,_)??void 0}}catch{return _}};h.push(v)}return d.concat(h)},[])??[],l=({search:d})=>t.search?t.search===!0?d:Ra(t.search,d):{};i.push(l);const c=(d,f)=>{if(d>=i.length)return f;const h=i[d];return h({search:f,next:p=>c(d+1,p)})};return c(0,e)}const l5="Error preloading route! ☝️";class Hw{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const o=this.options,i=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=ur:this.parentRoute||Fo(!1);let l=i?ur:o?.path;l&&l!=="/"&&(l=Nw(l));const c=o?.id||l;let d=i?ur:yd([this.parentRoute.id===ur?"":this.parentRoute.id,c]);l===ur&&(l="/"),d!==ur&&(d=yd(["/",d]));const f=d===ur?"/":yd([this.parentRoute.fullPath,l]);this._path=l,this._id=d,this._fullPath=f,this._to=f},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class c5 extends Hw{constructor(t){super(t)}}function ug(e){const t=e.errorComponent??hf;return b.jsx(u5,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:o})=>n?E.createElement(t,{error:n,reset:o}):e.children})}class u5 extends E.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function hf({error:e}){const[t,n]=E.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(o=>!o),children:t?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),t?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?b.jsx("code",{children:e.message}):null})}):null]})}function d5({children:e,fallback:t=null}){return f5()?b.jsx(V.Fragment,{children:e}):b.jsx(V.Fragment,{children:t})}function f5(){return V.useSyncExternalStore(h5,()=>!0,()=>!1)}function h5(){return()=>{}}var um={exports:{}},dm={},fm={exports:{}},hm={};var H_;function p5(){if(H_)return hm;H_=1;var e=ka();function t(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,i=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function d(p,y){var _=y(),S=o({inst:{value:_,getSnapshot:y}}),w=S[0].inst,T=S[1];return l(function(){w.value=_,w.getSnapshot=y,f(w)&&T({inst:w})},[p,_,y]),i(function(){return f(w)&&T({inst:w}),p(function(){f(w)&&T({inst:w})})},[p]),c(_),_}function f(p){var y=p.getSnapshot;p=p.value;try{var _=y();return!n(p,_)}catch{return!0}}function h(p,y){return y()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return hm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,hm}var G_;function Gw(){return G_||(G_=1,fm.exports=p5()),fm.exports}var q_;function m5(){if(q_)return dm;q_=1;var e=ka(),t=Gw();function n(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}var o=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,l=e.useRef,c=e.useEffect,d=e.useMemo,f=e.useDebugValue;return dm.useSyncExternalStoreWithSelector=function(h,v,p,y,_){var S=l(null);if(S.current===null){var w={hasValue:!1,value:null};S.current=w}else w=S.current;S=d(function(){function O(k){if(!A){if(A=!0,C=k,k=y(k),_!==void 0&&w.hasValue){var D=w.value;if(_(D,k))return R=D}return R=k}if(D=R,o(C,k))return D;var N=y(k);return _!==void 0&&_(D,N)?(C=k,D):(C=k,R=N)}var A=!1,C,R,I=p===void 0?null:p;return[function(){return O(v())},I===null?void 0:function(){return O(I())}]},[v,p,y,_]);var T=i(h,S[0],S[1]);return c(function(){w.hasValue=!0,w.value=T},[T]),f(T),T},dm}var Z_;function v5(){return Z_||(Z_=1,um.exports=m5()),um.exports}var qw=v5();const cH=_i(qw);function g5(e,t=o=>o,n={}){const o=n.equal??y5;return qw.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,o)}function y5(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,i]of e)if(!t.has(o)||!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Y_(e);if(n.length!==Y_(t).length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Object.is(e[n[o]],t[n[o]]))return!1;return!0}function Y_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const pm=E.createContext(null);function Zw(){return typeof document>"u"?pm:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=pm,pm)}function er(e){const t=E.useContext(Zw());return e?.warn,t}function Jn(e){const t=er({warn:e?.router===void 0}),n=e?.router||t,o=E.useRef(void 0);return g5(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Nr(o.current,e.select(i));return o.current=l,l}return e.select(i)}return i})}const pf=E.createContext(void 0),b5=E.createContext(void 0);function ho(e){const t=E.useContext(e.from?b5:pf);return Jn({select:o=>{const i=o.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(Fo(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function dg(e){return ho({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function fg(e){const{select:t,...n}=e;return ho({...n,select:o=>t?t(o.loaderDeps):o.loaderDeps})}function hg(e){return ho({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function pg(e){return ho({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Hl=typeof window<"u"?E.useLayoutEffect:E.useEffect;function mm(e){const t=E.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function _5(e,t,n={},o={}){E.useEffect(()=>{if(!e.current||o.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([l])=>{t(l)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,o.disabled,e])}function E5(e){const t=E.useRef(null);return E.useImperativeHandle(e,()=>t.current,[]),t}function vc(e){const t=er();return E.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function uH(e){const t=er(),n=vc(),o=E.useRef(null);return Hl(()=>{o.current!==e&&(n(e),o.current=e)},[t,e,n]),null}var mf=vw();const Yw=_i(mf);function S5(e,t){const n=er(),[o,i]=E.useState(!1),l=E.useRef(!1),c=E5(t),{activeProps:d,inactiveProps:f,activeOptions:h,to:v,preload:p,preloadDelay:y,hashScrollIntoView:_,replace:S,startTransition:w,resetScroll:T,viewTransition:O,children:A,target:C,disabled:R,style:I,className:k,onClick:D,onFocus:N,onMouseEnter:z,onMouseLeave:W,onTouchStart:$,ignoreBlocker:q,params:j,search:X,hash:oe,state:L,mask:F,reloadDocument:G,unsafeRelative:re,from:ye,_fromLocation:P,...Q}=e,te=Jn({select:Y=>Y.location.search,structuralSharing:!0}),se=e.from,me=E.useMemo(()=>({...e,from:se}),[n,te,se,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),_e=E.useMemo(()=>n.buildLocation({...me}),[n,me]),be=E.useMemo(()=>{if(R)return;let Y=_e.maskedLocation?_e.maskedLocation.url.href:_e.url.href,ue=!1;return n.origin&&(Y.startsWith(n.origin)?Y=n.history.createHref(Y.replace(n.origin,""))||"/":ue=!0),{href:Y,external:ue}},[R,_e.maskedLocation,_e.url,n.origin,n.history]),Se=E.useMemo(()=>{if(be?.external)return be.href;try{return new URL(v),v}catch{}},[v,be]),De=e.reloadDocument||Se?!1:p??n.options.defaultPreload,Le=y??n.options.defaultPreloadDelay??0,Ee=Jn({select:Y=>{if(Se)return!1;if(h?.exact){if(!D3(Y.location.pathname,_e.pathname,n.basepath))return!1}else{const ue=Pd(Y.location.pathname,n.basepath),pe=Pd(_e.pathname,n.basepath);if(!(ue.startsWith(pe)&&(ue.length===pe.length||ue[pe.length]==="/")))return!1}return(h?.includeSearch??!0)&&!di(Y.location.search,_e.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Y.location.hash===_e.hash:!0}}),ze=E.useCallback(()=>{n.preloadRoute({...me}).catch(Y=>{console.warn(Y),console.warn(l5)})},[n,me]),Nt=E.useCallback(Y=>{Y?.isIntersecting&&ze()},[ze]);_5(c,Nt,T5,{disabled:!!R||De!=="viewport"}),E.useEffect(()=>{l.current||!R&&De==="render"&&(ze(),l.current=!0)},[R,ze,De]);const ge=Y=>{const ue=Y.currentTarget.getAttribute("target"),pe=C!==void 0?C:ue;if(!R&&!A5(Y)&&!Y.defaultPrevented&&(!pe||pe==="_self")&&Y.button===0){Y.preventDefault(),mf.flushSync(()=>{i(!0)});const he=n.subscribe("onResolved",()=>{he(),i(!1)});n.navigate({...me,replace:S,resetScroll:T,hashScrollIntoView:_,startTransition:w,viewTransition:O,ignoreBlocker:q})}};if(Se)return{...Q,ref:c,href:Se,...A&&{children:A},...C&&{target:C},...R&&{disabled:R},...I&&{style:I},...k&&{className:k},...D&&{onClick:D},...N&&{onFocus:N},...z&&{onMouseEnter:z},...W&&{onMouseLeave:W},...$&&{onTouchStart:$}};const ve=Y=>{R||De&&ze()},Re=ve,ke=Y=>{if(!(R||!De))if(!Le)ze();else{const ue=Y.target;if(Dl.has(ue))return;const pe=setTimeout(()=>{Dl.delete(ue),ze()},Le);Dl.set(ue,pe)}},et=Y=>{if(R||!De||!Le)return;const ue=Y.target,pe=Dl.get(ue);pe&&(clearTimeout(pe),Dl.delete(ue))},Ue=Ee?Ra(d,{})??w5:vm,Qe=Ee?vm:Ra(f,{})??vm,U=[k,Ue.className,Qe.className].filter(Boolean).join(" "),Z=(I||Ue.style||Qe.style)&&{...I,...Ue.style,...Qe.style};return{...Q,...Ue,...Qe,href:be?.href,ref:c,onClick:Ll([D,ge]),onFocus:Ll([N,ve]),onMouseEnter:Ll([z,ke]),onMouseLeave:Ll([W,et]),onTouchStart:Ll([$,Re]),disabled:!!R,target:C,...Z&&{style:Z},...U&&{className:U},...R&&x5,...Ee&&R5,...o&&O5}}const vm={},w5={className:"active"},x5={role:"link","aria-disabled":!0},R5={"data-status":"active","aria-current":"page"},O5={"data-transitioning":"transitioning"},Dl=new WeakMap,T5={rootMargin:"100px"},Ll=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},mg=E.forwardRef((e,t)=>{const{_asChild:n,...o}=e,{type:i,ref:l,...c}=S5(o,t),d=typeof o.children=="function"?o.children({isActive:c["data-status"]==="active"}):o.children;return n===void 0&&delete c.disabled,E.createElement(n||"a",{...c,ref:l},d)});function A5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class C5 extends Hw{constructor(t){super(t),this.useMatch=n=>ho({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ho({...n,from:this.id,select:o=>n?.select?n.select(o.context):o.context}),this.useSearch=n=>pg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>fg({...n,from:this.id}),this.useLoaderData=n=>dg({...n,from:this.id}),this.useNavigate=()=>vc({from:this.fullPath}),this.Link=V.forwardRef((n,o)=>b.jsx(mg,{ref:o,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function yn(e){return new C5(e)}class I5 extends c5{constructor(t){super(t),this.useMatch=n=>ho({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ho({...n,from:this.id,select:o=>n?.select?n.select(o.context):o.context}),this.useSearch=n=>pg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>fg({...n,from:this.id}),this.useLoaderData=n=>dg({...n,from:this.id}),this.useNavigate=()=>vc({from:this.fullPath}),this.Link=V.forwardRef((n,o)=>b.jsx(mg,{ref:o,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function M5(e){return new I5(e)}function K_(e){return typeof e=="object"?new W_(e,{silent:!0}).createRoute(e):new W_(e,{silent:!0}).createRoute}class W_{constructor(t,n){this.path=t,this.createRoute=o=>{this.silent;const i=yn(o);return i.isRoot=!1,i},this.silent=n?.silent}}class Q_{constructor(t){this.useMatch=n=>ho({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ho({from:this.options.id,select:o=>n?.select?n.select(o.context):o.context}),this.useSearch=n=>pg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>fg({...n,from:this.options.id}),this.useLoaderData=n=>dg({...n,from:this.options.id}),this.useNavigate=()=>{const n=er();return vc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function X_(e){return typeof e=="object"?new Q_(e):t=>new Q_({id:e,...t})}function An(e,t){let n,o,i,l;const c=()=>(n||(n=e().then(f=>{n=void 0,o=f.default}).catch(f=>{if(i=f,g3(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),l=!0)}})),n),d=function(h){if(l)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!o)if(E.use)E.use(c());else throw c();return E.createElement(o,h)};return d.preload=c,d}function N5(){const e=er(),t=E.useRef({router:e,mounted:!1}),[n,o]=E.useState(!1),{hasPendingMatches:i,isLoading:l}=Jn({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(y=>y.status==="pending")}),structuralSharing:!0}),c=mm(l),d=l||n||i,f=mm(d),h=l||i,v=mm(h);return e.startTransition=p=>{o(!0),E.startTransition(()=>{p(),o(!1)})},E.useEffect(()=>{const p=e.history.subscribe(e.load),y=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return fi(e.latestLocation.publicHref)!==fi(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{p()}},[e,e.history]),Hl(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(y){console.error(y)}})()},[e]),Hl(()=>{c&&!l&&e.emit({type:"onLoad",...hi(e.state)})},[c,e,l]),Hl(()=>{v&&!h&&e.emit({type:"onBeforeRouteMount",...hi(e.state)})},[h,v,e]),Hl(()=>{if(f&&!d){const p=hi(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),p.hrefChanged&&F3(e)}},[d,f,e]),null}function D5(e){const t=Jn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(ug,{getResetKey:()=>t,onCatch:(n,o)=>{if(vr(n))e.onCatch?.(n,o);else throw n},errorComponent:({error:n})=>{if(vr(n))return e.fallback?.(n);throw n},children:e.children})}function L5(){return b.jsx("p",{children:"Not Found"})}function bs(e){return b.jsx(b.Fragment,{children:e.children})}function Kw(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(L5,{})}function P5({children:e}){const t=er();return t.isServer?b.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function k5(){const e=er();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||pv)(e.latestLocation),o=n!==pv(e.latestLocation)?n:void 0,i={storageKey:kd,shouldScrollRestoration:!0};return o&&(i.key=o),b.jsx(P5,{children:`(${Lw.toString()})(${JSON.stringify(i)})`})}const Ww=E.memo(function({matchId:t}){const n=er(),o=Jn({select:O=>{const A=O.matches.find(C=>C.id===t);return Fo(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),i=n.routesById[o.routeId],l=i.options.pendingComponent??n.options.defaultPendingComponent,c=l?b.jsx(l,{}):null,d=i.options.errorComponent??n.options.defaultErrorComponent,f=i.options.onCatch??n.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,v=o.ssr===!1||o.ssr==="data-only",p=(!i.isRoot||i.options.wrapInSuspense||v)&&(i.options.wrapInSuspense??l??(i.options.errorComponent?.preload||v))?E.Suspense:bs,y=d?ug:bs,_=h?D5:bs,S=Jn({select:O=>O.loadedAt}),w=Jn({select:O=>{const A=O.matches.findIndex(C=>C.id===t);return O.matches[A-1]?.routeId}}),T=i.isRoot?i.options.shellComponent??bs:bs;return b.jsxs(T,{children:[b.jsx(pf.Provider,{value:t,children:b.jsx(p,{fallback:c,children:b.jsx(y,{getResetKey:()=>S,errorComponent:d||hf,onCatch:(O,A)=>{if(vr(O))throw O;f?.(O,A)},children:b.jsx(_,{fallback:O=>{if(!h||O.routeId&&O.routeId!==o.routeId||!O.routeId&&!i.isRoot)throw O;return E.createElement(h,O)},children:v||o._displayPending?b.jsx(d5,{fallback:c,children:b.jsx(J_,{matchId:t})}):b.jsx(J_,{matchId:t})})})})}),w===ur&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(j5,{}),b.jsx(k5,{})]}):null]})});function j5(){const e=er(),t=E.useRef(void 0);return b.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...hi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const J_=E.memo(function({matchId:t}){const n=er(),{match:o,key:i,routeId:l}=Jn({select:f=>{const h=f.matches.find(S=>S.id===t),v=h.routeId,y=(n.routesById[v].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:v,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:y?JSON.stringify(y):void 0,routeId:v,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),c=n.routesById[l],d=E.useMemo(()=>{const f=c.options.component??n.options.defaultComponent;return f?b.jsx(f,{},i):b.jsx(Qw,{})},[i,c.options.component,n.options.defaultComponent]);if(o._displayPending)throw n.getMatch(o.id)?._nonReactive.displayPendingPromise;if(o._forcePending)throw n.getMatch(o.id)?._nonReactive.minPendingPromise;if(o.status==="pending"){const f=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const h=n.getMatch(o.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const v=Cs();h._nonReactive.minPendingPromise=v,setTimeout(()=>{v.resolve(),h._nonReactive.minPendingPromise=void 0},f)}}throw n.getMatch(o.id)?._nonReactive.loadPromise}if(o.status==="notFound")return Fo(vr(o.error)),Kw(n,c,o.error);if(o.status==="redirected")throw Fo(Pr(o.error)),n.getMatch(o.id)?._nonReactive.loadPromise;if(o.status==="error"){if(n.isServer){const f=(c.options.errorComponent??n.options.defaultErrorComponent)||hf;return b.jsx(f,{error:o.error,reset:void 0,info:{componentStack:""}})}throw o.error}return d}),Qw=E.memo(function(){const t=er(),n=E.useContext(pf),o=Jn({select:h=>h.matches.find(v=>v.id===n)?.routeId}),i=t.routesById[o],l=Jn({select:h=>{const p=h.matches.find(y=>y.id===n);return Fo(p),p.globalNotFound}}),c=Jn({select:h=>{const v=h.matches,p=v.findIndex(y=>y.id===n);return v[p+1]?.id}}),d=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(l)return Kw(t,i,void 0);if(!c)return null;const f=b.jsx(Ww,{matchId:c});return o===ur?b.jsx(E.Suspense,{fallback:d,children:f}):f});function z5(){const e=er(),n=e.routesById[ur].options.pendingComponent??e.options.defaultPendingComponent,o=n?b.jsx(n,{}):null,i=e.isServer||typeof document<"u"&&e.ssr?bs:E.Suspense,l=b.jsxs(i,{fallback:o,children:[!e.isServer&&b.jsx(N5,{}),b.jsx(U5,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:l}):l}function U5(){const e=er(),t=Jn({select:i=>i.matches[0]?.id}),n=Jn({select:i=>i.loadedAt}),o=t?b.jsx(Ww,{matchId:t}):null;return b.jsx(pf.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?o:b.jsx(ug,{getResetKey:()=>n,errorComponent:hf,onCatch:i=>{i.message||i.toString()},children:o})})}const B5=e=>new F5(e);class F5 extends r5{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=K_,globalThis.createLazyFileRoute=X_):typeof window<"u"&&(window.createFileRoute=K_,window.createLazyFileRoute=X_);function $5({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const o=Zw(),i=b.jsx(o.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:i}):i}function V5({router:e,...t}){return b.jsx($5,{router:e,...t,children:b.jsx(z5,{})})}var H5={},eE={};const _d=Object.create(null),Pl=e=>H5||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?_d:globalThis),Lr=new Proxy(_d,{get(e,t){return Pl()[t]??_d[t]},has(e,t){return t in Pl()||t in _d},set(e,t,n){const o=Pl(!0);return o[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=Pl(!0);return delete n[t],!0},ownKeys(){const e=Pl(!0);return Object.keys(e)}});function Jt(e,t){return typeof process<"u"&&eE?eE[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const kl=1,mn=4,so=8,fr=24,tE={eterm:mn,cons25:mn,console:mn,cygwin:mn,dtterm:mn,gnome:mn,hurd:mn,jfbterm:mn,konsole:mn,kterm:mn,mlterm:mn,mosh:fr,putty:mn,st:mn,"rxvt-unicode-24bit":fr,terminator:fr,"xterm-kitty":fr},G5=new Map(Object.entries({APPVEYOR:so,BUILDKITE:so,CIRCLECI:fr,DRONE:so,GITEA_ACTIONS:fr,GITHUB_ACTIONS:fr,GITLAB_CI:so,TRAVIS:so})),q5=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function Z5(){if(Jt("FORCE_COLOR")!==void 0)switch(Jt("FORCE_COLOR")){case"":case"1":case"true":return mn;case"2":return so;case"3":return fr;default:return kl}if(Jt("NODE_DISABLE_COLORS")!==void 0&&Jt("NODE_DISABLE_COLORS")!==""||Jt("NO_COLOR")!==void 0&&Jt("NO_COLOR")!==""||Jt("TERM")==="dumb")return kl;if(Jt("TMUX"))return fr;if("TF_BUILD"in Lr&&"AGENT_NAME"in Lr)return mn;if("CI"in Lr){for(const{0:e,1:t}of G5)if(e in Lr)return t;return Jt("CI_NAME")==="codeship"?so:kl}if("TEAMCITY_VERSION"in Lr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Jt("TEAMCITY_VERSION"))!==null?mn:kl;switch(Jt("TERM_PROGRAM")){case"iTerm.app":return!Jt("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Jt("TERM_PROGRAM_VERSION"))!==null?so:fr;case"HyperTerm":case"MacTerm":return fr;case"Apple_Terminal":return so}if(Jt("COLORTERM")==="truecolor"||Jt("COLORTERM")==="24bit")return fr;if(Jt("TERM")){if(/truecolor/.exec(Jt("TERM"))!==null)return fr;if(/^xterm-256/.exec(Jt("TERM"))!==null)return so;const e=Jt("TERM").toLowerCase();if(tE[e])return tE[e];if(q5.some(t=>t.exec(e)!==null))return mn}return Jt("COLORTERM")?mn:kl}const lo={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},vv=["debug","info","success","warn","error"];function Y5(e,t){return vv.indexOf(t)>=vv.indexOf(e)}const K5={info:lo.fg.blue,success:lo.fg.green,warn:lo.fg.yellow,error:lo.fg.red,debug:lo.fg.magenta},W5=(e,t,n)=>{const o=new Date().toISOString();return n?`${lo.dim}${o}${lo.reset} ${K5[e]}${e.toUpperCase()}${lo.reset} ${lo.bright}[Better Auth]:${lo.reset} ${t}`:`${o} ${e.toUpperCase()} [Better Auth]: ${t}`},Q5=e=>{const t="error",n=Z5()!==1,o=(i,l,c=[])=>{if(!Y5(t,i))return;const d=W5(i,l,n);{i==="error"?console.error(d,...c):i==="warn"?console.warn(d,...c):console.log(d,...c);return}};return{...Object.fromEntries(vv.map(i=>[i,(...[l,...c])=>o(i,l,c)])),get level(){return t}}};Q5();var Wl=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function X5(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Wl(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function J5(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Wl(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Wl?t:new Wl(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function gm(e,t="/api/auth"){if(J5(e),X5(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function e6(e,t,n,o,i){if(e)return gm(e,t);{const l=Lr.BETTER_AUTH_URL||Lr.NEXT_PUBLIC_BETTER_AUTH_URL||Lr.PUBLIC_BETTER_AUTH_URL||Lr.NUXT_PUBLIC_BETTER_AUTH_URL||Lr.NUXT_PUBLIC_AUTH_URL||(Lr.BASE_URL!=="/"?Lr.BASE_URL:void 0);if(l)return gm(l,t)}if(typeof window<"u"&&window.location)return gm(window.location.origin,t)}const t6={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},n6=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,nE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},r6=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function o6(e){return e instanceof Date&&!isNaN(e.getTime())}function a6(e){const t=r6.exec(e);if(!t)return null;const[,n,o,i,l,c,d,f,h,v,p]=t;let y=new Date(Date.UTC(parseInt(n,10),parseInt(o,10)-1,parseInt(i,10),parseInt(l,10),parseInt(c,10),parseInt(d,10),f?parseInt(f.padEnd(3,"0"),10):0));if(h){const _=(parseInt(v,10)*60+parseInt(p,10))*(h==="+"?-1:1);y.setUTCMinutes(y.getUTCMinutes()+_)}return o6(y)?y:null}function i6(e,t={}){const{strict:n=!1,warnings:o=!1,reviver:i,parseDates:l=!0}=t;if(typeof e!="string")return e;const c=e.trim();if(c.length>0&&c[0]==='"'&&c.endsWith('"')&&!c.slice(1,-1).includes('"'))return c.slice(1,-1);const d=c.toLowerCase();if(d.length<=9&&d in nE)return nE[d];if(!n6.test(c)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(t6).some(([f,h])=>{const v=h.test(c);return v&&o&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${f} pattern`),v})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(c,(h,v)=>{if(h==="__proto__"||h==="constructor"&&v&&typeof v=="object"&&"prototype"in v){o&&console.warn(`[better-json] Dropping "${h}" key to prevent prototype pollution`);return}if(l&&typeof v=="string"){const p=a6(v);if(p)return p}return i?i(h,v):v})}catch(f){if(n)throw f;return e}}function s6(e,t={strict:!0}){return i6(e,t)}let $r=[],ga=0;const Zu=4,Ss=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(o){return n.lc=t.push(o),()=>{for(let l=ga+Zu;l<$r.length;)$r[l]===o?$r.splice(l,Zu):l+=Zu;let i=t.indexOf(o);~i&&(t.splice(i,1),--n.lc||n.off())}},notify(o,i){let l=!$r.length;for(let c of t)$r.push(c,n.value,o,i);if(l){for(ga=0;ga<$r.length;ga+=Zu)$r[ga]($r[ga+1],$r[ga+2],$r[ga+3]);$r.length=0}},off(){},set(o){let i=n.value;i!==o&&(n.value=o,n.notify(i))},subscribe(o){let i=n.listen(o);return o(n.value),i},value:e};return n},l6=5,Yu=6,Ku=10;let c6=(e,t,n,o)=>(e.events=e.events||{},e.events[n+Ku]||(e.events[n+Ku]=o(i=>{e.events[n].reduceRight((l,c)=>(c(l),l),{shared:{},...i})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let i=e.events[n],l=i.indexOf(t);i.splice(l,1),i.length||(delete e.events[n],e.events[n+Ku](),delete e.events[n+Ku])}),u6=1e3,Xw=(e,t)=>c6(e,o=>{let i=t(o);i&&e.events[Yu].push(i)},l6,o=>{let i=e.listen;e.listen=(...c)=>(!e.lc&&!e.active&&(e.active=!0,o()),i(...c));let l=e.off;return e.events[Yu]=[],e.off=()=>{l(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let c of e.events[Yu])c();e.events[Yu]=[]}},u6)},()=>{e.listen=i,e.off=l}});function d6(e,t,n){let o=new Set(t).add(void 0);return e.listen((i,l,c)=>{o.has(c)&&n(i,l,c)})}var f6=Object.defineProperty,h6=Object.defineProperties,p6=Object.getOwnPropertyDescriptors,rE=Object.getOwnPropertySymbols,m6=Object.prototype.hasOwnProperty,v6=Object.prototype.propertyIsEnumerable,oE=(e,t,n)=>t in e?f6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gr=(e,t)=>{for(var n in t||(t={}))m6.call(t,n)&&oE(e,n,t[n]);if(rE)for(var n of rE(t))v6.call(t,n)&&oE(e,n,t[n]);return e},io=(e,t)=>h6(e,p6(t)),g6=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},y6=async(e,t)=>{var n,o,i,l,c,d;let f=t||{};const h={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:f,hooks:h};for(const v of t?.plugins||[]){if(v.init){const p=await((n=v.init)==null?void 0:n.call(v,e.toString(),t));f=p.options||f,e=p.url}h.onRequest.push((o=v.hooks)==null?void 0:o.onRequest),h.onResponse.push((i=v.hooks)==null?void 0:i.onResponse),h.onSuccess.push((l=v.hooks)==null?void 0:l.onSuccess),h.onError.push((c=v.hooks)==null?void 0:c.onError),h.onRetry.push((d=v.hooks)==null?void 0:d.onRetry)}return{url:e,options:f,hooks:h}},aE=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},b6=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function _6(e){if(typeof e=="number")return new aE({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new aE(e);case"exponential":return new b6(e);default:throw new Error("Invalid retry strategy")}}var E6=async e=>{const t={},n=async o=>typeof o=="function"?await o():o;if(e?.auth){if(e.auth.type==="Bearer"){const o=await n(e.auth.token);if(!o)return t;t.authorization=`Bearer ${o}`}else if(e.auth.type==="Basic"){const o=n(e.auth.username),i=n(e.auth.password);if(!o||!i)return t;t.authorization=`Basic ${btoa(`${o}:${i}`)}`}else if(e.auth.type==="Custom"){const o=n(e.auth.value);if(!o)return t;t.authorization=`${n(e.auth.prefix)} ${o}`}}return t},S6=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function w6(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const o=t.split(";").shift()||"";return S6.test(o)?"json":n.has(o)||o.startsWith("text/")?"text":"blob"}function x6(e){try{return JSON.parse(e),!0}catch{return!1}}function Jw(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function iE(e){try{return JSON.parse(e)}catch{return e}}function sE(e){return typeof e=="function"}function R6(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&sE(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&sE(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function O6(e){const t=new Headers(e?.headers),n=await E6(e);for(const[o,i]of Object.entries(n||{}))t.set(o,i);if(!t.has("content-type")){const o=T6(e?.body);o&&t.set("content-type",o)}return t}function T6(e){return Jw(e)?"application/json":null}function A6(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(Jw(e.body)&&!t.has("content-type")){for(const[n,o]of Object.entries(e?.body))o instanceof Date&&(e.body[n]=o.toISOString());return JSON.stringify(e.body)}return e.body}function C6(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const o=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return tx.includes(o)?o.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function I6(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var M6=class ex extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,ex.prototype)}};async function Ed(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new M6(n.issues);return n.value}var tx=["get","post","put","patch","delete"],N6=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var o,i,l,c;const d=((i=(o=e.plugins)==null?void 0:o.find(f=>{var h;return(h=f.schema)!=null&&h.config?t.startsWith(f.schema.config.baseURL||"")||t.startsWith(f.schema.config.prefix||""):!1}))==null?void 0:i.schema)||e.schema;if(d){let f=t;(l=d.config)!=null&&l.prefix&&f.startsWith(d.config.prefix)&&(f=f.replace(d.config.prefix,""),d.config.baseURL&&(t=t.replace(d.config.prefix,d.config.baseURL))),(c=d.config)!=null&&c.baseURL&&f.startsWith(d.config.baseURL)&&(f=f.replace(d.config.baseURL,""));const h=d.schema[f];if(h){let v=io(Gr({},n),{method:h.method,output:h.output});return n?.disableValidation||(v=io(Gr({},v),{body:h.input?await Ed(h.input,n?.body):n?.body,params:h.params?await Ed(h.params,n?.params):n?.params,query:h.query?await Ed(h.query,n?.query):n?.query})),{url:t,options:v}}}return{url:t,options:n}}}),D6=e=>{async function t(n,o){const i=io(Gr(Gr({},e),o),{plugins:[...e?.plugins||[],N6(e||{})]});if(e?.catchAllError)try{return await gv(n,i)}catch(l){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:l}}}return await gv(n,i)}return t};function L6(e,t){let{baseURL:n,params:o,query:i}=t||{query:{},params:{},baseURL:""},l=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];tx.includes(p)&&(e=e.replace(`@${p}/`,"/"))}l.endsWith("/")||(l+="/");let[c,d]=e.replace(l,"").split("?");const f=new URLSearchParams(d);for(const[p,y]of Object.entries(i||{}))y!=null&&f.set(p,String(y));if(o)if(Array.isArray(o)){const p=c.split("/").filter(y=>y.startsWith(":"));for(const[y,_]of p.entries()){const S=o[y];c=c.replace(_,S)}}else for(const[p,y]of Object.entries(o))c=c.replace(`:${p}`,String(y));c=c.split("/").map(encodeURIComponent).join("/"),c.startsWith("/")&&(c=c.slice(1));let h=f.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",l.startsWith("http")?new URL(`${c}${h}`,l):`${l}${c}${h}`}var gv=async(e,t)=>{var n,o,i,l,c,d,f,h;const{hooks:v,url:p,options:y}=await y6(e,t),_=R6(y),S=new AbortController,w=(n=y.signal)!=null?n:S.signal,T=L6(p,y),O=A6(y),A=await O6(y),C=C6(p,y);let R=io(Gr({},y),{url:T,headers:A,body:O,method:C,signal:w});for(const j of v.onRequest)if(j){const X=await j(R);X instanceof Object&&(R=X)}("pipeTo"in R&&typeof R.pipeTo=="function"||typeof((o=t?.body)==null?void 0:o.pipe)=="function")&&("duplex"in R||(R.duplex="half"));const{clearTimeout:I}=I6(y,S);let k=await _(R.url,R);I();const D={response:k,request:R};for(const j of v.onResponse)if(j){const X=await j(io(Gr({},D),{response:(i=t?.hookOptions)!=null&&i.cloneResponse?k.clone():k}));X instanceof Response?k=X:X instanceof Object&&(k=X.response)}if(k.ok){if(!(R.method!=="HEAD"))return{data:"",error:null};const X=w6(k),oe={data:"",response:k,request:R};if(X==="json"||X==="text"){const L=await k.text(),G=await((l=R.jsonParser)!=null?l:iE)(L);oe.data=G}else oe.data=await k[X]();R?.output&&R.output&&!R.disableValidation&&(oe.data=await Ed(R.output,oe.data));for(const L of v.onSuccess)L&&await L(io(Gr({},oe),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?k.clone():k}));return t?.throw?oe.data:{data:oe.data,error:null}}const N=(d=t?.jsonParser)!=null?d:iE,z=await k.text(),W=x6(z),$=W?await N(z):null,q={response:k,responseText:z,request:R,error:io(Gr({},$),{status:k.status,statusText:k.statusText})};for(const j of v.onError)j&&await j(io(Gr({},q),{response:(f=t?.hookOptions)!=null&&f.cloneResponse?k.clone():k}));if(t?.retry){const j=_6(t.retry),X=(h=t.retryAttempt)!=null?h:0;if(await j.shouldAttemptRetry(X,k)){for(const L of v.onRetry)L&&await L(D);const oe=j.getDelay(X);return await new Promise(L=>setTimeout(L,oe)),await gv(e,io(Gr({},t),{retryAttempt:X+1}))}}if(t?.throw)throw new g6(k.status,k.statusText,W?$:z);return{data:null,error:io(Gr({},$),{status:k.status,statusText:k.statusText})}};const ym=Symbol.for("better-auth:broadcast-channel"),P6=()=>Math.floor(Date.now()/1e3);var k6=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:P6()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(o=>o(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function bm(e="better-auth.message"){return globalThis[ym]||(globalThis[ym]=new k6(e)),globalThis[ym]}const _m=Symbol.for("better-auth:focus-manager");var j6=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function lE(){return globalThis[_m]||(globalThis[_m]=new j6),globalThis[_m]}const Em=Symbol.for("better-auth:online-manager");var z6=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function Sm(){return globalThis[Em]||(globalThis[Em]=new z6),globalThis[Em]}const U6=()=>typeof window>"u",Gl=(e,t,n,o)=>{const i=Ss({data:null,error:null,isPending:!0,isRefetching:!1,refetch:d=>l(d)}),l=async d=>new Promise(f=>{const h=typeof o=="function"?o({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):o;n(t,{...h,query:{...h?.query,...d?.query},async onSuccess(v){i.set({data:v.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await h?.onSuccess?.(v)},async onError(v){const{request:p}=v,y=typeof p.retry=="number"?p.retry:p.retry?.attempts,_=p.retryAttempt||0;y&&_<y||(i.set({error:v.error,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await h?.onError?.(v))},async onRequest(v){const p=i.get();i.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await h?.onRequest?.(v)}}).catch(v=>{i.set({error:v,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{f(void 0)})});e=Array.isArray(e)?e:[e];let c=!1;for(const d of e)d.subscribe(async()=>{U6()||(c?await l():Xw(i,()=>{const f=setTimeout(async()=>{c||(await l(),c=!0)},0);return()=>{i.off(),d.off(),clearTimeout(f)}}))});return i},us=()=>Math.floor(Date.now()/1e3),B6=5;function F6(e){const{sessionAtom:t,sessionSignal:n,$fetch:o,options:i={}}=e,l=i.sessionOptions?.refetchInterval??0,c=i.sessionOptions?.refetchOnWindowFocus??!0,d=i.sessionOptions?.refetchWhenOffline??!1,f={lastSync:0,lastSessionRequest:0,cachedSession:void 0},h=()=>d||Sm().isOnline,v=A=>{if(!h())return;if(A?.event==="storage"){f.lastSync=us(),n.set(!n.get());return}const C=t.get();if(A?.event==="poll"){f.lastSessionRequest=us(),o("/get-session").then(R=>{t.set({...C,data:R.data,error:R.error||null}),f.lastSync=us(),n.set(!n.get())}).catch(()=>{});return}A?.event==="visibilitychange"&&us()-f.lastSessionRequest<B6&&C?.data!==null&&C?.data!==void 0||(C?.data===null||C?.data===void 0||A?.event==="visibilitychange")&&(A?.event==="visibilitychange"&&(f.lastSessionRequest=us()),f.lastSync=us(),n.set(!n.get()))},p=A=>{bm().post({event:"session",data:{trigger:A},clientId:Math.random().toString(36).substring(7)})},y=()=>{l&&l>0&&(f.pollInterval=setInterval(()=>{t.get()?.data&&v({event:"poll"})},l*1e3))},_=()=>{f.unsubscribeBroadcast=bm().subscribe(()=>{v({event:"storage"})})},S=()=>{c&&(f.unsubscribeFocus=lE().subscribe(()=>{v({event:"visibilitychange"})}))},w=()=>{f.unsubscribeOnline=Sm().subscribe(A=>{A&&v({event:"visibilitychange"})})};return{init:()=>{y(),_(),S(),w(),bm().setup(),lE().setup(),Sm().setup()},cleanup:()=>{f.pollInterval&&(clearInterval(f.pollInterval),f.pollInterval=void 0),f.unsubscribeBroadcast&&(f.unsubscribeBroadcast(),f.unsubscribeBroadcast=void 0),f.unsubscribeFocus&&(f.unsubscribeFocus(),f.unsubscribeFocus=void 0),f.unsubscribeOnline&&(f.unsubscribeOnline(),f.unsubscribeOnline=void 0),f.lastSync=0,f.lastSessionRequest=0,f.cachedSession=void 0},triggerRefetch:v,broadcastSessionUpdate:p}}const $6={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function V6(e,t){const n=Ss(!1),o=Gl(n,"/get-session",e,{method:"GET"});return Xw(o,()=>{const i=F6({sessionAtom:o,sessionSignal:n,$fetch:e,options:t});return i.init(),()=>{i.cleanup()}}),{session:o,$sessionSignal:n}}const H6=(e,t)=>{const n="credentials"in Request.prototype,o=e6(e?.baseURL,e?.basePath)??"/api/auth",i=e?.plugins?.flatMap(R=>R.fetchPlugins).filter(R=>R!==void 0)||[],l={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:c,onError:d,onRequest:f,onResponse:h,...v}=e?.fetchOptions||{},p=D6({baseURL:o,...n?{credentials:"include"}:{},method:"GET",jsonParser(R){return R?s6(R,{strict:!1}):null},customFetchImpl:fetch,...v,plugins:[l,...v.plugins||[],...e?.disableDefaultFetchPlugins?[]:[$6],...i]}),{$sessionSignal:y,session:_}=V6(p,e),S=e?.plugins||[];let w={},T={$sessionSignal:y,session:_},O={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const A=[{signal:"$sessionSignal",matcher(R){return R==="/sign-out"||R==="/update-user"||R==="/sign-up/email"||R==="/sign-in/email"||R==="/delete-user"||R==="/verify-email"||R==="/revoke-sessions"||R==="/revoke-session"||R==="/change-email"}}];for(const R of S)R.getAtoms&&Object.assign(T,R.getAtoms?.(p)),R.pathMethods&&Object.assign(O,R.pathMethods),R.atomListeners&&A.push(...R.atomListeners);const C={notify:R=>{T[R].set(!T[R].get())},listen:(R,I)=>{T[R].subscribe(I)},atoms:T};for(const R of S)R.getActions&&Object.assign(w,R.getActions?.(p,C,e));return{get baseURL(){return o},pluginsActions:w,pluginsAtoms:T,pluginPathMethods:O,atomListeners:A,$fetch:p,$store:C}};function G6(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function q6(e,t,n){const o=t[e],{fetchOptions:i,query:l,...c}=n||{};return o||(i?.method?i.method:c&&Object.keys(c).length>0?"POST":"GET")}function Z6(e,t,n,o,i){function l(c=[]){return new Proxy(function(){},{get(d,f){if(typeof f!="string"||f==="then"||f==="catch"||f==="finally")return;const h=[...c,f];let v=e;for(const p of h)if(v&&typeof v=="object"&&p in v)v=v[p];else{v=void 0;break}return typeof v=="function"||G6(v)?v:l(h)},apply:async(d,f,h)=>{const v="/"+c.map(A=>A.replace(/[A-Z]/g,C=>`-${C.toLowerCase()}`)).join("/"),p=h[0]||{},y=h[1]||{},{query:_,fetchOptions:S,...w}=p,T={...y,...S},O=q6(v,n,p);return await t(v,{...T,body:O==="GET"?void 0:{...w,...T?.body||{}},query:_||T?.query,method:O,async onSuccess(A){if(await T?.onSuccess?.(A),!i||T.disableSignal)return;const C=i.filter(R=>R.matcher(v));if(C.length)for(const R of C){const I=o[R.signal];if(!I)return;const k=I.get();setTimeout(()=>{I.set(!k)},10)}}})}})}return l()}function Y6(e,t={}){let n=E.useRef(e.get());const{keys:o,deps:i=[e,o]}=t;let l=E.useCallback(d=>{const f=h=>{n.current!==h&&(n.current=h,d())};return f(e.value),o?.length?d6(e,o,f):e.listen(f)},i),c=()=>n.current;return E.useSyncExternalStore(l,c,c)}function K6(e){return`use${W6(e)}`}function W6(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Q6(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:o,$fetch:i,$store:l,atomListeners:c}=H6(e);let d={};for(const[f,h]of Object.entries(o))d[K6(f)]=()=>Y6(h);return Z6({...n,...d,$fetch:i,$store:l},i,t,o,c)}function X6(e){return{authorize(t,n="AND"){let o=!1;for(const[i,l]of Object.entries(t)){const c=e[i];if(!c)return{success:!1,error:`You are not allowed to access resource: ${i}`};if(Array.isArray(l))o=l.every(d=>c.includes(d));else if(typeof l=="object"){const d=l;d.connector==="OR"?o=d.actions.some(f=>c.includes(f)):o=d.actions.every(f=>c.includes(f))}else throw new Wl("Invalid access control request");if(o&&n==="OR")return{success:o};if(!o&&n==="AND")return{success:!1,error:`unauthorized to access resource "${i}"`}}return o?{success:o}:{success:!1,error:"Not authorized"}},statements:e}}function nx(e){return{newRole(t){return X6(t)},statements:e}}const J6={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},rx=nx(J6),ox=rx.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),ax=rx.newRole({user:[],session:[]}),eI={admin:ox,user:ax},tI=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||eI;for(const o of t)if(n[o]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},nI={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},vg=nx(nI),ix=vg.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),sx=vg.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),lx=vg.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),rI={admin:ix,owner:sx,member:lx},oI=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),o=e.options.creatorRole||"owner",i=n.includes(o),l=e.allowCreatorAllPermissions||!1;if(i&&l)return!0;for(const c of n)if(t[c]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},aI=e=>{const t={admin:ox,user:ax,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>tI({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},iI=()=>({id:"magic-link",$InferServerPlugin:{}}),sI=e=>oI(e,e.options.roles||rI),lI=e=>{const t=Ss(!1),n=Ss(!1),o=Ss(!1),i=Ss(!1),l={admin:ix,member:lx,owner:sx,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(c,d,f)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:h=>sI({role:h.role,options:{ac:e?.ac,roles:l},permissions:h.permissions??h.permission})}}),getAtoms:c=>{const d=Gl(t,"/organization/list",c,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:o,$activeMemberRoleSignal:i,activeOrganization:Gl([n],"/organization/get-full-organization",c,()=>({method:"GET"})),listOrganizations:d,activeMember:Gl([o],"/organization/get-active-member",c,{method:"GET"}),activeMemberRole:Gl([i],"/organization/get-active-member-role",c,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(c){return c==="/organization/create"||c==="/organization/delete"||c==="/organization/update"},signal:"$listOrg"},{matcher(c){return c.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(c){return c.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},cI=e=>({id:"sso-client",$InferServerPlugin:{}}),uI=Q6({plugins:[lI({}),aI(),cI(),iI()]});function cx(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=cx(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function ux(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=cx(e))&&(o&&(o+=" "),o+=t);return o}const dI=(e,t)=>{const n=new Array(e.length+t.length);for(let o=0;o<e.length;o++)n[o]=e[o];for(let o=0;o<t.length;o++)n[e.length+o]=t[o];return n},fI=(e,t)=>({classGroupId:e,validator:t}),dx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ud="-",cE=[],hI="arbitrary..",pI=e=>{const t=vI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return mI(c);const d=c.split(Ud),f=d[0]===""&&d.length>1?1:0;return fx(d,f,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const f=o[c],h=n[c];return f?h?dI(h,f):f:h||cE}return n[c]||cE}}},fx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],l=n.nextPart.get(i);if(l){const h=fx(e,t+1,l);if(h)return h}const c=n.validators;if(c===null)return;const d=t===0?e.join(Ud):e.slice(t).join(Ud),f=c.length;for(let h=0;h<f;h++){const v=c[h];if(v.validator(d))return v.classGroupId}},mI=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?hI+o:void 0})(),vI=e=>{const{theme:t,classGroups:n}=e;return gI(n,t)},gI=(e,t)=>{const n=dx();for(const o in e){const i=e[o];gg(i,n,o,t)}return n},gg=(e,t,n,o)=>{const i=e.length;for(let l=0;l<i;l++){const c=e[l];yI(c,t,n,o)}},yI=(e,t,n,o)=>{if(typeof e=="string"){bI(e,t,n);return}if(typeof e=="function"){_I(e,t,n,o);return}EI(e,t,n,o)},bI=(e,t,n)=>{const o=e===""?t:hx(t,e);o.classGroupId=n},_I=(e,t,n,o)=>{if(SI(e)){gg(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(fI(n,e))},EI=(e,t,n,o)=>{const i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){const[d,f]=i[c];gg(f,hx(t,d),n,o)}},hx=(e,t)=>{let n=e;const o=t.split(Ud),i=o.length;for(let l=0;l<i;l++){const c=o[l];let d=n.nextPart.get(c);d||(d=dx(),n.nextPart.set(c,d)),n=d}return n},SI=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,wI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const i=(l,c)=>{n[l]=c,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=o[l])!==void 0)return i(l,c),c},set(l,c){l in n?n[l]=c:i(l,c)}}},yv="!",uE=":",xI=[],dE=(e,t,n,o,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:i}),RI=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=i=>{const l=[];let c=0,d=0,f=0,h;const v=i.length;for(let w=0;w<v;w++){const T=i[w];if(c===0&&d===0){if(T===uE){l.push(i.slice(f,w)),f=w+1;continue}if(T==="/"){h=w;continue}}T==="["?c++:T==="]"?c--:T==="("?d++:T===")"&&d--}const p=l.length===0?i:i.slice(f);let y=p,_=!1;p.endsWith(yv)?(y=p.slice(0,-1),_=!0):p.startsWith(yv)&&(y=p.slice(1),_=!0);const S=h&&h>f?h-f:void 0;return dE(l,_,y,S)};if(t){const i=t+uE,l=o;o=c=>c.startsWith(i)?l(c.slice(i.length)):dE(xI,!1,c,void 0,!0)}if(n){const i=o;o=l=>n({className:l,parseClassName:i})}return o},OI=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,o)=>{t.set(n,1e6+o)}),n=>{const o=[];let i=[];for(let l=0;l<n.length;l++){const c=n[l],d=c[0]==="[",f=t.has(c);d||f?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(c)):i.push(c)}return i.length>0&&(i.sort(),o.push(...i)),o}},TI=e=>({cache:wI(e.cacheSize),parseClassName:RI(e),sortModifiers:OI(e),...pI(e)}),AI=/\s+/,CI=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:l}=t,c=[],d=e.trim().split(AI);let f="";for(let h=d.length-1;h>=0;h-=1){const v=d[h],{isExternal:p,modifiers:y,hasImportantModifier:_,baseClassName:S,maybePostfixModifierPosition:w}=n(v);if(p){f=v+(f.length>0?" "+f:f);continue}let T=!!w,O=o(T?S.substring(0,w):S);if(!O){if(!T){f=v+(f.length>0?" "+f:f);continue}if(O=o(S),!O){f=v+(f.length>0?" "+f:f);continue}T=!1}const A=y.length===0?"":y.length===1?y[0]:l(y).join(":"),C=_?A+yv:A,R=C+O;if(c.indexOf(R)>-1)continue;c.push(R);const I=i(O,T);for(let k=0;k<I.length;++k){const D=I[k];c.push(C+D)}f=v+(f.length>0?" "+f:f)}return f},II=(...e)=>{let t=0,n,o,i="";for(;t<e.length;)(n=e[t++])&&(o=px(n))&&(i&&(i+=" "),i+=o);return i},px=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=px(e[o]))&&(n&&(n+=" "),n+=t);return n},MI=(e,...t)=>{let n,o,i,l;const c=f=>{const h=t.reduce((v,p)=>p(v),e());return n=TI(h),o=n.cache.get,i=n.cache.set,l=d,d(f)},d=f=>{const h=o(f);if(h)return h;const v=CI(f,n);return i(f,v),v};return l=c,(...f)=>l(II(...f))},NI=[],ln=e=>{const t=n=>n[e]||NI;return t.isThemeGetter=!0,t},mx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,DI=/^\d+\/\d+$/,LI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ds=e=>DI.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),ya=e=>!!e&&Number.isInteger(Number(e)),wm=e=>e.endsWith("%")&&We(e.slice(0,-1)),Uo=e=>LI.test(e),UI=()=>!0,BI=e=>PI.test(e)&&!kI.test(e),gx=()=>!1,FI=e=>jI.test(e),$I=e=>zI.test(e),VI=e=>!Ae(e)&&!Ce(e),HI=e=>Ps(e,_x,gx),Ae=e=>mx.test(e),oi=e=>Ps(e,Ex,BI),xm=e=>Ps(e,KI,We),fE=e=>Ps(e,yx,gx),GI=e=>Ps(e,bx,$I),Wu=e=>Ps(e,Sx,FI),Ce=e=>vx.test(e),jl=e=>ks(e,Ex),qI=e=>ks(e,WI),hE=e=>ks(e,yx),ZI=e=>ks(e,_x),YI=e=>ks(e,bx),Qu=e=>ks(e,Sx,!0),Ps=(e,t,n)=>{const o=mx.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},ks=(e,t,n=!1)=>{const o=vx.exec(e);return o?o[1]?t(o[1]):n:!1},yx=e=>e==="position"||e==="percentage",bx=e=>e==="image"||e==="url",_x=e=>e==="length"||e==="size"||e==="bg-size",Ex=e=>e==="length",KI=e=>e==="number",WI=e=>e==="family-name",Sx=e=>e==="shadow",QI=()=>{const e=ln("color"),t=ln("font"),n=ln("text"),o=ln("font-weight"),i=ln("tracking"),l=ln("leading"),c=ln("breakpoint"),d=ln("container"),f=ln("spacing"),h=ln("radius"),v=ln("shadow"),p=ln("inset-shadow"),y=ln("text-shadow"),_=ln("drop-shadow"),S=ln("blur"),w=ln("perspective"),T=ln("aspect"),O=ln("ease"),A=ln("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...R(),Ce,Ae],k=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],N=()=>[Ce,Ae,f],z=()=>[ds,"full","auto",...N()],W=()=>[ya,"none","subgrid",Ce,Ae],$=()=>["auto",{span:["full",ya,Ce,Ae]},ya,Ce,Ae],q=()=>[ya,"auto",Ce,Ae],j=()=>["auto","min","max","fr",Ce,Ae],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...N()],F=()=>[ds,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],G=()=>[e,Ce,Ae],re=()=>[...R(),hE,fE,{position:[Ce,Ae]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",ZI,HI,{size:[Ce,Ae]}],Q=()=>[wm,jl,oi],te=()=>["","none","full",h,Ce,Ae],se=()=>["",We,jl,oi],me=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[We,wm,hE,fE],Se=()=>["","none",S,Ce,Ae],De=()=>["none",We,Ce,Ae],Le=()=>["none",We,Ce,Ae],Ee=()=>[We,Ce,Ae],ze=()=>[ds,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Uo],breakpoint:[Uo],color:[UI],container:[Uo],"drop-shadow":[Uo],ease:["in","out","in-out"],font:[VI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Uo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Uo],shadow:[Uo],spacing:["px",We],text:[Uo],"text-shadow":[Uo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ds,Ae,Ce,T]}],container:["container"],columns:[{columns:[We,Ae,Ce,d]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[ya,"auto",Ce,Ae]}],basis:[{basis:[ds,"full","auto",d,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,ds,"auto","initial","none",Ae]}],grow:[{grow:["",We,Ce,Ae]}],shrink:[{shrink:["",We,Ce,Ae]}],order:[{order:[ya,"first","last","none",Ce,Ae]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[d,"screen",...F()]}],"min-w":[{"min-w":[d,"screen","none",...F()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,jl,oi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ce,xm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wm,Ae]}],"font-family":[{font:[qI,Ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ce,Ae]}],"line-clamp":[{"line-clamp":[We,"none",Ce,xm]}],leading:[{leading:[l,...N()]}],"list-image":[{"list-image":["none",Ce,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Ce,oi]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[We,"auto",Ce,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce,Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ce,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ye()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ya,Ce,Ae],radial:["",Ce,Ae],conic:[ya,Ce,Ae]},YI,GI]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Ce,Ae]}],"outline-w":[{outline:["",We,jl,oi]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",v,Qu,Wu]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",p,Qu,Wu]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[We,oi]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",y,Qu,Wu]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[We,Ce,Ae]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Ce,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ye()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Ae]}],filter:[{filter:["","none",Ce,Ae]}],blur:[{blur:Se()}],brightness:[{brightness:[We,Ce,Ae]}],contrast:[{contrast:[We,Ce,Ae]}],"drop-shadow":[{"drop-shadow":["","none",_,Qu,Wu]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",We,Ce,Ae]}],"hue-rotate":[{"hue-rotate":[We,Ce,Ae]}],invert:[{invert:["",We,Ce,Ae]}],saturate:[{saturate:[We,Ce,Ae]}],sepia:[{sepia:["",We,Ce,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ae]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[We,Ce,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[We,Ce,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Ce,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Ce,Ae]}],"backdrop-invert":[{"backdrop-invert":["",We,Ce,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[We,Ce,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[We,Ce,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Ce,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ce,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Ce,Ae]}],ease:[{ease:["linear","initial",O,Ce,Ae]}],delay:[{delay:[We,Ce,Ae]}],animate:[{animate:["none",A,Ce,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Ce,Ae]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Le()}],"scale-x":[{"scale-x":Le()}],"scale-y":[{"scale-y":Le()}],"scale-z":[{"scale-z":Le()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[Ce,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ce,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ce,Ae]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[We,jl,oi,xm]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},XI=MI(QI),dH=Object.freeze({status:"aborted"});function ie(e,t,n){function o(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);const h=c.prototype,v=Object.keys(h);for(let p=0;p<v.length;p++){const y=v[p];y in d||(d[y]=h[y].bind(d))}}const i=n?.Parent??Object;class l extends i{}Object.defineProperty(l,"name",{value:e});function c(d){var f;const h=n?.Parent?new l:this;o(h,d),(f=h._zod).deferred??(f.deferred=[]);for(const v of h._zod.deferred)v();return h}return Object.defineProperty(c,"init",{value:o}),Object.defineProperty(c,Symbol.hasInstance,{value:d=>n?.Parent&&d instanceof n.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class xs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class wx extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const xx={};function Na(e){return xx}function Rx(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,i])=>t.indexOf(+o)===-1).map(([o,i])=>i)}function bv(e,t){return typeof t=="bigint"?t.toString():t}function vf(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function gc(e){return e==null}function yg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function JI(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let i=(o.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(o)){const f=o.match(/\d?e-(\d?)/);f?.[1]&&(i=Number.parseInt(f[1]))}const l=n>i?n:i,c=Number.parseInt(e.toFixed(l).replace(".","")),d=Number.parseInt(t.toFixed(l).replace(".",""));return c%d/10**l}const pE=Symbol("evaluating");function at(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==pE)return o===void 0&&(o=pE,o=n()),o},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Ei(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ja(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function mE(e){return JSON.stringify(e)}function eM(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ox="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function oc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const tM=vf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ms(e){if(oc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(oc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Tx(e){return Ms(e)?{...e}:Array.isArray(e)?[...e]:e}const nM=new Set(["string","number","symbol"]);function Ns(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function za(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function Oe(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function rM(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const oM={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function aM(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=ja(e._zod.def,{get shape(){const c={};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&(c[d]=n.shape[d])}return Ei(this,"shape",c),c},checks:[]});return za(e,l)}function iM(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=ja(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&delete c[d]}return Ei(this,"shape",c),c},checks:[]});return za(e,l)}function sM(e,t){if(!Ms(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const l=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(l,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=ja(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return Ei(this,"shape",l),l}});return za(e,i)}function lM(e,t){if(!Ms(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ja(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Ei(this,"shape",o),o}});return za(e,n)}function cM(e,t){const n=ja(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Ei(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return za(e,n)}function uM(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=ja(t._zod.def,{get shape(){const d=t._zod.def.shape,f={...d};if(n)for(const h in n){if(!(h in d))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(f[h]=e?new e({type:"optional",innerType:d[h]}):d[h])}else for(const h in d)f[h]=e?new e({type:"optional",innerType:d[h]}):d[h];return Ei(this,"shape",f),f},checks:[]});return za(t,c)}function dM(e,t,n){const o=ja(t._zod.def,{get shape(){const i=t._zod.def.shape,l={...i};if(n)for(const c in n){if(!(c in l))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=new e({type:"nonoptional",innerType:i[c]}))}else for(const c in i)l[c]=new e({type:"nonoptional",innerType:i[c]});return Ei(this,"shape",l),l}});return za(t,o)}function ws(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ci(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Xu(e){return typeof e=="string"?e:e?.message}function Da(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const i=Xu(e.inst?._zod.def?.error?.(e))??Xu(t?.error?.(e))??Xu(n.customError?.(e))??Xu(n.localeError?.(e))??"Invalid input";o.message=i}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Ax(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function bg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ac(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const Cx=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,bv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_g=ie("$ZodError",Cx),gf=ie("$ZodError",Cx,{Parent:Error});function fM(e,t=n=>n.message){const n={},o=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):o.push(t(i));return{formErrors:o,fieldErrors:n}}function hM(e,t=n=>n.message){const n={_errors:[]},o=i=>{for(const l of i.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>o({issues:c}));else if(l.code==="invalid_key")o({issues:l.issues});else if(l.code==="invalid_element")o({issues:l.issues});else if(l.path.length===0)n._errors.push(t(l));else{let c=n,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(t(l))):c[f]=c[f]||{_errors:[]},c=c[f],d++}}};return o(e),n}const yf=e=>(t,n,o,i)=>{const l=o?Object.assign(o,{async:!1}):{async:!1},c=t._zod.run({value:n,issues:[]},l);if(c instanceof Promise)throw new xs;if(c.issues.length){const d=new(i?.Err??e)(c.issues.map(f=>Da(f,l,Na())));throw Ox(d,i?.callee),d}return c.value},pM=yf(gf),bf=e=>async(t,n,o,i)=>{const l=o?Object.assign(o,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},l);if(c instanceof Promise&&(c=await c),c.issues.length){const d=new(i?.Err??e)(c.issues.map(f=>Da(f,l,Na())));throw Ox(d,i?.callee),d}return c.value},mM=bf(gf),_f=e=>(t,n,o)=>{const i=o?{...o,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new xs;return l.issues.length?{success:!1,error:new(e??_g)(l.issues.map(c=>Da(c,i,Na())))}:{success:!0,data:l.value}},vM=_f(gf),Ef=e=>async(t,n,o)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},i);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(c=>Da(c,i,Na())))}:{success:!0,data:l.value}},gM=Ef(gf),yM=e=>(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return yf(e)(t,n,i)},bM=e=>(t,n,o)=>yf(e)(t,n,o),_M=e=>async(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return bf(e)(t,n,i)},EM=e=>async(t,n,o)=>bf(e)(t,n,o),SM=e=>(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return _f(e)(t,n,i)},wM=e=>(t,n,o)=>_f(e)(t,n,o),xM=e=>async(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ef(e)(t,n,i)},RM=e=>async(t,n,o)=>Ef(e)(t,n,o),OM=/^[cC][^\s-]{8,}$/,TM=/^[0-9a-z]+$/,AM=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,CM=/^[0-9a-vA-V]{20}$/,IM=/^[A-Za-z0-9]{27}$/,MM=/^[a-zA-Z0-9_-]{21}$/,NM=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,DM=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,vE=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,LM=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,PM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function kM(){return new RegExp(PM,"u")}const jM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,UM=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,BM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,FM=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ix=/^[A-Za-z0-9_-]*$/,$M=/^\+[1-9]\d{6,14}$/,Mx="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",VM=new RegExp(`^${Mx}$`);function Nx(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function HM(e){return new RegExp(`^${Nx(e)}$`)}function GM(e){const t=Nx({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Mx}T(?:${o})$`)}const qM=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ZM=/^-?\d+$/,Dx=/^-?\d+(?:\.\d+)?$/,YM=/^(?:true|false)$/i,KM=/^null$/i,WM=/^[^A-Z]*$/,QM=/^[^a-z]*$/,Cn=ie("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Lx={number:"number",bigint:"bigint",object:"date"},Px=ie("$ZodCheckLessThan",(e,t)=>{Cn.init(e,t);const n=Lx[typeof t.value];e._zod.onattach.push(o=>{const i=o._zod.bag,l=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),kx=ie("$ZodCheckGreaterThan",(e,t)=>{Cn.init(e,t);const n=Lx[typeof t.value];e._zod.onattach.push(o=>{const i=o._zod.bag,l=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),XM=ie("$ZodCheckMultipleOf",(e,t)=>{Cn.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):JI(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),JM=ie("$ZodCheckNumberFormat",(e,t)=>{Cn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[i,l]=oM[t.format];e._zod.onattach.push(c=>{const d=c._zod.bag;d.format=t.format,d.minimum=i,d.maximum=l,n&&(d.pattern=ZM)}),e._zod.check=c=>{const d=c.value;if(n){if(!Number.isInteger(d)){c.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?c.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):c.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}d<i&&c.issues.push({origin:"number",input:d,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),d>l&&c.issues.push({origin:"number",input:d,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),eN=ie("$ZodCheckMaxSize",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!gc(i)&&i.size!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const i=o.value;i.size<=t.maximum||o.issues.push({origin:Ax(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),tN=ie("$ZodCheckMinSize",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!gc(i)&&i.size!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const i=o.value;i.size>=t.minimum||o.issues.push({origin:Ax(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),nN=ie("$ZodCheckMaxLength",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!gc(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const i=o.value;if(i.length<=t.maximum)return;const c=bg(i);o.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),rN=ie("$ZodCheckMinLength",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!gc(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const i=o.value;if(i.length>=t.minimum)return;const c=bg(i);o.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),oN=ie("$ZodCheckLengthEquals",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=o=>{const i=o.value;return!gc(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=o=>{const i=o.value,l=i.length;if(l===t.length)return;const c=bg(i),d=l>t.length;o.issues.push({origin:c,...d?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Sf=ie("$ZodCheckStringFormat",(e,t)=>{var n,o;Cn.init(e,t),e._zod.onattach.push(i=>{const l=i._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),aN=ie("$ZodCheckRegex",(e,t)=>{Sf.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),iN=ie("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=WM),Sf.init(e,t)}),sN=ie("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=QM),Sf.init(e,t)}),lN=ie("$ZodCheckIncludes",(e,t)=>{Cn.init(e,t);const n=Ns(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(i=>{const l=i._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(o)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),cN=ie("$ZodCheckStartsWith",(e,t)=>{Cn.init(e,t);const n=new RegExp(`^${Ns(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),uN=ie("$ZodCheckEndsWith",(e,t)=>{Cn.init(e,t);const n=new RegExp(`.*${Ns(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),dN=ie("$ZodCheckMimeType",(e,t)=>{Cn.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),fN=ie("$ZodCheckOverwrite",(e,t)=>{Cn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class hN{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(`
|
|
11
11
|
`).filter(c=>c),i=Math.min(...o.map(c=>c.length-c.trimStart().length)),l=o.map(c=>c.slice(i)).map(c=>" ".repeat(this.indent*2)+c);for(const c of l)this.content.push(c)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(l=>` ${l}`)];return new t(...n,i.join(`
|
|
12
|
-
`))}}const pN={major:4,minor:3,patch:5},pt=ie("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pN;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const i of o)for(const l of i._zod.onattach)l(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(c,d,f)=>{let h=ws(c),v;for(const p of d){if(p._zod.def.when){if(!p._zod.def.when(c))continue}else if(h)continue;const y=c.issues.length,_=p._zod.check(c);if(_ instanceof Promise&&f?.async===!1)throw new xs;if(v||_ instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await _,c.issues.length!==y&&(h||(h=ws(c,y)))});else{if(c.issues.length===y)continue;h||(h=ws(c,y))}}return v?v.then(()=>c):c},l=(c,d,f)=>{if(ws(c))return c.aborted=!0,c;const h=i(d,o,f);if(h instanceof Promise){if(f.async===!1)throw new xs;return h.then(v=>e._zod.parse(v,f))}return e._zod.parse(h,f)};e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){const h=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(v=>l(v,c,d)):l(h,c,d)}const f=e._zod.parse(c,d);if(f instanceof Promise){if(d.async===!1)throw new xs;return f.then(h=>i(h,o,d))}return i(f,o,d)}}at(e,"~standard",()=>({validate:i=>{try{const l=vM(e,i);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return gM(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),Eg=ie("$ZodString",(e,t)=>{pt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??qM(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Pt=ie("$ZodStringFormat",(e,t)=>{
|
|
12
|
+
`))}}const pN={major:4,minor:3,patch:5},pt=ie("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pN;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const i of o)for(const l of i._zod.onattach)l(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(c,d,f)=>{let h=ws(c),v;for(const p of d){if(p._zod.def.when){if(!p._zod.def.when(c))continue}else if(h)continue;const y=c.issues.length,_=p._zod.check(c);if(_ instanceof Promise&&f?.async===!1)throw new xs;if(v||_ instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await _,c.issues.length!==y&&(h||(h=ws(c,y)))});else{if(c.issues.length===y)continue;h||(h=ws(c,y))}}return v?v.then(()=>c):c},l=(c,d,f)=>{if(ws(c))return c.aborted=!0,c;const h=i(d,o,f);if(h instanceof Promise){if(f.async===!1)throw new xs;return h.then(v=>e._zod.parse(v,f))}return e._zod.parse(h,f)};e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){const h=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(v=>l(v,c,d)):l(h,c,d)}const f=e._zod.parse(c,d);if(f instanceof Promise){if(d.async===!1)throw new xs;return f.then(h=>i(h,o,d))}return i(f,o,d)}}at(e,"~standard",()=>({validate:i=>{try{const l=vM(e,i);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return gM(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),Eg=ie("$ZodString",(e,t)=>{pt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??qM(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Pt=ie("$ZodStringFormat",(e,t)=>{Sf.init(e,t),Eg.init(e,t)}),mN=ie("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=DM),Pt.init(e,t)}),vN=ie("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=vE(o))}else t.pattern??(t.pattern=vE());Pt.init(e,t)}),gN=ie("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=LM),Pt.init(e,t)}),yN=ie("$ZodURL",(e,t)=>{Pt.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),i=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),bN=ie("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=kM()),Pt.init(e,t)}),_N=ie("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=MM),Pt.init(e,t)}),EN=ie("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=OM),Pt.init(e,t)}),SN=ie("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=TM),Pt.init(e,t)}),wN=ie("$ZodULID",(e,t)=>{t.pattern??(t.pattern=AM),Pt.init(e,t)}),xN=ie("$ZodXID",(e,t)=>{t.pattern??(t.pattern=CM),Pt.init(e,t)}),RN=ie("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=IM),Pt.init(e,t)}),ON=ie("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=GM(t)),Pt.init(e,t)}),TN=ie("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=VM),Pt.init(e,t)}),AN=ie("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=HM(t)),Pt.init(e,t)}),CN=ie("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=NM),Pt.init(e,t)}),IN=ie("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=jM),Pt.init(e,t),e._zod.bag.format="ipv4"}),MN=ie("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=zM),Pt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),NN=ie("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=UM),Pt.init(e,t)}),DN=ie("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=BM),Pt.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[i,l]=o;if(!l)throw new Error;const c=Number(l);if(`${c}`!==l)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function jx(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const LN=ie("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=FM),Pt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{jx(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function PN(e){if(!Ix.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return jx(n)}const kN=ie("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ix),Pt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{PN(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),jN=ie("$ZodE164",(e,t)=>{t.pattern??(t.pattern=$M),Pt.init(e,t)});function zN(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const i=JSON.parse(atob(o));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const UN=ie("$ZodJWT",(e,t)=>{Pt.init(e,t),e._zod.check=n=>{zN(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),zx=ie("$ZodNumber",(e,t)=>{pt.init(e,t),e._zod.pattern=e._zod.bag.pattern??Dx,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const l=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...l?{received:l}:{}}),n}}),BN=ie("$ZodNumberFormat",(e,t)=>{JM.init(e,t),zx.init(e,t)}),FN=ie("$ZodBoolean",(e,t)=>{pt.init(e,t),e._zod.pattern=YM,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),$N=ie("$ZodNull",(e,t)=>{pt.init(e,t),e._zod.pattern=KM,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{const i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),n}}),VN=ie("$ZodAny",(e,t)=>{pt.init(e,t),e._zod.parse=n=>n}),HN=ie("$ZodUnknown",(e,t)=>{pt.init(e,t),e._zod.parse=n=>n}),GN=ie("$ZodNever",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),qN=ie("$ZodDate",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const i=n.value,l=i instanceof Date;return l&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...l?{received:"Invalid Date"}:{},inst:e}),n}});function gE(e,t,n){e.issues.length&&t.issues.push(...ci(n,e.issues)),t.value[n]=e.value}const ZN=ie("$ZodArray",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const l=[];for(let c=0;c<i.length;c++){const d=i[c],f=t.element._zod.run({value:d,issues:[]},o);f instanceof Promise?l.push(f.then(h=>gE(h,n,c))):gE(f,n,c)}return l.length?Promise.all(l).then(()=>n):n}});function Bd(e,t,n,o,i){if(e.issues.length){if(i&&!(n in o))return;t.issues.push(...ci(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function Ux(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=rM(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Bx(e,t,n,o,i,l){const c=[],d=i.keySet,f=i.catchall._zod,h=f.def.type,v=f.optout==="optional";for(const p in t){if(d.has(p))continue;if(h==="never"){c.push(p);continue}const y=f.run({value:t[p],issues:[]},o);y instanceof Promise?e.push(y.then(_=>Bd(_,n,p,t,v))):Bd(y,n,p,t,v)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:l}),e.length?Promise.all(e).then(()=>n):n}const YN=ie("$ZodObject",(e,t)=>{if(pt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const d=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...d};return Object.defineProperty(t,"shape",{value:f}),f}})}const o=vf(()=>Ux(t));at(e._zod,"propValues",()=>{const d=t.shape,f={};for(const h in d){const v=d[h]._zod;if(v.values){f[h]??(f[h]=new Set);for(const p of v.values)f[h].add(p)}}return f});const i=oc,l=t.catchall;let c;e._zod.parse=(d,f)=>{c??(c=o.value);const h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d;d.value={};const v=[],p=c.shape;for(const y of c.keys){const _=p[y],S=_._zod.optout==="optional",w=_._zod.run({value:h[y],issues:[]},f);w instanceof Promise?v.push(w.then(T=>Bd(T,d,y,h,S))):Bd(w,d,y,h,S)}return l?Bx(v,h,d,f,o.value,e):v.length?Promise.all(v).then(()=>d):d}}),KN=ie("$ZodObjectJIT",(e,t)=>{YN.init(e,t);const n=e._zod.parse,o=vf(()=>Ux(t)),i=y=>{const _=new hN(["shape","payload","ctx"]),S=o.value,w=C=>{const R=mE(C);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};_.write("const input = payload.value;");const T=Object.create(null);let O=0;for(const C of S.keys)T[C]=`key_${O++}`;_.write("const newResult = {};");for(const C of S.keys){const R=T[C],I=mE(C),D=y[C]?._zod?.optout==="optional";_.write(`const ${R} = ${w(C)};`),D?_.write(`
|
|
13
13
|
if (${R}.issues.length) {
|
|
14
14
|
if (${I} in input) {
|
|
15
15
|
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
@@ -43,9 +43,9 @@ Error generating stack: `+u.message+`
|
|
|
43
43
|
newResult[${I}] = ${R}.value;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
`)}_.write("payload.value = newResult;"),_.write("return payload;");const A=_.compile();return(C,R)=>A(y,C,R)};let l;const c=oc,d=!xx.jitless,h=d&&tM.value,v=t.catchall;let p;e._zod.parse=(y,_)=>{p??(p=o.value);const S=y.value;return c(S)?d&&h&&_?.async===!1&&_.jitless!==!0?(l||(l=i(t.shape)),y=l(y,_),v?Bx([],S,y,_,p,e):y):n(y,_):(y.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),y)}});function yE(e,t,n,o){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const i=e.filter(l=>!ws(l));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(l=>l.issues.map(c=>Da(c,o,Na())))}),t)}const Fx=ie("$ZodUnion",(e,t)=>{pt.init(e,t),at(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),at(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),at(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),at(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(l=>l._zod.pattern);return new RegExp(`^(${i.map(l=>yg(l.source)).join("|")})$`)}});const n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(i,l)=>{if(n)return o(i,l);let c=!1;const d=[];for(const f of t.options){const h=f._zod.run({value:i.value,issues:[]},l);if(h instanceof Promise)d.push(h),c=!0;else{if(h.issues.length===0)return h;d.push(h)}}return c?Promise.all(d).then(f=>yE(f,i,e,l)):yE(d,i,e,l)}}),WN=ie("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Fx.init(e,t);const n=e._zod.parse;at(e._zod,"propValues",()=>{const i={};for(const l of t.options){const c=l._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const[d,f]of Object.entries(c)){i[d]||(i[d]=new Set);for(const h of f)i[d].add(h)}}return i});const o=mf(()=>{const i=t.options,l=new Map;for(const c of i){const d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const f of d){if(l.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);l.set(f,c)}}return l});e._zod.parse=(i,l)=>{const c=i.value;if(!oc(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;const d=o.value.get(c?.[t.discriminator]);return d?d._zod.run(i,l):t.unionFallback?n(i,l):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}}),QN=ie("$ZodIntersection",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>{const i=n.value,l=t.left._zod.run({value:i,issues:[]},o),c=t.right._zod.run({value:i,issues:[]},o);return l instanceof Promise||c instanceof Promise?Promise.all([l,c]).then(([f,h])=>bE(n,f,h)):bE(n,l,c)}});function _v(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ms(e)&&Ms(t)){const n=Object.keys(t),o=Object.keys(e).filter(l=>n.indexOf(l)!==-1),i={...e,...t};for(const l of o){const c=_v(e[l],t[l]);if(!c.valid)return{valid:!1,mergeErrorPath:[l,...c.mergeErrorPath]};i[l]=c.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const i=e[o],l=t[o],c=_v(i,l);if(!c.valid)return{valid:!1,mergeErrorPath:[o,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function bE(e,t,n){const o=new Map;let i;for(const d of t.issues)if(d.code==="unrecognized_keys"){i??(i=d);for(const f of d.keys)o.has(f)||o.set(f,{}),o.get(f).l=!0}else e.issues.push(d);for(const d of n.issues)if(d.code==="unrecognized_keys")for(const f of d.keys)o.has(f)||o.set(f,{}),o.get(f).r=!0;else e.issues.push(d);const l=[...o].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(l.length&&i&&e.issues.push({...i,keys:l}),ws(e))return e;const c=_v(t.value,n.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const XN=ie("$ZodTuple",(e,t)=>{pt.init(e,t);const n=t.items;e._zod.parse=(o,i)=>{const l=o.value;if(!Array.isArray(l))return o.issues.push({input:l,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];const c=[],d=[...n].reverse().findIndex(v=>v._zod.optin!=="optional"),f=d===-1?0:n.length-d;if(!t.rest){const v=l.length>n.length,p=l.length<f-1;if(v||p)return o.issues.push({...v?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:l,inst:e,origin:"array"}),o}let h=-1;for(const v of n){if(h++,h>=l.length&&h>=f)continue;const p=v._zod.run({value:l[h],issues:[]},i);p instanceof Promise?c.push(p.then(y=>Xu(y,o,h))):Xu(p,o,h)}if(t.rest){const v=l.slice(n.length);for(const p of v){h++;const y=t.rest._zod.run({value:p,issues:[]},i);y instanceof Promise?c.push(y.then(_=>Xu(_,o,h))):Xu(y,o,h)}}return c.length?Promise.all(c).then(()=>o):o}});function Xu(e,t,n){e.issues.length&&t.issues.push(...ci(n,e.issues)),t.value[n]=e.value}const JN=ie("$ZodRecord",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>{const i=n.value;if(!Ms(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const l=[],c=t.keyType._zod.values;if(c){n.value={};const d=new Set;for(const h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);const v=t.valueType._zod.run({value:i[h],issues:[]},o);v instanceof Promise?l.push(v.then(p=>{p.issues.length&&n.issues.push(...ci(h,p.issues)),n.value[h]=p.value})):(v.issues.length&&n.issues.push(...ci(h,v.issues)),n.value[h]=v.value)}let f;for(const h in i)d.has(h)||(f=f??[],f.push(h));f&&f.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{n.value={};for(const d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let f=t.keyType._zod.run({value:d,issues:[]},o);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&Dx.test(d)&&f.issues.length&&f.issues.some(p=>p.code==="invalid_type"&&p.expected==="number")){const p=t.keyType._zod.run({value:Number(d),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(f=p)}if(f.issues.length){t.mode==="loose"?n.value[d]=i[d]:n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(p=>Da(p,o,Na())),input:d,path:[d],inst:e});continue}const v=t.valueType._zod.run({value:i[d],issues:[]},o);v instanceof Promise?l.push(v.then(p=>{p.issues.length&&n.issues.push(...ci(d,p.issues)),n.value[f.value]=p.value})):(v.issues.length&&n.issues.push(...ci(d,v.issues)),n.value[f.value]=v.value)}}return l.length?Promise.all(l).then(()=>n):n}}),eD=ie("$ZodEnum",(e,t)=>{pt.init(e,t);const n=Rx(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(i=>nM.has(typeof i)).map(i=>typeof i=="string"?Ns(i):i.toString()).join("|")})$`),e._zod.parse=(i,l)=>{const c=i.value;return o.has(c)||i.issues.push({code:"invalid_value",values:n,input:c,inst:e}),i}}),tD=ie("$ZodLiteral",(e,t)=>{if(pt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Ns(o):o?Ns(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,i)=>{const l=o.value;return n.has(l)||o.issues.push({code:"invalid_value",values:t.values,input:l,inst:e}),o}}),nD=ie("$ZodFile",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>{const i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),n}}),rD=ie("$ZodTransform",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new wx(e.constructor.name);const i=t.transform(n.value,n);if(o.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(n.value=c,n));if(i instanceof Promise)throw new xs;return n.value=i,n}});function _E(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const $x=ie("$ZodOptional",(e,t)=>{pt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",at(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),at(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${yg(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>_E(l,n.value)):_E(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),oD=ie("$ZodExactOptional",(e,t)=>{$x.init(e,t),at(e._zod,"values",()=>t.innerType._zod.values),at(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),aD=ie("$ZodNullable",(e,t)=>{pt.init(e,t),at(e._zod,"optin",()=>t.innerType._zod.optin),at(e._zod,"optout",()=>t.innerType._zod.optout),at(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${yg(n.source)}|null)$`):void 0}),at(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),iD=ie("$ZodDefault",(e,t)=>{pt.init(e,t),e._zod.optin="optional",at(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>EE(l,t)):EE(i,t)}});function EE(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const sD=ie("$ZodPrefault",(e,t)=>{pt.init(e,t),e._zod.optin="optional",at(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),lD=ie("$ZodNonOptional",(e,t)=>{pt.init(e,t),at(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>SE(l,e)):SE(i,e)}});function SE(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const cD=ie("$ZodCatch",(e,t)=>{pt.init(e,t),at(e._zod,"optin",()=>t.innerType._zod.optin),at(e._zod,"optout",()=>t.innerType._zod.optout),at(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>(n.value=l.value,l.issues.length&&(n.value=t.catchValue({...n,error:{issues:l.issues.map(c=>Da(c,o,Na()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>Da(l,o,Na()))},input:n.value}),n.issues=[]),n)}}),uD=ie("$ZodPipe",(e,t)=>{pt.init(e,t),at(e._zod,"values",()=>t.in._zod.values),at(e._zod,"optin",()=>t.in._zod.optin),at(e._zod,"optout",()=>t.out._zod.optout),at(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const l=t.out._zod.run(n,o);return l instanceof Promise?l.then(c=>Ju(c,t.in,o)):Ju(l,t.in,o)}const i=t.in._zod.run(n,o);return i instanceof Promise?i.then(l=>Ju(l,t.out,o)):Ju(i,t.out,o)}});function Ju(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const dD=ie("$ZodReadonly",(e,t)=>{pt.init(e,t),at(e._zod,"propValues",()=>t.innerType._zod.propValues),at(e._zod,"values",()=>t.innerType._zod.values),at(e._zod,"optin",()=>t.innerType?._zod?.optin),at(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(wE):wE(i)}});function wE(e){return e.value=Object.freeze(e.value),e}const fD=ie("$ZodLazy",(e,t)=>{pt.init(e,t),at(e._zod,"innerType",()=>t.getter()),at(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),at(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),at(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),at(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),hD=ie("$ZodCustom",(e,t)=>{Cn.init(e,t),pt.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,i=t.fn(o);if(i instanceof Promise)return i.then(l=>xE(l,n,o,e));xE(i,n,o,e)}});function xE(e,t,n,o){if(!e){const i={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(i.params=o._zod.def.params),t.issues.push(ac(i))}}var RE;class pD{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const i={...o,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function mD(){return new pD}(RE=globalThis).__zod_globalRegistry??(RE.__zod_globalRegistry=mD());const ql=globalThis.__zod_globalRegistry;function vD(e,t){return new e({type:"string",...Oe(t)})}function gD(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Oe(t)})}function OE(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Oe(t)})}function yD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Oe(t)})}function bD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Oe(t)})}function _D(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Oe(t)})}function ED(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Oe(t)})}function Vx(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Oe(t)})}function SD(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Oe(t)})}function wD(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Oe(t)})}function xD(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Oe(t)})}function RD(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Oe(t)})}function OD(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Oe(t)})}function TD(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Oe(t)})}function AD(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Oe(t)})}function CD(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Oe(t)})}function ID(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Oe(t)})}function MD(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Oe(t)})}function ND(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Oe(t)})}function DD(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Oe(t)})}function LD(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Oe(t)})}function PD(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Oe(t)})}function kD(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Oe(t)})}function jD(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Oe(t)})}function zD(e,t){return new e({type:"string",format:"date",check:"string_format",...Oe(t)})}function UD(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Oe(t)})}function BD(e,t){return new e({type:"string",format:"duration",check:"string_format",...Oe(t)})}function FD(e,t){return new e({type:"number",checks:[],...Oe(t)})}function $D(e,t){return new e({type:"number",coerce:!0,checks:[],...Oe(t)})}function VD(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Oe(t)})}function HD(e,t){return new e({type:"boolean",...Oe(t)})}function GD(e,t){return new e({type:"boolean",coerce:!0,...Oe(t)})}function qD(e,t){return new e({type:"null",...Oe(t)})}function ZD(e){return new e({type:"any"})}function YD(e){return new e({type:"unknown"})}function KD(e,t){return new e({type:"never",...Oe(t)})}function WD(e,t){return new e({type:"date",...Oe(t)})}function TE(e,t){return new Px({check:"less_than",...Oe(t),value:e,inclusive:!1})}function Ed(e,t){return new Px({check:"less_than",...Oe(t),value:e,inclusive:!0})}function AE(e,t){return new kx({check:"greater_than",...Oe(t),value:e,inclusive:!1})}function Sd(e,t){return new kx({check:"greater_than",...Oe(t),value:e,inclusive:!0})}function CE(e,t){return new XM({check:"multiple_of",...Oe(t),value:e})}function QD(e,t){return new eN({check:"max_size",...Oe(t),maximum:e})}function XD(e,t){return new tN({check:"min_size",...Oe(t),minimum:e})}function Hx(e,t){return new nN({check:"max_length",...Oe(t),maximum:e})}function Bd(e,t){return new rN({check:"min_length",...Oe(t),minimum:e})}function Gx(e,t){return new oN({check:"length_equals",...Oe(t),length:e})}function JD(e,t){return new aN({check:"string_format",format:"regex",...Oe(t),pattern:e})}function eL(e){return new iN({check:"string_format",format:"lowercase",...Oe(e)})}function tL(e){return new sN({check:"string_format",format:"uppercase",...Oe(e)})}function nL(e,t){return new lN({check:"string_format",format:"includes",...Oe(t),includes:e})}function rL(e,t){return new cN({check:"string_format",format:"starts_with",...Oe(t),prefix:e})}function oL(e,t){return new uN({check:"string_format",format:"ends_with",...Oe(t),suffix:e})}function aL(e,t){return new dN({check:"mime_type",mime:e,...Oe(t)})}function js(e){return new fN({check:"overwrite",tx:e})}function iL(e){return js(t=>t.normalize(e))}function sL(){return js(e=>e.trim())}function lL(){return js(e=>e.toLowerCase())}function cL(){return js(e=>e.toUpperCase())}function uL(){return js(e=>eM(e))}function dL(e,t,n){return new e({type:"array",element:t,...Oe(n)})}function fL(e,t){return new e({type:"file",...Oe(t)})}function hL(e,t,n){const o=Oe(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function pL(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Oe(n)})}function mL(e){const t=vL(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(ac(o,n.value,t._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(ac(i))}},e(n.value,n)));return t}function vL(e,t){const n=new Cn({check:"custom",...Oe(t)});return n._zod.check=e,n}function Fd(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ql,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ot(e,t,n={path:[],schemaPath:[]}){var o;const i=e._zod.def,l=t.seen.get(e);if(l)return l.count++,n.schemaPath.includes(e)&&(l.cycle=n.path),l.schema;const c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c);const d=e._zod.toJSONSchema?.();if(d)c.schema=d;else{const v={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,v);else{const y=c.schema,_=t.processors[i.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);_(e,t,y,v)}const p=e._zod.parent;p&&(c.ref||(c.ref=p),Ot(p,t,v),t.seen.get(p).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(c.schema,f),t.io==="input"&&jn(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((o=c.schema).default??(o.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function $d(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const c of e.seen.entries()){const d=e.metadataRegistry.get(c[0])?.id;if(d){const f=o.get(d);if(f&&f!==c[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(d,c[0])}}const i=c=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(c[0])?.id,y=e.external.uri??(S=>S);if(p)return{ref:y(p)};const _=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=_,{defId:_,ref:`${y("__shared")}#/${d}/${_}`}}if(c[1]===n)return{ref:"#"};const h=`#/${d}/`,v=c[1].schema.id??`__schema${e.counter++}`;return{defId:v,ref:h+v}},l=c=>{if(c[1].schema.$ref)return;const d=c[1],{ref:f,defId:h}=i(c);d.def={...d.schema},h&&(d.defId=h);const v=d.schema;for(const p in v)delete v[p];v.$ref=f};if(e.cycles==="throw")for(const c of e.seen.entries()){const d=c[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
46
|
+
`)}_.write("payload.value = newResult;"),_.write("return payload;");const A=_.compile();return(C,R)=>A(y,C,R)};let l;const c=oc,d=!xx.jitless,h=d&&tM.value,v=t.catchall;let p;e._zod.parse=(y,_)=>{p??(p=o.value);const S=y.value;return c(S)?d&&h&&_?.async===!1&&_.jitless!==!0?(l||(l=i(t.shape)),y=l(y,_),v?Bx([],S,y,_,p,e):y):n(y,_):(y.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),y)}});function yE(e,t,n,o){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const i=e.filter(l=>!ws(l));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(l=>l.issues.map(c=>Da(c,o,Na())))}),t)}const Fx=ie("$ZodUnion",(e,t)=>{pt.init(e,t),at(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),at(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),at(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),at(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(l=>l._zod.pattern);return new RegExp(`^(${i.map(l=>yg(l.source)).join("|")})$`)}});const n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(i,l)=>{if(n)return o(i,l);let c=!1;const d=[];for(const f of t.options){const h=f._zod.run({value:i.value,issues:[]},l);if(h instanceof Promise)d.push(h),c=!0;else{if(h.issues.length===0)return h;d.push(h)}}return c?Promise.all(d).then(f=>yE(f,i,e,l)):yE(d,i,e,l)}}),WN=ie("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Fx.init(e,t);const n=e._zod.parse;at(e._zod,"propValues",()=>{const i={};for(const l of t.options){const c=l._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const[d,f]of Object.entries(c)){i[d]||(i[d]=new Set);for(const h of f)i[d].add(h)}}return i});const o=vf(()=>{const i=t.options,l=new Map;for(const c of i){const d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const f of d){if(l.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);l.set(f,c)}}return l});e._zod.parse=(i,l)=>{const c=i.value;if(!oc(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;const d=o.value.get(c?.[t.discriminator]);return d?d._zod.run(i,l):t.unionFallback?n(i,l):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}}),QN=ie("$ZodIntersection",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>{const i=n.value,l=t.left._zod.run({value:i,issues:[]},o),c=t.right._zod.run({value:i,issues:[]},o);return l instanceof Promise||c instanceof Promise?Promise.all([l,c]).then(([f,h])=>bE(n,f,h)):bE(n,l,c)}});function _v(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ms(e)&&Ms(t)){const n=Object.keys(t),o=Object.keys(e).filter(l=>n.indexOf(l)!==-1),i={...e,...t};for(const l of o){const c=_v(e[l],t[l]);if(!c.valid)return{valid:!1,mergeErrorPath:[l,...c.mergeErrorPath]};i[l]=c.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const i=e[o],l=t[o],c=_v(i,l);if(!c.valid)return{valid:!1,mergeErrorPath:[o,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function bE(e,t,n){const o=new Map;let i;for(const d of t.issues)if(d.code==="unrecognized_keys"){i??(i=d);for(const f of d.keys)o.has(f)||o.set(f,{}),o.get(f).l=!0}else e.issues.push(d);for(const d of n.issues)if(d.code==="unrecognized_keys")for(const f of d.keys)o.has(f)||o.set(f,{}),o.get(f).r=!0;else e.issues.push(d);const l=[...o].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(l.length&&i&&e.issues.push({...i,keys:l}),ws(e))return e;const c=_v(t.value,n.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const XN=ie("$ZodTuple",(e,t)=>{pt.init(e,t);const n=t.items;e._zod.parse=(o,i)=>{const l=o.value;if(!Array.isArray(l))return o.issues.push({input:l,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];const c=[],d=[...n].reverse().findIndex(v=>v._zod.optin!=="optional"),f=d===-1?0:n.length-d;if(!t.rest){const v=l.length>n.length,p=l.length<f-1;if(v||p)return o.issues.push({...v?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:l,inst:e,origin:"array"}),o}let h=-1;for(const v of n){if(h++,h>=l.length&&h>=f)continue;const p=v._zod.run({value:l[h],issues:[]},i);p instanceof Promise?c.push(p.then(y=>Ju(y,o,h))):Ju(p,o,h)}if(t.rest){const v=l.slice(n.length);for(const p of v){h++;const y=t.rest._zod.run({value:p,issues:[]},i);y instanceof Promise?c.push(y.then(_=>Ju(_,o,h))):Ju(y,o,h)}}return c.length?Promise.all(c).then(()=>o):o}});function Ju(e,t,n){e.issues.length&&t.issues.push(...ci(n,e.issues)),t.value[n]=e.value}const JN=ie("$ZodRecord",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>{const i=n.value;if(!Ms(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const l=[],c=t.keyType._zod.values;if(c){n.value={};const d=new Set;for(const h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);const v=t.valueType._zod.run({value:i[h],issues:[]},o);v instanceof Promise?l.push(v.then(p=>{p.issues.length&&n.issues.push(...ci(h,p.issues)),n.value[h]=p.value})):(v.issues.length&&n.issues.push(...ci(h,v.issues)),n.value[h]=v.value)}let f;for(const h in i)d.has(h)||(f=f??[],f.push(h));f&&f.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{n.value={};for(const d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let f=t.keyType._zod.run({value:d,issues:[]},o);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&Dx.test(d)&&f.issues.length&&f.issues.some(p=>p.code==="invalid_type"&&p.expected==="number")){const p=t.keyType._zod.run({value:Number(d),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(f=p)}if(f.issues.length){t.mode==="loose"?n.value[d]=i[d]:n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(p=>Da(p,o,Na())),input:d,path:[d],inst:e});continue}const v=t.valueType._zod.run({value:i[d],issues:[]},o);v instanceof Promise?l.push(v.then(p=>{p.issues.length&&n.issues.push(...ci(d,p.issues)),n.value[f.value]=p.value})):(v.issues.length&&n.issues.push(...ci(d,v.issues)),n.value[f.value]=v.value)}}return l.length?Promise.all(l).then(()=>n):n}}),eD=ie("$ZodEnum",(e,t)=>{pt.init(e,t);const n=Rx(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(i=>nM.has(typeof i)).map(i=>typeof i=="string"?Ns(i):i.toString()).join("|")})$`),e._zod.parse=(i,l)=>{const c=i.value;return o.has(c)||i.issues.push({code:"invalid_value",values:n,input:c,inst:e}),i}}),tD=ie("$ZodLiteral",(e,t)=>{if(pt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Ns(o):o?Ns(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,i)=>{const l=o.value;return n.has(l)||o.issues.push({code:"invalid_value",values:t.values,input:l,inst:e}),o}}),nD=ie("$ZodFile",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>{const i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),n}}),rD=ie("$ZodTransform",(e,t)=>{pt.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new wx(e.constructor.name);const i=t.transform(n.value,n);if(o.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(n.value=c,n));if(i instanceof Promise)throw new xs;return n.value=i,n}});function _E(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const $x=ie("$ZodOptional",(e,t)=>{pt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",at(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),at(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${yg(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>_E(l,n.value)):_E(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),oD=ie("$ZodExactOptional",(e,t)=>{$x.init(e,t),at(e._zod,"values",()=>t.innerType._zod.values),at(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),aD=ie("$ZodNullable",(e,t)=>{pt.init(e,t),at(e._zod,"optin",()=>t.innerType._zod.optin),at(e._zod,"optout",()=>t.innerType._zod.optout),at(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${yg(n.source)}|null)$`):void 0}),at(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),iD=ie("$ZodDefault",(e,t)=>{pt.init(e,t),e._zod.optin="optional",at(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>EE(l,t)):EE(i,t)}});function EE(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const sD=ie("$ZodPrefault",(e,t)=>{pt.init(e,t),e._zod.optin="optional",at(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),lD=ie("$ZodNonOptional",(e,t)=>{pt.init(e,t),at(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>SE(l,e)):SE(i,e)}});function SE(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const cD=ie("$ZodCatch",(e,t)=>{pt.init(e,t),at(e._zod,"optin",()=>t.innerType._zod.optin),at(e._zod,"optout",()=>t.innerType._zod.optout),at(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(l=>(n.value=l.value,l.issues.length&&(n.value=t.catchValue({...n,error:{issues:l.issues.map(c=>Da(c,o,Na()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>Da(l,o,Na()))},input:n.value}),n.issues=[]),n)}}),uD=ie("$ZodPipe",(e,t)=>{pt.init(e,t),at(e._zod,"values",()=>t.in._zod.values),at(e._zod,"optin",()=>t.in._zod.optin),at(e._zod,"optout",()=>t.out._zod.optout),at(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const l=t.out._zod.run(n,o);return l instanceof Promise?l.then(c=>ed(c,t.in,o)):ed(l,t.in,o)}const i=t.in._zod.run(n,o);return i instanceof Promise?i.then(l=>ed(l,t.out,o)):ed(i,t.out,o)}});function ed(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const dD=ie("$ZodReadonly",(e,t)=>{pt.init(e,t),at(e._zod,"propValues",()=>t.innerType._zod.propValues),at(e._zod,"values",()=>t.innerType._zod.values),at(e._zod,"optin",()=>t.innerType?._zod?.optin),at(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(wE):wE(i)}});function wE(e){return e.value=Object.freeze(e.value),e}const fD=ie("$ZodLazy",(e,t)=>{pt.init(e,t),at(e._zod,"innerType",()=>t.getter()),at(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),at(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),at(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),at(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),hD=ie("$ZodCustom",(e,t)=>{Cn.init(e,t),pt.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,i=t.fn(o);if(i instanceof Promise)return i.then(l=>xE(l,n,o,e));xE(i,n,o,e)}});function xE(e,t,n,o){if(!e){const i={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(i.params=o._zod.def.params),t.issues.push(ac(i))}}var RE;class pD{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const i={...o,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function mD(){return new pD}(RE=globalThis).__zod_globalRegistry??(RE.__zod_globalRegistry=mD());const ql=globalThis.__zod_globalRegistry;function vD(e,t){return new e({type:"string",...Oe(t)})}function gD(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Oe(t)})}function OE(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Oe(t)})}function yD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Oe(t)})}function bD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Oe(t)})}function _D(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Oe(t)})}function ED(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Oe(t)})}function Vx(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Oe(t)})}function SD(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Oe(t)})}function wD(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Oe(t)})}function xD(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Oe(t)})}function RD(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Oe(t)})}function OD(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Oe(t)})}function TD(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Oe(t)})}function AD(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Oe(t)})}function CD(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Oe(t)})}function ID(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Oe(t)})}function MD(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Oe(t)})}function ND(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Oe(t)})}function DD(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Oe(t)})}function LD(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Oe(t)})}function PD(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Oe(t)})}function kD(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Oe(t)})}function jD(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Oe(t)})}function zD(e,t){return new e({type:"string",format:"date",check:"string_format",...Oe(t)})}function UD(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Oe(t)})}function BD(e,t){return new e({type:"string",format:"duration",check:"string_format",...Oe(t)})}function FD(e,t){return new e({type:"number",checks:[],...Oe(t)})}function $D(e,t){return new e({type:"number",coerce:!0,checks:[],...Oe(t)})}function VD(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Oe(t)})}function HD(e,t){return new e({type:"boolean",...Oe(t)})}function GD(e,t){return new e({type:"boolean",coerce:!0,...Oe(t)})}function qD(e,t){return new e({type:"null",...Oe(t)})}function ZD(e){return new e({type:"any"})}function YD(e){return new e({type:"unknown"})}function KD(e,t){return new e({type:"never",...Oe(t)})}function WD(e,t){return new e({type:"date",...Oe(t)})}function TE(e,t){return new Px({check:"less_than",...Oe(t),value:e,inclusive:!1})}function Sd(e,t){return new Px({check:"less_than",...Oe(t),value:e,inclusive:!0})}function AE(e,t){return new kx({check:"greater_than",...Oe(t),value:e,inclusive:!1})}function wd(e,t){return new kx({check:"greater_than",...Oe(t),value:e,inclusive:!0})}function CE(e,t){return new XM({check:"multiple_of",...Oe(t),value:e})}function QD(e,t){return new eN({check:"max_size",...Oe(t),maximum:e})}function XD(e,t){return new tN({check:"min_size",...Oe(t),minimum:e})}function Hx(e,t){return new nN({check:"max_length",...Oe(t),maximum:e})}function Fd(e,t){return new rN({check:"min_length",...Oe(t),minimum:e})}function Gx(e,t){return new oN({check:"length_equals",...Oe(t),length:e})}function JD(e,t){return new aN({check:"string_format",format:"regex",...Oe(t),pattern:e})}function eL(e){return new iN({check:"string_format",format:"lowercase",...Oe(e)})}function tL(e){return new sN({check:"string_format",format:"uppercase",...Oe(e)})}function nL(e,t){return new lN({check:"string_format",format:"includes",...Oe(t),includes:e})}function rL(e,t){return new cN({check:"string_format",format:"starts_with",...Oe(t),prefix:e})}function oL(e,t){return new uN({check:"string_format",format:"ends_with",...Oe(t),suffix:e})}function aL(e,t){return new dN({check:"mime_type",mime:e,...Oe(t)})}function js(e){return new fN({check:"overwrite",tx:e})}function iL(e){return js(t=>t.normalize(e))}function sL(){return js(e=>e.trim())}function lL(){return js(e=>e.toLowerCase())}function cL(){return js(e=>e.toUpperCase())}function uL(){return js(e=>eM(e))}function dL(e,t,n){return new e({type:"array",element:t,...Oe(n)})}function fL(e,t){return new e({type:"file",...Oe(t)})}function hL(e,t,n){const o=Oe(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function pL(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Oe(n)})}function mL(e){const t=vL(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(ac(o,n.value,t._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(ac(i))}},e(n.value,n)));return t}function vL(e,t){const n=new Cn({check:"custom",...Oe(t)});return n._zod.check=e,n}function $d(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ql,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ot(e,t,n={path:[],schemaPath:[]}){var o;const i=e._zod.def,l=t.seen.get(e);if(l)return l.count++,n.schemaPath.includes(e)&&(l.cycle=n.path),l.schema;const c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c);const d=e._zod.toJSONSchema?.();if(d)c.schema=d;else{const v={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,v);else{const y=c.schema,_=t.processors[i.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);_(e,t,y,v)}const p=e._zod.parent;p&&(c.ref||(c.ref=p),Ot(p,t,v),t.seen.get(p).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(c.schema,f),t.io==="input"&&jn(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((o=c.schema).default??(o.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function Vd(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const c of e.seen.entries()){const d=e.metadataRegistry.get(c[0])?.id;if(d){const f=o.get(d);if(f&&f!==c[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(d,c[0])}}const i=c=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(c[0])?.id,y=e.external.uri??(S=>S);if(p)return{ref:y(p)};const _=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=_,{defId:_,ref:`${y("__shared")}#/${d}/${_}`}}if(c[1]===n)return{ref:"#"};const h=`#/${d}/`,v=c[1].schema.id??`__schema${e.counter++}`;return{defId:v,ref:h+v}},l=c=>{if(c[1].schema.$ref)return;const d=c[1],{ref:f,defId:h}=i(c);d.def={...d.schema},h&&(d.defId=h);const v=d.schema;for(const p in v)delete v[p];v.$ref=f};if(e.cycles==="throw")for(const c of e.seen.entries()){const d=c[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
47
47
|
|
|
48
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const d=c[1];if(t===c[0]){l(c);continue}if(e.external){const h=e.external.registry.get(c[0])?.id;if(t!==c[0]&&h){l(c);continue}}if(e.metadataRegistry.get(c[0])?.id){l(c);continue}if(d.cycle){l(c);continue}if(d.count>1&&e.reused==="ref"){l(c);continue}}}function Vd(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=c=>{const d=e.seen.get(c);if(d.ref===null)return;const f=d.def??d.schema,h={...f},v=d.ref;if(d.ref=null,v){o(v);const y=e.seen.get(v),_=y.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(_)):Object.assign(f,_),Object.assign(f,h),c._zod.parent===v)for(const w in f)w==="$ref"||w==="allOf"||w in h||delete f[w];if(_.$ref)for(const w in f)w==="$ref"||w==="allOf"||w in y.def&&JSON.stringify(f[w])===JSON.stringify(y.def[w])&&delete f[w]}const p=c._zod.parent;if(p&&p!==v){o(p);const y=e.seen.get(p);if(y?.schema.$ref&&(f.$ref=y.schema.$ref,y.def))for(const _ in f)_==="$ref"||_==="allOf"||_ in y.def&&JSON.stringify(f[_])===JSON.stringify(y.def[_])&&delete f[_]}e.override({zodSchema:c,jsonSchema:f,path:d.path??[]})};for(const c of[...e.seen.entries()].reverse())o(c[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(c)}Object.assign(i,n.def??n.schema);const l=e.external?.defs??{};for(const c of e.seen.entries()){const d=c[1];d.def&&d.defId&&(l[d.defId]=d.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?i.$defs=l:i.definitions=l);try{const c=JSON.parse(JSON.stringify(i));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Hd(t,"input",e.processors),output:Hd(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function jn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return jn(o.element,n);if(o.type==="set")return jn(o.valueType,n);if(o.type==="lazy")return jn(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return jn(o.innerType,n);if(o.type==="intersection")return jn(o.left,n)||jn(o.right,n);if(o.type==="record"||o.type==="map")return jn(o.keyType,n)||jn(o.valueType,n);if(o.type==="pipe")return jn(o.in,n)||jn(o.out,n);if(o.type==="object"){for(const i in o.shape)if(jn(o.shape[i],n))return!0;return!1}if(o.type==="union"){for(const i of o.options)if(jn(i,n))return!0;return!1}if(o.type==="tuple"){for(const i of o.items)if(jn(i,n))return!0;return!!(o.rest&&jn(o.rest,n))}return!1}const gL=(e,t={})=>n=>{const o=Fd({...n,processors:t});return Ot(e,o),$d(o,e),Vd(o,e)},Hd=(e,t,n={})=>o=>{const{libraryOptions:i,target:l}=o??{},c=Fd({...i??{},target:l,io:t,processors:n});return Ot(e,c),$d(c,e),Vd(c,e)},yL={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},qx=(e,t,n,o)=>{const i=n;i.type="string";const{minimum:l,maximum:c,format:d,patterns:f,contentEncoding:h}=e._zod.bag;if(typeof l=="number"&&(i.minLength=l),typeof c=="number"&&(i.maxLength=c),d&&(i.format=yL[d]??d,i.format===""&&delete i.format,d==="time"&&delete i.format),h&&(i.contentEncoding=h),f&&f.size>0){const v=[...f];v.length===1?i.pattern=v[0].source:v.length>1&&(i.allOf=[...v.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Zx=(e,t,n,o)=>{const i=n,{minimum:l,maximum:c,format:d,multipleOf:f,exclusiveMaximum:h,exclusiveMinimum:v}=e._zod.bag;typeof d=="string"&&d.includes("int")?i.type="integer":i.type="number",typeof v=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=v,i.exclusiveMinimum=!0):i.exclusiveMinimum=v),typeof l=="number"&&(i.minimum=l,typeof v=="number"&&t.target!=="draft-04"&&(v>=l?delete i.minimum:delete i.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=h,i.exclusiveMaximum=!0):i.exclusiveMaximum=h),typeof c=="number"&&(i.maximum=c,typeof h=="number"&&t.target!=="draft-04"&&(h<=c?delete i.maximum:delete i.exclusiveMaximum)),typeof f=="number"&&(i.multipleOf=f)},Yx=(e,t,n,o)=>{n.type="boolean"},bL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},_L=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Kx=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},EL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},SL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Wx=(e,t,n,o)=>{n.not={}},Qx=(e,t,n,o)=>{},Xx=(e,t,n,o)=>{},Jx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},e2=(e,t,n,o)=>{const i=e._zod.def,l=Rx(i.entries);l.every(c=>typeof c=="number")&&(n.type="number"),l.every(c=>typeof c=="string")&&(n.type="string"),n.enum=l},t2=(e,t,n,o)=>{const i=e._zod.def,l=[];for(const c of i.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");l.push(Number(c))}else l.push(c);if(l.length!==0)if(l.length===1){const c=l[0];n.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[c]:n.const=c}else l.every(c=>typeof c=="number")&&(n.type="number"),l.every(c=>typeof c=="string")&&(n.type="string"),l.every(c=>typeof c=="boolean")&&(n.type="boolean"),l.every(c=>c===null)&&(n.type="null"),n.enum=l},wL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},xL=(e,t,n,o)=>{const i=n,l=e._zod.pattern;if(!l)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=l.source},n2=(e,t,n,o)=>{const i=n,l={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:d,mime:f}=e._zod.bag;c!==void 0&&(l.minLength=c),d!==void 0&&(l.maxLength=d),f?f.length===1?(l.contentMediaType=f[0],Object.assign(i,l)):(Object.assign(i,l),i.anyOf=f.map(h=>({contentMediaType:h}))):Object.assign(i,l)},RL=(e,t,n,o)=>{n.type="boolean"},r2=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},OL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},o2=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},TL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},AL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},a2=(e,t,n,o)=>{const i=n,l=e._zod.def,{minimum:c,maximum:d}=e._zod.bag;typeof c=="number"&&(i.minItems=c),typeof d=="number"&&(i.maxItems=d),i.type="array",i.items=Ot(l.element,t,{...o,path:[...o.path,"items"]})},i2=(e,t,n,o)=>{const i=n,l=e._zod.def;i.type="object",i.properties={};const c=l.shape;for(const h in c)i.properties[h]=Ot(c[h],t,{...o,path:[...o.path,"properties",h]});const d=new Set(Object.keys(c)),f=new Set([...d].filter(h=>{const v=l.shape[h]._zod;return t.io==="input"?v.optin===void 0:v.optout===void 0}));f.size>0&&(i.required=Array.from(f)),l.catchall?._zod.def.type==="never"?i.additionalProperties=!1:l.catchall?l.catchall&&(i.additionalProperties=Ot(l.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},s2=(e,t,n,o)=>{const i=e._zod.def,l=i.inclusive===!1,c=i.options.map((d,f)=>Ot(d,t,{...o,path:[...o.path,l?"oneOf":"anyOf",f]}));l?n.oneOf=c:n.anyOf=c},l2=(e,t,n,o)=>{const i=e._zod.def,l=Ot(i.left,t,{...o,path:[...o.path,"allOf",0]}),c=Ot(i.right,t,{...o,path:[...o.path,"allOf",1]}),d=h=>"allOf"in h&&Object.keys(h).length===1,f=[...d(l)?l.allOf:[l],...d(c)?c.allOf:[c]];n.allOf=f},c2=(e,t,n,o)=>{const i=n,l=e._zod.def;i.type="array";const c=t.target==="draft-2020-12"?"prefixItems":"items",d=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",f=l.items.map((y,_)=>Ot(y,t,{...o,path:[...o.path,c,_]})),h=l.rest?Ot(l.rest,t,{...o,path:[...o.path,d,...t.target==="openapi-3.0"?[l.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=f,h&&(i.items=h)):t.target==="openapi-3.0"?(i.items={anyOf:f},h&&i.items.anyOf.push(h),i.minItems=f.length,h||(i.maxItems=f.length)):(i.items=f,h&&(i.additionalItems=h));const{minimum:v,maximum:p}=e._zod.bag;typeof v=="number"&&(i.minItems=v),typeof p=="number"&&(i.maxItems=p)},u2=(e,t,n,o)=>{const i=n,l=e._zod.def;i.type="object";const c=l.keyType,f=c._zod.bag?.patterns;if(l.mode==="loose"&&f&&f.size>0){const v=Ot(l.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});i.patternProperties={};for(const p of f)i.patternProperties[p.source]=v}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=Ot(l.keyType,t,{...o,path:[...o.path,"propertyNames"]})),i.additionalProperties=Ot(l.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const h=c._zod.values;if(h){const v=[...h].filter(p=>typeof p=="string"||typeof p=="number");v.length>0&&(i.required=v)}},d2=(e,t,n,o)=>{const i=e._zod.def,l=Ot(i.innerType,t,o),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=i.innerType,n.nullable=!0):n.anyOf=[l,{type:"null"}]},f2=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType},h2=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},p2=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},m2=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType;let c;try{c=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=c},v2=(e,t,n,o)=>{const i=e._zod.def,l=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Ot(l,t,o);const c=t.seen.get(e);c.ref=l},g2=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType,n.readOnly=!0},CL=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType},Sg=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType},y2=(e,t,n,o)=>{const i=e._zod.innerType;Ot(i,t,o);const l=t.seen.get(e);l.ref=i},IE={string:qx,number:Zx,boolean:Yx,bigint:bL,symbol:_L,null:Kx,undefined:EL,void:SL,never:Wx,any:Qx,unknown:Xx,date:Jx,enum:e2,literal:t2,nan:wL,template_literal:xL,file:n2,success:RL,custom:r2,function:OL,transform:o2,map:TL,set:AL,array:a2,object:i2,union:s2,intersection:l2,tuple:c2,record:u2,nullable:d2,nonoptional:f2,default:h2,prefault:p2,catch:m2,pipe:v2,readonly:g2,promise:CL,optional:Sg,lazy:y2};function dH(e,t){if("_idmap"in e){const o=e,i=Fd({...t,processors:IE}),l={};for(const f of o._idmap.entries()){const[h,v]=f;Ot(v,i)}const c={},d={registry:o,uri:t?.uri,defs:l};i.external=d;for(const f of o._idmap.entries()){const[h,v]=f;$d(i,v),c[h]=Vd(i,v)}if(Object.keys(l).length>0){const f=i.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[f]:l}}return{schemas:c}}const n=Fd({...t,processors:IE});return Ot(e,n),$d(n,e),Vd(n,e)}const IL=ie("ZodISODateTime",(e,t)=>{ON.init(e,t),zt.init(e,t)});function ML(e){return jD(IL,e)}const NL=ie("ZodISODate",(e,t)=>{TN.init(e,t),zt.init(e,t)});function DL(e){return zD(NL,e)}const LL=ie("ZodISOTime",(e,t)=>{AN.init(e,t),zt.init(e,t)});function PL(e){return UD(LL,e)}const kL=ie("ZodISODuration",(e,t)=>{CN.init(e,t),zt.init(e,t)});function jL(e){return BD(kL,e)}const zL=(e,t)=>{_g.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>hM(e,n)},flatten:{value:n=>fM(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,bv,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,bv,2)}},isEmpty:{get(){return e.issues.length===0}}})},jr=ie("ZodError",zL,{Parent:Error}),UL=gf(jr),BL=yf(jr),FL=bf(jr),$L=_f(jr),VL=yM(jr),HL=bM(jr),GL=_M(jr),qL=EM(jr),ZL=SM(jr),YL=wM(jr),KL=xM(jr),WL=RM(jr),yt=ie("ZodType",(e,t)=>(pt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Hd(e,"input"),output:Hd(e,"output")}}),e.toJSONSchema=gL(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ja(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>za(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>UL(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>FL(e,n,o),e.parseAsync=async(n,o)=>BL(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>$L(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>VL(e,n,o),e.decode=(n,o)=>HL(e,n,o),e.encodeAsync=async(n,o)=>GL(e,n,o),e.decodeAsync=async(n,o)=>qL(e,n,o),e.safeEncode=(n,o)=>ZL(e,n,o),e.safeDecode=(n,o)=>YL(e,n,o),e.safeEncodeAsync=async(n,o)=>KL(e,n,o),e.safeDecodeAsync=async(n,o)=>WL(e,n,o),e.refine=(n,o)=>e.check(H8(n,o)),e.superRefine=n=>e.check(G8(n)),e.overwrite=n=>e.check(js(n)),e.optional=()=>DE(e),e.exactOptional=()=>M8(e),e.nullable=()=>LE(e),e.nullish=()=>DE(LE(e)),e.nonoptional=n=>j8(e,n),e.array=()=>Sv(e),e.or=n=>E8([e,n]),e.and=n=>x8(e,n),e.transform=n=>xv(e,R2(n)),e.default=n=>L8(e,n),e.prefault=n=>k8(e,n),e.catch=n=>U8(e,n),e.pipe=n=>xv(e,n),e.readonly=()=>$8(e),e.describe=n=>{const o=e.clone();return ql.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return ql.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ql.get(e);const o=e.clone();return ql.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),b2=ie("_ZodString",(e,t)=>{Eg.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>qx(e,o,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(JD(...o)),e.includes=(...o)=>e.check(nL(...o)),e.startsWith=(...o)=>e.check(rL(...o)),e.endsWith=(...o)=>e.check(oL(...o)),e.min=(...o)=>e.check(Bd(...o)),e.max=(...o)=>e.check(Hx(...o)),e.length=(...o)=>e.check(Gx(...o)),e.nonempty=(...o)=>e.check(Bd(1,...o)),e.lowercase=o=>e.check(eL(o)),e.uppercase=o=>e.check(tL(o)),e.trim=()=>e.check(sL()),e.normalize=(...o)=>e.check(iL(...o)),e.toLowerCase=()=>e.check(lL()),e.toUpperCase=()=>e.check(cL()),e.slugify=()=>e.check(uL())}),QL=ie("ZodString",(e,t)=>{Eg.init(e,t),b2.init(e,t),e.email=n=>e.check(gD(XL,n)),e.url=n=>e.check(Vx(_2,n)),e.jwt=n=>e.check(kD(h8,n)),e.emoji=n=>e.check(SD(JL,n)),e.guid=n=>e.check(OE(ME,n)),e.uuid=n=>e.check(yD(ed,n)),e.uuidv4=n=>e.check(bD(ed,n)),e.uuidv6=n=>e.check(_D(ed,n)),e.uuidv7=n=>e.check(ED(ed,n)),e.nanoid=n=>e.check(wD(e8,n)),e.guid=n=>e.check(OE(ME,n)),e.cuid=n=>e.check(xD(t8,n)),e.cuid2=n=>e.check(RD(n8,n)),e.ulid=n=>e.check(OD(r8,n)),e.base64=n=>e.check(DD(u8,n)),e.base64url=n=>e.check(LD(d8,n)),e.xid=n=>e.check(TD(o8,n)),e.ksuid=n=>e.check(AD(a8,n)),e.ipv4=n=>e.check(CD(i8,n)),e.ipv6=n=>e.check(ID(s8,n)),e.cidrv4=n=>e.check(MD(l8,n)),e.cidrv6=n=>e.check(ND(c8,n)),e.e164=n=>e.check(PD(f8,n)),e.datetime=n=>e.check(ML(n)),e.date=n=>e.check(DL(n)),e.time=n=>e.check(PL(n)),e.duration=n=>e.check(jL(n))});function Ve(e){return vD(QL,e)}const zt=ie("ZodStringFormat",(e,t)=>{Pt.init(e,t),b2.init(e,t)}),XL=ie("ZodEmail",(e,t)=>{gN.init(e,t),zt.init(e,t)}),ME=ie("ZodGUID",(e,t)=>{mN.init(e,t),zt.init(e,t)}),ed=ie("ZodUUID",(e,t)=>{vN.init(e,t),zt.init(e,t)}),_2=ie("ZodURL",(e,t)=>{yN.init(e,t),zt.init(e,t)});function fH(e){return Vx(_2,e)}const JL=ie("ZodEmoji",(e,t)=>{bN.init(e,t),zt.init(e,t)}),e8=ie("ZodNanoID",(e,t)=>{_N.init(e,t),zt.init(e,t)}),t8=ie("ZodCUID",(e,t)=>{EN.init(e,t),zt.init(e,t)}),n8=ie("ZodCUID2",(e,t)=>{SN.init(e,t),zt.init(e,t)}),r8=ie("ZodULID",(e,t)=>{wN.init(e,t),zt.init(e,t)}),o8=ie("ZodXID",(e,t)=>{xN.init(e,t),zt.init(e,t)}),a8=ie("ZodKSUID",(e,t)=>{RN.init(e,t),zt.init(e,t)}),i8=ie("ZodIPv4",(e,t)=>{IN.init(e,t),zt.init(e,t)}),s8=ie("ZodIPv6",(e,t)=>{MN.init(e,t),zt.init(e,t)}),l8=ie("ZodCIDRv4",(e,t)=>{NN.init(e,t),zt.init(e,t)}),c8=ie("ZodCIDRv6",(e,t)=>{DN.init(e,t),zt.init(e,t)}),u8=ie("ZodBase64",(e,t)=>{LN.init(e,t),zt.init(e,t)}),d8=ie("ZodBase64URL",(e,t)=>{kN.init(e,t),zt.init(e,t)}),f8=ie("ZodE164",(e,t)=>{jN.init(e,t),zt.init(e,t)}),h8=ie("ZodJWT",(e,t)=>{UN.init(e,t),zt.init(e,t)}),wg=ie("ZodNumber",(e,t)=>{zx.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>Zx(e,o,i),e.gt=(o,i)=>e.check(AE(o,i)),e.gte=(o,i)=>e.check(Sd(o,i)),e.min=(o,i)=>e.check(Sd(o,i)),e.lt=(o,i)=>e.check(TE(o,i)),e.lte=(o,i)=>e.check(Ed(o,i)),e.max=(o,i)=>e.check(Ed(o,i)),e.int=o=>e.check(NE(o)),e.safe=o=>e.check(NE(o)),e.positive=o=>e.check(AE(0,o)),e.nonnegative=o=>e.check(Sd(0,o)),e.negative=o=>e.check(TE(0,o)),e.nonpositive=o=>e.check(Ed(0,o)),e.multipleOf=(o,i)=>e.check(CE(o,i)),e.step=(o,i)=>e.check(CE(o,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function E2(e){return FD(wg,e)}const p8=ie("ZodNumberFormat",(e,t)=>{BN.init(e,t),wg.init(e,t)});function NE(e){return VD(p8,e)}const S2=ie("ZodBoolean",(e,t)=>{FN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Yx(e,n,o)});function xg(e){return HD(S2,e)}const m8=ie("ZodNull",(e,t)=>{$N.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Kx(e,n,o)});function hH(e){return qD(m8,e)}const v8=ie("ZodAny",(e,t)=>{VN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Qx()});function pH(){return ZD(v8)}const g8=ie("ZodUnknown",(e,t)=>{HN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Xx()});function Ev(){return YD(g8)}const y8=ie("ZodNever",(e,t)=>{GN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Wx(e,n,o)});function w2(e){return KD(y8,e)}const b8=ie("ZodDate",(e,t)=>{qN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>Jx(e,o),e.min=(o,i)=>e.check(Sd(o,i)),e.max=(o,i)=>e.check(Ed(o,i));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function mH(e){return WD(b8,e)}const _8=ie("ZodArray",(e,t)=>{ZN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>a2(e,n,o,i),e.element=t.element,e.min=(n,o)=>e.check(Bd(n,o)),e.nonempty=n=>e.check(Bd(1,n)),e.max=(n,o)=>e.check(Hx(n,o)),e.length=(n,o)=>e.check(Gx(n,o)),e.unwrap=()=>e.element});function Sv(e,t){return dL(_8,e,t)}const Rg=ie("ZodObject",(e,t)=>{KN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>i2(e,n,o,i),at(e,"shape",()=>t.shape),e.keyof=()=>Sf(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ev()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ev()}),e.strict=()=>e.clone({...e._zod.def,catchall:w2()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>sM(e,n),e.safeExtend=n=>lM(e,n),e.merge=n=>cM(e,n),e.pick=n=>aM(e,n),e.omit=n=>iM(e,n),e.partial=(...n)=>uM(O2,e,n[0]),e.required=(...n)=>dM(T2,e,n[0])});function bn(e,t){const n={type:"object",shape:e??{},...Oe(t)};return new Rg(n)}function vH(e,t){return new Rg({type:"object",shape:e,catchall:w2(),...Oe(t)})}function gH(e,t){return new Rg({type:"object",shape:e,catchall:Ev(),...Oe(t)})}const x2=ie("ZodUnion",(e,t)=>{Fx.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>s2(e,n,o,i),e.options=t.options});function E8(e,t){return new x2({type:"union",options:e,...Oe(t)})}const S8=ie("ZodDiscriminatedUnion",(e,t)=>{x2.init(e,t),WN.init(e,t)});function yH(e,t,n){return new S8({type:"union",options:t,discriminator:e,...Oe(n)})}const w8=ie("ZodIntersection",(e,t)=>{QN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>l2(e,n,o,i)});function x8(e,t){return new w8({type:"intersection",left:e,right:t})}const R8=ie("ZodTuple",(e,t)=>{XN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>c2(e,n,o,i),e.rest=n=>e.clone({...e._zod.def,rest:n})});function bH(e,t,n){const o=t instanceof pt,i=o?n:t,l=o?t:null;return new R8({type:"tuple",items:e,rest:l,...Oe(i)})}const O8=ie("ZodRecord",(e,t)=>{JN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>u2(e,n,o,i),e.keyType=t.keyType,e.valueType=t.valueType});function _H(e,t,n){return new O8({type:"record",keyType:e,valueType:t,...Oe(n)})}const wv=ie("ZodEnum",(e,t)=>{eD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>e2(e,o,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,i)=>{const l={};for(const c of o)if(n.has(c))l[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new wv({...t,checks:[],...Oe(i),entries:l})},e.exclude=(o,i)=>{const l={...t.entries};for(const c of o)if(n.has(c))delete l[c];else throw new Error(`Key ${c} not found in enum`);return new wv({...t,checks:[],...Oe(i),entries:l})}});function Sf(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new wv({type:"enum",entries:n,...Oe(t)})}const T8=ie("ZodLiteral",(e,t)=>{tD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>t2(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function EH(e,t){return new T8({type:"literal",values:Array.isArray(e)?e:[e],...Oe(t)})}const A8=ie("ZodFile",(e,t)=>{nD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>n2(e,n,o),e.min=(n,o)=>e.check(XD(n,o)),e.max=(n,o)=>e.check(QD(n,o)),e.mime=(n,o)=>e.check(aL(Array.isArray(n)?n:[n],o))});function SH(e){return fL(A8,e)}const C8=ie("ZodTransform",(e,t)=>{rD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>o2(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new wx(e.constructor.name);n.addIssue=l=>{if(typeof l=="string")n.issues.push(ac(l,n.value,t));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=n.value),c.inst??(c.inst=e),n.issues.push(ac(c))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(l=>(n.value=l,n)):(n.value=i,n)}});function R2(e){return new C8({type:"transform",transform:e})}const O2=ie("ZodOptional",(e,t)=>{$x.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Sg(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function DE(e){return new O2({type:"optional",innerType:e})}const I8=ie("ZodExactOptional",(e,t)=>{oD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Sg(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function M8(e){return new I8({type:"optional",innerType:e})}const N8=ie("ZodNullable",(e,t)=>{aD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>d2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function LE(e){return new N8({type:"nullable",innerType:e})}const D8=ie("ZodDefault",(e,t)=>{iD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>h2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function L8(e,t){return new D8({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Tx(t)}})}const P8=ie("ZodPrefault",(e,t)=>{sD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>p2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function k8(e,t){return new P8({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Tx(t)}})}const T2=ie("ZodNonOptional",(e,t)=>{lD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>f2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function j8(e,t){return new T2({type:"nonoptional",innerType:e,...Oe(t)})}const z8=ie("ZodCatch",(e,t)=>{cD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>m2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function U8(e,t){return new z8({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const B8=ie("ZodPipe",(e,t)=>{uD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>v2(e,n,o,i),e.in=t.in,e.out=t.out});function xv(e,t){return new B8({type:"pipe",in:e,out:t})}const F8=ie("ZodReadonly",(e,t)=>{dD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>g2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function $8(e){return new F8({type:"readonly",innerType:e})}const V8=ie("ZodLazy",(e,t)=>{fD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>y2(e,n,o,i),e.unwrap=()=>e._zod.def.getter()});function Ua(e){return new V8({type:"lazy",getter:e})}const Og=ie("ZodCustom",(e,t)=>{hD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>r2(e,n)});function wH(e,t){return hL(Og,e??(()=>!0),t)}function H8(e,t={}){return pL(Og,e,t)}function G8(e){return mL(e)}function xH(e,t={}){const n=new Og({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...Oe(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}function q8(e,t){return xv(R2(e),t)}function Z8(e){return $D(wg,e)}function PE(e){return GD(S2,e)}function fe(...e){return XI(ux(e))}function Y8(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function jt({error:e,localization:t,localizeErrors:n=!0}){var o;const i="Request failed";if(!n)return e?.message?e.message:(o=e?.error)!=null&&o.message?e.error.message:i;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const l=e.error.code;if(t?.[l])return t[l]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||i}function Si(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Rv(e,t){for(const n in e)if(e[n]===t)return n}function ic(e,t){let n=Ve().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var K8={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},W8={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},Q8={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},X8={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},J8={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},eP={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},tP={...J8,...eP},nP={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},rP={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},oP={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},aP={INVALID_SESSION_TOKEN:"Invalid session token"},iP={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},sP={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},lP={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},cP={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},uP={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},dP={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},fP={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},hP={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...X8,...K8,...W8,...Q8,...tP,...nP,...rP,...oP,...aP,...iP,...sP,...lP,...cP,...uP,...dP,...fP},pP={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},kE={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},jE={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function mP(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const vP=e=>{switch(e){case"success":return bP;case"info":return EP;case"warning":return _P;case"error":return SP;default:return null}},gP=Array(12).fill(0),yP=({visible:e,className:t})=>V.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},V.createElement("div",{className:"sonner-spinner"},gP.map((n,o)=>V.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),bP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),_P=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),EP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),SP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),wP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},V.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),V.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xP=()=>{const[e,t]=V.useState(document.hidden);return V.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ov=1;class RP{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:o,...i}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ov++,c=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),c?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:o}),{...f,...t,id:l,dismissible:d,title:o}):f):this.addToast({title:o,...i,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(o=>o({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let o;n.loading!==void 0&&(o=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let l=o!==void 0,c;const d=i.then(async h=>{if(c=["resolve",h],V.isValidElement(h))l=!1,this.create({id:o,type:"default",message:h});else if(TP(h)&&!h.ok){l=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof p=="object"&&!V.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:y,...S})}else if(h instanceof Error){l=!1;const p=typeof n.error=="function"?await n.error(h):n.error,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!V.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:y,...S})}else if(n.success!==void 0){l=!1;const p=typeof n.success=="function"?await n.success(h):n.success,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!V.isValidElement(p)?p:{message:p};this.create({id:o,type:"success",description:y,...S})}}).catch(async h=>{if(c=["reject",h],n.error!==void 0){l=!1;const v=typeof n.error=="function"?await n.error(h):n.error,p=typeof n.description=="function"?await n.description(h):n.description,_=typeof v=="object"&&!V.isValidElement(v)?v:{message:v};this.create({id:o,type:"error",description:p,..._})}}).finally(()=>{l&&(this.dismiss(o),o=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((h,v)=>d.then(()=>c[0]==="reject"?v(c[1]):h(c[1])).catch(v));return typeof o!="string"&&typeof o!="number"?{unwrap:f}:Object.assign(o,{unwrap:f})},this.custom=(t,n)=>{const o=n?.id||Ov++;return this.create({jsx:t(o),id:o,...n}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Wn=new RP,OP=(e,t)=>{const n=t?.id||Ov++;return Wn.addToast({title:e,...t,id:n}),n},TP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",AP=OP,CP=()=>Wn.toasts,IP=()=>Wn.getActiveToasts(),zE=Object.assign(AP,{success:Wn.success,info:Wn.info,warning:Wn.warning,error:Wn.error,custom:Wn.custom,message:Wn.message,promise:Wn.promise,dismiss:Wn.dismiss,loading:Wn.loading},{getHistory:CP,getToasts:IP});mP("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function td(e){return e.label!==void 0}const MP=3,NP="24px",DP="16px",UE=4e3,LP=356,PP=14,kP=45,jP=200;function oo(...e){return e.filter(Boolean).join(" ")}function zP(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}const UP=e=>{var t,n,o,i,l,c,d,f,h;const{invert:v,toast:p,unstyled:y,interacting:_,setHeights:S,visibleToasts:w,heights:T,index:O,toasts:A,expanded:C,removeToast:R,defaultRichColors:I,closeButton:k,style:D,cancelButtonStyle:N,actionButtonStyle:z,className:W="",descriptionClassName:$="",duration:q,position:j,gap:X,expandByDefault:oe,classNames:L,icons:F,closeButtonAriaLabel:G="Close toast"}=e,[re,ye]=V.useState(null),[P,Q]=V.useState(null),[te,se]=V.useState(!1),[me,_e]=V.useState(!1),[be,Se]=V.useState(!1),[De,Le]=V.useState(!1),[Ee,ze]=V.useState(!1),[Nt,ge]=V.useState(0),[ve,Re]=V.useState(0),ke=V.useRef(p.duration||q||UE),et=V.useRef(null),Ue=V.useRef(null),Qe=O===0,U=O+1<=w,Z=p.type,Y=p.dismissible!==!1,ue=p.className||"",pe=p.descriptionClassName||"",he=V.useMemo(()=>T.findIndex(Me=>Me.toastId===p.id)||0,[T,p.id]),xe=V.useMemo(()=>{var Me;return(Me=p.closeButton)!=null?Me:k},[p.closeButton,k]),Be=V.useMemo(()=>p.duration||q||UE,[p.duration,q]),Ze=V.useRef(0),ft=V.useRef(0),Mn=V.useRef(0),Tt=V.useRef(null),[Zt,At]=j.split("-"),an=V.useMemo(()=>T.reduce((Me,Ke,xt)=>xt>=he?Me:Me+Ke.height,0),[T,he]),Yt=xP(),qo=p.invert||v,_o=Z==="loading";ft.current=V.useMemo(()=>he*X+an,[he,an]),V.useEffect(()=>{ke.current=Be},[Be]),V.useEffect(()=>{se(!0)},[]),V.useEffect(()=>{const Me=Ue.current;if(Me){const Ke=Me.getBoundingClientRect().height;return Re(Ke),S(xt=>[{toastId:p.id,height:Ke,position:p.position},...xt]),()=>S(xt=>xt.filter(bt=>bt.toastId!==p.id))}},[S,p.id]),V.useLayoutEffect(()=>{if(!te)return;const Me=Ue.current,Ke=Me.style.height;Me.style.height="auto";const xt=Me.getBoundingClientRect().height;Me.style.height=Ke,Re(xt),S(bt=>bt.find(lt=>lt.toastId===p.id)?bt.map(lt=>lt.toastId===p.id?{...lt,height:xt}:lt):[{toastId:p.id,height:xt,position:p.position},...bt])},[te,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const Ie=V.useCallback(()=>{_e(!0),ge(ft.current),S(Me=>Me.filter(Ke=>Ke.toastId!==p.id)),setTimeout(()=>{R(p)},jP)},[p,R,S,ft]);V.useEffect(()=>{if(p.promise&&Z==="loading"||p.duration===1/0||p.type==="loading")return;let Me;return C||_||Yt?(()=>{if(Mn.current<Ze.current){const bt=new Date().getTime()-Ze.current;ke.current=ke.current-bt}Mn.current=new Date().getTime()})():ke.current!==1/0&&(Ze.current=new Date().getTime(),Me=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Ie()},ke.current)),()=>clearTimeout(Me)},[C,_,p,Z,Yt,Ie]),V.useEffect(()=>{p.delete&&(Ie(),p.onDismiss==null||p.onDismiss.call(p,p))},[Ie,p.delete]);function tt(){var Me;if(F?.loading){var Ke;return V.createElement("div",{className:oo(L?.loader,p==null||(Ke=p.classNames)==null?void 0:Ke.loader,"sonner-loader"),"data-visible":Z==="loading"},F.loading)}return V.createElement(yP,{className:oo(L?.loader,p==null||(Me=p.classNames)==null?void 0:Me.loader),visible:Z==="loading"})}const it=p.icon||F?.[Z]||vP(Z);var Ye,st;return V.createElement("li",{tabIndex:0,ref:Ue,className:oo(W,ue,L?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,L?.default,L?.[Z],p==null||(n=p.classNames)==null?void 0:n[Z]),"data-sonner-toast":"","data-rich-colors":(Ye=p.richColors)!=null?Ye:I,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":te,"data-promise":!!p.promise,"data-swiped":Ee,"data-removed":me,"data-visible":U,"data-y-position":Zt,"data-x-position":At,"data-index":O,"data-front":Qe,"data-swiping":be,"data-dismissible":Y,"data-type":Z,"data-invert":qo,"data-swipe-out":De,"data-swipe-direction":P,"data-expanded":!!(C||oe&&te),"data-testid":p.testId,style:{"--index":O,"--toasts-before":O,"--z-index":A.length-O,"--offset":`${me?Nt:ft.current}px`,"--initial-height":oe?"auto":`${ve}px`,...D,...p.style},onDragEnd:()=>{Se(!1),ye(null),Tt.current=null},onPointerDown:Me=>{Me.button!==2&&(_o||!Y||(et.current=new Date,ge(ft.current),Me.target.setPointerCapture(Me.pointerId),Me.target.tagName!=="BUTTON"&&(Se(!0),Tt.current={x:Me.clientX,y:Me.clientY})))},onPointerUp:()=>{var Me,Ke,xt;if(De||!Y)return;Tt.current=null;const bt=Number(((Me=Ue.current)==null?void 0:Me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Nn=Number(((Ke=Ue.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),lt=new Date().getTime()-((xt=et.current)==null?void 0:xt.getTime()),Ct=re==="x"?bt:Nn,br=Math.abs(Ct)/lt;if(Math.abs(Ct)>=kP||br>.11){ge(ft.current),p.onDismiss==null||p.onDismiss.call(p,p),Q(re==="x"?bt>0?"right":"left":Nn>0?"down":"up"),Ie(),Le(!0);return}else{var _n,Bn;(_n=Ue.current)==null||_n.style.setProperty("--swipe-amount-x","0px"),(Bn=Ue.current)==null||Bn.style.setProperty("--swipe-amount-y","0px")}ze(!1),Se(!1),ye(null)},onPointerMove:Me=>{var Ke,xt,bt;if(!Tt.current||!Y||((Ke=window.getSelection())==null?void 0:Ke.toString().length)>0)return;const lt=Me.clientY-Tt.current.y,Ct=Me.clientX-Tt.current.x;var br;const _n=(br=e.swipeDirections)!=null?br:zP(j);!re&&(Math.abs(Ct)>1||Math.abs(lt)>1)&&ye(Math.abs(Ct)>Math.abs(lt)?"x":"y");let Bn={x:0,y:0};const Ri=zr=>1/(1.5+Math.abs(zr)/20);if(re==="y"){if(_n.includes("top")||_n.includes("bottom"))if(_n.includes("top")&<<0||_n.includes("bottom")&<>0)Bn.y=lt;else{const zr=lt*Ri(lt);Bn.y=Math.abs(zr)<Math.abs(lt)?zr:lt}}else if(re==="x"&&(_n.includes("left")||_n.includes("right")))if(_n.includes("left")&&Ct<0||_n.includes("right")&&Ct>0)Bn.x=Ct;else{const zr=Ct*Ri(Ct);Bn.x=Math.abs(zr)<Math.abs(Ct)?zr:Ct}(Math.abs(Bn.x)>0||Math.abs(Bn.y)>0)&&ze(!0),(xt=Ue.current)==null||xt.style.setProperty("--swipe-amount-x",`${Bn.x}px`),(bt=Ue.current)==null||bt.style.setProperty("--swipe-amount-y",`${Bn.y}px`)}},xe&&!p.jsx&&Z!=="loading"?V.createElement("button",{"aria-label":G,"data-disabled":_o,"data-close-button":!0,onClick:_o||!Y?()=>{}:()=>{Ie(),p.onDismiss==null||p.onDismiss.call(p,p)},className:oo(L?.closeButton,p==null||(o=p.classNames)==null?void 0:o.closeButton)},(st=F?.close)!=null?st:wP):null,(Z||p.icon||p.promise)&&p.icon!==null&&(F?.[Z]!==null||p.icon)?V.createElement("div",{"data-icon":"",className:oo(L?.icon,p==null||(i=p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||tt():null,p.type!=="loading"?it:null):null,V.createElement("div",{"data-content":"",className:oo(L?.content,p==null||(l=p.classNames)==null?void 0:l.content)},V.createElement("div",{"data-title":"",className:oo(L?.title,p==null||(c=p.classNames)==null?void 0:c.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?V.createElement("div",{"data-description":"",className:oo($,pe,L?.description,p==null||(d=p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),V.isValidElement(p.cancel)?p.cancel:p.cancel&&td(p.cancel)?V.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||N,onClick:Me=>{td(p.cancel)&&Y&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Me),Ie())},className:oo(L?.cancelButton,p==null||(f=p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,V.isValidElement(p.action)?p.action:p.action&&td(p.action)?V.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||z,onClick:Me=>{td(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Me),!Me.defaultPrevented&&Ie())},className:oo(L?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function BE(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function BP(e,t){const n={};return[e,t].forEach((o,i)=>{const l=i===1,c=l?"--mobile-offset":"--offset",d=l?DP:NP;function f(h){["top","right","bottom","left"].forEach(v=>{n[`${c}-${v}`]=typeof h=="number"?`${h}px`:h})}typeof o=="number"||typeof o=="string"?f(o):typeof o=="object"?["top","right","bottom","left"].forEach(h=>{o[h]===void 0?n[`${c}-${h}`]=d:n[`${c}-${h}`]=typeof o[h]=="number"?`${o[h]}px`:o[h]}):f(d)}),n}const FP=V.forwardRef(function(t,n){const{id:o,invert:i,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:f,className:h,offset:v,mobileOffset:p,theme:y="light",richColors:_,duration:S,style:w,visibleToasts:T=MP,toastOptions:O,dir:A=BE(),gap:C=PP,icons:R,containerAriaLabel:I="Notifications"}=t,[k,D]=V.useState([]),N=V.useMemo(()=>o?k.filter(te=>te.toasterId===o):k.filter(te=>!te.toasterId),[k,o]),z=V.useMemo(()=>Array.from(new Set([l].concat(N.filter(te=>te.position).map(te=>te.position)))),[N,l]),[W,$]=V.useState([]),[q,j]=V.useState(!1),[X,oe]=V.useState(!1),[L,F]=V.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=V.useRef(null),re=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ye=V.useRef(null),P=V.useRef(!1),Q=V.useCallback(te=>{D(se=>{var me;return(me=se.find(_e=>_e.id===te.id))!=null&&me.delete||Wn.dismiss(te.id),se.filter(({id:_e})=>_e!==te.id)})},[]);return V.useEffect(()=>Wn.subscribe(te=>{if(te.dismiss){requestAnimationFrame(()=>{D(se=>se.map(me=>me.id===te.id?{...me,delete:!0}:me))});return}setTimeout(()=>{Yw.flushSync(()=>{D(se=>{const me=se.findIndex(_e=>_e.id===te.id);return me!==-1?[...se.slice(0,me),{...se[me],...te},...se.slice(me+1)]:[te,...se]})})})}),[k]),V.useEffect(()=>{if(y!=="system"){F(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const te=window.matchMedia("(prefers-color-scheme: dark)");try{te.addEventListener("change",({matches:se})=>{F(se?"dark":"light")})}catch{te.addListener(({matches:me})=>{try{F(me?"dark":"light")}catch(_e){console.error(_e)}})}},[y]),V.useEffect(()=>{k.length<=1&&j(!1)},[k]),V.useEffect(()=>{const te=se=>{var me;if(c.every(Se=>se[Se]||se.code===Se)){var be;j(!0),(be=G.current)==null||be.focus()}se.code==="Escape"&&(document.activeElement===G.current||(me=G.current)!=null&&me.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[c]),V.useEffect(()=>{if(G.current)return()=>{ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null,P.current=!1)}},[G.current]),V.createElement("section",{ref:n,"aria-label":`${I} ${re}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((te,se)=>{var me;const[_e,be]=te.split("-");return N.length?V.createElement("ol",{key:te,dir:A==="auto"?BE():A,tabIndex:-1,ref:G,className:h,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":_e,"data-x-position":be,style:{"--front-toast-height":`${((me=W[0])==null?void 0:me.height)||0}px`,"--width":`${LP}px`,"--gap":`${C}px`,...w,...BP(v,p)},onBlur:Se=>{P.current&&!Se.currentTarget.contains(Se.relatedTarget)&&(P.current=!1,ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null))},onFocus:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||P.current||(P.current=!0,ye.current=Se.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{X||j(!1)},onDragEnd:()=>j(!1),onPointerDown:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||oe(!0)},onPointerUp:()=>oe(!1)},N.filter(Se=>!Se.position&&se===0||Se.position===te).map((Se,De)=>{var Le,Ee;return V.createElement(UP,{key:Se.id,icons:R,index:De,toast:Se,defaultRichColors:_,duration:(Le=O?.duration)!=null?Le:S,className:O?.className,descriptionClassName:O?.descriptionClassName,invert:i,visibleToasts:T,closeButton:(Ee=O?.closeButton)!=null?Ee:f,interacting:X,position:te,style:O?.style,unstyled:O?.unstyled,classNames:O?.classNames,cancelButtonStyle:O?.cancelButtonStyle,actionButtonStyle:O?.actionButtonStyle,closeButtonAriaLabel:O?.closeButtonAriaLabel,removeToast:Q,toasts:N.filter(ze=>ze.position==Se.position),heights:W.filter(ze=>ze.position==Se.position),setHeights:$,expandByDefault:d,gap:C,expanded:q,swipeDirections:t.swipeDirections})})):null}))}),A2=E.createContext({});function C2(){return E.useContext(A2)}var Rm,FE;function $P(){if(FE)return Rm;FE=1;var e=function(){};return Rm=e,Rm}var VP=$P();const HP=_i(VP);function GP({async:e,appendTo:t,defer:n,id:o,nonce:i,src:l}){const c=document.createElement("script");e!==void 0&&(c.async=e),n!==void 0&&(c.defer=n),o&&(c.id=o),i&&c.setAttribute("nonce",i),c.src=l,(t==="head"?document.head:document.body).appendChild(c)}var qP=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n};let Ql=null,sc=!1;const Gd=new Set,qd=new Set,ZP=typeof window<"u",Rs="___grecaptcha_cfg",I2=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function YP(){if(!ZP)return;function e(n){if(sc)n();else{window[Rs]||(window[Rs]={});const o=window[Rs];o.fns||(o.fns=[]),o.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){sc=!0;for(const n of qd)n();qd.clear()}window[I2]=t}function KP({language:e,onLoadCallbackName:t,render:n,useEnterprise:o=!1,useRecaptchaNet:i=!1}){const l=i?"recaptcha.net":"google.com",c=o?"enterprise.js":"api.js",d=new URLSearchParams({render:n});return t&&d.set("onload",t),e&&d.set("hl",e),`https://www.${l}/recaptcha/${c}?${d.toString()}`}function WP({language:e,render:t,scriptProps:n,useEnterprise:o,useRecaptchaNet:i}){const l={id:"google-recaptcha-v3"},c=KP({language:e,onLoadCallbackName:I2,render:t,useEnterprise:o,useRecaptchaNet:i});if(Ql){if(Ql!==c)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Ql=c,GP(Object.assign(Object.assign(Object.assign({},l),n),{src:c}))}function QP(e){if(!window[Rs])return;const t=window[Rs];t.clients&&delete t.clients[e]}function XP(e,t){var{onLoadCallback:n,onLoadCallbackName:o}=t,i=qP(t,["onLoadCallback","onLoadCallbackName"]);if(Gd.size===0&&YP(),WP(i),Gd.add(e),n&&(sc?n():qd.add(n)),o){let l=function(){if(!o)return;const c=window[o];typeof c=="function"&&c()};sc?l():qd.add(l)}}function JP(e){var t,n,o;Gd.delete(e),Gd.size===0&&(window.grecaptcha=void 0,window[Rs]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Ql}"]`))===null||n===void 0||n.remove(),(o=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||o===void 0||o.remove(),Ql=null,sc=!1)}let $E=!1;function e7({container:e,children:t,language:n,reCaptchaKey:o,scriptProps:i,useEnterprise:l,useRecaptchaNet:c}){var d,f,h,v,p,y,_;const S=E.useId(),[w,T]=E.useState(null),[O,A]=E.useState(null),C=E.useRef(!1);E.useEffect(()=>{function D(){var N;const z=l?(N=window.grecaptcha)===null||N===void 0?void 0:N.enterprise:window.grecaptcha;if(!z)throw new Error("reCAPTCHA not found");if(!z.ready)throw new Error("reCAPTCHA ready callback not found");z.ready(()=>{T(z)})}return XP(S,{language:n,onLoadCallback:D,onLoadCallbackName:i?.onLoadCallbackName,render:e?.element?"explicit":o,scriptProps:{appendTo:i?.appendTo,async:i?.async,defer:i?.defer,id:i?.id,nonce:i?.nonce},useEnterprise:l,useRecaptchaNet:c}),()=>{JP(S),T(null)}},[e?.element,S,n,o,i?.appendTo,i?.async,i?.defer,i?.id,i?.nonce,i?.onLoadCallbackName,l,c]),E.useEffect(()=>{var D,N,z;if(!e?.element||!w?.render)return;const W={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((D=e.parameters)===null||D===void 0?void 0:D.badge)||"inline",callback:e.parameters.callback,sitekey:o,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},$=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!$)throw new Error("reCAPTCHA container element not found");const q=w.render($,W);return!((N=e?.parameters)===null||N===void 0)&&N.hidden&&($E||(HP(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),$E=!0),(z=$.querySelector(".grecaptcha-badge"))===null||z===void 0||z.style.setProperty("display","none")),A(q),C.current=!0,()=>{A(null),C.current=!1,QP(q),$.innerHTML=""}},[e?.element,(d=e?.parameters)===null||d===void 0?void 0:d.badge,(f=e?.parameters)===null||f===void 0?void 0:f.hidden,(h=e?.parameters)===null||h===void 0?void 0:h.callback,(v=e?.parameters)===null||v===void 0?void 0:v.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(y=e?.parameters)===null||y===void 0?void 0:y.tabindex,(_=e?.parameters)===null||_===void 0?void 0:_.theme,w,o]);const R=!!e?.element,I=R?O:o,k=E.useMemo(()=>I!==null&&w?.execute?D=>{if(I===null||!w?.execute)throw new Error("reCAPTCHA has not been loaded");return R&&!C.current?(console.warn("Client ID not mounted"),null):w.execute(I,{action:D})}:void 0,[I,w,R]);return b.jsx(A2.Provider,{value:{container:e?.element,executeRecaptcha:k,reCaptchaInstance:w},children:t})}var t7=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const o of n)o()}}},Ir=new t7;function n7(){return()=>{}}function Ho(){return E.useSyncExternalStore(n7,()=>!0,()=>!1)}function Tg(){const[e,t]=E.useState();return E.useEffect(()=>{const n=()=>{const i=document.documentElement.getAttribute("lang");t(i??void 0)};n();const o=new MutationObserver(i=>{for(const l of i)l.attributeName==="lang"&&n()});return o.observe(document.documentElement,{attributes:!0}),()=>{o.disconnect()}},[]),{lang:e}}function Ag(){const[e,t]=E.useState("light");return E.useEffect(()=>{const n=()=>{var i;const l=document.documentElement.classList.contains("dark")||((i=document.documentElement.getAttribute("style"))==null?void 0:i.includes("color-scheme: dark"));t(l?"dark":"light")};n();const o=new MutationObserver(i=>{for(const l of i)(l.attributeName==="style"||l.attributeName==="class")&&n()});return o.observe(document.documentElement,{attributes:!0}),()=>{o.disconnect()}},[]),{theme:e}}function r7({children:e}){const t=Ho(),{captcha:n}=E.useContext(qe);return n?.provider!=="google-recaptcha-v3"?e:b.jsxs(e7,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&b.jsx("style",{children:`
|
|
48
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const d=c[1];if(t===c[0]){l(c);continue}if(e.external){const h=e.external.registry.get(c[0])?.id;if(t!==c[0]&&h){l(c);continue}}if(e.metadataRegistry.get(c[0])?.id){l(c);continue}if(d.cycle){l(c);continue}if(d.count>1&&e.reused==="ref"){l(c);continue}}}function Hd(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=c=>{const d=e.seen.get(c);if(d.ref===null)return;const f=d.def??d.schema,h={...f},v=d.ref;if(d.ref=null,v){o(v);const y=e.seen.get(v),_=y.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(_)):Object.assign(f,_),Object.assign(f,h),c._zod.parent===v)for(const w in f)w==="$ref"||w==="allOf"||w in h||delete f[w];if(_.$ref)for(const w in f)w==="$ref"||w==="allOf"||w in y.def&&JSON.stringify(f[w])===JSON.stringify(y.def[w])&&delete f[w]}const p=c._zod.parent;if(p&&p!==v){o(p);const y=e.seen.get(p);if(y?.schema.$ref&&(f.$ref=y.schema.$ref,y.def))for(const _ in f)_==="$ref"||_==="allOf"||_ in y.def&&JSON.stringify(f[_])===JSON.stringify(y.def[_])&&delete f[_]}e.override({zodSchema:c,jsonSchema:f,path:d.path??[]})};for(const c of[...e.seen.entries()].reverse())o(c[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(c)}Object.assign(i,n.def??n.schema);const l=e.external?.defs??{};for(const c of e.seen.entries()){const d=c[1];d.def&&d.defId&&(l[d.defId]=d.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?i.$defs=l:i.definitions=l);try{const c=JSON.parse(JSON.stringify(i));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Gd(t,"input",e.processors),output:Gd(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function jn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return jn(o.element,n);if(o.type==="set")return jn(o.valueType,n);if(o.type==="lazy")return jn(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return jn(o.innerType,n);if(o.type==="intersection")return jn(o.left,n)||jn(o.right,n);if(o.type==="record"||o.type==="map")return jn(o.keyType,n)||jn(o.valueType,n);if(o.type==="pipe")return jn(o.in,n)||jn(o.out,n);if(o.type==="object"){for(const i in o.shape)if(jn(o.shape[i],n))return!0;return!1}if(o.type==="union"){for(const i of o.options)if(jn(i,n))return!0;return!1}if(o.type==="tuple"){for(const i of o.items)if(jn(i,n))return!0;return!!(o.rest&&jn(o.rest,n))}return!1}const gL=(e,t={})=>n=>{const o=$d({...n,processors:t});return Ot(e,o),Vd(o,e),Hd(o,e)},Gd=(e,t,n={})=>o=>{const{libraryOptions:i,target:l}=o??{},c=$d({...i??{},target:l,io:t,processors:n});return Ot(e,c),Vd(c,e),Hd(c,e)},yL={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},qx=(e,t,n,o)=>{const i=n;i.type="string";const{minimum:l,maximum:c,format:d,patterns:f,contentEncoding:h}=e._zod.bag;if(typeof l=="number"&&(i.minLength=l),typeof c=="number"&&(i.maxLength=c),d&&(i.format=yL[d]??d,i.format===""&&delete i.format,d==="time"&&delete i.format),h&&(i.contentEncoding=h),f&&f.size>0){const v=[...f];v.length===1?i.pattern=v[0].source:v.length>1&&(i.allOf=[...v.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Zx=(e,t,n,o)=>{const i=n,{minimum:l,maximum:c,format:d,multipleOf:f,exclusiveMaximum:h,exclusiveMinimum:v}=e._zod.bag;typeof d=="string"&&d.includes("int")?i.type="integer":i.type="number",typeof v=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=v,i.exclusiveMinimum=!0):i.exclusiveMinimum=v),typeof l=="number"&&(i.minimum=l,typeof v=="number"&&t.target!=="draft-04"&&(v>=l?delete i.minimum:delete i.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=h,i.exclusiveMaximum=!0):i.exclusiveMaximum=h),typeof c=="number"&&(i.maximum=c,typeof h=="number"&&t.target!=="draft-04"&&(h<=c?delete i.maximum:delete i.exclusiveMaximum)),typeof f=="number"&&(i.multipleOf=f)},Yx=(e,t,n,o)=>{n.type="boolean"},bL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},_L=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Kx=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},EL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},SL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Wx=(e,t,n,o)=>{n.not={}},Qx=(e,t,n,o)=>{},Xx=(e,t,n,o)=>{},Jx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},e2=(e,t,n,o)=>{const i=e._zod.def,l=Rx(i.entries);l.every(c=>typeof c=="number")&&(n.type="number"),l.every(c=>typeof c=="string")&&(n.type="string"),n.enum=l},t2=(e,t,n,o)=>{const i=e._zod.def,l=[];for(const c of i.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");l.push(Number(c))}else l.push(c);if(l.length!==0)if(l.length===1){const c=l[0];n.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[c]:n.const=c}else l.every(c=>typeof c=="number")&&(n.type="number"),l.every(c=>typeof c=="string")&&(n.type="string"),l.every(c=>typeof c=="boolean")&&(n.type="boolean"),l.every(c=>c===null)&&(n.type="null"),n.enum=l},wL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},xL=(e,t,n,o)=>{const i=n,l=e._zod.pattern;if(!l)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=l.source},n2=(e,t,n,o)=>{const i=n,l={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:d,mime:f}=e._zod.bag;c!==void 0&&(l.minLength=c),d!==void 0&&(l.maxLength=d),f?f.length===1?(l.contentMediaType=f[0],Object.assign(i,l)):(Object.assign(i,l),i.anyOf=f.map(h=>({contentMediaType:h}))):Object.assign(i,l)},RL=(e,t,n,o)=>{n.type="boolean"},r2=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},OL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},o2=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},TL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},AL=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},a2=(e,t,n,o)=>{const i=n,l=e._zod.def,{minimum:c,maximum:d}=e._zod.bag;typeof c=="number"&&(i.minItems=c),typeof d=="number"&&(i.maxItems=d),i.type="array",i.items=Ot(l.element,t,{...o,path:[...o.path,"items"]})},i2=(e,t,n,o)=>{const i=n,l=e._zod.def;i.type="object",i.properties={};const c=l.shape;for(const h in c)i.properties[h]=Ot(c[h],t,{...o,path:[...o.path,"properties",h]});const d=new Set(Object.keys(c)),f=new Set([...d].filter(h=>{const v=l.shape[h]._zod;return t.io==="input"?v.optin===void 0:v.optout===void 0}));f.size>0&&(i.required=Array.from(f)),l.catchall?._zod.def.type==="never"?i.additionalProperties=!1:l.catchall?l.catchall&&(i.additionalProperties=Ot(l.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},s2=(e,t,n,o)=>{const i=e._zod.def,l=i.inclusive===!1,c=i.options.map((d,f)=>Ot(d,t,{...o,path:[...o.path,l?"oneOf":"anyOf",f]}));l?n.oneOf=c:n.anyOf=c},l2=(e,t,n,o)=>{const i=e._zod.def,l=Ot(i.left,t,{...o,path:[...o.path,"allOf",0]}),c=Ot(i.right,t,{...o,path:[...o.path,"allOf",1]}),d=h=>"allOf"in h&&Object.keys(h).length===1,f=[...d(l)?l.allOf:[l],...d(c)?c.allOf:[c]];n.allOf=f},c2=(e,t,n,o)=>{const i=n,l=e._zod.def;i.type="array";const c=t.target==="draft-2020-12"?"prefixItems":"items",d=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",f=l.items.map((y,_)=>Ot(y,t,{...o,path:[...o.path,c,_]})),h=l.rest?Ot(l.rest,t,{...o,path:[...o.path,d,...t.target==="openapi-3.0"?[l.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=f,h&&(i.items=h)):t.target==="openapi-3.0"?(i.items={anyOf:f},h&&i.items.anyOf.push(h),i.minItems=f.length,h||(i.maxItems=f.length)):(i.items=f,h&&(i.additionalItems=h));const{minimum:v,maximum:p}=e._zod.bag;typeof v=="number"&&(i.minItems=v),typeof p=="number"&&(i.maxItems=p)},u2=(e,t,n,o)=>{const i=n,l=e._zod.def;i.type="object";const c=l.keyType,f=c._zod.bag?.patterns;if(l.mode==="loose"&&f&&f.size>0){const v=Ot(l.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});i.patternProperties={};for(const p of f)i.patternProperties[p.source]=v}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=Ot(l.keyType,t,{...o,path:[...o.path,"propertyNames"]})),i.additionalProperties=Ot(l.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const h=c._zod.values;if(h){const v=[...h].filter(p=>typeof p=="string"||typeof p=="number");v.length>0&&(i.required=v)}},d2=(e,t,n,o)=>{const i=e._zod.def,l=Ot(i.innerType,t,o),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=i.innerType,n.nullable=!0):n.anyOf=[l,{type:"null"}]},f2=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType},h2=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},p2=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},m2=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType;let c;try{c=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=c},v2=(e,t,n,o)=>{const i=e._zod.def,l=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Ot(l,t,o);const c=t.seen.get(e);c.ref=l},g2=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType,n.readOnly=!0},CL=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType},Sg=(e,t,n,o)=>{const i=e._zod.def;Ot(i.innerType,t,o);const l=t.seen.get(e);l.ref=i.innerType},y2=(e,t,n,o)=>{const i=e._zod.innerType;Ot(i,t,o);const l=t.seen.get(e);l.ref=i},IE={string:qx,number:Zx,boolean:Yx,bigint:bL,symbol:_L,null:Kx,undefined:EL,void:SL,never:Wx,any:Qx,unknown:Xx,date:Jx,enum:e2,literal:t2,nan:wL,template_literal:xL,file:n2,success:RL,custom:r2,function:OL,transform:o2,map:TL,set:AL,array:a2,object:i2,union:s2,intersection:l2,tuple:c2,record:u2,nullable:d2,nonoptional:f2,default:h2,prefault:p2,catch:m2,pipe:v2,readonly:g2,promise:CL,optional:Sg,lazy:y2};function fH(e,t){if("_idmap"in e){const o=e,i=$d({...t,processors:IE}),l={};for(const f of o._idmap.entries()){const[h,v]=f;Ot(v,i)}const c={},d={registry:o,uri:t?.uri,defs:l};i.external=d;for(const f of o._idmap.entries()){const[h,v]=f;Vd(i,v),c[h]=Hd(i,v)}if(Object.keys(l).length>0){const f=i.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[f]:l}}return{schemas:c}}const n=$d({...t,processors:IE});return Ot(e,n),Vd(n,e),Hd(n,e)}const IL=ie("ZodISODateTime",(e,t)=>{ON.init(e,t),zt.init(e,t)});function ML(e){return jD(IL,e)}const NL=ie("ZodISODate",(e,t)=>{TN.init(e,t),zt.init(e,t)});function DL(e){return zD(NL,e)}const LL=ie("ZodISOTime",(e,t)=>{AN.init(e,t),zt.init(e,t)});function PL(e){return UD(LL,e)}const kL=ie("ZodISODuration",(e,t)=>{CN.init(e,t),zt.init(e,t)});function jL(e){return BD(kL,e)}const zL=(e,t)=>{_g.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>hM(e,n)},flatten:{value:n=>fM(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,bv,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,bv,2)}},isEmpty:{get(){return e.issues.length===0}}})},jr=ie("ZodError",zL,{Parent:Error}),UL=yf(jr),BL=bf(jr),FL=_f(jr),$L=Ef(jr),VL=yM(jr),HL=bM(jr),GL=_M(jr),qL=EM(jr),ZL=SM(jr),YL=wM(jr),KL=xM(jr),WL=RM(jr),yt=ie("ZodType",(e,t)=>(pt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Gd(e,"input"),output:Gd(e,"output")}}),e.toJSONSchema=gL(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ja(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>za(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>UL(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>FL(e,n,o),e.parseAsync=async(n,o)=>BL(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>$L(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>VL(e,n,o),e.decode=(n,o)=>HL(e,n,o),e.encodeAsync=async(n,o)=>GL(e,n,o),e.decodeAsync=async(n,o)=>qL(e,n,o),e.safeEncode=(n,o)=>ZL(e,n,o),e.safeDecode=(n,o)=>YL(e,n,o),e.safeEncodeAsync=async(n,o)=>KL(e,n,o),e.safeDecodeAsync=async(n,o)=>WL(e,n,o),e.refine=(n,o)=>e.check(H8(n,o)),e.superRefine=n=>e.check(G8(n)),e.overwrite=n=>e.check(js(n)),e.optional=()=>DE(e),e.exactOptional=()=>M8(e),e.nullable=()=>LE(e),e.nullish=()=>DE(LE(e)),e.nonoptional=n=>j8(e,n),e.array=()=>Sv(e),e.or=n=>E8([e,n]),e.and=n=>x8(e,n),e.transform=n=>xv(e,R2(n)),e.default=n=>L8(e,n),e.prefault=n=>k8(e,n),e.catch=n=>U8(e,n),e.pipe=n=>xv(e,n),e.readonly=()=>$8(e),e.describe=n=>{const o=e.clone();return ql.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return ql.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ql.get(e);const o=e.clone();return ql.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),b2=ie("_ZodString",(e,t)=>{Eg.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>qx(e,o,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(JD(...o)),e.includes=(...o)=>e.check(nL(...o)),e.startsWith=(...o)=>e.check(rL(...o)),e.endsWith=(...o)=>e.check(oL(...o)),e.min=(...o)=>e.check(Fd(...o)),e.max=(...o)=>e.check(Hx(...o)),e.length=(...o)=>e.check(Gx(...o)),e.nonempty=(...o)=>e.check(Fd(1,...o)),e.lowercase=o=>e.check(eL(o)),e.uppercase=o=>e.check(tL(o)),e.trim=()=>e.check(sL()),e.normalize=(...o)=>e.check(iL(...o)),e.toLowerCase=()=>e.check(lL()),e.toUpperCase=()=>e.check(cL()),e.slugify=()=>e.check(uL())}),QL=ie("ZodString",(e,t)=>{Eg.init(e,t),b2.init(e,t),e.email=n=>e.check(gD(XL,n)),e.url=n=>e.check(Vx(_2,n)),e.jwt=n=>e.check(kD(h8,n)),e.emoji=n=>e.check(SD(JL,n)),e.guid=n=>e.check(OE(ME,n)),e.uuid=n=>e.check(yD(td,n)),e.uuidv4=n=>e.check(bD(td,n)),e.uuidv6=n=>e.check(_D(td,n)),e.uuidv7=n=>e.check(ED(td,n)),e.nanoid=n=>e.check(wD(e8,n)),e.guid=n=>e.check(OE(ME,n)),e.cuid=n=>e.check(xD(t8,n)),e.cuid2=n=>e.check(RD(n8,n)),e.ulid=n=>e.check(OD(r8,n)),e.base64=n=>e.check(DD(u8,n)),e.base64url=n=>e.check(LD(d8,n)),e.xid=n=>e.check(TD(o8,n)),e.ksuid=n=>e.check(AD(a8,n)),e.ipv4=n=>e.check(CD(i8,n)),e.ipv6=n=>e.check(ID(s8,n)),e.cidrv4=n=>e.check(MD(l8,n)),e.cidrv6=n=>e.check(ND(c8,n)),e.e164=n=>e.check(PD(f8,n)),e.datetime=n=>e.check(ML(n)),e.date=n=>e.check(DL(n)),e.time=n=>e.check(PL(n)),e.duration=n=>e.check(jL(n))});function Ve(e){return vD(QL,e)}const zt=ie("ZodStringFormat",(e,t)=>{Pt.init(e,t),b2.init(e,t)}),XL=ie("ZodEmail",(e,t)=>{gN.init(e,t),zt.init(e,t)}),ME=ie("ZodGUID",(e,t)=>{mN.init(e,t),zt.init(e,t)}),td=ie("ZodUUID",(e,t)=>{vN.init(e,t),zt.init(e,t)}),_2=ie("ZodURL",(e,t)=>{yN.init(e,t),zt.init(e,t)});function hH(e){return Vx(_2,e)}const JL=ie("ZodEmoji",(e,t)=>{bN.init(e,t),zt.init(e,t)}),e8=ie("ZodNanoID",(e,t)=>{_N.init(e,t),zt.init(e,t)}),t8=ie("ZodCUID",(e,t)=>{EN.init(e,t),zt.init(e,t)}),n8=ie("ZodCUID2",(e,t)=>{SN.init(e,t),zt.init(e,t)}),r8=ie("ZodULID",(e,t)=>{wN.init(e,t),zt.init(e,t)}),o8=ie("ZodXID",(e,t)=>{xN.init(e,t),zt.init(e,t)}),a8=ie("ZodKSUID",(e,t)=>{RN.init(e,t),zt.init(e,t)}),i8=ie("ZodIPv4",(e,t)=>{IN.init(e,t),zt.init(e,t)}),s8=ie("ZodIPv6",(e,t)=>{MN.init(e,t),zt.init(e,t)}),l8=ie("ZodCIDRv4",(e,t)=>{NN.init(e,t),zt.init(e,t)}),c8=ie("ZodCIDRv6",(e,t)=>{DN.init(e,t),zt.init(e,t)}),u8=ie("ZodBase64",(e,t)=>{LN.init(e,t),zt.init(e,t)}),d8=ie("ZodBase64URL",(e,t)=>{kN.init(e,t),zt.init(e,t)}),f8=ie("ZodE164",(e,t)=>{jN.init(e,t),zt.init(e,t)}),h8=ie("ZodJWT",(e,t)=>{UN.init(e,t),zt.init(e,t)}),wg=ie("ZodNumber",(e,t)=>{zx.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>Zx(e,o,i),e.gt=(o,i)=>e.check(AE(o,i)),e.gte=(o,i)=>e.check(wd(o,i)),e.min=(o,i)=>e.check(wd(o,i)),e.lt=(o,i)=>e.check(TE(o,i)),e.lte=(o,i)=>e.check(Sd(o,i)),e.max=(o,i)=>e.check(Sd(o,i)),e.int=o=>e.check(NE(o)),e.safe=o=>e.check(NE(o)),e.positive=o=>e.check(AE(0,o)),e.nonnegative=o=>e.check(wd(0,o)),e.negative=o=>e.check(TE(0,o)),e.nonpositive=o=>e.check(Sd(0,o)),e.multipleOf=(o,i)=>e.check(CE(o,i)),e.step=(o,i)=>e.check(CE(o,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function E2(e){return FD(wg,e)}const p8=ie("ZodNumberFormat",(e,t)=>{BN.init(e,t),wg.init(e,t)});function NE(e){return VD(p8,e)}const S2=ie("ZodBoolean",(e,t)=>{FN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Yx(e,n,o)});function xg(e){return HD(S2,e)}const m8=ie("ZodNull",(e,t)=>{$N.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Kx(e,n,o)});function pH(e){return qD(m8,e)}const v8=ie("ZodAny",(e,t)=>{VN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Qx()});function mH(){return ZD(v8)}const g8=ie("ZodUnknown",(e,t)=>{HN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Xx()});function Ev(){return YD(g8)}const y8=ie("ZodNever",(e,t)=>{GN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Wx(e,n,o)});function w2(e){return KD(y8,e)}const b8=ie("ZodDate",(e,t)=>{qN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>Jx(e,o),e.min=(o,i)=>e.check(wd(o,i)),e.max=(o,i)=>e.check(Sd(o,i));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function vH(e){return WD(b8,e)}const _8=ie("ZodArray",(e,t)=>{ZN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>a2(e,n,o,i),e.element=t.element,e.min=(n,o)=>e.check(Fd(n,o)),e.nonempty=n=>e.check(Fd(1,n)),e.max=(n,o)=>e.check(Hx(n,o)),e.length=(n,o)=>e.check(Gx(n,o)),e.unwrap=()=>e.element});function Sv(e,t){return dL(_8,e,t)}const Rg=ie("ZodObject",(e,t)=>{KN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>i2(e,n,o,i),at(e,"shape",()=>t.shape),e.keyof=()=>ic(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ev()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ev()}),e.strict=()=>e.clone({...e._zod.def,catchall:w2()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>sM(e,n),e.safeExtend=n=>lM(e,n),e.merge=n=>cM(e,n),e.pick=n=>aM(e,n),e.omit=n=>iM(e,n),e.partial=(...n)=>uM(O2,e,n[0]),e.required=(...n)=>dM(T2,e,n[0])});function bn(e,t){const n={type:"object",shape:e??{},...Oe(t)};return new Rg(n)}function gH(e,t){return new Rg({type:"object",shape:e,catchall:w2(),...Oe(t)})}function yH(e,t){return new Rg({type:"object",shape:e,catchall:Ev(),...Oe(t)})}const x2=ie("ZodUnion",(e,t)=>{Fx.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>s2(e,n,o,i),e.options=t.options});function E8(e,t){return new x2({type:"union",options:e,...Oe(t)})}const S8=ie("ZodDiscriminatedUnion",(e,t)=>{x2.init(e,t),WN.init(e,t)});function bH(e,t,n){return new S8({type:"union",options:t,discriminator:e,...Oe(n)})}const w8=ie("ZodIntersection",(e,t)=>{QN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>l2(e,n,o,i)});function x8(e,t){return new w8({type:"intersection",left:e,right:t})}const R8=ie("ZodTuple",(e,t)=>{XN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>c2(e,n,o,i),e.rest=n=>e.clone({...e._zod.def,rest:n})});function _H(e,t,n){const o=t instanceof pt,i=o?n:t,l=o?t:null;return new R8({type:"tuple",items:e,rest:l,...Oe(i)})}const O8=ie("ZodRecord",(e,t)=>{JN.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>u2(e,n,o,i),e.keyType=t.keyType,e.valueType=t.valueType});function EH(e,t,n){return new O8({type:"record",keyType:e,valueType:t,...Oe(n)})}const wv=ie("ZodEnum",(e,t)=>{eD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(o,i,l)=>e2(e,o,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,i)=>{const l={};for(const c of o)if(n.has(c))l[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new wv({...t,checks:[],...Oe(i),entries:l})},e.exclude=(o,i)=>{const l={...t.entries};for(const c of o)if(n.has(c))delete l[c];else throw new Error(`Key ${c} not found in enum`);return new wv({...t,checks:[],...Oe(i),entries:l})}});function ic(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new wv({type:"enum",entries:n,...Oe(t)})}const T8=ie("ZodLiteral",(e,t)=>{tD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>t2(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function SH(e,t){return new T8({type:"literal",values:Array.isArray(e)?e:[e],...Oe(t)})}const A8=ie("ZodFile",(e,t)=>{nD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>n2(e,n,o),e.min=(n,o)=>e.check(XD(n,o)),e.max=(n,o)=>e.check(QD(n,o)),e.mime=(n,o)=>e.check(aL(Array.isArray(n)?n:[n],o))});function wH(e){return fL(A8,e)}const C8=ie("ZodTransform",(e,t)=>{rD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>o2(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new wx(e.constructor.name);n.addIssue=l=>{if(typeof l=="string")n.issues.push(ac(l,n.value,t));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=n.value),c.inst??(c.inst=e),n.issues.push(ac(c))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(l=>(n.value=l,n)):(n.value=i,n)}});function R2(e){return new C8({type:"transform",transform:e})}const O2=ie("ZodOptional",(e,t)=>{$x.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Sg(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function DE(e){return new O2({type:"optional",innerType:e})}const I8=ie("ZodExactOptional",(e,t)=>{oD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Sg(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function M8(e){return new I8({type:"optional",innerType:e})}const N8=ie("ZodNullable",(e,t)=>{aD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>d2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function LE(e){return new N8({type:"nullable",innerType:e})}const D8=ie("ZodDefault",(e,t)=>{iD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>h2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function L8(e,t){return new D8({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Tx(t)}})}const P8=ie("ZodPrefault",(e,t)=>{sD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>p2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function k8(e,t){return new P8({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Tx(t)}})}const T2=ie("ZodNonOptional",(e,t)=>{lD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>f2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function j8(e,t){return new T2({type:"nonoptional",innerType:e,...Oe(t)})}const z8=ie("ZodCatch",(e,t)=>{cD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>m2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function U8(e,t){return new z8({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const B8=ie("ZodPipe",(e,t)=>{uD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>v2(e,n,o,i),e.in=t.in,e.out=t.out});function xv(e,t){return new B8({type:"pipe",in:e,out:t})}const F8=ie("ZodReadonly",(e,t)=>{dD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>g2(e,n,o,i),e.unwrap=()=>e._zod.def.innerType});function $8(e){return new F8({type:"readonly",innerType:e})}const V8=ie("ZodLazy",(e,t)=>{fD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>y2(e,n,o,i),e.unwrap=()=>e._zod.def.getter()});function Ua(e){return new V8({type:"lazy",getter:e})}const Og=ie("ZodCustom",(e,t)=>{hD.init(e,t),yt.init(e,t),e._zod.processJSONSchema=(n,o,i)=>r2(e,n)});function xH(e,t){return hL(Og,e??(()=>!0),t)}function H8(e,t={}){return pL(Og,e,t)}function G8(e){return mL(e)}function RH(e,t={}){const n=new Og({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...Oe(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}function q8(e,t){return xv(R2(e),t)}function Z8(e){return $D(wg,e)}function PE(e){return GD(S2,e)}function fe(...e){return XI(ux(e))}function Y8(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function jt({error:e,localization:t,localizeErrors:n=!0}){var o;const i="Request failed";if(!n)return e?.message?e.message:(o=e?.error)!=null&&o.message?e.error.message:i;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const l=e.error.code;if(t?.[l])return t[l]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||i}function Si(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Rv(e,t){for(const n in e)if(e[n]===t)return n}function sc(e,t){let n=Ve().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var K8={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},W8={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},Q8={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},X8={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},J8={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},eP={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},tP={...J8,...eP},nP={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},rP={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},oP={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},aP={INVALID_SESSION_TOKEN:"Invalid session token"},iP={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},sP={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},lP={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},cP={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},uP={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},dP={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},fP={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},hP={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...X8,...K8,...W8,...Q8,...tP,...nP,...rP,...oP,...aP,...iP,...sP,...lP,...cP,...uP,...dP,...fP},pP={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},kE={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},jE={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function mP(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const vP=e=>{switch(e){case"success":return bP;case"info":return EP;case"warning":return _P;case"error":return SP;default:return null}},gP=Array(12).fill(0),yP=({visible:e,className:t})=>V.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},V.createElement("div",{className:"sonner-spinner"},gP.map((n,o)=>V.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),bP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),_P=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),EP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),SP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),wP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},V.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),V.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xP=()=>{const[e,t]=V.useState(document.hidden);return V.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ov=1;class RP{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:o,...i}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ov++,c=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),c?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:o}),{...f,...t,id:l,dismissible:d,title:o}):f):this.addToast({title:o,...i,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(o=>o({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let o;n.loading!==void 0&&(o=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let l=o!==void 0,c;const d=i.then(async h=>{if(c=["resolve",h],V.isValidElement(h))l=!1,this.create({id:o,type:"default",message:h});else if(TP(h)&&!h.ok){l=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof p=="object"&&!V.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:y,...S})}else if(h instanceof Error){l=!1;const p=typeof n.error=="function"?await n.error(h):n.error,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!V.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:y,...S})}else if(n.success!==void 0){l=!1;const p=typeof n.success=="function"?await n.success(h):n.success,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!V.isValidElement(p)?p:{message:p};this.create({id:o,type:"success",description:y,...S})}}).catch(async h=>{if(c=["reject",h],n.error!==void 0){l=!1;const v=typeof n.error=="function"?await n.error(h):n.error,p=typeof n.description=="function"?await n.description(h):n.description,_=typeof v=="object"&&!V.isValidElement(v)?v:{message:v};this.create({id:o,type:"error",description:p,..._})}}).finally(()=>{l&&(this.dismiss(o),o=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((h,v)=>d.then(()=>c[0]==="reject"?v(c[1]):h(c[1])).catch(v));return typeof o!="string"&&typeof o!="number"?{unwrap:f}:Object.assign(o,{unwrap:f})},this.custom=(t,n)=>{const o=n?.id||Ov++;return this.create({jsx:t(o),id:o,...n}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Wn=new RP,OP=(e,t)=>{const n=t?.id||Ov++;return Wn.addToast({title:e,...t,id:n}),n},TP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",AP=OP,CP=()=>Wn.toasts,IP=()=>Wn.getActiveToasts(),zE=Object.assign(AP,{success:Wn.success,info:Wn.info,warning:Wn.warning,error:Wn.error,custom:Wn.custom,message:Wn.message,promise:Wn.promise,dismiss:Wn.dismiss,loading:Wn.loading},{getHistory:CP,getToasts:IP});mP("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function nd(e){return e.label!==void 0}const MP=3,NP="24px",DP="16px",UE=4e3,LP=356,PP=14,kP=45,jP=200;function oo(...e){return e.filter(Boolean).join(" ")}function zP(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}const UP=e=>{var t,n,o,i,l,c,d,f,h;const{invert:v,toast:p,unstyled:y,interacting:_,setHeights:S,visibleToasts:w,heights:T,index:O,toasts:A,expanded:C,removeToast:R,defaultRichColors:I,closeButton:k,style:D,cancelButtonStyle:N,actionButtonStyle:z,className:W="",descriptionClassName:$="",duration:q,position:j,gap:X,expandByDefault:oe,classNames:L,icons:F,closeButtonAriaLabel:G="Close toast"}=e,[re,ye]=V.useState(null),[P,Q]=V.useState(null),[te,se]=V.useState(!1),[me,_e]=V.useState(!1),[be,Se]=V.useState(!1),[De,Le]=V.useState(!1),[Ee,ze]=V.useState(!1),[Nt,ge]=V.useState(0),[ve,Re]=V.useState(0),ke=V.useRef(p.duration||q||UE),et=V.useRef(null),Ue=V.useRef(null),Qe=O===0,U=O+1<=w,Z=p.type,Y=p.dismissible!==!1,ue=p.className||"",pe=p.descriptionClassName||"",he=V.useMemo(()=>T.findIndex(Me=>Me.toastId===p.id)||0,[T,p.id]),xe=V.useMemo(()=>{var Me;return(Me=p.closeButton)!=null?Me:k},[p.closeButton,k]),Be=V.useMemo(()=>p.duration||q||UE,[p.duration,q]),Ze=V.useRef(0),ft=V.useRef(0),Mn=V.useRef(0),Tt=V.useRef(null),[Zt,At]=j.split("-"),an=V.useMemo(()=>T.reduce((Me,Ke,xt)=>xt>=he?Me:Me+Ke.height,0),[T,he]),Yt=xP(),qo=p.invert||v,_o=Z==="loading";ft.current=V.useMemo(()=>he*X+an,[he,an]),V.useEffect(()=>{ke.current=Be},[Be]),V.useEffect(()=>{se(!0)},[]),V.useEffect(()=>{const Me=Ue.current;if(Me){const Ke=Me.getBoundingClientRect().height;return Re(Ke),S(xt=>[{toastId:p.id,height:Ke,position:p.position},...xt]),()=>S(xt=>xt.filter(bt=>bt.toastId!==p.id))}},[S,p.id]),V.useLayoutEffect(()=>{if(!te)return;const Me=Ue.current,Ke=Me.style.height;Me.style.height="auto";const xt=Me.getBoundingClientRect().height;Me.style.height=Ke,Re(xt),S(bt=>bt.find(lt=>lt.toastId===p.id)?bt.map(lt=>lt.toastId===p.id?{...lt,height:xt}:lt):[{toastId:p.id,height:xt,position:p.position},...bt])},[te,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const Ie=V.useCallback(()=>{_e(!0),ge(ft.current),S(Me=>Me.filter(Ke=>Ke.toastId!==p.id)),setTimeout(()=>{R(p)},jP)},[p,R,S,ft]);V.useEffect(()=>{if(p.promise&&Z==="loading"||p.duration===1/0||p.type==="loading")return;let Me;return C||_||Yt?(()=>{if(Mn.current<Ze.current){const bt=new Date().getTime()-Ze.current;ke.current=ke.current-bt}Mn.current=new Date().getTime()})():ke.current!==1/0&&(Ze.current=new Date().getTime(),Me=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Ie()},ke.current)),()=>clearTimeout(Me)},[C,_,p,Z,Yt,Ie]),V.useEffect(()=>{p.delete&&(Ie(),p.onDismiss==null||p.onDismiss.call(p,p))},[Ie,p.delete]);function tt(){var Me;if(F?.loading){var Ke;return V.createElement("div",{className:oo(L?.loader,p==null||(Ke=p.classNames)==null?void 0:Ke.loader,"sonner-loader"),"data-visible":Z==="loading"},F.loading)}return V.createElement(yP,{className:oo(L?.loader,p==null||(Me=p.classNames)==null?void 0:Me.loader),visible:Z==="loading"})}const it=p.icon||F?.[Z]||vP(Z);var Ye,st;return V.createElement("li",{tabIndex:0,ref:Ue,className:oo(W,ue,L?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,L?.default,L?.[Z],p==null||(n=p.classNames)==null?void 0:n[Z]),"data-sonner-toast":"","data-rich-colors":(Ye=p.richColors)!=null?Ye:I,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":te,"data-promise":!!p.promise,"data-swiped":Ee,"data-removed":me,"data-visible":U,"data-y-position":Zt,"data-x-position":At,"data-index":O,"data-front":Qe,"data-swiping":be,"data-dismissible":Y,"data-type":Z,"data-invert":qo,"data-swipe-out":De,"data-swipe-direction":P,"data-expanded":!!(C||oe&&te),"data-testid":p.testId,style:{"--index":O,"--toasts-before":O,"--z-index":A.length-O,"--offset":`${me?Nt:ft.current}px`,"--initial-height":oe?"auto":`${ve}px`,...D,...p.style},onDragEnd:()=>{Se(!1),ye(null),Tt.current=null},onPointerDown:Me=>{Me.button!==2&&(_o||!Y||(et.current=new Date,ge(ft.current),Me.target.setPointerCapture(Me.pointerId),Me.target.tagName!=="BUTTON"&&(Se(!0),Tt.current={x:Me.clientX,y:Me.clientY})))},onPointerUp:()=>{var Me,Ke,xt;if(De||!Y)return;Tt.current=null;const bt=Number(((Me=Ue.current)==null?void 0:Me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Nn=Number(((Ke=Ue.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),lt=new Date().getTime()-((xt=et.current)==null?void 0:xt.getTime()),Ct=re==="x"?bt:Nn,br=Math.abs(Ct)/lt;if(Math.abs(Ct)>=kP||br>.11){ge(ft.current),p.onDismiss==null||p.onDismiss.call(p,p),Q(re==="x"?bt>0?"right":"left":Nn>0?"down":"up"),Ie(),Le(!0);return}else{var _n,Bn;(_n=Ue.current)==null||_n.style.setProperty("--swipe-amount-x","0px"),(Bn=Ue.current)==null||Bn.style.setProperty("--swipe-amount-y","0px")}ze(!1),Se(!1),ye(null)},onPointerMove:Me=>{var Ke,xt,bt;if(!Tt.current||!Y||((Ke=window.getSelection())==null?void 0:Ke.toString().length)>0)return;const lt=Me.clientY-Tt.current.y,Ct=Me.clientX-Tt.current.x;var br;const _n=(br=e.swipeDirections)!=null?br:zP(j);!re&&(Math.abs(Ct)>1||Math.abs(lt)>1)&&ye(Math.abs(Ct)>Math.abs(lt)?"x":"y");let Bn={x:0,y:0};const Ri=zr=>1/(1.5+Math.abs(zr)/20);if(re==="y"){if(_n.includes("top")||_n.includes("bottom"))if(_n.includes("top")&<<0||_n.includes("bottom")&<>0)Bn.y=lt;else{const zr=lt*Ri(lt);Bn.y=Math.abs(zr)<Math.abs(lt)?zr:lt}}else if(re==="x"&&(_n.includes("left")||_n.includes("right")))if(_n.includes("left")&&Ct<0||_n.includes("right")&&Ct>0)Bn.x=Ct;else{const zr=Ct*Ri(Ct);Bn.x=Math.abs(zr)<Math.abs(Ct)?zr:Ct}(Math.abs(Bn.x)>0||Math.abs(Bn.y)>0)&&ze(!0),(xt=Ue.current)==null||xt.style.setProperty("--swipe-amount-x",`${Bn.x}px`),(bt=Ue.current)==null||bt.style.setProperty("--swipe-amount-y",`${Bn.y}px`)}},xe&&!p.jsx&&Z!=="loading"?V.createElement("button",{"aria-label":G,"data-disabled":_o,"data-close-button":!0,onClick:_o||!Y?()=>{}:()=>{Ie(),p.onDismiss==null||p.onDismiss.call(p,p)},className:oo(L?.closeButton,p==null||(o=p.classNames)==null?void 0:o.closeButton)},(st=F?.close)!=null?st:wP):null,(Z||p.icon||p.promise)&&p.icon!==null&&(F?.[Z]!==null||p.icon)?V.createElement("div",{"data-icon":"",className:oo(L?.icon,p==null||(i=p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||tt():null,p.type!=="loading"?it:null):null,V.createElement("div",{"data-content":"",className:oo(L?.content,p==null||(l=p.classNames)==null?void 0:l.content)},V.createElement("div",{"data-title":"",className:oo(L?.title,p==null||(c=p.classNames)==null?void 0:c.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?V.createElement("div",{"data-description":"",className:oo($,pe,L?.description,p==null||(d=p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),V.isValidElement(p.cancel)?p.cancel:p.cancel&&nd(p.cancel)?V.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||N,onClick:Me=>{nd(p.cancel)&&Y&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Me),Ie())},className:oo(L?.cancelButton,p==null||(f=p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,V.isValidElement(p.action)?p.action:p.action&&nd(p.action)?V.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||z,onClick:Me=>{nd(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Me),!Me.defaultPrevented&&Ie())},className:oo(L?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function BE(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function BP(e,t){const n={};return[e,t].forEach((o,i)=>{const l=i===1,c=l?"--mobile-offset":"--offset",d=l?DP:NP;function f(h){["top","right","bottom","left"].forEach(v=>{n[`${c}-${v}`]=typeof h=="number"?`${h}px`:h})}typeof o=="number"||typeof o=="string"?f(o):typeof o=="object"?["top","right","bottom","left"].forEach(h=>{o[h]===void 0?n[`${c}-${h}`]=d:n[`${c}-${h}`]=typeof o[h]=="number"?`${o[h]}px`:o[h]}):f(d)}),n}const FP=V.forwardRef(function(t,n){const{id:o,invert:i,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:f,className:h,offset:v,mobileOffset:p,theme:y="light",richColors:_,duration:S,style:w,visibleToasts:T=MP,toastOptions:O,dir:A=BE(),gap:C=PP,icons:R,containerAriaLabel:I="Notifications"}=t,[k,D]=V.useState([]),N=V.useMemo(()=>o?k.filter(te=>te.toasterId===o):k.filter(te=>!te.toasterId),[k,o]),z=V.useMemo(()=>Array.from(new Set([l].concat(N.filter(te=>te.position).map(te=>te.position)))),[N,l]),[W,$]=V.useState([]),[q,j]=V.useState(!1),[X,oe]=V.useState(!1),[L,F]=V.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=V.useRef(null),re=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ye=V.useRef(null),P=V.useRef(!1),Q=V.useCallback(te=>{D(se=>{var me;return(me=se.find(_e=>_e.id===te.id))!=null&&me.delete||Wn.dismiss(te.id),se.filter(({id:_e})=>_e!==te.id)})},[]);return V.useEffect(()=>Wn.subscribe(te=>{if(te.dismiss){requestAnimationFrame(()=>{D(se=>se.map(me=>me.id===te.id?{...me,delete:!0}:me))});return}setTimeout(()=>{Yw.flushSync(()=>{D(se=>{const me=se.findIndex(_e=>_e.id===te.id);return me!==-1?[...se.slice(0,me),{...se[me],...te},...se.slice(me+1)]:[te,...se]})})})}),[k]),V.useEffect(()=>{if(y!=="system"){F(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const te=window.matchMedia("(prefers-color-scheme: dark)");try{te.addEventListener("change",({matches:se})=>{F(se?"dark":"light")})}catch{te.addListener(({matches:me})=>{try{F(me?"dark":"light")}catch(_e){console.error(_e)}})}},[y]),V.useEffect(()=>{k.length<=1&&j(!1)},[k]),V.useEffect(()=>{const te=se=>{var me;if(c.every(Se=>se[Se]||se.code===Se)){var be;j(!0),(be=G.current)==null||be.focus()}se.code==="Escape"&&(document.activeElement===G.current||(me=G.current)!=null&&me.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[c]),V.useEffect(()=>{if(G.current)return()=>{ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null,P.current=!1)}},[G.current]),V.createElement("section",{ref:n,"aria-label":`${I} ${re}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((te,se)=>{var me;const[_e,be]=te.split("-");return N.length?V.createElement("ol",{key:te,dir:A==="auto"?BE():A,tabIndex:-1,ref:G,className:h,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":_e,"data-x-position":be,style:{"--front-toast-height":`${((me=W[0])==null?void 0:me.height)||0}px`,"--width":`${LP}px`,"--gap":`${C}px`,...w,...BP(v,p)},onBlur:Se=>{P.current&&!Se.currentTarget.contains(Se.relatedTarget)&&(P.current=!1,ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null))},onFocus:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||P.current||(P.current=!0,ye.current=Se.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{X||j(!1)},onDragEnd:()=>j(!1),onPointerDown:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||oe(!0)},onPointerUp:()=>oe(!1)},N.filter(Se=>!Se.position&&se===0||Se.position===te).map((Se,De)=>{var Le,Ee;return V.createElement(UP,{key:Se.id,icons:R,index:De,toast:Se,defaultRichColors:_,duration:(Le=O?.duration)!=null?Le:S,className:O?.className,descriptionClassName:O?.descriptionClassName,invert:i,visibleToasts:T,closeButton:(Ee=O?.closeButton)!=null?Ee:f,interacting:X,position:te,style:O?.style,unstyled:O?.unstyled,classNames:O?.classNames,cancelButtonStyle:O?.cancelButtonStyle,actionButtonStyle:O?.actionButtonStyle,closeButtonAriaLabel:O?.closeButtonAriaLabel,removeToast:Q,toasts:N.filter(ze=>ze.position==Se.position),heights:W.filter(ze=>ze.position==Se.position),setHeights:$,expandByDefault:d,gap:C,expanded:q,swipeDirections:t.swipeDirections})})):null}))}),A2=E.createContext({});function C2(){return E.useContext(A2)}var Rm,FE;function $P(){if(FE)return Rm;FE=1;var e=function(){};return Rm=e,Rm}var VP=$P();const HP=_i(VP);function GP({async:e,appendTo:t,defer:n,id:o,nonce:i,src:l}){const c=document.createElement("script");e!==void 0&&(c.async=e),n!==void 0&&(c.defer=n),o&&(c.id=o),i&&c.setAttribute("nonce",i),c.src=l,(t==="head"?document.head:document.body).appendChild(c)}var qP=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n};let Ql=null,lc=!1;const qd=new Set,Zd=new Set,ZP=typeof window<"u",Rs="___grecaptcha_cfg",I2=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function YP(){if(!ZP)return;function e(n){if(lc)n();else{window[Rs]||(window[Rs]={});const o=window[Rs];o.fns||(o.fns=[]),o.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){lc=!0;for(const n of Zd)n();Zd.clear()}window[I2]=t}function KP({language:e,onLoadCallbackName:t,render:n,useEnterprise:o=!1,useRecaptchaNet:i=!1}){const l=i?"recaptcha.net":"google.com",c=o?"enterprise.js":"api.js",d=new URLSearchParams({render:n});return t&&d.set("onload",t),e&&d.set("hl",e),`https://www.${l}/recaptcha/${c}?${d.toString()}`}function WP({language:e,render:t,scriptProps:n,useEnterprise:o,useRecaptchaNet:i}){const l={id:"google-recaptcha-v3"},c=KP({language:e,onLoadCallbackName:I2,render:t,useEnterprise:o,useRecaptchaNet:i});if(Ql){if(Ql!==c)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Ql=c,GP(Object.assign(Object.assign(Object.assign({},l),n),{src:c}))}function QP(e){if(!window[Rs])return;const t=window[Rs];t.clients&&delete t.clients[e]}function XP(e,t){var{onLoadCallback:n,onLoadCallbackName:o}=t,i=qP(t,["onLoadCallback","onLoadCallbackName"]);if(qd.size===0&&YP(),WP(i),qd.add(e),n&&(lc?n():Zd.add(n)),o){let l=function(){if(!o)return;const c=window[o];typeof c=="function"&&c()};lc?l():Zd.add(l)}}function JP(e){var t,n,o;qd.delete(e),qd.size===0&&(window.grecaptcha=void 0,window[Rs]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Ql}"]`))===null||n===void 0||n.remove(),(o=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||o===void 0||o.remove(),Ql=null,lc=!1)}let $E=!1;function e7({container:e,children:t,language:n,reCaptchaKey:o,scriptProps:i,useEnterprise:l,useRecaptchaNet:c}){var d,f,h,v,p,y,_;const S=E.useId(),[w,T]=E.useState(null),[O,A]=E.useState(null),C=E.useRef(!1);E.useEffect(()=>{function D(){var N;const z=l?(N=window.grecaptcha)===null||N===void 0?void 0:N.enterprise:window.grecaptcha;if(!z)throw new Error("reCAPTCHA not found");if(!z.ready)throw new Error("reCAPTCHA ready callback not found");z.ready(()=>{T(z)})}return XP(S,{language:n,onLoadCallback:D,onLoadCallbackName:i?.onLoadCallbackName,render:e?.element?"explicit":o,scriptProps:{appendTo:i?.appendTo,async:i?.async,defer:i?.defer,id:i?.id,nonce:i?.nonce},useEnterprise:l,useRecaptchaNet:c}),()=>{JP(S),T(null)}},[e?.element,S,n,o,i?.appendTo,i?.async,i?.defer,i?.id,i?.nonce,i?.onLoadCallbackName,l,c]),E.useEffect(()=>{var D,N,z;if(!e?.element||!w?.render)return;const W={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((D=e.parameters)===null||D===void 0?void 0:D.badge)||"inline",callback:e.parameters.callback,sitekey:o,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},$=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!$)throw new Error("reCAPTCHA container element not found");const q=w.render($,W);return!((N=e?.parameters)===null||N===void 0)&&N.hidden&&($E||(HP(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),$E=!0),(z=$.querySelector(".grecaptcha-badge"))===null||z===void 0||z.style.setProperty("display","none")),A(q),C.current=!0,()=>{A(null),C.current=!1,QP(q),$.innerHTML=""}},[e?.element,(d=e?.parameters)===null||d===void 0?void 0:d.badge,(f=e?.parameters)===null||f===void 0?void 0:f.hidden,(h=e?.parameters)===null||h===void 0?void 0:h.callback,(v=e?.parameters)===null||v===void 0?void 0:v.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(y=e?.parameters)===null||y===void 0?void 0:y.tabindex,(_=e?.parameters)===null||_===void 0?void 0:_.theme,w,o]);const R=!!e?.element,I=R?O:o,k=E.useMemo(()=>I!==null&&w?.execute?D=>{if(I===null||!w?.execute)throw new Error("reCAPTCHA has not been loaded");return R&&!C.current?(console.warn("Client ID not mounted"),null):w.execute(I,{action:D})}:void 0,[I,w,R]);return b.jsx(A2.Provider,{value:{container:e?.element,executeRecaptcha:k,reCaptchaInstance:w},children:t})}var t7=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const o of n)o()}}},Ir=new t7;function n7(){return()=>{}}function Ho(){return E.useSyncExternalStore(n7,()=>!0,()=>!1)}function Tg(){const[e,t]=E.useState();return E.useEffect(()=>{const n=()=>{const i=document.documentElement.getAttribute("lang");t(i??void 0)};n();const o=new MutationObserver(i=>{for(const l of i)l.attributeName==="lang"&&n()});return o.observe(document.documentElement,{attributes:!0}),()=>{o.disconnect()}},[]),{lang:e}}function Ag(){const[e,t]=E.useState("light");return E.useEffect(()=>{const n=()=>{var i;const l=document.documentElement.classList.contains("dark")||((i=document.documentElement.getAttribute("style"))==null?void 0:i.includes("color-scheme: dark"));t(l?"dark":"light")};n();const o=new MutationObserver(i=>{for(const l of i)(l.attributeName==="style"||l.attributeName==="class")&&n()});return o.observe(document.documentElement,{attributes:!0}),()=>{o.disconnect()}},[]),{theme:e}}function r7({children:e}){const t=Ho(),{captcha:n}=E.useContext(qe);return n?.provider!=="google-recaptcha-v3"?e:b.jsxs(e7,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&b.jsx("style",{children:`
|
|
49
49
|
.grecaptcha-badge {
|
|
50
50
|
visibility: hidden;
|
|
51
51
|
border-radius: var(--radius) !important;
|
|
@@ -58,7 +58,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
58
58
|
.dark .grecaptcha-badge {
|
|
59
59
|
border-color: var(--input) !important;
|
|
60
60
|
}
|
|
61
|
-
`}),b.jsx(o7,{}),e]})}function o7(){const{executeRecaptcha:e}=C2(),{theme:t}=Ag(),{lang:n}=Tg();return E.useEffect(()=>{if(!e)return;(async()=>{const i=document.querySelector("iframe[title='reCAPTCHA']");if(i){const l=new URL(i.src);l.searchParams.set("theme",t),n&&l.searchParams.set("hl",n),i.src=l.toString()}})()},[e,t,n]),null}function a7({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:o}}=E.useContext(qe),{pathMode:i,slug:l}=t||{};let c,d,f,h;const{data:v,isPending:p,isRefetching:y}=o();if(i==="slug"){const _=e||l;c=v?.find(S=>S.slug===_),d=p,f=y}else{const{data:_,isPending:S,isRefetching:w,refetch:T}=n();h=T,c=_,d=S,f=w}return E.useMemo(()=>({data:c,isPending:d,isRefetching:f,refetch:h}),[c,d,f,h])}var i7=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:o,redirectTo:i}=E.useContext(qe),{slug:l,pathMode:c,personalPath:d}=n||{},{data:f}=t(),{data:h,isPending:v,isRefetching:p,refetch:y}=a7(),{refetch:_}=e(),{data:S}=e();return E.useEffect(()=>{f?.user.id&&(h||S)&&(y?.(),_?.())},[f?.user.id]),E.useEffect(()=>{p||v||l&&c==="slug"&&!h&&o(d||i)},[h,p,v,l,c,d,o,i]),null},s7=({href:e,className:t,children:n})=>b.jsx("a",{className:t,href:e,children:n}),l7=e=>{window.location.href=e},c7=e=>{window.location.replace(e)},u7=({variant:e="default",message:t})=>{e==="default"?zE(t):zE[e](t)},qe=E.createContext({}),d7=({children:e,authClient:t,account:n,avatar:o,deleteUser:i,social:l,genericOAuth:c,basePath:d="/auth",baseURL:f="",captcha:h,redirectTo:v="/",credentials:p,changeEmail:y=!0,freshAge:_=3600*24,hooks:S,mutators:w,localization:T,localizeErrors:O=!0,nameRequired:A=!0,organization:C,teams:R,signUp:I=!0,toast:k=u7,viewPaths:D,navigate:N,replace:z,Link:W=s7,emailVerification:$,...q})=>{const j=t,X=E.useMemo(()=>{if(o)return o===!0?{extension:"png",size:128}:{upload:o.upload,delete:o.delete,extension:o.extension||"png",size:o.size||(o.upload?256:128),Image:o.Image}},[o]),oe=E.useMemo(()=>{if($)return $===!0?{otp:!1}:{otp:$.otp??!1}},[$]),L=E.useMemo(()=>{var Ee;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:kE}:{basePath:((Ee=n.basePath)!=null&&Ee.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...kE,...n.viewPaths}}},[n]),F=E.useMemo(()=>{if(i)return i===!0?{}:i},[i]),G=E.useMemo(()=>{if(l)return l},[l]),re=E.useMemo(()=>{if(c)return c},[c]),ye=E.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),P=E.useMemo(()=>{if(I!==!1)return I===!0||I===void 0?{fields:["name"]}:{fields:I.fields||["name"]}},[I]),Q=E.useMemo(()=>{var Ee;if(!C)return;if(C===!0)return{basePath:"/organization",viewPaths:jE,customRoles:[]};let ze;C.logo===!0?ze={extension:"png",size:128}:C.logo&&(ze={upload:C.logo.upload,delete:C.logo.delete,extension:C.logo.extension||"png",size:C.logo.size||(C.logo.upload?256:128)});const Nt=(Ee=C.basePath)!=null&&Ee.endsWith("/")?C.basePath.slice(0,-1):C.basePath;return{...C,logo:ze,basePath:Nt??"/organization",customRoles:C.customRoles||[],viewPaths:{...jE,...C.viewPaths}}},[C]),te=E.useMemo(()=>{var Ee,ze;if(!(!R||!Q))return R===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:R.enabled??!0,customRoles:R.customRoles||[],colors:{count:((Ee=R.colors)==null?void 0:Ee.count)??5,prefix:((ze=R.colors)==null?void 0:ze.prefix)??"team"}}},[R,Q]),se=E.useMemo(()=>({deleteApiKey:Ee=>j.apiKey.delete({...Ee,fetchOptions:{throw:!0}}),deletePasskey:Ee=>j.passkey.deletePasskey({...Ee,fetchOptions:{throw:!0}}),revokeDeviceSession:Ee=>j.multiSession.revoke({...Ee,fetchOptions:{throw:!0}}),revokeSession:Ee=>j.revokeSession({...Ee,fetchOptions:{throw:!0}}),setActiveSession:Ee=>j.multiSession.setActive({...Ee,fetchOptions:{throw:!0}}),updateOrganization:Ee=>j.organization.update({...Ee,fetchOptions:{throw:!0}}),updateTeam:Ee=>j.$fetch("/organization/update-team",{method:"POST",body:Ee,throw:!0}),updateUser:Ee=>j.updateUser({...Ee,fetchOptions:{throw:!0}}),unlinkAccount:Ee=>j.unlinkAccount({...Ee,fetchOptions:{throw:!0}})}),[j]),me=E.useMemo(()=>({useSession:j.useSession,useListAccounts:()=>lr({queryFn:j.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Ee=>lr({queryFn:()=>j.accountInfo(Ee),cacheKey:`accountInfo:${JSON.stringify(Ee)}`}),useListDeviceSessions:()=>lr({queryFn:j.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>lr({queryFn:j.listSessions,cacheKey:"listSessions"}),useListPasskeys:j.useListPasskeys,useListApiKeys:()=>lr({queryFn:j.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:j.useActiveOrganization,useListOrganizations:j.useListOrganizations,useHasPermission:Ee=>lr({queryFn:()=>j.$fetch("/organization/has-permission",{method:"POST",body:Ee}),cacheKey:`hasPermission:${JSON.stringify(Ee)}`}),useInvitation:Ee=>lr({queryFn:()=>j.organization.getInvitation(Ee),cacheKey:`invitation:${JSON.stringify(Ee)}`}),useListInvitations:Ee=>lr({queryFn:()=>{var ze;return j.$fetch(`/organization/list-invitations?organizationId=${((ze=Ee?.query)==null?void 0:ze.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Ee)}`}),useListUserInvitations:()=>lr({queryFn:()=>j.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Ee=>lr({queryFn:()=>{var ze;return j.$fetch(`/organization/list-members?organizationId=${((ze=Ee?.query)==null?void 0:ze.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(Ee)}`}),useListTeams:Ee=>lr({queryFn:()=>j.$fetch(`/organization/list-teams?organizationId=${Ee?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Ee)}`}),useListTeamMembers:Ee=>lr({queryFn:()=>j.$fetch("/organization/list-team-members",{method:"POST",body:Ee?.teamId?{query:{teamId:Ee.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Ee)}`}),useListUserTeams:()=>lr({queryFn:()=>j.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[j]),_e=E.useMemo(()=>({...pP,...D}),[D]),be=E.useMemo(()=>({...hP,...T}),[T]),Se=E.useMemo(()=>({...me,...S}),[me,S]),De=E.useMemo(()=>({...se,...w}),[se,w]);f=f.endsWith("/")?f.slice(0,-1):f,d=d.endsWith("/")?d.slice(0,-1):d;const{data:Le}=Se.useSession();return b.jsxs(qe.Provider,{value:{authClient:j,avatar:X,basePath:d==="/"?"":d,baseURL:f,captcha:h,redirectTo:v,changeEmail:y,credentials:ye,deleteUser:F,emailVerification:oe,freshAge:_,genericOAuth:re,hooks:Se,mutators:De,localization:be,localizeErrors:O,nameRequired:A,organization:Q,teams:te,account:L,signUp:P,social:G,toast:k,navigate:N||l7,replace:z||N||c7,viewPaths:_e,Link:W,...q},children:[Le&&Q&&b.jsx(i7,{}),h?.provider==="google-recaptcha-v3"?b.jsx(r7,{children:e}):e]})};function lr({queryFn:e,cacheKey:t,staleTime:n=1e4}){var o;const{hooks:{useSession:i},toast:l,localization:c,localizeErrors:d}=E.useContext(qe),{data:f,isPending:h}=i(),v=E.useRef(e);v.current=e;const p=t||e.toString(),y=E.useSyncExternalStore(E.useCallback(C=>Ir.subscribe(p,C),[p]),E.useCallback(()=>Ir.get(p),[p]),E.useCallback(()=>Ir.get(p),[p])),_=E.useRef(!1),S=E.useRef(void 0),[w,T]=E.useState(null),O=E.useCallback(async()=>{const C=Ir.getInFlightRequest(p);if(C){try{const I=await C;I.error?T(I.error):T(null)}catch(I){T(I)}return}y?.data!==void 0&&Ir.setRefetching(p,!0);const R=v.current();Ir.setInFlightRequest(p,R);try{const{data:I,error:k}=await R;k?(T(k),l({variant:"error",message:jt({error:k,localization:c,localizeErrors:d})})):T(null),Ir.set(p,I)}catch(I){const k=I;T(k),l({variant:"error",message:jt({error:k,localization:c,localizeErrors:d})})}finally{Ir.setRefetching(p,!1),Ir.removeInFlightRequest(p)}},[p,l,c,d,y]);E.useEffect(()=>{var C;const R=(C=f?.user)==null?void 0:C.id;if(!f){Ir.setRefetching(p,!1),Ir.clear(p),_.current=!1,S.current=void 0;return}const I=S.current!==void 0&&S.current!==R;I&&Ir.clear(p);const k=y?.data!==void 0,D=!y||Date.now()-y.timestamp>n;(!_.current||!k||I||k&&D)&&(!k||D)&&(_.current=!0,O()),S.current=R},[f,(o=f?.user)==null?void 0:o.id,p,O,y,n]);const A=h||y?.data===void 0&&!w;return{data:y?.data??null,isPending:A,isRefetching:y?.isRefetching??!1,error:w,refetch:O}}const f7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),M2=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();var h7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const p7=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:l,iconNode:c,...d},f)=>E.createElement("svg",{ref:f,...h7,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:M2("lucide",i),...d},[...c.map(([h,v])=>E.createElement(h,v)),...Array.isArray(l)?l:[l]]));const In=(e,t)=>{const n=E.forwardRef(({className:o,...i},l)=>E.createElement(p7,{ref:l,iconNode:t,className:M2(`lucide-${f7(e)}`,o),...i}));return n.displayName=`${e}`,n};const m7=In("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const v7=In("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const Cg=In("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const g7=In("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const y7=In("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const b7=In("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const _7=In("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const E7=In("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const gn=In("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const N2=In("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const D2=In("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const S7=In("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const w7=In("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const VE=In("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const x7=In("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const R7=In("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const L2=In("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var gc=e=>e.type==="checkbox",ui=e=>e instanceof Date,Xn=e=>e==null;const P2=e=>typeof e=="object";var on=e=>!Xn(e)&&!Array.isArray(e)&&P2(e)&&!ui(e),k2=e=>on(e)&&e.target?gc(e.target)?e.target.checked:e.target.value:e,O7=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,j2=(e,t)=>e.has(O7(t)),T7=e=>{const t=e.constructor&&e.constructor.prototype;return on(t)&&t.hasOwnProperty("isPrototypeOf")},Ig=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function en(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ig&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(on(e)&&T7(e)))return e;const o=n?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=en(e[i]));return o}var wf=e=>/^\w*$/.test(e),Lt=e=>e===void 0,Mg=e=>Array.isArray(e)?e.filter(Boolean):[],Ng=e=>Mg(e.replace(/["|']|\]/g,"").split(/\.|\[/)),we=(e,t,n)=>{if(!t||!on(e))return n;const o=(wf(t)?[t]:Ng(t)).reduce((i,l)=>Xn(i)?i:i[l],e);return Lt(o)||o===e?Lt(e[t])?n:e[t]:o},dr=e=>typeof e=="boolean",Un=e=>typeof e=="function",gt=(e,t,n)=>{let o=-1;const i=wf(t)?[t]:Ng(t),l=i.length,c=l-1;for(;++o<l;){const d=i[o];let f=n;if(o!==c){const h=e[d];f=on(h)||Array.isArray(h)?h:isNaN(+i[o+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=f,e=e[d]}};const Zd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},qr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bo={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Dg=V.createContext(null);Dg.displayName="HookFormContext";const xf=()=>V.useContext(Dg),A7=e=>{const{children:t,...n}=e;return V.createElement(Dg.Provider,{value:n},t)};var z2=(e,t,n,o=!0)=>{const i={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(i,l,{get:()=>{const c=l;return t._proxyFormState[c]!==qr.all&&(t._proxyFormState[c]=!o||qr.all),n&&(n[c]=!0),e[c]}});return i};const Lg=typeof window<"u"?V.useLayoutEffect:V.useEffect;function Pg(e){const t=xf(),{control:n=t.control,disabled:o,name:i,exact:l}=e||{},[c,d]=V.useState(n._formState),f=V.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Lg(()=>n._subscribe({name:i,formState:f.current,exact:l,callback:h=>{!o&&d({...n._formState,...h})}}),[i,o,l]),V.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),V.useMemo(()=>z2(c,n,f.current,!1),[c,n])}var pr=e=>typeof e=="string",Tv=(e,t,n,o,i)=>pr(e)?(o&&t.watch.add(e),we(n,e,i)):Array.isArray(e)?e.map(l=>(o&&t.watch.add(l),we(n,l))):(o&&(t.watchAll=!0),n),Av=e=>Xn(e)||!P2(e);function Zr(e,t,n=new WeakSet){if(Av(e)||Av(t))return Object.is(e,t);if(ui(e)&&ui(t))return Object.is(e.getTime(),t.getTime());const o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const l of o){const c=e[l];if(!i.includes(l))return!1;if(l!=="ref"){const d=t[l];if(ui(c)&&ui(d)||on(c)&&on(d)||Array.isArray(c)&&Array.isArray(d)?!Zr(c,d,n):!Object.is(c,d))return!1}}return!0}function C7(e){const t=xf(),{control:n=t.control,name:o,defaultValue:i,disabled:l,exact:c,compute:d}=e||{},f=V.useRef(i),h=V.useRef(d),v=V.useRef(void 0),p=V.useRef(n),y=V.useRef(o);h.current=d;const[_,S]=V.useState(()=>{const R=n._getWatch(o,f.current);return h.current?h.current(R):R}),w=V.useCallback(R=>{const I=Tv(o,n._names,R||n._formValues,!1,f.current);return h.current?h.current(I):I},[n._formValues,n._names,o]),T=V.useCallback(R=>{if(!l){const I=Tv(o,n._names,R||n._formValues,!1,f.current);if(h.current){const k=h.current(I);Zr(k,v.current)||(S(k),v.current=k)}else S(I)}},[n._formValues,n._names,l,o]);Lg(()=>((p.current!==n||!Zr(y.current,o))&&(p.current=n,y.current=o,T()),n._subscribe({name:o,formState:{values:!0},exact:c,callback:R=>{T(R.values)}})),[n,c,o,T]),V.useEffect(()=>n._removeUnmounted());const O=p.current!==n,A=y.current,C=V.useMemo(()=>{if(l)return null;const R=!O&&!Zr(A,o);return O||R?w():null},[l,O,o,A,w]);return C!==null?C:_}function I7(e){const t=xf(),{name:n,disabled:o,control:i=t.control,shouldUnregister:l,defaultValue:c,exact:d=!0}=e,f=j2(i._names.array,n),h=V.useMemo(()=>we(i._formValues,n,we(i._defaultValues,n,c)),[i,n,c]),v=C7({control:i,name:n,defaultValue:h,exact:d}),p=Pg({control:i,name:n,exact:d}),y=V.useRef(e),_=V.useRef(void 0),S=V.useRef(i.register(n,{...e.rules,value:v,...dr(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;const w=V.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!we(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!we(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!we(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!we(p.validatingFields,n)},error:{enumerable:!0,get:()=>we(p.errors,n)}}),[p,n]),T=V.useCallback(R=>S.current.onChange({target:{value:k2(R),name:n},type:Zd.CHANGE}),[n]),O=V.useCallback(()=>S.current.onBlur({target:{value:we(i._formValues,n),name:n},type:Zd.BLUR}),[n,i._formValues]),A=V.useCallback(R=>{const I=we(i._fields,n);I&&I._f&&R&&(I._f.ref={focus:()=>Un(R.focus)&&R.focus(),select:()=>Un(R.select)&&R.select(),setCustomValidity:k=>Un(R.setCustomValidity)&&R.setCustomValidity(k),reportValidity:()=>Un(R.reportValidity)&&R.reportValidity()})},[i._fields,n]),C=V.useMemo(()=>({name:n,value:v,...dr(o)||p.disabled?{disabled:p.disabled||o}:{},onChange:T,onBlur:O,ref:A}),[n,o,p.disabled,T,O,A,v]);return V.useEffect(()=>{const R=i._options.shouldUnregister||l,I=_.current;I&&I!==n&&!f&&i.unregister(I),i.register(n,{...y.current.rules,...dr(y.current.disabled)?{disabled:y.current.disabled}:{}});const k=(D,N)=>{const z=we(i._fields,D);z&&z._f&&(z._f.mount=N)};if(k(n,!0),R){const D=en(we(i._options.defaultValues,n,y.current.defaultValue));gt(i._defaultValues,n,D),Lt(we(i._formValues,n))&>(i._formValues,n,D)}return!f&&i.register(n),_.current=n,()=>{(f?R&&!i._state.action:R)?i.unregister(n):k(n,!1)}},[n,i,f,l]),V.useEffect(()=>{i._setDisabledField({disabled:o,name:n})},[o,n,i]),V.useMemo(()=>({field:C,formState:p,fieldState:w}),[C,p,w])}const M7=e=>e.render(I7(e));var kg=(e,t,n,o,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[o]:i||!0}}:{},Xl=e=>Array.isArray(e)?e:[e],HE=()=>{let e=[];return{get observers(){return e},next:i=>{for(const l of e)l.next&&l.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(l=>l!==i)}}),unsubscribe:()=>{e=[]}}};function U2(e,t){const n={};for(const o in e)if(e.hasOwnProperty(o)){const i=e[o],l=t[o];if(i&&on(i)&&l){const c=U2(i,l);on(c)&&(n[o]=c)}else e[o]&&(n[o]=l)}return n}var zn=e=>on(e)&&!Object.keys(e).length,jg=e=>e.type==="file",Yd=e=>{if(!Ig)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},B2=e=>e.type==="select-multiple",zg=e=>e.type==="radio",N7=e=>zg(e)||gc(e),Om=e=>Yd(e)&&e.isConnected;function D7(e,t){const n=t.slice(0,-1).length;let o=0;for(;o<n;)e=Lt(e)?o++:e[t[o++]];return e}function L7(e){for(const t in e)if(e.hasOwnProperty(t)&&!Lt(e[t]))return!1;return!0}function tn(e,t){const n=Array.isArray(t)?t:wf(t)?[t]:Ng(t),o=n.length===1?e:D7(e,n),i=n.length-1,l=n[i];return o&&delete o[l],i!==0&&(on(o)&&zn(o)||Array.isArray(o)&&L7(o))&&tn(e,n.slice(0,-1)),e}var P7=e=>{for(const t in e)if(Un(e[t]))return!0;return!1};function F2(e){return Array.isArray(e)||on(e)&&!P7(e)}function Cv(e,t={}){for(const n in e){const o=e[n];F2(o)?(t[n]=Array.isArray(o)?[]:{},Cv(o,t[n])):Lt(o)||(t[n]=!0)}return t}function _s(e,t,n){n||(n=Cv(t));for(const o in e){const i=e[o];if(F2(i))Lt(t)||Av(n[o])?n[o]=Cv(i,Array.isArray(i)?[]:{}):_s(i,Xn(t)?{}:t[o],n[o]);else{const l=t[o];n[o]=!Zr(i,l)}}return n}const GE={value:!1,isValid:!1},qE={value:!0,isValid:!0};var $2=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Lt(e[0].attributes.value)?Lt(e[0].value)||e[0].value===""?qE:{value:e[0].value,isValid:!0}:qE:GE}return GE},V2=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:o})=>Lt(e)?e:t?e===""?NaN:e&&+e:n&&pr(e)?new Date(e):o?o(e):e;const ZE={isValid:!1,value:null};var H2=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ZE):ZE;function YE(e){const t=e.ref;return jg(t)?t.files:zg(t)?H2(e.refs).value:B2(t)?[...t.selectedOptions].map(({value:n})=>n):gc(t)?$2(e.refs).value:V2(Lt(t.value)?e.ref.value:t.value,e)}var k7=(e,t,n,o)=>{const i={};for(const l of e){const c=we(t,l);c&>(i,l,c._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:o}},Kd=e=>e instanceof RegExp,zl=e=>Lt(e)?e:Kd(e)?e.source:on(e)?Kd(e.value)?e.value.source:e.value:e,KE=e=>({isOnSubmit:!e||e===qr.onSubmit,isOnBlur:e===qr.onBlur,isOnChange:e===qr.onChange,isOnAll:e===qr.all,isOnTouch:e===qr.onTouched});const WE="AsyncFunction";var j7=e=>!!e&&!!e.validate&&!!(Un(e.validate)&&e.validate.constructor.name===WE||on(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===WE)),z7=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),QE=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(o=>e.startsWith(o)&&/^\.\w+/.test(e.slice(o.length))));const Jl=(e,t,n,o)=>{for(const i of n||Object.keys(e)){const l=we(e,i);if(l){const{_f:c,...d}=l;if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],i)&&!o)return!0;if(c.ref&&t(c.ref,c.name)&&!o)return!0;if(Jl(d,t))break}else if(on(d)&&Jl(d,t))break}}};function XE(e,t,n){const o=we(e,n);if(o||wf(n))return{error:o,name:n};const i=n.split(".");for(;i.length;){const l=i.join("."),c=we(t,l),d=we(e,l);if(c&&!Array.isArray(c)&&n!==l)return{name:n};if(d&&d.type)return{name:l,error:d};if(d&&d.root&&d.root.type)return{name:`${l}.root`,error:d.root};i.pop()}return{name:n}}var U7=(e,t,n,o)=>{n(e);const{name:i,...l}=e;return zn(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(c=>t[c]===(!o||qr.all))},B7=(e,t,n)=>!e||!t||e===t||Xl(e).some(o=>o&&(n?o===t:o.startsWith(t)||t.startsWith(o))),F7=(e,t,n,o,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?o.isOnBlur:i.isOnBlur)?!e:(n?o.isOnChange:i.isOnChange)?e:!0,$7=(e,t)=>!Mg(we(e,t)).length&&tn(e,t),V7=(e,t,n)=>{const o=Xl(we(e,n));return gt(o,"root",t[n]),gt(e,n,o),e};function JE(e,t,n="validate"){if(pr(e)||Array.isArray(e)&&e.every(pr)||dr(e)&&!e)return{type:n,message:pr(e)?e:"",ref:t}}var fs=e=>on(e)&&!Kd(e)?e:{value:e,message:""},eS=async(e,t,n,o,i,l)=>{const{ref:c,refs:d,required:f,maxLength:h,minLength:v,min:p,max:y,pattern:_,validate:S,name:w,valueAsNumber:T,mount:O}=e._f,A=we(n,w);if(!O||t.has(w))return{};const C=d?d[0]:c,R=q=>{i&&C.reportValidity&&(C.setCustomValidity(dr(q)?"":q||""),C.reportValidity())},I={},k=zg(c),D=gc(c),N=k||D,z=(T||jg(c))&&Lt(c.value)&&Lt(A)||Yd(c)&&c.value===""||A===""||Array.isArray(A)&&!A.length,W=kg.bind(null,w,o,I),$=(q,j,X,oe=Bo.maxLength,L=Bo.minLength)=>{const F=q?j:X;I[w]={type:q?oe:L,message:F,ref:c,...W(q?oe:L,F)}};if(l?!Array.isArray(A)||!A.length:f&&(!N&&(z||Xn(A))||dr(A)&&!A||D&&!$2(d).isValid||k&&!H2(d).isValid)){const{value:q,message:j}=pr(f)?{value:!!f,message:f}:fs(f);if(q&&(I[w]={type:Bo.required,message:j,ref:C,...W(Bo.required,j)},!o))return R(j),I}if(!z&&(!Xn(p)||!Xn(y))){let q,j;const X=fs(y),oe=fs(p);if(!Xn(A)&&!isNaN(A)){const L=c.valueAsNumber||A&&+A;Xn(X.value)||(q=L>X.value),Xn(oe.value)||(j=L<oe.value)}else{const L=c.valueAsDate||new Date(A),F=ye=>new Date(new Date().toDateString()+" "+ye),G=c.type=="time",re=c.type=="week";pr(X.value)&&A&&(q=G?F(A)>F(X.value):re?A>X.value:L>new Date(X.value)),pr(oe.value)&&A&&(j=G?F(A)<F(oe.value):re?A<oe.value:L<new Date(oe.value))}if((q||j)&&($(!!q,X.message,oe.message,Bo.max,Bo.min),!o))return R(I[w].message),I}if((h||v)&&!z&&(pr(A)||l&&Array.isArray(A))){const q=fs(h),j=fs(v),X=!Xn(q.value)&&A.length>+q.value,oe=!Xn(j.value)&&A.length<+j.value;if((X||oe)&&($(X,q.message,j.message),!o))return R(I[w].message),I}if(_&&!z&&pr(A)){const{value:q,message:j}=fs(_);if(Kd(q)&&!A.match(q)&&(I[w]={type:Bo.pattern,message:j,ref:c,...W(Bo.pattern,j)},!o))return R(j),I}if(S){if(Un(S)){const q=await S(A,n),j=JE(q,C);if(j&&(I[w]={...j,...W(Bo.validate,j.message)},!o))return R(j.message),I}else if(on(S)){let q={};for(const j in S){if(!zn(q)&&!o)break;const X=JE(await S[j](A,n),C,j);X&&(q={...X,...W(j,X.message)},R(X.message),o&&(I[w]=q))}if(!zn(q)&&(I[w]={ref:C,...q},!o))return I}}return R(!0),I};const H7={mode:qr.onSubmit,reValidateMode:qr.onChange,shouldFocusError:!0};function G7(e={}){let t={...H7,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Un(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},o={},i=on(t.defaultValues)||on(t.values)?en(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:en(i),c={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,h=0;const v={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...v};let y={...p};const _={array:HE(),state:HE()},S=t.criteriaMode===qr.all,w=U=>Z=>{clearTimeout(h),h=setTimeout(U,Z)},T=async U=>{if(!c.keepIsValid&&!t.disabled&&(p.isValid||y.isValid||U)){let Z;t.resolver?(Z=zn((await N()).errors),O()):Z=await W(o,!0),Z!==n.isValid&&_.state.next({isValid:Z})}},O=(U,Z)=>{!t.disabled&&(p.isValidating||p.validatingFields||y.isValidating||y.validatingFields)&&((U||Array.from(d.mount)).forEach(Y=>{Y&&(Z?gt(n.validatingFields,Y,Z):tn(n.validatingFields,Y))}),_.state.next({validatingFields:n.validatingFields,isValidating:!zn(n.validatingFields)}))},A=(U,Z=[],Y,ue,pe=!0,he=!0)=>{if(ue&&Y&&!t.disabled){if(c.action=!0,he&&Array.isArray(we(o,U))){const xe=Y(we(o,U),ue.argA,ue.argB);pe&>(o,U,xe)}if(he&&Array.isArray(we(n.errors,U))){const xe=Y(we(n.errors,U),ue.argA,ue.argB);pe&>(n.errors,U,xe),$7(n.errors,U)}if((p.touchedFields||y.touchedFields)&&he&&Array.isArray(we(n.touchedFields,U))){const xe=Y(we(n.touchedFields,U),ue.argA,ue.argB);pe&>(n.touchedFields,U,xe)}(p.dirtyFields||y.dirtyFields)&&(n.dirtyFields=_s(i,l)),_.state.next({name:U,isDirty:q(U,Z),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else gt(l,U,Z)},C=(U,Z)=>{gt(n.errors,U,Z),_.state.next({errors:n.errors})},R=U=>{n.errors=U,_.state.next({errors:n.errors,isValid:!1})},I=(U,Z,Y,ue)=>{const pe=we(o,U);if(pe){const he=we(l,U,Lt(Y)?we(i,U):Y);Lt(he)||ue&&ue.defaultChecked||Z?gt(l,U,Z?he:YE(pe._f)):oe(U,he),c.mount&&!c.action&&T()}},k=(U,Z,Y,ue,pe)=>{let he=!1,xe=!1;const Be={name:U};if(!t.disabled){if(!Y||ue){(p.isDirty||y.isDirty)&&(xe=n.isDirty,n.isDirty=Be.isDirty=q(),he=xe!==Be.isDirty);const Ze=Zr(we(i,U),Z);xe=!!we(n.dirtyFields,U),Ze?tn(n.dirtyFields,U):gt(n.dirtyFields,U,!0),Be.dirtyFields=n.dirtyFields,he=he||(p.dirtyFields||y.dirtyFields)&&xe!==!Ze}if(Y){const Ze=we(n.touchedFields,U);Ze||(gt(n.touchedFields,U,Y),Be.touchedFields=n.touchedFields,he=he||(p.touchedFields||y.touchedFields)&&Ze!==Y)}he&&pe&&_.state.next(Be)}return he?Be:{}},D=(U,Z,Y,ue)=>{const pe=we(n.errors,U),he=(p.isValid||y.isValid)&&dr(Z)&&n.isValid!==Z;if(t.delayError&&Y?(f=w(()=>C(U,Y)),f(t.delayError)):(clearTimeout(h),f=null,Y?gt(n.errors,U,Y):tn(n.errors,U)),(Y?!Zr(pe,Y):pe)||!zn(ue)||he){const xe={...ue,...he&&dr(Z)?{isValid:Z}:{},errors:n.errors,name:U};n={...n,...xe},_.state.next(xe)}},N=async U=>(O(U,!0),await t.resolver(l,t.context,k7(U||d.mount,o,t.criteriaMode,t.shouldUseNativeValidation))),z=async U=>{const{errors:Z}=await N(U);if(O(U),U)for(const Y of U){const ue=we(Z,Y);ue?gt(n.errors,Y,ue):tn(n.errors,Y)}else n.errors=Z;return Z},W=async(U,Z,Y={valid:!0})=>{for(const ue in U){const pe=U[ue];if(pe){const{_f:he,...xe}=pe;if(he){const Be=d.array.has(he.name),Ze=pe._f&&j7(pe._f);Ze&&p.validatingFields&&O([he.name],!0);const ft=await eS(pe,d.disabled,l,S,t.shouldUseNativeValidation&&!Z,Be);if(Ze&&p.validatingFields&&O([he.name]),ft[he.name]&&(Y.valid=!1,Z||e.shouldUseNativeValidation))break;!Z&&(we(ft,he.name)?Be?V7(n.errors,ft,he.name):gt(n.errors,he.name,ft[he.name]):tn(n.errors,he.name))}!zn(xe)&&await W(xe,Z,Y)}}return Y.valid},$=()=>{for(const U of d.unMount){const Z=we(o,U);Z&&(Z._f.refs?Z._f.refs.every(Y=>!Om(Y)):!Om(Z._f.ref))&&Se(U)}d.unMount=new Set},q=(U,Z)=>!t.disabled&&(U&&Z&>(l,U,Z),!Zr(P(),i)),j=(U,Z,Y)=>Tv(U,d,{...c.mount?l:Lt(Z)?i:pr(U)?{[U]:Z}:Z},Y,Z),X=U=>Mg(we(c.mount?l:i,U,t.shouldUnregister?we(i,U,[]):[])),oe=(U,Z,Y={})=>{const ue=we(o,U);let pe=Z;if(ue){const he=ue._f;he&&(!he.disabled&>(l,U,V2(Z,he)),pe=Yd(he.ref)&&Xn(Z)?"":Z,B2(he.ref)?[...he.ref.options].forEach(xe=>xe.selected=pe.includes(xe.value)):he.refs?gc(he.ref)?he.refs.forEach(xe=>{(!xe.defaultChecked||!xe.disabled)&&(Array.isArray(pe)?xe.checked=!!pe.find(Be=>Be===xe.value):xe.checked=pe===xe.value||!!pe)}):he.refs.forEach(xe=>xe.checked=xe.value===pe):jg(he.ref)?he.ref.value="":(he.ref.value=pe,he.ref.type||_.state.next({name:U,values:en(l)})))}(Y.shouldDirty||Y.shouldTouch)&&k(U,pe,Y.shouldTouch,Y.shouldDirty,!0),Y.shouldValidate&&ye(U)},L=(U,Z,Y)=>{for(const ue in Z){if(!Z.hasOwnProperty(ue))return;const pe=Z[ue],he=U+"."+ue,xe=we(o,he);(d.array.has(U)||on(pe)||xe&&!xe._f)&&!ui(pe)?L(he,pe,Y):oe(he,pe,Y)}},F=(U,Z,Y={})=>{const ue=we(o,U),pe=d.array.has(U),he=en(Z);gt(l,U,he),pe?(_.array.next({name:U,values:en(l)}),(p.isDirty||p.dirtyFields||y.isDirty||y.dirtyFields)&&Y.shouldDirty&&_.state.next({name:U,dirtyFields:_s(i,l),isDirty:q(U,he)})):ue&&!ue._f&&!Xn(he)?L(U,he,Y):oe(U,he,Y),QE(U,d)?_.state.next({...n,name:U,values:en(l)}):_.state.next({name:c.mount?U:void 0,values:en(l)})},G=async U=>{c.mount=!0;const Z=U.target;let Y=Z.name,ue=!0;const pe=we(o,Y),he=Ze=>{ue=Number.isNaN(Ze)||ui(Ze)&&isNaN(Ze.getTime())||Zr(Ze,we(l,Y,Ze))},xe=KE(t.mode),Be=KE(t.reValidateMode);if(pe){let Ze,ft;const Mn=Z.type?YE(pe._f):k2(U),Tt=U.type===Zd.BLUR||U.type===Zd.FOCUS_OUT,Zt=!z7(pe._f)&&!t.resolver&&!we(n.errors,Y)&&!pe._f.deps||F7(Tt,we(n.touchedFields,Y),n.isSubmitted,Be,xe),At=QE(Y,d,Tt);gt(l,Y,Mn),Tt?(!Z||!Z.readOnly)&&(pe._f.onBlur&&pe._f.onBlur(U),f&&f(0)):pe._f.onChange&&pe._f.onChange(U);const an=k(Y,Mn,Tt),Yt=!zn(an)||At;if(!Tt&&_.state.next({name:Y,type:U.type,values:en(l)}),Zt)return(p.isValid||y.isValid)&&(t.mode==="onBlur"?Tt&&T():Tt||T()),Yt&&_.state.next({name:Y,...At?{}:an});if(!Tt&&At&&_.state.next({...n}),t.resolver){const{errors:qo}=await N([Y]);if(O([Y]),he(Mn),ue){const _o=XE(n.errors,o,Y),Ie=XE(qo,o,_o.name||Y);Ze=Ie.error,Y=Ie.name,ft=zn(qo)}}else O([Y],!0),Ze=(await eS(pe,d.disabled,l,S,t.shouldUseNativeValidation))[Y],O([Y]),he(Mn),ue&&(Ze?ft=!1:(p.isValid||y.isValid)&&(ft=await W(o,!0)));ue&&(pe._f.deps&&(!Array.isArray(pe._f.deps)||pe._f.deps.length>0)&&ye(pe._f.deps),D(Y,ft,Ze,an))}},re=(U,Z)=>{if(we(n.errors,Z)&&U.focus)return U.focus(),1},ye=async(U,Z={})=>{let Y,ue;const pe=Xl(U);if(t.resolver){const he=await z(Lt(U)?U:pe);Y=zn(he),ue=U?!pe.some(xe=>we(he,xe)):Y}else U?(ue=(await Promise.all(pe.map(async he=>{const xe=we(o,he);return await W(xe&&xe._f?{[he]:xe}:xe)}))).every(Boolean),!(!ue&&!n.isValid)&&T()):ue=Y=await W(o);return _.state.next({...!pr(U)||(p.isValid||y.isValid)&&Y!==n.isValid?{}:{name:U},...t.resolver||!U?{isValid:Y}:{},errors:n.errors}),Z.shouldFocus&&!ue&&Jl(o,re,U?pe:d.mount),ue},P=(U,Z)=>{let Y={...c.mount?l:i};return Z&&(Y=U2(Z.dirtyFields?n.dirtyFields:n.touchedFields,Y)),Lt(U)?Y:pr(U)?we(Y,U):U.map(ue=>we(Y,ue))},Q=(U,Z)=>({invalid:!!we((Z||n).errors,U),isDirty:!!we((Z||n).dirtyFields,U),error:we((Z||n).errors,U),isValidating:!!we(n.validatingFields,U),isTouched:!!we((Z||n).touchedFields,U)}),te=U=>{U&&Xl(U).forEach(Z=>tn(n.errors,Z)),_.state.next({errors:U?n.errors:{}})},se=(U,Z,Y)=>{const ue=(we(o,U,{_f:{}})._f||{}).ref,pe=we(n.errors,U)||{},{ref:he,message:xe,type:Be,...Ze}=pe;gt(n.errors,U,{...Ze,...Z,ref:ue}),_.state.next({name:U,errors:n.errors,isValid:!1}),Y&&Y.shouldFocus&&ue&&ue.focus&&ue.focus()},me=(U,Z)=>Un(U)?_.state.subscribe({next:Y=>"values"in Y&&U(j(void 0,Z),Y)}):j(U,Z,!0),_e=U=>_.state.subscribe({next:Z=>{B7(U.name,Z.name,U.exact)&&U7(Z,U.formState||p,et,U.reRenderRoot)&&U.callback({values:{...l},...n,...Z,defaultValues:i})}}).unsubscribe,be=U=>(c.mount=!0,y={...y,...U.formState},_e({...U,formState:{...v,...U.formState}})),Se=(U,Z={})=>{for(const Y of U?Xl(U):d.mount)d.mount.delete(Y),d.array.delete(Y),Z.keepValue||(tn(o,Y),tn(l,Y)),!Z.keepError&&tn(n.errors,Y),!Z.keepDirty&&tn(n.dirtyFields,Y),!Z.keepTouched&&tn(n.touchedFields,Y),!Z.keepIsValidating&&tn(n.validatingFields,Y),!t.shouldUnregister&&!Z.keepDefaultValue&&tn(i,Y);_.state.next({values:en(l)}),_.state.next({...n,...Z.keepDirty?{isDirty:q()}:{}}),!Z.keepIsValid&&T()},De=({disabled:U,name:Z})=>{(dr(U)&&c.mount||U||d.disabled.has(Z))&&(U?d.disabled.add(Z):d.disabled.delete(Z))},Le=(U,Z={})=>{let Y=we(o,U);const ue=dr(Z.disabled)||dr(t.disabled);return gt(o,U,{...Y||{},_f:{...Y&&Y._f?Y._f:{ref:{name:U}},name:U,mount:!0,...Z}}),d.mount.add(U),Y?De({disabled:dr(Z.disabled)?Z.disabled:t.disabled,name:U}):I(U,!0,Z.value),{...ue?{disabled:Z.disabled||t.disabled}:{},...t.progressive?{required:!!Z.required,min:zl(Z.min),max:zl(Z.max),minLength:zl(Z.minLength),maxLength:zl(Z.maxLength),pattern:zl(Z.pattern)}:{},name:U,onChange:G,onBlur:G,ref:pe=>{if(pe){Le(U,Z),Y=we(o,U);const he=Lt(pe.value)&&pe.querySelectorAll&&pe.querySelectorAll("input,select,textarea")[0]||pe,xe=N7(he),Be=Y._f.refs||[];if(xe?Be.find(Ze=>Ze===he):he===Y._f.ref)return;gt(o,U,{_f:{...Y._f,...xe?{refs:[...Be.filter(Om),he,...Array.isArray(we(i,U))?[{}]:[]],ref:{type:he.type,name:U}}:{ref:he}}}),I(U,!1,void 0,he)}else Y=we(o,U,{}),Y._f&&(Y._f.mount=!1),(t.shouldUnregister||Z.shouldUnregister)&&!(j2(d.array,U)&&c.action)&&d.unMount.add(U)}}},Ee=()=>t.shouldFocusError&&Jl(o,re,d.mount),ze=U=>{dr(U)&&(_.state.next({disabled:U}),Jl(o,(Z,Y)=>{const ue=we(o,Y);ue&&(Z.disabled=ue._f.disabled||U,Array.isArray(ue._f.refs)&&ue._f.refs.forEach(pe=>{pe.disabled=ue._f.disabled||U}))},0,!1))},Nt=(U,Z)=>async Y=>{let ue;Y&&(Y.preventDefault&&Y.preventDefault(),Y.persist&&Y.persist());let pe=en(l);if(_.state.next({isSubmitting:!0}),t.resolver){const{errors:he,values:xe}=await N();O(),n.errors=he,pe=en(xe)}else await W(o);if(d.disabled.size)for(const he of d.disabled)tn(pe,he);if(tn(n.errors,"root"),zn(n.errors)){_.state.next({errors:{}});try{await U(pe,Y)}catch(he){ue=he}}else Z&&await Z({...n.errors},Y),Ee(),setTimeout(Ee);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:zn(n.errors)&&!ue,submitCount:n.submitCount+1,errors:n.errors}),ue)throw ue},ge=(U,Z={})=>{we(o,U)&&(Lt(Z.defaultValue)?F(U,en(we(i,U))):(F(U,Z.defaultValue),gt(i,U,en(Z.defaultValue))),Z.keepTouched||tn(n.touchedFields,U),Z.keepDirty||(tn(n.dirtyFields,U),n.isDirty=Z.defaultValue?q(U,en(we(i,U))):q()),Z.keepError||(tn(n.errors,U),p.isValid&&T()),_.state.next({...n}))},ve=(U,Z={})=>{const Y=U?en(U):i,ue=en(Y),pe=zn(U),he=pe?i:ue;if(Z.keepDefaultValues||(i=Y),!Z.keepValues){if(Z.keepDirtyValues){const xe=new Set([...d.mount,...Object.keys(_s(i,l))]);for(const Be of Array.from(xe)){const Ze=we(n.dirtyFields,Be),ft=we(l,Be),Mn=we(he,Be);Ze&&!Lt(ft)?gt(he,Be,ft):!Ze&&!Lt(Mn)&&F(Be,Mn)}}else{if(Ig&&Lt(U))for(const xe of d.mount){const Be=we(o,xe);if(Be&&Be._f){const Ze=Array.isArray(Be._f.refs)?Be._f.refs[0]:Be._f.ref;if(Yd(Ze)){const ft=Ze.closest("form");if(ft){ft.reset();break}}}}if(Z.keepFieldsRef)for(const xe of d.mount)F(xe,we(he,xe));else o={}}l=t.shouldUnregister?Z.keepDefaultValues?en(i):{}:en(he),_.array.next({values:{...he}}),_.state.next({values:{...he}})}d={mount:Z.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!p.isValid||!!Z.keepIsValid||!!Z.keepDirtyValues||!t.shouldUnregister&&!zn(he),c.watch=!!t.shouldUnregister,c.keepIsValid=!!Z.keepIsValid,c.action=!1,Z.keepErrors||(n.errors={}),_.state.next({submitCount:Z.keepSubmitCount?n.submitCount:0,isDirty:pe?!1:Z.keepDirty?n.isDirty:!!(Z.keepDefaultValues&&!Zr(U,i)),isSubmitted:Z.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:pe?{}:Z.keepDirtyValues?Z.keepDefaultValues&&l?_s(i,l):n.dirtyFields:Z.keepDefaultValues&&U?_s(i,U):Z.keepDirty?n.dirtyFields:{},touchedFields:Z.keepTouched?n.touchedFields:{},errors:Z.keepErrors?n.errors:{},isSubmitSuccessful:Z.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Re=(U,Z)=>ve(Un(U)?U(l):U,{...t.resetOptions,...Z}),ke=(U,Z={})=>{const Y=we(o,U),ue=Y&&Y._f;if(ue){const pe=ue.refs?ue.refs[0]:ue.ref;pe.focus&&setTimeout(()=>{pe.focus(),Z.shouldSelect&&Un(pe.select)&&pe.select()})}},et=U=>{n={...n,...U}},Qe={control:{register:Le,unregister:Se,getFieldState:Q,handleSubmit:Nt,setError:se,_subscribe:_e,_runSchema:N,_updateIsValidating:O,_focusError:Ee,_getWatch:j,_getDirty:q,_setValid:T,_setFieldArray:A,_setDisabledField:De,_setErrors:R,_getFieldArray:X,_reset:ve,_resetDefaultValues:()=>Un(t.defaultValues)&&t.defaultValues().then(U=>{Re(U,t.resetOptions),_.state.next({isLoading:!1})}),_removeUnmounted:$,_disableForm:ze,_subjects:_,_proxyFormState:p,get _fields(){return o},get _formValues(){return l},get _state(){return c},set _state(U){c=U},get _defaultValues(){return i},get _names(){return d},set _names(U){d=U},get _formState(){return n},get _options(){return t},set _options(U){t={...t,...U}}},subscribe:be,trigger:ye,register:Le,handleSubmit:Nt,watch:me,setValue:F,getValues:P,reset:Re,resetField:ge,clearErrors:te,unregister:Se,setError:se,setFocus:ke,getFieldState:Q};return{...Qe,formControl:Qe}}function mo(e={}){const t=V.useRef(void 0),n=V.useRef(void 0),[o,i]=V.useState({isDirty:!1,isValidating:!1,isLoading:Un(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Un(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!Un(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:c,...d}=G7(e);t.current={...d,formState:o}}const l=t.current.control;return l._options=e,Lg(()=>{const c=l._subscribe({formState:l._proxyFormState,callback:()=>i({...l._formState}),reRenderRoot:!0});return i(d=>({...d,isReady:!0})),l._formState.isReady=!0,c},[l]),V.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),V.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),V.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),V.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),V.useEffect(()=>{if(l._proxyFormState.isDirty){const c=l._getDirty();c!==o.isDirty&&l._subjects.state.next({isDirty:c})}},[l,o.isDirty]),V.useEffect(()=>{var c;e.values&&!Zr(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((c=l._options.resetOptions)===null||c===void 0)&&c.keepIsValid||l._setValid(),n.current=e.values,i(d=>({...d}))):l._resetDefaultValues()},[l,e.values]),V.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=z2(o,l),t.current}function tS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yc(...e){return t=>{let n=!1;const o=e.map(i=>{const l=tS(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<o.length;i++){const l=o[i];typeof l=="function"?l():tS(e[i],null)}}}}function dn(...e){return E.useCallback(yc(...e),e)}var q7=Symbol.for("react.lazy"),Wd=eg[" use ".trim().toString()];function Z7(e){return typeof e=="object"&&e!==null&&"then"in e}function G2(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===q7&&"_payload"in e&&Z7(e._payload)}function q2(e){const t=Y7(e),n=E.forwardRef((o,i)=>{let{children:l,...c}=o;G2(l)&&typeof Wd=="function"&&(l=Wd(l._payload));const d=E.Children.toArray(l),f=d.find(W7);if(f){const h=f.props.children,v=d.map(p=>p===f?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:p);return b.jsx(t,{...c,ref:i,children:E.isValidElement(h)?E.cloneElement(h,void 0,v):null})}return b.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}var Z2=q2("Slot");function Y7(e){const t=E.forwardRef((n,o)=>{let{children:i,...l}=n;if(G2(i)&&typeof Wd=="function"&&(i=Wd(i._payload)),E.isValidElement(i)){const c=X7(i),d=Q7(l,i.props);return i.type!==E.Fragment&&(d.ref=o?yc(o,c):c),E.cloneElement(i,d)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var K7=Symbol("radix.slottable");function W7(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===K7}function Q7(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const f=l(...d);return i(...d),f}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function X7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const nS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rS=ux,J7=(e,t)=>n=>{var o;if(t?.variants==null)return rS(e,n?.class,n?.className);const{variants:i,defaultVariants:l}=t,c=Object.keys(i).map(h=>{const v=n?.[h],p=l?.[h];if(v===null)return null;const y=nS(v)||nS(p);return i[h][y]}),d=n&&Object.entries(n).reduce((h,v)=>{let[p,y]=v;return y===void 0||(h[p]=y),h},{}),f=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((h,v)=>{let{class:p,className:y,..._}=v;return Object.entries(_).every(S=>{let[w,T]=S;return Array.isArray(T)?T.includes({...l,...d}[w]):{...l,...d}[w]===T})?[...h,p,y]:h},[]);return rS(e,c,f,n?.class,n?.className)},oS=(e,t,n)=>{if(e&&"reportValidity"in e){const o=we(n,t);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},Iv=(e,t)=>{for(const n in t.fields){const o=t.fields[n];o&&o.ref&&"reportValidity"in o.ref?oS(o.ref,n,e):o&&o.refs&&o.refs.forEach(i=>oS(i,n,e))}},aS=(e,t)=>{t.shouldUseNativeValidation&&Iv(e,t);const n={};for(const o in e){const i=we(t.fields,o),l=Object.assign(e[o]||{},{ref:i&&i.ref});if(ek(t.names||Object.keys(e),o)){const c=Object.assign({},we(n,o));gt(c,"root",l),gt(n,o,c)}else gt(n,o,l)}return n},ek=(e,t)=>{const n=iS(t);return e.some(o=>iS(o).match(`^${n}\\.\\d+`))};function iS(e){return e.replace(/\]|\[/g,"")}function sS(e,t){try{var n=e()}catch(o){return t(o)}return n&&n.then?n.then(void 0,t):n}function tk(e,t){for(var n={};e.length;){var o=e[0],i=o.code,l=o.message,c=o.path.join(".");if(!n[c])if("unionErrors"in o){var d=o.unionErrors[0].errors[0];n[c]={message:d.message,type:d.code}}else n[c]={message:l,type:i};if("unionErrors"in o&&o.unionErrors.forEach(function(v){return v.errors.forEach(function(p){return e.push(p)})}),t){var f=n[c].types,h=f&&f[o.code];n[c]=kg(c,t,n,i,h?[].concat(h,o.message):o.message)}e.shift()}return n}function nk(e,t){for(var n={};e.length;){var o=e[0],i=o.code,l=o.message,c=o.path.join(".");if(!n[c])if(o.code==="invalid_union"&&o.errors.length>0){var d=o.errors[0][0];n[c]={message:d.message,type:d.code}}else n[c]={message:l,type:i};if(o.code==="invalid_union"&&o.errors.forEach(function(v){return v.forEach(function(p){return e.push(p)})}),t){var f=n[c].types,h=f&&f[o.code];n[c]=kg(c,t,n,i,h?[].concat(h,o.message):o.message)}e.shift()}return n}function vo(e,t,n){if(n===void 0&&(n={}),(function(o){return"_def"in o&&typeof o._def=="object"&&"typeName"in o._def})(e))return function(o,i,l){try{return Promise.resolve(sS(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](o,t)).then(function(c){return l.shouldUseNativeValidation&&Iv({},l),{errors:{},values:n.raw?Object.assign({},o):c}})},function(c){if((function(d){return Array.isArray(d?.issues)})(c))return{values:{},errors:aS(tk(c.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw c}))}catch(c){return Promise.reject(c)}};if((function(o){return"_zod"in o&&typeof o._zod=="object"})(e))return function(o,i,l){try{return Promise.resolve(sS(function(){return Promise.resolve((n.mode==="sync"?pM:mM)(e,o,t)).then(function(c){return l.shouldUseNativeValidation&&Iv({},l),{errors:{},values:n.raw?Object.assign({},o):c}})},function(c){if((function(d){return d instanceof _g})(c))return{values:{},errors:aS(nk(c.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw c}))}catch(c){return Promise.reject(c)}};throw new Error("Invalid input: not a Zod schema")}function Ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function rk(e,t){const n=E.createContext(t),o=l=>{const{children:c,...d}=l,f=E.useMemo(()=>d,Object.values(d));return b.jsx(n.Provider,{value:f,children:c})};o.displayName=e+"Provider";function i(l){const c=E.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[o,i]}function wi(e,t=[]){let n=[];function o(l,c){const d=E.createContext(c),f=n.length;n=[...n,c];const h=p=>{const{scope:y,children:_,...S}=p,w=y?.[e]?.[f]||d,T=E.useMemo(()=>S,Object.values(S));return b.jsx(w.Provider,{value:T,children:_})};h.displayName=l+"Provider";function v(p,y){const _=y?.[e]?.[f]||d,S=E.useContext(_);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,v]}const i=()=>{const l=n.map(c=>E.createContext(c));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return i.scopeName=e,[o,ok(i,...t)]}function ok(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const c=o.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var Kr=globalThis?.document?E.useLayoutEffect:()=>{},ak=eg[" useId ".trim().toString()]||(()=>{}),ik=0;function Ia(e){const[t,n]=E.useState(ak());return Kr(()=>{n(o=>o??String(ik++))},[e]),e||(t?`radix-${t}`:"")}var sk=eg[" useInsertionEffect ".trim().toString()]||Kr;function bc({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,l,c]=lk({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:i;{const v=E.useRef(e!==void 0);E.useEffect(()=>{const p=v.current;p!==d&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=d},[d,o])}const h=E.useCallback(v=>{if(d){const p=ck(v)?v(e):v;p!==e&&c.current?.(p)}else l(v)},[d,e,l,c]);return[f,h]}function lk({defaultProp:e,onChange:t}){const[n,o]=E.useState(e),i=E.useRef(n),l=E.useRef(t);return sk(()=>{l.current=t},[t]),E.useEffect(()=>{i.current!==n&&(l.current?.(n),i.current=n)},[n,i]),[n,o,l]}function ck(e){return typeof e=="function"}function lc(e){const t=uk(e),n=E.forwardRef((o,i)=>{const{children:l,...c}=o,d=E.Children.toArray(l),f=d.find(dk);if(f){const h=f.props.children,v=d.map(p=>p===f?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:p);return b.jsx(t,{...c,ref:i,children:E.isValidElement(h)?E.cloneElement(h,void 0,v):null})}return b.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function uk(e){const t=E.forwardRef((n,o)=>{const{children:i,...l}=n;if(E.isValidElement(i)){const c=hk(i),d=fk(l,i.props);return i.type!==E.Fragment&&(d.ref=o?yc(o,c):c),E.cloneElement(i,d)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Y2=Symbol("radix.slottable");function RH(e){const t=({children:n})=>b.jsx(b.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Y2,t}function dk(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Y2}function fk(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const f=l(...d);return i(...d),f}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function hk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ut=pk.reduce((e,t)=>{const n=lc(`Primitive.${t}`),o=E.forwardRef((i,l)=>{const{asChild:c,...d}=i,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function K2(e,t){e&&pf.flushSync(()=>e.dispatchEvent(t))}function Wr(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>t.current?.(...n),[])}function mk(e,t=globalThis?.document){const n=Wr(e);E.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var vk="DismissableLayer",Mv="dismissableLayer.update",gk="dismissableLayer.pointerDownOutside",yk="dismissableLayer.focusOutside",lS,W2=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ug=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...f}=e,h=E.useContext(W2),[v,p]=E.useState(null),y=v?.ownerDocument??globalThis?.document,[,_]=E.useState({}),S=dn(t,D=>p(D)),w=Array.from(h.layers),[T]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),O=w.indexOf(T),A=v?w.indexOf(v):-1,C=h.layersWithOutsidePointerEventsDisabled.size>0,R=A>=O,I=Ek(D=>{const N=D.target,z=[...h.branches].some(W=>W.contains(N));!R||z||(i?.(D),c?.(D),D.defaultPrevented||d?.())},y),k=Sk(D=>{const N=D.target;[...h.branches].some(W=>W.contains(N))||(l?.(D),c?.(D),D.defaultPrevented||d?.())},y);return mk(D=>{A===h.layers.size-1&&(o?.(D),!D.defaultPrevented&&d&&(D.preventDefault(),d()))},y),E.useEffect(()=>{if(v)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(lS=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),cS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=lS)}},[v,y,n,h]),E.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),cS())},[v,h]),E.useEffect(()=>{const D=()=>_({});return document.addEventListener(Mv,D),()=>document.removeEventListener(Mv,D)},[]),b.jsx(Ut.div,{...f,ref:S,style:{pointerEvents:C?R?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,I.onPointerDownCapture)})});Ug.displayName=vk;var bk="DismissableLayerBranch",_k=E.forwardRef((e,t)=>{const n=E.useContext(W2),o=E.useRef(null),i=dn(t,o);return E.useEffect(()=>{const l=o.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),b.jsx(Ut.div,{...e,ref:i})});_k.displayName=bk;function Ek(e,t=globalThis?.document){const n=Wr(e),o=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const l=d=>{if(d.target&&!o.current){let f=function(){Q2(gk,n,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Sk(e,t=globalThis?.document){const n=Wr(e),o=E.useRef(!1);return E.useEffect(()=>{const i=l=>{l.target&&!o.current&&Q2(yk,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function cS(){const e=new CustomEvent(Mv);document.dispatchEvent(e)}function Q2(e,t,n,{discrete:o}){const i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?K2(i,l):i.dispatchEvent(l)}var Tm="focusScope.autoFocusOnMount",Am="focusScope.autoFocusOnUnmount",uS={bubbles:!1,cancelable:!0},wk="FocusScope",Bg=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...c}=e,[d,f]=E.useState(null),h=Wr(i),v=Wr(l),p=E.useRef(null),y=dn(t,w=>f(w)),_=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(o){let w=function(C){if(_.paused||!d)return;const R=C.target;d.contains(R)?p.current=R:Ea(p.current,{select:!0})},T=function(C){if(_.paused||!d)return;const R=C.relatedTarget;R!==null&&(d.contains(R)||Ea(p.current,{select:!0}))},O=function(C){if(document.activeElement===document.body)for(const I of C)I.removedNodes.length>0&&Ea(d)};document.addEventListener("focusin",w),document.addEventListener("focusout",T);const A=new MutationObserver(O);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",T),A.disconnect()}}},[o,d,_.paused]),E.useEffect(()=>{if(d){fS.add(_);const w=document.activeElement;if(!d.contains(w)){const O=new CustomEvent(Tm,uS);d.addEventListener(Tm,h),d.dispatchEvent(O),O.defaultPrevented||(xk(Ck(X2(d)),{select:!0}),document.activeElement===w&&Ea(d))}return()=>{d.removeEventListener(Tm,h),setTimeout(()=>{const O=new CustomEvent(Am,uS);d.addEventListener(Am,v),d.dispatchEvent(O),O.defaultPrevented||Ea(w??document.body,{select:!0}),d.removeEventListener(Am,v),fS.remove(_)},0)}}},[d,h,v,_]);const S=E.useCallback(w=>{if(!n&&!o||_.paused)return;const T=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,O=document.activeElement;if(T&&O){const A=w.currentTarget,[C,R]=Rk(A);C&&R?!w.shiftKey&&O===R?(w.preventDefault(),n&&Ea(C,{select:!0})):w.shiftKey&&O===C&&(w.preventDefault(),n&&Ea(R,{select:!0})):O===A&&w.preventDefault()}},[n,o,_.paused]);return b.jsx(Ut.div,{tabIndex:-1,...c,ref:y,onKeyDown:S})});Bg.displayName=wk;function xk(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ea(o,{select:t}),document.activeElement!==n)return}function Rk(e){const t=X2(e),n=dS(t,e),o=dS(t.reverse(),e);return[n,o]}function X2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function dS(e,t){for(const n of e)if(!Ok(n,{upTo:t}))return n}function Ok(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Tk(e){return e instanceof HTMLInputElement&&"select"in e}function Ea(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Tk(e)&&t&&e.select()}}var fS=Ak();function Ak(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=hS(e,t),e.unshift(t)},remove(t){e=hS(e,t),e[0]?.resume()}}}function hS(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ck(e){return e.filter(t=>t.tagName!=="A")}var Ik="Portal",Fg=E.forwardRef((e,t)=>{const{container:n,...o}=e,[i,l]=E.useState(!1);Kr(()=>l(!0),[]);const c=n||i&&globalThis?.document?.body;return c?Yw.createPortal(b.jsx(Ut.div,{...o,ref:t}),c):null});Fg.displayName=Ik;function Mk(e,t){return E.useReducer((n,o)=>t[n][o]??n,e)}var Go=e=>{const{present:t,children:n}=e,o=Nk(t),i=typeof n=="function"?n({present:o.isPresent}):E.Children.only(n),l=dn(o.ref,Dk(i));return typeof n=="function"||o.isPresent?E.cloneElement(i,{ref:l}):null};Go.displayName="Presence";function Nk(e){const[t,n]=E.useState(),o=E.useRef(null),i=E.useRef(e),l=E.useRef("none"),c=e?"mounted":"unmounted",[d,f]=Mk(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const h=nd(o.current);l.current=d==="mounted"?h:"none"},[d]),Kr(()=>{const h=o.current,v=i.current;if(v!==e){const y=l.current,_=nd(h);e?f("MOUNT"):_==="none"||h?.display==="none"?f("UNMOUNT"):f(v&&y!==_?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Kr(()=>{if(t){let h;const v=t.ownerDocument.defaultView??window,p=_=>{const w=nd(o.current).includes(CSS.escape(_.animationName));if(_.target===t&&w&&(f("ANIMATION_END"),!i.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",h=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},y=_=>{_.target===t&&(l.current=nd(o.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{v.clearTimeout(h),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:E.useCallback(h=>{o.current=h?getComputedStyle(h):null,n(h)},[])}}function nd(e){return e?.animationName||"none"}function Dk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cm=0;function J2(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pS()),document.body.insertAdjacentElement("beforeend",e[1]??pS()),Cm++,()=>{Cm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Cm--}},[])}function pS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var co=function(){return co=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},co.apply(this,arguments)};function eR(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n}function Lk(e,t,n){if(n||arguments.length===2)for(var o=0,i=t.length,l;o<i;o++)(l||!(o in t))&&(l||(l=Array.prototype.slice.call(t,0,o)),l[o]=t[o]);return e.concat(l||Array.prototype.slice.call(t))}var wd="right-scroll-bar-position",xd="width-before-scroll-bar",Pk="with-scroll-bars-hidden",kk="--removed-body-scroll-bar-size";function Im(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jk(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o&&(n.value=o,n.callback(o,i))}}}})[0];return n.callback=t,n.facade}var zk=typeof window<"u"?E.useLayoutEffect:E.useEffect,mS=new WeakMap;function Uk(e,t){var n=jk(null,function(o){return e.forEach(function(i){return Im(i,o)})});return zk(function(){var o=mS.get(n);if(o){var i=new Set(o),l=new Set(e),c=n.current;i.forEach(function(d){l.has(d)||Im(d,null)}),l.forEach(function(d){i.has(d)||Im(d,c)})}mS.set(n,e)},[e]),n}function Bk(e){return e}function Fk(e,t){t===void 0&&(t=Bk);var n=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var c=t(l,o);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(l){for(o=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){o=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(l),c=n}var f=function(){var v=c;c=[],v.forEach(l)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(v){c.push(v),h()},filter:function(v){return c=c.filter(v),n}}}};return i}function $k(e){e===void 0&&(e={});var t=Fk(null);return t.options=co({async:!0,ssr:!1},e),t}var tR=function(e){var t=e.sideCar,n=eR(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return E.createElement(o,co({},n))};tR.isSideCarExport=!0;function Vk(e,t){return e.useMedium(t),tR}var nR=$k(),Mm=function(){},Rf=E.forwardRef(function(e,t){var n=E.useRef(null),o=E.useState({onScrollCapture:Mm,onWheelCapture:Mm,onTouchMoveCapture:Mm}),i=o[0],l=o[1],c=e.forwardProps,d=e.children,f=e.className,h=e.removeScrollBar,v=e.enabled,p=e.shards,y=e.sideCar,_=e.noRelative,S=e.noIsolation,w=e.inert,T=e.allowPinchZoom,O=e.as,A=O===void 0?"div":O,C=e.gapMode,R=eR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=y,k=Uk([n,t]),D=co(co({},R),i);return E.createElement(E.Fragment,null,v&&E.createElement(I,{sideCar:nR,removeScrollBar:h,shards:p,noRelative:_,noIsolation:S,inert:w,setCallbacks:l,allowPinchZoom:!!T,lockRef:n,gapMode:C}),c?E.cloneElement(E.Children.only(d),co(co({},D),{ref:k})):E.createElement(A,co({},D,{className:f,ref:k}),d))});Rf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rf.classNames={fullWidth:xd,zeroRight:wd};var Hk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Gk(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Hk();return t&&e.setAttribute("nonce",t),e}function qk(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zk(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yk=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Gk())&&(qk(t,n),Zk(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Kk=function(){var e=Yk();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rR=function(){var e=Kk(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},Wk={left:0,top:0,right:0,gap:0},Nm=function(e){return parseInt(e||"",10)||0},Qk=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Nm(n),Nm(o),Nm(i)]},Xk=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wk;var t=Qk(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Jk=rR(),Os="data-scroll-locked",ej=function(e,t,n,o){var i=e.left,l=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
61
|
+
`}),b.jsx(o7,{}),e]})}function o7(){const{executeRecaptcha:e}=C2(),{theme:t}=Ag(),{lang:n}=Tg();return E.useEffect(()=>{if(!e)return;(async()=>{const i=document.querySelector("iframe[title='reCAPTCHA']");if(i){const l=new URL(i.src);l.searchParams.set("theme",t),n&&l.searchParams.set("hl",n),i.src=l.toString()}})()},[e,t,n]),null}function a7({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:o}}=E.useContext(qe),{pathMode:i,slug:l}=t||{};let c,d,f,h;const{data:v,isPending:p,isRefetching:y}=o();if(i==="slug"){const _=e||l;c=v?.find(S=>S.slug===_),d=p,f=y}else{const{data:_,isPending:S,isRefetching:w,refetch:T}=n();h=T,c=_,d=S,f=w}return E.useMemo(()=>({data:c,isPending:d,isRefetching:f,refetch:h}),[c,d,f,h])}var i7=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:o,redirectTo:i}=E.useContext(qe),{slug:l,pathMode:c,personalPath:d}=n||{},{data:f}=t(),{data:h,isPending:v,isRefetching:p,refetch:y}=a7(),{refetch:_}=e(),{data:S}=e();return E.useEffect(()=>{f?.user.id&&(h||S)&&(y?.(),_?.())},[f?.user.id]),E.useEffect(()=>{p||v||l&&c==="slug"&&!h&&o(d||i)},[h,p,v,l,c,d,o,i]),null},s7=({href:e,className:t,children:n})=>b.jsx("a",{className:t,href:e,children:n}),l7=e=>{window.location.href=e},c7=e=>{window.location.replace(e)},u7=({variant:e="default",message:t})=>{e==="default"?zE(t):zE[e](t)},qe=E.createContext({}),d7=({children:e,authClient:t,account:n,avatar:o,deleteUser:i,social:l,genericOAuth:c,basePath:d="/auth",baseURL:f="",captcha:h,redirectTo:v="/",credentials:p,changeEmail:y=!0,freshAge:_=3600*24,hooks:S,mutators:w,localization:T,localizeErrors:O=!0,nameRequired:A=!0,organization:C,teams:R,signUp:I=!0,toast:k=u7,viewPaths:D,navigate:N,replace:z,Link:W=s7,emailVerification:$,...q})=>{const j=t,X=E.useMemo(()=>{if(o)return o===!0?{extension:"png",size:128}:{upload:o.upload,delete:o.delete,extension:o.extension||"png",size:o.size||(o.upload?256:128),Image:o.Image}},[o]),oe=E.useMemo(()=>{if($)return $===!0?{otp:!1}:{otp:$.otp??!1}},[$]),L=E.useMemo(()=>{var Ee;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:kE}:{basePath:((Ee=n.basePath)!=null&&Ee.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...kE,...n.viewPaths}}},[n]),F=E.useMemo(()=>{if(i)return i===!0?{}:i},[i]),G=E.useMemo(()=>{if(l)return l},[l]),re=E.useMemo(()=>{if(c)return c},[c]),ye=E.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),P=E.useMemo(()=>{if(I!==!1)return I===!0||I===void 0?{fields:["name"]}:{fields:I.fields||["name"]}},[I]),Q=E.useMemo(()=>{var Ee;if(!C)return;if(C===!0)return{basePath:"/organization",viewPaths:jE,customRoles:[]};let ze;C.logo===!0?ze={extension:"png",size:128}:C.logo&&(ze={upload:C.logo.upload,delete:C.logo.delete,extension:C.logo.extension||"png",size:C.logo.size||(C.logo.upload?256:128)});const Nt=(Ee=C.basePath)!=null&&Ee.endsWith("/")?C.basePath.slice(0,-1):C.basePath;return{...C,logo:ze,basePath:Nt??"/organization",customRoles:C.customRoles||[],viewPaths:{...jE,...C.viewPaths}}},[C]),te=E.useMemo(()=>{var Ee,ze;if(!(!R||!Q))return R===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:R.enabled??!0,customRoles:R.customRoles||[],colors:{count:((Ee=R.colors)==null?void 0:Ee.count)??5,prefix:((ze=R.colors)==null?void 0:ze.prefix)??"team"}}},[R,Q]),se=E.useMemo(()=>({deleteApiKey:Ee=>j.apiKey.delete({...Ee,fetchOptions:{throw:!0}}),deletePasskey:Ee=>j.passkey.deletePasskey({...Ee,fetchOptions:{throw:!0}}),revokeDeviceSession:Ee=>j.multiSession.revoke({...Ee,fetchOptions:{throw:!0}}),revokeSession:Ee=>j.revokeSession({...Ee,fetchOptions:{throw:!0}}),setActiveSession:Ee=>j.multiSession.setActive({...Ee,fetchOptions:{throw:!0}}),updateOrganization:Ee=>j.organization.update({...Ee,fetchOptions:{throw:!0}}),updateTeam:Ee=>j.$fetch("/organization/update-team",{method:"POST",body:Ee,throw:!0}),updateUser:Ee=>j.updateUser({...Ee,fetchOptions:{throw:!0}}),unlinkAccount:Ee=>j.unlinkAccount({...Ee,fetchOptions:{throw:!0}})}),[j]),me=E.useMemo(()=>({useSession:j.useSession,useListAccounts:()=>lr({queryFn:j.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Ee=>lr({queryFn:()=>j.accountInfo(Ee),cacheKey:`accountInfo:${JSON.stringify(Ee)}`}),useListDeviceSessions:()=>lr({queryFn:j.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>lr({queryFn:j.listSessions,cacheKey:"listSessions"}),useListPasskeys:j.useListPasskeys,useListApiKeys:()=>lr({queryFn:j.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:j.useActiveOrganization,useListOrganizations:j.useListOrganizations,useHasPermission:Ee=>lr({queryFn:()=>j.$fetch("/organization/has-permission",{method:"POST",body:Ee}),cacheKey:`hasPermission:${JSON.stringify(Ee)}`}),useInvitation:Ee=>lr({queryFn:()=>j.organization.getInvitation(Ee),cacheKey:`invitation:${JSON.stringify(Ee)}`}),useListInvitations:Ee=>lr({queryFn:()=>{var ze;return j.$fetch(`/organization/list-invitations?organizationId=${((ze=Ee?.query)==null?void 0:ze.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Ee)}`}),useListUserInvitations:()=>lr({queryFn:()=>j.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Ee=>lr({queryFn:()=>{var ze;return j.$fetch(`/organization/list-members?organizationId=${((ze=Ee?.query)==null?void 0:ze.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(Ee)}`}),useListTeams:Ee=>lr({queryFn:()=>j.$fetch(`/organization/list-teams?organizationId=${Ee?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Ee)}`}),useListTeamMembers:Ee=>lr({queryFn:()=>j.$fetch("/organization/list-team-members",{method:"POST",body:Ee?.teamId?{query:{teamId:Ee.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Ee)}`}),useListUserTeams:()=>lr({queryFn:()=>j.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[j]),_e=E.useMemo(()=>({...pP,...D}),[D]),be=E.useMemo(()=>({...hP,...T}),[T]),Se=E.useMemo(()=>({...me,...S}),[me,S]),De=E.useMemo(()=>({...se,...w}),[se,w]);f=f.endsWith("/")?f.slice(0,-1):f,d=d.endsWith("/")?d.slice(0,-1):d;const{data:Le}=Se.useSession();return b.jsxs(qe.Provider,{value:{authClient:j,avatar:X,basePath:d==="/"?"":d,baseURL:f,captcha:h,redirectTo:v,changeEmail:y,credentials:ye,deleteUser:F,emailVerification:oe,freshAge:_,genericOAuth:re,hooks:Se,mutators:De,localization:be,localizeErrors:O,nameRequired:A,organization:Q,teams:te,account:L,signUp:P,social:G,toast:k,navigate:N||l7,replace:z||N||c7,viewPaths:_e,Link:W,...q},children:[Le&&Q&&b.jsx(i7,{}),h?.provider==="google-recaptcha-v3"?b.jsx(r7,{children:e}):e]})};function lr({queryFn:e,cacheKey:t,staleTime:n=1e4}){var o;const{hooks:{useSession:i},toast:l,localization:c,localizeErrors:d}=E.useContext(qe),{data:f,isPending:h}=i(),v=E.useRef(e);v.current=e;const p=t||e.toString(),y=E.useSyncExternalStore(E.useCallback(C=>Ir.subscribe(p,C),[p]),E.useCallback(()=>Ir.get(p),[p]),E.useCallback(()=>Ir.get(p),[p])),_=E.useRef(!1),S=E.useRef(void 0),[w,T]=E.useState(null),O=E.useCallback(async()=>{const C=Ir.getInFlightRequest(p);if(C){try{const I=await C;I.error?T(I.error):T(null)}catch(I){T(I)}return}y?.data!==void 0&&Ir.setRefetching(p,!0);const R=v.current();Ir.setInFlightRequest(p,R);try{const{data:I,error:k}=await R;k?(T(k),l({variant:"error",message:jt({error:k,localization:c,localizeErrors:d})})):T(null),Ir.set(p,I)}catch(I){const k=I;T(k),l({variant:"error",message:jt({error:k,localization:c,localizeErrors:d})})}finally{Ir.setRefetching(p,!1),Ir.removeInFlightRequest(p)}},[p,l,c,d,y]);E.useEffect(()=>{var C;const R=(C=f?.user)==null?void 0:C.id;if(!f){Ir.setRefetching(p,!1),Ir.clear(p),_.current=!1,S.current=void 0;return}const I=S.current!==void 0&&S.current!==R;I&&Ir.clear(p);const k=y?.data!==void 0,D=!y||Date.now()-y.timestamp>n;(!_.current||!k||I||k&&D)&&(!k||D)&&(_.current=!0,O()),S.current=R},[f,(o=f?.user)==null?void 0:o.id,p,O,y,n]);const A=h||y?.data===void 0&&!w;return{data:y?.data??null,isPending:A,isRefetching:y?.isRefetching??!1,error:w,refetch:O}}const f7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),M2=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();var h7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const p7=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:l,iconNode:c,...d},f)=>E.createElement("svg",{ref:f,...h7,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:M2("lucide",i),...d},[...c.map(([h,v])=>E.createElement(h,v)),...Array.isArray(l)?l:[l]]));const In=(e,t)=>{const n=E.forwardRef(({className:o,...i},l)=>E.createElement(p7,{ref:l,iconNode:t,className:M2(`lucide-${f7(e)}`,o),...i}));return n.displayName=`${e}`,n};const m7=In("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const v7=In("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const Cg=In("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const g7=In("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const y7=In("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const b7=In("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const _7=In("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const E7=In("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const gn=In("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const N2=In("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const D2=In("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const S7=In("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const w7=In("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const VE=In("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const x7=In("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const R7=In("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const L2=In("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var yc=e=>e.type==="checkbox",ui=e=>e instanceof Date,Xn=e=>e==null;const P2=e=>typeof e=="object";var on=e=>!Xn(e)&&!Array.isArray(e)&&P2(e)&&!ui(e),k2=e=>on(e)&&e.target?yc(e.target)?e.target.checked:e.target.value:e,O7=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,j2=(e,t)=>e.has(O7(t)),T7=e=>{const t=e.constructor&&e.constructor.prototype;return on(t)&&t.hasOwnProperty("isPrototypeOf")},Ig=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function en(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ig&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(on(e)&&T7(e)))return e;const o=n?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=en(e[i]));return o}var wf=e=>/^\w*$/.test(e),Lt=e=>e===void 0,Mg=e=>Array.isArray(e)?e.filter(Boolean):[],Ng=e=>Mg(e.replace(/["|']|\]/g,"").split(/\.|\[/)),we=(e,t,n)=>{if(!t||!on(e))return n;const o=(wf(t)?[t]:Ng(t)).reduce((i,l)=>Xn(i)?i:i[l],e);return Lt(o)||o===e?Lt(e[t])?n:e[t]:o},dr=e=>typeof e=="boolean",Un=e=>typeof e=="function",gt=(e,t,n)=>{let o=-1;const i=wf(t)?[t]:Ng(t),l=i.length,c=l-1;for(;++o<l;){const d=i[o];let f=n;if(o!==c){const h=e[d];f=on(h)||Array.isArray(h)?h:isNaN(+i[o+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=f,e=e[d]}};const Yd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},qr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bo={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Dg=V.createContext(null);Dg.displayName="HookFormContext";const xf=()=>V.useContext(Dg),A7=e=>{const{children:t,...n}=e;return V.createElement(Dg.Provider,{value:n},t)};var z2=(e,t,n,o=!0)=>{const i={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(i,l,{get:()=>{const c=l;return t._proxyFormState[c]!==qr.all&&(t._proxyFormState[c]=!o||qr.all),n&&(n[c]=!0),e[c]}});return i};const Lg=typeof window<"u"?V.useLayoutEffect:V.useEffect;function Pg(e){const t=xf(),{control:n=t.control,disabled:o,name:i,exact:l}=e||{},[c,d]=V.useState(n._formState),f=V.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Lg(()=>n._subscribe({name:i,formState:f.current,exact:l,callback:h=>{!o&&d({...n._formState,...h})}}),[i,o,l]),V.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),V.useMemo(()=>z2(c,n,f.current,!1),[c,n])}var pr=e=>typeof e=="string",Tv=(e,t,n,o,i)=>pr(e)?(o&&t.watch.add(e),we(n,e,i)):Array.isArray(e)?e.map(l=>(o&&t.watch.add(l),we(n,l))):(o&&(t.watchAll=!0),n),Av=e=>Xn(e)||!P2(e);function Zr(e,t,n=new WeakSet){if(Av(e)||Av(t))return Object.is(e,t);if(ui(e)&&ui(t))return Object.is(e.getTime(),t.getTime());const o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const l of o){const c=e[l];if(!i.includes(l))return!1;if(l!=="ref"){const d=t[l];if(ui(c)&&ui(d)||on(c)&&on(d)||Array.isArray(c)&&Array.isArray(d)?!Zr(c,d,n):!Object.is(c,d))return!1}}return!0}function C7(e){const t=xf(),{control:n=t.control,name:o,defaultValue:i,disabled:l,exact:c,compute:d}=e||{},f=V.useRef(i),h=V.useRef(d),v=V.useRef(void 0),p=V.useRef(n),y=V.useRef(o);h.current=d;const[_,S]=V.useState(()=>{const R=n._getWatch(o,f.current);return h.current?h.current(R):R}),w=V.useCallback(R=>{const I=Tv(o,n._names,R||n._formValues,!1,f.current);return h.current?h.current(I):I},[n._formValues,n._names,o]),T=V.useCallback(R=>{if(!l){const I=Tv(o,n._names,R||n._formValues,!1,f.current);if(h.current){const k=h.current(I);Zr(k,v.current)||(S(k),v.current=k)}else S(I)}},[n._formValues,n._names,l,o]);Lg(()=>((p.current!==n||!Zr(y.current,o))&&(p.current=n,y.current=o,T()),n._subscribe({name:o,formState:{values:!0},exact:c,callback:R=>{T(R.values)}})),[n,c,o,T]),V.useEffect(()=>n._removeUnmounted());const O=p.current!==n,A=y.current,C=V.useMemo(()=>{if(l)return null;const R=!O&&!Zr(A,o);return O||R?w():null},[l,O,o,A,w]);return C!==null?C:_}function I7(e){const t=xf(),{name:n,disabled:o,control:i=t.control,shouldUnregister:l,defaultValue:c,exact:d=!0}=e,f=j2(i._names.array,n),h=V.useMemo(()=>we(i._formValues,n,we(i._defaultValues,n,c)),[i,n,c]),v=C7({control:i,name:n,defaultValue:h,exact:d}),p=Pg({control:i,name:n,exact:d}),y=V.useRef(e),_=V.useRef(void 0),S=V.useRef(i.register(n,{...e.rules,value:v,...dr(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;const w=V.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!we(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!we(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!we(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!we(p.validatingFields,n)},error:{enumerable:!0,get:()=>we(p.errors,n)}}),[p,n]),T=V.useCallback(R=>S.current.onChange({target:{value:k2(R),name:n},type:Yd.CHANGE}),[n]),O=V.useCallback(()=>S.current.onBlur({target:{value:we(i._formValues,n),name:n},type:Yd.BLUR}),[n,i._formValues]),A=V.useCallback(R=>{const I=we(i._fields,n);I&&I._f&&R&&(I._f.ref={focus:()=>Un(R.focus)&&R.focus(),select:()=>Un(R.select)&&R.select(),setCustomValidity:k=>Un(R.setCustomValidity)&&R.setCustomValidity(k),reportValidity:()=>Un(R.reportValidity)&&R.reportValidity()})},[i._fields,n]),C=V.useMemo(()=>({name:n,value:v,...dr(o)||p.disabled?{disabled:p.disabled||o}:{},onChange:T,onBlur:O,ref:A}),[n,o,p.disabled,T,O,A,v]);return V.useEffect(()=>{const R=i._options.shouldUnregister||l,I=_.current;I&&I!==n&&!f&&i.unregister(I),i.register(n,{...y.current.rules,...dr(y.current.disabled)?{disabled:y.current.disabled}:{}});const k=(D,N)=>{const z=we(i._fields,D);z&&z._f&&(z._f.mount=N)};if(k(n,!0),R){const D=en(we(i._options.defaultValues,n,y.current.defaultValue));gt(i._defaultValues,n,D),Lt(we(i._formValues,n))&>(i._formValues,n,D)}return!f&&i.register(n),_.current=n,()=>{(f?R&&!i._state.action:R)?i.unregister(n):k(n,!1)}},[n,i,f,l]),V.useEffect(()=>{i._setDisabledField({disabled:o,name:n})},[o,n,i]),V.useMemo(()=>({field:C,formState:p,fieldState:w}),[C,p,w])}const M7=e=>e.render(I7(e));var kg=(e,t,n,o,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[o]:i||!0}}:{},Xl=e=>Array.isArray(e)?e:[e],HE=()=>{let e=[];return{get observers(){return e},next:i=>{for(const l of e)l.next&&l.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(l=>l!==i)}}),unsubscribe:()=>{e=[]}}};function U2(e,t){const n={};for(const o in e)if(e.hasOwnProperty(o)){const i=e[o],l=t[o];if(i&&on(i)&&l){const c=U2(i,l);on(c)&&(n[o]=c)}else e[o]&&(n[o]=l)}return n}var zn=e=>on(e)&&!Object.keys(e).length,jg=e=>e.type==="file",Kd=e=>{if(!Ig)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},B2=e=>e.type==="select-multiple",zg=e=>e.type==="radio",N7=e=>zg(e)||yc(e),Om=e=>Kd(e)&&e.isConnected;function D7(e,t){const n=t.slice(0,-1).length;let o=0;for(;o<n;)e=Lt(e)?o++:e[t[o++]];return e}function L7(e){for(const t in e)if(e.hasOwnProperty(t)&&!Lt(e[t]))return!1;return!0}function tn(e,t){const n=Array.isArray(t)?t:wf(t)?[t]:Ng(t),o=n.length===1?e:D7(e,n),i=n.length-1,l=n[i];return o&&delete o[l],i!==0&&(on(o)&&zn(o)||Array.isArray(o)&&L7(o))&&tn(e,n.slice(0,-1)),e}var P7=e=>{for(const t in e)if(Un(e[t]))return!0;return!1};function F2(e){return Array.isArray(e)||on(e)&&!P7(e)}function Cv(e,t={}){for(const n in e){const o=e[n];F2(o)?(t[n]=Array.isArray(o)?[]:{},Cv(o,t[n])):Lt(o)||(t[n]=!0)}return t}function _s(e,t,n){n||(n=Cv(t));for(const o in e){const i=e[o];if(F2(i))Lt(t)||Av(n[o])?n[o]=Cv(i,Array.isArray(i)?[]:{}):_s(i,Xn(t)?{}:t[o],n[o]);else{const l=t[o];n[o]=!Zr(i,l)}}return n}const GE={value:!1,isValid:!1},qE={value:!0,isValid:!0};var $2=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Lt(e[0].attributes.value)?Lt(e[0].value)||e[0].value===""?qE:{value:e[0].value,isValid:!0}:qE:GE}return GE},V2=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:o})=>Lt(e)?e:t?e===""?NaN:e&&+e:n&&pr(e)?new Date(e):o?o(e):e;const ZE={isValid:!1,value:null};var H2=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ZE):ZE;function YE(e){const t=e.ref;return jg(t)?t.files:zg(t)?H2(e.refs).value:B2(t)?[...t.selectedOptions].map(({value:n})=>n):yc(t)?$2(e.refs).value:V2(Lt(t.value)?e.ref.value:t.value,e)}var k7=(e,t,n,o)=>{const i={};for(const l of e){const c=we(t,l);c&>(i,l,c._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:o}},Wd=e=>e instanceof RegExp,zl=e=>Lt(e)?e:Wd(e)?e.source:on(e)?Wd(e.value)?e.value.source:e.value:e,KE=e=>({isOnSubmit:!e||e===qr.onSubmit,isOnBlur:e===qr.onBlur,isOnChange:e===qr.onChange,isOnAll:e===qr.all,isOnTouch:e===qr.onTouched});const WE="AsyncFunction";var j7=e=>!!e&&!!e.validate&&!!(Un(e.validate)&&e.validate.constructor.name===WE||on(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===WE)),z7=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),QE=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(o=>e.startsWith(o)&&/^\.\w+/.test(e.slice(o.length))));const Jl=(e,t,n,o)=>{for(const i of n||Object.keys(e)){const l=we(e,i);if(l){const{_f:c,...d}=l;if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],i)&&!o)return!0;if(c.ref&&t(c.ref,c.name)&&!o)return!0;if(Jl(d,t))break}else if(on(d)&&Jl(d,t))break}}};function XE(e,t,n){const o=we(e,n);if(o||wf(n))return{error:o,name:n};const i=n.split(".");for(;i.length;){const l=i.join("."),c=we(t,l),d=we(e,l);if(c&&!Array.isArray(c)&&n!==l)return{name:n};if(d&&d.type)return{name:l,error:d};if(d&&d.root&&d.root.type)return{name:`${l}.root`,error:d.root};i.pop()}return{name:n}}var U7=(e,t,n,o)=>{n(e);const{name:i,...l}=e;return zn(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(c=>t[c]===(!o||qr.all))},B7=(e,t,n)=>!e||!t||e===t||Xl(e).some(o=>o&&(n?o===t:o.startsWith(t)||t.startsWith(o))),F7=(e,t,n,o,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?o.isOnBlur:i.isOnBlur)?!e:(n?o.isOnChange:i.isOnChange)?e:!0,$7=(e,t)=>!Mg(we(e,t)).length&&tn(e,t),V7=(e,t,n)=>{const o=Xl(we(e,n));return gt(o,"root",t[n]),gt(e,n,o),e};function JE(e,t,n="validate"){if(pr(e)||Array.isArray(e)&&e.every(pr)||dr(e)&&!e)return{type:n,message:pr(e)?e:"",ref:t}}var fs=e=>on(e)&&!Wd(e)?e:{value:e,message:""},eS=async(e,t,n,o,i,l)=>{const{ref:c,refs:d,required:f,maxLength:h,minLength:v,min:p,max:y,pattern:_,validate:S,name:w,valueAsNumber:T,mount:O}=e._f,A=we(n,w);if(!O||t.has(w))return{};const C=d?d[0]:c,R=q=>{i&&C.reportValidity&&(C.setCustomValidity(dr(q)?"":q||""),C.reportValidity())},I={},k=zg(c),D=yc(c),N=k||D,z=(T||jg(c))&&Lt(c.value)&&Lt(A)||Kd(c)&&c.value===""||A===""||Array.isArray(A)&&!A.length,W=kg.bind(null,w,o,I),$=(q,j,X,oe=Bo.maxLength,L=Bo.minLength)=>{const F=q?j:X;I[w]={type:q?oe:L,message:F,ref:c,...W(q?oe:L,F)}};if(l?!Array.isArray(A)||!A.length:f&&(!N&&(z||Xn(A))||dr(A)&&!A||D&&!$2(d).isValid||k&&!H2(d).isValid)){const{value:q,message:j}=pr(f)?{value:!!f,message:f}:fs(f);if(q&&(I[w]={type:Bo.required,message:j,ref:C,...W(Bo.required,j)},!o))return R(j),I}if(!z&&(!Xn(p)||!Xn(y))){let q,j;const X=fs(y),oe=fs(p);if(!Xn(A)&&!isNaN(A)){const L=c.valueAsNumber||A&&+A;Xn(X.value)||(q=L>X.value),Xn(oe.value)||(j=L<oe.value)}else{const L=c.valueAsDate||new Date(A),F=ye=>new Date(new Date().toDateString()+" "+ye),G=c.type=="time",re=c.type=="week";pr(X.value)&&A&&(q=G?F(A)>F(X.value):re?A>X.value:L>new Date(X.value)),pr(oe.value)&&A&&(j=G?F(A)<F(oe.value):re?A<oe.value:L<new Date(oe.value))}if((q||j)&&($(!!q,X.message,oe.message,Bo.max,Bo.min),!o))return R(I[w].message),I}if((h||v)&&!z&&(pr(A)||l&&Array.isArray(A))){const q=fs(h),j=fs(v),X=!Xn(q.value)&&A.length>+q.value,oe=!Xn(j.value)&&A.length<+j.value;if((X||oe)&&($(X,q.message,j.message),!o))return R(I[w].message),I}if(_&&!z&&pr(A)){const{value:q,message:j}=fs(_);if(Wd(q)&&!A.match(q)&&(I[w]={type:Bo.pattern,message:j,ref:c,...W(Bo.pattern,j)},!o))return R(j),I}if(S){if(Un(S)){const q=await S(A,n),j=JE(q,C);if(j&&(I[w]={...j,...W(Bo.validate,j.message)},!o))return R(j.message),I}else if(on(S)){let q={};for(const j in S){if(!zn(q)&&!o)break;const X=JE(await S[j](A,n),C,j);X&&(q={...X,...W(j,X.message)},R(X.message),o&&(I[w]=q))}if(!zn(q)&&(I[w]={ref:C,...q},!o))return I}}return R(!0),I};const H7={mode:qr.onSubmit,reValidateMode:qr.onChange,shouldFocusError:!0};function G7(e={}){let t={...H7,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Un(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},o={},i=on(t.defaultValues)||on(t.values)?en(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:en(i),c={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},f,h=0;const v={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...v};let y={...p};const _={array:HE(),state:HE()},S=t.criteriaMode===qr.all,w=U=>Z=>{clearTimeout(h),h=setTimeout(U,Z)},T=async U=>{if(!c.keepIsValid&&!t.disabled&&(p.isValid||y.isValid||U)){let Z;t.resolver?(Z=zn((await N()).errors),O()):Z=await W(o,!0),Z!==n.isValid&&_.state.next({isValid:Z})}},O=(U,Z)=>{!t.disabled&&(p.isValidating||p.validatingFields||y.isValidating||y.validatingFields)&&((U||Array.from(d.mount)).forEach(Y=>{Y&&(Z?gt(n.validatingFields,Y,Z):tn(n.validatingFields,Y))}),_.state.next({validatingFields:n.validatingFields,isValidating:!zn(n.validatingFields)}))},A=(U,Z=[],Y,ue,pe=!0,he=!0)=>{if(ue&&Y&&!t.disabled){if(c.action=!0,he&&Array.isArray(we(o,U))){const xe=Y(we(o,U),ue.argA,ue.argB);pe&>(o,U,xe)}if(he&&Array.isArray(we(n.errors,U))){const xe=Y(we(n.errors,U),ue.argA,ue.argB);pe&>(n.errors,U,xe),$7(n.errors,U)}if((p.touchedFields||y.touchedFields)&&he&&Array.isArray(we(n.touchedFields,U))){const xe=Y(we(n.touchedFields,U),ue.argA,ue.argB);pe&>(n.touchedFields,U,xe)}(p.dirtyFields||y.dirtyFields)&&(n.dirtyFields=_s(i,l)),_.state.next({name:U,isDirty:q(U,Z),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else gt(l,U,Z)},C=(U,Z)=>{gt(n.errors,U,Z),_.state.next({errors:n.errors})},R=U=>{n.errors=U,_.state.next({errors:n.errors,isValid:!1})},I=(U,Z,Y,ue)=>{const pe=we(o,U);if(pe){const he=we(l,U,Lt(Y)?we(i,U):Y);Lt(he)||ue&&ue.defaultChecked||Z?gt(l,U,Z?he:YE(pe._f)):oe(U,he),c.mount&&!c.action&&T()}},k=(U,Z,Y,ue,pe)=>{let he=!1,xe=!1;const Be={name:U};if(!t.disabled){if(!Y||ue){(p.isDirty||y.isDirty)&&(xe=n.isDirty,n.isDirty=Be.isDirty=q(),he=xe!==Be.isDirty);const Ze=Zr(we(i,U),Z);xe=!!we(n.dirtyFields,U),Ze?tn(n.dirtyFields,U):gt(n.dirtyFields,U,!0),Be.dirtyFields=n.dirtyFields,he=he||(p.dirtyFields||y.dirtyFields)&&xe!==!Ze}if(Y){const Ze=we(n.touchedFields,U);Ze||(gt(n.touchedFields,U,Y),Be.touchedFields=n.touchedFields,he=he||(p.touchedFields||y.touchedFields)&&Ze!==Y)}he&&pe&&_.state.next(Be)}return he?Be:{}},D=(U,Z,Y,ue)=>{const pe=we(n.errors,U),he=(p.isValid||y.isValid)&&dr(Z)&&n.isValid!==Z;if(t.delayError&&Y?(f=w(()=>C(U,Y)),f(t.delayError)):(clearTimeout(h),f=null,Y?gt(n.errors,U,Y):tn(n.errors,U)),(Y?!Zr(pe,Y):pe)||!zn(ue)||he){const xe={...ue,...he&&dr(Z)?{isValid:Z}:{},errors:n.errors,name:U};n={...n,...xe},_.state.next(xe)}},N=async U=>(O(U,!0),await t.resolver(l,t.context,k7(U||d.mount,o,t.criteriaMode,t.shouldUseNativeValidation))),z=async U=>{const{errors:Z}=await N(U);if(O(U),U)for(const Y of U){const ue=we(Z,Y);ue?gt(n.errors,Y,ue):tn(n.errors,Y)}else n.errors=Z;return Z},W=async(U,Z,Y={valid:!0})=>{for(const ue in U){const pe=U[ue];if(pe){const{_f:he,...xe}=pe;if(he){const Be=d.array.has(he.name),Ze=pe._f&&j7(pe._f);Ze&&p.validatingFields&&O([he.name],!0);const ft=await eS(pe,d.disabled,l,S,t.shouldUseNativeValidation&&!Z,Be);if(Ze&&p.validatingFields&&O([he.name]),ft[he.name]&&(Y.valid=!1,Z||e.shouldUseNativeValidation))break;!Z&&(we(ft,he.name)?Be?V7(n.errors,ft,he.name):gt(n.errors,he.name,ft[he.name]):tn(n.errors,he.name))}!zn(xe)&&await W(xe,Z,Y)}}return Y.valid},$=()=>{for(const U of d.unMount){const Z=we(o,U);Z&&(Z._f.refs?Z._f.refs.every(Y=>!Om(Y)):!Om(Z._f.ref))&&Se(U)}d.unMount=new Set},q=(U,Z)=>!t.disabled&&(U&&Z&>(l,U,Z),!Zr(P(),i)),j=(U,Z,Y)=>Tv(U,d,{...c.mount?l:Lt(Z)?i:pr(U)?{[U]:Z}:Z},Y,Z),X=U=>Mg(we(c.mount?l:i,U,t.shouldUnregister?we(i,U,[]):[])),oe=(U,Z,Y={})=>{const ue=we(o,U);let pe=Z;if(ue){const he=ue._f;he&&(!he.disabled&>(l,U,V2(Z,he)),pe=Kd(he.ref)&&Xn(Z)?"":Z,B2(he.ref)?[...he.ref.options].forEach(xe=>xe.selected=pe.includes(xe.value)):he.refs?yc(he.ref)?he.refs.forEach(xe=>{(!xe.defaultChecked||!xe.disabled)&&(Array.isArray(pe)?xe.checked=!!pe.find(Be=>Be===xe.value):xe.checked=pe===xe.value||!!pe)}):he.refs.forEach(xe=>xe.checked=xe.value===pe):jg(he.ref)?he.ref.value="":(he.ref.value=pe,he.ref.type||_.state.next({name:U,values:en(l)})))}(Y.shouldDirty||Y.shouldTouch)&&k(U,pe,Y.shouldTouch,Y.shouldDirty,!0),Y.shouldValidate&&ye(U)},L=(U,Z,Y)=>{for(const ue in Z){if(!Z.hasOwnProperty(ue))return;const pe=Z[ue],he=U+"."+ue,xe=we(o,he);(d.array.has(U)||on(pe)||xe&&!xe._f)&&!ui(pe)?L(he,pe,Y):oe(he,pe,Y)}},F=(U,Z,Y={})=>{const ue=we(o,U),pe=d.array.has(U),he=en(Z);gt(l,U,he),pe?(_.array.next({name:U,values:en(l)}),(p.isDirty||p.dirtyFields||y.isDirty||y.dirtyFields)&&Y.shouldDirty&&_.state.next({name:U,dirtyFields:_s(i,l),isDirty:q(U,he)})):ue&&!ue._f&&!Xn(he)?L(U,he,Y):oe(U,he,Y),QE(U,d)?_.state.next({...n,name:U,values:en(l)}):_.state.next({name:c.mount?U:void 0,values:en(l)})},G=async U=>{c.mount=!0;const Z=U.target;let Y=Z.name,ue=!0;const pe=we(o,Y),he=Ze=>{ue=Number.isNaN(Ze)||ui(Ze)&&isNaN(Ze.getTime())||Zr(Ze,we(l,Y,Ze))},xe=KE(t.mode),Be=KE(t.reValidateMode);if(pe){let Ze,ft;const Mn=Z.type?YE(pe._f):k2(U),Tt=U.type===Yd.BLUR||U.type===Yd.FOCUS_OUT,Zt=!z7(pe._f)&&!t.resolver&&!we(n.errors,Y)&&!pe._f.deps||F7(Tt,we(n.touchedFields,Y),n.isSubmitted,Be,xe),At=QE(Y,d,Tt);gt(l,Y,Mn),Tt?(!Z||!Z.readOnly)&&(pe._f.onBlur&&pe._f.onBlur(U),f&&f(0)):pe._f.onChange&&pe._f.onChange(U);const an=k(Y,Mn,Tt),Yt=!zn(an)||At;if(!Tt&&_.state.next({name:Y,type:U.type,values:en(l)}),Zt)return(p.isValid||y.isValid)&&(t.mode==="onBlur"?Tt&&T():Tt||T()),Yt&&_.state.next({name:Y,...At?{}:an});if(!Tt&&At&&_.state.next({...n}),t.resolver){const{errors:qo}=await N([Y]);if(O([Y]),he(Mn),ue){const _o=XE(n.errors,o,Y),Ie=XE(qo,o,_o.name||Y);Ze=Ie.error,Y=Ie.name,ft=zn(qo)}}else O([Y],!0),Ze=(await eS(pe,d.disabled,l,S,t.shouldUseNativeValidation))[Y],O([Y]),he(Mn),ue&&(Ze?ft=!1:(p.isValid||y.isValid)&&(ft=await W(o,!0)));ue&&(pe._f.deps&&(!Array.isArray(pe._f.deps)||pe._f.deps.length>0)&&ye(pe._f.deps),D(Y,ft,Ze,an))}},re=(U,Z)=>{if(we(n.errors,Z)&&U.focus)return U.focus(),1},ye=async(U,Z={})=>{let Y,ue;const pe=Xl(U);if(t.resolver){const he=await z(Lt(U)?U:pe);Y=zn(he),ue=U?!pe.some(xe=>we(he,xe)):Y}else U?(ue=(await Promise.all(pe.map(async he=>{const xe=we(o,he);return await W(xe&&xe._f?{[he]:xe}:xe)}))).every(Boolean),!(!ue&&!n.isValid)&&T()):ue=Y=await W(o);return _.state.next({...!pr(U)||(p.isValid||y.isValid)&&Y!==n.isValid?{}:{name:U},...t.resolver||!U?{isValid:Y}:{},errors:n.errors}),Z.shouldFocus&&!ue&&Jl(o,re,U?pe:d.mount),ue},P=(U,Z)=>{let Y={...c.mount?l:i};return Z&&(Y=U2(Z.dirtyFields?n.dirtyFields:n.touchedFields,Y)),Lt(U)?Y:pr(U)?we(Y,U):U.map(ue=>we(Y,ue))},Q=(U,Z)=>({invalid:!!we((Z||n).errors,U),isDirty:!!we((Z||n).dirtyFields,U),error:we((Z||n).errors,U),isValidating:!!we(n.validatingFields,U),isTouched:!!we((Z||n).touchedFields,U)}),te=U=>{U&&Xl(U).forEach(Z=>tn(n.errors,Z)),_.state.next({errors:U?n.errors:{}})},se=(U,Z,Y)=>{const ue=(we(o,U,{_f:{}})._f||{}).ref,pe=we(n.errors,U)||{},{ref:he,message:xe,type:Be,...Ze}=pe;gt(n.errors,U,{...Ze,...Z,ref:ue}),_.state.next({name:U,errors:n.errors,isValid:!1}),Y&&Y.shouldFocus&&ue&&ue.focus&&ue.focus()},me=(U,Z)=>Un(U)?_.state.subscribe({next:Y=>"values"in Y&&U(j(void 0,Z),Y)}):j(U,Z,!0),_e=U=>_.state.subscribe({next:Z=>{B7(U.name,Z.name,U.exact)&&U7(Z,U.formState||p,et,U.reRenderRoot)&&U.callback({values:{...l},...n,...Z,defaultValues:i})}}).unsubscribe,be=U=>(c.mount=!0,y={...y,...U.formState},_e({...U,formState:{...v,...U.formState}})),Se=(U,Z={})=>{for(const Y of U?Xl(U):d.mount)d.mount.delete(Y),d.array.delete(Y),Z.keepValue||(tn(o,Y),tn(l,Y)),!Z.keepError&&tn(n.errors,Y),!Z.keepDirty&&tn(n.dirtyFields,Y),!Z.keepTouched&&tn(n.touchedFields,Y),!Z.keepIsValidating&&tn(n.validatingFields,Y),!t.shouldUnregister&&!Z.keepDefaultValue&&tn(i,Y);_.state.next({values:en(l)}),_.state.next({...n,...Z.keepDirty?{isDirty:q()}:{}}),!Z.keepIsValid&&T()},De=({disabled:U,name:Z})=>{(dr(U)&&c.mount||U||d.disabled.has(Z))&&(U?d.disabled.add(Z):d.disabled.delete(Z))},Le=(U,Z={})=>{let Y=we(o,U);const ue=dr(Z.disabled)||dr(t.disabled);return gt(o,U,{...Y||{},_f:{...Y&&Y._f?Y._f:{ref:{name:U}},name:U,mount:!0,...Z}}),d.mount.add(U),Y?De({disabled:dr(Z.disabled)?Z.disabled:t.disabled,name:U}):I(U,!0,Z.value),{...ue?{disabled:Z.disabled||t.disabled}:{},...t.progressive?{required:!!Z.required,min:zl(Z.min),max:zl(Z.max),minLength:zl(Z.minLength),maxLength:zl(Z.maxLength),pattern:zl(Z.pattern)}:{},name:U,onChange:G,onBlur:G,ref:pe=>{if(pe){Le(U,Z),Y=we(o,U);const he=Lt(pe.value)&&pe.querySelectorAll&&pe.querySelectorAll("input,select,textarea")[0]||pe,xe=N7(he),Be=Y._f.refs||[];if(xe?Be.find(Ze=>Ze===he):he===Y._f.ref)return;gt(o,U,{_f:{...Y._f,...xe?{refs:[...Be.filter(Om),he,...Array.isArray(we(i,U))?[{}]:[]],ref:{type:he.type,name:U}}:{ref:he}}}),I(U,!1,void 0,he)}else Y=we(o,U,{}),Y._f&&(Y._f.mount=!1),(t.shouldUnregister||Z.shouldUnregister)&&!(j2(d.array,U)&&c.action)&&d.unMount.add(U)}}},Ee=()=>t.shouldFocusError&&Jl(o,re,d.mount),ze=U=>{dr(U)&&(_.state.next({disabled:U}),Jl(o,(Z,Y)=>{const ue=we(o,Y);ue&&(Z.disabled=ue._f.disabled||U,Array.isArray(ue._f.refs)&&ue._f.refs.forEach(pe=>{pe.disabled=ue._f.disabled||U}))},0,!1))},Nt=(U,Z)=>async Y=>{let ue;Y&&(Y.preventDefault&&Y.preventDefault(),Y.persist&&Y.persist());let pe=en(l);if(_.state.next({isSubmitting:!0}),t.resolver){const{errors:he,values:xe}=await N();O(),n.errors=he,pe=en(xe)}else await W(o);if(d.disabled.size)for(const he of d.disabled)tn(pe,he);if(tn(n.errors,"root"),zn(n.errors)){_.state.next({errors:{}});try{await U(pe,Y)}catch(he){ue=he}}else Z&&await Z({...n.errors},Y),Ee(),setTimeout(Ee);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:zn(n.errors)&&!ue,submitCount:n.submitCount+1,errors:n.errors}),ue)throw ue},ge=(U,Z={})=>{we(o,U)&&(Lt(Z.defaultValue)?F(U,en(we(i,U))):(F(U,Z.defaultValue),gt(i,U,en(Z.defaultValue))),Z.keepTouched||tn(n.touchedFields,U),Z.keepDirty||(tn(n.dirtyFields,U),n.isDirty=Z.defaultValue?q(U,en(we(i,U))):q()),Z.keepError||(tn(n.errors,U),p.isValid&&T()),_.state.next({...n}))},ve=(U,Z={})=>{const Y=U?en(U):i,ue=en(Y),pe=zn(U),he=pe?i:ue;if(Z.keepDefaultValues||(i=Y),!Z.keepValues){if(Z.keepDirtyValues){const xe=new Set([...d.mount,...Object.keys(_s(i,l))]);for(const Be of Array.from(xe)){const Ze=we(n.dirtyFields,Be),ft=we(l,Be),Mn=we(he,Be);Ze&&!Lt(ft)?gt(he,Be,ft):!Ze&&!Lt(Mn)&&F(Be,Mn)}}else{if(Ig&&Lt(U))for(const xe of d.mount){const Be=we(o,xe);if(Be&&Be._f){const Ze=Array.isArray(Be._f.refs)?Be._f.refs[0]:Be._f.ref;if(Kd(Ze)){const ft=Ze.closest("form");if(ft){ft.reset();break}}}}if(Z.keepFieldsRef)for(const xe of d.mount)F(xe,we(he,xe));else o={}}l=t.shouldUnregister?Z.keepDefaultValues?en(i):{}:en(he),_.array.next({values:{...he}}),_.state.next({values:{...he}})}d={mount:Z.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!p.isValid||!!Z.keepIsValid||!!Z.keepDirtyValues||!t.shouldUnregister&&!zn(he),c.watch=!!t.shouldUnregister,c.keepIsValid=!!Z.keepIsValid,c.action=!1,Z.keepErrors||(n.errors={}),_.state.next({submitCount:Z.keepSubmitCount?n.submitCount:0,isDirty:pe?!1:Z.keepDirty?n.isDirty:!!(Z.keepDefaultValues&&!Zr(U,i)),isSubmitted:Z.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:pe?{}:Z.keepDirtyValues?Z.keepDefaultValues&&l?_s(i,l):n.dirtyFields:Z.keepDefaultValues&&U?_s(i,U):Z.keepDirty?n.dirtyFields:{},touchedFields:Z.keepTouched?n.touchedFields:{},errors:Z.keepErrors?n.errors:{},isSubmitSuccessful:Z.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Re=(U,Z)=>ve(Un(U)?U(l):U,{...t.resetOptions,...Z}),ke=(U,Z={})=>{const Y=we(o,U),ue=Y&&Y._f;if(ue){const pe=ue.refs?ue.refs[0]:ue.ref;pe.focus&&setTimeout(()=>{pe.focus(),Z.shouldSelect&&Un(pe.select)&&pe.select()})}},et=U=>{n={...n,...U}},Qe={control:{register:Le,unregister:Se,getFieldState:Q,handleSubmit:Nt,setError:se,_subscribe:_e,_runSchema:N,_updateIsValidating:O,_focusError:Ee,_getWatch:j,_getDirty:q,_setValid:T,_setFieldArray:A,_setDisabledField:De,_setErrors:R,_getFieldArray:X,_reset:ve,_resetDefaultValues:()=>Un(t.defaultValues)&&t.defaultValues().then(U=>{Re(U,t.resetOptions),_.state.next({isLoading:!1})}),_removeUnmounted:$,_disableForm:ze,_subjects:_,_proxyFormState:p,get _fields(){return o},get _formValues(){return l},get _state(){return c},set _state(U){c=U},get _defaultValues(){return i},get _names(){return d},set _names(U){d=U},get _formState(){return n},get _options(){return t},set _options(U){t={...t,...U}}},subscribe:be,trigger:ye,register:Le,handleSubmit:Nt,watch:me,setValue:F,getValues:P,reset:Re,resetField:ge,clearErrors:te,unregister:Se,setError:se,setFocus:ke,getFieldState:Q};return{...Qe,formControl:Qe}}function mo(e={}){const t=V.useRef(void 0),n=V.useRef(void 0),[o,i]=V.useState({isDirty:!1,isValidating:!1,isLoading:Un(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Un(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!Un(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:c,...d}=G7(e);t.current={...d,formState:o}}const l=t.current.control;return l._options=e,Lg(()=>{const c=l._subscribe({formState:l._proxyFormState,callback:()=>i({...l._formState}),reRenderRoot:!0});return i(d=>({...d,isReady:!0})),l._formState.isReady=!0,c},[l]),V.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),V.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),V.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),V.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),V.useEffect(()=>{if(l._proxyFormState.isDirty){const c=l._getDirty();c!==o.isDirty&&l._subjects.state.next({isDirty:c})}},[l,o.isDirty]),V.useEffect(()=>{var c;e.values&&!Zr(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((c=l._options.resetOptions)===null||c===void 0)&&c.keepIsValid||l._setValid(),n.current=e.values,i(d=>({...d}))):l._resetDefaultValues()},[l,e.values]),V.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=z2(o,l),t.current}function tS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bc(...e){return t=>{let n=!1;const o=e.map(i=>{const l=tS(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<o.length;i++){const l=o[i];typeof l=="function"?l():tS(e[i],null)}}}}function dn(...e){return E.useCallback(bc(...e),e)}var q7=Symbol.for("react.lazy"),Qd=eg[" use ".trim().toString()];function Z7(e){return typeof e=="object"&&e!==null&&"then"in e}function G2(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===q7&&"_payload"in e&&Z7(e._payload)}function q2(e){const t=Y7(e),n=E.forwardRef((o,i)=>{let{children:l,...c}=o;G2(l)&&typeof Qd=="function"&&(l=Qd(l._payload));const d=E.Children.toArray(l),f=d.find(W7);if(f){const h=f.props.children,v=d.map(p=>p===f?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:p);return b.jsx(t,{...c,ref:i,children:E.isValidElement(h)?E.cloneElement(h,void 0,v):null})}return b.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}var Z2=q2("Slot");function Y7(e){const t=E.forwardRef((n,o)=>{let{children:i,...l}=n;if(G2(i)&&typeof Qd=="function"&&(i=Qd(i._payload)),E.isValidElement(i)){const c=X7(i),d=Q7(l,i.props);return i.type!==E.Fragment&&(d.ref=o?bc(o,c):c),E.cloneElement(i,d)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var K7=Symbol("radix.slottable");function W7(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===K7}function Q7(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const f=l(...d);return i(...d),f}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function X7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const nS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rS=ux,J7=(e,t)=>n=>{var o;if(t?.variants==null)return rS(e,n?.class,n?.className);const{variants:i,defaultVariants:l}=t,c=Object.keys(i).map(h=>{const v=n?.[h],p=l?.[h];if(v===null)return null;const y=nS(v)||nS(p);return i[h][y]}),d=n&&Object.entries(n).reduce((h,v)=>{let[p,y]=v;return y===void 0||(h[p]=y),h},{}),f=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((h,v)=>{let{class:p,className:y,..._}=v;return Object.entries(_).every(S=>{let[w,T]=S;return Array.isArray(T)?T.includes({...l,...d}[w]):{...l,...d}[w]===T})?[...h,p,y]:h},[]);return rS(e,c,f,n?.class,n?.className)},oS=(e,t,n)=>{if(e&&"reportValidity"in e){const o=we(n,t);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},Iv=(e,t)=>{for(const n in t.fields){const o=t.fields[n];o&&o.ref&&"reportValidity"in o.ref?oS(o.ref,n,e):o&&o.refs&&o.refs.forEach(i=>oS(i,n,e))}},aS=(e,t)=>{t.shouldUseNativeValidation&&Iv(e,t);const n={};for(const o in e){const i=we(t.fields,o),l=Object.assign(e[o]||{},{ref:i&&i.ref});if(ek(t.names||Object.keys(e),o)){const c=Object.assign({},we(n,o));gt(c,"root",l),gt(n,o,c)}else gt(n,o,l)}return n},ek=(e,t)=>{const n=iS(t);return e.some(o=>iS(o).match(`^${n}\\.\\d+`))};function iS(e){return e.replace(/\]|\[/g,"")}function sS(e,t){try{var n=e()}catch(o){return t(o)}return n&&n.then?n.then(void 0,t):n}function tk(e,t){for(var n={};e.length;){var o=e[0],i=o.code,l=o.message,c=o.path.join(".");if(!n[c])if("unionErrors"in o){var d=o.unionErrors[0].errors[0];n[c]={message:d.message,type:d.code}}else n[c]={message:l,type:i};if("unionErrors"in o&&o.unionErrors.forEach(function(v){return v.errors.forEach(function(p){return e.push(p)})}),t){var f=n[c].types,h=f&&f[o.code];n[c]=kg(c,t,n,i,h?[].concat(h,o.message):o.message)}e.shift()}return n}function nk(e,t){for(var n={};e.length;){var o=e[0],i=o.code,l=o.message,c=o.path.join(".");if(!n[c])if(o.code==="invalid_union"&&o.errors.length>0){var d=o.errors[0][0];n[c]={message:d.message,type:d.code}}else n[c]={message:l,type:i};if(o.code==="invalid_union"&&o.errors.forEach(function(v){return v.forEach(function(p){return e.push(p)})}),t){var f=n[c].types,h=f&&f[o.code];n[c]=kg(c,t,n,i,h?[].concat(h,o.message):o.message)}e.shift()}return n}function vo(e,t,n){if(n===void 0&&(n={}),(function(o){return"_def"in o&&typeof o._def=="object"&&"typeName"in o._def})(e))return function(o,i,l){try{return Promise.resolve(sS(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](o,t)).then(function(c){return l.shouldUseNativeValidation&&Iv({},l),{errors:{},values:n.raw?Object.assign({},o):c}})},function(c){if((function(d){return Array.isArray(d?.issues)})(c))return{values:{},errors:aS(tk(c.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw c}))}catch(c){return Promise.reject(c)}};if((function(o){return"_zod"in o&&typeof o._zod=="object"})(e))return function(o,i,l){try{return Promise.resolve(sS(function(){return Promise.resolve((n.mode==="sync"?pM:mM)(e,o,t)).then(function(c){return l.shouldUseNativeValidation&&Iv({},l),{errors:{},values:n.raw?Object.assign({},o):c}})},function(c){if((function(d){return d instanceof _g})(c))return{values:{},errors:aS(nk(c.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw c}))}catch(c){return Promise.reject(c)}};throw new Error("Invalid input: not a Zod schema")}function Ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function rk(e,t){const n=E.createContext(t),o=l=>{const{children:c,...d}=l,f=E.useMemo(()=>d,Object.values(d));return b.jsx(n.Provider,{value:f,children:c})};o.displayName=e+"Provider";function i(l){const c=E.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[o,i]}function wi(e,t=[]){let n=[];function o(l,c){const d=E.createContext(c),f=n.length;n=[...n,c];const h=p=>{const{scope:y,children:_,...S}=p,w=y?.[e]?.[f]||d,T=E.useMemo(()=>S,Object.values(S));return b.jsx(w.Provider,{value:T,children:_})};h.displayName=l+"Provider";function v(p,y){const _=y?.[e]?.[f]||d,S=E.useContext(_);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,v]}const i=()=>{const l=n.map(c=>E.createContext(c));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return i.scopeName=e,[o,ok(i,...t)]}function ok(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const c=o.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var Kr=globalThis?.document?E.useLayoutEffect:()=>{},ak=eg[" useId ".trim().toString()]||(()=>{}),ik=0;function Ia(e){const[t,n]=E.useState(ak());return Kr(()=>{n(o=>o??String(ik++))},[e]),e||(t?`radix-${t}`:"")}var sk=eg[" useInsertionEffect ".trim().toString()]||Kr;function _c({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,l,c]=lk({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:i;{const v=E.useRef(e!==void 0);E.useEffect(()=>{const p=v.current;p!==d&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=d},[d,o])}const h=E.useCallback(v=>{if(d){const p=ck(v)?v(e):v;p!==e&&c.current?.(p)}else l(v)},[d,e,l,c]);return[f,h]}function lk({defaultProp:e,onChange:t}){const[n,o]=E.useState(e),i=E.useRef(n),l=E.useRef(t);return sk(()=>{l.current=t},[t]),E.useEffect(()=>{i.current!==n&&(l.current?.(n),i.current=n)},[n,i]),[n,o,l]}function ck(e){return typeof e=="function"}function cc(e){const t=uk(e),n=E.forwardRef((o,i)=>{const{children:l,...c}=o,d=E.Children.toArray(l),f=d.find(dk);if(f){const h=f.props.children,v=d.map(p=>p===f?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:p);return b.jsx(t,{...c,ref:i,children:E.isValidElement(h)?E.cloneElement(h,void 0,v):null})}return b.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function uk(e){const t=E.forwardRef((n,o)=>{const{children:i,...l}=n;if(E.isValidElement(i)){const c=hk(i),d=fk(l,i.props);return i.type!==E.Fragment&&(d.ref=o?bc(o,c):c),E.cloneElement(i,d)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Y2=Symbol("radix.slottable");function OH(e){const t=({children:n})=>b.jsx(b.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Y2,t}function dk(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Y2}function fk(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const f=l(...d);return i(...d),f}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function hk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ut=pk.reduce((e,t)=>{const n=cc(`Primitive.${t}`),o=E.forwardRef((i,l)=>{const{asChild:c,...d}=i,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function K2(e,t){e&&mf.flushSync(()=>e.dispatchEvent(t))}function Wr(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>t.current?.(...n),[])}function mk(e,t=globalThis?.document){const n=Wr(e);E.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var vk="DismissableLayer",Mv="dismissableLayer.update",gk="dismissableLayer.pointerDownOutside",yk="dismissableLayer.focusOutside",lS,W2=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ug=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...f}=e,h=E.useContext(W2),[v,p]=E.useState(null),y=v?.ownerDocument??globalThis?.document,[,_]=E.useState({}),S=dn(t,D=>p(D)),w=Array.from(h.layers),[T]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),O=w.indexOf(T),A=v?w.indexOf(v):-1,C=h.layersWithOutsidePointerEventsDisabled.size>0,R=A>=O,I=Ek(D=>{const N=D.target,z=[...h.branches].some(W=>W.contains(N));!R||z||(i?.(D),c?.(D),D.defaultPrevented||d?.())},y),k=Sk(D=>{const N=D.target;[...h.branches].some(W=>W.contains(N))||(l?.(D),c?.(D),D.defaultPrevented||d?.())},y);return mk(D=>{A===h.layers.size-1&&(o?.(D),!D.defaultPrevented&&d&&(D.preventDefault(),d()))},y),E.useEffect(()=>{if(v)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(lS=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),cS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=lS)}},[v,y,n,h]),E.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),cS())},[v,h]),E.useEffect(()=>{const D=()=>_({});return document.addEventListener(Mv,D),()=>document.removeEventListener(Mv,D)},[]),b.jsx(Ut.div,{...f,ref:S,style:{pointerEvents:C?R?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,I.onPointerDownCapture)})});Ug.displayName=vk;var bk="DismissableLayerBranch",_k=E.forwardRef((e,t)=>{const n=E.useContext(W2),o=E.useRef(null),i=dn(t,o);return E.useEffect(()=>{const l=o.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),b.jsx(Ut.div,{...e,ref:i})});_k.displayName=bk;function Ek(e,t=globalThis?.document){const n=Wr(e),o=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const l=d=>{if(d.target&&!o.current){let f=function(){Q2(gk,n,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Sk(e,t=globalThis?.document){const n=Wr(e),o=E.useRef(!1);return E.useEffect(()=>{const i=l=>{l.target&&!o.current&&Q2(yk,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function cS(){const e=new CustomEvent(Mv);document.dispatchEvent(e)}function Q2(e,t,n,{discrete:o}){const i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?K2(i,l):i.dispatchEvent(l)}var Tm="focusScope.autoFocusOnMount",Am="focusScope.autoFocusOnUnmount",uS={bubbles:!1,cancelable:!0},wk="FocusScope",Bg=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...c}=e,[d,f]=E.useState(null),h=Wr(i),v=Wr(l),p=E.useRef(null),y=dn(t,w=>f(w)),_=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(o){let w=function(C){if(_.paused||!d)return;const R=C.target;d.contains(R)?p.current=R:Ea(p.current,{select:!0})},T=function(C){if(_.paused||!d)return;const R=C.relatedTarget;R!==null&&(d.contains(R)||Ea(p.current,{select:!0}))},O=function(C){if(document.activeElement===document.body)for(const I of C)I.removedNodes.length>0&&Ea(d)};document.addEventListener("focusin",w),document.addEventListener("focusout",T);const A=new MutationObserver(O);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",T),A.disconnect()}}},[o,d,_.paused]),E.useEffect(()=>{if(d){fS.add(_);const w=document.activeElement;if(!d.contains(w)){const O=new CustomEvent(Tm,uS);d.addEventListener(Tm,h),d.dispatchEvent(O),O.defaultPrevented||(xk(Ck(X2(d)),{select:!0}),document.activeElement===w&&Ea(d))}return()=>{d.removeEventListener(Tm,h),setTimeout(()=>{const O=new CustomEvent(Am,uS);d.addEventListener(Am,v),d.dispatchEvent(O),O.defaultPrevented||Ea(w??document.body,{select:!0}),d.removeEventListener(Am,v),fS.remove(_)},0)}}},[d,h,v,_]);const S=E.useCallback(w=>{if(!n&&!o||_.paused)return;const T=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,O=document.activeElement;if(T&&O){const A=w.currentTarget,[C,R]=Rk(A);C&&R?!w.shiftKey&&O===R?(w.preventDefault(),n&&Ea(C,{select:!0})):w.shiftKey&&O===C&&(w.preventDefault(),n&&Ea(R,{select:!0})):O===A&&w.preventDefault()}},[n,o,_.paused]);return b.jsx(Ut.div,{tabIndex:-1,...c,ref:y,onKeyDown:S})});Bg.displayName=wk;function xk(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ea(o,{select:t}),document.activeElement!==n)return}function Rk(e){const t=X2(e),n=dS(t,e),o=dS(t.reverse(),e);return[n,o]}function X2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function dS(e,t){for(const n of e)if(!Ok(n,{upTo:t}))return n}function Ok(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Tk(e){return e instanceof HTMLInputElement&&"select"in e}function Ea(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Tk(e)&&t&&e.select()}}var fS=Ak();function Ak(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=hS(e,t),e.unshift(t)},remove(t){e=hS(e,t),e[0]?.resume()}}}function hS(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ck(e){return e.filter(t=>t.tagName!=="A")}var Ik="Portal",Fg=E.forwardRef((e,t)=>{const{container:n,...o}=e,[i,l]=E.useState(!1);Kr(()=>l(!0),[]);const c=n||i&&globalThis?.document?.body;return c?Yw.createPortal(b.jsx(Ut.div,{...o,ref:t}),c):null});Fg.displayName=Ik;function Mk(e,t){return E.useReducer((n,o)=>t[n][o]??n,e)}var Go=e=>{const{present:t,children:n}=e,o=Nk(t),i=typeof n=="function"?n({present:o.isPresent}):E.Children.only(n),l=dn(o.ref,Dk(i));return typeof n=="function"||o.isPresent?E.cloneElement(i,{ref:l}):null};Go.displayName="Presence";function Nk(e){const[t,n]=E.useState(),o=E.useRef(null),i=E.useRef(e),l=E.useRef("none"),c=e?"mounted":"unmounted",[d,f]=Mk(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const h=rd(o.current);l.current=d==="mounted"?h:"none"},[d]),Kr(()=>{const h=o.current,v=i.current;if(v!==e){const y=l.current,_=rd(h);e?f("MOUNT"):_==="none"||h?.display==="none"?f("UNMOUNT"):f(v&&y!==_?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Kr(()=>{if(t){let h;const v=t.ownerDocument.defaultView??window,p=_=>{const w=rd(o.current).includes(CSS.escape(_.animationName));if(_.target===t&&w&&(f("ANIMATION_END"),!i.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",h=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},y=_=>{_.target===t&&(l.current=rd(o.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{v.clearTimeout(h),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:E.useCallback(h=>{o.current=h?getComputedStyle(h):null,n(h)},[])}}function rd(e){return e?.animationName||"none"}function Dk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cm=0;function J2(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pS()),document.body.insertAdjacentElement("beforeend",e[1]??pS()),Cm++,()=>{Cm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Cm--}},[])}function pS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var co=function(){return co=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},co.apply(this,arguments)};function eR(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n}function Lk(e,t,n){if(n||arguments.length===2)for(var o=0,i=t.length,l;o<i;o++)(l||!(o in t))&&(l||(l=Array.prototype.slice.call(t,0,o)),l[o]=t[o]);return e.concat(l||Array.prototype.slice.call(t))}var xd="right-scroll-bar-position",Rd="width-before-scroll-bar",Pk="with-scroll-bars-hidden",kk="--removed-body-scroll-bar-size";function Im(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jk(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o&&(n.value=o,n.callback(o,i))}}}})[0];return n.callback=t,n.facade}var zk=typeof window<"u"?E.useLayoutEffect:E.useEffect,mS=new WeakMap;function Uk(e,t){var n=jk(null,function(o){return e.forEach(function(i){return Im(i,o)})});return zk(function(){var o=mS.get(n);if(o){var i=new Set(o),l=new Set(e),c=n.current;i.forEach(function(d){l.has(d)||Im(d,null)}),l.forEach(function(d){i.has(d)||Im(d,c)})}mS.set(n,e)},[e]),n}function Bk(e){return e}function Fk(e,t){t===void 0&&(t=Bk);var n=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var c=t(l,o);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(l){for(o=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){o=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(l),c=n}var f=function(){var v=c;c=[],v.forEach(l)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(v){c.push(v),h()},filter:function(v){return c=c.filter(v),n}}}};return i}function $k(e){e===void 0&&(e={});var t=Fk(null);return t.options=co({async:!0,ssr:!1},e),t}var tR=function(e){var t=e.sideCar,n=eR(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return E.createElement(o,co({},n))};tR.isSideCarExport=!0;function Vk(e,t){return e.useMedium(t),tR}var nR=$k(),Mm=function(){},Rf=E.forwardRef(function(e,t){var n=E.useRef(null),o=E.useState({onScrollCapture:Mm,onWheelCapture:Mm,onTouchMoveCapture:Mm}),i=o[0],l=o[1],c=e.forwardProps,d=e.children,f=e.className,h=e.removeScrollBar,v=e.enabled,p=e.shards,y=e.sideCar,_=e.noRelative,S=e.noIsolation,w=e.inert,T=e.allowPinchZoom,O=e.as,A=O===void 0?"div":O,C=e.gapMode,R=eR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=y,k=Uk([n,t]),D=co(co({},R),i);return E.createElement(E.Fragment,null,v&&E.createElement(I,{sideCar:nR,removeScrollBar:h,shards:p,noRelative:_,noIsolation:S,inert:w,setCallbacks:l,allowPinchZoom:!!T,lockRef:n,gapMode:C}),c?E.cloneElement(E.Children.only(d),co(co({},D),{ref:k})):E.createElement(A,co({},D,{className:f,ref:k}),d))});Rf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rf.classNames={fullWidth:Rd,zeroRight:xd};var Hk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Gk(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Hk();return t&&e.setAttribute("nonce",t),e}function qk(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zk(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yk=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Gk())&&(qk(t,n),Zk(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Kk=function(){var e=Yk();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rR=function(){var e=Kk(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},Wk={left:0,top:0,right:0,gap:0},Nm=function(e){return parseInt(e||"",10)||0},Qk=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Nm(n),Nm(o),Nm(i)]},Xk=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wk;var t=Qk(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Jk=rR(),Os="data-scroll-locked",ej=function(e,t,n,o){var i=e.left,l=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
62
62
|
.`.concat(Pk,` {
|
|
63
63
|
overflow: hidden `).concat(o,`;
|
|
64
64
|
padding-right: `).concat(d,"px ").concat(o,`;
|
|
@@ -76,38 +76,38 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
76
76
|
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
.`).concat(
|
|
79
|
+
.`).concat(xd,` {
|
|
80
80
|
right: `).concat(d,"px ").concat(o,`;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
.`).concat(
|
|
83
|
+
.`).concat(Rd,` {
|
|
84
84
|
margin-right: `).concat(d,"px ").concat(o,`;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
.`).concat(
|
|
87
|
+
.`).concat(xd," .").concat(xd,` {
|
|
88
88
|
right: 0 `).concat(o,`;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
.`).concat(
|
|
91
|
+
.`).concat(Rd," .").concat(Rd,` {
|
|
92
92
|
margin-right: 0 `).concat(o,`;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
body[`).concat(Os,`] {
|
|
96
96
|
`).concat(kk,": ").concat(d,`px;
|
|
97
97
|
}
|
|
98
|
-
`)},vS=function(){var e=parseInt(document.body.getAttribute(Os)||"0",10);return isFinite(e)?e:0},tj=function(){E.useEffect(function(){return document.body.setAttribute(Os,(vS()+1).toString()),function(){var e=vS()-1;e<=0?document.body.removeAttribute(Os):document.body.setAttribute(Os,e.toString())}},[])},nj=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;tj();var l=E.useMemo(function(){return Xk(i)},[i]);return E.createElement(Jk,{styles:ej(l,!t,i,n?"":"!important")})},Nv=!1;if(typeof window<"u")try{var
|
|
98
|
+
`)},vS=function(){var e=parseInt(document.body.getAttribute(Os)||"0",10);return isFinite(e)?e:0},tj=function(){E.useEffect(function(){return document.body.setAttribute(Os,(vS()+1).toString()),function(){var e=vS()-1;e<=0?document.body.removeAttribute(Os):document.body.setAttribute(Os,e.toString())}},[])},nj=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;tj();var l=E.useMemo(function(){return Xk(i)},[i]);return E.createElement(Jk,{styles:ej(l,!t,i,n?"":"!important")})},Nv=!1;if(typeof window<"u")try{var od=Object.defineProperty({},"passive",{get:function(){return Nv=!0,!0}});window.addEventListener("test",od,od),window.removeEventListener("test",od,od)}catch{Nv=!1}var hs=Nv?{passive:!1}:!1,rj=function(e){return e.tagName==="TEXTAREA"},oR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!rj(e)&&n[t]==="visible")},oj=function(e){return oR(e,"overflowY")},aj=function(e){return oR(e,"overflowX")},gS=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=aR(e,o);if(i){var l=iR(e,o),c=l[1],d=l[2];if(c>d)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},ij=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},sj=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},aR=function(e,t){return e==="v"?oj(t):aj(t)},iR=function(e,t){return e==="v"?ij(t):sj(t)},lj=function(e,t){return e==="h"&&t==="rtl"?-1:1},cj=function(e,t,n,o,i){var l=lj(e,window.getComputedStyle(t).direction),c=l*o,d=n.target,f=t.contains(d),h=!1,v=c>0,p=0,y=0;do{if(!d)break;var _=iR(e,d),S=_[0],w=_[1],T=_[2],O=w-T-l*S;(S||O)&&aR(e,d)&&(p+=O,y+=S);var A=d.parentNode;d=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!f&&d!==document.body||f&&(t.contains(d)||t===d));return(v&&Math.abs(p)<1||!v&&Math.abs(y)<1)&&(h=!0),h},ad=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yS=function(e){return[e.deltaX,e.deltaY]},bS=function(e){return e&&"current"in e?e.current:e},uj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dj=function(e){return`
|
|
99
99
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
100
100
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
101
|
-
`)},fj=0,ps=[];function hj(e){var t=E.useRef([]),n=E.useRef([0,0]),o=E.useRef(),i=E.useState(fj++)[0],l=E.useState(rR)[0],c=E.useRef(e);E.useEffect(function(){c.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=Lk([e.lockRef.current],(e.shards||[]).map(bS),!0).filter(Boolean);return w.forEach(function(T){return T.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=E.useCallback(function(w,T){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!c.current.allowPinchZoom;var O=
|
|
101
|
+
`)},fj=0,ps=[];function hj(e){var t=E.useRef([]),n=E.useRef([0,0]),o=E.useRef(),i=E.useState(fj++)[0],l=E.useState(rR)[0],c=E.useRef(e);E.useEffect(function(){c.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=Lk([e.lockRef.current],(e.shards||[]).map(bS),!0).filter(Boolean);return w.forEach(function(T){return T.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=E.useCallback(function(w,T){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!c.current.allowPinchZoom;var O=ad(w),A=n.current,C="deltaX"in w?w.deltaX:A[0]-O[0],R="deltaY"in w?w.deltaY:A[1]-O[1],I,k=w.target,D=Math.abs(C)>Math.abs(R)?"h":"v";if("touches"in w&&D==="h"&&k.type==="range")return!1;var N=window.getSelection(),z=N&&N.anchorNode,W=z?z===k||z.contains(k):!1;if(W)return!1;var $=gS(D,k);if(!$)return!0;if($?I=D:(I=D==="v"?"h":"v",$=gS(D,k)),!$)return!1;if(!o.current&&"changedTouches"in w&&(C||R)&&(o.current=I),!I)return!0;var q=o.current||I;return cj(q,T,w,q==="h"?C:R)},[]),f=E.useCallback(function(w){var T=w;if(!(!ps.length||ps[ps.length-1]!==l)){var O="deltaY"in T?yS(T):ad(T),A=t.current.filter(function(I){return I.name===T.type&&(I.target===T.target||T.target===I.shadowParent)&&uj(I.delta,O)})[0];if(A&&A.should){T.cancelable&&T.preventDefault();return}if(!A){var C=(c.current.shards||[]).map(bS).filter(Boolean).filter(function(I){return I.contains(T.target)}),R=C.length>0?d(T,C[0]):!c.current.noIsolation;R&&T.cancelable&&T.preventDefault()}}},[]),h=E.useCallback(function(w,T,O,A){var C={name:w,delta:T,target:O,should:A,shadowParent:pj(O)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(R){return R!==C})},1)},[]),v=E.useCallback(function(w){n.current=ad(w),o.current=void 0},[]),p=E.useCallback(function(w){h(w.type,yS(w),w.target,d(w,e.lockRef.current))},[]),y=E.useCallback(function(w){h(w.type,ad(w),w.target,d(w,e.lockRef.current))},[]);E.useEffect(function(){return ps.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:y}),document.addEventListener("wheel",f,hs),document.addEventListener("touchmove",f,hs),document.addEventListener("touchstart",v,hs),function(){ps=ps.filter(function(w){return w!==l}),document.removeEventListener("wheel",f,hs),document.removeEventListener("touchmove",f,hs),document.removeEventListener("touchstart",v,hs)}},[]);var _=e.removeScrollBar,S=e.inert;return E.createElement(E.Fragment,null,S?E.createElement(l,{styles:dj(i)}):null,_?E.createElement(nj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pj(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const mj=Vk(nR,hj);var $g=E.forwardRef(function(e,t){return E.createElement(Rf,co({},e,{ref:t,sideCar:mj}))});$g.classNames=Rf.classNames;var vj=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ms=new WeakMap,id=new WeakMap,sd={},Dm=0,sR=function(e){return e&&(e.host||sR(e.parentNode))},gj=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=sR(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},yj=function(e,t,n,o){var i=gj(t,Array.isArray(e)?e:[e]);sd[n]||(sd[n]=new WeakMap);var l=sd[n],c=[],d=new Set,f=new Set(i),h=function(p){!p||d.has(p)||(d.add(p),h(p.parentNode))};i.forEach(h);var v=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(y){if(d.has(y))v(y);else try{var _=y.getAttribute(o),S=_!==null&&_!=="false",w=(ms.get(y)||0)+1,T=(l.get(y)||0)+1;ms.set(y,w),l.set(y,T),c.push(y),w===1&&S&&id.set(y,!0),T===1&&y.setAttribute(n,"true"),S||y.setAttribute(o,"true")}catch(O){console.error("aria-hidden: cannot operate on ",y,O)}})};return v(t),d.clear(),Dm++,function(){c.forEach(function(p){var y=ms.get(p)-1,_=l.get(p)-1;ms.set(p,y),l.set(p,_),y||(id.has(p)||p.removeAttribute(o),id.delete(p)),_||p.removeAttribute(n)}),Dm--,Dm||(ms=new WeakMap,ms=new WeakMap,id=new WeakMap,sd={})}},lR=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=vj(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),yj(o,i,n,"aria-hidden")):function(){return null}},Of="Dialog",[cR,TH]=wi(Of),[bj,Jr]=cR(Of),uR=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:l,modal:c=!0}=e,d=E.useRef(null),f=E.useRef(null),[h,v]=_c({prop:o,defaultProp:i??!1,onChange:l,caller:Of});return b.jsx(bj,{scope:t,triggerRef:d,contentRef:f,contentId:Ia(),titleId:Ia(),descriptionId:Ia(),open:h,onOpenChange:v,onOpenToggle:E.useCallback(()=>v(p=>!p),[v]),modal:c,children:n})};uR.displayName=Of;var dR="DialogTrigger",fR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=Jr(dR,n),l=dn(t,i.triggerRef);return b.jsx(Ut.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Gg(i.open),...o,ref:l,onClick:Ge(e.onClick,i.onOpenToggle)})});fR.displayName=dR;var Vg="DialogPortal",[_j,hR]=cR(Vg,{forceMount:void 0}),pR=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,l=Jr(Vg,t);return b.jsx(_j,{scope:t,forceMount:n,children:E.Children.map(o,c=>b.jsx(Go,{present:n||l.open,children:b.jsx(Fg,{asChild:!0,container:i,children:c})}))})};pR.displayName=Vg;var Xd="DialogOverlay",mR=E.forwardRef((e,t)=>{const n=hR(Xd,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,l=Jr(Xd,e.__scopeDialog);return l.modal?b.jsx(Go,{present:o||l.open,children:b.jsx(Sj,{...i,ref:t})}):null});mR.displayName=Xd;var Ej=cc("DialogOverlay.RemoveScroll"),Sj=E.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=Jr(Xd,n);return b.jsx($g,{as:Ej,allowPinchZoom:!0,shards:[i.contentRef],children:b.jsx(Ut.div,{"data-state":Gg(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),gi="DialogContent",vR=E.forwardRef((e,t)=>{const n=hR(gi,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,l=Jr(gi,e.__scopeDialog);return b.jsx(Go,{present:o||l.open,children:l.modal?b.jsx(wj,{...i,ref:t}):b.jsx(xj,{...i,ref:t})})});vR.displayName=gi;var wj=E.forwardRef((e,t)=>{const n=Jr(gi,e.__scopeDialog),o=E.useRef(null),i=dn(t,n.contentRef,o);return E.useEffect(()=>{const l=o.current;if(l)return lR(l)},[]),b.jsx(gR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,l=>{l.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&l.preventDefault()}),onFocusOutside:Ge(e.onFocusOutside,l=>l.preventDefault())})}),xj=E.forwardRef((e,t)=>{const n=Jr(gi,e.__scopeDialog),o=E.useRef(!1),i=E.useRef(!1);return b.jsx(gR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(o.current||n.triggerRef.current?.focus(),l.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(o.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=l.target;n.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),gR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:l,...c}=e,d=Jr(gi,n),f=E.useRef(null),h=dn(t,f);return J2(),b.jsxs(b.Fragment,{children:[b.jsx(Bg,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:l,children:b.jsx(Ug,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Gg(d.open),...c,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(Rj,{titleId:d.titleId}),b.jsx(Tj,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Hg="DialogTitle",yR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=Jr(Hg,n);return b.jsx(Ut.h2,{id:i.titleId,...o,ref:t})});yR.displayName=Hg;var bR="DialogDescription",_R=E.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=Jr(bR,n);return b.jsx(Ut.p,{id:i.descriptionId,...o,ref:t})});_R.displayName=bR;var ER="DialogClose",SR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=Jr(ER,n);return b.jsx(Ut.button,{type:"button",...o,ref:t,onClick:Ge(e.onClick,()=>i.onOpenChange(!1))})});SR.displayName=ER;function Gg(e){return e?"open":"closed"}var wR="DialogTitleWarning",[AH,xR]=rk(wR,{contentName:gi,titleName:Hg,docsSlug:"dialog"}),Rj=({titleId:e})=>{const t=xR(wR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
102
102
|
|
|
103
103
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
104
104
|
|
|
105
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Oj="DialogDescriptionWarning",Tj=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xR(Oj).contentName}}.`;return E.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Aj=uR,Cj=fR,Ij=pR,Mj=mR,Nj=vR,Dj=yR,AH=_R,CH=SR;function RR(e){const t=e+"CollectionProvider",[n,o]=wi(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=w=>{const{scope:T,children:O}=w,A=V.useRef(null),C=V.useRef(new Map).current;return b.jsx(i,{scope:T,itemMap:C,collectionRef:A,children:O})};c.displayName=t;const d=e+"CollectionSlot",f=lc(d),h=V.forwardRef((w,T)=>{const{scope:O,children:A}=w,C=l(d,O),R=dn(T,C.collectionRef);return b.jsx(f,{ref:R,children:A})});h.displayName=d;const v=e+"CollectionItemSlot",p="data-radix-collection-item",y=lc(v),_=V.forwardRef((w,T)=>{const{scope:O,children:A,...C}=w,R=V.useRef(null),I=dn(T,R),k=l(v,O);return V.useEffect(()=>(k.itemMap.set(R,{ref:R,...C}),()=>{k.itemMap.delete(R)})),b.jsx(y,{[p]:"",ref:I,children:A})});_.displayName=v;function S(w){const T=l(e+"CollectionConsumer",w);return V.useCallback(()=>{const A=T.collectionRef.current;if(!A)return[];const C=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(T.itemMap.values()).sort((k,D)=>C.indexOf(k.ref.current)-C.indexOf(D.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:c,Slot:h,ItemSlot:_},S,o]}var Lj=E.createContext(void 0);function OR(e){const t=E.useContext(Lj);return e||t||"ltr"}const Pj=["top","right","bottom","left"],La=Math.min,hr=Math.max,Xd=Math.round,sd=Math.floor,fo=e=>({x:e,y:e}),kj={left:"right",right:"left",bottom:"top",top:"bottom"},jj={start:"end",end:"start"};function Dv(e,t,n){return hr(e,La(t,n))}function $o(e,t){return typeof e=="function"?e(t):e}function Vo(e){return e.split("-")[0]}function zs(e){return e.split("-")[1]}function qg(e){return e==="x"?"y":"x"}function Zg(e){return e==="y"?"height":"width"}const zj=new Set(["top","bottom"]);function uo(e){return zj.has(Vo(e))?"y":"x"}function Yg(e){return qg(uo(e))}function Uj(e,t,n){n===void 0&&(n=!1);const o=zs(e),i=Yg(e),l=Zg(i);let c=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=Jd(c)),[c,Jd(c)]}function Bj(e){const t=Jd(e);return[Lv(e),t,Lv(t)]}function Lv(e){return e.replace(/start|end/g,t=>jj[t])}const _S=["left","right"],ES=["right","left"],Fj=["top","bottom"],$j=["bottom","top"];function Vj(e,t,n){switch(e){case"top":case"bottom":return n?t?ES:_S:t?_S:ES;case"left":case"right":return t?Fj:$j;default:return[]}}function Hj(e,t,n,o){const i=zs(e);let l=Vj(Vo(e),n==="start",o);return i&&(l=l.map(c=>c+"-"+i),t&&(l=l.concat(l.map(Lv)))),l}function Jd(e){return e.replace(/left|right|bottom|top/g,t=>kj[t])}function Gj(e){return{top:0,right:0,bottom:0,left:0,...e}}function TR(e){return typeof e!="number"?Gj(e):{top:e,right:e,bottom:e,left:e}}function ef(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function SS(e,t,n){let{reference:o,floating:i}=e;const l=uo(t),c=Yg(t),d=Zg(c),f=Vo(t),h=l==="y",v=o.x+o.width/2-i.width/2,p=o.y+o.height/2-i.height/2,y=o[d]/2-i[d]/2;let _;switch(f){case"top":_={x:v,y:o.y-i.height};break;case"bottom":_={x:v,y:o.y+o.height};break;case"right":_={x:o.x+o.width,y:p};break;case"left":_={x:o.x-i.width,y:p};break;default:_={x:o.x,y:o.y}}switch(zs(t)){case"start":_[c]-=y*(n&&h?-1:1);break;case"end":_[c]+=y*(n&&h?-1:1);break}return _}const qj=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:l=[],platform:c}=n,d=l.filter(Boolean),f=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:v,y:p}=SS(h,o,f),y=o,_={},S=0;for(let w=0;w<d.length;w++){const{name:T,fn:O}=d[w],{x:A,y:C,data:R,reset:I}=await O({x:v,y:p,initialPlacement:o,placement:y,strategy:i,middlewareData:_,rects:h,platform:c,elements:{reference:e,floating:t}});v=A??v,p=C??p,_={..._,[T]:{..._[T],...R}},I&&S<=50&&(S++,typeof I=="object"&&(I.placement&&(y=I.placement),I.rects&&(h=I.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:v,y:p}=SS(h,y,f)),w=-1)}return{x:v,y:p,placement:y,strategy:i,middlewareData:_}};async function cc(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:l,rects:c,elements:d,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:p="floating",altBoundary:y=!1,padding:_=0}=$o(t,e),S=TR(_),T=d[y?p==="floating"?"reference":"floating":p],O=ef(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(T)))==null||n?T:T.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:h,rootBoundary:v,strategy:f})),A=p==="floating"?{x:o,y:i,width:c.floating.width,height:c.floating.height}:c.reference,C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),R=await(l.isElement==null?void 0:l.isElement(C))?await(l.getScale==null?void 0:l.getScale(C))||{x:1,y:1}:{x:1,y:1},I=ef(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:A,offsetParent:C,strategy:f}):A);return{top:(O.top-I.top+S.top)/R.y,bottom:(I.bottom-O.bottom+S.bottom)/R.y,left:(O.left-I.left+S.left)/R.x,right:(I.right-O.right+S.right)/R.x}}const Zj=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:l,platform:c,elements:d,middlewareData:f}=t,{element:h,padding:v=0}=$o(e,t)||{};if(h==null)return{};const p=TR(v),y={x:n,y:o},_=Yg(i),S=Zg(_),w=await c.getDimensions(h),T=_==="y",O=T?"top":"left",A=T?"bottom":"right",C=T?"clientHeight":"clientWidth",R=l.reference[S]+l.reference[_]-y[_]-l.floating[S],I=y[_]-l.reference[_],k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let D=k?k[C]:0;(!D||!await(c.isElement==null?void 0:c.isElement(k)))&&(D=d.floating[C]||l.floating[S]);const N=R/2-I/2,z=D/2-w[S]/2-1,W=La(p[O],z),$=La(p[A],z),q=W,j=D-w[S]-$,X=D/2-w[S]/2+N,oe=Dv(q,X,j),L=!f.arrow&&zs(i)!=null&&X!==oe&&l.reference[S]/2-(X<q?W:$)-w[S]/2<0,F=L?X<q?X-q:X-j:0;return{[_]:y[_]+F,data:{[_]:oe,centerOffset:X-oe-F,...L&&{alignmentOffset:F}},reset:L}}}),Yj=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:l,rects:c,initialPlacement:d,platform:f,elements:h}=t,{mainAxis:v=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...T}=$o(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const O=Vo(i),A=uo(d),C=Vo(d)===d,R=await(f.isRTL==null?void 0:f.isRTL(h.floating)),I=y||(C||!w?[Jd(d)]:Bj(d)),k=S!=="none";!y&&k&&I.push(...Hj(d,w,S,R));const D=[d,...I],N=await cc(t,T),z=[];let W=((o=l.flip)==null?void 0:o.overflows)||[];if(v&&z.push(N[O]),p){const X=Uj(i,c,R);z.push(N[X[0]],N[X[1]])}if(W=[...W,{placement:i,overflows:z}],!z.every(X=>X<=0)){var $,q;const X=((($=l.flip)==null?void 0:$.index)||0)+1,oe=D[X];if(oe&&(!(p==="alignment"?A!==uo(oe):!1)||W.every(G=>uo(G.placement)===A?G.overflows[0]>0:!0)))return{data:{index:X,overflows:W},reset:{placement:oe}};let L=(q=W.filter(F=>F.overflows[0]<=0).sort((F,G)=>F.overflows[1]-G.overflows[1])[0])==null?void 0:q.placement;if(!L)switch(_){case"bestFit":{var j;const F=(j=W.filter(G=>{if(k){const re=uo(G.placement);return re===A||re==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(re=>re>0).reduce((re,ye)=>re+ye,0)]).sort((G,re)=>G[1]-re[1])[0])==null?void 0:j[0];F&&(L=F);break}case"initialPlacement":L=d;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function wS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xS(e){return Pj.some(t=>e[t]>=0)}const Kj=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=$o(e,t);switch(o){case"referenceHidden":{const l=await cc(t,{...i,elementContext:"reference"}),c=wS(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:xS(c)}}}case"escaped":{const l=await cc(t,{...i,altBoundary:!0}),c=wS(l,n.floating);return{data:{escapedOffsets:c,escaped:xS(c)}}}default:return{}}}}},AR=new Set(["left","top"]);async function Wj(e,t){const{placement:n,platform:o,elements:i}=e,l=await(o.isRTL==null?void 0:o.isRTL(i.floating)),c=Vo(n),d=zs(n),f=uo(n)==="y",h=AR.has(c)?-1:1,v=l&&f?-1:1,p=$o(t,e);let{mainAxis:y,crossAxis:_,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return d&&typeof S=="number"&&(_=d==="end"?S*-1:S),f?{x:_*v,y:y*h}:{x:y*h,y:_*v}}const Qj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:l,placement:c,middlewareData:d}=t,f=await Wj(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:l+f.y,data:{...f,placement:c}}}}},Xj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:T=>{let{x:O,y:A}=T;return{x:O,y:A}}},...f}=$o(e,t),h={x:n,y:o},v=await cc(t,f),p=uo(Vo(i)),y=qg(p);let _=h[y],S=h[p];if(l){const T=y==="y"?"top":"left",O=y==="y"?"bottom":"right",A=_+v[T],C=_-v[O];_=Dv(A,_,C)}if(c){const T=p==="y"?"top":"left",O=p==="y"?"bottom":"right",A=S+v[T],C=S-v[O];S=Dv(A,S,C)}const w=d.fn({...t,[y]:_,[p]:S});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[y]:l,[p]:c}}}}}},Jj=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:l,middlewareData:c}=t,{offset:d=0,mainAxis:f=!0,crossAxis:h=!0}=$o(e,t),v={x:n,y:o},p=uo(i),y=qg(p);let _=v[y],S=v[p];const w=$o(d,t),T=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const C=y==="y"?"height":"width",R=l.reference[y]-l.floating[C]+T.mainAxis,I=l.reference[y]+l.reference[C]-T.mainAxis;_<R?_=R:_>I&&(_=I)}if(h){var O,A;const C=y==="y"?"width":"height",R=AR.has(Vo(i)),I=l.reference[p]-l.floating[C]+(R&&((O=c.offset)==null?void 0:O[p])||0)+(R?0:T.crossAxis),k=l.reference[p]+l.reference[C]+(R?0:((A=c.offset)==null?void 0:A[p])||0)-(R?T.crossAxis:0);S<I?S=I:S>k&&(S=k)}return{[y]:_,[p]:S}}}},e9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:l,platform:c,elements:d}=t,{apply:f=()=>{},...h}=$o(e,t),v=await cc(t,h),p=Vo(i),y=zs(i),_=uo(i)==="y",{width:S,height:w}=l.floating;let T,O;p==="top"||p==="bottom"?(T=p,O=y===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(O=p,T=y==="end"?"top":"bottom");const A=w-v.top-v.bottom,C=S-v.left-v.right,R=La(w-v[T],A),I=La(S-v[O],C),k=!t.middlewareData.shift;let D=R,N=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(D=A),k&&!y){const W=hr(v.left,0),$=hr(v.right,0),q=hr(v.top,0),j=hr(v.bottom,0);_?N=S-2*(W!==0||$!==0?W+$:hr(v.left,v.right)):D=w-2*(q!==0||j!==0?q+j:hr(v.top,v.bottom))}await f({...t,availableWidth:N,availableHeight:D});const z=await c.getDimensions(d.floating);return S!==z.width||w!==z.height?{reset:{rects:!0}}:{}}}};function Tf(){return typeof window<"u"}function Us(e){return CR(e)?(e.nodeName||"").toLowerCase():"#document"}function gr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function go(e){var t;return(t=(CR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function CR(e){return Tf()?e instanceof Node||e instanceof gr(e).Node:!1}function Qr(e){return Tf()?e instanceof Element||e instanceof gr(e).Element:!1}function po(e){return Tf()?e instanceof HTMLElement||e instanceof gr(e).HTMLElement:!1}function RS(e){return!Tf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gr(e).ShadowRoot}const t9=new Set(["inline","contents"]);function _c(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Xr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!t9.has(i)}const n9=new Set(["table","td","th"]);function r9(e){return n9.has(Us(e))}const o9=[":popover-open",":modal"];function Af(e){return o9.some(t=>{try{return e.matches(t)}catch{return!1}})}const a9=["transform","translate","scale","rotate","perspective"],i9=["transform","translate","scale","rotate","perspective","filter"],s9=["paint","layout","strict","content"];function Kg(e){const t=Wg(),n=Qr(e)?Xr(e):e;return a9.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||i9.some(o=>(n.willChange||"").includes(o))||s9.some(o=>(n.contain||"").includes(o))}function l9(e){let t=Pa(e);for(;po(t)&&!Ds(t);){if(Kg(t))return t;if(Af(t))return null;t=Pa(t)}return null}function Wg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const c9=new Set(["html","body","#document"]);function Ds(e){return c9.has(Us(e))}function Xr(e){return gr(e).getComputedStyle(e)}function Cf(e){return Qr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pa(e){if(Us(e)==="html")return e;const t=e.assignedSlot||e.parentNode||RS(e)&&e.host||go(e);return RS(t)?t.host:t}function IR(e){const t=Pa(e);return Ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:po(t)&&_c(t)?t:IR(t)}function uc(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=IR(e),l=i===((o=e.ownerDocument)==null?void 0:o.body),c=gr(i);if(l){const d=Pv(c);return t.concat(c,c.visualViewport||[],_c(i)?i:[],d&&n?uc(d):[])}return t.concat(i,uc(i,[],n))}function Pv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function MR(e){const t=Xr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=po(e),l=i?e.offsetWidth:n,c=i?e.offsetHeight:o,d=Xd(n)!==l||Xd(o)!==c;return d&&(n=l,o=c),{width:n,height:o,$:d}}function Qg(e){return Qr(e)?e:e.contextElement}function Ts(e){const t=Qg(e);if(!po(t))return fo(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:l}=MR(t);let c=(l?Xd(n.width):n.width)/o,d=(l?Xd(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const u9=fo(0);function NR(e){const t=gr(e);return!Wg()||!t.visualViewport?u9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function d9(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gr(e)?!1:t}function yi(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=Qg(e);let c=fo(1);t&&(o?Qr(o)&&(c=Ts(o)):c=Ts(e));const d=d9(l,n,o)?NR(l):fo(0);let f=(i.left+d.x)/c.x,h=(i.top+d.y)/c.y,v=i.width/c.x,p=i.height/c.y;if(l){const y=gr(l),_=o&&Qr(o)?gr(o):o;let S=y,w=Pv(S);for(;w&&o&&_!==S;){const T=Ts(w),O=w.getBoundingClientRect(),A=Xr(w),C=O.left+(w.clientLeft+parseFloat(A.paddingLeft))*T.x,R=O.top+(w.clientTop+parseFloat(A.paddingTop))*T.y;f*=T.x,h*=T.y,v*=T.x,p*=T.y,f+=C,h+=R,S=gr(w),w=Pv(S)}}return ef({width:v,height:p,x:f,y:h})}function If(e,t){const n=Cf(e).scrollLeft;return t?t.left+n:yi(go(e)).left+n}function DR(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-If(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function f9(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const l=i==="fixed",c=go(o),d=t?Af(t.floating):!1;if(o===c||d&&l)return n;let f={scrollLeft:0,scrollTop:0},h=fo(1);const v=fo(0),p=po(o);if((p||!p&&!l)&&((Us(o)!=="body"||_c(c))&&(f=Cf(o)),po(o))){const _=yi(o);h=Ts(o),v.x=_.x+o.clientLeft,v.y=_.y+o.clientTop}const y=c&&!p&&!l?DR(c,f):fo(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+v.x+y.x,y:n.y*h.y-f.scrollTop*h.y+v.y+y.y}}function h9(e){return Array.from(e.getClientRects())}function p9(e){const t=go(e),n=Cf(e),o=e.ownerDocument.body,i=hr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=hr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+If(e);const d=-n.scrollTop;return Xr(o).direction==="rtl"&&(c+=hr(t.clientWidth,o.clientWidth)-i),{width:i,height:l,x:c,y:d}}const OS=25;function m9(e,t){const n=gr(e),o=go(e),i=n.visualViewport;let l=o.clientWidth,c=o.clientHeight,d=0,f=0;if(i){l=i.width,c=i.height;const v=Wg();(!v||v&&t==="fixed")&&(d=i.offsetLeft,f=i.offsetTop)}const h=If(o);if(h<=0){const v=o.ownerDocument,p=v.body,y=getComputedStyle(p),_=v.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,S=Math.abs(o.clientWidth-p.clientWidth-_);S<=OS&&(l-=S)}else h<=OS&&(l+=h);return{width:l,height:c,x:d,y:f}}const v9=new Set(["absolute","fixed"]);function g9(e,t){const n=yi(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,l=po(e)?Ts(e):fo(1),c=e.clientWidth*l.x,d=e.clientHeight*l.y,f=i*l.x,h=o*l.y;return{width:c,height:d,x:f,y:h}}function TS(e,t,n){let o;if(t==="viewport")o=m9(e,n);else if(t==="document")o=p9(go(e));else if(Qr(t))o=g9(t,n);else{const i=NR(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ef(o)}function LR(e,t){const n=Pa(e);return n===t||!Qr(n)||Ds(n)?!1:Xr(n).position==="fixed"||LR(n,t)}function y9(e,t){const n=t.get(e);if(n)return n;let o=uc(e,[],!1).filter(d=>Qr(d)&&Us(d)!=="body"),i=null;const l=Xr(e).position==="fixed";let c=l?Pa(e):e;for(;Qr(c)&&!Ds(c);){const d=Xr(c),f=Kg(c);!f&&d.position==="fixed"&&(i=null),(l?!f&&!i:!f&&d.position==="static"&&!!i&&v9.has(i.position)||_c(c)&&!f&&LR(e,c))?o=o.filter(v=>v!==c):i=d,c=Pa(c)}return t.set(e,o),o}function b9(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const c=[...n==="clippingAncestors"?Af(t)?[]:y9(t,this._c):[].concat(n),o],d=c[0],f=c.reduce((h,v)=>{const p=TS(t,v,i);return h.top=hr(p.top,h.top),h.right=La(p.right,h.right),h.bottom=La(p.bottom,h.bottom),h.left=hr(p.left,h.left),h},TS(t,d,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function _9(e){const{width:t,height:n}=MR(e);return{width:t,height:n}}function E9(e,t,n){const o=po(t),i=go(t),l=n==="fixed",c=yi(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=fo(0);function h(){f.x=If(i)}if(o||!o&&!l)if((Us(t)!=="body"||_c(i))&&(d=Cf(t)),o){const _=yi(t,!0,l,t);f.x=_.x+t.clientLeft,f.y=_.y+t.clientTop}else i&&h();l&&!o&&i&&h();const v=i&&!o&&!l?DR(i,d):fo(0),p=c.left+d.scrollLeft-f.x-v.x,y=c.top+d.scrollTop-f.y-v.y;return{x:p,y,width:c.width,height:c.height}}function Lm(e){return Xr(e).position==="static"}function AS(e,t){if(!po(e)||Xr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return go(e)===n&&(n=n.ownerDocument.body),n}function PR(e,t){const n=gr(e);if(Af(e))return n;if(!po(e)){let i=Pa(e);for(;i&&!Ds(i);){if(Qr(i)&&!Lm(i))return i;i=Pa(i)}return n}let o=AS(e,t);for(;o&&r9(o)&&Lm(o);)o=AS(o,t);return o&&Ds(o)&&Lm(o)&&!Kg(o)?n:o||l9(e)||n}const S9=async function(e){const t=this.getOffsetParent||PR,n=this.getDimensions,o=await n(e.floating);return{reference:E9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function w9(e){return Xr(e).direction==="rtl"}const x9={convertOffsetParentRelativeRectToViewportRelativeRect:f9,getDocumentElement:go,getClippingRect:b9,getOffsetParent:PR,getElementRects:S9,getClientRects:h9,getDimensions:_9,getScale:Ts,isElement:Qr,isRTL:w9};function kR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function R9(e,t){let n=null,o;const i=go(e);function l(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function c(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),l();const h=e.getBoundingClientRect(),{left:v,top:p,width:y,height:_}=h;if(d||t(),!y||!_)return;const S=sd(p),w=sd(i.clientWidth-(v+y)),T=sd(i.clientHeight-(p+_)),O=sd(v),C={rootMargin:-S+"px "+-w+"px "+-T+"px "+-O+"px",threshold:hr(0,La(1,f))||1};let R=!0;function I(k){const D=k[0].intersectionRatio;if(D!==f){if(!R)return c();D?c(!1,D):o=setTimeout(()=>{c(!1,1e-7)},1e3)}D===1&&!kR(h,e.getBoundingClientRect())&&c(),R=!1}try{n=new IntersectionObserver(I,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(I,C)}n.observe(e)}return c(!0),l}function O9(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,h=Qg(e),v=i||l?[...h?uc(h):[],...uc(t)]:[];v.forEach(O=>{i&&O.addEventListener("scroll",n,{passive:!0}),l&&O.addEventListener("resize",n)});const p=h&&d?R9(h,n):null;let y=-1,_=null;c&&(_=new ResizeObserver(O=>{let[A]=O;A&&A.target===h&&_&&(_.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var C;(C=_)==null||C.observe(t)})),n()}),h&&!f&&_.observe(h),_.observe(t));let S,w=f?yi(e):null;f&&T();function T(){const O=yi(e);w&&!kR(w,O)&&n(),w=O,S=requestAnimationFrame(T)}return n(),()=>{var O;v.forEach(A=>{i&&A.removeEventListener("scroll",n),l&&A.removeEventListener("resize",n)}),p?.(),(O=_)==null||O.disconnect(),_=null,f&&cancelAnimationFrame(S)}}const T9=Qj,A9=Xj,C9=Yj,I9=e9,M9=Kj,CS=Zj,N9=Jj,D9=(e,t,n)=>{const o=new Map,i={platform:x9,...n},l={...i.platform,_c:o};return qj(e,t,{...i,platform:l})};var L9=typeof document<"u",P9=function(){},Rd=L9?E.useLayoutEffect:P9;function tf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!tf(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const l=i[o];if(!(l==="_owner"&&e.$$typeof)&&!tf(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function jR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function IS(e,t){const n=jR(e);return Math.round(t*n)/n}function Pm(e){const t=E.useRef(e);return Rd(()=>{t.current=e}),t}function k9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:c}={},transform:d=!0,whileElementsMounted:f,open:h}=e,[v,p]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,_]=E.useState(o);tf(y,o)||_(o);const[S,w]=E.useState(null),[T,O]=E.useState(null),A=E.useCallback(G=>{G!==k.current&&(k.current=G,w(G))},[]),C=E.useCallback(G=>{G!==D.current&&(D.current=G,O(G))},[]),R=l||S,I=c||T,k=E.useRef(null),D=E.useRef(null),N=E.useRef(v),z=f!=null,W=Pm(f),$=Pm(i),q=Pm(h),j=E.useCallback(()=>{if(!k.current||!D.current)return;const G={placement:t,strategy:n,middleware:y};$.current&&(G.platform=$.current),D9(k.current,D.current,G).then(re=>{const ye={...re,isPositioned:q.current!==!1};X.current&&!tf(N.current,ye)&&(N.current=ye,pf.flushSync(()=>{p(ye)}))})},[y,t,n,$,q]);Rd(()=>{h===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[h]);const X=E.useRef(!1);Rd(()=>(X.current=!0,()=>{X.current=!1}),[]),Rd(()=>{if(R&&(k.current=R),I&&(D.current=I),R&&I){if(W.current)return W.current(R,I,j);j()}},[R,I,j,W,z]);const oe=E.useMemo(()=>({reference:k,floating:D,setReference:A,setFloating:C}),[A,C]),L=E.useMemo(()=>({reference:R,floating:I}),[R,I]),F=E.useMemo(()=>{const G={position:n,left:0,top:0};if(!L.floating)return G;const re=IS(L.floating,v.x),ye=IS(L.floating,v.y);return d?{...G,transform:"translate("+re+"px, "+ye+"px)",...jR(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:ye}},[n,d,L.floating,v.x,v.y]);return E.useMemo(()=>({...v,update:j,refs:oe,elements:L,floatingStyles:F}),[v,j,oe,L,F])}const j9=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?CS({element:o.current,padding:i}).fn(n):{}:o?CS({element:o,padding:i}).fn(n):{}}}},z9=(e,t)=>({...T9(e),options:[e,t]}),U9=(e,t)=>({...A9(e),options:[e,t]}),B9=(e,t)=>({...N9(e),options:[e,t]}),F9=(e,t)=>({...C9(e),options:[e,t]}),$9=(e,t)=>({...I9(e),options:[e,t]}),V9=(e,t)=>({...M9(e),options:[e,t]}),H9=(e,t)=>({...j9(e),options:[e,t]});var G9="Arrow",zR=E.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...l}=e;return b.jsx(Ut.svg,{...l,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});zR.displayName=G9;var q9=zR;function UR(e){const[t,n]=E.useState(void 0);return Kr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let c,d;if("borderBoxSize"in l){const f=l.borderBoxSize,h=Array.isArray(f)?f[0]:f;c=h.inlineSize,d=h.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Xg="Popper",[BR,FR]=wi(Xg),[Z9,$R]=BR(Xg),VR=e=>{const{__scopePopper:t,children:n}=e,[o,i]=E.useState(null);return b.jsx(Z9,{scope:t,anchor:o,onAnchorChange:i,children:n})};VR.displayName=Xg;var HR="PopperAnchor",GR=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,l=$R(HR,n),c=E.useRef(null),d=dn(t,c),f=E.useRef(null);return E.useEffect(()=>{const h=f.current;f.current=o?.current||c.current,h!==f.current&&l.onAnchorChange(f.current)}),o?null:b.jsx(Ut.div,{...i,ref:d})});GR.displayName=HR;var Jg="PopperContent",[Y9,K9]=BR(Jg),qR=E.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:v=0,sticky:p="partial",hideWhenDetached:y=!1,updatePositionStrategy:_="optimized",onPlaced:S,...w}=e,T=$R(Jg,n),[O,A]=E.useState(null),C=dn(t,be=>A(be)),[R,I]=E.useState(null),k=UR(R),D=k?.width??0,N=k?.height??0,z=o+(l!=="center"?"-"+l:""),W=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},$=Array.isArray(h)?h:[h],q=$.length>0,j={padding:W,boundary:$.filter(Q9),altBoundary:q},{refs:X,floatingStyles:oe,placement:L,isPositioned:F,middlewareData:G}=k9({strategy:"fixed",placement:z,whileElementsMounted:(...be)=>O9(...be,{animationFrame:_==="always"}),elements:{reference:T.anchor},middleware:[z9({mainAxis:i+N,alignmentAxis:c}),f&&U9({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?B9():void 0,...j}),f&&F9({...j}),$9({...j,apply:({elements:be,rects:Se,availableWidth:De,availableHeight:Le})=>{const{width:Ee,height:ze}=Se.reference,Nt=be.floating.style;Nt.setProperty("--radix-popper-available-width",`${De}px`),Nt.setProperty("--radix-popper-available-height",`${Le}px`),Nt.setProperty("--radix-popper-anchor-width",`${Ee}px`),Nt.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),R&&H9({element:R,padding:d}),X9({arrowWidth:D,arrowHeight:N}),y&&V9({strategy:"referenceHidden",...j})]}),[re,ye]=KR(L),P=Wr(S);Kr(()=>{F&&P?.()},[F,P]);const Q=G.arrow?.x,te=G.arrow?.y,se=G.arrow?.centerOffset!==0,[me,_e]=E.useState();return Kr(()=>{O&&_e(window.getComputedStyle(O).zIndex)},[O]),b.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:F?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[G.transformOrigin?.x,G.transformOrigin?.y].join(" "),...G.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(Y9,{scope:n,placedSide:re,onArrowChange:I,arrowX:Q,arrowY:te,shouldHideArrow:se,children:b.jsx(Ut.div,{"data-side":re,"data-align":ye,...w,ref:C,style:{...w.style,animation:F?void 0:"none"}})})})});qR.displayName=Jg;var ZR="PopperArrow",W9={top:"bottom",right:"left",bottom:"top",left:"right"},YR=E.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,l=K9(ZR,o),c=W9[l.placedSide];return b.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:b.jsx(q9,{...i,ref:n,style:{...i.style,display:"block"}})})});YR.displayName=ZR;function Q9(e){return e!==null}var X9=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:i}=t,c=i.arrow?.centerOffset!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,v]=KR(n),p={start:"0%",center:"50%",end:"100%"}[v],y=(i.arrow?.x??0)+d/2,_=(i.arrow?.y??0)+f/2;let S="",w="";return h==="bottom"?(S=c?p:`${y}px`,w=`${-f}px`):h==="top"?(S=c?p:`${y}px`,w=`${o.floating.height+f}px`):h==="right"?(S=`${-f}px`,w=c?p:`${_}px`):h==="left"&&(S=`${o.floating.width+f}px`,w=c?p:`${_}px`),{data:{x:S,y:w}}}});function KR(e){const[t,n="center"]=e.split("-");return[t,n]}var WR=VR,J9=GR,ez=qR,tz=YR,km="rovingFocusGroup.onEntryFocus",nz={bubbles:!1,cancelable:!0},Ec="RovingFocusGroup",[kv,QR,rz]=RR(Ec),[oz,XR]=wi(Ec,[rz]),[az,iz]=oz(Ec),JR=E.forwardRef((e,t)=>b.jsx(kv.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(kv.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(sz,{...e,ref:t})})}));JR.displayName=Ec;var sz=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:v=!1,...p}=e,y=E.useRef(null),_=dn(t,y),S=OR(l),[w,T]=bc({prop:c,defaultProp:d??null,onChange:f,caller:Ec}),[O,A]=E.useState(!1),C=Wr(h),R=QR(n),I=E.useRef(!1),[k,D]=E.useState(0);return E.useEffect(()=>{const N=y.current;if(N)return N.addEventListener(km,C),()=>N.removeEventListener(km,C)},[C]),b.jsx(az,{scope:n,orientation:o,dir:S,loop:i,currentTabStopId:w,onItemFocus:E.useCallback(N=>T(N),[T]),onItemShiftTab:E.useCallback(()=>A(!0),[]),onFocusableItemAdd:E.useCallback(()=>D(N=>N+1),[]),onFocusableItemRemove:E.useCallback(()=>D(N=>N-1),[]),children:b.jsx(Ut.div,{tabIndex:O||k===0?-1:0,"data-orientation":o,...p,ref:_,style:{outline:"none",...e.style},onMouseDown:Ge(e.onMouseDown,()=>{I.current=!0}),onFocus:Ge(e.onFocus,N=>{const z=!I.current;if(N.target===N.currentTarget&&z&&!O){const W=new CustomEvent(km,nz);if(N.currentTarget.dispatchEvent(W),!W.defaultPrevented){const $=R().filter(L=>L.focusable),q=$.find(L=>L.active),j=$.find(L=>L.id===w),oe=[q,j,...$].filter(Boolean).map(L=>L.ref.current);nO(oe,v)}}I.current=!1}),onBlur:Ge(e.onBlur,()=>A(!1))})})}),eO="RovingFocusGroupItem",tO=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:l,children:c,...d}=e,f=Ia(),h=l||f,v=iz(eO,n),p=v.currentTabStopId===h,y=QR(n),{onFocusableItemAdd:_,onFocusableItemRemove:S,currentTabStopId:w}=v;return E.useEffect(()=>{if(o)return _(),()=>S()},[o,_,S]),b.jsx(kv.ItemSlot,{scope:n,id:h,focusable:o,active:i,children:b.jsx(Ut.span,{tabIndex:p?0:-1,"data-orientation":v.orientation,...d,ref:t,onMouseDown:Ge(e.onMouseDown,T=>{o?v.onItemFocus(h):T.preventDefault()}),onFocus:Ge(e.onFocus,()=>v.onItemFocus(h)),onKeyDown:Ge(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){v.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const O=uz(T,v.orientation,v.dir);if(O!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let C=y().filter(R=>R.focusable).map(R=>R.ref.current);if(O==="last")C.reverse();else if(O==="prev"||O==="next"){O==="prev"&&C.reverse();const R=C.indexOf(T.currentTarget);C=v.loop?dz(C,R+1):C.slice(R+1)}setTimeout(()=>nO(C))}}),children:typeof c=="function"?c({isCurrentTabStop:p,hasTabStop:w!=null}):c})})});tO.displayName=eO;var lz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cz(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function uz(e,t,n){const o=cz(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return lz[o]}function nO(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function dz(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var fz=JR,hz=tO,jv=["Enter"," "],pz=["ArrowDown","PageUp","Home"],rO=["ArrowUp","PageDown","End"],mz=[...pz,...rO],vz={ltr:[...jv,"ArrowRight"],rtl:[...jv,"ArrowLeft"]},gz={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Sc="Menu",[dc,yz,bz]=RR(Sc),[xi,oO]=wi(Sc,[bz,FR,XR]),wc=FR(),aO=XR(),[iO,Ba]=xi(Sc),[_z,xc]=xi(Sc),sO=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:i,onOpenChange:l,modal:c=!0}=e,d=wc(t),[f,h]=E.useState(null),v=E.useRef(!1),p=Wr(l),y=OR(i);return E.useEffect(()=>{const _=()=>{v.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>v.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),b.jsx(WR,{...d,children:b.jsx(iO,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:h,children:b.jsx(_z,{scope:t,onClose:E.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:v,dir:y,modal:c,children:o})})})};sO.displayName=Sc;var Ez="MenuAnchor",e0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,i=wc(n);return b.jsx(J9,{...i,...o,ref:t})});e0.displayName=Ez;var t0="MenuPortal",[Sz,lO]=xi(t0,{forceMount:void 0}),cO=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:i}=e,l=Ba(t0,t);return b.jsx(Sz,{scope:t,forceMount:n,children:b.jsx(Go,{present:n||l.open,children:b.jsx(Fg,{asChild:!0,container:i,children:o})})})};cO.displayName=t0;var kr="MenuContent",[wz,n0]=xi(kr),uO=E.forwardRef((e,t)=>{const n=lO(kr,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,l=Ba(kr,e.__scopeMenu),c=xc(kr,e.__scopeMenu);return b.jsx(dc.Provider,{scope:e.__scopeMenu,children:b.jsx(Go,{present:o||l.open,children:b.jsx(dc.Slot,{scope:e.__scopeMenu,children:c.modal?b.jsx(xz,{...i,ref:t}):b.jsx(Rz,{...i,ref:t})})})})}),xz=E.forwardRef((e,t)=>{const n=Ba(kr,e.__scopeMenu),o=E.useRef(null),i=dn(t,o);return E.useEffect(()=>{const l=o.current;if(l)return lR(l)},[]),b.jsx(r0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ge(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Rz=E.forwardRef((e,t)=>{const n=Ba(kr,e.__scopeMenu);return b.jsx(r0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Oz=lc("MenuContent.ScrollLock"),r0=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:c,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:p,onInteractOutside:y,onDismiss:_,disableOutsideScroll:S,...w}=e,T=Ba(kr,n),O=xc(kr,n),A=wc(n),C=aO(n),R=yz(n),[I,k]=E.useState(null),D=E.useRef(null),N=dn(t,D,T.onContentChange),z=E.useRef(0),W=E.useRef(""),$=E.useRef(0),q=E.useRef(null),j=E.useRef("right"),X=E.useRef(0),oe=S?$g:E.Fragment,L=S?{as:Oz,allowPinchZoom:!0}:void 0,F=re=>{const ye=W.current+re,P=R().filter(be=>!be.disabled),Q=document.activeElement,te=P.find(be=>be.ref.current===Q)?.textValue,se=P.map(be=>be.textValue),me=zz(se,ye,te),_e=P.find(be=>be.textValue===me)?.ref.current;(function be(Se){W.current=Se,window.clearTimeout(z.current),Se!==""&&(z.current=window.setTimeout(()=>be(""),1e3))})(ye),_e&&setTimeout(()=>_e.focus())};E.useEffect(()=>()=>window.clearTimeout(z.current),[]),J2();const G=E.useCallback(re=>j.current===q.current?.side&&Bz(re,q.current?.area),[]);return b.jsx(wz,{scope:n,searchRef:W,onItemEnter:E.useCallback(re=>{G(re)&&re.preventDefault()},[G]),onItemLeave:E.useCallback(re=>{G(re)||(D.current?.focus(),k(null))},[G]),onTriggerLeave:E.useCallback(re=>{G(re)&&re.preventDefault()},[G]),pointerGraceTimerRef:$,onPointerGraceIntentChange:E.useCallback(re=>{q.current=re},[]),children:b.jsx(oe,{...L,children:b.jsx(Bg,{asChild:!0,trapped:i,onMountAutoFocus:Ge(l,re=>{re.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:b.jsx(Ug,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:p,onInteractOutside:y,onDismiss:_,children:b.jsx(fz,{asChild:!0,...C,dir:O.dir,orientation:"vertical",loop:o,currentTabStopId:I,onCurrentTabStopIdChange:k,onEntryFocus:Ge(f,re=>{O.isUsingKeyboardRef.current||re.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(ez,{role:"menu","aria-orientation":"vertical","data-state":TO(T.open),"data-radix-menu-content":"",dir:O.dir,...A,...w,ref:N,style:{outline:"none",...w.style},onKeyDown:Ge(w.onKeyDown,re=>{const P=re.target.closest("[data-radix-menu-content]")===re.currentTarget,Q=re.ctrlKey||re.altKey||re.metaKey,te=re.key.length===1;P&&(re.key==="Tab"&&re.preventDefault(),!Q&&te&&F(re.key));const se=D.current;if(re.target!==se||!mz.includes(re.key))return;re.preventDefault();const _e=R().filter(be=>!be.disabled).map(be=>be.ref.current);rO.includes(re.key)&&_e.reverse(),kz(_e)}),onBlur:Ge(e.onBlur,re=>{re.currentTarget.contains(re.target)||(window.clearTimeout(z.current),W.current="")}),onPointerMove:Ge(e.onPointerMove,fc(re=>{const ye=re.target,P=X.current!==re.clientX;if(re.currentTarget.contains(ye)&&P){const Q=re.clientX>X.current?"right":"left";j.current=Q,X.current=re.clientX}}))})})})})})})});uO.displayName=kr;var Tz="MenuGroup",o0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return b.jsx(Ut.div,{role:"group",...o,ref:t})});o0.displayName=Tz;var Az="MenuLabel",dO=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return b.jsx(Ut.div,{...o,ref:t})});dO.displayName=Az;var nf="MenuItem",MS="menu.itemSelect",Mf=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...i}=e,l=E.useRef(null),c=xc(nf,e.__scopeMenu),d=n0(nf,e.__scopeMenu),f=dn(t,l),h=E.useRef(!1),v=()=>{const p=l.current;if(!n&&p){const y=new CustomEvent(MS,{bubbles:!0,cancelable:!0});p.addEventListener(MS,_=>o?.(_),{once:!0}),K2(p,y),y.defaultPrevented?h.current=!1:c.onClose()}};return b.jsx(fO,{...i,ref:f,disabled:n,onClick:Ge(e.onClick,v),onPointerDown:p=>{e.onPointerDown?.(p),h.current=!0},onPointerUp:Ge(e.onPointerUp,p=>{h.current||p.currentTarget?.click()}),onKeyDown:Ge(e.onKeyDown,p=>{const y=d.searchRef.current!=="";n||y&&p.key===" "||jv.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Mf.displayName=nf;var fO=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:i,...l}=e,c=n0(nf,n),d=aO(n),f=E.useRef(null),h=dn(t,f),[v,p]=E.useState(!1),[y,_]=E.useState("");return E.useEffect(()=>{const S=f.current;S&&_((S.textContent??"").trim())},[l.children]),b.jsx(dc.ItemSlot,{scope:n,disabled:o,textValue:i??y,children:b.jsx(hz,{asChild:!0,...d,focusable:!o,children:b.jsx(Ut.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...l,ref:h,onPointerMove:Ge(e.onPointerMove,fc(S=>{o?c.onItemLeave(S):(c.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ge(e.onPointerLeave,fc(S=>c.onItemLeave(S))),onFocus:Ge(e.onFocus,()=>p(!0)),onBlur:Ge(e.onBlur,()=>p(!1))})})})}),Cz="MenuCheckboxItem",hO=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...i}=e;return b.jsx(yO,{scope:e.__scopeMenu,checked:n,children:b.jsx(Mf,{role:"menuitemcheckbox","aria-checked":rf(n)?"mixed":n,...i,ref:t,"data-state":s0(n),onSelect:Ge(i.onSelect,()=>o?.(rf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});hO.displayName=Cz;var pO="MenuRadioGroup",[Iz,Mz]=xi(pO,{value:void 0,onValueChange:()=>{}}),mO=E.forwardRef((e,t)=>{const{value:n,onValueChange:o,...i}=e,l=Wr(o);return b.jsx(Iz,{scope:e.__scopeMenu,value:n,onValueChange:l,children:b.jsx(o0,{...i,ref:t})})});mO.displayName=pO;var vO="MenuRadioItem",gO=E.forwardRef((e,t)=>{const{value:n,...o}=e,i=Mz(vO,e.__scopeMenu),l=n===i.value;return b.jsx(yO,{scope:e.__scopeMenu,checked:l,children:b.jsx(Mf,{role:"menuitemradio","aria-checked":l,...o,ref:t,"data-state":s0(l),onSelect:Ge(o.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});gO.displayName=vO;var a0="MenuItemIndicator",[yO,Nz]=xi(a0,{checked:!1}),bO=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...i}=e,l=Nz(a0,n);return b.jsx(Go,{present:o||rf(l.checked)||l.checked===!0,children:b.jsx(Ut.span,{...i,ref:t,"data-state":s0(l.checked)})})});bO.displayName=a0;var Dz="MenuSeparator",_O=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return b.jsx(Ut.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});_O.displayName=Dz;var Lz="MenuArrow",EO=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,i=wc(n);return b.jsx(tz,{...i,...o,ref:t})});EO.displayName=Lz;var i0="MenuSub",[Pz,SO]=xi(i0),wO=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:i}=e,l=Ba(i0,t),c=wc(t),[d,f]=E.useState(null),[h,v]=E.useState(null),p=Wr(i);return E.useEffect(()=>(l.open===!1&&p(!1),()=>p(!1)),[l.open,p]),b.jsx(WR,{...c,children:b.jsx(iO,{scope:t,open:o,onOpenChange:p,content:h,onContentChange:v,children:b.jsx(Pz,{scope:t,contentId:Ia(),triggerId:Ia(),trigger:d,onTriggerChange:f,children:n})})})};wO.displayName=i0;var Zl="MenuSubTrigger",xO=E.forwardRef((e,t)=>{const n=Ba(Zl,e.__scopeMenu),o=xc(Zl,e.__scopeMenu),i=SO(Zl,e.__scopeMenu),l=n0(Zl,e.__scopeMenu),c=E.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=l,h={__scopeMenu:e.__scopeMenu},v=E.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return E.useEffect(()=>v,[v]),E.useEffect(()=>{const p=d.current;return()=>{window.clearTimeout(p),f(null)}},[d,f]),b.jsx(e0,{asChild:!0,...h,children:b.jsx(fO,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":TO(n.open),...e,ref:yc(t,i.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ge(e.onPointerMove,fc(p=>{l.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(l.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),v()},100))})),onPointerLeave:Ge(e.onPointerLeave,fc(p=>{v();const y=n.content?.getBoundingClientRect();if(y){const _=n.content?.dataset.side,S=_==="right",w=S?-5:5,T=y[S?"left":"right"],O=y[S?"right":"left"];l.onPointerGraceIntentChange({area:[{x:p.clientX+w,y:p.clientY},{x:T,y:y.top},{x:O,y:y.top},{x:O,y:y.bottom},{x:T,y:y.bottom}],side:_}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(p),p.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:Ge(e.onKeyDown,p=>{const y=l.searchRef.current!=="";e.disabled||y&&p.key===" "||vz[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});xO.displayName=Zl;var RO="MenuSubContent",OO=E.forwardRef((e,t)=>{const n=lO(kr,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,l=Ba(kr,e.__scopeMenu),c=xc(kr,e.__scopeMenu),d=SO(RO,e.__scopeMenu),f=E.useRef(null),h=dn(t,f);return b.jsx(dc.Provider,{scope:e.__scopeMenu,children:b.jsx(Go,{present:o||l.open,children:b.jsx(dc.Slot,{scope:e.__scopeMenu,children:b.jsx(r0,{id:d.contentId,"aria-labelledby":d.triggerId,...i,ref:h,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{c.isUsingKeyboardRef.current&&f.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:Ge(e.onFocusOutside,v=>{v.target!==d.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:Ge(e.onEscapeKeyDown,v=>{c.onClose(),v.preventDefault()}),onKeyDown:Ge(e.onKeyDown,v=>{const p=v.currentTarget.contains(v.target),y=gz[c.dir].includes(v.key);p&&y&&(l.onOpenChange(!1),d.trigger?.focus(),v.preventDefault())})})})})})});OO.displayName=RO;function TO(e){return e?"open":"closed"}function rf(e){return e==="indeterminate"}function s0(e){return rf(e)?"indeterminate":e?"checked":"unchecked"}function kz(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jz(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function zz(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let c=jz(e,Math.max(l,0));i.length===1&&(c=c.filter(h=>h!==n));const f=c.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function Uz(e,t){const{x:n,y:o}=e;let i=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const d=t[l],f=t[c],h=d.x,v=d.y,p=f.x,y=f.y;v>o!=y>o&&n<(p-h)*(o-v)/(y-v)+h&&(i=!i)}return i}function Bz(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Uz(n,t)}function fc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Fz=sO,$z=e0,Vz=cO,Hz=uO,Gz=o0,qz=dO,Zz=Mf,Yz=hO,Kz=mO,Wz=gO,Qz=bO,Xz=_O,Jz=EO,eU=wO,tU=xO,nU=OO,Nf="DropdownMenu",[rU]=wi(Nf,[oO]),Pn=oO(),[oU,AO]=rU(Nf),CO=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:i,defaultOpen:l,onOpenChange:c,modal:d=!0}=e,f=Pn(t),h=E.useRef(null),[v,p]=bc({prop:i,defaultProp:l??!1,onChange:c,caller:Nf});return b.jsx(oU,{scope:t,triggerId:Ia(),triggerRef:h,contentId:Ia(),open:v,onOpenChange:p,onOpenToggle:E.useCallback(()=>p(y=>!y),[p]),modal:d,children:b.jsx(Fz,{...f,open:v,onOpenChange:p,dir:o,modal:d,children:n})})};CO.displayName=Nf;var IO="DropdownMenuTrigger",MO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...i}=e,l=AO(IO,n),c=Pn(n);return b.jsx($z,{asChild:!0,...c,children:b.jsx(Ut.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:yc(t,l.triggerRef),onPointerDown:Ge(e.onPointerDown,d=>{!o&&d.button===0&&d.ctrlKey===!1&&(l.onOpenToggle(),l.open||d.preventDefault())}),onKeyDown:Ge(e.onKeyDown,d=>{o||(["Enter"," "].includes(d.key)&&l.onOpenToggle(),d.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});MO.displayName=IO;var aU="DropdownMenuPortal",NO=e=>{const{__scopeDropdownMenu:t,...n}=e,o=Pn(t);return b.jsx(Vz,{...o,...n})};NO.displayName=aU;var DO="DropdownMenuContent",LO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=AO(DO,n),l=Pn(n),c=E.useRef(!1);return b.jsx(Hz,{id:i.contentId,"aria-labelledby":i.triggerId,...l,...o,ref:t,onCloseAutoFocus:Ge(e.onCloseAutoFocus,d=>{c.current||i.triggerRef.current?.focus(),c.current=!1,d.preventDefault()}),onInteractOutside:Ge(e.onInteractOutside,d=>{const f=d.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,v=f.button===2||h;(!i.modal||v)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});LO.displayName=DO;var iU="DropdownMenuGroup",sU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Gz,{...i,...o,ref:t})});sU.displayName=iU;var lU="DropdownMenuLabel",cU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(qz,{...i,...o,ref:t})});cU.displayName=lU;var uU="DropdownMenuItem",PO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Zz,{...i,...o,ref:t})});PO.displayName=uU;var dU="DropdownMenuCheckboxItem",fU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Yz,{...i,...o,ref:t})});fU.displayName=dU;var hU="DropdownMenuRadioGroup",pU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Kz,{...i,...o,ref:t})});pU.displayName=hU;var mU="DropdownMenuRadioItem",vU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Wz,{...i,...o,ref:t})});vU.displayName=mU;var gU="DropdownMenuItemIndicator",yU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Qz,{...i,...o,ref:t})});yU.displayName=gU;var bU="DropdownMenuSeparator",kO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Xz,{...i,...o,ref:t})});kO.displayName=bU;var _U="DropdownMenuArrow",EU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Jz,{...i,...o,ref:t})});EU.displayName=_U;var SU=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:i,defaultOpen:l}=e,c=Pn(t),[d,f]=bc({prop:o,defaultProp:l??!1,onChange:i,caller:"DropdownMenuSub"});return b.jsx(eU,{...c,open:d,onOpenChange:f,children:n})},wU="DropdownMenuSubTrigger",jO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(tU,{...i,...o,ref:t})});jO.displayName=wU;var xU="DropdownMenuSubContent",zO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(nU,{...i,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});zO.displayName=xU;var RU=CO,OU=MO,TU=NO,AU=LO,CU=PO,IH=kO,MH=SU,NH=jO,DH=zO,IU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rc=IU.reduce((e,t)=>{const n=q2(`Primitive.${t}`),o=E.forwardRef((i,l)=>{const{asChild:c,...d}=i,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),MU="Label",UO=E.forwardRef((e,t)=>b.jsx(Rc.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));UO.displayName=MU;var NU=UO;function DU(e,t=[]){let n=[];function o(l,c){const d=E.createContext(c);d.displayName=l+"Context";const f=n.length;n=[...n,c];const h=p=>{const{scope:y,children:_,...S}=p,w=y?.[e]?.[f]||d,T=E.useMemo(()=>S,Object.values(S));return b.jsx(w.Provider,{value:T,children:_})};h.displayName=l+"Provider";function v(p,y){const _=y?.[e]?.[f]||d,S=E.useContext(_);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,v]}const i=()=>{const l=n.map(c=>E.createContext(c));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return i.scopeName=e,[o,LU(i,...t)]}function LU(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const c=o.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var PU=Gw();function kU(){return PU.useSyncExternalStore(jU,()=>!0,()=>!1)}function jU(){return()=>{}}var l0="Avatar",[zU]=DU(l0),[UU,BO]=zU(l0),FO=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[i,l]=E.useState("idle");return b.jsx(UU,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:l,children:b.jsx(Rc.span,{...o,ref:t})})});FO.displayName=l0;var $O="AvatarImage",VO=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:i=()=>{},...l}=e,c=BO($O,n),d=BU(o,l),f=Wr(h=>{i(h),c.onImageLoadingStatusChange(h)});return Kr(()=>{d!=="idle"&&f(d)},[d,f]),d==="loaded"?b.jsx(Rc.img,{...l,ref:t,src:o}):null});VO.displayName=$O;var HO="AvatarFallback",GO=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...i}=e,l=BO(HO,n),[c,d]=E.useState(o===void 0);return E.useEffect(()=>{if(o!==void 0){const f=window.setTimeout(()=>d(!0),o);return()=>window.clearTimeout(f)}},[o]),c&&l.imageLoadingStatus!=="loaded"?b.jsx(Rc.span,{...i,ref:t}):null});GO.displayName=HO;function NS(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function BU(e,{referrerPolicy:t,crossOrigin:n}){const o=kU(),i=E.useRef(null),l=o?(i.current||(i.current=new window.Image),i.current):null,[c,d]=E.useState(()=>NS(l,e));return Kr(()=>{d(NS(l,e))},[l,e]),Kr(()=>{const f=p=>()=>{d(p)};if(!l)return;const h=f("loaded"),v=f("error");return l.addEventListener("load",h),l.addEventListener("error",v),t&&(l.referrerPolicy=t),typeof n=="string"&&(l.crossOrigin=n),()=>{l.removeEventListener("load",h),l.removeEventListener("error",v)}},[l,n,t]),c}var FU=FO,$U=VO,VU=GO;function HU(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function c0(e,t,n=""){const o=HU(e),i=e?.length;if(!o||t!==void 0){const c=n&&`"${n}" `,d="",f=o?`length=${i}`:`type=${typeof e}`;throw new Error(c+"expected Uint8Array"+d+", got "+f)}return e}function DS(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function GU(e,t){c0(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function zv(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function jm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ao(e,t){return e<<32-t|e>>>t}const qU=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ZU=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function YU(e){if(c0(e),qU)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=ZU[e[n]];return t}function KU(e,t={}){const n=(i,l)=>e(l).update(i).digest(),o=e(void 0);return n.outputLen=o.outputLen,n.blockLen=o.blockLen,n.create=i=>e(i),Object.assign(n,t),Object.freeze(n)}const WU=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function QU(e,t,n){return e&t^~e&n}function XU(e,t,n){return e&t^e&n^t&n}class JU{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,o,i){this.blockLen=t,this.outputLen=n,this.padOffset=o,this.isLE=i,this.buffer=new Uint8Array(t),this.view=jm(this.buffer)}update(t){DS(this),c0(t);const{view:n,buffer:o,blockLen:i}=this,l=t.length;for(let c=0;c<l;){const d=Math.min(i-this.pos,l-c);if(d===i){const f=jm(t);for(;i<=l-c;c+=i)this.process(f,c);continue}o.set(t.subarray(c,c+d),this.pos),this.pos+=d,c+=d,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){DS(this),GU(t,this),this.finished=!0;const{buffer:n,view:o,blockLen:i,isLE:l}=this;let{pos:c}=this;n[c++]=128,zv(this.buffer.subarray(c)),this.padOffset>i-c&&(this.process(o,0),c=0);for(let p=c;p<i;p++)n[p]=0;o.setBigUint64(i-8,BigInt(this.length*8),l),this.process(o,0);const d=jm(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const h=f/4,v=this.get();if(h>v.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<h;p++)d.setUint32(4*p,v[p],l)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const o=t.slice(0,n);return this.destroy(),o}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:n,buffer:o,length:i,finished:l,destroyed:c,pos:d}=this;return t.destroyed=c,t.finished=l,t.length=i,t.pos=d,i%n&&t.buffer.set(o),t}clone(){return this._cloneInto()}}const ba=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),eB=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),_a=new Uint32Array(64);class tB extends JU{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:o,D:i,E:l,F:c,G:d,H:f}=this;return[t,n,o,i,l,c,d,f]}set(t,n,o,i,l,c,d,f){this.A=t|0,this.B=n|0,this.C=o|0,this.D=i|0,this.E=l|0,this.F=c|0,this.G=d|0,this.H=f|0}process(t,n){for(let p=0;p<16;p++,n+=4)_a[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const y=_a[p-15],_=_a[p-2],S=ao(y,7)^ao(y,18)^y>>>3,w=ao(_,17)^ao(_,19)^_>>>10;_a[p]=w+_a[p-7]+S+_a[p-16]|0}let{A:o,B:i,C:l,D:c,E:d,F:f,G:h,H:v}=this;for(let p=0;p<64;p++){const y=ao(d,6)^ao(d,11)^ao(d,25),_=v+y+QU(d,f,h)+eB[p]+_a[p]|0,w=(ao(o,2)^ao(o,13)^ao(o,22))+XU(o,i,l)|0;v=h,h=f,f=d,d=c+_|0,c=l,l=i,i=o,o=_+w|0}o=o+this.A|0,i=i+this.B|0,l=l+this.C|0,c=c+this.D|0,d=d+this.E|0,f=f+this.F|0,h=h+this.G|0,v=v+this.H|0,this.set(o,i,l,c,d,f,h,v)}roundClean(){zv(_a)}destroy(){this.set(0,0,0,0,0,0,0,0),zv(this.buffer)}}class nB extends tB{A=ba[0]|0;B=ba[1]|0;C=ba[2]|0;D=ba[3]|0;E=ba[4]|0;F=ba[5]|0;G=ba[6]|0;H=ba[7]|0;constructor(){super(32)}}const rB=KU(()=>new nB,WU(1));function oB(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Df="Checkbox",[aB]=wi(Df),[iB,u0]=aB(Df);function sB(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:i,disabled:l,form:c,name:d,onCheckedChange:f,required:h,value:v="on",internal_do_not_use_render:p}=e,[y,_]=bc({prop:n,defaultProp:i??!1,onChange:f,caller:Df}),[S,w]=E.useState(null),[T,O]=E.useState(null),A=E.useRef(!1),C=S?!!c||!!S.closest("form"):!0,R={checked:y,disabled:l,setChecked:_,control:S,setControl:w,name:d,form:c,value:v,hasConsumerStoppedPropagationRef:A,required:h,defaultChecked:Ma(i)?!1:i,isFormControl:C,bubbleInput:T,setBubbleInput:O};return b.jsx(iB,{scope:t,...R,children:lB(p)?p(R):o})}var qO="CheckboxTrigger",ZO=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},i)=>{const{control:l,value:c,disabled:d,checked:f,required:h,setControl:v,setChecked:p,hasConsumerStoppedPropagationRef:y,isFormControl:_,bubbleInput:S}=u0(qO,e),w=dn(i,v),T=E.useRef(f);return E.useEffect(()=>{const O=l?.form;if(O){const A=()=>p(T.current);return O.addEventListener("reset",A),()=>O.removeEventListener("reset",A)}},[l,p]),b.jsx(Ut.button,{type:"button",role:"checkbox","aria-checked":Ma(f)?"mixed":f,"aria-required":h,"data-state":JO(f),"data-disabled":d?"":void 0,disabled:d,value:c,...o,ref:w,onKeyDown:Ge(t,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:Ge(n,O=>{p(A=>Ma(A)?!0:!A),S&&_&&(y.current=O.isPropagationStopped(),y.current||O.stopPropagation())})})});ZO.displayName=qO;var YO=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:i,defaultChecked:l,required:c,disabled:d,value:f,onCheckedChange:h,form:v,...p}=e;return b.jsx(sB,{__scopeCheckbox:n,checked:i,defaultChecked:l,disabled:d,required:c,onCheckedChange:h,name:o,form:v,value:f,internal_do_not_use_render:({isFormControl:y})=>b.jsxs(b.Fragment,{children:[b.jsx(ZO,{...p,ref:t,__scopeCheckbox:n}),y&&b.jsx(XO,{__scopeCheckbox:n})]})})});YO.displayName=Df;var KO="CheckboxIndicator",WO=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...i}=e,l=u0(KO,n);return b.jsx(Go,{present:o||Ma(l.checked)||l.checked===!0,children:b.jsx(Ut.span,{"data-state":JO(l.checked),"data-disabled":l.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});WO.displayName=KO;var QO="CheckboxBubbleInput",XO=E.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:i,checked:l,defaultChecked:c,required:d,disabled:f,name:h,value:v,form:p,bubbleInput:y,setBubbleInput:_}=u0(QO,e),S=dn(n,_),w=oB(l),T=UR(o);E.useEffect(()=>{const A=y;if(!A)return;const C=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(C,"checked").set,k=!i.current;if(w!==l&&I){const D=new Event("click",{bubbles:k});A.indeterminate=Ma(l),I.call(A,Ma(l)?!1:l),A.dispatchEvent(D)}},[y,w,l,i]);const O=E.useRef(Ma(l)?!1:l);return b.jsx(Ut.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??O.current,required:d,disabled:f,name:h,value:v,form:p,...t,tabIndex:-1,ref:S,style:{...t.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});XO.displayName=QO;function lB(e){return typeof e=="function"}function Ma(e){return e==="indeterminate"}function JO(e){return Ma(e)?"indeterminate":e?"checked":"unchecked"}var eT={OBJECT:"object",UNDEFINED:"undefined"},ld="browser",LS="cpu",PS="device",zm="engine",cd="os",wa="name",of="type",Uv="vendor",Hr="version",Bv="architecture",Fv="major",$v="model",cB="console",uB="mobile",dB="tablet",fB="smarttv",hB="wearable",pB="embedded",mB=typeof window!==eT.UNDEFINED,Um=mB&&window.navigator?window.navigator:void 0;Um&&Um.userAgentData&&Um.userAgentData;var Lf=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},ud=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==eT.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return ud.call(e.init,[[ld,[wa,Hr,Fv,of]],[LS,[Bv]],[PS,[of,$v,Uv]],[zm,[wa,Hr]],[cd,[wa,Hr]]]),ud.call(e.isIgnore,[[ld,[Hr,Fv]],[zm,[Hr]],[cd,[Hr]]]),ud.call(e.isIgnoreRgx,[[ld,/ ?browser$/i],[cd,/ ?os$/i]]),ud.call(e.toString,[[ld,[wa,Hr]],[LS,[Bv]],[PS,[Uv,$v]],[zm,[wa,Hr]],[cd,[wa,Hr]]]),e})();Lf([wa,Hr,Fv,of]);Lf([Bv]);Lf([$v,Uv,of,cB,uB,fB,dB,hB,pB]);Lf([wa,Hr]);function vB(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const tT=V.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Oc=()=>{const e=V.useContext(tT);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};vB(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
105
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Oj="DialogDescriptionWarning",Tj=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xR(Oj).contentName}}.`;return E.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Aj=uR,Cj=fR,Ij=pR,Mj=mR,Nj=vR,Dj=yR,CH=_R,IH=SR;function RR(e){const t=e+"CollectionProvider",[n,o]=wi(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=w=>{const{scope:T,children:O}=w,A=V.useRef(null),C=V.useRef(new Map).current;return b.jsx(i,{scope:T,itemMap:C,collectionRef:A,children:O})};c.displayName=t;const d=e+"CollectionSlot",f=cc(d),h=V.forwardRef((w,T)=>{const{scope:O,children:A}=w,C=l(d,O),R=dn(T,C.collectionRef);return b.jsx(f,{ref:R,children:A})});h.displayName=d;const v=e+"CollectionItemSlot",p="data-radix-collection-item",y=cc(v),_=V.forwardRef((w,T)=>{const{scope:O,children:A,...C}=w,R=V.useRef(null),I=dn(T,R),k=l(v,O);return V.useEffect(()=>(k.itemMap.set(R,{ref:R,...C}),()=>{k.itemMap.delete(R)})),b.jsx(y,{[p]:"",ref:I,children:A})});_.displayName=v;function S(w){const T=l(e+"CollectionConsumer",w);return V.useCallback(()=>{const A=T.collectionRef.current;if(!A)return[];const C=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(T.itemMap.values()).sort((k,D)=>C.indexOf(k.ref.current)-C.indexOf(D.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:c,Slot:h,ItemSlot:_},S,o]}var Lj=E.createContext(void 0);function OR(e){const t=E.useContext(Lj);return e||t||"ltr"}const Pj=["top","right","bottom","left"],La=Math.min,hr=Math.max,Jd=Math.round,ld=Math.floor,fo=e=>({x:e,y:e}),kj={left:"right",right:"left",bottom:"top",top:"bottom"},jj={start:"end",end:"start"};function Dv(e,t,n){return hr(e,La(t,n))}function $o(e,t){return typeof e=="function"?e(t):e}function Vo(e){return e.split("-")[0]}function zs(e){return e.split("-")[1]}function qg(e){return e==="x"?"y":"x"}function Zg(e){return e==="y"?"height":"width"}const zj=new Set(["top","bottom"]);function uo(e){return zj.has(Vo(e))?"y":"x"}function Yg(e){return qg(uo(e))}function Uj(e,t,n){n===void 0&&(n=!1);const o=zs(e),i=Yg(e),l=Zg(i);let c=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=ef(c)),[c,ef(c)]}function Bj(e){const t=ef(e);return[Lv(e),t,Lv(t)]}function Lv(e){return e.replace(/start|end/g,t=>jj[t])}const _S=["left","right"],ES=["right","left"],Fj=["top","bottom"],$j=["bottom","top"];function Vj(e,t,n){switch(e){case"top":case"bottom":return n?t?ES:_S:t?_S:ES;case"left":case"right":return t?Fj:$j;default:return[]}}function Hj(e,t,n,o){const i=zs(e);let l=Vj(Vo(e),n==="start",o);return i&&(l=l.map(c=>c+"-"+i),t&&(l=l.concat(l.map(Lv)))),l}function ef(e){return e.replace(/left|right|bottom|top/g,t=>kj[t])}function Gj(e){return{top:0,right:0,bottom:0,left:0,...e}}function TR(e){return typeof e!="number"?Gj(e):{top:e,right:e,bottom:e,left:e}}function tf(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function SS(e,t,n){let{reference:o,floating:i}=e;const l=uo(t),c=Yg(t),d=Zg(c),f=Vo(t),h=l==="y",v=o.x+o.width/2-i.width/2,p=o.y+o.height/2-i.height/2,y=o[d]/2-i[d]/2;let _;switch(f){case"top":_={x:v,y:o.y-i.height};break;case"bottom":_={x:v,y:o.y+o.height};break;case"right":_={x:o.x+o.width,y:p};break;case"left":_={x:o.x-i.width,y:p};break;default:_={x:o.x,y:o.y}}switch(zs(t)){case"start":_[c]-=y*(n&&h?-1:1);break;case"end":_[c]+=y*(n&&h?-1:1);break}return _}const qj=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:l=[],platform:c}=n,d=l.filter(Boolean),f=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:v,y:p}=SS(h,o,f),y=o,_={},S=0;for(let w=0;w<d.length;w++){const{name:T,fn:O}=d[w],{x:A,y:C,data:R,reset:I}=await O({x:v,y:p,initialPlacement:o,placement:y,strategy:i,middlewareData:_,rects:h,platform:c,elements:{reference:e,floating:t}});v=A??v,p=C??p,_={..._,[T]:{..._[T],...R}},I&&S<=50&&(S++,typeof I=="object"&&(I.placement&&(y=I.placement),I.rects&&(h=I.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:v,y:p}=SS(h,y,f)),w=-1)}return{x:v,y:p,placement:y,strategy:i,middlewareData:_}};async function uc(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:l,rects:c,elements:d,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:p="floating",altBoundary:y=!1,padding:_=0}=$o(t,e),S=TR(_),T=d[y?p==="floating"?"reference":"floating":p],O=tf(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(T)))==null||n?T:T.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:h,rootBoundary:v,strategy:f})),A=p==="floating"?{x:o,y:i,width:c.floating.width,height:c.floating.height}:c.reference,C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),R=await(l.isElement==null?void 0:l.isElement(C))?await(l.getScale==null?void 0:l.getScale(C))||{x:1,y:1}:{x:1,y:1},I=tf(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:A,offsetParent:C,strategy:f}):A);return{top:(O.top-I.top+S.top)/R.y,bottom:(I.bottom-O.bottom+S.bottom)/R.y,left:(O.left-I.left+S.left)/R.x,right:(I.right-O.right+S.right)/R.x}}const Zj=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:l,platform:c,elements:d,middlewareData:f}=t,{element:h,padding:v=0}=$o(e,t)||{};if(h==null)return{};const p=TR(v),y={x:n,y:o},_=Yg(i),S=Zg(_),w=await c.getDimensions(h),T=_==="y",O=T?"top":"left",A=T?"bottom":"right",C=T?"clientHeight":"clientWidth",R=l.reference[S]+l.reference[_]-y[_]-l.floating[S],I=y[_]-l.reference[_],k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let D=k?k[C]:0;(!D||!await(c.isElement==null?void 0:c.isElement(k)))&&(D=d.floating[C]||l.floating[S]);const N=R/2-I/2,z=D/2-w[S]/2-1,W=La(p[O],z),$=La(p[A],z),q=W,j=D-w[S]-$,X=D/2-w[S]/2+N,oe=Dv(q,X,j),L=!f.arrow&&zs(i)!=null&&X!==oe&&l.reference[S]/2-(X<q?W:$)-w[S]/2<0,F=L?X<q?X-q:X-j:0;return{[_]:y[_]+F,data:{[_]:oe,centerOffset:X-oe-F,...L&&{alignmentOffset:F}},reset:L}}}),Yj=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:l,rects:c,initialPlacement:d,platform:f,elements:h}=t,{mainAxis:v=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...T}=$o(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const O=Vo(i),A=uo(d),C=Vo(d)===d,R=await(f.isRTL==null?void 0:f.isRTL(h.floating)),I=y||(C||!w?[ef(d)]:Bj(d)),k=S!=="none";!y&&k&&I.push(...Hj(d,w,S,R));const D=[d,...I],N=await uc(t,T),z=[];let W=((o=l.flip)==null?void 0:o.overflows)||[];if(v&&z.push(N[O]),p){const X=Uj(i,c,R);z.push(N[X[0]],N[X[1]])}if(W=[...W,{placement:i,overflows:z}],!z.every(X=>X<=0)){var $,q;const X=((($=l.flip)==null?void 0:$.index)||0)+1,oe=D[X];if(oe&&(!(p==="alignment"?A!==uo(oe):!1)||W.every(G=>uo(G.placement)===A?G.overflows[0]>0:!0)))return{data:{index:X,overflows:W},reset:{placement:oe}};let L=(q=W.filter(F=>F.overflows[0]<=0).sort((F,G)=>F.overflows[1]-G.overflows[1])[0])==null?void 0:q.placement;if(!L)switch(_){case"bestFit":{var j;const F=(j=W.filter(G=>{if(k){const re=uo(G.placement);return re===A||re==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(re=>re>0).reduce((re,ye)=>re+ye,0)]).sort((G,re)=>G[1]-re[1])[0])==null?void 0:j[0];F&&(L=F);break}case"initialPlacement":L=d;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function wS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xS(e){return Pj.some(t=>e[t]>=0)}const Kj=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=$o(e,t);switch(o){case"referenceHidden":{const l=await uc(t,{...i,elementContext:"reference"}),c=wS(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:xS(c)}}}case"escaped":{const l=await uc(t,{...i,altBoundary:!0}),c=wS(l,n.floating);return{data:{escapedOffsets:c,escaped:xS(c)}}}default:return{}}}}},AR=new Set(["left","top"]);async function Wj(e,t){const{placement:n,platform:o,elements:i}=e,l=await(o.isRTL==null?void 0:o.isRTL(i.floating)),c=Vo(n),d=zs(n),f=uo(n)==="y",h=AR.has(c)?-1:1,v=l&&f?-1:1,p=$o(t,e);let{mainAxis:y,crossAxis:_,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return d&&typeof S=="number"&&(_=d==="end"?S*-1:S),f?{x:_*v,y:y*h}:{x:y*h,y:_*v}}const Qj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:l,placement:c,middlewareData:d}=t,f=await Wj(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:l+f.y,data:{...f,placement:c}}}}},Xj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:T=>{let{x:O,y:A}=T;return{x:O,y:A}}},...f}=$o(e,t),h={x:n,y:o},v=await uc(t,f),p=uo(Vo(i)),y=qg(p);let _=h[y],S=h[p];if(l){const T=y==="y"?"top":"left",O=y==="y"?"bottom":"right",A=_+v[T],C=_-v[O];_=Dv(A,_,C)}if(c){const T=p==="y"?"top":"left",O=p==="y"?"bottom":"right",A=S+v[T],C=S-v[O];S=Dv(A,S,C)}const w=d.fn({...t,[y]:_,[p]:S});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[y]:l,[p]:c}}}}}},Jj=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:l,middlewareData:c}=t,{offset:d=0,mainAxis:f=!0,crossAxis:h=!0}=$o(e,t),v={x:n,y:o},p=uo(i),y=qg(p);let _=v[y],S=v[p];const w=$o(d,t),T=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const C=y==="y"?"height":"width",R=l.reference[y]-l.floating[C]+T.mainAxis,I=l.reference[y]+l.reference[C]-T.mainAxis;_<R?_=R:_>I&&(_=I)}if(h){var O,A;const C=y==="y"?"width":"height",R=AR.has(Vo(i)),I=l.reference[p]-l.floating[C]+(R&&((O=c.offset)==null?void 0:O[p])||0)+(R?0:T.crossAxis),k=l.reference[p]+l.reference[C]+(R?0:((A=c.offset)==null?void 0:A[p])||0)-(R?T.crossAxis:0);S<I?S=I:S>k&&(S=k)}return{[y]:_,[p]:S}}}},e9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:l,platform:c,elements:d}=t,{apply:f=()=>{},...h}=$o(e,t),v=await uc(t,h),p=Vo(i),y=zs(i),_=uo(i)==="y",{width:S,height:w}=l.floating;let T,O;p==="top"||p==="bottom"?(T=p,O=y===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(O=p,T=y==="end"?"top":"bottom");const A=w-v.top-v.bottom,C=S-v.left-v.right,R=La(w-v[T],A),I=La(S-v[O],C),k=!t.middlewareData.shift;let D=R,N=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(D=A),k&&!y){const W=hr(v.left,0),$=hr(v.right,0),q=hr(v.top,0),j=hr(v.bottom,0);_?N=S-2*(W!==0||$!==0?W+$:hr(v.left,v.right)):D=w-2*(q!==0||j!==0?q+j:hr(v.top,v.bottom))}await f({...t,availableWidth:N,availableHeight:D});const z=await c.getDimensions(d.floating);return S!==z.width||w!==z.height?{reset:{rects:!0}}:{}}}};function Tf(){return typeof window<"u"}function Us(e){return CR(e)?(e.nodeName||"").toLowerCase():"#document"}function gr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function go(e){var t;return(t=(CR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function CR(e){return Tf()?e instanceof Node||e instanceof gr(e).Node:!1}function Qr(e){return Tf()?e instanceof Element||e instanceof gr(e).Element:!1}function po(e){return Tf()?e instanceof HTMLElement||e instanceof gr(e).HTMLElement:!1}function RS(e){return!Tf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gr(e).ShadowRoot}const t9=new Set(["inline","contents"]);function Ec(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Xr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!t9.has(i)}const n9=new Set(["table","td","th"]);function r9(e){return n9.has(Us(e))}const o9=[":popover-open",":modal"];function Af(e){return o9.some(t=>{try{return e.matches(t)}catch{return!1}})}const a9=["transform","translate","scale","rotate","perspective"],i9=["transform","translate","scale","rotate","perspective","filter"],s9=["paint","layout","strict","content"];function Kg(e){const t=Wg(),n=Qr(e)?Xr(e):e;return a9.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||i9.some(o=>(n.willChange||"").includes(o))||s9.some(o=>(n.contain||"").includes(o))}function l9(e){let t=Pa(e);for(;po(t)&&!Ds(t);){if(Kg(t))return t;if(Af(t))return null;t=Pa(t)}return null}function Wg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const c9=new Set(["html","body","#document"]);function Ds(e){return c9.has(Us(e))}function Xr(e){return gr(e).getComputedStyle(e)}function Cf(e){return Qr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pa(e){if(Us(e)==="html")return e;const t=e.assignedSlot||e.parentNode||RS(e)&&e.host||go(e);return RS(t)?t.host:t}function IR(e){const t=Pa(e);return Ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:po(t)&&Ec(t)?t:IR(t)}function dc(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=IR(e),l=i===((o=e.ownerDocument)==null?void 0:o.body),c=gr(i);if(l){const d=Pv(c);return t.concat(c,c.visualViewport||[],Ec(i)?i:[],d&&n?dc(d):[])}return t.concat(i,dc(i,[],n))}function Pv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function MR(e){const t=Xr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=po(e),l=i?e.offsetWidth:n,c=i?e.offsetHeight:o,d=Jd(n)!==l||Jd(o)!==c;return d&&(n=l,o=c),{width:n,height:o,$:d}}function Qg(e){return Qr(e)?e:e.contextElement}function Ts(e){const t=Qg(e);if(!po(t))return fo(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:l}=MR(t);let c=(l?Jd(n.width):n.width)/o,d=(l?Jd(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const u9=fo(0);function NR(e){const t=gr(e);return!Wg()||!t.visualViewport?u9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function d9(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gr(e)?!1:t}function yi(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=Qg(e);let c=fo(1);t&&(o?Qr(o)&&(c=Ts(o)):c=Ts(e));const d=d9(l,n,o)?NR(l):fo(0);let f=(i.left+d.x)/c.x,h=(i.top+d.y)/c.y,v=i.width/c.x,p=i.height/c.y;if(l){const y=gr(l),_=o&&Qr(o)?gr(o):o;let S=y,w=Pv(S);for(;w&&o&&_!==S;){const T=Ts(w),O=w.getBoundingClientRect(),A=Xr(w),C=O.left+(w.clientLeft+parseFloat(A.paddingLeft))*T.x,R=O.top+(w.clientTop+parseFloat(A.paddingTop))*T.y;f*=T.x,h*=T.y,v*=T.x,p*=T.y,f+=C,h+=R,S=gr(w),w=Pv(S)}}return tf({width:v,height:p,x:f,y:h})}function If(e,t){const n=Cf(e).scrollLeft;return t?t.left+n:yi(go(e)).left+n}function DR(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-If(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function f9(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const l=i==="fixed",c=go(o),d=t?Af(t.floating):!1;if(o===c||d&&l)return n;let f={scrollLeft:0,scrollTop:0},h=fo(1);const v=fo(0),p=po(o);if((p||!p&&!l)&&((Us(o)!=="body"||Ec(c))&&(f=Cf(o)),po(o))){const _=yi(o);h=Ts(o),v.x=_.x+o.clientLeft,v.y=_.y+o.clientTop}const y=c&&!p&&!l?DR(c,f):fo(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+v.x+y.x,y:n.y*h.y-f.scrollTop*h.y+v.y+y.y}}function h9(e){return Array.from(e.getClientRects())}function p9(e){const t=go(e),n=Cf(e),o=e.ownerDocument.body,i=hr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=hr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+If(e);const d=-n.scrollTop;return Xr(o).direction==="rtl"&&(c+=hr(t.clientWidth,o.clientWidth)-i),{width:i,height:l,x:c,y:d}}const OS=25;function m9(e,t){const n=gr(e),o=go(e),i=n.visualViewport;let l=o.clientWidth,c=o.clientHeight,d=0,f=0;if(i){l=i.width,c=i.height;const v=Wg();(!v||v&&t==="fixed")&&(d=i.offsetLeft,f=i.offsetTop)}const h=If(o);if(h<=0){const v=o.ownerDocument,p=v.body,y=getComputedStyle(p),_=v.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,S=Math.abs(o.clientWidth-p.clientWidth-_);S<=OS&&(l-=S)}else h<=OS&&(l+=h);return{width:l,height:c,x:d,y:f}}const v9=new Set(["absolute","fixed"]);function g9(e,t){const n=yi(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,l=po(e)?Ts(e):fo(1),c=e.clientWidth*l.x,d=e.clientHeight*l.y,f=i*l.x,h=o*l.y;return{width:c,height:d,x:f,y:h}}function TS(e,t,n){let o;if(t==="viewport")o=m9(e,n);else if(t==="document")o=p9(go(e));else if(Qr(t))o=g9(t,n);else{const i=NR(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return tf(o)}function LR(e,t){const n=Pa(e);return n===t||!Qr(n)||Ds(n)?!1:Xr(n).position==="fixed"||LR(n,t)}function y9(e,t){const n=t.get(e);if(n)return n;let o=dc(e,[],!1).filter(d=>Qr(d)&&Us(d)!=="body"),i=null;const l=Xr(e).position==="fixed";let c=l?Pa(e):e;for(;Qr(c)&&!Ds(c);){const d=Xr(c),f=Kg(c);!f&&d.position==="fixed"&&(i=null),(l?!f&&!i:!f&&d.position==="static"&&!!i&&v9.has(i.position)||Ec(c)&&!f&&LR(e,c))?o=o.filter(v=>v!==c):i=d,c=Pa(c)}return t.set(e,o),o}function b9(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const c=[...n==="clippingAncestors"?Af(t)?[]:y9(t,this._c):[].concat(n),o],d=c[0],f=c.reduce((h,v)=>{const p=TS(t,v,i);return h.top=hr(p.top,h.top),h.right=La(p.right,h.right),h.bottom=La(p.bottom,h.bottom),h.left=hr(p.left,h.left),h},TS(t,d,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function _9(e){const{width:t,height:n}=MR(e);return{width:t,height:n}}function E9(e,t,n){const o=po(t),i=go(t),l=n==="fixed",c=yi(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=fo(0);function h(){f.x=If(i)}if(o||!o&&!l)if((Us(t)!=="body"||Ec(i))&&(d=Cf(t)),o){const _=yi(t,!0,l,t);f.x=_.x+t.clientLeft,f.y=_.y+t.clientTop}else i&&h();l&&!o&&i&&h();const v=i&&!o&&!l?DR(i,d):fo(0),p=c.left+d.scrollLeft-f.x-v.x,y=c.top+d.scrollTop-f.y-v.y;return{x:p,y,width:c.width,height:c.height}}function Lm(e){return Xr(e).position==="static"}function AS(e,t){if(!po(e)||Xr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return go(e)===n&&(n=n.ownerDocument.body),n}function PR(e,t){const n=gr(e);if(Af(e))return n;if(!po(e)){let i=Pa(e);for(;i&&!Ds(i);){if(Qr(i)&&!Lm(i))return i;i=Pa(i)}return n}let o=AS(e,t);for(;o&&r9(o)&&Lm(o);)o=AS(o,t);return o&&Ds(o)&&Lm(o)&&!Kg(o)?n:o||l9(e)||n}const S9=async function(e){const t=this.getOffsetParent||PR,n=this.getDimensions,o=await n(e.floating);return{reference:E9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function w9(e){return Xr(e).direction==="rtl"}const x9={convertOffsetParentRelativeRectToViewportRelativeRect:f9,getDocumentElement:go,getClippingRect:b9,getOffsetParent:PR,getElementRects:S9,getClientRects:h9,getDimensions:_9,getScale:Ts,isElement:Qr,isRTL:w9};function kR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function R9(e,t){let n=null,o;const i=go(e);function l(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function c(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),l();const h=e.getBoundingClientRect(),{left:v,top:p,width:y,height:_}=h;if(d||t(),!y||!_)return;const S=ld(p),w=ld(i.clientWidth-(v+y)),T=ld(i.clientHeight-(p+_)),O=ld(v),C={rootMargin:-S+"px "+-w+"px "+-T+"px "+-O+"px",threshold:hr(0,La(1,f))||1};let R=!0;function I(k){const D=k[0].intersectionRatio;if(D!==f){if(!R)return c();D?c(!1,D):o=setTimeout(()=>{c(!1,1e-7)},1e3)}D===1&&!kR(h,e.getBoundingClientRect())&&c(),R=!1}try{n=new IntersectionObserver(I,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(I,C)}n.observe(e)}return c(!0),l}function O9(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,h=Qg(e),v=i||l?[...h?dc(h):[],...dc(t)]:[];v.forEach(O=>{i&&O.addEventListener("scroll",n,{passive:!0}),l&&O.addEventListener("resize",n)});const p=h&&d?R9(h,n):null;let y=-1,_=null;c&&(_=new ResizeObserver(O=>{let[A]=O;A&&A.target===h&&_&&(_.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var C;(C=_)==null||C.observe(t)})),n()}),h&&!f&&_.observe(h),_.observe(t));let S,w=f?yi(e):null;f&&T();function T(){const O=yi(e);w&&!kR(w,O)&&n(),w=O,S=requestAnimationFrame(T)}return n(),()=>{var O;v.forEach(A=>{i&&A.removeEventListener("scroll",n),l&&A.removeEventListener("resize",n)}),p?.(),(O=_)==null||O.disconnect(),_=null,f&&cancelAnimationFrame(S)}}const T9=Qj,A9=Xj,C9=Yj,I9=e9,M9=Kj,CS=Zj,N9=Jj,D9=(e,t,n)=>{const o=new Map,i={platform:x9,...n},l={...i.platform,_c:o};return qj(e,t,{...i,platform:l})};var L9=typeof document<"u",P9=function(){},Od=L9?E.useLayoutEffect:P9;function nf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!nf(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const l=i[o];if(!(l==="_owner"&&e.$$typeof)&&!nf(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function jR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function IS(e,t){const n=jR(e);return Math.round(t*n)/n}function Pm(e){const t=E.useRef(e);return Od(()=>{t.current=e}),t}function k9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:c}={},transform:d=!0,whileElementsMounted:f,open:h}=e,[v,p]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,_]=E.useState(o);nf(y,o)||_(o);const[S,w]=E.useState(null),[T,O]=E.useState(null),A=E.useCallback(G=>{G!==k.current&&(k.current=G,w(G))},[]),C=E.useCallback(G=>{G!==D.current&&(D.current=G,O(G))},[]),R=l||S,I=c||T,k=E.useRef(null),D=E.useRef(null),N=E.useRef(v),z=f!=null,W=Pm(f),$=Pm(i),q=Pm(h),j=E.useCallback(()=>{if(!k.current||!D.current)return;const G={placement:t,strategy:n,middleware:y};$.current&&(G.platform=$.current),D9(k.current,D.current,G).then(re=>{const ye={...re,isPositioned:q.current!==!1};X.current&&!nf(N.current,ye)&&(N.current=ye,mf.flushSync(()=>{p(ye)}))})},[y,t,n,$,q]);Od(()=>{h===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[h]);const X=E.useRef(!1);Od(()=>(X.current=!0,()=>{X.current=!1}),[]),Od(()=>{if(R&&(k.current=R),I&&(D.current=I),R&&I){if(W.current)return W.current(R,I,j);j()}},[R,I,j,W,z]);const oe=E.useMemo(()=>({reference:k,floating:D,setReference:A,setFloating:C}),[A,C]),L=E.useMemo(()=>({reference:R,floating:I}),[R,I]),F=E.useMemo(()=>{const G={position:n,left:0,top:0};if(!L.floating)return G;const re=IS(L.floating,v.x),ye=IS(L.floating,v.y);return d?{...G,transform:"translate("+re+"px, "+ye+"px)",...jR(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:ye}},[n,d,L.floating,v.x,v.y]);return E.useMemo(()=>({...v,update:j,refs:oe,elements:L,floatingStyles:F}),[v,j,oe,L,F])}const j9=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?CS({element:o.current,padding:i}).fn(n):{}:o?CS({element:o,padding:i}).fn(n):{}}}},z9=(e,t)=>({...T9(e),options:[e,t]}),U9=(e,t)=>({...A9(e),options:[e,t]}),B9=(e,t)=>({...N9(e),options:[e,t]}),F9=(e,t)=>({...C9(e),options:[e,t]}),$9=(e,t)=>({...I9(e),options:[e,t]}),V9=(e,t)=>({...M9(e),options:[e,t]}),H9=(e,t)=>({...j9(e),options:[e,t]});var G9="Arrow",zR=E.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...l}=e;return b.jsx(Ut.svg,{...l,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});zR.displayName=G9;var q9=zR;function UR(e){const[t,n]=E.useState(void 0);return Kr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let c,d;if("borderBoxSize"in l){const f=l.borderBoxSize,h=Array.isArray(f)?f[0]:f;c=h.inlineSize,d=h.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Xg="Popper",[BR,FR]=wi(Xg),[Z9,$R]=BR(Xg),VR=e=>{const{__scopePopper:t,children:n}=e,[o,i]=E.useState(null);return b.jsx(Z9,{scope:t,anchor:o,onAnchorChange:i,children:n})};VR.displayName=Xg;var HR="PopperAnchor",GR=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,l=$R(HR,n),c=E.useRef(null),d=dn(t,c),f=E.useRef(null);return E.useEffect(()=>{const h=f.current;f.current=o?.current||c.current,h!==f.current&&l.onAnchorChange(f.current)}),o?null:b.jsx(Ut.div,{...i,ref:d})});GR.displayName=HR;var Jg="PopperContent",[Y9,K9]=BR(Jg),qR=E.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:v=0,sticky:p="partial",hideWhenDetached:y=!1,updatePositionStrategy:_="optimized",onPlaced:S,...w}=e,T=$R(Jg,n),[O,A]=E.useState(null),C=dn(t,be=>A(be)),[R,I]=E.useState(null),k=UR(R),D=k?.width??0,N=k?.height??0,z=o+(l!=="center"?"-"+l:""),W=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},$=Array.isArray(h)?h:[h],q=$.length>0,j={padding:W,boundary:$.filter(Q9),altBoundary:q},{refs:X,floatingStyles:oe,placement:L,isPositioned:F,middlewareData:G}=k9({strategy:"fixed",placement:z,whileElementsMounted:(...be)=>O9(...be,{animationFrame:_==="always"}),elements:{reference:T.anchor},middleware:[z9({mainAxis:i+N,alignmentAxis:c}),f&&U9({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?B9():void 0,...j}),f&&F9({...j}),$9({...j,apply:({elements:be,rects:Se,availableWidth:De,availableHeight:Le})=>{const{width:Ee,height:ze}=Se.reference,Nt=be.floating.style;Nt.setProperty("--radix-popper-available-width",`${De}px`),Nt.setProperty("--radix-popper-available-height",`${Le}px`),Nt.setProperty("--radix-popper-anchor-width",`${Ee}px`),Nt.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),R&&H9({element:R,padding:d}),X9({arrowWidth:D,arrowHeight:N}),y&&V9({strategy:"referenceHidden",...j})]}),[re,ye]=KR(L),P=Wr(S);Kr(()=>{F&&P?.()},[F,P]);const Q=G.arrow?.x,te=G.arrow?.y,se=G.arrow?.centerOffset!==0,[me,_e]=E.useState();return Kr(()=>{O&&_e(window.getComputedStyle(O).zIndex)},[O]),b.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:F?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[G.transformOrigin?.x,G.transformOrigin?.y].join(" "),...G.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(Y9,{scope:n,placedSide:re,onArrowChange:I,arrowX:Q,arrowY:te,shouldHideArrow:se,children:b.jsx(Ut.div,{"data-side":re,"data-align":ye,...w,ref:C,style:{...w.style,animation:F?void 0:"none"}})})})});qR.displayName=Jg;var ZR="PopperArrow",W9={top:"bottom",right:"left",bottom:"top",left:"right"},YR=E.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,l=K9(ZR,o),c=W9[l.placedSide];return b.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:b.jsx(q9,{...i,ref:n,style:{...i.style,display:"block"}})})});YR.displayName=ZR;function Q9(e){return e!==null}var X9=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:i}=t,c=i.arrow?.centerOffset!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,v]=KR(n),p={start:"0%",center:"50%",end:"100%"}[v],y=(i.arrow?.x??0)+d/2,_=(i.arrow?.y??0)+f/2;let S="",w="";return h==="bottom"?(S=c?p:`${y}px`,w=`${-f}px`):h==="top"?(S=c?p:`${y}px`,w=`${o.floating.height+f}px`):h==="right"?(S=`${-f}px`,w=c?p:`${_}px`):h==="left"&&(S=`${o.floating.width+f}px`,w=c?p:`${_}px`),{data:{x:S,y:w}}}});function KR(e){const[t,n="center"]=e.split("-");return[t,n]}var WR=VR,J9=GR,ez=qR,tz=YR,km="rovingFocusGroup.onEntryFocus",nz={bubbles:!1,cancelable:!0},Sc="RovingFocusGroup",[kv,QR,rz]=RR(Sc),[oz,XR]=wi(Sc,[rz]),[az,iz]=oz(Sc),JR=E.forwardRef((e,t)=>b.jsx(kv.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(kv.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(sz,{...e,ref:t})})}));JR.displayName=Sc;var sz=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:v=!1,...p}=e,y=E.useRef(null),_=dn(t,y),S=OR(l),[w,T]=_c({prop:c,defaultProp:d??null,onChange:f,caller:Sc}),[O,A]=E.useState(!1),C=Wr(h),R=QR(n),I=E.useRef(!1),[k,D]=E.useState(0);return E.useEffect(()=>{const N=y.current;if(N)return N.addEventListener(km,C),()=>N.removeEventListener(km,C)},[C]),b.jsx(az,{scope:n,orientation:o,dir:S,loop:i,currentTabStopId:w,onItemFocus:E.useCallback(N=>T(N),[T]),onItemShiftTab:E.useCallback(()=>A(!0),[]),onFocusableItemAdd:E.useCallback(()=>D(N=>N+1),[]),onFocusableItemRemove:E.useCallback(()=>D(N=>N-1),[]),children:b.jsx(Ut.div,{tabIndex:O||k===0?-1:0,"data-orientation":o,...p,ref:_,style:{outline:"none",...e.style},onMouseDown:Ge(e.onMouseDown,()=>{I.current=!0}),onFocus:Ge(e.onFocus,N=>{const z=!I.current;if(N.target===N.currentTarget&&z&&!O){const W=new CustomEvent(km,nz);if(N.currentTarget.dispatchEvent(W),!W.defaultPrevented){const $=R().filter(L=>L.focusable),q=$.find(L=>L.active),j=$.find(L=>L.id===w),oe=[q,j,...$].filter(Boolean).map(L=>L.ref.current);nO(oe,v)}}I.current=!1}),onBlur:Ge(e.onBlur,()=>A(!1))})})}),eO="RovingFocusGroupItem",tO=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:l,children:c,...d}=e,f=Ia(),h=l||f,v=iz(eO,n),p=v.currentTabStopId===h,y=QR(n),{onFocusableItemAdd:_,onFocusableItemRemove:S,currentTabStopId:w}=v;return E.useEffect(()=>{if(o)return _(),()=>S()},[o,_,S]),b.jsx(kv.ItemSlot,{scope:n,id:h,focusable:o,active:i,children:b.jsx(Ut.span,{tabIndex:p?0:-1,"data-orientation":v.orientation,...d,ref:t,onMouseDown:Ge(e.onMouseDown,T=>{o?v.onItemFocus(h):T.preventDefault()}),onFocus:Ge(e.onFocus,()=>v.onItemFocus(h)),onKeyDown:Ge(e.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){v.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const O=uz(T,v.orientation,v.dir);if(O!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let C=y().filter(R=>R.focusable).map(R=>R.ref.current);if(O==="last")C.reverse();else if(O==="prev"||O==="next"){O==="prev"&&C.reverse();const R=C.indexOf(T.currentTarget);C=v.loop?dz(C,R+1):C.slice(R+1)}setTimeout(()=>nO(C))}}),children:typeof c=="function"?c({isCurrentTabStop:p,hasTabStop:w!=null}):c})})});tO.displayName=eO;var lz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cz(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function uz(e,t,n){const o=cz(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return lz[o]}function nO(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function dz(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var fz=JR,hz=tO,jv=["Enter"," "],pz=["ArrowDown","PageUp","Home"],rO=["ArrowUp","PageDown","End"],mz=[...pz,...rO],vz={ltr:[...jv,"ArrowRight"],rtl:[...jv,"ArrowLeft"]},gz={ltr:["ArrowLeft"],rtl:["ArrowRight"]},wc="Menu",[fc,yz,bz]=RR(wc),[xi,oO]=wi(wc,[bz,FR,XR]),xc=FR(),aO=XR(),[iO,Ba]=xi(wc),[_z,Rc]=xi(wc),sO=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:i,onOpenChange:l,modal:c=!0}=e,d=xc(t),[f,h]=E.useState(null),v=E.useRef(!1),p=Wr(l),y=OR(i);return E.useEffect(()=>{const _=()=>{v.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>v.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),b.jsx(WR,{...d,children:b.jsx(iO,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:h,children:b.jsx(_z,{scope:t,onClose:E.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:v,dir:y,modal:c,children:o})})})};sO.displayName=wc;var Ez="MenuAnchor",e0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,i=xc(n);return b.jsx(J9,{...i,...o,ref:t})});e0.displayName=Ez;var t0="MenuPortal",[Sz,lO]=xi(t0,{forceMount:void 0}),cO=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:i}=e,l=Ba(t0,t);return b.jsx(Sz,{scope:t,forceMount:n,children:b.jsx(Go,{present:n||l.open,children:b.jsx(Fg,{asChild:!0,container:i,children:o})})})};cO.displayName=t0;var kr="MenuContent",[wz,n0]=xi(kr),uO=E.forwardRef((e,t)=>{const n=lO(kr,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,l=Ba(kr,e.__scopeMenu),c=Rc(kr,e.__scopeMenu);return b.jsx(fc.Provider,{scope:e.__scopeMenu,children:b.jsx(Go,{present:o||l.open,children:b.jsx(fc.Slot,{scope:e.__scopeMenu,children:c.modal?b.jsx(xz,{...i,ref:t}):b.jsx(Rz,{...i,ref:t})})})})}),xz=E.forwardRef((e,t)=>{const n=Ba(kr,e.__scopeMenu),o=E.useRef(null),i=dn(t,o);return E.useEffect(()=>{const l=o.current;if(l)return lR(l)},[]),b.jsx(r0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ge(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Rz=E.forwardRef((e,t)=>{const n=Ba(kr,e.__scopeMenu);return b.jsx(r0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Oz=cc("MenuContent.ScrollLock"),r0=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:c,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:p,onInteractOutside:y,onDismiss:_,disableOutsideScroll:S,...w}=e,T=Ba(kr,n),O=Rc(kr,n),A=xc(n),C=aO(n),R=yz(n),[I,k]=E.useState(null),D=E.useRef(null),N=dn(t,D,T.onContentChange),z=E.useRef(0),W=E.useRef(""),$=E.useRef(0),q=E.useRef(null),j=E.useRef("right"),X=E.useRef(0),oe=S?$g:E.Fragment,L=S?{as:Oz,allowPinchZoom:!0}:void 0,F=re=>{const ye=W.current+re,P=R().filter(be=>!be.disabled),Q=document.activeElement,te=P.find(be=>be.ref.current===Q)?.textValue,se=P.map(be=>be.textValue),me=zz(se,ye,te),_e=P.find(be=>be.textValue===me)?.ref.current;(function be(Se){W.current=Se,window.clearTimeout(z.current),Se!==""&&(z.current=window.setTimeout(()=>be(""),1e3))})(ye),_e&&setTimeout(()=>_e.focus())};E.useEffect(()=>()=>window.clearTimeout(z.current),[]),J2();const G=E.useCallback(re=>j.current===q.current?.side&&Bz(re,q.current?.area),[]);return b.jsx(wz,{scope:n,searchRef:W,onItemEnter:E.useCallback(re=>{G(re)&&re.preventDefault()},[G]),onItemLeave:E.useCallback(re=>{G(re)||(D.current?.focus(),k(null))},[G]),onTriggerLeave:E.useCallback(re=>{G(re)&&re.preventDefault()},[G]),pointerGraceTimerRef:$,onPointerGraceIntentChange:E.useCallback(re=>{q.current=re},[]),children:b.jsx(oe,{...L,children:b.jsx(Bg,{asChild:!0,trapped:i,onMountAutoFocus:Ge(l,re=>{re.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:b.jsx(Ug,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:p,onInteractOutside:y,onDismiss:_,children:b.jsx(fz,{asChild:!0,...C,dir:O.dir,orientation:"vertical",loop:o,currentTabStopId:I,onCurrentTabStopIdChange:k,onEntryFocus:Ge(f,re=>{O.isUsingKeyboardRef.current||re.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(ez,{role:"menu","aria-orientation":"vertical","data-state":TO(T.open),"data-radix-menu-content":"",dir:O.dir,...A,...w,ref:N,style:{outline:"none",...w.style},onKeyDown:Ge(w.onKeyDown,re=>{const P=re.target.closest("[data-radix-menu-content]")===re.currentTarget,Q=re.ctrlKey||re.altKey||re.metaKey,te=re.key.length===1;P&&(re.key==="Tab"&&re.preventDefault(),!Q&&te&&F(re.key));const se=D.current;if(re.target!==se||!mz.includes(re.key))return;re.preventDefault();const _e=R().filter(be=>!be.disabled).map(be=>be.ref.current);rO.includes(re.key)&&_e.reverse(),kz(_e)}),onBlur:Ge(e.onBlur,re=>{re.currentTarget.contains(re.target)||(window.clearTimeout(z.current),W.current="")}),onPointerMove:Ge(e.onPointerMove,hc(re=>{const ye=re.target,P=X.current!==re.clientX;if(re.currentTarget.contains(ye)&&P){const Q=re.clientX>X.current?"right":"left";j.current=Q,X.current=re.clientX}}))})})})})})})});uO.displayName=kr;var Tz="MenuGroup",o0=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return b.jsx(Ut.div,{role:"group",...o,ref:t})});o0.displayName=Tz;var Az="MenuLabel",dO=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return b.jsx(Ut.div,{...o,ref:t})});dO.displayName=Az;var rf="MenuItem",MS="menu.itemSelect",Mf=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...i}=e,l=E.useRef(null),c=Rc(rf,e.__scopeMenu),d=n0(rf,e.__scopeMenu),f=dn(t,l),h=E.useRef(!1),v=()=>{const p=l.current;if(!n&&p){const y=new CustomEvent(MS,{bubbles:!0,cancelable:!0});p.addEventListener(MS,_=>o?.(_),{once:!0}),K2(p,y),y.defaultPrevented?h.current=!1:c.onClose()}};return b.jsx(fO,{...i,ref:f,disabled:n,onClick:Ge(e.onClick,v),onPointerDown:p=>{e.onPointerDown?.(p),h.current=!0},onPointerUp:Ge(e.onPointerUp,p=>{h.current||p.currentTarget?.click()}),onKeyDown:Ge(e.onKeyDown,p=>{const y=d.searchRef.current!=="";n||y&&p.key===" "||jv.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Mf.displayName=rf;var fO=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:i,...l}=e,c=n0(rf,n),d=aO(n),f=E.useRef(null),h=dn(t,f),[v,p]=E.useState(!1),[y,_]=E.useState("");return E.useEffect(()=>{const S=f.current;S&&_((S.textContent??"").trim())},[l.children]),b.jsx(fc.ItemSlot,{scope:n,disabled:o,textValue:i??y,children:b.jsx(hz,{asChild:!0,...d,focusable:!o,children:b.jsx(Ut.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...l,ref:h,onPointerMove:Ge(e.onPointerMove,hc(S=>{o?c.onItemLeave(S):(c.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ge(e.onPointerLeave,hc(S=>c.onItemLeave(S))),onFocus:Ge(e.onFocus,()=>p(!0)),onBlur:Ge(e.onBlur,()=>p(!1))})})})}),Cz="MenuCheckboxItem",hO=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...i}=e;return b.jsx(yO,{scope:e.__scopeMenu,checked:n,children:b.jsx(Mf,{role:"menuitemcheckbox","aria-checked":of(n)?"mixed":n,...i,ref:t,"data-state":s0(n),onSelect:Ge(i.onSelect,()=>o?.(of(n)?!0:!n),{checkForDefaultPrevented:!1})})})});hO.displayName=Cz;var pO="MenuRadioGroup",[Iz,Mz]=xi(pO,{value:void 0,onValueChange:()=>{}}),mO=E.forwardRef((e,t)=>{const{value:n,onValueChange:o,...i}=e,l=Wr(o);return b.jsx(Iz,{scope:e.__scopeMenu,value:n,onValueChange:l,children:b.jsx(o0,{...i,ref:t})})});mO.displayName=pO;var vO="MenuRadioItem",gO=E.forwardRef((e,t)=>{const{value:n,...o}=e,i=Mz(vO,e.__scopeMenu),l=n===i.value;return b.jsx(yO,{scope:e.__scopeMenu,checked:l,children:b.jsx(Mf,{role:"menuitemradio","aria-checked":l,...o,ref:t,"data-state":s0(l),onSelect:Ge(o.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});gO.displayName=vO;var a0="MenuItemIndicator",[yO,Nz]=xi(a0,{checked:!1}),bO=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...i}=e,l=Nz(a0,n);return b.jsx(Go,{present:o||of(l.checked)||l.checked===!0,children:b.jsx(Ut.span,{...i,ref:t,"data-state":s0(l.checked)})})});bO.displayName=a0;var Dz="MenuSeparator",_O=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return b.jsx(Ut.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});_O.displayName=Dz;var Lz="MenuArrow",EO=E.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,i=xc(n);return b.jsx(tz,{...i,...o,ref:t})});EO.displayName=Lz;var i0="MenuSub",[Pz,SO]=xi(i0),wO=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:i}=e,l=Ba(i0,t),c=xc(t),[d,f]=E.useState(null),[h,v]=E.useState(null),p=Wr(i);return E.useEffect(()=>(l.open===!1&&p(!1),()=>p(!1)),[l.open,p]),b.jsx(WR,{...c,children:b.jsx(iO,{scope:t,open:o,onOpenChange:p,content:h,onContentChange:v,children:b.jsx(Pz,{scope:t,contentId:Ia(),triggerId:Ia(),trigger:d,onTriggerChange:f,children:n})})})};wO.displayName=i0;var Zl="MenuSubTrigger",xO=E.forwardRef((e,t)=>{const n=Ba(Zl,e.__scopeMenu),o=Rc(Zl,e.__scopeMenu),i=SO(Zl,e.__scopeMenu),l=n0(Zl,e.__scopeMenu),c=E.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=l,h={__scopeMenu:e.__scopeMenu},v=E.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return E.useEffect(()=>v,[v]),E.useEffect(()=>{const p=d.current;return()=>{window.clearTimeout(p),f(null)}},[d,f]),b.jsx(e0,{asChild:!0,...h,children:b.jsx(fO,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":TO(n.open),...e,ref:bc(t,i.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ge(e.onPointerMove,hc(p=>{l.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(l.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),v()},100))})),onPointerLeave:Ge(e.onPointerLeave,hc(p=>{v();const y=n.content?.getBoundingClientRect();if(y){const _=n.content?.dataset.side,S=_==="right",w=S?-5:5,T=y[S?"left":"right"],O=y[S?"right":"left"];l.onPointerGraceIntentChange({area:[{x:p.clientX+w,y:p.clientY},{x:T,y:y.top},{x:O,y:y.top},{x:O,y:y.bottom},{x:T,y:y.bottom}],side:_}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(p),p.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:Ge(e.onKeyDown,p=>{const y=l.searchRef.current!=="";e.disabled||y&&p.key===" "||vz[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});xO.displayName=Zl;var RO="MenuSubContent",OO=E.forwardRef((e,t)=>{const n=lO(kr,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,l=Ba(kr,e.__scopeMenu),c=Rc(kr,e.__scopeMenu),d=SO(RO,e.__scopeMenu),f=E.useRef(null),h=dn(t,f);return b.jsx(fc.Provider,{scope:e.__scopeMenu,children:b.jsx(Go,{present:o||l.open,children:b.jsx(fc.Slot,{scope:e.__scopeMenu,children:b.jsx(r0,{id:d.contentId,"aria-labelledby":d.triggerId,...i,ref:h,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{c.isUsingKeyboardRef.current&&f.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:Ge(e.onFocusOutside,v=>{v.target!==d.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:Ge(e.onEscapeKeyDown,v=>{c.onClose(),v.preventDefault()}),onKeyDown:Ge(e.onKeyDown,v=>{const p=v.currentTarget.contains(v.target),y=gz[c.dir].includes(v.key);p&&y&&(l.onOpenChange(!1),d.trigger?.focus(),v.preventDefault())})})})})})});OO.displayName=RO;function TO(e){return e?"open":"closed"}function of(e){return e==="indeterminate"}function s0(e){return of(e)?"indeterminate":e?"checked":"unchecked"}function kz(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jz(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function zz(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let c=jz(e,Math.max(l,0));i.length===1&&(c=c.filter(h=>h!==n));const f=c.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function Uz(e,t){const{x:n,y:o}=e;let i=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const d=t[l],f=t[c],h=d.x,v=d.y,p=f.x,y=f.y;v>o!=y>o&&n<(p-h)*(o-v)/(y-v)+h&&(i=!i)}return i}function Bz(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Uz(n,t)}function hc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Fz=sO,$z=e0,Vz=cO,Hz=uO,Gz=o0,qz=dO,Zz=Mf,Yz=hO,Kz=mO,Wz=gO,Qz=bO,Xz=_O,Jz=EO,eU=wO,tU=xO,nU=OO,Nf="DropdownMenu",[rU]=wi(Nf,[oO]),Pn=oO(),[oU,AO]=rU(Nf),CO=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:i,defaultOpen:l,onOpenChange:c,modal:d=!0}=e,f=Pn(t),h=E.useRef(null),[v,p]=_c({prop:i,defaultProp:l??!1,onChange:c,caller:Nf});return b.jsx(oU,{scope:t,triggerId:Ia(),triggerRef:h,contentId:Ia(),open:v,onOpenChange:p,onOpenToggle:E.useCallback(()=>p(y=>!y),[p]),modal:d,children:b.jsx(Fz,{...f,open:v,onOpenChange:p,dir:o,modal:d,children:n})})};CO.displayName=Nf;var IO="DropdownMenuTrigger",MO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...i}=e,l=AO(IO,n),c=Pn(n);return b.jsx($z,{asChild:!0,...c,children:b.jsx(Ut.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:bc(t,l.triggerRef),onPointerDown:Ge(e.onPointerDown,d=>{!o&&d.button===0&&d.ctrlKey===!1&&(l.onOpenToggle(),l.open||d.preventDefault())}),onKeyDown:Ge(e.onKeyDown,d=>{o||(["Enter"," "].includes(d.key)&&l.onOpenToggle(),d.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});MO.displayName=IO;var aU="DropdownMenuPortal",NO=e=>{const{__scopeDropdownMenu:t,...n}=e,o=Pn(t);return b.jsx(Vz,{...o,...n})};NO.displayName=aU;var DO="DropdownMenuContent",LO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=AO(DO,n),l=Pn(n),c=E.useRef(!1);return b.jsx(Hz,{id:i.contentId,"aria-labelledby":i.triggerId,...l,...o,ref:t,onCloseAutoFocus:Ge(e.onCloseAutoFocus,d=>{c.current||i.triggerRef.current?.focus(),c.current=!1,d.preventDefault()}),onInteractOutside:Ge(e.onInteractOutside,d=>{const f=d.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,v=f.button===2||h;(!i.modal||v)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});LO.displayName=DO;var iU="DropdownMenuGroup",sU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Gz,{...i,...o,ref:t})});sU.displayName=iU;var lU="DropdownMenuLabel",cU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(qz,{...i,...o,ref:t})});cU.displayName=lU;var uU="DropdownMenuItem",PO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Zz,{...i,...o,ref:t})});PO.displayName=uU;var dU="DropdownMenuCheckboxItem",fU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Yz,{...i,...o,ref:t})});fU.displayName=dU;var hU="DropdownMenuRadioGroup",pU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Kz,{...i,...o,ref:t})});pU.displayName=hU;var mU="DropdownMenuRadioItem",vU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Wz,{...i,...o,ref:t})});vU.displayName=mU;var gU="DropdownMenuItemIndicator",yU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Qz,{...i,...o,ref:t})});yU.displayName=gU;var bU="DropdownMenuSeparator",kO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Xz,{...i,...o,ref:t})});kO.displayName=bU;var _U="DropdownMenuArrow",EU=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(Jz,{...i,...o,ref:t})});EU.displayName=_U;var SU=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:i,defaultOpen:l}=e,c=Pn(t),[d,f]=_c({prop:o,defaultProp:l??!1,onChange:i,caller:"DropdownMenuSub"});return b.jsx(eU,{...c,open:d,onOpenChange:f,children:n})},wU="DropdownMenuSubTrigger",jO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(tU,{...i,...o,ref:t})});jO.displayName=wU;var xU="DropdownMenuSubContent",zO=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Pn(n);return b.jsx(nU,{...i,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});zO.displayName=xU;var RU=CO,OU=MO,TU=NO,AU=LO,CU=PO,MH=kO,NH=SU,DH=jO,LH=zO,IU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oc=IU.reduce((e,t)=>{const n=q2(`Primitive.${t}`),o=E.forwardRef((i,l)=>{const{asChild:c,...d}=i,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(f,{...d,ref:l})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),MU="Label",UO=E.forwardRef((e,t)=>b.jsx(Oc.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));UO.displayName=MU;var NU=UO;function DU(e,t=[]){let n=[];function o(l,c){const d=E.createContext(c);d.displayName=l+"Context";const f=n.length;n=[...n,c];const h=p=>{const{scope:y,children:_,...S}=p,w=y?.[e]?.[f]||d,T=E.useMemo(()=>S,Object.values(S));return b.jsx(w.Provider,{value:T,children:_})};h.displayName=l+"Provider";function v(p,y){const _=y?.[e]?.[f]||d,S=E.useContext(_);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[h,v]}const i=()=>{const l=n.map(c=>E.createContext(c));return function(d){const f=d?.[e]||l;return E.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return i.scopeName=e,[o,LU(i,...t)]}function LU(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const c=o.reduce((d,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...d,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var PU=Gw();function kU(){return PU.useSyncExternalStore(jU,()=>!0,()=>!1)}function jU(){return()=>{}}var l0="Avatar",[zU]=DU(l0),[UU,BO]=zU(l0),FO=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[i,l]=E.useState("idle");return b.jsx(UU,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:l,children:b.jsx(Oc.span,{...o,ref:t})})});FO.displayName=l0;var $O="AvatarImage",VO=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:i=()=>{},...l}=e,c=BO($O,n),d=BU(o,l),f=Wr(h=>{i(h),c.onImageLoadingStatusChange(h)});return Kr(()=>{d!=="idle"&&f(d)},[d,f]),d==="loaded"?b.jsx(Oc.img,{...l,ref:t,src:o}):null});VO.displayName=$O;var HO="AvatarFallback",GO=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...i}=e,l=BO(HO,n),[c,d]=E.useState(o===void 0);return E.useEffect(()=>{if(o!==void 0){const f=window.setTimeout(()=>d(!0),o);return()=>window.clearTimeout(f)}},[o]),c&&l.imageLoadingStatus!=="loaded"?b.jsx(Oc.span,{...i,ref:t}):null});GO.displayName=HO;function NS(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function BU(e,{referrerPolicy:t,crossOrigin:n}){const o=kU(),i=E.useRef(null),l=o?(i.current||(i.current=new window.Image),i.current):null,[c,d]=E.useState(()=>NS(l,e));return Kr(()=>{d(NS(l,e))},[l,e]),Kr(()=>{const f=p=>()=>{d(p)};if(!l)return;const h=f("loaded"),v=f("error");return l.addEventListener("load",h),l.addEventListener("error",v),t&&(l.referrerPolicy=t),typeof n=="string"&&(l.crossOrigin=n),()=>{l.removeEventListener("load",h),l.removeEventListener("error",v)}},[l,n,t]),c}var FU=FO,$U=VO,VU=GO;function HU(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function c0(e,t,n=""){const o=HU(e),i=e?.length;if(!o||t!==void 0){const c=n&&`"${n}" `,d="",f=o?`length=${i}`:`type=${typeof e}`;throw new Error(c+"expected Uint8Array"+d+", got "+f)}return e}function DS(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function GU(e,t){c0(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function zv(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function jm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ao(e,t){return e<<32-t|e>>>t}const qU=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ZU=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function YU(e){if(c0(e),qU)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=ZU[e[n]];return t}function KU(e,t={}){const n=(i,l)=>e(l).update(i).digest(),o=e(void 0);return n.outputLen=o.outputLen,n.blockLen=o.blockLen,n.create=i=>e(i),Object.assign(n,t),Object.freeze(n)}const WU=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function QU(e,t,n){return e&t^~e&n}function XU(e,t,n){return e&t^e&n^t&n}class JU{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,o,i){this.blockLen=t,this.outputLen=n,this.padOffset=o,this.isLE=i,this.buffer=new Uint8Array(t),this.view=jm(this.buffer)}update(t){DS(this),c0(t);const{view:n,buffer:o,blockLen:i}=this,l=t.length;for(let c=0;c<l;){const d=Math.min(i-this.pos,l-c);if(d===i){const f=jm(t);for(;i<=l-c;c+=i)this.process(f,c);continue}o.set(t.subarray(c,c+d),this.pos),this.pos+=d,c+=d,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){DS(this),GU(t,this),this.finished=!0;const{buffer:n,view:o,blockLen:i,isLE:l}=this;let{pos:c}=this;n[c++]=128,zv(this.buffer.subarray(c)),this.padOffset>i-c&&(this.process(o,0),c=0);for(let p=c;p<i;p++)n[p]=0;o.setBigUint64(i-8,BigInt(this.length*8),l),this.process(o,0);const d=jm(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const h=f/4,v=this.get();if(h>v.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<h;p++)d.setUint32(4*p,v[p],l)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const o=t.slice(0,n);return this.destroy(),o}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:n,buffer:o,length:i,finished:l,destroyed:c,pos:d}=this;return t.destroyed=c,t.finished=l,t.length=i,t.pos=d,i%n&&t.buffer.set(o),t}clone(){return this._cloneInto()}}const ba=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),eB=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),_a=new Uint32Array(64);class tB extends JU{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:o,D:i,E:l,F:c,G:d,H:f}=this;return[t,n,o,i,l,c,d,f]}set(t,n,o,i,l,c,d,f){this.A=t|0,this.B=n|0,this.C=o|0,this.D=i|0,this.E=l|0,this.F=c|0,this.G=d|0,this.H=f|0}process(t,n){for(let p=0;p<16;p++,n+=4)_a[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const y=_a[p-15],_=_a[p-2],S=ao(y,7)^ao(y,18)^y>>>3,w=ao(_,17)^ao(_,19)^_>>>10;_a[p]=w+_a[p-7]+S+_a[p-16]|0}let{A:o,B:i,C:l,D:c,E:d,F:f,G:h,H:v}=this;for(let p=0;p<64;p++){const y=ao(d,6)^ao(d,11)^ao(d,25),_=v+y+QU(d,f,h)+eB[p]+_a[p]|0,w=(ao(o,2)^ao(o,13)^ao(o,22))+XU(o,i,l)|0;v=h,h=f,f=d,d=c+_|0,c=l,l=i,i=o,o=_+w|0}o=o+this.A|0,i=i+this.B|0,l=l+this.C|0,c=c+this.D|0,d=d+this.E|0,f=f+this.F|0,h=h+this.G|0,v=v+this.H|0,this.set(o,i,l,c,d,f,h,v)}roundClean(){zv(_a)}destroy(){this.set(0,0,0,0,0,0,0,0),zv(this.buffer)}}class nB extends tB{A=ba[0]|0;B=ba[1]|0;C=ba[2]|0;D=ba[3]|0;E=ba[4]|0;F=ba[5]|0;G=ba[6]|0;H=ba[7]|0;constructor(){super(32)}}const rB=KU(()=>new nB,WU(1));function oB(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Df="Checkbox",[aB]=wi(Df),[iB,u0]=aB(Df);function sB(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:i,disabled:l,form:c,name:d,onCheckedChange:f,required:h,value:v="on",internal_do_not_use_render:p}=e,[y,_]=_c({prop:n,defaultProp:i??!1,onChange:f,caller:Df}),[S,w]=E.useState(null),[T,O]=E.useState(null),A=E.useRef(!1),C=S?!!c||!!S.closest("form"):!0,R={checked:y,disabled:l,setChecked:_,control:S,setControl:w,name:d,form:c,value:v,hasConsumerStoppedPropagationRef:A,required:h,defaultChecked:Ma(i)?!1:i,isFormControl:C,bubbleInput:T,setBubbleInput:O};return b.jsx(iB,{scope:t,...R,children:lB(p)?p(R):o})}var qO="CheckboxTrigger",ZO=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},i)=>{const{control:l,value:c,disabled:d,checked:f,required:h,setControl:v,setChecked:p,hasConsumerStoppedPropagationRef:y,isFormControl:_,bubbleInput:S}=u0(qO,e),w=dn(i,v),T=E.useRef(f);return E.useEffect(()=>{const O=l?.form;if(O){const A=()=>p(T.current);return O.addEventListener("reset",A),()=>O.removeEventListener("reset",A)}},[l,p]),b.jsx(Ut.button,{type:"button",role:"checkbox","aria-checked":Ma(f)?"mixed":f,"aria-required":h,"data-state":JO(f),"data-disabled":d?"":void 0,disabled:d,value:c,...o,ref:w,onKeyDown:Ge(t,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:Ge(n,O=>{p(A=>Ma(A)?!0:!A),S&&_&&(y.current=O.isPropagationStopped(),y.current||O.stopPropagation())})})});ZO.displayName=qO;var YO=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:i,defaultChecked:l,required:c,disabled:d,value:f,onCheckedChange:h,form:v,...p}=e;return b.jsx(sB,{__scopeCheckbox:n,checked:i,defaultChecked:l,disabled:d,required:c,onCheckedChange:h,name:o,form:v,value:f,internal_do_not_use_render:({isFormControl:y})=>b.jsxs(b.Fragment,{children:[b.jsx(ZO,{...p,ref:t,__scopeCheckbox:n}),y&&b.jsx(XO,{__scopeCheckbox:n})]})})});YO.displayName=Df;var KO="CheckboxIndicator",WO=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...i}=e,l=u0(KO,n);return b.jsx(Go,{present:o||Ma(l.checked)||l.checked===!0,children:b.jsx(Ut.span,{"data-state":JO(l.checked),"data-disabled":l.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});WO.displayName=KO;var QO="CheckboxBubbleInput",XO=E.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:i,checked:l,defaultChecked:c,required:d,disabled:f,name:h,value:v,form:p,bubbleInput:y,setBubbleInput:_}=u0(QO,e),S=dn(n,_),w=oB(l),T=UR(o);E.useEffect(()=>{const A=y;if(!A)return;const C=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(C,"checked").set,k=!i.current;if(w!==l&&I){const D=new Event("click",{bubbles:k});A.indeterminate=Ma(l),I.call(A,Ma(l)?!1:l),A.dispatchEvent(D)}},[y,w,l,i]);const O=E.useRef(Ma(l)?!1:l);return b.jsx(Ut.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??O.current,required:d,disabled:f,name:h,value:v,form:p,...t,tabIndex:-1,ref:S,style:{...t.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});XO.displayName=QO;function lB(e){return typeof e=="function"}function Ma(e){return e==="indeterminate"}function JO(e){return Ma(e)?"indeterminate":e?"checked":"unchecked"}var eT={OBJECT:"object",UNDEFINED:"undefined"},cd="browser",LS="cpu",PS="device",zm="engine",ud="os",wa="name",af="type",Uv="vendor",Hr="version",Bv="architecture",Fv="major",$v="model",cB="console",uB="mobile",dB="tablet",fB="smarttv",hB="wearable",pB="embedded",mB=typeof window!==eT.UNDEFINED,Um=mB&&window.navigator?window.navigator:void 0;Um&&Um.userAgentData&&Um.userAgentData;var Lf=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},dd=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==eT.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return dd.call(e.init,[[cd,[wa,Hr,Fv,af]],[LS,[Bv]],[PS,[af,$v,Uv]],[zm,[wa,Hr]],[ud,[wa,Hr]]]),dd.call(e.isIgnore,[[cd,[Hr,Fv]],[zm,[Hr]],[ud,[Hr]]]),dd.call(e.isIgnoreRgx,[[cd,/ ?browser$/i],[ud,/ ?os$/i]]),dd.call(e.toString,[[cd,[wa,Hr]],[LS,[Bv]],[PS,[Uv,$v]],[zm,[wa,Hr]],[ud,[wa,Hr]]]),e})();Lf([wa,Hr,Fv,af]);Lf([Bv]);Lf([$v,Uv,af,cB,uB,fB,dB,hB,pB]);Lf([wa,Hr]);function vB(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const tT=V.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Tc=()=>{const e=V.useContext(tT);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};vB(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
106
106
|
[data-state=closed]
|
|
107
|
-
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function gB(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function yB(){return d0(/^Mac/)}function bB(){return d0(/^iPhone/)}function kS(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function _B(){return d0(/^iPad/)||yB()&&navigator.maxTouchPoints>1}function nT(){return bB()||_B()}function d0(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const EB=24,SB=typeof window<"u"?E.useLayoutEffect:E.useEffect;function jS(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Bm=typeof document<"u"&&window.visualViewport;function zS(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function rT(e){for(zS(e)&&(e=e.parentElement);e&&!zS(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const wB=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let dd=0,Fm;function xB(e={}){let{isDisabled:t}=e;SB(()=>{if(!t)return dd++,dd===1&&nT()&&(Fm=RB()),()=>{dd--,dd===0&&Fm?.()}},[t])}function RB(){let e,t=0,n=p=>{e=rT(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},o=p=>{if(!e||e===document.documentElement||e===document.body){p.preventDefault();return}let y=p.changedTouches[0].pageY,_=e.scrollTop,S=e.scrollHeight-e.clientHeight;S!==0&&((_<=0&&y>t||_>=S&&y<t)&&p.preventDefault(),t=y)},i=p=>{let y=p.target;Vv(y)&&y!==document.activeElement&&(p.preventDefault(),y.style.transform="translateY(-2000px)",y.focus(),requestAnimationFrame(()=>{y.style.transform=""}))},l=p=>{let y=p.target;Vv(y)&&(y.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{y.style.transform="",Bm&&(Bm.height<window.innerHeight?requestAnimationFrame(()=>{US(y)}):Bm.addEventListener("resize",()=>US(y),{once:!0}))}))},c=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset,h=jS(OB(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let v=jS(Ul(document,"touchstart",n,{passive:!1,capture:!0}),Ul(document,"touchmove",o,{passive:!1,capture:!0}),Ul(document,"touchend",i,{passive:!1,capture:!0}),Ul(document,"focus",l,!0),Ul(window,"scroll",c));return()=>{h(),v(),window.scrollTo(d,f)}}function OB(e,t,n){let o=e.style[t];return e.style[t]=n,()=>{e.style[t]=o}}function Ul(e,t,n,o){return e.addEventListener(t,n,o),()=>{e.removeEventListener(t,n,o)}}function US(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=rT(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let o=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top,l=e.getBoundingClientRect().bottom;const c=n.getBoundingClientRect().bottom+EB;l>c&&(n.scrollTop+=i-o)}e=n.parentElement}}function Vv(e){return e instanceof HTMLInputElement&&!wB.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function TB(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function AB(...e){return t=>e.forEach(n=>TB(n,t))}function oT(...e){return E.useCallback(AB(...e),e)}const aT=new WeakMap;function cn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let o={};Object.entries(t).forEach(([i,l])=>{if(i.startsWith("--")){e.style.setProperty(i,l);return}o[i]=e.style[i],e.style[i]=l}),!n&&aT.set(e,o)}function CB(e,t){if(!e||!(e instanceof HTMLElement))return;let n=aT.get(e);n&&(e.style[t]=n[t])}const nn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function fd(e,t){if(!e)return null;const n=window.getComputedStyle(e),o=n.transform||n.webkitTransform||n.mozTransform;let i=o.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[nn(t)?13:12]):(i=o.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[nn(t)?5:4]):null)}function IB(e){return 8*(Math.log(e+1)-2)}function $m(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function MB(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const kt={DURATION:.5,EASE:[.32,.72,0,1]},iT=.4,NB=.25,DB=100,sT=8,ai=16,Hv=26,Vm="vaul-dragging";function lT(e){const t=V.useRef(e);return V.useEffect(()=>{t.current=e}),V.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function LB({defaultProp:e,onChange:t}){const n=V.useState(e),[o]=n,i=V.useRef(o),l=lT(t);return V.useEffect(()=>{i.current!==o&&(l(o),i.current=o)},[o,i,l]),n}function cT({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,i]=LB({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o,d=lT(n),f=V.useCallback(h=>{if(l){const p=typeof h=="function"?h(e):h;p!==e&&d(p)}else i(h)},[l,e,i,d]);return[c,f]}function PB({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:o,overlayRef:i,fadeFromIndex:l,onSnapPointChange:c,direction:d="bottom",container:f,snapToSequentialPoint:h}){const[v,p]=cT({prop:e,defaultProp:n?.[0],onChange:t}),[y,_]=V.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);V.useEffect(()=>{function D(){_({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]);const S=V.useMemo(()=>v===n?.[n.length-1]||null,[n,v]),w=V.useMemo(()=>{var D;return(D=n?.findIndex(N=>N===v))!=null?D:null},[n,v]),T=n&&n.length>0&&(l||l===0)&&!Number.isNaN(l)&&n[l]===v||!n,O=V.useMemo(()=>{const D=f?{width:f.getBoundingClientRect().width,height:f.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var N;return(N=n?.map(z=>{const W=typeof z=="string";let $=0;if(W&&($=parseInt(z,10)),nn(d)){const j=W?$:y?z*D.height:0;return y?d==="bottom"?D.height-j:-D.height+j:j}const q=W?$:y?z*D.width:0;return y?d==="right"?D.width-q:-D.width+q:q}))!=null?N:[]},[n,y,f]),A=V.useMemo(()=>w!==null?O?.[w]:null,[O,w]),C=V.useCallback(D=>{var N;const z=(N=O?.findIndex(W=>W===D))!=null?N:null;c(z),cn(o.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:nn(d)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`}),O&&z!==O.length-1&&l!==void 0&&z!==l&&z<l?cn(i.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"0"}):cn(i.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"1"}),p(n?.[Math.max(z,0)])},[o.current,n,O,l,i,p]);V.useEffect(()=>{if(v||e){var D;const N=(D=n?.findIndex(z=>z===e||z===v))!=null?D:-1;O&&N!==-1&&typeof O[N]=="number"&&C(O[N])}},[v,e,n,O,C]);function R({draggedDistance:D,closeDrawer:N,velocity:z,dismissible:W}){if(l===void 0)return;const $=d==="bottom"||d==="right"?(A??0)-D:(A??0)+D,q=w===l-1,j=w===0,X=D>0;if(q&&cn(i.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`}),!h&&z>2&&!X){W?N():C(O[0]);return}if(!h&&z>2&&X&&O&&n){C(O[n.length-1]);return}const oe=O?.reduce((F,G)=>typeof F!="number"||typeof G!="number"?F:Math.abs(G-$)<Math.abs(F-$)?G:F),L=nn(d)?window.innerHeight:window.innerWidth;if(z>iT&&Math.abs(D)<L*.4){const F=X?1:-1;if(F>0&&S&&n){C(O[n.length-1]);return}if(j&&F<0&&W&&N(),w===null)return;C(O[w+F]);return}C(oe)}function I({draggedDistance:D}){if(A===null)return;const N=d==="bottom"||d==="right"?A-D:A+D;(d==="bottom"||d==="right")&&N<O[O.length-1]||(d==="top"||d==="left")&&N>O[O.length-1]||cn(o.current,{transform:nn(d)?`translate3d(0, ${N}px, 0)`:`translate3d(${N}px, 0, 0)`})}function k(D,N){if(!n||typeof w!="number"||!O||l===void 0)return null;const z=w===l-1;if(w>=l&&N)return 0;if(z&&!N)return 1;if(!T&&!z)return null;const $=z?w+1:w-1,q=z?O[$]-O[$-1]:O[$+1]-O[$],j=D/Math.abs(q);return z?1-j:j}return{isLastSnapPoint:S,activeSnapPoint:v,shouldFade:T,getPercentageDragged:k,setActiveSnapPoint:p,activeSnapPointIndex:w,onRelease:R,onDrag:I,snapPointsOffset:O}}const kB=()=>()=>{};function jB(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:o,noBodyStyles:i}=Oc(),l=V.useRef(null),c=E.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-Hv)/window.innerWidth}V.useEffect(()=>{if(t&&n){l.current&&clearTimeout(l.current);const f=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!f)return;MB(o&&!i?$m(document.body,{background:"black"}):kB,$m(f,{transformOrigin:nn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kt.EASE.join(",")})`}));const h=$m(f,{borderRadius:`${sT}px`,overflow:"hidden",...nn(e)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{h(),l.current=window.setTimeout(()=>{c?document.body.style.background=c:document.body.style.removeProperty("background")},kt.DURATION*1e3)}}},[t,n,c])}let Bl=null;function zB({isOpen:e,modal:t,nested:n,hasBeenOpened:o,preventScrollRestoration:i,noBodyStyles:l}){const[c,d]=V.useState(()=>typeof window<"u"?window.location.href:""),f=V.useRef(0),h=V.useCallback(()=>{if(kS()&&Bl===null&&e&&!l){Bl={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:p,innerHeight:y}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-p}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const _=y-window.innerHeight;_&&f.current>=y&&(document.body.style.top=`${-(f.current+_)}px`)}),300)}},[e]),v=V.useCallback(()=>{if(kS()&&Bl!==null&&!l){const p=-parseInt(document.body.style.top,10),y=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Bl),window.requestAnimationFrame(()=>{if(i&&c!==window.location.href){d(window.location.href);return}window.scrollTo(y,p)}),Bl=null}},[c]);return V.useEffect(()=>{function p(){f.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),V.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||v()}},[t,v]),V.useEffect(()=>{n||!o||(e?(!window.matchMedia("(display-mode: standalone)").matches&&h(),t||window.setTimeout(()=>{v()},500)):v())},[e,o,c,t,n,h,v]),{restorePositionSetting:v}}function UB({open:e,onOpenChange:t,children:n,onDrag:o,onRelease:i,snapPoints:l,shouldScaleBackground:c=!1,setBackgroundColorOnScale:d=!0,closeThreshold:f=NB,scrollLockTimeout:h=DB,dismissible:v=!0,handleOnly:p=!1,fadeFromIndex:y=l&&l.length-1,activeSnapPoint:_,setActiveSnapPoint:S,fixed:w,modal:T=!0,onClose:O,nested:A,noBodyStyles:C=!1,direction:R="bottom",defaultOpen:I=!1,disablePreventScroll:k=!0,snapToSequentialPoint:D=!1,preventScrollRestoration:N=!1,repositionInputs:z=!0,onAnimationEnd:W,container:$,autoFocus:q=!1}){var j,X;const[oe=!1,L]=cT({defaultProp:I,prop:e,onChange:Ie=>{t?.(Ie),!Ie&&!A&&xe(),setTimeout(()=>{W?.(Ie)},kt.DURATION*1e3),Ie&&!T&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Ie||(document.body.style.pointerEvents="auto")}}),[F,G]=V.useState(!1),[re,ye]=V.useState(!1),[P,Q]=V.useState(!1),te=V.useRef(null),se=V.useRef(null),me=V.useRef(null),_e=V.useRef(null),be=V.useRef(null),Se=V.useRef(!1),De=V.useRef(null),Le=V.useRef(0),Ee=V.useRef(!1),ze=V.useRef(!I),Nt=V.useRef(0),ge=V.useRef(null),ve=V.useRef(((j=ge.current)==null?void 0:j.getBoundingClientRect().height)||0),Re=V.useRef(((X=ge.current)==null?void 0:X.getBoundingClientRect().width)||0),ke=V.useRef(0),et=V.useCallback(Ie=>{l&&Ie===Y.length-1&&(se.current=new Date)},[]),{activeSnapPoint:Ue,activeSnapPointIndex:Qe,setActiveSnapPoint:U,onRelease:Z,snapPointsOffset:Y,onDrag:ue,shouldFade:pe,getPercentageDragged:he}=PB({snapPoints:l,activeSnapPointProp:_,setActiveSnapPointProp:S,drawerRef:ge,fadeFromIndex:y,overlayRef:te,onSnapPointChange:et,direction:R,container:$,snapToSequentialPoint:D});xB({isDisabled:!oe||re||!T||P||!F||!z||!k});const{restorePositionSetting:xe}=zB({isOpen:oe,modal:T,nested:A??!1,hasBeenOpened:F,preventScrollRestoration:N,noBodyStyles:C});function Be(){return(window.innerWidth-Hv)/window.innerWidth}function Ze(Ie){var tt,it;!v&&!l||ge.current&&!ge.current.contains(Ie.target)||(ve.current=((tt=ge.current)==null?void 0:tt.getBoundingClientRect().height)||0,Re.current=((it=ge.current)==null?void 0:it.getBoundingClientRect().width)||0,ye(!0),me.current=new Date,nT()&&window.addEventListener("touchend",()=>Se.current=!1,{once:!0}),Ie.target.setPointerCapture(Ie.pointerId),Le.current=nn(R)?Ie.pageY:Ie.pageX)}function ft(Ie,tt){var it;let Ye=Ie;const st=(it=window.getSelection())==null?void 0:it.toString(),Me=ge.current?fd(ge.current,R):null,Ke=new Date;if(Ye.tagName==="SELECT"||Ye.hasAttribute("data-vaul-no-drag")||Ye.closest("[data-vaul-no-drag]"))return!1;if(R==="right"||R==="left")return!0;if(se.current&&Ke.getTime()-se.current.getTime()<500)return!1;if(Me!==null&&(R==="bottom"?Me>0:Me<0))return!0;if(st&&st.length>0)return!1;if(be.current&&Ke.getTime()-be.current.getTime()<h&&Me===0||tt)return be.current=Ke,!1;for(;Ye;){if(Ye.scrollHeight>Ye.clientHeight){if(Ye.scrollTop!==0)return be.current=new Date,!1;if(Ye.getAttribute("role")==="dialog")return!0}Ye=Ye.parentNode}return!0}function Mn(Ie){if(ge.current&&re){const tt=R==="bottom"||R==="right"?1:-1,it=(Le.current-(nn(R)?Ie.pageY:Ie.pageX))*tt,Ye=it>0,st=l&&!v&&!Ye;if(st&&Qe===0)return;const Me=Math.abs(it),Ke=document.querySelector("[data-vaul-drawer-wrapper]"),xt=R==="bottom"||R==="top"?ve.current:Re.current;let bt=Me/xt;const Nn=he(Me,Ye);if(Nn!==null&&(bt=Nn),st&&bt>=1||!Se.current&&!ft(Ie.target,Ye))return;if(ge.current.classList.add(Vm),Se.current=!0,cn(ge.current,{transition:"none"}),cn(te.current,{transition:"none"}),l&&ue({draggedDistance:it}),Ye&&!l){const Ct=IB(it),br=Math.min(Ct*-1,0)*tt;cn(ge.current,{transform:nn(R)?`translate3d(0, ${br}px, 0)`:`translate3d(${br}px, 0, 0)`});return}const lt=1-bt;if((pe||y&&Qe===y-1)&&(o?.(Ie,bt),cn(te.current,{opacity:`${lt}`,transition:"none"},!0)),Ke&&te.current&&c){const Ct=Math.min(Be()+bt*(1-Be()),1),br=8-bt*8,_n=Math.max(0,14-bt*14);cn(Ke,{borderRadius:`${br}px`,transform:nn(R)?`scale(${Ct}) translate3d(0, ${_n}px, 0)`:`scale(${Ct}) translate3d(${_n}px, 0, 0)`,transition:"none"},!0)}if(!l){const Ct=Me*tt;cn(ge.current,{transform:nn(R)?`translate3d(0, ${Ct}px, 0)`:`translate3d(${Ct}px, 0, 0)`})}}}V.useEffect(()=>{window.requestAnimationFrame(()=>{ze.current=!0})},[]),V.useEffect(()=>{var Ie;function tt(){if(!ge.current||!z)return;const it=document.activeElement;if(Vv(it)||Ee.current){var Ye;const st=((Ye=window.visualViewport)==null?void 0:Ye.height)||0,Me=window.innerHeight;let Ke=Me-st;const xt=ge.current.getBoundingClientRect().height||0,bt=xt>Me*.8;ke.current||(ke.current=xt);const Nn=ge.current.getBoundingClientRect().top;if(Math.abs(Nt.current-Ke)>60&&(Ee.current=!Ee.current),l&&l.length>0&&Y&&Qe){const lt=Y[Qe]||0;Ke+=lt}if(Nt.current=Ke,xt>st||Ee.current){const lt=ge.current.getBoundingClientRect().height;let Ct=lt;lt>st&&(Ct=st-(bt?Nn:Hv)),w?ge.current.style.height=`${lt-Math.max(Ke,0)}px`:ge.current.style.height=`${Math.max(Ct,st-Nn)}px`}else gB()||(ge.current.style.height=`${ke.current}px`);l&&l.length>0&&!Ee.current?ge.current.style.bottom="0px":ge.current.style.bottom=`${Math.max(Ke,0)}px`}}return(Ie=window.visualViewport)==null||Ie.addEventListener("resize",tt),()=>{var it;return(it=window.visualViewport)==null?void 0:it.removeEventListener("resize",tt)}},[Qe,l,Y]);function Tt(Ie){At(),O?.(),Ie||L(!1),setTimeout(()=>{l&&U(l[0])},kt.DURATION*1e3)}function Zt(){if(!ge.current)return;const Ie=document.querySelector("[data-vaul-drawer-wrapper]"),tt=fd(ge.current,R);cn(ge.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`}),cn(te.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"1"}),c&&tt&&tt>0&&oe&&cn(Ie,{borderRadius:`${sT}px`,overflow:"hidden",...nn(R)?{transform:`scale(${Be()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Be()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kt.EASE.join(",")})`},!0)}function At(){!re||!ge.current||(ge.current.classList.remove(Vm),Se.current=!1,ye(!1),_e.current=new Date)}function an(Ie){if(!re||!ge.current)return;ge.current.classList.remove(Vm),Se.current=!1,ye(!1),_e.current=new Date;const tt=fd(ge.current,R);if(!Ie||!ft(Ie.target,!1)||!tt||Number.isNaN(tt)||me.current===null)return;const it=_e.current.getTime()-me.current.getTime(),Ye=Le.current-(nn(R)?Ie.pageY:Ie.pageX),st=Math.abs(Ye)/it;if(st>.05&&(Q(!0),setTimeout(()=>{Q(!1)},200)),l){Z({draggedDistance:Ye*(R==="bottom"||R==="right"?1:-1),closeDrawer:Tt,velocity:st,dismissible:v}),i?.(Ie,!0);return}if(R==="bottom"||R==="right"?Ye>0:Ye<0){Zt(),i?.(Ie,!0);return}if(st>iT){Tt(),i?.(Ie,!1);return}var Me;const Ke=Math.min((Me=ge.current.getBoundingClientRect().height)!=null?Me:0,window.innerHeight);var xt;const bt=Math.min((xt=ge.current.getBoundingClientRect().width)!=null?xt:0,window.innerWidth),Nn=R==="left"||R==="right";if(Math.abs(tt)>=(Nn?bt:Ke)*f){Tt(),i?.(Ie,!1);return}i?.(Ie,!0),Zt()}V.useEffect(()=>(oe&&(cn(document.documentElement,{scrollBehavior:"auto"}),se.current=new Date),()=>{CB(document.documentElement,"scrollBehavior")}),[oe]);function Yt(Ie){const tt=Ie?(window.innerWidth-ai)/window.innerWidth:1,it=Ie?-ai:0;De.current&&window.clearTimeout(De.current),cn(ge.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:nn(R)?`scale(${tt}) translate3d(0, ${it}px, 0)`:`scale(${tt}) translate3d(${it}px, 0, 0)`}),!Ie&&ge.current&&(De.current=setTimeout(()=>{const Ye=fd(ge.current,R);cn(ge.current,{transition:"none",transform:nn(R)?`translate3d(0, ${Ye}px, 0)`:`translate3d(${Ye}px, 0, 0)`})},500))}function qo(Ie,tt){if(tt<0)return;const it=(window.innerWidth-ai)/window.innerWidth,Ye=it+tt*(1-it),st=-ai+tt*ai;cn(ge.current,{transform:nn(R)?`scale(${Ye}) translate3d(0, ${st}px, 0)`:`scale(${Ye}) translate3d(${st}px, 0, 0)`,transition:"none"})}function _o(Ie,tt){const it=nn(R)?window.innerHeight:window.innerWidth,Ye=tt?(it-ai)/it:1,st=tt?-ai:0;tt&&cn(ge.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:nn(R)?`scale(${Ye}) translate3d(0, ${st}px, 0)`:`scale(${Ye}) translate3d(${st}px, 0, 0)`})}return V.useEffect(()=>{T||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[T]),V.createElement(Aj,{defaultOpen:I,onOpenChange:Ie=>{!v&&!Ie||(Ie?G(!0):Tt(!0),L(Ie))},open:oe},V.createElement(tT.Provider,{value:{activeSnapPoint:Ue,snapPoints:l,setActiveSnapPoint:U,drawerRef:ge,overlayRef:te,onOpenChange:t,onPress:Ze,onRelease:an,onDrag:Mn,dismissible:v,shouldAnimate:ze,handleOnly:p,isOpen:oe,isDragging:re,shouldFade:pe,closeDrawer:Tt,onNestedDrag:qo,onNestedOpenChange:Yt,onNestedRelease:_o,keyboardIsOpen:Ee,modal:T,snapPointsOffset:Y,activeSnapPointIndex:Qe,direction:R,shouldScaleBackground:c,setBackgroundColorOnScale:d,noBodyStyles:C,container:$,autoFocus:q}},n))}const uT=V.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:o,onRelease:i,shouldFade:l,isOpen:c,modal:d,shouldAnimate:f}=Oc(),h=oT(t,n),v=o&&o.length>0;if(!d)return null;const p=V.useCallback(y=>i(y),[i]);return V.createElement(Mj,{onMouseUp:p,ref:h,"data-vaul-overlay":"","data-vaul-snap-points":c&&v?"true":"false","data-vaul-snap-points-overlay":c&&l?"true":"false","data-vaul-animate":f?.current?"true":"false",...e})});uT.displayName="Drawer.Overlay";const dT=V.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...o},i){const{drawerRef:l,onPress:c,onRelease:d,onDrag:f,keyboardIsOpen:h,snapPointsOffset:v,activeSnapPointIndex:p,modal:y,isOpen:_,direction:S,snapPoints:w,container:T,handleOnly:O,shouldAnimate:A,autoFocus:C}=Oc(),[R,I]=V.useState(!1),k=oT(i,l),D=V.useRef(null),N=V.useRef(null),z=V.useRef(!1),W=w&&w.length>0;jB();const $=(j,X,oe=0)=>{if(z.current)return!0;const L=Math.abs(j.y),F=Math.abs(j.x),G=F>L,re=["bottom","right"].includes(X)?1:-1;if(X==="left"||X==="right"){if(!(j.x*re<0)&&F>=0&&F<=oe)return G}else if(!(j.y*re<0)&&L>=0&&L<=oe)return!G;return z.current=!0,!0};V.useEffect(()=>{W&&window.requestAnimationFrame(()=>{I(!0)})},[]);function q(j){D.current=null,z.current=!1,d(j)}return V.createElement(Nj,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":R?"true":"false","data-vaul-snap-points":_&&W?"true":"false","data-vaul-custom-container":T?"true":"false","data-vaul-animate":A?.current?"true":"false",...o,ref:k,style:v&&v.length>0?{"--snap-point-height":`${v[p??0]}px`,...t}:t,onPointerDown:j=>{O||(o.onPointerDown==null||o.onPointerDown.call(o,j),D.current={x:j.pageX,y:j.pageY},c(j))},onOpenAutoFocus:j=>{n?.(j),C||j.preventDefault()},onPointerDownOutside:j=>{if(e?.(j),!y||j.defaultPrevented){j.preventDefault();return}h.current&&(h.current=!1)},onFocusOutside:j=>{if(!y){j.preventDefault();return}},onPointerMove:j=>{if(N.current=j,O||(o.onPointerMove==null||o.onPointerMove.call(o,j),!D.current))return;const X=j.pageY-D.current.y,oe=j.pageX-D.current.x,L=j.pointerType==="touch"?10:2;$({x:oe,y:X},S,L)?f(j):(Math.abs(oe)>L||Math.abs(X)>L)&&(D.current=null)},onPointerUp:j=>{o.onPointerUp==null||o.onPointerUp.call(o,j),D.current=null,z.current=!1,d(j)},onPointerOut:j=>{o.onPointerOut==null||o.onPointerOut.call(o,j),q(N.current)},onContextMenu:j=>{o.onContextMenu==null||o.onContextMenu.call(o,j),N.current&&q(N.current)}})});dT.displayName="Drawer.Content";const BB=250,FB=120,$B=V.forwardRef(function({preventCycle:e=!1,children:t,...n},o){const{closeDrawer:i,isDragging:l,snapPoints:c,activeSnapPoint:d,setActiveSnapPoint:f,dismissible:h,handleOnly:v,isOpen:p,onPress:y,onDrag:_}=Oc(),S=V.useRef(null),w=V.useRef(!1);function T(){if(w.current){C();return}window.setTimeout(()=>{O()},FB)}function O(){if(l||e||w.current){C();return}if(C(),!c||c.length===0){h||i();return}if(d===c[c.length-1]&&h){i();return}const I=c.findIndex(D=>D===d);if(I===-1)return;const k=c[I+1];f(k)}function A(){S.current=window.setTimeout(()=>{w.current=!0},BB)}function C(){S.current&&window.clearTimeout(S.current),w.current=!1}return V.createElement("div",{onClick:T,onPointerCancel:C,onPointerDown:R=>{v&&y(R),A()},onPointerMove:R=>{v&&_(R)},ref:o,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},V.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});$B.displayName="Drawer.Handle";function VB(e){const t=Oc(),{container:n=t.container,...o}=e;return V.createElement(Ij,{container:n,...o})}const LH={Root:UB,Content:dT,Overlay:uT,Trigger:Cj,Portal:VB,Title:Dj};var As=(e,t,n)=>new Promise((o,i)=>{var l=f=>{try{d(n.next(f))}catch(h){i(h)}},c=f=>{try{d(n.throw(f))}catch(h){i(h)}},d=f=>f.done?o(f.value):Promise.resolve(f.value).then(l,c);d((n=n.apply(e,t)).next())}),Od=class extends Error{},HB=class extends Error{},GB=e=>Math.exp(e)*150,qB=(e,...t)=>As(void 0,[e,...t],function*(n,{attempts:o=4}={}){var i;let l;for(let c=0;c<o;c++)try{return yield n()}catch(d){l=d,yield new Promise(f=>setTimeout(f,GB(c)))}throw new Od((i=l?.message)!=null?i:"Exhausted all retries")}),Fl,fT="captchaFoxOnLoad",BS=`https://cdn.captchafox.com/api.js?render=explicit&onload=${fT}`;function ZB(){return As(this,arguments,function*({nonce:e}={}){return Fl&&document.querySelector(`script[src="${BS}"]`)||(Fl=new Promise((t,n)=>{window[fT]=t;const o=document.createElement("script");o.src=BS,o.async=!0,o.defer=!0,o.onerror=i=>{o.remove(),Fl=void 0,n(i)},e&&(o.nonce=e),document.body.appendChild(o)})),Fl})}function YB(){return As(this,arguments,function*(e={}){return qB(()=>ZB(e))})}var vs=()=>typeof window?.captchafox<"u",hT=E.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:o,theme:i,className:l,nonce:c,i18n:d,onError:f,onVerify:h,onLoad:v,onFail:p,onClose:y,onChallengeChange:_,onChallengeOpen:S},w)=>{const[T,O]=E.useState(),[A,C]=E.useState(),R=E.useRef(!1),I=E.useRef(),k=E.useRef(),D=E.useRef(),N=E.useRef(!1);E.useImperativeHandle(w,()=>({getResponse(){return!vs()||!A?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(A)},reset(){if(!vs()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(A)},remove(){if(!vs()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}C(void 0),window.captchafox.remove(A)},execute:()=>As(void 0,null,function*(){if(N.current)return Promise.reject(new Od);if(!vs()||!A)return W();try{return yield window.captchafox.execute(A)}catch(j){const X=$(j);return Promise.reject(X)}})}),[A]),E.useEffect(()=>{A&&v?.()},[A]),E.useEffect(()=>()=>{z()},[]),E.useEffect(()=>{T&&(R.current?vs()&&q():YB({nonce:c}).then(()=>As(void 0,null,function*(){vs()&&(R.current=!0,yield q())})).catch(j=>{var X;f?.(j),N.current=!0,(X=D.current)==null||X.call(D),console.error("[CaptchaFox] Could not load script:",j)}))},[T,t,n,o]);const z=()=>{clearTimeout(k.current)},W=()=>new Promise((j,X)=>{D.current=()=>{z(),X(new Od)},k.current=setTimeout(()=>{X(new HB("Execute timed out"))},e*1e3),I.current=oe=>{z(),window.captchafox.execute(oe).then(j).catch(L=>{const F=$(L);X(F)})}}),$=j=>j!=="challenge-aborted"&&j!=="rate-limited"?new Od:j,q=()=>As(void 0,null,function*(){var j,X,oe;if((j=window.captchafox)==null||j.remove(A),!T||((X=T?.children)==null?void 0:X.length)===1)return;const L=yield(oe=window.captchafox)==null?void 0:oe.render(T,{lang:n,sitekey:t,mode:o,theme:i,i18n:d,onError:f,onFail:p,onClose:y,onVerify:h,onChallengeChange:_,onChallengeOpen:S});L&&(C(L),I.current&&(I.current(L),I.current=void 0))});return V.createElement("div",{ref:O,id:A,className:l})});hT.displayName="CaptchaFox";function Mr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gv(e,t){return Gv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Gv(e,t)}function KB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Gv(e,t)}var WB=Object.defineProperty,QB=Object.defineProperties,XB=Object.getOwnPropertyDescriptors,af=Object.getOwnPropertySymbols,pT=Object.prototype.hasOwnProperty,mT=Object.prototype.propertyIsEnumerable,qv=(e,t,n)=>t in e?WB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cr=(e,t)=>{for(var n in t||(t={}))pT.call(t,n)&&qv(e,n,t[n]);if(af)for(var n of af(t))mT.call(t,n)&&qv(e,n,t[n]);return e},vT=(e,t)=>QB(e,XB(t)),JB=(e,t)=>{var n={};for(var o in e)pT.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&af)for(var o of af(e))t.indexOf(o)<0&&mT.call(e,o)&&(n[o]=e[o]);return n},vn=(e,t,n)=>(qv(e,typeof t!="symbol"?t+"":t,n),n),Ls=(e,t,n)=>new Promise((o,i)=>{var l=f=>{try{d(n.next(f))}catch(h){i(h)}},c=f=>{try{d(n.throw(f))}catch(h){i(h)}},d=f=>f.done?o(f.value):Promise.resolve(f.value).then(l,c);d((n=n.apply(e,t)).next())}),eF="hCaptcha-script",Td="hCaptchaOnLoad",FS="script-error",xa="@hCaptcha/loader";function tF(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function gT(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function yT(e){return e||document.head}function nF(e){var t;e.setTag("source",xa),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",cr({},rF())),e.setContext("device",vT(cr({},aF()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((t=screen.orientation)==null?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function rF(){var e,t,n,o,i,l;let c=navigator.userAgent,d,f;return c.indexOf("Firefox")!==-1?(d="Firefox",f=(e=c.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):c.indexOf("Edg")!==-1?(d="Microsoft Edge",f=(t=c.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):c.indexOf("Chrome")!==-1&&c.indexOf("Safari")!==-1?(d="Chrome",f=(n=c.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):c.indexOf("Safari")!==-1&&c.indexOf("Chrome")===-1?(d="Safari",f=(o=c.match(/Version\/([\d.]+)/))==null?void 0:o[1]):c.indexOf("Opera")!==-1||c.indexOf("OPR")!==-1?(d="Opera",f=(i=c.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:i[2]):c.indexOf("MSIE")!==-1||c.indexOf("Trident")!==-1?(d="Internet Explorer",f=(l=c.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:l[2]):(d="Unknown",f="Unknown"),{name:d,version:f}}function oF(e){return new Promise(t=>setTimeout(t,e))}function aF(){let e=navigator.userAgent,t;e.indexOf("Win")!==-1?t="Windows":e.indexOf("Mac")!==-1?t="Mac":e.indexOf("Linux")!==-1?t="Linux":e.indexOf("Android")!==-1?t="Android":e.indexOf("like Mac")!==-1||e.indexOf("iPhone")!==-1||e.indexOf("iPad")!==-1?t="iOS":t="Unknown";let n;return/Mobile|iPhone|iPod|Android/i.test(e)?n="Mobile":/Tablet|iPad/i.test(e)?n="Tablet":n="Desktop",{model:t,family:t,device:n}}var iF=class bT{constructor(t){vn(this,"_parent"),vn(this,"breadcrumbs",[]),vn(this,"context",{}),vn(this,"extra",{}),vn(this,"tags",{}),vn(this,"request"),vn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new bT(this)}setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=cr(cr({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((o,i)=>{var l;return o.breadcrumbs=[...(l=o.breadcrumbs)!=null?l:[],...i.breadcrumbs],o.extra=cr(cr({},o.extra),i.extra),o.contexts=cr(cr({},o.contexts),i.context),o.tags=cr(cr({},o.tags),i.tags),i.user&&(o.user=i.user),i.request&&(o.request=i.request),o},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},sF=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,lF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,cF=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,uF=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,hd="?",$S="An unknown error occurred",dF="0.0.4";function fF(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function Ln(e){return(e+256).toString(16).substring(1)}function hF(){let e=fF(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,Ln(e[0])+Ln(e[1])+Ln(e[2])+Ln(e[3])+"-"+Ln(e[4])+Ln(e[5])+"-"+Ln(e[6])+Ln(e[7])+"-"+Ln(e[8])+Ln(e[9])+"-"+Ln(e[10])+Ln(e[11])+Ln(e[12])+Ln(e[13])+Ln(e[14])+Ln(e[15])}var pF=[[sF,"chrome"],[cF,"winjs"],[lF,"gecko"]];function mF(e){var t,n,o,i;if(!e.stack)return null;let l=[],c=(o=(n=(t=e.stack).split)==null?void 0:n.call(t,`
|
|
108
|
-
`))!=null?o:[];for(let d=0;d<c.length;++d){let f=null,h=null,v=null;for(let[p,y]of pF)if(h=p.exec(c[d]),h){v=y;break}if(!(!h||!v)){if(v==="chrome")f={filename:(i=h[2])!=null&&i.startsWith("address at ")?h[2].substring(11):h[2],function:h[1]||
|
|
107
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function gB(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function yB(){return d0(/^Mac/)}function bB(){return d0(/^iPhone/)}function kS(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function _B(){return d0(/^iPad/)||yB()&&navigator.maxTouchPoints>1}function nT(){return bB()||_B()}function d0(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const EB=24,SB=typeof window<"u"?E.useLayoutEffect:E.useEffect;function jS(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Bm=typeof document<"u"&&window.visualViewport;function zS(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function rT(e){for(zS(e)&&(e=e.parentElement);e&&!zS(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const wB=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let fd=0,Fm;function xB(e={}){let{isDisabled:t}=e;SB(()=>{if(!t)return fd++,fd===1&&nT()&&(Fm=RB()),()=>{fd--,fd===0&&Fm?.()}},[t])}function RB(){let e,t=0,n=p=>{e=rT(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},o=p=>{if(!e||e===document.documentElement||e===document.body){p.preventDefault();return}let y=p.changedTouches[0].pageY,_=e.scrollTop,S=e.scrollHeight-e.clientHeight;S!==0&&((_<=0&&y>t||_>=S&&y<t)&&p.preventDefault(),t=y)},i=p=>{let y=p.target;Vv(y)&&y!==document.activeElement&&(p.preventDefault(),y.style.transform="translateY(-2000px)",y.focus(),requestAnimationFrame(()=>{y.style.transform=""}))},l=p=>{let y=p.target;Vv(y)&&(y.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{y.style.transform="",Bm&&(Bm.height<window.innerHeight?requestAnimationFrame(()=>{US(y)}):Bm.addEventListener("resize",()=>US(y),{once:!0}))}))},c=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset,h=jS(OB(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let v=jS(Ul(document,"touchstart",n,{passive:!1,capture:!0}),Ul(document,"touchmove",o,{passive:!1,capture:!0}),Ul(document,"touchend",i,{passive:!1,capture:!0}),Ul(document,"focus",l,!0),Ul(window,"scroll",c));return()=>{h(),v(),window.scrollTo(d,f)}}function OB(e,t,n){let o=e.style[t];return e.style[t]=n,()=>{e.style[t]=o}}function Ul(e,t,n,o){return e.addEventListener(t,n,o),()=>{e.removeEventListener(t,n,o)}}function US(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=rT(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let o=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top,l=e.getBoundingClientRect().bottom;const c=n.getBoundingClientRect().bottom+EB;l>c&&(n.scrollTop+=i-o)}e=n.parentElement}}function Vv(e){return e instanceof HTMLInputElement&&!wB.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function TB(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function AB(...e){return t=>e.forEach(n=>TB(n,t))}function oT(...e){return E.useCallback(AB(...e),e)}const aT=new WeakMap;function cn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let o={};Object.entries(t).forEach(([i,l])=>{if(i.startsWith("--")){e.style.setProperty(i,l);return}o[i]=e.style[i],e.style[i]=l}),!n&&aT.set(e,o)}function CB(e,t){if(!e||!(e instanceof HTMLElement))return;let n=aT.get(e);n&&(e.style[t]=n[t])}const nn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function hd(e,t){if(!e)return null;const n=window.getComputedStyle(e),o=n.transform||n.webkitTransform||n.mozTransform;let i=o.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[nn(t)?13:12]):(i=o.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[nn(t)?5:4]):null)}function IB(e){return 8*(Math.log(e+1)-2)}function $m(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function MB(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const kt={DURATION:.5,EASE:[.32,.72,0,1]},iT=.4,NB=.25,DB=100,sT=8,ai=16,Hv=26,Vm="vaul-dragging";function lT(e){const t=V.useRef(e);return V.useEffect(()=>{t.current=e}),V.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function LB({defaultProp:e,onChange:t}){const n=V.useState(e),[o]=n,i=V.useRef(o),l=lT(t);return V.useEffect(()=>{i.current!==o&&(l(o),i.current=o)},[o,i,l]),n}function cT({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,i]=LB({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o,d=lT(n),f=V.useCallback(h=>{if(l){const p=typeof h=="function"?h(e):h;p!==e&&d(p)}else i(h)},[l,e,i,d]);return[c,f]}function PB({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:o,overlayRef:i,fadeFromIndex:l,onSnapPointChange:c,direction:d="bottom",container:f,snapToSequentialPoint:h}){const[v,p]=cT({prop:e,defaultProp:n?.[0],onChange:t}),[y,_]=V.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);V.useEffect(()=>{function D(){_({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]);const S=V.useMemo(()=>v===n?.[n.length-1]||null,[n,v]),w=V.useMemo(()=>{var D;return(D=n?.findIndex(N=>N===v))!=null?D:null},[n,v]),T=n&&n.length>0&&(l||l===0)&&!Number.isNaN(l)&&n[l]===v||!n,O=V.useMemo(()=>{const D=f?{width:f.getBoundingClientRect().width,height:f.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var N;return(N=n?.map(z=>{const W=typeof z=="string";let $=0;if(W&&($=parseInt(z,10)),nn(d)){const j=W?$:y?z*D.height:0;return y?d==="bottom"?D.height-j:-D.height+j:j}const q=W?$:y?z*D.width:0;return y?d==="right"?D.width-q:-D.width+q:q}))!=null?N:[]},[n,y,f]),A=V.useMemo(()=>w!==null?O?.[w]:null,[O,w]),C=V.useCallback(D=>{var N;const z=(N=O?.findIndex(W=>W===D))!=null?N:null;c(z),cn(o.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:nn(d)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`}),O&&z!==O.length-1&&l!==void 0&&z!==l&&z<l?cn(i.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"0"}):cn(i.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"1"}),p(n?.[Math.max(z,0)])},[o.current,n,O,l,i,p]);V.useEffect(()=>{if(v||e){var D;const N=(D=n?.findIndex(z=>z===e||z===v))!=null?D:-1;O&&N!==-1&&typeof O[N]=="number"&&C(O[N])}},[v,e,n,O,C]);function R({draggedDistance:D,closeDrawer:N,velocity:z,dismissible:W}){if(l===void 0)return;const $=d==="bottom"||d==="right"?(A??0)-D:(A??0)+D,q=w===l-1,j=w===0,X=D>0;if(q&&cn(i.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`}),!h&&z>2&&!X){W?N():C(O[0]);return}if(!h&&z>2&&X&&O&&n){C(O[n.length-1]);return}const oe=O?.reduce((F,G)=>typeof F!="number"||typeof G!="number"?F:Math.abs(G-$)<Math.abs(F-$)?G:F),L=nn(d)?window.innerHeight:window.innerWidth;if(z>iT&&Math.abs(D)<L*.4){const F=X?1:-1;if(F>0&&S&&n){C(O[n.length-1]);return}if(j&&F<0&&W&&N(),w===null)return;C(O[w+F]);return}C(oe)}function I({draggedDistance:D}){if(A===null)return;const N=d==="bottom"||d==="right"?A-D:A+D;(d==="bottom"||d==="right")&&N<O[O.length-1]||(d==="top"||d==="left")&&N>O[O.length-1]||cn(o.current,{transform:nn(d)?`translate3d(0, ${N}px, 0)`:`translate3d(${N}px, 0, 0)`})}function k(D,N){if(!n||typeof w!="number"||!O||l===void 0)return null;const z=w===l-1;if(w>=l&&N)return 0;if(z&&!N)return 1;if(!T&&!z)return null;const $=z?w+1:w-1,q=z?O[$]-O[$-1]:O[$+1]-O[$],j=D/Math.abs(q);return z?1-j:j}return{isLastSnapPoint:S,activeSnapPoint:v,shouldFade:T,getPercentageDragged:k,setActiveSnapPoint:p,activeSnapPointIndex:w,onRelease:R,onDrag:I,snapPointsOffset:O}}const kB=()=>()=>{};function jB(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:o,noBodyStyles:i}=Tc(),l=V.useRef(null),c=E.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-Hv)/window.innerWidth}V.useEffect(()=>{if(t&&n){l.current&&clearTimeout(l.current);const f=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!f)return;MB(o&&!i?$m(document.body,{background:"black"}):kB,$m(f,{transformOrigin:nn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kt.EASE.join(",")})`}));const h=$m(f,{borderRadius:`${sT}px`,overflow:"hidden",...nn(e)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{h(),l.current=window.setTimeout(()=>{c?document.body.style.background=c:document.body.style.removeProperty("background")},kt.DURATION*1e3)}}},[t,n,c])}let Bl=null;function zB({isOpen:e,modal:t,nested:n,hasBeenOpened:o,preventScrollRestoration:i,noBodyStyles:l}){const[c,d]=V.useState(()=>typeof window<"u"?window.location.href:""),f=V.useRef(0),h=V.useCallback(()=>{if(kS()&&Bl===null&&e&&!l){Bl={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:p,innerHeight:y}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-p}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const _=y-window.innerHeight;_&&f.current>=y&&(document.body.style.top=`${-(f.current+_)}px`)}),300)}},[e]),v=V.useCallback(()=>{if(kS()&&Bl!==null&&!l){const p=-parseInt(document.body.style.top,10),y=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Bl),window.requestAnimationFrame(()=>{if(i&&c!==window.location.href){d(window.location.href);return}window.scrollTo(y,p)}),Bl=null}},[c]);return V.useEffect(()=>{function p(){f.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),V.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||v()}},[t,v]),V.useEffect(()=>{n||!o||(e?(!window.matchMedia("(display-mode: standalone)").matches&&h(),t||window.setTimeout(()=>{v()},500)):v())},[e,o,c,t,n,h,v]),{restorePositionSetting:v}}function UB({open:e,onOpenChange:t,children:n,onDrag:o,onRelease:i,snapPoints:l,shouldScaleBackground:c=!1,setBackgroundColorOnScale:d=!0,closeThreshold:f=NB,scrollLockTimeout:h=DB,dismissible:v=!0,handleOnly:p=!1,fadeFromIndex:y=l&&l.length-1,activeSnapPoint:_,setActiveSnapPoint:S,fixed:w,modal:T=!0,onClose:O,nested:A,noBodyStyles:C=!1,direction:R="bottom",defaultOpen:I=!1,disablePreventScroll:k=!0,snapToSequentialPoint:D=!1,preventScrollRestoration:N=!1,repositionInputs:z=!0,onAnimationEnd:W,container:$,autoFocus:q=!1}){var j,X;const[oe=!1,L]=cT({defaultProp:I,prop:e,onChange:Ie=>{t?.(Ie),!Ie&&!A&&xe(),setTimeout(()=>{W?.(Ie)},kt.DURATION*1e3),Ie&&!T&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Ie||(document.body.style.pointerEvents="auto")}}),[F,G]=V.useState(!1),[re,ye]=V.useState(!1),[P,Q]=V.useState(!1),te=V.useRef(null),se=V.useRef(null),me=V.useRef(null),_e=V.useRef(null),be=V.useRef(null),Se=V.useRef(!1),De=V.useRef(null),Le=V.useRef(0),Ee=V.useRef(!1),ze=V.useRef(!I),Nt=V.useRef(0),ge=V.useRef(null),ve=V.useRef(((j=ge.current)==null?void 0:j.getBoundingClientRect().height)||0),Re=V.useRef(((X=ge.current)==null?void 0:X.getBoundingClientRect().width)||0),ke=V.useRef(0),et=V.useCallback(Ie=>{l&&Ie===Y.length-1&&(se.current=new Date)},[]),{activeSnapPoint:Ue,activeSnapPointIndex:Qe,setActiveSnapPoint:U,onRelease:Z,snapPointsOffset:Y,onDrag:ue,shouldFade:pe,getPercentageDragged:he}=PB({snapPoints:l,activeSnapPointProp:_,setActiveSnapPointProp:S,drawerRef:ge,fadeFromIndex:y,overlayRef:te,onSnapPointChange:et,direction:R,container:$,snapToSequentialPoint:D});xB({isDisabled:!oe||re||!T||P||!F||!z||!k});const{restorePositionSetting:xe}=zB({isOpen:oe,modal:T,nested:A??!1,hasBeenOpened:F,preventScrollRestoration:N,noBodyStyles:C});function Be(){return(window.innerWidth-Hv)/window.innerWidth}function Ze(Ie){var tt,it;!v&&!l||ge.current&&!ge.current.contains(Ie.target)||(ve.current=((tt=ge.current)==null?void 0:tt.getBoundingClientRect().height)||0,Re.current=((it=ge.current)==null?void 0:it.getBoundingClientRect().width)||0,ye(!0),me.current=new Date,nT()&&window.addEventListener("touchend",()=>Se.current=!1,{once:!0}),Ie.target.setPointerCapture(Ie.pointerId),Le.current=nn(R)?Ie.pageY:Ie.pageX)}function ft(Ie,tt){var it;let Ye=Ie;const st=(it=window.getSelection())==null?void 0:it.toString(),Me=ge.current?hd(ge.current,R):null,Ke=new Date;if(Ye.tagName==="SELECT"||Ye.hasAttribute("data-vaul-no-drag")||Ye.closest("[data-vaul-no-drag]"))return!1;if(R==="right"||R==="left")return!0;if(se.current&&Ke.getTime()-se.current.getTime()<500)return!1;if(Me!==null&&(R==="bottom"?Me>0:Me<0))return!0;if(st&&st.length>0)return!1;if(be.current&&Ke.getTime()-be.current.getTime()<h&&Me===0||tt)return be.current=Ke,!1;for(;Ye;){if(Ye.scrollHeight>Ye.clientHeight){if(Ye.scrollTop!==0)return be.current=new Date,!1;if(Ye.getAttribute("role")==="dialog")return!0}Ye=Ye.parentNode}return!0}function Mn(Ie){if(ge.current&&re){const tt=R==="bottom"||R==="right"?1:-1,it=(Le.current-(nn(R)?Ie.pageY:Ie.pageX))*tt,Ye=it>0,st=l&&!v&&!Ye;if(st&&Qe===0)return;const Me=Math.abs(it),Ke=document.querySelector("[data-vaul-drawer-wrapper]"),xt=R==="bottom"||R==="top"?ve.current:Re.current;let bt=Me/xt;const Nn=he(Me,Ye);if(Nn!==null&&(bt=Nn),st&&bt>=1||!Se.current&&!ft(Ie.target,Ye))return;if(ge.current.classList.add(Vm),Se.current=!0,cn(ge.current,{transition:"none"}),cn(te.current,{transition:"none"}),l&&ue({draggedDistance:it}),Ye&&!l){const Ct=IB(it),br=Math.min(Ct*-1,0)*tt;cn(ge.current,{transform:nn(R)?`translate3d(0, ${br}px, 0)`:`translate3d(${br}px, 0, 0)`});return}const lt=1-bt;if((pe||y&&Qe===y-1)&&(o?.(Ie,bt),cn(te.current,{opacity:`${lt}`,transition:"none"},!0)),Ke&&te.current&&c){const Ct=Math.min(Be()+bt*(1-Be()),1),br=8-bt*8,_n=Math.max(0,14-bt*14);cn(Ke,{borderRadius:`${br}px`,transform:nn(R)?`scale(${Ct}) translate3d(0, ${_n}px, 0)`:`scale(${Ct}) translate3d(${_n}px, 0, 0)`,transition:"none"},!0)}if(!l){const Ct=Me*tt;cn(ge.current,{transform:nn(R)?`translate3d(0, ${Ct}px, 0)`:`translate3d(${Ct}px, 0, 0)`})}}}V.useEffect(()=>{window.requestAnimationFrame(()=>{ze.current=!0})},[]),V.useEffect(()=>{var Ie;function tt(){if(!ge.current||!z)return;const it=document.activeElement;if(Vv(it)||Ee.current){var Ye;const st=((Ye=window.visualViewport)==null?void 0:Ye.height)||0,Me=window.innerHeight;let Ke=Me-st;const xt=ge.current.getBoundingClientRect().height||0,bt=xt>Me*.8;ke.current||(ke.current=xt);const Nn=ge.current.getBoundingClientRect().top;if(Math.abs(Nt.current-Ke)>60&&(Ee.current=!Ee.current),l&&l.length>0&&Y&&Qe){const lt=Y[Qe]||0;Ke+=lt}if(Nt.current=Ke,xt>st||Ee.current){const lt=ge.current.getBoundingClientRect().height;let Ct=lt;lt>st&&(Ct=st-(bt?Nn:Hv)),w?ge.current.style.height=`${lt-Math.max(Ke,0)}px`:ge.current.style.height=`${Math.max(Ct,st-Nn)}px`}else gB()||(ge.current.style.height=`${ke.current}px`);l&&l.length>0&&!Ee.current?ge.current.style.bottom="0px":ge.current.style.bottom=`${Math.max(Ke,0)}px`}}return(Ie=window.visualViewport)==null||Ie.addEventListener("resize",tt),()=>{var it;return(it=window.visualViewport)==null?void 0:it.removeEventListener("resize",tt)}},[Qe,l,Y]);function Tt(Ie){At(),O?.(),Ie||L(!1),setTimeout(()=>{l&&U(l[0])},kt.DURATION*1e3)}function Zt(){if(!ge.current)return;const Ie=document.querySelector("[data-vaul-drawer-wrapper]"),tt=hd(ge.current,R);cn(ge.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`}),cn(te.current,{transition:`opacity ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,opacity:"1"}),c&&tt&&tt>0&&oe&&cn(Ie,{borderRadius:`${sT}px`,overflow:"hidden",...nn(R)?{transform:`scale(${Be()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Be()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kt.EASE.join(",")})`},!0)}function At(){!re||!ge.current||(ge.current.classList.remove(Vm),Se.current=!1,ye(!1),_e.current=new Date)}function an(Ie){if(!re||!ge.current)return;ge.current.classList.remove(Vm),Se.current=!1,ye(!1),_e.current=new Date;const tt=hd(ge.current,R);if(!Ie||!ft(Ie.target,!1)||!tt||Number.isNaN(tt)||me.current===null)return;const it=_e.current.getTime()-me.current.getTime(),Ye=Le.current-(nn(R)?Ie.pageY:Ie.pageX),st=Math.abs(Ye)/it;if(st>.05&&(Q(!0),setTimeout(()=>{Q(!1)},200)),l){Z({draggedDistance:Ye*(R==="bottom"||R==="right"?1:-1),closeDrawer:Tt,velocity:st,dismissible:v}),i?.(Ie,!0);return}if(R==="bottom"||R==="right"?Ye>0:Ye<0){Zt(),i?.(Ie,!0);return}if(st>iT){Tt(),i?.(Ie,!1);return}var Me;const Ke=Math.min((Me=ge.current.getBoundingClientRect().height)!=null?Me:0,window.innerHeight);var xt;const bt=Math.min((xt=ge.current.getBoundingClientRect().width)!=null?xt:0,window.innerWidth),Nn=R==="left"||R==="right";if(Math.abs(tt)>=(Nn?bt:Ke)*f){Tt(),i?.(Ie,!1);return}i?.(Ie,!0),Zt()}V.useEffect(()=>(oe&&(cn(document.documentElement,{scrollBehavior:"auto"}),se.current=new Date),()=>{CB(document.documentElement,"scrollBehavior")}),[oe]);function Yt(Ie){const tt=Ie?(window.innerWidth-ai)/window.innerWidth:1,it=Ie?-ai:0;De.current&&window.clearTimeout(De.current),cn(ge.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:nn(R)?`scale(${tt}) translate3d(0, ${it}px, 0)`:`scale(${tt}) translate3d(${it}px, 0, 0)`}),!Ie&&ge.current&&(De.current=setTimeout(()=>{const Ye=hd(ge.current,R);cn(ge.current,{transition:"none",transform:nn(R)?`translate3d(0, ${Ye}px, 0)`:`translate3d(${Ye}px, 0, 0)`})},500))}function qo(Ie,tt){if(tt<0)return;const it=(window.innerWidth-ai)/window.innerWidth,Ye=it+tt*(1-it),st=-ai+tt*ai;cn(ge.current,{transform:nn(R)?`scale(${Ye}) translate3d(0, ${st}px, 0)`:`scale(${Ye}) translate3d(${st}px, 0, 0)`,transition:"none"})}function _o(Ie,tt){const it=nn(R)?window.innerHeight:window.innerWidth,Ye=tt?(it-ai)/it:1,st=tt?-ai:0;tt&&cn(ge.current,{transition:`transform ${kt.DURATION}s cubic-bezier(${kt.EASE.join(",")})`,transform:nn(R)?`scale(${Ye}) translate3d(0, ${st}px, 0)`:`scale(${Ye}) translate3d(${st}px, 0, 0)`})}return V.useEffect(()=>{T||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[T]),V.createElement(Aj,{defaultOpen:I,onOpenChange:Ie=>{!v&&!Ie||(Ie?G(!0):Tt(!0),L(Ie))},open:oe},V.createElement(tT.Provider,{value:{activeSnapPoint:Ue,snapPoints:l,setActiveSnapPoint:U,drawerRef:ge,overlayRef:te,onOpenChange:t,onPress:Ze,onRelease:an,onDrag:Mn,dismissible:v,shouldAnimate:ze,handleOnly:p,isOpen:oe,isDragging:re,shouldFade:pe,closeDrawer:Tt,onNestedDrag:qo,onNestedOpenChange:Yt,onNestedRelease:_o,keyboardIsOpen:Ee,modal:T,snapPointsOffset:Y,activeSnapPointIndex:Qe,direction:R,shouldScaleBackground:c,setBackgroundColorOnScale:d,noBodyStyles:C,container:$,autoFocus:q}},n))}const uT=V.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:o,onRelease:i,shouldFade:l,isOpen:c,modal:d,shouldAnimate:f}=Tc(),h=oT(t,n),v=o&&o.length>0;if(!d)return null;const p=V.useCallback(y=>i(y),[i]);return V.createElement(Mj,{onMouseUp:p,ref:h,"data-vaul-overlay":"","data-vaul-snap-points":c&&v?"true":"false","data-vaul-snap-points-overlay":c&&l?"true":"false","data-vaul-animate":f?.current?"true":"false",...e})});uT.displayName="Drawer.Overlay";const dT=V.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...o},i){const{drawerRef:l,onPress:c,onRelease:d,onDrag:f,keyboardIsOpen:h,snapPointsOffset:v,activeSnapPointIndex:p,modal:y,isOpen:_,direction:S,snapPoints:w,container:T,handleOnly:O,shouldAnimate:A,autoFocus:C}=Tc(),[R,I]=V.useState(!1),k=oT(i,l),D=V.useRef(null),N=V.useRef(null),z=V.useRef(!1),W=w&&w.length>0;jB();const $=(j,X,oe=0)=>{if(z.current)return!0;const L=Math.abs(j.y),F=Math.abs(j.x),G=F>L,re=["bottom","right"].includes(X)?1:-1;if(X==="left"||X==="right"){if(!(j.x*re<0)&&F>=0&&F<=oe)return G}else if(!(j.y*re<0)&&L>=0&&L<=oe)return!G;return z.current=!0,!0};V.useEffect(()=>{W&&window.requestAnimationFrame(()=>{I(!0)})},[]);function q(j){D.current=null,z.current=!1,d(j)}return V.createElement(Nj,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":R?"true":"false","data-vaul-snap-points":_&&W?"true":"false","data-vaul-custom-container":T?"true":"false","data-vaul-animate":A?.current?"true":"false",...o,ref:k,style:v&&v.length>0?{"--snap-point-height":`${v[p??0]}px`,...t}:t,onPointerDown:j=>{O||(o.onPointerDown==null||o.onPointerDown.call(o,j),D.current={x:j.pageX,y:j.pageY},c(j))},onOpenAutoFocus:j=>{n?.(j),C||j.preventDefault()},onPointerDownOutside:j=>{if(e?.(j),!y||j.defaultPrevented){j.preventDefault();return}h.current&&(h.current=!1)},onFocusOutside:j=>{if(!y){j.preventDefault();return}},onPointerMove:j=>{if(N.current=j,O||(o.onPointerMove==null||o.onPointerMove.call(o,j),!D.current))return;const X=j.pageY-D.current.y,oe=j.pageX-D.current.x,L=j.pointerType==="touch"?10:2;$({x:oe,y:X},S,L)?f(j):(Math.abs(oe)>L||Math.abs(X)>L)&&(D.current=null)},onPointerUp:j=>{o.onPointerUp==null||o.onPointerUp.call(o,j),D.current=null,z.current=!1,d(j)},onPointerOut:j=>{o.onPointerOut==null||o.onPointerOut.call(o,j),q(N.current)},onContextMenu:j=>{o.onContextMenu==null||o.onContextMenu.call(o,j),N.current&&q(N.current)}})});dT.displayName="Drawer.Content";const BB=250,FB=120,$B=V.forwardRef(function({preventCycle:e=!1,children:t,...n},o){const{closeDrawer:i,isDragging:l,snapPoints:c,activeSnapPoint:d,setActiveSnapPoint:f,dismissible:h,handleOnly:v,isOpen:p,onPress:y,onDrag:_}=Tc(),S=V.useRef(null),w=V.useRef(!1);function T(){if(w.current){C();return}window.setTimeout(()=>{O()},FB)}function O(){if(l||e||w.current){C();return}if(C(),!c||c.length===0){h||i();return}if(d===c[c.length-1]&&h){i();return}const I=c.findIndex(D=>D===d);if(I===-1)return;const k=c[I+1];f(k)}function A(){S.current=window.setTimeout(()=>{w.current=!0},BB)}function C(){S.current&&window.clearTimeout(S.current),w.current=!1}return V.createElement("div",{onClick:T,onPointerCancel:C,onPointerDown:R=>{v&&y(R),A()},onPointerMove:R=>{v&&_(R)},ref:o,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},V.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});$B.displayName="Drawer.Handle";function VB(e){const t=Tc(),{container:n=t.container,...o}=e;return V.createElement(Ij,{container:n,...o})}const PH={Root:UB,Content:dT,Overlay:uT,Trigger:Cj,Portal:VB,Title:Dj};var As=(e,t,n)=>new Promise((o,i)=>{var l=f=>{try{d(n.next(f))}catch(h){i(h)}},c=f=>{try{d(n.throw(f))}catch(h){i(h)}},d=f=>f.done?o(f.value):Promise.resolve(f.value).then(l,c);d((n=n.apply(e,t)).next())}),Td=class extends Error{},HB=class extends Error{},GB=e=>Math.exp(e)*150,qB=(e,...t)=>As(void 0,[e,...t],function*(n,{attempts:o=4}={}){var i;let l;for(let c=0;c<o;c++)try{return yield n()}catch(d){l=d,yield new Promise(f=>setTimeout(f,GB(c)))}throw new Td((i=l?.message)!=null?i:"Exhausted all retries")}),Fl,fT="captchaFoxOnLoad",BS=`https://cdn.captchafox.com/api.js?render=explicit&onload=${fT}`;function ZB(){return As(this,arguments,function*({nonce:e}={}){return Fl&&document.querySelector(`script[src="${BS}"]`)||(Fl=new Promise((t,n)=>{window[fT]=t;const o=document.createElement("script");o.src=BS,o.async=!0,o.defer=!0,o.onerror=i=>{o.remove(),Fl=void 0,n(i)},e&&(o.nonce=e),document.body.appendChild(o)})),Fl})}function YB(){return As(this,arguments,function*(e={}){return qB(()=>ZB(e))})}var vs=()=>typeof window?.captchafox<"u",hT=E.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:o,theme:i,className:l,nonce:c,i18n:d,onError:f,onVerify:h,onLoad:v,onFail:p,onClose:y,onChallengeChange:_,onChallengeOpen:S},w)=>{const[T,O]=E.useState(),[A,C]=E.useState(),R=E.useRef(!1),I=E.useRef(),k=E.useRef(),D=E.useRef(),N=E.useRef(!1);E.useImperativeHandle(w,()=>({getResponse(){return!vs()||!A?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(A)},reset(){if(!vs()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(A)},remove(){if(!vs()||!A){console.warn("[CaptchaFox] Widget has not been loaded");return}C(void 0),window.captchafox.remove(A)},execute:()=>As(void 0,null,function*(){if(N.current)return Promise.reject(new Td);if(!vs()||!A)return W();try{return yield window.captchafox.execute(A)}catch(j){const X=$(j);return Promise.reject(X)}})}),[A]),E.useEffect(()=>{A&&v?.()},[A]),E.useEffect(()=>()=>{z()},[]),E.useEffect(()=>{T&&(R.current?vs()&&q():YB({nonce:c}).then(()=>As(void 0,null,function*(){vs()&&(R.current=!0,yield q())})).catch(j=>{var X;f?.(j),N.current=!0,(X=D.current)==null||X.call(D),console.error("[CaptchaFox] Could not load script:",j)}))},[T,t,n,o]);const z=()=>{clearTimeout(k.current)},W=()=>new Promise((j,X)=>{D.current=()=>{z(),X(new Td)},k.current=setTimeout(()=>{X(new HB("Execute timed out"))},e*1e3),I.current=oe=>{z(),window.captchafox.execute(oe).then(j).catch(L=>{const F=$(L);X(F)})}}),$=j=>j!=="challenge-aborted"&&j!=="rate-limited"?new Td:j,q=()=>As(void 0,null,function*(){var j,X,oe;if((j=window.captchafox)==null||j.remove(A),!T||((X=T?.children)==null?void 0:X.length)===1)return;const L=yield(oe=window.captchafox)==null?void 0:oe.render(T,{lang:n,sitekey:t,mode:o,theme:i,i18n:d,onError:f,onFail:p,onClose:y,onVerify:h,onChallengeChange:_,onChallengeOpen:S});L&&(C(L),I.current&&(I.current(L),I.current=void 0))});return V.createElement("div",{ref:O,id:A,className:l})});hT.displayName="CaptchaFox";function Mr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gv(e,t){return Gv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Gv(e,t)}function KB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Gv(e,t)}var WB=Object.defineProperty,QB=Object.defineProperties,XB=Object.getOwnPropertyDescriptors,sf=Object.getOwnPropertySymbols,pT=Object.prototype.hasOwnProperty,mT=Object.prototype.propertyIsEnumerable,qv=(e,t,n)=>t in e?WB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cr=(e,t)=>{for(var n in t||(t={}))pT.call(t,n)&&qv(e,n,t[n]);if(sf)for(var n of sf(t))mT.call(t,n)&&qv(e,n,t[n]);return e},vT=(e,t)=>QB(e,XB(t)),JB=(e,t)=>{var n={};for(var o in e)pT.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&sf)for(var o of sf(e))t.indexOf(o)<0&&mT.call(e,o)&&(n[o]=e[o]);return n},vn=(e,t,n)=>(qv(e,typeof t!="symbol"?t+"":t,n),n),Ls=(e,t,n)=>new Promise((o,i)=>{var l=f=>{try{d(n.next(f))}catch(h){i(h)}},c=f=>{try{d(n.throw(f))}catch(h){i(h)}},d=f=>f.done?o(f.value):Promise.resolve(f.value).then(l,c);d((n=n.apply(e,t)).next())}),eF="hCaptcha-script",Ad="hCaptchaOnLoad",FS="script-error",xa="@hCaptcha/loader";function tF(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function gT(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function yT(e){return e||document.head}function nF(e){var t;e.setTag("source",xa),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",cr({},rF())),e.setContext("device",vT(cr({},aF()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((t=screen.orientation)==null?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function rF(){var e,t,n,o,i,l;let c=navigator.userAgent,d,f;return c.indexOf("Firefox")!==-1?(d="Firefox",f=(e=c.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):c.indexOf("Edg")!==-1?(d="Microsoft Edge",f=(t=c.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):c.indexOf("Chrome")!==-1&&c.indexOf("Safari")!==-1?(d="Chrome",f=(n=c.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):c.indexOf("Safari")!==-1&&c.indexOf("Chrome")===-1?(d="Safari",f=(o=c.match(/Version\/([\d.]+)/))==null?void 0:o[1]):c.indexOf("Opera")!==-1||c.indexOf("OPR")!==-1?(d="Opera",f=(i=c.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:i[2]):c.indexOf("MSIE")!==-1||c.indexOf("Trident")!==-1?(d="Internet Explorer",f=(l=c.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:l[2]):(d="Unknown",f="Unknown"),{name:d,version:f}}function oF(e){return new Promise(t=>setTimeout(t,e))}function aF(){let e=navigator.userAgent,t;e.indexOf("Win")!==-1?t="Windows":e.indexOf("Mac")!==-1?t="Mac":e.indexOf("Linux")!==-1?t="Linux":e.indexOf("Android")!==-1?t="Android":e.indexOf("like Mac")!==-1||e.indexOf("iPhone")!==-1||e.indexOf("iPad")!==-1?t="iOS":t="Unknown";let n;return/Mobile|iPhone|iPod|Android/i.test(e)?n="Mobile":/Tablet|iPad/i.test(e)?n="Tablet":n="Desktop",{model:t,family:t,device:n}}var iF=class bT{constructor(t){vn(this,"_parent"),vn(this,"breadcrumbs",[]),vn(this,"context",{}),vn(this,"extra",{}),vn(this,"tags",{}),vn(this,"request"),vn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new bT(this)}setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=cr(cr({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((o,i)=>{var l;return o.breadcrumbs=[...(l=o.breadcrumbs)!=null?l:[],...i.breadcrumbs],o.extra=cr(cr({},o.extra),i.extra),o.contexts=cr(cr({},o.contexts),i.context),o.tags=cr(cr({},o.tags),i.tags),i.user&&(o.user=i.user),i.request&&(o.request=i.request),o},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},sF=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,lF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,cF=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,uF=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,pd="?",$S="An unknown error occurred",dF="0.0.4";function fF(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function Ln(e){return(e+256).toString(16).substring(1)}function hF(){let e=fF(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,Ln(e[0])+Ln(e[1])+Ln(e[2])+Ln(e[3])+"-"+Ln(e[4])+Ln(e[5])+"-"+Ln(e[6])+Ln(e[7])+"-"+Ln(e[8])+Ln(e[9])+"-"+Ln(e[10])+Ln(e[11])+Ln(e[12])+Ln(e[13])+Ln(e[14])+Ln(e[15])}var pF=[[sF,"chrome"],[cF,"winjs"],[lF,"gecko"]];function mF(e){var t,n,o,i;if(!e.stack)return null;let l=[],c=(o=(n=(t=e.stack).split)==null?void 0:n.call(t,`
|
|
108
|
+
`))!=null?o:[];for(let d=0;d<c.length;++d){let f=null,h=null,v=null;for(let[p,y]of pF)if(h=p.exec(c[d]),h){v=y;break}if(!(!h||!v)){if(v==="chrome")f={filename:(i=h[2])!=null&&i.startsWith("address at ")?h[2].substring(11):h[2],function:h[1]||pd,lineno:h[3]?+h[3]:null,colno:h[4]?+h[4]:null};else if(v==="winjs")f={filename:h[2],function:h[1]||pd,lineno:+h[3],colno:h[4]?+h[4]:null};else if(v==="gecko")d===0&&!h[5]&&e.columnNumber!==void 0&&l.length>0&&(l[0].column=e.columnNumber+1),f={filename:h[3],function:h[1]||pd,lineno:h[4]?+h[4]:null,colno:h[5]?+h[5]:null};else continue;!f.function&&f.lineno&&(f.function=pd),l.push(f)}}return l.length?l.reverse():null}function vF(e){let t=mF(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function gF(e){let t=uF.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let o=n[5].split("/"),i=o.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(i?"/"+i:"")+"/api/"+o.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function yF(e,t,n){var o,i;let l=cr({event_id:hF().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:dF},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){l.message=(i=(o=e.error)==null?void 0:o.message)!=null?i:"Unknown error",l.fingerprint=[l.message];let c=[],d=e.error;for(let f=0;f<5&&d&&(c.push(vF(d)),!(!d.cause||!(d.cause instanceof Error)));f++)d=d.cause;l.exception={values:c.reverse()}}return e.type==="message"&&(l.message=e.message,l.level=e.level),l}function bF(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let n=e,{message:o}=n,i=JB(n,["message"]),l=new Error(typeof o=="string"?o:$S);return Object.assign(l,i)}let t=new Error($S);return Object.assign(t,{cause:e})}function _F(e,t,n){return Ls(this,null,function*(){var o,i;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let l;if(n){let f=new AbortController;l=f.signal,setTimeout(()=>f.abort(),n)}let c=yield fetch(e,vT(cr({},t),{signal:l})),d=yield c.text();return{status:c.status,body:d}}return yield new Promise((l,c)=>{var d,f;let h=new XMLHttpRequest;if(h.open((d=t?.method)!=null?d:"GET",e),h.onload=()=>l({status:h.status,body:h.responseText}),h.onerror=()=>c(new Error("XHR Network Error")),t?.headers)for(let[v,p]of Object.entries(t.headers))h.setRequestHeader(v,p);if(n){let v=setTimeout(()=>{h.abort(),c(new Error("Request timed out"))},n);h.onloadend=()=>{clearTimeout(v)}}h.send((f=t?.body)==null?void 0:f.toString())})}catch(l){return{status:0,body:(i=(o=l?.toString)==null?void 0:o.call(l))!=null?i:"Unknown error"}}})}var Yn,Zv=(Yn=class{constructor(e){vn(this,"apiURL"),vn(this,"dsn"),vn(this,"environment"),vn(this,"release"),vn(this,"sampleRate"),vn(this,"debug"),vn(this,"_scope"),vn(this,"shouldBuffer",!1),vn(this,"bufferlimit",20),vn(this,"buffer",[]);var t,n,o,i,l;this.environment=e.environment,this.release=e.release,this.sampleRate=(t=e.sampleRate)!=null?t:1,this.debug=(n=e.debug)!=null?n:!1,this._scope=(o=e.scope)!=null?o:new iF,this.apiURL=gF(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(i=e.buffer)!=null?i:!1,this.bufferlimit=(l=e.bufferLimit)!=null?l:20}static init(e){Yn._instance||(Yn._instance=new Yn(e))}static get instance(){if(!Yn._instance)throw new Error("Sentry has not been initialized");return Yn._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Yn.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Yn.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:bF(e),scope:t??this._scope})}static captureException(e,t){Yn.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:n??this._scope})}static captureMessage(e,t="info",n){Yn.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return Ls(this,null,function*(){try{this.log("Sending sentry event",e);let n=yF(e,this.environment,this.release),o={event_id:n.event_id,dsn:this.dsn},i={type:"event"},l=JSON.stringify(o)+`
|
|
109
109
|
`+JSON.stringify(i)+`
|
|
110
|
-
`+JSON.stringify(n),c=yield _F(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:l},t);this.log("Sentry response",c.status),c.status!==200&&(console.log(c.body),console.error("Failed to send event to Sentry",c))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return Ls(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return Yn.instance.flush(e)}static reset(){Yn._instance=void 0}},vn(Yn,"_instance"),Yn),EF="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",SF="2.3.0",wF="production";function xF(e=!0){if(!e)return VS();Zv.init({dsn:EF,release:SF,environment:wF});let t=Zv.scope;return nF(t),VS(t)}function VS(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&Zv.captureException(t,e)}}}function RF({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:o="anonymous",apihost:i="https://js.hcaptcha.com",cleanup:l=!1,secureApi:c=!1,scriptSource:d=""}={},f){let h=yT(e),v=gT(h);return new Promise((p,y)=>{let _=v.document.createElement("script");_.id=eF,d?_.src=`${d}?onload=${Td}`:c?_.src=`${i}/1/secure-api.js?onload=${Td}`:_.src=`${i}/1/api.js?onload=${Td}`,_.crossOrigin=o,_.async=n;let S=(w,T)=>{try{!c&&l&&h.removeChild(_),T(w)}catch(O){y(O)}};_.onload=w=>S(w,p),_.onerror=w=>{f&&f(_.src),S(w,y)},_.src+=t!==""?`&${t}`:"",h.appendChild(_)})}var pd=[];function OF(e={cleanup:!1},t){try{t.addBreadcrumb({category:xa,message:"hCaptcha loader params",data:e});let n=yT(e.scriptLocation),o=gT(n),i=pd.find(({scope:c})=>c===o.window);if(i)return t.addBreadcrumb({category:xa,message:"hCaptcha already loaded"}),i.promise;let l=new Promise((c,d)=>Ls(this,null,function*(){try{o.window[Td]=()=>{t.addBreadcrumb({category:xa,message:"hCaptcha script called onload function"}),c(o.window.hcaptcha)};let f=tF({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl,uj:e.uj});yield RF(cr({query:f},e),h=>{t.captureRequest({url:h,method:"GET"})}),t.addBreadcrumb({category:xa,message:"hCaptcha loaded",data:i})}catch{t.addBreadcrumb({category:xa,message:"hCaptcha failed to load"});let h=pd.findIndex(v=>v.scope===o.window);h!==-1&&pd.splice(h,1),d(new Error(FS))}}));return pd.push({promise:l,scope:o.window}),l}catch(n){return t.captureException(n),Promise.reject(new Error(FS))}}function _T(e,t,n=0){return Ls(this,null,function*(){var o,i;let l=(o=e.maxRetries)!=null?o:2,c=(i=e.retryDelay)!=null?i:1e3,d=n<l?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield OF(e,t)}catch(f){return t.addBreadcrumb({category:xa,message:d}),n>=l?(t.captureException(f),Promise.reject(f)):(t.addBreadcrumb({category:xa,message:`Waiting ${c}ms before retry attempt ${n+1}`}),yield oF(c),n+=1,_T(e,t,n))}})}function TF(){return Ls(this,arguments,function*(e={}){let t=xF(e.sentry);return yield _T(e,t)})}function HS(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function GS(e){return e||document.head}var AF=(function(e){KB(t,e);function t(o){var i;return i=e.call(this,o)||this,i._hcaptcha=void 0,i.renderCaptcha=i.renderCaptcha.bind(Mr(i)),i.resetCaptcha=i.resetCaptcha.bind(Mr(i)),i.removeCaptcha=i.removeCaptcha.bind(Mr(i)),i.isReady=i.isReady.bind(Mr(i)),i._onReady=null,i.loadCaptcha=i.loadCaptcha.bind(Mr(i)),i.handleOnLoad=i.handleOnLoad.bind(Mr(i)),i.handleSubmit=i.handleSubmit.bind(Mr(i)),i.handleExpire=i.handleExpire.bind(Mr(i)),i.handleError=i.handleError.bind(Mr(i)),i.handleOpen=i.handleOpen.bind(Mr(i)),i.handleClose=i.handleClose.bind(Mr(i)),i.handleChallengeExpired=i.handleChallengeExpired.bind(Mr(i)),i.ref=E.createRef(),i.apiScriptRequested=!1,i.sentryHub=null,i.captchaId="",i._pendingExecute=null,i.state={isApiReady:!1,isRemoved:!1,elementId:o.id},i}var n=t.prototype;return n.componentDidMount=function(){var i=this,l=GS(this.props.scriptLocation),c=HS(l);this._hcaptcha=c.window.hcaptcha||void 0;var d=typeof this._hcaptcha<"u";if(d){this.setState({isApiReady:!0},function(){i.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var i=this._hcaptcha,l=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(i.reset(l),i.remove(l))},n.shouldComponentUpdate=function(i,l){return!(this.state.isApiReady!==l.isApiReady||this.state.isRemoved!==l.isRemoved)},n.componentDidUpdate=function(i){var l=this,c=["sitekey","size","theme","tabindex","languageOverride","endpoint"],d=c.every(function(f){return i[f]===l.props[f]});d||this.removeCaptcha(function(){l.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var i=this.props,l=i.apihost,c=i.assethost,d=i.endpoint,f=i.host,h=i.imghost,v=i.languageOverride,p=i.reCaptchaCompat,y=i.reportapi,_=i.sentry,S=i.custom,w=i.loadAsync,T=i.scriptLocation,O=i.scriptSource,A=i.secureApi,C=i.cleanup,R=C===void 0?!0:C,I=i.userJourneys,k={render:"explicit",apihost:l,assethost:c,endpoint:d,hl:v,host:f,imghost:h,recaptchacompat:p===!1?"off":null,reportapi:y,sentry:_,custom:S,loadAsync:w,scriptLocation:T,scriptSource:O,secureApi:A,cleanup:R,uj:I!==void 0?I:!1};TF(k).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(i){var l=this,c=this.props.onReady,d=this.state.isApiReady,f=this.captchaId;if(!(!d||f)){var h=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),v=this._hcaptcha,p=v.render(this.ref.current,h);this.captchaId=p,this.setState({isRemoved:!1},function(){i&&i(),c&&c(),l._onReady&&l._onReady(p)})}},n.resetCaptcha=function(){var i=this._hcaptcha,l=this.captchaId;this.isReady()&&(i.reset(l),this._cancelPendingExecute("hcaptcha-reset"))},n.removeCaptcha=function(i){var l=this,c=this._hcaptcha,d=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){l.captchaId="",c.remove(d),i&&i()})},n.handleOnLoad=function(){var i=this;this.setState({isApiReady:!0},function(){var l=GS(i.props.scriptLocation),c=HS(l);i._hcaptcha=c.window.hcaptcha,i.renderCaptcha(function(){var d=i.props.onLoad;d&&d()})})},n.handleSubmit=function(i){var l=this.props.onVerify,c=this.state.isRemoved,d=this._hcaptcha,f=this.captchaId;if(!(typeof d>"u"||c)){var h=d.getResponse(f),v=d.getRespKey(f);l&&l(h,v)}},n.handleExpire=function(){var i=this.props.onExpire,l=this._hcaptcha,c=this.captchaId;this.isReady()&&(l.reset(c),i&&i())},n.handleError=function(i){var l=this.props.onError,c=this._hcaptcha,d=this.captchaId;this.isReady()&&c.reset(d),l&&l(i)},n.isReady=function(){var i=this.state,l=i.isApiReady,c=i.isRemoved;return l&&!c},n._cancelPendingExecute=function(i){if(this._pendingExecute){var l=this._pendingExecute;this._pendingExecute=null;var c=new Error(i);l.reject(c)}},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(i){var l=this;i===void 0&&(i=null),i=typeof i=="object"?i:null;try{var c=this._hcaptcha,d=this.captchaId;if(i&&i.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return i&&i.async?new Promise(function(h,v){l._pendingExecute={resolve:h,reject:v},l._onReady=function(p){if(l._pendingExecute)try{var y=c.execute(p,i);y&&typeof y.then=="function"?y.then(function(_){l._pendingExecute=null,h(_)}).catch(function(_){l._pendingExecute=null,v(_)}):(l._pendingExecute=null,v(new Error("hcaptcha-execute-no-promise")))}catch(_){l._pendingExecute=null,v(_)}}}):(this._onReady=function(h){c.execute(h,i)},null);var f=c.execute(d,i);return i&&i.async&&f&&typeof f.then=="function"?new Promise(function(h,v){l._pendingExecute={resolve:h,reject:v},f.then(function(p){l._pendingExecute=null,h(p)}).catch(function(p){l._pendingExecute=null,v(p)})}):f}catch(h){return i&&i.async?Promise.reject(h):null}},n.close=function(){var i=this._hcaptcha,l=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return i.close(l)},n.setData=function(i){var l=this._hcaptcha,c=this.captchaId;this.isReady()&&(i&&typeof i!="object"&&(i=null),l.setData(c,i))},n.getResponse=function(){var i=this._hcaptcha;return i.getResponse(this.captchaId)},n.getRespKey=function(){var i=this._hcaptcha;return i.getRespKey(this.captchaId)},n.render=function(){var i=this.state.elementId;return E.createElement("div",{ref:this.ref,id:i})},t})(E.Component),CF=({as:e="div",...t},n)=>b.jsx(e,{...t,ref:n}),IF=E.forwardRef(CF),MF="https://challenges.cloudflare.com/turnstile/v0/api.js",f0="cf-turnstile-script",NF="cf-turnstile",h0="onloadTurnstileCallback",ET=e=>!!document.getElementById(e),DF=({render:e="explicit",onLoadCallbackName:t=h0,scriptOptions:{nonce:n="",defer:o=!0,async:i=!0,id:l="",appendTo:c,onError:d,crossOrigin:f=""}={}})=>{let h=l||f0;if(ET(h))return;let v=document.createElement("script");v.id=h,v.src=`${MF}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${v.src}"]`)&&(v.defer=!!o,v.async=!!i,n&&(v.nonce=n),f&&(v.crossOrigin=f),d&&(v.onerror=d,delete window[t]),(c==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(v))},ii={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 LF(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function PF(e=f0){let[t,n]=E.useState(!1);return E.useEffect(()=>{let o=()=>{ET(e)&&n(!0)},i=new MutationObserver(o);return i.observe(document,{childList:!0,subtree:!0}),o(),()=>{i.disconnect()}},[e]),t}var ec="unloaded",ST,kF=new Promise((e,t)=>{ST={resolve:e,reject:t},ec==="ready"&&e(void 0)}),qS=(e=h0)=>(ec==="unloaded"&&(ec="loading",window[e]=()=>{ST.resolve(),ec="ready",delete window[e]}),kF),wT=E.forwardRef((e,t)=>{let{scriptOptions:n,options:o={},siteKey:i,onWidgetLoad:l,onSuccess:c,onExpire:d,onError:f,onBeforeInteractive:h,onAfterInteractive:v,onUnsupported:p,onTimeout:y,onLoadScript:_,id:S,style:w,as:T="div",injectScript:O=!0,rerenderOnCallbackChange:A=!1,...C}=e,R=o.size,I=E.useCallback(()=>typeof R>"u"?{}:o.execution==="execute"?ii.invisible:o.appearance==="interaction-only"?ii.interactionOnly:ii[R],[o.execution,R,o.appearance]),[k,D]=E.useState(I()),N=E.useRef(null),[z,W]=E.useState(!1),$=E.useRef(void 0),q=E.useRef(!1),j=S||NF,X=E.useRef({onSuccess:c,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:v,onUnsupported:p,onTimeout:y});E.useEffect(()=>{A||(X.current={onSuccess:c,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:v,onUnsupported:p,onTimeout:y})});let oe=n?.id||f0,L=PF(oe),F=n?.onLoadCallbackName||h0,G=o.appearance||"always",re=E.useMemo(()=>({sitekey:i,action:o.action,cData:o.cData,theme:o.theme||"auto",language:o.language||"auto",tabindex:o.tabIndex,"response-field":o.responseField,"response-field-name":o.responseFieldName,size:LF(R),retry:o.retry||"auto","retry-interval":o.retryInterval||8e3,"refresh-expired":o.refreshExpired||"auto","refresh-timeout":o.refreshTimeout||"auto",execution:o.execution||"render",appearance:o.appearance||"always","feedback-enabled":o.feedbackEnabled||!0,callback:P=>{q.current=!0,A?c?.(P):X.current.onSuccess?.(P)},"error-callback":A?f:(...P)=>X.current.onError?.(...P),"expired-callback":A?d:(...P)=>X.current.onExpire?.(...P),"before-interactive-callback":A?h:(...P)=>X.current.onBeforeInteractive?.(...P),"after-interactive-callback":A?v:(...P)=>X.current.onAfterInteractive?.(...P),"unsupported-callback":A?p:(...P)=>X.current.onUnsupported?.(...P),"timeout-callback":A?y:(...P)=>X.current.onTimeout?.(...P)}),[o.action,o.appearance,o.cData,o.execution,o.language,o.refreshExpired,o.responseField,o.responseFieldName,o.retry,o.retryInterval,o.tabIndex,o.theme,o.feedbackEnabled,o.refreshTimeout,i,R,A,A?c:null,A?f:null,A?d:null,A?h:null,A?v:null,A?p:null,A?y:null]),ye=E.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return E.useEffect(function(){O&&!z&&(qS(F),DF({onLoadCallbackName:F,scriptOptions:{...n,id:oe}}))},[O,z,n,oe,F]),E.useEffect(function(){ec!=="ready"&&qS(F).then(()=>W(!0)).catch(console.error)},[F]),E.useEffect(function(){if(!N.current||!z)return;let P=!1;return(async()=>{if(P||!N.current)return;let Q=window.turnstile.render(N.current,re);$.current=Q,$.current&&l?.($.current)})(),()=>{P=!0,$.current&&(window.turnstile.remove($.current),q.current=!1)}},[j,z,re]),E.useImperativeHandle(t,()=>{let{turnstile:P}=window;return{getResponse(){if(!P?.getResponse||!$.current||!ye()){console.warn("Turnstile has not been loaded");return}return P.getResponse($.current)},async getResponsePromise(Q=3e4,te=100){return new Promise((se,me)=>{let _e,be=async()=>{if(q.current&&window.turnstile&&$.current)try{let Se=window.turnstile.getResponse($.current);return _e&&clearTimeout(_e),Se?se(Se):me(new Error("No response received"))}catch(Se){return _e&&clearTimeout(_e),console.warn("Failed to get response",Se),me(new Error("Failed to get response"))}_e||(_e=setTimeout(()=>{_e&&clearTimeout(_e),me(new Error("Timeout"))},Q)),await new Promise(Se=>setTimeout(Se,te)),await be()};be()})},reset(){if(!P?.reset||!$.current||!ye()){console.warn("Turnstile has not been loaded");return}o.execution==="execute"&&D(ii.invisible);try{q.current=!1,P.reset($.current)}catch(Q){console.warn(`Failed to reset Turnstile widget ${$}`,Q)}},remove(){if(!P?.remove||!$.current||!ye()){console.warn("Turnstile has not been loaded");return}D(ii.invisible),q.current=!1,P.remove($.current),$.current=null},render(){if(!P?.render||!N.current||!ye()||$.current){console.warn("Turnstile has not been loaded or container not found");return}let Q=P.render(N.current,re);return $.current=Q,$.current&&l?.($.current),o.execution!=="execute"&&D(R?ii[R]:{}),Q},execute(){if(o.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!P?.execute||!N.current||!$.current||!ye()){console.warn("Turnstile has not been loaded or container not found");return}P.execute(N.current,re),D(R?ii[R]:{})},isExpired(){return!P?.isExpired||!$.current||!ye()?(console.warn("Turnstile has not been loaded"),!1):P.isExpired($.current)}}},[$,o.execution,R,re,N,ye,z,l]),E.useEffect(()=>{if(z||!L)return;if(window.turnstile){W(!0);return}let P=setInterval(()=>{window.turnstile&&(W(!0),clearInterval(P))},50);return()=>{clearInterval(P)}},[z,L]),E.useEffect(()=>{D(I())},[o.execution,R,G]),E.useEffect(()=>{!L||typeof _!="function"||_()},[L]),b.jsx(IF,{ref:N,as:T,id:j,style:{...k,...w},...C})});wT.displayName="Turnstile";var Hm={exports:{}},Gm,ZS;function jF(){if(ZS)return Gm;ZS=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gm=e,Gm}var qm,YS;function zF(){if(YS)return qm;YS=1;var e=jF();function t(){}function n(){}return n.resetWarningCache=t,qm=function(){function o(c,d,f,h,v,p){if(p!==e){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}o.isRequired=o;function i(){return o}var l={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:i,element:o,elementType:o,instanceOf:i,node:o,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return l.PropTypes=l,l},qm}var KS;function p0(){return KS||(KS=1,Hm.exports=zF()()),Hm.exports}var UF=p0();const Kn=_i(UF);var BF=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Yv(){return Yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yv.apply(this,arguments)}function FF(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function md(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $F(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Kv(e,t)}function Kv(e,t){return Kv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},Kv(e,t)}var Pf=(function(e){$F(t,e);function t(){var o;return o=e.call(this)||this,o.handleExpired=o.handleExpired.bind(md(o)),o.handleErrored=o.handleErrored.bind(md(o)),o.handleChange=o.handleChange.bind(md(o)),o.handleRecaptchaRef=o.handleRecaptchaRef.bind(md(o)),o}var n=t.prototype;return n.getCaptchaFunction=function(i){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[i]:this.props.grecaptcha[i]:null},n.getValue=function(){var i=this.getCaptchaFunction("getResponse");return i&&this._widgetId!==void 0?i(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var i=this.getCaptchaFunction("execute");if(i&&this._widgetId!==void 0)return i(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var i=this;return new Promise(function(l,c){i.executionResolve=l,i.executionReject=c,i.execute()})},n.reset=function(){var i=this.getCaptchaFunction("reset");i&&this._widgetId!==void 0&&i(this._widgetId)},n.forceReset=function(){var i=this.getCaptchaFunction("reset");i&&i()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(i){this.props.onChange&&this.props.onChange(i),this.executionResolve&&(this.executionResolve(i),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var i=this.getCaptchaFunction("render");if(i&&this._widgetId===void 0){var l=document.createElement("div");this._widgetId=i(l,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(l)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(i){this.captcha=i},n.render=function(){var i=this.props;i.sitekey,i.onChange,i.theme,i.type,i.tabindex,i.onExpired,i.onErrored,i.size,i.stoken,i.grecaptcha,i.badge,i.hl,i.isolated;var l=FF(i,BF);return E.createElement("div",Yv({},l,{ref:this.handleRecaptchaRef}))},t})(E.Component);Pf.displayName="ReCAPTCHA";Pf.propTypes={sitekey:Kn.string.isRequired,onChange:Kn.func,grecaptcha:Kn.object,theme:Kn.oneOf(["dark","light"]),type:Kn.oneOf(["image","audio"]),tabindex:Kn.number,onExpired:Kn.func,onErrored:Kn.func,size:Kn.oneOf(["compact","normal","invisible"]),stoken:Kn.string,hl:Kn.string,badge:Kn.oneOf(["bottomright","bottomleft","inline"]),isolated:Kn.bool};Pf.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Zm={exports:{}},ht={};var WS;function VF(){if(WS)return ht;WS=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,v=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function C(I){if(typeof I=="object"&&I!==null){var k=I.$$typeof;switch(k){case t:switch(I=I.type,I){case f:case h:case o:case l:case i:case p:return I;default:switch(I=I&&I.$$typeof,I){case d:case v:case S:case _:case c:return I;default:return k}}case n:return k}}}function R(I){return C(I)===h}return ht.AsyncMode=f,ht.ConcurrentMode=h,ht.ContextConsumer=d,ht.ContextProvider=c,ht.Element=t,ht.ForwardRef=v,ht.Fragment=o,ht.Lazy=S,ht.Memo=_,ht.Portal=n,ht.Profiler=l,ht.StrictMode=i,ht.Suspense=p,ht.isAsyncMode=function(I){return R(I)||C(I)===f},ht.isConcurrentMode=R,ht.isContextConsumer=function(I){return C(I)===d},ht.isContextProvider=function(I){return C(I)===c},ht.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===t},ht.isForwardRef=function(I){return C(I)===v},ht.isFragment=function(I){return C(I)===o},ht.isLazy=function(I){return C(I)===S},ht.isMemo=function(I){return C(I)===_},ht.isPortal=function(I){return C(I)===n},ht.isProfiler=function(I){return C(I)===l},ht.isStrictMode=function(I){return C(I)===i},ht.isSuspense=function(I){return C(I)===p},ht.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===o||I===h||I===l||I===i||I===p||I===y||typeof I=="object"&&I!==null&&(I.$$typeof===S||I.$$typeof===_||I.$$typeof===c||I.$$typeof===d||I.$$typeof===v||I.$$typeof===T||I.$$typeof===O||I.$$typeof===A||I.$$typeof===w)},ht.typeOf=C,ht}var QS;function HF(){return QS||(QS=1,Zm.exports=VF()),Zm.exports}var Ym,XS;function GF(){if(XS)return Ym;XS=1;var e=HF(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};l[e.ForwardRef]=o,l[e.Memo]=i;function c(S){return e.isMemo(S)?i:l[S.$$typeof]||t}var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,v=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,y=Object.prototype;function _(S,w,T){if(typeof w!="string"){if(y){var O=p(w);O&&O!==y&&_(S,O,T)}var A=f(w);h&&(A=A.concat(h(w)));for(var C=c(S),R=c(w),I=0;I<A.length;++I){var k=A[I];if(!n[k]&&!(T&&T[k])&&!(R&&R[k])&&!(C&&C[k])){var D=v(w,k);try{d(S,k,D)}catch{}}}}return S}return Ym=_,Ym}var qF=GF();const ZF=_i(qF);function Wv(){return Wv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Wv.apply(this,arguments)}function YF(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function KF(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Vr={},WF=0;function QF(e,t){return t=t||{},function(o){var i=o.displayName||o.name||"Component",l=(function(d){KF(f,d);function f(v,p){var y;return y=d.call(this,v,p)||this,y.state={},y.__scriptURL="",y}var h=f.prototype;return h.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+WF++),this.__scriptLoaderID},h.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},h.asyncScriptLoaderHandleLoad=function(p){var y=this;this.setState(p,function(){return y.props.asyncScriptOnLoad&&y.props.asyncScriptOnLoad(y.state)})},h.asyncScriptLoaderTriggerOnScriptLoaded=function(){var p=Vr[this.__scriptURL];if(!p||!p.loaded)throw new Error("Script is not loaded.");for(var y in p.observers)p.observers[y](p);delete window[t.callbackName]},h.componentDidMount=function(){var p=this,y=this.setupScriptURL(),_=this.asyncScriptLoaderGetScriptLoaderID(),S=t,w=S.globalName,T=S.callbackName,O=S.scriptId;if(w&&typeof window[w]<"u"&&(Vr[y]={loaded:!0,observers:{}}),Vr[y]){var A=Vr[y];if(A&&(A.loaded||A.errored)){this.asyncScriptLoaderHandleLoad(A);return}A.observers[_]=function(D){return p.asyncScriptLoaderHandleLoad(D)};return}var C={};C[_]=function(D){return p.asyncScriptLoaderHandleLoad(D)},Vr[y]={loaded:!1,observers:C};var R=document.createElement("script");R.src=y,R.async=!0;for(var I in t.attributes)R.setAttribute(I,t.attributes[I]);O&&(R.id=O);var k=function(N){if(Vr[y]){var z=Vr[y],W=z.observers;for(var $ in W)N(W[$])&&delete W[$]}};T&&typeof window<"u"&&(window[T]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),R.onload=function(){var D=Vr[y];D&&(D.loaded=!0,k(function(N){return T?!1:(N(D),!0)}))},R.onerror=function(){var D=Vr[y];D&&(D.errored=!0,k(function(N){return N(D),!0}))},document.body.appendChild(R)},h.componentWillUnmount=function(){var p=this.__scriptURL;if(t.removeOnUnmount===!0)for(var y=document.getElementsByTagName("script"),_=0;_<y.length;_+=1)y[_].src.indexOf(p)>-1&&y[_].parentNode&&y[_].parentNode.removeChild(y[_]);var S=Vr[p];S&&(delete S.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Vr[p])},h.render=function(){var p=t.globalName,y=this.props;y.asyncScriptOnLoad;var _=y.forwardedRef,S=YF(y,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(S[p]=typeof window[p]<"u"?window[p]:void 0),S.ref=_,E.createElement(o,S)},f})(E.Component),c=E.forwardRef(function(d,f){return E.createElement(l,Wv({},d,{forwardedRef:f}))});return c.displayName="AsyncScriptLoader("+i+")",c.propTypes={asyncScriptOnLoad:Kn.func},ZF(c,o)}}var Qv="onloadcallback",XF="grecaptcha";function Xv(){return typeof window<"u"&&window.recaptchaOptions||{}}function JF(){var e=Xv(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+Qv+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+Qv+"&render=explicit"}const e$=QF(JF,{callbackName:Qv,globalName:XF,attributes:Xv().nonce?{nonce:Xv().nonce}:{}})(Pf);var t$=Object.defineProperty,n$=Object.defineProperties,r$=Object.getOwnPropertyDescriptors,sf=Object.getOwnPropertySymbols,xT=Object.prototype.hasOwnProperty,RT=Object.prototype.propertyIsEnumerable,JS=(e,t,n)=>t in e?t$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,o$=(e,t)=>{for(var n in t||(t={}))xT.call(t,n)&&JS(e,n,t[n]);if(sf)for(var n of sf(t))RT.call(t,n)&&JS(e,n,t[n]);return e},a$=(e,t)=>n$(e,r$(t)),i$=(e,t)=>{var n={};for(var o in e)xT.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&sf)for(var o of sf(e))t.indexOf(o)<0&&RT.call(e,o)&&(n[o]=e[o]);return n};function s$(e){let t=setTimeout(e,0),n=setTimeout(e,10),o=setTimeout(e,50);return[t,n,o]}function l$(e){let t=E.useRef();return E.useEffect(()=>{t.current=e}),t.current}var c$=18,OT=40,u$=`${OT}px`,d$=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function f$({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:o}){let[i,l]=E.useState(!1),[c,d]=E.useState(!1),[f,h]=E.useState(!1),v=E.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&i&&c,[i,c,n]),p=E.useCallback(()=>{let y=e.current,_=t.current;if(!y||!_||f||n==="none")return;let S=y,w=S.getBoundingClientRect().left+S.offsetWidth,T=S.getBoundingClientRect().top+S.offsetHeight/2,O=w-c$,A=T;document.querySelectorAll(d$).length===0&&document.elementFromPoint(O,A)===y||(l(!0),h(!0))},[e,t,f,n]);return E.useEffect(()=>{let y=e.current;if(!y||n==="none")return;function _(){let w=window.innerWidth-y.getBoundingClientRect().right;d(w>=OT)}_();let S=setInterval(_,1e3);return()=>{clearInterval(S)}},[e,n]),E.useEffect(()=>{let y=o||document.activeElement===t.current;if(n==="none"||!y)return;let _=setTimeout(p,0),S=setTimeout(p,2e3),w=setTimeout(p,5e3),T=setTimeout(()=>{h(!0)},6e3);return()=>{clearTimeout(_),clearTimeout(S),clearTimeout(w),clearTimeout(T)}},[t,o,n,p]),{hasPWMBadge:i,willPushPWMBadge:v,PWM_BADGE_SPACE_WIDTH:u$}}var TT=E.createContext({}),AT=E.forwardRef((e,t)=>{var n=e,{value:o,onChange:i,maxLength:l,textAlign:c="left",pattern:d,placeholder:f,inputMode:h="numeric",onComplete:v,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:y,containerClassName:_,noScriptCSSFallback:S=h$,render:w,children:T}=n,O=i$(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),A,C,R,I,k;let[D,N]=E.useState(typeof O.defaultValue=="string"?O.defaultValue:""),z=o??D,W=l$(z),$=E.useCallback(ge=>{i?.(ge),N(ge)},[i]),q=E.useMemo(()=>d?typeof d=="string"?new RegExp(d):d:null,[d]),j=E.useRef(null),X=E.useRef(null),oe=E.useRef({value:z,onChange:$,isIOS:typeof window<"u"&&((C=(A=window?.CSS)==null?void 0:A.supports)==null?void 0:C.call(A,"-webkit-touch-callout","none"))}),L=E.useRef({prev:[(R=j.current)==null?void 0:R.selectionStart,(I=j.current)==null?void 0:I.selectionEnd,(k=j.current)==null?void 0:k.selectionDirection]});E.useImperativeHandle(t,()=>j.current,[]),E.useEffect(()=>{let ge=j.current,ve=X.current;if(!ge||!ve)return;oe.current.value!==ge.value&&oe.current.onChange(ge.value),L.current.prev=[ge.selectionStart,ge.selectionEnd,ge.selectionDirection];function Re(){if(document.activeElement!==ge){Q(null),se(null);return}let Ue=ge.selectionStart,Qe=ge.selectionEnd,U=ge.selectionDirection,Z=ge.maxLength,Y=ge.value,ue=L.current.prev,pe=-1,he=-1,xe;if(Y.length!==0&&Ue!==null&&Qe!==null){let Mn=Ue===Qe,Tt=Ue===Y.length&&Y.length<Z;if(Mn&&!Tt){let Zt=Ue;if(Zt===0)pe=0,he=1,xe="forward";else if(Zt===Z)pe=Zt-1,he=Zt,xe="backward";else if(Z>1&&Y.length>1){let At=0;if(ue[0]!==null&&ue[1]!==null){xe=Zt<ue[1]?"backward":"forward";let an=ue[0]===ue[1]&&ue[0]<Z;xe==="backward"&&!an&&(At=-1)}pe=At+Zt,he=At+Zt+1}}pe!==-1&&he!==-1&&pe!==he&&j.current.setSelectionRange(pe,he,xe)}let Be=pe!==-1?pe:Ue,Ze=he!==-1?he:Qe,ft=xe??U;Q(Be),se(Ze),L.current.prev=[Be,Ze,ft]}if(document.addEventListener("selectionchange",Re,{capture:!0}),Re(),document.activeElement===ge&&ye(!0),!document.getElementById("input-otp-style")){let Ue=document.createElement("style");if(Ue.id="input-otp-style",document.head.appendChild(Ue),Ue.sheet){let Qe="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";$l(Ue.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),$l(Ue.sheet,`[data-input-otp]:autofill { ${Qe} }`),$l(Ue.sheet,`[data-input-otp]:-webkit-autofill { ${Qe} }`),$l(Ue.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),$l(Ue.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ke=()=>{ve&&ve.style.setProperty("--root-height",`${ge.clientHeight}px`)};ke();let et=new ResizeObserver(ke);return et.observe(ge),()=>{document.removeEventListener("selectionchange",Re,{capture:!0}),et.disconnect()}},[]);let[F,G]=E.useState(!1),[re,ye]=E.useState(!1),[P,Q]=E.useState(null),[te,se]=E.useState(null);E.useEffect(()=>{s$(()=>{var ge,ve,Re,ke;(ge=j.current)==null||ge.dispatchEvent(new Event("input"));let et=(ve=j.current)==null?void 0:ve.selectionStart,Ue=(Re=j.current)==null?void 0:Re.selectionEnd,Qe=(ke=j.current)==null?void 0:ke.selectionDirection;et!==null&&Ue!==null&&(Q(et),se(Ue),L.current.prev=[et,Ue,Qe])})},[z,re]),E.useEffect(()=>{W!==void 0&&z!==W&&W.length<l&&z.length===l&&v?.(z)},[l,v,W,z]);let me=f$({containerRef:X,inputRef:j,pushPasswordManagerStrategy:p,isFocused:re}),_e=E.useCallback(ge=>{let ve=ge.currentTarget.value.slice(0,l);if(ve.length>0&&q&&!q.test(ve)){ge.preventDefault();return}typeof W=="string"&&ve.length<W.length&&document.dispatchEvent(new Event("selectionchange")),$(ve)},[l,$,W,q]),be=E.useCallback(()=>{var ge;if(j.current){let ve=Math.min(j.current.value.length,l-1),Re=j.current.value.length;(ge=j.current)==null||ge.setSelectionRange(ve,Re),Q(ve),se(Re)}ye(!0)},[l]),Se=E.useCallback(ge=>{var ve,Re;let ke=j.current;if(!y&&(!oe.current.isIOS||!ge.clipboardData||!ke))return;let et=ge.clipboardData.getData("text/plain"),Ue=y?y(et):et;ge.preventDefault();let Qe=(ve=j.current)==null?void 0:ve.selectionStart,U=(Re=j.current)==null?void 0:Re.selectionEnd,Z=(Qe!==U?z.slice(0,Qe)+Ue+z.slice(U):z.slice(0,Qe)+Ue+z.slice(Qe)).slice(0,l);if(Z.length>0&&q&&!q.test(Z))return;ke.value=Z,$(Z);let Y=Math.min(Z.length,l-1),ue=Z.length;ke.setSelectionRange(Y,ue),Q(Y),se(ue)},[l,$,q,z]),De=E.useMemo(()=>({position:"relative",cursor:O.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[O.disabled]),Le=E.useMemo(()=>({position:"absolute",inset:0,width:me.willPushPWMBadge?`calc(100% + ${me.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:me.willPushPWMBadge?`inset(0 ${me.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:c,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[me.PWM_BADGE_SPACE_WIDTH,me.willPushPWMBadge,c]),Ee=E.useMemo(()=>E.createElement("input",a$(o$({autoComplete:O.autoComplete||"one-time-code"},O),{"data-input-otp":!0,"data-input-otp-placeholder-shown":z.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":te,inputMode:h,pattern:q?.source,"aria-placeholder":f,style:Le,maxLength:l,value:z,ref:j,onPaste:ge=>{var ve;Se(ge),(ve=O.onPaste)==null||ve.call(O,ge)},onChange:_e,onMouseOver:ge=>{var ve;G(!0),(ve=O.onMouseOver)==null||ve.call(O,ge)},onMouseLeave:ge=>{var ve;G(!1),(ve=O.onMouseLeave)==null||ve.call(O,ge)},onFocus:ge=>{var ve;be(),(ve=O.onFocus)==null||ve.call(O,ge)},onBlur:ge=>{var ve;ye(!1),(ve=O.onBlur)==null||ve.call(O,ge)}})),[_e,be,Se,h,Le,l,te,P,O,q?.source,z]),ze=E.useMemo(()=>({slots:Array.from({length:l}).map((ge,ve)=>{var Re;let ke=re&&P!==null&&te!==null&&(P===te&&ve===P||ve>=P&&ve<te),et=z[ve]!==void 0?z[ve]:null,Ue=z[0]!==void 0?null:(Re=f?.[ve])!=null?Re:null;return{char:et,placeholderChar:Ue,isActive:ke,hasFakeCaret:ke&&et===null}}),isFocused:re,isHovering:!O.disabled&&F}),[re,F,l,te,P,O.disabled,z]),Nt=E.useMemo(()=>w?w(ze):E.createElement(TT.Provider,{value:ze},T),[T,ze,w]);return E.createElement(E.Fragment,null,S!==null&&E.createElement("noscript",null,E.createElement("style",null,S)),E.createElement("div",{ref:X,"data-input-otp-container":!0,style:De,className:_},Nt,E.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Ee)))});AT.displayName="Input";function $l(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var h$=`
|
|
110
|
+
`+JSON.stringify(n),c=yield _F(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:l},t);this.log("Sentry response",c.status),c.status!==200&&(console.log(c.body),console.error("Failed to send event to Sentry",c))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return Ls(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return Yn.instance.flush(e)}static reset(){Yn._instance=void 0}},vn(Yn,"_instance"),Yn),EF="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",SF="2.3.0",wF="production";function xF(e=!0){if(!e)return VS();Zv.init({dsn:EF,release:SF,environment:wF});let t=Zv.scope;return nF(t),VS(t)}function VS(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&Zv.captureException(t,e)}}}function RF({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:o="anonymous",apihost:i="https://js.hcaptcha.com",cleanup:l=!1,secureApi:c=!1,scriptSource:d=""}={},f){let h=yT(e),v=gT(h);return new Promise((p,y)=>{let _=v.document.createElement("script");_.id=eF,d?_.src=`${d}?onload=${Ad}`:c?_.src=`${i}/1/secure-api.js?onload=${Ad}`:_.src=`${i}/1/api.js?onload=${Ad}`,_.crossOrigin=o,_.async=n;let S=(w,T)=>{try{!c&&l&&h.removeChild(_),T(w)}catch(O){y(O)}};_.onload=w=>S(w,p),_.onerror=w=>{f&&f(_.src),S(w,y)},_.src+=t!==""?`&${t}`:"",h.appendChild(_)})}var md=[];function OF(e={cleanup:!1},t){try{t.addBreadcrumb({category:xa,message:"hCaptcha loader params",data:e});let n=yT(e.scriptLocation),o=gT(n),i=md.find(({scope:c})=>c===o.window);if(i)return t.addBreadcrumb({category:xa,message:"hCaptcha already loaded"}),i.promise;let l=new Promise((c,d)=>Ls(this,null,function*(){try{o.window[Ad]=()=>{t.addBreadcrumb({category:xa,message:"hCaptcha script called onload function"}),c(o.window.hcaptcha)};let f=tF({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl,uj:e.uj});yield RF(cr({query:f},e),h=>{t.captureRequest({url:h,method:"GET"})}),t.addBreadcrumb({category:xa,message:"hCaptcha loaded",data:i})}catch{t.addBreadcrumb({category:xa,message:"hCaptcha failed to load"});let h=md.findIndex(v=>v.scope===o.window);h!==-1&&md.splice(h,1),d(new Error(FS))}}));return md.push({promise:l,scope:o.window}),l}catch(n){return t.captureException(n),Promise.reject(new Error(FS))}}function _T(e,t,n=0){return Ls(this,null,function*(){var o,i;let l=(o=e.maxRetries)!=null?o:2,c=(i=e.retryDelay)!=null?i:1e3,d=n<l?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield OF(e,t)}catch(f){return t.addBreadcrumb({category:xa,message:d}),n>=l?(t.captureException(f),Promise.reject(f)):(t.addBreadcrumb({category:xa,message:`Waiting ${c}ms before retry attempt ${n+1}`}),yield oF(c),n+=1,_T(e,t,n))}})}function TF(){return Ls(this,arguments,function*(e={}){let t=xF(e.sentry);return yield _T(e,t)})}function HS(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function GS(e){return e||document.head}var AF=(function(e){KB(t,e);function t(o){var i;return i=e.call(this,o)||this,i._hcaptcha=void 0,i.renderCaptcha=i.renderCaptcha.bind(Mr(i)),i.resetCaptcha=i.resetCaptcha.bind(Mr(i)),i.removeCaptcha=i.removeCaptcha.bind(Mr(i)),i.isReady=i.isReady.bind(Mr(i)),i._onReady=null,i.loadCaptcha=i.loadCaptcha.bind(Mr(i)),i.handleOnLoad=i.handleOnLoad.bind(Mr(i)),i.handleSubmit=i.handleSubmit.bind(Mr(i)),i.handleExpire=i.handleExpire.bind(Mr(i)),i.handleError=i.handleError.bind(Mr(i)),i.handleOpen=i.handleOpen.bind(Mr(i)),i.handleClose=i.handleClose.bind(Mr(i)),i.handleChallengeExpired=i.handleChallengeExpired.bind(Mr(i)),i.ref=E.createRef(),i.apiScriptRequested=!1,i.sentryHub=null,i.captchaId="",i._pendingExecute=null,i.state={isApiReady:!1,isRemoved:!1,elementId:o.id},i}var n=t.prototype;return n.componentDidMount=function(){var i=this,l=GS(this.props.scriptLocation),c=HS(l);this._hcaptcha=c.window.hcaptcha||void 0;var d=typeof this._hcaptcha<"u";if(d){this.setState({isApiReady:!0},function(){i.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var i=this._hcaptcha,l=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(i.reset(l),i.remove(l))},n.shouldComponentUpdate=function(i,l){return!(this.state.isApiReady!==l.isApiReady||this.state.isRemoved!==l.isRemoved)},n.componentDidUpdate=function(i){var l=this,c=["sitekey","size","theme","tabindex","languageOverride","endpoint"],d=c.every(function(f){return i[f]===l.props[f]});d||this.removeCaptcha(function(){l.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var i=this.props,l=i.apihost,c=i.assethost,d=i.endpoint,f=i.host,h=i.imghost,v=i.languageOverride,p=i.reCaptchaCompat,y=i.reportapi,_=i.sentry,S=i.custom,w=i.loadAsync,T=i.scriptLocation,O=i.scriptSource,A=i.secureApi,C=i.cleanup,R=C===void 0?!0:C,I=i.userJourneys,k={render:"explicit",apihost:l,assethost:c,endpoint:d,hl:v,host:f,imghost:h,recaptchacompat:p===!1?"off":null,reportapi:y,sentry:_,custom:S,loadAsync:w,scriptLocation:T,scriptSource:O,secureApi:A,cleanup:R,uj:I!==void 0?I:!1};TF(k).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(i){var l=this,c=this.props.onReady,d=this.state.isApiReady,f=this.captchaId;if(!(!d||f)){var h=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),v=this._hcaptcha,p=v.render(this.ref.current,h);this.captchaId=p,this.setState({isRemoved:!1},function(){i&&i(),c&&c(),l._onReady&&l._onReady(p)})}},n.resetCaptcha=function(){var i=this._hcaptcha,l=this.captchaId;this.isReady()&&(i.reset(l),this._cancelPendingExecute("hcaptcha-reset"))},n.removeCaptcha=function(i){var l=this,c=this._hcaptcha,d=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){l.captchaId="",c.remove(d),i&&i()})},n.handleOnLoad=function(){var i=this;this.setState({isApiReady:!0},function(){var l=GS(i.props.scriptLocation),c=HS(l);i._hcaptcha=c.window.hcaptcha,i.renderCaptcha(function(){var d=i.props.onLoad;d&&d()})})},n.handleSubmit=function(i){var l=this.props.onVerify,c=this.state.isRemoved,d=this._hcaptcha,f=this.captchaId;if(!(typeof d>"u"||c)){var h=d.getResponse(f),v=d.getRespKey(f);l&&l(h,v)}},n.handleExpire=function(){var i=this.props.onExpire,l=this._hcaptcha,c=this.captchaId;this.isReady()&&(l.reset(c),i&&i())},n.handleError=function(i){var l=this.props.onError,c=this._hcaptcha,d=this.captchaId;this.isReady()&&c.reset(d),l&&l(i)},n.isReady=function(){var i=this.state,l=i.isApiReady,c=i.isRemoved;return l&&!c},n._cancelPendingExecute=function(i){if(this._pendingExecute){var l=this._pendingExecute;this._pendingExecute=null;var c=new Error(i);l.reject(c)}},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(i){var l=this;i===void 0&&(i=null),i=typeof i=="object"?i:null;try{var c=this._hcaptcha,d=this.captchaId;if(i&&i.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return i&&i.async?new Promise(function(h,v){l._pendingExecute={resolve:h,reject:v},l._onReady=function(p){if(l._pendingExecute)try{var y=c.execute(p,i);y&&typeof y.then=="function"?y.then(function(_){l._pendingExecute=null,h(_)}).catch(function(_){l._pendingExecute=null,v(_)}):(l._pendingExecute=null,v(new Error("hcaptcha-execute-no-promise")))}catch(_){l._pendingExecute=null,v(_)}}}):(this._onReady=function(h){c.execute(h,i)},null);var f=c.execute(d,i);return i&&i.async&&f&&typeof f.then=="function"?new Promise(function(h,v){l._pendingExecute={resolve:h,reject:v},f.then(function(p){l._pendingExecute=null,h(p)}).catch(function(p){l._pendingExecute=null,v(p)})}):f}catch(h){return i&&i.async?Promise.reject(h):null}},n.close=function(){var i=this._hcaptcha,l=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return i.close(l)},n.setData=function(i){var l=this._hcaptcha,c=this.captchaId;this.isReady()&&(i&&typeof i!="object"&&(i=null),l.setData(c,i))},n.getResponse=function(){var i=this._hcaptcha;return i.getResponse(this.captchaId)},n.getRespKey=function(){var i=this._hcaptcha;return i.getRespKey(this.captchaId)},n.render=function(){var i=this.state.elementId;return E.createElement("div",{ref:this.ref,id:i})},t})(E.Component),CF=({as:e="div",...t},n)=>b.jsx(e,{...t,ref:n}),IF=E.forwardRef(CF),MF="https://challenges.cloudflare.com/turnstile/v0/api.js",f0="cf-turnstile-script",NF="cf-turnstile",h0="onloadTurnstileCallback",ET=e=>!!document.getElementById(e),DF=({render:e="explicit",onLoadCallbackName:t=h0,scriptOptions:{nonce:n="",defer:o=!0,async:i=!0,id:l="",appendTo:c,onError:d,crossOrigin:f=""}={}})=>{let h=l||f0;if(ET(h))return;let v=document.createElement("script");v.id=h,v.src=`${MF}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${v.src}"]`)&&(v.defer=!!o,v.async=!!i,n&&(v.nonce=n),f&&(v.crossOrigin=f),d&&(v.onerror=d,delete window[t]),(c==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(v))},ii={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 LF(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function PF(e=f0){let[t,n]=E.useState(!1);return E.useEffect(()=>{let o=()=>{ET(e)&&n(!0)},i=new MutationObserver(o);return i.observe(document,{childList:!0,subtree:!0}),o(),()=>{i.disconnect()}},[e]),t}var ec="unloaded",ST,kF=new Promise((e,t)=>{ST={resolve:e,reject:t},ec==="ready"&&e(void 0)}),qS=(e=h0)=>(ec==="unloaded"&&(ec="loading",window[e]=()=>{ST.resolve(),ec="ready",delete window[e]}),kF),wT=E.forwardRef((e,t)=>{let{scriptOptions:n,options:o={},siteKey:i,onWidgetLoad:l,onSuccess:c,onExpire:d,onError:f,onBeforeInteractive:h,onAfterInteractive:v,onUnsupported:p,onTimeout:y,onLoadScript:_,id:S,style:w,as:T="div",injectScript:O=!0,rerenderOnCallbackChange:A=!1,...C}=e,R=o.size,I=E.useCallback(()=>typeof R>"u"?{}:o.execution==="execute"?ii.invisible:o.appearance==="interaction-only"?ii.interactionOnly:ii[R],[o.execution,R,o.appearance]),[k,D]=E.useState(I()),N=E.useRef(null),[z,W]=E.useState(!1),$=E.useRef(void 0),q=E.useRef(!1),j=S||NF,X=E.useRef({onSuccess:c,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:v,onUnsupported:p,onTimeout:y});E.useEffect(()=>{A||(X.current={onSuccess:c,onError:f,onExpire:d,onBeforeInteractive:h,onAfterInteractive:v,onUnsupported:p,onTimeout:y})});let oe=n?.id||f0,L=PF(oe),F=n?.onLoadCallbackName||h0,G=o.appearance||"always",re=E.useMemo(()=>({sitekey:i,action:o.action,cData:o.cData,theme:o.theme||"auto",language:o.language||"auto",tabindex:o.tabIndex,"response-field":o.responseField,"response-field-name":o.responseFieldName,size:LF(R),retry:o.retry||"auto","retry-interval":o.retryInterval||8e3,"refresh-expired":o.refreshExpired||"auto","refresh-timeout":o.refreshTimeout||"auto",execution:o.execution||"render",appearance:o.appearance||"always","feedback-enabled":o.feedbackEnabled||!0,callback:P=>{q.current=!0,A?c?.(P):X.current.onSuccess?.(P)},"error-callback":A?f:(...P)=>X.current.onError?.(...P),"expired-callback":A?d:(...P)=>X.current.onExpire?.(...P),"before-interactive-callback":A?h:(...P)=>X.current.onBeforeInteractive?.(...P),"after-interactive-callback":A?v:(...P)=>X.current.onAfterInteractive?.(...P),"unsupported-callback":A?p:(...P)=>X.current.onUnsupported?.(...P),"timeout-callback":A?y:(...P)=>X.current.onTimeout?.(...P)}),[o.action,o.appearance,o.cData,o.execution,o.language,o.refreshExpired,o.responseField,o.responseFieldName,o.retry,o.retryInterval,o.tabIndex,o.theme,o.feedbackEnabled,o.refreshTimeout,i,R,A,A?c:null,A?f:null,A?d:null,A?h:null,A?v:null,A?p:null,A?y:null]),ye=E.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return E.useEffect(function(){O&&!z&&(qS(F),DF({onLoadCallbackName:F,scriptOptions:{...n,id:oe}}))},[O,z,n,oe,F]),E.useEffect(function(){ec!=="ready"&&qS(F).then(()=>W(!0)).catch(console.error)},[F]),E.useEffect(function(){if(!N.current||!z)return;let P=!1;return(async()=>{if(P||!N.current)return;let Q=window.turnstile.render(N.current,re);$.current=Q,$.current&&l?.($.current)})(),()=>{P=!0,$.current&&(window.turnstile.remove($.current),q.current=!1)}},[j,z,re]),E.useImperativeHandle(t,()=>{let{turnstile:P}=window;return{getResponse(){if(!P?.getResponse||!$.current||!ye()){console.warn("Turnstile has not been loaded");return}return P.getResponse($.current)},async getResponsePromise(Q=3e4,te=100){return new Promise((se,me)=>{let _e,be=async()=>{if(q.current&&window.turnstile&&$.current)try{let Se=window.turnstile.getResponse($.current);return _e&&clearTimeout(_e),Se?se(Se):me(new Error("No response received"))}catch(Se){return _e&&clearTimeout(_e),console.warn("Failed to get response",Se),me(new Error("Failed to get response"))}_e||(_e=setTimeout(()=>{_e&&clearTimeout(_e),me(new Error("Timeout"))},Q)),await new Promise(Se=>setTimeout(Se,te)),await be()};be()})},reset(){if(!P?.reset||!$.current||!ye()){console.warn("Turnstile has not been loaded");return}o.execution==="execute"&&D(ii.invisible);try{q.current=!1,P.reset($.current)}catch(Q){console.warn(`Failed to reset Turnstile widget ${$}`,Q)}},remove(){if(!P?.remove||!$.current||!ye()){console.warn("Turnstile has not been loaded");return}D(ii.invisible),q.current=!1,P.remove($.current),$.current=null},render(){if(!P?.render||!N.current||!ye()||$.current){console.warn("Turnstile has not been loaded or container not found");return}let Q=P.render(N.current,re);return $.current=Q,$.current&&l?.($.current),o.execution!=="execute"&&D(R?ii[R]:{}),Q},execute(){if(o.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!P?.execute||!N.current||!$.current||!ye()){console.warn("Turnstile has not been loaded or container not found");return}P.execute(N.current,re),D(R?ii[R]:{})},isExpired(){return!P?.isExpired||!$.current||!ye()?(console.warn("Turnstile has not been loaded"),!1):P.isExpired($.current)}}},[$,o.execution,R,re,N,ye,z,l]),E.useEffect(()=>{if(z||!L)return;if(window.turnstile){W(!0);return}let P=setInterval(()=>{window.turnstile&&(W(!0),clearInterval(P))},50);return()=>{clearInterval(P)}},[z,L]),E.useEffect(()=>{D(I())},[o.execution,R,G]),E.useEffect(()=>{!L||typeof _!="function"||_()},[L]),b.jsx(IF,{ref:N,as:T,id:j,style:{...k,...w},...C})});wT.displayName="Turnstile";var Hm={exports:{}},Gm,ZS;function jF(){if(ZS)return Gm;ZS=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gm=e,Gm}var qm,YS;function zF(){if(YS)return qm;YS=1;var e=jF();function t(){}function n(){}return n.resetWarningCache=t,qm=function(){function o(c,d,f,h,v,p){if(p!==e){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}o.isRequired=o;function i(){return o}var l={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:i,element:o,elementType:o,instanceOf:i,node:o,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return l.PropTypes=l,l},qm}var KS;function p0(){return KS||(KS=1,Hm.exports=zF()()),Hm.exports}var UF=p0();const Kn=_i(UF);var BF=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Yv(){return Yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yv.apply(this,arguments)}function FF(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function vd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $F(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Kv(e,t)}function Kv(e,t){return Kv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},Kv(e,t)}var Pf=(function(e){$F(t,e);function t(){var o;return o=e.call(this)||this,o.handleExpired=o.handleExpired.bind(vd(o)),o.handleErrored=o.handleErrored.bind(vd(o)),o.handleChange=o.handleChange.bind(vd(o)),o.handleRecaptchaRef=o.handleRecaptchaRef.bind(vd(o)),o}var n=t.prototype;return n.getCaptchaFunction=function(i){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[i]:this.props.grecaptcha[i]:null},n.getValue=function(){var i=this.getCaptchaFunction("getResponse");return i&&this._widgetId!==void 0?i(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var i=this.getCaptchaFunction("execute");if(i&&this._widgetId!==void 0)return i(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var i=this;return new Promise(function(l,c){i.executionResolve=l,i.executionReject=c,i.execute()})},n.reset=function(){var i=this.getCaptchaFunction("reset");i&&this._widgetId!==void 0&&i(this._widgetId)},n.forceReset=function(){var i=this.getCaptchaFunction("reset");i&&i()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(i){this.props.onChange&&this.props.onChange(i),this.executionResolve&&(this.executionResolve(i),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var i=this.getCaptchaFunction("render");if(i&&this._widgetId===void 0){var l=document.createElement("div");this._widgetId=i(l,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(l)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(i){this.captcha=i},n.render=function(){var i=this.props;i.sitekey,i.onChange,i.theme,i.type,i.tabindex,i.onExpired,i.onErrored,i.size,i.stoken,i.grecaptcha,i.badge,i.hl,i.isolated;var l=FF(i,BF);return E.createElement("div",Yv({},l,{ref:this.handleRecaptchaRef}))},t})(E.Component);Pf.displayName="ReCAPTCHA";Pf.propTypes={sitekey:Kn.string.isRequired,onChange:Kn.func,grecaptcha:Kn.object,theme:Kn.oneOf(["dark","light"]),type:Kn.oneOf(["image","audio"]),tabindex:Kn.number,onExpired:Kn.func,onErrored:Kn.func,size:Kn.oneOf(["compact","normal","invisible"]),stoken:Kn.string,hl:Kn.string,badge:Kn.oneOf(["bottomright","bottomleft","inline"]),isolated:Kn.bool};Pf.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Zm={exports:{}},ht={};var WS;function VF(){if(WS)return ht;WS=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,v=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function C(I){if(typeof I=="object"&&I!==null){var k=I.$$typeof;switch(k){case t:switch(I=I.type,I){case f:case h:case o:case l:case i:case p:return I;default:switch(I=I&&I.$$typeof,I){case d:case v:case S:case _:case c:return I;default:return k}}case n:return k}}}function R(I){return C(I)===h}return ht.AsyncMode=f,ht.ConcurrentMode=h,ht.ContextConsumer=d,ht.ContextProvider=c,ht.Element=t,ht.ForwardRef=v,ht.Fragment=o,ht.Lazy=S,ht.Memo=_,ht.Portal=n,ht.Profiler=l,ht.StrictMode=i,ht.Suspense=p,ht.isAsyncMode=function(I){return R(I)||C(I)===f},ht.isConcurrentMode=R,ht.isContextConsumer=function(I){return C(I)===d},ht.isContextProvider=function(I){return C(I)===c},ht.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===t},ht.isForwardRef=function(I){return C(I)===v},ht.isFragment=function(I){return C(I)===o},ht.isLazy=function(I){return C(I)===S},ht.isMemo=function(I){return C(I)===_},ht.isPortal=function(I){return C(I)===n},ht.isProfiler=function(I){return C(I)===l},ht.isStrictMode=function(I){return C(I)===i},ht.isSuspense=function(I){return C(I)===p},ht.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===o||I===h||I===l||I===i||I===p||I===y||typeof I=="object"&&I!==null&&(I.$$typeof===S||I.$$typeof===_||I.$$typeof===c||I.$$typeof===d||I.$$typeof===v||I.$$typeof===T||I.$$typeof===O||I.$$typeof===A||I.$$typeof===w)},ht.typeOf=C,ht}var QS;function HF(){return QS||(QS=1,Zm.exports=VF()),Zm.exports}var Ym,XS;function GF(){if(XS)return Ym;XS=1;var e=HF(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};l[e.ForwardRef]=o,l[e.Memo]=i;function c(S){return e.isMemo(S)?i:l[S.$$typeof]||t}var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,v=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,y=Object.prototype;function _(S,w,T){if(typeof w!="string"){if(y){var O=p(w);O&&O!==y&&_(S,O,T)}var A=f(w);h&&(A=A.concat(h(w)));for(var C=c(S),R=c(w),I=0;I<A.length;++I){var k=A[I];if(!n[k]&&!(T&&T[k])&&!(R&&R[k])&&!(C&&C[k])){var D=v(w,k);try{d(S,k,D)}catch{}}}}return S}return Ym=_,Ym}var qF=GF();const ZF=_i(qF);function Wv(){return Wv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Wv.apply(this,arguments)}function YF(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function KF(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Vr={},WF=0;function QF(e,t){return t=t||{},function(o){var i=o.displayName||o.name||"Component",l=(function(d){KF(f,d);function f(v,p){var y;return y=d.call(this,v,p)||this,y.state={},y.__scriptURL="",y}var h=f.prototype;return h.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+WF++),this.__scriptLoaderID},h.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},h.asyncScriptLoaderHandleLoad=function(p){var y=this;this.setState(p,function(){return y.props.asyncScriptOnLoad&&y.props.asyncScriptOnLoad(y.state)})},h.asyncScriptLoaderTriggerOnScriptLoaded=function(){var p=Vr[this.__scriptURL];if(!p||!p.loaded)throw new Error("Script is not loaded.");for(var y in p.observers)p.observers[y](p);delete window[t.callbackName]},h.componentDidMount=function(){var p=this,y=this.setupScriptURL(),_=this.asyncScriptLoaderGetScriptLoaderID(),S=t,w=S.globalName,T=S.callbackName,O=S.scriptId;if(w&&typeof window[w]<"u"&&(Vr[y]={loaded:!0,observers:{}}),Vr[y]){var A=Vr[y];if(A&&(A.loaded||A.errored)){this.asyncScriptLoaderHandleLoad(A);return}A.observers[_]=function(D){return p.asyncScriptLoaderHandleLoad(D)};return}var C={};C[_]=function(D){return p.asyncScriptLoaderHandleLoad(D)},Vr[y]={loaded:!1,observers:C};var R=document.createElement("script");R.src=y,R.async=!0;for(var I in t.attributes)R.setAttribute(I,t.attributes[I]);O&&(R.id=O);var k=function(N){if(Vr[y]){var z=Vr[y],W=z.observers;for(var $ in W)N(W[$])&&delete W[$]}};T&&typeof window<"u"&&(window[T]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),R.onload=function(){var D=Vr[y];D&&(D.loaded=!0,k(function(N){return T?!1:(N(D),!0)}))},R.onerror=function(){var D=Vr[y];D&&(D.errored=!0,k(function(N){return N(D),!0}))},document.body.appendChild(R)},h.componentWillUnmount=function(){var p=this.__scriptURL;if(t.removeOnUnmount===!0)for(var y=document.getElementsByTagName("script"),_=0;_<y.length;_+=1)y[_].src.indexOf(p)>-1&&y[_].parentNode&&y[_].parentNode.removeChild(y[_]);var S=Vr[p];S&&(delete S.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Vr[p])},h.render=function(){var p=t.globalName,y=this.props;y.asyncScriptOnLoad;var _=y.forwardedRef,S=YF(y,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(S[p]=typeof window[p]<"u"?window[p]:void 0),S.ref=_,E.createElement(o,S)},f})(E.Component),c=E.forwardRef(function(d,f){return E.createElement(l,Wv({},d,{forwardedRef:f}))});return c.displayName="AsyncScriptLoader("+i+")",c.propTypes={asyncScriptOnLoad:Kn.func},ZF(c,o)}}var Qv="onloadcallback",XF="grecaptcha";function Xv(){return typeof window<"u"&&window.recaptchaOptions||{}}function JF(){var e=Xv(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+Qv+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+Qv+"&render=explicit"}const e$=QF(JF,{callbackName:Qv,globalName:XF,attributes:Xv().nonce?{nonce:Xv().nonce}:{}})(Pf);var t$=Object.defineProperty,n$=Object.defineProperties,r$=Object.getOwnPropertyDescriptors,lf=Object.getOwnPropertySymbols,xT=Object.prototype.hasOwnProperty,RT=Object.prototype.propertyIsEnumerable,JS=(e,t,n)=>t in e?t$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,o$=(e,t)=>{for(var n in t||(t={}))xT.call(t,n)&&JS(e,n,t[n]);if(lf)for(var n of lf(t))RT.call(t,n)&&JS(e,n,t[n]);return e},a$=(e,t)=>n$(e,r$(t)),i$=(e,t)=>{var n={};for(var o in e)xT.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&lf)for(var o of lf(e))t.indexOf(o)<0&&RT.call(e,o)&&(n[o]=e[o]);return n};function s$(e){let t=setTimeout(e,0),n=setTimeout(e,10),o=setTimeout(e,50);return[t,n,o]}function l$(e){let t=E.useRef();return E.useEffect(()=>{t.current=e}),t.current}var c$=18,OT=40,u$=`${OT}px`,d$=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function f$({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:o}){let[i,l]=E.useState(!1),[c,d]=E.useState(!1),[f,h]=E.useState(!1),v=E.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&i&&c,[i,c,n]),p=E.useCallback(()=>{let y=e.current,_=t.current;if(!y||!_||f||n==="none")return;let S=y,w=S.getBoundingClientRect().left+S.offsetWidth,T=S.getBoundingClientRect().top+S.offsetHeight/2,O=w-c$,A=T;document.querySelectorAll(d$).length===0&&document.elementFromPoint(O,A)===y||(l(!0),h(!0))},[e,t,f,n]);return E.useEffect(()=>{let y=e.current;if(!y||n==="none")return;function _(){let w=window.innerWidth-y.getBoundingClientRect().right;d(w>=OT)}_();let S=setInterval(_,1e3);return()=>{clearInterval(S)}},[e,n]),E.useEffect(()=>{let y=o||document.activeElement===t.current;if(n==="none"||!y)return;let _=setTimeout(p,0),S=setTimeout(p,2e3),w=setTimeout(p,5e3),T=setTimeout(()=>{h(!0)},6e3);return()=>{clearTimeout(_),clearTimeout(S),clearTimeout(w),clearTimeout(T)}},[t,o,n,p]),{hasPWMBadge:i,willPushPWMBadge:v,PWM_BADGE_SPACE_WIDTH:u$}}var TT=E.createContext({}),AT=E.forwardRef((e,t)=>{var n=e,{value:o,onChange:i,maxLength:l,textAlign:c="left",pattern:d,placeholder:f,inputMode:h="numeric",onComplete:v,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:y,containerClassName:_,noScriptCSSFallback:S=h$,render:w,children:T}=n,O=i$(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),A,C,R,I,k;let[D,N]=E.useState(typeof O.defaultValue=="string"?O.defaultValue:""),z=o??D,W=l$(z),$=E.useCallback(ge=>{i?.(ge),N(ge)},[i]),q=E.useMemo(()=>d?typeof d=="string"?new RegExp(d):d:null,[d]),j=E.useRef(null),X=E.useRef(null),oe=E.useRef({value:z,onChange:$,isIOS:typeof window<"u"&&((C=(A=window?.CSS)==null?void 0:A.supports)==null?void 0:C.call(A,"-webkit-touch-callout","none"))}),L=E.useRef({prev:[(R=j.current)==null?void 0:R.selectionStart,(I=j.current)==null?void 0:I.selectionEnd,(k=j.current)==null?void 0:k.selectionDirection]});E.useImperativeHandle(t,()=>j.current,[]),E.useEffect(()=>{let ge=j.current,ve=X.current;if(!ge||!ve)return;oe.current.value!==ge.value&&oe.current.onChange(ge.value),L.current.prev=[ge.selectionStart,ge.selectionEnd,ge.selectionDirection];function Re(){if(document.activeElement!==ge){Q(null),se(null);return}let Ue=ge.selectionStart,Qe=ge.selectionEnd,U=ge.selectionDirection,Z=ge.maxLength,Y=ge.value,ue=L.current.prev,pe=-1,he=-1,xe;if(Y.length!==0&&Ue!==null&&Qe!==null){let Mn=Ue===Qe,Tt=Ue===Y.length&&Y.length<Z;if(Mn&&!Tt){let Zt=Ue;if(Zt===0)pe=0,he=1,xe="forward";else if(Zt===Z)pe=Zt-1,he=Zt,xe="backward";else if(Z>1&&Y.length>1){let At=0;if(ue[0]!==null&&ue[1]!==null){xe=Zt<ue[1]?"backward":"forward";let an=ue[0]===ue[1]&&ue[0]<Z;xe==="backward"&&!an&&(At=-1)}pe=At+Zt,he=At+Zt+1}}pe!==-1&&he!==-1&&pe!==he&&j.current.setSelectionRange(pe,he,xe)}let Be=pe!==-1?pe:Ue,Ze=he!==-1?he:Qe,ft=xe??U;Q(Be),se(Ze),L.current.prev=[Be,Ze,ft]}if(document.addEventListener("selectionchange",Re,{capture:!0}),Re(),document.activeElement===ge&&ye(!0),!document.getElementById("input-otp-style")){let Ue=document.createElement("style");if(Ue.id="input-otp-style",document.head.appendChild(Ue),Ue.sheet){let Qe="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";$l(Ue.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),$l(Ue.sheet,`[data-input-otp]:autofill { ${Qe} }`),$l(Ue.sheet,`[data-input-otp]:-webkit-autofill { ${Qe} }`),$l(Ue.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),$l(Ue.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ke=()=>{ve&&ve.style.setProperty("--root-height",`${ge.clientHeight}px`)};ke();let et=new ResizeObserver(ke);return et.observe(ge),()=>{document.removeEventListener("selectionchange",Re,{capture:!0}),et.disconnect()}},[]);let[F,G]=E.useState(!1),[re,ye]=E.useState(!1),[P,Q]=E.useState(null),[te,se]=E.useState(null);E.useEffect(()=>{s$(()=>{var ge,ve,Re,ke;(ge=j.current)==null||ge.dispatchEvent(new Event("input"));let et=(ve=j.current)==null?void 0:ve.selectionStart,Ue=(Re=j.current)==null?void 0:Re.selectionEnd,Qe=(ke=j.current)==null?void 0:ke.selectionDirection;et!==null&&Ue!==null&&(Q(et),se(Ue),L.current.prev=[et,Ue,Qe])})},[z,re]),E.useEffect(()=>{W!==void 0&&z!==W&&W.length<l&&z.length===l&&v?.(z)},[l,v,W,z]);let me=f$({containerRef:X,inputRef:j,pushPasswordManagerStrategy:p,isFocused:re}),_e=E.useCallback(ge=>{let ve=ge.currentTarget.value.slice(0,l);if(ve.length>0&&q&&!q.test(ve)){ge.preventDefault();return}typeof W=="string"&&ve.length<W.length&&document.dispatchEvent(new Event("selectionchange")),$(ve)},[l,$,W,q]),be=E.useCallback(()=>{var ge;if(j.current){let ve=Math.min(j.current.value.length,l-1),Re=j.current.value.length;(ge=j.current)==null||ge.setSelectionRange(ve,Re),Q(ve),se(Re)}ye(!0)},[l]),Se=E.useCallback(ge=>{var ve,Re;let ke=j.current;if(!y&&(!oe.current.isIOS||!ge.clipboardData||!ke))return;let et=ge.clipboardData.getData("text/plain"),Ue=y?y(et):et;ge.preventDefault();let Qe=(ve=j.current)==null?void 0:ve.selectionStart,U=(Re=j.current)==null?void 0:Re.selectionEnd,Z=(Qe!==U?z.slice(0,Qe)+Ue+z.slice(U):z.slice(0,Qe)+Ue+z.slice(Qe)).slice(0,l);if(Z.length>0&&q&&!q.test(Z))return;ke.value=Z,$(Z);let Y=Math.min(Z.length,l-1),ue=Z.length;ke.setSelectionRange(Y,ue),Q(Y),se(ue)},[l,$,q,z]),De=E.useMemo(()=>({position:"relative",cursor:O.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[O.disabled]),Le=E.useMemo(()=>({position:"absolute",inset:0,width:me.willPushPWMBadge?`calc(100% + ${me.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:me.willPushPWMBadge?`inset(0 ${me.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:c,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[me.PWM_BADGE_SPACE_WIDTH,me.willPushPWMBadge,c]),Ee=E.useMemo(()=>E.createElement("input",a$(o$({autoComplete:O.autoComplete||"one-time-code"},O),{"data-input-otp":!0,"data-input-otp-placeholder-shown":z.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":te,inputMode:h,pattern:q?.source,"aria-placeholder":f,style:Le,maxLength:l,value:z,ref:j,onPaste:ge=>{var ve;Se(ge),(ve=O.onPaste)==null||ve.call(O,ge)},onChange:_e,onMouseOver:ge=>{var ve;G(!0),(ve=O.onMouseOver)==null||ve.call(O,ge)},onMouseLeave:ge=>{var ve;G(!1),(ve=O.onMouseLeave)==null||ve.call(O,ge)},onFocus:ge=>{var ve;be(),(ve=O.onFocus)==null||ve.call(O,ge)},onBlur:ge=>{var ve;ye(!1),(ve=O.onBlur)==null||ve.call(O,ge)}})),[_e,be,Se,h,Le,l,te,P,O,q?.source,z]),ze=E.useMemo(()=>({slots:Array.from({length:l}).map((ge,ve)=>{var Re;let ke=re&&P!==null&&te!==null&&(P===te&&ve===P||ve>=P&&ve<te),et=z[ve]!==void 0?z[ve]:null,Ue=z[0]!==void 0?null:(Re=f?.[ve])!=null?Re:null;return{char:et,placeholderChar:Ue,isActive:ke,hasFakeCaret:ke&&et===null}}),isFocused:re,isHovering:!O.disabled&&F}),[re,F,l,te,P,O.disabled,z]),Nt=E.useMemo(()=>w?w(ze):E.createElement(TT.Provider,{value:ze},T),[T,ze,w]);return E.createElement(E.Fragment,null,S!==null&&E.createElement("noscript",null,E.createElement("style",null,S)),E.createElement("div",{ref:X,"data-input-otp-container":!0,style:De,className:_},Nt,E.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Ee)))});AT.displayName="Input";function $l(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var h$=`
|
|
111
111
|
[data-input-otp] {
|
|
112
112
|
--nojs-bg: white !important;
|
|
113
113
|
--nojs-fg: black !important;
|
|
@@ -126,17 +126,17 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
126
126
|
--nojs-bg: black !important;
|
|
127
127
|
--nojs-fg: white !important;
|
|
128
128
|
}
|
|
129
|
-
}`,gs={},Km,ew;function CT(){return ew||(ew=1,Km={L:1,M:0,Q:3,H:2}),Km}var Wm,tw;function IT(){return tw||(tw=1,Wm={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),Wm}var Qm,nw;function p$(){if(nw)return Qm;nw=1;var e=IT();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var o=0;o<this.data.length;o++)n.put(this.data.charCodeAt(o),8)}},Qm=t,Qm}var Xm,rw;function m$(){if(rw)return Xm;rw=1;var e=CT();function t(n,o){this.totalCount=n,this.dataCount=o}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,o){var i=t.getRsBlockTable(n,o);if(i==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+o);for(var l=i.length/3,c=new Array,d=0;d<l;d++)for(var f=i[d*3+0],h=i[d*3+1],v=i[d*3+2],p=0;p<f;p++)c.push(new t(h,v));return c},t.getRsBlockTable=function(n,o){switch(o){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},Xm=t,Xm}var Jm,ow;function v$(){if(ow)return Jm;ow=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var o=0;o<n;o++)this.putBit((t>>>n-o-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Jm=e,Jm}var ev,aw;function MT(){if(aw)return ev;aw=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return ev=e,ev}var tv,iw;function NT(){if(iw)return tv;iw=1;var e=MT();function t(n,o){if(n.length==null)throw new Error(n.length+"/"+o);for(var i=0;i<n.length&&n[i]==0;)i++;this.num=new Array(n.length-i+o);for(var l=0;l<n.length-i;l++)this.num[l]=n[l+i]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var o=new Array(this.getLength()+n.getLength()-1),i=0;i<this.getLength();i++)for(var l=0;l<n.getLength();l++)o[i+l]^=e.gexp(e.glog(this.get(i))+e.glog(n.get(l)));return new t(o,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var o=e.glog(this.get(0))-e.glog(n.get(0)),i=new Array(this.getLength()),l=0;l<this.getLength();l++)i[l]=this.get(l);for(var l=0;l<n.getLength();l++)i[l]^=e.gexp(e.glog(n.get(l))+o);return new t(i,0).mod(n)}},tv=t,tv}var nv,sw;function g$(){if(sw)return nv;sw=1;var e=IT(),t=NT(),n=MT(),o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(l){for(var c=l<<10;i.getBCHDigit(c)-i.getBCHDigit(i.G15)>=0;)c^=i.G15<<i.getBCHDigit(c)-i.getBCHDigit(i.G15);return(l<<10|c)^i.G15_MASK},getBCHTypeNumber:function(l){for(var c=l<<12;i.getBCHDigit(c)-i.getBCHDigit(i.G18)>=0;)c^=i.G18<<i.getBCHDigit(c)-i.getBCHDigit(i.G18);return l<<12|c},getBCHDigit:function(l){for(var c=0;l!=0;)c++,l>>>=1;return c},getPatternPosition:function(l){return i.PATTERN_POSITION_TABLE[l-1]},getMask:function(l,c,d){switch(l){case o.PATTERN000:return(c+d)%2==0;case o.PATTERN001:return c%2==0;case o.PATTERN010:return d%3==0;case o.PATTERN011:return(c+d)%3==0;case o.PATTERN100:return(Math.floor(c/2)+Math.floor(d/3))%2==0;case o.PATTERN101:return c*d%2+c*d%3==0;case o.PATTERN110:return(c*d%2+c*d%3)%2==0;case o.PATTERN111:return(c*d%3+(c+d)%2)%2==0;default:throw new Error("bad maskPattern:"+l)}},getErrorCorrectPolynomial:function(l){for(var c=new t([1],0),d=0;d<l;d++)c=c.multiply(new t([1,n.gexp(d)],0));return c},getLengthInBits:function(l,c){if(1<=c&&c<10)switch(l){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+l)}else if(c<27)switch(l){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+l)}else if(c<41)switch(l){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+l)}else throw new Error("type:"+c)},getLostPoint:function(l){for(var c=l.getModuleCount(),d=0,f=0;f<c;f++)for(var h=0;h<c;h++){for(var v=0,p=l.isDark(f,h),y=-1;y<=1;y++)if(!(f+y<0||c<=f+y))for(var _=-1;_<=1;_++)h+_<0||c<=h+_||y==0&&_==0||p==l.isDark(f+y,h+_)&&v++;v>5&&(d+=3+v-5)}for(var f=0;f<c-1;f++)for(var h=0;h<c-1;h++){var S=0;l.isDark(f,h)&&S++,l.isDark(f+1,h)&&S++,l.isDark(f,h+1)&&S++,l.isDark(f+1,h+1)&&S++,(S==0||S==4)&&(d+=3)}for(var f=0;f<c;f++)for(var h=0;h<c-6;h++)l.isDark(f,h)&&!l.isDark(f,h+1)&&l.isDark(f,h+2)&&l.isDark(f,h+3)&&l.isDark(f,h+4)&&!l.isDark(f,h+5)&&l.isDark(f,h+6)&&(d+=40);for(var h=0;h<c;h++)for(var f=0;f<c-6;f++)l.isDark(f,h)&&!l.isDark(f+1,h)&&l.isDark(f+2,h)&&l.isDark(f+3,h)&&l.isDark(f+4,h)&&!l.isDark(f+5,h)&&l.isDark(f+6,h)&&(d+=40);for(var w=0,h=0;h<c;h++)for(var f=0;f<c;f++)l.isDark(f,h)&&w++;var T=Math.abs(100*w/c/c-50)/5;return d+=T*10,d}};return nv=i,nv}var rv,lw;function y$(){if(lw)return rv;lw=1;var e=p$(),t=m$(),n=v$(),o=g$(),i=NT();function l(d,f){this.typeNumber=d,this.errorCorrectLevel=f,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;return c.addData=function(d){var f=new e(d);this.dataList.push(f),this.dataCache=null},c.isDark=function(d,f){if(d<0||this.moduleCount<=d||f<0||this.moduleCount<=f)throw new Error(d+","+f);return this.modules[d][f]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var d=1;for(d=1;d<40;d++){for(var f=t.getRSBlocks(d,this.errorCorrectLevel),h=new n,v=0,p=0;p<f.length;p++)v+=f[p].dataCount;for(var p=0;p<this.dataList.length;p++){var y=this.dataList[p];h.put(y.mode,4),h.put(y.getLength(),o.getLengthInBits(y.mode,d)),y.write(h)}if(h.getLengthInBits()<=v*8)break}this.typeNumber=d}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(d,f){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var v=0;v<this.moduleCount;v++)this.modules[h][v]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(d,f),this.typeNumber>=7&&this.setupTypeNumber(d),this.dataCache==null&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,f)},c.setupPositionProbePattern=function(d,f){for(var h=-1;h<=7;h++)if(!(d+h<=-1||this.moduleCount<=d+h))for(var v=-1;v<=7;v++)f+v<=-1||this.moduleCount<=f+v||(0<=h&&h<=6&&(v==0||v==6)||0<=v&&v<=6&&(h==0||h==6)||2<=h&&h<=4&&2<=v&&v<=4?this.modules[d+h][f+v]=!0:this.modules[d+h][f+v]=!1)},c.getBestMaskPattern=function(){for(var d=0,f=0,h=0;h<8;h++){this.makeImpl(!0,h);var v=o.getLostPoint(this);(h==0||d>v)&&(d=v,f=h)}return f},c.createMovieClip=function(d,f,h){var v=d.createEmptyMovieClip(f,h),p=1;this.make();for(var y=0;y<this.modules.length;y++)for(var _=y*p,S=0;S<this.modules[y].length;S++){var w=S*p,T=this.modules[y][S];T&&(v.beginFill(0,100),v.moveTo(w,_),v.lineTo(w+p,_),v.lineTo(w+p,_+p),v.lineTo(w,_+p),v.endFill())}return v},c.setupTimingPattern=function(){for(var d=8;d<this.moduleCount-8;d++)this.modules[d][6]==null&&(this.modules[d][6]=d%2==0);for(var f=8;f<this.moduleCount-8;f++)this.modules[6][f]==null&&(this.modules[6][f]=f%2==0)},c.setupPositionAdjustPattern=function(){for(var d=o.getPatternPosition(this.typeNumber),f=0;f<d.length;f++)for(var h=0;h<d.length;h++){var v=d[f],p=d[h];if(this.modules[v][p]==null)for(var y=-2;y<=2;y++)for(var _=-2;_<=2;_++)y==-2||y==2||_==-2||_==2||y==0&&_==0?this.modules[v+y][p+_]=!0:this.modules[v+y][p+_]=!1}},c.setupTypeNumber=function(d){for(var f=o.getBCHTypeNumber(this.typeNumber),h=0;h<18;h++){var v=!d&&(f>>h&1)==1;this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=v}for(var h=0;h<18;h++){var v=!d&&(f>>h&1)==1;this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=v}},c.setupTypeInfo=function(d,f){for(var h=this.errorCorrectLevel<<3|f,v=o.getBCHTypeInfo(h),p=0;p<15;p++){var y=!d&&(v>>p&1)==1;p<6?this.modules[p][8]=y:p<8?this.modules[p+1][8]=y:this.modules[this.moduleCount-15+p][8]=y}for(var p=0;p<15;p++){var y=!d&&(v>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=y:p<9?this.modules[8][15-p-1+1]=y:this.modules[8][15-p-1]=y}this.modules[this.moduleCount-8][8]=!d},c.mapData=function(d,f){for(var h=-1,v=this.moduleCount-1,p=7,y=0,_=this.moduleCount-1;_>0;_-=2)for(_==6&&_--;;){for(var S=0;S<2;S++)if(this.modules[v][_-S]==null){var w=!1;y<d.length&&(w=(d[y]>>>p&1)==1);var T=o.getMask(f,v,_-S);T&&(w=!w),this.modules[v][_-S]=w,p--,p==-1&&(y++,p=7)}if(v+=h,v<0||this.moduleCount<=v){v-=h,h=-h;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(d,f,h){for(var v=t.getRSBlocks(d,f),p=new n,y=0;y<h.length;y++){var _=h[y];p.put(_.mode,4),p.put(_.getLength(),o.getLengthInBits(_.mode,d)),_.write(p)}for(var S=0,y=0;y<v.length;y++)S+=v[y].dataCount;if(p.getLengthInBits()>S*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+S*8+")");for(p.getLengthInBits()+4<=S*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=S*8||(p.put(l.PAD0,8),p.getLengthInBits()>=S*8));)p.put(l.PAD1,8);return l.createBytes(p,v)},l.createBytes=function(d,f){for(var h=0,v=0,p=0,y=new Array(f.length),_=new Array(f.length),S=0;S<f.length;S++){var w=f[S].dataCount,T=f[S].totalCount-w;v=Math.max(v,w),p=Math.max(p,T),y[S]=new Array(w);for(var O=0;O<y[S].length;O++)y[S][O]=255&d.buffer[O+h];h+=w;var A=o.getErrorCorrectPolynomial(T),C=new i(y[S],A.getLength()-1),R=C.mod(A);_[S]=new Array(A.getLength()-1);for(var O=0;O<_[S].length;O++){var I=O+R.getLength()-_[S].length;_[S][O]=I>=0?R.get(I):0}}for(var k=0,O=0;O<f.length;O++)k+=f[O].totalCount;for(var D=new Array(k),N=0,O=0;O<v;O++)for(var S=0;S<f.length;S++)O<y[S].length&&(D[N++]=y[S][O]);for(var O=0;O<p;O++)for(var S=0;S<f.length;S++)O<_[S].length&&(D[N++]=_[S][O]);return D},rv=l,rv}var vd={},cw;function b$(){if(cw)return vd;cw=1,Object.defineProperty(vd,"__esModule",{value:!0});var e=Object.assign||function(h){for(var v=1;v<arguments.length;v++){var p=arguments[v];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},t=p0(),n=l(t),o=ka(),i=l(o);function l(h){return h&&h.__esModule?h:{default:h}}function c(h,v){var p={};for(var y in h)v.indexOf(y)>=0||Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}var d={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},f=(0,o.forwardRef)(function(h,v){var p=h.bgColor,y=h.bgD,_=h.fgD,S=h.fgColor,w=h.size,T=h.title,O=h.viewBoxSize,A=h.xmlns,C=A===void 0?"http://www.w3.org/2000/svg":A,R=c(h,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return i.default.createElement("svg",e({},R,{height:w,ref:v,viewBox:"0 0 "+O+" "+O,width:w,xmlns:C}),T?i.default.createElement("title",null,T):null,i.default.createElement("path",{d:y,fill:p}),i.default.createElement("path",{d:_,fill:S}))});return f.displayName="QRCodeSvg",f.propTypes=d,vd.default=f,vd}var uw;function _$(){if(uw)return gs;uw=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.QRCode=void 0;var e=Object.assign||function(w){for(var T=1;T<arguments.length;T++){var O=arguments[T];for(var A in O)Object.prototype.hasOwnProperty.call(O,A)&&(w[A]=O[A])}return w},t=p0(),n=p(t),o=CT(),i=p(o),l=y$(),c=p(l),d=ka(),f=p(d),h=b$(),v=p(h);function p(w){return w&&w.__esModule?w:{default:w}}function y(w,T){var O={};for(var A in w)T.indexOf(A)>=0||Object.prototype.hasOwnProperty.call(w,A)&&(O[A]=w[A]);return O}var _={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},S=(0,d.forwardRef)(function(w,T){var O=w.bgColor,A=O===void 0?"#FFFFFF":O,C=w.fgColor,R=C===void 0?"#000000":C,I=w.level,k=I===void 0?"L":I,D=w.size,N=D===void 0?256:D,z=w.value,W=y(w,["bgColor","fgColor","level","size","value"]),$=new c.default(-1,i.default[k]);$.addData(z),$.make();var q=$.modules;return f.default.createElement(v.default,e({},W,{bgColor:A,bgD:q.map(function(j,X){return j.map(function(oe,L){return oe?"":"M "+L+" "+X+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:R,fgD:q.map(function(j,X){return j.map(function(oe,L){return oe?"M "+L+" "+X+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:T,size:N,viewBoxSize:q.length}))});return gs.QRCode=S,S.displayName="QRCode",S.propTypes=_,gs.default=S,gs}var E$=_$();const S$=_i(E$);var w$="Separator",dw="horizontal",x$=["horizontal","vertical"],DT=E.forwardRef((e,t)=>{const{decorative:n,orientation:o=dw,...i}=e,l=R$(o)?o:dw,d=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return b.jsx(Rc.div,{"data-orientation":l,...d,...i,ref:t})});DT.displayName=w$;function R$(e){return x$.includes(e)}var O$=DT;function T$(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:o},basePath:i,viewPaths:l,replace:c}=E.useContext(qe),{data:d,isPending:f,error:h,refetch:v}=o(),p=d;return E.useEffect(()=>{if(!n||f||p)return;const _=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;c(`${i}/${l[t]}?redirectTo=${encodeURIComponent(_)}`)},[f,p,i,l,c,t,n]),{data:p,user:p?.user,isPending:f,error:h,refetch:v}}function bi({className:e,...t}){return b.jsx("div",{"data-slot":"card",className:fe("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function kf({className:e,...t}){return b.jsx("div",{"data-slot":"card-header",className:fe("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function m0({className:e,...t}){return b.jsx("div",{"data-slot":"card-title",className:fe("leading-none font-semibold",e),...t})}function jf({className:e,...t}){return b.jsx("div",{"data-slot":"card-description",className:fe("text-muted-foreground text-sm",e),...t})}function zf({className:e,...t}){return b.jsx("div",{"data-slot":"card-content",className:fe("px-6",e),...t})}function Jv({className:e,...t}){return b.jsx("div",{"data-slot":"card-footer",className:fe("flex items-center px-6 [.border-t]:pt-6",e),...t})}function mr({className:e,...t}){return b.jsx("div",{"data-slot":"skeleton",className:fe("bg-accent animate-pulse rounded-md",e),...t})}var A$=J7("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function wt({className:e,variant:t,size:n,asChild:o=!1,...i}){const l=o?Z2:"button";return b.jsx(l,{"data-slot":"button",className:fe(A$({variant:t,size:n,className:e})),...i})}function C$({classNames:e,actionLabel:t,disabled:n,isSubmitting:o,variant:i,onClick:l,...c}){return l||(o=Pg().isSubmitting),b.jsxs(wt,{className:fe("md:ms-auto",e?.button,i==="default"&&e?.primaryButton,i==="destructive"&&e?.destructiveButton),disabled:o||n,size:"sm",type:l?"button":"submit",variant:i,onClick:l,...c,children:[o&&b.jsx(gn,{className:"animate-spin"}),t]})}function I$({className:e,classNames:t,actionLabel:n,disabled:o,instructions:i,isPending:l,isSubmitting:c,variant:d,action:f}){return b.jsx(Jv,{className:fe("flex flex-col justify-between gap-4 rounded-b-xl md:flex-row",(n||i)&&"!py-4 border-t",d==="destructive"?"border-destructive/30 bg-destructive/15":"bg-sidebar",e,t?.footer),children:l?b.jsxs(b.Fragment,{children:[i&&b.jsx(mr,{className:fe("my-0.5 h-3 w-48 max-w-full md:h-4 md:w-56",t?.skeleton)}),n&&b.jsx(mr,{className:fe("h-8 w-14 md:ms-auto",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[i&&b.jsx(jf,{className:fe("text-center text-muted-foreground text-xs md:text-start md:text-sm",t?.instructions),children:i}),n&&b.jsx(C$,{classNames:t,actionLabel:n,disabled:o,isSubmitting:c,variant:d,onClick:f})]})})}function M$({className:e,classNames:t,description:n,isPending:o,title:i}){return b.jsx(kf,{className:fe(t?.header,e),children:o?b.jsxs(b.Fragment,{children:[b.jsx(mr,{className:fe("my-0.5 h-5 w-1/3 md:h-5.5",t?.skeleton)}),n&&b.jsx(mr,{className:fe("mt-1.5 mb-0.5 h-3 w-2/3 md:h-3.5",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx(m0,{className:fe("text-lg md:text-xl",t?.title),children:i}),n&&b.jsx(jf,{className:fe("text-xs md:text-sm",t?.description),children:n})]})})}function N$({children:e,className:t,classNames:n,title:o,description:i,instructions:l,actionLabel:c,disabled:d,isPending:f,isSubmitting:h,optimistic:v,variant:p,action:y,..._}){return b.jsxs(bi,{className:fe("w-full pb-0 text-start",p==="destructive"&&"border-destructive/40",t,n?.base),..._,children:[b.jsx(M$,{classNames:n,description:i,isPending:f,title:o}),e,b.jsx(I$,{classNames:n,actionLabel:c,disabled:d,isPending:f,isSubmitting:h,instructions:l,optimistic:v,variant:p,action:y})]})}async function D$(e,t,n,o){const i=await L$(e),l=document.createElement("canvas");l.width=l.height=n;const c=l.getContext("2d"),d=Math.min(i.width,i.height),f=(i.width-d)/2,h=(i.height-d)/2,v=d,p=d;c?.drawImage(i,f,h,v,p,0,0,n,n);const y=await new Promise(_=>l.toBlob(_,`image/${o}`));return new File([y],`${t}.${o}`,{type:`image/${o}`})}async function L$(e){return new Promise((t,n)=>{const o=new Image,i=new FileReader;i.onload=l=>{var c;o.src=(c=l.target)==null?void 0:c.result},o.onload=()=>t(o),o.onerror=l=>n(l),i.readAsDataURL(e)})}async function P$(e){return new Promise((t,n)=>{const o=new FileReader;o.onloadend=()=>t(o.result),o.onerror=n,o.readAsDataURL(e)})}function LT({...e}){return b.jsx(RU,{"data-slot":"dropdown-menu",...e})}function PT({...e}){return b.jsx(OU,{"data-slot":"dropdown-menu-trigger",...e})}function kT({className:e,sideOffset:t=4,...n}){return b.jsx(TU,{children:b.jsx(AU,{"data-slot":"dropdown-menu-content",sideOffset:t,className:fe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function lf({className:e,inset:t,variant:n="default",...o}){return b.jsx(CU,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:fe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function jT({className:e,...t}){return b.jsx(NU,{"data-slot":"label",className:fe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var yo=A7,zT=E.createContext({}),Ht=({...e})=>b.jsx(zT.Provider,{value:{name:e.name},children:b.jsx(M7,{...e})}),v0=()=>{const e=E.useContext(zT),t=E.useContext(UT),{getFieldState:n}=xf(),o=Pg({name:e.name}),i=n(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:l}=t;return{id:l,name:e.name,formItemId:`${l}-form-item`,formDescriptionId:`${l}-form-item-description`,formMessageId:`${l}-form-item-message`,...i}},UT=E.createContext({});function Gt({className:e,...t}){const n=E.useId();return b.jsx(UT.Provider,{value:{id:n},children:b.jsx("div",{"data-slot":"form-item",className:fe("grid gap-2",e),...t})})}function qt({className:e,...t}){const{error:n,formItemId:o}=v0();return b.jsx(jT,{"data-slot":"form-label","data-error":!!n,className:fe("data-[error=true]:text-destructive",e),htmlFor:o,...t})}function rn({...e}){const{error:t,formItemId:n,formDescriptionId:o,formMessageId:i}=v0();return b.jsx(Z2,{"data-slot":"form-control",id:n,"aria-describedby":t?`${o} ${i}`:`${o}`,"aria-invalid":!!t,...e})}function un({className:e,...t}){const{error:n,formMessageId:o}=v0(),i=n?String(n?.message??""):t.children;return i?b.jsx("p",{"data-slot":"form-message",id:o,className:fe("text-destructive text-sm",e),...t,children:i}):null}function Yr({className:e,type:t,...n}){return b.jsx("input",{type:t,"data-slot":"input",className:fe("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function BT({className:e,...t}){return b.jsx(FU,{"data-slot":"avatar",className:fe("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function FT({className:e,...t}){return b.jsx($U,{"data-slot":"avatar-image",className:fe("aspect-square size-full",e),...t})}function $T({className:e,...t}){return b.jsx(VU,{"data-slot":"avatar-fallback",className:fe("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function k$({className:e,classNames:t,isPending:n,size:o,organization:i,localization:l,...c}){const{localization:d,avatar:f}=E.useContext(qe),h=E.useMemo(()=>({...d,...l}),[d,l]),v=i?.name,p=i?.logo;return n?b.jsx(mr,{className:fe("shrink-0 rounded-full",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs(BT,{className:fe("bg-muted",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base),...c,children:[f?.Image?b.jsx(f.Image,{alt:v||h?.ORGANIZATION,className:t?.image,src:p||""}):b.jsx(FT,{alt:v||h?.ORGANIZATION,className:t?.image,src:p||void 0}),b.jsx($T,{className:fe("text-foreground",t?.fallback),delayMs:p?600:void 0,children:b.jsx(v7,{className:fe("size-[50%]",t?.fallbackIcon)})})]})}function VT({className:e,classNames:t,isPending:n,size:o,organization:i,localization:l}){const{localization:c}=E.useContext(qe),d={...c,...l};return b.jsxs("div",{className:fe("flex items-center gap-2 truncate",e,t?.base),children:[b.jsx(k$,{className:fe(o!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:d,organization:i,size:o}),b.jsx("div",{className:fe("flex flex-col truncate text-left leading-tight",t?.content),children:n?b.jsxs(b.Fragment,{children:[b.jsx(mr,{className:fe("max-w-full",o==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),o!=="sm"&&b.jsx(mr,{className:fe("mt-1.5 max-w-full",o==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx("span",{className:fe("truncate font-semibold",o==="lg"?"text-base":"text-sm",t?.title),children:i?.name||d?.ORGANIZATION}),o!=="sm"&&i?.slug&&b.jsx("span",{className:fe("truncate opacity-70",o==="lg"?"text-sm":"text-xs",t?.subtitle),children:i.slug})]})})]})}function j$(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),i=new TextEncoder().encode(n),l=YU(rB(i)),c=t?.jpg?".jpg":"";let d=`https://gravatar.com/avatar/${l}${c}`;const f=new URLSearchParams;t?.size&&f.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&f.append("d",t.d),t?.forceDefault&&f.append("f","y");const h=f.toString();return h&&(d+=`?${h}`),d}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function HT({className:e,classNames:t,isPending:n,size:o,user:i,localization:l,...c}){const{localization:d,gravatar:f,avatar:h}=E.useContext(qe),v={...d,...l},p=i?.displayName||i?.name||i?.fullName||i?.firstName||i?.displayUsername||i?.username||i?.email,y=i?.image||i?.avatar||i?.avatarUrl,_=f&&i?.email?j$(i.email,f===!0?void 0:f):null,S=f?_:y;return n?b.jsx(mr,{className:fe("shrink-0 rounded-full",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs(BT,{className:fe("bg-muted",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base),...c,children:[h?.Image?b.jsx(h.Image,{alt:p||v?.USER,className:t?.image,src:S||""}):b.jsx(FT,{alt:p||v?.USER,className:t?.image,src:S||void 0}),b.jsx($T,{className:fe("text-foreground uppercase",t?.fallback),delayMs:S?600:void 0,children:z$(p)||b.jsx(R7,{className:fe("size-[50%]",t?.fallbackIcon)})})]})}var z$=e=>e?.slice(0,2);function PH({className:e,classNames:t,localization:n,...o}){const{hooks:{useListUserInvitations:i,useListOrganizations:l},localization:c}=E.useContext(qe),d=E.useMemo(()=>({...c,...n}),[c,n]),{data:f,refetch:h}=i(),{refetch:v}=l(),p=async()=>{await h?.(),await v?.()},y=f?.filter(_=>_.status==="pending");return y?.length?b.jsx(N$,{className:e,classNames:t,title:d.PENDING_INVITATIONS,description:d.PENDING_USER_INVITATIONS_DESCRIPTION||d.PENDING_INVITATIONS_DESCRIPTION,...o,children:b.jsx(zf,{className:fe("grid gap-4",t?.content),children:y.map(_=>b.jsx(U$,{classNames:t,invitation:{id:_.id,email:_.email,role:_.role,status:_.status,expiresAt:_.expiresAt},onChanged:p},_.id))})}):null}function U$({classNames:e,invitation:t,onChanged:n}){const{authClient:o,organization:i,localization:l,toast:c,localizeErrors:d}=E.useContext(qe),f=l,{lang:h}=Tg(),[v,p]=E.useState(!1),S=[...[{role:"owner",label:f.OWNER},{role:"admin",label:f.ADMIN},{role:"member",label:f.MEMBER}],...i?.customRoles||[]].find(O=>O.role===t.role),w=async()=>{p(!0);try{await o.organization.acceptInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),c({variant:"success",message:f.INVITATION_ACCEPTED})}catch(O){c({variant:"error",message:jt({error:O,localization:f,localizeErrors:d})})}p(!1)},T=async()=>{p(!0);try{await o.organization.rejectInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),c({variant:"success",message:f.INVITATION_REJECTED})}catch(O){c({variant:"error",message:jt({error:O,localization:f,localizeErrors:d})})}p(!1)};return b.jsxs(bi,{className:fe("flex-row items-center p-4",e?.cell),children:[b.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[b.jsx(HT,{className:"my-0.5",user:{email:t.email},localization:f}),b.jsxs("div",{className:"grid flex-1 text-left leading-tight",children:[b.jsx("span",{className:"truncate font-semibold text-sm",children:t.email}),b.jsxs("span",{className:"truncate text-muted-foreground text-xs",children:[f.EXPIRES," ",t.expiresAt.toLocaleDateString(h??"en")]})]})]}),b.jsx("span",{className:"truncate text-sm opacity-70",children:S?.label}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsxs(LT,{children:[b.jsx(PT,{asChild:!0,children:b.jsx(wt,{className:fe("relative ms-auto",e?.button,e?.outlineButton),disabled:v,size:"icon",type:"button",variant:"outline",children:v?b.jsx(gn,{className:"animate-spin"}):b.jsx(y7,{className:e?.icon})})}),b.jsxs(kT,{onCloseAutoFocus:O=>O.preventDefault(),children:[b.jsxs(lf,{onClick:w,disabled:v,children:[b.jsx(Cg,{className:e?.icon}),f.ACCEPT]}),b.jsxs(lf,{onClick:T,disabled:v,variant:"destructive",children:[b.jsx(L2,{className:e?.icon}),f.REJECT]})]})]})})]})}function g0({className:e,...t}){return b.jsx(YO,{"data-slot":"checkbox",className:fe("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:b.jsx(WO,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:b.jsx(Cg,{className:"size-3.5"})})})}function B$({className:e,...t}){return b.jsx("textarea",{"data-slot":"textarea",className:fe("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var F$=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M9.438 31.401a7 7 0 0 1-1.656-1.536a20 20 0 0 1-1.422-1.938a18.9 18.9 0 0 1-2.375-4.849c-.667-2-.99-3.917-.99-5.792c0-2.094.453-3.922 1.339-5.458a7.7 7.7 0 0 1 2.797-2.906a7.45 7.45 0 0 1 3.786-1.12q.705.002 1.51.198c.385.109.854.281 1.427.495c.729.281 1.13.453 1.266.495c.427.156.786.224 1.068.224c.214 0 .516-.068.859-.172c.193-.068.557-.188 1.078-.411c.516-.188.922-.349 1.245-.469c.495-.146.974-.281 1.401-.349a6.7 6.7 0 0 1 1.531-.063a9 9 0 0 1 2.589.557c1.359.547 2.458 1.401 3.276 2.615a6.4 6.4 0 0 0-.969.734a8.2 8.2 0 0 0-1.641 2.005a6.8 6.8 0 0 0-.859 3.359c.021 1.443.391 2.714 1.12 3.813a7.2 7.2 0 0 0 2.047 2.047c.417.281.776.474 1.12.604c-.161.5-.333.984-.536 1.464a19 19 0 0 1-1.667 3.083c-.578.839-1.031 1.464-1.375 1.88c-.536.635-1.052 1.12-1.573 1.458c-.573.38-1.25.583-1.938.583a4.4 4.4 0 0 1-1.38-.167c-.385-.13-.766-.271-1.141-.432a9 9 0 0 0-1.203-.453a6.3 6.3 0 0 0-3.099-.005c-.417.12-.818.26-1.214.432c-.557.234-.927.391-1.141.458c-.427.125-.87.203-1.318.229c-.693 0-1.339-.198-1.979-.599zm9.14-24.615c-.906.453-1.771.646-2.63.583c-.135-.865 0-1.75.359-2.719a7.3 7.3 0 0 1 1.333-2.24A7.1 7.1 0 0 1 19.812.733q1.319-.68 2.521-.734c.104.906 0 1.797-.333 2.76a8 8 0 0 1-1.333 2.344a6.8 6.8 0 0 1-2.115 1.682z",fill:"currentColor"})}),$$=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 199",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18",fill:"#5865f2"})}),V$=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 218",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z",fill:"#0061ff"})}),H$=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445",fill:"#1877f2"}),b.jsx("path",{d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z",fill:"#fff"})]}),G$=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"currentColor"})}),q$=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),b.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),b.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),b.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),b.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),b.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),b.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),Z$=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),b.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),b.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),b.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),Y$=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"})}),K$=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M1.333 0h8v5.333H12V2.667h2.667V0h8v8H20v2.667h-2.667v2.666H20V16h2.667v8h-8v-2.667H12v-2.666H9.333V24h-8Z"})}),W$=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"})}),Q$=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M116 3H12a8.91 8.91 0 0 0-9 8.8v104.42a8.91 8.91 0 0 0 9 8.78h104a8.93 8.93 0 0 0 9-8.81V11.77A8.93 8.93 0 0 0 116 3",fill:"#0076b2"}),b.jsx("path",{d:"M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 1 1-10.5 10.49a10.5 10.5 0 0 1 10.5-10.49m20.41 29h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z",fill:"#fff"})]}),X$=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M121.666 121.666H0V0h121.666z",fill:"#f1511b"}),b.jsx("path",{d:"M256 121.666H134.335V0H256z",fill:"#80cc28"}),b.jsx("path",{d:"M121.663 256.002H0V134.336h121.663z",fill:"#00adef"}),b.jsx("path",{d:"M256 256.002H134.335V134.336H256z",fill:"#fbbc09"})]}),J$=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514c-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233l4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632"})}),eV=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("circle",{cx:"128",cy:"128",fill:"#ff4500",r:"128"}),b.jsx("path",{d:"M213.15 129.22c0-10.376-8.391-18.617-18.617-18.617a18.74 18.74 0 0 0-12.97 5.189c-12.818-9.157-30.368-15.107-49.9-15.87l8.544-39.981l27.773 5.95c.307 7.02 6.104 12.667 13.278 12.667c7.324 0 13.275-5.95 13.275-13.278c0-7.324-5.95-13.275-13.275-13.275c-5.188 0-9.768 3.052-11.904 7.478l-30.976-6.562c-.916-.154-1.832 0-2.443.458c-.763.458-1.22 1.22-1.371 2.136l-9.464 44.558c-19.837.612-37.692 6.562-50.662 15.872a18.74 18.74 0 0 0-12.971-5.188c-10.377 0-18.617 8.391-18.617 18.617c0 7.629 4.577 14.037 10.988 16.939a33.6 33.6 0 0 0-.458 5.646c0 28.686 33.42 52.036 74.621 52.036c41.202 0 74.622-23.196 74.622-52.036a35 35 0 0 0-.458-5.646c6.408-2.902 10.985-9.464 10.985-17.093M85.272 142.495c0-7.324 5.95-13.275 13.278-13.275c7.324 0 13.275 5.95 13.275 13.275s-5.95 13.278-13.275 13.278c-7.327.15-13.278-5.953-13.278-13.278m74.317 35.251c-9.156 9.157-26.553 9.768-31.588 9.768c-5.188 0-22.584-.765-31.59-9.768c-1.371-1.373-1.371-3.51 0-4.883c1.374-1.371 3.51-1.371 4.884 0c5.8 5.8 18.008 7.782 26.706 7.782s21.058-1.983 26.704-7.782c1.374-1.371 3.51-1.371 4.884 0c1.22 1.373 1.22 3.51 0 4.883m-2.443-21.822c-7.325 0-13.275-5.95-13.275-13.275s5.95-13.275 13.275-13.275c7.327 0 13.277 5.95 13.277 13.275c0 7.17-5.95 13.275-13.277 13.275",fill:"#fff"})]}),tV=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M18.926 23.998L0 18.892L5.075.002L24 5.108ZM15.348 10.09l-5.282-1.453l-1.414 5.273l5.282 1.453z",fill:"currentColor"})}),nV=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M6 15a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2h2zm1 0a2 2 0 0 1 2-2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2zm2-8a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2v2zm0 1a2 2 0 0 1 2 2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2a2 2 0 0 1 2-2zm8 2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2zm-1 0a2 2 0 0 1-2 2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2a2 2 0 0 1 2 2zm-2 8a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2v-2zm0-1a2 2 0 0 1-2-2a2 2 0 0 1 2-2h5a2 2 0 0 1 2 2a2 2 0 0 1-2 2z"})}),rV=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M128 0C57.308 0 0 57.309 0 128c0 70.696 57.309 128 128 128c70.697 0 128-57.304 128-128C256 57.314 198.697.007 127.998.007zm58.699 184.614c-2.293 3.76-7.215 4.952-10.975 2.644c-30.053-18.357-67.885-22.515-112.44-12.335a7.98 7.98 0 0 1-9.552-6.007a7.97 7.97 0 0 1 6-9.553c48.76-11.14 90.583-6.344 124.323 14.276c3.76 2.308 4.952 7.215 2.644 10.975m15.667-34.853c-2.89 4.695-9.034 6.178-13.726 3.289c-34.406-21.148-86.853-27.273-127.548-14.92c-5.278 1.594-10.852-1.38-12.454-6.649c-1.59-5.278 1.386-10.842 6.655-12.446c46.485-14.106 104.275-7.273 143.787 17.007c4.692 2.89 6.175 9.034 3.286 13.72zm1.345-36.293C162.457 88.964 94.394 86.71 55.007 98.666c-6.325 1.918-13.014-1.653-14.93-7.978c-1.917-6.328 1.65-13.012 7.98-14.935C93.27 62.027 168.434 64.68 215.929 92.876c5.702 3.376 7.566 10.724 4.188 16.405c-3.362 5.69-10.73 7.565-16.4 4.187z",fill:"#1ed760"})}),oV=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 290",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9",fill:"#ff004f"}),b.jsx("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"}),b.jsx("path",{d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833",fill:"#00f2ea"})]}),aV=({className:e})=>b.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[b.jsx("style",{type:"text/css",children:`
|
|
129
|
+
}`,gs={},Km,ew;function CT(){return ew||(ew=1,Km={L:1,M:0,Q:3,H:2}),Km}var Wm,tw;function IT(){return tw||(tw=1,Wm={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),Wm}var Qm,nw;function p$(){if(nw)return Qm;nw=1;var e=IT();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var o=0;o<this.data.length;o++)n.put(this.data.charCodeAt(o),8)}},Qm=t,Qm}var Xm,rw;function m$(){if(rw)return Xm;rw=1;var e=CT();function t(n,o){this.totalCount=n,this.dataCount=o}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,o){var i=t.getRsBlockTable(n,o);if(i==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+o);for(var l=i.length/3,c=new Array,d=0;d<l;d++)for(var f=i[d*3+0],h=i[d*3+1],v=i[d*3+2],p=0;p<f;p++)c.push(new t(h,v));return c},t.getRsBlockTable=function(n,o){switch(o){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},Xm=t,Xm}var Jm,ow;function v$(){if(ow)return Jm;ow=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var o=0;o<n;o++)this.putBit((t>>>n-o-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Jm=e,Jm}var ev,aw;function MT(){if(aw)return ev;aw=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return ev=e,ev}var tv,iw;function NT(){if(iw)return tv;iw=1;var e=MT();function t(n,o){if(n.length==null)throw new Error(n.length+"/"+o);for(var i=0;i<n.length&&n[i]==0;)i++;this.num=new Array(n.length-i+o);for(var l=0;l<n.length-i;l++)this.num[l]=n[l+i]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var o=new Array(this.getLength()+n.getLength()-1),i=0;i<this.getLength();i++)for(var l=0;l<n.getLength();l++)o[i+l]^=e.gexp(e.glog(this.get(i))+e.glog(n.get(l)));return new t(o,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var o=e.glog(this.get(0))-e.glog(n.get(0)),i=new Array(this.getLength()),l=0;l<this.getLength();l++)i[l]=this.get(l);for(var l=0;l<n.getLength();l++)i[l]^=e.gexp(e.glog(n.get(l))+o);return new t(i,0).mod(n)}},tv=t,tv}var nv,sw;function g$(){if(sw)return nv;sw=1;var e=IT(),t=NT(),n=MT(),o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(l){for(var c=l<<10;i.getBCHDigit(c)-i.getBCHDigit(i.G15)>=0;)c^=i.G15<<i.getBCHDigit(c)-i.getBCHDigit(i.G15);return(l<<10|c)^i.G15_MASK},getBCHTypeNumber:function(l){for(var c=l<<12;i.getBCHDigit(c)-i.getBCHDigit(i.G18)>=0;)c^=i.G18<<i.getBCHDigit(c)-i.getBCHDigit(i.G18);return l<<12|c},getBCHDigit:function(l){for(var c=0;l!=0;)c++,l>>>=1;return c},getPatternPosition:function(l){return i.PATTERN_POSITION_TABLE[l-1]},getMask:function(l,c,d){switch(l){case o.PATTERN000:return(c+d)%2==0;case o.PATTERN001:return c%2==0;case o.PATTERN010:return d%3==0;case o.PATTERN011:return(c+d)%3==0;case o.PATTERN100:return(Math.floor(c/2)+Math.floor(d/3))%2==0;case o.PATTERN101:return c*d%2+c*d%3==0;case o.PATTERN110:return(c*d%2+c*d%3)%2==0;case o.PATTERN111:return(c*d%3+(c+d)%2)%2==0;default:throw new Error("bad maskPattern:"+l)}},getErrorCorrectPolynomial:function(l){for(var c=new t([1],0),d=0;d<l;d++)c=c.multiply(new t([1,n.gexp(d)],0));return c},getLengthInBits:function(l,c){if(1<=c&&c<10)switch(l){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+l)}else if(c<27)switch(l){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+l)}else if(c<41)switch(l){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+l)}else throw new Error("type:"+c)},getLostPoint:function(l){for(var c=l.getModuleCount(),d=0,f=0;f<c;f++)for(var h=0;h<c;h++){for(var v=0,p=l.isDark(f,h),y=-1;y<=1;y++)if(!(f+y<0||c<=f+y))for(var _=-1;_<=1;_++)h+_<0||c<=h+_||y==0&&_==0||p==l.isDark(f+y,h+_)&&v++;v>5&&(d+=3+v-5)}for(var f=0;f<c-1;f++)for(var h=0;h<c-1;h++){var S=0;l.isDark(f,h)&&S++,l.isDark(f+1,h)&&S++,l.isDark(f,h+1)&&S++,l.isDark(f+1,h+1)&&S++,(S==0||S==4)&&(d+=3)}for(var f=0;f<c;f++)for(var h=0;h<c-6;h++)l.isDark(f,h)&&!l.isDark(f,h+1)&&l.isDark(f,h+2)&&l.isDark(f,h+3)&&l.isDark(f,h+4)&&!l.isDark(f,h+5)&&l.isDark(f,h+6)&&(d+=40);for(var h=0;h<c;h++)for(var f=0;f<c-6;f++)l.isDark(f,h)&&!l.isDark(f+1,h)&&l.isDark(f+2,h)&&l.isDark(f+3,h)&&l.isDark(f+4,h)&&!l.isDark(f+5,h)&&l.isDark(f+6,h)&&(d+=40);for(var w=0,h=0;h<c;h++)for(var f=0;f<c;f++)l.isDark(f,h)&&w++;var T=Math.abs(100*w/c/c-50)/5;return d+=T*10,d}};return nv=i,nv}var rv,lw;function y$(){if(lw)return rv;lw=1;var e=p$(),t=m$(),n=v$(),o=g$(),i=NT();function l(d,f){this.typeNumber=d,this.errorCorrectLevel=f,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;return c.addData=function(d){var f=new e(d);this.dataList.push(f),this.dataCache=null},c.isDark=function(d,f){if(d<0||this.moduleCount<=d||f<0||this.moduleCount<=f)throw new Error(d+","+f);return this.modules[d][f]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var d=1;for(d=1;d<40;d++){for(var f=t.getRSBlocks(d,this.errorCorrectLevel),h=new n,v=0,p=0;p<f.length;p++)v+=f[p].dataCount;for(var p=0;p<this.dataList.length;p++){var y=this.dataList[p];h.put(y.mode,4),h.put(y.getLength(),o.getLengthInBits(y.mode,d)),y.write(h)}if(h.getLengthInBits()<=v*8)break}this.typeNumber=d}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(d,f){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var v=0;v<this.moduleCount;v++)this.modules[h][v]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(d,f),this.typeNumber>=7&&this.setupTypeNumber(d),this.dataCache==null&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,f)},c.setupPositionProbePattern=function(d,f){for(var h=-1;h<=7;h++)if(!(d+h<=-1||this.moduleCount<=d+h))for(var v=-1;v<=7;v++)f+v<=-1||this.moduleCount<=f+v||(0<=h&&h<=6&&(v==0||v==6)||0<=v&&v<=6&&(h==0||h==6)||2<=h&&h<=4&&2<=v&&v<=4?this.modules[d+h][f+v]=!0:this.modules[d+h][f+v]=!1)},c.getBestMaskPattern=function(){for(var d=0,f=0,h=0;h<8;h++){this.makeImpl(!0,h);var v=o.getLostPoint(this);(h==0||d>v)&&(d=v,f=h)}return f},c.createMovieClip=function(d,f,h){var v=d.createEmptyMovieClip(f,h),p=1;this.make();for(var y=0;y<this.modules.length;y++)for(var _=y*p,S=0;S<this.modules[y].length;S++){var w=S*p,T=this.modules[y][S];T&&(v.beginFill(0,100),v.moveTo(w,_),v.lineTo(w+p,_),v.lineTo(w+p,_+p),v.lineTo(w,_+p),v.endFill())}return v},c.setupTimingPattern=function(){for(var d=8;d<this.moduleCount-8;d++)this.modules[d][6]==null&&(this.modules[d][6]=d%2==0);for(var f=8;f<this.moduleCount-8;f++)this.modules[6][f]==null&&(this.modules[6][f]=f%2==0)},c.setupPositionAdjustPattern=function(){for(var d=o.getPatternPosition(this.typeNumber),f=0;f<d.length;f++)for(var h=0;h<d.length;h++){var v=d[f],p=d[h];if(this.modules[v][p]==null)for(var y=-2;y<=2;y++)for(var _=-2;_<=2;_++)y==-2||y==2||_==-2||_==2||y==0&&_==0?this.modules[v+y][p+_]=!0:this.modules[v+y][p+_]=!1}},c.setupTypeNumber=function(d){for(var f=o.getBCHTypeNumber(this.typeNumber),h=0;h<18;h++){var v=!d&&(f>>h&1)==1;this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=v}for(var h=0;h<18;h++){var v=!d&&(f>>h&1)==1;this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=v}},c.setupTypeInfo=function(d,f){for(var h=this.errorCorrectLevel<<3|f,v=o.getBCHTypeInfo(h),p=0;p<15;p++){var y=!d&&(v>>p&1)==1;p<6?this.modules[p][8]=y:p<8?this.modules[p+1][8]=y:this.modules[this.moduleCount-15+p][8]=y}for(var p=0;p<15;p++){var y=!d&&(v>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=y:p<9?this.modules[8][15-p-1+1]=y:this.modules[8][15-p-1]=y}this.modules[this.moduleCount-8][8]=!d},c.mapData=function(d,f){for(var h=-1,v=this.moduleCount-1,p=7,y=0,_=this.moduleCount-1;_>0;_-=2)for(_==6&&_--;;){for(var S=0;S<2;S++)if(this.modules[v][_-S]==null){var w=!1;y<d.length&&(w=(d[y]>>>p&1)==1);var T=o.getMask(f,v,_-S);T&&(w=!w),this.modules[v][_-S]=w,p--,p==-1&&(y++,p=7)}if(v+=h,v<0||this.moduleCount<=v){v-=h,h=-h;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(d,f,h){for(var v=t.getRSBlocks(d,f),p=new n,y=0;y<h.length;y++){var _=h[y];p.put(_.mode,4),p.put(_.getLength(),o.getLengthInBits(_.mode,d)),_.write(p)}for(var S=0,y=0;y<v.length;y++)S+=v[y].dataCount;if(p.getLengthInBits()>S*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+S*8+")");for(p.getLengthInBits()+4<=S*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=S*8||(p.put(l.PAD0,8),p.getLengthInBits()>=S*8));)p.put(l.PAD1,8);return l.createBytes(p,v)},l.createBytes=function(d,f){for(var h=0,v=0,p=0,y=new Array(f.length),_=new Array(f.length),S=0;S<f.length;S++){var w=f[S].dataCount,T=f[S].totalCount-w;v=Math.max(v,w),p=Math.max(p,T),y[S]=new Array(w);for(var O=0;O<y[S].length;O++)y[S][O]=255&d.buffer[O+h];h+=w;var A=o.getErrorCorrectPolynomial(T),C=new i(y[S],A.getLength()-1),R=C.mod(A);_[S]=new Array(A.getLength()-1);for(var O=0;O<_[S].length;O++){var I=O+R.getLength()-_[S].length;_[S][O]=I>=0?R.get(I):0}}for(var k=0,O=0;O<f.length;O++)k+=f[O].totalCount;for(var D=new Array(k),N=0,O=0;O<v;O++)for(var S=0;S<f.length;S++)O<y[S].length&&(D[N++]=y[S][O]);for(var O=0;O<p;O++)for(var S=0;S<f.length;S++)O<_[S].length&&(D[N++]=_[S][O]);return D},rv=l,rv}var gd={},cw;function b$(){if(cw)return gd;cw=1,Object.defineProperty(gd,"__esModule",{value:!0});var e=Object.assign||function(h){for(var v=1;v<arguments.length;v++){var p=arguments[v];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},t=p0(),n=l(t),o=ka(),i=l(o);function l(h){return h&&h.__esModule?h:{default:h}}function c(h,v){var p={};for(var y in h)v.indexOf(y)>=0||Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}var d={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},f=(0,o.forwardRef)(function(h,v){var p=h.bgColor,y=h.bgD,_=h.fgD,S=h.fgColor,w=h.size,T=h.title,O=h.viewBoxSize,A=h.xmlns,C=A===void 0?"http://www.w3.org/2000/svg":A,R=c(h,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return i.default.createElement("svg",e({},R,{height:w,ref:v,viewBox:"0 0 "+O+" "+O,width:w,xmlns:C}),T?i.default.createElement("title",null,T):null,i.default.createElement("path",{d:y,fill:p}),i.default.createElement("path",{d:_,fill:S}))});return f.displayName="QRCodeSvg",f.propTypes=d,gd.default=f,gd}var uw;function _$(){if(uw)return gs;uw=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.QRCode=void 0;var e=Object.assign||function(w){for(var T=1;T<arguments.length;T++){var O=arguments[T];for(var A in O)Object.prototype.hasOwnProperty.call(O,A)&&(w[A]=O[A])}return w},t=p0(),n=p(t),o=CT(),i=p(o),l=y$(),c=p(l),d=ka(),f=p(d),h=b$(),v=p(h);function p(w){return w&&w.__esModule?w:{default:w}}function y(w,T){var O={};for(var A in w)T.indexOf(A)>=0||Object.prototype.hasOwnProperty.call(w,A)&&(O[A]=w[A]);return O}var _={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},S=(0,d.forwardRef)(function(w,T){var O=w.bgColor,A=O===void 0?"#FFFFFF":O,C=w.fgColor,R=C===void 0?"#000000":C,I=w.level,k=I===void 0?"L":I,D=w.size,N=D===void 0?256:D,z=w.value,W=y(w,["bgColor","fgColor","level","size","value"]),$=new c.default(-1,i.default[k]);$.addData(z),$.make();var q=$.modules;return f.default.createElement(v.default,e({},W,{bgColor:A,bgD:q.map(function(j,X){return j.map(function(oe,L){return oe?"":"M "+L+" "+X+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:R,fgD:q.map(function(j,X){return j.map(function(oe,L){return oe?"M "+L+" "+X+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:T,size:N,viewBoxSize:q.length}))});return gs.QRCode=S,S.displayName="QRCode",S.propTypes=_,gs.default=S,gs}var E$=_$();const S$=_i(E$);var w$="Separator",dw="horizontal",x$=["horizontal","vertical"],DT=E.forwardRef((e,t)=>{const{decorative:n,orientation:o=dw,...i}=e,l=R$(o)?o:dw,d=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return b.jsx(Oc.div,{"data-orientation":l,...d,...i,ref:t})});DT.displayName=w$;function R$(e){return x$.includes(e)}var O$=DT;function T$(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:o},basePath:i,viewPaths:l,replace:c}=E.useContext(qe),{data:d,isPending:f,error:h,refetch:v}=o(),p=d;return E.useEffect(()=>{if(!n||f||p)return;const _=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;c(`${i}/${l[t]}?redirectTo=${encodeURIComponent(_)}`)},[f,p,i,l,c,t,n]),{data:p,user:p?.user,isPending:f,error:h,refetch:v}}function bi({className:e,...t}){return b.jsx("div",{"data-slot":"card",className:fe("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function kf({className:e,...t}){return b.jsx("div",{"data-slot":"card-header",className:fe("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function m0({className:e,...t}){return b.jsx("div",{"data-slot":"card-title",className:fe("leading-none font-semibold",e),...t})}function jf({className:e,...t}){return b.jsx("div",{"data-slot":"card-description",className:fe("text-muted-foreground text-sm",e),...t})}function zf({className:e,...t}){return b.jsx("div",{"data-slot":"card-content",className:fe("px-6",e),...t})}function Jv({className:e,...t}){return b.jsx("div",{"data-slot":"card-footer",className:fe("flex items-center px-6 [.border-t]:pt-6",e),...t})}function mr({className:e,...t}){return b.jsx("div",{"data-slot":"skeleton",className:fe("bg-accent animate-pulse rounded-md",e),...t})}var A$=J7("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function wt({className:e,variant:t,size:n,asChild:o=!1,...i}){const l=o?Z2:"button";return b.jsx(l,{"data-slot":"button",className:fe(A$({variant:t,size:n,className:e})),...i})}function C$({classNames:e,actionLabel:t,disabled:n,isSubmitting:o,variant:i,onClick:l,...c}){return l||(o=Pg().isSubmitting),b.jsxs(wt,{className:fe("md:ms-auto",e?.button,i==="default"&&e?.primaryButton,i==="destructive"&&e?.destructiveButton),disabled:o||n,size:"sm",type:l?"button":"submit",variant:i,onClick:l,...c,children:[o&&b.jsx(gn,{className:"animate-spin"}),t]})}function I$({className:e,classNames:t,actionLabel:n,disabled:o,instructions:i,isPending:l,isSubmitting:c,variant:d,action:f}){return b.jsx(Jv,{className:fe("flex flex-col justify-between gap-4 rounded-b-xl md:flex-row",(n||i)&&"!py-4 border-t",d==="destructive"?"border-destructive/30 bg-destructive/15":"bg-sidebar",e,t?.footer),children:l?b.jsxs(b.Fragment,{children:[i&&b.jsx(mr,{className:fe("my-0.5 h-3 w-48 max-w-full md:h-4 md:w-56",t?.skeleton)}),n&&b.jsx(mr,{className:fe("h-8 w-14 md:ms-auto",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[i&&b.jsx(jf,{className:fe("text-center text-muted-foreground text-xs md:text-start md:text-sm",t?.instructions),children:i}),n&&b.jsx(C$,{classNames:t,actionLabel:n,disabled:o,isSubmitting:c,variant:d,onClick:f})]})})}function M$({className:e,classNames:t,description:n,isPending:o,title:i}){return b.jsx(kf,{className:fe(t?.header,e),children:o?b.jsxs(b.Fragment,{children:[b.jsx(mr,{className:fe("my-0.5 h-5 w-1/3 md:h-5.5",t?.skeleton)}),n&&b.jsx(mr,{className:fe("mt-1.5 mb-0.5 h-3 w-2/3 md:h-3.5",t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx(m0,{className:fe("text-lg md:text-xl",t?.title),children:i}),n&&b.jsx(jf,{className:fe("text-xs md:text-sm",t?.description),children:n})]})})}function N$({children:e,className:t,classNames:n,title:o,description:i,instructions:l,actionLabel:c,disabled:d,isPending:f,isSubmitting:h,optimistic:v,variant:p,action:y,..._}){return b.jsxs(bi,{className:fe("w-full pb-0 text-start",p==="destructive"&&"border-destructive/40",t,n?.base),..._,children:[b.jsx(M$,{classNames:n,description:i,isPending:f,title:o}),e,b.jsx(I$,{classNames:n,actionLabel:c,disabled:d,isPending:f,isSubmitting:h,instructions:l,optimistic:v,variant:p,action:y})]})}async function D$(e,t,n,o){const i=await L$(e),l=document.createElement("canvas");l.width=l.height=n;const c=l.getContext("2d"),d=Math.min(i.width,i.height),f=(i.width-d)/2,h=(i.height-d)/2,v=d,p=d;c?.drawImage(i,f,h,v,p,0,0,n,n);const y=await new Promise(_=>l.toBlob(_,`image/${o}`));return new File([y],`${t}.${o}`,{type:`image/${o}`})}async function L$(e){return new Promise((t,n)=>{const o=new Image,i=new FileReader;i.onload=l=>{var c;o.src=(c=l.target)==null?void 0:c.result},o.onload=()=>t(o),o.onerror=l=>n(l),i.readAsDataURL(e)})}async function P$(e){return new Promise((t,n)=>{const o=new FileReader;o.onloadend=()=>t(o.result),o.onerror=n,o.readAsDataURL(e)})}function LT({...e}){return b.jsx(RU,{"data-slot":"dropdown-menu",...e})}function PT({...e}){return b.jsx(OU,{"data-slot":"dropdown-menu-trigger",...e})}function kT({className:e,sideOffset:t=4,...n}){return b.jsx(TU,{children:b.jsx(AU,{"data-slot":"dropdown-menu-content",sideOffset:t,className:fe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function cf({className:e,inset:t,variant:n="default",...o}){return b.jsx(CU,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:fe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function jT({className:e,...t}){return b.jsx(NU,{"data-slot":"label",className:fe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var yo=A7,zT=E.createContext({}),Ht=({...e})=>b.jsx(zT.Provider,{value:{name:e.name},children:b.jsx(M7,{...e})}),v0=()=>{const e=E.useContext(zT),t=E.useContext(UT),{getFieldState:n}=xf(),o=Pg({name:e.name}),i=n(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:l}=t;return{id:l,name:e.name,formItemId:`${l}-form-item`,formDescriptionId:`${l}-form-item-description`,formMessageId:`${l}-form-item-message`,...i}},UT=E.createContext({});function Gt({className:e,...t}){const n=E.useId();return b.jsx(UT.Provider,{value:{id:n},children:b.jsx("div",{"data-slot":"form-item",className:fe("grid gap-2",e),...t})})}function qt({className:e,...t}){const{error:n,formItemId:o}=v0();return b.jsx(jT,{"data-slot":"form-label","data-error":!!n,className:fe("data-[error=true]:text-destructive",e),htmlFor:o,...t})}function rn({...e}){const{error:t,formItemId:n,formDescriptionId:o,formMessageId:i}=v0();return b.jsx(Z2,{"data-slot":"form-control",id:n,"aria-describedby":t?`${o} ${i}`:`${o}`,"aria-invalid":!!t,...e})}function un({className:e,...t}){const{error:n,formMessageId:o}=v0(),i=n?String(n?.message??""):t.children;return i?b.jsx("p",{"data-slot":"form-message",id:o,className:fe("text-destructive text-sm",e),...t,children:i}):null}function Yr({className:e,type:t,...n}){return b.jsx("input",{type:t,"data-slot":"input",className:fe("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function BT({className:e,...t}){return b.jsx(FU,{"data-slot":"avatar",className:fe("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function FT({className:e,...t}){return b.jsx($U,{"data-slot":"avatar-image",className:fe("aspect-square size-full",e),...t})}function $T({className:e,...t}){return b.jsx(VU,{"data-slot":"avatar-fallback",className:fe("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function k$({className:e,classNames:t,isPending:n,size:o,organization:i,localization:l,...c}){const{localization:d,avatar:f}=E.useContext(qe),h=E.useMemo(()=>({...d,...l}),[d,l]),v=i?.name,p=i?.logo;return n?b.jsx(mr,{className:fe("shrink-0 rounded-full",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs(BT,{className:fe("bg-muted",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base),...c,children:[f?.Image?b.jsx(f.Image,{alt:v||h?.ORGANIZATION,className:t?.image,src:p||""}):b.jsx(FT,{alt:v||h?.ORGANIZATION,className:t?.image,src:p||void 0}),b.jsx($T,{className:fe("text-foreground",t?.fallback),delayMs:p?600:void 0,children:b.jsx(v7,{className:fe("size-[50%]",t?.fallbackIcon)})})]})}function VT({className:e,classNames:t,isPending:n,size:o,organization:i,localization:l}){const{localization:c}=E.useContext(qe),d={...c,...l};return b.jsxs("div",{className:fe("flex items-center gap-2 truncate",e,t?.base),children:[b.jsx(k$,{className:fe(o!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:d,organization:i,size:o}),b.jsx("div",{className:fe("flex flex-col truncate text-left leading-tight",t?.content),children:n?b.jsxs(b.Fragment,{children:[b.jsx(mr,{className:fe("max-w-full",o==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),o!=="sm"&&b.jsx(mr,{className:fe("mt-1.5 max-w-full",o==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):b.jsxs(b.Fragment,{children:[b.jsx("span",{className:fe("truncate font-semibold",o==="lg"?"text-base":"text-sm",t?.title),children:i?.name||d?.ORGANIZATION}),o!=="sm"&&i?.slug&&b.jsx("span",{className:fe("truncate opacity-70",o==="lg"?"text-sm":"text-xs",t?.subtitle),children:i.slug})]})})]})}function j$(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),i=new TextEncoder().encode(n),l=YU(rB(i)),c=t?.jpg?".jpg":"";let d=`https://gravatar.com/avatar/${l}${c}`;const f=new URLSearchParams;t?.size&&f.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&f.append("d",t.d),t?.forceDefault&&f.append("f","y");const h=f.toString();return h&&(d+=`?${h}`),d}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function HT({className:e,classNames:t,isPending:n,size:o,user:i,localization:l,...c}){const{localization:d,gravatar:f,avatar:h}=E.useContext(qe),v={...d,...l},p=i?.displayName||i?.name||i?.fullName||i?.firstName||i?.displayUsername||i?.username||i?.email,y=i?.image||i?.avatar||i?.avatarUrl,_=f&&i?.email?j$(i.email,f===!0?void 0:f):null,S=f?_:y;return n?b.jsx(mr,{className:fe("shrink-0 rounded-full",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):b.jsxs(BT,{className:fe("bg-muted",o==="sm"?"size-6":o==="lg"?"size-10":o==="xl"?"size-12":"size-8",e,t?.base),...c,children:[h?.Image?b.jsx(h.Image,{alt:p||v?.USER,className:t?.image,src:S||""}):b.jsx(FT,{alt:p||v?.USER,className:t?.image,src:S||void 0}),b.jsx($T,{className:fe("text-foreground uppercase",t?.fallback),delayMs:S?600:void 0,children:z$(p)||b.jsx(R7,{className:fe("size-[50%]",t?.fallbackIcon)})})]})}var z$=e=>e?.slice(0,2);function kH({className:e,classNames:t,localization:n,...o}){const{hooks:{useListUserInvitations:i,useListOrganizations:l},localization:c}=E.useContext(qe),d=E.useMemo(()=>({...c,...n}),[c,n]),{data:f,refetch:h}=i(),{refetch:v}=l(),p=async()=>{await h?.(),await v?.()},y=f?.filter(_=>_.status==="pending");return y?.length?b.jsx(N$,{className:e,classNames:t,title:d.PENDING_INVITATIONS,description:d.PENDING_USER_INVITATIONS_DESCRIPTION||d.PENDING_INVITATIONS_DESCRIPTION,...o,children:b.jsx(zf,{className:fe("grid gap-4",t?.content),children:y.map(_=>b.jsx(U$,{classNames:t,invitation:{id:_.id,email:_.email,role:_.role,status:_.status,expiresAt:_.expiresAt},onChanged:p},_.id))})}):null}function U$({classNames:e,invitation:t,onChanged:n}){const{authClient:o,organization:i,localization:l,toast:c,localizeErrors:d}=E.useContext(qe),f=l,{lang:h}=Tg(),[v,p]=E.useState(!1),S=[...[{role:"owner",label:f.OWNER},{role:"admin",label:f.ADMIN},{role:"member",label:f.MEMBER}],...i?.customRoles||[]].find(O=>O.role===t.role),w=async()=>{p(!0);try{await o.organization.acceptInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),c({variant:"success",message:f.INVITATION_ACCEPTED})}catch(O){c({variant:"error",message:jt({error:O,localization:f,localizeErrors:d})})}p(!1)},T=async()=>{p(!0);try{await o.organization.rejectInvitation({invitationId:t.id,fetchOptions:{throw:!0}}),await n?.(),c({variant:"success",message:f.INVITATION_REJECTED})}catch(O){c({variant:"error",message:jt({error:O,localization:f,localizeErrors:d})})}p(!1)};return b.jsxs(bi,{className:fe("flex-row items-center p-4",e?.cell),children:[b.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[b.jsx(HT,{className:"my-0.5",user:{email:t.email},localization:f}),b.jsxs("div",{className:"grid flex-1 text-left leading-tight",children:[b.jsx("span",{className:"truncate font-semibold text-sm",children:t.email}),b.jsxs("span",{className:"truncate text-muted-foreground text-xs",children:[f.EXPIRES," ",t.expiresAt.toLocaleDateString(h??"en")]})]})]}),b.jsx("span",{className:"truncate text-sm opacity-70",children:S?.label}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsxs(LT,{children:[b.jsx(PT,{asChild:!0,children:b.jsx(wt,{className:fe("relative ms-auto",e?.button,e?.outlineButton),disabled:v,size:"icon",type:"button",variant:"outline",children:v?b.jsx(gn,{className:"animate-spin"}):b.jsx(y7,{className:e?.icon})})}),b.jsxs(kT,{onCloseAutoFocus:O=>O.preventDefault(),children:[b.jsxs(cf,{onClick:w,disabled:v,children:[b.jsx(Cg,{className:e?.icon}),f.ACCEPT]}),b.jsxs(cf,{onClick:T,disabled:v,variant:"destructive",children:[b.jsx(L2,{className:e?.icon}),f.REJECT]})]})]})})]})}function g0({className:e,...t}){return b.jsx(YO,{"data-slot":"checkbox",className:fe("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:b.jsx(WO,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:b.jsx(Cg,{className:"size-3.5"})})})}function B$({className:e,...t}){return b.jsx("textarea",{"data-slot":"textarea",className:fe("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var F$=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M9.438 31.401a7 7 0 0 1-1.656-1.536a20 20 0 0 1-1.422-1.938a18.9 18.9 0 0 1-2.375-4.849c-.667-2-.99-3.917-.99-5.792c0-2.094.453-3.922 1.339-5.458a7.7 7.7 0 0 1 2.797-2.906a7.45 7.45 0 0 1 3.786-1.12q.705.002 1.51.198c.385.109.854.281 1.427.495c.729.281 1.13.453 1.266.495c.427.156.786.224 1.068.224c.214 0 .516-.068.859-.172c.193-.068.557-.188 1.078-.411c.516-.188.922-.349 1.245-.469c.495-.146.974-.281 1.401-.349a6.7 6.7 0 0 1 1.531-.063a9 9 0 0 1 2.589.557c1.359.547 2.458 1.401 3.276 2.615a6.4 6.4 0 0 0-.969.734a8.2 8.2 0 0 0-1.641 2.005a6.8 6.8 0 0 0-.859 3.359c.021 1.443.391 2.714 1.12 3.813a7.2 7.2 0 0 0 2.047 2.047c.417.281.776.474 1.12.604c-.161.5-.333.984-.536 1.464a19 19 0 0 1-1.667 3.083c-.578.839-1.031 1.464-1.375 1.88c-.536.635-1.052 1.12-1.573 1.458c-.573.38-1.25.583-1.938.583a4.4 4.4 0 0 1-1.38-.167c-.385-.13-.766-.271-1.141-.432a9 9 0 0 0-1.203-.453a6.3 6.3 0 0 0-3.099-.005c-.417.12-.818.26-1.214.432c-.557.234-.927.391-1.141.458c-.427.125-.87.203-1.318.229c-.693 0-1.339-.198-1.979-.599zm9.14-24.615c-.906.453-1.771.646-2.63.583c-.135-.865 0-1.75.359-2.719a7.3 7.3 0 0 1 1.333-2.24A7.1 7.1 0 0 1 19.812.733q1.319-.68 2.521-.734c.104.906 0 1.797-.333 2.76a8 8 0 0 1-1.333 2.344a6.8 6.8 0 0 1-2.115 1.682z",fill:"currentColor"})}),$$=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 199",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18",fill:"#5865f2"})}),V$=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 218",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z",fill:"#0061ff"})}),H$=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445",fill:"#1877f2"}),b.jsx("path",{d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z",fill:"#fff"})]}),G$=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"currentColor"})}),q$=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),b.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),b.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),b.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),b.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),b.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),b.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),Z$=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),b.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),b.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),b.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),Y$=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"})}),K$=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M1.333 0h8v5.333H12V2.667h2.667V0h8v8H20v2.667h-2.667v2.666H20V16h2.667v8h-8v-2.667H12v-2.666H9.333V24h-8Z"})}),W$=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"})}),Q$=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M116 3H12a8.91 8.91 0 0 0-9 8.8v104.42a8.91 8.91 0 0 0 9 8.78h104a8.93 8.93 0 0 0 9-8.81V11.77A8.93 8.93 0 0 0 116 3",fill:"#0076b2"}),b.jsx("path",{d:"M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 1 1-10.5 10.49a10.5 10.5 0 0 1 10.5-10.49m20.41 29h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z",fill:"#fff"})]}),X$=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M121.666 121.666H0V0h121.666z",fill:"#f1511b"}),b.jsx("path",{d:"M256 121.666H134.335V0H256z",fill:"#80cc28"}),b.jsx("path",{d:"M121.663 256.002H0V134.336h121.663z",fill:"#00adef"}),b.jsx("path",{d:"M256 256.002H134.335V134.336H256z",fill:"#fbbc09"})]}),J$=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514c-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233l4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632"})}),eV=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("circle",{cx:"128",cy:"128",fill:"#ff4500",r:"128"}),b.jsx("path",{d:"M213.15 129.22c0-10.376-8.391-18.617-18.617-18.617a18.74 18.74 0 0 0-12.97 5.189c-12.818-9.157-30.368-15.107-49.9-15.87l8.544-39.981l27.773 5.95c.307 7.02 6.104 12.667 13.278 12.667c7.324 0 13.275-5.95 13.275-13.278c0-7.324-5.95-13.275-13.275-13.275c-5.188 0-9.768 3.052-11.904 7.478l-30.976-6.562c-.916-.154-1.832 0-2.443.458c-.763.458-1.22 1.22-1.371 2.136l-9.464 44.558c-19.837.612-37.692 6.562-50.662 15.872a18.74 18.74 0 0 0-12.971-5.188c-10.377 0-18.617 8.391-18.617 18.617c0 7.629 4.577 14.037 10.988 16.939a33.6 33.6 0 0 0-.458 5.646c0 28.686 33.42 52.036 74.621 52.036c41.202 0 74.622-23.196 74.622-52.036a35 35 0 0 0-.458-5.646c6.408-2.902 10.985-9.464 10.985-17.093M85.272 142.495c0-7.324 5.95-13.275 13.278-13.275c7.324 0 13.275 5.95 13.275 13.275s-5.95 13.278-13.275 13.278c-7.327.15-13.278-5.953-13.278-13.278m74.317 35.251c-9.156 9.157-26.553 9.768-31.588 9.768c-5.188 0-22.584-.765-31.59-9.768c-1.371-1.373-1.371-3.51 0-4.883c1.374-1.371 3.51-1.371 4.884 0c5.8 5.8 18.008 7.782 26.706 7.782s21.058-1.983 26.704-7.782c1.374-1.371 3.51-1.371 4.884 0c1.22 1.373 1.22 3.51 0 4.883m-2.443-21.822c-7.325 0-13.275-5.95-13.275-13.275s5.95-13.275 13.275-13.275c7.327 0 13.277 5.95 13.277 13.275c0 7.17-5.95 13.275-13.277 13.275",fill:"#fff"})]}),tV=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M18.926 23.998L0 18.892L5.075.002L24 5.108ZM15.348 10.09l-5.282-1.453l-1.414 5.273l5.282 1.453z",fill:"currentColor"})}),nV=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b.jsx("path",{fill:"currentColor",d:"M6 15a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2h2zm1 0a2 2 0 0 1 2-2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2zm2-8a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2v2zm0 1a2 2 0 0 1 2 2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2a2 2 0 0 1 2-2zm8 2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2zm-1 0a2 2 0 0 1-2 2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2a2 2 0 0 1 2 2zm-2 8a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2v-2zm0-1a2 2 0 0 1-2-2a2 2 0 0 1 2-2h5a2 2 0 0 1 2 2a2 2 0 0 1-2 2z"})}),rV=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M128 0C57.308 0 0 57.309 0 128c0 70.696 57.309 128 128 128c70.697 0 128-57.304 128-128C256 57.314 198.697.007 127.998.007zm58.699 184.614c-2.293 3.76-7.215 4.952-10.975 2.644c-30.053-18.357-67.885-22.515-112.44-12.335a7.98 7.98 0 0 1-9.552-6.007a7.97 7.97 0 0 1 6-9.553c48.76-11.14 90.583-6.344 124.323 14.276c3.76 2.308 4.952 7.215 2.644 10.975m15.667-34.853c-2.89 4.695-9.034 6.178-13.726 3.289c-34.406-21.148-86.853-27.273-127.548-14.92c-5.278 1.594-10.852-1.38-12.454-6.649c-1.59-5.278 1.386-10.842 6.655-12.446c46.485-14.106 104.275-7.273 143.787 17.007c4.692 2.89 6.175 9.034 3.286 13.72zm1.345-36.293C162.457 88.964 94.394 86.71 55.007 98.666c-6.325 1.918-13.014-1.653-14.93-7.978c-1.917-6.328 1.65-13.012 7.98-14.935C93.27 62.027 168.434 64.68 215.929 92.876c5.702 3.376 7.566 10.724 4.188 16.405c-3.362 5.69-10.73 7.565-16.4 4.187z",fill:"#1ed760"})}),oV=({className:e})=>b.jsxs("svg",{className:e,viewBox:"0 0 256 290",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9",fill:"#ff004f"}),b.jsx("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"}),b.jsx("path",{d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833",fill:"#00f2ea"})]}),aV=({className:e})=>b.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[b.jsx("style",{type:"text/css",children:`
|
|
130
130
|
.st0{fill:#FFFFFF}
|
|
131
131
|
.st1{fill:#9146FF}
|
|
132
|
-
`}),b.jsx("title",{children:"Asset 2"}),b.jsxs("g",{children:[b.jsx("polygon",{className:"st0",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),b.jsx("g",{children:b.jsxs("g",{children:[b.jsx("path",{className:"st1",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),b.jsx("rect",{className:"st1",height:"600",width:"200",x:"1700",y:"550"}),b.jsx("rect",{className:"st1",height:"600",width:"200",x:"1150",y:"550"})]})})]})]}),iV=({className:e})=>b.jsx("svg",{"data-testid":"geist-icon",height:"16","stroke-linejoin":"round",viewBox:"0 0 16 16",width:"16",className:e,style:{color:"currentcolor"},children:b.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1L16 15H0L8 1Z",fill:"currentColor"})}),sV=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 576 512",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7c0 0-30 73.1-72.4 120.5c-13.7 13.7-20 18.1-27.5 18.1c-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5c0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5c-20 0-68.6-73.4-97.4-157.4c-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7c0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9c0-66.8-3.4-73.1 15.4-73.1c8.7 0 23.7 4.4 58.7 38.1c40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25c-11.2-34.9-86.9-106.7-90.3-111.5c-8.7-11.2-6.2-16.2 0-26.2c.1-.1 72-101.3 79.4-135.6",fill:"currentColor"})}),lV=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z",fill:"currentColor"})}),cV=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:512,height:117,viewBox:"0 0 512 117",children:b.jsx("path",{fill:"#0b5cff",d:"M107.472 114.706H16.348c-5.968 0-11.791-3.203-14.557-8.589C-1.41 99.858-.247 92.434 4.702 87.63L68.17 24.164H22.607C10.088 24.164.044 13.974.044 1.6h83.992c5.968 0 11.79 3.203 14.556 8.589c3.203 6.259 2.038 13.683-2.911 18.486L32.214 92.143h52.55c12.518 0 22.708 10.19 22.708 22.563M468.183 0c-13.1 0-24.746 5.677-32.898 14.702C427.134 5.677 415.488 0 402.388 0c-24.164 0-43.961 20.67-43.961 44.834v69.872c12.518 0 22.562-10.19 22.562-22.563V44.689c0-11.646 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.315 22.272 21.397v48.037c0 12.519 10.19 22.563 22.563 22.563V44.543c0-11.645 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.316 22.272 21.398v48.036c0 12.52 10.19 22.563 22.563 22.563V44.69C512.144 20.67 492.347 0 468.183 0M221.595 58.226c0 32.17-26.056 58.226-58.226 58.226s-58.226-26.056-58.226-58.226S131.199 0 163.369 0s58.226 26.056 58.226 58.226m-22.563 0c0-19.651-16.012-35.663-35.663-35.663s-35.664 16.012-35.664 35.663c0 19.652 16.013 35.664 35.664 35.664s35.663-16.012 35.663-35.664m148.04 0c0 32.17-26.056 58.226-58.226 58.226S230.62 90.396 230.62 58.226S256.676 0 288.846 0s58.227 26.056 58.227 58.226m-22.562 0c0-19.651-16.012-35.663-35.664-35.663c-19.65 0-35.663 16.012-35.663 35.663c0 19.652 16.012 35.664 35.663 35.664c19.652 0 35.664-16.012 35.664-35.664"})}),uV=[{provider:"apple",name:"Apple",icon:F$},{provider:"discord",name:"Discord",icon:$$},{provider:"dropbox",name:"Dropbox",icon:V$},{provider:"facebook",name:"Facebook",icon:H$},{provider:"github",name:"GitHub",icon:G$},{provider:"gitlab",name:"GitLab",icon:q$},{provider:"google",name:"Google",icon:Z$},{provider:"huggingface",name:"Hugging Face",icon:Y$},{provider:"kick",name:"Kick",icon:K$},{provider:"linear",name:"Linear",icon:W$},{provider:"linkedin",name:"LinkedIn",icon:Q$},{provider:"microsoft",name:"Microsoft",icon:X$},{provider:"notion",name:"Notion",icon:J$},{provider:"reddit",name:"Reddit",icon:eV},{provider:"roblox",name:"Roblox",icon:tV},{provider:"slack",name:"Slack",icon:nV},{provider:"spotify",name:"Spotify",icon:rV},{provider:"tiktok",name:"TikTok",icon:oV},{provider:"twitch",name:"Twitch",icon:aV},{provider:"vercel",name:"Vercel",icon:iV},{provider:"vk",name:"VK",icon:sV},{provider:"twitter",name:"X",icon:lV},{provider:"zoom",name:"Zoom",icon:cV}];function
|
|
132
|
+
`}),b.jsx("title",{children:"Asset 2"}),b.jsxs("g",{children:[b.jsx("polygon",{className:"st0",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),b.jsx("g",{children:b.jsxs("g",{children:[b.jsx("path",{className:"st1",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),b.jsx("rect",{className:"st1",height:"600",width:"200",x:"1700",y:"550"}),b.jsx("rect",{className:"st1",height:"600",width:"200",x:"1150",y:"550"})]})})]})]}),iV=({className:e})=>b.jsx("svg",{"data-testid":"geist-icon",height:"16","stroke-linejoin":"round",viewBox:"0 0 16 16",width:"16",className:e,style:{color:"currentcolor"},children:b.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1L16 15H0L8 1Z",fill:"currentColor"})}),sV=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 576 512",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7c0 0-30 73.1-72.4 120.5c-13.7 13.7-20 18.1-27.5 18.1c-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5c0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5c-20 0-68.6-73.4-97.4-157.4c-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7c0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9c0-66.8-3.4-73.1 15.4-73.1c8.7 0 23.7 4.4 58.7 38.1c40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25c-11.2-34.9-86.9-106.7-90.3-111.5c-8.7-11.2-6.2-16.2 0-26.2c.1-.1 72-101.3 79.4-135.6",fill:"currentColor"})}),lV=({className:e})=>b.jsx("svg",{className:e,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z",fill:"currentColor"})}),cV=({className:e})=>b.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:512,height:117,viewBox:"0 0 512 117",children:b.jsx("path",{fill:"#0b5cff",d:"M107.472 114.706H16.348c-5.968 0-11.791-3.203-14.557-8.589C-1.41 99.858-.247 92.434 4.702 87.63L68.17 24.164H22.607C10.088 24.164.044 13.974.044 1.6h83.992c5.968 0 11.79 3.203 14.556 8.589c3.203 6.259 2.038 13.683-2.911 18.486L32.214 92.143h52.55c12.518 0 22.708 10.19 22.708 22.563M468.183 0c-13.1 0-24.746 5.677-32.898 14.702C427.134 5.677 415.488 0 402.388 0c-24.164 0-43.961 20.67-43.961 44.834v69.872c12.518 0 22.562-10.19 22.562-22.563V44.689c0-11.646 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.315 22.272 21.397v48.037c0 12.519 10.19 22.563 22.563 22.563V44.543c0-11.645 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.316 22.272 21.398v48.036c0 12.52 10.19 22.563 22.563 22.563V44.69C512.144 20.67 492.347 0 468.183 0M221.595 58.226c0 32.17-26.056 58.226-58.226 58.226s-58.226-26.056-58.226-58.226S131.199 0 163.369 0s58.226 26.056 58.226 58.226m-22.563 0c0-19.651-16.012-35.663-35.663-35.663s-35.664 16.012-35.664 35.663c0 19.652 16.013 35.664 35.664 35.664s35.663-16.012 35.663-35.664m148.04 0c0 32.17-26.056 58.226-58.226 58.226S230.62 90.396 230.62 58.226S256.676 0 288.846 0s58.227 26.056 58.227 58.226m-22.562 0c0-19.651-16.012-35.663-35.664-35.663c-19.65 0-35.663 16.012-35.663 35.663c0 19.652 16.012 35.664 35.663 35.664c19.652 0 35.664-16.012 35.664-35.664"})}),uV=[{provider:"apple",name:"Apple",icon:F$},{provider:"discord",name:"Discord",icon:$$},{provider:"dropbox",name:"Dropbox",icon:V$},{provider:"facebook",name:"Facebook",icon:H$},{provider:"github",name:"GitHub",icon:G$},{provider:"gitlab",name:"GitLab",icon:q$},{provider:"google",name:"Google",icon:Z$},{provider:"huggingface",name:"Hugging Face",icon:Y$},{provider:"kick",name:"Kick",icon:K$},{provider:"linear",name:"Linear",icon:W$},{provider:"linkedin",name:"LinkedIn",icon:Q$},{provider:"microsoft",name:"Microsoft",icon:X$},{provider:"notion",name:"Notion",icon:J$},{provider:"reddit",name:"Reddit",icon:eV},{provider:"roblox",name:"Roblox",icon:tV},{provider:"slack",name:"Slack",icon:nV},{provider:"spotify",name:"Spotify",icon:rV},{provider:"tiktok",name:"TikTok",icon:oV},{provider:"twitch",name:"Twitch",icon:aV},{provider:"vercel",name:"Vercel",icon:iV},{provider:"vk",name:"VK",icon:sV},{provider:"twitter",name:"X",icon:lV},{provider:"zoom",name:"Zoom",icon:cV}];function pc({className:e,enableToggle:t,onChange:n,...o}){const[i,l]=E.useState(!0),[c,d]=E.useState(!1);return b.jsxs("div",{className:"relative",children:[b.jsx(Yr,{className:fe(t&&"pr-10",e),...o,type:c&&t?"text":"password",onChange:f=>{l(!f.target.value),n?.(f)}}),t&&b.jsxs(b.Fragment,{children:[b.jsx(wt,{className:"!bg-transparent absolute top-0 right-0",disabled:i,size:"icon",type:"button",variant:"ghost",onClick:()=>d(!c),children:c?b.jsx(_7,{}):b.jsx(b7,{})}),b.jsx("style",{children:`
|
|
133
133
|
.hide-password-toggle::-ms-reveal,
|
|
134
134
|
.hide-password-toggle::-ms-clear {
|
|
135
135
|
visibility: hidden;
|
|
136
136
|
pointer-events: none;
|
|
137
137
|
display: none;
|
|
138
138
|
}
|
|
139
|
-
`})]})]})}function bo({redirectTo:e}){const{redirectTo:t}=E.useContext(qe),n=E.useCallback(()=>e||Si("redirectTo")||t,[e,t]),[o,i]=E.useState(!1),{navigate:l,hooks:{useSession:c},onSessionChange:d}=E.useContext(qe),{refetch:f}=c();return{onSuccess:E.useCallback(async()=>{i(!0),await f?.(),d&&await d(),i(!1),l(n())},[f,d,l,n]),isPending:o}}function GT({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=E.useContext(qe),o=t?.(),i=E.useRef(!1),{onSuccess:l}=bo({redirectTo:e});return E.useEffect(()=>{if(!i.current){if(!n){i.current=!0,l();return}o||(i.current=!0,l())}},[o,n,l]),b.jsx(gn,{className:"animate-spin"})}var dV=["/sign-up/email","/sign-in/email","/forget-password"],fV=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,o)=>o.toUpperCase()).replace(/\/([a-z])/g,(n,o)=>o.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function
|
|
139
|
+
`})]})]})}function bo({redirectTo:e}){const{redirectTo:t}=E.useContext(qe),n=E.useCallback(()=>e||Si("redirectTo")||t,[e,t]),[o,i]=E.useState(!1),{navigate:l,hooks:{useSession:c},onSessionChange:d}=E.useContext(qe),{refetch:f}=c();return{onSuccess:E.useCallback(async()=>{i(!0),await f?.(),d&&await d(),i(!1),l(n())},[f,d,l,n]),isPending:o}}function GT({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=E.useContext(qe),o=t?.(),i=E.useRef(!1),{onSuccess:l}=bo({redirectTo:e});return E.useEffect(()=>{if(!i.current){if(!n){i.current=!0,l();return}o||(i.current=!0,l())}},[o,n,l]),b.jsx(gn,{className:"animate-spin"})}var dV=["/sign-up/email","/sign-in/email","/forget-password"],fV=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,o)=>o.toUpperCase()).replace(/\/([a-z])/g,(n,o)=>o.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function Ac({localization:e}){const{captcha:t,localization:n}=E.useContext(qe);e={...n,...e};const o=E.useRef(null),{executeRecaptcha:i}=C2(),l=async f=>{if(!t)throw new Error(e.MISSING_RESPONSE);let h;switch(t.provider){case"google-recaptcha-v3":{const v=fV(f);h=await i?.(v);break}case"google-recaptcha-v2-checkbox":{h=o.current.getValue();break}case"google-recaptcha-v2-invisible":{h=await o.current.executeAsync();break}case"cloudflare-turnstile":{h=o.current.getResponse();break}case"hcaptcha":{h=o.current.getResponse();break}case"captchafox":{h=o.current.getResponse();break}}if(!h)throw new Error(e.MISSING_RESPONSE);return h};return{captchaRef:o,getCaptchaHeaders:async f=>{if(!t)return;if((t.endpoints||dV).includes(f))return{"x-captcha-response":await l(f)}},resetCaptcha:()=>{var f,h,v,p,y,_,S,w;if(t)switch(t.provider){case"google-recaptcha-v3":break;case"google-recaptcha-v2-checkbox":case"google-recaptcha-v2-invisible":{(h=(f=o.current)==null?void 0:f.reset)==null||h.call(f);break}case"cloudflare-turnstile":{(p=(v=o.current)==null?void 0:v.reset)==null||p.call(v);break}case"hcaptcha":{(_=(y=o.current)==null?void 0:y.resetCaptcha)==null||_.call(y);break}case"captchafox":{(w=(S=o.current)==null?void 0:S.reset)==null||w.call(S);break}}}}}function hV({className:e,localization:t}){const n=Ho(),{captcha:o,localization:i}=E.useContext(qe),l={...i,...t};return o?o.hideBadge?b.jsxs(b.Fragment,{children:[b.jsx("style",{children:`
|
|
140
140
|
.grecaptcha-badge { visibility: hidden; }
|
|
141
141
|
`}),b.jsxs("p",{className:fe("text-muted-foreground text-xs",e),children:[l.PROTECTED_BY_RECAPTCHA," ",l.BY_CONTINUING_YOU_AGREE," Google"," ",b.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:l.PRIVACY_POLICY})," ","&"," ",b.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:l.TERMS_OF_SERVICE}),"."]})]}):n?b.jsx("style",{children:`
|
|
142
142
|
.grecaptcha-badge { visibility: visible !important; }
|
|
@@ -152,4 +152,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
152
152
|
.dark .grecaptcha-badge {
|
|
153
153
|
border-color: var(--input) !important;
|
|
154
154
|
}
|
|
155
|
-
`}),b.jsx(e$,{ref:e,sitekey:t.siteKey,theme:n,hl:o,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:fe(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${o}-${t.provider}`)]}):null}var mV=["/sign-up/email","/sign-in/email","/forget-password"];function Ac({ref:e,localization:t,action:n}){const{captcha:o}=E.useContext(qe);if(!o||n&&!(o.endpoints||mV).includes(n))return null;const{theme:i}=Ag(),l=o.provider==="google-recaptcha-v2-checkbox"||o.provider==="google-recaptcha-v2-invisible",c=o.provider==="google-recaptcha-v3"||o.provider==="google-recaptcha-v2-invisible",d=o.provider==="cloudflare-turnstile",f=o.provider==="hcaptcha",h=o.provider==="captchafox";return b.jsxs(b.Fragment,{children:[l&&b.jsx(pV,{ref:e}),c&&b.jsx(hV,{localization:t}),d&&b.jsx(wT,{className:"mx-auto",ref:e,siteKey:o.siteKey,options:{theme:i,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(AF,{ref:e,sitekey:o.siteKey,theme:i})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(hT,{ref:e,sitekey:o.siteKey,theme:i})})]})}function y0({className:e,containerClassName:t,...n}){return b.jsx(AT,{"data-slot":"input-otp",containerClassName:fe("flex items-center gap-2 has-disabled:opacity-50",t),className:fe("disabled:cursor-not-allowed",e),...n})}function ys({className:e,...t}){return b.jsx("div",{"data-slot":"input-otp-group",className:fe("flex items-center",e),...t})}function pn({index:e,className:t,...n}){const o=E.useContext(TT),{char:i,hasFakeCaret:l,isActive:c}=o?.slots[e]??{};return b.jsxs("div",{"data-slot":"input-otp-slot","data-active":c,className:fe("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[i,l&&b.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:b.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function ov({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(S7,{})})}function b0({otpSeparators:e=0}){return e===0?b.jsxs(ys,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1}),b.jsx(pn,{index:2}),b.jsx(pn,{index:3}),b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]}):e===1?b.jsxs(b.Fragment,{children:[b.jsxs(ys,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1}),b.jsx(pn,{index:2})]}),b.jsx(ov,{}),b.jsxs(ys,{children:[b.jsx(pn,{index:3}),b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(ys,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1})]}),b.jsx(ov,{}),b.jsxs(ys,{children:[b.jsx(pn,{index:2}),b.jsx(pn,{index:3})]}),b.jsx(ov,{}),b.jsxs(ys,{children:[b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]})]})}function fw(e){const[t,n]=E.useState();return t?b.jsx(gV,{...e,email:t}):b.jsx(vV,{...e,setEmail:n})}function vV({className:e,classNames:t,isSubmitting:n,localization:o,setIsSubmitting:i,setEmail:l}){const c=Ho(),{captchaRef:d,getCaptchaHeaders:f}=Tc({localization:o}),{authClient:h,localization:v,toast:p,localizeErrors:y}=E.useContext(qe);o={...v,...o};const _=bn({email:Ve().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),S=mo({resolver:vo(_),defaultValues:{email:""}});n=n||S.formState.isSubmitting,E.useEffect(()=>{i?.(S.formState.isSubmitting)},[S.formState.isSubmitting,i]);async function w({email:T}){const O={throw:!0,headers:await f("/email-otp/send-verification-otp")};try{await h.emailOtp.sendVerificationOtp({email:T,type:"sign-in",fetchOptions:O}),p({variant:"success",message:o.EMAIL_OTP_VERIFICATION_SENT}),l(T)}catch(A){p({variant:"error",message:jt({error:A,localization:o,localizeErrors:y})})}}return b.jsx(yo,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(w),noValidate:c,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:S.control,name:"email",render:({field:T})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:n,...T})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ac,{ref:d,localization:o,action:"/email-otp/send-verification-otp"}),b.jsx(wt,{type:"submit",disabled:n,className:fe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(gn,{className:"animate-spin"}):o.EMAIL_OTP_SEND_ACTION})]})})}function gV({className:e,classNames:t,isSubmitting:n,localization:o,otpSeparators:i=0,redirectTo:l,setIsSubmitting:c,email:d}){const{authClient:f,localization:h,toast:v,localizeErrors:p}=E.useContext(qe);o={...h,...o};const{onSuccess:y,isPending:_}=bo({redirectTo:l}),S=bn({code:Ve().min(1,{message:`${o.EMAIL_OTP} ${o.IS_REQUIRED}`}).min(6,{message:`${o.EMAIL_OTP} ${o.IS_INVALID}`})}),w=mo({resolver:vo(S),defaultValues:{code:""}});n=n||w.formState.isSubmitting||_,E.useEffect(()=>{c?.(w.formState.isSubmitting||_)},[w.formState.isSubmitting,_,c]);async function T({code:O}){try{await f.signIn.emailOtp({email:d,otp:O,fetchOptions:{throw:!0}}),await y()}catch(A){v({variant:"error",message:jt({error:A,localization:o,localizeErrors:p})}),w.reset()}}return b.jsx(yo,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(T),className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:w.control,name:"code",render:({field:O})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL_OTP}),b.jsx(rn,{children:b.jsx(y0,{...O,maxLength:6,onChange:A=>{O.onChange(A),A.length===6&&w.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(b0,{otpSeparators:i})})}),b.jsx(un,{className:t?.error})]})}),b.jsx("div",{className:"grid gap-4",children:b.jsxs(wt,{type:"submit",disabled:n,className:fe(t?.button,t?.primaryButton),children:[n&&b.jsx(gn,{className:"animate-spin"}),o.EMAIL_OTP_VERIFY_ACTION]})})]})})}function yV({onCancel:e,localization:t,className:n,classNames:o,otpSeparators:i,callbackURL:l,isSubmitting:c,redirectTo:d,setIsSubmitting:f}){const[h,v]=E.useState(!0),[p,y]=E.useState(30),{authClient:_,localization:S,toast:w,localizeErrors:T,navigate:O,basePath:A,viewPaths:C}=E.useContext(qe);t={...S,...t};const R=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:I,isPending:k}=bo({redirectTo:d}),D=bn({code:Ve().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),N=mo({resolver:vo(D),defaultValues:{code:""}}),z=c||N.formState.isSubmitting||k;E.useEffect(()=>{f?.(N.formState.isSubmitting||k)},[N.formState.isSubmitting,k,f]),E.useEffect(()=>{if(p>0){const q=setTimeout(()=>y(p-1),1e3);return()=>clearTimeout(q)}else v(!1)},[p]);async function W({code:q}){try{const j=await _.emailOtp.verifyEmail({email:R,otp:q,fetchOptions:{throw:!0}});"token"in j&&j.token?await I():(O(`${A}/${C.SIGN_IN}${window.location.search}`),w({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(j){w({variant:"error",message:jt({error:j,localization:t,localizeErrors:T})}),N.reset()}}async function $(){if(!h){v(!0),y(30);try{await _.emailOtp.sendVerificationOtp({email:R,type:"email-verification",fetchOptions:{throw:!0}}),w({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(q){w({variant:"error",message:jt({error:q,localization:t,localizeErrors:T})}),v(!1),y(0)}}}return R?b.jsx(yo,{...N,children:b.jsxs("form",{onSubmit:N.handleSubmit(W),className:fe("grid w-full gap-6",n,o?.base),children:[b.jsx(Ht,{control:N.control,name:"code",render:({field:q})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:o?.label,children:t.EMAIL_OTP}),b.jsx(rn,{children:b.jsx(y0,{...q,maxLength:6,onChange:j=>{q.onChange(j),j.length===6&&N.handleSubmit(W)()},containerClassName:o?.otpInputContainer,className:o?.otpInput,disabled:z,children:b.jsx(b0,{otpSeparators:i})})}),b.jsx(un,{className:o?.error})]})}),b.jsxs("div",{className:"grid gap-4",children:[b.jsxs(wt,{type:"submit",disabled:z,className:fe(o?.button,o?.primaryButton),children:[z&&b.jsx(gn,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),b.jsx(wt,{type:"button",variant:"outline",onClick:$,disabled:h||z,className:fe("w-full",o?.button),children:h?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&b.jsx(wt,{type:"button",variant:"ghost",onClick:e,disabled:z,className:"w-full",children:t.CANCEL})]})]})}):b.jsx("div",{className:fe("grid w-full gap-6",n),children:b.jsxs("div",{className:"text-center",children:[b.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),b.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function bV({className:e,classNames:t,isSubmitting:n,localization:o,setIsSubmitting:i}){const l=Ho(),{captchaRef:c,getCaptchaHeaders:d,resetCaptcha:f}=Tc({localization:o}),{authClient:h,basePath:v,baseURL:p,localization:y,navigate:_,toast:S,viewPaths:w,localizeErrors:T}=E.useContext(qe);o={...y,...o};const O=bn({email:Ve().email({message:`${o.EMAIL} ${o.IS_INVALID}`}).min(1,{message:`${o.EMAIL} ${o.IS_REQUIRED}`})}),A=mo({resolver:vo(O),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{i?.(A.formState.isSubmitting)},[A.formState.isSubmitting,i]);async function C({email:R}){try{const I={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:R,redirectTo:`${p}${v}/${w.RESET_PASSWORD}`,fetchOptions:I}),S({variant:"success",message:o.FORGOT_PASSWORD_EMAIL}),_(`${v}/${w.SIGN_IN}${window.location.search}`)}catch(I){S({variant:"error",message:jt({error:I,localization:o,localizeErrors:T})}),f()}}return b.jsx(yo,{...A,children:b.jsxs("form",{onSubmit:A.handleSubmit(C),noValidate:l,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:A.control,name:"email",render:({field:R})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:n,...R})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ac,{ref:c,localization:o,action:"/forget-password"}),b.jsx(wt,{type:"submit",disabled:n,className:fe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(gn,{className:"animate-spin"}):o.FORGOT_PASSWORD_ACTION})]})})}function hw({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,redirectTo:l,setIsSubmitting:c}){const d=Ho(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:v}=Tc({localization:i}),{authClient:p,basePath:y,baseURL:_,persistClient:S,localization:w,redirectTo:T,viewPaths:O,toast:A,localizeErrors:C}=E.useContext(qe);i={...w,...i};const R=E.useCallback(()=>l||Si("redirectTo")||T,[l,T]),I=E.useCallback(()=>`${_}${n||(S?`${y}/${O.CALLBACK}?redirectTo=${encodeURIComponent(R())}`:R())}`,[n,S,y,O,_,R]),k=bn({email:Ve().email({message:`${i.EMAIL} ${i.IS_INVALID}`})}),D=mo({resolver:vo(k),defaultValues:{email:""}});o=o||D.formState.isSubmitting,E.useEffect(()=>{c?.(D.formState.isSubmitting)},[D.formState.isSubmitting,c]);async function N({email:z}){try{const W={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:z,callbackURL:I(),fetchOptions:W}),A({variant:"success",message:i.MAGIC_LINK_EMAIL}),D.reset()}catch(W){A({variant:"error",message:jt({error:W,localization:i,localizeErrors:C})}),v()}}return b.jsx(yo,{...D,children:b.jsxs("form",{onSubmit:D.handleSubmit(N),noValidate:d,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:D.control,name:"email",render:({field:z})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{className:t?.input,type:"email",placeholder:i.EMAIL_PLACEHOLDER,disabled:o,...z})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ac,{ref:f,localization:i,action:"/sign-in/magic-link"}),b.jsx(wt,{type:"submit",disabled:o,className:fe("w-full",t?.button,t?.primaryButton),children:o?b.jsx(gn,{className:"animate-spin"}):i.MAGIC_LINK_ACTION})]})})}function _V({className:e,classNames:t,isSubmitting:n,localization:o,redirectTo:i,setIsSubmitting:l}){const{authClient:c,localization:d,toast:f,localizeErrors:h}=E.useContext(qe);o={...d,...o};const{onSuccess:v,isPending:p}=bo({redirectTo:i}),y=bn({code:Ve().min(1,{message:o.BACKUP_CODE_REQUIRED})}),_=mo({resolver:vo(y),defaultValues:{code:""}});n=n||_.formState.isSubmitting||p,E.useEffect(()=>{l?.(_.formState.isSubmitting||p)},[_.formState.isSubmitting,p,l]);async function S({code:w}){try{await c.twoFactor.verifyBackupCode({code:w,fetchOptions:{throw:!0}}),await v()}catch(T){f({variant:"error",message:jt({error:T,localization:o,localizeErrors:h})}),_.reset()}}return b.jsx(yo,{..._,children:b.jsxs("form",{onSubmit:_.handleSubmit(S),className:fe("grid gap-6",e,t?.base),children:[b.jsx(Ht,{control:_.control,name:"code",render:({field:w})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.BACKUP_CODE}),b.jsx(rn,{children:b.jsx(Yr,{placeholder:o.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...w})}),b.jsx(un,{className:t?.error})]})}),b.jsx(wt,{type:"submit",disabled:n,className:fe(t?.button,t?.primaryButton),children:n?b.jsx(gn,{className:"animate-spin"}):o.RECOVER_ACCOUNT_ACTION})]})})}function EV({className:e,classNames:t,localization:n,passwordValidation:o}){const i=E.useRef(!1),{authClient:l,basePath:c,credentials:d,localization:f,viewPaths:h,navigate:v,toast:p,localizeErrors:y}=E.useContext(qe),_=d?.confirmPassword,S=d?.passwordValidation;n={...f,...n},o={...S,...o};const w=bn({newPassword:ic(o,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:_?ic(o,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):Ve().optional()}).refine(C=>!_||C.newPassword===C.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),T=mo({resolver:vo(w),defaultValues:{newPassword:"",confirmPassword:""}}),O=T.formState.isSubmitting;E.useEffect(()=>{if(i.current)return;i.current=!0;const R=new URLSearchParams(window.location.search).get("token");(!R||R==="INVALID_TOKEN")&&(v(`${c}/${h.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[c,v,p,h,n]);async function A({newPassword:C}){try{const I=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:I,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),v(`${c}/${h.SIGN_IN}${window.location.search}`)}catch(R){p({variant:"error",message:jt({error:R,localization:n,localizeErrors:y})}),T.reset()}}return b.jsx(yo,{...T,children:b.jsxs("form",{onSubmit:T.handleSubmit(A),className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:T.control,name:"newPassword",render:({field:C})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:n.NEW_PASSWORD}),b.jsx(rn,{children:b.jsx(hc,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:O,...C})}),b.jsx(un,{className:t?.error})]})}),_&&b.jsx(Ht,{control:T.control,name:"confirmPassword",render:({field:C})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:n.CONFIRM_PASSWORD}),b.jsx(rn,{children:b.jsx(hc,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:O,...C})}),b.jsx(un,{className:t?.error})]})}),b.jsx(wt,{type:"submit",disabled:O,className:fe("w-full",t?.button,t?.primaryButton),children:O?b.jsx(gn,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function SV({className:e,classNames:t,isSubmitting:n,localization:o,redirectTo:i,setIsSubmitting:l,passwordValidation:c}){const d=Ho(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:v}=Tc({localization:o}),{authClient:p,basePath:y,credentials:_,localization:S,viewPaths:w,navigate:T,toast:O,Link:A,localizeErrors:C,emailVerification:R}=E.useContext(qe),I=_?.rememberMe,k=_?.username,D=_?.passwordValidation;o={...S,...o},c={...D,...c};const{onSuccess:N,isPending:z}=bo({redirectTo:i}),W=bn({email:k?Ve().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):Ve().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:ic(c,o),rememberMe:xg().optional()}),$=mo({resolver:vo(W),defaultValues:{email:"",password:"",rememberMe:!I}});n=n||$.formState.isSubmitting||z,E.useEffect(()=>{l?.($.formState.isSubmitting||z)},[$.formState.isSubmitting,z,l]);async function q({email:j,password:X,rememberMe:oe}){var L;try{let F={};if(k&&!Y8(j)){const G={throw:!0,headers:await h("/sign-in/username")};F=await p.signIn.username({username:j,password:X,rememberMe:oe,fetchOptions:G})}else{const G={throw:!0,headers:await h("/sign-in/email")};F=await p.signIn.email({email:j,password:X,rememberMe:oe,fetchOptions:G})}F.twoFactorRedirect?T(`${y}/${w.TWO_FACTOR}${window.location.search}`):await N()}catch(F){$.resetField("password"),v(),O({variant:"error",message:jt({error:F,localization:o,localizeErrors:C})}),R?.otp&&((L=F?.error)==null?void 0:L.code)==="EMAIL_NOT_VERIFIED"&&T(`${y}/${w.EMAIL_VERIFICATION}?email=${encodeURIComponent(j)}`)}}return b.jsx(yo,{...$,children:b.jsxs("form",{onSubmit:$.handleSubmit(q),noValidate:d,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:$.control,name:"email",render:({field:j})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:k?o.USERNAME:o.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{autoComplete:k?"username":"email",className:t?.input,type:k?"text":"email",placeholder:k?o.SIGN_IN_USERNAME_PLACEHOLDER:o.EMAIL_PLACEHOLDER,disabled:n,...j})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:$.control,name:"password",render:({field:j})=>b.jsxs(Gt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(qt,{className:t?.label,children:o.PASSWORD}),_?.forgotPassword&&b.jsx(A,{className:fe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${w.FORGOT_PASSWORD}${d?window.location.search:""}`,children:o.FORGOT_PASSWORD_LINK})]}),b.jsx(rn,{children:b.jsx(hc,{autoComplete:"current-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:n,...j})}),b.jsx(un,{className:t?.error})]})}),I&&b.jsx(Ht,{control:$.control,name:"rememberMe",render:({field:j})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(rn,{children:b.jsx(g0,{checked:j.value,onCheckedChange:j.onChange,disabled:n})}),b.jsx(qt,{children:o.REMEMBER_ME})]})}),b.jsx(Ac,{ref:f,localization:o,action:"/sign-in/email"}),b.jsx(wt,{type:"submit",disabled:n,className:fe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(gn,{className:"animate-spin"}):o.SIGN_IN_ACTION})]})})}function wV({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,redirectTo:l,setIsSubmitting:c,passwordValidation:d}){const f=Ho(),{captchaRef:h,getCaptchaHeaders:v,resetCaptcha:p}=Tc({localization:i}),{additionalFields:y,authClient:_,basePath:S,baseURL:w,credentials:T,localization:O,nameRequired:A,persistClient:C,redirectTo:R,signUp:I,viewPaths:k,navigate:D,toast:N,avatar:z,localizeErrors:W,emailVerification:$}=E.useContext(qe),q=T?.confirmPassword,j=T?.username,X=T?.usernameRequired??!0,oe=T?.passwordValidation,L=I?.fields;i={...O,...i},d={...oe,...d};const F=E.useRef(null),[G,re]=E.useState(null),[ye,P]=E.useState(!1),Q=E.useCallback(()=>l||Si("redirectTo")||R,[l,R]),te=E.useCallback(()=>`${w}${n||(C?`${S}/${k.CALLBACK}?redirectTo=${encodeURIComponent(Q())}`:Q())}`,[n,C,S,k,w,Q]),{onSuccess:se,isPending:me}=bo({redirectTo:l}),_e={email:Ve().email({message:`${i.EMAIL} ${i.IS_INVALID}`}),password:ic(d,i),name:L?.includes("name")&&A?Ve().min(1,{message:`${i.NAME} ${i.IS_REQUIRED}`}):Ve().optional(),image:Ve().optional(),username:j&&X?Ve().min(1,{message:`${i.USERNAME} ${i.IS_REQUIRED}`}):Ve().optional(),confirmPassword:q?ic(d,{PASSWORD_REQUIRED:i.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:i.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:i.PASSWORD_TOO_LONG,INVALID_PASSWORD:i.INVALID_PASSWORD}):Ve().optional()},be={};if(L)for(const ve of L){if(ve==="name"||ve==="image")continue;const Re=y?.[ve];if(!Re)continue;let ke;Re.type==="number"?ke=Re.required?q8(et=>et?Number(et):void 0,E2({message:`${Re.label} ${i.IS_INVALID}`})):Z8({message:`${Re.label} ${i.IS_INVALID}`}).optional():Re.type==="boolean"?ke=Re.required?PE({message:`${Re.label} ${i.IS_INVALID}`}).refine(et=>et===!0,{message:`${Re.label} ${i.IS_REQUIRED}`}):PE({message:`${Re.label} ${i.IS_INVALID}`}).optional():ke=Re.required?Ve().min(1,`${Re.label} ${i.IS_REQUIRED}`):Ve().optional(),be[ve]=ke}const Se=bn(_e).extend(be).refine(ve=>q?ve.password===ve.confirmPassword:!0,{message:i.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),De={email:"",password:"",...q&&{confirmPassword:""},...L?.includes("name")?{name:""}:{},...j?{username:""}:{},...L?.includes("image")&&z?{image:""}:{}};if(L)for(const ve of L){if(ve==="name"||ve==="image")continue;const Re=y?.[ve];Re&&(De[ve]=Re.type==="boolean"?!1:"")}const Le=mo({resolver:vo(Se),defaultValues:De});o=o||Le.formState.isSubmitting||me,E.useEffect(()=>{c?.(Le.formState.isSubmitting||me)},[Le.formState.isSubmitting,me,c]);const Ee=async ve=>{if(z){P(!0);try{const Re=await D$(ve,crypto.randomUUID(),z.size,z.extension);let ke;z.upload?ke=await z.upload(Re):ke=await P$(Re),ke?(re(ke),Le.setValue("image",ke)):(re(null),Le.setValue("image",""))}catch(Re){console.error(Re),N({variant:"error",message:jt({error:Re,localization:i,localizeErrors:W})})}P(!1)}},ze=()=>{re(null),Le.setValue("image","")},Nt=()=>{var ve;return(ve=F.current)==null?void 0:ve.click()};async function ge({email:ve,password:Re,name:ke,username:et,confirmPassword:Ue,image:Qe,...U}){try{for(const[pe,he]of Object.entries(U)){const xe=y?.[pe];if(xe?.validate&&typeof he=="string"&&!await xe.validate(he)){Le.setError(pe,{message:`${xe.label} ${i.IS_INVALID}`});return}}const Z={throw:!0,headers:await v("/sign-up/email")},Y={};et!==void 0&&(!X&&(et===null||et===""||typeof et=="string"&&et.trim()==="")||(Y.username=et)),Qe!==void 0&&(Y.image=Qe);const ue=await _.signUp.email({email:ve,password:Re,name:ke||"",...Y,...U,callbackURL:te(),fetchOptions:Z});"token"in ue&&ue.token?await se():$?.otp?D(`${S}/${k.EMAIL_VERIFICATION}?email=${encodeURIComponent(ve)}`):(D(`${S}/${k.SIGN_IN}${window.location.search}`),N({variant:"success",message:i.SIGN_UP_EMAIL}))}catch(Z){N({variant:"error",message:jt({error:Z,localization:i,localizeErrors:W})}),Le.resetField("password"),Le.resetField("confirmPassword"),p()}}return b.jsx(yo,{...Le,children:b.jsxs("form",{onSubmit:Le.handleSubmit(ge),noValidate:f,className:fe("grid w-full gap-6",e,t?.base),children:[L?.includes("image")&&z&&b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:F,accept:"image/*",disabled:ye,hidden:!0,type:"file",onChange:ve=>{var Re;const ke=(Re=ve.target.files)==null?void 0:Re.item(0);ke&&Ee(ke),ve.target.value=""}}),b.jsx(Ht,{control:Le.control,name:"image",render:()=>b.jsxs(Gt,{children:[b.jsx(qt,{children:i.AVATAR}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs(LT,{children:[b.jsx(PT,{asChild:!0,children:b.jsx(wt,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx(HT,{isPending:ye,className:"size-16",user:G?{name:Le.watch("name"),email:Le.watch("email"),image:G}:null,localization:i})})}),b.jsxs(kT,{align:"start",onCloseAutoFocus:ve=>ve.preventDefault(),children:[b.jsxs(lf,{onClick:Nt,disabled:ye,children:[b.jsx(g7,{}),i.UPLOAD_AVATAR]}),G&&b.jsxs(lf,{onClick:ze,disabled:ye,variant:"destructive",children:[b.jsx(x7,{}),i.DELETE_AVATAR]})]})]}),b.jsxs(wt,{type:"button",variant:"outline",onClick:Nt,disabled:ye,children:[ye&&b.jsx(gn,{className:"animate-spin"}),i.UPLOAD]})]}),b.jsx(un,{})]})})]}),L?.includes("name")&&b.jsx(Ht,{control:Le.control,name:"name",render:({field:ve})=>b.jsxs(Gt,{children:[b.jsxs(qt,{className:t?.label,children:[i.NAME,!A&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:i.OPTIONAL_BRACKETS})]}),b.jsx(rn,{children:b.jsx(Yr,{autoComplete:"name",className:t?.input,placeholder:i.NAME_PLACEHOLDER,disabled:o,...ve,value:ve.value})}),b.jsx(un,{className:t?.error})]})}),j&&b.jsx(Ht,{control:Le.control,name:"username",render:({field:ve})=>b.jsxs(Gt,{children:[b.jsxs(qt,{className:t?.label,children:[i.USERNAME,!X&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:i.OPTIONAL_BRACKETS})]}),b.jsx(rn,{children:b.jsx(Yr,{autoComplete:"username",className:t?.input,placeholder:i.USERNAME_PLACEHOLDER,disabled:o,...ve,value:ve.value})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:Le.control,name:"email",render:({field:ve})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{autoComplete:"email",className:t?.input,type:"email",placeholder:i.EMAIL_PLACEHOLDER,disabled:o,...ve,value:ve.value})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:Le.control,name:"password",render:({field:ve})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.PASSWORD}),b.jsx(rn,{children:b.jsx(hc,{autoComplete:"new-password",className:t?.input,placeholder:i.PASSWORD_PLACEHOLDER,disabled:o,enableToggle:!0,...ve,value:ve.value})}),b.jsx(un,{className:t?.error})]})}),q&&b.jsx(Ht,{control:Le.control,name:"confirmPassword",render:({field:ve})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.CONFIRM_PASSWORD}),b.jsx(rn,{children:b.jsx(hc,{autoComplete:"new-password",className:t?.input,placeholder:i.CONFIRM_PASSWORD_PLACEHOLDER,disabled:o,enableToggle:!0,...ve,value:ve.value})}),b.jsx(un,{className:t?.error})]})}),L?.filter(ve=>ve!=="name"&&ve!=="image").map(ve=>{const Re=y?.[ve];return Re?Re.type==="boolean"?b.jsx(Ht,{control:Le.control,name:ve,render:({field:ke})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(rn,{children:b.jsx(g0,{checked:ke.value,onCheckedChange:ke.onChange,disabled:o})}),b.jsx(qt,{className:t?.label,children:Re.label}),b.jsx(un,{className:t?.error})]})},ve):b.jsx(Ht,{control:Le.control,name:ve,render:({field:ke})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:Re.label}),b.jsx(rn,{children:Re.type==="number"?b.jsx(Yr,{className:t?.input,type:"number",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:o,...ke,value:ke.value}):Re.multiline?b.jsx(B$,{className:t?.input,placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:o,...ke,value:ke.value}):b.jsx(Yr,{className:t?.input,type:"text",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:o,...ke,value:ke.value})}),b.jsx(un,{className:t?.error})]})},ve):(console.error(`Additional field ${ve} not found`),null)}),b.jsx(Ac,{ref:h,localization:i,action:"/sign-up/email"}),b.jsx(wt,{type:"submit",disabled:o,className:fe("w-full",t?.button,t?.primaryButton),children:o?b.jsx(gn,{className:"animate-spin"}):i.SIGN_UP_ACTION})]})})}function xV({className:e,classNames:t,isSubmitting:n,localization:o,otpSeparators:i=0,redirectTo:l,setIsSubmitting:c}){var d;const f=Ho(),h=f?Si("totpURI"):null,v=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:S,twoFactor:w,viewPaths:T,toast:O,Link:A,localizeErrors:C}=E.useContext(qe);o={...S,...o};const{onSuccess:R,isPending:I}=bo({redirectTo:l}),{data:k}=_(),D=(d=k?.user)==null?void 0:d.twoFactorEnabled,[N,z]=E.useState(w?.length===1?w[0]:null),[W,$]=E.useState(!1),[q,j]=E.useState(0),X=bn({code:Ve().min(1,{message:`${o.ONE_TIME_PASSWORD} ${o.IS_REQUIRED}`}).min(6,{message:`${o.ONE_TIME_PASSWORD} ${o.IS_INVALID}`}),trustDevice:xg().optional()}),oe=mo({resolver:vo(X),defaultValues:{code:""}});n=n||oe.formState.isSubmitting||I,E.useEffect(()=>{c?.(oe.formState.isSubmitting||I)},[oe.formState.isSubmitting,I,c]),E.useEffect(()=>{N==="otp"&&q<=0&&!v.current&&(v.current=!0,L())},[N]),E.useEffect(()=>{if(q<=0)return;const G=setTimeout(()=>{j(re=>re-1)},1e3);return()=>clearTimeout(G)},[q]);const L=async()=>{if(!(W||q>0)){try{$(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),j(60)}catch(G){O({variant:"error",message:jt({error:G,localization:o,localizeErrors:C})}),G.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}v.current=!1,$(!1)}};async function F({code:G,trustDevice:re}){try{await(N==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:G,trustDevice:re,fetchOptions:{throw:!0}}),await R(),k&&!D&&O({variant:"success",message:o?.TWO_FACTOR_ENABLED})}catch(ye){O({variant:"error",message:jt({error:ye,localization:o,localizeErrors:C})}),oe.reset()}}return b.jsx(yo,{...oe,children:b.jsxs("form",{onSubmit:oe.handleSubmit(F),className:fe("grid w-full gap-6",e,t?.base),children:[w?.includes("totp")&&h&&N==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx(jT,{className:t?.label,children:o.TWO_FACTOR_TOTP_LABEL}),b.jsx(S$,{className:fe("border shadow-xs",t?.qrCode),value:h})]}),N!==null&&b.jsxs(b.Fragment,{children:[b.jsx(Ht,{control:oe.control,name:"code",render:({field:G})=>b.jsxs(Gt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(qt,{className:t?.label,children:o.ONE_TIME_PASSWORD}),b.jsx(A,{className:fe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${T.RECOVER_ACCOUNT}${f?window.location.search:""}`,children:o.FORGOT_AUTHENTICATOR})]}),b.jsx(rn,{children:b.jsx(y0,{...G,maxLength:6,onChange:re=>{G.onChange(re),re.length===6&&oe.handleSubmit(F)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(b0,{otpSeparators:i})})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:oe.control,name:"trustDevice",render:({field:G})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(rn,{children:b.jsx(g0,{checked:G.value,onCheckedChange:G.onChange,disabled:n,className:t?.checkbox})}),b.jsx(qt,{className:t?.label,children:o.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[N!==null&&b.jsxs(wt,{type:"submit",disabled:n,className:fe(t?.button,t?.primaryButton),children:[n&&b.jsx(gn,{className:"animate-spin"}),o.TWO_FACTOR_ACTION]}),N==="otp"&&w?.includes("otp")&&b.jsxs(wt,{type:"button",variant:"outline",onClick:L,disabled:q>0||W||n,className:fe(t?.button,t?.outlineButton),children:[W?b.jsx(gn,{className:"animate-spin"}):b.jsx(VE,{className:t?.icon}),o.RESEND_CODE,q>0&&` (${q})`]}),N!=="otp"&&w?.includes("otp")&&b.jsxs(wt,{type:"button",variant:"secondary",className:fe(t?.button,t?.secondaryButton),onClick:()=>z("otp"),disabled:n,children:[b.jsx(VE,{className:t?.icon}),o.SEND_VERIFICATION_CODE]}),N!=="totp"&&w?.includes("totp")&&b.jsxs(wt,{type:"button",variant:"secondary",className:fe(t?.button,t?.secondaryButton),onClick:()=>z("totp"),disabled:n,children:[b.jsx(w7,{className:t?.icon}),o.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function qT({redirectTo:e}){const t=E.useRef(!1),{authClient:n,basePath:o,viewPaths:i}=E.useContext(qe),{onSuccess:l}=bo({redirectTo:e||`${o}/${i.SIGN_IN}`});return E.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(l))},[n,l]),b.jsx(gn,{className:"animate-spin"})}function RV({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,pathname:l,redirectTo:c,view:d,otpSeparators:f=0,setIsSubmitting:h}){const{basePath:v,credentials:p,localization:y,magicLink:_,emailOTP:S,signUp:w,twoFactor:T,viewPaths:O,replace:A}=E.useContext(qe),C=!!w;if(i={...y,...i},E.useEffect(()=>{l&&!Rv(O,l)&&(console.error(`Invalid auth view: ${l}`),A(`${v}/${O.SIGN_IN}${window.location.search}`))},[l,O,v,A]),d=d||Rv(O,l)||"SIGN_IN",E.useEffect(()=>{let R=!1;d==="MAGIC_LINK"&&(!_||!p&&!S)&&(R=!0),d==="EMAIL_OTP"&&(!S||!p&&!_)&&(R=!0),d==="SIGN_UP"&&!C&&(R=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&(R=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&!T&&(R=!0),R&&A(`${v}/${O.SIGN_IN}${window.location.search}`)},[v,d,O,p,A,S,C,_,T]),d==="SIGN_OUT")return b.jsx(qT,{redirectTo:c});if(d==="CALLBACK")return b.jsx(GT,{redirectTo:c});if(d==="SIGN_IN")return p?b.jsx(SV,{className:e,classNames:t,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):_?b.jsx(hw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):S?b.jsx(fw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(xV,{className:e,classNames:t,localization:i,otpSeparators:f,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(_V,{className:e,classNames:t,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(hw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(fw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="EMAIL_VERIFICATION")return b.jsx(yV,{className:e,classNames:t,callbackURL:n,localization:i,otpSeparators:f,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(bV,{className:e,classNames:t,localization:i,isSubmitting:o,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(EV,{className:e,classNames:t,localization:i});if(d==="SIGN_UP")return C&&b.jsx(wV,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h})}function OV({className:e,classNames:t,localization:n}){const{localization:o,redirectTo:i,replace:l,toast:c}=E.useContext(qe),d=E.useMemo(()=>({...o,...n}),[o,n]),{data:f}=T$(),[h,v]=E.useState(null);return E.useEffect(()=>{const p=Si("invitationId");if(!p){c({variant:"error",message:d.INVITATION_NOT_FOUND}),l(i);return}v(p)},[d.INVITATION_NOT_FOUND,c,l,i]),!f||!h?b.jsx(ZT,{className:e,classNames:t}):b.jsx(TV,{className:e,classNames:t,localization:d,invitationId:h})}function TV({className:e,classNames:t,localization:n,invitationId:o}){var i;const{authClient:l,hooks:{useInvitation:c},localization:d,organization:f,redirectTo:h,replace:v,toast:p,localizeErrors:y}=E.useContext(qe),_=E.useMemo(()=>({...d,...n}),[d,n]),[S,w]=E.useState(!1),[T,O]=E.useState(!1),A=S||T,{data:C,isPending:R}=c({query:{id:o}}),I=E.useCallback(()=>Si("redirectTo")||h,[h]);E.useEffect(()=>{if(!(R||!o)){if(!C){p({variant:"error",message:_.INVITATION_NOT_FOUND}),v(h);return}(C.status!=="pending"||new Date(C.expiresAt)<new Date)&&(p({variant:"error",message:new Date(C.expiresAt)<new Date?_.INVITATION_EXPIRED:_.INVITATION_NOT_FOUND}),v(h))}},[C,R,o,_,p,v,h]);const k=async()=>{O(!0);try{await l.organization.acceptInvitation({invitationId:o,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),v(I())}catch($){p({variant:"error",message:jt({error:$,localization:_,localizeErrors:y})}),O(!1)}},D=async()=>{w(!0);try{await l.organization.rejectInvitation({invitationId:o,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),v(h)}catch($){p({variant:"error",message:jt({error:$,localization:_,localizeErrors:y})}),w(!1)}},W=((i=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find($=>$.role===C?.role))==null?void 0:i.label)||C?.role;return C?b.jsxs(bi,{className:fe("w-full max-w-sm",e,t?.base),children:[b.jsxs(kf,{className:fe("justify-items-center text-center",t?.header),children:[b.jsx(m0,{className:fe("text-lg md:text-xl",t?.title),children:_.ACCEPT_INVITATION}),b.jsx(jf,{className:fe("text-xs md:text-sm",t?.description),children:_.ACCEPT_INVITATION_DESCRIPTION})]}),b.jsxs(zf,{className:fe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(bi,{className:fe("flex-row items-center p-4"),children:[b.jsx(VT,{organization:{id:C.organizationId,name:C.organizationName,slug:C.organizationSlug,logo:C.organizationLogo,createdAt:new Date},localization:_}),b.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:W})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsxs(wt,{variant:"outline",className:fe(t?.button,t?.outlineButton),onClick:D,disabled:A,children:[S?b.jsx(gn,{className:"animate-spin"}):b.jsx(L2,{}),_.REJECT]}),b.jsxs(wt,{className:fe(t?.button,t?.primaryButton),onClick:k,disabled:A,children:[T?b.jsx(gn,{className:"animate-spin"}):b.jsx(Cg,{}),_.ACCEPT]})]})]})]}):b.jsx(ZT,{className:e,classNames:t})}var ZT=({className:e,classNames:t,localization:n})=>b.jsxs(bi,{className:fe("w-full max-w-sm",e,t?.base),children:[b.jsxs(kf,{className:fe("justify-items-center",t?.header),children:[b.jsx(mr,{className:fe("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),b.jsx(mr,{className:fe("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),b.jsxs(zf,{className:fe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(bi,{className:fe("flex-row items-center p-4"),children:[b.jsx(VT,{isPending:!0,localization:n}),b.jsx(mr,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsx(mr,{className:"h-9 w-full"}),b.jsx(mr,{className:"h-9 w-full"})]})]})]});function pw({className:e,orientation:t="horizontal",decorative:n=!0,...o}){return b.jsx(O$,{"data-slot":"separator",decorative:n,orientation:t,className:fe("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function AV({classNames:e,isSubmitting:t,localization:n,view:o}){var i,l,c,d;const{viewPaths:f,navigate:h,basePath:v}=E.useContext(qe);return b.jsxs(wt,{className:fe("w-full",(i=e?.form)==null?void 0:i.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${v}/${o==="EMAIL_OTP"?f.SIGN_IN:f.EMAIL_OTP}${window.location.search}`),children:[o==="EMAIL_OTP"?b.jsx(N2,{className:(c=e?.form)==null?void 0:c.icon}):b.jsx(D2,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",o==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function CV({classNames:e,isSubmitting:t,localization:n,view:o}){var i,l,c,d;const{viewPaths:f,navigate:h,basePath:v,credentials:p}=E.useContext(qe);return b.jsxs(wt,{className:fe("w-full",(i=e?.form)==null?void 0:i.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${v}/${o==="MAGIC_LINK"||!p?f.SIGN_IN:f.MAGIC_LINK}${window.location.search}`),children:[o==="MAGIC_LINK"?b.jsx(N2,{className:(c=e?.form)==null?void 0:c.icon}):b.jsx(D2,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",o==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function IV({localization:e,redirectTo:t}){const{authClient:n,localization:o,toast:i,localizeErrors:l}=E.useContext(qe),c=E.useRef(!1);e=E.useMemo(()=>({...o,...e}),[o,e]);const{onSuccess:d}=bo({redirectTo:t});return E.useEffect(()=>{if(!c.current){c.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:d}})}catch(f){i({variant:"error",message:jt({error:f,localization:e,localizeErrors:l})})}}},[n,e,l,d,i]),null}function MV({classNames:e,isSubmitting:t,localization:n,redirectTo:o,setIsSubmitting:i}){var l,c;const{authClient:d,localization:f,toast:h,localizeErrors:v}=E.useContext(qe);n={...f,...n};const{onSuccess:p}=bo({redirectTo:o}),y=async()=>{i?.(!0);try{const _=await d.signIn.passkey({fetchOptions:{throw:!0}});_?.error?(h({variant:"error",message:jt({error:_.error,localization:n,localizeErrors:v})}),i?.(!1)):p()}catch(_){h({variant:"error",message:jt({error:_,localization:n,localizeErrors:v})}),i?.(!1)}};return b.jsxs(wt,{className:fe("w-full",(l=e?.form)==null?void 0:l.button,(c=e?.form)==null?void 0:c.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:y,children:[b.jsx(E7,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function mw({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,other:l,provider:c,redirectTo:d,socialLayout:f,setIsSubmitting:h}){var v,p,y,_;const{authClient:S,basePath:w,baseURL:T,persistClient:O,redirectTo:A,viewPaths:C,social:R,genericOAuth:I,toast:k,localizeErrors:D}=E.useContext(qe),N=E.useCallback(()=>d||Si("redirectTo")||A,[d,A]),z=E.useCallback(()=>`${T}${n||(O?`${w}/${C.CALLBACK}?redirectTo=${encodeURIComponent(N())}`:N())}`,[n,O,w,C,T,N]),W=async()=>{h(!0);try{if(l){const $={providerId:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};I?.signIn?(await I.signIn($),setTimeout(()=>{h(!1)},1e4)):await S.signIn.oauth2($)}else{const $={provider:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};R?.signIn?(await R.signIn($),setTimeout(()=>{h(!1)},1e4)):await S.signIn.social($)}}catch($){k({variant:"error",message:jt({error:$,localization:i,localizeErrors:D})}),h(!1)}};return b.jsxs(wt,{className:fe(f==="vertical"?"w-full":"grow",e,(v=t?.form)==null?void 0:v.button,(p=t?.form)==null?void 0:p.outlineButton,(y=t?.form)==null?void 0:y.providerButton),disabled:o,variant:"outline",onClick:W,children:[c.icon&&b.jsx(c.icon,{className:(_=t?.form)==null?void 0:_.icon}),f==="grid"&&c.name,f==="vertical"&&`${i.SIGN_IN_WITH} ${c.name}`]})}function kH({className:e,classNames:t,callbackURL:n,cardHeader:o,cardFooter:i,localization:l,path:c,pathname:d,redirectTo:f,socialLayout:h="auto",view:v,otpSeparators:p=0}){var y,_,S,w,T,O;const A=Ho(),{basePath:C,credentials:R,localization:I,magicLink:k,emailOTP:D,oneTap:N,passkey:z,signUp:W,social:$,genericOAuth:q,viewPaths:j,Link:X}=E.useContext(qe);l={...I,...l};let oe=h;oe==="auto"&&(oe=R&&$?.providers&&$.providers.length>2?"horizontal":"vertical");const L=c??d?.split("/").pop(),F=v||Rv(j,L)||"SIGN_IN",[G,re]=E.useState(!1);if(E.useEffect(()=>{const P=()=>re(!1);return window.addEventListener("pagehide",P),()=>{re(!1),window.removeEventListener("pagehide",P)}},[]),F==="CALLBACK")return b.jsx(GT,{redirectTo:f});if(F==="SIGN_OUT")return b.jsx(qT,{redirectTo:f});if(F==="ACCEPT_INVITATION")return b.jsx(OV,{className:e,classNames:t});const ye=!R&&!k&&!D?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${F}_DESCRIPTION`];return b.jsxs(bi,{className:fe("w-full max-w-sm",e,t?.base),children:[b.jsx(kf,{className:t?.header,children:o||b.jsxs(b.Fragment,{children:[b.jsx(m0,{className:fe("text-lg md:text-xl",t?.title),children:l[F]}),ye&&b.jsx(jf,{className:fe("text-xs md:text-sm",t?.description),children:ye})]})}),b.jsxs(zf,{className:fe("grid gap-6",t?.content),children:[N&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(F)&&b.jsx(IV,{localization:l,redirectTo:f}),(R||k||D)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(RV,{classNames:t?.form,callbackURL:n,isSubmitting:G,localization:l,otpSeparators:p,view:F,redirectTo:f,setIsSubmitting:re}),k&&(R&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||D&&F==="EMAIL_OTP")&&b.jsx(CV,{classNames:t,localization:l,view:F,isSubmitting:G}),D&&(R&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||k&&["SIGN_IN","MAGIC_LINK"].includes(F))&&b.jsx(AV,{classNames:t,localization:l,view:F,isSubmitting:G})]}),F!=="RESET_PASSWORD"&&F!=="EMAIL_VERIFICATION"&&(((y=$?.providers)==null?void 0:y.length)||((_=q?.providers)==null?void 0:_.length)||F==="SIGN_IN"&&z)&&b.jsxs(b.Fragment,{children:[(R||k||D)&&b.jsxs("div",{className:fe("flex items-center gap-2",t?.continueWith),children:[b.jsx(pw,{className:fe("!w-auto grow",t?.separator)}),b.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:l.OR_CONTINUE_WITH}),b.jsx(pw,{className:fe("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((S=$?.providers)==null?void 0:S.length)||((w=q?.providers)==null?void 0:w.length))&&b.jsxs("div",{className:fe("flex w-full items-center justify-between gap-4",oe==="horizontal"&&"flex-wrap",oe==="vertical"&&"flex-col",oe==="grid"&&"grid grid-cols-2"),children:[(T=$?.providers)==null?void 0:T.map(P=>{const Q=uV.find(te=>te.provider===P);return Q?b.jsx(mw,{classNames:t,callbackURL:n,isSubmitting:G,localization:l,provider:Q,redirectTo:f,setIsSubmitting:re,socialLayout:oe},P):null}),(O=q?.providers)==null?void 0:O.map(P=>b.jsx(mw,{classNames:t,callbackURL:n,isSubmitting:G,localization:l,provider:P,redirectTo:f,setIsSubmitting:re,socialLayout:oe,other:!0},P.provider))]}),z&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(F)&&b.jsx(MV,{classNames:t,isSubmitting:G,localization:l,redirectTo:f,setIsSubmitting:re})]})]})]}),i&&b.jsx(Jv,{className:t?.footer,children:i}),R&&W&&b.jsxs(Jv,{className:fe("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?l.DONT_HAVE_AN_ACCOUNT:F==="SIGN_UP"?l.ALREADY_HAVE_AN_ACCOUNT:b.jsx(m7,{className:"size-3"}),F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"||F==="SIGN_UP"?b.jsx(X,{className:fe("text-foreground underline",t?.footerLink),href:`${C}/${j[F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${A?window.location.search:""}`,children:b.jsx(wt,{variant:"link",size:"sm",className:fe("px-0 text-foreground underline",t?.footerLink),children:F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?l.SIGN_UP:l.SIGN_IN})}):b.jsx(wt,{variant:"link",size:"sm",className:fe("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:l.GO_BACK})]})]})}function jH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{isPending:n}=t();return n?e:null}function zH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{data:n}=t();return n?e:null}function UH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{data:n,isPending:o}=t();return!n&&!o?e:null}function NV(e){const t=cf.c(8),{children:n}=e,o=mc();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={basePath:"/",pathMode:"slug"},t[0]=i):i=t[0];let l,c;t[1]!==o?(l=f=>o({to:f}),c=f=>o({to:f,replace:!0}),t[1]=o,t[2]=l,t[3]=c):(l=t[2],c=t[3]);let d;return t[4]!==n||t[5]!==l||t[6]!==c?(d=b.jsx(d7,{authClient:uI,organization:i,navigate:l,replace:c,Link:DV,children:n}),t[4]=n,t[5]=l,t[6]=c,t[7]=d):d=t[7],d}function DV(e){const{href:t,className:n,children:o,...i}=e;return b.jsx(mg,{to:t,className:n,...i,children:o})}const LV=new $4;function PV(e){const t=cf.c(3),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(FP,{}),t[0]=o):o=t[0];let i;return t[1]!==n?(i=b.jsxs(H4,{client:LV,children:[o,b.jsx(i3,{children:b.jsx(NV,{children:n})})]}),t[1]=n,t[2]=i):i=t[2],i}const kV=function(){return null};function jV(){const e=cf.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=b.jsx("div",{className:"flex items-center justify-center min-h-screen",children:b.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const Cc=M5({component:()=>b.jsxs(PV,{children:[b.jsx(E.Suspense,{fallback:b.jsx(jV,{}),children:b.jsx(Qw,{})}),b.jsx(kV,{})]})}),zV=yn({getParentRoute:()=>Cc,path:"/login",component:An(()=>Tn(()=>import("./login-fFNSXfGP.js"),__vite__mapDeps([0,1,2]))),validateSearch:Ua(()=>bn({next:Ve().optional(),client_id:Ve().optional(),redirect_uri:Ve().optional(),response_type:Ve().optional(),state:Ve().optional(),scope:Ve().optional(),code_challenge:Ve().optional(),code_challenge_method:Ve().optional()}))}),UV=yn({getParentRoute:()=>Cc,path:"/auth/$pathname",component:An(()=>Tn(()=>import("./auth-catchall-Cp5vKmTi.js"),[]))}),yr=yn({getParentRoute:()=>Cc,id:"shell",component:An(()=>Tn(()=>import("./shell-layout-CM_S8ji4.js"),__vite__mapDeps([3,4,1,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,2,41,42,43,44])))}),BV=yn({getParentRoute:()=>yr,path:"/",component:An(()=>Tn(()=>import("./home-0xYKq0nN.js"),__vite__mapDeps([45,46,1,41,16,11,2,39,28,40,27])))}),FV=yn({getParentRoute:()=>yr,path:"/$org",component:An(()=>Tn(()=>import("./page-BP6lcPxY.js"),__vite__mapDeps([47,5,1,6,48,49,42,18,50,51,17,52,8,53,11,9,37,54,55,56,33,24,57,58,26,27,59])))}),$V=yn({getParentRoute:()=>yr,path:"/$org/members",component:An(()=>Tn(()=>import("./members-CAufZALX.js"),__vite__mapDeps([60,48,49,1,42,6,18,50,51,61,4,2,62,63,5,64,65,66,31,8,41,56,28,44,12,67,10,68,11,35,17,40,20,21,23,46,69,57])))}),VV=yn({getParentRoute:()=>yr,path:"/$org/mcps",component:An(()=>Tn(()=>import("./connections-DYOzkJYx.js"),__vite__mapDeps([70,48,49,1,42,6,18,50,51,61,4,2,62,71,46,5,17,72,22,28,56,44,12,40,69,73,11,35,10,25,20,21,23,32]))),validateSearch:Ua(()=>bn({action:Sf(["create"]).optional()}))}),HV=yn({getParentRoute:()=>yr,path:"/$org/settings",component:An(()=>Tn(()=>import("./settings-Br4mx_yy.js"),__vite__mapDeps([74,48,49,1,42,6,18,50,51,40,2,12])))}),GV=yn({getParentRoute:()=>yr,path:"/$org/monitoring",component:An(()=>Tn(()=>import("./monitoring-DTJtueom.js"),__vite__mapDeps([75,5,1,6,48,49,42,18,50,51,61,4,2,17,54,55,56,33,24,57,58,26,27,21,37,66,76,11,35,64,77,20,34,78,23]))),validateSearch:Ua(()=>bn({from:Ve().default("now-24h"),to:Ve().default("now"),connectionId:Sv(Ve()).optional().default([]),gatewayId:Sv(Ve()).optional().default([]),tool:Ve().default(""),status:Sf(["all","success","errors"]).default("all"),search:Ve().default(""),page:E2().optional(),streaming:xg().default(!0),propertyFilters:Ve().default("")}))}),YT=yn({getParentRoute:()=>yr,path:"/$org/store",component:An(()=>Tn(()=>import("./store-CJqU95FV.js"),__vite__mapDeps([79,31,48,49,1,42,6,18,50,5,80,81,10,4,61,2,68,46,82,83,78,20,21,11,13,14,7,8])))}),qV=yn({getParentRoute:()=>yr,path:"/$org/workflow",component:An(()=>Tn(()=>import("./workflow-DTYA39cO.js"),__vite__mapDeps([84,31,85,32,5,1,6,49,42,18,50,61,4,2,46,24,69,72,22,35,62,86,81,41,8,87,38,88,13,14,28,11,89,65,48,10])))}),ZV=yn({getParentRoute:()=>YT,path:"/$appName",component:An(()=>Tn(()=>import("./store-app-detail-Bb4mx26e.js"),__vite__mapDeps([90,16,10,1,65,5,6,21,11,42,43,4,91,8,29,82,49,18,50,61,2,62,46,89,92,93,56,13,14,52,94,95,88,32,80,83,30]))),validateSearch:Ua(()=>bn({registryId:Ve().optional(),serverName:Ve().optional(),itemId:Ve().optional()}))}),YV=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId",component:An(()=>Tn(()=>import("./connection-detail-ByP6chqW.js"),__vite__mapDeps([96,4,1,17,5,6,13,14,97,98,73,2,11,35,52,8,87,38,29,57,10,89,65,40,20,21,25,37,9,99,88,82,95,32,55,77,100,93,56,85,49,42,18,50,61,46,24,69,72,22,62,86,81,41,28,91,92]))),validateSearch:Ua(()=>bn({tab:Ve().optional()}))}),KV=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:An(()=>Tn(()=>import("./collection-detail-msiVYwQa.js"),__vite__mapDeps([101,5,1,6,4,17,87,38,40,2,23,102,89,65,16,34,76,24,10,58,67,97,98,14,73,11,35,13,52,8,29,57,20,21,25,37,9,99,88,82,95,32,55,77,94,26,27,86,36,19,22,50,53,44,12,42,56]))),validateSearch:Ua(()=>bn({replayId:Ve().optional()}))}),WV=yn({getParentRoute:()=>yr,path:"/$org/gateways",component:An(()=>Tn(()=>import("./gateways--haP9jLk.js"),__vite__mapDeps([103,48,49,1,42,6,18,50,51,61,4,2,62,71,46,5,17,37,72,22,28,56,9,69,10,35]))),validateSearch:Ua(()=>bn({action:Sf(["create"]).optional()}))}),QV=yn({getParentRoute:()=>yr,path:"/$org/gateways/$gatewayId",component:An(()=>Tn(()=>import("./gateway-detail-JYrV5S3_.js"),__vite__mapDeps([104,4,1,17,5,6,63,64,65,61,2,11,12,37,100,99,13,14,15,7,8,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,9,102,10,40,93,56,80,87,38,89]))),validateSearch:Ua(()=>bn({tab:Ve().optional()}))}),XV=yn({getParentRoute:()=>Cc,path:"/oauth/callback",component:An(()=>Tn(()=>import("./oauth-callback-zUOuo71p.js"),__vite__mapDeps([105,10,98,14])))}),JV=YT.addChildren([ZV]),eH=yr.addChildren([BV,FV,$V,VV,WV,QV,GV,JV,qV,HV,YV,KV]),tH=Cc.addChildren([eH,zV,UV,XV]),nH=B5({routeTree:tH}),rH=document.getElementById("root");g4.createRoot(rH).render(b.jsx(E.StrictMode,{children:b.jsx(V5,{router:nH})}));export{Go as $,kH as A,Ut as B,Nj as C,AH as D,Ge as E,V as F,G$ as G,wi as H,XR as I,hz as J,o3 as K,OR as L,fz as M,cH as N,Mj as O,Ij as P,lH as Q,Aj as R,jV as S,Dj as T,PH as U,ux as V,Sv as W,_H as X,xg as Y,dn as Z,Sf as _,uI as a,EH as a$,Wr as a0,Kr as a1,oH as a2,_i as a3,qw as a4,pf as a5,eg as a6,ka as a7,Fo as a8,P4 as a9,C7 as aA,XI as aB,YO as aC,WO as aD,NU as aE,oB as aF,UR as aG,Ev as aH,E8 as aI,Rc as aJ,yc as aK,dH as aL,RU as aM,OU as aN,TU as aO,AU as aP,CU as aQ,MH as aR,NH as aS,DH as aT,IH as aU,$L as aV,xH as aW,wH as aX,Ua as aY,hH as aZ,E2 as a_,N_ as aa,iH as ab,aH as ac,n3 as ad,X4 as ae,er as af,$U as ag,VU as ah,FU as ai,In as aj,PU as ak,Yw as al,FR as am,J9 as an,Fg as ao,WR as ap,Ug as aq,ez as ar,tz as as,L2 as at,x7 as au,Ia as av,RR as aw,_7 as ax,Cj as ay,mg as az,pg as b,yH as b0,vH as b1,Tn as b2,lR as b3,$g as b4,lc as b5,J2 as b6,Bg as b7,LH as b8,pc as b9,O8 as bA,vM as bB,mH as bC,gH as bD,ML as bE,OH as bF,TH as bG,RH as bH,tc as bI,U4 as bJ,_w as bK,q8 as bL,DE as bM,fH as bN,uH as bO,Z8 as bP,On as ba,iv as bb,yw as bc,G4 as bd,Y4 as be,J4 as bf,K4 as bg,W4 as bh,Qn as bi,t3 as bj,D_ as bk,e3 as bl,Q4 as bm,A7 as bn,M7 as bo,xf as bp,Pg as bq,pH as br,w2 as bs,wg as bt,SH as bu,QL as bv,bH as bw,_8 as bx,x8 as by,Rg as bz,cf as c,hg as d,V4 as e,mc as f,Jn as g,CH as h,J7 as i,b as j,Z2 as k,O$ as l,qe as m,jH as n,zH as o,UH as p,r3 as q,E as r,Qw as s,zE as t,sH as u,bn as v,Ve as w,vo as x,mo as y,bc as z};
|
|
155
|
+
`}),b.jsx(e$,{ref:e,sitekey:t.siteKey,theme:n,hl:o,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:fe(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${o}-${t.provider}`)]}):null}var mV=["/sign-up/email","/sign-in/email","/forget-password"];function Cc({ref:e,localization:t,action:n}){const{captcha:o}=E.useContext(qe);if(!o||n&&!(o.endpoints||mV).includes(n))return null;const{theme:i}=Ag(),l=o.provider==="google-recaptcha-v2-checkbox"||o.provider==="google-recaptcha-v2-invisible",c=o.provider==="google-recaptcha-v3"||o.provider==="google-recaptcha-v2-invisible",d=o.provider==="cloudflare-turnstile",f=o.provider==="hcaptcha",h=o.provider==="captchafox";return b.jsxs(b.Fragment,{children:[l&&b.jsx(pV,{ref:e}),c&&b.jsx(hV,{localization:t}),d&&b.jsx(wT,{className:"mx-auto",ref:e,siteKey:o.siteKey,options:{theme:i,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(AF,{ref:e,sitekey:o.siteKey,theme:i})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(hT,{ref:e,sitekey:o.siteKey,theme:i})})]})}function y0({className:e,containerClassName:t,...n}){return b.jsx(AT,{"data-slot":"input-otp",containerClassName:fe("flex items-center gap-2 has-disabled:opacity-50",t),className:fe("disabled:cursor-not-allowed",e),...n})}function ys({className:e,...t}){return b.jsx("div",{"data-slot":"input-otp-group",className:fe("flex items-center",e),...t})}function pn({index:e,className:t,...n}){const o=E.useContext(TT),{char:i,hasFakeCaret:l,isActive:c}=o?.slots[e]??{};return b.jsxs("div",{"data-slot":"input-otp-slot","data-active":c,className:fe("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[i,l&&b.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:b.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function ov({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(S7,{})})}function b0({otpSeparators:e=0}){return e===0?b.jsxs(ys,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1}),b.jsx(pn,{index:2}),b.jsx(pn,{index:3}),b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]}):e===1?b.jsxs(b.Fragment,{children:[b.jsxs(ys,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1}),b.jsx(pn,{index:2})]}),b.jsx(ov,{}),b.jsxs(ys,{children:[b.jsx(pn,{index:3}),b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(ys,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1})]}),b.jsx(ov,{}),b.jsxs(ys,{children:[b.jsx(pn,{index:2}),b.jsx(pn,{index:3})]}),b.jsx(ov,{}),b.jsxs(ys,{children:[b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]})]})}function fw(e){const[t,n]=E.useState();return t?b.jsx(gV,{...e,email:t}):b.jsx(vV,{...e,setEmail:n})}function vV({className:e,classNames:t,isSubmitting:n,localization:o,setIsSubmitting:i,setEmail:l}){const c=Ho(),{captchaRef:d,getCaptchaHeaders:f}=Ac({localization:o}),{authClient:h,localization:v,toast:p,localizeErrors:y}=E.useContext(qe);o={...v,...o};const _=bn({email:Ve().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),S=mo({resolver:vo(_),defaultValues:{email:""}});n=n||S.formState.isSubmitting,E.useEffect(()=>{i?.(S.formState.isSubmitting)},[S.formState.isSubmitting,i]);async function w({email:T}){const O={throw:!0,headers:await f("/email-otp/send-verification-otp")};try{await h.emailOtp.sendVerificationOtp({email:T,type:"sign-in",fetchOptions:O}),p({variant:"success",message:o.EMAIL_OTP_VERIFICATION_SENT}),l(T)}catch(A){p({variant:"error",message:jt({error:A,localization:o,localizeErrors:y})})}}return b.jsx(yo,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(w),noValidate:c,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:S.control,name:"email",render:({field:T})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:n,...T})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Cc,{ref:d,localization:o,action:"/email-otp/send-verification-otp"}),b.jsx(wt,{type:"submit",disabled:n,className:fe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(gn,{className:"animate-spin"}):o.EMAIL_OTP_SEND_ACTION})]})})}function gV({className:e,classNames:t,isSubmitting:n,localization:o,otpSeparators:i=0,redirectTo:l,setIsSubmitting:c,email:d}){const{authClient:f,localization:h,toast:v,localizeErrors:p}=E.useContext(qe);o={...h,...o};const{onSuccess:y,isPending:_}=bo({redirectTo:l}),S=bn({code:Ve().min(1,{message:`${o.EMAIL_OTP} ${o.IS_REQUIRED}`}).min(6,{message:`${o.EMAIL_OTP} ${o.IS_INVALID}`})}),w=mo({resolver:vo(S),defaultValues:{code:""}});n=n||w.formState.isSubmitting||_,E.useEffect(()=>{c?.(w.formState.isSubmitting||_)},[w.formState.isSubmitting,_,c]);async function T({code:O}){try{await f.signIn.emailOtp({email:d,otp:O,fetchOptions:{throw:!0}}),await y()}catch(A){v({variant:"error",message:jt({error:A,localization:o,localizeErrors:p})}),w.reset()}}return b.jsx(yo,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(T),className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:w.control,name:"code",render:({field:O})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL_OTP}),b.jsx(rn,{children:b.jsx(y0,{...O,maxLength:6,onChange:A=>{O.onChange(A),A.length===6&&w.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(b0,{otpSeparators:i})})}),b.jsx(un,{className:t?.error})]})}),b.jsx("div",{className:"grid gap-4",children:b.jsxs(wt,{type:"submit",disabled:n,className:fe(t?.button,t?.primaryButton),children:[n&&b.jsx(gn,{className:"animate-spin"}),o.EMAIL_OTP_VERIFY_ACTION]})})]})})}function yV({onCancel:e,localization:t,className:n,classNames:o,otpSeparators:i,callbackURL:l,isSubmitting:c,redirectTo:d,setIsSubmitting:f}){const[h,v]=E.useState(!0),[p,y]=E.useState(30),{authClient:_,localization:S,toast:w,localizeErrors:T,navigate:O,basePath:A,viewPaths:C}=E.useContext(qe);t={...S,...t};const R=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:I,isPending:k}=bo({redirectTo:d}),D=bn({code:Ve().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),N=mo({resolver:vo(D),defaultValues:{code:""}}),z=c||N.formState.isSubmitting||k;E.useEffect(()=>{f?.(N.formState.isSubmitting||k)},[N.formState.isSubmitting,k,f]),E.useEffect(()=>{if(p>0){const q=setTimeout(()=>y(p-1),1e3);return()=>clearTimeout(q)}else v(!1)},[p]);async function W({code:q}){try{const j=await _.emailOtp.verifyEmail({email:R,otp:q,fetchOptions:{throw:!0}});"token"in j&&j.token?await I():(O(`${A}/${C.SIGN_IN}${window.location.search}`),w({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(j){w({variant:"error",message:jt({error:j,localization:t,localizeErrors:T})}),N.reset()}}async function $(){if(!h){v(!0),y(30);try{await _.emailOtp.sendVerificationOtp({email:R,type:"email-verification",fetchOptions:{throw:!0}}),w({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(q){w({variant:"error",message:jt({error:q,localization:t,localizeErrors:T})}),v(!1),y(0)}}}return R?b.jsx(yo,{...N,children:b.jsxs("form",{onSubmit:N.handleSubmit(W),className:fe("grid w-full gap-6",n,o?.base),children:[b.jsx(Ht,{control:N.control,name:"code",render:({field:q})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:o?.label,children:t.EMAIL_OTP}),b.jsx(rn,{children:b.jsx(y0,{...q,maxLength:6,onChange:j=>{q.onChange(j),j.length===6&&N.handleSubmit(W)()},containerClassName:o?.otpInputContainer,className:o?.otpInput,disabled:z,children:b.jsx(b0,{otpSeparators:i})})}),b.jsx(un,{className:o?.error})]})}),b.jsxs("div",{className:"grid gap-4",children:[b.jsxs(wt,{type:"submit",disabled:z,className:fe(o?.button,o?.primaryButton),children:[z&&b.jsx(gn,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),b.jsx(wt,{type:"button",variant:"outline",onClick:$,disabled:h||z,className:fe("w-full",o?.button),children:h?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&b.jsx(wt,{type:"button",variant:"ghost",onClick:e,disabled:z,className:"w-full",children:t.CANCEL})]})]})}):b.jsx("div",{className:fe("grid w-full gap-6",n),children:b.jsxs("div",{className:"text-center",children:[b.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),b.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function bV({className:e,classNames:t,isSubmitting:n,localization:o,setIsSubmitting:i}){const l=Ho(),{captchaRef:c,getCaptchaHeaders:d,resetCaptcha:f}=Ac({localization:o}),{authClient:h,basePath:v,baseURL:p,localization:y,navigate:_,toast:S,viewPaths:w,localizeErrors:T}=E.useContext(qe);o={...y,...o};const O=bn({email:Ve().email({message:`${o.EMAIL} ${o.IS_INVALID}`}).min(1,{message:`${o.EMAIL} ${o.IS_REQUIRED}`})}),A=mo({resolver:vo(O),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{i?.(A.formState.isSubmitting)},[A.formState.isSubmitting,i]);async function C({email:R}){try{const I={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:R,redirectTo:`${p}${v}/${w.RESET_PASSWORD}`,fetchOptions:I}),S({variant:"success",message:o.FORGOT_PASSWORD_EMAIL}),_(`${v}/${w.SIGN_IN}${window.location.search}`)}catch(I){S({variant:"error",message:jt({error:I,localization:o,localizeErrors:T})}),f()}}return b.jsx(yo,{...A,children:b.jsxs("form",{onSubmit:A.handleSubmit(C),noValidate:l,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:A.control,name:"email",render:({field:R})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:n,...R})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Cc,{ref:c,localization:o,action:"/forget-password"}),b.jsx(wt,{type:"submit",disabled:n,className:fe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(gn,{className:"animate-spin"}):o.FORGOT_PASSWORD_ACTION})]})})}function hw({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,redirectTo:l,setIsSubmitting:c}){const d=Ho(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:v}=Ac({localization:i}),{authClient:p,basePath:y,baseURL:_,persistClient:S,localization:w,redirectTo:T,viewPaths:O,toast:A,localizeErrors:C}=E.useContext(qe);i={...w,...i};const R=E.useCallback(()=>l||Si("redirectTo")||T,[l,T]),I=E.useCallback(()=>`${_}${n||(S?`${y}/${O.CALLBACK}?redirectTo=${encodeURIComponent(R())}`:R())}`,[n,S,y,O,_,R]),k=bn({email:Ve().email({message:`${i.EMAIL} ${i.IS_INVALID}`})}),D=mo({resolver:vo(k),defaultValues:{email:""}});o=o||D.formState.isSubmitting,E.useEffect(()=>{c?.(D.formState.isSubmitting)},[D.formState.isSubmitting,c]);async function N({email:z}){try{const W={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:z,callbackURL:I(),fetchOptions:W}),A({variant:"success",message:i.MAGIC_LINK_EMAIL}),D.reset()}catch(W){A({variant:"error",message:jt({error:W,localization:i,localizeErrors:C})}),v()}}return b.jsx(yo,{...D,children:b.jsxs("form",{onSubmit:D.handleSubmit(N),noValidate:d,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:D.control,name:"email",render:({field:z})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{className:t?.input,type:"email",placeholder:i.EMAIL_PLACEHOLDER,disabled:o,...z})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Cc,{ref:f,localization:i,action:"/sign-in/magic-link"}),b.jsx(wt,{type:"submit",disabled:o,className:fe("w-full",t?.button,t?.primaryButton),children:o?b.jsx(gn,{className:"animate-spin"}):i.MAGIC_LINK_ACTION})]})})}function _V({className:e,classNames:t,isSubmitting:n,localization:o,redirectTo:i,setIsSubmitting:l}){const{authClient:c,localization:d,toast:f,localizeErrors:h}=E.useContext(qe);o={...d,...o};const{onSuccess:v,isPending:p}=bo({redirectTo:i}),y=bn({code:Ve().min(1,{message:o.BACKUP_CODE_REQUIRED})}),_=mo({resolver:vo(y),defaultValues:{code:""}});n=n||_.formState.isSubmitting||p,E.useEffect(()=>{l?.(_.formState.isSubmitting||p)},[_.formState.isSubmitting,p,l]);async function S({code:w}){try{await c.twoFactor.verifyBackupCode({code:w,fetchOptions:{throw:!0}}),await v()}catch(T){f({variant:"error",message:jt({error:T,localization:o,localizeErrors:h})}),_.reset()}}return b.jsx(yo,{..._,children:b.jsxs("form",{onSubmit:_.handleSubmit(S),className:fe("grid gap-6",e,t?.base),children:[b.jsx(Ht,{control:_.control,name:"code",render:({field:w})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.BACKUP_CODE}),b.jsx(rn,{children:b.jsx(Yr,{placeholder:o.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...w})}),b.jsx(un,{className:t?.error})]})}),b.jsx(wt,{type:"submit",disabled:n,className:fe(t?.button,t?.primaryButton),children:n?b.jsx(gn,{className:"animate-spin"}):o.RECOVER_ACCOUNT_ACTION})]})})}function EV({className:e,classNames:t,localization:n,passwordValidation:o}){const i=E.useRef(!1),{authClient:l,basePath:c,credentials:d,localization:f,viewPaths:h,navigate:v,toast:p,localizeErrors:y}=E.useContext(qe),_=d?.confirmPassword,S=d?.passwordValidation;n={...f,...n},o={...S,...o};const w=bn({newPassword:sc(o,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:_?sc(o,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):Ve().optional()}).refine(C=>!_||C.newPassword===C.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),T=mo({resolver:vo(w),defaultValues:{newPassword:"",confirmPassword:""}}),O=T.formState.isSubmitting;E.useEffect(()=>{if(i.current)return;i.current=!0;const R=new URLSearchParams(window.location.search).get("token");(!R||R==="INVALID_TOKEN")&&(v(`${c}/${h.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[c,v,p,h,n]);async function A({newPassword:C}){try{const I=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:I,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),v(`${c}/${h.SIGN_IN}${window.location.search}`)}catch(R){p({variant:"error",message:jt({error:R,localization:n,localizeErrors:y})}),T.reset()}}return b.jsx(yo,{...T,children:b.jsxs("form",{onSubmit:T.handleSubmit(A),className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:T.control,name:"newPassword",render:({field:C})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:n.NEW_PASSWORD}),b.jsx(rn,{children:b.jsx(pc,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:O,...C})}),b.jsx(un,{className:t?.error})]})}),_&&b.jsx(Ht,{control:T.control,name:"confirmPassword",render:({field:C})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:n.CONFIRM_PASSWORD}),b.jsx(rn,{children:b.jsx(pc,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:O,...C})}),b.jsx(un,{className:t?.error})]})}),b.jsx(wt,{type:"submit",disabled:O,className:fe("w-full",t?.button,t?.primaryButton),children:O?b.jsx(gn,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function SV({className:e,classNames:t,isSubmitting:n,localization:o,redirectTo:i,setIsSubmitting:l,passwordValidation:c}){const d=Ho(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:v}=Ac({localization:o}),{authClient:p,basePath:y,credentials:_,localization:S,viewPaths:w,navigate:T,toast:O,Link:A,localizeErrors:C,emailVerification:R}=E.useContext(qe),I=_?.rememberMe,k=_?.username,D=_?.passwordValidation;o={...S,...o},c={...D,...c};const{onSuccess:N,isPending:z}=bo({redirectTo:i}),W=bn({email:k?Ve().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):Ve().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:sc(c,o),rememberMe:xg().optional()}),$=mo({resolver:vo(W),defaultValues:{email:"",password:"",rememberMe:!I}});n=n||$.formState.isSubmitting||z,E.useEffect(()=>{l?.($.formState.isSubmitting||z)},[$.formState.isSubmitting,z,l]);async function q({email:j,password:X,rememberMe:oe}){var L;try{let F={};if(k&&!Y8(j)){const G={throw:!0,headers:await h("/sign-in/username")};F=await p.signIn.username({username:j,password:X,rememberMe:oe,fetchOptions:G})}else{const G={throw:!0,headers:await h("/sign-in/email")};F=await p.signIn.email({email:j,password:X,rememberMe:oe,fetchOptions:G})}F.twoFactorRedirect?T(`${y}/${w.TWO_FACTOR}${window.location.search}`):await N()}catch(F){$.resetField("password"),v(),O({variant:"error",message:jt({error:F,localization:o,localizeErrors:C})}),R?.otp&&((L=F?.error)==null?void 0:L.code)==="EMAIL_NOT_VERIFIED"&&T(`${y}/${w.EMAIL_VERIFICATION}?email=${encodeURIComponent(j)}`)}}return b.jsx(yo,{...$,children:b.jsxs("form",{onSubmit:$.handleSubmit(q),noValidate:d,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:$.control,name:"email",render:({field:j})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:k?o.USERNAME:o.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{autoComplete:k?"username":"email",className:t?.input,type:k?"text":"email",placeholder:k?o.SIGN_IN_USERNAME_PLACEHOLDER:o.EMAIL_PLACEHOLDER,disabled:n,...j})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:$.control,name:"password",render:({field:j})=>b.jsxs(Gt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(qt,{className:t?.label,children:o.PASSWORD}),_?.forgotPassword&&b.jsx(A,{className:fe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${w.FORGOT_PASSWORD}${d?window.location.search:""}`,children:o.FORGOT_PASSWORD_LINK})]}),b.jsx(rn,{children:b.jsx(pc,{autoComplete:"current-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:n,...j})}),b.jsx(un,{className:t?.error})]})}),I&&b.jsx(Ht,{control:$.control,name:"rememberMe",render:({field:j})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(rn,{children:b.jsx(g0,{checked:j.value,onCheckedChange:j.onChange,disabled:n})}),b.jsx(qt,{children:o.REMEMBER_ME})]})}),b.jsx(Cc,{ref:f,localization:o,action:"/sign-in/email"}),b.jsx(wt,{type:"submit",disabled:n,className:fe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(gn,{className:"animate-spin"}):o.SIGN_IN_ACTION})]})})}function wV({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,redirectTo:l,setIsSubmitting:c,passwordValidation:d}){const f=Ho(),{captchaRef:h,getCaptchaHeaders:v,resetCaptcha:p}=Ac({localization:i}),{additionalFields:y,authClient:_,basePath:S,baseURL:w,credentials:T,localization:O,nameRequired:A,persistClient:C,redirectTo:R,signUp:I,viewPaths:k,navigate:D,toast:N,avatar:z,localizeErrors:W,emailVerification:$}=E.useContext(qe),q=T?.confirmPassword,j=T?.username,X=T?.usernameRequired??!0,oe=T?.passwordValidation,L=I?.fields;i={...O,...i},d={...oe,...d};const F=E.useRef(null),[G,re]=E.useState(null),[ye,P]=E.useState(!1),Q=E.useCallback(()=>l||Si("redirectTo")||R,[l,R]),te=E.useCallback(()=>`${w}${n||(C?`${S}/${k.CALLBACK}?redirectTo=${encodeURIComponent(Q())}`:Q())}`,[n,C,S,k,w,Q]),{onSuccess:se,isPending:me}=bo({redirectTo:l}),_e={email:Ve().email({message:`${i.EMAIL} ${i.IS_INVALID}`}),password:sc(d,i),name:L?.includes("name")&&A?Ve().min(1,{message:`${i.NAME} ${i.IS_REQUIRED}`}):Ve().optional(),image:Ve().optional(),username:j&&X?Ve().min(1,{message:`${i.USERNAME} ${i.IS_REQUIRED}`}):Ve().optional(),confirmPassword:q?sc(d,{PASSWORD_REQUIRED:i.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:i.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:i.PASSWORD_TOO_LONG,INVALID_PASSWORD:i.INVALID_PASSWORD}):Ve().optional()},be={};if(L)for(const ve of L){if(ve==="name"||ve==="image")continue;const Re=y?.[ve];if(!Re)continue;let ke;Re.type==="number"?ke=Re.required?q8(et=>et?Number(et):void 0,E2({message:`${Re.label} ${i.IS_INVALID}`})):Z8({message:`${Re.label} ${i.IS_INVALID}`}).optional():Re.type==="boolean"?ke=Re.required?PE({message:`${Re.label} ${i.IS_INVALID}`}).refine(et=>et===!0,{message:`${Re.label} ${i.IS_REQUIRED}`}):PE({message:`${Re.label} ${i.IS_INVALID}`}).optional():ke=Re.required?Ve().min(1,`${Re.label} ${i.IS_REQUIRED}`):Ve().optional(),be[ve]=ke}const Se=bn(_e).extend(be).refine(ve=>q?ve.password===ve.confirmPassword:!0,{message:i.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),De={email:"",password:"",...q&&{confirmPassword:""},...L?.includes("name")?{name:""}:{},...j?{username:""}:{},...L?.includes("image")&&z?{image:""}:{}};if(L)for(const ve of L){if(ve==="name"||ve==="image")continue;const Re=y?.[ve];Re&&(De[ve]=Re.type==="boolean"?!1:"")}const Le=mo({resolver:vo(Se),defaultValues:De});o=o||Le.formState.isSubmitting||me,E.useEffect(()=>{c?.(Le.formState.isSubmitting||me)},[Le.formState.isSubmitting,me,c]);const Ee=async ve=>{if(z){P(!0);try{const Re=await D$(ve,crypto.randomUUID(),z.size,z.extension);let ke;z.upload?ke=await z.upload(Re):ke=await P$(Re),ke?(re(ke),Le.setValue("image",ke)):(re(null),Le.setValue("image",""))}catch(Re){console.error(Re),N({variant:"error",message:jt({error:Re,localization:i,localizeErrors:W})})}P(!1)}},ze=()=>{re(null),Le.setValue("image","")},Nt=()=>{var ve;return(ve=F.current)==null?void 0:ve.click()};async function ge({email:ve,password:Re,name:ke,username:et,confirmPassword:Ue,image:Qe,...U}){try{for(const[pe,he]of Object.entries(U)){const xe=y?.[pe];if(xe?.validate&&typeof he=="string"&&!await xe.validate(he)){Le.setError(pe,{message:`${xe.label} ${i.IS_INVALID}`});return}}const Z={throw:!0,headers:await v("/sign-up/email")},Y={};et!==void 0&&(!X&&(et===null||et===""||typeof et=="string"&&et.trim()==="")||(Y.username=et)),Qe!==void 0&&(Y.image=Qe);const ue=await _.signUp.email({email:ve,password:Re,name:ke||"",...Y,...U,callbackURL:te(),fetchOptions:Z});"token"in ue&&ue.token?await se():$?.otp?D(`${S}/${k.EMAIL_VERIFICATION}?email=${encodeURIComponent(ve)}`):(D(`${S}/${k.SIGN_IN}${window.location.search}`),N({variant:"success",message:i.SIGN_UP_EMAIL}))}catch(Z){N({variant:"error",message:jt({error:Z,localization:i,localizeErrors:W})}),Le.resetField("password"),Le.resetField("confirmPassword"),p()}}return b.jsx(yo,{...Le,children:b.jsxs("form",{onSubmit:Le.handleSubmit(ge),noValidate:f,className:fe("grid w-full gap-6",e,t?.base),children:[L?.includes("image")&&z&&b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:F,accept:"image/*",disabled:ye,hidden:!0,type:"file",onChange:ve=>{var Re;const ke=(Re=ve.target.files)==null?void 0:Re.item(0);ke&&Ee(ke),ve.target.value=""}}),b.jsx(Ht,{control:Le.control,name:"image",render:()=>b.jsxs(Gt,{children:[b.jsx(qt,{children:i.AVATAR}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs(LT,{children:[b.jsx(PT,{asChild:!0,children:b.jsx(wt,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx(HT,{isPending:ye,className:"size-16",user:G?{name:Le.watch("name"),email:Le.watch("email"),image:G}:null,localization:i})})}),b.jsxs(kT,{align:"start",onCloseAutoFocus:ve=>ve.preventDefault(),children:[b.jsxs(cf,{onClick:Nt,disabled:ye,children:[b.jsx(g7,{}),i.UPLOAD_AVATAR]}),G&&b.jsxs(cf,{onClick:ze,disabled:ye,variant:"destructive",children:[b.jsx(x7,{}),i.DELETE_AVATAR]})]})]}),b.jsxs(wt,{type:"button",variant:"outline",onClick:Nt,disabled:ye,children:[ye&&b.jsx(gn,{className:"animate-spin"}),i.UPLOAD]})]}),b.jsx(un,{})]})})]}),L?.includes("name")&&b.jsx(Ht,{control:Le.control,name:"name",render:({field:ve})=>b.jsxs(Gt,{children:[b.jsxs(qt,{className:t?.label,children:[i.NAME,!A&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:i.OPTIONAL_BRACKETS})]}),b.jsx(rn,{children:b.jsx(Yr,{autoComplete:"name",className:t?.input,placeholder:i.NAME_PLACEHOLDER,disabled:o,...ve,value:ve.value})}),b.jsx(un,{className:t?.error})]})}),j&&b.jsx(Ht,{control:Le.control,name:"username",render:({field:ve})=>b.jsxs(Gt,{children:[b.jsxs(qt,{className:t?.label,children:[i.USERNAME,!X&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:i.OPTIONAL_BRACKETS})]}),b.jsx(rn,{children:b.jsx(Yr,{autoComplete:"username",className:t?.input,placeholder:i.USERNAME_PLACEHOLDER,disabled:o,...ve,value:ve.value})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:Le.control,name:"email",render:({field:ve})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{autoComplete:"email",className:t?.input,type:"email",placeholder:i.EMAIL_PLACEHOLDER,disabled:o,...ve,value:ve.value})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:Le.control,name:"password",render:({field:ve})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.PASSWORD}),b.jsx(rn,{children:b.jsx(pc,{autoComplete:"new-password",className:t?.input,placeholder:i.PASSWORD_PLACEHOLDER,disabled:o,enableToggle:!0,...ve,value:ve.value})}),b.jsx(un,{className:t?.error})]})}),q&&b.jsx(Ht,{control:Le.control,name:"confirmPassword",render:({field:ve})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:i.CONFIRM_PASSWORD}),b.jsx(rn,{children:b.jsx(pc,{autoComplete:"new-password",className:t?.input,placeholder:i.CONFIRM_PASSWORD_PLACEHOLDER,disabled:o,enableToggle:!0,...ve,value:ve.value})}),b.jsx(un,{className:t?.error})]})}),L?.filter(ve=>ve!=="name"&&ve!=="image").map(ve=>{const Re=y?.[ve];return Re?Re.type==="boolean"?b.jsx(Ht,{control:Le.control,name:ve,render:({field:ke})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(rn,{children:b.jsx(g0,{checked:ke.value,onCheckedChange:ke.onChange,disabled:o})}),b.jsx(qt,{className:t?.label,children:Re.label}),b.jsx(un,{className:t?.error})]})},ve):b.jsx(Ht,{control:Le.control,name:ve,render:({field:ke})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:Re.label}),b.jsx(rn,{children:Re.type==="number"?b.jsx(Yr,{className:t?.input,type:"number",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:o,...ke,value:ke.value}):Re.multiline?b.jsx(B$,{className:t?.input,placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:o,...ke,value:ke.value}):b.jsx(Yr,{className:t?.input,type:"text",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:o,...ke,value:ke.value})}),b.jsx(un,{className:t?.error})]})},ve):(console.error(`Additional field ${ve} not found`),null)}),b.jsx(Cc,{ref:h,localization:i,action:"/sign-up/email"}),b.jsx(wt,{type:"submit",disabled:o,className:fe("w-full",t?.button,t?.primaryButton),children:o?b.jsx(gn,{className:"animate-spin"}):i.SIGN_UP_ACTION})]})})}function xV({className:e,classNames:t,isSubmitting:n,localization:o,otpSeparators:i=0,redirectTo:l,setIsSubmitting:c}){var d;const f=Ho(),h=f?Si("totpURI"):null,v=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:S,twoFactor:w,viewPaths:T,toast:O,Link:A,localizeErrors:C}=E.useContext(qe);o={...S,...o};const{onSuccess:R,isPending:I}=bo({redirectTo:l}),{data:k}=_(),D=(d=k?.user)==null?void 0:d.twoFactorEnabled,[N,z]=E.useState(w?.length===1?w[0]:null),[W,$]=E.useState(!1),[q,j]=E.useState(0),X=bn({code:Ve().min(1,{message:`${o.ONE_TIME_PASSWORD} ${o.IS_REQUIRED}`}).min(6,{message:`${o.ONE_TIME_PASSWORD} ${o.IS_INVALID}`}),trustDevice:xg().optional()}),oe=mo({resolver:vo(X),defaultValues:{code:""}});n=n||oe.formState.isSubmitting||I,E.useEffect(()=>{c?.(oe.formState.isSubmitting||I)},[oe.formState.isSubmitting,I,c]),E.useEffect(()=>{N==="otp"&&q<=0&&!v.current&&(v.current=!0,L())},[N]),E.useEffect(()=>{if(q<=0)return;const G=setTimeout(()=>{j(re=>re-1)},1e3);return()=>clearTimeout(G)},[q]);const L=async()=>{if(!(W||q>0)){try{$(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),j(60)}catch(G){O({variant:"error",message:jt({error:G,localization:o,localizeErrors:C})}),G.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}v.current=!1,$(!1)}};async function F({code:G,trustDevice:re}){try{await(N==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:G,trustDevice:re,fetchOptions:{throw:!0}}),await R(),k&&!D&&O({variant:"success",message:o?.TWO_FACTOR_ENABLED})}catch(ye){O({variant:"error",message:jt({error:ye,localization:o,localizeErrors:C})}),oe.reset()}}return b.jsx(yo,{...oe,children:b.jsxs("form",{onSubmit:oe.handleSubmit(F),className:fe("grid w-full gap-6",e,t?.base),children:[w?.includes("totp")&&h&&N==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx(jT,{className:t?.label,children:o.TWO_FACTOR_TOTP_LABEL}),b.jsx(S$,{className:fe("border shadow-xs",t?.qrCode),value:h})]}),N!==null&&b.jsxs(b.Fragment,{children:[b.jsx(Ht,{control:oe.control,name:"code",render:({field:G})=>b.jsxs(Gt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(qt,{className:t?.label,children:o.ONE_TIME_PASSWORD}),b.jsx(A,{className:fe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${T.RECOVER_ACCOUNT}${f?window.location.search:""}`,children:o.FORGOT_AUTHENTICATOR})]}),b.jsx(rn,{children:b.jsx(y0,{...G,maxLength:6,onChange:re=>{G.onChange(re),re.length===6&&oe.handleSubmit(F)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(b0,{otpSeparators:i})})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:oe.control,name:"trustDevice",render:({field:G})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(rn,{children:b.jsx(g0,{checked:G.value,onCheckedChange:G.onChange,disabled:n,className:t?.checkbox})}),b.jsx(qt,{className:t?.label,children:o.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[N!==null&&b.jsxs(wt,{type:"submit",disabled:n,className:fe(t?.button,t?.primaryButton),children:[n&&b.jsx(gn,{className:"animate-spin"}),o.TWO_FACTOR_ACTION]}),N==="otp"&&w?.includes("otp")&&b.jsxs(wt,{type:"button",variant:"outline",onClick:L,disabled:q>0||W||n,className:fe(t?.button,t?.outlineButton),children:[W?b.jsx(gn,{className:"animate-spin"}):b.jsx(VE,{className:t?.icon}),o.RESEND_CODE,q>0&&` (${q})`]}),N!=="otp"&&w?.includes("otp")&&b.jsxs(wt,{type:"button",variant:"secondary",className:fe(t?.button,t?.secondaryButton),onClick:()=>z("otp"),disabled:n,children:[b.jsx(VE,{className:t?.icon}),o.SEND_VERIFICATION_CODE]}),N!=="totp"&&w?.includes("totp")&&b.jsxs(wt,{type:"button",variant:"secondary",className:fe(t?.button,t?.secondaryButton),onClick:()=>z("totp"),disabled:n,children:[b.jsx(w7,{className:t?.icon}),o.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function qT({redirectTo:e}){const t=E.useRef(!1),{authClient:n,basePath:o,viewPaths:i}=E.useContext(qe),{onSuccess:l}=bo({redirectTo:e||`${o}/${i.SIGN_IN}`});return E.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(l))},[n,l]),b.jsx(gn,{className:"animate-spin"})}function RV({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,pathname:l,redirectTo:c,view:d,otpSeparators:f=0,setIsSubmitting:h}){const{basePath:v,credentials:p,localization:y,magicLink:_,emailOTP:S,signUp:w,twoFactor:T,viewPaths:O,replace:A}=E.useContext(qe),C=!!w;if(i={...y,...i},E.useEffect(()=>{l&&!Rv(O,l)&&(console.error(`Invalid auth view: ${l}`),A(`${v}/${O.SIGN_IN}${window.location.search}`))},[l,O,v,A]),d=d||Rv(O,l)||"SIGN_IN",E.useEffect(()=>{let R=!1;d==="MAGIC_LINK"&&(!_||!p&&!S)&&(R=!0),d==="EMAIL_OTP"&&(!S||!p&&!_)&&(R=!0),d==="SIGN_UP"&&!C&&(R=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&(R=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&!T&&(R=!0),R&&A(`${v}/${O.SIGN_IN}${window.location.search}`)},[v,d,O,p,A,S,C,_,T]),d==="SIGN_OUT")return b.jsx(qT,{redirectTo:c});if(d==="CALLBACK")return b.jsx(GT,{redirectTo:c});if(d==="SIGN_IN")return p?b.jsx(SV,{className:e,classNames:t,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):_?b.jsx(hw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):S?b.jsx(fw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(xV,{className:e,classNames:t,localization:i,otpSeparators:f,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(_V,{className:e,classNames:t,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(hw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(fw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="EMAIL_VERIFICATION")return b.jsx(yV,{className:e,classNames:t,callbackURL:n,localization:i,otpSeparators:f,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(bV,{className:e,classNames:t,localization:i,isSubmitting:o,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(EV,{className:e,classNames:t,localization:i});if(d==="SIGN_UP")return C&&b.jsx(wV,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h})}function OV({className:e,classNames:t,localization:n}){const{localization:o,redirectTo:i,replace:l,toast:c}=E.useContext(qe),d=E.useMemo(()=>({...o,...n}),[o,n]),{data:f}=T$(),[h,v]=E.useState(null);return E.useEffect(()=>{const p=Si("invitationId");if(!p){c({variant:"error",message:d.INVITATION_NOT_FOUND}),l(i);return}v(p)},[d.INVITATION_NOT_FOUND,c,l,i]),!f||!h?b.jsx(ZT,{className:e,classNames:t}):b.jsx(TV,{className:e,classNames:t,localization:d,invitationId:h})}function TV({className:e,classNames:t,localization:n,invitationId:o}){var i;const{authClient:l,hooks:{useInvitation:c},localization:d,organization:f,redirectTo:h,replace:v,toast:p,localizeErrors:y}=E.useContext(qe),_=E.useMemo(()=>({...d,...n}),[d,n]),[S,w]=E.useState(!1),[T,O]=E.useState(!1),A=S||T,{data:C,isPending:R}=c({query:{id:o}}),I=E.useCallback(()=>Si("redirectTo")||h,[h]);E.useEffect(()=>{if(!(R||!o)){if(!C){p({variant:"error",message:_.INVITATION_NOT_FOUND}),v(h);return}(C.status!=="pending"||new Date(C.expiresAt)<new Date)&&(p({variant:"error",message:new Date(C.expiresAt)<new Date?_.INVITATION_EXPIRED:_.INVITATION_NOT_FOUND}),v(h))}},[C,R,o,_,p,v,h]);const k=async()=>{O(!0);try{await l.organization.acceptInvitation({invitationId:o,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),v(I())}catch($){p({variant:"error",message:jt({error:$,localization:_,localizeErrors:y})}),O(!1)}},D=async()=>{w(!0);try{await l.organization.rejectInvitation({invitationId:o,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),v(h)}catch($){p({variant:"error",message:jt({error:$,localization:_,localizeErrors:y})}),w(!1)}},W=((i=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find($=>$.role===C?.role))==null?void 0:i.label)||C?.role;return C?b.jsxs(bi,{className:fe("w-full max-w-sm",e,t?.base),children:[b.jsxs(kf,{className:fe("justify-items-center text-center",t?.header),children:[b.jsx(m0,{className:fe("text-lg md:text-xl",t?.title),children:_.ACCEPT_INVITATION}),b.jsx(jf,{className:fe("text-xs md:text-sm",t?.description),children:_.ACCEPT_INVITATION_DESCRIPTION})]}),b.jsxs(zf,{className:fe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(bi,{className:fe("flex-row items-center p-4"),children:[b.jsx(VT,{organization:{id:C.organizationId,name:C.organizationName,slug:C.organizationSlug,logo:C.organizationLogo,createdAt:new Date},localization:_}),b.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:W})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsxs(wt,{variant:"outline",className:fe(t?.button,t?.outlineButton),onClick:D,disabled:A,children:[S?b.jsx(gn,{className:"animate-spin"}):b.jsx(L2,{}),_.REJECT]}),b.jsxs(wt,{className:fe(t?.button,t?.primaryButton),onClick:k,disabled:A,children:[T?b.jsx(gn,{className:"animate-spin"}):b.jsx(Cg,{}),_.ACCEPT]})]})]})]}):b.jsx(ZT,{className:e,classNames:t})}var ZT=({className:e,classNames:t,localization:n})=>b.jsxs(bi,{className:fe("w-full max-w-sm",e,t?.base),children:[b.jsxs(kf,{className:fe("justify-items-center",t?.header),children:[b.jsx(mr,{className:fe("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),b.jsx(mr,{className:fe("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),b.jsxs(zf,{className:fe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(bi,{className:fe("flex-row items-center p-4"),children:[b.jsx(VT,{isPending:!0,localization:n}),b.jsx(mr,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsx(mr,{className:"h-9 w-full"}),b.jsx(mr,{className:"h-9 w-full"})]})]})]});function pw({className:e,orientation:t="horizontal",decorative:n=!0,...o}){return b.jsx(O$,{"data-slot":"separator",decorative:n,orientation:t,className:fe("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function AV({classNames:e,isSubmitting:t,localization:n,view:o}){var i,l,c,d;const{viewPaths:f,navigate:h,basePath:v}=E.useContext(qe);return b.jsxs(wt,{className:fe("w-full",(i=e?.form)==null?void 0:i.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${v}/${o==="EMAIL_OTP"?f.SIGN_IN:f.EMAIL_OTP}${window.location.search}`),children:[o==="EMAIL_OTP"?b.jsx(N2,{className:(c=e?.form)==null?void 0:c.icon}):b.jsx(D2,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",o==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function CV({classNames:e,isSubmitting:t,localization:n,view:o}){var i,l,c,d;const{viewPaths:f,navigate:h,basePath:v,credentials:p}=E.useContext(qe);return b.jsxs(wt,{className:fe("w-full",(i=e?.form)==null?void 0:i.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${v}/${o==="MAGIC_LINK"||!p?f.SIGN_IN:f.MAGIC_LINK}${window.location.search}`),children:[o==="MAGIC_LINK"?b.jsx(N2,{className:(c=e?.form)==null?void 0:c.icon}):b.jsx(D2,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",o==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function IV({localization:e,redirectTo:t}){const{authClient:n,localization:o,toast:i,localizeErrors:l}=E.useContext(qe),c=E.useRef(!1);e=E.useMemo(()=>({...o,...e}),[o,e]);const{onSuccess:d}=bo({redirectTo:t});return E.useEffect(()=>{if(!c.current){c.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:d}})}catch(f){i({variant:"error",message:jt({error:f,localization:e,localizeErrors:l})})}}},[n,e,l,d,i]),null}function MV({classNames:e,isSubmitting:t,localization:n,redirectTo:o,setIsSubmitting:i}){var l,c;const{authClient:d,localization:f,toast:h,localizeErrors:v}=E.useContext(qe);n={...f,...n};const{onSuccess:p}=bo({redirectTo:o}),y=async()=>{i?.(!0);try{const _=await d.signIn.passkey({fetchOptions:{throw:!0}});_?.error?(h({variant:"error",message:jt({error:_.error,localization:n,localizeErrors:v})}),i?.(!1)):p()}catch(_){h({variant:"error",message:jt({error:_,localization:n,localizeErrors:v})}),i?.(!1)}};return b.jsxs(wt,{className:fe("w-full",(l=e?.form)==null?void 0:l.button,(c=e?.form)==null?void 0:c.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:y,children:[b.jsx(E7,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function mw({className:e,classNames:t,callbackURL:n,isSubmitting:o,localization:i,other:l,provider:c,redirectTo:d,socialLayout:f,setIsSubmitting:h}){var v,p,y,_;const{authClient:S,basePath:w,baseURL:T,persistClient:O,redirectTo:A,viewPaths:C,social:R,genericOAuth:I,toast:k,localizeErrors:D}=E.useContext(qe),N=E.useCallback(()=>d||Si("redirectTo")||A,[d,A]),z=E.useCallback(()=>`${T}${n||(O?`${w}/${C.CALLBACK}?redirectTo=${encodeURIComponent(N())}`:N())}`,[n,O,w,C,T,N]),W=async()=>{h(!0);try{if(l){const $={providerId:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};I?.signIn?(await I.signIn($),setTimeout(()=>{h(!1)},1e4)):await S.signIn.oauth2($)}else{const $={provider:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};R?.signIn?(await R.signIn($),setTimeout(()=>{h(!1)},1e4)):await S.signIn.social($)}}catch($){k({variant:"error",message:jt({error:$,localization:i,localizeErrors:D})}),h(!1)}};return b.jsxs(wt,{className:fe(f==="vertical"?"w-full":"grow",e,(v=t?.form)==null?void 0:v.button,(p=t?.form)==null?void 0:p.outlineButton,(y=t?.form)==null?void 0:y.providerButton),disabled:o,variant:"outline",onClick:W,children:[c.icon&&b.jsx(c.icon,{className:(_=t?.form)==null?void 0:_.icon}),f==="grid"&&c.name,f==="vertical"&&`${i.SIGN_IN_WITH} ${c.name}`]})}function jH({className:e,classNames:t,callbackURL:n,cardHeader:o,cardFooter:i,localization:l,path:c,pathname:d,redirectTo:f,socialLayout:h="auto",view:v,otpSeparators:p=0}){var y,_,S,w,T,O;const A=Ho(),{basePath:C,credentials:R,localization:I,magicLink:k,emailOTP:D,oneTap:N,passkey:z,signUp:W,social:$,genericOAuth:q,viewPaths:j,Link:X}=E.useContext(qe);l={...I,...l};let oe=h;oe==="auto"&&(oe=R&&$?.providers&&$.providers.length>2?"horizontal":"vertical");const L=c??d?.split("/").pop(),F=v||Rv(j,L)||"SIGN_IN",[G,re]=E.useState(!1);if(E.useEffect(()=>{const P=()=>re(!1);return window.addEventListener("pagehide",P),()=>{re(!1),window.removeEventListener("pagehide",P)}},[]),F==="CALLBACK")return b.jsx(GT,{redirectTo:f});if(F==="SIGN_OUT")return b.jsx(qT,{redirectTo:f});if(F==="ACCEPT_INVITATION")return b.jsx(OV,{className:e,classNames:t});const ye=!R&&!k&&!D?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${F}_DESCRIPTION`];return b.jsxs(bi,{className:fe("w-full max-w-sm",e,t?.base),children:[b.jsx(kf,{className:t?.header,children:o||b.jsxs(b.Fragment,{children:[b.jsx(m0,{className:fe("text-lg md:text-xl",t?.title),children:l[F]}),ye&&b.jsx(jf,{className:fe("text-xs md:text-sm",t?.description),children:ye})]})}),b.jsxs(zf,{className:fe("grid gap-6",t?.content),children:[N&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(F)&&b.jsx(IV,{localization:l,redirectTo:f}),(R||k||D)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(RV,{classNames:t?.form,callbackURL:n,isSubmitting:G,localization:l,otpSeparators:p,view:F,redirectTo:f,setIsSubmitting:re}),k&&(R&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||D&&F==="EMAIL_OTP")&&b.jsx(CV,{classNames:t,localization:l,view:F,isSubmitting:G}),D&&(R&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||k&&["SIGN_IN","MAGIC_LINK"].includes(F))&&b.jsx(AV,{classNames:t,localization:l,view:F,isSubmitting:G})]}),F!=="RESET_PASSWORD"&&F!=="EMAIL_VERIFICATION"&&(((y=$?.providers)==null?void 0:y.length)||((_=q?.providers)==null?void 0:_.length)||F==="SIGN_IN"&&z)&&b.jsxs(b.Fragment,{children:[(R||k||D)&&b.jsxs("div",{className:fe("flex items-center gap-2",t?.continueWith),children:[b.jsx(pw,{className:fe("!w-auto grow",t?.separator)}),b.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:l.OR_CONTINUE_WITH}),b.jsx(pw,{className:fe("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((S=$?.providers)==null?void 0:S.length)||((w=q?.providers)==null?void 0:w.length))&&b.jsxs("div",{className:fe("flex w-full items-center justify-between gap-4",oe==="horizontal"&&"flex-wrap",oe==="vertical"&&"flex-col",oe==="grid"&&"grid grid-cols-2"),children:[(T=$?.providers)==null?void 0:T.map(P=>{const Q=uV.find(te=>te.provider===P);return Q?b.jsx(mw,{classNames:t,callbackURL:n,isSubmitting:G,localization:l,provider:Q,redirectTo:f,setIsSubmitting:re,socialLayout:oe},P):null}),(O=q?.providers)==null?void 0:O.map(P=>b.jsx(mw,{classNames:t,callbackURL:n,isSubmitting:G,localization:l,provider:P,redirectTo:f,setIsSubmitting:re,socialLayout:oe,other:!0},P.provider))]}),z&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(F)&&b.jsx(MV,{classNames:t,isSubmitting:G,localization:l,redirectTo:f,setIsSubmitting:re})]})]})]}),i&&b.jsx(Jv,{className:t?.footer,children:i}),R&&W&&b.jsxs(Jv,{className:fe("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?l.DONT_HAVE_AN_ACCOUNT:F==="SIGN_UP"?l.ALREADY_HAVE_AN_ACCOUNT:b.jsx(m7,{className:"size-3"}),F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"||F==="SIGN_UP"?b.jsx(X,{className:fe("text-foreground underline",t?.footerLink),href:`${C}/${j[F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${A?window.location.search:""}`,children:b.jsx(wt,{variant:"link",size:"sm",className:fe("px-0 text-foreground underline",t?.footerLink),children:F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?l.SIGN_UP:l.SIGN_IN})}):b.jsx(wt,{variant:"link",size:"sm",className:fe("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:l.GO_BACK})]})]})}function zH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{isPending:n}=t();return n?e:null}function UH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{data:n}=t();return n?e:null}function BH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{data:n,isPending:o}=t();return!n&&!o?e:null}function NV(e){const t=uf.c(8),{children:n}=e,o=vc();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={basePath:"/",pathMode:"slug"},t[0]=i):i=t[0];let l,c;t[1]!==o?(l=f=>o({to:f}),c=f=>o({to:f,replace:!0}),t[1]=o,t[2]=l,t[3]=c):(l=t[2],c=t[3]);let d;return t[4]!==n||t[5]!==l||t[6]!==c?(d=b.jsx(d7,{authClient:uI,organization:i,navigate:l,replace:c,Link:DV,children:n}),t[4]=n,t[5]=l,t[6]=c,t[7]=d):d=t[7],d}function DV(e){const{href:t,className:n,children:o,...i}=e;return b.jsx(mg,{to:t,className:n,...i,children:o})}const LV=new $4;function PV(e){const t=uf.c(3),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(FP,{}),t[0]=o):o=t[0];let i;return t[1]!==n?(i=b.jsxs(H4,{client:LV,children:[o,b.jsx(i3,{children:b.jsx(NV,{children:n})})]}),t[1]=n,t[2]=i):i=t[2],i}const kV=function(){return null};function jV(){const e=uf.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=b.jsx("div",{className:"flex items-center justify-center min-h-screen",children:b.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const Ic=M5({component:()=>b.jsxs(PV,{children:[b.jsx(E.Suspense,{fallback:b.jsx(jV,{}),children:b.jsx(Qw,{})}),b.jsx(kV,{})]})}),zV=yn({getParentRoute:()=>Ic,path:"/login",component:An(()=>Tn(()=>import("./login-9yN2SgKi.js"),__vite__mapDeps([0,1,2]))),validateSearch:Ua(()=>bn({next:Ve().optional(),client_id:Ve().optional(),redirect_uri:Ve().optional(),response_type:Ve().optional(),state:Ve().optional(),scope:Ve().optional(),code_challenge:Ve().optional(),code_challenge_method:Ve().optional()}))}),UV=yn({getParentRoute:()=>Ic,path:"/auth/$pathname",component:An(()=>Tn(()=>import("./auth-catchall-asPM_Gpt.js"),[]))}),yr=yn({getParentRoute:()=>Ic,id:"shell",component:An(()=>Tn(()=>import("./shell-layout-GW5ptB5d.js"),__vite__mapDeps([3,4,1,5,6,7,8,9,10,11,12,13,14,2,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42])))}),BV=yn({getParentRoute:()=>yr,path:"/",component:An(()=>Tn(()=>import("./home-DwiZZ6Lk.js"),__vite__mapDeps([43,44,1,17,32,42,2,12,13,14,15])))}),FV=yn({getParentRoute:()=>yr,path:"/$org",component:An(()=>Tn(()=>import("./page-BH17Xeeo.js"),__vite__mapDeps([45,29,1,8,30,31,16,32,4,6,18,19,11,10,20,21,7,33,27,28,23,24,34,35,15,13,5,36,37,38,39,46,47,41,42,48,49,50])))}),$V=yn({getParentRoute:()=>yr,path:"/$org/members",component:An(()=>Tn(()=>import("./members-VwgW_g24.js"),__vite__mapDeps([51,52,53,1,22,23,18,8,46,54,55,10,2,56,57,58,59,60,37,28,17,61,13,26,6,62,41,63,42,39,4,14,20,21,33,44,64,65,66])))}),VV=yn({getParentRoute:()=>yr,path:"/$org/mcps",component:An(()=>Tn(()=>import("./connections-DBqko-au.js"),__vite__mapDeps([67,52,53,1,22,23,18,8,46,54,55,10,2,56,68,44,4,69,7,13,61,26,6,14,64,70,42,39,41,34,20,21,33,38]))),validateSearch:Ua(()=>bn({action:ic(["create"]).optional()}))}),HV=yn({getParentRoute:()=>yr,path:"/$org/settings",component:An(()=>Tn(()=>import("./settings-D8ofqvqO.js"),__vite__mapDeps([71,52,53,1,22,23,18,8,46,54,14,2,6])))}),GV=yn({getParentRoute:()=>yr,path:"/$org/monitoring",component:An(()=>Tn(()=>import("./monitoring-BdaWFgQZ.js"),__vite__mapDeps([72,10,1,8,52,53,22,23,18,46,54,55,2,4,61,21,16,24,73,65,74,35,15,75,49,11,60,42,39,58,20,33,76,48,28]))),validateSearch:Ua(()=>bn({tab:ic(["logs","analytics"]).default("logs"),from:Ve().default("now-24h"),to:Ve().default("now"),connectionId:Sv(Ve()).optional().default([]),gatewayId:Sv(Ve()).optional().default([]),tool:Ve().default(""),status:ic(["all","success","errors"]).default("all"),search:Ve().default(""),page:E2().optional(),streaming:xg().default(!0),propertyFilters:Ve().default("")}))}),YT=yn({getParentRoute:()=>yr,path:"/$org/store",component:An(()=>Tn(()=>import("./page-CRqZQKSl.js"),__vite__mapDeps([77,37,52,53,1,22,23,18,8,46,73,78,41,10,79,80,55,2,63,44,81,16,21,66,20,42,30,31,27,28])))}),qV=yn({getParentRoute:()=>YT,path:"/$appName",component:An(()=>Tn(()=>import("./mcp-server-detail-DPNY9vgF.js"),__vite__mapDeps([82,32,41,1,59,10,8,21,42,22,23,25,83,28,5,79,53,18,46,55,2,56,44,84,85,76,61,30,31,48,86,87,88,38,80,81,36]))),validateSearch:Ua(()=>bn({registryId:Ve().optional(),serverName:Ve().optional(),itemId:Ve().optional()}))}),ZV=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId",component:An(()=>Tn(()=>import("./connection-detail-CG5F7eYm.js"),__vite__mapDeps([89,10,1,8,4,30,31,90,91,70,2,42,39,48,28,92,9,5,65,41,84,59,14,20,21,34,11,23,93,88,79,87,38,75,94,76,61,95,53,22,18,46,55,44,24,64,69,7,56,96,78,17,13,83,85]))),validateSearch:Ua(()=>bn({tab:Ve().optional()}))}),YV=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:An(()=>Tn(()=>import("./collection-detail-7jpdrsjG.js"),__vite__mapDeps([97,10,1,8,4,92,9,14,2,33,98,84,59,32,35,15,74,24,41,66,90,91,31,70,42,39,30,48,28,5,65,20,21,34,11,23,93,88,79,87,38,75,86,96,40,19,7,46,47,26,6,62,22,61]))),validateSearch:Ua(()=>bn({replayId:Ve().optional()}))}),KV=yn({getParentRoute:()=>yr,path:"/$org/gateways",component:An(()=>Tn(()=>import("./gateways-D_z8EWpe.js"),__vite__mapDeps([99,52,53,1,22,23,18,8,46,54,55,10,2,56,68,44,4,11,69,7,13,61,64,41,39]))),validateSearch:Ua(()=>bn({action:ic(["create"]).optional()}))}),WV=yn({getParentRoute:()=>yr,path:"/$org/gateways/$gatewayId",component:An(()=>Tn(()=>import("./gateway-detail-BH34ou9a.js"),__vite__mapDeps([100,10,1,8,4,58,59,55,2,42,6,92,9,57,11,94,93,80,14,76,61,20,21,24,98,36,41,84]))),validateSearch:Ua(()=>bn({tab:Ve().optional()}))}),QV=yn({getParentRoute:()=>yr,path:"/$org/workflows",component:An(()=>Tn(()=>import("./workflow-Btak9-NU.js"),__vite__mapDeps([101,37,95,38,10,1,8,53,22,23,18,46,55,2,44,24,64,69,7,39,56,96,78,17,28,92,9,88,30,31,13,42,84,59,52,41])))}),XV=yn({getParentRoute:()=>Ic,path:"/oauth/callback",component:An(()=>Tn(()=>import("./oauth-callback-C_lwUhYa.js"),__vite__mapDeps([102,41,91,31])))}),JV=YT.addChildren([qV]),eH=yr.addChildren([BV,FV,$V,VV,KV,WV,GV,JV,HV,QV,ZV,YV]),tH=Ic.addChildren([eH,zV,UV,XV]),nH=B5({routeTree:tH}),rH=document.getElementById("root");g4.createRoot(rH).render(b.jsx(E.StrictMode,{children:b.jsx(V5,{router:nH})}));export{gH as $,jH as A,V4 as B,Nj as C,CH as D,$L as E,fH as F,G$ as G,E8 as H,xH as I,Ua as J,o3 as K,pH as L,E2 as M,uH as N,Mj as O,Ij as P,xg as Q,Aj as R,jV as S,Dj as T,kH as U,EH as V,Sv as W,SH as X,Ev as Y,bH as Z,RH as _,uI as a,iv as a$,ic as a0,_i as a1,Tn as a2,n3 as a3,X4 as a4,oH as a5,ux as a6,qw as a7,mf as a8,eg as a9,cc as aA,J2 as aB,Bg as aC,Ug as aD,ez as aE,tz as aF,er as aG,In as aH,PU as aI,Yw as aJ,L2 as aK,x7 as aL,RR as aM,_7 as aN,PH as aO,Cj as aP,mg as aQ,C7 as aR,XI as aS,YO as aT,WO as aU,NU as aV,oB as aW,UR as aX,bc as aY,mc as aZ,On as a_,ka as aa,Fo as ab,dn as ac,OR as ad,wi as ae,Ut as af,Go as ag,Ge as ah,Wr as ai,Kr as aj,_c as ak,XR as al,hz as am,fz as an,aH as ao,P4 as ap,N_ as aq,sH as ar,iH as as,FR as at,WR as au,Ia as av,J9 as aw,Fg as ax,lR as ay,$g as az,pg as b,yw as b0,G4 as b1,Y4 as b2,J4 as b3,K4 as b4,W4 as b5,Qn as b6,t3 as b7,D_ as b8,e3 as b9,OU as bA,TU as bB,AU as bC,CU as bD,NH as bE,DH as bF,LH as bG,MH as bH,tc as bI,U4 as bJ,_w as bK,q8 as bL,DE as bM,hH as bN,dH as bO,Z8 as bP,Q4 as ba,A7 as bb,M7 as bc,xf as bd,Pg as be,$U as bf,VU as bg,FU as bh,mH as bi,w2 as bj,wg as bk,wH as bl,QL as bm,_H as bn,_8 as bo,x8 as bp,Rg as bq,O8 as br,vM as bs,vH as bt,yH as bu,ML as bv,TH as bw,AH as bx,OH as by,RU as bz,uf as c,hg as d,IH as e,J7 as f,Z2 as g,vc as h,Jn as i,b as j,O$ as k,qe as l,zH as m,UH as n,BH as o,r3 as p,Qw as q,E as r,bn as s,zE as t,lH as u,Ve as v,vo as w,mo as x,cH as y,V as z};
|