@decocms/mesh 1.6.0 → 1.8.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-BIlMffS8.js → AlertCircle-CoA9j9_b.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CJ-eKoid.js → ArrowLeft-Bu1JR7vY.js} +1 -1
- package/dist/client/assets/{ChevronDown-atiP0m-F.js → ChevronDown-BmUd-Gap.js} +1 -1
- package/dist/client/assets/{Clock-BD2gknBV.js → Clock-BGOqsAv_.js} +1 -1
- package/dist/client/assets/{Code01-BEefaaXC.js → Code01-C4I9q0rm.js} +1 -1
- package/dist/client/assets/{Copy01-DhXqtugg.js → Copy01-D_YhbDiF.js} +1 -1
- package/dist/client/assets/{CpuChip02-BtgBI59l.js → CpuChip02-BkDt7iNK.js} +1 -1
- package/dist/client/assets/{DotsVertical-roys0n6e.js → DotsVertical-CxdZClGh.js} +1 -1
- package/dist/client/assets/{File06-MlW8n69V.js → File06-BdMasDPT.js} +1 -1
- package/dist/client/assets/{FlipBackward-BSnTMMYy.js → FlipBackward-B34yEzR2.js} +1 -1
- package/dist/client/assets/{GitBranch01-CEvRlFly.js → GitBranch01-D2Rua42v.js} +1 -1
- package/dist/client/assets/{Grid01-CkwdbRed.js → Grid01-Bom2qqwm.js} +1 -1
- package/dist/client/assets/{Inbox01-D66dNA_K.js → Inbox01-Arx8J2Oq.js} +1 -1
- package/dist/client/assets/InfoCircle-BYXT4R1l.js +1 -0
- package/dist/client/assets/{Key01-BXlD7hmS.js → Key01-D0WGLaST.js} +1 -1
- package/dist/client/assets/LinkExternal01-LVkx-wZF.js +1 -0
- package/dist/client/assets/{Loading01-EiDV-2FW.js → Loading01-Dw6V1r3u.js} +1 -1
- package/dist/client/assets/{Lock01-DpRDCI3P.js → Lock01-Dw2P1WZh.js} +1 -1
- package/dist/client/assets/{Play-FKw7EqPO.js → Play-BRRssd_q.js} +1 -1
- package/dist/client/assets/{Plus-CwB-Rc8B.js → Plus-CQSfshmp.js} +1 -1
- package/dist/client/assets/{SearchMd-C6P9P1wF.js → SearchMd-CGUWNVUr.js} +1 -1
- package/dist/client/assets/{Terminal-Dv6w41J8.js → Terminal-CIo_ltVk.js} +1 -1
- package/dist/client/assets/{Trash01-Ctk7srex.js → Trash01-BgGiU9JZ.js} +1 -1
- package/dist/client/assets/{X-Da4xsL05.js → X-CsW5kmRT.js} +1 -1
- package/dist/client/assets/{XClose-OUZ04LEo.js → XClose-D2IdV8gs.js} +1 -1
- package/dist/client/assets/{alert-dialog-D6UjYOUP.js → alert-dialog-rSIOP2OM.js} +1 -1
- package/dist/client/assets/{auth-CZR9mNdb.js → auth-D6vm_lfk.js} +1 -1
- package/dist/client/assets/{auth-catchall-BZWl_BRK.js → auth-catchall-lDj0BXu4.js} +1 -1
- package/dist/client/assets/{avatar-BHE7lL4M.js → avatar-C45Lgbwv.js} +1 -1
- package/dist/client/assets/{badge-B-u7R38I.js → badge-Z-ujar-h.js} +1 -1
- package/dist/client/assets/{button-B13xcF6W.js → button-DMnSM5FV.js} +1 -1
- package/dist/client/assets/{card-7VW-xSd-.js → card-DL_e-uTF.js} +1 -1
- package/dist/client/assets/{checkbox-BMd2Z-WT.js → checkbox-SCLb_n1h.js} +1 -1
- package/dist/client/assets/{collection-detail-7eGCexqR.js → collection-detail-DZRR92ph.js} +1 -1
- package/dist/client/assets/{collection-display-button-D4VM0KQx.js → collection-display-button-BbSV76WH.js} +1 -1
- package/dist/client/assets/{collection-header-od14k6u3.js → collection-header-CqO1LmKH.js} +1 -1
- package/dist/client/assets/{collection-page-BNuNM--s.js → collection-page-DDVR6yeu.js} +1 -1
- package/dist/client/assets/{collection-search-LnYLnFH8.js → collection-search-BOBOP2ro.js} +1 -1
- package/dist/client/assets/{collection-tab-bg_gmLyh.js → collection-tab-CNlP707v.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B0AFEn1d.js → collection-table-wrapper-ByX0J-nn.js} +1 -1
- package/dist/client/assets/{connection-card-r2tH19aR.js → connection-card-CZFyOgeO.js} +1 -1
- package/dist/client/assets/{connection-detail-Dm1s8Dj2.js → connection-detail-oL5IGO2h.js} +1 -1
- package/dist/client/assets/{connections-CWHukeOK.js → connections-BKlzJU2y.js} +1 -1
- package/dist/client/assets/constants-C4MXZrmv.js +1 -0
- package/dist/client/assets/{core-BqWxized.js → core-D9xILP6l.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CjneLhKn.js → create-organization-dialog-lmQ3mepV.js} +1 -1
- package/dist/client/assets/{dialog-DoN4ORnY.js → dialog-B1fXXmBI.js} +1 -1
- package/dist/client/assets/{dropdown-menu-uXj8nKiT.js → dropdown-menu-gRHakuHp.js} +1 -1
- package/dist/client/assets/{empty-state-N07FE0YG.js → empty-state-BiqF__Lu.js} +1 -1
- package/dist/client/assets/{env-vars-editor-B7JL_p-V.js → env-vars-editor-Br0Q2jee.js} +1 -1
- package/dist/client/assets/{error-boundary-Ce0_dLsG.js → error-boundary-CUq8HVcH.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CeT4F9gU.js → extract-connection-data-DsJuSGHU.js} +1 -1
- package/dist/client/assets/{form-BQIYj24w.js → form-BbwJs-Od.js} +1 -1
- package/dist/client/assets/{formatDistanceToNow-CArtWgcP.js → formatDistanceToNow-jHI_IOun.js} +1 -1
- package/dist/client/assets/gateway-detail-CvVf3uBW.js +1 -0
- package/dist/client/assets/{gateways-9p2LLkTK.js → gateways-BfCNNBIO.js} +1 -1
- package/dist/client/assets/{home-DgfprghT.js → home-oGaB9rtf.js} +1 -1
- package/dist/client/assets/{index-DcMa5gDs.js → index-B1eBXzBF.js} +1 -1
- package/dist/client/assets/{index-BcDKMyjy.css → index-B3GsxHkT.css} +1 -1
- package/dist/client/assets/{index-CVgkE3Gv.js → index-BMIizA12.js} +1 -1
- package/dist/client/assets/{index-DEMNtulg.js → index-BVHhSH8M.js} +3 -3
- package/dist/client/assets/{index-DcvTq0xJ.js → index-BbK2Byrj.js} +1 -1
- package/dist/client/assets/{input-YdP8mwrf.js → input-C6vwKKeq.js} +1 -1
- package/dist/client/assets/json-GXJs871j.js +1 -0
- package/dist/client/assets/{json-syntax-highlighter-Bif-CDya.js → json-syntax-highlighter-C3W2DACo.js} +2 -2
- package/dist/client/assets/{layout-BNxxrCBw.js → layout-m8iq6RWE.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-C0vzyJy5.js → lazy-highlighter-C7qLCeM-.js} +1 -1
- package/dist/client/assets/{localstorage-keys-DwKN3_Ky.js → localstorage-keys-BB9xpX5T.js} +1 -1
- package/dist/client/assets/{login-UWyl_cxx.js → login-CevUioqo.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Dqr97r2H.js → mcp-oauth-CE6Gg3ul.js} +1 -1
- package/dist/client/assets/{members-C3UV37Kw.js → members-CAJLI1Ui.js} +1 -1
- package/dist/client/assets/{monitoring-Ds52TSSS.js → monitoring-_9gwma-O.js} +1 -1
- package/dist/client/assets/{oauth-callback-D4M9mHyH.js → oauth-callback-DnSysdpG.js} +1 -1
- package/dist/client/assets/{page-B7ia0_lh.js → page-jzi_ERcf.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-BKotT_Nc.js → pin-to-sidebar-button-DonhySMf.js} +1 -1
- package/dist/client/assets/{popover-7jr0PuXV.js → popover-BO5GT9tA.js} +1 -1
- package/dist/client/assets/prism-light-WCI-7yyK.js +1 -0
- package/dist/client/assets/{resizable-qkPSJ31g.js → resizable-DpISfhV6.js} +1 -1
- package/dist/client/assets/{resource-tabs-qR3NhTLd.js → resource-tabs-JMDBPJhv.js} +1 -1
- package/dist/client/assets/{responsive-select-CJQwNPPj.js → responsive-select-BZGantuu.js} +1 -1
- package/dist/client/assets/{select-L_OjJ9sW.js → select-mD7lFwRj.js} +1 -1
- package/dist/client/assets/{settings-BapAo6i2.js → settings-iXHGs-4V.js} +1 -1
- package/dist/client/assets/{shell-layout-DqUuQ9gz.js → shell-layout-C1VOF_px.js} +3 -3
- package/dist/client/assets/{spinner-CAJeeq5B.js → spinner-D7to-RHc.js} +1 -1
- package/dist/client/assets/{store-DTMoxgob.js → store-C7bepdKu.js} +1 -1
- package/dist/client/assets/store-app-detail-dqrfmC2K.js +1 -0
- package/dist/client/assets/{switch-DlwEQXd2.js → switch-CpJO-7Kf.js} +1 -1
- package/dist/client/assets/{textarea-IOVeLZOt.js → textarea-Dma5FaAA.js} +1 -1
- package/dist/client/assets/{thread-history-popover-COjpShBU.js → thread-history-popover-DTmh-wTW.js} +35 -35
- package/dist/client/assets/{tools-list-l6xtSgWR.js → tools-list-DJTZFgWM.js} +1 -1
- package/dist/client/assets/{tooltip-C7B84lYF.js → tooltip-DiQ9SlNX.js} +1 -1
- package/dist/client/assets/{types-BmKCUQAI.js → types-Bq0bBlbx.js} +1 -1
- package/dist/client/assets/{use-binding-Ce8NG0MO.js → use-binding-DQTEUjPl.js} +1 -1
- package/dist/client/assets/{use-connection-D-LWel3A.js → use-connection-DUMeVexv.js} +1 -1
- package/dist/client/assets/{use-connection-resources-CJzk5_Wj.js → use-connection-resources-GqC2zg91.js} +1 -1
- package/dist/client/assets/{use-gateway-eXp_1iQc.js → use-gateway-pQG4iSzq.js} +1 -1
- package/dist/client/assets/{use-list-state-CmxR0QRn.js → use-list-state-DKjekACN.js} +1 -1
- package/dist/client/assets/{use-mcp-Cmlg9h6L.js → use-mcp-CaAgRxkf.js} +1 -1
- package/dist/client/assets/{use-members-Drex2zGi.js → use-members-Cxbw-nUt.js} +1 -1
- package/dist/client/assets/{use-mobile-B-R7B7Hp.js → use-mobile-C2teUdDI.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B_G_DBCR.js → use-organization-settings-B-bw0Nsb.js} +1 -1
- package/dist/client/assets/{use-tool-call-BN3WED_Z.js → use-tool-call-BwHyofVZ.js} +1 -1
- package/dist/client/assets/useQuery-C3iXPPho.js +1 -0
- package/dist/client/assets/{useSuspenseInfiniteQuery-DFaXtjFO.js → useSuspenseInfiniteQuery-WWHYgeeq.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BpRlpgBn.js → view-mode-toggle-DCDdw_zu.js} +1 -1
- package/dist/client/assets/{workflow-CBeu3WB4.js → workflow-nViVDMOR.js} +1 -1
- package/dist/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/client/assets/LinkExternal01-O4xnNCff.js +0 -1
- package/dist/client/assets/constants-CN4QOiqe.js +0 -1
- package/dist/client/assets/gateway-detail-VCb3jL84.js +0 -1
- package/dist/client/assets/json-Bz08jZIq.js +0 -1
- package/dist/client/assets/prism-light-CHE2alug.js +0 -1
- package/dist/client/assets/store-app-detail-CbGg2GlI.js +0 -1
- package/dist/client/assets/useQuery-DLJrS2VC.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-CevUioqo.js","assets/button-DMnSM5FV.js","assets/input-C6vwKKeq.js","assets/shell-layout-C1VOF_px.js","assets/SearchMd-CGUWNVUr.js","assets/use-connection-DUMeVexv.js","assets/tooltip-DiQ9SlNX.js","assets/localstorage-keys-BB9xpX5T.js","assets/useQuery-C3iXPPho.js","assets/CpuChip02-BkDt7iNK.js","assets/Loading01-Dw6V1r3u.js","assets/Plus-CQSfshmp.js","assets/X-CsW5kmRT.js","assets/use-binding-DQTEUjPl.js","assets/auth-D6vm_lfk.js","assets/thread-history-popover-DTmh-wTW.js","assets/AlertCircle-CoA9j9_b.js","assets/error-boundary-CUq8HVcH.js","assets/Grid01-Bom2qqwm.js","assets/responsive-select-BZGantuu.js","assets/select-mD7lFwRj.js","assets/ChevronDown-BmUd-Gap.js","assets/use-mobile-C2teUdDI.js","assets/textarea-Dma5FaAA.js","assets/Copy01-D_YhbDiF.js","assets/Terminal-CIo_ltVk.js","assets/json-syntax-highlighter-C3W2DACo.js","assets/alert-dialog-rSIOP2OM.js","assets/File06-BdMasDPT.js","assets/InfoCircle-BYXT4R1l.js","assets/well-known-mcp-VNRT0JrW.js","assets/generate-id-Dyweu44Y.js","assets/popover-BO5GT9tA.js","assets/Clock-BGOqsAv_.js","assets/Trash01-BgGiU9JZ.js","assets/resizable-DpISfhV6.js","assets/use-gateway-pQG4iSzq.js","assets/use-organization-settings-B-bw0Nsb.js","assets/create-organization-dialog-lmQ3mepV.js","assets/form-BbwJs-Od.js","assets/spinner-D7to-RHc.js","assets/avatar-C45Lgbwv.js","assets/dropdown-menu-gRHakuHp.js","assets/LinkExternal01-LVkx-wZF.js","assets/dialog-B1fXXmBI.js","assets/home-oGaB9rtf.js","assets/card-DL_e-uTF.js","assets/page-jzi_ERcf.js","assets/collection-header-CqO1LmKH.js","assets/collection-display-button-BbSV76WH.js","assets/view-mode-toggle-DCDdw_zu.js","assets/collection-page-DDVR6yeu.js","assets/use-tool-call-BwHyofVZ.js","assets/GitBranch01-D2Rua42v.js","assets/types-Bq0bBlbx.js","assets/index-B1eBXzBF.js","assets/badge-Z-ujar-h.js","assets/Key01-D0WGLaST.js","assets/Play-BRRssd_q.js","assets/page-BZV40eAE.css","assets/members-CAJLI1Ui.js","assets/collection-search-BOBOP2ro.js","assets/collection-table-wrapper-ByX0J-nn.js","assets/switch-CpJO-7Kf.js","assets/checkbox-SCLb_n1h.js","assets/ArrowLeft-Bu1JR7vY.js","assets/use-members-Cxbw-nUt.js","assets/XClose-D2IdV8gs.js","assets/Lock01-Dw2P1WZh.js","assets/DotsVertical-CxdZClGh.js","assets/connections-BKlzJU2y.js","assets/connection-card-CZFyOgeO.js","assets/use-list-state-DKjekACN.js","assets/env-vars-editor-Br0Q2jee.js","assets/settings-iXHGs-4V.js","assets/monitoring-_9gwma-O.js","assets/Code01-C4I9q0rm.js","assets/index-BbK2Byrj.js","assets/useSuspenseInfiniteQuery-WWHYgeeq.js","assets/store-C7bepdKu.js","assets/slugify-CEUa2lfQ.js","assets/Inbox01-Arx8J2Oq.js","assets/registry-utils-ulDDT0d8.js","assets/app-name-gTETL9So.js","assets/workflow-nViVDMOR.js","assets/collection-tab-CNlP707v.js","assets/empty-state-BiqF__Lu.js","assets/pin-to-sidebar-button-DonhySMf.js","assets/constants-C4MXZrmv.js","assets/layout-m8iq6RWE.js","assets/store-app-detail-dqrfmC2K.js","assets/tools-list-DJTZFgWM.js","assets/tools-list-CSRUKxnt.css","assets/resource-tabs-JMDBPJhv.js","assets/use-mcp-CaAgRxkf.js","assets/extract-connection-data-DsJuSGHU.js","assets/connection-detail-oL5IGO2h.js","assets/index-BMIizA12.js","assets/mcp-oauth-CE6Gg3ul.js","assets/formatDistanceToNow-jHI_IOun.js","assets/use-connection-resources-GqC2zg91.js","assets/collection-detail-DZRR92ph.js","assets/FlipBackward-B34yEzR2.js","assets/gateways-BfCNNBIO.js","assets/gateway-detail-CvVf3uBW.js","assets/oauth-callback-DnSysdpG.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function o4(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 a4="modulepreload",i4=function(e){return"/"+e},u_={},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=i4(h),h in u_)return;u_[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":a4,v||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),document.head.appendChild(y),v)return new Promise((_,w)=>{y.addEventListener("load",_),y.addEventListener("error",()=>w(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 nH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kp={exports:{}},Cl={};var d_;function s4(){if(d_)return Cl;d_=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 f_;function l4(){return f_||(f_=1,Kp.exports=s4()),Kp.exports}var b=l4(),Wp={exports:{}},Il={},Qp={exports:{}},Xp={};var h_;function c4(){return h_||(h_=1,(function(e){function t(P,F){var H=P.length;P.push(F);e:for(;0<H;){var re=H-1>>>1,ye=P[re];if(0<i(ye,F))P[re]=F,P[H]=ye,H=re;else break e}}function n(P){return P.length===0?null:P[0]}function o(P){if(P.length===0)return null;var F=P[0],H=P.pop();if(H!==F){P[0]=H;e:for(var re=0,ye=P.length,k=ye>>>1;re<k;){var Q=2*(re+1)-1,ee=P[Q],se=Q+1,me=P[se];if(0>i(ee,H))se<ye&&0>i(me,ee)?(P[re]=me,P[se]=H,re=se):(P[re]=ee,P[Q]=H,re=Q);else if(se<ye&&0>i(me,H))P[re]=me,P[se]=H,re=se;else break e}}return F}function i(P,F){var H=P.sortIndex-F.sortIndex;return H!==0?H:P.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,w=!1,S=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function O(P){for(var F=n(h);F!==null;){if(F.callback===null)o(h);else if(F.startTime<=P)o(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function M(P){if(S=!1,O(P),!w)if(n(f)!==null)w=!0,L||(L=!0,K());else{var F=n(h);F!==null&&ae(M,F.startTime-P)}}var L=!1,N=-1,D=5,z=-1;function W(){return T?!0:!(e.unstable_now()-z<D)}function G(){if(T=!1,L){var P=e.unstable_now();z=P;var F=!0;try{e:{w=!1,S&&(S=!1,A(N),N=-1),_=!0;var H=y;try{t:{for(O(P),p=n(f);p!==null&&!(p.expirationTime>P&&W());){var re=p.callback;if(typeof re=="function"){p.callback=null,y=p.priorityLevel;var ye=re(p.expirationTime<=P);if(P=e.unstable_now(),typeof ye=="function"){p.callback=ye,O(P),F=!0;break t}p===n(f)&&o(f),O(P)}else o(f);p=n(f)}if(p!==null)F=!0;else{var k=n(h);k!==null&&ae(M,k.startTime-P),F=!1}}break e}finally{p=null,y=H,_=!1}F=void 0}}finally{F?K():L=!1}}}var K;if(typeof C=="function")K=function(){C(G)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,ne=j.port2;j.port1.onmessage=G,K=function(){ne.postMessage(null)}}else K=function(){R(G,0)};function ae(P,F){N=R(function(){P(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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(P){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var H=y;y=F;try{return P()}finally{y=H}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(P,F){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var H=y;y=P;try{return F()}finally{y=H}},e.unstable_scheduleCallback=function(P,F,H){var re=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?re+H:re):H=re,P){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=H+ye,P={id:v++,callback:F,priorityLevel:P,startTime:H,expirationTime:ye,sortIndex:-1},H>re?(P.sortIndex=H,t(h,P),n(f)===null&&P===n(h)&&(S?(A(N),N=-1):S=!0,ae(M,H-re))):(P.sortIndex=ye,t(f,P),w||_||(w=!0,L||(L=!0,K()))),P},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(P){var F=y;return function(){var H=y;y=F;try{return P.apply(this,arguments)}finally{y=H}}}})(Xp)),Xp}var p_;function u4(){return p_||(p_=1,Qp.exports=c4()),Qp.exports}var Jp={exports:{}},Fe={};var m_;function d4(){if(m_)return Fe;m_=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 _(k){return k===null||typeof k!="object"?null:(k=y&&k[y]||k["@@iterator"],typeof k=="function"?k:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,T={};function R(k,Q,ee){this.props=k,this.context=Q,this.refs=T,this.updater=ee||w}R.prototype.isReactComponent={},R.prototype.setState=function(k,Q){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,Q,"setState")},R.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function A(){}A.prototype=R.prototype;function C(k,Q,ee){this.props=k,this.context=Q,this.refs=T,this.updater=ee||w}var O=C.prototype=new A;O.constructor=C,S(O,R.prototype),O.isPureReactComponent=!0;var M=Array.isArray;function L(){}var N={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function z(k,Q,ee){var se=ee.ref;return{$$typeof:e,type:k,key:Q,ref:se!==void 0?se:null,props:ee}}function W(k,Q){return z(k.type,Q,k.props)}function G(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function K(k){var Q={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ee){return Q[ee]})}var j=/\/+/g;function ne(k,Q){return typeof k=="object"&&k!==null&&k.key!=null?K(""+k.key):Q.toString(36)}function ae(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(L,L):(k.status="pending",k.then(function(Q){k.status==="pending"&&(k.status="fulfilled",k.value=Q)},function(Q){k.status==="pending"&&(k.status="rejected",k.reason=Q)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function P(k,Q,ee,se,me){var _e=typeof k;(_e==="undefined"||_e==="boolean")&&(k=null);var be=!1;if(k===null)be=!0;else switch(_e){case"bigint":case"string":case"number":be=!0;break;case"object":switch(k.$$typeof){case e:case t:be=!0;break;case v:return be=k._init,P(be(k._payload),Q,ee,se,me)}}if(be)return me=me(k),be=se===""?"."+ne(k,0):se,M(me)?(ee="",be!=null&&(ee=be.replace(j,"$&/")+"/"),P(me,Q,ee,"",function(Le){return Le})):me!=null&&(G(me)&&(me=W(me,ee+(me.key==null||k&&k.key===me.key?"":(""+me.key).replace(j,"$&/")+"/")+be)),Q.push(me)),1;be=0;var Se=se===""?".":se+":";if(M(k))for(var De=0;De<k.length;De++)se=k[De],_e=Se+ne(se,De),be+=P(se,Q,ee,_e,me);else if(De=_(k),typeof De=="function")for(k=De.call(k),De=0;!(se=k.next()).done;)se=se.value,_e=Se+ne(se,De++),be+=P(se,Q,ee,_e,me);else if(_e==="object"){if(typeof k.then=="function")return P(ae(k),Q,ee,se,me);throw Q=String(k),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return be}function F(k,Q,ee){if(k==null)return k;var se=[],me=0;return P(k,se,"","",function(_e){return Q.call(ee,_e,me++)}),se}function H(k){if(k._status===-1){var Q=k._result;Q=Q(),Q.then(function(ee){(k._status===0||k._status===-1)&&(k._status=1,k._result=ee)},function(ee){(k._status===0||k._status===-1)&&(k._status=2,k._result=ee)}),k._status===-1&&(k._status=0,k._result=Q)}if(k._status===1)return k._result.default;throw k._result}var re=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},ye={map:F,forEach:function(k,Q,ee){F(k,function(){Q.apply(this,arguments)},ee)},count:function(k){var Q=0;return F(k,function(){Q++}),Q},toArray:function(k){return F(k,function(Q){return Q})||[]},only:function(k){if(!G(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Fe.Activity=p,Fe.Children=ye,Fe.Component=R,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=N,Fe.__COMPILER_RUNTIME={__proto__:null,c:function(k){return N.H.useMemoCache(k)}},Fe.cache=function(k){return function(){return k.apply(null,arguments)}},Fe.cacheSignal=function(){return null},Fe.cloneElement=function(k,Q,ee){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var se=S({},k.props),me=k.key;if(Q!=null)for(_e in Q.key!==void 0&&(me=""+Q.key),Q)!D.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=ee;else if(1<_e){for(var be=Array(_e),Se=0;Se<_e;Se++)be[Se]=arguments[Se+2];se.children=be}return z(k.type,me,se)},Fe.createContext=function(k){return k={$$typeof:c,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:l,_context:k},k},Fe.createElement=function(k,Q,ee){var se,me={},_e=null;if(Q!=null)for(se in Q.key!==void 0&&(_e=""+Q.key),Q)D.call(Q,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(me[se]=Q[se]);var be=arguments.length-2;if(be===1)me.children=ee;else if(1<be){for(var Se=Array(be),De=0;De<be;De++)Se[De]=arguments[De+2];me.children=Se}if(k&&k.defaultProps)for(se in be=k.defaultProps,be)me[se]===void 0&&(me[se]=be[se]);return z(k,_e,me)},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(k){return{$$typeof:d,render:k}},Fe.isValidElement=G,Fe.lazy=function(k){return{$$typeof:v,_payload:{_status:-1,_result:k},_init:H}},Fe.memo=function(k,Q){return{$$typeof:h,type:k,compare:Q===void 0?null:Q}},Fe.startTransition=function(k){var Q=N.T,ee={};N.T=ee;try{var se=k(),me=N.S;me!==null&&me(ee,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(L,re)}catch(_e){re(_e)}finally{Q!==null&&ee.types!==null&&(Q.types=ee.types),N.T=Q}},Fe.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Fe.use=function(k){return N.H.use(k)},Fe.useActionState=function(k,Q,ee){return N.H.useActionState(k,Q,ee)},Fe.useCallback=function(k,Q){return N.H.useCallback(k,Q)},Fe.useContext=function(k){return N.H.useContext(k)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(k,Q){return N.H.useDeferredValue(k,Q)},Fe.useEffect=function(k,Q){return N.H.useEffect(k,Q)},Fe.useEffectEvent=function(k){return N.H.useEffectEvent(k)},Fe.useId=function(){return N.H.useId()},Fe.useImperativeHandle=function(k,Q,ee){return N.H.useImperativeHandle(k,Q,ee)},Fe.useInsertionEffect=function(k,Q){return N.H.useInsertionEffect(k,Q)},Fe.useLayoutEffect=function(k,Q){return N.H.useLayoutEffect(k,Q)},Fe.useMemo=function(k,Q){return N.H.useMemo(k,Q)},Fe.useOptimistic=function(k,Q){return N.H.useOptimistic(k,Q)},Fe.useReducer=function(k,Q,ee){return N.H.useReducer(k,Q,ee)},Fe.useRef=function(k){return N.H.useRef(k)},Fe.useState=function(k){return N.H.useState(k)},Fe.useSyncExternalStore=function(k,Q,ee){return N.H.useSyncExternalStore(k,Q,ee)},Fe.useTransition=function(){return N.H.useTransition()},Fe.version="19.2.3",Fe}var v_;function Pa(){return v_||(v_=1,Jp.exports=d4()),Jp.exports}var em={exports:{}},Dn={};var g_;function f4(){if(g_)return Dn;g_=1;var e=Pa();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 y_;function mw(){if(y_)return em.exports;y_=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=f4(),em.exports}var b_;function h4(){if(b_)return Il;b_=1;var e=u4(),t=Pa(),n=mw();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,I=m.child;I;){if(I===s){x=!0,s=m,u=g;break}if(I===u){x=!0,u=m,s=g;break}I=I.sibling}if(!x){for(I=g.child;I;){if(I===s){x=!0,s=g,u=m;break}if(I===u){x=!0,u=g,s=m;break}I=I.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"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),C=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function K(r){return r===null||typeof r!="object"?null:(r=G&&r[G]||r["@@iterator"],typeof r=="function"?r:null)}var j=Symbol.for("react.client.reference");function ne(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 S:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case M:return"Suspense";case L:return"SuspenseList";case z:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case C:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case O:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case N:return a=r.displayName||null,a!==null?a:ne(r.type)||"Memo";case D:a=r._payload,r=r._init;try{return ne(r(a))}catch{}}return null}var ae=Array.isArray,P=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,H={pending:!1,data:null,method:null,action:null},re=[],ye=-1;function k(r){return{current:r}}function Q(r){0>ye||(r.current=re[ye],re[ye]=null,ye--)}function ee(r,a){ye++,re[ye]=r.current,r.current=a}var se=k(null),me=k(null),_e=k(null),be=k(null);function Se(r,a){switch(ee(_e,a),ee(me,r),ee(se,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?Db(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=Db(a),r=Lb(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Q(se),ee(se,r)}function De(){Q(se),Q(me),Q(_e)}function Le(r){r.memoizedState!==null&&ee(be,r);var a=se.current,s=Lb(a,r.type);a!==s&&(ee(me,r),ee(se,s))}function Ee(r){me.current===r&&(Q(se),Q(me)),be.current===r&&(Q(be),Rl._currentValue=H)}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(oe){var te=oe}Reflect.construct(r,[],de)}else{try{de.call()}catch(oe){te=oe}r.call(de.prototype)}}else{try{throw Error()}catch(oe){te=oe}(de=r())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(oe){if(oe&&te&&typeof oe.stack=="string")return[oe.stack,te.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],I=g[1];if(x&&I){var B=x.split(`
|
|
@@ -7,7 +7,7 @@ function o4(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&
|
|
|
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
9
|
`+u.stack}}var Ue=Object.prototype.hasOwnProperty,Qe=e.unstable_scheduleCallback,U=e.unstable_cancelCallback,q=e.unstable_shouldYield,Z=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 I=u&134217727;return I!==0?(u=I&~g,u!==0?m=st(u):(x&=I,x!==0?m=st(x):s||(s=I&~r,s!==0&&(m=st(s))))):(I=u&~g,I!==0?m=st(I):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 I=r.entanglements,B=r.expirationTimes,J=r.hiddenUpdates;for(s=x&~s;0<s;){var le=31-Yt(s),de=1<<le;I[le]=0,B[le]=-1;var te=J[le];if(te!==null)for(J[le]=null,le=0;le<te.length;le++){var oe=te[le];oe!==null&&(oe.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:xi(s),(s&(r.suspendedLanes|a))!==0?0:s}function xi(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:r_(r.type))}function b0(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,Ri="__reactContainer$"+Zo,Bf="__reactEvents$"+Zo,ZT="__reactListeners$"+Zo,YT="__reactHandles$"+Zo,_0="__reactResources$"+Zo,Bs="__reactMarker$"+Zo;function Ff(r){delete r[En],delete r[Fn],delete r[Bf],delete r[ZT],delete r[YT]}function Oi(r){var a=r[En];if(a)return a;for(var s=r.parentNode;s;){if(a=s[Ri]||s[En]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(r=Fb(r);r!==null;){if(s=r[En])return s;r=Fb(r)}return a}r=s,s=r.parentNode}return null}function Ti(r){if(r=r[En]||r[Ri]){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 Ai(r){var a=r[_0];return a||(a=r[_0]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function fn(r){r[Bs]=!0}var E0=new Set,S0={};function Ba(r,a){Ci(r,a),Ci(r+"Capture",a)}function Ci(r,a){for(S0[r]=a,r=0;r<a.length;r++)E0.add(a[r])}var KT=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]*$"),w0={},x0={};function WT(r){return Ue.call(x0,r)?!0:Ue.call(w0,r)?!1:KT.test(r)?x0[r]=!0:(w0[r]=!0,!1)}function Ic(r,a,s){if(WT(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 R0(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function QT(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=R0(r)?"checked":"value";r._valueTracker=QT(r,a,""+r[a])}}function O0(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var s=a.getValue(),u="";return r&&(u=R0(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 XT=/[\n"\\]/g;function Er(r){return r.replace(XT,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Vf(r,a,s,u,m,g,x,I){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"),I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?r.name=""+_r(I):r.removeAttribute("name")}function T0(r,a,s,u,m,g,x,I){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,I||a===r.value||(r.value=a),r.defaultValue=a}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=I?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 Ii(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 A0(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 C0(r,a,s,u){if(a==null){if(u!=null){if(s!=null)throw Error(o(92));if(ae(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 Mi(r,a){if(a){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=a;return}}r.textContent=a}var JT=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 I0(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||JT.has(a)?a==="float"?r.cssFloat=s:r[a]=(""+s).trim():r[a]=s+"px"}function M0(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&&I0(r,m,u)}else for(var g in a)a.hasOwnProperty(g)&&I0(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 eA=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"]]),tA=/^[\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 tA.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 Ni=null,Di=null;function N0(r){var a=Ti(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&&O0(u)}break e;case"textarea":A0(r,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Ii(r,!!s.multiple,a,!1)}}}var Yf=!1;function D0(r,a,s){if(Yf)return r(a,s);Yf=!0;try{var u=r(a);return u}finally{if(Yf=!1,(Ni!==null||Di!==null)&&(_u(),Ni&&(a=Ni,r=Di,Di=Ni=null,N0(a),r)))for(a=0;a<r.length;a++)N0(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 L0(){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 P0(){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 I in r)r.hasOwnProperty(I)&&(s=r[I],this[I]=s?s(g):g[I]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?kc:P0,this.isPropagationStopped=P0,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 Fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jc=$n(Fa),Hs=p({},Fa,{view:0,detail:0}),nA=$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}}),k0=$n(zc),rA=p({},zc,{dataTransfer:0}),oA=$n(rA),aA=p({},Hs,{relatedTarget:0}),Jf=$n(aA),iA=p({},Fa,{animationName:0,elapsedTime:0,pseudoElement:0}),sA=$n(iA),lA=p({},Fa,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),cA=$n(lA),uA=p({},Fa,{data:0}),j0=$n(uA),dA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fA={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"},hA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pA(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=hA[r])?!!a[r]:!1}function eh(){return pA}var mA=p({},Hs,{key:function(r){if(r.key){var a=dA[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"?fA[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}}),vA=$n(mA),gA=p({},zc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),z0=$n(gA),yA=p({},Hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eh}),bA=$n(yA),_A=p({},Fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),EA=$n(_A),SA=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}),wA=$n(SA),xA=p({},Fa,{newState:0,oldState:0}),RA=$n(xA),OA=[9,13,27,32],th=wo&&"CompositionEvent"in window,qs=null;wo&&"documentMode"in document&&(qs=document.documentMode);var TA=wo&&"TextEvent"in window&&!qs,U0=wo&&(!th||qs&&8<qs&&11>=qs),B0=" ",F0=!1;function $0(r,a){switch(r){case"keyup":return OA.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Li=!1;function AA(r,a){switch(r){case"compositionend":return V0(a);case"keypress":return a.which!==32?null:(F0=!0,B0);case"textInput":return r=a.data,r===B0&&F0?null:r;default:return null}}function CA(r,a){if(Li)return r==="compositionend"||!th&&$0(r,a)?(r=L0(),Lc=Wf=Yo=null,Li=!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 U0&&a.locale!=="ko"?null:a.data;default:return null}}var IA={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 H0(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!IA[r.type]:a==="textarea"}function G0(r,a,s,u){Ni?Di?Di.push(u):Di=[u]:Ni=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 MA(r){Tb(r,0)}function Uc(r){var a=Fs(r);if(O0(a))return r}function q0(r,a){if(r==="change")return a}var Z0=!1;if(wo){var nh;if(wo){var rh="oninput"in document;if(!rh){var Y0=document.createElement("div");Y0.setAttribute("oninput","return;"),rh=typeof Y0.oninput=="function"}nh=rh}else nh=!1;Z0=nh&&(!document.documentMode||9<document.documentMode)}function K0(){Zs&&(Zs.detachEvent("onpropertychange",W0),Ys=Zs=null)}function W0(r){if(r.propertyName==="value"&&Uc(Ys)){var a=[];G0(a,Ys,r,Zf(r)),D0(MA,a)}}function NA(r,a,s){r==="focusin"?(K0(),Zs=a,Ys=s,Zs.attachEvent("onpropertychange",W0)):r==="focusout"&&K0()}function DA(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Uc(Ys)}function LA(r,a){if(r==="click")return Uc(a)}function PA(r,a){if(r==="input"||r==="change")return Uc(a)}function kA(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var tr=typeof Object.is=="function"?Object.is:kA;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 Q0(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function X0(r,a){var s=Q0(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=Q0(s)}}function J0(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?J0(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function ey(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 jA=wo&&"documentMode"in document&&11>=document.documentMode,Pi=null,ah=null,Ws=null,ih=!1;function ty(r,a,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ih||Pi==null||Pi!==Nc(u)||(u=Pi,"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=Pi)))}function $a(r,a){var s={};return s[r.toLowerCase()]=a.toLowerCase(),s["Webkit"+r]="webkit"+a,s["Moz"+r]="moz"+a,s}var ki={animationend:$a("Animation","AnimationEnd"),animationiteration:$a("Animation","AnimationIteration"),animationstart:$a("Animation","AnimationStart"),transitionrun:$a("Transition","TransitionRun"),transitionstart:$a("Transition","TransitionStart"),transitioncancel:$a("Transition","TransitionCancel"),transitionend:$a("Transition","TransitionEnd")},sh={},ny={};wo&&(ny=document.createElement("div").style,"AnimationEvent"in window||(delete ki.animationend.animation,delete ki.animationiteration.animation,delete ki.animationstart.animation),"TransitionEvent"in window||delete ki.transitionend.transition);function Va(r){if(sh[r])return sh[r];if(!ki[r])return r;var a=ki[r],s;for(s in a)if(a.hasOwnProperty(s)&&s in ny)return sh[r]=a[s];return r}var ry=Va("animationend"),oy=Va("animationiteration"),ay=Va("animationstart"),zA=Va("transitionrun"),UA=Va("transitionstart"),BA=Va("transitioncancel"),iy=Va("transitionend"),sy=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){sy.set(r,a),Ba(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=[],ji=0,ch=0;function Fc(){for(var r=ji,a=ch=ji=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&&ly(s,m,g)}}function $c(r,a,s,u){Sr[ji++]=r,Sr[ji++]=a,Sr[ji++]=s,Sr[ji++]=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 Ha(r,a){return $c(r,null,null,a),Vc(r)}function ly(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 zi={};function FA(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 FA(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 cy(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=qC(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 S:return Ga(s.children,m,g,a);case T:x=8,m|=24;break;case R:return r=nr(12,s,a,m|2),r.elementType=R,r.lanes=g,r;case M:return r=nr(13,s,a,m),r.elementType=M,r.lanes=g,r;case L:return r=nr(19,s,a,m),r.elementType=L,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 O:x=11;break e;case N:x=14;break e;case D: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 Ga(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 uy(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 dy=new WeakMap;function wr(r,a){if(typeof r=="object"&&r!==null){var s=dy.get(r);return s!==void 0?s:(a={value:r,source:a,stack:et(a)},dy.set(r,a),a)}return{value:r,source:a,stack:et(a)}}var Ui=[],Bi=0,Gc=null,Qs=0,xr=[],Rr=0,Ko=null,eo=1,to="";function Ro(r,a){Ui[Bi++]=Qs,Ui[Bi++]=Gc,Gc=r,Qs=a}function fy(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),fy(r,1,0))}function mh(r){for(;r===Gc;)Gc=Ui[--Bi],Ui[Bi]=null,Qs=Ui[--Bi],Ui[Bi]=null;for(;r===Ko;)Ko=xr[--Rr],xr[Rr]=null,to=xr[--Rr],xr[Rr]=null,eo=xr[--Rr],xr[Rr]=null}function hy(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 py(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),T0(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),C0(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||Mb(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 my(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 Fi(r){if(r!==Sn)return!1;if(!ot)return my(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),my(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));It=Bb(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));It=Bb(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 qa(){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=k(null),Za=null,Oo=null;function Xo(r,a,s){ee(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 I=g;g=m;for(var B=0;B<a.length;B++)if(I.context===a[B]){g.lanes|=s,I=g.alternate,I!==null&&(I.lanes|=s),bh(g.return,s,r),u||(x=null);break e}g=I.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 $i(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 I=m.type;tr(m.pendingProps.value,x.value)||(r!==null?r.push(I):r=[I])}}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 Ya(r){Za=r,Oo=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function wn(r){return vy(Za,r)}function Zc(r,a){return Za===null&&Ya(r),vy(r,a)}function vy(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 $A=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()})}},VA=e.unstable_scheduleCallback,HA=e.unstable_NormalPriority,Kt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eh(){return{controller:new $A,data:new Map,refCount:0}}function Js(r){r.refCount--,r.refCount===0&&VA(HA,function(){r.controller.abort()})}var el=null,Sh=0,Vi=0,Hi=null;function GA(r,a){if(el===null){var s=el=[];Sh=0,Vi=Rp(),Hi={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Sh++,a.then(gy,gy),a}function gy(){if(--Sh===0&&el!==null){Hi!==null&&(Hi.status="fulfilled");var r=el;el=null,Vi=0,Hi=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function qA(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 yy=P.S;P.S=function(r,a){tb=ue(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&GA(r,a),yy!==null&&yy(r,a)};var Ka=k(null);function wh(){var r=Ka.current;return r!==null?r:Rt.pooledCache}function Yc(r,a){a===null?ee(Ka,Ka.current):ee(Ka,a.pool)}function by(){var r=wh();return r===null?null:{parent:Kt._currentValue,pool:r}}var Gi=Error(o(460)),xh=Error(o(474)),Kc=Error(o(542)),Wc={then:function(){}};function _y(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Ey(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,wy(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,wy(r),r}throw Qa=a,Gi}}function Wa(r){try{var a=r._init;return a(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Qa=s,Gi):s}}var Qa=null;function Sy(){if(Qa===null)throw Error(o(459));var r=Qa;return Qa=null,r}function wy(r){if(r===Gi||r===Kc)throw Error(o(483))}var qi=null,tl=0;function Qc(r){var a=tl;return tl+=1,qi===null&&(qi=[]),Ey(qi,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 xy(r){function a(Y,V){if(r){var X=Y.deletions;X===null?(Y.deletions=[V],Y.flags|=16):X.push(V)}}function s(Y,V){if(!r)return null;for(;V!==null;)a(Y,V),V=V.sibling;return null}function u(Y){for(var V=new Map;Y!==null;)Y.key!==null?V.set(Y.key,Y):V.set(Y.index,Y),Y=Y.sibling;return V}function m(Y,V){return Y=xo(Y,V),Y.index=0,Y.sibling=null,Y}function g(Y,V,X){return Y.index=X,r?(X=Y.alternate,X!==null?(X=X.index,X<V?(Y.flags|=67108866,V):X):(Y.flags|=67108866,V)):(Y.flags|=1048576,V)}function x(Y){return r&&Y.alternate===null&&(Y.flags|=67108866),Y}function I(Y,V,X,ce){return V===null||V.tag!==6?(V=fh(X,Y.mode,ce),V.return=Y,V):(V=m(V,X),V.return=Y,V)}function B(Y,V,X,ce){var Pe=X.type;return Pe===S?le(Y,V,X.props.children,ce,X.key):V!==null&&(V.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&Wa(Pe)===V.type)?(V=m(V,X.props),nl(V,X),V.return=Y,V):(V=Hc(X.type,X.key,X.props,null,Y.mode,ce),nl(V,X),V.return=Y,V)}function J(Y,V,X,ce){return V===null||V.tag!==4||V.stateNode.containerInfo!==X.containerInfo||V.stateNode.implementation!==X.implementation?(V=hh(X,Y.mode,ce),V.return=Y,V):(V=m(V,X.children||[]),V.return=Y,V)}function le(Y,V,X,ce,Pe){return V===null||V.tag!==7?(V=Ga(X,Y.mode,ce,Pe),V.return=Y,V):(V=m(V,X),V.return=Y,V)}function de(Y,V,X){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=fh(""+V,Y.mode,X),V.return=Y,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case _:return X=Hc(V.type,V.key,V.props,null,Y.mode,X),nl(X,V),X.return=Y,X;case w:return V=hh(V,Y.mode,X),V.return=Y,V;case D:return V=Wa(V),de(Y,V,X)}if(ae(V)||K(V))return V=Ga(V,Y.mode,X,null),V.return=Y,V;if(typeof V.then=="function")return de(Y,Qc(V),X);if(V.$$typeof===C)return de(Y,Zc(Y,V),X);Xc(Y,V)}return null}function te(Y,V,X,ce){var Pe=V!==null?V.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Pe!==null?null:I(Y,V,""+X,ce);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case _:return X.key===Pe?B(Y,V,X,ce):null;case w:return X.key===Pe?J(Y,V,X,ce):null;case D:return X=Wa(X),te(Y,V,X,ce)}if(ae(X)||K(X))return Pe!==null?null:le(Y,V,X,ce,null);if(typeof X.then=="function")return te(Y,V,Qc(X),ce);if(X.$$typeof===C)return te(Y,V,Zc(Y,X),ce);Xc(Y,X)}return null}function oe(Y,V,X,ce,Pe){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Y=Y.get(X)||null,I(V,Y,""+ce,Pe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:return Y=Y.get(ce.key===null?X:ce.key)||null,B(V,Y,ce,Pe);case w:return Y=Y.get(ce.key===null?X:ce.key)||null,J(V,Y,ce,Pe);case D:return ce=Wa(ce),oe(Y,V,X,ce,Pe)}if(ae(ce)||K(ce))return Y=Y.get(X)||null,le(V,Y,ce,Pe,null);if(typeof ce.then=="function")return oe(Y,V,X,Qc(ce),Pe);if(ce.$$typeof===C)return oe(Y,V,X,Zc(V,ce),Pe);Xc(V,ce)}return null}function Te(Y,V,X,ce){for(var Pe=null,ct=null,Ne=V,He=V=0,rt=null;Ne!==null&&He<X.length;He++){Ne.index>He?(rt=Ne,Ne=null):rt=Ne.sibling;var ut=te(Y,Ne,X[He],ce);if(ut===null){Ne===null&&(Ne=rt);break}r&&Ne&&ut.alternate===null&&a(Y,Ne),V=g(ut,V,He),ct===null?Pe=ut:ct.sibling=ut,ct=ut,Ne=rt}if(He===X.length)return s(Y,Ne),ot&&Ro(Y,He),Pe;if(Ne===null){for(;He<X.length;He++)Ne=de(Y,X[He],ce),Ne!==null&&(V=g(Ne,V,He),ct===null?Pe=Ne:ct.sibling=Ne,ct=Ne);return ot&&Ro(Y,He),Pe}for(Ne=u(Ne);He<X.length;He++)rt=oe(Ne,Y,He,X[He],ce),rt!==null&&(r&&rt.alternate!==null&&Ne.delete(rt.key===null?He:rt.key),V=g(rt,V,He),ct===null?Pe=rt:ct.sibling=rt,ct=rt);return r&&Ne.forEach(function(va){return a(Y,va)}),ot&&Ro(Y,He),Pe}function je(Y,V,X,ce){if(X==null)throw Error(o(151));for(var Pe=null,ct=null,Ne=V,He=V=0,rt=null,ut=X.next();Ne!==null&&!ut.done;He++,ut=X.next()){Ne.index>He?(rt=Ne,Ne=null):rt=Ne.sibling;var va=te(Y,Ne,ut.value,ce);if(va===null){Ne===null&&(Ne=rt);break}r&&Ne&&va.alternate===null&&a(Y,Ne),V=g(va,V,He),ct===null?Pe=va:ct.sibling=va,ct=va,Ne=rt}if(ut.done)return s(Y,Ne),ot&&Ro(Y,He),Pe;if(Ne===null){for(;!ut.done;He++,ut=X.next())ut=de(Y,ut.value,ce),ut!==null&&(V=g(ut,V,He),ct===null?Pe=ut:ct.sibling=ut,ct=ut);return ot&&Ro(Y,He),Pe}for(Ne=u(Ne);!ut.done;He++,ut=X.next())ut=oe(Ne,Y,He,ut.value,ce),ut!==null&&(r&&ut.alternate!==null&&Ne.delete(ut.key===null?He:ut.key),V=g(ut,V,He),ct===null?Pe=ut:ct.sibling=ut,ct=ut);return r&&Ne.forEach(function(r4){return a(Y,r4)}),ot&&Ro(Y,He),Pe}function St(Y,V,X,ce){if(typeof X=="object"&&X!==null&&X.type===S&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case _:e:{for(var Pe=X.key;V!==null;){if(V.key===Pe){if(Pe=X.type,Pe===S){if(V.tag===7){s(Y,V.sibling),ce=m(V,X.props.children),ce.return=Y,Y=ce;break e}}else if(V.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&Wa(Pe)===V.type){s(Y,V.sibling),ce=m(V,X.props),nl(ce,X),ce.return=Y,Y=ce;break e}s(Y,V);break}else a(Y,V);V=V.sibling}X.type===S?(ce=Ga(X.props.children,Y.mode,ce,X.key),ce.return=Y,Y=ce):(ce=Hc(X.type,X.key,X.props,null,Y.mode,ce),nl(ce,X),ce.return=Y,Y=ce)}return x(Y);case w:e:{for(Pe=X.key;V!==null;){if(V.key===Pe)if(V.tag===4&&V.stateNode.containerInfo===X.containerInfo&&V.stateNode.implementation===X.implementation){s(Y,V.sibling),ce=m(V,X.children||[]),ce.return=Y,Y=ce;break e}else{s(Y,V);break}else a(Y,V);V=V.sibling}ce=hh(X,Y.mode,ce),ce.return=Y,Y=ce}return x(Y);case D:return X=Wa(X),St(Y,V,X,ce)}if(ae(X))return Te(Y,V,X,ce);if(K(X)){if(Pe=K(X),typeof Pe!="function")throw Error(o(150));return X=Pe.call(X),je(Y,V,X,ce)}if(typeof X.then=="function")return St(Y,V,Qc(X),ce);if(X.$$typeof===C)return St(Y,V,Zc(Y,X),ce);Xc(Y,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,V!==null&&V.tag===6?(s(Y,V.sibling),ce=m(V,X),ce.return=Y,Y=ce):(s(Y,V),ce=fh(X,Y.mode,ce),ce.return=Y,Y=ce),x(Y)):s(Y,V)}return function(Y,V,X,ce){try{tl=0;var Pe=St(Y,V,X,ce);return qi=null,Pe}catch(Ne){if(Ne===Gi||Ne===Kc)throw Ne;var ct=nr(29,Ne,null,Y.mode);return ct.lanes=ce,ct.return=Y,ct}}}var Xa=xy(!0),Ry=xy(!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),ly(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=Hi;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,I=m.shared.pending;if(I!==null){m.shared.pending=null;var B=I,J=B.next;B.next=null,x===null?g=J:x.next=J,x=B;var le=r.alternate;le!==null&&(le=le.updateQueue,I=le.lastBaseUpdate,I!==x&&(I===null?le.firstBaseUpdate=J:I.next=J,le.lastBaseUpdate=B))}if(g!==null){var de=m.baseState;x=0,le=J=B=null,I=g;do{var te=I.lane&-536870913,oe=te!==I.lane;if(oe?(nt&te)===te:(u&te)===te){te!==0&&te===Vi&&(Ah=!0),le!==null&&(le=le.next={lane:0,tag:I.tag,payload:I.payload,callback:null,next:null});e:{var Te=r,je=I;te=a;var St=s;switch(je.tag){case 1:if(Te=je.payload,typeof Te=="function"){de=Te.call(St,de,te);break e}de=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=je.payload,te=typeof Te=="function"?Te.call(St,de,te):Te,te==null)break e;de=p({},de,te);break e;case 2:Jo=!0}}te=I.callback,te!==null&&(r.flags|=64,oe&&(r.flags|=8192),oe=m.callbacks,oe===null?m.callbacks=[te]:oe.push(te))}else oe={lane:te,tag:I.tag,payload:I.payload,callback:I.callback,next:null},le===null?(J=le=oe,B=de):le=le.next=oe,x|=te;if(I=I.next,I===null){if(I=m.shared.pending,I===null)break;oe=I,I=oe.next,oe.next=null,m.lastBaseUpdate=oe,m.shared.pending=null}}while(!0);le===null&&(B=de),m.baseState=B,m.firstBaseUpdate=J,m.lastBaseUpdate=le,g===null&&(m.shared.lanes=0),ia|=x,r.lanes=x,r.memoizedState=de}}function Oy(r,a){if(typeof r!="function")throw Error(o(191,r));r.call(a)}function Ty(r,a){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Oy(s[r],a)}var Zi=k(null),Jc=k(0);function Ay(r,a){r=ko,ee(Jc,r),ee(Zi,a),ko=r|a.baseLanes}function Ch(){ee(Jc,ko),ee(Zi,Zi.current)}function Ih(){ko=Jc.current,Q(Zi),Q(Jc)}var rr=k(null),Tr=null;function na(r){var a=r.alternate;ee($t,$t.current&1),ee(rr,r),Tr===null&&(a===null||Zi.current!==null||a.memoizedState!==null)&&(Tr=r)}function Mh(r){ee($t,$t.current),ee(rr,r),Tr===null&&(Tr=r)}function Cy(r){r.tag===22?(ee($t,$t.current),ee(rr,r),Tr===null&&(Tr=r)):ra()}function ra(){ee($t,$t.current),ee(rr,rr.current)}function or(r){Q(rr),Tr===r&&(Tr=null),Q($t)}var $t=k(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,Yi=!1,Ja=!1,nu=0,il=0,Ki=null,ZA=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,P.H=r===null||r.memoizedState===null?f1:Yh,Ja=!1,g=s(u,m),Ja=!1,Yi&&(g=My(a,s,u,m)),Iy(r),g}function Iy(r){P.H=cl;var a=_t!==null&&_t.next!==null;if(Ao=0,Wt=_t=$e=null,tu=!1,il=0,Ki=null,a)throw Error(o(300));r===null||Qt||(r=r.dependencies,r!==null&&qc(r)&&(Qt=!0))}function My(r,a,s,u){$e=r;var m=0;do{if(Yi&&(Ki=null),il=0,Yi=!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)}P.H=h1,g=a(s,u)}while(Yi);return g}function YA(){var r=P.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,Yi=!1,il=nu=0,Ki=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,Ki===null&&(Ki=[]),r=Ey(Ki,r,a),a=$e,(Wt===null?a.memoizedState:Wt.next)===null&&(a=a.alternate,P.H=a===null||a.memoizedState===null?f1: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 I=x=null,B=null,J=a,le=!1;do{var de=J.lane&-536870913;if(de!==J.lane?(nt&de)===de:(Ao&de)===de){var te=J.revertLane;if(te===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),de===Vi&&(le=!0);else if((Ao&te)===te){J=J.next,te===Vi&&(le=!0);continue}else de={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},B===null?(I=B=de,x=g):B=B.next=de,$e.lanes|=te,ia|=te;de=J.action,Ja&&s(g,de),g=J.hasEagerState?J.eagerState:s(g,de)}else te={lane:de,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},B===null?(I=B=te,x=g):B=B.next=te,$e.lanes|=de,ia|=de;J=J.next}while(J!==null&&J!==a);if(B===null?x=g:B.next=I,!tr(g,r.memoizedState)&&(Qt=!0,le&&(s=Hi,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 Ny(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(Py.bind(null,u,m,r),[r]),m.getSnapshot!==a||x||Wt!==null&&Wt.memoizedState.tag&1){if(u.flags|=2048,Wi(9,{destroy:void 0},Ly.bind(null,u,m,s,a),null),Rt===null)throw Error(o(349));g||(Ao&127)!==0||Dy(u,a,s)}return s}function Dy(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 Ly(r,a,s,u){a.value=s,a.getSnapshot=u,ky(a)&&jy(r)}function Py(r,a,s){return s(function(){ky(a)&&jy(r)})}function ky(r){var a=r.getSnapshot;r=r.value;try{var s=a();return!tr(r,s)}catch{return!0}}function jy(r){var a=Ha(r,2);a!==null&&Zn(a,r,2)}function Bh(r){var a=kn();if(typeof r=="function"){var s=r;if(r=s(),Ja){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 zy(r,a,s,u){return r.baseState=s,zh(r,_t,typeof u=="function"?u:Co)}function KA(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)}};P.T!==null?s(!0):g.isTransition=!1,u(g),s=a.pending,s===null?(g.next=a.pending=g,Uy(a,g)):(g.next=s.next,a.pending=s.next=g)}}function Uy(r,a){var s=a.action,u=a.payload,m=r.state;if(a.isTransition){var g=P.T,x={};P.T=x;try{var I=s(m,u),B=P.S;B!==null&&B(x,I),By(r,a,I)}catch(J){Fh(r,a,J)}finally{g!==null&&x.types!==null&&(g.types=x.types),P.T=g}}else try{g=s(m,u),By(r,a,g)}catch(J){Fh(r,a,J)}}function By(r,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){Fy(r,a,u)},function(u){return Fh(r,a,u)}):Fy(r,a,s)}function Fy(r,a,s){a.status="fulfilled",a.value=s,$y(a),r.state=s,a=r.pending,a!==null&&(s=a.next,s===a?r.pending=null:(s=s.next,a.next=s,Uy(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,$y(a),a=a.next;while(a!==u)}r.action=null}function $y(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function Vy(r,a){return a}function Hy(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:Vy,lastRenderedState:a},s.queue=u,s=c1.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=KA.bind(null,$e,m,g,s),m.dispatch=s,u.memoizedState=r,[a,s,!1]}function Gy(r){var a=Vt();return qy(a,_t,r)}function qy(r,a,s){if(a=zh(r,a,Vy)[0],r=au(Co)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=sl(a)}catch(x){throw x===Gi?Kc:x}else u=a;a=Vt();var m=a.queue,g=m.dispatch;return s!==a.memoizedState&&($e.flags|=2048,Wi(9,{destroy:void 0},WA.bind(null,m,s),null)),[u,g,r]}function WA(r,a){r.action=a}function Zy(r){var a=Vt(),s=_t;if(s!==null)return qy(a,s,r);Vt(),a=a.memoizedState,s=Vt();var u=s.queue.dispatch;return s.memoizedState=r,[a,u,!1]}function Wi(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 Yy(){return Vt().memoizedState}function iu(r,a,s,u){var m=kn();$e.flags|=r,m.memoizedState=Wi(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=Wi(a,g,s,u):($e.flags|=r,m.memoizedState=Wi(1|a,g,s,u))}function Ky(r,a){iu(8390656,8,r,a)}function $h(r,a){su(2048,8,r,a)}function QA(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 Wy(r){var a=Vt().memoizedState;return QA({ref:a,nextImpl:r}),function(){if((dt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}function Qy(r,a){return su(4,2,r,a)}function Xy(r,a){return su(4,4,r,a)}function Jy(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 e1(r,a,s){s=s!=null?s.concat([r]):null,su(4,4,Jy.bind(null,a,r),s)}function Vh(){}function t1(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 n1(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(),Ja){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=rb(),$e.lanes|=r,ia|=r,s)}function r1(r,a,s,u){return tr(s,a)?s:Zi.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=rb(),$e.lanes|=r,ia|=r,a)}function o1(r,a,s,u,m){var g=F.p;F.p=g!==0&&8>g?g:8;var x=P.T,I={};P.T=I,Zh(r,!1,a,s);try{var B=m(),J=P.S;if(J!==null&&J(I,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var le=qA(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&&I.types!==null&&(x.types=I.types),P.T=x}}function XA(){}function Gh(r,a,s,u){if(r.tag!==5)throw Error(o(476));var m=a1(r).queue;o1(r,m,a,H,s===null?XA:function(){return i1(r),s(u)})}function a1(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:H},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 i1(r){var a=a1(r);a.next===null&&(a=r.alternate.memoizedState),ll(r,a.next.queue,{},sr())}function qh(){return wn(Rl)}function s1(){return Vt().memoizedState}function l1(){return Vt().memoizedState}function JA(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 eC(r,a,s){var u=sr();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},lu(r)?u1(a,s):(s=uh(r,a,s,u),s!==null&&(Zn(s,r,u),d1(s,a,u)))}function c1(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))u1(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,I=g(x,s);if(m.hasEagerState=!0,m.eagerState=I,tr(I,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),d1(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 u1(r,a){Yi=tu=!0;var s=r.pending;s===null?a.next=a:(a.next=s.next,s.next=a),r.pending=a}function d1(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 f1={readContext:wn,use:ou,useCallback:function(r,a){return kn().memoizedState=[r,a===void 0?null:a],r},useContext:wn,useEffect:Ky,useImperativeHandle:function(r,a,s){s=s!=null?s.concat([r]):null,iu(4194308,4,Jy.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(Ja){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(Ja){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=eC.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=c1.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=o1.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||Dy(u,a,s)}m.memoizedState=s;var g={value:s,getSnapshot:a};return m.queue=g,Ky(Py.bind(null,u,g,r),[r]),u.flags|=2048,Wi(9,{destroy:void 0},Ly.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=ZA++,a="_"+a+"r_"+s.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:qh,useFormState:Hy,useActionState:Hy,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=JA.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:t1,useContext:wn,useEffect:$h,useImperativeHandle:e1,useInsertionEffect:Qy,useLayoutEffect:Xy,useMemo:n1,useReducer:au,useRef:Yy,useState:function(){return au(Co)},useDebugValue:Vh,useDeferredValue:function(r,a){var s=Vt();return r1(s,_t.memoizedState,r,a)},useTransition:function(){var r=au(Co)[0],a=Vt().memoizedState;return[typeof r=="boolean"?r:sl(r),a]},useSyncExternalStore:Ny,useId:s1,useHostTransitionStatus:qh,useFormState:Gy,useActionState:Gy,useOptimistic:function(r,a){var s=Vt();return zy(s,_t,r,a)},useMemoCache:jh,useCacheRefresh:l1};Yh.useEffectEvent=Wy;var h1={readContext:wn,use:ou,useCallback:t1,useContext:wn,useEffect:$h,useImperativeHandle:e1,useInsertionEffect:Qy,useLayoutEffect:Xy,useMemo:n1,useReducer:Uh,useRef:Yy,useState:function(){return Uh(Co)},useDebugValue:Vh,useDeferredValue:function(r,a){var s=Vt();return _t===null?Hh(s,r,a):r1(s,_t.memoizedState,r,a)},useTransition:function(){var r=Uh(Co)[0],a=Vt().memoizedState;return[typeof r=="boolean"?r:sl(r),a]},useSyncExternalStore:Ny,useId:s1,useHostTransitionStatus:qh,useFormState:Zy,useActionState:Zy,useOptimistic:function(r,a){var s=Vt();return _t!==null?zy(s,_t,r,a):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:jh,useCacheRefresh:l1};h1.useEffectEvent=Wy;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 p1(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 m1(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 ei(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 v1(r){Bc(r)}function g1(r){console.error(r)}function y1(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 b1(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 _1(r){return r=ea(r),r.tag=3,r}function E1(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(){b1(a,s,u)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(r.callback=function(){b1(a,s,u),typeof m!="function"&&(sa===null?sa=new Set([this]):sa.add(this));var I=u.stack;this.componentDidCatch(u.value,{componentStack:I!==null?I:""})})}function tC(r,a,s,u,m){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=s.alternate,a!==null&&$i(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=_1(m),E1(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?Ry(a,null,s,u):Xa(a,r.child,s,u)}function S1(r,a,s,u,m){s=s.render;var g=a.ref;if("ref"in u){var x={};for(var I in u)I!=="ref"&&(x[I]=u[I])}else x=u;return Ya(a),u=Dh(r,a,s,x,g,m),I=Lh(),r!==null&&!Qt?(Ph(r,a,m),Io(r,a,m)):(ot&&I&&ph(a),a.flags|=1,xn(r,a,u,m),a.child)}function w1(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,x1(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 x1(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 R1(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 O1(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?Ay(a,g):Ch(),Cy(a);else return u=a.lanes=536870912,O1(r,a,g!==null?g.baseLanes|s:s,s,u)}else g!==null?(Yc(a,g.cachePool),Ay(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 O1(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(),Cy(a),r!==null&&$i(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 T1(r,a,s){return Xa(a,r.child,null,s),r=uu(a,a.pendingProps),r.flags|=2,or(a),a.memoizedState=null,r}function nC(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=Ub(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=uy(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=T1(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||$i(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,Ha(r,x),Zn(u,r,x),Xh;Eu(),a=T1(r,a,s)}else r=g.treeContext,It=Ar(x.nextSibling),Sn=a,ot=!0,Wo=null,Or=!1,r!==null&&hy(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 Ya(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 A1(r,a,s,u,m,g){return Ya(a),a.updateQueue=null,s=My(a,u,s,m),Iy(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 C1(r,a,s,u,m){if(Ya(a),a.stateNode===null){var g=zi,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):zi,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 I=a.memoizedProps,B=ei(s,I);g.props=B;var J=g.context,le=s.contextType;x=zi,typeof le=="object"&&le!==null&&(x=wn(le));var de=s.getDerivedStateFromProps;le=typeof de=="function"||typeof g.getSnapshotBeforeUpdate=="function",I=a.pendingProps!==I,le||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(I||J!==x)&&m1(a,g,u,x),Jo=!1;var te=a.memoizedState;g.state=te,al(a,u,g,m),ol(),J=a.memoizedState,I||te!==J||Jo?(typeof de=="function"&&(Kh(a,s,de,u),J=a.memoizedState),(B=Jo||p1(a,s,B,u,te,J,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=J),g.props=u,g.state=J,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=ei(s,x),g.props=le,de=a.pendingProps,te=g.context,J=s.contextType,B=zi,typeof J=="object"&&J!==null&&(B=wn(J)),I=s.getDerivedStateFromProps,(J=typeof I=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(x!==de||te!==B)&&m1(a,g,u,B),Jo=!1,te=a.memoizedState,g.state=te,al(a,u,g,m),ol();var oe=a.memoizedState;x!==de||te!==oe||Jo||r!==null&&r.dependencies!==null&&qc(r.dependencies)?(typeof I=="function"&&(Kh(a,s,I,u),oe=a.memoizedState),(le=Jo||p1(a,s,le,u,te,oe,B)||r!==null&&r.dependencies!==null&&qc(r.dependencies))?(J||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(u,oe,B),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(u,oe,B)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=oe),g.props=u,g.state=oe,g.context=B,u=le):(typeof g.componentDidUpdate!="function"||x===r.memoizedProps&&te===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&te===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=Xa(a,r.child,null,m),a.child=Xa(a,null,s,m)):xn(r,a,s,m),a.memoizedState=g.state,r=a.child):r=Io(r,a,m),r}function I1(r,a,s,u){return qa(),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:by()}}function np(r,a,s){return r=r!==null?r.childLanes&~s:0,a&&(r|=ir),r}function M1(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=Ub(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=uy(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 I=u.children;return u=u.fallback,m?(ra(),m=a.mode,I=fu({mode:"hidden",children:I},m),u=Ga(u,m,s,null),I.return=a,u.return=a,I.sibling=u,a.child=I,u=a.child,u.memoizedState=tp(s),u.childLanes=np(r,x,s),a.memoizedState=ep,ul(null,u)):(na(a),rp(a,I))}var B=r.memoizedState;if(B!==null&&(I=B.dehydrated,I!==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(),I=u.fallback,m=a.mode,u=fu({mode:"visible",children:u.children},m),I=Ga(I,m,s,null),I.flags|=2,u.return=a,I.return=a,u.sibling=I,a.child=u,Xa(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(I)){if(x=I.nextSibling&&I.nextSibling.dataset,x)var J=x.dgst;x=J,u=Error(o(419)),u.stack="",u.digest=x,Xs({value:u,source:null,stack:null}),a=op(r,a,s)}else if(Qt||$i(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,Ha(r,u),Zn(x,r,u),Xh;jp(I)||Eu(),a=op(r,a,s)}else jp(I)?(a.flags|=192,a.child=r.child,a=null):(r=B.treeContext,It=Ar(I.nextSibling),Sn=a,ot=!0,Wo=null,Or=!1,r!==null&&hy(a,r),a=rp(a,u.children),a.flags|=4096);return a}return m?(ra(),I=u.fallback,m=a.mode,B=r.child,J=B.sibling,u=xo(B,{mode:"hidden",children:u.children}),u.subtreeFlags=B.subtreeFlags&65011712,J!==null?I=xo(J,I):(I=Ga(I,m,s,null),I.flags|=2),I.return=a,u.return=a,u.sibling=I,a.child=u,ul(null,u),u=a.child,I=r.child.memoizedState,I===null?I=tp(s):(m=I.cachePool,m!==null?(B=Kt._currentValue,m=m.parent!==B?{parent:B,pool:B}:m):m=by(),I={baseLanes:I.baseLanes|s,cachePool:m}),u.memoizedState=I,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 Xa(a,r.child,null,s),r=rp(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function N1(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 D1(r,a,s){var u=a.pendingProps,m=u.revealOrder,g=u.tail;u=u.children;var x=$t.current,I=(x&2)!==0;if(I?(x=x&1|2,a.flags|=128):x&=1,ee($t,x),xn(r,a,u,s),u=ot?Qs:0,!I&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&N1(r,s,a);else if(r.tag===19)N1(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($i(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 rC(r,a,s){switch(a.tag){case 3:Se(a,a.stateNode.containerInfo),Xo(a,Kt,r.memoizedState.cache),qa();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?M1(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||($i(r,a,s,!1),u=(s&a.childLanes)!==0),m){if(u)return D1(r,a,s);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),ee($t,$t.current),u)break;return null;case 22:return a.lanes=0,R1(r,a,s,a.pendingProps);case 24:Xo(a,Kt,r.memoizedState.cache)}return Io(r,a,s)}function L1(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,rC(r,a,s);Qt=(r.flags&131072)!==0}else Qt=!1,ot&&(a.flags&1048576)!==0&&fy(a,Qs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(r=Wa(a.elementType),a.type=r,typeof r=="function")dh(r)?(u=ei(r,u),a.tag=1,a=C1(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===O){a.tag=11,a=S1(null,a,r,u,s);break e}else if(m===N){a.tag=14,a=w1(null,a,r,u,s);break e}}throw a=ne(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=ei(u,a.pendingProps),C1(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=I1(r,a,u,s);break e}else if(u!==m){m=wr(Error(o(424)),a),Xs(m),a=I1(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=Ry(a,null,u,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(qa(),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=Gb(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=Gb(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return Le(a),r===null&&ot&&(u=a.stateNode=$b(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=DC(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,YA,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=LC(s,a.pendingProps,Or),s!==null?(a.stateNode=s,Sn=a,It=null,r=!0):r=!1),r||Qo(a)),null;case 13:return M1(r,a,s);case 4:return Se(a,a.stateNode.containerInfo),u=a.pendingProps,r===null?a.child=Xa(a,null,u,s):xn(r,a,u,s),a.child;case 11:return S1(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,Ya(a),m=wn(m),u=u(m),a.flags|=1,xn(r,a,u,s),a.child;case 14:return w1(r,a,a.type,a.pendingProps,s);case 15:return x1(r,a,a.type,a.pendingProps,s);case 19:return D1(r,a,s);case 31:return nC(r,a,s);case 22:return R1(r,a,s,a.pendingProps);case 24:return Ya(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(sb())r.flags|=8192;else throw Qa=Wc,xh}else r.flags&=-16777217}function P1(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Wb(a))if(sb())r.flags|=8192;else throw Qa=Wc,xh}function hu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?bt():536870912,r.lanes|=a,es|=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 oC(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)&&(Fi(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),P1(a,g)):(Mt(a),sp(a,m,null,u,s))):g?g!==r.memoizedState?(Mo(a),Mt(a),P1(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,Fi(a)?py(a):(r=$b(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,Fi(a))py(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,Fi(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||Mb(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=Fi(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 qa(),(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=Fi(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 qa(),(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;)cy(s,r),s=s.sibling;return ee($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,ee($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(Ka),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 aC(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));qa()}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));qa()}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(Ka),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 k1(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(Ka);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(I){vt(a,a.return,I)}}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,I=x.destroy;if(I!==void 0){x.destroy=void 0,m=a;var B=s,J=I;try{J()}catch(le){vt(m,B,le)}}}u=u.next}while(u!==g)}}catch(le){vt(a,a.return,le)}}function j1(r){var a=r.updateQueue;if(a!==null){var s=r.stateNode;try{Ty(a,s)}catch(u){vt(r,r.return,u)}}}function z1(r,a,s){s.props=ei(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 U1(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;TC(u,r.type,s,a),u[Fn]=a}catch(m){vt(r,r.return,m)}}function B1(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||B1(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 F1(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,$1=typeof WeakSet=="function"?WeakSet:Set,hn=null;function iC(r,a){if(r=r.containerInfo,Np=Pu,r=ey(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,I=-1,B=-1,J=0,le=0,de=r,te=null;t:for(;;){for(var oe;de!==s||m!==0&&de.nodeType!==3||(I=x+m),de!==g||u!==0&&de.nodeType!==3||(B=x+u),de.nodeType===3&&(x+=de.nodeValue.length),(oe=de.firstChild)!==null;)te=de,de=oe;for(;;){if(de===r)break t;if(te===s&&++J===m&&(I=x),te===g&&++le===u&&(B=x),(oe=de.nextSibling)!==null)break;de=te,te=de.parentNode}de=oe}s=I===-1||B===-1?null:{start:I,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=ei(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 V1(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=ei(s.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(m,a,r.__reactInternalSnapshotBeforeUpdate)}catch(x){vt(s,s.return,x)}}u&64&&j1(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{Ty(r,a)}catch(x){vt(s,s.return,x)}}break;case 27:a===null&&u&4&&F1(s);case 26:case 5:Lo(r,s),a===null&&u&4&&U1(s),u&512&&hl(s,s.return);break;case 12:Lo(r,s);break;case 31:Lo(r,s),u&4&&q1(r,s);break;case 13:Lo(r,s),u&4&&Z1(r,s),u&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=mC.bind(null,s),PC(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 H1(r){var a=r.alternate;a!==null&&(r.alternate=null,H1(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;)G1(r,a,s),s=s.sibling}function G1(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,jb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),ls(r)):jb(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"&&z1(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 q1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{ls(r)}catch(s){vt(a,a.return,s)}}}function Z1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{ls(r)}catch(s){vt(a,a.return,s)}}function sC(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new $1),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new $1),a;default:throw Error(o(435,r.tag))}}function mu(r,a){var s=sC(r);a.forEach(function(u){if(!s.has(u)){s.add(u);var m=vC.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,I=x;e:for(;I!==null;){switch(I.tag){case 27:if(da(I.type)){Dt=I.stateNode,Vn=!1;break e}break;case 5:Dt=I.stateNode,Vn=!1;break e;case 3:case 4:Dt=I.stateNode.containerInfo,Vn=!0;break e}I=I.return}if(Dt===null)throw Error(o(160));G1(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;)Y1(a,r),a=a.sibling}var Br=null;function Y1(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=Yb("link","href",m).get(u+(s.href||""));if(x){for(var I=0;I<x.length;I++)if(g=x[I],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(I,1);break t}}g=m.createElement(u),Rn(g,u,s),m.head.appendChild(g);break;case"meta":if(x=Yb("meta","content",m).get(u+(s.content||""))){for(I=0;I<x.length;I++)if(g=x[I],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(I,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 Kb(m,r.type,r.stateNode);else r.stateNode=Zb(m,u,r.memoizedProps);else g!==u?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,u===null?Kb(m,r.type,r.stateNode):Zb(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{Mi(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{ls(a.containerInfo)}catch(Te){vt(r,r.return,Te)}dp&&(dp=!1,K1(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,J=No,le=Xt;if(No=J||m,Xt=le||B,Hn(a,r),Xt=le,No=J,Gn(r),u&8192)e:for(a=r.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,m&&(s===null||B||No||Xt||ti(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{I=B.stateNode;var de=B.memoizedProps.style,te=de!=null&&de.hasOwnProperty("display")?de.display:null;I.style.display=te==null||typeof te=="boolean"?"":(""+te).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 oe=B.stateNode;m?zb(oe,!0):zb(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(B1(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&&(Mi(x,""),s.flags&=-33);var I=cp(r);pu(r,I,x);break;case 3:case 4:var B=s.stateNode.containerInfo,J=cp(r);up(r,J,B);break;default:throw Error(o(161))}}catch(le){vt(r,r.return,le)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function K1(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;K1(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;)V1(r,a.alternate,a),a=a.sibling}function ti(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),ti(a);break;case 1:no(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&z1(a,a.return,s),ti(a);break;case 27:Sl(a.stateNode);case 26:case 5:no(a,a.return),ti(a);break;case 22:a.memoizedState===null&&ti(a);break;case 30:ti(a);break;default:ti(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(J){vt(u,u.return,J)}if(u=g,m=u.updateQueue,m!==null){var I=u.stateNode;try{var B=m.shared.hiddenCallbacks;if(B!==null)for(m.shared.hiddenCallbacks=null,m=0;m<B.length;m++)Oy(B[m],I)}catch(J){vt(u,u.return,J)}}s&&x&64&&j1(g),hl(g,g.return);break;case 27:F1(g);case 26:case 5:Po(m,g,s),s&&u===null&&x&4&&U1(g),hl(g,g.return);break;case 12:Po(m,g,s);break;case 31:Po(m,g,s),s&&x&4&&q1(m,g);break;case 13:Po(m,g,s),s&&x&4&&Z1(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;)W1(r,a,s,u),a=a.sibling}function W1(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,I=g.onPostCommit;typeof I=="function"&&I(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,Qi(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 Qi(r,a,s,u,m){for(m=m&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=r,x=a,I=s,B=u,J=x.flags;switch(x.tag){case 0:case 11:case 15:Qi(g,x,I,B,m),fl(8,x);break;case 23:break;case 22:var le=x.stateNode;x.memoizedState!==null?le._visibility&2?Qi(g,x,I,B,m):pl(g,x):(le._visibility|=2,Qi(g,x,I,B,m)),m&&J&2048&&fp(x.alternate,x);break;case 24:Qi(g,x,I,B,m),m&&J&2048&&hp(x.alternate,x);break;default:Qi(g,x,I,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 Xi(r,a,s){if(r.subtreeFlags&ml)for(r=r.child;r!==null;)Q1(r,a,s),r=r.sibling}function Q1(r,a,s){switch(r.tag){case 26:Xi(r,a,s),r.flags&ml&&r.memoizedState!==null&&ZC(s,Br,r.memoizedState,r.memoizedProps);break;case 5:Xi(r,a,s);break;case 3:case 4:var u=Br;Br=Cu(r.stateNode.containerInfo),Xi(r,a,s),Br=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=ml,ml=16777216,Xi(r,a,s),ml=u):Xi(r,a,s));break;default:Xi(r,a,s)}}function X1(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,eb(u,r)}X1(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)J1(r),r=r.sibling}function J1(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,eb(u,r)}X1(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 eb(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(H1(u),u===s){hn=null;break e}if(m!==null){m.return=g,hn=m;break e}hn=g}}}var lC={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}},cC=typeof WeakMap=="function"?WeakMap:Map,dt=0,Rt=null,Xe=null,nt=0,mt=0,ar=null,aa=!1,Ji=!1,pp=!1,ko=0,Ft=0,ia=0,ni=0,mp=0,ir=0,es=0,gl=null,qn=null,vp=!1,gu=0,tb=0,yu=1/0,bu=null,sa=null,sn=0,la=null,ts=null,jo=0,gp=0,yp=null,nb=null,yl=0,bp=null;function sr(){return(dt&2)!==0&&nt!==0?nt&-nt:P.T!==null?Rp():Uf()}function rb(){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)&&(ns(r,0),ca(r,nt,ir,!1)),lt(r,s),((dt&2)===0||r!==Rt)&&(r===Rt&&((dt&2)===0&&(ni|=s),Ft===4&&ca(r,nt,ir,!1)),ro(r))}function ob(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?fC(r,a):Ep(r,a,!0),g=u;do{if(m===0){Ji&&!u&&ca(r,a,0,!1);break}else{if(s=r.current.alternate,g&&!uC(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 I=r;m=gl;var B=I.current.memoizedState.isDehydrated;if(B&&(ns(I,x).flags|=256),x=Ep(I,x,!1),x!==2){if(pp&&!B){I.errorRecoveryDisabledLanes|=g,ni|=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){ns(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=Pb(ab.bind(null,u,s,qn,bu,vp,a,ir,ni,es,aa,g,"Throttled",-0,0),m);break e}ab(u,s,qn,bu,vp,a,ir,ni,es,aa,g,null,-0,0)}}break}while(!0);ro(r)}function ab(r,a,s,u,m,g,x,I,B,J,le,de,te,oe){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},Q1(a,g,de);var Te=(g&62914560)===g?gu-ue():(g&4194048)===g?tb-ue():0;if(Te=YC(de,Te),Te!==null){jo=g,r.cancelPendingCommit=Te(hb.bind(null,r,a,g,s,u,m,x,I,B,le,de,null,te,oe)),ca(r,g,x,!J);return}}hb(r,a,g,s,u,m,x,I,B)}function uC(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&=~ni,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=Za=null,kh(r),qi=null,tl=0,r=Xe;for(;r!==null;)k1(r.alternate,r),r=r.return;Xe=null}}function ns(r,a){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,IC(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,Ji=Ke(r,a),pp=!1,es=ir=mp=ni=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 ib(r,a){$e=null,P.H=cl,a===Gi||a===Kc?(a=Sy(),mt=3):a===xh?(a=Sy(),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 sb(){var r=rr.current;return r===null?!0:(nt&4194048)===nt?Tr===null:(nt&62914560)===nt||(nt&536870912)!==0?r===Tr:!1}function lb(){var r=P.H;return P.H=cl,r===null?cl:r}function cb(){var r=P.A;return P.A=lC,r}function Eu(){Ft=4,aa||(nt&4194048)!==nt&&rr.current!==null||(Ji=!0),(ia&134217727)===0&&(ni&134217727)===0||Rt===null||ca(Rt,nt,ir,!1)}function Ep(r,a,s){var u=dt;dt|=2;var m=lb(),g=cb();(Rt!==r||nt!==a)&&(bu=null,ns(r,a)),a=!1;var x=Ft;e:do try{if(mt!==0&&Xe!==null){var I=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 J=mt;if(mt=0,ar=null,rs(r,I,B,J),s&&Ji){x=0;break e}break;default:J=mt,mt=0,ar=null,rs(r,I,B,J)}}dC(),x=Ft;break}catch(le){ib(r,le)}while(!0);return a&&r.shellSuspendCounter++,Oo=Za=null,dt=u,P.H=m,P.A=g,Xe===null&&(Rt=null,nt=0,Fc()),x}function dC(){for(;Xe!==null;)ub(Xe)}function fC(r,a){var s=dt;dt|=2;var u=lb(),m=cb();Rt!==r||nt!==a?(bu=null,yu=ue()+500,ns(r,a)):Ji=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,rs(r,a,g,1);break;case 2:case 9:if(_y(g)){mt=0,ar=null,db(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:_y(g)?(mt=0,ar=null,db(a)):(mt=0,ar=null,rs(r,a,g,7));break;case 5:var x=null;switch(Xe.tag){case 26:x=Xe.memoizedState;case 5:case 27:var I=Xe;if(x?Wb(x):I.stateNode.complete){mt=0,ar=null;var B=I.sibling;if(B!==null)Xe=B;else{var J=I.return;J!==null?(Xe=J,Su(J)):Xe=null}break t}}mt=0,ar=null,rs(r,a,g,5);break;case 6:mt=0,ar=null,rs(r,a,g,6);break;case 8:_p(),Ft=6;break e;default:throw Error(o(462))}}hC();break}catch(le){ib(r,le)}while(!0);return Oo=Za=null,P.H=u,P.A=m,dt=s,Xe!==null?0:(Rt=null,nt=0,Fc(),Ft)}function hC(){for(;Xe!==null&&!q();)ub(Xe)}function ub(r){var a=L1(r.alternate,r,ko);r.memoizedProps=r.pendingProps,a===null?Su(r):Xe=a}function db(r){var a=r,s=a.alternate;switch(a.tag){case 15:case 0:a=A1(s,a,a.pendingProps,a.type,void 0,nt);break;case 11:a=A1(s,a,a.pendingProps,a.type.render,a.ref,nt);break;case 5:kh(a);default:k1(s,a),a=Xe=cy(a,ko),a=L1(s,a,ko)}r.memoizedProps=r.pendingProps,a===null?Su(r):Xe=a}function rs(r,a,s,u){Oo=Za=null,kh(a),qi=null,tl=0;var m=a.return;try{if(tC(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:Ji||(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))),fb(a,r)):Su(a)}function Su(r){var a=r;do{if((a.flags&32768)!==0){fb(a,aa);return}r=a.return;var s=oC(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 fb(r,a){do{var s=aC(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 hb(r,a,s,u,m,g,x,I,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,I,B),r===Rt&&(Xe=Rt=null,nt=0),ts=a,la=r,jo=s,gp=g,yp=m,nb=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,gC(Be,function(){return yb(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=P.T,P.T=null,m=F.p,F.p=2,x=dt,dt|=4;try{iC(r,a,s)}finally{dt=x,F.p=m,P.T=u}}sn=1,pb(),mb(),vb()}}function pb(){if(sn===1){sn=0;var r=la,a=ts,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var u=F.p;F.p=2;var m=dt;dt|=4;try{Y1(a,r);var g=Dp,x=ey(r.containerInfo),I=g.focusedElem,B=g.selectionRange;if(x!==I&&I&&I.ownerDocument&&J0(I.ownerDocument.documentElement,I)){if(B!==null&&oh(I)){var J=B.start,le=B.end;if(le===void 0&&(le=J),"selectionStart"in I)I.selectionStart=J,I.selectionEnd=Math.min(le,I.value.length);else{var de=I.ownerDocument||document,te=de&&de.defaultView||window;if(te.getSelection){var oe=te.getSelection(),Te=I.textContent.length,je=Math.min(B.start,Te),St=B.end===void 0?je:Math.min(B.end,Te);!oe.extend&&je>St&&(x=St,St=je,je=x);var Y=X0(I,je),V=X0(I,St);if(Y&&V&&(oe.rangeCount!==1||oe.anchorNode!==Y.node||oe.anchorOffset!==Y.offset||oe.focusNode!==V.node||oe.focusOffset!==V.offset)){var X=de.createRange();X.setStart(Y.node,Y.offset),oe.removeAllRanges(),je>St?(oe.addRange(X),oe.extend(V.node,V.offset)):(X.setEnd(V.node,V.offset),oe.addRange(X))}}}}for(de=[],oe=I;oe=oe.parentNode;)oe.nodeType===1&&de.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof I.focus=="function"&&I.focus(),I=0;I<de.length;I++){var ce=de[I];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Pu=!!Np,Dp=Np=null}finally{dt=m,F.p=u,P.T=s}}r.current=a,sn=2}}function mb(){if(sn===2){sn=0;var r=la,a=ts,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var u=F.p;F.p=2;var m=dt;dt|=4;try{V1(r,a.alternate,a)}finally{dt=m,F.p=u,P.T=s}}sn=3}}function vb(){if(sn===4||sn===3){sn=0,Z();var r=la,a=ts,s=jo,u=nb;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?sn=5:(sn=0,ts=la=null,gb(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=P.T,m=F.p,F.p=2,P.T=null;try{for(var g=r.onRecoverableError,x=0;x<u.length;x++){var I=u[x];g(I.value,{componentStack:I.stack})}}finally{P.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 gb(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,Js(a)))}function wu(){return pb(),mb(),vb(),yb()}function yb(){if(sn!==5)return!1;var r=la,a=gp;gp=0;var s=zr(jo),u=P.T,m=F.p;try{F.p=32>s?32:s,P.T=null,s=yp,yp=null;var g=la,x=jo;if(sn=0,ts=la=null,jo=0,(dt&6)!==0)throw Error(o(331));var I=dt;if(dt|=4,J1(g.current),W1(g,g.current,x,s),dt=I,bl(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Zt,g)}catch{}return!0}finally{F.p=m,P.T=u,gb(r,a)}}function bb(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)bb(r,r,s);else for(;a!==null;){if(a.tag===3){bb(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=_1(2),u=ta(a,s,2),u!==null&&(E1(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 cC;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=pC.bind(null,r,a,s),a.then(r,r))}function pC(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&&ns(r,0):mp|=s,es===nt&&(es=0)),ro(r)}function _b(r,a){a===0&&(a=bt()),r=Ha(r,a),r!==null&&(lt(r,a),ro(r))}function mC(r){var a=r.memoizedState,s=0;a!==null&&(s=a.retryLane),_b(r,s)}function vC(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),_b(r,s)}function gC(r,a){return Qe(r,a)}var xu=null,os=null,wp=!1,Ru=!1,xp=!1,ua=0;function ro(r){r!==os&&r.next===null&&(os===null?xu=os=r:os=os.next=r),Ru=!0,wp||(wp=!0,bC())}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,I=u.pingedLanes;g=(1<<31-Yt(42|r)+1)-1,g&=m&~(x&~I),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,xb(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,xb(u,g));u=u.next}while(s);xp=!1}}function yC(){Eb()}function Eb(){Ru=wp=!1;var r=0;ua!==0&&CC()&&(r=ua);for(var a=ue(),s=null,u=xu;u!==null;){var m=u.next,g=Sb(u,a);g===0?(u.next=null,s===null?xu=m:s.next=m,m===null&&(os=s)):(s=u,(r!==0||(g&3)!==0)&&(Ru=!0)),u=m}sn!==0&&sn!==5||bl(r),ua!==0&&(ua=0)}function Sb(r,a){for(var s=r.suspendedLanes,u=r.pingedLanes,m=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var x=31-Yt(g),I=1<<x,B=m[x];B===-1?((I&s)===0||(I&u)!==0)&&(m[x]=xt(I,a)):B<=a&&(r.expiredLanes|=I),g&=~I}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=wb.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 wb(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:(ob(r,u,a),Sb(r,ue()),r.callbackNode!=null&&r.callbackNode===s?wb.bind(null,r):null)}function xb(r,a){if(wu())return null;ob(r,a,!0)}function bC(){MC(function(){(dt&6)!==0?Qe(he,yC):Eb()})}function Rp(){if(ua===0){var r=Vi;r===0&&(r=tt,tt<<=1,(tt&261888)===0&&(tt=256)),ua=r}return ua}function Rb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Dc(""+r)}function Ob(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 _C(r,a,s,u,m){if(a==="submit"&&s&&s.stateNode===m){var g=Rb((m[Fn]||null).action),x=u.submitter;x&&(a=(a=x[Fn]||null)?Rb(a.formAction):x.getAttribute("formAction"),a!==null&&(g=a,x=null));var I=new jc("action","action",null,u,m);r.push({event:I,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ua!==0){var B=x?Ob(m,x):new FormData(m);Gh(s,{pending:!0,data:B,method:m.method,action:g},null,B)}}else typeof g=="function"&&(I.preventDefault(),B=x?Ob(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],EC=Tp.toLowerCase(),SC=Tp[0].toUpperCase()+Tp.slice(1);Ur(EC,"on"+SC)}Ur(ry,"onAnimationEnd"),Ur(oy,"onAnimationIteration"),Ur(ay,"onAnimationStart"),Ur("dblclick","onDoubleClick"),Ur("focusin","onFocus"),Ur("focusout","onBlur"),Ur(zA,"onTransitionRun"),Ur(UA,"onTransitionStart"),Ur(BA,"onTransitionCancel"),Ur(iy,"onTransitionEnd"),Ci("onMouseEnter",["mouseout","mouseover"]),Ci("onMouseLeave",["mouseout","mouseover"]),Ci("onPointerEnter",["pointerout","pointerover"]),Ci("onPointerLeave",["pointerout","pointerover"]),Ba("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ba("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ba("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ba("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ba("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ba("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(" "),wC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_l));function Tb(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 I=u[x],B=I.instance,J=I.currentTarget;if(I=I.listener,B!==g&&m.isPropagationStopped())break e;g=I,m.currentTarget=J;try{g(m)}catch(le){Bc(le)}m.currentTarget=null,g=B}else for(x=0;x<u.length;x++){if(I=u[x],B=I.instance,J=I.currentTarget,I=I.listener,B!==g&&m.isPropagationStopped())break e;g=I,m.currentTarget=J;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)||(Ab(a,r,2,!1),s.add(u))}function Ap(r,a,s){var u=0;a&&(u|=4),Ab(s,r,u,a)}var Ou="_reactListening"+Math.random().toString(36).slice(2);function Cp(r){if(!r[Ou]){r[Ou]=!0,E0.forEach(function(s){s!=="selectionchange"&&(wC.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 Ab(r,a,s,u){switch(r_(a)){case 2:var m=QC;break;case 8:m=XC;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 I=u.stateNode.containerInfo;if(I===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(;I!==null;){if(x=Oi(I),x===null)return;if(B=x.tag,B===5||B===6||B===26||B===27){u=g=x;continue e}I=I.parentNode}}u=u.return}D0(function(){var J=g,le=Zf(s),de=[];e:{var te=sy.get(r);if(te!==void 0){var oe=jc,Te=r;switch(r){case"keypress":if(Pc(s)===0)break e;case"keydown":case"keyup":oe=vA;break;case"focusin":Te="focus",oe=Jf;break;case"focusout":Te="blur",oe=Jf;break;case"beforeblur":case"afterblur":oe=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":oe=k0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=oA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=bA;break;case ry:case oy:case ay:oe=sA;break;case iy:oe=EA;break;case"scroll":case"scrollend":oe=nA;break;case"wheel":oe=wA;break;case"copy":case"cut":case"paste":oe=cA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=z0;break;case"toggle":case"beforetoggle":oe=RA}var je=(a&4)!==0,St=!je&&(r==="scroll"||r==="scrollend"),Y=je?te!==null?te+"Capture":null:te;je=[];for(var V=J,X;V!==null;){var ce=V;if(X=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||X===null||Y===null||(ce=$s(V,Y),ce!=null&&je.push(El(V,ce,X))),St)break;V=V.return}0<je.length&&(te=new oe(te,Te,null,s,le),de.push({event:te,listeners:je}))}}if((a&7)===0){e:{if(te=r==="mouseover"||r==="pointerover",oe=r==="mouseout"||r==="pointerout",te&&s!==qf&&(Te=s.relatedTarget||s.fromElement)&&(Oi(Te)||Te[Ri]))break e;if((oe||te)&&(te=le.window===le?le:(te=le.ownerDocument)?te.defaultView||te.parentWindow:window,oe?(Te=s.relatedTarget||s.toElement,oe=J,Te=Te?Oi(Te):null,Te!==null&&(St=l(Te),je=Te.tag,Te!==St||je!==5&&je!==27&&je!==6)&&(Te=null)):(oe=null,Te=J),oe!==Te)){if(je=k0,ce="onMouseLeave",Y="onMouseEnter",V="mouse",(r==="pointerout"||r==="pointerover")&&(je=z0,ce="onPointerLeave",Y="onPointerEnter",V="pointer"),St=oe==null?te:Fs(oe),X=Te==null?te:Fs(Te),te=new je(ce,V+"leave",oe,s,le),te.target=St,te.relatedTarget=X,ce=null,Oi(le)===J&&(je=new je(Y,V+"enter",Te,s,le),je.target=X,je.relatedTarget=St,ce=je),St=ce,oe&&Te)t:{for(je=xC,Y=oe,V=Te,X=0,ce=Y;ce;ce=je(ce))X++;ce=0;for(var Pe=V;Pe;Pe=je(Pe))ce++;for(;0<X-ce;)Y=je(Y),X--;for(;0<ce-X;)V=je(V),ce--;for(;X--;){if(Y===V||V!==null&&Y===V.alternate){je=Y;break t}Y=je(Y),V=je(V)}je=null}else je=null;oe!==null&&Cb(de,te,oe,je,!1),Te!==null&&St!==null&&Cb(de,St,Te,je,!0)}}e:{if(te=J?Fs(J):window,oe=te.nodeName&&te.nodeName.toLowerCase(),oe==="select"||oe==="input"&&te.type==="file")var ct=q0;else if(H0(te))if(Z0)ct=PA;else{ct=DA;var Ne=NA}else oe=te.nodeName,!oe||oe.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?J&&Gf(J.elementType)&&(ct=q0):ct=LA;if(ct&&(ct=ct(r,J))){G0(de,ct,s,le);break e}Ne&&Ne(r,te,J),r==="focusout"&&J&&te.type==="number"&&J.memoizedProps.value!=null&&Hf(te,"number",te.value)}switch(Ne=J?Fs(J):window,r){case"focusin":(H0(Ne)||Ne.contentEditable==="true")&&(Pi=Ne,ah=J,Ws=null);break;case"focusout":Ws=ah=Pi=null;break;case"mousedown":ih=!0;break;case"contextmenu":case"mouseup":case"dragend":ih=!1,ty(de,s,le);break;case"selectionchange":if(jA)break;case"keydown":case"keyup":ty(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 Li?$0(r,s)&&(rt="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(rt="onCompositionStart");rt&&(U0&&s.locale!=="ko"&&(Li||rt!=="onCompositionStart"?rt==="onCompositionEnd"&&Li&&(He=L0()):(Yo=le,Wf="value"in Yo?Yo.value:Yo.textContent,Li=!0)),Ne=Tu(J,rt),0<Ne.length&&(rt=new j0(rt,r,null,s,le),de.push({event:rt,listeners:Ne}),He?rt.data=He:(He=V0(s),He!==null&&(rt.data=He)))),(He=TA?AA(r,s):CA(r,s))&&(rt=Tu(J,"onBeforeInput"),0<rt.length&&(Ne=new j0("onBeforeInput","beforeinput",null,s,le),de.push({event:Ne,listeners:rt}),Ne.data=He)),_C(de,r,J,s,le)}Tb(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 xC(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Cb(r,a,s,u,m){for(var g=a._reactName,x=[];s!==null&&s!==u;){var I=s,B=I.alternate,J=I.stateNode;if(I=I.tag,B!==null&&B===u)break;I!==5&&I!==26&&I!==27||J===null||(B=J,m?(J=$s(s,g),J!=null&&x.unshift(El(s,J,B))):m||(J=$s(s,g),J!=null&&x.push(El(s,J,B)))),s=s.return}x.length!==0&&r.push({event:a,listeners:x})}var RC=/\r\n?/g,OC=/\u0000|\uFFFD/g;function Ib(r){return(typeof r=="string"?r:""+r).replace(RC,`
|
|
10
|
-
`).replace(OC,"")}function Mb(r,a){return a=Ib(a),Ib(r)===a}function Et(r,a,s,u,m,g){switch(s){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Mi(r,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Mi(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":M0(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=eA.get(s)||s,Ic(r,s,u))}}function Mp(r,a,s,u,m,g){switch(s){case"style":M0(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"?Mi(r,u):(typeof u=="number"||typeof u=="bigint")&&Mi(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(!S0.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 I=g=x=m=null,B=null,J=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":J=le;break;case"value":g=le;break;case"defaultValue":I=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,a));break;default:Et(r,a,u,le,s,null)}}T0(r,g,I,B,J,x,m,!1);return;case"select":Je("invalid",r),u=x=g=null;for(m in s)if(s.hasOwnProperty(m)&&(I=s[m],I!=null))switch(m){case"value":g=I;break;case"defaultValue":x=I;break;case"multiple":u=I;default:Et(r,a,m,I,s,null)}a=g,s=x,r.multiple=!!u,a!=null?Ii(r,!!u,a,!1):s!=null&&Ii(r,!!u,s,!0);return;case"textarea":Je("invalid",r),g=m=u=null;for(x in s)if(s.hasOwnProperty(x)&&(I=s[x],I!=null))switch(x){case"value":u=I;break;case"defaultValue":m=I;break;case"children":g=I;break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(91));break;default:Et(r,a,x,I,s,null)}C0(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(J in s)if(s.hasOwnProperty(J)&&(u=s[J],u!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Et(r,a,J,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(I in s)s.hasOwnProperty(I)&&(u=s[I],u!=null&&Et(r,a,I,u,s,null))}function TC(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,I=null,B=null,J=null,le=null;for(oe in s){var de=s[oe];if(s.hasOwnProperty(oe)&&de!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":B=de;default:u.hasOwnProperty(oe)||Et(r,a,oe,null,u,de)}}for(var te in u){var oe=u[te];if(de=s[te],u.hasOwnProperty(te)&&(oe!=null||de!=null))switch(te){case"type":g=oe;break;case"name":m=oe;break;case"checked":J=oe;break;case"defaultChecked":le=oe;break;case"value":x=oe;break;case"defaultValue":I=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,a));break;default:oe!==de&&Et(r,a,te,oe,u,de)}}Vf(r,x,I,B,J,le,g,m);return;case"select":oe=x=I=te=null;for(g in s)if(B=s[g],s.hasOwnProperty(g)&&B!=null)switch(g){case"value":break;case"multiple":oe=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":te=g;break;case"defaultValue":I=g;break;case"multiple":x=g;default:g!==B&&Et(r,a,m,g,u,B)}a=I,s=x,u=oe,te!=null?Ii(r,!!s,te,!1):!!u!=!!s&&(a!=null?Ii(r,!!s,a,!0):Ii(r,!!s,s?[]:"",!1));return;case"textarea":oe=te=null;for(I in s)if(m=s[I],s.hasOwnProperty(I)&&m!=null&&!u.hasOwnProperty(I))switch(I){case"value":break;case"children":break;default:Et(r,a,I,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":te=m;break;case"defaultValue":oe=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)}A0(r,te,oe);return;case"option":for(var Te in s)te=s[Te],s.hasOwnProperty(Te)&&te!=null&&!u.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:Et(r,a,Te,null,u,te));for(B in u)te=u[B],oe=s[B],u.hasOwnProperty(B)&&te!==oe&&(te!=null||oe!=null)&&(B==="selected"?r.selected=te&&typeof te!="function"&&typeof te!="symbol":Et(r,a,B,te,u,oe));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)te=s[je],s.hasOwnProperty(je)&&te!=null&&!u.hasOwnProperty(je)&&Et(r,a,je,null,u,te);for(J in u)if(te=u[J],oe=s[J],u.hasOwnProperty(J)&&te!==oe&&(te!=null||oe!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(o(137,a));break;default:Et(r,a,J,te,u,oe)}return;default:if(Gf(a)){for(var St in s)te=s[St],s.hasOwnProperty(St)&&te!==void 0&&!u.hasOwnProperty(St)&&Mp(r,a,St,void 0,u,te);for(le in u)te=u[le],oe=s[le],!u.hasOwnProperty(le)||te===oe||te===void 0&&oe===void 0||Mp(r,a,le,te,u,oe);return}}for(var Y in s)te=s[Y],s.hasOwnProperty(Y)&&te!=null&&!u.hasOwnProperty(Y)&&Et(r,a,Y,null,u,te);for(de in u)te=u[de],oe=s[de],!u.hasOwnProperty(de)||te===oe||te==null&&oe==null||Et(r,a,de,te,u,oe)}function Nb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AC(){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,I=m.duration;if(g&&I&&Nb(x)){for(x=0,I=m.responseEnd,u+=1;u<s.length;u++){var B=s[u],J=B.startTime;if(J>I)break;var le=B.transferSize,de=B.initiatorType;le&&Nb(de)&&(B=B.responseEnd,x+=le*(B<I?1:(I-J)/(B-J)))}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 Db(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 Lb(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 CC(){var r=window.event;return r&&r.type==="popstate"?r===Pp?!1:(Pp=r,!0):(Pp=null,!1)}var Pb=typeof setTimeout=="function"?setTimeout:void 0,IC=typeof clearTimeout=="function"?clearTimeout:void 0,kb=typeof Promise=="function"?Promise:void 0,MC=typeof queueMicrotask=="function"?queueMicrotask:typeof kb<"u"?function(r){return kb.resolve(null).then(r).catch(NC)}:Pb;function NC(r){setTimeout(function(){throw r})}function da(r){return r==="head"}function jb(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),ls(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,I=g.nodeName;g[Bs]||I==="SCRIPT"||I==="STYLE"||I==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=x}}else s==="body"&&Sl(r.ownerDocument.body);s=m}while(s);ls(a)}function zb(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 DC(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 LC(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 Ub(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 PC(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 Bb(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 Fb(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 $b(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,Vb=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:kC,r:jC,D:zC,C:UC,L:BC,m:FC,X:VC,S:$C,M:HC};function kC(){var r=zo.f(),a=_u();return r||a}function jC(r){var a=Ti(r);a!==null&&a.tag===5&&a.type==="form"?i1(a):zo.r(r)}var as=typeof document>"u"?null:document;function Hb(r,a,s){var u=as;if(u&&typeof a=="string"&&a){var m=Er(a);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Vb.has(m)||(Vb.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 zC(r){zo.D(r),Hb("dns-prefetch",r,null)}function UC(r,a){zo.C(r,a),Hb("preconnect",r,a)}function BC(r,a,s){zo.L(r,a,s);var u=as;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=is(r);break;case"script":g=ss(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 FC(r,a){zo.m(r,a);var s=as;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=ss(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 $C(r,a,s){zo.S(r,a,s);var u=as;if(u&&r){var m=Ai(u).hoistableStyles,g=is(r);a=a||"default";var x=m.get(g);if(!x){var I={loading:0,preload:null};if(x=u.querySelector(wl(g)))I.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(J,le){B.onload=J,B.onerror=le}),B.addEventListener("load",function(){I.loading|=1}),B.addEventListener("error",function(){I.loading|=2}),I.loading|=4,Iu(x,a,u)}x={type:"stylesheet",instance:x,count:1,state:I},m.set(g,x)}}}function VC(r,a){zo.X(r,a);var s=as;if(s&&r){var u=Ai(s).hoistableScripts,m=ss(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 HC(r,a){zo.M(r,a);var s=as;if(s&&r){var u=Ai(s).hoistableScripts,m=ss(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 Gb(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=is(s.href),s=Ai(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=is(s.href);var g=Ai(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||GC(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=ss(s),s=Ai(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 is(r){return'href="'+Er(r)+'"'}function wl(r){return'link[rel="stylesheet"]['+r+"]"}function qb(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function GC(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 ss(r){return'[src="'+Er(r)+'"]'}function xl(r){return"script[async]"+r}function Zb(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=is(s.href);var g=r.querySelector(wl(m));if(g)return a.state.loading|=4,a.instance=g,fn(g),g;u=qb(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(I,B){x.onload=I,x.onerror=B}),Rn(g,"link",u),a.state.loading|=4,Iu(g,s.precedence,r),a.instance=g;case"script":return g=ss(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 I=u[x];if(I.dataset.precedence===a)g=I;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 Yb(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 I=u.get(x);I?I.push(g):u.set(x,[g])}}return u}function Kb(r,a,s){r=r.ownerDocument||r,r.head.insertBefore(s,a==="title"?r.querySelector("head > title"):null)}function qC(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 Wb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function ZC(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=is(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=qb(u),(m=Cr.get(m))&&Bp(u,m),g=g.createElement("link"),fn(g);var x=g;x._p=new Promise(function(I,B){x.onload=I,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 YC(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*AC());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(KC,r),Du=null,Nu.call(r))}function KC(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:H,_currentValue2:H,_threadCount:0};function WC(r,a,s,u,m,g,x,I,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 Qb(r,a,s,u,m,g,x,I,B,J,le,de){return r=new WC(r,a,s,x,B,J,le,de,I),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 Xb(r){return r?(r=zi,r):zi}function Jb(r,a,s,u,m,g){m=Xb(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 e_(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){e_(r,a),(r=r.alternate)&&e_(r,a)}function t_(r){if(r.tag===13||r.tag===31){var a=Ha(r,67108864);a!==null&&Zn(a,r,67108864),Vp(r,67108864)}}function n_(r){if(r.tag===13||r.tag===31){var a=sr();a=xi(a);var s=Ha(r,a);s!==null&&Zn(s,r,a),Vp(r,a)}}var Pu=!0;function QC(r,a,s,u){var m=P.T;P.T=null;var g=F.p;try{F.p=2,Hp(r,a,s,u)}finally{F.p=g,P.T=m}}function XC(r,a,s,u){var m=P.T;P.T=null;var g=F.p;try{F.p=8,Hp(r,a,s,u)}finally{F.p=g,P.T=m}}function Hp(r,a,s,u){if(Pu){var m=Gp(u);if(m===null)Ip(r,a,u,ku,s),o_(r,u);else if(e4(m,r,a,s,u))u.stopPropagation();else if(o_(r,u),a&4&&-1<JC.indexOf(r)){for(;m!==null;){var g=Ti(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 I=g;for(I.pendingLanes|=2,I.entangledLanes|=2;x;){var B=1<<31-Yt(x);I.entanglements[1]|=B,x&=~B}ro(g),(dt&6)===0&&(yu=ue()+500,bl(0))}}break;case 31:case 13:I=Ha(g,2),I!==null&&Zn(I,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=Oi(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 r_(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=[],JC="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 o_(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=Ti(a),a!==null&&t_(a)),r):(r.eventSystemFlags|=u,a=r.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),r)}function e4(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 a_(r){var a=Oi(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,b0(r.priority,function(){n_(s)});return}}else if(a===31){if(a=d(s),a!==null){r.blockedOn=a,b0(r.priority,function(){n_(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=Ti(s),a!==null&&t_(a),r.blockedOn=s,!1;a.shift()}return!0}function i_(r,a,s){ju(r)&&s.delete(a)}function t4(){Zp=!1,fa!==null&&ju(fa)&&(fa=null),ha!==null&&ju(ha)&&(ha=null),pa!==null&&ju(pa)&&(pa=null),Ol.forEach(i_),Tl.forEach(i_)}function zu(r,a){r.blockedOn===a&&(r.blockedOn=null,Zp||(Zp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,t4)))}var Uu=null;function s_(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=Ti(s);g!==null&&(r.splice(a,3),a-=3,Gh(g,{pending:!0,data:m,method:s.method,action:u},u,m))}}))}function ls(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);)a_(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||s_(s);else if(x){var I=null;if(g&&g.hasAttribute("formAction")){if(m=g,x=g[Fn]||null)I=x.formAction;else if(qp(m)!==null)continue}else I=x.action;typeof I=="function"?s[u+1]=I:(s.splice(u,3),u-=3),s_(s)}}}function l_(){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();Jb(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;Jb(r.current,2,null,r,null,null),_u(),a[Ri]=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&&a_(r)}};var c_=t.version;if(c_!=="19.2.3")throw Error(o(527,c_,"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 n4={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:P,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(n4),At=Fu}catch{}}return Il.createRoot=function(r,a){if(!i(r))throw Error(o(299));var s=!1,u="",m=v1,g=g1,x=y1;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=Qb(r,1,!1,null,null,s,u,null,m,g,x,l_),r[Ri]=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=v1,x=g1,I=y1,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&&(I=s.onRecoverableError),s.formState!==void 0&&(B=s.formState)),a=Qb(r,1,!0,a,s??null,u,m,B,g,x,I,l_),a.context=Xb(null),s=a.current,u=sr(),u=xi(u),m=ea(u),m.callback=null,ta(s,m,u),s=u,a.current.lanes=s,lt(a,s),ro(a),r[Ri]=a.current,Cp(r),new Bu(a)},Il.version="19.2.3",Il}var __;function p4(){if(__)return Wp.exports;__=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=h4(),Wp.exports}var m4=p4(),E=Pa();const $=bi(E),Jv=o4({__proto__:null,default:$},[E]);var tm={exports:{}},nm={};var E_;function v4(){if(E_)return nm;E_=1;var e=Pa().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return nm.c=function(t){return e.H.useMemoCache(t)},nm}var S_;function g4(){return S_||(S_=1,tm.exports=v4()),tm.exports}var cf=g4(),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(){}},y4={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},b4=class{#e=y4;#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 b4;function _4(e){setTimeout(e,0)}var hi=typeof window>"u"||"Deno"in globalThis;function Qn(){}function E4(e,t){return typeof e=="function"?e(t):e}function ov(e){return typeof e=="number"&&e>=0&&e!==1/0}function vw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Oa(e,t){return typeof e=="function"?e(t):e}function Dr(e,t){return typeof e=="function"?e(t):e}function w_(e,t){const{type:n="all",exact:o,fetchStatus:i,predicate:l,queryKey:c,stale:d}=e;if(c){if(o){if(t.queryHash!==eg(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 x_(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 eg(e,t){return(t?.queryKeyHashFn||tc)(e)}function tc(e){return JSON.stringify(e,(t,n)=>iv(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 S4=Object.prototype.hasOwnProperty;function gw(e,t){if(e===t)return e;const n=R_(e)&&R_(t);if(!n&&!(iv(e)&&iv(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:S4.call(e,v))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){d[v]=y;continue}const _=gw(p,y);d[v]=_,_===p&&f++}return i===c&&f===i?e:d}function av(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 R_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function iv(e){if(!O_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!O_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function O_(e){return Object.prototype.toString.call(e)==="[object Object]"}function w4(e){return new Promise(t=>{si.setTimeout(t,e)})}function sv(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?gw(e,t):t}function x4(e,t,n=0){const o=[...e,t];return n&&o.length>n?o.slice(1):o}function R4(e,t,n=0){const o=[t,...e];return n&&o.length>n?o.slice(0,-1):o}var tg=Symbol();function yw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===tg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bw(e,t){return typeof e=="function"?e(...t):!!e}function O4(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 T4=class extends pc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!hi&&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"}},ng=new T4;function lv(){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 A4=_4;function C4(){let e=[],t=0,n=d=>{d()},o=d=>{d()},i=A4;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=C4(),I4=class extends pc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!hi&&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 I4;function M4(e){return Math.min(1e3*2**e,3e4)}function _w(e){return(e??"online")==="online"?Ad.isOnline():!0}var cv=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Ew(e){let t=!1,n=0,o;const i=lv(),l=()=>i.status!=="pending",c=S=>{if(!l()){const T=new cv(S);y(T),e.onCancel?.(T)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>ng.isFocused()&&(e.networkMode==="always"||Ad.isOnline())&&e.canRun(),v=()=>_w(e.networkMode)&&e.canRun(),p=S=>{l()||(o?.(),i.resolve(S))},y=S=>{l()||(o?.(),i.reject(S))},_=()=>new Promise(S=>{o=T=>{(l()||h())&&S(T)},e.onPause?.()}).then(()=>{o=void 0,l()||e.onContinue?.()}),w=()=>{if(l())return;let S;const T=n===0?e.initialPromise:void 0;try{S=T??e.fn()}catch(R){S=Promise.reject(R)}Promise.resolve(S).then(p).catch(R=>{if(l())return;const A=e.retry??(hi?0:3),C=e.retryDelay??M4,O=typeof C=="function"?C(n,R):C,M=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,R);if(t||!M){y(R);return}n++,e.onFail?.(n,R),w4(O).then(()=>h()?void 0:_()).then(()=>{t?y(R):w()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(o?.(),i),cancelRetry:d,continueRetry:f,canStart:v,start:()=>(v()?w():_().then(w),i)}}var Sw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ov(this.gcTime)&&(this.#e=si.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(si.clearTimeout(this.#e),this.#e=void 0)}},N4=class extends Sw{#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=A_(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=A_(this.options);t.data!==void 0&&(this.setState(T_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=sv(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===tg||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Oa(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:!vw(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=yw(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=Ew({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof cv&&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 cv){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,...ww(n.data,this.options),fetchMeta:e.meta??null};case"success":const o={...n,...T_(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 ww(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_w(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function T_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function A_(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 D4=class extends pc{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#i=lv(),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),C_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return uv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return uv(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&&!av(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&I_(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)||Oa(this.options.staleTime,this.#t)!==Oa(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 P4(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=Oa(this.options.staleTime,this.#t);if(hi||this.#o.isStale||!ov(e))return;const n=vw(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,!(hi||Dr(this.options.enabled,this.#t)===!1||!ov(this.#l)||this.#l===0)&&(this.#u=si.setInterval(()=>{(this.options.refetchIntervalInBackground||ng.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 D=this.hasListeners(),z=!D&&C_(e,t),W=D&&I_(e,n,t,o);(z||W)&&(v={...v,...ww(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:_,errorUpdatedAt:w,status:S}=v;y=v.data;let T=!1;if(t.placeholderData!==void 0&&y===void 0&&S==="pending"){let D;i?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(D=i.data,T=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(S="success",y=sv(i?.data,D,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=sv(i?.data,y,t),this.#f=y,this.#a=null}catch(D){this.#a=D}this.#a&&(_=this.#a,y=this.#f,w=Date.now(),S="error");const R=v.fetchStatus==="fetching",A=S==="pending",C=S==="error",O=A&&R,M=y!==void 0,N={status:S,fetchStatus:v.fetchStatus,isPending:A,isSuccess:S==="success",isError:C,isInitialLoading:O,isLoading:O,data:y,dataUpdatedAt:v.dataUpdatedAt,error:_,errorUpdatedAt:w,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:R,isRefetching:R&&!A,isLoadingError:C&&!M,isPaused:v.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&M,isStale:rg(e,t),refetch:this.refetch,promise:this.#i,isEnabled:Dr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=G=>{N.status==="error"?G.reject(N.error):N.data!==void 0&&G.resolve(N.data)},z=()=>{const G=this.#i=N.promise=lv();D(G)},W=this.#i;switch(W.status){case"pending":e.queryHash===n.queryHash&&D(W);break;case"fulfilled":(N.status==="error"||N.data!==W.value)&&z();break;case"rejected":(N.status!=="error"||N.error!==W.reason)&&z();break}}return N}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),av(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 L4(e,t){return Dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function C_(e,t){return L4(e,t)||e.state.data!==void 0&&uv(e,t,t.refetchOnMount)}function uv(e,t,n){if(Dr(t.enabled,e)!==!1&&Oa(t.staleTime,e)!=="static"){const o=typeof n=="function"?n(e):n;return o==="always"||o!==!1&&rg(e,t)}return!1}function I_(e,t,n,o){return(e!==t||Dr(o.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&rg(e,n)}function rg(e,t){return Dr(t.enabled,e)!==!1&&e.isStaleByTime(Oa(t.staleTime,e))}function P4(e,t){return!av(e.getCurrentResult(),t)}function M_(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=w=>{O4(w,()=>t.signal,()=>v=!0)},y=yw(t.options,t.fetchOptions),_=async(w,S,T)=>{if(v)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const A=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:S,direction:T?"backward":"forward",meta:t.options.meta};return p(L),L})(),C=await y(A),{maxPages:O}=t.options,M=T?R4:x4;return{pages:M(w.pages,C,O),pageParams:M(w.pageParams,S,O)}};if(i&&l.length){const w=i==="backward",S=w?xw:dv,T={pages:l,pageParams:c},R=S(o,T);d=await _(T,R,w)}else{const w=e??l.length;do{const S=f===0?c[0]??o.initialPageParam:dv(o,d);if(f>0&&S==null)break;d=await _(d,S),f++}while(f<w)}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 dv(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 xw(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function rH(e,t){return t?dv(e,t)!=null:!1}function oH(e,t){return!t||!e.getPreviousPageParam?!1:xw(e,t)!=null}var k4=class extends Sw{#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||j4(),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=Ew({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 j4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var z4=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 k4({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=>x_(t,n))}findAll(e={}){return this.getAll().filter(t=>x_(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 U4=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??eg(o,t);let l=this.get(i);return l||(l=new N4({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=>w_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>w_(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()})})}},B4=class{#e;#t;#n;#o;#r;#s;#i;#a;constructor(e={}){this.#e=e.queryCache||new U4,this.#t=e.mutationCache||new z4,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#i=ng.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(Oa(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=E4(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(Oa(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=M_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qn).catch(Qn)}ensureInfiniteQueryData(e){return e.behavior=M_(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=eg(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===tg&&(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()}},Rw=E.createContext(void 0),F4=e=>{const t=E.useContext(Rw);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$4=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(Rw.Provider,{value:e,children:t})),Ow=E.createContext(!1),V4=()=>E.useContext(Ow);Ow.Provider;function H4(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var G4=E.createContext(H4()),q4=()=>E.useContext(G4),Z4=(e,t,n)=>{const o=n?.state.error&&typeof e.throwOnError=="function"?bw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(t.isReset()||(e.retryOnMount=!1))},Y4=e=>{E.useEffect(()=>{e.clearReset()},[e])},K4=({result:e,errorResetBoundary:t,throwOnError:n,query:o,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(i&&e.data===void 0||bw(n,[e.error,o])),W4=(e,t)=>t.state.data===void 0,Q4=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))}},X4=(e,t)=>e.isLoading&&e.isFetching&&!t,J4=(e,t)=>e?.suspense&&t.isPending,N_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function e3(e,t,n){const o=V4(),i=q4(),l=F4(n),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const d=l.getQueryCache().get(c.queryHash);c._optimisticResults=o?"isRestoring":"optimistic",Q4(c),Z4(c,i,d),Y4(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]),J4(c,v))throw N_(c,h,i);if(K4({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&&!hi&&X4(v,o)&&(f?N_(c,h,i):d?.promise)?.catch(Qn).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?v:h.trackResult(v)}function t3(e,t){return e3({...e,enabled:!0,suspense:!0,throwOnError:W4,placeholderData:void 0},D4,t)}const n3={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]},Tw=E.createContext(void 0);async function r3(){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 o3(e){const t=cf.c(4),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:n3.authConfig(),queryFn:r3,staleTime:1/0},t[0]=o):o=t[0];const{data:i}=t3(o);let l;return t[1]!==i||t[2]!==n?(l=b.jsx(Tw.Provider,{value:i,children:n}),t[1]=i,t[2]=n,t[3]=l):l=t[3],l}function aH(){const e=E.useContext(Tw);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const fv=new WeakMap,a3=new WeakMap,Cd={current:[]};let rm=!1,Yl=0;const Vl=new Set,Vu=new Map;function Aw(e){for(const t of e){if(Cd.current.includes(t))continue;Cd.current.push(t),t.recompute();const n=a3.get(t);if(n)for(const o of n){const i=fv.get(o);i?.length&&Aw(i)}}}function i3(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function s3(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function Cw(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,i3(n)}for(const n of t){const o=fv.get(n);o&&(Cd.current.push(n),Aw(o))}for(const n of t){const o=fv.get(n);if(o)for(const i of o)s3(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&&Cw(t)}}}function l3(e){return typeof e=="function"}class c3{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):l3(t)?this.state=t(this.prevState):this.state=t,(i=(o=this.options)==null?void 0:o.onUpdate)==null||i.call(o),Cw(this)}}const Ta="__TSR_index",D_="popstate",L_="beforeunload";function u3(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[Ta];d=P_(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[Ta];d=P_(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[Ta]!==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 P_(e,t){t||(t={});const n=og();return{...t,key:n,__TSR_key:n,[Ta]:e}}function d3(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,o=t.history.replaceState;let i=[];const l=()=>i,c=D=>i=D,d=(D=>D),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 D=og();t.history.replaceState({[Ta]:0,key:D,__TSR_key:D},"")}let h=f(),v,p=!1,y=!1,_=!1,w=!1;const S=()=>h;let T,R;const A=()=>{T&&(N._ignoreSubscribers=!0,(T.isPush?t.history.pushState:t.history.replaceState)(T.state,"",T.href),N._ignoreSubscribers=!1,T=void 0,R=void 0,v=void 0)},C=(D,z,W)=>{const G=d(z);R||(v=h),h=Id(z,W),T={href:G,state:W,isPush:T?.isPush||D==="push"},R||(R=Promise.resolve().then(()=>A()))},O=D=>{h=f(),N.notify({type:D})},M=async()=>{if(y){y=!1;return}const D=f(),z=D.state[Ta]-h.state[Ta],W=z===1,G=z===-1,K=!W&&!G||p;p=!1;const j=K?"GO":G?"BACK":"FORWARD",ne=K?{type:"GO",index:z}:{type:G?"BACK":"FORWARD"};if(_)_=!1;else{const ae=l();if(typeof document<"u"&&ae.length){for(const P of ae)if(await P.blockerFn({currentLocation:h,nextLocation:D,action:j})){y=!0,t.history.go(1),N.notify(ne);return}}}h=f(),N.notify(ne)},L=D=>{if(w){w=!1;return}let z=!1;const W=l();if(typeof document<"u"&&W.length)for(const G of W){const K=G.enableBeforeUnload??!0;if(K===!0){z=!0;break}if(typeof K=="function"&&K()===!0){z=!0;break}}if(z)return D.preventDefault(),D.returnValue=""},N=u3({getLocation:S,getLength:()=>t.history.length,pushState:(D,z)=>C("push",D,z),replaceState:(D,z)=>C("replace",D,z),back:D=>(D&&(_=!0),w=!0,t.history.back()),forward:D=>{D&&(_=!0),w=!0,t.history.forward()},go:D=>{p=!0,t.history.go(D)},createHref:D=>d(D),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=o,t.removeEventListener(L_,L,{capture:!0}),t.removeEventListener(D_,M)},onBlocked:()=>{v&&h!==v&&(h=v)},getBlockers:l,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(L_,L,{capture:!0}),t.addEventListener(D_,M),t.history.pushState=function(...D){const z=n.apply(t.history,D);return N._ignoreSubscribers||O("PUSH"),z},t.history.replaceState=function(...D){const z=o.apply(t.history,D);return N._ignoreSubscribers||O("REPLACE"),z},N}function f3(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Id(e,t){const n=f3(e),o=n.indexOf("#"),i=n.indexOf("?"),l=og();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||{[Ta]:0,key:l,__TSR_key:l}}}function og(){return(Math.random()+1).toString(36).substring(7)}function Md(e){return e[e.length-1]}function h3(e){return typeof e=="function"}function xa(e,t){return h3(e)?e(t):e}const p3=Object.prototype.hasOwnProperty;function Nr(e,t){if(e===t)return e;const n=t,o=z_(e)&&z_(n);if(!o&&!(Nd(e)&&Nd(n)))return n;const i=o?e:k_(e);if(!i)return n;const l=o?n:k_(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:p3.call(e,p))&&h++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){f[p]=_;continue}const w=Nr(y,_);f[p]=w,w===y&&h++}return c===d&&h===c?e:f}function k_(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(!j_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!j_(n)||!n.hasOwnProperty("isPrototypeOf"))}function j_(e){return Object.prototype.toString.call(e)==="[object Object]"}function z_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ui(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(!ui(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)&&!ui(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||!ui(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 m3(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 Aa(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function v3(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function U_(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 v3(t)}function B_(e,t){if(!e)return e;const n=/%25|%5C/gi;let o=0,i="",l;for(;(l=n.exec(e))!==null;)i+=U_(e.slice(o,l.index))+l[0],o=n.lastIndex;return i=i+U_(o?e.slice(o):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}var g3="Invariant failed";function Fo(e,t){if(!e)throw new Error(g3)}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,pi=1,mi=2,rc=3,_s=4,y3=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,b3=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,_3=/^([^{]*)\{\$\}([^}]*)$/;function ag(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]=mi,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=pi,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const c=l.match(_3);if(c){const v=c[1].length;return n[0]=mi,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(b3);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(y3);if(f){const h=f[1],v=f[2],p=f[3],y=h.length;return n[0]=pi,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;for(;d<h;){const y=ag(f,d,t);let _;const w=d,S=y[5];switch(d=S+1,l++,y[0]){case Is:{const R=f.substring(y[2],y[3]);if(v){const A=i.static?.get(R);if(A)_=A;else{i.static??=new Map;const C=ws(n.fullPath??n.from);C.parent=i,C.depth=l,_=C,i.static.set(R,C)}}else{const A=R.toLowerCase(),C=i.staticInsensitive?.get(A);if(C)_=C;else{i.staticInsensitive??=new Map;const O=ws(n.fullPath??n.from);O.parent=i,O.depth=l,_=O,i.staticInsensitive.set(A,O)}}break}case pi:{const R=f.substring(w,y[1]),A=f.substring(y[4],S),C=v&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=i.dynamic?.find(N=>N.caseSensitive===C&&N.prefix===O&&N.suffix===M);if(L)_=L;else{const N=am(pi,n.fullPath??n.from,C,O,M);_=N,N.depth=l,N.parent=i,i.dynamic??=[],i.dynamic.push(N)}break}case rc:{const R=f.substring(w,y[1]),A=f.substring(y[4],S),C=v&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=i.optional?.find(N=>N.caseSensitive===C&&N.prefix===O&&N.suffix===M);if(L)_=L;else{const N=am(rc,n.fullPath??n.from,C,O,M);_=N,N.parent=i,N.depth=l,i.optional??=[],i.optional.push(N)}break}case mi:{const R=f.substring(w,y[1]),A=f.substring(y[4],S),C=v&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=am(mi,n.fullPath??n.from,C,O,M);_=L,L.parent=i,L.depth=l,i.wildcard??=[],i.wildcard.push(L)}}i=_}const p=(n.path||!n.children)&&!n.isRoot;if(p&&f.endsWith("/")){const y=ws(n.fullPath??n.from);y.kind=_s,y.parent=i,l++,y.depth=l,i.index=y,i=y}p&&!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.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 ii(e){if(e.static)for(const t of e.static.values())ii(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ii(t);if(e.dynamic?.length){e.dynamic.sort(om);for(const t of e.dynamic)ii(t)}if(e.optional?.length){e.optional.sort(om);for(const t of e.optional)ii(t)}if(e.wildcard?.length){e.wildcard.sort(om);for(const t of e.wildcard)ii(t)}}function ws(e){return{kind:Is,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function am(e,t,n,o,i){return{kind:e,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,caseSensitive:n,prefix:o,suffix:i}}function E3(e,t){const n=ws("/"),o=new Uint16Array(6);for(const i of e)uf(!1,o,i,1,n,0);ii(n),t.masksTree=n,t.flatCache=Dd(1e3)}function S3(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const o=ig(e,t.masksTree);return t.flatCache.set(e,o),o}function w3(e,t,n,o,i){e||="/",o||="/";const l=t?`case\0${e}`:e;let c=i.singleCache.get(l);if(!c){c=ws("/");const d=new Uint16Array(6);uf(t,d,{from:e},1,c,0),i.singleCache.set(l,c)}return ig(o,c,n)}function x3(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=ig(e,t.segmentTree,n);return l&&(l.branch=A3(l.route)),t.matchCache.set(o,l),l}function R3(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function O3(e,t=!1,n){const o=ws(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=R3(h.fullPath);(!c[v]||h.fullPath.endsWith("/"))&&(c[v]=h)}d++}),ii(o),{processedTree:{segmentTree:o,singleCache:Dd(1e3),matchCache:Dd(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:c}}function ig(e,t,n=!1){const o=e.split("/"),i=I3(e,o,t,n);if(!i)return null;const l=T3(e,o,i);return"**"in i&&(l["**"]=i["**"]),{route:i.node.route,params:l}}function T3(e,t,n){const o=C3(n.node);let i=null;const l={};for(let c=0,d=0,f=0;d<o.length;c++,d++,f++){const h=o[d],v=t[c],p=f;if(v&&(f+=v.length),h.kind===pi){i??=n.node.fullPath.split("/");const y=i[d],_=h.prefix?.length??0;if(y.charCodeAt(_)===123){const S=h.suffix?.length??0,T=y.substring(_+2,y.length-S-1),R=v.substring(_,v.length-S);l[T]=decodeURIComponent(R)}else{const S=y.substring(1);l[S]=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,w=h.suffix?.length??0,S=y.substring(_+3,y.length-w-1),T=h.suffix||h.prefix?v.substring(_,v.length-w):v;T&&(l[S]=decodeURIComponent(T))}else if(h.kind===mi){const y=h,_=e.substring(p+(y.prefix?.length??0),e.length-(y.suffix?.length??0)),w=decodeURIComponent(_);l["*"]=w,l._splat=w;break}}return l}function A3(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function C3(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function I3(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();let{node:y,index:_,skipped:w,depth:S,statics:T,dynamics:R,optionals:A}=p;o&&y.route&&y.kind!==_s&&Ml(h,p)&&(h=p);const C=_===c;if(C&&(y.route&&!l&&Ml(v,p)&&(v=p),!y.optional&&!y.wildcard&&!y.index))continue;const O=C?void 0:t[_];let M;if(C&&y.index){const L={node:y.index,index:_,skipped:w,depth:S+1,statics:T,dynamics:R,optionals:A};if(T===c&&!R&&!A&&!w)return L;Ml(v,L)&&(v=L)}if(y.wildcard&&Ml(f,p))for(const L of y.wildcard){const{prefix:N,suffix:D}=L;if(!(N&&(C||!(L.caseSensitive?O:M??=O.toLowerCase()).startsWith(N)))){if(D){if(C)continue;const z=t.slice(_).join("/").slice(-D.length);if((L.caseSensitive?z:z.toLowerCase())!==D)continue}f={node:L,index:c,skipped:w,depth:S,statics:T,dynamics:R,optionals:A};break}}if(y.optional){const L=w|1<<S,N=S+1;for(let D=y.optional.length-1;D>=0;D--){const z=y.optional[D];d.push({node:z,index:_,skipped:L,depth:N,statics:T,dynamics:R,optionals:A})}if(!C)for(let D=y.optional.length-1;D>=0;D--){const z=y.optional[D],{prefix:W,suffix:G}=z;if(W||G){const K=z.caseSensitive?O:M??=O.toLowerCase();if(W&&!K.startsWith(W)||G&&!K.endsWith(G))continue}d.push({node:z,index:_+1,skipped:w,depth:N,statics:T,dynamics:R,optionals:A+1})}}if(!C&&y.dynamic&&O)for(let L=y.dynamic.length-1;L>=0;L--){const N=y.dynamic[L],{prefix:D,suffix:z}=N;if(D||z){const W=N.caseSensitive?O:M??=O.toLowerCase();if(D&&!W.startsWith(D)||z&&!W.endsWith(z))continue}d.push({node:N,index:_+1,skipped:w,depth:S+1,statics:T,dynamics:R+1,optionals:A})}if(!C&&y.staticInsensitive){const L=y.staticInsensitive.get(M??=O.toLowerCase());L&&d.push({node:L,index:_+1,skipped:w,depth:S+1,statics:T+1,dynamics:R,optionals:A})}if(!C&&y.static){const L=y.static.get(O);L&&d.push({node:L,index:_+1,skipped:w,depth:S+1,statics:T+1,dynamics:R,optionals:A})}}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{node:h.node,skipped:h.skipped,"**":decodeURIComponent(y)}}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===_s)>(e.node.kind===_s)||t.node.kind===_s==(e.node.kind===_s)&&t.depth>e.depth))):!0}function gd(e){return sg(e.filter(t=>t!==void 0).join("/"))}function sg(e){return e.replace(/\/{2,}/g,"/")}function Iw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function di(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Mw(e){return di(Iw(e))}function Ld(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function M3(e,t,n){return Ld(e,n)===Ld(t,n)}function N3({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 w=p[y];w===""?y?y===_-1&&d.push(w):d=[w]:w===".."?d.pop():w==="."||d.push(w)}}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=ag(y,0,f);const _=f[0];if(_===Is){h+=y;continue}const w=f[5],S=y.substring(0,f[1]),T=y.substring(f[4],w),R=y.substring(f[2],f[3]);_===pi?h+=S||T?`${S}{$${R}}${T}`:`$${R}`:_===mi?h+=S||T?`${S}{$}${T}`:"$":h+=`${S}{-$${R}}${T}`}h=sg(h);const v=h||"/";return c&&o&&o.set(c,v),v}function im(e,t,n){const o=t[e];return typeof o!="string"?o:e==="_splat"?encodeURI(o):D3(o,n)}function sm({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=ag(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===mi){const _=t._splat;i._splat=_,i["*"]=_;const w=e.substring(v,d[1]),S=e.substring(d[4],p);if(!_){o=!0,(w||S)&&(f+="/"+w+S);continue}const T=im("_splat",t,n);f+="/"+w+T+S;continue}if(y===pi){const _=e.substring(d[2],d[3]);!o&&!(_ in t)&&(o=!0),i[_]=t[_];const w=e.substring(v,d[1]),S=e.substring(d[4],p),T=im(_,t,n)??"undefined";f+="/"+w+T+S;continue}if(y===rc){const _=e.substring(d[2],d[3]),w=t[_];if(w==null)continue;i[_]=w;const S=e.substring(v,d[1]),T=e.substring(d[4],p),R=im(_,t,n)??"";f+="/"+S+R+T;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:i,interpolatedPath:f||"/",isMissingParams:o}}function D3(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 L3(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Pd="tsr-scroll-restoration-v1_3",P3=(e,t)=>{let n;return(...o)=>{n||(n=setTimeout(()=>{e(...o),n=null},t))}};function k3(){const e=L3();if(!e)return null;const t=e.getItem(Pd);let n=t?JSON.parse(t):{};return{state:n,set:o=>{n=xa(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=k3(),hv=e=>e.state.__TSR_key||e.href;function j3(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 Nw({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 z3(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||hv;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=j3(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",P3(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})||(Nw({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 U3(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 B3(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 lm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function F3(e){const t=new URLSearchParams(e),n={};for(const[o,i]of t.entries()){const l=n[o];l==null?n[o]=lm(i):Array.isArray(l)?l.push(lm(i)):n[o]=[l,lm(i)]}return n}const $3=H3(JSON.parse),V3=G3(JSON.stringify,JSON.parse);function H3(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=F3(t);for(const o in n){const i=n[o];if(typeof i=="string")try{n[o]=e(i)}catch{}}return n}}function G3(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=B3(i,o);return l?`?${l}`:""}}const ur="__root__";function q3(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)),lg=(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},Dw=(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,Dw(e,t))},Ra=(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):(Dw(e,n),n)}},Lw=(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,Ra(e,e.router.getMatch(i),n);try{c.options.onError?.(n)}catch(d){n=d,Ra(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}))},Z3=(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(Aa(y))return y.then(_=>{i.ssr=d(_??f)});i.ssr=d(y??f)},Pw=(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||zw(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{yd(e)},i);o._nonReactive.pendingTimeout=c}},Y3=(e,t,n)=>{const o=e.router.getMatch(t);if(!o._nonReactive.beforeLoadPromise&&!o._nonReactive.loaderPromise)return;Pw(e,t,n,o);const i=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Ra(e,l,l.error)};return o._nonReactive.beforeLoadPromise?o._nonReactive.beforeLoadPromise.then(i):i()},K3=(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"),Pw(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,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:f})))},_=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!o.options.beforeLoad){Kl(()=>{y(),_()});return}i._nonReactive.beforeLoadPromise=Cs();const w={...lg(e,n,!1),...i.__routeContext},{search:S,params:T,cause:R}=i,A=df(e,t),C={search:S,abortController:f,params:T,preload:A,context:w,location:e.location,navigate:L=>e.router.navigate({...L,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":R,matches:e.matches,...e.router.options.additionalContext},O=L=>{if(L===void 0){Kl(()=>{y(),_()});return}(Pr(L)||vr(L))&&(y(),Nl(e,n,L,"BEFORE_LOAD")),Kl(()=>{y(),e.updateMatch(t,N=>({...N,__beforeLoadContext:L})),_()})};let M;try{if(M=o.options.beforeLoad(C),Aa(M))return y(),M.catch(L=>{Nl(e,n,L,"BEFORE_LOAD")}).then(O)}catch(L){y(),Nl(e,n,L,"BEFORE_LOAD")}O(M)},W3=(e,t)=>{const{id:n,routeId:o}=e.matches[t],i=e.router.looseRoutesById[o],l=()=>{if(e.router.isServer){const f=Z3(e,n,t,i);if(Aa(f))return f.then(d)}return d()},c=()=>K3(e,n,t,i),d=()=>{if(Lw(e,n))return;const f=Y3(e,n,i);return Aa(f)?f.then(c):c()};return l()},Q3=(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}})},kw=(e,t,n,o)=>{const i=e.matchPromises[n-1],{params:l,loaderDeps:c,abortController:d,cause:f}=e.router.getMatch(t),h=lg(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}},F_=async(e,t,n,o)=>{try{const i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&jw(o);const l=o.options.loader?.(kw(e,t,n,o)),c=o.options.loader&&Aa(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;Ra(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;const d=i._nonReactive.minPendingPromise;d&&await d,vr(l)&&await o.options.notFoundComponent?.preload?.(),Ra(e,e.router.getMatch(t),l);try{o.options.onError?.(l)}catch(f){c=f,Ra(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),Ra(e,l,i)}},X3=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:lg(e,t)}))};if(Lw(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&&Ra(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,w=c.options.shouldReload,S=typeof w=="function"?w(kw(e,n,t,c)):w,T=!!y&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Cs(),T!==R.preload&&e.updateMatch(n,O=>({...O,preload:T}));const{status:A,invalid:C}=R;i=A==="success"&&(C||(S??p>_)),y&&c.options.preload===!1||(i&&!e.sync?(l=!0,(async()=>{try{await F_(e,n,t,c),d();const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){Pr(O)&&await e.router.navigate(O.options)}})()):(A!=="success"||i&&e.sync)&&await F_(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 $_(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=W3(t,d);Aa(f)&&await f}const n=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<n;d++)t.matchPromises.push(X3(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=Q3(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);Aa(c)&&await c}catch(n){if(vr(n)&&!t.preload){const o=yd(t);throw Aa(o)&&await o,n}if(Pr(n))throw n}return t.matches}async function jw(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 Uw){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 zw(e){for(const t of Uw)if(e.options[t]?.preload)return!0;return!1}const Uw=["component","errorComponent","pendingComponent","notFoundComponent"];function J3(e){return{input:({url:t})=>{for(const n of e)t=Bw(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Fw(e[n],t);return t}}}function e5(e){const t=Mw(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 Bw(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 Fw(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 fi(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 t5{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=d3())),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 c3(r5(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(y=>!["redirected"].includes(y.status))}}}),z3(this));let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||i!==f||c!==h){this.basepath=f;const y=[];Mw(f)!==""&&y.push(e5({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:J3(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}=O3(this.routeTree,this.options.caseSensitive,(c,d)=>{c.init({originalIndex:d})});this.options.routeMasks&&E3(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=Bw(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:B_(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)=>N3({base:n,to:sg(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=>o5({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,"."),w=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,xa(l.params,y)),S=sm({path:_,params:w}).interpolatedPath,T=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(W=>this.looseRoutesById[W.routeId]);if(Object.keys(w).length>0)for(const W of T){const G=W.options.params?.stringify??W.options.stringifyParams;G&&Object.assign(w,G(w))}const R=n.leaveParams?_:B_(sm({path:_,params:w,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let A=p;if(n._includeValidateSearch&&this.options.search?.strict){const W={};T.forEach(G=>{if(G.options.validateSearch)try{Object.assign(W,pv(G.options.validateSearch,{...W,...A}))}catch{}}),A=W}A=a5({search:A,dest:l,destRoutes:T,_includeValidateSearch:n._includeValidateSearch}),A=Nr(p,A);const C=this.options.stringifySearch(A),O=l.hash===!0?c.hash:l.hash?xa(l.hash,c.hash):void 0,M=O?`#${O}`:"";let L=l.state===!0?c.state:l.state?xa(l.state,c.state):{};L=Nr(c.state,L);const N=`${R}${C}${M}`,D=new URL(N,this.origin),z=Fw(this.rewrite,D);return{publicHref:z.pathname+z.search+z.hash,href:N,url:z,pathname:R,search:A,searchStr:C,state:L,hash:O??"",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=S3(d.pathname,this.processedTree);if(v){Object.assign(h,v.params);const{from:p,params:y,..._}=v.route,w=y===!1||y===null?{}:(y??!0)===!0?h:Object.assign(h,xa(y,h));c={from:n.from,..._,params:w},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=ui(i.state,this.latestLocation.state);return f.forEach(v=>{delete i.state[v]}),h},c=di(this.latestLocation.href)===di(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 q3({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",...fi({resolvedLocation:h,location:f})}),this.emit({type:"onBeforeLoad",...fi({resolvedLocation:h,location:f})}),await $_({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 w=_.matches,S=_.pendingMatches||_.matches;return v=w.filter(T=>!S.some(R=>R.id===T.id)),p=S.filter(T=>!w.some(R=>R.id===T.id)),y=S.filter(T=>w.some(R=>R.id===T.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:S,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...v.filter(T=>T.status!=="error"&&T.status!=="notFound")]}}),this.clearExpiredCache()}),[[v,"onLeave"],[p,"onEnter"],[y,"onStay"]].forEach(([_,w])=>{_.forEach(S=>{this.looseRoutesById[S.routeId].options[w]?.(S)})})})})}})}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(fi({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=jw,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 $_({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=w3(l.pathname,o?.caseSensitive??!1,o?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!ui(f.params,n.params,{partial:!0})?!1:o?.includeSearch??!0?ui(d.search,l.search,{partial:!0})?f.params:!1:f.params},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??V3,parseSearch:t.parseSearch??$3}),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}=o;let{matchedRoutes:c}=o,d=!1;(i?i.path!=="/"&&l["**"]:di(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const f=(()=>{if(d){if(this.options.notFoundMode!=="root")for(let p=c.length-1;p>=0;p--){const y=c[p];if(y.children)return y.id}return ur}})(),h=[],v=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return c.forEach((p,y)=>{const _=h[y-1],[w,S,T]=(()=>{const j=_?.search??t.search,ne=_?._strictSearch??void 0;try{const ae=pv(p.options.validateSearch,{...j})??void 0;return[{...j,...ae},{...ne,...ae},void 0]}catch(ae){let P=ae;if(ae instanceof jd||(P=new jd(ae.message,{cause:ae})),n?.throwOnError)throw P;return[j,{},P]}})(),R=p.options.loaderDeps?.({search:w})??"",A=R?JSON.stringify(R):"",{interpolatedPath:C,usedParams:O}=sm({path:p.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),M=p.id+C+A,L=this.getMatch(M),N=this.state.matches.find(j=>j.routeId===p.id),D=L?._strictParams??O;let z;if(!L){const j=p.options.params?.parse??p.options.parseParams;if(j)try{Object.assign(D,j(D))}catch(ne){if(vr(ne)||Pr(ne)?z=ne:z=new n5(ne.message,{cause:ne}),n?.throwOnError)throw z}}Object.assign(l,D);const W=N?"stay":"enter";let G;if(L)G={...L,cause:W,params:N?Nr(N.params,l):l,_strictParams:D,search:Nr(N?N.search:L.search,w),_strictSearch:S};else{const j=p.options.loader||p.options.beforeLoad||p.lazyFn||zw(p)?"pending":"success";G={id:M,ssr:this.isServer?void 0:p.options.ssr,index:y,routeId:p.id,params:N?Nr(N.params,l):l,_strictParams:D,pathname:C,updatedAt:Date.now(),search:N?Nr(N.search,w):w,_strictSearch:S,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:z,__routeContext:void 0,_nonReactive:{loadPromise:Cs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:N?Nr(N.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(G.globalNotFound=f===p.id),G.searchError=T;const K=v(_);G.context={...K,...G.__routeContext,...G.__beforeLoadContext},h.push(G)}),h.forEach((p,y)=>{const _=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const S=h[y-1],T=v(S);if(_.options.context){const R={deps:p.loaderDeps,params:p.params,context:T??{},location:t,navigate:A=>this.navigate({...A,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:h};p.__routeContext=_.options.context(R)??void 0}p.context={...T,...p.__routeContext,...p.__beforeLoadContext}}}),h}}class jd extends Error{}class n5 extends Error{}function r5(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function pv(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 o5({pathname:e,routesById:t,processedTree:n}){const o={},i=di(e);let l;const c=x3(i,n,!0);return c&&(l=c.route,Object.assign(o,c.params)),{matchedRoutes:c?.branch||[t[ur]],routeParams:o,foundRoute:l}}function a5({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((S,T)=>T(S),p));const w=y(_);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((S,T)=>T(S),w):w};h.push(v)}if(o&&f.options.validateSearch){const v=({search:p,next:y})=>{const _=y(p);try{return{..._,...pv(f.options.validateSearch,_)??void 0}}catch{return _}};h.push(v)}return d.concat(h)},[])??[],l=({search:d})=>t.search?t.search===!0?d:xa(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 i5="Error preloading route! ☝️";class $w{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=Iw(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 s5 extends $w{constructor(t){super(t)}}function cg(e){const t=e.errorComponent??ff;return b.jsx(l5,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:o})=>n?E.createElement(t,{error:n,reset:o}):e.children})}class l5 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 c5({children:e,fallback:t=null}){return u5()?b.jsx($.Fragment,{children:e}):b.jsx($.Fragment,{children:t})}function u5(){return $.useSyncExternalStore(d5,()=>!0,()=>!1)}function d5(){return()=>{}}var cm={exports:{}},um={},dm={exports:{}},fm={};var V_;function f5(){if(V_)return fm;V_=1;var e=Pa();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(),w=o({inst:{value:_,getSnapshot:y}}),S=w[0].inst,T=w[1];return l(function(){S.value=_,S.getSnapshot=y,f(S)&&T({inst:S})},[p,_,y]),i(function(){return f(S)&&T({inst:S}),p(function(){f(S)&&T({inst:S})})},[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 fm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,fm}var H_;function Vw(){return H_||(H_=1,dm.exports=f5()),dm.exports}var G_;function h5(){if(G_)return um;G_=1;var e=Pa(),t=Vw();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 um.useSyncExternalStoreWithSelector=function(h,v,p,y,_){var w=l(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=d(function(){function R(L){if(!A){if(A=!0,C=L,L=y(L),_!==void 0&&S.hasValue){var N=S.value;if(_(N,L))return O=N}return O=L}if(N=O,o(C,L))return N;var D=y(L);return _!==void 0&&_(N,D)?(C=L,N):(C=L,O=D)}var A=!1,C,O,M=p===void 0?null:p;return[function(){return R(v())},M===null?void 0:function(){return R(M())}]},[v,p,y,_]);var T=i(h,w[0],w[1]);return c(function(){S.hasValue=!0,S.value=T},[T]),f(T),T},um}var q_;function p5(){return q_||(q_=1,cm.exports=h5()),cm.exports}var Hw=p5();const iH=bi(Hw);function m5(e,t=o=>o,n={}){const o=n.equal??v5;return Hw.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,o)}function v5(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=Z_(e);if(n.length!==Z_(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 Z_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const hm=E.createContext(null);function Gw(){return typeof document>"u"?hm:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=hm,hm)}function er(e){const t=E.useContext(Gw());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 m5(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),g5=E.createContext(void 0);function ho(e){const t=E.useContext(e.from?g5: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 ug(e){return ho({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function dg(e){const{select:t,...n}=e;return ho({...n,select:o=>t?t(o.loaderDeps):o.loaderDeps})}function fg(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 hg(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 pm(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 y5(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 b5(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 sH(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=mw();const qw=bi(pf);function _5(e,t){const n=er(),[o,i]=E.useState(!1),l=E.useRef(!1),c=b5(t),{activeProps:d,inactiveProps:f,activeOptions:h,to:v,preload:p,preloadDelay:y,hashScrollIntoView:_,replace:w,startTransition:S,resetScroll:T,viewTransition:R,children:A,target:C,disabled:O,style:M,className:L,onClick:N,onFocus:D,onMouseEnter:z,onMouseLeave:W,onTouchStart:G,ignoreBlocker:K,params:j,search:ne,hash:ae,state:P,mask:F,reloadDocument:H,unsafeRelative:re,from:ye,_fromLocation:k,...Q}=e,ee=Jn({select:Z=>Z.location.search,structuralSharing:!0}),se=e.from,me=E.useMemo(()=>({...e,from:se}),[n,ee,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(O)return;let Z=_e.maskedLocation?_e.maskedLocation.url.href:_e.url.href,ue=!1;return n.origin&&(Z.startsWith(n.origin)?Z=n.history.createHref(Z.replace(n.origin,""))||"/":ue=!0),{href:Z,external:ue}},[O,_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:Z=>{if(Se)return!1;if(h?.exact){if(!M3(Z.location.pathname,_e.pathname,n.basepath))return!1}else{const ue=Ld(Z.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)&&!ui(Z.location.search,_e.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Z.location.hash===_e.hash:!0}}),ze=E.useCallback(()=>{n.preloadRoute({...me}).catch(Z=>{console.warn(Z),console.warn(i5)})},[n,me]),Nt=E.useCallback(Z=>{Z?.isIntersecting&&ze()},[ze]);y5(c,Nt,R5,{disabled:!!O||De!=="viewport"}),E.useEffect(()=>{l.current||!O&&De==="render"&&(ze(),l.current=!0)},[O,ze,De]);const ge=Z=>{const ue=Z.currentTarget.getAttribute("target"),pe=C!==void 0?C:ue;if(!O&&!O5(Z)&&!Z.defaultPrevented&&(!pe||pe==="_self")&&Z.button===0){Z.preventDefault(),pf.flushSync(()=>{i(!0)});const he=n.subscribe("onResolved",()=>{he(),i(!1)});n.navigate({...me,replace:w,resetScroll:T,hashScrollIntoView:_,startTransition:S,viewTransition:R,ignoreBlocker:K})}};if(Se)return{...Q,ref:c,href:Se,...A&&{children:A},...C&&{target:C},...O&&{disabled:O},...M&&{style:M},...L&&{className:L},...N&&{onClick:N},...D&&{onFocus:D},...z&&{onMouseEnter:z},...W&&{onMouseLeave:W},...G&&{onTouchStart:G}};const ve=Z=>{O||De&&ze()},Re=ve,ke=Z=>{if(!(O||!De))if(!Le)ze();else{const ue=Z.target;if(Dl.has(ue))return;const pe=setTimeout(()=>{Dl.delete(ue),ze()},Le);Dl.set(ue,pe)}},et=Z=>{if(O||!De||!Le)return;const ue=Z.target,pe=Dl.get(ue);pe&&(clearTimeout(pe),Dl.delete(ue))},Ue=Ee?xa(d,{})??E5:mm,Qe=Ee?mm:xa(f,{})??mm,U=[L,Ue.className,Qe.className].filter(Boolean).join(" "),q=(M||Ue.style||Qe.style)&&{...M,...Ue.style,...Qe.style};return{...Q,...Ue,...Qe,href:be?.href,ref:c,onClick:Ll([N,ge]),onFocus:Ll([D,ve]),onMouseEnter:Ll([z,ke]),onMouseLeave:Ll([W,et]),onTouchStart:Ll([G,Re]),disabled:!!O,target:C,...q&&{style:q},...U&&{className:U},...O&&S5,...Ee&&w5,...o&&x5}}const mm={},E5={className:"active"},S5={role:"link","aria-disabled":!0},w5={"data-status":"active","aria-current":"page"},x5={"data-transitioning":"transitioning"},Dl=new WeakMap,R5={rootMargin:"100px"},Ll=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},pg=E.forwardRef((e,t)=>{const{_asChild:n,...o}=e,{type:i,ref:l,...c}=_5(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 O5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class T5 extends $w{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=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>fg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>dg({...n,from:this.id}),this.useLoaderData=n=>ug({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=$.forwardRef((n,o)=>b.jsx(pg,{ref:o,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function yn(e){return new T5(e)}class A5 extends s5{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=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>fg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>dg({...n,from:this.id}),this.useLoaderData=n=>ug({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=$.forwardRef((n,o)=>b.jsx(pg,{ref:o,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function C5(e){return new A5(e)}function Y_(e){return typeof e=="object"?new K_(e,{silent:!0}).createRoute(e):new K_(e,{silent:!0}).createRoute}class K_{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 W_{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=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>fg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>dg({...n,from:this.options.id}),this.useLoaderData=n=>ug({...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 Q_(e){return typeof e=="object"?new W_(e):t=>new W_({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,m3(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 I5(){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=pm(l),d=l||n||i,f=pm(d),h=l||i,v=pm(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 di(e.latestLocation.publicHref)!==di(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",...fi(e.state)})},[c,e,l]),Hl(()=>{v&&!h&&e.emit({type:"onBeforeRouteMount",...fi(e.state)})},[h,v,e]),Hl(()=>{if(f&&!d){const p=fi(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),p.hrefChanged&&U3(e)}},[d,f,e]),null}function M5(e){const t=Jn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(cg,{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 N5(){return b.jsx("p",{children:"Not Found"})}function ys(e){return b.jsx(b.Fragment,{children:e.children})}function Zw(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(N5,{})}function D5({children:e}){const t=er();return t.isServer?b.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function L5(){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||hv)(e.latestLocation),o=n!==hv(e.latestLocation)?n:void 0,i={storageKey:Pd,shouldScrollRestoration:!0};return o&&(i.key=o),b.jsx(D5,{children:`(${Nw.toString()})(${JSON.stringify(i)})`})}const Yw=E.memo(function({matchId:t}){const n=er(),o=Jn({select:R=>{const A=R.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:ys,y=d?cg:ys,_=h?M5:ys,w=Jn({select:R=>R.loadedAt}),S=Jn({select:R=>{const A=R.matches.findIndex(C=>C.id===t);return R.matches[A-1]?.routeId}}),T=i.isRoot?i.options.shellComponent??ys:ys;return b.jsxs(T,{children:[b.jsx(hf.Provider,{value:t,children:b.jsx(p,{fallback:c,children:b.jsx(y,{getResetKey:()=>w,errorComponent:d||ff,onCatch:(R,A)=>{if(vr(R))throw R;f?.(R,A)},children:b.jsx(_,{fallback:R=>{if(!h||R.routeId&&R.routeId!==o.routeId||!R.routeId&&!i.isRoot)throw R;return E.createElement(h,R)},children:v||o._displayPending?b.jsx(c5,{fallback:c,children:b.jsx(X_,{matchId:t})}):b.jsx(X_,{matchId:t})})})})}),S===ur&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(P5,{}),b.jsx(L5,{})]}):null]})});function P5(){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",...fi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const X_=E.memo(function({matchId:t}){const n=er(),{match:o,key:i,routeId:l}=Jn({select:f=>{const h=f.matches.find(w=>w.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(Kw,{})},[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)),Zw(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}),Kw=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 Zw(t,i,void 0);if(!c)return null;const f=b.jsx(Yw,{matchId:c});return o===ur?b.jsx(E.Suspense,{fallback:d,children:f}):f});function k5(){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?ys:E.Suspense,l=b.jsxs(i,{fallback:o,children:[!e.isServer&&b.jsx(I5,{}),b.jsx(j5,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:l}):l}function j5(){const e=er(),t=Jn({select:i=>i.matches[0]?.id}),n=Jn({select:i=>i.loadedAt}),o=t?b.jsx(Yw,{matchId:t}):null;return b.jsx(hf.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?o:b.jsx(cg,{getResetKey:()=>n,errorComponent:ff,onCatch:i=>{i.message||i.toString()},children:o})})}const z5=e=>new U5(e);class U5 extends t5{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Y_,globalThis.createLazyFileRoute=Q_):typeof window<"u"&&(window.createFileRoute=Y_,window.createLazyFileRoute=Q_);function B5({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const o=Gw(),i=b.jsx(o.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:i}):i}function F5({router:e,...t}){return b.jsx(B5,{router:e,...t,children:b.jsx(k5,{})})}var $5={},J_={};const bd=Object.create(null),Pl=e=>$5||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"&&J_?J_[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,eE={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},V5=new Map(Object.entries({APPVEYOR:so,BUILDKITE:so,CIRCLECI:fr,DRONE:so,GITEA_ACTIONS:fr,GITHUB_ACTIONS:fr,GITLAB_CI:so,TRAVIS:so})),H5=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function G5(){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 V5)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(eE[e])return eE[e];if(H5.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"}},mv=["debug","info","success","warn","error"];function q5(e,t){return mv.indexOf(t)>=mv.indexOf(e)}const Z5={info:lo.fg.blue,success:lo.fg.green,warn:lo.fg.yellow,error:lo.fg.red,debug:lo.fg.magenta},Y5=(e,t,n)=>{const o=new Date().toISOString();return n?`${lo.dim}${o}${lo.reset} ${Z5[e]}${e.toUpperCase()}${lo.reset} ${lo.bright}[Better Auth]:${lo.reset} ${t}`:`${o} ${e.toUpperCase()} [Better Auth]: ${t}`},K5=e=>{const t="error",n=G5()!==1,o=(i,l,c=[])=>{if(!q5(t,i))return;const d=Y5(i,l,n);{i==="error"?console.error(d,...c):i==="warn"?console.warn(d,...c):console.log(d,...c);return}};return{...Object.fromEntries(mv.map(i=>[i,(...[l,...c])=>o(i,l,c)])),get level(){return t}}};K5();var Wl=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function W5(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Wl(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Q5(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 vm(e,t="/api/auth"){if(Q5(e),W5(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function X5(e,t,n,o,i){if(e)return vm(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 vm(l,t)}if(typeof window<"u"&&window.location)return vm(window.location.origin,t)}const J5={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*:/},e6=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,tE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},t6=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function n6(e){return e instanceof Date&&!isNaN(e.getTime())}function r6(e){const t=t6.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 n6(y)?y:null}function o6(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 tE)return tE[d];if(!e6.test(c)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(J5).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=r6(v);if(p)return p}return i?i(h,v):v})}catch(f){if(n)throw f;return e}}function a6(e,t={strict:!0}){return o6(e,t)}let $r=[],ga=0;const qu=4,Es=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},i6=5,Zu=6,Yu=10;let s6=(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])}),l6=1e3,Ww=(e,t)=>s6(e,o=>{let i=t(o);i&&e.events[Zu].push(i)},i6,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]=[]}},l6)},()=>{e.listen=i,e.off=l}});function c6(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 u6=Object.defineProperty,d6=Object.defineProperties,f6=Object.getOwnPropertyDescriptors,nE=Object.getOwnPropertySymbols,h6=Object.prototype.hasOwnProperty,p6=Object.prototype.propertyIsEnumerable,rE=(e,t,n)=>t in e?u6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gr=(e,t)=>{for(var n in t||(t={}))h6.call(t,n)&&rE(e,n,t[n]);if(nE)for(var n of nE(t))p6.call(t,n)&&rE(e,n,t[n]);return e},io=(e,t)=>d6(e,f6(t)),m6=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},v6=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}},oE=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}},g6=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 y6(e){if(typeof e=="number")return new oE({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new oE(e);case"exponential":return new g6(e);default:throw new Error("Invalid retry strategy")}}var b6=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},_6=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function E6(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 _6.test(o)?"json":n.has(o)||o.startsWith("text/")?"text":"blob"}function S6(e){try{return JSON.parse(e),!0}catch{return!1}}function Qw(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 aE(e){try{return JSON.parse(e)}catch{return e}}function iE(e){return typeof e=="function"}function w6(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&iE(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&iE(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function x6(e){const t=new Headers(e?.headers),n=await b6(e);for(const[o,i]of Object.entries(n||{}))t.set(o,i);if(!t.has("content-type")){const o=R6(e?.body);o&&t.set("content-type",o)}return t}function R6(e){return Qw(e)?"application/json":null}function O6(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(Qw(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 T6(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 Jw.includes(o)?o.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function A6(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var C6=class Xw extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,Xw.prototype)}};async function _d(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new C6(n.issues);return n.value}var Jw=["get","post","put","patch","delete"],I6=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}}}),M6=e=>{async function t(n,o){const i=io(Gr(Gr({},e),o),{plugins:[...e?.plugins||[],I6(e||{})]});if(e?.catchAllError)try{return await vv(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 vv(n,i)}return t};function N6(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];Jw.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 w=o[y];c=c.replace(_,w)}}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 vv=async(e,t)=>{var n,o,i,l,c,d,f,h;const{hooks:v,url:p,options:y}=await v6(e,t),_=w6(y),w=new AbortController,S=(n=y.signal)!=null?n:w.signal,T=N6(p,y),R=O6(y),A=await x6(y),C=T6(p,y);let O=io(Gr({},y),{url:T,headers:A,body:R,method:C,signal:S});for(const j of v.onRequest)if(j){const ne=await j(O);ne instanceof Object&&(O=ne)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((o=t?.body)==null?void 0:o.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:M}=A6(y,w);let L=await _(O.url,O);M();const N={response:L,request:O};for(const j of v.onResponse)if(j){const ne=await j(io(Gr({},N),{response:(i=t?.hookOptions)!=null&&i.cloneResponse?L.clone():L}));ne instanceof Response?L=ne:ne instanceof Object&&(L=ne.response)}if(L.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const ne=E6(L),ae={data:"",response:L,request:O};if(ne==="json"||ne==="text"){const P=await L.text(),H=await((l=O.jsonParser)!=null?l:aE)(P);ae.data=H}else ae.data=await L[ne]();O?.output&&O.output&&!O.disableValidation&&(ae.data=await _d(O.output,ae.data));for(const P of v.onSuccess)P&&await P(io(Gr({},ae),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?L.clone():L}));return t?.throw?ae.data:{data:ae.data,error:null}}const D=(d=t?.jsonParser)!=null?d:aE,z=await L.text(),W=S6(z),G=W?await D(z):null,K={response:L,responseText:z,request:O,error:io(Gr({},G),{status:L.status,statusText:L.statusText})};for(const j of v.onError)j&&await j(io(Gr({},K),{response:(f=t?.hookOptions)!=null&&f.cloneResponse?L.clone():L}));if(t?.retry){const j=y6(t.retry),ne=(h=t.retryAttempt)!=null?h:0;if(await j.shouldAttemptRetry(ne,L)){for(const P of v.onRetry)P&&await P(N);const ae=j.getDelay(ne);return await new Promise(P=>setTimeout(P,ae)),await vv(e,io(Gr({},t),{retryAttempt:ne+1}))}}if(t?.throw)throw new m6(L.status,L.statusText,W?G:z);return{data:null,error:io(Gr({},G),{status:L.status,statusText:L.statusText})}};const gm=Symbol.for("better-auth:broadcast-channel"),D6=()=>Math.floor(Date.now()/1e3);var L6=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:D6()}))}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 ym(e="better-auth.message"){return globalThis[gm]||(globalThis[gm]=new L6(e)),globalThis[gm]}const bm=Symbol.for("better-auth:focus-manager");var P6=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 sE(){return globalThis[bm]||(globalThis[bm]=new P6),globalThis[bm]}const _m=Symbol.for("better-auth:online-manager");var k6=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 Em(){return globalThis[_m]||(globalThis[_m]=new k6),globalThis[_m]}const j6=()=>typeof window>"u",Gl=(e,t,n,o)=>{const i=Es({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()=>{j6()||(c?await l():Ww(i,()=>{const f=setTimeout(async()=>{c||(await l(),c=!0)},0);return()=>{i.off(),d.off(),clearTimeout(f)}}))});return i},cs=()=>Math.floor(Date.now()/1e3),z6=5;function U6(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||Em().isOnline,v=A=>{if(!h())return;if(A?.event==="storage"){f.lastSync=cs(),n.set(!n.get());return}const C=t.get();if(A?.event==="poll"){f.lastSessionRequest=cs(),o("/get-session").then(O=>{t.set({...C,data:O.data,error:O.error||null}),f.lastSync=cs(),n.set(!n.get())}).catch(()=>{});return}A?.event==="visibilitychange"&&cs()-f.lastSessionRequest<z6&&C?.data!==null&&C?.data!==void 0||(C?.data===null||C?.data===void 0||A?.event==="visibilitychange")&&(A?.event==="visibilitychange"&&(f.lastSessionRequest=cs()),f.lastSync=cs(),n.set(!n.get()))},p=A=>{ym().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=ym().subscribe(()=>{v({event:"storage"})})},w=()=>{c&&(f.unsubscribeFocus=sE().subscribe(()=>{v({event:"visibilitychange"})}))},S=()=>{f.unsubscribeOnline=Em().subscribe(A=>{A&&v({event:"visibilitychange"})})};return{init:()=>{y(),_(),w(),S(),ym().setup(),sE().setup(),Em().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 B6={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 F6(e,t){const n=Es(!1),o=Gl(n,"/get-session",e,{method:"GET"});return Ww(o,()=>{const i=U6({sessionAtom:o,sessionSignal:n,$fetch:e,options:t});return i.init(),()=>{i.cleanup()}}),{session:o,$sessionSignal:n}}const $6=(e,t)=>{const n="credentials"in Request.prototype,o=X5(e?.baseURL,e?.basePath)??"/api/auth",i=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==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=M6({baseURL:o,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?a6(O,{strict:!1}):null},customFetchImpl:fetch,...v,plugins:[l,...v.plugins||[],...e?.disableDefaultFetchPlugins?[]:[B6],...i]}),{$sessionSignal:y,session:_}=F6(p,e),w=e?.plugins||[];let S={},T={$sessionSignal:y,session:_},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const A=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"}}];for(const O of w)O.getAtoms&&Object.assign(T,O.getAtoms?.(p)),O.pathMethods&&Object.assign(R,O.pathMethods),O.atomListeners&&A.push(...O.atomListeners);const C={notify:O=>{T[O].set(!T[O].get())},listen:(O,M)=>{T[O].subscribe(M)},atoms:T};for(const O of w)O.getActions&&Object.assign(S,O.getActions?.(p,C,e));return{get baseURL(){return o},pluginsActions:S,pluginsAtoms:T,pluginPathMethods:R,atomListeners:A,$fetch:p,$store:C}};function V6(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function H6(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 G6(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"||V6(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:w,...S}=p,T={...y,...w},R=H6(v,n,p);return await t(v,{...T,body:R==="GET"?void 0:{...S,...T?.body||{}},query:_||T?.query,method:R,async onSuccess(A){if(await T?.onSuccess?.(A),!i||T.disableSignal)return;const C=i.filter(O=>O.matcher(v));if(C.length)for(const O of C){const M=o[O.signal];if(!M)return;const L=M.get();setTimeout(()=>{M.set(!L)},10)}}})}})}return l()}function q6(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?c6(e,o,f):e.listen(f)},i),c=()=>n.current;return E.useSyncExternalStore(l,c,c)}function Z6(e){return`use${Y6(e)}`}function Y6(e){return e.charAt(0).toUpperCase()+e.slice(1)}function K6(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:o,$fetch:i,$store:l,atomListeners:c}=$6(e);let d={};for(const[f,h]of Object.entries(o))d[Z6(f)]=()=>q6(h);return G6({...n,...d,$fetch:i,$store:l},i,t,o,c)}function W6(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 ex(e){return{newRole(t){return W6(t)},statements:e}}const Q6={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},tx=ex(Q6),nx=tx.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),rx=tx.newRole({user:[],session:[]}),X6={admin:nx,user:rx},J6=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||X6;for(const o of t)if(n[o]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},eI={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},mg=ex(eI),ox=mg.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ax=mg.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ix=mg.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),tI={admin:ox,owner:ax,member:ix},nI=(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},rI=e=>{const t={admin:nx,user:rx,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>J6({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},oI=()=>({id:"magic-link",$InferServerPlugin:{}}),aI=e=>nI(e,e.options.roles||tI),iI=e=>{const t=Es(!1),n=Es(!1),o=Es(!1),i=Es(!1),l={admin:ox,member:ix,owner:ax,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(c,d,f)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:h=>aI({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"}]}},sI=e=>({id:"sso-client",$InferServerPlugin:{}}),lI=K6({plugins:[iI({}),rI(),sI(),oI()]});function sx(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=sx(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function lx(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=sx(e))&&(o&&(o+=" "),o+=t);return o}const cI=(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},uI=(e,t)=>({classGroupId:e,validator:t}),cx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),zd="-",lE=[],dI="arbitrary..",fI=e=>{const t=pI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return hI(c);const d=c.split(zd),f=d[0]===""&&d.length>1?1:0;return ux(d,f,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const f=o[c],h=n[c];return f?h?cI(h,f):f:h||lE}return n[c]||lE}}},ux=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],l=n.nextPart.get(i);if(l){const h=ux(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}},hI=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?dI+o:void 0})(),pI=e=>{const{theme:t,classGroups:n}=e;return mI(n,t)},mI=(e,t)=>{const n=cx();for(const o in e){const i=e[o];vg(i,n,o,t)}return n},vg=(e,t,n,o)=>{const i=e.length;for(let l=0;l<i;l++){const c=e[l];vI(c,t,n,o)}},vI=(e,t,n,o)=>{if(typeof e=="string"){gI(e,t,n);return}if(typeof e=="function"){yI(e,t,n,o);return}bI(e,t,n,o)},gI=(e,t,n)=>{const o=e===""?t:dx(t,e);o.classGroupId=n},yI=(e,t,n,o)=>{if(_I(e)){vg(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(uI(n,e))},bI=(e,t,n,o)=>{const i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){const[d,f]=i[c];vg(f,dx(t,d),n,o)}},dx=(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=cx(),n.nextPart.set(c,d)),n=d}return n},_I=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,EI=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)}}},gv="!",cE=":",SI=[],uE=(e,t,n,o,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:i}),wI=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 S=0;S<v;S++){const T=i[S];if(c===0&&d===0){if(T===cE){l.push(i.slice(f,S)),f=S+1;continue}if(T==="/"){h=S;continue}}T==="["?c++:T==="]"?c--:T==="("?d++:T===")"&&d--}const p=l.length===0?i:i.slice(f);let y=p,_=!1;p.endsWith(gv)?(y=p.slice(0,-1),_=!0):p.startsWith(gv)&&(y=p.slice(1),_=!0);const w=h&&h>f?h-f:void 0;return uE(l,_,y,w)};if(t){const i=t+cE,l=o;o=c=>c.startsWith(i)?l(c.slice(i.length)):uE(SI,!1,c,void 0,!0)}if(n){const i=o;o=l=>n({className:l,parseClassName:i})}return o},xI=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}},RI=e=>({cache:EI(e.cacheSize),parseClassName:wI(e),sortModifiers:xI(e),...fI(e)}),OI=/\s+/,TI=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:l}=t,c=[],d=e.trim().split(OI);let f="";for(let h=d.length-1;h>=0;h-=1){const v=d[h],{isExternal:p,modifiers:y,hasImportantModifier:_,baseClassName:w,maybePostfixModifierPosition:S}=n(v);if(p){f=v+(f.length>0?" "+f:f);continue}let T=!!S,R=o(T?w.substring(0,S):w);if(!R){if(!T){f=v+(f.length>0?" "+f:f);continue}if(R=o(w),!R){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+gv:A,O=C+R;if(c.indexOf(O)>-1)continue;c.push(O);const M=i(R,T);for(let L=0;L<M.length;++L){const N=M[L];c.push(C+N)}f=v+(f.length>0?" "+f:f)}return f},AI=(...e)=>{let t=0,n,o,i="";for(;t<e.length;)(n=e[t++])&&(o=fx(n))&&(i&&(i+=" "),i+=o);return i},fx=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=fx(e[o]))&&(n&&(n+=" "),n+=t);return n},CI=(e,...t)=>{let n,o,i,l;const c=f=>{const h=t.reduce((v,p)=>p(v),e());return n=RI(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=TI(f,n);return i(f,v),v};return l=c,(...f)=>l(AI(...f))},II=[],ln=e=>{const t=n=>n[e]||II;return t.isThemeGetter=!0,t},hx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,px=/^\((?:(\w[\w-]*):)?(.+)\)$/i,MI=/^\d+\/\d+$/,NI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DI=/\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$/,LI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,PI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,us=e=>MI.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),ya=e=>!!e&&Number.isInteger(Number(e)),Sm=e=>e.endsWith("%")&&We(e.slice(0,-1)),Uo=e=>NI.test(e),jI=()=>!0,zI=e=>DI.test(e)&&!LI.test(e),mx=()=>!1,UI=e=>PI.test(e),BI=e=>kI.test(e),FI=e=>!Ae(e)&&!Ce(e),$I=e=>Ps(e,yx,mx),Ae=e=>hx.test(e),ri=e=>Ps(e,bx,zI),wm=e=>Ps(e,ZI,We),dE=e=>Ps(e,vx,mx),VI=e=>Ps(e,gx,BI),Ku=e=>Ps(e,_x,UI),Ce=e=>px.test(e),jl=e=>ks(e,bx),HI=e=>ks(e,YI),fE=e=>ks(e,vx),GI=e=>ks(e,yx),qI=e=>ks(e,gx),Wu=e=>ks(e,_x,!0),Ps=(e,t,n)=>{const o=hx.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},ks=(e,t,n=!1)=>{const o=px.exec(e);return o?o[1]?t(o[1]):n:!1},vx=e=>e==="position"||e==="percentage",gx=e=>e==="image"||e==="url",yx=e=>e==="length"||e==="size"||e==="bg-size",bx=e=>e==="length",ZI=e=>e==="number",YI=e=>e==="family-name",_x=e=>e==="shadow",KI=()=>{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"),w=ln("blur"),S=ln("perspective"),T=ln("aspect"),R=ln("ease"),A=ln("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...O(),Ce,Ae],L=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],D=()=>[Ce,Ae,f],z=()=>[us,"full","auto",...D()],W=()=>[ya,"none","subgrid",Ce,Ae],G=()=>["auto",{span:["full",ya,Ce,Ae]},ya,Ce,Ae],K=()=>[ya,"auto",Ce,Ae],j=()=>["auto","min","max","fr",Ce,Ae],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...D()],F=()=>[us,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],H=()=>[e,Ce,Ae],re=()=>[...O(),fE,dE,{position:[Ce,Ae]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",GI,$I,{size:[Ce,Ae]}],Q=()=>[Sm,jl,ri],ee=()=>["","none","full",h,Ce,Ae],se=()=>["",We,jl,ri],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,Sm,fE,dE],Se=()=>["","none",w,Ce,Ae],De=()=>["none",We,Ce,Ae],Le=()=>["none",We,Ce,Ae],Ee=()=>[We,Ce,Ae],ze=()=>[us,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Uo],breakpoint:[Uo],color:[jI],container:[Uo],"drop-shadow":[Uo],ease:["in","out","in-out"],font:[FI],"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",us,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:M()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],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:[us,"full","auto",d,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,us,"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:G()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"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,ri]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ce,wm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Sm,Ae]}],"font-family":[{font:[HI,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,wm]}],leading:[{leading:[l,...D()]}],"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:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Ce,ri]}],"text-decoration-color":[{decoration:H()}],"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:D()}],"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:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ya,Ce,Ae],radial:["",Ce,Ae],conic:[ya,Ce,Ae]},qI,VI]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"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:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Ce,Ae]}],"outline-w":[{outline:["",We,jl,ri]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",v,Wu,Ku]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",p,Wu,Ku]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[We,ri]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",y,Wu,Ku]}],"text-shadow-color":[{"text-shadow":H()}],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":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"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":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"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":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"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":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"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":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"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":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"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":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"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":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":O()}],"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":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"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:k()}],"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":H()}],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":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"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",R,Ce,Ae]}],delay:[{delay:[We,Ce,Ae]}],animate:[{animate:["none",A,Ce,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ce,Ae]}],"perspective-origin":[{"perspective-origin":M()}],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:M()}],"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:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",...H()]}],"stroke-w":[{stroke:[We,jl,ri,wm]}],stroke:[{stroke:["none",...H()]}],"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"]}},WI=CI(KI),lH=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 Ex extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Sx={};function Ma(e){return Sx}function wx(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 yv(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 gg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function QI(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 hE=Symbol("evaluating");function at(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==hE)return o===void 0&&(o=hE,o=n()),o},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function _i(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ka(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function pE(e){return JSON.stringify(e)}function XI(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const xx="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function oc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const JI=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 Rx(e){return Ms(e)?{...e}:Array.isArray(e)?[...e]:e}const eM=new Set(["string","number","symbol"]);function Ns(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ja(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 tM(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const nM={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 rM(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=ka(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 _i(this,"shape",c),c},checks:[]});return ja(e,l)}function oM(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=ka(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 _i(this,"shape",c),c},checks:[]});return ja(e,l)}function aM(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=ka(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return _i(this,"shape",l),l}});return ja(e,i)}function iM(e,t){if(!Ms(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ka(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return _i(this,"shape",o),o}});return ja(e,n)}function sM(e,t){const n=ka(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return _i(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return ja(e,n)}function lM(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=ka(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 _i(this,"shape",f),f},checks:[]});return ja(t,c)}function cM(e,t,n){const o=ka(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 _i(this,"shape",l),l}});return ja(t,o)}function Ss(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 li(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 Na(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 Ox(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function yg(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 Tx=(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,yv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},bg=ie("$ZodError",Tx),vf=ie("$ZodError",Tx,{Parent:Error});function uM(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 dM(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=>Na(f,l,Ma())));throw xx(d,i?.callee),d}return c.value},fM=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=>Na(f,l,Ma())));throw xx(d,i?.callee),d}return c.value},hM=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??bg)(l.issues.map(c=>Na(c,i,Ma())))}:{success:!0,data:l.value}},pM=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=>Na(c,i,Ma())))}:{success:!0,data:l.value}},mM=_f(vf),vM=e=>(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return gf(e)(t,n,i)},gM=e=>(t,n,o)=>gf(e)(t,n,o),yM=e=>async(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return yf(e)(t,n,i)},bM=e=>async(t,n,o)=>yf(e)(t,n,o),_M=e=>(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return bf(e)(t,n,i)},EM=e=>(t,n,o)=>bf(e)(t,n,o),SM=e=>async(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return _f(e)(t,n,i)},wM=e=>async(t,n,o)=>_f(e)(t,n,o),xM=/^[cC][^\s-]{8,}$/,RM=/^[0-9a-z]+$/,OM=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,TM=/^[0-9a-vA-V]{20}$/,AM=/^[A-Za-z0-9]{27}$/,CM=/^[a-zA-Z0-9_-]{21}$/,IM=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,MM=/^([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})$/,mE=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)$/,NM=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,DM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function LM(){return new RegExp(DM,"u")}const PM=/^(?:(?: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])$/,kM=/^(([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}|:))$/,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])\/([0-9]|[1-2][0-9]|3[0-2])$/,zM=/^(([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])$/,UM=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ax=/^[A-Za-z0-9_-]*$/,BM=/^\+[1-9]\d{6,14}$/,Cx="(?:(?:\\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])))",FM=new RegExp(`^${Cx}$`);function Ix(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 $M(e){return new RegExp(`^${Ix(e)}$`)}function VM(e){const t=Ix({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(`^${Cx}T(?:${o})$`)}const HM=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},GM=/^-?\d+$/,Mx=/^-?\d+(?:\.\d+)?$/,qM=/^(?:true|false)$/i,ZM=/^null$/i,YM=/^[^A-Z]*$/,KM=/^[^a-z]*$/,Cn=ie("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Nx={number:"number",bigint:"bigint",object:"date"},Dx=ie("$ZodCheckLessThan",(e,t)=>{Cn.init(e,t);const n=Nx[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})}}),Lx=ie("$ZodCheckGreaterThan",(e,t)=>{Cn.init(e,t);const n=Nx[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})}}),WM=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):QI(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})}}),QM=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]=nM[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=GM)}),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})}}),XM=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:Ox(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),JM=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:Ox(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),eN=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=yg(i);o.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),tN=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=yg(i);o.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),nN=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=yg(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=()=>{})}),rN=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})}}),oN=ie("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=YM),Ef.init(e,t)}),aN=ie("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=KM),Ef.init(e,t)}),iN=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})}}),sN=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})}}),lN=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})}}),cN=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})}}),uN=ie("$ZodCheckOverwrite",(e,t)=>{Cn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class dN{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(`
|
|
10
|
+
`).replace(OC,"")}function Mb(r,a){return a=Ib(a),Ib(r)===a}function Et(r,a,s,u,m,g){switch(s){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Mi(r,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Mi(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":M0(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=eA.get(s)||s,Ic(r,s,u))}}function Mp(r,a,s,u,m,g){switch(s){case"style":M0(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"?Mi(r,u):(typeof u=="number"||typeof u=="bigint")&&Mi(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(!S0.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 I=g=x=m=null,B=null,J=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":J=le;break;case"value":g=le;break;case"defaultValue":I=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,a));break;default:Et(r,a,u,le,s,null)}}T0(r,g,I,B,J,x,m,!1);return;case"select":Je("invalid",r),u=x=g=null;for(m in s)if(s.hasOwnProperty(m)&&(I=s[m],I!=null))switch(m){case"value":g=I;break;case"defaultValue":x=I;break;case"multiple":u=I;default:Et(r,a,m,I,s,null)}a=g,s=x,r.multiple=!!u,a!=null?Ii(r,!!u,a,!1):s!=null&&Ii(r,!!u,s,!0);return;case"textarea":Je("invalid",r),g=m=u=null;for(x in s)if(s.hasOwnProperty(x)&&(I=s[x],I!=null))switch(x){case"value":u=I;break;case"defaultValue":m=I;break;case"children":g=I;break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(91));break;default:Et(r,a,x,I,s,null)}C0(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(J in s)if(s.hasOwnProperty(J)&&(u=s[J],u!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Et(r,a,J,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(I in s)s.hasOwnProperty(I)&&(u=s[I],u!=null&&Et(r,a,I,u,s,null))}function TC(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,I=null,B=null,J=null,le=null;for(oe in s){var de=s[oe];if(s.hasOwnProperty(oe)&&de!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":B=de;default:u.hasOwnProperty(oe)||Et(r,a,oe,null,u,de)}}for(var te in u){var oe=u[te];if(de=s[te],u.hasOwnProperty(te)&&(oe!=null||de!=null))switch(te){case"type":g=oe;break;case"name":m=oe;break;case"checked":J=oe;break;case"defaultChecked":le=oe;break;case"value":x=oe;break;case"defaultValue":I=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,a));break;default:oe!==de&&Et(r,a,te,oe,u,de)}}Vf(r,x,I,B,J,le,g,m);return;case"select":oe=x=I=te=null;for(g in s)if(B=s[g],s.hasOwnProperty(g)&&B!=null)switch(g){case"value":break;case"multiple":oe=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":te=g;break;case"defaultValue":I=g;break;case"multiple":x=g;default:g!==B&&Et(r,a,m,g,u,B)}a=I,s=x,u=oe,te!=null?Ii(r,!!s,te,!1):!!u!=!!s&&(a!=null?Ii(r,!!s,a,!0):Ii(r,!!s,s?[]:"",!1));return;case"textarea":oe=te=null;for(I in s)if(m=s[I],s.hasOwnProperty(I)&&m!=null&&!u.hasOwnProperty(I))switch(I){case"value":break;case"children":break;default:Et(r,a,I,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":te=m;break;case"defaultValue":oe=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)}A0(r,te,oe);return;case"option":for(var Te in s)te=s[Te],s.hasOwnProperty(Te)&&te!=null&&!u.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:Et(r,a,Te,null,u,te));for(B in u)te=u[B],oe=s[B],u.hasOwnProperty(B)&&te!==oe&&(te!=null||oe!=null)&&(B==="selected"?r.selected=te&&typeof te!="function"&&typeof te!="symbol":Et(r,a,B,te,u,oe));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)te=s[je],s.hasOwnProperty(je)&&te!=null&&!u.hasOwnProperty(je)&&Et(r,a,je,null,u,te);for(J in u)if(te=u[J],oe=s[J],u.hasOwnProperty(J)&&te!==oe&&(te!=null||oe!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(o(137,a));break;default:Et(r,a,J,te,u,oe)}return;default:if(Gf(a)){for(var St in s)te=s[St],s.hasOwnProperty(St)&&te!==void 0&&!u.hasOwnProperty(St)&&Mp(r,a,St,void 0,u,te);for(le in u)te=u[le],oe=s[le],!u.hasOwnProperty(le)||te===oe||te===void 0&&oe===void 0||Mp(r,a,le,te,u,oe);return}}for(var Y in s)te=s[Y],s.hasOwnProperty(Y)&&te!=null&&!u.hasOwnProperty(Y)&&Et(r,a,Y,null,u,te);for(de in u)te=u[de],oe=s[de],!u.hasOwnProperty(de)||te===oe||te==null&&oe==null||Et(r,a,de,te,u,oe)}function Nb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AC(){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,I=m.duration;if(g&&I&&Nb(x)){for(x=0,I=m.responseEnd,u+=1;u<s.length;u++){var B=s[u],J=B.startTime;if(J>I)break;var le=B.transferSize,de=B.initiatorType;le&&Nb(de)&&(B=B.responseEnd,x+=le*(B<I?1:(I-J)/(B-J)))}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 Db(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 Lb(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 CC(){var r=window.event;return r&&r.type==="popstate"?r===Pp?!1:(Pp=r,!0):(Pp=null,!1)}var Pb=typeof setTimeout=="function"?setTimeout:void 0,IC=typeof clearTimeout=="function"?clearTimeout:void 0,kb=typeof Promise=="function"?Promise:void 0,MC=typeof queueMicrotask=="function"?queueMicrotask:typeof kb<"u"?function(r){return kb.resolve(null).then(r).catch(NC)}:Pb;function NC(r){setTimeout(function(){throw r})}function da(r){return r==="head"}function jb(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),ls(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,I=g.nodeName;g[Bs]||I==="SCRIPT"||I==="STYLE"||I==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=x}}else s==="body"&&Sl(r.ownerDocument.body);s=m}while(s);ls(a)}function zb(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 DC(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 LC(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 Ub(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 PC(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 Bb(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 Fb(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 $b(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,Vb=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:kC,r:jC,D:zC,C:UC,L:BC,m:FC,X:VC,S:$C,M:HC};function kC(){var r=zo.f(),a=_u();return r||a}function jC(r){var a=Ti(r);a!==null&&a.tag===5&&a.type==="form"?i1(a):zo.r(r)}var as=typeof document>"u"?null:document;function Hb(r,a,s){var u=as;if(u&&typeof a=="string"&&a){var m=Er(a);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Vb.has(m)||(Vb.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 zC(r){zo.D(r),Hb("dns-prefetch",r,null)}function UC(r,a){zo.C(r,a),Hb("preconnect",r,a)}function BC(r,a,s){zo.L(r,a,s);var u=as;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=is(r);break;case"script":g=ss(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 FC(r,a){zo.m(r,a);var s=as;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=ss(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 $C(r,a,s){zo.S(r,a,s);var u=as;if(u&&r){var m=Ai(u).hoistableStyles,g=is(r);a=a||"default";var x=m.get(g);if(!x){var I={loading:0,preload:null};if(x=u.querySelector(wl(g)))I.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(J,le){B.onload=J,B.onerror=le}),B.addEventListener("load",function(){I.loading|=1}),B.addEventListener("error",function(){I.loading|=2}),I.loading|=4,Iu(x,a,u)}x={type:"stylesheet",instance:x,count:1,state:I},m.set(g,x)}}}function VC(r,a){zo.X(r,a);var s=as;if(s&&r){var u=Ai(s).hoistableScripts,m=ss(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 HC(r,a){zo.M(r,a);var s=as;if(s&&r){var u=Ai(s).hoistableScripts,m=ss(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 Gb(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=is(s.href),s=Ai(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=is(s.href);var g=Ai(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||GC(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=ss(s),s=Ai(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 is(r){return'href="'+Er(r)+'"'}function wl(r){return'link[rel="stylesheet"]['+r+"]"}function qb(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function GC(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 ss(r){return'[src="'+Er(r)+'"]'}function xl(r){return"script[async]"+r}function Zb(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=is(s.href);var g=r.querySelector(wl(m));if(g)return a.state.loading|=4,a.instance=g,fn(g),g;u=qb(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(I,B){x.onload=I,x.onerror=B}),Rn(g,"link",u),a.state.loading|=4,Iu(g,s.precedence,r),a.instance=g;case"script":return g=ss(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 I=u[x];if(I.dataset.precedence===a)g=I;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 Yb(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 I=u.get(x);I?I.push(g):u.set(x,[g])}}return u}function Kb(r,a,s){r=r.ownerDocument||r,r.head.insertBefore(s,a==="title"?r.querySelector("head > title"):null)}function qC(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 Wb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function ZC(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=is(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=qb(u),(m=Cr.get(m))&&Bp(u,m),g=g.createElement("link"),fn(g);var x=g;x._p=new Promise(function(I,B){x.onload=I,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 YC(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*AC());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(KC,r),Du=null,Nu.call(r))}function KC(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:H,_currentValue2:H,_threadCount:0};function WC(r,a,s,u,m,g,x,I,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 Qb(r,a,s,u,m,g,x,I,B,J,le,de){return r=new WC(r,a,s,x,B,J,le,de,I),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 Xb(r){return r?(r=zi,r):zi}function Jb(r,a,s,u,m,g){m=Xb(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 e_(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){e_(r,a),(r=r.alternate)&&e_(r,a)}function t_(r){if(r.tag===13||r.tag===31){var a=Ha(r,67108864);a!==null&&Zn(a,r,67108864),Vp(r,67108864)}}function n_(r){if(r.tag===13||r.tag===31){var a=sr();a=xi(a);var s=Ha(r,a);s!==null&&Zn(s,r,a),Vp(r,a)}}var Pu=!0;function QC(r,a,s,u){var m=P.T;P.T=null;var g=F.p;try{F.p=2,Hp(r,a,s,u)}finally{F.p=g,P.T=m}}function XC(r,a,s,u){var m=P.T;P.T=null;var g=F.p;try{F.p=8,Hp(r,a,s,u)}finally{F.p=g,P.T=m}}function Hp(r,a,s,u){if(Pu){var m=Gp(u);if(m===null)Ip(r,a,u,ku,s),o_(r,u);else if(e4(m,r,a,s,u))u.stopPropagation();else if(o_(r,u),a&4&&-1<JC.indexOf(r)){for(;m!==null;){var g=Ti(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 I=g;for(I.pendingLanes|=2,I.entangledLanes|=2;x;){var B=1<<31-Yt(x);I.entanglements[1]|=B,x&=~B}ro(g),(dt&6)===0&&(yu=ue()+500,bl(0))}}break;case 31:case 13:I=Ha(g,2),I!==null&&Zn(I,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=Oi(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 r_(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=[],JC="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 o_(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=Ti(a),a!==null&&t_(a)),r):(r.eventSystemFlags|=u,a=r.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),r)}function e4(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 a_(r){var a=Oi(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,b0(r.priority,function(){n_(s)});return}}else if(a===31){if(a=d(s),a!==null){r.blockedOn=a,b0(r.priority,function(){n_(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=Ti(s),a!==null&&t_(a),r.blockedOn=s,!1;a.shift()}return!0}function i_(r,a,s){ju(r)&&s.delete(a)}function t4(){Zp=!1,fa!==null&&ju(fa)&&(fa=null),ha!==null&&ju(ha)&&(ha=null),pa!==null&&ju(pa)&&(pa=null),Ol.forEach(i_),Tl.forEach(i_)}function zu(r,a){r.blockedOn===a&&(r.blockedOn=null,Zp||(Zp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,t4)))}var Uu=null;function s_(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=Ti(s);g!==null&&(r.splice(a,3),a-=3,Gh(g,{pending:!0,data:m,method:s.method,action:u},u,m))}}))}function ls(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);)a_(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||s_(s);else if(x){var I=null;if(g&&g.hasAttribute("formAction")){if(m=g,x=g[Fn]||null)I=x.formAction;else if(qp(m)!==null)continue}else I=x.action;typeof I=="function"?s[u+1]=I:(s.splice(u,3),u-=3),s_(s)}}}function l_(){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();Jb(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;Jb(r.current,2,null,r,null,null),_u(),a[Ri]=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&&a_(r)}};var c_=t.version;if(c_!=="19.2.3")throw Error(o(527,c_,"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 n4={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:P,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(n4),At=Fu}catch{}}return Il.createRoot=function(r,a){if(!i(r))throw Error(o(299));var s=!1,u="",m=v1,g=g1,x=y1;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=Qb(r,1,!1,null,null,s,u,null,m,g,x,l_),r[Ri]=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=v1,x=g1,I=y1,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&&(I=s.onRecoverableError),s.formState!==void 0&&(B=s.formState)),a=Qb(r,1,!0,a,s??null,u,m,B,g,x,I,l_),a.context=Xb(null),s=a.current,u=sr(),u=xi(u),m=ea(u),m.callback=null,ta(s,m,u),s=u,a.current.lanes=s,lt(a,s),ro(a),r[Ri]=a.current,Cp(r),new Bu(a)},Il.version="19.2.3",Il}var __;function p4(){if(__)return Wp.exports;__=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=h4(),Wp.exports}var m4=p4(),E=Pa();const $=bi(E),Jv=o4({__proto__:null,default:$},[E]);var tm={exports:{}},nm={};var E_;function v4(){if(E_)return nm;E_=1;var e=Pa().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return nm.c=function(t){return e.H.useMemoCache(t)},nm}var S_;function g4(){return S_||(S_=1,tm.exports=v4()),tm.exports}var cf=g4(),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(){}},y4={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},b4=class{#e=y4;#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 b4;function _4(e){setTimeout(e,0)}var hi=typeof window>"u"||"Deno"in globalThis;function Qn(){}function E4(e,t){return typeof e=="function"?e(t):e}function ov(e){return typeof e=="number"&&e>=0&&e!==1/0}function vw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Oa(e,t){return typeof e=="function"?e(t):e}function Dr(e,t){return typeof e=="function"?e(t):e}function w_(e,t){const{type:n="all",exact:o,fetchStatus:i,predicate:l,queryKey:c,stale:d}=e;if(c){if(o){if(t.queryHash!==eg(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 x_(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 eg(e,t){return(t?.queryKeyHashFn||tc)(e)}function tc(e){return JSON.stringify(e,(t,n)=>iv(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 S4=Object.prototype.hasOwnProperty;function gw(e,t){if(e===t)return e;const n=R_(e)&&R_(t);if(!n&&!(iv(e)&&iv(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:S4.call(e,v))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){d[v]=y;continue}const _=gw(p,y);d[v]=_,_===p&&f++}return i===c&&f===i?e:d}function av(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 R_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function iv(e){if(!O_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!O_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function O_(e){return Object.prototype.toString.call(e)==="[object Object]"}function w4(e){return new Promise(t=>{si.setTimeout(t,e)})}function sv(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?gw(e,t):t}function x4(e,t,n=0){const o=[...e,t];return n&&o.length>n?o.slice(1):o}function R4(e,t,n=0){const o=[t,...e];return n&&o.length>n?o.slice(0,-1):o}var tg=Symbol();function yw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===tg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bw(e,t){return typeof e=="function"?e(...t):!!e}function O4(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 T4=class extends pc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!hi&&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"}},ng=new T4;function lv(){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 A4=_4;function C4(){let e=[],t=0,n=d=>{d()},o=d=>{d()},i=A4;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=C4(),I4=class extends pc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!hi&&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 I4;function M4(e){return Math.min(1e3*2**e,3e4)}function _w(e){return(e??"online")==="online"?Ad.isOnline():!0}var cv=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Ew(e){let t=!1,n=0,o;const i=lv(),l=()=>i.status!=="pending",c=S=>{if(!l()){const T=new cv(S);y(T),e.onCancel?.(T)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>ng.isFocused()&&(e.networkMode==="always"||Ad.isOnline())&&e.canRun(),v=()=>_w(e.networkMode)&&e.canRun(),p=S=>{l()||(o?.(),i.resolve(S))},y=S=>{l()||(o?.(),i.reject(S))},_=()=>new Promise(S=>{o=T=>{(l()||h())&&S(T)},e.onPause?.()}).then(()=>{o=void 0,l()||e.onContinue?.()}),w=()=>{if(l())return;let S;const T=n===0?e.initialPromise:void 0;try{S=T??e.fn()}catch(R){S=Promise.reject(R)}Promise.resolve(S).then(p).catch(R=>{if(l())return;const A=e.retry??(hi?0:3),C=e.retryDelay??M4,O=typeof C=="function"?C(n,R):C,M=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,R);if(t||!M){y(R);return}n++,e.onFail?.(n,R),w4(O).then(()=>h()?void 0:_()).then(()=>{t?y(R):w()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(o?.(),i),cancelRetry:d,continueRetry:f,canStart:v,start:()=>(v()?w():_().then(w),i)}}var Sw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ov(this.gcTime)&&(this.#e=si.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(si.clearTimeout(this.#e),this.#e=void 0)}},N4=class extends Sw{#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=A_(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=A_(this.options);t.data!==void 0&&(this.setState(T_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=sv(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===tg||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Oa(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:!vw(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=yw(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=Ew({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof cv&&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 cv){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,...ww(n.data,this.options),fetchMeta:e.meta??null};case"success":const o={...n,...T_(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 ww(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_w(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function T_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function A_(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 D4=class extends pc{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#i=lv(),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),C_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return uv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return uv(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&&!av(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&I_(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)||Oa(this.options.staleTime,this.#t)!==Oa(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 P4(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=Oa(this.options.staleTime,this.#t);if(hi||this.#o.isStale||!ov(e))return;const n=vw(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,!(hi||Dr(this.options.enabled,this.#t)===!1||!ov(this.#l)||this.#l===0)&&(this.#u=si.setInterval(()=>{(this.options.refetchIntervalInBackground||ng.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 D=this.hasListeners(),z=!D&&C_(e,t),W=D&&I_(e,n,t,o);(z||W)&&(v={...v,...ww(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:_,errorUpdatedAt:w,status:S}=v;y=v.data;let T=!1;if(t.placeholderData!==void 0&&y===void 0&&S==="pending"){let D;i?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(D=i.data,T=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(S="success",y=sv(i?.data,D,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=sv(i?.data,y,t),this.#f=y,this.#a=null}catch(D){this.#a=D}this.#a&&(_=this.#a,y=this.#f,w=Date.now(),S="error");const R=v.fetchStatus==="fetching",A=S==="pending",C=S==="error",O=A&&R,M=y!==void 0,N={status:S,fetchStatus:v.fetchStatus,isPending:A,isSuccess:S==="success",isError:C,isInitialLoading:O,isLoading:O,data:y,dataUpdatedAt:v.dataUpdatedAt,error:_,errorUpdatedAt:w,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:R,isRefetching:R&&!A,isLoadingError:C&&!M,isPaused:v.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&M,isStale:rg(e,t),refetch:this.refetch,promise:this.#i,isEnabled:Dr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=G=>{N.status==="error"?G.reject(N.error):N.data!==void 0&&G.resolve(N.data)},z=()=>{const G=this.#i=N.promise=lv();D(G)},W=this.#i;switch(W.status){case"pending":e.queryHash===n.queryHash&&D(W);break;case"fulfilled":(N.status==="error"||N.data!==W.value)&&z();break;case"rejected":(N.status!=="error"||N.error!==W.reason)&&z();break}}return N}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),av(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 L4(e,t){return Dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function C_(e,t){return L4(e,t)||e.state.data!==void 0&&uv(e,t,t.refetchOnMount)}function uv(e,t,n){if(Dr(t.enabled,e)!==!1&&Oa(t.staleTime,e)!=="static"){const o=typeof n=="function"?n(e):n;return o==="always"||o!==!1&&rg(e,t)}return!1}function I_(e,t,n,o){return(e!==t||Dr(o.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&rg(e,n)}function rg(e,t){return Dr(t.enabled,e)!==!1&&e.isStaleByTime(Oa(t.staleTime,e))}function P4(e,t){return!av(e.getCurrentResult(),t)}function M_(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=w=>{O4(w,()=>t.signal,()=>v=!0)},y=yw(t.options,t.fetchOptions),_=async(w,S,T)=>{if(v)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const A=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:S,direction:T?"backward":"forward",meta:t.options.meta};return p(L),L})(),C=await y(A),{maxPages:O}=t.options,M=T?R4:x4;return{pages:M(w.pages,C,O),pageParams:M(w.pageParams,S,O)}};if(i&&l.length){const w=i==="backward",S=w?xw:dv,T={pages:l,pageParams:c},R=S(o,T);d=await _(T,R,w)}else{const w=e??l.length;do{const S=f===0?c[0]??o.initialPageParam:dv(o,d);if(f>0&&S==null)break;d=await _(d,S),f++}while(f<w)}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 dv(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 xw(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function rH(e,t){return t?dv(e,t)!=null:!1}function oH(e,t){return!t||!e.getPreviousPageParam?!1:xw(e,t)!=null}var k4=class extends Sw{#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||j4(),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=Ew({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 j4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var z4=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 k4({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=>x_(t,n))}findAll(e={}){return this.getAll().filter(t=>x_(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 U4=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??eg(o,t);let l=this.get(i);return l||(l=new N4({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=>w_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>w_(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()})})}},B4=class{#e;#t;#n;#o;#r;#s;#i;#a;constructor(e={}){this.#e=e.queryCache||new U4,this.#t=e.mutationCache||new z4,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#i=ng.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(Oa(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=E4(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(Oa(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=M_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qn).catch(Qn)}ensureInfiniteQueryData(e){return e.behavior=M_(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=eg(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===tg&&(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()}},Rw=E.createContext(void 0),F4=e=>{const t=E.useContext(Rw);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$4=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(Rw.Provider,{value:e,children:t})),Ow=E.createContext(!1),V4=()=>E.useContext(Ow);Ow.Provider;function H4(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var G4=E.createContext(H4()),q4=()=>E.useContext(G4),Z4=(e,t,n)=>{const o=n?.state.error&&typeof e.throwOnError=="function"?bw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(t.isReset()||(e.retryOnMount=!1))},Y4=e=>{E.useEffect(()=>{e.clearReset()},[e])},K4=({result:e,errorResetBoundary:t,throwOnError:n,query:o,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(i&&e.data===void 0||bw(n,[e.error,o])),W4=(e,t)=>t.state.data===void 0,Q4=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))}},X4=(e,t)=>e.isLoading&&e.isFetching&&!t,J4=(e,t)=>e?.suspense&&t.isPending,N_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function e3(e,t,n){const o=V4(),i=q4(),l=F4(n),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const d=l.getQueryCache().get(c.queryHash);c._optimisticResults=o?"isRestoring":"optimistic",Q4(c),Z4(c,i,d),Y4(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]),J4(c,v))throw N_(c,h,i);if(K4({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&&!hi&&X4(v,o)&&(f?N_(c,h,i):d?.promise)?.catch(Qn).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?v:h.trackResult(v)}function t3(e,t){return e3({...e,enabled:!0,suspense:!0,throwOnError:W4,placeholderData:void 0},D4,t)}const n3={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]},Tw=E.createContext(void 0);async function r3(){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 o3(e){const t=cf.c(4),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:n3.authConfig(),queryFn:r3,staleTime:1/0},t[0]=o):o=t[0];const{data:i}=t3(o);let l;return t[1]!==i||t[2]!==n?(l=b.jsx(Tw.Provider,{value:i,children:n}),t[1]=i,t[2]=n,t[3]=l):l=t[3],l}function aH(){const e=E.useContext(Tw);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const fv=new WeakMap,a3=new WeakMap,Cd={current:[]};let rm=!1,Yl=0;const Vl=new Set,Vu=new Map;function Aw(e){for(const t of e){if(Cd.current.includes(t))continue;Cd.current.push(t),t.recompute();const n=a3.get(t);if(n)for(const o of n){const i=fv.get(o);i?.length&&Aw(i)}}}function i3(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function s3(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function Cw(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,i3(n)}for(const n of t){const o=fv.get(n);o&&(Cd.current.push(n),Aw(o))}for(const n of t){const o=fv.get(n);if(o)for(const i of o)s3(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&&Cw(t)}}}function l3(e){return typeof e=="function"}class c3{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):l3(t)?this.state=t(this.prevState):this.state=t,(i=(o=this.options)==null?void 0:o.onUpdate)==null||i.call(o),Cw(this)}}const Ta="__TSR_index",D_="popstate",L_="beforeunload";function u3(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[Ta];d=P_(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[Ta];d=P_(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[Ta]!==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 P_(e,t){t||(t={});const n=og();return{...t,key:n,__TSR_key:n,[Ta]:e}}function d3(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,o=t.history.replaceState;let i=[];const l=()=>i,c=D=>i=D,d=(D=>D),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 D=og();t.history.replaceState({[Ta]:0,key:D,__TSR_key:D},"")}let h=f(),v,p=!1,y=!1,_=!1,w=!1;const S=()=>h;let T,R;const A=()=>{T&&(N._ignoreSubscribers=!0,(T.isPush?t.history.pushState:t.history.replaceState)(T.state,"",T.href),N._ignoreSubscribers=!1,T=void 0,R=void 0,v=void 0)},C=(D,z,W)=>{const G=d(z);R||(v=h),h=Id(z,W),T={href:G,state:W,isPush:T?.isPush||D==="push"},R||(R=Promise.resolve().then(()=>A()))},O=D=>{h=f(),N.notify({type:D})},M=async()=>{if(y){y=!1;return}const D=f(),z=D.state[Ta]-h.state[Ta],W=z===1,G=z===-1,K=!W&&!G||p;p=!1;const j=K?"GO":G?"BACK":"FORWARD",ne=K?{type:"GO",index:z}:{type:G?"BACK":"FORWARD"};if(_)_=!1;else{const ae=l();if(typeof document<"u"&&ae.length){for(const P of ae)if(await P.blockerFn({currentLocation:h,nextLocation:D,action:j})){y=!0,t.history.go(1),N.notify(ne);return}}}h=f(),N.notify(ne)},L=D=>{if(w){w=!1;return}let z=!1;const W=l();if(typeof document<"u"&&W.length)for(const G of W){const K=G.enableBeforeUnload??!0;if(K===!0){z=!0;break}if(typeof K=="function"&&K()===!0){z=!0;break}}if(z)return D.preventDefault(),D.returnValue=""},N=u3({getLocation:S,getLength:()=>t.history.length,pushState:(D,z)=>C("push",D,z),replaceState:(D,z)=>C("replace",D,z),back:D=>(D&&(_=!0),w=!0,t.history.back()),forward:D=>{D&&(_=!0),w=!0,t.history.forward()},go:D=>{p=!0,t.history.go(D)},createHref:D=>d(D),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=o,t.removeEventListener(L_,L,{capture:!0}),t.removeEventListener(D_,M)},onBlocked:()=>{v&&h!==v&&(h=v)},getBlockers:l,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(L_,L,{capture:!0}),t.addEventListener(D_,M),t.history.pushState=function(...D){const z=n.apply(t.history,D);return N._ignoreSubscribers||O("PUSH"),z},t.history.replaceState=function(...D){const z=o.apply(t.history,D);return N._ignoreSubscribers||O("REPLACE"),z},N}function f3(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Id(e,t){const n=f3(e),o=n.indexOf("#"),i=n.indexOf("?"),l=og();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||{[Ta]:0,key:l,__TSR_key:l}}}function og(){return(Math.random()+1).toString(36).substring(7)}function Md(e){return e[e.length-1]}function h3(e){return typeof e=="function"}function xa(e,t){return h3(e)?e(t):e}const p3=Object.prototype.hasOwnProperty;function Nr(e,t){if(e===t)return e;const n=t,o=z_(e)&&z_(n);if(!o&&!(Nd(e)&&Nd(n)))return n;const i=o?e:k_(e);if(!i)return n;const l=o?n:k_(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:p3.call(e,p))&&h++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){f[p]=_;continue}const w=Nr(y,_);f[p]=w,w===y&&h++}return c===d&&h===c?e:f}function k_(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(!j_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!j_(n)||!n.hasOwnProperty("isPrototypeOf"))}function j_(e){return Object.prototype.toString.call(e)==="[object Object]"}function z_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ui(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(!ui(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)&&!ui(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||!ui(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 m3(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 Aa(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function v3(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function U_(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 v3(t)}function B_(e,t){if(!e)return e;const n=/%25|%5C/gi;let o=0,i="",l;for(;(l=n.exec(e))!==null;)i+=U_(e.slice(o,l.index))+l[0],o=n.lastIndex;return i=i+U_(o?e.slice(o):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}var g3="Invariant failed";function Fo(e,t){if(!e)throw new Error(g3)}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,pi=1,mi=2,rc=3,_s=4,y3=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,b3=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,_3=/^([^{]*)\{\$\}([^}]*)$/;function ag(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]=mi,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=pi,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const c=l.match(_3);if(c){const v=c[1].length;return n[0]=mi,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(b3);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(y3);if(f){const h=f[1],v=f[2],p=f[3],y=h.length;return n[0]=pi,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;for(;d<h;){const y=ag(f,d,t);let _;const w=d,S=y[5];switch(d=S+1,l++,y[0]){case Is:{const R=f.substring(y[2],y[3]);if(v){const A=i.static?.get(R);if(A)_=A;else{i.static??=new Map;const C=ws(n.fullPath??n.from);C.parent=i,C.depth=l,_=C,i.static.set(R,C)}}else{const A=R.toLowerCase(),C=i.staticInsensitive?.get(A);if(C)_=C;else{i.staticInsensitive??=new Map;const O=ws(n.fullPath??n.from);O.parent=i,O.depth=l,_=O,i.staticInsensitive.set(A,O)}}break}case pi:{const R=f.substring(w,y[1]),A=f.substring(y[4],S),C=v&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=i.dynamic?.find(N=>N.caseSensitive===C&&N.prefix===O&&N.suffix===M);if(L)_=L;else{const N=am(pi,n.fullPath??n.from,C,O,M);_=N,N.depth=l,N.parent=i,i.dynamic??=[],i.dynamic.push(N)}break}case rc:{const R=f.substring(w,y[1]),A=f.substring(y[4],S),C=v&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=i.optional?.find(N=>N.caseSensitive===C&&N.prefix===O&&N.suffix===M);if(L)_=L;else{const N=am(rc,n.fullPath??n.from,C,O,M);_=N,N.parent=i,N.depth=l,i.optional??=[],i.optional.push(N)}break}case mi:{const R=f.substring(w,y[1]),A=f.substring(y[4],S),C=v&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,M=A?C?A:A.toLowerCase():void 0,L=am(mi,n.fullPath??n.from,C,O,M);_=L,L.parent=i,L.depth=l,i.wildcard??=[],i.wildcard.push(L)}}i=_}const p=(n.path||!n.children)&&!n.isRoot;if(p&&f.endsWith("/")){const y=ws(n.fullPath??n.from);y.kind=_s,y.parent=i,l++,y.depth=l,i.index=y,i=y}p&&!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.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 ii(e){if(e.static)for(const t of e.static.values())ii(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ii(t);if(e.dynamic?.length){e.dynamic.sort(om);for(const t of e.dynamic)ii(t)}if(e.optional?.length){e.optional.sort(om);for(const t of e.optional)ii(t)}if(e.wildcard?.length){e.wildcard.sort(om);for(const t of e.wildcard)ii(t)}}function ws(e){return{kind:Is,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function am(e,t,n,o,i){return{kind:e,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,caseSensitive:n,prefix:o,suffix:i}}function E3(e,t){const n=ws("/"),o=new Uint16Array(6);for(const i of e)uf(!1,o,i,1,n,0);ii(n),t.masksTree=n,t.flatCache=Dd(1e3)}function S3(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const o=ig(e,t.masksTree);return t.flatCache.set(e,o),o}function w3(e,t,n,o,i){e||="/",o||="/";const l=t?`case\0${e}`:e;let c=i.singleCache.get(l);if(!c){c=ws("/");const d=new Uint16Array(6);uf(t,d,{from:e},1,c,0),i.singleCache.set(l,c)}return ig(o,c,n)}function x3(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=ig(e,t.segmentTree,n);return l&&(l.branch=A3(l.route)),t.matchCache.set(o,l),l}function R3(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function O3(e,t=!1,n){const o=ws(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=R3(h.fullPath);(!c[v]||h.fullPath.endsWith("/"))&&(c[v]=h)}d++}),ii(o),{processedTree:{segmentTree:o,singleCache:Dd(1e3),matchCache:Dd(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:c}}function ig(e,t,n=!1){const o=e.split("/"),i=I3(e,o,t,n);if(!i)return null;const l=T3(e,o,i);return"**"in i&&(l["**"]=i["**"]),{route:i.node.route,params:l}}function T3(e,t,n){const o=C3(n.node);let i=null;const l={};for(let c=0,d=0,f=0;d<o.length;c++,d++,f++){const h=o[d],v=t[c],p=f;if(v&&(f+=v.length),h.kind===pi){i??=n.node.fullPath.split("/");const y=i[d],_=h.prefix?.length??0;if(y.charCodeAt(_)===123){const S=h.suffix?.length??0,T=y.substring(_+2,y.length-S-1),R=v.substring(_,v.length-S);l[T]=decodeURIComponent(R)}else{const S=y.substring(1);l[S]=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,w=h.suffix?.length??0,S=y.substring(_+3,y.length-w-1),T=h.suffix||h.prefix?v.substring(_,v.length-w):v;T&&(l[S]=decodeURIComponent(T))}else if(h.kind===mi){const y=h,_=e.substring(p+(y.prefix?.length??0),e.length-(y.suffix?.length??0)),w=decodeURIComponent(_);l["*"]=w,l._splat=w;break}}return l}function A3(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function C3(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function I3(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();let{node:y,index:_,skipped:w,depth:S,statics:T,dynamics:R,optionals:A}=p;o&&y.route&&y.kind!==_s&&Ml(h,p)&&(h=p);const C=_===c;if(C&&(y.route&&!l&&Ml(v,p)&&(v=p),!y.optional&&!y.wildcard&&!y.index))continue;const O=C?void 0:t[_];let M;if(C&&y.index){const L={node:y.index,index:_,skipped:w,depth:S+1,statics:T,dynamics:R,optionals:A};if(T===c&&!R&&!A&&!w)return L;Ml(v,L)&&(v=L)}if(y.wildcard&&Ml(f,p))for(const L of y.wildcard){const{prefix:N,suffix:D}=L;if(!(N&&(C||!(L.caseSensitive?O:M??=O.toLowerCase()).startsWith(N)))){if(D){if(C)continue;const z=t.slice(_).join("/").slice(-D.length);if((L.caseSensitive?z:z.toLowerCase())!==D)continue}f={node:L,index:c,skipped:w,depth:S,statics:T,dynamics:R,optionals:A};break}}if(y.optional){const L=w|1<<S,N=S+1;for(let D=y.optional.length-1;D>=0;D--){const z=y.optional[D];d.push({node:z,index:_,skipped:L,depth:N,statics:T,dynamics:R,optionals:A})}if(!C)for(let D=y.optional.length-1;D>=0;D--){const z=y.optional[D],{prefix:W,suffix:G}=z;if(W||G){const K=z.caseSensitive?O:M??=O.toLowerCase();if(W&&!K.startsWith(W)||G&&!K.endsWith(G))continue}d.push({node:z,index:_+1,skipped:w,depth:N,statics:T,dynamics:R,optionals:A+1})}}if(!C&&y.dynamic&&O)for(let L=y.dynamic.length-1;L>=0;L--){const N=y.dynamic[L],{prefix:D,suffix:z}=N;if(D||z){const W=N.caseSensitive?O:M??=O.toLowerCase();if(D&&!W.startsWith(D)||z&&!W.endsWith(z))continue}d.push({node:N,index:_+1,skipped:w,depth:S+1,statics:T,dynamics:R+1,optionals:A})}if(!C&&y.staticInsensitive){const L=y.staticInsensitive.get(M??=O.toLowerCase());L&&d.push({node:L,index:_+1,skipped:w,depth:S+1,statics:T+1,dynamics:R,optionals:A})}if(!C&&y.static){const L=y.static.get(O);L&&d.push({node:L,index:_+1,skipped:w,depth:S+1,statics:T+1,dynamics:R,optionals:A})}}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{node:h.node,skipped:h.skipped,"**":decodeURIComponent(y)}}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===_s)>(e.node.kind===_s)||t.node.kind===_s==(e.node.kind===_s)&&t.depth>e.depth))):!0}function gd(e){return sg(e.filter(t=>t!==void 0).join("/"))}function sg(e){return e.replace(/\/{2,}/g,"/")}function Iw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function di(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Mw(e){return di(Iw(e))}function Ld(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function M3(e,t,n){return Ld(e,n)===Ld(t,n)}function N3({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 w=p[y];w===""?y?y===_-1&&d.push(w):d=[w]:w===".."?d.pop():w==="."||d.push(w)}}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=ag(y,0,f);const _=f[0];if(_===Is){h+=y;continue}const w=f[5],S=y.substring(0,f[1]),T=y.substring(f[4],w),R=y.substring(f[2],f[3]);_===pi?h+=S||T?`${S}{$${R}}${T}`:`$${R}`:_===mi?h+=S||T?`${S}{$}${T}`:"$":h+=`${S}{-$${R}}${T}`}h=sg(h);const v=h||"/";return c&&o&&o.set(c,v),v}function im(e,t,n){const o=t[e];return typeof o!="string"?o:e==="_splat"?encodeURI(o):D3(o,n)}function sm({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=ag(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===mi){const _=t._splat;i._splat=_,i["*"]=_;const w=e.substring(v,d[1]),S=e.substring(d[4],p);if(!_){o=!0,(w||S)&&(f+="/"+w+S);continue}const T=im("_splat",t,n);f+="/"+w+T+S;continue}if(y===pi){const _=e.substring(d[2],d[3]);!o&&!(_ in t)&&(o=!0),i[_]=t[_];const w=e.substring(v,d[1]),S=e.substring(d[4],p),T=im(_,t,n)??"undefined";f+="/"+w+T+S;continue}if(y===rc){const _=e.substring(d[2],d[3]),w=t[_];if(w==null)continue;i[_]=w;const S=e.substring(v,d[1]),T=e.substring(d[4],p),R=im(_,t,n)??"";f+="/"+S+R+T;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:i,interpolatedPath:f||"/",isMissingParams:o}}function D3(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 L3(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Pd="tsr-scroll-restoration-v1_3",P3=(e,t)=>{let n;return(...o)=>{n||(n=setTimeout(()=>{e(...o),n=null},t))}};function k3(){const e=L3();if(!e)return null;const t=e.getItem(Pd);let n=t?JSON.parse(t):{};return{state:n,set:o=>{n=xa(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=k3(),hv=e=>e.state.__TSR_key||e.href;function j3(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 Nw({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 z3(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||hv;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=j3(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",P3(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})||(Nw({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 U3(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 B3(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 lm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function F3(e){const t=new URLSearchParams(e),n={};for(const[o,i]of t.entries()){const l=n[o];l==null?n[o]=lm(i):Array.isArray(l)?l.push(lm(i)):n[o]=[l,lm(i)]}return n}const $3=H3(JSON.parse),V3=G3(JSON.stringify,JSON.parse);function H3(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=F3(t);for(const o in n){const i=n[o];if(typeof i=="string")try{n[o]=e(i)}catch{}}return n}}function G3(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=B3(i,o);return l?`?${l}`:""}}const ur="__root__";function q3(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)),lg=(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},Dw=(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,Dw(e,t))},Ra=(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):(Dw(e,n),n)}},Lw=(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,Ra(e,e.router.getMatch(i),n);try{c.options.onError?.(n)}catch(d){n=d,Ra(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}))},Z3=(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(Aa(y))return y.then(_=>{i.ssr=d(_??f)});i.ssr=d(y??f)},Pw=(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||zw(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{yd(e)},i);o._nonReactive.pendingTimeout=c}},Y3=(e,t,n)=>{const o=e.router.getMatch(t);if(!o._nonReactive.beforeLoadPromise&&!o._nonReactive.loaderPromise)return;Pw(e,t,n,o);const i=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Ra(e,l,l.error)};return o._nonReactive.beforeLoadPromise?o._nonReactive.beforeLoadPromise.then(i):i()},K3=(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"),Pw(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,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:f})))},_=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!o.options.beforeLoad){Kl(()=>{y(),_()});return}i._nonReactive.beforeLoadPromise=Cs();const w={...lg(e,n,!1),...i.__routeContext},{search:S,params:T,cause:R}=i,A=df(e,t),C={search:S,abortController:f,params:T,preload:A,context:w,location:e.location,navigate:L=>e.router.navigate({...L,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":R,matches:e.matches,...e.router.options.additionalContext},O=L=>{if(L===void 0){Kl(()=>{y(),_()});return}(Pr(L)||vr(L))&&(y(),Nl(e,n,L,"BEFORE_LOAD")),Kl(()=>{y(),e.updateMatch(t,N=>({...N,__beforeLoadContext:L})),_()})};let M;try{if(M=o.options.beforeLoad(C),Aa(M))return y(),M.catch(L=>{Nl(e,n,L,"BEFORE_LOAD")}).then(O)}catch(L){y(),Nl(e,n,L,"BEFORE_LOAD")}O(M)},W3=(e,t)=>{const{id:n,routeId:o}=e.matches[t],i=e.router.looseRoutesById[o],l=()=>{if(e.router.isServer){const f=Z3(e,n,t,i);if(Aa(f))return f.then(d)}return d()},c=()=>K3(e,n,t,i),d=()=>{if(Lw(e,n))return;const f=Y3(e,n,i);return Aa(f)?f.then(c):c()};return l()},Q3=(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}})},kw=(e,t,n,o)=>{const i=e.matchPromises[n-1],{params:l,loaderDeps:c,abortController:d,cause:f}=e.router.getMatch(t),h=lg(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}},F_=async(e,t,n,o)=>{try{const i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&jw(o);const l=o.options.loader?.(kw(e,t,n,o)),c=o.options.loader&&Aa(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;Ra(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?.(),Ra(e,e.router.getMatch(t),l);try{o.options.onError?.(l)}catch(f){c=f,Ra(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),Ra(e,l,i)}},X3=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:lg(e,t)}))};if(Lw(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&&Ra(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,w=c.options.shouldReload,S=typeof w=="function"?w(kw(e,n,t,c)):w,T=!!y&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Cs(),T!==R.preload&&e.updateMatch(n,O=>({...O,preload:T}));const{status:A,invalid:C}=R;i=A==="success"&&(C||(S??p>_)),y&&c.options.preload===!1||(i&&!e.sync?(l=!0,(async()=>{try{await F_(e,n,t,c),d();const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){Pr(O)&&await e.router.navigate(O.options)}})()):(A!=="success"||i&&e.sync)&&await F_(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 $_(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=W3(t,d);Aa(f)&&await f}const n=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<n;d++)t.matchPromises.push(X3(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=Q3(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);Aa(c)&&await c}catch(n){if(vr(n)&&!t.preload){const o=yd(t);throw Aa(o)&&await o,n}if(Pr(n))throw n}return t.matches}async function jw(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 Uw){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 zw(e){for(const t of Uw)if(e.options[t]?.preload)return!0;return!1}const Uw=["component","errorComponent","pendingComponent","notFoundComponent"];function J3(e){return{input:({url:t})=>{for(const n of e)t=Bw(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Fw(e[n],t);return t}}}function e5(e){const t=Mw(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 Bw(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 Fw(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 fi(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 t5{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=d3())),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 c3(r5(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(y=>!["redirected"].includes(y.status))}}}),z3(this));let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||i!==f||c!==h){this.basepath=f;const y=[];Mw(f)!==""&&y.push(e5({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:J3(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}=O3(this.routeTree,this.options.caseSensitive,(c,d)=>{c.init({originalIndex:d})});this.options.routeMasks&&E3(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=Bw(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:B_(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)=>N3({base:n,to:sg(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=>o5({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,"."),w=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,xa(l.params,y)),S=sm({path:_,params:w}).interpolatedPath,T=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(W=>this.looseRoutesById[W.routeId]);if(Object.keys(w).length>0)for(const W of T){const G=W.options.params?.stringify??W.options.stringifyParams;G&&Object.assign(w,G(w))}const R=n.leaveParams?_:B_(sm({path:_,params:w,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let A=p;if(n._includeValidateSearch&&this.options.search?.strict){const W={};T.forEach(G=>{if(G.options.validateSearch)try{Object.assign(W,pv(G.options.validateSearch,{...W,...A}))}catch{}}),A=W}A=a5({search:A,dest:l,destRoutes:T,_includeValidateSearch:n._includeValidateSearch}),A=Nr(p,A);const C=this.options.stringifySearch(A),O=l.hash===!0?c.hash:l.hash?xa(l.hash,c.hash):void 0,M=O?`#${O}`:"";let L=l.state===!0?c.state:l.state?xa(l.state,c.state):{};L=Nr(c.state,L);const N=`${R}${C}${M}`,D=new URL(N,this.origin),z=Fw(this.rewrite,D);return{publicHref:z.pathname+z.search+z.hash,href:N,url:z,pathname:R,search:A,searchStr:C,state:L,hash:O??"",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=S3(d.pathname,this.processedTree);if(v){Object.assign(h,v.params);const{from:p,params:y,..._}=v.route,w=y===!1||y===null?{}:(y??!0)===!0?h:Object.assign(h,xa(y,h));c={from:n.from,..._,params:w},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=ui(i.state,this.latestLocation.state);return f.forEach(v=>{delete i.state[v]}),h},c=di(this.latestLocation.href)===di(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 q3({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",...fi({resolvedLocation:h,location:f})}),this.emit({type:"onBeforeLoad",...fi({resolvedLocation:h,location:f})}),await $_({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 w=_.matches,S=_.pendingMatches||_.matches;return v=w.filter(T=>!S.some(R=>R.id===T.id)),p=S.filter(T=>!w.some(R=>R.id===T.id)),y=S.filter(T=>w.some(R=>R.id===T.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:S,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...v.filter(T=>T.status!=="error"&&T.status!=="notFound")]}}),this.clearExpiredCache()}),[[v,"onLeave"],[p,"onEnter"],[y,"onStay"]].forEach(([_,w])=>{_.forEach(S=>{this.looseRoutesById[S.routeId].options[w]?.(S)})})})})}})}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(fi({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=jw,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 $_({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=w3(l.pathname,o?.caseSensitive??!1,o?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!ui(f.params,n.params,{partial:!0})?!1:o?.includeSearch??!0?ui(d.search,l.search,{partial:!0})?f.params:!1:f.params},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??V3,parseSearch:t.parseSearch??$3}),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}=o;let{matchedRoutes:c}=o,d=!1;(i?i.path!=="/"&&l["**"]:di(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const f=(()=>{if(d){if(this.options.notFoundMode!=="root")for(let p=c.length-1;p>=0;p--){const y=c[p];if(y.children)return y.id}return ur}})(),h=[],v=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return c.forEach((p,y)=>{const _=h[y-1],[w,S,T]=(()=>{const j=_?.search??t.search,ne=_?._strictSearch??void 0;try{const ae=pv(p.options.validateSearch,{...j})??void 0;return[{...j,...ae},{...ne,...ae},void 0]}catch(ae){let P=ae;if(ae instanceof jd||(P=new jd(ae.message,{cause:ae})),n?.throwOnError)throw P;return[j,{},P]}})(),R=p.options.loaderDeps?.({search:w})??"",A=R?JSON.stringify(R):"",{interpolatedPath:C,usedParams:O}=sm({path:p.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),M=p.id+C+A,L=this.getMatch(M),N=this.state.matches.find(j=>j.routeId===p.id),D=L?._strictParams??O;let z;if(!L){const j=p.options.params?.parse??p.options.parseParams;if(j)try{Object.assign(D,j(D))}catch(ne){if(vr(ne)||Pr(ne)?z=ne:z=new n5(ne.message,{cause:ne}),n?.throwOnError)throw z}}Object.assign(l,D);const W=N?"stay":"enter";let G;if(L)G={...L,cause:W,params:N?Nr(N.params,l):l,_strictParams:D,search:Nr(N?N.search:L.search,w),_strictSearch:S};else{const j=p.options.loader||p.options.beforeLoad||p.lazyFn||zw(p)?"pending":"success";G={id:M,ssr:this.isServer?void 0:p.options.ssr,index:y,routeId:p.id,params:N?Nr(N.params,l):l,_strictParams:D,pathname:C,updatedAt:Date.now(),search:N?Nr(N.search,w):w,_strictSearch:S,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:z,__routeContext:void 0,_nonReactive:{loadPromise:Cs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:N?Nr(N.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(G.globalNotFound=f===p.id),G.searchError=T;const K=v(_);G.context={...K,...G.__routeContext,...G.__beforeLoadContext},h.push(G)}),h.forEach((p,y)=>{const _=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const S=h[y-1],T=v(S);if(_.options.context){const R={deps:p.loaderDeps,params:p.params,context:T??{},location:t,navigate:A=>this.navigate({...A,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:h};p.__routeContext=_.options.context(R)??void 0}p.context={...T,...p.__routeContext,...p.__beforeLoadContext}}}),h}}class jd extends Error{}class n5 extends Error{}function r5(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function pv(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 o5({pathname:e,routesById:t,processedTree:n}){const o={},i=di(e);let l;const c=x3(i,n,!0);return c&&(l=c.route,Object.assign(o,c.params)),{matchedRoutes:c?.branch||[t[ur]],routeParams:o,foundRoute:l}}function a5({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((S,T)=>T(S),p));const w=y(_);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((S,T)=>T(S),w):w};h.push(v)}if(o&&f.options.validateSearch){const v=({search:p,next:y})=>{const _=y(p);try{return{..._,...pv(f.options.validateSearch,_)??void 0}}catch{return _}};h.push(v)}return d.concat(h)},[])??[],l=({search:d})=>t.search?t.search===!0?d:xa(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 i5="Error preloading route! ☝️";class $w{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=Iw(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 s5 extends $w{constructor(t){super(t)}}function cg(e){const t=e.errorComponent??ff;return b.jsx(l5,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:o})=>n?E.createElement(t,{error:n,reset:o}):e.children})}class l5 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 c5({children:e,fallback:t=null}){return u5()?b.jsx($.Fragment,{children:e}):b.jsx($.Fragment,{children:t})}function u5(){return $.useSyncExternalStore(d5,()=>!0,()=>!1)}function d5(){return()=>{}}var cm={exports:{}},um={},dm={exports:{}},fm={};var V_;function f5(){if(V_)return fm;V_=1;var e=Pa();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(),w=o({inst:{value:_,getSnapshot:y}}),S=w[0].inst,T=w[1];return l(function(){S.value=_,S.getSnapshot=y,f(S)&&T({inst:S})},[p,_,y]),i(function(){return f(S)&&T({inst:S}),p(function(){f(S)&&T({inst:S})})},[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 fm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,fm}var H_;function Vw(){return H_||(H_=1,dm.exports=f5()),dm.exports}var G_;function h5(){if(G_)return um;G_=1;var e=Pa(),t=Vw();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 um.useSyncExternalStoreWithSelector=function(h,v,p,y,_){var w=l(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=d(function(){function R(L){if(!A){if(A=!0,C=L,L=y(L),_!==void 0&&S.hasValue){var N=S.value;if(_(N,L))return O=N}return O=L}if(N=O,o(C,L))return N;var D=y(L);return _!==void 0&&_(N,D)?(C=L,N):(C=L,O=D)}var A=!1,C,O,M=p===void 0?null:p;return[function(){return R(v())},M===null?void 0:function(){return R(M())}]},[v,p,y,_]);var T=i(h,w[0],w[1]);return c(function(){S.hasValue=!0,S.value=T},[T]),f(T),T},um}var q_;function p5(){return q_||(q_=1,cm.exports=h5()),cm.exports}var Hw=p5();const iH=bi(Hw);function m5(e,t=o=>o,n={}){const o=n.equal??v5;return Hw.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,o)}function v5(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=Z_(e);if(n.length!==Z_(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 Z_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const hm=E.createContext(null);function Gw(){return typeof document>"u"?hm:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=hm,hm)}function er(e){const t=E.useContext(Gw());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 m5(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),g5=E.createContext(void 0);function ho(e){const t=E.useContext(e.from?g5: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 ug(e){return ho({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function dg(e){const{select:t,...n}=e;return ho({...n,select:o=>t?t(o.loaderDeps):o.loaderDeps})}function fg(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 hg(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 pm(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 y5(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 b5(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 sH(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=mw();const qw=bi(pf);function _5(e,t){const n=er(),[o,i]=E.useState(!1),l=E.useRef(!1),c=b5(t),{activeProps:d,inactiveProps:f,activeOptions:h,to:v,preload:p,preloadDelay:y,hashScrollIntoView:_,replace:w,startTransition:S,resetScroll:T,viewTransition:R,children:A,target:C,disabled:O,style:M,className:L,onClick:N,onFocus:D,onMouseEnter:z,onMouseLeave:W,onTouchStart:G,ignoreBlocker:K,params:j,search:ne,hash:ae,state:P,mask:F,reloadDocument:H,unsafeRelative:re,from:ye,_fromLocation:k,...Q}=e,ee=Jn({select:Z=>Z.location.search,structuralSharing:!0}),se=e.from,me=E.useMemo(()=>({...e,from:se}),[n,ee,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(O)return;let Z=_e.maskedLocation?_e.maskedLocation.url.href:_e.url.href,ue=!1;return n.origin&&(Z.startsWith(n.origin)?Z=n.history.createHref(Z.replace(n.origin,""))||"/":ue=!0),{href:Z,external:ue}},[O,_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:Z=>{if(Se)return!1;if(h?.exact){if(!M3(Z.location.pathname,_e.pathname,n.basepath))return!1}else{const ue=Ld(Z.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)&&!ui(Z.location.search,_e.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Z.location.hash===_e.hash:!0}}),ze=E.useCallback(()=>{n.preloadRoute({...me}).catch(Z=>{console.warn(Z),console.warn(i5)})},[n,me]),Nt=E.useCallback(Z=>{Z?.isIntersecting&&ze()},[ze]);y5(c,Nt,R5,{disabled:!!O||De!=="viewport"}),E.useEffect(()=>{l.current||!O&&De==="render"&&(ze(),l.current=!0)},[O,ze,De]);const ge=Z=>{const ue=Z.currentTarget.getAttribute("target"),pe=C!==void 0?C:ue;if(!O&&!O5(Z)&&!Z.defaultPrevented&&(!pe||pe==="_self")&&Z.button===0){Z.preventDefault(),pf.flushSync(()=>{i(!0)});const he=n.subscribe("onResolved",()=>{he(),i(!1)});n.navigate({...me,replace:w,resetScroll:T,hashScrollIntoView:_,startTransition:S,viewTransition:R,ignoreBlocker:K})}};if(Se)return{...Q,ref:c,href:Se,...A&&{children:A},...C&&{target:C},...O&&{disabled:O},...M&&{style:M},...L&&{className:L},...N&&{onClick:N},...D&&{onFocus:D},...z&&{onMouseEnter:z},...W&&{onMouseLeave:W},...G&&{onTouchStart:G}};const ve=Z=>{O||De&&ze()},Re=ve,ke=Z=>{if(!(O||!De))if(!Le)ze();else{const ue=Z.target;if(Dl.has(ue))return;const pe=setTimeout(()=>{Dl.delete(ue),ze()},Le);Dl.set(ue,pe)}},et=Z=>{if(O||!De||!Le)return;const ue=Z.target,pe=Dl.get(ue);pe&&(clearTimeout(pe),Dl.delete(ue))},Ue=Ee?xa(d,{})??E5:mm,Qe=Ee?mm:xa(f,{})??mm,U=[L,Ue.className,Qe.className].filter(Boolean).join(" "),q=(M||Ue.style||Qe.style)&&{...M,...Ue.style,...Qe.style};return{...Q,...Ue,...Qe,href:be?.href,ref:c,onClick:Ll([N,ge]),onFocus:Ll([D,ve]),onMouseEnter:Ll([z,ke]),onMouseLeave:Ll([W,et]),onTouchStart:Ll([G,Re]),disabled:!!O,target:C,...q&&{style:q},...U&&{className:U},...O&&S5,...Ee&&w5,...o&&x5}}const mm={},E5={className:"active"},S5={role:"link","aria-disabled":!0},w5={"data-status":"active","aria-current":"page"},x5={"data-transitioning":"transitioning"},Dl=new WeakMap,R5={rootMargin:"100px"},Ll=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},pg=E.forwardRef((e,t)=>{const{_asChild:n,...o}=e,{type:i,ref:l,...c}=_5(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 O5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class T5 extends $w{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=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>fg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>dg({...n,from:this.id}),this.useLoaderData=n=>ug({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=$.forwardRef((n,o)=>b.jsx(pg,{ref:o,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function yn(e){return new T5(e)}class A5 extends s5{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=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>fg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>dg({...n,from:this.id}),this.useLoaderData=n=>ug({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=$.forwardRef((n,o)=>b.jsx(pg,{ref:o,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function C5(e){return new A5(e)}function Y_(e){return typeof e=="object"?new K_(e,{silent:!0}).createRoute(e):new K_(e,{silent:!0}).createRoute}class K_{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 W_{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=>hg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>fg({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>dg({...n,from:this.options.id}),this.useLoaderData=n=>ug({...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 Q_(e){return typeof e=="object"?new W_(e):t=>new W_({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,m3(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 I5(){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=pm(l),d=l||n||i,f=pm(d),h=l||i,v=pm(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 di(e.latestLocation.publicHref)!==di(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",...fi(e.state)})},[c,e,l]),Hl(()=>{v&&!h&&e.emit({type:"onBeforeRouteMount",...fi(e.state)})},[h,v,e]),Hl(()=>{if(f&&!d){const p=fi(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),p.hrefChanged&&U3(e)}},[d,f,e]),null}function M5(e){const t=Jn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(cg,{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 N5(){return b.jsx("p",{children:"Not Found"})}function ys(e){return b.jsx(b.Fragment,{children:e.children})}function Zw(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(N5,{})}function D5({children:e}){const t=er();return t.isServer?b.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function L5(){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||hv)(e.latestLocation),o=n!==hv(e.latestLocation)?n:void 0,i={storageKey:Pd,shouldScrollRestoration:!0};return o&&(i.key=o),b.jsx(D5,{children:`(${Nw.toString()})(${JSON.stringify(i)})`})}const Yw=E.memo(function({matchId:t}){const n=er(),o=Jn({select:R=>{const A=R.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:ys,y=d?cg:ys,_=h?M5:ys,w=Jn({select:R=>R.loadedAt}),S=Jn({select:R=>{const A=R.matches.findIndex(C=>C.id===t);return R.matches[A-1]?.routeId}}),T=i.isRoot?i.options.shellComponent??ys:ys;return b.jsxs(T,{children:[b.jsx(hf.Provider,{value:t,children:b.jsx(p,{fallback:c,children:b.jsx(y,{getResetKey:()=>w,errorComponent:d||ff,onCatch:(R,A)=>{if(vr(R))throw R;f?.(R,A)},children:b.jsx(_,{fallback:R=>{if(!h||R.routeId&&R.routeId!==o.routeId||!R.routeId&&!i.isRoot)throw R;return E.createElement(h,R)},children:v||o._displayPending?b.jsx(c5,{fallback:c,children:b.jsx(X_,{matchId:t})}):b.jsx(X_,{matchId:t})})})})}),S===ur&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(P5,{}),b.jsx(L5,{})]}):null]})});function P5(){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",...fi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const X_=E.memo(function({matchId:t}){const n=er(),{match:o,key:i,routeId:l}=Jn({select:f=>{const h=f.matches.find(w=>w.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(Kw,{})},[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)),Zw(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}),Kw=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 Zw(t,i,void 0);if(!c)return null;const f=b.jsx(Yw,{matchId:c});return o===ur?b.jsx(E.Suspense,{fallback:d,children:f}):f});function k5(){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?ys:E.Suspense,l=b.jsxs(i,{fallback:o,children:[!e.isServer&&b.jsx(I5,{}),b.jsx(j5,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:l}):l}function j5(){const e=er(),t=Jn({select:i=>i.matches[0]?.id}),n=Jn({select:i=>i.loadedAt}),o=t?b.jsx(Yw,{matchId:t}):null;return b.jsx(hf.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?o:b.jsx(cg,{getResetKey:()=>n,errorComponent:ff,onCatch:i=>{i.message||i.toString()},children:o})})}const z5=e=>new U5(e);class U5 extends t5{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Y_,globalThis.createLazyFileRoute=Q_):typeof window<"u"&&(window.createFileRoute=Y_,window.createLazyFileRoute=Q_);function B5({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const o=Gw(),i=b.jsx(o.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:i}):i}function F5({router:e,...t}){return b.jsx(B5,{router:e,...t,children:b.jsx(k5,{})})}var $5={},J_={};const bd=Object.create(null),Pl=e=>$5||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"&&J_?J_[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,eE={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},V5=new Map(Object.entries({APPVEYOR:so,BUILDKITE:so,CIRCLECI:fr,DRONE:so,GITEA_ACTIONS:fr,GITHUB_ACTIONS:fr,GITLAB_CI:so,TRAVIS:so})),H5=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function G5(){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 V5)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(eE[e])return eE[e];if(H5.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"}},mv=["debug","info","success","warn","error"];function q5(e,t){return mv.indexOf(t)>=mv.indexOf(e)}const Z5={info:lo.fg.blue,success:lo.fg.green,warn:lo.fg.yellow,error:lo.fg.red,debug:lo.fg.magenta},Y5=(e,t,n)=>{const o=new Date().toISOString();return n?`${lo.dim}${o}${lo.reset} ${Z5[e]}${e.toUpperCase()}${lo.reset} ${lo.bright}[Better Auth]:${lo.reset} ${t}`:`${o} ${e.toUpperCase()} [Better Auth]: ${t}`},K5=e=>{const t="error",n=G5()!==1,o=(i,l,c=[])=>{if(!q5(t,i))return;const d=Y5(i,l,n);{i==="error"?console.error(d,...c):i==="warn"?console.warn(d,...c):console.log(d,...c);return}};return{...Object.fromEntries(mv.map(i=>[i,(...[l,...c])=>o(i,l,c)])),get level(){return t}}};K5();var Wl=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function W5(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Wl(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Q5(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 vm(e,t="/api/auth"){if(Q5(e),W5(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function X5(e,t,n,o,i){if(e)return vm(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 vm(l,t)}if(typeof window<"u"&&window.location)return vm(window.location.origin,t)}const J5={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*:/},e6=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,tE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},t6=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function n6(e){return e instanceof Date&&!isNaN(e.getTime())}function r6(e){const t=t6.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 n6(y)?y:null}function o6(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 tE)return tE[d];if(!e6.test(c)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(J5).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=r6(v);if(p)return p}return i?i(h,v):v})}catch(f){if(n)throw f;return e}}function a6(e,t={strict:!0}){return o6(e,t)}let $r=[],ga=0;const qu=4,Es=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},i6=5,Zu=6,Yu=10;let s6=(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])}),l6=1e3,Ww=(e,t)=>s6(e,o=>{let i=t(o);i&&e.events[Zu].push(i)},i6,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]=[]}},l6)},()=>{e.listen=i,e.off=l}});function c6(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 u6=Object.defineProperty,d6=Object.defineProperties,f6=Object.getOwnPropertyDescriptors,nE=Object.getOwnPropertySymbols,h6=Object.prototype.hasOwnProperty,p6=Object.prototype.propertyIsEnumerable,rE=(e,t,n)=>t in e?u6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gr=(e,t)=>{for(var n in t||(t={}))h6.call(t,n)&&rE(e,n,t[n]);if(nE)for(var n of nE(t))p6.call(t,n)&&rE(e,n,t[n]);return e},io=(e,t)=>d6(e,f6(t)),m6=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},v6=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}},oE=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}},g6=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 y6(e){if(typeof e=="number")return new oE({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new oE(e);case"exponential":return new g6(e);default:throw new Error("Invalid retry strategy")}}var b6=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},_6=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function E6(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 _6.test(o)?"json":n.has(o)||o.startsWith("text/")?"text":"blob"}function S6(e){try{return JSON.parse(e),!0}catch{return!1}}function Qw(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 aE(e){try{return JSON.parse(e)}catch{return e}}function iE(e){return typeof e=="function"}function w6(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&iE(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&iE(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function x6(e){const t=new Headers(e?.headers),n=await b6(e);for(const[o,i]of Object.entries(n||{}))t.set(o,i);if(!t.has("content-type")){const o=R6(e?.body);o&&t.set("content-type",o)}return t}function R6(e){return Qw(e)?"application/json":null}function O6(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(Qw(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 T6(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 Jw.includes(o)?o.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function A6(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var C6=class Xw extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,Xw.prototype)}};async function _d(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new C6(n.issues);return n.value}var Jw=["get","post","put","patch","delete"],I6=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}}}),M6=e=>{async function t(n,o){const i=io(Gr(Gr({},e),o),{plugins:[...e?.plugins||[],I6(e||{})]});if(e?.catchAllError)try{return await vv(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 vv(n,i)}return t};function N6(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];Jw.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 w=o[y];c=c.replace(_,w)}}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 vv=async(e,t)=>{var n,o,i,l,c,d,f,h;const{hooks:v,url:p,options:y}=await v6(e,t),_=w6(y),w=new AbortController,S=(n=y.signal)!=null?n:w.signal,T=N6(p,y),R=O6(y),A=await x6(y),C=T6(p,y);let O=io(Gr({},y),{url:T,headers:A,body:R,method:C,signal:S});for(const j of v.onRequest)if(j){const ne=await j(O);ne instanceof Object&&(O=ne)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((o=t?.body)==null?void 0:o.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:M}=A6(y,w);let L=await _(O.url,O);M();const N={response:L,request:O};for(const j of v.onResponse)if(j){const ne=await j(io(Gr({},N),{response:(i=t?.hookOptions)!=null&&i.cloneResponse?L.clone():L}));ne instanceof Response?L=ne:ne instanceof Object&&(L=ne.response)}if(L.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const ne=E6(L),ae={data:"",response:L,request:O};if(ne==="json"||ne==="text"){const P=await L.text(),H=await((l=O.jsonParser)!=null?l:aE)(P);ae.data=H}else ae.data=await L[ne]();O?.output&&O.output&&!O.disableValidation&&(ae.data=await _d(O.output,ae.data));for(const P of v.onSuccess)P&&await P(io(Gr({},ae),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?L.clone():L}));return t?.throw?ae.data:{data:ae.data,error:null}}const D=(d=t?.jsonParser)!=null?d:aE,z=await L.text(),W=S6(z),G=W?await D(z):null,K={response:L,responseText:z,request:O,error:io(Gr({},G),{status:L.status,statusText:L.statusText})};for(const j of v.onError)j&&await j(io(Gr({},K),{response:(f=t?.hookOptions)!=null&&f.cloneResponse?L.clone():L}));if(t?.retry){const j=y6(t.retry),ne=(h=t.retryAttempt)!=null?h:0;if(await j.shouldAttemptRetry(ne,L)){for(const P of v.onRetry)P&&await P(N);const ae=j.getDelay(ne);return await new Promise(P=>setTimeout(P,ae)),await vv(e,io(Gr({},t),{retryAttempt:ne+1}))}}if(t?.throw)throw new m6(L.status,L.statusText,W?G:z);return{data:null,error:io(Gr({},G),{status:L.status,statusText:L.statusText})}};const gm=Symbol.for("better-auth:broadcast-channel"),D6=()=>Math.floor(Date.now()/1e3);var L6=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:D6()}))}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 ym(e="better-auth.message"){return globalThis[gm]||(globalThis[gm]=new L6(e)),globalThis[gm]}const bm=Symbol.for("better-auth:focus-manager");var P6=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 sE(){return globalThis[bm]||(globalThis[bm]=new P6),globalThis[bm]}const _m=Symbol.for("better-auth:online-manager");var k6=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 Em(){return globalThis[_m]||(globalThis[_m]=new k6),globalThis[_m]}const j6=()=>typeof window>"u",Gl=(e,t,n,o)=>{const i=Es({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()=>{j6()||(c?await l():Ww(i,()=>{const f=setTimeout(async()=>{c||(await l(),c=!0)},0);return()=>{i.off(),d.off(),clearTimeout(f)}}))});return i},cs=()=>Math.floor(Date.now()/1e3),z6=5;function U6(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||Em().isOnline,v=A=>{if(!h())return;if(A?.event==="storage"){f.lastSync=cs(),n.set(!n.get());return}const C=t.get();if(A?.event==="poll"){f.lastSessionRequest=cs(),o("/get-session").then(O=>{t.set({...C,data:O.data,error:O.error||null}),f.lastSync=cs(),n.set(!n.get())}).catch(()=>{});return}A?.event==="visibilitychange"&&cs()-f.lastSessionRequest<z6&&C?.data!==null&&C?.data!==void 0||(C?.data===null||C?.data===void 0||A?.event==="visibilitychange")&&(A?.event==="visibilitychange"&&(f.lastSessionRequest=cs()),f.lastSync=cs(),n.set(!n.get()))},p=A=>{ym().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=ym().subscribe(()=>{v({event:"storage"})})},w=()=>{c&&(f.unsubscribeFocus=sE().subscribe(()=>{v({event:"visibilitychange"})}))},S=()=>{f.unsubscribeOnline=Em().subscribe(A=>{A&&v({event:"visibilitychange"})})};return{init:()=>{y(),_(),w(),S(),ym().setup(),sE().setup(),Em().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 B6={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 F6(e,t){const n=Es(!1),o=Gl(n,"/get-session",e,{method:"GET"});return Ww(o,()=>{const i=U6({sessionAtom:o,sessionSignal:n,$fetch:e,options:t});return i.init(),()=>{i.cleanup()}}),{session:o,$sessionSignal:n}}const $6=(e,t)=>{const n="credentials"in Request.prototype,o=X5(e?.baseURL,e?.basePath)??"/api/auth",i=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==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=M6({baseURL:o,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?a6(O,{strict:!1}):null},customFetchImpl:fetch,...v,plugins:[l,...v.plugins||[],...e?.disableDefaultFetchPlugins?[]:[B6],...i]}),{$sessionSignal:y,session:_}=F6(p,e),w=e?.plugins||[];let S={},T={$sessionSignal:y,session:_},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const A=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"}}];for(const O of w)O.getAtoms&&Object.assign(T,O.getAtoms?.(p)),O.pathMethods&&Object.assign(R,O.pathMethods),O.atomListeners&&A.push(...O.atomListeners);const C={notify:O=>{T[O].set(!T[O].get())},listen:(O,M)=>{T[O].subscribe(M)},atoms:T};for(const O of w)O.getActions&&Object.assign(S,O.getActions?.(p,C,e));return{get baseURL(){return o},pluginsActions:S,pluginsAtoms:T,pluginPathMethods:R,atomListeners:A,$fetch:p,$store:C}};function V6(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function H6(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 G6(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"||V6(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:w,...S}=p,T={...y,...w},R=H6(v,n,p);return await t(v,{...T,body:R==="GET"?void 0:{...S,...T?.body||{}},query:_||T?.query,method:R,async onSuccess(A){if(await T?.onSuccess?.(A),!i||T.disableSignal)return;const C=i.filter(O=>O.matcher(v));if(C.length)for(const O of C){const M=o[O.signal];if(!M)return;const L=M.get();setTimeout(()=>{M.set(!L)},10)}}})}})}return l()}function q6(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?c6(e,o,f):e.listen(f)},i),c=()=>n.current;return E.useSyncExternalStore(l,c,c)}function Z6(e){return`use${Y6(e)}`}function Y6(e){return e.charAt(0).toUpperCase()+e.slice(1)}function K6(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:o,$fetch:i,$store:l,atomListeners:c}=$6(e);let d={};for(const[f,h]of Object.entries(o))d[Z6(f)]=()=>q6(h);return G6({...n,...d,$fetch:i,$store:l},i,t,o,c)}function W6(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 ex(e){return{newRole(t){return W6(t)},statements:e}}const Q6={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},tx=ex(Q6),nx=tx.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),rx=tx.newRole({user:[],session:[]}),X6={admin:nx,user:rx},J6=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||X6;for(const o of t)if(n[o]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},eI={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},mg=ex(eI),ox=mg.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ax=mg.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ix=mg.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),tI={admin:ox,owner:ax,member:ix},nI=(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},rI=e=>{const t={admin:nx,user:rx,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>J6({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},oI=()=>({id:"magic-link",$InferServerPlugin:{}}),aI=e=>nI(e,e.options.roles||tI),iI=e=>{const t=Es(!1),n=Es(!1),o=Es(!1),i=Es(!1),l={admin:ox,member:ix,owner:ax,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(c,d,f)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:h=>aI({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"}]}},sI=e=>({id:"sso-client",$InferServerPlugin:{}}),lI=K6({plugins:[iI({}),rI(),sI(),oI()]});function sx(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=sx(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function lx(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=sx(e))&&(o&&(o+=" "),o+=t);return o}const cI=(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},uI=(e,t)=>({classGroupId:e,validator:t}),cx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),zd="-",lE=[],dI="arbitrary..",fI=e=>{const t=pI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return hI(c);const d=c.split(zd),f=d[0]===""&&d.length>1?1:0;return ux(d,f,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const f=o[c],h=n[c];return f?h?cI(h,f):f:h||lE}return n[c]||lE}}},ux=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],l=n.nextPart.get(i);if(l){const h=ux(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}},hI=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?dI+o:void 0})(),pI=e=>{const{theme:t,classGroups:n}=e;return mI(n,t)},mI=(e,t)=>{const n=cx();for(const o in e){const i=e[o];vg(i,n,o,t)}return n},vg=(e,t,n,o)=>{const i=e.length;for(let l=0;l<i;l++){const c=e[l];vI(c,t,n,o)}},vI=(e,t,n,o)=>{if(typeof e=="string"){gI(e,t,n);return}if(typeof e=="function"){yI(e,t,n,o);return}bI(e,t,n,o)},gI=(e,t,n)=>{const o=e===""?t:dx(t,e);o.classGroupId=n},yI=(e,t,n,o)=>{if(_I(e)){vg(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(uI(n,e))},bI=(e,t,n,o)=>{const i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){const[d,f]=i[c];vg(f,dx(t,d),n,o)}},dx=(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=cx(),n.nextPart.set(c,d)),n=d}return n},_I=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,EI=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)}}},gv="!",cE=":",SI=[],uE=(e,t,n,o,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:i}),wI=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 S=0;S<v;S++){const T=i[S];if(c===0&&d===0){if(T===cE){l.push(i.slice(f,S)),f=S+1;continue}if(T==="/"){h=S;continue}}T==="["?c++:T==="]"?c--:T==="("?d++:T===")"&&d--}const p=l.length===0?i:i.slice(f);let y=p,_=!1;p.endsWith(gv)?(y=p.slice(0,-1),_=!0):p.startsWith(gv)&&(y=p.slice(1),_=!0);const w=h&&h>f?h-f:void 0;return uE(l,_,y,w)};if(t){const i=t+cE,l=o;o=c=>c.startsWith(i)?l(c.slice(i.length)):uE(SI,!1,c,void 0,!0)}if(n){const i=o;o=l=>n({className:l,parseClassName:i})}return o},xI=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}},RI=e=>({cache:EI(e.cacheSize),parseClassName:wI(e),sortModifiers:xI(e),...fI(e)}),OI=/\s+/,TI=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:l}=t,c=[],d=e.trim().split(OI);let f="";for(let h=d.length-1;h>=0;h-=1){const v=d[h],{isExternal:p,modifiers:y,hasImportantModifier:_,baseClassName:w,maybePostfixModifierPosition:S}=n(v);if(p){f=v+(f.length>0?" "+f:f);continue}let T=!!S,R=o(T?w.substring(0,S):w);if(!R){if(!T){f=v+(f.length>0?" "+f:f);continue}if(R=o(w),!R){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+gv:A,O=C+R;if(c.indexOf(O)>-1)continue;c.push(O);const M=i(R,T);for(let L=0;L<M.length;++L){const N=M[L];c.push(C+N)}f=v+(f.length>0?" "+f:f)}return f},AI=(...e)=>{let t=0,n,o,i="";for(;t<e.length;)(n=e[t++])&&(o=fx(n))&&(i&&(i+=" "),i+=o);return i},fx=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=fx(e[o]))&&(n&&(n+=" "),n+=t);return n},CI=(e,...t)=>{let n,o,i,l;const c=f=>{const h=t.reduce((v,p)=>p(v),e());return n=RI(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=TI(f,n);return i(f,v),v};return l=c,(...f)=>l(AI(...f))},II=[],ln=e=>{const t=n=>n[e]||II;return t.isThemeGetter=!0,t},hx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,px=/^\((?:(\w[\w-]*):)?(.+)\)$/i,MI=/^\d+\/\d+$/,NI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DI=/\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$/,LI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,PI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,us=e=>MI.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),ya=e=>!!e&&Number.isInteger(Number(e)),Sm=e=>e.endsWith("%")&&We(e.slice(0,-1)),Uo=e=>NI.test(e),jI=()=>!0,zI=e=>DI.test(e)&&!LI.test(e),mx=()=>!1,UI=e=>PI.test(e),BI=e=>kI.test(e),FI=e=>!Ae(e)&&!Ce(e),$I=e=>Ps(e,yx,mx),Ae=e=>hx.test(e),ri=e=>Ps(e,bx,zI),wm=e=>Ps(e,ZI,We),dE=e=>Ps(e,vx,mx),VI=e=>Ps(e,gx,BI),Ku=e=>Ps(e,_x,UI),Ce=e=>px.test(e),jl=e=>ks(e,bx),HI=e=>ks(e,YI),fE=e=>ks(e,vx),GI=e=>ks(e,yx),qI=e=>ks(e,gx),Wu=e=>ks(e,_x,!0),Ps=(e,t,n)=>{const o=hx.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},ks=(e,t,n=!1)=>{const o=px.exec(e);return o?o[1]?t(o[1]):n:!1},vx=e=>e==="position"||e==="percentage",gx=e=>e==="image"||e==="url",yx=e=>e==="length"||e==="size"||e==="bg-size",bx=e=>e==="length",ZI=e=>e==="number",YI=e=>e==="family-name",_x=e=>e==="shadow",KI=()=>{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"),w=ln("blur"),S=ln("perspective"),T=ln("aspect"),R=ln("ease"),A=ln("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...O(),Ce,Ae],L=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],D=()=>[Ce,Ae,f],z=()=>[us,"full","auto",...D()],W=()=>[ya,"none","subgrid",Ce,Ae],G=()=>["auto",{span:["full",ya,Ce,Ae]},ya,Ce,Ae],K=()=>[ya,"auto",Ce,Ae],j=()=>["auto","min","max","fr",Ce,Ae],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...D()],F=()=>[us,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],H=()=>[e,Ce,Ae],re=()=>[...O(),fE,dE,{position:[Ce,Ae]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",GI,$I,{size:[Ce,Ae]}],Q=()=>[Sm,jl,ri],ee=()=>["","none","full",h,Ce,Ae],se=()=>["",We,jl,ri],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,Sm,fE,dE],Se=()=>["","none",w,Ce,Ae],De=()=>["none",We,Ce,Ae],Le=()=>["none",We,Ce,Ae],Ee=()=>[We,Ce,Ae],ze=()=>[us,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Uo],breakpoint:[Uo],color:[jI],container:[Uo],"drop-shadow":[Uo],ease:["in","out","in-out"],font:[FI],"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",us,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:M()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],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:[us,"full","auto",d,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,us,"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:G()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"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,ri]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ce,wm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Sm,Ae]}],"font-family":[{font:[HI,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,wm]}],leading:[{leading:[l,...D()]}],"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:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Ce,ri]}],"text-decoration-color":[{decoration:H()}],"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:D()}],"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:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ya,Ce,Ae],radial:["",Ce,Ae],conic:[ya,Ce,Ae]},qI,VI]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"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:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Ce,Ae]}],"outline-w":[{outline:["",We,jl,ri]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",v,Wu,Ku]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",p,Wu,Ku]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[We,ri]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",y,Wu,Ku]}],"text-shadow-color":[{"text-shadow":H()}],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":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"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":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"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":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"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":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"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":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"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":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"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":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"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":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":O()}],"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":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"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:k()}],"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":H()}],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":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"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",R,Ce,Ae]}],delay:[{delay:[We,Ce,Ae]}],animate:[{animate:["none",A,Ce,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ce,Ae]}],"perspective-origin":[{"perspective-origin":M()}],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:M()}],"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:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",...H()]}],"stroke-w":[{stroke:[We,jl,ri,wm]}],stroke:[{stroke:["none",...H()]}],"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"]}},WI=CI(KI),lH=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 Ex extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Sx={};function Ma(e){return Sx}function wx(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 yv(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 gg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function QI(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 hE=Symbol("evaluating");function at(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==hE)return o===void 0&&(o=hE,o=n()),o},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function _i(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ka(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function pE(e){return JSON.stringify(e)}function XI(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const xx="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function oc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const JI=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 Rx(e){return Ms(e)?{...e}:Array.isArray(e)?[...e]:e}const eM=new Set(["string","number","symbol"]);function Ns(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ja(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 tM(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const nM={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 rM(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=ka(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 _i(this,"shape",c),c},checks:[]});return ja(e,l)}function oM(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=ka(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 _i(this,"shape",c),c},checks:[]});return ja(e,l)}function aM(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=ka(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return _i(this,"shape",l),l}});return ja(e,i)}function iM(e,t){if(!Ms(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ka(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return _i(this,"shape",o),o}});return ja(e,n)}function sM(e,t){const n=ka(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return _i(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return ja(e,n)}function lM(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=ka(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 _i(this,"shape",f),f},checks:[]});return ja(t,c)}function cM(e,t,n){const o=ka(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 _i(this,"shape",l),l}});return ja(t,o)}function Ss(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 li(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 Na(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 Ox(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function yg(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 Tx=(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,yv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},bg=ie("$ZodError",Tx),vf=ie("$ZodError",Tx,{Parent:Error});function uM(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 dM(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=>Na(f,l,Ma())));throw xx(d,i?.callee),d}return c.value},fM=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=>Na(f,l,Ma())));throw xx(d,i?.callee),d}return c.value},hM=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??bg)(l.issues.map(c=>Na(c,i,Ma())))}:{success:!0,data:l.value}},pM=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=>Na(c,i,Ma())))}:{success:!0,data:l.value}},mM=_f(vf),vM=e=>(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return gf(e)(t,n,i)},gM=e=>(t,n,o)=>gf(e)(t,n,o),yM=e=>async(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return yf(e)(t,n,i)},bM=e=>async(t,n,o)=>yf(e)(t,n,o),_M=e=>(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return bf(e)(t,n,i)},EM=e=>(t,n,o)=>bf(e)(t,n,o),SM=e=>async(t,n,o)=>{const i=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return _f(e)(t,n,i)},wM=e=>async(t,n,o)=>_f(e)(t,n,o),xM=/^[cC][^\s-]{8,}$/,RM=/^[0-9a-z]+$/,OM=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,TM=/^[0-9a-vA-V]{20}$/,AM=/^[A-Za-z0-9]{27}$/,CM=/^[a-zA-Z0-9_-]{21}$/,IM=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,MM=/^([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})$/,mE=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)$/,NM=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,DM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function LM(){return new RegExp(DM,"u")}const PM=/^(?:(?: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])$/,kM=/^(([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}|:))$/,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])\/([0-9]|[1-2][0-9]|3[0-2])$/,zM=/^(([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])$/,UM=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ax=/^[A-Za-z0-9_-]*$/,BM=/^\+[1-9]\d{6,14}$/,Cx="(?:(?:\\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])))",FM=new RegExp(`^${Cx}$`);function Ix(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 $M(e){return new RegExp(`^${Ix(e)}$`)}function VM(e){const t=Ix({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(`^${Cx}T(?:${o})$`)}const HM=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},GM=/^-?\d+$/,Mx=/^-?\d+(?:\.\d+)?$/,qM=/^(?:true|false)$/i,ZM=/^null$/i,YM=/^[^A-Z]*$/,KM=/^[^a-z]*$/,Cn=ie("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Nx={number:"number",bigint:"bigint",object:"date"},Dx=ie("$ZodCheckLessThan",(e,t)=>{Cn.init(e,t);const n=Nx[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})}}),Lx=ie("$ZodCheckGreaterThan",(e,t)=>{Cn.init(e,t);const n=Nx[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})}}),WM=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):QI(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})}}),QM=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]=nM[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=GM)}),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})}}),XM=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:Ox(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),JM=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:Ox(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),eN=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=yg(i);o.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),tN=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=yg(i);o.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),nN=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=yg(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=()=>{})}),rN=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})}}),oN=ie("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=YM),Ef.init(e,t)}),aN=ie("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=KM),Ef.init(e,t)}),iN=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})}}),sN=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})}}),lN=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})}}),cN=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})}}),uN=ie("$ZodCheckOverwrite",(e,t)=>{Cn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class dN{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
12
|
`))}}const fN={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=fN;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=Ss(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=Ss(c,y)))});else{if(c.issues.length===y)continue;h||(h=Ss(c,y))}}return v?v.then(()=>c):c},l=(c,d,f)=>{if(Ss(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=pM(e,i);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return mM(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),_g=ie("$ZodString",(e,t)=>{pt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??HM(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)=>{Ef.init(e,t),_g.init(e,t)}),hN=ie("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=MM),Pt.init(e,t)}),pN=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=mE(o))}else t.pattern??(t.pattern=mE());Pt.init(e,t)}),mN=ie("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=NM),Pt.init(e,t)}),vN=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})}}}),gN=ie("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=LM()),Pt.init(e,t)}),yN=ie("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=CM),Pt.init(e,t)}),bN=ie("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=xM),Pt.init(e,t)}),_N=ie("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=RM),Pt.init(e,t)}),EN=ie("$ZodULID",(e,t)=>{t.pattern??(t.pattern=OM),Pt.init(e,t)}),SN=ie("$ZodXID",(e,t)=>{t.pattern??(t.pattern=TM),Pt.init(e,t)}),wN=ie("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=AM),Pt.init(e,t)}),xN=ie("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=VM(t)),Pt.init(e,t)}),RN=ie("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=FM),Pt.init(e,t)}),ON=ie("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=$M(t)),Pt.init(e,t)}),TN=ie("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=IM),Pt.init(e,t)}),AN=ie("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=PM),Pt.init(e,t),e._zod.bag.format="ipv4"}),CN=ie("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=kM),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})}}}),IN=ie("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=jM),Pt.init(e,t)}),MN=ie("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=zM),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 Px(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const NN=ie("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=UM),Pt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Px(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function DN(e){if(!Ax.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Px(n)}const LN=ie("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ax),Pt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{DN(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),PN=ie("$ZodE164",(e,t)=>{t.pattern??(t.pattern=BM),Pt.init(e,t)});function kN(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 jN=ie("$ZodJWT",(e,t)=>{Pt.init(e,t),e._zod.check=n=>{kN(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),kx=ie("$ZodNumber",(e,t)=>{pt.init(e,t),e._zod.pattern=e._zod.bag.pattern??Mx,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}}),zN=ie("$ZodNumberFormat",(e,t)=>{QM.init(e,t),kx.init(e,t)}),UN=ie("$ZodBoolean",(e,t)=>{pt.init(e,t),e._zod.pattern=qM,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}}),BN=ie("$ZodNull",(e,t)=>{pt.init(e,t),e._zod.pattern=ZM,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}}),FN=ie("$ZodAny",(e,t)=>{pt.init(e,t),e._zod.parse=n=>n}),$N=ie("$ZodUnknown",(e,t)=>{pt.init(e,t),e._zod.parse=n=>n}),VN=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)}),HN=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 vE(e,t,n){e.issues.length&&t.issues.push(...li(n,e.issues)),t.value[n]=e.value}const GN=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=>vE(h,n,c))):vE(f,n,c)}return l.length?Promise.all(l).then(()=>n):n}});function Ud(e,t,n,o,i){if(e.issues.length){if(i&&!(n in o))return;t.issues.push(...li(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function jx(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=tM(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function zx(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(_=>Ud(_,n,p,t,v))):Ud(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 qN=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=mf(()=>jx(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],w=_._zod.optout==="optional",S=_._zod.run({value:h[y],issues:[]},f);S instanceof Promise?v.push(S.then(T=>Ud(T,d,y,h,w))):Ud(S,d,y,h,w)}return l?zx(v,h,d,f,o.value,e):v.length?Promise.all(v).then(()=>d):d}}),ZN=ie("$ZodObjectJIT",(e,t)=>{qN.init(e,t);const n=e._zod.parse,o=mf(()=>jx(t)),i=y=>{const _=new dN(["shape","payload","ctx"]),w=o.value,S=C=>{const O=pE(C);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};_.write("const input = payload.value;");const T=Object.create(null);let R=0;for(const C of w.keys)T[C]=`key_${R++}`;_.write("const newResult = {};");for(const C of w.keys){const O=T[C],M=pE(C),N=y[C]?._zod?.optout==="optional";_.write(`const ${O} = ${S(C)};`),N?_.write(`
|
|
13
13
|
if (${O}.issues.length) {
|
|
@@ -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(XF,{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 hV=["/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||hV).includes(n))return null;const{theme:i}=Tg(),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(fV,{ref:e}),c&&b.jsx(dV,{localization:t}),d&&b.jsx(ET,{className:"mx-auto",ref:e,siteKey:o.siteKey,options:{theme:i,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(OF,{ref:e,sitekey:o.siteKey,theme:i})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(dT,{ref:e,sitekey:o.siteKey,theme:i})})]})}function g0({className:e,containerClassName:t,...n}){return b.jsx(OT,{"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 gs({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(RT),{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 rv({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(_7,{})})}function y0({otpSeparators:e=0}){return e===0?b.jsxs(gs,{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(gs,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1}),b.jsx(pn,{index:2})]}),b.jsx(rv,{}),b.jsxs(gs,{children:[b.jsx(pn,{index:3}),b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(gs,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1})]}),b.jsx(rv,{}),b.jsxs(gs,{children:[b.jsx(pn,{index:2}),b.jsx(pn,{index:3})]}),b.jsx(rv,{}),b.jsxs(gs,{children:[b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]})]})}function dw(e){const[t,n]=E.useState();return t?b.jsx(mV,{...e,email:t}):b.jsx(pV,{...e,setEmail:n})}function pV({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}`})}),w=mo({resolver:vo(_),defaultValues:{email:""}});n=n||w.formState.isSubmitting,E.useEffect(()=>{i?.(w.formState.isSubmitting)},[w.formState.isSubmitting,i]);async function S({email:T}){const R={throw:!0,headers:await f("/email-otp/send-verification-otp")};try{await h.emailOtp.sendVerificationOtp({email:T,type:"sign-in",fetchOptions:R}),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,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(S),noValidate:c,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:w.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 mV({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}),w=bn({code:Ve().min(1,{message:`${o.EMAIL_OTP} ${o.IS_REQUIRED}`}).min(6,{message:`${o.EMAIL_OTP} ${o.IS_INVALID}`})}),S=mo({resolver:vo(w),defaultValues:{code:""}});n=n||S.formState.isSubmitting||_,E.useEffect(()=>{c?.(S.formState.isSubmitting||_)},[S.formState.isSubmitting,_,c]);async function T({code:R}){try{await f.signIn.emailOtp({email:d,otp:R,fetchOptions:{throw:!0}}),await y()}catch(A){v({variant:"error",message:jt({error:A,localization:o,localizeErrors:p})}),S.reset()}}return b.jsx(yo,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(T),className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:S.control,name:"code",render:({field:R})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL_OTP}),b.jsx(rn,{children:b.jsx(g0,{...R,maxLength:6,onChange:A=>{R.onChange(A),A.length===6&&S.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(y0,{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 vV({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:w,toast:S,localizeErrors:T,navigate:R,basePath:A,viewPaths:C}=E.useContext(qe);t={...w,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:M,isPending:L}=bo({redirectTo:d}),N=bn({code:Ve().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),D=mo({resolver:vo(N),defaultValues:{code:""}}),z=c||D.formState.isSubmitting||L;E.useEffect(()=>{f?.(D.formState.isSubmitting||L)},[D.formState.isSubmitting,L,f]),E.useEffect(()=>{if(p>0){const K=setTimeout(()=>y(p-1),1e3);return()=>clearTimeout(K)}else v(!1)},[p]);async function W({code:K}){try{const j=await _.emailOtp.verifyEmail({email:O,otp:K,fetchOptions:{throw:!0}});"token"in j&&j.token?await M():(R(`${A}/${C.SIGN_IN}${window.location.search}`),S({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(j){S({variant:"error",message:jt({error:j,localization:t,localizeErrors:T})}),D.reset()}}async function G(){if(!h){v(!0),y(30);try{await _.emailOtp.sendVerificationOtp({email:O,type:"email-verification",fetchOptions:{throw:!0}}),S({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(K){S({variant:"error",message:jt({error:K,localization:t,localizeErrors:T})}),v(!1),y(0)}}}return O?b.jsx(yo,{...D,children:b.jsxs("form",{onSubmit:D.handleSubmit(W),className:fe("grid w-full gap-6",n,o?.base),children:[b.jsx(Ht,{control:D.control,name:"code",render:({field:K})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:o?.label,children:t.EMAIL_OTP}),b.jsx(rn,{children:b.jsx(g0,{...K,maxLength:6,onChange:j=>{K.onChange(j),j.length===6&&D.handleSubmit(W)()},containerClassName:o?.otpInputContainer,className:o?.otpInput,disabled:z,children:b.jsx(y0,{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:G,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 gV({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:w,viewPaths:S,localizeErrors:T}=E.useContext(qe);o={...y,...o};const R=bn({email:Ve().email({message:`${o.EMAIL} ${o.IS_INVALID}`}).min(1,{message:`${o.EMAIL} ${o.IS_REQUIRED}`})}),A=mo({resolver:vo(R),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{i?.(A.formState.isSubmitting)},[A.formState.isSubmitting,i]);async function C({email:O}){try{const M={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:O,redirectTo:`${p}${v}/${S.RESET_PASSWORD}`,fetchOptions:M}),w({variant:"success",message:o.FORGOT_PASSWORD_EMAIL}),_(`${v}/${S.SIGN_IN}${window.location.search}`)}catch(M){w({variant:"error",message:jt({error:M,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:O})=>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,...O})}),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 fw({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:w,localization:S,redirectTo:T,viewPaths:R,toast:A,localizeErrors:C}=E.useContext(qe);i={...S,...i};const O=E.useCallback(()=>l||Ei("redirectTo")||T,[l,T]),M=E.useCallback(()=>`${_}${n||(w?`${y}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,w,y,R,_,O]),L=bn({email:Ve().email({message:`${i.EMAIL} ${i.IS_INVALID}`})}),N=mo({resolver:vo(L),defaultValues:{email:""}});o=o||N.formState.isSubmitting,E.useEffect(()=>{c?.(N.formState.isSubmitting)},[N.formState.isSubmitting,c]);async function D({email:z}){try{const W={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:z,callbackURL:M(),fetchOptions:W}),A({variant:"success",message:i.MAGIC_LINK_EMAIL}),N.reset()}catch(W){A({variant:"error",message:jt({error:W,localization:i,localizeErrors:C})}),v()}}return b.jsx(yo,{...N,children:b.jsxs("form",{onSubmit:N.handleSubmit(D),noValidate:d,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:N.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 yV({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 w({code:S}){try{await c.twoFactor.verifyBackupCode({code:S,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(w),className:fe("grid gap-6",e,t?.base),children:[b.jsx(Ht,{control:_.control,name:"code",render:({field:S})=>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,...S})}),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 bV({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,w=d?.passwordValidation;n={...f,...n},o={...w,...o};const S=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(S),defaultValues:{newPassword:"",confirmPassword:""}}),R=T.formState.isSubmitting;E.useEffect(()=>{if(i.current)return;i.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="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 M=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:M,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),v(`${c}/${h.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:jt({error:O,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:R,...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:R,...C})}),b.jsx(un,{className:t?.error})]})}),b.jsx(wt,{type:"submit",disabled:R,className:fe("w-full",t?.button,t?.primaryButton),children:R?b.jsx(gn,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function _V({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:w,viewPaths:S,navigate:T,toast:R,Link:A,localizeErrors:C,emailVerification:O}=E.useContext(qe),M=_?.rememberMe,L=_?.username,N=_?.passwordValidation;o={...w,...o},c={...N,...c};const{onSuccess:D,isPending:z}=bo({redirectTo:i}),W=bn({email:L?Ve().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):Ve().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:ic(c,o),rememberMe:wg().optional()}),G=mo({resolver:vo(W),defaultValues:{email:"",password:"",rememberMe:!M}});n=n||G.formState.isSubmitting||z,E.useEffect(()=>{l?.(G.formState.isSubmitting||z)},[G.formState.isSubmitting,z,l]);async function K({email:j,password:ne,rememberMe:ae}){var P;try{let F={};if(L&&!q8(j)){const H={throw:!0,headers:await h("/sign-in/username")};F=await p.signIn.username({username:j,password:ne,rememberMe:ae,fetchOptions:H})}else{const H={throw:!0,headers:await h("/sign-in/email")};F=await p.signIn.email({email:j,password:ne,rememberMe:ae,fetchOptions:H})}F.twoFactorRedirect?T(`${y}/${S.TWO_FACTOR}${window.location.search}`):await D()}catch(F){G.resetField("password"),v(),R({variant:"error",message:jt({error:F,localization:o,localizeErrors:C})}),O?.otp&&((P=F?.error)==null?void 0:P.code)==="EMAIL_NOT_VERIFIED"&&T(`${y}/${S.EMAIL_VERIFICATION}?email=${encodeURIComponent(j)}`)}}return b.jsx(yo,{...G,children:b.jsxs("form",{onSubmit:G.handleSubmit(K),noValidate:d,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:G.control,name:"email",render:({field:j})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:L?o.USERNAME:o.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{autoComplete:L?"username":"email",className:t?.input,type:L?"text":"email",placeholder:L?o.SIGN_IN_USERNAME_PLACEHOLDER:o.EMAIL_PLACEHOLDER,disabled:n,...j})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:G.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}/${S.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})]})}),M&&b.jsx(Ht,{control:G.control,name:"rememberMe",render:({field:j})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(rn,{children:b.jsx(v0,{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 EV({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:w,baseURL:S,credentials:T,localization:R,nameRequired:A,persistClient:C,redirectTo:O,signUp:M,viewPaths:L,navigate:N,toast:D,avatar:z,localizeErrors:W,emailVerification:G}=E.useContext(qe),K=T?.confirmPassword,j=T?.username,ne=T?.usernameRequired??!0,ae=T?.passwordValidation,P=M?.fields;i={...R,...i},d={...ae,...d};const F=E.useRef(null),[H,re]=E.useState(null),[ye,k]=E.useState(!1),Q=E.useCallback(()=>l||Ei("redirectTo")||O,[l,O]),ee=E.useCallback(()=>`${S}${n||(C?`${w}/${L.CALLBACK}?redirectTo=${encodeURIComponent(Q())}`:Q())}`,[n,C,w,L,S,Q]),{onSuccess:se,isPending:me}=bo({redirectTo:l}),_e={email:Ve().email({message:`${i.EMAIL} ${i.IS_INVALID}`}),password:ic(d,i),name:P?.includes("name")&&A?Ve().min(1,{message:`${i.NAME} ${i.IS_REQUIRED}`}):Ve().optional(),image:Ve().optional(),username:j&&ne?Ve().min(1,{message:`${i.USERNAME} ${i.IS_REQUIRED}`}):Ve().optional(),confirmPassword:K?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(P)for(const ve of P){if(ve==="name"||ve==="image")continue;const Re=y?.[ve];if(!Re)continue;let ke;Re.type==="number"?ke=Re.required?H8(et=>et?Number(et):void 0,b2({message:`${Re.label} ${i.IS_INVALID}`})):G8({message:`${Re.label} ${i.IS_INVALID}`}).optional():Re.type==="boolean"?ke=Re.required?LE({message:`${Re.label} ${i.IS_INVALID}`}).refine(et=>et===!0,{message:`${Re.label} ${i.IS_REQUIRED}`}):LE({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=>K?ve.password===ve.confirmPassword:!0,{message:i.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),De={email:"",password:"",...K&&{confirmPassword:""},...P?.includes("name")?{name:""}:{},...j?{username:""}:{},...P?.includes("image")&&z?{image:""}:{}};if(P)for(const ve of P){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){k(!0);try{const Re=await M$(ve,crypto.randomUUID(),z.size,z.extension);let ke;z.upload?ke=await z.upload(Re):ke=await D$(Re),ke?(re(ke),Le.setValue("image",ke)):(re(null),Le.setValue("image",""))}catch(Re){console.error(Re),D({variant:"error",message:jt({error:Re,localization:i,localizeErrors:W})})}k(!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 q={throw:!0,headers:await v("/sign-up/email")},Z={};et!==void 0&&(!ne&&(et===null||et===""||typeof et=="string"&&et.trim()==="")||(Z.username=et)),Qe!==void 0&&(Z.image=Qe);const ue=await _.signUp.email({email:ve,password:Re,name:ke||"",...Z,...U,callbackURL:ee(),fetchOptions:q});"token"in ue&&ue.token?await se():G?.otp?N(`${w}/${L.EMAIL_VERIFICATION}?email=${encodeURIComponent(ve)}`):(N(`${w}/${L.SIGN_IN}${window.location.search}`),D({variant:"success",message:i.SIGN_UP_EMAIL}))}catch(q){D({variant:"error",message:jt({error:q,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:[P?.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(NT,{children:[b.jsx(DT,{asChild:!0,children:b.jsx(wt,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx($T,{isPending:ye,className:"size-16",user:H?{name:Le.watch("name"),email:Le.watch("email"),image:H}:null,localization:i})})}),b.jsxs(LT,{align:"start",onCloseAutoFocus:ve=>ve.preventDefault(),children:[b.jsxs(lf,{onClick:Nt,disabled:ye,children:[b.jsx(m7,{}),i.UPLOAD_AVATAR]}),H&&b.jsxs(lf,{onClick:ze,disabled:ye,variant:"destructive",children:[b.jsx(S7,{}),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,{})]})})]}),P?.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,!ne&&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})]})}),K&&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})]})}),P?.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(v0,{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(z$,{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 SV({className:e,classNames:t,isSubmitting:n,localization:o,otpSeparators:i=0,redirectTo:l,setIsSubmitting:c}){var d;const f=Ho(),h=f?Ei("totpURI"):null,v=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:w,twoFactor:S,viewPaths:T,toast:R,Link:A,localizeErrors:C}=E.useContext(qe);o={...w,...o};const{onSuccess:O,isPending:M}=bo({redirectTo:l}),{data:L}=_(),N=(d=L?.user)==null?void 0:d.twoFactorEnabled,[D,z]=E.useState(S?.length===1?S[0]:null),[W,G]=E.useState(!1),[K,j]=E.useState(0),ne=bn({code:Ve().min(1,{message:`${o.ONE_TIME_PASSWORD} ${o.IS_REQUIRED}`}).min(6,{message:`${o.ONE_TIME_PASSWORD} ${o.IS_INVALID}`}),trustDevice:wg().optional()}),ae=mo({resolver:vo(ne),defaultValues:{code:""}});n=n||ae.formState.isSubmitting||M,E.useEffect(()=>{c?.(ae.formState.isSubmitting||M)},[ae.formState.isSubmitting,M,c]),E.useEffect(()=>{D==="otp"&&K<=0&&!v.current&&(v.current=!0,P())},[D]),E.useEffect(()=>{if(K<=0)return;const H=setTimeout(()=>{j(re=>re-1)},1e3);return()=>clearTimeout(H)},[K]);const P=async()=>{if(!(W||K>0)){try{G(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),j(60)}catch(H){R({variant:"error",message:jt({error:H,localization:o,localizeErrors:C})}),H.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}v.current=!1,G(!1)}};async function F({code:H,trustDevice:re}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:H,trustDevice:re,fetchOptions:{throw:!0}}),await O(),L&&!N&&R({variant:"success",message:o?.TWO_FACTOR_ENABLED})}catch(ye){R({variant:"error",message:jt({error:ye,localization:o,localizeErrors:C})}),ae.reset()}}return b.jsx(yo,{...ae,children:b.jsxs("form",{onSubmit:ae.handleSubmit(F),className:fe("grid w-full gap-6",e,t?.base),children:[S?.includes("totp")&&h&&D==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx(PT,{className:t?.label,children:o.TWO_FACTOR_TOTP_LABEL}),b.jsx(_$,{className:fe("border shadow-xs",t?.qrCode),value:h})]}),D!==null&&b.jsxs(b.Fragment,{children:[b.jsx(Ht,{control:ae.control,name:"code",render:({field:H})=>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(g0,{...H,maxLength:6,onChange:re=>{H.onChange(re),re.length===6&&ae.handleSubmit(F)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(y0,{otpSeparators:i})})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:ae.control,name:"trustDevice",render:({field:H})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(rn,{children:b.jsx(v0,{checked:H.value,onCheckedChange:H.onChange,disabled:n,className:t?.checkbox})}),b.jsx(qt,{className:t?.label,children:o.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[D!==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]}),D==="otp"&&S?.includes("otp")&&b.jsxs(wt,{type:"button",variant:"outline",onClick:P,disabled:K>0||W||n,className:fe(t?.button,t?.outlineButton),children:[W?b.jsx(gn,{className:"animate-spin"}):b.jsx($E,{className:t?.icon}),o.RESEND_CODE,K>0&&` (${K})`]}),D!=="otp"&&S?.includes("otp")&&b.jsxs(wt,{type:"button",variant:"secondary",className:fe(t?.button,t?.secondaryButton),onClick:()=>z("otp"),disabled:n,children:[b.jsx($E,{className:t?.icon}),o.SEND_VERIFICATION_CODE]}),D!=="totp"&&S?.includes("totp")&&b.jsxs(wt,{type:"button",variant:"secondary",className:fe(t?.button,t?.secondaryButton),onClick:()=>z("totp"),disabled:n,children:[b.jsx(E7,{className:t?.icon}),o.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function HT({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 wV({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:w,signUp:S,twoFactor:T,viewPaths:R,replace:A}=E.useContext(qe),C=!!S;if(i={...y,...i},E.useEffect(()=>{l&&!xv(R,l)&&(console.error(`Invalid auth view: ${l}`),A(`${v}/${R.SIGN_IN}${window.location.search}`))},[l,R,v,A]),d=d||xv(R,l)||"SIGN_IN",E.useEffect(()=>{let O=!1;d==="MAGIC_LINK"&&(!_||!p&&!w)&&(O=!0),d==="EMAIL_OTP"&&(!w||!p&&!_)&&(O=!0),d==="SIGN_UP"&&!C&&(O=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&(O=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&!T&&(O=!0),O&&A(`${v}/${R.SIGN_IN}${window.location.search}`)},[v,d,R,p,A,w,C,_,T]),d==="SIGN_OUT")return b.jsx(HT,{redirectTo:c});if(d==="CALLBACK")return b.jsx(VT,{redirectTo:c});if(d==="SIGN_IN")return p?b.jsx(_V,{className:e,classNames:t,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):_?b.jsx(fw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):w?b.jsx(dw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(SV,{className:e,classNames:t,localization:i,otpSeparators:f,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(yV,{className:e,classNames:t,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(fw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(dw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="EMAIL_VERIFICATION")return b.jsx(vV,{className:e,classNames:t,callbackURL:n,localization:i,otpSeparators:f,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(gV,{className:e,classNames:t,localization:i,isSubmitting:o,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(bV,{className:e,classNames:t,localization:i});if(d==="SIGN_UP")return C&&b.jsx(EV,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h})}function xV({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}=R$(),[h,v]=E.useState(null);return E.useEffect(()=>{const p=Ei("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(GT,{className:e,classNames:t}):b.jsx(RV,{className:e,classNames:t,localization:d,invitationId:h})}function RV({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]),[w,S]=E.useState(!1),[T,R]=E.useState(!1),A=w||T,{data:C,isPending:O}=c({query:{id:o}}),M=E.useCallback(()=>Ei("redirectTo")||h,[h]);E.useEffect(()=>{if(!(O||!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,O,o,_,p,v,h]);const L=async()=>{R(!0);try{await l.organization.acceptInvitation({invitationId:o,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),v(M())}catch(G){p({variant:"error",message:jt({error:G,localization:_,localizeErrors:y})}),R(!1)}},N=async()=>{S(!0);try{await l.organization.rejectInvitation({invitationId:o,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),v(h)}catch(G){p({variant:"error",message:jt({error:G,localization:_,localizeErrors:y})}),S(!1)}},W=((i=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find(G=>G.role===C?.role))==null?void 0:i.label)||C?.role;return C?b.jsxs(yi,{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(p0,{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(yi,{className:fe("flex-row items-center p-4"),children:[b.jsx(FT,{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:N,disabled:A,children:[w?b.jsx(gn,{className:"animate-spin"}):b.jsx(N2,{}),_.REJECT]}),b.jsxs(wt,{className:fe(t?.button,t?.primaryButton),onClick:L,disabled:A,children:[T?b.jsx(gn,{className:"animate-spin"}):b.jsx(Ag,{}),_.ACCEPT]})]})]})]}):b.jsx(GT,{className:e,classNames:t})}var GT=({className:e,classNames:t,localization:n})=>b.jsxs(yi,{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(yi,{className:fe("flex-row items-center p-4"),children:[b.jsx(FT,{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 hw({className:e,orientation:t="horizontal",decorative:n=!0,...o}){return b.jsx(x$,{"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 OV({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(I2,{className:(c=e?.form)==null?void 0:c.icon}):b.jsx(M2,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",o==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function TV({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(I2,{className:(c=e?.form)==null?void 0:c.icon}):b.jsx(M2,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",o==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function AV({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 CV({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(b7,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function pw({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:w,basePath:S,baseURL:T,persistClient:R,redirectTo:A,viewPaths:C,social:O,genericOAuth:M,toast:L,localizeErrors:N}=E.useContext(qe),D=E.useCallback(()=>d||Ei("redirectTo")||A,[d,A]),z=E.useCallback(()=>`${T}${n||(R?`${S}/${C.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,S,C,T,D]),W=async()=>{h(!0);try{if(l){const G={providerId:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};M?.signIn?(await M.signIn(G),setTimeout(()=>{h(!1)},1e4)):await w.signIn.oauth2(G)}else{const G={provider:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(G),setTimeout(()=>{h(!1)},1e4)):await w.signIn.social(G)}}catch(G){L({variant:"error",message:jt({error:G,localization:i,localizeErrors:N})}),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 LH({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,_,w,S,T,R;const A=Ho(),{basePath:C,credentials:O,localization:M,magicLink:L,emailOTP:N,oneTap:D,passkey:z,signUp:W,social:G,genericOAuth:K,viewPaths:j,Link:ne}=E.useContext(qe);l={...M,...l};let ae=h;ae==="auto"&&(ae=O&&G?.providers&&G.providers.length>2?"horizontal":"vertical");const P=c??d?.split("/").pop(),F=v||xv(j,P)||"SIGN_IN",[H,re]=E.useState(!1);if(E.useEffect(()=>{const k=()=>re(!1);return window.addEventListener("pagehide",k),()=>{re(!1),window.removeEventListener("pagehide",k)}},[]),F==="CALLBACK")return b.jsx(VT,{redirectTo:f});if(F==="SIGN_OUT")return b.jsx(HT,{redirectTo:f});if(F==="ACCEPT_INVITATION")return b.jsx(xV,{className:e,classNames:t});const ye=!O&&!L&&!N?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${F}_DESCRIPTION`];return b.jsxs(yi,{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(p0,{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:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(F)&&b.jsx(AV,{localization:l,redirectTo:f}),(O||L||N)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(wV,{classNames:t?.form,callbackURL:n,isSubmitting:H,localization:l,otpSeparators:p,view:F,redirectTo:f,setIsSubmitting:re}),L&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||N&&F==="EMAIL_OTP")&&b.jsx(TV,{classNames:t,localization:l,view:F,isSubmitting:H}),N&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||L&&["SIGN_IN","MAGIC_LINK"].includes(F))&&b.jsx(OV,{classNames:t,localization:l,view:F,isSubmitting:H})]}),F!=="RESET_PASSWORD"&&F!=="EMAIL_VERIFICATION"&&(((y=G?.providers)==null?void 0:y.length)||((_=K?.providers)==null?void 0:_.length)||F==="SIGN_IN"&&z)&&b.jsxs(b.Fragment,{children:[(O||L||N)&&b.jsxs("div",{className:fe("flex items-center gap-2",t?.continueWith),children:[b.jsx(hw,{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(hw,{className:fe("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((w=G?.providers)==null?void 0:w.length)||((S=K?.providers)==null?void 0:S.length))&&b.jsxs("div",{className:fe("flex w-full items-center justify-between gap-4",ae==="horizontal"&&"flex-wrap",ae==="vertical"&&"flex-col",ae==="grid"&&"grid grid-cols-2"),children:[(T=G?.providers)==null?void 0:T.map(k=>{const Q=lV.find(ee=>ee.provider===k);return Q?b.jsx(pw,{classNames:t,callbackURL:n,isSubmitting:H,localization:l,provider:Q,redirectTo:f,setIsSubmitting:re,socialLayout:ae},k):null}),(R=K?.providers)==null?void 0:R.map(k=>b.jsx(pw,{classNames:t,callbackURL:n,isSubmitting:H,localization:l,provider:k,redirectTo:f,setIsSubmitting:re,socialLayout:ae,other:!0},k.provider))]}),z&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(F)&&b.jsx(CV,{classNames:t,isSubmitting:H,localization:l,redirectTo:f,setIsSubmitting:re})]})]})]}),i&&b.jsx(Xv,{className:t?.footer,children:i}),O&&W&&b.jsxs(Xv,{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(h7,{className:"size-3"}),F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"||F==="SIGN_UP"?b.jsx(ne,{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 PH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{isPending:n}=t();return n?e:null}function kH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{data:n}=t();return n?e:null}function jH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{data:n,isPending:o}=t();return!n&&!o?e:null}function IV(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(c7,{authClient:lI,organization:i,navigate:l,replace:c,Link:MV,children:n}),t[4]=n,t[5]=l,t[6]=c,t[7]=d):d=t[7],d}function MV(e){const{href:t,className:n,children:o,...i}=e;return b.jsx(pg,{to:t,className:n,...i,children:o})}const NV=new B4;function DV(e){const t=cf.c(3),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(UP,{}),t[0]=o):o=t[0];let i;return t[1]!==n?(i=b.jsxs($4,{client:NV,children:[o,b.jsx(o3,{children:b.jsx(IV,{children:n})})]}),t[1]=n,t[2]=i):i=t[2],i}const LV=function(){return null};function PV(){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=C5({component:()=>b.jsxs(DV,{children:[b.jsx(E.Suspense,{fallback:b.jsx(PV,{}),children:b.jsx(Kw,{})}),b.jsx(LV,{})]})}),kV=yn({getParentRoute:()=>Cc,path:"/login",component:An(()=>Tn(()=>import("./login-UWyl_cxx.js"),__vite__mapDeps([0,1,2]))),validateSearch:za(()=>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()}))}),jV=yn({getParentRoute:()=>Cc,path:"/auth/$pathname",component:An(()=>Tn(()=>import("./auth-catchall-BZWl_BRK.js"),[]))}),yr=yn({getParentRoute:()=>Cc,id:"shell",component:An(()=>Tn(()=>import("./shell-layout-DqUuQ9gz.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,41,2,42,43,44,45])))}),zV=yn({getParentRoute:()=>yr,path:"/",component:An(()=>Tn(()=>import("./home-DgfprghT.js"),__vite__mapDeps([46,27,1,43,16,11,2,40,30,41,42])))}),UV=yn({getParentRoute:()=>yr,path:"/$org",component:An(()=>Tn(()=>import("./page-B7ia0_lh.js"),__vite__mapDeps([47,5,1,6,48,49,44,18,50,51,17,52,8,53,11,9,38,54,55,56,34,24,57,58,29,59])))}),BV=yn({getParentRoute:()=>yr,path:"/$org/members",component:An(()=>Tn(()=>import("./members-C3UV37Kw.js"),__vite__mapDeps([60,48,49,1,44,6,18,50,51,61,4,2,62,63,5,64,65,66,32,8,43,56,30,45,12,67,10,68,11,36,17,41,20,21,23,27,69,57])))}),FV=yn({getParentRoute:()=>yr,path:"/$org/mcps",component:An(()=>Tn(()=>import("./connections-CWHukeOK.js"),__vite__mapDeps([70,48,49,1,44,6,18,50,51,61,4,2,62,26,27,5,17,71,22,30,56,45,12,41,69,72,11,36,10,25,20,21,23,33]))),validateSearch:za(()=>bn({action:Sf(["create"]).optional()}))}),$V=yn({getParentRoute:()=>yr,path:"/$org/settings",component:An(()=>Tn(()=>import("./settings-BapAo6i2.js"),__vite__mapDeps([73,48,49,1,44,6,18,50,51,41,2,12])))}),VV=yn({getParentRoute:()=>yr,path:"/$org/monitoring",component:An(()=>Tn(()=>import("./monitoring-Ds52TSSS.js"),__vite__mapDeps([74,5,1,6,48,49,44,18,50,51,61,4,2,17,54,55,56,34,24,57,58,29,21,38,66,75,11,36,64,76,20,35,77,23]))),validateSearch:za(()=>bn({from:Ve().default("now-24h"),to:Ve().default("now"),connectionId:Ev(Ve()).optional().default([]),gatewayId:Ev(Ve()).optional().default([]),tool:Ve().default(""),status:Sf(["all","success","errors"]).default("all"),search:Ve().default(""),page:b2().optional(),streaming:wg().default(!0),propertyFilters:Ve().default("")}))}),qT=yn({getParentRoute:()=>yr,path:"/$org/store",component:An(()=>Tn(()=>import("./store-DTMoxgob.js"),__vite__mapDeps([78,32,48,49,1,44,6,18,50,5,79,80,10,4,61,2,68,27,81,82,77,20,21,11,13,14,7,8])))}),HV=yn({getParentRoute:()=>yr,path:"/$org/workflow",component:An(()=>Tn(()=>import("./workflow-CBeu3WB4.js"),__vite__mapDeps([83,32,84,33,5,1,6,49,44,18,50,61,4,2,27,24,69,71,22,36,62,85,80,43,8,86,39,87,13,14,30,11,88,65,48,10])))}),GV=yn({getParentRoute:()=>qT,path:"/$appName",component:An(()=>Tn(()=>import("./store-app-detail-CbGg2GlI.js"),__vite__mapDeps([89,16,10,1,65,5,6,21,11,44,28,4,90,8,31,81,49,18,50,61,2,62,27,88,91,92,56,13,14,52,93,94,87,33,79,82]))),validateSearch:za(()=>bn({registryId:Ve().optional(),serverName:Ve().optional(),itemId:Ve().optional()}))}),qV=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId",component:An(()=>Tn(()=>import("./connection-detail-Dm1s8Dj2.js"),__vite__mapDeps([95,4,1,17,5,6,13,14,96,97,72,2,11,36,52,8,86,39,31,57,10,88,65,41,20,21,25,38,9,98,87,81,94,33,55,76,99,92,56,84,49,44,18,50,61,27,24,69,71,22,62,85,80,43,30,90,91]))),validateSearch:za(()=>bn({tab:Ve().optional()}))}),ZV=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:An(()=>Tn(()=>import("./collection-detail-7eGCexqR.js"),__vite__mapDeps([100,5,1,6,4,17,86,39,41,2,23,101,88,65,16,35,75,24,10,58,67,96,97,14,72,11,36,13,52,8,31,57,20,21,25,38,9,98,87,81,94,33,55,76,93,29,85,42,37,19,22,50,53,45,12,44,56]))),validateSearch:za(()=>bn({replayId:Ve().optional()}))}),YV=yn({getParentRoute:()=>yr,path:"/$org/gateways",component:An(()=>Tn(()=>import("./gateways-9p2LLkTK.js"),__vite__mapDeps([102,48,49,1,44,6,18,50,51,61,4,2,62,26,27,5,17,38,71,22,30,56,9,69,10,36]))),validateSearch:za(()=>bn({action:Sf(["create"]).optional()}))}),KV=yn({getParentRoute:()=>yr,path:"/$org/gateways/$gatewayId",component:An(()=>Tn(()=>import("./gateway-detail-VCb3jL84.js"),__vite__mapDeps([103,4,1,17,5,6,63,64,65,61,2,11,12,38,99,98,13,14,15,7,8,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,9,101,10,41,92,56,79,86,39,88]))),validateSearch:za(()=>bn({tab:Ve().optional()}))}),WV=yn({getParentRoute:()=>Cc,path:"/oauth/callback",component:An(()=>Tn(()=>import("./oauth-callback-D4M9mHyH.js"),__vite__mapDeps([104,10,97,14])))}),QV=qT.addChildren([GV]),XV=yr.addChildren([zV,UV,BV,FV,YV,KV,VV,QV,HV,$V,qV,ZV]),JV=Cc.addChildren([XV,kV,jV,WV]),eH=z5({routeTree:JV}),tH=document.getElementById("root");m4.createRoot(tH).render(b.jsx(E.StrictMode,{children:b.jsx(F5,{router:eH})}));export{Go as $,LH as A,Ut as B,Ij as C,OH as D,Ge as E,$ as F,V$ as G,Si as H,WR as I,dz as J,n3 as K,xR as L,uz as M,sH as N,Cj as O,Aj as P,iH as Q,Oj as R,PV as S,Mj as T,DH as U,lx as V,Ev as W,yH as X,wg as Y,dn as Z,Sf as _,lI as a,dH as a$,Wr as a0,Kr as a1,nH as a2,bi as a3,Hw as a4,pf as a5,Jv as a6,Pa as a7,Fo as a8,D4 as a9,Tj as aA,pg as aB,T7 as aC,WI as aD,qO as aE,YO as aF,IU as aG,nB as aH,jR as aI,_v as aJ,b8 as aK,Rc as aL,yc as aM,cH as aN,wU as aO,xU as aP,RU as aQ,OU as aR,TU as aS,CH as aT,IH as aU,MH as aV,AH as aW,BL as aX,SH as aY,EH as aZ,za as a_,M_ as aa,oH as ab,rH as ac,e3 as ad,W4 as ae,er as af,BU as ag,FU as ah,UU as ai,In as aj,Tn as ak,DU as al,qw as am,UR as an,Q9 as ao,Bg as ap,YR as aq,zg as ar,X9 as as,J9 as at,N2 as au,S7 as av,Ca as aw,wR as ax,_7 as ay,y7 as az,hg as b,b2 as b0,bH as b1,vH as b2,pH as b3,iR as b4,Fg as b5,lc as b6,Q2 as b7,Ug as b8,NH as b9,xg as bA,x8 as bB,pM as bC,hH as bD,mH as bE,CL as bF,xH as bG,RH as bH,wH as bI,tc as bJ,j4 as bK,bw as bL,H8 as bM,NE as bN,uH as bO,lH as bP,G8 as bQ,pc as ba,On as bb,av as bc,gw as bd,V4 as be,q4 as bf,Q4 as bg,Z4 as bh,Y4 as bi,Qn as bj,J4 as bk,N_ as bl,X4 as bm,K4 as bn,O7 as bo,C7 as bp,xf as bq,Lg as br,fH as bs,E2 as bt,Sg as bu,_H as bv,KL as bw,gH as bx,y8 as by,S8 as bz,cf as c,fg as d,F4 as e,mc as f,Jn as g,TH as h,Q7 as i,b as j,G2 as k,x$ as l,qe as m,PH as n,kH as o,jH as p,t3 as q,E as r,Kw as s,jE as t,aH as u,bn as v,Ve as w,vo as x,mo as y,bc as z};
|
|
155
|
+
`}),b.jsx(XF,{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 hV=["/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||hV).includes(n))return null;const{theme:i}=Tg(),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(fV,{ref:e}),c&&b.jsx(dV,{localization:t}),d&&b.jsx(ET,{className:"mx-auto",ref:e,siteKey:o.siteKey,options:{theme:i,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(OF,{ref:e,sitekey:o.siteKey,theme:i})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(dT,{ref:e,sitekey:o.siteKey,theme:i})})]})}function g0({className:e,containerClassName:t,...n}){return b.jsx(OT,{"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 gs({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(RT),{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 rv({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(_7,{})})}function y0({otpSeparators:e=0}){return e===0?b.jsxs(gs,{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(gs,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1}),b.jsx(pn,{index:2})]}),b.jsx(rv,{}),b.jsxs(gs,{children:[b.jsx(pn,{index:3}),b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(gs,{children:[b.jsx(pn,{index:0}),b.jsx(pn,{index:1})]}),b.jsx(rv,{}),b.jsxs(gs,{children:[b.jsx(pn,{index:2}),b.jsx(pn,{index:3})]}),b.jsx(rv,{}),b.jsxs(gs,{children:[b.jsx(pn,{index:4}),b.jsx(pn,{index:5})]})]})}function dw(e){const[t,n]=E.useState();return t?b.jsx(mV,{...e,email:t}):b.jsx(pV,{...e,setEmail:n})}function pV({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}`})}),w=mo({resolver:vo(_),defaultValues:{email:""}});n=n||w.formState.isSubmitting,E.useEffect(()=>{i?.(w.formState.isSubmitting)},[w.formState.isSubmitting,i]);async function S({email:T}){const R={throw:!0,headers:await f("/email-otp/send-verification-otp")};try{await h.emailOtp.sendVerificationOtp({email:T,type:"sign-in",fetchOptions:R}),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,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(S),noValidate:c,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:w.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 mV({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}),w=bn({code:Ve().min(1,{message:`${o.EMAIL_OTP} ${o.IS_REQUIRED}`}).min(6,{message:`${o.EMAIL_OTP} ${o.IS_INVALID}`})}),S=mo({resolver:vo(w),defaultValues:{code:""}});n=n||S.formState.isSubmitting||_,E.useEffect(()=>{c?.(S.formState.isSubmitting||_)},[S.formState.isSubmitting,_,c]);async function T({code:R}){try{await f.signIn.emailOtp({email:d,otp:R,fetchOptions:{throw:!0}}),await y()}catch(A){v({variant:"error",message:jt({error:A,localization:o,localizeErrors:p})}),S.reset()}}return b.jsx(yo,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(T),className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:S.control,name:"code",render:({field:R})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:o.EMAIL_OTP}),b.jsx(rn,{children:b.jsx(g0,{...R,maxLength:6,onChange:A=>{R.onChange(A),A.length===6&&S.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(y0,{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 vV({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:w,toast:S,localizeErrors:T,navigate:R,basePath:A,viewPaths:C}=E.useContext(qe);t={...w,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:M,isPending:L}=bo({redirectTo:d}),N=bn({code:Ve().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),D=mo({resolver:vo(N),defaultValues:{code:""}}),z=c||D.formState.isSubmitting||L;E.useEffect(()=>{f?.(D.formState.isSubmitting||L)},[D.formState.isSubmitting,L,f]),E.useEffect(()=>{if(p>0){const K=setTimeout(()=>y(p-1),1e3);return()=>clearTimeout(K)}else v(!1)},[p]);async function W({code:K}){try{const j=await _.emailOtp.verifyEmail({email:O,otp:K,fetchOptions:{throw:!0}});"token"in j&&j.token?await M():(R(`${A}/${C.SIGN_IN}${window.location.search}`),S({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(j){S({variant:"error",message:jt({error:j,localization:t,localizeErrors:T})}),D.reset()}}async function G(){if(!h){v(!0),y(30);try{await _.emailOtp.sendVerificationOtp({email:O,type:"email-verification",fetchOptions:{throw:!0}}),S({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(K){S({variant:"error",message:jt({error:K,localization:t,localizeErrors:T})}),v(!1),y(0)}}}return O?b.jsx(yo,{...D,children:b.jsxs("form",{onSubmit:D.handleSubmit(W),className:fe("grid w-full gap-6",n,o?.base),children:[b.jsx(Ht,{control:D.control,name:"code",render:({field:K})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:o?.label,children:t.EMAIL_OTP}),b.jsx(rn,{children:b.jsx(g0,{...K,maxLength:6,onChange:j=>{K.onChange(j),j.length===6&&D.handleSubmit(W)()},containerClassName:o?.otpInputContainer,className:o?.otpInput,disabled:z,children:b.jsx(y0,{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:G,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 gV({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:w,viewPaths:S,localizeErrors:T}=E.useContext(qe);o={...y,...o};const R=bn({email:Ve().email({message:`${o.EMAIL} ${o.IS_INVALID}`}).min(1,{message:`${o.EMAIL} ${o.IS_REQUIRED}`})}),A=mo({resolver:vo(R),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{i?.(A.formState.isSubmitting)},[A.formState.isSubmitting,i]);async function C({email:O}){try{const M={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:O,redirectTo:`${p}${v}/${S.RESET_PASSWORD}`,fetchOptions:M}),w({variant:"success",message:o.FORGOT_PASSWORD_EMAIL}),_(`${v}/${S.SIGN_IN}${window.location.search}`)}catch(M){w({variant:"error",message:jt({error:M,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:O})=>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,...O})}),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 fw({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:w,localization:S,redirectTo:T,viewPaths:R,toast:A,localizeErrors:C}=E.useContext(qe);i={...S,...i};const O=E.useCallback(()=>l||Ei("redirectTo")||T,[l,T]),M=E.useCallback(()=>`${_}${n||(w?`${y}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,w,y,R,_,O]),L=bn({email:Ve().email({message:`${i.EMAIL} ${i.IS_INVALID}`})}),N=mo({resolver:vo(L),defaultValues:{email:""}});o=o||N.formState.isSubmitting,E.useEffect(()=>{c?.(N.formState.isSubmitting)},[N.formState.isSubmitting,c]);async function D({email:z}){try{const W={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:z,callbackURL:M(),fetchOptions:W}),A({variant:"success",message:i.MAGIC_LINK_EMAIL}),N.reset()}catch(W){A({variant:"error",message:jt({error:W,localization:i,localizeErrors:C})}),v()}}return b.jsx(yo,{...N,children:b.jsxs("form",{onSubmit:N.handleSubmit(D),noValidate:d,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:N.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 yV({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 w({code:S}){try{await c.twoFactor.verifyBackupCode({code:S,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(w),className:fe("grid gap-6",e,t?.base),children:[b.jsx(Ht,{control:_.control,name:"code",render:({field:S})=>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,...S})}),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 bV({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,w=d?.passwordValidation;n={...f,...n},o={...w,...o};const S=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(S),defaultValues:{newPassword:"",confirmPassword:""}}),R=T.formState.isSubmitting;E.useEffect(()=>{if(i.current)return;i.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="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 M=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:M,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),v(`${c}/${h.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:jt({error:O,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:R,...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:R,...C})}),b.jsx(un,{className:t?.error})]})}),b.jsx(wt,{type:"submit",disabled:R,className:fe("w-full",t?.button,t?.primaryButton),children:R?b.jsx(gn,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function _V({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:w,viewPaths:S,navigate:T,toast:R,Link:A,localizeErrors:C,emailVerification:O}=E.useContext(qe),M=_?.rememberMe,L=_?.username,N=_?.passwordValidation;o={...w,...o},c={...N,...c};const{onSuccess:D,isPending:z}=bo({redirectTo:i}),W=bn({email:L?Ve().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):Ve().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:ic(c,o),rememberMe:wg().optional()}),G=mo({resolver:vo(W),defaultValues:{email:"",password:"",rememberMe:!M}});n=n||G.formState.isSubmitting||z,E.useEffect(()=>{l?.(G.formState.isSubmitting||z)},[G.formState.isSubmitting,z,l]);async function K({email:j,password:ne,rememberMe:ae}){var P;try{let F={};if(L&&!q8(j)){const H={throw:!0,headers:await h("/sign-in/username")};F=await p.signIn.username({username:j,password:ne,rememberMe:ae,fetchOptions:H})}else{const H={throw:!0,headers:await h("/sign-in/email")};F=await p.signIn.email({email:j,password:ne,rememberMe:ae,fetchOptions:H})}F.twoFactorRedirect?T(`${y}/${S.TWO_FACTOR}${window.location.search}`):await D()}catch(F){G.resetField("password"),v(),R({variant:"error",message:jt({error:F,localization:o,localizeErrors:C})}),O?.otp&&((P=F?.error)==null?void 0:P.code)==="EMAIL_NOT_VERIFIED"&&T(`${y}/${S.EMAIL_VERIFICATION}?email=${encodeURIComponent(j)}`)}}return b.jsx(yo,{...G,children:b.jsxs("form",{onSubmit:G.handleSubmit(K),noValidate:d,className:fe("grid w-full gap-6",e,t?.base),children:[b.jsx(Ht,{control:G.control,name:"email",render:({field:j})=>b.jsxs(Gt,{children:[b.jsx(qt,{className:t?.label,children:L?o.USERNAME:o.EMAIL}),b.jsx(rn,{children:b.jsx(Yr,{autoComplete:L?"username":"email",className:t?.input,type:L?"text":"email",placeholder:L?o.SIGN_IN_USERNAME_PLACEHOLDER:o.EMAIL_PLACEHOLDER,disabled:n,...j})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:G.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}/${S.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})]})}),M&&b.jsx(Ht,{control:G.control,name:"rememberMe",render:({field:j})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(rn,{children:b.jsx(v0,{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 EV({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:w,baseURL:S,credentials:T,localization:R,nameRequired:A,persistClient:C,redirectTo:O,signUp:M,viewPaths:L,navigate:N,toast:D,avatar:z,localizeErrors:W,emailVerification:G}=E.useContext(qe),K=T?.confirmPassword,j=T?.username,ne=T?.usernameRequired??!0,ae=T?.passwordValidation,P=M?.fields;i={...R,...i},d={...ae,...d};const F=E.useRef(null),[H,re]=E.useState(null),[ye,k]=E.useState(!1),Q=E.useCallback(()=>l||Ei("redirectTo")||O,[l,O]),ee=E.useCallback(()=>`${S}${n||(C?`${w}/${L.CALLBACK}?redirectTo=${encodeURIComponent(Q())}`:Q())}`,[n,C,w,L,S,Q]),{onSuccess:se,isPending:me}=bo({redirectTo:l}),_e={email:Ve().email({message:`${i.EMAIL} ${i.IS_INVALID}`}),password:ic(d,i),name:P?.includes("name")&&A?Ve().min(1,{message:`${i.NAME} ${i.IS_REQUIRED}`}):Ve().optional(),image:Ve().optional(),username:j&&ne?Ve().min(1,{message:`${i.USERNAME} ${i.IS_REQUIRED}`}):Ve().optional(),confirmPassword:K?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(P)for(const ve of P){if(ve==="name"||ve==="image")continue;const Re=y?.[ve];if(!Re)continue;let ke;Re.type==="number"?ke=Re.required?H8(et=>et?Number(et):void 0,b2({message:`${Re.label} ${i.IS_INVALID}`})):G8({message:`${Re.label} ${i.IS_INVALID}`}).optional():Re.type==="boolean"?ke=Re.required?LE({message:`${Re.label} ${i.IS_INVALID}`}).refine(et=>et===!0,{message:`${Re.label} ${i.IS_REQUIRED}`}):LE({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=>K?ve.password===ve.confirmPassword:!0,{message:i.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),De={email:"",password:"",...K&&{confirmPassword:""},...P?.includes("name")?{name:""}:{},...j?{username:""}:{},...P?.includes("image")&&z?{image:""}:{}};if(P)for(const ve of P){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){k(!0);try{const Re=await M$(ve,crypto.randomUUID(),z.size,z.extension);let ke;z.upload?ke=await z.upload(Re):ke=await D$(Re),ke?(re(ke),Le.setValue("image",ke)):(re(null),Le.setValue("image",""))}catch(Re){console.error(Re),D({variant:"error",message:jt({error:Re,localization:i,localizeErrors:W})})}k(!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 q={throw:!0,headers:await v("/sign-up/email")},Z={};et!==void 0&&(!ne&&(et===null||et===""||typeof et=="string"&&et.trim()==="")||(Z.username=et)),Qe!==void 0&&(Z.image=Qe);const ue=await _.signUp.email({email:ve,password:Re,name:ke||"",...Z,...U,callbackURL:ee(),fetchOptions:q});"token"in ue&&ue.token?await se():G?.otp?N(`${w}/${L.EMAIL_VERIFICATION}?email=${encodeURIComponent(ve)}`):(N(`${w}/${L.SIGN_IN}${window.location.search}`),D({variant:"success",message:i.SIGN_UP_EMAIL}))}catch(q){D({variant:"error",message:jt({error:q,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:[P?.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(NT,{children:[b.jsx(DT,{asChild:!0,children:b.jsx(wt,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx($T,{isPending:ye,className:"size-16",user:H?{name:Le.watch("name"),email:Le.watch("email"),image:H}:null,localization:i})})}),b.jsxs(LT,{align:"start",onCloseAutoFocus:ve=>ve.preventDefault(),children:[b.jsxs(lf,{onClick:Nt,disabled:ye,children:[b.jsx(m7,{}),i.UPLOAD_AVATAR]}),H&&b.jsxs(lf,{onClick:ze,disabled:ye,variant:"destructive",children:[b.jsx(S7,{}),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,{})]})})]}),P?.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,!ne&&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})]})}),K&&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})]})}),P?.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(v0,{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(z$,{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 SV({className:e,classNames:t,isSubmitting:n,localization:o,otpSeparators:i=0,redirectTo:l,setIsSubmitting:c}){var d;const f=Ho(),h=f?Ei("totpURI"):null,v=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:w,twoFactor:S,viewPaths:T,toast:R,Link:A,localizeErrors:C}=E.useContext(qe);o={...w,...o};const{onSuccess:O,isPending:M}=bo({redirectTo:l}),{data:L}=_(),N=(d=L?.user)==null?void 0:d.twoFactorEnabled,[D,z]=E.useState(S?.length===1?S[0]:null),[W,G]=E.useState(!1),[K,j]=E.useState(0),ne=bn({code:Ve().min(1,{message:`${o.ONE_TIME_PASSWORD} ${o.IS_REQUIRED}`}).min(6,{message:`${o.ONE_TIME_PASSWORD} ${o.IS_INVALID}`}),trustDevice:wg().optional()}),ae=mo({resolver:vo(ne),defaultValues:{code:""}});n=n||ae.formState.isSubmitting||M,E.useEffect(()=>{c?.(ae.formState.isSubmitting||M)},[ae.formState.isSubmitting,M,c]),E.useEffect(()=>{D==="otp"&&K<=0&&!v.current&&(v.current=!0,P())},[D]),E.useEffect(()=>{if(K<=0)return;const H=setTimeout(()=>{j(re=>re-1)},1e3);return()=>clearTimeout(H)},[K]);const P=async()=>{if(!(W||K>0)){try{G(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),j(60)}catch(H){R({variant:"error",message:jt({error:H,localization:o,localizeErrors:C})}),H.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}v.current=!1,G(!1)}};async function F({code:H,trustDevice:re}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:H,trustDevice:re,fetchOptions:{throw:!0}}),await O(),L&&!N&&R({variant:"success",message:o?.TWO_FACTOR_ENABLED})}catch(ye){R({variant:"error",message:jt({error:ye,localization:o,localizeErrors:C})}),ae.reset()}}return b.jsx(yo,{...ae,children:b.jsxs("form",{onSubmit:ae.handleSubmit(F),className:fe("grid w-full gap-6",e,t?.base),children:[S?.includes("totp")&&h&&D==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx(PT,{className:t?.label,children:o.TWO_FACTOR_TOTP_LABEL}),b.jsx(_$,{className:fe("border shadow-xs",t?.qrCode),value:h})]}),D!==null&&b.jsxs(b.Fragment,{children:[b.jsx(Ht,{control:ae.control,name:"code",render:({field:H})=>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(g0,{...H,maxLength:6,onChange:re=>{H.onChange(re),re.length===6&&ae.handleSubmit(F)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(y0,{otpSeparators:i})})}),b.jsx(un,{className:t?.error})]})}),b.jsx(Ht,{control:ae.control,name:"trustDevice",render:({field:H})=>b.jsxs(Gt,{className:"flex",children:[b.jsx(rn,{children:b.jsx(v0,{checked:H.value,onCheckedChange:H.onChange,disabled:n,className:t?.checkbox})}),b.jsx(qt,{className:t?.label,children:o.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[D!==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]}),D==="otp"&&S?.includes("otp")&&b.jsxs(wt,{type:"button",variant:"outline",onClick:P,disabled:K>0||W||n,className:fe(t?.button,t?.outlineButton),children:[W?b.jsx(gn,{className:"animate-spin"}):b.jsx($E,{className:t?.icon}),o.RESEND_CODE,K>0&&` (${K})`]}),D!=="otp"&&S?.includes("otp")&&b.jsxs(wt,{type:"button",variant:"secondary",className:fe(t?.button,t?.secondaryButton),onClick:()=>z("otp"),disabled:n,children:[b.jsx($E,{className:t?.icon}),o.SEND_VERIFICATION_CODE]}),D!=="totp"&&S?.includes("totp")&&b.jsxs(wt,{type:"button",variant:"secondary",className:fe(t?.button,t?.secondaryButton),onClick:()=>z("totp"),disabled:n,children:[b.jsx(E7,{className:t?.icon}),o.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function HT({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 wV({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:w,signUp:S,twoFactor:T,viewPaths:R,replace:A}=E.useContext(qe),C=!!S;if(i={...y,...i},E.useEffect(()=>{l&&!xv(R,l)&&(console.error(`Invalid auth view: ${l}`),A(`${v}/${R.SIGN_IN}${window.location.search}`))},[l,R,v,A]),d=d||xv(R,l)||"SIGN_IN",E.useEffect(()=>{let O=!1;d==="MAGIC_LINK"&&(!_||!p&&!w)&&(O=!0),d==="EMAIL_OTP"&&(!w||!p&&!_)&&(O=!0),d==="SIGN_UP"&&!C&&(O=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&(O=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&!T&&(O=!0),O&&A(`${v}/${R.SIGN_IN}${window.location.search}`)},[v,d,R,p,A,w,C,_,T]),d==="SIGN_OUT")return b.jsx(HT,{redirectTo:c});if(d==="CALLBACK")return b.jsx(VT,{redirectTo:c});if(d==="SIGN_IN")return p?b.jsx(_V,{className:e,classNames:t,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):_?b.jsx(fw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):w?b.jsx(dw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(SV,{className:e,classNames:t,localization:i,otpSeparators:f,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(yV,{className:e,classNames:t,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(fw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(dw,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="EMAIL_VERIFICATION")return b.jsx(vV,{className:e,classNames:t,callbackURL:n,localization:i,otpSeparators:f,redirectTo:c,isSubmitting:o,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(gV,{className:e,classNames:t,localization:i,isSubmitting:o,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(bV,{className:e,classNames:t,localization:i});if(d==="SIGN_UP")return C&&b.jsx(EV,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:c,isSubmitting:o,setIsSubmitting:h})}function xV({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}=R$(),[h,v]=E.useState(null);return E.useEffect(()=>{const p=Ei("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(GT,{className:e,classNames:t}):b.jsx(RV,{className:e,classNames:t,localization:d,invitationId:h})}function RV({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]),[w,S]=E.useState(!1),[T,R]=E.useState(!1),A=w||T,{data:C,isPending:O}=c({query:{id:o}}),M=E.useCallback(()=>Ei("redirectTo")||h,[h]);E.useEffect(()=>{if(!(O||!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,O,o,_,p,v,h]);const L=async()=>{R(!0);try{await l.organization.acceptInvitation({invitationId:o,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),v(M())}catch(G){p({variant:"error",message:jt({error:G,localization:_,localizeErrors:y})}),R(!1)}},N=async()=>{S(!0);try{await l.organization.rejectInvitation({invitationId:o,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),v(h)}catch(G){p({variant:"error",message:jt({error:G,localization:_,localizeErrors:y})}),S(!1)}},W=((i=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find(G=>G.role===C?.role))==null?void 0:i.label)||C?.role;return C?b.jsxs(yi,{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(p0,{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(yi,{className:fe("flex-row items-center p-4"),children:[b.jsx(FT,{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:N,disabled:A,children:[w?b.jsx(gn,{className:"animate-spin"}):b.jsx(N2,{}),_.REJECT]}),b.jsxs(wt,{className:fe(t?.button,t?.primaryButton),onClick:L,disabled:A,children:[T?b.jsx(gn,{className:"animate-spin"}):b.jsx(Ag,{}),_.ACCEPT]})]})]})]}):b.jsx(GT,{className:e,classNames:t})}var GT=({className:e,classNames:t,localization:n})=>b.jsxs(yi,{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(yi,{className:fe("flex-row items-center p-4"),children:[b.jsx(FT,{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 hw({className:e,orientation:t="horizontal",decorative:n=!0,...o}){return b.jsx(x$,{"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 OV({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(I2,{className:(c=e?.form)==null?void 0:c.icon}):b.jsx(M2,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",o==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function TV({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(I2,{className:(c=e?.form)==null?void 0:c.icon}):b.jsx(M2,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",o==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function AV({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 CV({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(b7,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function pw({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:w,basePath:S,baseURL:T,persistClient:R,redirectTo:A,viewPaths:C,social:O,genericOAuth:M,toast:L,localizeErrors:N}=E.useContext(qe),D=E.useCallback(()=>d||Ei("redirectTo")||A,[d,A]),z=E.useCallback(()=>`${T}${n||(R?`${S}/${C.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,S,C,T,D]),W=async()=>{h(!0);try{if(l){const G={providerId:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};M?.signIn?(await M.signIn(G),setTimeout(()=>{h(!1)},1e4)):await w.signIn.oauth2(G)}else{const G={provider:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(G),setTimeout(()=>{h(!1)},1e4)):await w.signIn.social(G)}}catch(G){L({variant:"error",message:jt({error:G,localization:i,localizeErrors:N})}),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 LH({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,_,w,S,T,R;const A=Ho(),{basePath:C,credentials:O,localization:M,magicLink:L,emailOTP:N,oneTap:D,passkey:z,signUp:W,social:G,genericOAuth:K,viewPaths:j,Link:ne}=E.useContext(qe);l={...M,...l};let ae=h;ae==="auto"&&(ae=O&&G?.providers&&G.providers.length>2?"horizontal":"vertical");const P=c??d?.split("/").pop(),F=v||xv(j,P)||"SIGN_IN",[H,re]=E.useState(!1);if(E.useEffect(()=>{const k=()=>re(!1);return window.addEventListener("pagehide",k),()=>{re(!1),window.removeEventListener("pagehide",k)}},[]),F==="CALLBACK")return b.jsx(VT,{redirectTo:f});if(F==="SIGN_OUT")return b.jsx(HT,{redirectTo:f});if(F==="ACCEPT_INVITATION")return b.jsx(xV,{className:e,classNames:t});const ye=!O&&!L&&!N?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${F}_DESCRIPTION`];return b.jsxs(yi,{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(p0,{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:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(F)&&b.jsx(AV,{localization:l,redirectTo:f}),(O||L||N)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(wV,{classNames:t?.form,callbackURL:n,isSubmitting:H,localization:l,otpSeparators:p,view:F,redirectTo:f,setIsSubmitting:re}),L&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||N&&F==="EMAIL_OTP")&&b.jsx(TV,{classNames:t,localization:l,view:F,isSubmitting:H}),N&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||L&&["SIGN_IN","MAGIC_LINK"].includes(F))&&b.jsx(OV,{classNames:t,localization:l,view:F,isSubmitting:H})]}),F!=="RESET_PASSWORD"&&F!=="EMAIL_VERIFICATION"&&(((y=G?.providers)==null?void 0:y.length)||((_=K?.providers)==null?void 0:_.length)||F==="SIGN_IN"&&z)&&b.jsxs(b.Fragment,{children:[(O||L||N)&&b.jsxs("div",{className:fe("flex items-center gap-2",t?.continueWith),children:[b.jsx(hw,{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(hw,{className:fe("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((w=G?.providers)==null?void 0:w.length)||((S=K?.providers)==null?void 0:S.length))&&b.jsxs("div",{className:fe("flex w-full items-center justify-between gap-4",ae==="horizontal"&&"flex-wrap",ae==="vertical"&&"flex-col",ae==="grid"&&"grid grid-cols-2"),children:[(T=G?.providers)==null?void 0:T.map(k=>{const Q=lV.find(ee=>ee.provider===k);return Q?b.jsx(pw,{classNames:t,callbackURL:n,isSubmitting:H,localization:l,provider:Q,redirectTo:f,setIsSubmitting:re,socialLayout:ae},k):null}),(R=K?.providers)==null?void 0:R.map(k=>b.jsx(pw,{classNames:t,callbackURL:n,isSubmitting:H,localization:l,provider:k,redirectTo:f,setIsSubmitting:re,socialLayout:ae,other:!0},k.provider))]}),z&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(F)&&b.jsx(CV,{classNames:t,isSubmitting:H,localization:l,redirectTo:f,setIsSubmitting:re})]})]})]}),i&&b.jsx(Xv,{className:t?.footer,children:i}),O&&W&&b.jsxs(Xv,{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(h7,{className:"size-3"}),F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"||F==="SIGN_UP"?b.jsx(ne,{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 PH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{isPending:n}=t();return n?e:null}function kH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{data:n}=t();return n?e:null}function jH({children:e}){const{hooks:{useSession:t}}=E.useContext(qe),{data:n,isPending:o}=t();return!n&&!o?e:null}function IV(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(c7,{authClient:lI,organization:i,navigate:l,replace:c,Link:MV,children:n}),t[4]=n,t[5]=l,t[6]=c,t[7]=d):d=t[7],d}function MV(e){const{href:t,className:n,children:o,...i}=e;return b.jsx(pg,{to:t,className:n,...i,children:o})}const NV=new B4;function DV(e){const t=cf.c(3),{children:n}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(UP,{}),t[0]=o):o=t[0];let i;return t[1]!==n?(i=b.jsxs($4,{client:NV,children:[o,b.jsx(o3,{children:b.jsx(IV,{children:n})})]}),t[1]=n,t[2]=i):i=t[2],i}const LV=function(){return null};function PV(){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=C5({component:()=>b.jsxs(DV,{children:[b.jsx(E.Suspense,{fallback:b.jsx(PV,{}),children:b.jsx(Kw,{})}),b.jsx(LV,{})]})}),kV=yn({getParentRoute:()=>Cc,path:"/login",component:An(()=>Tn(()=>import("./login-CevUioqo.js"),__vite__mapDeps([0,1,2]))),validateSearch:za(()=>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()}))}),jV=yn({getParentRoute:()=>Cc,path:"/auth/$pathname",component:An(()=>Tn(()=>import("./auth-catchall-lDj0BXu4.js"),[]))}),yr=yn({getParentRoute:()=>Cc,id:"shell",component:An(()=>Tn(()=>import("./shell-layout-C1VOF_px.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,2,40,41,42,43,44])))}),zV=yn({getParentRoute:()=>yr,path:"/",component:An(()=>Tn(()=>import("./home-oGaB9rtf.js"),__vite__mapDeps([45,46,1,41,16,11,2,38,27,39,40])))}),UV=yn({getParentRoute:()=>yr,path:"/$org",component:An(()=>Tn(()=>import("./page-jzi_ERcf.js"),__vite__mapDeps([47,5,1,6,48,49,42,18,50,51,17,52,8,53,11,9,36,54,55,56,32,24,57,58,26,59])))}),BV=yn({getParentRoute:()=>yr,path:"/$org/members",component:An(()=>Tn(()=>import("./members-CAJLI1Ui.js"),__vite__mapDeps([60,48,49,1,42,6,18,50,51,61,4,2,62,63,5,64,65,66,30,8,41,56,27,44,12,67,10,68,11,34,17,39,20,21,23,46,69,57])))}),FV=yn({getParentRoute:()=>yr,path:"/$org/mcps",component:An(()=>Tn(()=>import("./connections-BKlzJU2y.js"),__vite__mapDeps([70,48,49,1,42,6,18,50,51,61,4,2,62,71,46,5,17,72,22,27,56,44,12,39,69,73,11,34,10,25,20,21,23,31]))),validateSearch:za(()=>bn({action:Sf(["create"]).optional()}))}),$V=yn({getParentRoute:()=>yr,path:"/$org/settings",component:An(()=>Tn(()=>import("./settings-iXHGs-4V.js"),__vite__mapDeps([74,48,49,1,42,6,18,50,51,39,2,12])))}),VV=yn({getParentRoute:()=>yr,path:"/$org/monitoring",component:An(()=>Tn(()=>import("./monitoring-_9gwma-O.js"),__vite__mapDeps([75,5,1,6,48,49,42,18,50,51,61,4,2,17,54,55,56,32,24,57,58,26,21,36,66,76,11,34,64,77,20,33,78,23]))),validateSearch:za(()=>bn({from:Ve().default("now-24h"),to:Ve().default("now"),connectionId:Ev(Ve()).optional().default([]),gatewayId:Ev(Ve()).optional().default([]),tool:Ve().default(""),status:Sf(["all","success","errors"]).default("all"),search:Ve().default(""),page:b2().optional(),streaming:wg().default(!0),propertyFilters:Ve().default("")}))}),qT=yn({getParentRoute:()=>yr,path:"/$org/store",component:An(()=>Tn(()=>import("./store-C7bepdKu.js"),__vite__mapDeps([79,30,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])))}),HV=yn({getParentRoute:()=>yr,path:"/$org/workflow",component:An(()=>Tn(()=>import("./workflow-nViVDMOR.js"),__vite__mapDeps([84,30,85,31,5,1,6,49,42,18,50,61,4,2,46,24,69,72,22,34,62,86,81,41,8,87,37,88,13,14,27,11,89,65,48,10])))}),GV=yn({getParentRoute:()=>qT,path:"/$appName",component:An(()=>Tn(()=>import("./store-app-detail-dqrfmC2K.js"),__vite__mapDeps([90,16,10,1,65,5,6,21,11,42,43,4,91,8,28,82,49,18,50,61,2,62,46,89,92,93,56,13,14,52,94,95,88,31,80,83,29]))),validateSearch:za(()=>bn({registryId:Ve().optional(),serverName:Ve().optional(),itemId:Ve().optional()}))}),qV=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId",component:An(()=>Tn(()=>import("./connection-detail-oL5IGO2h.js"),__vite__mapDeps([96,4,1,17,5,6,13,14,97,98,73,2,11,34,52,8,87,37,28,57,10,89,65,39,20,21,25,36,9,99,88,82,95,31,55,77,100,93,56,85,49,42,18,50,61,46,24,69,72,22,62,86,81,41,27,91,92]))),validateSearch:za(()=>bn({tab:Ve().optional()}))}),ZV=yn({getParentRoute:()=>yr,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:An(()=>Tn(()=>import("./collection-detail-DZRR92ph.js"),__vite__mapDeps([101,5,1,6,4,17,87,37,39,2,23,102,89,65,16,33,76,24,10,58,67,97,98,14,73,11,34,13,52,8,28,57,20,21,25,36,9,99,88,82,95,31,55,77,94,26,86,40,35,19,22,50,53,44,12,42,56]))),validateSearch:za(()=>bn({replayId:Ve().optional()}))}),YV=yn({getParentRoute:()=>yr,path:"/$org/gateways",component:An(()=>Tn(()=>import("./gateways-BfCNNBIO.js"),__vite__mapDeps([103,48,49,1,42,6,18,50,51,61,4,2,62,71,46,5,17,36,72,22,27,56,9,69,10,34]))),validateSearch:za(()=>bn({action:Sf(["create"]).optional()}))}),KV=yn({getParentRoute:()=>yr,path:"/$org/gateways/$gatewayId",component:An(()=>Tn(()=>import("./gateway-detail-CvVf3uBW.js"),__vite__mapDeps([104,4,1,17,5,6,63,64,65,61,2,11,12,36,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,9,102,10,39,93,56,80,87,37,89]))),validateSearch:za(()=>bn({tab:Ve().optional()}))}),WV=yn({getParentRoute:()=>Cc,path:"/oauth/callback",component:An(()=>Tn(()=>import("./oauth-callback-DnSysdpG.js"),__vite__mapDeps([105,10,98,14])))}),QV=qT.addChildren([GV]),XV=yr.addChildren([zV,UV,BV,FV,YV,KV,VV,QV,HV,$V,qV,ZV]),JV=Cc.addChildren([XV,kV,jV,WV]),eH=z5({routeTree:JV}),tH=document.getElementById("root");m4.createRoot(tH).render(b.jsx(E.StrictMode,{children:b.jsx(F5,{router:eH})}));export{Go as $,LH as A,Ut as B,Ij as C,OH as D,Ge as E,$ as F,V$ as G,Si as H,WR as I,dz as J,n3 as K,xR as L,uz as M,sH as N,Cj as O,Aj as P,iH as Q,Oj as R,PV as S,Mj as T,DH as U,lx as V,Ev as W,yH as X,wg as Y,dn as Z,Sf as _,lI as a,dH as a$,Wr as a0,Kr as a1,nH as a2,bi as a3,Hw as a4,pf as a5,Jv as a6,Pa as a7,Fo as a8,D4 as a9,Tj as aA,pg as aB,T7 as aC,WI as aD,qO as aE,YO as aF,IU as aG,nB as aH,jR as aI,_v as aJ,b8 as aK,Rc as aL,yc as aM,cH as aN,wU as aO,xU as aP,RU as aQ,OU as aR,TU as aS,CH as aT,IH as aU,MH as aV,AH as aW,BL as aX,SH as aY,EH as aZ,za as a_,M_ as aa,oH as ab,rH as ac,e3 as ad,W4 as ae,er as af,BU as ag,FU as ah,UU as ai,In as aj,Tn as ak,DU as al,qw as am,UR as an,Q9 as ao,Bg as ap,YR as aq,zg as ar,X9 as as,J9 as at,N2 as au,S7 as av,Ca as aw,wR as ax,_7 as ay,y7 as az,hg as b,b2 as b0,bH as b1,vH as b2,pH as b3,iR as b4,Fg as b5,lc as b6,Q2 as b7,Ug as b8,NH as b9,xg as bA,x8 as bB,pM as bC,hH as bD,mH as bE,CL as bF,xH as bG,RH as bH,wH as bI,tc as bJ,j4 as bK,bw as bL,H8 as bM,NE as bN,uH as bO,lH as bP,G8 as bQ,pc as ba,On as bb,av as bc,gw as bd,V4 as be,q4 as bf,Q4 as bg,Z4 as bh,Y4 as bi,Qn as bj,J4 as bk,N_ as bl,X4 as bm,K4 as bn,O7 as bo,C7 as bp,xf as bq,Lg as br,fH as bs,E2 as bt,Sg as bu,_H as bv,KL as bw,gH as bx,y8 as by,S8 as bz,cf as c,fg as d,F4 as e,mc as f,Jn as g,TH as h,Q7 as i,b as j,G2 as k,x$ as l,qe as m,PH as n,kH as o,jH as p,t3 as q,E as r,Kw as s,jE as t,aH as u,bn as v,Ve as w,vo as x,mo as y,bc as z};
|