@decocms/mesh 1.0.0-alpha.27 → 1.0.0-alpha.28
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/{alert-dialog-B5P__fSo.js → alert-dialog-C2AXRAdI.js} +1 -1
- package/dist/client/assets/{auth-Cf-BfTK3.js → auth-BjEJS-ti.js} +1 -1
- package/dist/client/assets/{auth-catchall-CAFc22YR.js → auth-catchall-BRoDHrkX.js} +1 -1
- package/dist/client/assets/{avatar-DPg_RyEl.js → avatar-CCRBpJ2S.js} +1 -1
- package/dist/client/assets/{badge-BWSVXk6u.js → badge-DVddOuDf.js} +1 -1
- package/dist/client/assets/{button-7f3mJDt9.js → button-BKI-GQNs.js} +1 -1
- package/dist/client/assets/{card-C-FxKc9h.js → card-CQxotwMu.js} +1 -1
- package/dist/client/assets/{checkbox-Cgzsx5iu.js → checkbox-DXOKpcZ0.js} +1 -1
- package/dist/client/assets/{circle-alert-DU3UcGxR.js → circle-alert-CI4aNANz.js} +1 -1
- package/dist/client/assets/{collection-detail-CFgy96Yw.js → collection-detail-CHNCFwGn.js} +1 -1
- package/dist/client/assets/{collection-display-button-yCMREeFw.js → collection-display-button-DiJzMYDw.js} +1 -1
- package/dist/client/assets/{collection-header-BRT8x6Bu.js → collection-header-B74HL_BQ.js} +1 -1
- package/dist/client/assets/{collection-page-DutPWx_J.js → collection-page-Gju8NROn.js} +1 -1
- package/dist/client/assets/{collection-search-Blu2oI67.js → collection-search-5_31uFQu.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D77XIcPK.js → collection-table-wrapper-Cexc-Pdz.js} +1 -1
- package/dist/client/assets/{connection-card-VvLWKVZB.js → connection-card-FqjC5vzz.js} +1 -1
- package/dist/client/assets/{connection-detail-CIXniRq_.js → connection-detail-DlM4urTK.js} +1 -1
- package/dist/client/assets/{connections-B0k_3lJ6.js → connections-Bfcj96aB.js} +1 -1
- package/dist/client/assets/{core-DSrr1gFw.js → core-DK4y5D2y.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-QRhVV4NP.js → create-organization-dialog-CtVmaemS.js} +1 -1
- package/dist/client/assets/{dialog-DxoCnO7f.js → dialog-CcAczAty.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dsh1FAHq.js → dropdown-menu-CtyYPfMS.js} +1 -1
- package/dist/client/assets/{empty-state-CLlWeA8F.js → empty-state-BdQaURkL.js} +1 -1
- package/dist/client/assets/{error-boundary-BpbgV8Mt.js → error-boundary-BqkazxGZ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Bubi-83r.js → extract-connection-data-BmRyJSV5.js} +1 -1
- package/dist/client/assets/{form-CEChYO-W.js → form-BCzESr64.js} +1 -1
- package/dist/client/assets/{gateway-detail-ht9jY5Da.js → gateway-detail-rUxOHblZ.js} +1 -1
- package/dist/client/assets/{gateways-BG4qNJPZ.js → gateways-BYaK85gs.js} +1 -1
- package/dist/client/assets/{home-CkLLsx37.js → home-BwRicK_C.js} +1 -1
- package/dist/client/assets/{icon-Dk3IUZlY.js → icon-BH0uQy8Q.js} +1 -1
- package/dist/client/assets/{index-Pk85Lo4X.js → index-BZMMgVHQ.js} +1 -1
- package/dist/client/assets/{index-tTqkKQJp.js → index-B__VUTR3.js} +3 -3
- package/dist/client/assets/{index-B3Svv0HD.js → index-DDv8XLKp.js} +1 -1
- package/dist/client/assets/{index-CRXnV96L.js → index-mSyA_igj.js} +1 -1
- package/dist/client/assets/{input-DsJLZuBe.js → input-DQSvL_aO.js} +1 -1
- package/dist/client/assets/json-Br4edP4H.js +1 -0
- package/dist/client/assets/{layout-7tvwsBuE.js → layout-tP8VoWYn.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-BXMzyI4V.js → lazy-highlighter-D1A1Guv4.js} +1 -1
- package/dist/client/assets/{localstorage-keys-2gInE9f9.js → localstorage-keys-DCgXaWMK.js} +1 -1
- package/dist/client/assets/{login-BNugdJth.js → login-DBR5FdH6.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BOA4hd1a.js → mcp-oauth-v_MhlTn1.js} +1 -1
- package/dist/client/assets/{members-z4wBZKYX.js → members-Bhg2_ZSs.js} +1 -1
- package/dist/client/assets/{monitoring-BoRkHos-.js → monitoring-DAnTyFbi.js} +1 -1
- package/dist/client/assets/{oauth-callback-z3iCI-Fn.js → oauth-callback-K0vVKfJt.js} +1 -1
- package/dist/client/assets/{page-DkuwHgHg.js → page-D0nieAd7.js} +1 -1
- package/dist/client/assets/{popover-CUCZevqJ.js → popover-tnkyq1hU.js} +1 -1
- package/dist/client/assets/prism-light-gejq_KnN.js +1 -0
- package/dist/client/assets/{resource-tabs-Dr8QbV0u.js → resource-tabs-C38lAnf7.js} +1 -1
- package/dist/client/assets/{schema-ggfLBohE.js → schema-C7-hKK0j.js} +1 -1
- package/dist/client/assets/{select-GwKsoZTV.js → select-8hQIWu_F.js} +1 -1
- package/dist/client/assets/{settings-Cp1KZJA2.js → settings-BENyycRE.js} +1 -1
- package/dist/client/assets/{shell-layout-BAThlowD.js → shell-layout-DwQEFltw.js} +3 -3
- package/dist/client/assets/{spinner-DZz5BuLl.js → spinner-B_7PKdEi.js} +1 -1
- package/dist/client/assets/{store-CSHMTNbU.js → store-CdN9wtZc.js} +1 -1
- package/dist/client/assets/{store-app-detail-DrtrpMu_.js → store-app-detail-AyYeHK1f.js} +1 -1
- package/dist/client/assets/{switch-BWlL3QAV.js → switch-C9-Lpl_K.js} +1 -1
- package/dist/client/assets/{textarea-DkvsoReo.js → textarea-CRdkZ0U2.js} +1 -1
- package/dist/client/assets/{tool-set-selector-BKqxCVz9.js → tool-set-selector-CFgzaLQt.js} +1 -1
- package/dist/client/assets/{tooltip-DG1xYIL4.js → tooltip-B5bMdg-c.js} +1 -1
- package/dist/client/assets/{types-Cp78eAtq.js → types-kRP4yG2G.js} +3 -3
- package/dist/client/assets/{upload-Bmv_uBao.js → upload-DyNO--Od.js} +1 -1
- package/dist/client/assets/{use-binding-C_9S-BsF.js → use-binding-n0fop-6Q.js} +1 -1
- package/dist/client/assets/{use-connection-CJdd9H8R.js → use-connection-DFfxu6G-.js} +1 -1
- package/dist/client/assets/{use-gateway-DeuD2XcZ.js → use-gateway-BbEXVBzn.js} +1 -1
- package/dist/client/assets/{use-list-state-D4EpKod3.js → use-list-state-ByAtqeJl.js} +1 -1
- package/dist/client/assets/{use-mcp-qYkX8fe3.js → use-mcp-DfzSXo3r.js} +1 -1
- package/dist/client/assets/{use-members-DcGjLl6z.js → use-members-B2rKjk7L.js} +1 -1
- package/dist/client/assets/{use-mobile-CR4-zNel.js → use-mobile-DvP3RV8-.js} +1 -1
- package/dist/client/assets/{use-organization-settings-14jcjh3V.js → use-organization-settings-CX0knSqQ.js} +1 -1
- package/dist/client/assets/{use-tool-call-CXd8t6dd.js → use-tool-call-Ck95V-cD.js} +1 -1
- package/dist/client/assets/useQuery-DSEkiaNM.js +1 -0
- package/dist/client/assets/utils-wGs-tBy0.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/json-CPcRzrP7.js +0 -1
- package/dist/client/assets/prism-light-yh0IS_ur.js +0 -1
- package/dist/client/assets/useQuery-DcphYrFi.js +0 -1
- package/dist/client/assets/utils-D4LuHWBB.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-DBR5FdH6.js","assets/button-BKI-GQNs.js","assets/utils-wGs-tBy0.js","assets/input-DQSvL_aO.js","assets/shell-layout-DwQEFltw.js","assets/empty-state-BdQaURkL.js","assets/use-connection-DFfxu6G-.js","assets/icon-BH0uQy8Q.js","assets/tooltip-B5bMdg-c.js","assets/use-gateway-BbEXVBzn.js","assets/use-binding-n0fop-6Q.js","assets/auth-BjEJS-ti.js","assets/localstorage-keys-DCgXaWMK.js","assets/useQuery-DSEkiaNM.js","assets/select-8hQIWu_F.js","assets/use-mobile-DvP3RV8-.js","assets/textarea-CRdkZ0U2.js","assets/connection-card-FqjC5vzz.js","assets/card-CQxotwMu.js","assets/error-boundary-BqkazxGZ.js","assets/dialog-CcAczAty.js","assets/use-organization-settings-CX0knSqQ.js","assets/create-organization-dialog-CtVmaemS.js","assets/alert-dialog-C2AXRAdI.js","assets/form-BCzESr64.js","assets/spinner-B_7PKdEi.js","assets/popover-tnkyq1hU.js","assets/avatar-CCRBpJ2S.js","assets/dropdown-menu-CtyYPfMS.js","assets/home-BwRicK_C.js","assets/page-D0nieAd7.js","assets/collection-header-B74HL_BQ.js","assets/collection-display-button-DiJzMYDw.js","assets/collection-page-Gju8NROn.js","assets/use-tool-call-Ck95V-cD.js","assets/types-kRP4yG2G.js","assets/index-BZMMgVHQ.js","assets/badge-DVddOuDf.js","assets/page-BZV40eAE.css","assets/members-Bhg2_ZSs.js","assets/collection-search-5_31uFQu.js","assets/collection-table-wrapper-Cexc-Pdz.js","assets/tool-set-selector-CFgzaLQt.js","assets/checkbox-DXOKpcZ0.js","assets/use-members-B2rKjk7L.js","assets/well-known-mcp-Dg77mwx9.js","assets/switch-C9-Lpl_K.js","assets/connections-Bfcj96aB.js","assets/schema-C7-hKK0j.js","assets/use-list-state-ByAtqeJl.js","assets/generate-id-Dyweu44Y.js","assets/settings-BENyycRE.js","assets/upload-DyNO--Od.js","assets/monitoring-DAnTyFbi.js","assets/index-DDv8XLKp.js","assets/store-CdN9wtZc.js","assets/slugify-CEUa2lfQ.js","assets/registry-utils-ulDDT0d8.js","assets/app-name-gTETL9So.js","assets/store-app-detail-AyYeHK1f.js","assets/resource-tabs-C38lAnf7.js","assets/layout-tP8VoWYn.js","assets/resource-tabs-CSRUKxnt.css","assets/use-mcp-DfzSXo3r.js","assets/extract-connection-data-BmRyJSV5.js","assets/connection-detail-DlM4urTK.js","assets/index-mSyA_igj.js","assets/mcp-oauth-v_MhlTn1.js","assets/formatDistanceToNow-Ctx6mZEP.js","assets/collection-detail-CHNCFwGn.js","assets/circle-alert-CI4aNANz.js","assets/gateways-BYaK85gs.js","assets/gateway-detail-rUxOHblZ.js","assets/oauth-callback-K0vVKfJt.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function fC(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(a,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>a[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();const hC="modulepreload",pC=function(e){return"/"+e},m_={},Dn=function(t,n,a){let o=Promise.resolve();if(n&&n.length>0){let u=function(h){return Promise.all(h.map(g=>Promise.resolve(g).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");o=u(n.map(h=>{if(h=pC(h),h in m_)return;m_[h]=!0;const g=h.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const y=document.createElement("link");if(y.rel=g?"stylesheet":hC,g||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),document.head.appendChild(y),g)return new Promise((_,S)=>{y.addEventListener("load",_),y.addEventListener("error",()=>S(Error(`Unable to preload CSS for ${h}`)))})}))}function l(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};var MB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rm={exports:{}},Fl={};var g_;function mC(){if(g_)return Fl;g_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:l}}return Fl.Fragment=t,Fl.jsx=n,Fl.jsxs=n,Fl}var v_;function gC(){return v_||(v_=1,rm.exports=mC()),rm.exports}var b=gC(),am={exports:{}},Vl={},im={exports:{}},om={};var y_;function vC(){return y_||(y_=1,(function(e){function t(k,F){var G=k.length;k.push(F);e:for(;0<G;){var ae=G-1>>>1,ve=k[ae];if(0<o(ve,F))k[ae]=F,k[G]=ve,G=ae;else break e}}function n(k){return k.length===0?null:k[0]}function a(k){if(k.length===0)return null;var F=k[0],G=k.pop();if(G!==F){k[0]=G;e:for(var ae=0,ve=k.length,P=ve>>>1;ae<P;){var Q=2*(ae+1)-1,te=k[Q],se=Q+1,ge=k[se];if(0>o(te,G))se<ve&&0>o(ge,te)?(k[ae]=ge,k[se]=G,ae=se):(k[ae]=te,k[Q]=G,ae=Q);else if(se<ve&&0>o(ge,G))k[ae]=ge,k[se]=G,ae=se;else break e}}return F}function o(k,F){var G=k.sortIndex-F.sortIndex;return G!==0?G:k.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 u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],h=[],g=1,p=null,y=3,_=!1,S=!1,w=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function O(k){for(var F=n(h);F!==null;){if(F.callback===null)a(h);else if(F.startTime<=k)a(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function N(k){if(w=!1,O(k),!S)if(n(f)!==null)S=!0,L||(L=!0,V());else{var F=n(h);F!==null&&ee(N,F.startTime-k)}}var L=!1,I=-1,D=5,B=-1;function Z(){return T?!0:!(e.unstable_now()-B<D)}function Y(){if(T=!1,L){var k=e.unstable_now();B=k;var F=!0;try{e:{S=!1,w&&(w=!1,A(I),I=-1),_=!0;var G=y;try{t:{for(O(k),p=n(f);p!==null&&!(p.expirationTime>k&&Z());){var ae=p.callback;if(typeof ae=="function"){p.callback=null,y=p.priorityLevel;var ve=ae(p.expirationTime<=k);if(k=e.unstable_now(),typeof ve=="function"){p.callback=ve,O(k),F=!0;break t}p===n(f)&&a(f),O(k)}else a(f);p=n(f)}if(p!==null)F=!0;else{var P=n(h);P!==null&&ee(N,P.startTime-k),F=!1}}break e}finally{p=null,y=G,_=!1}F=void 0}}finally{F?V():L=!1}}}var V;if(typeof C=="function")V=function(){C(Y)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,ie=z.port2;z.port1.onmessage=Y,V=function(){ie.postMessage(null)}}else V=function(){R(Y,0)};function ee(k,F){I=R(function(){k(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(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(k){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var G=y;y=F;try{return k()}finally{y=G}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(k,F){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var G=y;y=k;try{return F()}finally{y=G}},e.unstable_scheduleCallback=function(k,F,G){var ae=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?ae+G:ae):G=ae,k){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=G+ve,k={id:g++,callback:F,priorityLevel:k,startTime:G,expirationTime:ve,sortIndex:-1},G>ae?(k.sortIndex=G,t(h,k),n(f)===null&&k===n(h)&&(w?(A(I),I=-1):w=!0,ee(N,G-ae))):(k.sortIndex=ve,t(f,k),S||_||(S=!0,L||(L=!0,V()))),k},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(k){var F=y;return function(){var G=y;y=F;try{return k.apply(this,arguments)}finally{y=G}}}})(om)),om}var b_;function yC(){return b_||(b_=1,im.exports=vC()),im.exports}var sm={exports:{}},Ve={};var __;function bC(){if(__)return Ve;__=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function _(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,T={};function R(P,Q,te){this.props=P,this.context=Q,this.refs=T,this.updater=te||S}R.prototype.isReactComponent={},R.prototype.setState=function(P,Q){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,Q,"setState")},R.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=R.prototype;function C(P,Q,te){this.props=P,this.context=Q,this.refs=T,this.updater=te||S}var O=C.prototype=new A;O.constructor=C,w(O,R.prototype),O.isPureReactComponent=!0;var N=Array.isArray;function L(){}var I={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function B(P,Q,te){var se=te.ref;return{$$typeof:e,type:P,key:Q,ref:se!==void 0?se:null,props:te}}function Z(P,Q){return B(P.type,Q,P.props)}function Y(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function V(P){var Q={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(te){return Q[te]})}var z=/\/+/g;function ie(P,Q){return typeof P=="object"&&P!==null&&P.key!=null?V(""+P.key):Q.toString(36)}function ee(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(L,L):(P.status="pending",P.then(function(Q){P.status==="pending"&&(P.status="fulfilled",P.value=Q)},function(Q){P.status==="pending"&&(P.status="rejected",P.reason=Q)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function k(P,Q,te,se,ge){var _e=typeof P;(_e==="undefined"||_e==="boolean")&&(P=null);var ye=!1;if(P===null)ye=!0;else switch(_e){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(P.$$typeof){case e:case t:ye=!0;break;case g:return ye=P._init,k(ye(P._payload),Q,te,se,ge)}}if(ye)return ge=ge(P),ye=se===""?"."+ie(P,0):se,N(ge)?(te="",ye!=null&&(te=ye.replace(z,"$&/")+"/"),k(ge,Q,te,"",function(je){return je})):ge!=null&&(Y(ge)&&(ge=Z(ge,te+(ge.key==null||P&&P.key===ge.key?"":(""+ge.key).replace(z,"$&/")+"/")+ye)),Q.push(ge)),1;ye=0;var Se=se===""?".":se+":";if(N(P))for(var le=0;le<P.length;le++)se=P[le],_e=Se+ie(se,le),ye+=k(se,Q,te,_e,ge);else if(le=_(P),typeof le=="function")for(P=le.call(P),le=0;!(se=P.next()).done;)se=se.value,_e=Se+ie(se,le++),ye+=k(se,Q,te,_e,ge);else if(_e==="object"){if(typeof P.then=="function")return k(ee(P),Q,te,se,ge);throw Q=String(P),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ye}function F(P,Q,te){if(P==null)return P;var se=[],ge=0;return k(P,se,"","",function(_e){return Q.call(te,_e,ge++)}),se}function G(P){if(P._status===-1){var Q=P._result;Q=Q(),Q.then(function(te){(P._status===0||P._status===-1)&&(P._status=1,P._result=te)},function(te){(P._status===0||P._status===-1)&&(P._status=2,P._result=te)}),P._status===-1&&(P._status=0,P._result=Q)}if(P._status===1)return P._result.default;throw P._result}var ae=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},ve={map:F,forEach:function(P,Q,te){F(P,function(){Q.apply(this,arguments)},te)},count:function(P){var Q=0;return F(P,function(){Q++}),Q},toArray:function(P){return F(P,function(Q){return Q})||[]},only:function(P){if(!Y(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Ve.Activity=p,Ve.Children=ve,Ve.Component=R,Ve.Fragment=n,Ve.Profiler=o,Ve.PureComponent=C,Ve.StrictMode=a,Ve.Suspense=f,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(P){return I.H.useMemoCache(P)}},Ve.cache=function(P){return function(){return P.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(P,Q,te){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var se=w({},P.props),ge=P.key;if(Q!=null)for(_e in Q.key!==void 0&&(ge=""+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=te;else if(1<_e){for(var ye=Array(_e),Se=0;Se<_e;Se++)ye[Se]=arguments[Se+2];se.children=ye}return B(P.type,ge,se)},Ve.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:l,_context:P},P},Ve.createElement=function(P,Q,te){var se,ge={},_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"&&(ge[se]=Q[se]);var ye=arguments.length-2;if(ye===1)ge.children=te;else if(1<ye){for(var Se=Array(ye),le=0;le<ye;le++)Se[le]=arguments[le+2];ge.children=Se}if(P&&P.defaultProps)for(se in ye=P.defaultProps,ye)ge[se]===void 0&&(ge[se]=ye[se]);return B(P,_e,ge)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(P){return{$$typeof:d,render:P}},Ve.isValidElement=Y,Ve.lazy=function(P){return{$$typeof:g,_payload:{_status:-1,_result:P},_init:G}},Ve.memo=function(P,Q){return{$$typeof:h,type:P,compare:Q===void 0?null:Q}},Ve.startTransition=function(P){var Q=I.T,te={};I.T=te;try{var se=P(),ge=I.S;ge!==null&&ge(te,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(L,ae)}catch(_e){ae(_e)}finally{Q!==null&&te.types!==null&&(Q.types=te.types),I.T=Q}},Ve.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ve.use=function(P){return I.H.use(P)},Ve.useActionState=function(P,Q,te){return I.H.useActionState(P,Q,te)},Ve.useCallback=function(P,Q){return I.H.useCallback(P,Q)},Ve.useContext=function(P){return I.H.useContext(P)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(P,Q){return I.H.useDeferredValue(P,Q)},Ve.useEffect=function(P,Q){return I.H.useEffect(P,Q)},Ve.useEffectEvent=function(P){return I.H.useEffectEvent(P)},Ve.useId=function(){return I.H.useId()},Ve.useImperativeHandle=function(P,Q,te){return I.H.useImperativeHandle(P,Q,te)},Ve.useInsertionEffect=function(P,Q){return I.H.useInsertionEffect(P,Q)},Ve.useLayoutEffect=function(P,Q){return I.H.useLayoutEffect(P,Q)},Ve.useMemo=function(P,Q){return I.H.useMemo(P,Q)},Ve.useOptimistic=function(P,Q){return I.H.useOptimistic(P,Q)},Ve.useReducer=function(P,Q,te){return I.H.useReducer(P,Q,te)},Ve.useRef=function(P){return I.H.useRef(P)},Ve.useState=function(P){return I.H.useState(P)},Ve.useSyncExternalStore=function(P,Q,te){return I.H.useSyncExternalStore(P,Q,te)},Ve.useTransition=function(){return I.H.useTransition()},Ve.version="19.2.3",Ve}var E_;function $i(){return E_||(E_=1,sm.exports=bC()),sm.exports}var lm={exports:{}},Nn={};var S_;function _C(){if(S_)return Nn;S_=1;var e=$i();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}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 a={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},o=Symbol.for("react.portal");function l(f,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:f,containerInfo:h,implementation:g}}var u=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 Nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Nn.createPortal=function(f,h){var g=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,g)},Nn.flushSync=function(f){var h=u.T,g=a.p;try{if(u.T=null,a.p=2,f)return f()}finally{u.T=h,a.p=g,a.d.f()}},Nn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},Nn.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},Nn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var g=h.as,p=d(g,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:_}):g==="script"&&a.d.X(f,{crossOrigin:p,integrity:y,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Nn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},Nn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,p=d(g,h.crossOrigin);a.d.L(f,g,{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})}},Nn.preloadModule=function(f,h){if(typeof f=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},Nn.requestFormReset=function(f){a.d.r(f)},Nn.unstable_batchedUpdates=function(f,h){return f(h)},Nn.useFormState=function(f,h,g){return u.H.useFormState(f,h,g)},Nn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Nn.version="19.2.3",Nn}var w_;function uw(){if(w_)return lm.exports;w_=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(),lm.exports=_C(),lm.exports}var x_;function EC(){if(x_)return Vl;x_=1;var e=yC(),t=$i(),n=uw();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var i=r,s=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(s=i.return),r=i.return;while(r)}return i.tag===3?s:null}function u(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function d(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=l(r),i===null)throw Error(a(188));return i!==r?null:r}for(var s=r,c=i;;){var m=s.return;if(m===null)break;var v=m.alternate;if(v===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===v.child){for(v=m.child;v;){if(v===s)return f(m),r;if(v===c)return f(m),i;v=v.sibling}throw Error(a(188))}if(s.return!==c.return)s=m,c=v;else{for(var x=!1,M=m.child;M;){if(M===s){x=!0,s=m,c=v;break}if(M===c){x=!0,c=m,s=v;break}M=M.sibling}if(!x){for(M=v.child;M;){if(M===s){x=!0,s=v,c=m;break}if(M===c){x=!0,c=v,s=m;break}M=M.sibling}if(!x)throw Error(a(189))}}if(s.alternate!==c)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?r:i}function g(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=g(r),i!==null)return i;r=r.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),C=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function V(r){return r===null||typeof r!="object"?null:(r=Y&&r[Y]||r["@@iterator"],typeof r=="function"?r:null)}var z=Symbol.for("react.client.reference");function ie(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===z?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case N:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case C:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case O:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case I:return i=r.displayName||null,i!==null?i:ie(r.type)||"Memo";case D:i=r._payload,r=r._init;try{return ie(r(i))}catch{}}return null}var ee=Array.isArray,k=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},ae=[],ve=-1;function P(r){return{current:r}}function Q(r){0>ve||(r.current=ae[ve],ae[ve]=null,ve--)}function te(r,i){ve++,ae[ve]=r.current,r.current=i}var se=P(null),ge=P(null),_e=P(null),ye=P(null);function Se(r,i){switch(te(_e,i),te(ge,r),te(se,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?Ub(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=Ub(i),r=Bb(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Q(se),te(se,r)}function le(){Q(se),Q(ge),Q(_e)}function je(r){r.memoizedState!==null&&te(ye,r);var i=se.current,s=Bb(i,r.type);i!==s&&(te(ge,r),te(se,s))}function at(r){ge.current===r&&(Q(se),Q(ge)),ye.current===r&&(Q(ye),jl._currentValue=G)}var Je,Ft;function re(r){if(Je===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Je=i&&i[1]||"",Ft=-1<s.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+Je+r+Ft}var be=!1;function Le(r,i){if(!r||be)return"";be=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(oe){var ne=oe}Reflect.construct(r,[],fe)}else{try{fe.call()}catch(oe){ne=oe}r.call(fe.prototype)}}else{try{throw Error()}catch(oe){ne=oe}(fe=r())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(oe){if(oe&&ne&&typeof oe.stack=="string")return[oe.stack,ne.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=c.DetermineComponentFrameRoot(),x=v[0],M=v[1];if(x&&M){var U=x.split(`
|
|
@@ -7,7 +7,7 @@ function fC(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&
|
|
|
7
7
|
`+U[c].replace(" at new "," at ");return r.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",r.displayName)),ce}while(1<=c&&0<=m);break}}}finally{be=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?re(s):""}function Ye(r,i){switch(r.tag){case 26:case 27:case 5:return re(r.type);case 16:return re("Lazy");case 13:return r.child!==i&&i!==null?re("Suspense Fallback"):re("Suspense");case 19:return re("SuspenseList");case 0:case 15:return Le(r.type,!1);case 11:return Le(r.type.render,!1);case 1:return Le(r.type,!0);case 31:return re("Activity");default:return""}}function At(r){try{var i="",s=null;do i+=Ye(r,s),s=r,r=r.return;while(r);return i}catch(c){return`
|
|
8
8
|
Error generating stack: `+c.message+`
|
|
9
9
|
`+c.stack}}var Ue=Object.prototype.hasOwnProperty,et=e.unstable_scheduleCallback,j=e.unstable_cancelCallback,q=e.unstable_shouldYield,W=e.unstable_requestPaint,de=e.unstable_now,me=e.unstable_getCurrentPriorityLevel,he=e.unstable_ImmediatePriority,Re=e.unstable_UserBlockingPriority,Fe=e.unstable_NormalPriority,tt=e.unstable_LowPriority,Rt=e.unstable_IdlePriority,nr=e.log,Ct=e.unstable_setDisableYieldValue,Gt=null,Mt=null;function on(r){if(typeof nr=="function"&&Ct(r),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Gt,r)}catch{}}var qt=Math.clz32?Math.clz32:Me,ei=Math.log,Ea=Math.LN2;function Me(r){return r>>>=0,r===0?32:31-(ei(r)/Ea|0)|0}var it=256,ut=262144,Ke=4194304;function ft(r){var i=r&42;if(i!==0)return i;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 Ne(r,i,s){var c=r.pendingLanes;if(c===0)return 0;var m=0,v=r.suspendedLanes,x=r.pingedLanes;r=r.warmLanes;var M=c&134217727;return M!==0?(c=M&~v,c!==0?m=ft(c):(x&=M,x!==0?m=ft(x):s||(s=M&~r,s!==0&&(m=ft(s))))):(M=c&~v,M!==0?m=ft(M):x!==0?m=ft(x):s||(s=c&~r,s!==0&&(m=ft(s)))),m===0?0:i!==0&&i!==m&&(i&v)===0&&(v=m&-m,s=i&-i,v>=s||v===32&&(s&4194048)!==0)?i:m}function We(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function Ot(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Et(){var r=Ke;return Ke<<=1,(Ke&62914560)===0&&(Ke=4194304),r}function Mn(r){for(var i=[],s=0;31>s;s++)i.push(r);return i}function ht(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Nt(r,i,s,c,m,v){var x=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var M=r.entanglements,U=r.expirationTimes,J=r.hiddenUpdates;for(s=x&~s;0<s;){var ce=31-qt(s),fe=1<<ce;M[ce]=0,U[ce]=-1;var ne=J[ce];if(ne!==null)for(J[ce]=null,ce=0;ce<ne.length;ce++){var oe=ne[ce];oe!==null&&(oe.lane&=-536870913)}s&=~fe}c!==0&&_r(r,c,0),v!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=v&~(x&~i))}function _r(r,i,s){r.pendingLanes|=i,r.suspendedLanes&=~i;var c=31-qt(i);r.entangledLanes|=i,r.entanglements[c]=r.entanglements[c]|1073741824|s&261930}function _n(r,i){var s=r.entangledLanes|=i;for(r=r.entanglements;s;){var c=31-qt(s),m=1<<c;m&i|r[c]&i&&(r[c]|=i),s&=~m}}function Fn(r,i){var s=i&-i;return s=(s&42)!==0?1:ko(s),(s&(r.suspendedLanes|i))!==0?0:s}function ko(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 Yf(){var r=F.p;return r!==0?r:(r=window.event,r===void 0?32:l_(r.type))}function x0(r,i){var s=F.p;try{return F.p=r,i()}finally{F.p=s}}var ti=Math.random().toString(36).slice(2),En="__reactFiber$"+ti,Vn="__reactProps$"+ti,jo="__reactContainer$"+ti,Kf="__reactEvents$"+ti,tT="__reactListeners$"+ti,nT="__reactHandles$"+ti,R0="__reactResources$"+ti,Xs="__reactMarker$"+ti;function Wf(r){delete r[En],delete r[Vn],delete r[Kf],delete r[tT],delete r[nT]}function Uo(r){var i=r[En];if(i)return i;for(var s=r.parentNode;s;){if(i=s[jo]||s[En]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(r=qb(r);r!==null;){if(s=r[En])return s;r=qb(r)}return i}r=s,s=r.parentNode}return null}function Bo(r){if(r=r[En]||r[jo]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Js(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function zo(r){var i=r[R0];return i||(i=r[R0]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function hn(r){r[Xs]=!0}var O0=new Set,T0={};function qi(r,i){Fo(r,i),Fo(r+"Capture",i)}function Fo(r,i){for(T0[r]=i,r=0;r<i.length;r++)O0.add(i[r])}var rT=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]*$"),A0={},C0={};function aT(r){return Ue.call(C0,r)?!0:Ue.call(A0,r)?!1:rT.test(r)?C0[r]=!0:(A0[r]=!0,!1)}function zc(r,i,s){if(aT(i))if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+s)}}function Fc(r,i,s){if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+s)}}function Sa(r,i,s,c){if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(i,s,""+c)}}function Er(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function M0(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function iT(r,i,s){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,v=c.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(x){s=""+x,v.call(this,x)}}),Object.defineProperty(r,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(x){s=""+x},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Zf(r){if(!r._valueTracker){var i=M0(r)?"checked":"value";r._valueTracker=iT(r,i,""+r[i])}}function N0(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return r&&(c=M0(r)?r.checked?"true":"false":r.value),r=c,r!==s?(i.setValue(r),!0):!1}function Vc(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 oT=/[\n"\\]/g;function Sr(r){return r.replace(oT,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Qf(r,i,s,c,m,v,x,M){r.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?r.type=x:r.removeAttribute("type"),i!=null?x==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+Er(i)):r.value!==""+Er(i)&&(r.value=""+Er(i)):x!=="submit"&&x!=="reset"||r.removeAttribute("value"),i!=null?Xf(r,x,Er(i)):s!=null?Xf(r,x,Er(s)):c!=null&&r.removeAttribute("value"),m==null&&v!=null&&(r.defaultChecked=!!v),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?r.name=""+Er(M):r.removeAttribute("name")}function I0(r,i,s,c,m,v,x,M){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),i!=null||s!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){Zf(r);return}s=s!=null?""+Er(s):"",i=i!=null?""+Er(i):s,M||i===r.value||(r.value=i),r.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=M?r.checked:!!c,r.defaultChecked=!!c,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(r.name=x),Zf(r)}function Xf(r,i,s){i==="number"&&Vc(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function Vo(r,i,s,c){if(r=r.options,i){i={};for(var m=0;m<s.length;m++)i["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=i.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&c&&(r[s].defaultSelected=!0)}else{for(s=""+Er(s),i=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function D0(r,i,s){if(i!=null&&(i=""+Er(i),i!==r.value&&(r.value=i),s==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=s!=null?""+Er(s):""}function L0(r,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(a(92));if(ee(c)){if(1<c.length)throw Error(a(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=Er(i),r.defaultValue=s,c=r.textContent,c===s&&c!==""&&c!==null&&(r.value=c),Zf(r)}function Ho(r,i){if(i){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=i;return}}r.textContent=i}var sT=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 P0(r,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":c?r.setProperty(i,s):typeof s!="number"||s===0||sT.has(i)?i==="float"?r.cssFloat=s:r[i]=(""+s).trim():r[i]=s+"px"}function k0(r,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&s[m]!==c&&P0(r,m,c)}else for(var v in i)i.hasOwnProperty(v)&&P0(r,v,i[v])}function Jf(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 lT=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"]]),cT=/^[\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 Hc(r){return cT.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function wa(){}var eh=null;function th(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var $o=null,Go=null;function j0(r){var i=Bo(r);if(i&&(r=i.stateNode)){var s=r[Vn]||null;e:switch(r=i.stateNode,i.type){case"input":if(Qf(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Sr(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==r&&c.form===r.form){var m=c[Vn]||null;if(!m)throw Error(a(90));Qf(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===r.form&&N0(c)}break e;case"textarea":D0(r,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&Vo(r,!!s.multiple,i,!1)}}}var nh=!1;function U0(r,i,s){if(nh)return r(i,s);nh=!0;try{var c=r(i);return c}finally{if(nh=!1,($o!==null||Go!==null)&&(Mu(),$o&&(i=$o,r=Go,Go=$o=null,j0(i),r)))for(i=0;i<r.length;i++)j0(r[i])}}function el(r,i){var s=r.stateNode;if(s===null)return null;var c=s[Vn]||null;if(c===null)return null;s=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var xa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rh=!1;if(xa)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){rh=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{rh=!1}var ni=null,ah=null,$c=null;function B0(){if($c)return $c;var r,i=ah,s=i.length,c,m="value"in ni?ni.value:ni.textContent,v=m.length;for(r=0;r<s&&i[r]===m[r];r++);var x=s-r;for(c=1;c<=x&&i[s-c]===m[v-c];c++);return $c=m.slice(r,1<c?1-c:void 0)}function Gc(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function qc(){return!0}function z0(){return!1}function Hn(r){function i(s,c,m,v,x){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=v,this.target=x,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(s=r[M],this[M]=s?s(v):v[M]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?qc:z0,this.isPropagationStopped=z0,this}return p(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=qc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=qc)},persist:function(){},isPersistent:qc}),i}var Yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yc=Hn(Yi),nl=p({},Yi,{view:0,detail:0}),uT=Hn(nl),ih,oh,rl,Kc=p({},nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lh,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!==rl&&(rl&&r.type==="mousemove"?(ih=r.screenX-rl.screenX,oh=r.screenY-rl.screenY):oh=ih=0,rl=r),ih)},movementY:function(r){return"movementY"in r?r.movementY:oh}}),F0=Hn(Kc),dT=p({},Kc,{dataTransfer:0}),fT=Hn(dT),hT=p({},nl,{relatedTarget:0}),sh=Hn(hT),pT=p({},Yi,{animationName:0,elapsedTime:0,pseudoElement:0}),mT=Hn(pT),gT=p({},Yi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),vT=Hn(gT),yT=p({},Yi,{data:0}),V0=Hn(yT),bT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_T={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"},ET={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ST(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=ET[r])?!!i[r]:!1}function lh(){return ST}var wT=p({},nl,{key:function(r){if(r.key){var i=bT[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Gc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?_T[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lh,charCode:function(r){return r.type==="keypress"?Gc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Gc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),xT=Hn(wT),RT=p({},Kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),H0=Hn(RT),OT=p({},nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lh}),TT=Hn(OT),AT=p({},Yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),CT=Hn(AT),MT=p({},Kc,{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}),NT=Hn(MT),IT=p({},Yi,{newState:0,oldState:0}),DT=Hn(IT),LT=[9,13,27,32],ch=xa&&"CompositionEvent"in window,al=null;xa&&"documentMode"in document&&(al=document.documentMode);var PT=xa&&"TextEvent"in window&&!al,$0=xa&&(!ch||al&&8<al&&11>=al),G0=" ",q0=!1;function Y0(r,i){switch(r){case"keyup":return LT.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function K0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var qo=!1;function kT(r,i){switch(r){case"compositionend":return K0(i);case"keypress":return i.which!==32?null:(q0=!0,G0);case"textInput":return r=i.data,r===G0&&q0?null:r;default:return null}}function jT(r,i){if(qo)return r==="compositionend"||!ch&&Y0(r,i)?(r=B0(),$c=ah=ni=null,qo=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return $0&&i.locale!=="ko"?null:i.data;default:return null}}var UT={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 W0(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!UT[r.type]:i==="textarea"}function Z0(r,i,s,c){$o?Go?Go.push(c):Go=[c]:$o=c,i=ju(i,"onChange"),0<i.length&&(s=new Yc("onChange","change",null,s,c),r.push({event:s,listeners:i}))}var il=null,ol=null;function BT(r){Ib(r,0)}function Wc(r){var i=Js(r);if(N0(i))return r}function Q0(r,i){if(r==="change")return i}var X0=!1;if(xa){var uh;if(xa){var dh="oninput"in document;if(!dh){var J0=document.createElement("div");J0.setAttribute("oninput","return;"),dh=typeof J0.oninput=="function"}uh=dh}else uh=!1;X0=uh&&(!document.documentMode||9<document.documentMode)}function ey(){il&&(il.detachEvent("onpropertychange",ty),ol=il=null)}function ty(r){if(r.propertyName==="value"&&Wc(ol)){var i=[];Z0(i,ol,r,th(r)),U0(BT,i)}}function zT(r,i,s){r==="focusin"?(ey(),il=i,ol=s,il.attachEvent("onpropertychange",ty)):r==="focusout"&&ey()}function FT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Wc(ol)}function VT(r,i){if(r==="click")return Wc(i)}function HT(r,i){if(r==="input"||r==="change")return Wc(i)}function $T(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var rr=typeof Object.is=="function"?Object.is:$T;function sl(r,i){if(rr(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var s=Object.keys(r),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!Ue.call(i,m)||!rr(r[m],i[m]))return!1}return!0}function ny(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function ry(r,i){var s=ny(r);r=0;for(var c;s;){if(s.nodeType===3){if(c=r+s.textContent.length,r<=i&&c>=i)return{node:s,offset:i-r};r=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ny(s)}}function ay(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?ay(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function iy(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Vc(r.document);i instanceof r.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)r=i.contentWindow;else break;i=Vc(r.document)}return i}function fh(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var GT=xa&&"documentMode"in document&&11>=document.documentMode,Yo=null,hh=null,ll=null,ph=!1;function oy(r,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ph||Yo==null||Yo!==Vc(c)||(c=Yo,"selectionStart"in c&&fh(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ll&&sl(ll,c)||(ll=c,c=ju(hh,"onSelect"),0<c.length&&(i=new Yc("onSelect","select",null,i,s),r.push({event:i,listeners:c}),i.target=Yo)))}function Ki(r,i){var s={};return s[r.toLowerCase()]=i.toLowerCase(),s["Webkit"+r]="webkit"+i,s["Moz"+r]="moz"+i,s}var Ko={animationend:Ki("Animation","AnimationEnd"),animationiteration:Ki("Animation","AnimationIteration"),animationstart:Ki("Animation","AnimationStart"),transitionrun:Ki("Transition","TransitionRun"),transitionstart:Ki("Transition","TransitionStart"),transitioncancel:Ki("Transition","TransitionCancel"),transitionend:Ki("Transition","TransitionEnd")},mh={},sy={};xa&&(sy=document.createElement("div").style,"AnimationEvent"in window||(delete Ko.animationend.animation,delete Ko.animationiteration.animation,delete Ko.animationstart.animation),"TransitionEvent"in window||delete Ko.transitionend.transition);function Wi(r){if(mh[r])return mh[r];if(!Ko[r])return r;var i=Ko[r],s;for(s in i)if(i.hasOwnProperty(s)&&s in sy)return mh[r]=i[s];return r}var ly=Wi("animationend"),cy=Wi("animationiteration"),uy=Wi("animationstart"),qT=Wi("transitionrun"),YT=Wi("transitionstart"),KT=Wi("transitioncancel"),dy=Wi("transitionend"),fy=new Map,gh="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(" ");gh.push("scrollEnd");function Fr(r,i){fy.set(r,i),qi(i,[r])}var Zc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=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(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},wr=[],Wo=0,vh=0;function Qc(){for(var r=Wo,i=vh=Wo=0;i<r;){var s=wr[i];wr[i++]=null;var c=wr[i];wr[i++]=null;var m=wr[i];wr[i++]=null;var v=wr[i];if(wr[i++]=null,c!==null&&m!==null){var x=c.pending;x===null?m.next=m:(m.next=x.next,x.next=m),c.pending=m}v!==0&&hy(s,m,v)}}function Xc(r,i,s,c){wr[Wo++]=r,wr[Wo++]=i,wr[Wo++]=s,wr[Wo++]=c,vh|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function yh(r,i,s,c){return Xc(r,i,s,c),Jc(r)}function Zi(r,i){return Xc(r,null,null,i),Jc(r)}function hy(r,i,s){r.lanes|=s;var c=r.alternate;c!==null&&(c.lanes|=s);for(var m=!1,v=r.return;v!==null;)v.childLanes|=s,c=v.alternate,c!==null&&(c.childLanes|=s),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(m=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,m&&i!==null&&(m=31-qt(s),r=v.hiddenUpdates,c=r[m],c===null?r[m]=[i]:c.push(i),i.lane=s|536870912),v):null}function Jc(r){if(50<Ml)throw Ml=0,Tp=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Zo={};function WT(r,i,s,c){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=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(r,i,s,c){return new WT(r,i,s,c)}function bh(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Ra(r,i){var s=r.alternate;return s===null?(s=ar(r.tag,i,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=i,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,i=r.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function py(r,i){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=i,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,i=s.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function eu(r,i,s,c,m,v){var x=0;if(c=r,typeof r=="function")bh(r)&&(x=1);else if(typeof r=="string")x=eC(r,s,se.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case B:return r=ar(31,s,i,m),r.elementType=B,r.lanes=v,r;case w:return Qi(s.children,m,v,i);case T:x=8,m|=24;break;case R:return r=ar(12,s,i,m|2),r.elementType=R,r.lanes=v,r;case N:return r=ar(13,s,i,m),r.elementType=N,r.lanes=v,r;case L:return r=ar(19,s,i,m),r.elementType=L,r.lanes=v,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 I:x=14;break e;case D:x=16,c=null;break e}x=29,s=Error(a(130,r===null?"null":typeof r,"")),c=null}return i=ar(x,s,i,m),i.elementType=r,i.type=c,i.lanes=v,i}function Qi(r,i,s,c){return r=ar(7,r,c,i),r.lanes=s,r}function _h(r,i,s){return r=ar(6,r,null,i),r.lanes=s,r}function my(r){var i=ar(18,null,null,0);return i.stateNode=r,i}function Eh(r,i,s){return i=ar(4,r.children!==null?r.children:[],r.key,i),i.lanes=s,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var gy=new WeakMap;function xr(r,i){if(typeof r=="object"&&r!==null){var s=gy.get(r);return s!==void 0?s:(i={value:r,source:i,stack:At(i)},gy.set(r,i),i)}return{value:r,source:i,stack:At(i)}}var Qo=[],Xo=0,tu=null,cl=0,Rr=[],Or=0,ri=null,na=1,ra="";function Oa(r,i){Qo[Xo++]=cl,Qo[Xo++]=tu,tu=r,cl=i}function vy(r,i,s){Rr[Or++]=na,Rr[Or++]=ra,Rr[Or++]=ri,ri=r;var c=na;r=ra;var m=32-qt(c)-1;c&=~(1<<m),s+=1;var v=32-qt(i)+m;if(30<v){var x=m-m%5;v=(c&(1<<x)-1).toString(32),c>>=x,m-=x,na=1<<32-qt(i)+m|s<<m|c,ra=v+r}else na=1<<v|s<<m|c,ra=r}function Sh(r){r.return!==null&&(Oa(r,1),vy(r,1,0))}function wh(r){for(;r===tu;)tu=Qo[--Xo],Qo[Xo]=null,cl=Qo[--Xo],Qo[Xo]=null;for(;r===ri;)ri=Rr[--Or],Rr[Or]=null,ra=Rr[--Or],Rr[Or]=null,na=Rr[--Or],Rr[Or]=null}function yy(r,i){Rr[Or++]=na,Rr[Or++]=ra,Rr[Or++]=ri,na=i.id,ra=i.overflow,ri=r}var Sn=null,It=null,ct=!1,ai=null,Tr=!1,xh=Error(a(519));function ii(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ul(xr(i,r)),xh}function by(r){var i=r.stateNode,s=r.type,c=r.memoizedProps;switch(i[En]=r,i[Vn]=c,s){case"dialog":rt("cancel",i),rt("close",i);break;case"iframe":case"object":case"embed":rt("load",i);break;case"video":case"audio":for(s=0;s<Il.length;s++)rt(Il[s],i);break;case"source":rt("error",i);break;case"img":case"image":case"link":rt("error",i),rt("load",i);break;case"details":rt("toggle",i);break;case"input":rt("invalid",i),I0(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":rt("invalid",i);break;case"textarea":rt("invalid",i),L0(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||kb(i.textContent,s)?(c.popover!=null&&(rt("beforetoggle",i),rt("toggle",i)),c.onScroll!=null&&rt("scroll",i),c.onScrollEnd!=null&&rt("scrollend",i),c.onClick!=null&&(i.onclick=wa),i=!0):i=!1,i||ii(r,!0)}function _y(r){for(Sn=r.return;Sn;)switch(Sn.tag){case 5:case 31:case 13:Tr=!1;return;case 27:case 3:Tr=!0;return;default:Sn=Sn.return}}function Jo(r){if(r!==Sn)return!1;if(!ct)return _y(r),ct=!0,!1;var i=r.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||Vp(r.type,r.memoizedProps)),s=!s),s&&It&&ii(r),_y(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));It=Gb(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));It=Gb(r)}else i===27?(i=It,bi(r.type)?(r=Yp,Yp=null,It=r):It=i):It=Sn?Cr(r.stateNode.nextSibling):null;return!0}function Xi(){It=Sn=null,ct=!1}function Rh(){var r=ai;return r!==null&&(Yn===null?Yn=r:Yn.push.apply(Yn,r),ai=null),r}function ul(r){ai===null?ai=[r]:ai.push(r)}var Oh=P(null),Ji=null,Ta=null;function oi(r,i,s){te(Oh,i._currentValue),i._currentValue=s}function Aa(r){r._currentValue=Oh.current,Q(Oh)}function Th(r,i,s){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===s)break;r=r.return}}function Ah(r,i,s,c){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var v=m.dependencies;if(v!==null){var x=m.child;v=v.firstContext;e:for(;v!==null;){var M=v;v=m;for(var U=0;U<i.length;U++)if(M.context===i[U]){v.lanes|=s,M=v.alternate,M!==null&&(M.lanes|=s),Th(v.return,s,r),c||(x=null);break e}v=M.next}}else if(m.tag===18){if(x=m.return,x===null)throw Error(a(341));x.lanes|=s,v=x.alternate,v!==null&&(v.lanes|=s),Th(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 es(r,i,s,c){r=null;for(var m=i,v=!1;m!==null;){if(!v){if((m.flags&524288)!==0)v=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var x=m.alternate;if(x===null)throw Error(a(387));if(x=x.memoizedProps,x!==null){var M=m.type;rr(m.pendingProps.value,x.value)||(r!==null?r.push(M):r=[M])}}else if(m===ye.current){if(x=m.alternate,x===null)throw Error(a(387));x.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(jl):r=[jl])}m=m.return}r!==null&&Ah(i,r,s,c),i.flags|=262144}function nu(r){for(r=r.firstContext;r!==null;){if(!rr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function eo(r){Ji=r,Ta=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function wn(r){return Ey(Ji,r)}function ru(r,i){return Ji===null&&eo(r),Ey(r,i)}function Ey(r,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Ta===null){if(r===null)throw Error(a(308));Ta=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else Ta=Ta.next=i;return s}var ZT=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(s,c){r.push(c)}};this.abort=function(){i.aborted=!0,r.forEach(function(s){return s()})}},QT=e.unstable_scheduleCallback,XT=e.unstable_NormalPriority,Yt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ch(){return{controller:new ZT,data:new Map,refCount:0}}function dl(r){r.refCount--,r.refCount===0&&QT(XT,function(){r.controller.abort()})}var fl=null,Mh=0,ts=0,ns=null;function JT(r,i){if(fl===null){var s=fl=[];Mh=0,ts=Dp(),ns={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Mh++,i.then(Sy,Sy),i}function Sy(){if(--Mh===0&&fl!==null){ns!==null&&(ns.status="fulfilled");var r=fl;fl=null,ts=0,ns=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function eA(r,i){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<s.length;m++)(0,s[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var wy=k.S;k.S=function(r,i){ob=de(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&JT(r,i),wy!==null&&wy(r,i)};var to=P(null);function Nh(){var r=to.current;return r!==null?r:Tt.pooledCache}function au(r,i){i===null?te(to,to.current):te(to,i.pool)}function xy(){var r=Nh();return r===null?null:{parent:Yt._currentValue,pool:r}}var rs=Error(a(460)),Ih=Error(a(474)),iu=Error(a(542)),ou={then:function(){}};function Ry(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Oy(r,i,s){switch(s=r[s],s===void 0?r.push(i):s!==i&&(i.then(wa,wa),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Ay(r),r;default:if(typeof i.status=="string")i.then(wa,wa);else{if(r=Tt,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Ay(r),r}throw ro=i,rs}}function no(r){try{var i=r._init;return i(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ro=s,rs):s}}var ro=null;function Ty(){if(ro===null)throw Error(a(459));var r=ro;return ro=null,r}function Ay(r){if(r===rs||r===iu)throw Error(a(483))}var as=null,hl=0;function su(r){var i=hl;return hl+=1,as===null&&(as=[]),Oy(as,r,i)}function pl(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function lu(r,i){throw i.$$typeof===y?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function Cy(r){function i(K,$){if(r){var X=K.deletions;X===null?(K.deletions=[$],K.flags|=16):X.push($)}}function s(K,$){if(!r)return null;for(;$!==null;)i(K,$),$=$.sibling;return null}function c(K){for(var $=new Map;K!==null;)K.key!==null?$.set(K.key,K):$.set(K.index,K),K=K.sibling;return $}function m(K,$){return K=Ra(K,$),K.index=0,K.sibling=null,K}function v(K,$,X){return K.index=X,r?(X=K.alternate,X!==null?(X=X.index,X<$?(K.flags|=67108866,$):X):(K.flags|=67108866,$)):(K.flags|=1048576,$)}function x(K){return r&&K.alternate===null&&(K.flags|=67108866),K}function M(K,$,X,ue){return $===null||$.tag!==6?($=_h(X,K.mode,ue),$.return=K,$):($=m($,X),$.return=K,$)}function U(K,$,X,ue){var Pe=X.type;return Pe===w?ce(K,$,X.props.children,ue,X.key):$!==null&&($.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&no(Pe)===$.type)?($=m($,X.props),pl($,X),$.return=K,$):($=eu(X.type,X.key,X.props,null,K.mode,ue),pl($,X),$.return=K,$)}function J(K,$,X,ue){return $===null||$.tag!==4||$.stateNode.containerInfo!==X.containerInfo||$.stateNode.implementation!==X.implementation?($=Eh(X,K.mode,ue),$.return=K,$):($=m($,X.children||[]),$.return=K,$)}function ce(K,$,X,ue,Pe){return $===null||$.tag!==7?($=Qi(X,K.mode,ue,Pe),$.return=K,$):($=m($,X),$.return=K,$)}function fe(K,$,X){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=_h(""+$,K.mode,X),$.return=K,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return X=eu($.type,$.key,$.props,null,K.mode,X),pl(X,$),X.return=K,X;case S:return $=Eh($,K.mode,X),$.return=K,$;case D:return $=no($),fe(K,$,X)}if(ee($)||V($))return $=Qi($,K.mode,X,null),$.return=K,$;if(typeof $.then=="function")return fe(K,su($),X);if($.$$typeof===C)return fe(K,ru(K,$),X);lu(K,$)}return null}function ne(K,$,X,ue){var Pe=$!==null?$.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Pe!==null?null:M(K,$,""+X,ue);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case _:return X.key===Pe?U(K,$,X,ue):null;case S:return X.key===Pe?J(K,$,X,ue):null;case D:return X=no(X),ne(K,$,X,ue)}if(ee(X)||V(X))return Pe!==null?null:ce(K,$,X,ue,null);if(typeof X.then=="function")return ne(K,$,su(X),ue);if(X.$$typeof===C)return ne(K,$,ru(K,X),ue);lu(K,X)}return null}function oe(K,$,X,ue,Pe){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return K=K.get(X)||null,M($,K,""+ue,Pe);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case _:return K=K.get(ue.key===null?X:ue.key)||null,U($,K,ue,Pe);case S:return K=K.get(ue.key===null?X:ue.key)||null,J($,K,ue,Pe);case D:return ue=no(ue),oe(K,$,X,ue,Pe)}if(ee(ue)||V(ue))return K=K.get(X)||null,ce($,K,ue,Pe,null);if(typeof ue.then=="function")return oe(K,$,X,su(ue),Pe);if(ue.$$typeof===C)return oe(K,$,X,ru($,ue),Pe);lu($,ue)}return null}function Te(K,$,X,ue){for(var Pe=null,pt=null,Ie=$,$e=$=0,st=null;Ie!==null&&$e<X.length;$e++){Ie.index>$e?(st=Ie,Ie=null):st=Ie.sibling;var mt=ne(K,Ie,X[$e],ue);if(mt===null){Ie===null&&(Ie=st);break}r&&Ie&&mt.alternate===null&&i(K,Ie),$=v(mt,$,$e),pt===null?Pe=mt:pt.sibling=mt,pt=mt,Ie=st}if($e===X.length)return s(K,Ie),ct&&Oa(K,$e),Pe;if(Ie===null){for(;$e<X.length;$e++)Ie=fe(K,X[$e],ue),Ie!==null&&($=v(Ie,$,$e),pt===null?Pe=Ie:pt.sibling=Ie,pt=Ie);return ct&&Oa(K,$e),Pe}for(Ie=c(Ie);$e<X.length;$e++)st=oe(Ie,K,$e,X[$e],ue),st!==null&&(r&&st.alternate!==null&&Ie.delete(st.key===null?$e:st.key),$=v(st,$,$e),pt===null?Pe=st:pt.sibling=st,pt=st);return r&&Ie.forEach(function(xi){return i(K,xi)}),ct&&Oa(K,$e),Pe}function ke(K,$,X,ue){if(X==null)throw Error(a(151));for(var Pe=null,pt=null,Ie=$,$e=$=0,st=null,mt=X.next();Ie!==null&&!mt.done;$e++,mt=X.next()){Ie.index>$e?(st=Ie,Ie=null):st=Ie.sibling;var xi=ne(K,Ie,mt.value,ue);if(xi===null){Ie===null&&(Ie=st);break}r&&Ie&&xi.alternate===null&&i(K,Ie),$=v(xi,$,$e),pt===null?Pe=xi:pt.sibling=xi,pt=xi,Ie=st}if(mt.done)return s(K,Ie),ct&&Oa(K,$e),Pe;if(Ie===null){for(;!mt.done;$e++,mt=X.next())mt=fe(K,mt.value,ue),mt!==null&&($=v(mt,$,$e),pt===null?Pe=mt:pt.sibling=mt,pt=mt);return ct&&Oa(K,$e),Pe}for(Ie=c(Ie);!mt.done;$e++,mt=X.next())mt=oe(Ie,K,$e,mt.value,ue),mt!==null&&(r&&mt.alternate!==null&&Ie.delete(mt.key===null?$e:mt.key),$=v(mt,$,$e),pt===null?Pe=mt:pt.sibling=mt,pt=mt);return r&&Ie.forEach(function(dC){return i(K,dC)}),ct&&Oa(K,$e),Pe}function xt(K,$,X,ue){if(typeof X=="object"&&X!==null&&X.type===w&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case _:e:{for(var Pe=X.key;$!==null;){if($.key===Pe){if(Pe=X.type,Pe===w){if($.tag===7){s(K,$.sibling),ue=m($,X.props.children),ue.return=K,K=ue;break e}}else if($.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===D&&no(Pe)===$.type){s(K,$.sibling),ue=m($,X.props),pl(ue,X),ue.return=K,K=ue;break e}s(K,$);break}else i(K,$);$=$.sibling}X.type===w?(ue=Qi(X.props.children,K.mode,ue,X.key),ue.return=K,K=ue):(ue=eu(X.type,X.key,X.props,null,K.mode,ue),pl(ue,X),ue.return=K,K=ue)}return x(K);case S:e:{for(Pe=X.key;$!==null;){if($.key===Pe)if($.tag===4&&$.stateNode.containerInfo===X.containerInfo&&$.stateNode.implementation===X.implementation){s(K,$.sibling),ue=m($,X.children||[]),ue.return=K,K=ue;break e}else{s(K,$);break}else i(K,$);$=$.sibling}ue=Eh(X,K.mode,ue),ue.return=K,K=ue}return x(K);case D:return X=no(X),xt(K,$,X,ue)}if(ee(X))return Te(K,$,X,ue);if(V(X)){if(Pe=V(X),typeof Pe!="function")throw Error(a(150));return X=Pe.call(X),ke(K,$,X,ue)}if(typeof X.then=="function")return xt(K,$,su(X),ue);if(X.$$typeof===C)return xt(K,$,ru(K,X),ue);lu(K,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,$!==null&&$.tag===6?(s(K,$.sibling),ue=m($,X),ue.return=K,K=ue):(s(K,$),ue=_h(X,K.mode,ue),ue.return=K,K=ue),x(K)):s(K,$)}return function(K,$,X,ue){try{hl=0;var Pe=xt(K,$,X,ue);return as=null,Pe}catch(Ie){if(Ie===rs||Ie===iu)throw Ie;var pt=ar(29,Ie,null,K.mode);return pt.lanes=ue,pt.return=K,pt}}}var ao=Cy(!0),My=Cy(!1),si=!1;function Dh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lh(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function li(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ci(r,i,s){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(gt&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=Jc(r),hy(r,null,s),i}return Xc(r,c,i,s),Jc(r)}function ml(r,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,_n(r,s)}}function Ph(r,i){var s=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,v=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};v===null?m=v=x:v=v.next=x,s=s.next}while(s!==null);v===null?m=v=i:v=v.next=i}else m=v=i;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:v,shared:c.shared,callbacks:c.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=i:r.next=i,s.lastBaseUpdate=i}var kh=!1;function gl(){if(kh){var r=ns;if(r!==null)throw r}}function vl(r,i,s,c){kh=!1;var m=r.updateQueue;si=!1;var v=m.firstBaseUpdate,x=m.lastBaseUpdate,M=m.shared.pending;if(M!==null){m.shared.pending=null;var U=M,J=U.next;U.next=null,x===null?v=J:x.next=J,x=U;var ce=r.alternate;ce!==null&&(ce=ce.updateQueue,M=ce.lastBaseUpdate,M!==x&&(M===null?ce.firstBaseUpdate=J:M.next=J,ce.lastBaseUpdate=U))}if(v!==null){var fe=m.baseState;x=0,ce=J=U=null,M=v;do{var ne=M.lane&-536870913,oe=ne!==M.lane;if(oe?(ot&ne)===ne:(c&ne)===ne){ne!==0&&ne===ts&&(kh=!0),ce!==null&&(ce=ce.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var Te=r,ke=M;ne=i;var xt=s;switch(ke.tag){case 1:if(Te=ke.payload,typeof Te=="function"){fe=Te.call(xt,fe,ne);break e}fe=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=ke.payload,ne=typeof Te=="function"?Te.call(xt,fe,ne):Te,ne==null)break e;fe=p({},fe,ne);break e;case 2:si=!0}}ne=M.callback,ne!==null&&(r.flags|=64,oe&&(r.flags|=8192),oe=m.callbacks,oe===null?m.callbacks=[ne]:oe.push(ne))}else oe={lane:ne,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ce===null?(J=ce=oe,U=fe):ce=ce.next=oe,x|=ne;if(M=M.next,M===null){if(M=m.shared.pending,M===null)break;oe=M,M=oe.next,oe.next=null,m.lastBaseUpdate=oe,m.shared.pending=null}}while(!0);ce===null&&(U=fe),m.baseState=U,m.firstBaseUpdate=J,m.lastBaseUpdate=ce,v===null&&(m.shared.lanes=0),pi|=x,r.lanes=x,r.memoizedState=fe}}function Ny(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function Iy(r,i){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Ny(s[r],i)}var is=P(null),cu=P(0);function Dy(r,i){r=ja,te(cu,r),te(is,i),ja=r|i.baseLanes}function jh(){te(cu,ja),te(is,is.current)}function Uh(){ja=cu.current,Q(is),Q(cu)}var ir=P(null),Ar=null;function ui(r){var i=r.alternate;te(Vt,Vt.current&1),te(ir,r),Ar===null&&(i===null||is.current!==null||i.memoizedState!==null)&&(Ar=r)}function Bh(r){te(Vt,Vt.current),te(ir,r),Ar===null&&(Ar=r)}function Ly(r){r.tag===22?(te(Vt,Vt.current),te(ir,r),Ar===null&&(Ar=r)):di()}function di(){te(Vt,Vt.current),te(ir,ir.current)}function or(r){Q(ir),Ar===r&&(Ar=null),Q(Vt)}var Vt=P(0);function uu(r){for(var i=r;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Gp(s)||qp(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Ca=0,He=null,St=null,Kt=null,du=!1,os=!1,io=!1,fu=0,yl=0,ss=null,tA=0;function Ut(){throw Error(a(321))}function zh(r,i){if(i===null)return!1;for(var s=0;s<i.length&&s<r.length;s++)if(!rr(r[s],i[s]))return!1;return!0}function Fh(r,i,s,c,m,v){return Ca=v,He=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,k.H=r===null||r.memoizedState===null?v1:np,io=!1,v=s(c,m),io=!1,os&&(v=ky(i,s,c,m)),Py(r),v}function Py(r){k.H=El;var i=St!==null&&St.next!==null;if(Ca=0,Kt=St=He=null,du=!1,yl=0,ss=null,i)throw Error(a(300));r===null||Wt||(r=r.dependencies,r!==null&&nu(r)&&(Wt=!0))}function ky(r,i,s,c){He=r;var m=0;do{if(os&&(ss=null),yl=0,os=!1,25<=m)throw Error(a(301));if(m+=1,Kt=St=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}k.H=y1,v=i(s,c)}while(os);return v}function nA(){var r=k.H,i=r.useState()[0];return i=typeof i.then=="function"?bl(i):i,r=r.useState()[0],(St!==null?St.memoizedState:null)!==r&&(He.flags|=1024),i}function Vh(){var r=fu!==0;return fu=0,r}function Hh(r,i,s){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~s}function $h(r){if(du){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}du=!1}Ca=0,Kt=St=He=null,os=!1,yl=fu=0,ss=null}function kn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Kt===null?He.memoizedState=Kt=r:Kt=Kt.next=r,Kt}function Ht(){if(St===null){var r=He.alternate;r=r!==null?r.memoizedState:null}else r=St.next;var i=Kt===null?He.memoizedState:Kt.next;if(i!==null)Kt=i,St=r;else{if(r===null)throw He.alternate===null?Error(a(467)):Error(a(310));St=r,r={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Kt===null?He.memoizedState=Kt=r:Kt=Kt.next=r}return Kt}function hu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bl(r){var i=yl;return yl+=1,ss===null&&(ss=[]),r=Oy(ss,r,i),i=He,(Kt===null?i.memoizedState:Kt.next)===null&&(i=i.alternate,k.H=i===null||i.memoizedState===null?v1:np),r}function pu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return bl(r);if(r.$$typeof===C)return wn(r)}throw Error(a(438,String(r)))}function Gh(r){var i=null,s=He.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=He.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=hu(),He.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(r),c=0;c<r;c++)s[c]=Z;return i.index++,s}function Ma(r,i){return typeof i=="function"?i(r):i}function mu(r){var i=Ht();return qh(i,St,r)}function qh(r,i,s){var c=r.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=s;var m=r.baseQueue,v=c.pending;if(v!==null){if(m!==null){var x=m.next;m.next=v.next,v.next=x}i.baseQueue=m=v,c.pending=null}if(v=r.baseState,m===null)r.memoizedState=v;else{i=m.next;var M=x=null,U=null,J=i,ce=!1;do{var fe=J.lane&-536870913;if(fe!==J.lane?(ot&fe)===fe:(Ca&fe)===fe){var ne=J.revertLane;if(ne===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),fe===ts&&(ce=!0);else if((Ca&ne)===ne){J=J.next,ne===ts&&(ce=!0);continue}else fe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(M=U=fe,x=v):U=U.next=fe,He.lanes|=ne,pi|=ne;fe=J.action,io&&s(v,fe),v=J.hasEagerState?J.eagerState:s(v,fe)}else ne={lane:fe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(M=U=ne,x=v):U=U.next=ne,He.lanes|=fe,pi|=fe;J=J.next}while(J!==null&&J!==i);if(U===null?x=v:U.next=M,!rr(v,r.memoizedState)&&(Wt=!0,ce&&(s=ns,s!==null)))throw s;r.memoizedState=v,r.baseState=x,r.baseQueue=U,c.lastRenderedState=v}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function Yh(r){var i=Ht(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=r;var c=s.dispatch,m=s.pending,v=i.memoizedState;if(m!==null){s.pending=null;var x=m=m.next;do v=r(v,x.action),x=x.next;while(x!==m);rr(v,i.memoizedState)||(Wt=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),s.lastRenderedState=v}return[v,c]}function jy(r,i,s){var c=He,m=Ht(),v=ct;if(v){if(s===void 0)throw Error(a(407));s=s()}else s=i();var x=!rr((St||m).memoizedState,s);if(x&&(m.memoizedState=s,Wt=!0),m=m.queue,Zh(zy.bind(null,c,m,r),[r]),m.getSnapshot!==i||x||Kt!==null&&Kt.memoizedState.tag&1){if(c.flags|=2048,ls(9,{destroy:void 0},By.bind(null,c,m,s,i),null),Tt===null)throw Error(a(349));v||(Ca&127)!==0||Uy(c,i,s)}return s}function Uy(r,i,s){r.flags|=16384,r={getSnapshot:i,value:s},i=He.updateQueue,i===null?(i=hu(),He.updateQueue=i,i.stores=[r]):(s=i.stores,s===null?i.stores=[r]:s.push(r))}function By(r,i,s,c){i.value=s,i.getSnapshot=c,Fy(i)&&Vy(r)}function zy(r,i,s){return s(function(){Fy(i)&&Vy(r)})}function Fy(r){var i=r.getSnapshot;r=r.value;try{var s=i();return!rr(r,s)}catch{return!0}}function Vy(r){var i=Zi(r,2);i!==null&&Kn(i,r,2)}function Kh(r){var i=kn();if(typeof r=="function"){var s=r;if(r=s(),io){on(!0);try{s()}finally{on(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:r},i}function Hy(r,i,s,c){return r.baseState=s,qh(r,St,typeof c=="function"?c:Ma)}function rA(r,i,s,c,m){if(yu(r))throw Error(a(485));if(r=i.action,r!==null){var v={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){v.listeners.push(x)}};k.T!==null?s(!0):v.isTransition=!1,c(v),s=i.pending,s===null?(v.next=i.pending=v,$y(i,v)):(v.next=s.next,i.pending=s.next=v)}}function $y(r,i){var s=i.action,c=i.payload,m=r.state;if(i.isTransition){var v=k.T,x={};k.T=x;try{var M=s(m,c),U=k.S;U!==null&&U(x,M),Gy(r,i,M)}catch(J){Wh(r,i,J)}finally{v!==null&&x.types!==null&&(v.types=x.types),k.T=v}}else try{v=s(m,c),Gy(r,i,v)}catch(J){Wh(r,i,J)}}function Gy(r,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){qy(r,i,c)},function(c){return Wh(r,i,c)}):qy(r,i,s)}function qy(r,i,s){i.status="fulfilled",i.value=s,Yy(i),r.state=s,i=r.pending,i!==null&&(s=i.next,s===i?r.pending=null:(s=s.next,i.next=s,$y(r,s)))}function Wh(r,i,s){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,Yy(i),i=i.next;while(i!==c)}r.action=null}function Yy(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function Ky(r,i){return i}function Wy(r,i){if(ct){var s=Tt.formState;if(s!==null){e:{var c=He;if(ct){if(It){t:{for(var m=It,v=Tr;m.nodeType!==8;){if(!v){m=null;break t}if(m=Cr(m.nextSibling),m===null){m=null;break t}}v=m.data,m=v==="F!"||v==="F"?m:null}if(m){It=Cr(m.nextSibling),c=m.data==="F!";break e}}ii(c)}c=!1}c&&(i=s[0])}}return s=kn(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ky,lastRenderedState:i},s.queue=c,s=p1.bind(null,He,c),c.dispatch=s,c=Kh(!1),v=tp.bind(null,He,!1,c.queue),c=kn(),m={state:i,dispatch:null,action:r,pending:null},c.queue=m,s=rA.bind(null,He,m,v,s),m.dispatch=s,c.memoizedState=r,[i,s,!1]}function Zy(r){var i=Ht();return Qy(i,St,r)}function Qy(r,i,s){if(i=qh(r,i,Ky)[0],r=mu(Ma)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=bl(i)}catch(x){throw x===rs?iu:x}else c=i;i=Ht();var m=i.queue,v=m.dispatch;return s!==i.memoizedState&&(He.flags|=2048,ls(9,{destroy:void 0},aA.bind(null,m,s),null)),[c,v,r]}function aA(r,i){r.action=i}function Xy(r){var i=Ht(),s=St;if(s!==null)return Qy(i,s,r);Ht(),i=i.memoizedState,s=Ht();var c=s.queue.dispatch;return s.memoizedState=r,[i,c,!1]}function ls(r,i,s,c){return r={tag:r,create:s,deps:c,inst:i,next:null},i=He.updateQueue,i===null&&(i=hu(),He.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=r.next=r:(c=s.next,s.next=r,r.next=c,i.lastEffect=r),r}function Jy(){return Ht().memoizedState}function gu(r,i,s,c){var m=kn();He.flags|=r,m.memoizedState=ls(1|i,{destroy:void 0},s,c===void 0?null:c)}function vu(r,i,s,c){var m=Ht();c=c===void 0?null:c;var v=m.memoizedState.inst;St!==null&&c!==null&&zh(c,St.memoizedState.deps)?m.memoizedState=ls(i,v,s,c):(He.flags|=r,m.memoizedState=ls(1|i,v,s,c))}function e1(r,i){gu(8390656,8,r,i)}function Zh(r,i){vu(2048,8,r,i)}function iA(r){He.flags|=4;var i=He.updateQueue;if(i===null)i=hu(),He.updateQueue=i,i.events=[r];else{var s=i.events;s===null?i.events=[r]:s.push(r)}}function t1(r){var i=Ht().memoizedState;return iA({ref:i,nextImpl:r}),function(){if((gt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function n1(r,i){return vu(4,2,r,i)}function r1(r,i){return vu(4,4,r,i)}function a1(r,i){if(typeof i=="function"){r=r();var s=i(r);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function i1(r,i,s){s=s!=null?s.concat([r]):null,vu(4,4,a1.bind(null,i,r),s)}function Qh(){}function o1(r,i){var s=Ht();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&zh(i,c[1])?c[0]:(s.memoizedState=[r,i],r)}function s1(r,i){var s=Ht();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&zh(i,c[1]))return c[0];if(c=r(),io){on(!0);try{r()}finally{on(!1)}}return s.memoizedState=[c,i],c}function Xh(r,i,s){return s===void 0||(Ca&1073741824)!==0&&(ot&261930)===0?r.memoizedState=i:(r.memoizedState=s,r=lb(),He.lanes|=r,pi|=r,s)}function l1(r,i,s,c){return rr(s,i)?s:is.current!==null?(r=Xh(r,s,c),rr(r,i)||(Wt=!0),r):(Ca&42)===0||(Ca&1073741824)!==0&&(ot&261930)===0?(Wt=!0,r.memoizedState=s):(r=lb(),He.lanes|=r,pi|=r,i)}function c1(r,i,s,c,m){var v=F.p;F.p=v!==0&&8>v?v:8;var x=k.T,M={};k.T=M,tp(r,!1,i,s);try{var U=m(),J=k.S;if(J!==null&&J(M,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ce=eA(U,c);_l(r,i,ce,cr(r))}else _l(r,i,c,cr(r))}catch(fe){_l(r,i,{then:function(){},status:"rejected",reason:fe},cr())}finally{F.p=v,x!==null&&M.types!==null&&(x.types=M.types),k.T=x}}function oA(){}function Jh(r,i,s,c){if(r.tag!==5)throw Error(a(476));var m=u1(r).queue;c1(r,m,i,G,s===null?oA:function(){return d1(r),s(c)})}function u1(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:G},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:s},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function d1(r){var i=u1(r);i.next===null&&(i=r.alternate.memoizedState),_l(r,i.next.queue,{},cr())}function ep(){return wn(jl)}function f1(){return Ht().memoizedState}function h1(){return Ht().memoizedState}function sA(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var s=cr();r=li(s);var c=ci(i,r,s);c!==null&&(Kn(c,i,s),ml(c,i,s)),i={cache:Ch()},r.payload=i;return}i=i.return}}function lA(r,i,s){var c=cr();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},yu(r)?m1(i,s):(s=yh(r,i,s,c),s!==null&&(Kn(s,r,c),g1(s,i,c)))}function p1(r,i,s){var c=cr();_l(r,i,s,c)}function _l(r,i,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(yu(r))m1(i,m);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var x=i.lastRenderedState,M=v(x,s);if(m.hasEagerState=!0,m.eagerState=M,rr(M,x))return Xc(r,i,m,0),Tt===null&&Qc(),!1}catch{}if(s=yh(r,i,m,c),s!==null)return Kn(s,r,c),g1(s,i,c),!0}return!1}function tp(r,i,s,c){if(c={lane:2,revertLane:Dp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},yu(r)){if(i)throw Error(a(479))}else i=yh(r,s,c,2),i!==null&&Kn(i,r,2)}function yu(r){var i=r.alternate;return r===He||i!==null&&i===He}function m1(r,i){os=du=!0;var s=r.pending;s===null?i.next=i:(i.next=s.next,s.next=i),r.pending=i}function g1(r,i,s){if((s&4194048)!==0){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,_n(r,s)}}var El={readContext:wn,use:pu,useCallback:Ut,useContext:Ut,useEffect:Ut,useImperativeHandle:Ut,useLayoutEffect:Ut,useInsertionEffect:Ut,useMemo:Ut,useReducer:Ut,useRef:Ut,useState:Ut,useDebugValue:Ut,useDeferredValue:Ut,useTransition:Ut,useSyncExternalStore:Ut,useId:Ut,useHostTransitionStatus:Ut,useFormState:Ut,useActionState:Ut,useOptimistic:Ut,useMemoCache:Ut,useCacheRefresh:Ut};El.useEffectEvent=Ut;var v1={readContext:wn,use:pu,useCallback:function(r,i){return kn().memoizedState=[r,i===void 0?null:i],r},useContext:wn,useEffect:e1,useImperativeHandle:function(r,i,s){s=s!=null?s.concat([r]):null,gu(4194308,4,a1.bind(null,i,r),s)},useLayoutEffect:function(r,i){return gu(4194308,4,r,i)},useInsertionEffect:function(r,i){gu(4,2,r,i)},useMemo:function(r,i){var s=kn();i=i===void 0?null:i;var c=r();if(io){on(!0);try{r()}finally{on(!1)}}return s.memoizedState=[c,i],c},useReducer:function(r,i,s){var c=kn();if(s!==void 0){var m=s(i);if(io){on(!0);try{s(i)}finally{on(!1)}}}else m=i;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=lA.bind(null,He,r),[c.memoizedState,r]},useRef:function(r){var i=kn();return r={current:r},i.memoizedState=r},useState:function(r){r=Kh(r);var i=r.queue,s=p1.bind(null,He,i);return i.dispatch=s,[r.memoizedState,s]},useDebugValue:Qh,useDeferredValue:function(r,i){var s=kn();return Xh(s,r,i)},useTransition:function(){var r=Kh(!1);return r=c1.bind(null,He,r.queue,!0,!1),kn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,s){var c=He,m=kn();if(ct){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Tt===null)throw Error(a(349));(ot&127)!==0||Uy(c,i,s)}m.memoizedState=s;var v={value:s,getSnapshot:i};return m.queue=v,e1(zy.bind(null,c,v,r),[r]),c.flags|=2048,ls(9,{destroy:void 0},By.bind(null,c,v,s,i),null),s},useId:function(){var r=kn(),i=Tt.identifierPrefix;if(ct){var s=ra,c=na;s=(c&~(1<<32-qt(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=fu++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=tA++,i="_"+i+"r_"+s.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:ep,useFormState:Wy,useActionState:Wy,useOptimistic:function(r){var i=kn();i.memoizedState=i.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=tp.bind(null,He,!0,s),s.dispatch=i,[r,i]},useMemoCache:Gh,useCacheRefresh:function(){return kn().memoizedState=sA.bind(null,He)},useEffectEvent:function(r){var i=kn(),s={impl:r};return i.memoizedState=s,function(){if((gt&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},np={readContext:wn,use:pu,useCallback:o1,useContext:wn,useEffect:Zh,useImperativeHandle:i1,useInsertionEffect:n1,useLayoutEffect:r1,useMemo:s1,useReducer:mu,useRef:Jy,useState:function(){return mu(Ma)},useDebugValue:Qh,useDeferredValue:function(r,i){var s=Ht();return l1(s,St.memoizedState,r,i)},useTransition:function(){var r=mu(Ma)[0],i=Ht().memoizedState;return[typeof r=="boolean"?r:bl(r),i]},useSyncExternalStore:jy,useId:f1,useHostTransitionStatus:ep,useFormState:Zy,useActionState:Zy,useOptimistic:function(r,i){var s=Ht();return Hy(s,St,r,i)},useMemoCache:Gh,useCacheRefresh:h1};np.useEffectEvent=t1;var y1={readContext:wn,use:pu,useCallback:o1,useContext:wn,useEffect:Zh,useImperativeHandle:i1,useInsertionEffect:n1,useLayoutEffect:r1,useMemo:s1,useReducer:Yh,useRef:Jy,useState:function(){return Yh(Ma)},useDebugValue:Qh,useDeferredValue:function(r,i){var s=Ht();return St===null?Xh(s,r,i):l1(s,St.memoizedState,r,i)},useTransition:function(){var r=Yh(Ma)[0],i=Ht().memoizedState;return[typeof r=="boolean"?r:bl(r),i]},useSyncExternalStore:jy,useId:f1,useHostTransitionStatus:ep,useFormState:Xy,useActionState:Xy,useOptimistic:function(r,i){var s=Ht();return St!==null?Hy(s,St,r,i):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:Gh,useCacheRefresh:h1};y1.useEffectEvent=t1;function rp(r,i,s,c){i=r.memoizedState,s=s(c,i),s=s==null?i:p({},i,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var ap={enqueueSetState:function(r,i,s){r=r._reactInternals;var c=cr(),m=li(c);m.payload=i,s!=null&&(m.callback=s),i=ci(r,m,c),i!==null&&(Kn(i,r,c),ml(i,r,c))},enqueueReplaceState:function(r,i,s){r=r._reactInternals;var c=cr(),m=li(c);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=ci(r,m,c),i!==null&&(Kn(i,r,c),ml(i,r,c))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var s=cr(),c=li(s);c.tag=2,i!=null&&(c.callback=i),i=ci(r,c,s),i!==null&&(Kn(i,r,s),ml(i,r,s))}};function b1(r,i,s,c,m,v,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,v,x):i.prototype&&i.prototype.isPureReactComponent?!sl(s,c)||!sl(m,v):!0}function _1(r,i,s,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==r&&ap.enqueueReplaceState(i,i.state,null)}function oo(r,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(r=r.defaultProps){s===i&&(s=p({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function E1(r){Zc(r)}function S1(r){console.error(r)}function w1(r){Zc(r)}function bu(r,i){try{var s=r.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function x1(r,i,s){try{var c=r.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function ip(r,i,s){return s=li(s),s.tag=3,s.payload={element:null},s.callback=function(){bu(r,i)},s}function R1(r){return r=li(r),r.tag=3,r}function O1(r,i,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var v=c.value;r.payload=function(){return m(v)},r.callback=function(){x1(i,s,c)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(r.callback=function(){x1(i,s,c),typeof m!="function"&&(mi===null?mi=new Set([this]):mi.add(this));var M=c.stack;this.componentDidCatch(c.value,{componentStack:M!==null?M:""})})}function cA(r,i,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&es(i,s,m,!0),s=ir.current,s!==null){switch(s.tag){case 31:case 13:return Ar===null?Nu():s.alternate===null&&Bt===0&&(Bt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===ou?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),Mp(r,c,m)),!1;case 22:return s.flags|=65536,c===ou?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),Mp(r,c,m)),!1}throw Error(a(435,s.tag))}return Mp(r,c,m),Nu(),!1}if(ct)return i=ir.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==xh&&(r=Error(a(422),{cause:c}),ul(xr(r,s)))):(c!==xh&&(i=Error(a(423),{cause:c}),ul(xr(i,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=xr(c,s),m=ip(r.stateNode,c,m),Ph(r,m),Bt!==4&&(Bt=2)),!1;var v=Error(a(520),{cause:c});if(v=xr(v,s),Cl===null?Cl=[v]:Cl.push(v),Bt!==4&&(Bt=2),i===null)return!0;c=xr(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=ip(s.stateNode,c,r),Ph(s,r),!1;case 1:if(i=s.type,v=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(mi===null||!mi.has(v))))return s.flags|=65536,m&=-m,s.lanes|=m,m=R1(m),O1(m,r,s,c),Ph(s,m),!1}s=s.return}while(s!==null);return!1}var op=Error(a(461)),Wt=!1;function xn(r,i,s,c){i.child=r===null?My(i,null,s,c):ao(i,r.child,s,c)}function T1(r,i,s,c,m){s=s.render;var v=i.ref;if("ref"in c){var x={};for(var M in c)M!=="ref"&&(x[M]=c[M])}else x=c;return eo(i),c=Fh(r,i,s,x,v,m),M=Vh(),r!==null&&!Wt?(Hh(r,i,m),Na(r,i,m)):(ct&&M&&Sh(i),i.flags|=1,xn(r,i,c,m),i.child)}function A1(r,i,s,c,m){if(r===null){var v=s.type;return typeof v=="function"&&!bh(v)&&v.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=v,C1(r,i,v,c,m)):(r=eu(s.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(v=r.child,!pp(r,m)){var x=v.memoizedProps;if(s=s.compare,s=s!==null?s:sl,s(x,c)&&r.ref===i.ref)return Na(r,i,m)}return i.flags|=1,r=Ra(v,c),r.ref=i.ref,r.return=i,i.child=r}function C1(r,i,s,c,m){if(r!==null){var v=r.memoizedProps;if(sl(v,c)&&r.ref===i.ref)if(Wt=!1,i.pendingProps=c=v,pp(r,m))(r.flags&131072)!==0&&(Wt=!0);else return i.lanes=r.lanes,Na(r,i,m)}return sp(r,i,s,c,m)}function M1(r,i,s,c){var m=c.children,v=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(v=v!==null?v.baseLanes|s:s,r!==null){for(c=i.child=r.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~v}else c=0,i.child=null;return N1(r,i,v,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&au(i,v!==null?v.cachePool:null),v!==null?Dy(i,v):jh(),Ly(i);else return c=i.lanes=536870912,N1(r,i,v!==null?v.baseLanes|s:s,s,c)}else v!==null?(au(i,v.cachePool),Dy(i,v),di(),i.memoizedState=null):(r!==null&&au(i,null),jh(),di());return xn(r,i,m,s),i.child}function Sl(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function N1(r,i,s,c,m){var v=Nh();return v=v===null?null:{parent:Yt._currentValue,pool:v},i.memoizedState={baseLanes:s,cachePool:v},r!==null&&au(i,null),jh(),Ly(i),r!==null&&es(r,i,c,!0),i.childLanes=m,null}function _u(r,i){return i=Su({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function I1(r,i,s){return ao(i,r.child,null,s),r=_u(i,i.pendingProps),r.flags|=2,or(i),i.memoizedState=null,r}function uA(r,i,s){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(ct){if(c.mode==="hidden")return r=_u(i,c),i.lanes=536870912,Sl(null,r);if(Bh(i),(r=It)?(r=$b(r,Tr),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ri!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},s=my(r),s.return=i,i.child=s,Sn=i,It=null)):r=null,r===null)throw ii(i);return i.lanes=536870912,null}return _u(i,c)}var v=r.memoizedState;if(v!==null){var x=v.dehydrated;if(Bh(i),m)if(i.flags&256)i.flags&=-257,i=I1(r,i,s);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(Wt||es(r,i,s,!1),m=(s&r.childLanes)!==0,Wt||m){if(c=Tt,c!==null&&(x=Fn(c,s),x!==0&&x!==v.retryLane))throw v.retryLane=x,Zi(r,x),Kn(c,r,x),op;Nu(),i=I1(r,i,s)}else r=v.treeContext,It=Cr(x.nextSibling),Sn=i,ct=!0,ai=null,Tr=!1,r!==null&&yy(i,r),i=_u(i,c),i.flags|=4096;return i}return r=Ra(r.child,{mode:c.mode,children:c.children}),r.ref=i.ref,i.child=r,r.return=i,r}function Eu(r,i){var s=i.ref;if(s===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(r===null||r.ref!==s)&&(i.flags|=4194816)}}function sp(r,i,s,c,m){return eo(i),s=Fh(r,i,s,c,void 0,m),c=Vh(),r!==null&&!Wt?(Hh(r,i,m),Na(r,i,m)):(ct&&c&&Sh(i),i.flags|=1,xn(r,i,s,m),i.child)}function D1(r,i,s,c,m,v){return eo(i),i.updateQueue=null,s=ky(i,c,s,m),Py(r),c=Vh(),r!==null&&!Wt?(Hh(r,i,v),Na(r,i,v)):(ct&&c&&Sh(i),i.flags|=1,xn(r,i,s,v),i.child)}function L1(r,i,s,c,m){if(eo(i),i.stateNode===null){var v=Zo,x=s.contextType;typeof x=="object"&&x!==null&&(v=wn(x)),v=new s(c,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=ap,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=c,v.state=i.memoizedState,v.refs={},Dh(i),x=s.contextType,v.context=typeof x=="object"&&x!==null?wn(x):Zo,v.state=i.memoizedState,x=s.getDerivedStateFromProps,typeof x=="function"&&(rp(i,s,x,c),v.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(x=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),x!==v.state&&ap.enqueueReplaceState(v,v.state,null),vl(i,c,v,m),gl(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(r===null){v=i.stateNode;var M=i.memoizedProps,U=oo(s,M);v.props=U;var J=v.context,ce=s.contextType;x=Zo,typeof ce=="object"&&ce!==null&&(x=wn(ce));var fe=s.getDerivedStateFromProps;ce=typeof fe=="function"||typeof v.getSnapshotBeforeUpdate=="function",M=i.pendingProps!==M,ce||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(M||J!==x)&&_1(i,v,c,x),si=!1;var ne=i.memoizedState;v.state=ne,vl(i,c,v,m),gl(),J=i.memoizedState,M||ne!==J||si?(typeof fe=="function"&&(rp(i,s,fe,c),J=i.memoizedState),(U=si||b1(i,s,U,c,ne,J,x))?(ce||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(i.flags|=4194308)):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=J),v.props=c,v.state=J,v.context=x,c=U):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{v=i.stateNode,Lh(r,i),x=i.memoizedProps,ce=oo(s,x),v.props=ce,fe=i.pendingProps,ne=v.context,J=s.contextType,U=Zo,typeof J=="object"&&J!==null&&(U=wn(J)),M=s.getDerivedStateFromProps,(J=typeof M=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(x!==fe||ne!==U)&&_1(i,v,c,U),si=!1,ne=i.memoizedState,v.state=ne,vl(i,c,v,m),gl();var oe=i.memoizedState;x!==fe||ne!==oe||si||r!==null&&r.dependencies!==null&&nu(r.dependencies)?(typeof M=="function"&&(rp(i,s,M,c),oe=i.memoizedState),(ce=si||b1(i,s,ce,c,ne,oe,U)||r!==null&&r.dependencies!==null&&nu(r.dependencies))?(J||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,oe,U),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,oe,U)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=oe),v.props=c,v.state=oe,v.context=U,c=ce):(typeof v.componentDidUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&ne===r.memoizedState||(i.flags|=1024),c=!1)}return v=c,Eu(r,i),c=(i.flags&128)!==0,v||c?(v=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,r!==null&&c?(i.child=ao(i,r.child,null,m),i.child=ao(i,null,s,m)):xn(r,i,s,m),i.memoizedState=v.state,r=i.child):r=Na(r,i,m),r}function P1(r,i,s,c){return Xi(),i.flags|=256,xn(r,i,s,c),i.child}var lp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cp(r){return{baseLanes:r,cachePool:xy()}}function up(r,i,s){return r=r!==null?r.childLanes&~s:0,i&&(r|=lr),r}function k1(r,i,s){var c=i.pendingProps,m=!1,v=(i.flags&128)!==0,x;if((x=v)||(x=r!==null&&r.memoizedState===null?!1:(Vt.current&2)!==0),x&&(m=!0,i.flags&=-129),x=(i.flags&32)!==0,i.flags&=-33,r===null){if(ct){if(m?ui(i):di(),(r=It)?(r=$b(r,Tr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ri!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},s=my(r),s.return=i,i.child=s,Sn=i,It=null)):r=null,r===null)throw ii(i);return qp(r)?i.lanes=32:i.lanes=536870912,null}var M=c.children;return c=c.fallback,m?(di(),m=i.mode,M=Su({mode:"hidden",children:M},m),c=Qi(c,m,s,null),M.return=i,c.return=i,M.sibling=c,i.child=M,c=i.child,c.memoizedState=cp(s),c.childLanes=up(r,x,s),i.memoizedState=lp,Sl(null,c)):(ui(i),dp(i,M))}var U=r.memoizedState;if(U!==null&&(M=U.dehydrated,M!==null)){if(v)i.flags&256?(ui(i),i.flags&=-257,i=fp(r,i,s)):i.memoizedState!==null?(di(),i.child=r.child,i.flags|=128,i=null):(di(),M=c.fallback,m=i.mode,c=Su({mode:"visible",children:c.children},m),M=Qi(M,m,s,null),M.flags|=2,c.return=i,M.return=i,c.sibling=M,i.child=c,ao(i,r.child,null,s),c=i.child,c.memoizedState=cp(s),c.childLanes=up(r,x,s),i.memoizedState=lp,i=Sl(null,c));else if(ui(i),qp(M)){if(x=M.nextSibling&&M.nextSibling.dataset,x)var J=x.dgst;x=J,c=Error(a(419)),c.stack="",c.digest=x,ul({value:c,source:null,stack:null}),i=fp(r,i,s)}else if(Wt||es(r,i,s,!1),x=(s&r.childLanes)!==0,Wt||x){if(x=Tt,x!==null&&(c=Fn(x,s),c!==0&&c!==U.retryLane))throw U.retryLane=c,Zi(r,c),Kn(x,r,c),op;Gp(M)||Nu(),i=fp(r,i,s)}else Gp(M)?(i.flags|=192,i.child=r.child,i=null):(r=U.treeContext,It=Cr(M.nextSibling),Sn=i,ct=!0,ai=null,Tr=!1,r!==null&&yy(i,r),i=dp(i,c.children),i.flags|=4096);return i}return m?(di(),M=c.fallback,m=i.mode,U=r.child,J=U.sibling,c=Ra(U,{mode:"hidden",children:c.children}),c.subtreeFlags=U.subtreeFlags&65011712,J!==null?M=Ra(J,M):(M=Qi(M,m,s,null),M.flags|=2),M.return=i,c.return=i,c.sibling=M,i.child=c,Sl(null,c),c=i.child,M=r.child.memoizedState,M===null?M=cp(s):(m=M.cachePool,m!==null?(U=Yt._currentValue,m=m.parent!==U?{parent:U,pool:U}:m):m=xy(),M={baseLanes:M.baseLanes|s,cachePool:m}),c.memoizedState=M,c.childLanes=up(r,x,s),i.memoizedState=lp,Sl(r.child,c)):(ui(i),s=r.child,r=s.sibling,s=Ra(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,r!==null&&(x=i.deletions,x===null?(i.deletions=[r],i.flags|=16):x.push(r)),i.child=s,i.memoizedState=null,s)}function dp(r,i){return i=Su({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function Su(r,i){return r=ar(22,r,null,i),r.lanes=0,r}function fp(r,i,s){return ao(i,r.child,null,s),r=dp(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function j1(r,i,s){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Th(r.return,i,s)}function hp(r,i,s,c,m,v){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:v}:(x.isBackwards=i,x.rendering=null,x.renderingStartTime=0,x.last=c,x.tail=s,x.tailMode=m,x.treeForkCount=v)}function U1(r,i,s){var c=i.pendingProps,m=c.revealOrder,v=c.tail;c=c.children;var x=Vt.current,M=(x&2)!==0;if(M?(x=x&1|2,i.flags|=128):x&=1,te(Vt,x),xn(r,i,c,s),c=ct?cl:0,!M&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&j1(r,s,i);else if(r.tag===19)j1(r,s,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=i.child,m=null;s!==null;)r=s.alternate,r!==null&&uu(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),hp(i,!1,m,s,v,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&uu(r)===null){i.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}hp(i,!0,s,null,v,c);break;case"together":hp(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Na(r,i,s){if(r!==null&&(i.dependencies=r.dependencies),pi|=i.lanes,(s&i.childLanes)===0)if(r!==null){if(es(r,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,s=Ra(r,r.pendingProps),i.child=s,s.return=i;r.sibling!==null;)r=r.sibling,s=s.sibling=Ra(r,r.pendingProps),s.return=i;s.sibling=null}return i.child}function pp(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&nu(r)))}function dA(r,i,s){switch(i.tag){case 3:Se(i,i.stateNode.containerInfo),oi(i,Yt,r.memoizedState.cache),Xi();break;case 27:case 5:je(i);break;case 4:Se(i,i.stateNode.containerInfo);break;case 10:oi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Bh(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(ui(i),i.flags|=128,null):(s&i.child.childLanes)!==0?k1(r,i,s):(ui(i),r=Na(r,i,s),r!==null?r.sibling:null);ui(i);break;case 19:var m=(r.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(es(r,i,s,!1),c=(s&i.childLanes)!==0),m){if(c)return U1(r,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),te(Vt,Vt.current),c)break;return null;case 22:return i.lanes=0,M1(r,i,s,i.pendingProps);case 24:oi(i,Yt,r.memoizedState.cache)}return Na(r,i,s)}function B1(r,i,s){if(r!==null)if(r.memoizedProps!==i.pendingProps)Wt=!0;else{if(!pp(r,s)&&(i.flags&128)===0)return Wt=!1,dA(r,i,s);Wt=(r.flags&131072)!==0}else Wt=!1,ct&&(i.flags&1048576)!==0&&vy(i,cl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(r=no(i.elementType),i.type=r,typeof r=="function")bh(r)?(c=oo(r,c),i.tag=1,i=L1(null,i,r,c,s)):(i.tag=0,i=sp(null,i,r,c,s));else{if(r!=null){var m=r.$$typeof;if(m===O){i.tag=11,i=T1(null,i,r,c,s);break e}else if(m===I){i.tag=14,i=A1(null,i,r,c,s);break e}}throw i=ie(r)||r,Error(a(306,i,""))}}return i;case 0:return sp(r,i,i.type,i.pendingProps,s);case 1:return c=i.type,m=oo(c,i.pendingProps),L1(r,i,c,m,s);case 3:e:{if(Se(i,i.stateNode.containerInfo),r===null)throw Error(a(387));c=i.pendingProps;var v=i.memoizedState;m=v.element,Lh(r,i),vl(i,c,null,s);var x=i.memoizedState;if(c=x.cache,oi(i,Yt,c),c!==v.cache&&Ah(i,[Yt],s,!0),gl(),c=x.element,v.isDehydrated)if(v={element:c,isDehydrated:!1,cache:x.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=P1(r,i,c,s);break e}else if(c!==m){m=xr(Error(a(424)),i),ul(m),i=P1(r,i,c,s);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,It=Cr(r.firstChild),Sn=i,ct=!0,ai=null,Tr=!0,s=My(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Xi(),c===m){i=Na(r,i,s);break e}xn(r,i,c,s)}i=i.child}return i;case 26:return Eu(r,i),r===null?(s=Zb(i.type,null,i.pendingProps,null))?i.memoizedState=s:ct||(s=i.type,r=i.pendingProps,c=Uu(_e.current).createElement(s),c[En]=i,c[Vn]=r,Rn(c,s,r),hn(c),i.stateNode=c):i.memoizedState=Zb(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return je(i),r===null&&ct&&(c=i.stateNode=Yb(i.type,i.pendingProps,_e.current),Sn=i,Tr=!0,m=It,bi(i.type)?(Yp=m,It=Cr(c.firstChild)):It=m),xn(r,i,i.pendingProps.children,s),Eu(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&ct&&((m=c=It)&&(c=FA(c,i.type,i.pendingProps,Tr),c!==null?(i.stateNode=c,Sn=i,It=Cr(c.firstChild),Tr=!1,m=!0):m=!1),m||ii(i)),je(i),m=i.type,v=i.pendingProps,x=r!==null?r.memoizedProps:null,c=v.children,Vp(m,v)?c=null:x!==null&&Vp(m,x)&&(i.flags|=32),i.memoizedState!==null&&(m=Fh(r,i,nA,null,null,s),jl._currentValue=m),Eu(r,i),xn(r,i,c,s),i.child;case 6:return r===null&&ct&&((r=s=It)&&(s=VA(s,i.pendingProps,Tr),s!==null?(i.stateNode=s,Sn=i,It=null,r=!0):r=!1),r||ii(i)),null;case 13:return k1(r,i,s);case 4:return Se(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=ao(i,null,c,s):xn(r,i,c,s),i.child;case 11:return T1(r,i,i.type,i.pendingProps,s);case 7:return xn(r,i,i.pendingProps,s),i.child;case 8:return xn(r,i,i.pendingProps.children,s),i.child;case 12:return xn(r,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,oi(i,i.type,c.value),xn(r,i,c.children,s),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,eo(i),m=wn(m),c=c(m),i.flags|=1,xn(r,i,c,s),i.child;case 14:return A1(r,i,i.type,i.pendingProps,s);case 15:return C1(r,i,i.type,i.pendingProps,s);case 19:return U1(r,i,s);case 31:return uA(r,i,s);case 22:return M1(r,i,s,i.pendingProps);case 24:return eo(i),c=wn(Yt),r===null?(m=Nh(),m===null&&(m=Tt,v=Ch(),m.pooledCache=v,v.refCount++,v!==null&&(m.pooledCacheLanes|=s),m=v),i.memoizedState={parent:c,cache:m},Dh(i),oi(i,Yt,m)):((r.lanes&s)!==0&&(Lh(r,i),vl(i,null,null,s),gl()),m=r.memoizedState,v=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),oi(i,Yt,c)):(c=v.cache,oi(i,Yt,c),c!==m.cache&&Ah(i,[Yt],s,!0))),xn(r,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Ia(r){r.flags|=4}function mp(r,i,s,c,m){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(fb())r.flags|=8192;else throw ro=ou,Ih}else r.flags&=-16777217}function z1(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!t_(i))if(fb())r.flags|=8192;else throw ro=ou,Ih}function wu(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?Et():536870912,r.lanes|=i,fs|=i)}function wl(r,i){if(!ct)switch(r.tailMode){case"hidden":i=r.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function Dt(r){var i=r.alternate!==null&&r.alternate.child===r.child,s=0,c=0;if(i)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=s,i}function fA(r,i,s){var c=i.pendingProps;switch(wh(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dt(i),null;case 1:return Dt(i),null;case 3:return s=i.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Aa(Yt),le(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Jo(i)?Ia(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Rh())),Dt(i),null;case 26:var m=i.type,v=i.memoizedState;return r===null?(Ia(i),v!==null?(Dt(i),z1(i,v)):(Dt(i),mp(i,m,null,c,s))):v?v!==r.memoizedState?(Ia(i),Dt(i),z1(i,v)):(Dt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==c&&Ia(i),Dt(i),mp(i,m,r,c,s)),null;case 27:if(at(i),s=_e.current,m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Ia(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Dt(i),null}r=se.current,Jo(i)?by(i):(r=Yb(m,c,s),i.stateNode=r,Ia(i))}return Dt(i),null;case 5:if(at(i),m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Ia(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Dt(i),null}if(v=se.current,Jo(i))by(i);else{var x=Uu(_e.current);switch(v){case 1:v=x.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:v=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":v=x.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":v=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":v=x.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof c.is=="string"?x.createElement("select",{is:c.is}):x.createElement("select"),c.multiple?v.multiple=!0:c.size&&(v.size=c.size);break;default:v=typeof c.is=="string"?x.createElement(m,{is:c.is}):x.createElement(m)}}v[En]=i,v[Vn]=c;e:for(x=i.child;x!==null;){if(x.tag===5||x.tag===6)v.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===i)break e;for(;x.sibling===null;){if(x.return===null||x.return===i)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}i.stateNode=v;e:switch(Rn(v,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Ia(i)}}return Dt(i),mp(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,s),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==c&&Ia(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(r=_e.current,Jo(i)){if(r=i.stateNode,s=i.memoizedProps,c=null,m=Sn,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[En]=i,r=!!(r.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||kb(r.nodeValue,s)),r||ii(i,!0)}else r=Uu(r).createTextNode(c),r[En]=i,i.stateNode=r}return Dt(i),null;case 31:if(s=i.memoizedState,r===null||r.memoizedState!==null){if(c=Jo(i),s!==null){if(r===null){if(!c)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[En]=i}else Xi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Dt(i),r=!1}else s=Rh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return i.flags&256?(or(i),i):(or(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Dt(i),null;case 13:if(c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Jo(i),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[En]=i}else Xi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Dt(i),m=!1}else m=Rh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(or(i),i):(or(i),null)}return or(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,r=r!==null&&r.memoizedState!==null,s&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==m&&(c.flags|=2048)),s!==r&&s&&(i.child.flags|=8192),wu(i,i.updateQueue),Dt(i),null);case 4:return le(),r===null&&jp(i.stateNode.containerInfo),Dt(i),null;case 10:return Aa(i.type),Dt(i),null;case 19:if(Q(Vt),c=i.memoizedState,c===null)return Dt(i),null;if(m=(i.flags&128)!==0,v=c.rendering,v===null)if(m)wl(c,!1);else{if(Bt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(v=uu(r),v!==null){for(i.flags|=128,wl(c,!1),r=v.updateQueue,i.updateQueue=r,wu(i,r),i.subtreeFlags=0,r=s,s=i.child;s!==null;)py(s,r),s=s.sibling;return te(Vt,Vt.current&1|2),ct&&Oa(i,c.treeForkCount),i.child}r=r.sibling}c.tail!==null&&de()>Au&&(i.flags|=128,m=!0,wl(c,!1),i.lanes=4194304)}else{if(!m)if(r=uu(v),r!==null){if(i.flags|=128,m=!0,r=r.updateQueue,i.updateQueue=r,wu(i,r),wl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!v.alternate&&!ct)return Dt(i),null}else 2*de()-c.renderingStartTime>Au&&s!==536870912&&(i.flags|=128,m=!0,wl(c,!1),i.lanes=4194304);c.isBackwards?(v.sibling=i.child,i.child=v):(r=c.last,r!==null?r.sibling=v:i.child=v,c.last=v)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=de(),r.sibling=null,s=Vt.current,te(Vt,m?s&1|2:s&1),ct&&Oa(i,c.treeForkCount),r):(Dt(i),null);case 22:case 23:return or(i),Uh(),c=i.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(Dt(i),i.subtreeFlags&6&&(i.flags|=8192)):Dt(i),s=i.updateQueue,s!==null&&wu(i,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),r!==null&&Q(to),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Aa(Yt),Dt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function hA(r,i){switch(wh(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Aa(Yt),le(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return at(i),null;case 31:if(i.memoizedState!==null){if(or(i),i.alternate===null)throw Error(a(340));Xi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(or(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Xi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Q(Vt),null;case 4:return le(),null;case 10:return Aa(i.type),null;case 22:case 23:return or(i),Uh(),r!==null&&Q(to),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Aa(Yt),null;case 25:return null;default:return null}}function F1(r,i){switch(wh(i),i.tag){case 3:Aa(Yt),le();break;case 26:case 27:case 5:at(i);break;case 4:le();break;case 31:i.memoizedState!==null&&or(i);break;case 13:or(i);break;case 19:Q(Vt);break;case 10:Aa(i.type);break;case 22:case 23:or(i),Uh(),r!==null&&Q(to);break;case 24:Aa(Yt)}}function xl(r,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&r)===r){c=void 0;var v=s.create,x=s.inst;c=v(),x.destroy=c}s=s.next}while(s!==m)}}catch(M){bt(i,i.return,M)}}function fi(r,i,s){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var v=m.next;c=v;do{if((c.tag&r)===r){var x=c.inst,M=x.destroy;if(M!==void 0){x.destroy=void 0,m=i;var U=s,J=M;try{J()}catch(ce){bt(m,U,ce)}}}c=c.next}while(c!==v)}}catch(ce){bt(i,i.return,ce)}}function V1(r){var i=r.updateQueue;if(i!==null){var s=r.stateNode;try{Iy(i,s)}catch(c){bt(r,r.return,c)}}}function H1(r,i,s){s.props=oo(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(c){bt(r,i,c)}}function Rl(r,i){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof s=="function"?r.refCleanup=s(c):s.current=c}}catch(m){bt(r,i,m)}}function aa(r,i){var s=r.ref,c=r.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){bt(r,i,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){bt(r,i,m)}else s.current=null}function $1(r){var i=r.type,s=r.memoizedProps,c=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){bt(r,r.return,m)}}function gp(r,i,s){try{var c=r.stateNode;PA(c,r.type,s,i),c[Vn]=i}catch(m){bt(r,r.return,m)}}function G1(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&bi(r.type)||r.tag===4}function vp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||G1(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&&bi(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 yp(r,i,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(r),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=wa));else if(c!==4&&(c===27&&bi(r.type)&&(s=r.stateNode,i=null),r=r.child,r!==null))for(yp(r,i,s),r=r.sibling;r!==null;)yp(r,i,s),r=r.sibling}function xu(r,i,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?s.insertBefore(r,i):s.appendChild(r);else if(c!==4&&(c===27&&bi(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(xu(r,i,s),r=r.sibling;r!==null;)xu(r,i,s),r=r.sibling}function q1(r){var i=r.stateNode,s=r.memoizedProps;try{for(var c=r.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Rn(i,c,s),i[En]=r,i[Vn]=s}catch(v){bt(r,r.return,v)}}var Da=!1,Zt=!1,bp=!1,Y1=typeof WeakSet=="function"?WeakSet:Set,pn=null;function pA(r,i){if(r=r.containerInfo,zp=Gu,r=iy(r),fh(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,v=c.focusNode;c=c.focusOffset;try{s.nodeType,v.nodeType}catch{s=null;break e}var x=0,M=-1,U=-1,J=0,ce=0,fe=r,ne=null;t:for(;;){for(var oe;fe!==s||m!==0&&fe.nodeType!==3||(M=x+m),fe!==v||c!==0&&fe.nodeType!==3||(U=x+c),fe.nodeType===3&&(x+=fe.nodeValue.length),(oe=fe.firstChild)!==null;)ne=fe,fe=oe;for(;;){if(fe===r)break t;if(ne===s&&++J===m&&(M=x),ne===v&&++ce===c&&(U=x),(oe=fe.nextSibling)!==null)break;fe=ne,ne=fe.parentNode}fe=oe}s=M===-1||U===-1?null:{start:M,end:U}}else s=null}s=s||{start:0,end:0}}else s=null;for(Fp={focusedElem:r,selectionRange:s},Gu=!1,pn=i;pn!==null;)if(i=pn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,pn=r;else for(;pn!==null;){switch(i=pn,v=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.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&&v!==null){r=void 0,s=i,m=v.memoizedProps,v=v.memoizedState,c=s.stateNode;try{var Te=oo(s.type,m);r=c.getSnapshotBeforeUpdate(Te,v),c.__reactInternalSnapshotBeforeUpdate=r}catch(ke){bt(s,s.return,ke)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,s=r.nodeType,s===9)$p(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":$p(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(a(163))}if(r=i.sibling,r!==null){r.return=i.return,pn=r;break}pn=i.return}}function K1(r,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Pa(r,s),c&4&&xl(5,s);break;case 1:if(Pa(r,s),c&4)if(r=s.stateNode,i===null)try{r.componentDidMount()}catch(x){bt(s,s.return,x)}else{var m=oo(s.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(x){bt(s,s.return,x)}}c&64&&V1(s),c&512&&Rl(s,s.return);break;case 3:if(Pa(r,s),c&64&&(r=s.updateQueue,r!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{Iy(r,i)}catch(x){bt(s,s.return,x)}}break;case 27:i===null&&c&4&&q1(s);case 26:case 5:Pa(r,s),i===null&&c&4&&$1(s),c&512&&Rl(s,s.return);break;case 12:Pa(r,s);break;case 31:Pa(r,s),c&4&&Q1(r,s);break;case 13:Pa(r,s),c&4&&X1(r,s),c&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=wA.bind(null,s),HA(r,s))));break;case 22:if(c=s.memoizedState!==null||Da,!c){i=i!==null&&i.memoizedState!==null||Zt,m=Da;var v=Zt;Da=c,(Zt=i)&&!v?ka(r,s,(s.subtreeFlags&8772)!==0):Pa(r,s),Da=m,Zt=v}break;case 30:break;default:Pa(r,s)}}function W1(r){var i=r.alternate;i!==null&&(r.alternate=null,W1(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&Wf(i)),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 Pt=null,$n=!1;function La(r,i,s){for(s=s.child;s!==null;)Z1(r,i,s),s=s.sibling}function Z1(r,i,s){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Gt,s)}catch{}switch(s.tag){case 26:Zt||aa(s,i),La(r,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Zt||aa(s,i);var c=Pt,m=$n;bi(s.type)&&(Pt=s.stateNode,$n=!1),La(r,i,s),Ll(s.stateNode),Pt=c,$n=m;break;case 5:Zt||aa(s,i);case 6:if(c=Pt,m=$n,Pt=null,La(r,i,s),Pt=c,$n=m,Pt!==null)if($n)try{(Pt.nodeType===9?Pt.body:Pt.nodeName==="HTML"?Pt.ownerDocument.body:Pt).removeChild(s.stateNode)}catch(v){bt(s,i,v)}else try{Pt.removeChild(s.stateNode)}catch(v){bt(s,i,v)}break;case 18:Pt!==null&&($n?(r=Pt,Vb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),_s(r)):Vb(Pt,s.stateNode));break;case 4:c=Pt,m=$n,Pt=s.stateNode.containerInfo,$n=!0,La(r,i,s),Pt=c,$n=m;break;case 0:case 11:case 14:case 15:fi(2,s,i),Zt||fi(4,s,i),La(r,i,s);break;case 1:Zt||(aa(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&H1(s,i,c)),La(r,i,s);break;case 21:La(r,i,s);break;case 22:Zt=(c=Zt)||s.memoizedState!==null,La(r,i,s),Zt=c;break;default:La(r,i,s)}}function Q1(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{_s(r)}catch(s){bt(i,i.return,s)}}}function X1(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{_s(r)}catch(s){bt(i,i.return,s)}}function mA(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new Y1),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new Y1),i;default:throw Error(a(435,r.tag))}}function Ru(r,i){var s=mA(r);i.forEach(function(c){if(!s.has(c)){s.add(c);var m=xA.bind(null,r,c);c.then(m,m)}})}function Gn(r,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],v=r,x=i,M=x;e:for(;M!==null;){switch(M.tag){case 27:if(bi(M.type)){Pt=M.stateNode,$n=!1;break e}break;case 5:Pt=M.stateNode,$n=!1;break e;case 3:case 4:Pt=M.stateNode.containerInfo,$n=!0;break e}M=M.return}if(Pt===null)throw Error(a(160));Z1(v,x,m),Pt=null,$n=!1,v=m.alternate,v!==null&&(v.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)J1(i,r),i=i.sibling}var Vr=null;function J1(r,i){var s=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Gn(i,r),qn(r),c&4&&(fi(3,r,r.return),xl(3,r),fi(5,r,r.return));break;case 1:Gn(i,r),qn(r),c&512&&(Zt||s===null||aa(s,s.return)),c&64&&Da&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=Vr;if(Gn(i,r),qn(r),c&512&&(Zt||s===null||aa(s,s.return)),c&4){var v=s!==null?s.memoizedState:null;if(c=r.memoizedState,s===null)if(c===null)if(r.stateNode===null){e:{c=r.type,s=r.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":v=m.getElementsByTagName("title")[0],(!v||v[Xs]||v[En]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=m.createElement(c),m.head.insertBefore(v,m.querySelector("head > title"))),Rn(v,c,s),v[En]=r,hn(v),c=v;break e;case"link":var x=Jb("link","href",m).get(c+(s.href||""));if(x){for(var M=0;M<x.length;M++)if(v=x[M],v.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&v.getAttribute("rel")===(s.rel==null?null:s.rel)&&v.getAttribute("title")===(s.title==null?null:s.title)&&v.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){x.splice(M,1);break t}}v=m.createElement(c),Rn(v,c,s),m.head.appendChild(v);break;case"meta":if(x=Jb("meta","content",m).get(c+(s.content||""))){for(M=0;M<x.length;M++)if(v=x[M],v.getAttribute("content")===(s.content==null?null:""+s.content)&&v.getAttribute("name")===(s.name==null?null:s.name)&&v.getAttribute("property")===(s.property==null?null:s.property)&&v.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&v.getAttribute("charset")===(s.charSet==null?null:s.charSet)){x.splice(M,1);break t}}v=m.createElement(c),Rn(v,c,s),m.head.appendChild(v);break;default:throw Error(a(468,c))}v[En]=r,hn(v),c=v}r.stateNode=c}else e_(m,r.type,r.stateNode);else r.stateNode=Xb(m,c,r.memoizedProps);else v!==c?(v===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):v.count--,c===null?e_(m,r.type,r.stateNode):Xb(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&gp(r,r.memoizedProps,s.memoizedProps)}break;case 27:Gn(i,r),qn(r),c&512&&(Zt||s===null||aa(s,s.return)),s!==null&&c&4&&gp(r,r.memoizedProps,s.memoizedProps);break;case 5:if(Gn(i,r),qn(r),c&512&&(Zt||s===null||aa(s,s.return)),r.flags&32){m=r.stateNode;try{Ho(m,"")}catch(Te){bt(r,r.return,Te)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,gp(r,m,s!==null?s.memoizedProps:m)),c&1024&&(bp=!0);break;case 6:if(Gn(i,r),qn(r),c&4){if(r.stateNode===null)throw Error(a(162));c=r.memoizedProps,s=r.stateNode;try{s.nodeValue=c}catch(Te){bt(r,r.return,Te)}}break;case 3:if(Fu=null,m=Vr,Vr=Bu(i.containerInfo),Gn(i,r),Vr=m,qn(r),c&4&&s!==null&&s.memoizedState.isDehydrated)try{_s(i.containerInfo)}catch(Te){bt(r,r.return,Te)}bp&&(bp=!1,eb(r));break;case 4:c=Vr,Vr=Bu(r.stateNode.containerInfo),Gn(i,r),qn(r),Vr=c;break;case 12:Gn(i,r),qn(r);break;case 31:Gn(i,r),qn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Ru(r,c)));break;case 13:Gn(i,r),qn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Tu=de()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Ru(r,c)));break;case 22:m=r.memoizedState!==null;var U=s!==null&&s.memoizedState!==null,J=Da,ce=Zt;if(Da=J||m,Zt=ce||U,Gn(i,r),Zt=ce,Da=J,qn(r),c&8192)e:for(i=r.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(s===null||U||Da||Zt||so(r)),s=null,i=r;;){if(i.tag===5||i.tag===26){if(s===null){U=s=i;try{if(v=U.stateNode,m)x=v.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{M=U.stateNode;var fe=U.memoizedProps.style,ne=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;M.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(Te){bt(U,U.return,Te)}}}else if(i.tag===6){if(s===null){U=i;try{U.stateNode.nodeValue=m?"":U.memoizedProps}catch(Te){bt(U,U.return,Te)}}}else if(i.tag===18){if(s===null){U=i;try{var oe=U.stateNode;m?Hb(oe,!0):Hb(U.stateNode,!1)}catch(Te){bt(U,U.return,Te)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=r.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,Ru(r,s))));break;case 19:Gn(i,r),qn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Ru(r,c)));break;case 30:break;case 21:break;default:Gn(i,r),qn(r)}}function qn(r){var i=r.flags;if(i&2){try{for(var s,c=r.return;c!==null;){if(G1(c)){s=c;break}c=c.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var m=s.stateNode,v=vp(r);xu(r,v,m);break;case 5:var x=s.stateNode;s.flags&32&&(Ho(x,""),s.flags&=-33);var M=vp(r);xu(r,M,x);break;case 3:case 4:var U=s.stateNode.containerInfo,J=vp(r);yp(r,J,U);break;default:throw Error(a(161))}}catch(ce){bt(r,r.return,ce)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function eb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;eb(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Pa(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)K1(r,i.alternate,i),i=i.sibling}function so(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:fi(4,i,i.return),so(i);break;case 1:aa(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&H1(i,i.return,s),so(i);break;case 27:Ll(i.stateNode);case 26:case 5:aa(i,i.return),so(i);break;case 22:i.memoizedState===null&&so(i);break;case 30:so(i);break;default:so(i)}r=r.sibling}}function ka(r,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=r,v=i,x=v.flags;switch(v.tag){case 0:case 11:case 15:ka(m,v,s),xl(4,v);break;case 1:if(ka(m,v,s),c=v,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(J){bt(c,c.return,J)}if(c=v,m=c.updateQueue,m!==null){var M=c.stateNode;try{var U=m.shared.hiddenCallbacks;if(U!==null)for(m.shared.hiddenCallbacks=null,m=0;m<U.length;m++)Ny(U[m],M)}catch(J){bt(c,c.return,J)}}s&&x&64&&V1(v),Rl(v,v.return);break;case 27:q1(v);case 26:case 5:ka(m,v,s),s&&c===null&&x&4&&$1(v),Rl(v,v.return);break;case 12:ka(m,v,s);break;case 31:ka(m,v,s),s&&x&4&&Q1(m,v);break;case 13:ka(m,v,s),s&&x&4&&X1(m,v);break;case 22:v.memoizedState===null&&ka(m,v,s),Rl(v,v.return);break;case 30:break;default:ka(m,v,s)}i=i.sibling}}function _p(r,i){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&dl(s))}function Ep(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&dl(r))}function Hr(r,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)tb(r,i,s,c),i=i.sibling}function tb(r,i,s,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:Hr(r,i,s,c),m&2048&&xl(9,i);break;case 1:Hr(r,i,s,c);break;case 3:Hr(r,i,s,c),m&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&dl(r)));break;case 12:if(m&2048){Hr(r,i,s,c),r=i.stateNode;try{var v=i.memoizedProps,x=v.id,M=v.onPostCommit;typeof M=="function"&&M(x,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(U){bt(i,i.return,U)}}else Hr(r,i,s,c);break;case 31:Hr(r,i,s,c);break;case 13:Hr(r,i,s,c);break;case 23:break;case 22:v=i.stateNode,x=i.alternate,i.memoizedState!==null?v._visibility&2?Hr(r,i,s,c):Ol(r,i):v._visibility&2?Hr(r,i,s,c):(v._visibility|=2,cs(r,i,s,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&_p(x,i);break;case 24:Hr(r,i,s,c),m&2048&&Ep(i.alternate,i);break;default:Hr(r,i,s,c)}}function cs(r,i,s,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var v=r,x=i,M=s,U=c,J=x.flags;switch(x.tag){case 0:case 11:case 15:cs(v,x,M,U,m),xl(8,x);break;case 23:break;case 22:var ce=x.stateNode;x.memoizedState!==null?ce._visibility&2?cs(v,x,M,U,m):Ol(v,x):(ce._visibility|=2,cs(v,x,M,U,m)),m&&J&2048&&_p(x.alternate,x);break;case 24:cs(v,x,M,U,m),m&&J&2048&&Ep(x.alternate,x);break;default:cs(v,x,M,U,m)}i=i.sibling}}function Ol(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=r,c=i,m=c.flags;switch(c.tag){case 22:Ol(s,c),m&2048&&_p(c.alternate,c);break;case 24:Ol(s,c),m&2048&&Ep(c.alternate,c);break;default:Ol(s,c)}i=i.sibling}}var Tl=8192;function us(r,i,s){if(r.subtreeFlags&Tl)for(r=r.child;r!==null;)nb(r,i,s),r=r.sibling}function nb(r,i,s){switch(r.tag){case 26:us(r,i,s),r.flags&Tl&&r.memoizedState!==null&&tC(s,Vr,r.memoizedState,r.memoizedProps);break;case 5:us(r,i,s);break;case 3:case 4:var c=Vr;Vr=Bu(r.stateNode.containerInfo),us(r,i,s),Vr=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Tl,Tl=16777216,us(r,i,s),Tl=c):us(r,i,s));break;default:us(r,i,s)}}function rb(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function Al(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];pn=c,ib(c,r)}rb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ab(r),r=r.sibling}function ab(r){switch(r.tag){case 0:case 11:case 15:Al(r),r.flags&2048&&fi(9,r,r.return);break;case 3:Al(r);break;case 12:Al(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Ou(r)):Al(r);break;default:Al(r)}}function Ou(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];pn=c,ib(c,r)}rb(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:fi(8,i,i.return),Ou(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Ou(i));break;default:Ou(i)}r=r.sibling}}function ib(r,i){for(;pn!==null;){var s=pn;switch(s.tag){case 0:case 11:case 15:fi(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:dl(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,pn=c;else e:for(s=r;pn!==null;){c=pn;var m=c.sibling,v=c.return;if(W1(c),c===s){pn=null;break e}if(m!==null){m.return=v,pn=m;break e}pn=v}}}var gA={getCacheForType:function(r){var i=wn(Yt),s=i.data.get(r);return s===void 0&&(s=r(),i.data.set(r,s)),s},cacheSignal:function(){return wn(Yt).controller.signal}},vA=typeof WeakMap=="function"?WeakMap:Map,gt=0,Tt=null,nt=null,ot=0,yt=0,sr=null,hi=!1,ds=!1,Sp=!1,ja=0,Bt=0,pi=0,lo=0,wp=0,lr=0,fs=0,Cl=null,Yn=null,xp=!1,Tu=0,ob=0,Au=1/0,Cu=null,mi=null,sn=0,gi=null,hs=null,Ua=0,Rp=0,Op=null,sb=null,Ml=0,Tp=null;function cr(){return(gt&2)!==0&&ot!==0?ot&-ot:k.T!==null?Dp():Yf()}function lb(){if(lr===0)if((ot&536870912)===0||ct){var r=ut;ut<<=1,(ut&3932160)===0&&(ut=262144),lr=r}else lr=536870912;return r=ir.current,r!==null&&(r.flags|=32),lr}function Kn(r,i,s){(r===Tt&&(yt===2||yt===9)||r.cancelPendingCommit!==null)&&(ps(r,0),vi(r,ot,lr,!1)),ht(r,s),((gt&2)===0||r!==Tt)&&(r===Tt&&((gt&2)===0&&(lo|=s),Bt===4&&vi(r,ot,lr,!1)),ia(r))}function cb(r,i,s){if((gt&6)!==0)throw Error(a(327));var c=!s&&(i&127)===0&&(i&r.expiredLanes)===0||We(r,i),m=c?_A(r,i):Cp(r,i,!0),v=c;do{if(m===0){ds&&!c&&vi(r,i,0,!1);break}else{if(s=r.current.alternate,v&&!yA(s)){m=Cp(r,i,!1),v=!1;continue}if(m===2){if(v=i,r.errorRecoveryDisabledLanes&v)var x=0;else x=r.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){i=x;e:{var M=r;m=Cl;var U=M.current.memoizedState.isDehydrated;if(U&&(ps(M,x).flags|=256),x=Cp(M,x,!1),x!==2){if(Sp&&!U){M.errorRecoveryDisabledLanes|=v,lo|=v,m=4;break e}v=Yn,Yn=m,v!==null&&(Yn===null?Yn=v:Yn.push.apply(Yn,v))}m=x}if(v=!1,m!==2)continue}}if(m===1){ps(r,0),vi(r,i,0,!0);break}e:{switch(c=r,v=m,v){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:vi(c,i,lr,!hi);break e;case 2:Yn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(m=Tu+300-de(),10<m)){if(vi(c,i,lr,!hi),Ne(c,0,!0)!==0)break e;Ua=i,c.timeoutHandle=zb(ub.bind(null,c,s,Yn,Cu,xp,i,lr,lo,fs,hi,v,"Throttled",-0,0),m);break e}ub(c,s,Yn,Cu,xp,i,lr,lo,fs,hi,v,null,-0,0)}}break}while(!0);ia(r)}function ub(r,i,s,c,m,v,x,M,U,J,ce,fe,ne,oe){if(r.timeoutHandle=-1,fe=i.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:wa},nb(i,v,fe);var Te=(v&62914560)===v?Tu-de():(v&4194048)===v?ob-de():0;if(Te=nC(fe,Te),Te!==null){Ua=v,r.cancelPendingCommit=Te(yb.bind(null,r,i,v,s,c,m,x,M,U,ce,fe,null,ne,oe)),vi(r,v,x,!J);return}}yb(r,i,v,s,c,m,x,M,U)}function yA(r){for(var i=r;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],v=m.getSnapshot;m=m.value;try{if(!rr(v(),m))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function vi(r,i,s,c){i&=~wp,i&=~lo,r.suspendedLanes|=i,r.pingedLanes&=~i,c&&(r.warmLanes|=i),c=r.expirationTimes;for(var m=i;0<m;){var v=31-qt(m),x=1<<v;c[v]=-1,m&=~x}s!==0&&_r(r,s,i)}function Mu(){return(gt&6)===0?(Nl(0),!1):!0}function Ap(){if(nt!==null){if(yt===0)var r=nt.return;else r=nt,Ta=Ji=null,$h(r),as=null,hl=0,r=nt;for(;r!==null;)F1(r.alternate,r),r=r.return;nt=null}}function ps(r,i){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,UA(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Ua=0,Ap(),Tt=r,nt=s=Ra(r.current,null),ot=i,yt=0,sr=null,hi=!1,ds=We(r,i),Sp=!1,fs=lr=wp=lo=pi=Bt=0,Yn=Cl=null,xp=!1,(i&8)!==0&&(i|=i&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=i;0<c;){var m=31-qt(c),v=1<<m;i|=r[m],c&=~v}return ja=i,Qc(),s}function db(r,i){He=null,k.H=El,i===rs||i===iu?(i=Ty(),yt=3):i===Ih?(i=Ty(),yt=4):yt=i===op?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,sr=i,nt===null&&(Bt=1,bu(r,xr(i,r.current)))}function fb(){var r=ir.current;return r===null?!0:(ot&4194048)===ot?Ar===null:(ot&62914560)===ot||(ot&536870912)!==0?r===Ar:!1}function hb(){var r=k.H;return k.H=El,r===null?El:r}function pb(){var r=k.A;return k.A=gA,r}function Nu(){Bt=4,hi||(ot&4194048)!==ot&&ir.current!==null||(ds=!0),(pi&134217727)===0&&(lo&134217727)===0||Tt===null||vi(Tt,ot,lr,!1)}function Cp(r,i,s){var c=gt;gt|=2;var m=hb(),v=pb();(Tt!==r||ot!==i)&&(Cu=null,ps(r,i)),i=!1;var x=Bt;e:do try{if(yt!==0&&nt!==null){var M=nt,U=sr;switch(yt){case 8:Ap(),x=6;break e;case 3:case 2:case 9:case 6:ir.current===null&&(i=!0);var J=yt;if(yt=0,sr=null,ms(r,M,U,J),s&&ds){x=0;break e}break;default:J=yt,yt=0,sr=null,ms(r,M,U,J)}}bA(),x=Bt;break}catch(ce){db(r,ce)}while(!0);return i&&r.shellSuspendCounter++,Ta=Ji=null,gt=c,k.H=m,k.A=v,nt===null&&(Tt=null,ot=0,Qc()),x}function bA(){for(;nt!==null;)mb(nt)}function _A(r,i){var s=gt;gt|=2;var c=hb(),m=pb();Tt!==r||ot!==i?(Cu=null,Au=de()+500,ps(r,i)):ds=We(r,i);e:do try{if(yt!==0&&nt!==null){i=nt;var v=sr;t:switch(yt){case 1:yt=0,sr=null,ms(r,i,v,1);break;case 2:case 9:if(Ry(v)){yt=0,sr=null,gb(i);break}i=function(){yt!==2&&yt!==9||Tt!==r||(yt=7),ia(r)},v.then(i,i);break e;case 3:yt=7;break e;case 4:yt=5;break e;case 7:Ry(v)?(yt=0,sr=null,gb(i)):(yt=0,sr=null,ms(r,i,v,7));break;case 5:var x=null;switch(nt.tag){case 26:x=nt.memoizedState;case 5:case 27:var M=nt;if(x?t_(x):M.stateNode.complete){yt=0,sr=null;var U=M.sibling;if(U!==null)nt=U;else{var J=M.return;J!==null?(nt=J,Iu(J)):nt=null}break t}}yt=0,sr=null,ms(r,i,v,5);break;case 6:yt=0,sr=null,ms(r,i,v,6);break;case 8:Ap(),Bt=6;break e;default:throw Error(a(462))}}EA();break}catch(ce){db(r,ce)}while(!0);return Ta=Ji=null,k.H=c,k.A=m,gt=s,nt!==null?0:(Tt=null,ot=0,Qc(),Bt)}function EA(){for(;nt!==null&&!q();)mb(nt)}function mb(r){var i=B1(r.alternate,r,ja);r.memoizedProps=r.pendingProps,i===null?Iu(r):nt=i}function gb(r){var i=r,s=i.alternate;switch(i.tag){case 15:case 0:i=D1(s,i,i.pendingProps,i.type,void 0,ot);break;case 11:i=D1(s,i,i.pendingProps,i.type.render,i.ref,ot);break;case 5:$h(i);default:F1(s,i),i=nt=py(i,ja),i=B1(s,i,ja)}r.memoizedProps=r.pendingProps,i===null?Iu(r):nt=i}function ms(r,i,s,c){Ta=Ji=null,$h(i),as=null,hl=0;var m=i.return;try{if(cA(r,m,i,s,ot)){Bt=1,bu(r,xr(s,r.current)),nt=null;return}}catch(v){if(m!==null)throw nt=m,v;Bt=1,bu(r,xr(s,r.current)),nt=null;return}i.flags&32768?(ct||c===1?r=!0:ds||(ot&536870912)!==0?r=!1:(hi=r=!0,(c===2||c===9||c===3||c===6)&&(c=ir.current,c!==null&&c.tag===13&&(c.flags|=16384))),vb(i,r)):Iu(i)}function Iu(r){var i=r;do{if((i.flags&32768)!==0){vb(i,hi);return}r=i.return;var s=fA(i.alternate,i,ja);if(s!==null){nt=s;return}if(i=i.sibling,i!==null){nt=i;return}nt=i=r}while(i!==null);Bt===0&&(Bt=5)}function vb(r,i){do{var s=hA(r.alternate,r);if(s!==null){s.flags&=32767,nt=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(r=r.sibling,r!==null)){nt=r;return}nt=r=s}while(r!==null);Bt=6,nt=null}function yb(r,i,s,c,m,v,x,M,U){r.cancelPendingCommit=null;do Du();while(sn!==0);if((gt&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(v=i.lanes|i.childLanes,v|=vh,Nt(r,s,v,x,M,U),r===Tt&&(nt=Tt=null,ot=0),hs=i,gi=r,Ua=s,Rp=v,Op=m,sb=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,RA(Fe,function(){return wb(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=k.T,k.T=null,m=F.p,F.p=2,x=gt,gt|=4;try{pA(r,i,s)}finally{gt=x,F.p=m,k.T=c}}sn=1,bb(),_b(),Eb()}}function bb(){if(sn===1){sn=0;var r=gi,i=hs,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=k.T,k.T=null;var c=F.p;F.p=2;var m=gt;gt|=4;try{J1(i,r);var v=Fp,x=iy(r.containerInfo),M=v.focusedElem,U=v.selectionRange;if(x!==M&&M&&M.ownerDocument&&ay(M.ownerDocument.documentElement,M)){if(U!==null&&fh(M)){var J=U.start,ce=U.end;if(ce===void 0&&(ce=J),"selectionStart"in M)M.selectionStart=J,M.selectionEnd=Math.min(ce,M.value.length);else{var fe=M.ownerDocument||document,ne=fe&&fe.defaultView||window;if(ne.getSelection){var oe=ne.getSelection(),Te=M.textContent.length,ke=Math.min(U.start,Te),xt=U.end===void 0?ke:Math.min(U.end,Te);!oe.extend&&ke>xt&&(x=xt,xt=ke,ke=x);var K=ry(M,ke),$=ry(M,xt);if(K&&$&&(oe.rangeCount!==1||oe.anchorNode!==K.node||oe.anchorOffset!==K.offset||oe.focusNode!==$.node||oe.focusOffset!==$.offset)){var X=fe.createRange();X.setStart(K.node,K.offset),oe.removeAllRanges(),ke>xt?(oe.addRange(X),oe.extend($.node,$.offset)):(X.setEnd($.node,$.offset),oe.addRange(X))}}}}for(fe=[],oe=M;oe=oe.parentNode;)oe.nodeType===1&&fe.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<fe.length;M++){var ue=fe[M];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Gu=!!zp,Fp=zp=null}finally{gt=m,F.p=c,k.T=s}}r.current=i,sn=2}}function _b(){if(sn===2){sn=0;var r=gi,i=hs,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=k.T,k.T=null;var c=F.p;F.p=2;var m=gt;gt|=4;try{K1(r,i.alternate,i)}finally{gt=m,F.p=c,k.T=s}}sn=3}}function Eb(){if(sn===4||sn===3){sn=0,W();var r=gi,i=hs,s=Ua,c=sb;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?sn=5:(sn=0,hs=gi=null,Sb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(mi=null),zr(s),i=i.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Gt,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=k.T,m=F.p,F.p=2,k.T=null;try{for(var v=r.onRecoverableError,x=0;x<c.length;x++){var M=c[x];v(M.value,{componentStack:M.stack})}}finally{k.T=i,F.p=m}}(Ua&3)!==0&&Du(),ia(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===Tp?Ml++:(Ml=0,Tp=r):Ml=0,Nl(0)}}function Sb(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,dl(i)))}function Du(){return bb(),_b(),Eb(),wb()}function wb(){if(sn!==5)return!1;var r=gi,i=Rp;Rp=0;var s=zr(Ua),c=k.T,m=F.p;try{F.p=32>s?32:s,k.T=null,s=Op,Op=null;var v=gi,x=Ua;if(sn=0,hs=gi=null,Ua=0,(gt&6)!==0)throw Error(a(331));var M=gt;if(gt|=4,ab(v.current),tb(v,v.current,x,s),gt=M,Nl(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Gt,v)}catch{}return!0}finally{F.p=m,k.T=c,Sb(r,i)}}function xb(r,i,s){i=xr(s,i),i=ip(r.stateNode,i,2),r=ci(r,i,2),r!==null&&(ht(r,2),ia(r))}function bt(r,i,s){if(r.tag===3)xb(r,r,s);else for(;i!==null;){if(i.tag===3){xb(i,r,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(mi===null||!mi.has(c))){r=xr(s,r),s=R1(2),c=ci(i,s,2),c!==null&&(O1(s,c,i,r),ht(c,2),ia(c));break}}i=i.return}}function Mp(r,i,s){var c=r.pingCache;if(c===null){c=r.pingCache=new vA;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(s)||(Sp=!0,m.add(s),r=SA.bind(null,r,i,s),i.then(r,r))}function SA(r,i,s){var c=r.pingCache;c!==null&&c.delete(i),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,Tt===r&&(ot&s)===s&&(Bt===4||Bt===3&&(ot&62914560)===ot&&300>de()-Tu?(gt&2)===0&&ps(r,0):wp|=s,fs===ot&&(fs=0)),ia(r)}function Rb(r,i){i===0&&(i=Et()),r=Zi(r,i),r!==null&&(ht(r,i),ia(r))}function wA(r){var i=r.memoizedState,s=0;i!==null&&(s=i.retryLane),Rb(r,s)}function xA(r,i){var s=0;switch(r.tag){case 31:case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),Rb(r,s)}function RA(r,i){return et(r,i)}var Lu=null,gs=null,Np=!1,Pu=!1,Ip=!1,yi=0;function ia(r){r!==gs&&r.next===null&&(gs===null?Lu=gs=r:gs=gs.next=r),Pu=!0,Np||(Np=!0,TA())}function Nl(r,i){if(!Ip&&Pu){Ip=!0;do for(var s=!1,c=Lu;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var v=0;else{var x=c.suspendedLanes,M=c.pingedLanes;v=(1<<31-qt(42|r)+1)-1,v&=m&~(x&~M),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(s=!0,Cb(c,v))}else v=ot,v=Ne(c,c===Tt?v:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(v&3)===0||We(c,v)||(s=!0,Cb(c,v));c=c.next}while(s);Ip=!1}}function OA(){Ob()}function Ob(){Pu=Np=!1;var r=0;yi!==0&&jA()&&(r=yi);for(var i=de(),s=null,c=Lu;c!==null;){var m=c.next,v=Tb(c,i);v===0?(c.next=null,s===null?Lu=m:s.next=m,m===null&&(gs=s)):(s=c,(r!==0||(v&3)!==0)&&(Pu=!0)),c=m}sn!==0&&sn!==5||Nl(r),yi!==0&&(yi=0)}function Tb(r,i){for(var s=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var x=31-qt(v),M=1<<x,U=m[x];U===-1?((M&s)===0||(M&c)!==0)&&(m[x]=Ot(M,i)):U<=i&&(r.expiredLanes|=M),v&=~M}if(i=Tt,s=ot,s=Ne(r,r===i?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,s===0||r===i&&(yt===2||yt===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&j(c),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||We(r,s)){if(i=s&-s,i===r.callbackPriority)return i;switch(c!==null&&j(c),zr(s)){case 2:case 8:s=Re;break;case 32:s=Fe;break;case 268435456:s=Rt;break;default:s=Fe}return c=Ab.bind(null,r),s=et(s,c),r.callbackPriority=i,r.callbackNode=s,i}return c!==null&&c!==null&&j(c),r.callbackPriority=2,r.callbackNode=null,2}function Ab(r,i){if(sn!==0&&sn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Du()&&r.callbackNode!==s)return null;var c=ot;return c=Ne(r,r===Tt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(cb(r,c,i),Tb(r,de()),r.callbackNode!=null&&r.callbackNode===s?Ab.bind(null,r):null)}function Cb(r,i){if(Du())return null;cb(r,i,!0)}function TA(){BA(function(){(gt&6)!==0?et(he,OA):Ob()})}function Dp(){if(yi===0){var r=ts;r===0&&(r=it,it<<=1,(it&261888)===0&&(it=256)),yi=r}return yi}function Mb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Hc(""+r)}function Nb(r,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,r.id&&s.setAttribute("form",r.id),i.parentNode.insertBefore(s,i),r=new FormData(r),s.parentNode.removeChild(s),r}function AA(r,i,s,c,m){if(i==="submit"&&s&&s.stateNode===m){var v=Mb((m[Vn]||null).action),x=c.submitter;x&&(i=(i=x[Vn]||null)?Mb(i.formAction):x.getAttribute("formAction"),i!==null&&(v=i,x=null));var M=new Yc("action","action",null,c,m);r.push({event:M,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(yi!==0){var U=x?Nb(m,x):new FormData(m);Jh(s,{pending:!0,data:U,method:m.method,action:v},null,U)}}else typeof v=="function"&&(M.preventDefault(),U=x?Nb(m,x):new FormData(m),Jh(s,{pending:!0,data:U,method:m.method,action:v},v,U))},currentTarget:m}]})}}for(var Lp=0;Lp<gh.length;Lp++){var Pp=gh[Lp],CA=Pp.toLowerCase(),MA=Pp[0].toUpperCase()+Pp.slice(1);Fr(CA,"on"+MA)}Fr(ly,"onAnimationEnd"),Fr(cy,"onAnimationIteration"),Fr(uy,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(qT,"onTransitionRun"),Fr(YT,"onTransitionStart"),Fr(KT,"onTransitionCancel"),Fr(dy,"onTransitionEnd"),Fo("onMouseEnter",["mouseout","mouseover"]),Fo("onMouseLeave",["mouseout","mouseover"]),Fo("onPointerEnter",["pointerout","pointerover"]),Fo("onPointerLeave",["pointerout","pointerover"]),qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qi("onBeforeInput",["compositionend","keypress","textInput","paste"]),qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Il="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(" "),NA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Il));function Ib(r,i){i=(i&4)!==0;for(var s=0;s<r.length;s++){var c=r[s],m=c.event;c=c.listeners;e:{var v=void 0;if(i)for(var x=c.length-1;0<=x;x--){var M=c[x],U=M.instance,J=M.currentTarget;if(M=M.listener,U!==v&&m.isPropagationStopped())break e;v=M,m.currentTarget=J;try{v(m)}catch(ce){Zc(ce)}m.currentTarget=null,v=U}else for(x=0;x<c.length;x++){if(M=c[x],U=M.instance,J=M.currentTarget,M=M.listener,U!==v&&m.isPropagationStopped())break e;v=M,m.currentTarget=J;try{v(m)}catch(ce){Zc(ce)}m.currentTarget=null,v=U}}}}function rt(r,i){var s=i[Kf];s===void 0&&(s=i[Kf]=new Set);var c=r+"__bubble";s.has(c)||(Db(i,r,2,!1),s.add(c))}function kp(r,i,s){var c=0;i&&(c|=4),Db(s,r,c,i)}var ku="_reactListening"+Math.random().toString(36).slice(2);function jp(r){if(!r[ku]){r[ku]=!0,O0.forEach(function(s){s!=="selectionchange"&&(NA.has(s)||kp(s,!1,r),kp(s,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[ku]||(i[ku]=!0,kp("selectionchange",!1,i))}}function Db(r,i,s,c){switch(l_(i)){case 2:var m=iC;break;case 8:m=oC;break;default:m=Xp}s=m.bind(null,i,s,r),m=void 0,!rh||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(i,s,{capture:!0,passive:m}):r.addEventListener(i,s,!0):m!==void 0?r.addEventListener(i,s,{passive:m}):r.addEventListener(i,s,!1)}function Up(r,i,s,c,m){var v=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var x=c.tag;if(x===3||x===4){var M=c.stateNode.containerInfo;if(M===m)break;if(x===4)for(x=c.return;x!==null;){var U=x.tag;if((U===3||U===4)&&x.stateNode.containerInfo===m)return;x=x.return}for(;M!==null;){if(x=Uo(M),x===null)return;if(U=x.tag,U===5||U===6||U===26||U===27){c=v=x;continue e}M=M.parentNode}}c=c.return}U0(function(){var J=v,ce=th(s),fe=[];e:{var ne=fy.get(r);if(ne!==void 0){var oe=Yc,Te=r;switch(r){case"keypress":if(Gc(s)===0)break e;case"keydown":case"keyup":oe=xT;break;case"focusin":Te="focus",oe=sh;break;case"focusout":Te="blur",oe=sh;break;case"beforeblur":case"afterblur":oe=sh;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=F0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=fT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=TT;break;case ly:case cy:case uy:oe=mT;break;case dy:oe=CT;break;case"scroll":case"scrollend":oe=uT;break;case"wheel":oe=NT;break;case"copy":case"cut":case"paste":oe=vT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=H0;break;case"toggle":case"beforetoggle":oe=DT}var ke=(i&4)!==0,xt=!ke&&(r==="scroll"||r==="scrollend"),K=ke?ne!==null?ne+"Capture":null:ne;ke=[];for(var $=J,X;$!==null;){var ue=$;if(X=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||X===null||K===null||(ue=el($,K),ue!=null&&ke.push(Dl($,ue,X))),xt)break;$=$.return}0<ke.length&&(ne=new oe(ne,Te,null,s,ce),fe.push({event:ne,listeners:ke}))}}if((i&7)===0){e:{if(ne=r==="mouseover"||r==="pointerover",oe=r==="mouseout"||r==="pointerout",ne&&s!==eh&&(Te=s.relatedTarget||s.fromElement)&&(Uo(Te)||Te[jo]))break e;if((oe||ne)&&(ne=ce.window===ce?ce:(ne=ce.ownerDocument)?ne.defaultView||ne.parentWindow:window,oe?(Te=s.relatedTarget||s.toElement,oe=J,Te=Te?Uo(Te):null,Te!==null&&(xt=l(Te),ke=Te.tag,Te!==xt||ke!==5&&ke!==27&&ke!==6)&&(Te=null)):(oe=null,Te=J),oe!==Te)){if(ke=F0,ue="onMouseLeave",K="onMouseEnter",$="mouse",(r==="pointerout"||r==="pointerover")&&(ke=H0,ue="onPointerLeave",K="onPointerEnter",$="pointer"),xt=oe==null?ne:Js(oe),X=Te==null?ne:Js(Te),ne=new ke(ue,$+"leave",oe,s,ce),ne.target=xt,ne.relatedTarget=X,ue=null,Uo(ce)===J&&(ke=new ke(K,$+"enter",Te,s,ce),ke.target=X,ke.relatedTarget=xt,ue=ke),xt=ue,oe&&Te)t:{for(ke=IA,K=oe,$=Te,X=0,ue=K;ue;ue=ke(ue))X++;ue=0;for(var Pe=$;Pe;Pe=ke(Pe))ue++;for(;0<X-ue;)K=ke(K),X--;for(;0<ue-X;)$=ke($),ue--;for(;X--;){if(K===$||$!==null&&K===$.alternate){ke=K;break t}K=ke(K),$=ke($)}ke=null}else ke=null;oe!==null&&Lb(fe,ne,oe,ke,!1),Te!==null&&xt!==null&&Lb(fe,xt,Te,ke,!0)}}e:{if(ne=J?Js(J):window,oe=ne.nodeName&&ne.nodeName.toLowerCase(),oe==="select"||oe==="input"&&ne.type==="file")var pt=Q0;else if(W0(ne))if(X0)pt=HT;else{pt=FT;var Ie=zT}else oe=ne.nodeName,!oe||oe.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?J&&Jf(J.elementType)&&(pt=Q0):pt=VT;if(pt&&(pt=pt(r,J))){Z0(fe,pt,s,ce);break e}Ie&&Ie(r,ne,J),r==="focusout"&&J&&ne.type==="number"&&J.memoizedProps.value!=null&&Xf(ne,"number",ne.value)}switch(Ie=J?Js(J):window,r){case"focusin":(W0(Ie)||Ie.contentEditable==="true")&&(Yo=Ie,hh=J,ll=null);break;case"focusout":ll=hh=Yo=null;break;case"mousedown":ph=!0;break;case"contextmenu":case"mouseup":case"dragend":ph=!1,oy(fe,s,ce);break;case"selectionchange":if(GT)break;case"keydown":case"keyup":oy(fe,s,ce)}var $e;if(ch)e:{switch(r){case"compositionstart":var st="onCompositionStart";break e;case"compositionend":st="onCompositionEnd";break e;case"compositionupdate":st="onCompositionUpdate";break e}st=void 0}else qo?Y0(r,s)&&(st="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(st="onCompositionStart");st&&($0&&s.locale!=="ko"&&(qo||st!=="onCompositionStart"?st==="onCompositionEnd"&&qo&&($e=B0()):(ni=ce,ah="value"in ni?ni.value:ni.textContent,qo=!0)),Ie=ju(J,st),0<Ie.length&&(st=new V0(st,r,null,s,ce),fe.push({event:st,listeners:Ie}),$e?st.data=$e:($e=K0(s),$e!==null&&(st.data=$e)))),($e=PT?kT(r,s):jT(r,s))&&(st=ju(J,"onBeforeInput"),0<st.length&&(Ie=new V0("onBeforeInput","beforeinput",null,s,ce),fe.push({event:Ie,listeners:st}),Ie.data=$e)),AA(fe,r,J,s,ce)}Ib(fe,i)})}function Dl(r,i,s){return{instance:r,listener:i,currentTarget:s}}function ju(r,i){for(var s=i+"Capture",c=[];r!==null;){var m=r,v=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||v===null||(m=el(r,s),m!=null&&c.unshift(Dl(r,m,v)),m=el(r,i),m!=null&&c.push(Dl(r,m,v))),r.tag===3)return c;r=r.return}return[]}function IA(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Lb(r,i,s,c,m){for(var v=i._reactName,x=[];s!==null&&s!==c;){var M=s,U=M.alternate,J=M.stateNode;if(M=M.tag,U!==null&&U===c)break;M!==5&&M!==26&&M!==27||J===null||(U=J,m?(J=el(s,v),J!=null&&x.unshift(Dl(s,J,U))):m||(J=el(s,v),J!=null&&x.push(Dl(s,J,U)))),s=s.return}x.length!==0&&r.push({event:i,listeners:x})}var DA=/\r\n?/g,LA=/\u0000|\uFFFD/g;function Pb(r){return(typeof r=="string"?r:""+r).replace(DA,`
|
|
10
|
-
`).replace(LA,"")}function kb(r,i){return i=Pb(i),Pb(r)===i}function wt(r,i,s,c,m,v){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Ho(r,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Ho(r,""+c);break;case"className":Fc(r,"class",c);break;case"tabIndex":Fc(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Fc(r,s,c);break;case"style":k0(r,c,v);break;case"data":if(i!=="object"){Fc(r,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){r.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Hc(""+c),r.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="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 v=="function"&&(s==="formAction"?(i!=="input"&&wt(r,i,"name",m.name,m,null),wt(r,i,"formEncType",m.formEncType,m,null),wt(r,i,"formMethod",m.formMethod,m,null),wt(r,i,"formTarget",m.formTarget,m,null)):(wt(r,i,"encType",m.encType,m,null),wt(r,i,"method",m.method,m,null),wt(r,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Hc(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=wa);break;case"onScroll":c!=null&&rt("scroll",r);break;case"onScrollEnd":c!=null&&rt("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}s=Hc(""+c),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":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""+c):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":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":c===!0?r.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,c):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(s,c):r.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(s):r.setAttribute(s,c);break;case"popover":rt("beforetoggle",r),rt("toggle",r),zc(r,"popover",c);break;case"xlinkActuate":Sa(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Sa(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Sa(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Sa(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Sa(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Sa(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Sa(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Sa(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Sa(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":zc(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=lT.get(s)||s,zc(r,s,c))}}function Bp(r,i,s,c,m,v){switch(s){case"style":k0(r,c,v);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"children":typeof c=="string"?Ho(r,c):(typeof c=="number"||typeof c=="bigint")&&Ho(r,""+c);break;case"onScroll":c!=null&&rt("scroll",r);break;case"onScrollEnd":c!=null&&rt("scrollend",r);break;case"onClick":c!=null&&(r.onclick=wa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!T0.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),i=s.slice(2,m?s.length-7:void 0),v=r[Vn]||null,v=v!=null?v[s]:null,typeof v=="function"&&r.removeEventListener(i,v,m),typeof c=="function")){typeof v!="function"&&v!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(i,c,m);break e}s in r?r[s]=c:c===!0?r.setAttribute(s,""):zc(r,s,c)}}}function Rn(r,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",r),rt("load",r);var c=!1,m=!1,v;for(v in s)if(s.hasOwnProperty(v)){var x=s[v];if(x!=null)switch(v){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:wt(r,i,v,x,s,null)}}m&&wt(r,i,"srcSet",s.srcSet,s,null),c&&wt(r,i,"src",s.src,s,null);return;case"input":rt("invalid",r);var M=v=x=m=null,U=null,J=null;for(c in s)if(s.hasOwnProperty(c)){var ce=s[c];if(ce!=null)switch(c){case"name":m=ce;break;case"type":x=ce;break;case"checked":U=ce;break;case"defaultChecked":J=ce;break;case"value":v=ce;break;case"defaultValue":M=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(a(137,i));break;default:wt(r,i,c,ce,s,null)}}I0(r,v,M,U,J,x,m,!1);return;case"select":rt("invalid",r),c=x=v=null;for(m in s)if(s.hasOwnProperty(m)&&(M=s[m],M!=null))switch(m){case"value":v=M;break;case"defaultValue":x=M;break;case"multiple":c=M;default:wt(r,i,m,M,s,null)}i=v,s=x,r.multiple=!!c,i!=null?Vo(r,!!c,i,!1):s!=null&&Vo(r,!!c,s,!0);return;case"textarea":rt("invalid",r),v=m=c=null;for(x in s)if(s.hasOwnProperty(x)&&(M=s[x],M!=null))switch(x){case"value":c=M;break;case"defaultValue":m=M;break;case"children":v=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(a(91));break;default:wt(r,i,x,M,s,null)}L0(r,c,m,v);return;case"option":for(U in s)s.hasOwnProperty(U)&&(c=s[U],c!=null)&&(U==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":wt(r,i,U,c,s,null));return;case"dialog":rt("beforetoggle",r),rt("toggle",r),rt("cancel",r),rt("close",r);break;case"iframe":case"object":rt("load",r);break;case"video":case"audio":for(c=0;c<Il.length;c++)rt(Il[c],r);break;case"image":rt("error",r),rt("load",r);break;case"details":rt("toggle",r);break;case"embed":case"source":case"link":rt("error",r),rt("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)&&(c=s[J],c!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:wt(r,i,J,c,s,null)}return;default:if(Jf(i)){for(ce in s)s.hasOwnProperty(ce)&&(c=s[ce],c!==void 0&&Bp(r,i,ce,c,s,void 0));return}}for(M in s)s.hasOwnProperty(M)&&(c=s[M],c!=null&&wt(r,i,M,c,s,null))}function PA(r,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,v=null,x=null,M=null,U=null,J=null,ce=null;for(oe in s){var fe=s[oe];if(s.hasOwnProperty(oe)&&fe!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":U=fe;default:c.hasOwnProperty(oe)||wt(r,i,oe,null,c,fe)}}for(var ne in c){var oe=c[ne];if(fe=s[ne],c.hasOwnProperty(ne)&&(oe!=null||fe!=null))switch(ne){case"type":v=oe;break;case"name":m=oe;break;case"checked":J=oe;break;case"defaultChecked":ce=oe;break;case"value":x=oe;break;case"defaultValue":M=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,i));break;default:oe!==fe&&wt(r,i,ne,oe,c,fe)}}Qf(r,x,M,U,J,ce,v,m);return;case"select":oe=x=M=ne=null;for(v in s)if(U=s[v],s.hasOwnProperty(v)&&U!=null)switch(v){case"value":break;case"multiple":oe=U;default:c.hasOwnProperty(v)||wt(r,i,v,null,c,U)}for(m in c)if(v=c[m],U=s[m],c.hasOwnProperty(m)&&(v!=null||U!=null))switch(m){case"value":ne=v;break;case"defaultValue":M=v;break;case"multiple":x=v;default:v!==U&&wt(r,i,m,v,c,U)}i=M,s=x,c=oe,ne!=null?Vo(r,!!s,ne,!1):!!c!=!!s&&(i!=null?Vo(r,!!s,i,!0):Vo(r,!!s,s?[]:"",!1));return;case"textarea":oe=ne=null;for(M in s)if(m=s[M],s.hasOwnProperty(M)&&m!=null&&!c.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:wt(r,i,M,null,c,m)}for(x in c)if(m=c[x],v=s[x],c.hasOwnProperty(x)&&(m!=null||v!=null))switch(x){case"value":ne=m;break;case"defaultValue":oe=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==v&&wt(r,i,x,m,c,v)}D0(r,ne,oe);return;case"option":for(var Te in s)ne=s[Te],s.hasOwnProperty(Te)&&ne!=null&&!c.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:wt(r,i,Te,null,c,ne));for(U in c)ne=c[U],oe=s[U],c.hasOwnProperty(U)&&ne!==oe&&(ne!=null||oe!=null)&&(U==="selected"?r.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":wt(r,i,U,ne,c,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 ke in s)ne=s[ke],s.hasOwnProperty(ke)&&ne!=null&&!c.hasOwnProperty(ke)&&wt(r,i,ke,null,c,ne);for(J in c)if(ne=c[J],oe=s[J],c.hasOwnProperty(J)&&ne!==oe&&(ne!=null||oe!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(a(137,i));break;default:wt(r,i,J,ne,c,oe)}return;default:if(Jf(i)){for(var xt in s)ne=s[xt],s.hasOwnProperty(xt)&&ne!==void 0&&!c.hasOwnProperty(xt)&&Bp(r,i,xt,void 0,c,ne);for(ce in c)ne=c[ce],oe=s[ce],!c.hasOwnProperty(ce)||ne===oe||ne===void 0&&oe===void 0||Bp(r,i,ce,ne,c,oe);return}}for(var K in s)ne=s[K],s.hasOwnProperty(K)&&ne!=null&&!c.hasOwnProperty(K)&&wt(r,i,K,null,c,ne);for(fe in c)ne=c[fe],oe=s[fe],!c.hasOwnProperty(fe)||ne===oe||ne==null&&oe==null||wt(r,i,fe,ne,c,oe)}function jb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kA(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],v=m.transferSize,x=m.initiatorType,M=m.duration;if(v&&M&&jb(x)){for(x=0,M=m.responseEnd,c+=1;c<s.length;c++){var U=s[c],J=U.startTime;if(J>M)break;var ce=U.transferSize,fe=U.initiatorType;ce&&jb(fe)&&(U=U.responseEnd,x+=ce*(U<M?1:(M-J)/(U-J)))}if(--c,i+=8*(v+x)/(m.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var zp=null,Fp=null;function Uu(r){return r.nodeType===9?r:r.ownerDocument}function Ub(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 Bb(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function Vp(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Hp=null;function jA(){var r=window.event;return r&&r.type==="popstate"?r===Hp?!1:(Hp=r,!0):(Hp=null,!1)}var zb=typeof setTimeout=="function"?setTimeout:void 0,UA=typeof clearTimeout=="function"?clearTimeout:void 0,Fb=typeof Promise=="function"?Promise:void 0,BA=typeof queueMicrotask=="function"?queueMicrotask:typeof Fb<"u"?function(r){return Fb.resolve(null).then(r).catch(zA)}:zb;function zA(r){setTimeout(function(){throw r})}function bi(r){return r==="head"}function Vb(r,i){var s=i,c=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){r.removeChild(m),_s(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Ll(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Ll(s);for(var v=s.firstChild;v;){var x=v.nextSibling,M=v.nodeName;v[Xs]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=x}}else s==="body"&&Ll(r.ownerDocument.body);s=m}while(s);_s(i)}function Hb(r,i){var s=r;r=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=c}while(s)}function $p(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":$p(s),Wf(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function FA(r,i,s,c){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Xs])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==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(v=r.getAttribute("src"),(v!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var v=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=Cr(r.nextSibling),r===null)break}return null}function VA(r,i,s){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Cr(r.nextSibling),r===null))return null;return r}function $b(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Cr(r.nextSibling),r===null))return null;return r}function Gp(r){return r.data==="$?"||r.data==="$~"}function qp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function HA(r,i){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function Cr(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var Yp=null;function Gb(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(i===0)return Cr(r.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}r=r.nextSibling}return null}function qb(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return r;i--}else s!=="/$"&&s!=="/&"||i++}r=r.previousSibling}return null}function Yb(r,i,s){switch(i=Uu(s),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ll(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Wf(r)}var Mr=new Map,Kb=new Set;function Bu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ba=F.d;F.d={f:$A,r:GA,D:qA,C:YA,L:KA,m:WA,X:QA,S:ZA,M:XA};function $A(){var r=Ba.f(),i=Mu();return r||i}function GA(r){var i=Bo(r);i!==null&&i.tag===5&&i.type==="form"?d1(i):Ba.r(r)}var vs=typeof document>"u"?null:document;function Wb(r,i,s){var c=vs;if(c&&typeof i=="string"&&i){var m=Sr(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Kb.has(m)||(Kb.add(m),r={rel:r,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),Rn(i,"link",r),hn(i),c.head.appendChild(i)))}}function qA(r){Ba.D(r),Wb("dns-prefetch",r,null)}function YA(r,i){Ba.C(r,i),Wb("preconnect",r,i)}function KA(r,i,s){Ba.L(r,i,s);var c=vs;if(c&&r&&i){var m='link[rel="preload"][as="'+Sr(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Sr(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Sr(s.imageSizes)+'"]')):m+='[href="'+Sr(r)+'"]';var v=m;switch(i){case"style":v=ys(r);break;case"script":v=bs(r)}Mr.has(v)||(r=p({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:r,as:i},s),Mr.set(v,r),c.querySelector(m)!==null||i==="style"&&c.querySelector(Pl(v))||i==="script"&&c.querySelector(kl(v))||(i=c.createElement("link"),Rn(i,"link",r),hn(i),c.head.appendChild(i)))}}function WA(r,i){Ba.m(r,i);var s=vs;if(s&&r){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Sr(c)+'"][href="'+Sr(r)+'"]',v=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=bs(r)}if(!Mr.has(v)&&(r=p({rel:"modulepreload",href:r},i),Mr.set(v,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(kl(v)))return}c=s.createElement("link"),Rn(c,"link",r),hn(c),s.head.appendChild(c)}}}function ZA(r,i,s){Ba.S(r,i,s);var c=vs;if(c&&r){var m=zo(c).hoistableStyles,v=ys(r);i=i||"default";var x=m.get(v);if(!x){var M={loading:0,preload:null};if(x=c.querySelector(Pl(v)))M.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":i},s),(s=Mr.get(v))&&Kp(r,s);var U=x=c.createElement("link");hn(U),Rn(U,"link",r),U._p=new Promise(function(J,ce){U.onload=J,U.onerror=ce}),U.addEventListener("load",function(){M.loading|=1}),U.addEventListener("error",function(){M.loading|=2}),M.loading|=4,zu(x,i,c)}x={type:"stylesheet",instance:x,count:1,state:M},m.set(v,x)}}}function QA(r,i){Ba.X(r,i);var s=vs;if(s&&r){var c=zo(s).hoistableScripts,m=bs(r),v=c.get(m);v||(v=s.querySelector(kl(m)),v||(r=p({src:r,async:!0},i),(i=Mr.get(m))&&Wp(r,i),v=s.createElement("script"),hn(v),Rn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function XA(r,i){Ba.M(r,i);var s=vs;if(s&&r){var c=zo(s).hoistableScripts,m=bs(r),v=c.get(m);v||(v=s.querySelector(kl(m)),v||(r=p({src:r,async:!0,type:"module"},i),(i=Mr.get(m))&&Wp(r,i),v=s.createElement("script"),hn(v),Rn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function Zb(r,i,s,c){var m=(m=_e.current)?Bu(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=ys(s.href),s=zo(m).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=ys(s.href);var v=zo(m).hoistableStyles,x=v.get(r);if(x||(m=m.ownerDocument||m,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,x),(v=m.querySelector(Pl(r)))&&!v._p&&(x.instance=v,x.state.loading=5),Mr.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},Mr.set(r,s),v||JA(m,r,s,x.state))),i&&c===null)throw Error(a(528,""));return x}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=bs(s),s=zo(m).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function ys(r){return'href="'+Sr(r)+'"'}function Pl(r){return'link[rel="stylesheet"]['+r+"]"}function Qb(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function JA(r,i,s,c){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=r.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Rn(i,"link",s),hn(i),r.head.appendChild(i))}function bs(r){return'[src="'+Sr(r)+'"]'}function kl(r){return"script[async]"+r}function Xb(r,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=r.querySelector('style[data-href~="'+Sr(s.href)+'"]');if(c)return i.instance=c,hn(c),c;var m=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),hn(c),Rn(c,"style",m),zu(c,s.precedence,r),i.instance=c;case"stylesheet":m=ys(s.href);var v=r.querySelector(Pl(m));if(v)return i.state.loading|=4,i.instance=v,hn(v),v;c=Qb(s),(m=Mr.get(m))&&Kp(c,m),v=(r.ownerDocument||r).createElement("link"),hn(v);var x=v;return x._p=new Promise(function(M,U){x.onload=M,x.onerror=U}),Rn(v,"link",c),i.state.loading|=4,zu(v,s.precedence,r),i.instance=v;case"script":return v=bs(s.src),(m=r.querySelector(kl(v)))?(i.instance=m,hn(m),m):(c=s,(m=Mr.get(v))&&(c=p({},s),Wp(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),hn(m),Rn(m,"link",c),r.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,zu(c,s.precedence,r));return i.instance}function zu(r,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,v=m,x=0;x<c.length;x++){var M=c[x];if(M.dataset.precedence===i)v=M;else if(v!==m)break}v?v.parentNode.insertBefore(r,v.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(r,i.firstChild))}function Kp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function Wp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Fu=null;function Jb(r,i,s){if(Fu===null){var c=new Map,m=Fu=new Map;m.set(s,c)}else m=Fu,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(r))return c;for(c.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var v=s[m];if(!(v[Xs]||v[En]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var x=v.getAttribute(i)||"";x=r+x;var M=c.get(x);M?M.push(v):c.set(x,[v])}}return c}function e_(r,i,s){r=r.ownerDocument||r,r.head.insertBefore(s,i==="title"?r.querySelector("head > title"):null)}function eC(r,i,s){if(s===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(r=i.disabled,typeof i.precedence=="string"&&r==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function t_(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function tC(r,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=ys(c.href),v=i.querySelector(Pl(m));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Vu.bind(r),i.then(r,r)),s.state.loading|=4,s.instance=v,hn(v);return}v=i.ownerDocument||i,c=Qb(c),(m=Mr.get(m))&&Kp(c,m),v=v.createElement("link"),hn(v);var x=v;x._p=new Promise(function(M,U){x.onload=M,x.onerror=U}),Rn(v,"link",c),s.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Vu.bind(r),i.addEventListener("load",s),i.addEventListener("error",s))}}var Zp=0;function nC(r,i){return r.stylesheets&&r.count===0&&$u(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&$u(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+i);0<r.imgBytes&&Zp===0&&(Zp=62500*kA());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&$u(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>Zp?50:800)+i);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Vu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$u(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Hu=null;function $u(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Hu=new Map,i.forEach(rC,r),Hu=null,Vu.call(r))}function rC(r,i){if(!(i.state.loading&4)){var s=Hu.get(r);if(s)var c=s.get(null);else{s=new Map,Hu.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<m.length;v++){var x=m[v];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(s.set(x.dataset.precedence,x),c=x)}c&&s.set(null,c)}m=i.instance,x=m.getAttribute("data-precedence"),v=s.get(x)||c,v===c&&s.set(null,m),s.set(x,m),this.count++,c=Vu.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),v?v.parentNode.insertBefore(m,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var jl={$$typeof:C,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function aC(r,i,s,c,m,v,x,M,U){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=Mn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mn(0),this.hiddenUpdates=Mn(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=v,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function n_(r,i,s,c,m,v,x,M,U,J,ce,fe){return r=new aC(r,i,s,x,U,J,ce,fe,M),i=1,v===!0&&(i|=24),v=ar(3,null,null,i),r.current=v,v.stateNode=r,i=Ch(),i.refCount++,r.pooledCache=i,i.refCount++,v.memoizedState={element:c,isDehydrated:s,cache:i},Dh(v),r}function r_(r){return r?(r=Zo,r):Zo}function a_(r,i,s,c,m,v){m=r_(m),c.context===null?c.context=m:c.pendingContext=m,c=li(i),c.payload={element:s},v=v===void 0?null:v,v!==null&&(c.callback=v),s=ci(r,c,i),s!==null&&(Kn(s,r,i),ml(s,r,i))}function i_(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<i?s:i}}function Qp(r,i){i_(r,i),(r=r.alternate)&&i_(r,i)}function o_(r){if(r.tag===13||r.tag===31){var i=Zi(r,67108864);i!==null&&Kn(i,r,67108864),Qp(r,67108864)}}function s_(r){if(r.tag===13||r.tag===31){var i=cr();i=ko(i);var s=Zi(r,i);s!==null&&Kn(s,r,i),Qp(r,i)}}var Gu=!0;function iC(r,i,s,c){var m=k.T;k.T=null;var v=F.p;try{F.p=2,Xp(r,i,s,c)}finally{F.p=v,k.T=m}}function oC(r,i,s,c){var m=k.T;k.T=null;var v=F.p;try{F.p=8,Xp(r,i,s,c)}finally{F.p=v,k.T=m}}function Xp(r,i,s,c){if(Gu){var m=Jp(c);if(m===null)Up(r,i,c,qu,s),c_(r,c);else if(lC(m,r,i,s,c))c.stopPropagation();else if(c_(r,c),i&4&&-1<sC.indexOf(r)){for(;m!==null;){var v=Bo(m);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var x=ft(v.pendingLanes);if(x!==0){var M=v;for(M.pendingLanes|=2,M.entangledLanes|=2;x;){var U=1<<31-qt(x);M.entanglements[1]|=U,x&=~U}ia(v),(gt&6)===0&&(Au=de()+500,Nl(0))}}break;case 31:case 13:M=Zi(v,2),M!==null&&Kn(M,v,2),Mu(),Qp(v,2)}if(v=Jp(c),v===null&&Up(r,i,c,qu,s),v===m)break;m=v}m!==null&&c.stopPropagation()}else Up(r,i,c,null,s)}}function Jp(r){return r=th(r),em(r)}var qu=null;function em(r){if(qu=null,r=Uo(r),r!==null){var i=l(r);if(i===null)r=null;else{var s=i.tag;if(s===13){if(r=u(i),r!==null)return r;r=null}else if(s===31){if(r=d(i),r!==null)return r;r=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return qu=r,null}function l_(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(me()){case he:return 2;case Re:return 8;case Fe:case tt:return 32;case Rt:return 268435456;default:return 32}default:return 32}}var tm=!1,_i=null,Ei=null,Si=null,Ul=new Map,Bl=new Map,wi=[],sC="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 c_(r,i){switch(r){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":Ul.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(i.pointerId)}}function zl(r,i,s,c,m,v){return r===null||r.nativeEvent!==v?(r={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:v,targetContainers:[m]},i!==null&&(i=Bo(i),i!==null&&o_(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function lC(r,i,s,c,m){switch(i){case"focusin":return _i=zl(_i,r,i,s,c,m),!0;case"dragenter":return Ei=zl(Ei,r,i,s,c,m),!0;case"mouseover":return Si=zl(Si,r,i,s,c,m),!0;case"pointerover":var v=m.pointerId;return Ul.set(v,zl(Ul.get(v)||null,r,i,s,c,m)),!0;case"gotpointercapture":return v=m.pointerId,Bl.set(v,zl(Bl.get(v)||null,r,i,s,c,m)),!0}return!1}function u_(r){var i=Uo(r.target);if(i!==null){var s=l(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){r.blockedOn=i,x0(r.priority,function(){s_(s)});return}}else if(i===31){if(i=d(s),i!==null){r.blockedOn=i,x0(r.priority,function(){s_(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Yu(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var s=Jp(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);eh=c,s.target.dispatchEvent(c),eh=null}else return i=Bo(s),i!==null&&o_(i),r.blockedOn=s,!1;i.shift()}return!0}function d_(r,i,s){Yu(r)&&s.delete(i)}function cC(){tm=!1,_i!==null&&Yu(_i)&&(_i=null),Ei!==null&&Yu(Ei)&&(Ei=null),Si!==null&&Yu(Si)&&(Si=null),Ul.forEach(d_),Bl.forEach(d_)}function Ku(r,i){r.blockedOn===i&&(r.blockedOn=null,tm||(tm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,cC)))}var Wu=null;function f_(r){Wu!==r&&(Wu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wu===r&&(Wu=null);for(var i=0;i<r.length;i+=3){var s=r[i],c=r[i+1],m=r[i+2];if(typeof c!="function"){if(em(c||s)===null)continue;break}var v=Bo(s);v!==null&&(r.splice(i,3),i-=3,Jh(v,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function _s(r){function i(U){return Ku(U,r)}_i!==null&&Ku(_i,r),Ei!==null&&Ku(Ei,r),Si!==null&&Ku(Si,r),Ul.forEach(i),Bl.forEach(i);for(var s=0;s<wi.length;s++){var c=wi[s];c.blockedOn===r&&(c.blockedOn=null)}for(;0<wi.length&&(s=wi[0],s.blockedOn===null);)u_(s),s.blockedOn===null&&wi.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],v=s[c+1],x=m[Vn]||null;if(typeof v=="function")x||f_(s);else if(x){var M=null;if(v&&v.hasAttribute("formAction")){if(m=v,x=v[Vn]||null)M=x.formAction;else if(em(m)!==null)continue}else M=x.action;typeof M=="function"?s[c+1]=M:(s.splice(c,3),c-=3),f_(s)}}}function h_(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(x){return m=x})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function nm(r){this._internalRoot=r}Zu.prototype.render=nm.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=cr();a_(s,c,r,i,null,null)},Zu.prototype.unmount=nm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;a_(r.current,2,null,r,null,null),Mu(),i[jo]=null}};function Zu(r){this._internalRoot=r}Zu.prototype.unstable_scheduleHydration=function(r){if(r){var i=Yf();r={blockedOn:null,target:r,priority:i};for(var s=0;s<wi.length&&i!==0&&i<wi[s].priority;s++);wi.splice(s,0,r),s===0&&u_(r)}};var p_=t.version;if(p_!=="19.2.3")throw Error(a(527,p_,"19.2.3"));F.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=h(i),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var uC={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qu.isDisabled&&Qu.supportsFiber)try{Gt=Qu.inject(uC),Mt=Qu}catch{}}return Vl.createRoot=function(r,i){if(!o(r))throw Error(a(299));var s=!1,c="",m=E1,v=S1,x=w1;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(x=i.onRecoverableError)),i=n_(r,1,!1,null,null,s,c,null,m,v,x,h_),r[jo]=i.current,jp(r),new nm(i)},Vl.hydrateRoot=function(r,i,s){if(!o(r))throw Error(a(299));var c=!1,m="",v=E1,x=S1,M=w1,U=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError),s.formState!==void 0&&(U=s.formState)),i=n_(r,1,!0,i,s??null,c,m,U,v,x,M,h_),i.context=r_(null),s=i.current,c=cr(),c=ko(c),m=li(c),m.callback=null,ci(s,m,c),s=c,i.current.lanes=s,ht(i,s),ia(i),r[jo]=i.current,jp(r),new Zu(i)},Vl.version="19.2.3",Vl}var R_;function SC(){if(R_)return am.exports;R_=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(),am.exports=EC(),am.exports}var wC=SC(),E=$i();const H=Io(E),uv=fC({__proto__:null,default:H},[E]);var cm={exports:{}},um={};var O_;function xC(){if(O_)return um;O_=1;var e=$i().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return um.c=function(t){return e.H.useMemoCache(t)},um}var T_;function RC(){return T_||(T_=1,cm.exports=xC()),cm.exports}var Sf=RC(),Rc=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(){}},OC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},TC=class{#e=OC;#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)}},mo=new TC;function AC(e){setTimeout(e,0)}var Eo=typeof window>"u"||"Deno"in globalThis;function Xn(){}function CC(e,t){return typeof e=="function"?e(t):e}function gg(e){return typeof e=="number"&&e>=0&&e!==1/0}function dw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pi(e,t){return typeof e=="function"?e(t):e}function Lr(e,t){return typeof e=="function"?e(t):e}function A_(e,t){const{type:n="all",exact:a,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(a){if(t.queryHash!==dv(u,t.options))return!1}else if(!hc(t.queryKey,u))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||o&&o!==t.state.fetchStatus||l&&!l(t))}function C_(e,t){const{exact:n,status:a,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(fc(t.options.mutationKey)!==fc(l))return!1}else if(!hc(t.options.mutationKey,l))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function dv(e,t){return(t?.queryKeyHashFn||fc)(e)}function fc(e){return JSON.stringify(e,(t,n)=>yg(n)?Object.keys(n).sort().reduce((a,o)=>(a[o]=n[o],a),{}):n)}function hc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>hc(e[n],t[n])):!1}var MC=Object.prototype.hasOwnProperty;function fw(e,t){if(e===t)return e;const n=M_(e)&&M_(t);if(!n&&!(yg(e)&&yg(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),u=l.length,d=n?new Array(u):{};let f=0;for(let h=0;h<u;h++){const g=n?h:l[h],p=e[g],y=t[g];if(p===y){d[g]=p,(n?h<o:MC.call(e,g))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){d[g]=y;continue}const _=fw(p,y);d[g]=_,_===p&&f++}return o===u&&f===o?e:d}function vg(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 M_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yg(e){if(!N_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!N_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function N_(e){return Object.prototype.toString.call(e)==="[object Object]"}function NC(e){return new Promise(t=>{mo.setTimeout(t,e)})}function bg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?fw(e,t):t}function IC(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function DC(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var fv=Symbol();function hw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===fv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function LC(e,t){return typeof e=="function"?e(...t):!!e}var PC=class extends Rc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Eo&&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"}},hv=new PC;function _g(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function a(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},n.reject=o=>{a({status:"rejected",reason:o}),t(o)},n}var kC=AC;function jC(){let e=[],t=0,n=d=>{d()},a=d=>{d()},o=kC;const l=d=>{t?e.push(d):o(()=>{n(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{a(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{o=d}}}var On=jC(),UC=class extends Rc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Eo&&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}},Dd=new UC;function BC(e){return Math.min(1e3*2**e,3e4)}function pw(e){return(e??"online")==="online"?Dd.isOnline():!0}var Eg=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function mw(e){let t=!1,n=0,a;const o=_g(),l=()=>o.status!=="pending",u=w=>{if(!l()){const T=new Eg(w);y(T),e.onCancel?.(T)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>hv.isFocused()&&(e.networkMode==="always"||Dd.isOnline())&&e.canRun(),g=()=>pw(e.networkMode)&&e.canRun(),p=w=>{l()||(a?.(),o.resolve(w))},y=w=>{l()||(a?.(),o.reject(w))},_=()=>new Promise(w=>{a=T=>{(l()||h())&&w(T)},e.onPause?.()}).then(()=>{a=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let w;const T=n===0?e.initialPromise:void 0;try{w=T??e.fn()}catch(R){w=Promise.reject(R)}Promise.resolve(w).then(p).catch(R=>{if(l())return;const A=e.retry??(Eo?0:3),C=e.retryDelay??BC,O=typeof C=="function"?C(n,R):C,N=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,R);if(t||!N){y(R);return}n++,e.onFail?.(n,R),NC(O).then(()=>h()?void 0:_()).then(()=>{t?y(R):S()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?S():_().then(S),o)}}var gw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gg(this.gcTime)&&(this.#e=mo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Eo?1/0:300*1e3))}clearGcTimeout(){this.#e&&(mo.clearTimeout(this.#e),this.#e=void 0)}},zC=class extends gw{#e;#t;#n;#a;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=D_(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=D_(this.options);t.data!==void 0&&(this.setState(I_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=bg(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Xn).catch(Xn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Lr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pi(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:!dw(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.#o?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.#i({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,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},o=()=>{const d=hw(this.options,t),h=(()=>{const g={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#o=!1,this.options.persister?this.options.persister(d,h,this):d(h)},u=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return a(d),d})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#i({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=mw({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof Eg&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#i({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.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 Eg){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#i({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#i(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,...vw(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...I_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};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 vw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function D_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var FC=class extends Rc{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#o=_g(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#s;#o;#i;#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),L_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sg(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sg(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 Lr(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&&!vg(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&P_(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==n||Lr(this.options.enabled,this.#t)!==Lr(t.enabled,this.#t)||Pi(this.options.staleTime,this.#t)!==Pi(t.staleTime,this.#t))&&this.#g();const o=this.#v();a&&(this.#t!==n||Lr(this.options.enabled,this.#t)!==Lr(t.enabled,this.#t)||o!==this.#l)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return HC(this,n)&&(this.#a=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}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.#a))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Xn)),t}#g(){this.#_();const e=Pi(this.options.staleTime,this.#t);if(Eo||this.#a.isStale||!gg(e))return;const n=dw(this.#a.dataUpdatedAt,e)+1;this.#c=mo.setTimeout(()=>{this.#a.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#l=e,!(Eo||Lr(this.options.enabled,this.#t)===!1||!gg(this.#l)||this.#l===0)&&(this.#u=mo.setInterval(()=>{(this.options.refetchIntervalInBackground||hv.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#_(){this.#c&&(mo.clearTimeout(this.#c),this.#c=void 0)}#E(){this.#u&&(mo.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,a=this.options,o=this.#a,l=this.#r,u=this.#s,f=e!==n?e.state:this.#n,{state:h}=e;let g={...h},p=!1,y;if(t._optimisticResults){const D=this.hasListeners(),B=!D&&L_(e,t),Z=D&&P_(e,n,t,a);(B||Z)&&(g={...g,...vw(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:_,errorUpdatedAt:S,status:w}=g;y=g.data;let T=!1;if(t.placeholderData!==void 0&&y===void 0&&w==="pending"){let D;o?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(D=o.data,T=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(w="success",y=bg(o?.data,D,t),p=!0)}if(t.select&&y!==void 0&&!T)if(o&&y===l?.data&&t.select===this.#m)y=this.#f;else try{this.#m=t.select,y=t.select(y),y=bg(o?.data,y,t),this.#f=y,this.#i=null}catch(D){this.#i=D}this.#i&&(_=this.#i,y=this.#f,S=Date.now(),w="error");const R=g.fetchStatus==="fetching",A=w==="pending",C=w==="error",O=A&&R,N=y!==void 0,I={status:w,fetchStatus:g.fetchStatus,isPending:A,isSuccess:w==="success",isError:C,isInitialLoading:O,isLoading:O,data:y,dataUpdatedAt:g.dataUpdatedAt,error:_,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:C&&!N,isPaused:g.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&N,isStale:pv(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Lr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=Y=>{I.status==="error"?Y.reject(I.error):I.data!==void 0&&Y.resolve(I.data)},B=()=>{const Y=this.#o=I.promise=_g();D(Y)},Z=this.#o;switch(Z.status){case"pending":e.queryHash===n.queryHash&&D(Z);break;case"fulfilled":(I.status==="error"||I.data!==Z.value)&&B();break;case"rejected":(I.status!=="error"||I.error!==Z.reason)&&B();break}}return I}updateResult(){const e=this.#a,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),vg(t,e))return;this.#a=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#p.size)return!0;const l=new Set(o??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#a).some(u=>{const d=u;return this.#a[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.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function VC(e,t){return Lr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function L_(e,t){return VC(e,t)||e.state.data!==void 0&&Sg(e,t,t.refetchOnMount)}function Sg(e,t,n){if(Lr(t.enabled,e)!==!1&&Pi(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&pv(e,t)}return!1}function P_(e,t,n,a){return(e!==t||Lr(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pv(e,n)}function pv(e,t){return Lr(t.enabled,e)!==!1&&e.isStaleByTime(Pi(t.staleTime,e))}function HC(e,t){return!vg(e.getCurrentResult(),t)}function k_(e){return{onFetch:(t,n)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let g=!1;const p=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},y=hw(t.options,t.fetchOptions),_=async(S,w,T)=>{if(g)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const A=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:w,direction:T?"backward":"forward",meta:t.options.meta};return p(L),L})(),C=await y(A),{maxPages:O}=t.options,N=T?DC:IC;return{pages:N(S.pages,C,O),pageParams:N(S.pageParams,w,O)}};if(o&&l.length){const S=o==="backward",w=S?yw:wg,T={pages:l,pageParams:u},R=w(a,T);d=await _(T,R,S)}else{const S=e??l.length;do{const w=f===0?u[0]??a.initialPageParam:wg(a,d);if(f>0&&w==null)break;d=await _(d,w),f++}while(f<S)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function wg(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function yw(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function NB(e,t){return t?wg(e,t)!=null:!1}function IB(e,t){return!t||!e.getPreviousPageParam?!1:yw(e,t)!=null}var $C=class extends gw{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||GC(),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.#a?.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.#a=mw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},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 a=this.state.status==="pending",o=!this.#a.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),await this.#n.config.onMutate?.(e,this,n);const u=await this.options.onMutate?.(e,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:o})}const l=await this.#a.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{throw await this.#n.config.onError?.(l,e,this.state.context,this,n),await this.options.onError?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,l,e,this.state.context,n),l}finally{this.#r({type:"error",error: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 GC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qC=class extends Rc{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 a=new $C({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=Xu(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=Xu(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Xu(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Xu(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.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=>C_(t,n))}findAll(e={}){return this.getAll().filter(t=>C_(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(Xn))))}};function Xu(e){return e.options.scope?.id}var YC=class extends Rc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,o=t.queryHash??dv(a,t);let l=this.get(o);return l||(l=new zC({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),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=>A_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>A_(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()})})}},KC=class{#e;#t;#n;#a;#r;#s;#o;#i;constructor(e={}){this.#e=e.queryCache||new YC,this.#t=e.mutationCache||new qC,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=hv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Dd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=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),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(a.queryHash)?.state.data,u=CC(t,l);if(u!==void 0)return this.#e.build(this,a).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return On.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,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(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=On.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(a).then(Xn).catch(Xn)}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},a=On.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Xn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(a).then(Xn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Pi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xn).catch(Xn)}fetchInfiniteQuery(e){return e.behavior=k_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xn).catch(Xn)}ensureInfiniteQueryData(e){return e.behavior=k_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Dd.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.#a.set(fc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(a=>{hc(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(fc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{hc(e,a.mutationKey)&&Object.assign(n,a.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=dv(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===fv&&(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()}},bw=E.createContext(void 0),WC=e=>{const t=E.useContext(bw);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZC=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(bw.Provider,{value:e,children:t})),_w=E.createContext(!1),QC=()=>E.useContext(_w);_w.Provider;function XC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var JC=E.createContext(XC()),e4=()=>E.useContext(JC),t4=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},n4=e=>{E.useEffect(()=>{e.clearReset()},[e])},r4=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||LC(n,[e.error,a])),a4=(e,t)=>t.state.data===void 0,i4=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>n(a(...o)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},o4=(e,t)=>e.isLoading&&e.isFetching&&!t,s4=(e,t)=>e?.suspense&&t.isPending,j_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function l4(e,t,n){const a=QC(),o=e4(),l=WC(n),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=a?"isRestoring":"optimistic",i4(u),t4(u,o),n4(o);const d=!l.getQueryCache().get(u.queryHash),[f]=E.useState(()=>new t(l,u)),h=f.getOptimisticResult(u),g=!a&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(p=>{const y=g?f.subscribe(On.batchCalls(p)):Xn;return f.updateResult(),y},[f,g]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),E.useEffect(()=>{f.setOptions(u)},[u,f]),s4(u,h))throw j_(u,f,o);if(r4({result:h,errorResetBoundary:o,throwOnError:u.throwOnError,query:l.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw h.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,h),u.experimental_prefetchInRender&&!Eo&&o4(h,a)&&(d?j_(u,f,o):l.getQueryCache().get(u.queryHash)?.promise)?.catch(Xn).finally(()=>{f.updateResult()}),u.notifyOnChangeProps?h:f.trackResult(h)}function c4(e,t){return l4({...e,enabled:!0,suspense:!0,throwOnError:a4,placeholderData:void 0},FC,t)}const u4={authConfig:()=>["authConfig"],threads:e=>["threads",e],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],collectionItem:(e,t,n)=>["collection-item",e,t,n],collectionListPrefix:(e,t)=>["collection-list",e,t],collectionList:(e,t,n)=>["collection-list",e,t,n],collectionListInfinitePrefix:(e,t)=>["collection-list-infinite",e,t],collectionListInfinite:(e,t,n)=>["collection-list-infinite",e,t,n],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e]},Ew=E.createContext(void 0);async function d4(){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 f4(e){const t=Sf.c(4),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:u4.authConfig(),queryFn:d4,staleTime:1/0},t[0]=a):a=t[0];const{data:o}=c4(a);let l;return t[1]!==o||t[2]!==n?(l=b.jsx(Ew.Provider,{value:o,children:n}),t[1]=o,t[2]=n,t[3]=l):l=t[3],l}function DB(){const e=E.useContext(Ew);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const xg=new WeakMap,h4=new WeakMap,Ld={current:[]};let dm=!1,ic=0;const tc=new Set,Ju=new Map;function Sw(e){for(const t of e){if(Ld.current.includes(t))continue;Ld.current.push(t),t.recompute();const n=h4.get(t);if(n)for(const a of n){const o=xg.get(a);o?.length&&Sw(o)}}}function p4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function m4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function ww(e){if(ic>0&&!Ju.has(e)&&Ju.set(e,e.prevState),tc.add(e),!(ic>0)&&!dm)try{for(dm=!0;tc.size>0;){const t=Array.from(tc);tc.clear();for(const n of t){const a=Ju.get(n)??n.prevState;n.prevState=a,p4(n)}for(const n of t){const a=xg.get(n);a&&(Ld.current.push(n),Sw(a))}for(const n of t){const a=xg.get(n);if(a)for(const o of a)m4(o)}}}finally{dm=!1,Ld.current=[],Ju.clear()}}function oc(e){ic++;try{e()}finally{if(ic--,ic===0){const t=tc.values().next().value;t&&ww(t)}}}function g4(e){return typeof e=="function"}class v4{constructor(t,n){this.listeners=new Set,this.subscribe=a=>{var o,l;this.listeners.add(a);const u=(l=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:l.call(o,a,this);return()=>{this.listeners.delete(a),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,a,o;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):g4(t)?this.state=t(this.prevState):this.state=t,(o=(a=this.options)==null?void 0:a.onUpdate)==null||o.call(a),ww(this)}}const ki="__TSR_index",U_="popstate",B_="beforeunload";function y4(e){let t=e.getLocation();const n=new Set,a=u=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},l=async({task:u,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){u();return}const g=e.getBlockers?.()??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&g.length&&p)for(const y of g){const _=Pd(f.path,f.state);if(await y.blockerFn({currentLocation:t,nextLocation:_,action:f.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,d,f)=>{const h=t.state[ki];d=z_(h+1,d),l({task:()=>{e.pushState(u,d),a({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:u,state:d})},replace:(u,d,f)=>{const h=t.state[ki];d=z_(h,d),l({task:()=>{e.replaceState(u,d),a({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:u,state:d})},go:(u,d)=>{l({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:d,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[ki]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,u]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function z_(e,t){t||(t={});const n=mv();return{...t,key:n,__TSR_key:n,[ki]:e}}function b4(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,a=t.history.replaceState;let o=[];const l=()=>o,u=D=>o=D,d=(D=>D),f=(()=>Pd(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=mv();t.history.replaceState({[ki]:0,key:D,__TSR_key:D},"")}let h=f(),g,p=!1,y=!1,_=!1,S=!1;const w=()=>h;let T,R;const A=()=>{T&&(I._ignoreSubscribers=!0,(T.isPush?t.history.pushState:t.history.replaceState)(T.state,"",T.href),I._ignoreSubscribers=!1,T=void 0,R=void 0,g=void 0)},C=(D,B,Z)=>{const Y=d(B);R||(g=h),h=Pd(B,Z),T={href:Y,state:Z,isPush:T?.isPush||D==="push"},R||(R=Promise.resolve().then(()=>A()))},O=D=>{h=f(),I.notify({type:D})},N=async()=>{if(y){y=!1;return}const D=f(),B=D.state[ki]-h.state[ki],Z=B===1,Y=B===-1,V=!Z&&!Y||p;p=!1;const z=V?"GO":Y?"BACK":"FORWARD",ie=V?{type:"GO",index:B}:{type:Y?"BACK":"FORWARD"};if(_)_=!1;else{const ee=l();if(typeof document<"u"&&ee.length){for(const k of ee)if(await k.blockerFn({currentLocation:h,nextLocation:D,action:z})){y=!0,t.history.go(1),I.notify(ie);return}}}h=f(),I.notify(ie)},L=D=>{if(S){S=!1;return}let B=!1;const Z=l();if(typeof document<"u"&&Z.length)for(const Y of Z){const V=Y.enableBeforeUnload??!0;if(V===!0){B=!0;break}if(typeof V=="function"&&V()===!0){B=!0;break}}if(B)return D.preventDefault(),D.returnValue=""},I=y4({getLocation:w,getLength:()=>t.history.length,pushState:(D,B)=>C("push",D,B),replaceState:(D,B)=>C("replace",D,B),back:D=>(D&&(_=!0),S=!0,t.history.back()),forward:D=>{D&&(_=!0),S=!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=a,t.removeEventListener(B_,L,{capture:!0}),t.removeEventListener(U_,N)},onBlocked:()=>{g&&h!==g&&(h=g)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(B_,L,{capture:!0}),t.addEventListener(U_,N),t.history.pushState=function(...D){const B=n.apply(t.history,D);return I._ignoreSubscribers||O("PUSH"),B},t.history.replaceState=function(...D){const B=a.apply(t.history,D);return I._ignoreSubscribers||O("REPLACE"),B},I}function Pd(e,t){const n=e.indexOf("#"),a=e.indexOf("?"),o=mv();return{href:e,pathname:e.substring(0,n>0?a>0?Math.min(n,a):n:a>0?a:e.length),hash:n>-1?e.substring(n):"",search:a>-1?e.slice(a,n===-1?void 0:n):"",state:t||{[ki]:0,key:o,__TSR_key:o}}}function mv(){return(Math.random()+1).toString(36).substring(7)}function kd(e){return e[e.length-1]}function _4(e){return typeof e=="function"}function Di(e,t){return _4(e)?e(t):e}const E4=Object.prototype.hasOwnProperty;function Dr(e,t){if(e===t)return e;const n=t,a=H_(e)&&H_(n);if(!a&&!(jd(e)&&jd(n)))return n;const o=a?e:F_(e);if(!o)return n;const l=a?n:F_(n);if(!l)return n;const u=o.length,d=l.length,f=a?new Array(d):{};let h=0;for(let g=0;g<d;g++){const p=a?g:l[g],y=e[p],_=n[p];if(y===_){f[p]=y,(a?g<u:E4.call(e,p))&&h++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){f[p]=_;continue}const S=Dr(y,_);f[p]=S,S===y&&h++}return u===d&&h===u?e:f}function F_(e){const t=[],n=Object.getOwnPropertyNames(e);for(const o of n){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}const a=Object.getOwnPropertySymbols(e);for(const o of a){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}return t}function jd(e){if(!V_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!V_(n)||!n.hasOwnProperty("isPrototypeOf"))}function V_(e){return Object.prototype.toString.call(e)==="[object Object]"}function H_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yo(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 a=0,o=e.length;a<o;a++)if(!yo(e[a],t[a],n))return!1;return!0}if(jd(e)&&jd(t)){const a=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!yo(e[u],t[u],n))return!1;return!0}let o=0;if(!a)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let l=0;for(const u in t)if((!a||t[u]!==void 0)&&(l++,l>o||!yo(e[u],t[u],n)))return!1;return o===l}return!1}function zs(e){let t,n;const a=new Promise((o,l)=>{t=o,n=l});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",n(o)},a}function S4(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 ji(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function $_(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function G_(e,t){if(!e)return e;const n=/%25|%5C/gi;let a=0,o="",l;for(;(l=n.exec(e))!==null;)o+=$_(e.slice(a,l.index))+l[0],a=n.lastIndex;return o+$_(a?e.slice(a):e)}var w4="Invariant failed";function $a(e,t){if(!e)throw new Error(w4)}function Ud(e){const t=new Map;let n,a;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,a&&(a.next=l,l.prev=a)):(l.next.prev=void 0,n=l.next,l.next=void 0,a&&(l.prev=a,a.next=l)),a=l)};return{get(l){const u=t.get(l);if(u)return o(u),u.value},set(l,u){if(t.size>=e&&n){const f=n;t.delete(f.key),f.next&&(n=f.next,f.next.prev=void 0),f===a&&(a=void 0)}const d=t.get(l);if(d)d.value=u,o(d);else{const f={key:l,value:u,prev:a};a&&(a.next=f),a=f,n||(n=f),t.set(l,f)}},clear(){t.clear(),n=void 0,a=void 0}}}const Fs=0,So=1,wo=2,pc=3,Ds=4,x4=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,R4=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,O4=/^([^{]*)\{\$\}([^}]*)$/;function gv(e,t,n=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,l=e.substring(t,o);if(!l||!l.includes("$"))return n[0]=Fs,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(l==="$"){const h=e.length;return n[0]=wo,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=So,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const u=l.match(O4);if(u){const g=u[1].length;return n[0]=wo,n[1]=t+g,n[2]=t+g+1,n[3]=t+g+2,n[4]=t+g+3,n[5]=e.length,n}const d=l.match(R4);if(d){const h=d[1],g=d[2],p=d[3],y=h.length;return n[0]=pc,n[1]=t+y,n[2]=t+y+3,n[3]=t+y+3+g.length,n[4]=o-p.length,n[5]=o,n}const f=l.match(x4);if(f){const h=f[1],g=f[2],p=f[3],y=h.length;return n[0]=So,n[1]=t+y,n[2]=t+y+2,n[3]=t+y+2+g.length,n[4]=o-p.length,n[5]=o,n}return n[0]=Fs,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function wf(e,t,n,a,o,l,u){u?.(n);let d=a;{const f=n.fullPath??n.from,h=f.length,g=n.options?.caseSensitive??e;for(;d<h;){const y=gv(f,d,t);let _;const S=d,w=y[5];switch(d=w+1,l++,y[0]){case Fs:{const R=f.substring(y[2],y[3]);if(g){const A=o.static?.get(R);if(A)_=A;else{o.static??=new Map;const C=Ps(n.fullPath??n.from);C.parent=o,C.depth=l,_=C,o.static.set(R,C)}}else{const A=R.toLowerCase(),C=o.staticInsensitive?.get(A);if(C)_=C;else{o.staticInsensitive??=new Map;const O=Ps(n.fullPath??n.from);O.parent=o,O.depth=l,_=O,o.staticInsensitive.set(A,O)}}break}case So:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,N=A?C?A:A.toLowerCase():void 0,L=o.dynamic?.find(I=>I.caseSensitive===C&&I.prefix===O&&I.suffix===N);if(L)_=L;else{const I=hm(So,n.fullPath??n.from,C,O,N);_=I,I.depth=l,I.parent=o,o.dynamic??=[],o.dynamic.push(I)}break}case pc:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,N=A?C?A:A.toLowerCase():void 0,L=o.optional?.find(I=>I.caseSensitive===C&&I.prefix===O&&I.suffix===N);if(L)_=L;else{const I=hm(pc,n.fullPath??n.from,C,O,N);_=I,I.parent=o,I.depth=l,o.optional??=[],o.optional.push(I)}break}case wo:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,N=A?C?A:A.toLowerCase():void 0,L=hm(wo,n.fullPath??n.from,C,O,N);_=L,L.parent=o,L.depth=l,o.wildcard??=[],o.wildcard.push(L)}}o=_}const p=(n.path||!n.children)&&!n.isRoot;if(p&&f.endsWith("/")){const y=Ps(n.fullPath??n.from);y.kind=Ds,y.parent=o,l++,y.depth=l,o.index=y,o=y}p&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const f of n.children)wf(e,t,f,d,o,l,u)}function fm(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 po(e){if(e.static)for(const t of e.static.values())po(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())po(t);if(e.dynamic?.length){e.dynamic.sort(fm);for(const t of e.dynamic)po(t)}if(e.optional?.length){e.optional.sort(fm);for(const t of e.optional)po(t)}if(e.wildcard?.length){e.wildcard.sort(fm);for(const t of e.wildcard)po(t)}}function Ps(e){return{kind:Fs,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function hm(e,t,n,a,o){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:a,suffix:o}}function T4(e,t){const n=Ps("/"),a=new Uint16Array(6);for(const o of e)wf(!1,a,o,1,n,0);po(n),t.masksTree=n,t.flatCache=Ud(1e3)}function A4(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const a=vv(e,t.masksTree);return t.flatCache.set(e,a),a}function C4(e,t,n,a,o){e||="/",a||="/";const l=t?`case\0${e}`:e;let u=o.singleCache.get(l);if(!u){u=Ps("/");const d=new Uint16Array(6);wf(t,d,{from:e},1,u,0),o.singleCache.set(l,u)}return vv(a,u,n)}function M4(e,t,n=!1){const a=n?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";const l=vv(e,t.segmentTree,n);return l&&(l.branch=L4(l.route)),t.matchCache.set(a,l),l}function N4(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function I4(e,t=!1,n){const a=Ps(e.fullPath),o=new Uint16Array(6),l={},u={};let d=0;return wf(t,o,e,1,a,0,h=>{if(n?.(h,d),$a(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,d!==0&&h.path){const g=N4(h.fullPath);(!u[g]||h.fullPath.endsWith("/"))&&(u[g]=h)}d++}),po(a),{processedTree:{segmentTree:a,singleCache:Ud(1e3),matchCache:Ud(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function vv(e,t,n=!1){const a=e.split("/"),o=k4(e,a,t,n);if(!o)return null;const l=D4(e,a,o);return"**"in o&&(l["**"]=o["**"]),{route:o.node.route,params:l}}function D4(e,t,n){const a=P4(n.node);let o=null;const l={};for(let u=0,d=0,f=0;d<a.length;u++,d++,f++){const h=a[d],g=t[u],p=f;if(g&&(f+=g.length),h.kind===So){o??=n.node.fullPath.split("/");const y=o[d],_=h.prefix?.length??0;if(y.charCodeAt(_)===123){const w=h.suffix?.length??0,T=y.substring(_+2,y.length-w-1),R=g.substring(_,g.length-w);l[T]=decodeURIComponent(R)}else{const w=y.substring(1);l[w]=decodeURIComponent(g)}}else if(h.kind===pc){if(n.skipped&1<<d){u--;continue}o??=n.node.fullPath.split("/");const y=o[d],_=h.prefix?.length??0,S=h.suffix?.length??0,w=y.substring(_+3,y.length-S-1),T=h.suffix||h.prefix?g.substring(_,g.length-S):g;T&&(l[w]=decodeURIComponent(T))}else if(h.kind===wo){const y=h,_=e.substring(p+(y.prefix?.length??0),e.length-(y.suffix?.length??0)),S=decodeURIComponent(_);l["*"]=S,l._splat=S;break}}return l}function L4(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function P4(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function k4(e,t,n,a){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!kd(t),l=o&&e!=="/",u=t.length-(o?1:0),d=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,h=null,g=null;for(;d.length;){const p=d.pop();let{node:y,index:_,skipped:S,depth:w,statics:T,dynamics:R,optionals:A}=p;a&&y.route&&y.kind!==Ds&&Hl(h,p)&&(h=p);const C=_===u;if(C&&(y.route&&!l&&Hl(g,p)&&(g=p),!y.optional&&!y.wildcard&&!y.index))continue;const O=C?void 0:t[_];let N;if(C&&y.index){const L={node:y.index,index:_,skipped:S,depth:w+1,statics:T,dynamics:R,optionals:A};if(T===u&&!R&&!A&&!S)return L;Hl(g,L)&&(g=L)}if(y.wildcard&&Hl(f,p))for(const L of y.wildcard){const{prefix:I,suffix:D}=L;if(!(I&&(C||!(L.caseSensitive?O:N??=O.toLowerCase()).startsWith(I)))){if(D){if(C)continue;const B=t.slice(_).join("/").slice(-D.length);if((L.caseSensitive?B:B.toLowerCase())!==D)continue}f={node:L,index:u,skipped:S,depth:w,statics:T,dynamics:R,optionals:A};break}}if(y.optional){const L=S|1<<w,I=w+1;for(let D=y.optional.length-1;D>=0;D--){const B=y.optional[D];d.push({node:B,index:_,skipped:L,depth:I,statics:T,dynamics:R,optionals:A})}if(!C)for(let D=y.optional.length-1;D>=0;D--){const B=y.optional[D],{prefix:Z,suffix:Y}=B;if(Z||Y){const V=B.caseSensitive?O:N??=O.toLowerCase();if(Z&&!V.startsWith(Z)||Y&&!V.endsWith(Y))continue}d.push({node:B,index:_+1,skipped:S,depth:I,statics:T,dynamics:R,optionals:A+1})}}if(!C&&y.dynamic&&O)for(let L=y.dynamic.length-1;L>=0;L--){const I=y.dynamic[L],{prefix:D,suffix:B}=I;if(D||B){const Z=I.caseSensitive?O:N??=O.toLowerCase();if(D&&!Z.startsWith(D)||B&&!Z.endsWith(B))continue}d.push({node:I,index:_+1,skipped:S,depth:w+1,statics:T,dynamics:R+1,optionals:A})}if(!C&&y.staticInsensitive){const L=y.staticInsensitive.get(N??=O.toLowerCase());L&&d.push({node:L,index:_+1,skipped:S,depth:w+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:S,depth:w+1,statics:T+1,dynamics:R,optionals:A})}}if(g&&f)return Hl(f,g)?g:f;if(g)return g;if(f)return f;if(a&&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 Hl(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===Ds)>(e.node.kind===Ds)||t.node.kind===Ds==(e.node.kind===Ds)&&t.depth>e.depth))):!0}function xd(e){return yv(e.filter(t=>t!==void 0).join("/"))}function yv(e){return e.replace(/\/{2,}/g,"/")}function xw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function bo(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Rw(e){return bo(xw(e))}function Bd(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function j4(e,t,n){return Bd(e,n)===Bd(t,n)}function U4({base:e,to:t,trailingSlash:n="never",cache:a}){const o=t.startsWith("/"),l=!o&&t===".";let u;if(a){u=o?t:l?e:e+"\0"+t;const p=a.get(u);if(p)return p}let d;if(l)d=e.split("/");else if(o)d=t.split("/");else{for(d=e.split("/");d.length>1&&kd(d)==="";)d.pop();const p=t.split("/");for(let y=0,_=p.length;y<_;y++){const S=p[y];S===""?y?y===_-1&&d.push(S):d=[S]:S===".."?d.pop():S==="."||d.push(S)}}d.length>1&&(kd(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=gv(y,0,f);const _=f[0];if(_===Fs){h+=y;continue}const S=f[5],w=y.substring(0,f[1]),T=y.substring(f[4],S),R=y.substring(f[2],f[3]);_===So?h+=w||T?`${w}{$${R}}${T}`:`$${R}`:_===wo?h+=w||T?`${w}{$}${T}`:"$":h+=`${w}{-$${R}}${T}`}h=yv(h);const g=h||"/";return u&&a&&a.set(u,g),g}function pm(e,t,n){const a=t[e];return typeof a!="string"?a:e==="_splat"?encodeURI(a):B4(a,n)}function mm({path:e,params:t,decodeCharMap:n}){let a=!1;const o={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:a};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:a};const l=e.length;let u=0,d,f="";for(;u<l;){const g=u;d=gv(e,g,d);const p=d[5];if(u=p+1,g===p)continue;const y=d[0];if(y===Fs){f+="/"+e.substring(g,p);continue}if(y===wo){const _=t._splat;o._splat=_,o["*"]=_;const S=e.substring(g,d[1]),w=e.substring(d[4],p);if(!_){a=!0,(S||w)&&(f+="/"+S+w);continue}const T=pm("_splat",t,n);f+="/"+S+T+w;continue}if(y===So){const _=e.substring(d[2],d[3]);!a&&!(_ in t)&&(a=!0),o[_]=t[_];const S=e.substring(g,d[1]),w=e.substring(d[4],p),T=pm(_,t,n)??"undefined";f+="/"+S+T+w;continue}if(y===pc){const _=e.substring(d[2],d[3]),S=t[_];if(S==null)continue;o[_]=S;const w=e.substring(g,d[1]),T=e.substring(d[4],p),R=pm(_,t,n)??"";f+="/"+w+R+T;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:a}}function B4(e,t){let n=encodeURIComponent(e);if(t)for(const[a,o]of t)n=n.replaceAll(a,o);return n}function yr(e){return!!e?.isNotFound}function z4(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const zd="tsr-scroll-restoration-v1_3",F4=(e,t)=>{let n;return(...a)=>{n||(n=setTimeout(()=>{e(...a),n=null},t))}};function V4(){const e=z4();if(!e)return null;const t=e.getItem(zd);let n=t?JSON.parse(t):{};return{state:n,set:a=>(n=Di(a,n)||n,e.setItem(zd,JSON.stringify(n)))}}const ed=V4(),Rg=e=>e.state.__TSR_key||e.href;function H4(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 Fd=!1;function Ow({storageKey:e,key:t,behavior:n,shouldScrollRestoration:a,scrollToTopSelectors:o,location:l}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const d=t||window.history.state?.__TSR_key,f=u[d];Fd=!0;e:{if(a&&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 g={top:0,left:0,behavior:n};if(window.scrollTo(g),o)for(const p of o){if(p==="window")continue;const y=typeof p=="function"?p():document.querySelector(p);y&&y.scrollTo(g)}}Fd=!1}function $4(e,t){if(!ed&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!ed))return;e.isScrollRestorationSetup=!0,Fd=!1;const a=e.options.getScrollRestorationKey||Rg;window.history.scrollRestoration="manual";const o=l=>{if(Fd||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const f=l.target.getAttribute("data-scroll-restoration-id");f?u=`[data-scroll-restoration-id="${f}"]`:u=H4(l.target)}const d=a(e.state.location);ed.set(f=>{const h=f[d]||={},g=h[u]||={};if(u==="window")g.scrollX=window.scrollX||0,g.scrollY=window.scrollY||0;else if(u){const p=document.querySelector(u);p&&(g.scrollX=p.scrollLeft||0,g.scrollY=p.scrollTop||0)}return f})};typeof document<"u"&&document.addEventListener("scroll",F4(o,100),!0),e.subscribe("onRendered",l=>{const u=a(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Ow({storageKey:zd,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&ed.set(d=>(d[u]||={},d)))})}function G4(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 q4(e,t=String){const n=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&n.set(a,t(o))}return n.toString()}function gm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Y4(e){const t=new URLSearchParams(e),n={};for(const[a,o]of t.entries()){const l=n[a];l==null?n[a]=gm(o):Array.isArray(l)?l.push(gm(o)):n[a]=[l,gm(o)]}return n}const K4=Z4(JSON.parse),W4=Q4(JSON.stringify,JSON.parse);function Z4(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Y4(t);for(const a in n){const o=n[a];if(typeof o=="string")try{n[a]=e(o)}catch{}}return n}}function Q4(e,t){const n=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const l=q4(o,a);return l?`?${l}`:""}}const fr="__root__";function X4(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 kr(e){return e instanceof Response&&!!e.options}const Rd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},xf=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),bv=(e,t,n=!0)=>{const a={...e.router.options.context??{}},o=n?t:t-1;for(let l=0;l<=o;l++){const u=e.matches[l];if(!u)continue;const d=e.router.getMatch(u.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},Tw=(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),$a(n.options.notFoundComponent);const a=e.matches.find(o=>o.routeId===n.id);$a(a,"Could not find match for route: "+n.id),e.updateMatch(a.id,o=>({...o,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,Tw(e,t))},Li=(e,t,n)=>{if(!(!kr(n)&&!yr(n))){if(kr(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 a=kr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:a,isFetching:!1,error:n})),yr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw kr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(Tw(e,n),n)}},Aw=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},$l=(e,t,n,a)=>{const{id:o,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=a,e.firstBadMatchIndex??=t,Li(e,e.router.getMatch(o),n);try{u.options.onError?.(n)}catch(d){n=d,Li(e,e.router.getMatch(o),n)}e.updateMatch(o,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}))},J4=(e,t,n,a)=>{const o=e.router.getMatch(t),l=e.matches[n-1]?.id,u=l?e.router.getMatch(l):void 0;if(e.router.isShell()){o.ssr=a.id===fr;return}if(u?.ssr===!1){o.ssr=!1;return}const d=_=>_===!0&&u?.ssr==="data-only"?"data-only":_,f=e.router.options.defaultSsr??!0;if(a.options.ssr===void 0){o.ssr=d(f);return}if(typeof a.options.ssr!="function"){o.ssr=d(a.options.ssr);return}const{search:h,params:g}=o,p={search:td(h,o.searchError),params:td(g,o.paramsError),location:e.location,matches:e.matches.map(_=>({index:_.index,pathname:_.pathname,fullPath:_.fullPath,staticData:_.staticData,id:_.id,routeId:_.routeId,search:td(_.search,_.searchError),params:td(_.params,_.paramsError),ssr:_.ssr}))},y=a.options.ssr(p);if(ji(y))return y.then(_=>{o.ssr=d(_??f)});o.ssr=d(y??f)},Cw=(e,t,n,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!xf(e,t)&&(n.options.loader||n.options.beforeLoad||Iw(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{Rd(e)},o);a._nonReactive.pendingTimeout=u}},e3=(e,t,n)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Cw(e,t,n,a);const o=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Li(e,l,l.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},t3=(e,t,n,a)=>{const o=e.router.getMatch(t),l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=zs(()=>{l?.resolve()});const{paramsError:u,searchError:d}=o;u&&$l(e,n,u,"PARSE_PARAMS"),d&&$l(e,n,d,"VALIDATE_SEARCH"),Cw(e,t,a,o);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})))},_=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!a.options.beforeLoad){oc(()=>{y(),_()});return}o._nonReactive.beforeLoadPromise=zs();const S={...bv(e,n,!1),...o.__routeContext},{search:w,params:T,cause:R}=o,A=xf(e,t),C={search:w,abortController:f,params:T,preload:A,context:S,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){oc(()=>{y(),_()});return}(kr(L)||yr(L))&&(y(),$l(e,n,L,"BEFORE_LOAD")),oc(()=>{y(),e.updateMatch(t,I=>({...I,__beforeLoadContext:L})),_()})};let N;try{if(N=a.options.beforeLoad(C),ji(N))return y(),N.catch(L=>{$l(e,n,L,"BEFORE_LOAD")}).then(O)}catch(L){y(),$l(e,n,L,"BEFORE_LOAD")}O(N)},n3=(e,t)=>{const{id:n,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],l=()=>{if(e.router.isServer){const f=J4(e,n,t,o);if(ji(f))return f.then(d)}return d()},u=()=>t3(e,n,t,o),d=()=>{if(Aw(e,n))return;const f=e3(e,n,o);return ji(f)?f.then(u):u()};return l()},r3=(e,t,n)=>{const a=e.router.getMatch(t);if(!a||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([l,u,d])=>{const f=l?.meta,h=l?.links,g=l?.scripts,p=l?.styles;return{meta:f,links:h,headScripts:g,headers:d,scripts:u,styles:p}})},Mw=(e,t,n,a)=>{const o=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:d,cause:f}=e.router.getMatch(t),h=bv(e,n),g=xf(e,t);return{params:l,deps:u,preload:!!g,parentMatchPromise:o,abortController:d,context:h,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:g?"preload":f,route:a,...e.router.options.additionalContext}},q_=async(e,t,n,a)=>{try{const o=e.router.getMatch(t);try{(!e.router.isServer||o.ssr===!0)&&Nw(a);const l=a.options.loader?.(Mw(e,t,n,a)),u=a.options.loader&&ji(l);if((u||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||o._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),a.options.loader){const h=u?await l:l;Li(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,g=>({...g,loaderData:h}))}a._lazyPromise&&await a._lazyPromise;const f=o._nonReactive.minPendingPromise;f&&await f,a._componentsPromise&&await a._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let u=l;const d=o._nonReactive.minPendingPromise;d&&await d,yr(l)&&await a.options.notFoundComponent?.preload?.(),Li(e,e.router.getMatch(t),l);try{a.options.onError?.(l)}catch(f){u=f,Li(e,e.router.getMatch(t),f)}e.updateMatch(t,f=>({...f,error:u,status:"error",isFetching:!1}))}}catch(o){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),Li(e,l,o)}},a3=async(e,t)=>{const{id:n,routeId:a}=e.matches[t];let o=!1,l=!1;const u=e.router.looseRoutesById[a],d=()=>{e.updateMatch(n,g=>({...g,context:bv(e,t)}))};if(Aw(e,n)){if(e.router.isServer)return e.router.getMatch(n)}else{const g=e.router.getMatch(n);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload)return g;await g._nonReactive.loaderPromise;const p=e.router.getMatch(n),y=p._nonReactive.error||p.error;y&&Li(e,p,y)}else{const p=Date.now()-g.updatedAt,y=xf(e,n),_=y?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,S=u.options.shouldReload,w=typeof S=="function"?S(Mw(e,n,t,u)):S,T=!!y&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=zs(),T!==R.preload&&e.updateMatch(n,O=>({...O,preload:T}));const{status:A,invalid:C}=R;o=A==="success"&&(C||(w??p>_)),y&&u.options.preload===!1||(o&&!e.sync?(l=!0,(async()=>{try{await q_(e,n,t,u),d();const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){kr(O)&&await e.router.navigate(O.options)}})()):(A!=="success"||o&&e.sync)&&await q_(e,n,t,u))}}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,g=>({...g,isFetching:h,invalid:!1})),e.router.getMatch(n)):f};async function Y_(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&Rd(t);try{for(let d=0;d<t.matches.length;d++){const f=n3(t,d);ji(f)&&await f}const n=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<n;d++)t.matchPromises.push(a3(t,d));const o=(await Promise.allSettled(t.matchPromises)).filter(d=>d.status==="rejected").map(d=>d.reason);let l;for(const d of o){if(kr(d))throw d;!l&&yr(d)&&(l=d)}for(const d of t.matches){const{id:f,routeId:h}=d,g=t.router.looseRoutesById[h];try{const p=r3(t,f,g);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 u=Rd(t);ji(u)&&await u}catch(n){if(yr(n)&&!t.preload){const a=Rd(t);throw ji(a)&&await a,n}if(kr(n))throw n}return t.matches}async function Nw(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...a}=t.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const a of Dw){const o=e.options[a]?.preload;o&&n.push(o())}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 td(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function Iw(e){for(const t of Dw)if(e.options[t]?.preload)return!0;return!1}const Dw=["component","errorComponent","pendingComponent","notFoundComponent"];function i3(e){return{input:({url:t})=>{for(const n of e)t=Lw(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Og(e[n],t);return t}}}function o3(e){const t=Rw(e.basepath),n=`/${t}`,a=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const d=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return d===o?u.pathname="/":d.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=xd(["/",t,u.pathname]),u)}}function Lw(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 Og(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 _o(e){const t=e.resolvedLocation,n=e.location,a=t?.pathname!==n.pathname,o=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:a,hrefChanged:o,hashChanged:l}}class s3{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 a=this.options,o=this.basepath??a?.basepath??"/",l=this.basepath===void 0,u=a?.rewrite;this.options={...a,...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=b4())),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 v4(c3(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(y=>!["redirected"].includes(y.status))}}}),$4(this));let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||o!==f||u!==h){this.basepath=f;const y=[];Rw(f)!==""&&y.push(o3({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:i3(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:a,processedTree:o}=I4(this.routeTree,this.options.caseSensitive,(u,d)=>{u.init({originalIndex:d})});this.options.routeMasks&&T4(this.options.routeMasks,o),this.routesById=n,this.routesByPath=a,this.processedTree=o;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,a)=>{const o={eventType:n,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(a=>{a.eventType===n.type&&a.fn(n)})},this.parseLocation=(n,a)=>{const o=({href:f,state:h})=>{const g=new URL(f,this.origin),p=Lw(this.rewrite,g),y=this.options.parseSearch(p.search),_=this.options.stringifySearch(y);p.search=_;const S=p.href.replace(p.origin,""),w=p.pathname,T=new URL(p.href),R=Og(this.rewrite,T),A=R.pathname+R.search+R.hash;return{href:S,publicHref:A,url:p,pathname:G_(w),searchStr:_,search:Dr(a?.search,y),hash:p.hash.split("#").reverse()[0]??"",state:Dr(a?.state,h)}},l=o(n),{__tempLocation:u,__tempKey:d}=l.state;if(u&&(!d||d===this.tempLocationKey)){const f=o(u);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=Ud(1e3),this.resolvePathWithBase=(n,a)=>U4({base:n,to:yv(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,a,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:a},o):this.matchRoutesInternal(n,a),this.getMatchedRoutes=n=>u3({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const a=this.getMatch(n);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),a=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...a]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const a=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutes(u,{_buildLocation:!0}),f=kd(d);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??f.fullPath,g=this.resolvePathWithBase(h,"."),p=f.search,y={...f.params},_=l.to?this.resolvePathWithBase(g,`${l.to}`):this.resolvePathWithBase(g,"."),S=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,Di(l.params,y)),w=mm({path:_,params:S}).interpolatedPath,T=this.matchRoutes(w,void 0,{_buildLocation:!0}).map(Z=>this.looseRoutesById[Z.routeId]);if(Object.keys(S).length>0)for(const Z of T){const Y=Z.options.params?.stringify??Z.options.stringifyParams;Y&&Object.assign(S,Y(S))}const R=n.leaveParams?_:G_(mm({path:_,params:S,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let A=p;if(n._includeValidateSearch&&this.options.search?.strict){const Z={};T.forEach(Y=>{if(Y.options.validateSearch)try{Object.assign(Z,Tg(Y.options.validateSearch,{...Z,...A}))}catch{}}),A=Z}A=d3({search:A,dest:l,destRoutes:T,_includeValidateSearch:n._includeValidateSearch}),A=Dr(p,A);const C=this.options.stringifySearch(A),O=l.hash===!0?u.hash:l.hash?Di(l.hash,u.hash):void 0,N=O?`#${O}`:"";let L=l.state===!0?u.state:l.state?Di(l.state,u.state):{};L=Dr(u.state,L);const I=`${R}${C}${N}`,D=new URL(I,this.origin),B=Og(this.rewrite,D);return{publicHref:B.pathname+B.search+B.hash,href:I,url:B,pathname:R,search:A,searchStr:C,state:L,hash:O??"",unmaskOnReload:l.unmaskOnReload}},o=(l={},u)=>{const d=a(l);let f=u?a(u):void 0;if(!f){const h={};if(this.options.routeMasks){const g=A4(d.pathname,this.processedTree);if(g){Object.assign(h,g.params);const{from:p,params:y,..._}=g.route,S=y===!1||y===null?{}:(y??!0)===!0?h:Object.assign(h,Di(y,h));u={from:n.from,..._,params:S},f=a(u)}}}return f&&(d.maskedLocation=f),d};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:a,...o})=>{const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(g=>{o.state[g]=this.latestLocation.state[g]});const h=yo(o.state,this.latestLocation.state);return f.forEach(g=>{delete o.state[g]}),h},u=bo(this.latestLocation.href)===bo(o.href),d=this.commitLocationPromise;if(this.commitLocationPromise=zs(()=>{d?.resolve()}),u&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,url:g,...p}=o;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[o.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:a,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:u,href:d,...f}={})=>{if(d){const p=this.history.location.state.__TSR_index,y=Pd(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 g=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:n,reloadDocument:a,href:o,...l})=>{if(!a&&o)try{new URL(`${o}`),a=!0}catch{}if(a){if(o||(o=this.buildLocation({to:n,...l}).url.href),!l.ignoreBlocker){const d=this.history.getBlockers?.()??[];for(const f of d)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(o):window.location.href=o,Promise.resolve()}return this.buildAndCommitLocation({...l,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const a=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==a.publicHref||a.url.origin!==this.origin){const o=this.getParsedLocationHref(a);throw X4({href:o})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(a=>({...a,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:a.cachedMatches.filter(o=>!n.some(l=>l.id===o.id))}))},this.load=async n=>{let a,o,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",..._o({resolvedLocation:h,location:f})}),this.emit({type:"onBeforeLoad",..._o({resolvedLocation:h,location:f})}),await Y_({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=[],p=[],y=[];oc(()=>{this.__store.setState(_=>{const S=_.matches,w=_.pendingMatches||_.matches;return g=S.filter(T=>!w.some(R=>R.id===T.id)),p=w.filter(T=>!S.some(R=>R.id===T.id)),y=w.filter(T=>S.some(R=>R.id===T.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...g.filter(T=>T.status!=="error"&&T.status!=="notFound")]}}),this.clearExpiredCache()}),[[g,"onLeave"],[p,"onEnter"],[y,"onStay"]].forEach(([_,S])=>{_.forEach(w=>{this.looseRoutesById[w.routeId].options[S]?.(w)})})})})}})}catch(f){kr(f)?(a=f,this.isServer||this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):yr(f)&&(o=f),this.__store.setState(h=>({...h,statusCode:a?a.status:o?404:h.matches.some(g=>g.status==="error")?500:200,redirect:a}))}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 u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(d=>d.status==="error")&&(u=500),u!==void 0&&this.__store.setState(d=>({...d,statusCode:u}))},this.startViewTransition=n=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,d=typeof a.types=="function"?a.types(_o({resolvedLocation:u,location:l})):a.types;if(d===!1){n();return}o={update:n,types:d}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,a)=>{this.startTransition(()=>{const o=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":"";o&&this.__store.setState(l=>({...l,[o]:l[o]?.map(u=>u.id===n?a(u):u)}))})},this.getMatch=n=>{const a=o=>o.id===n;return this.state.cachedMatches.find(a)??this.state.pendingMatches?.find(a)??this.state.matches.find(a)},this.invalidate=n=>{const a=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.__store.setState(o=>({...o,matches:o.matches.map(a),cachedMatches:o.cachedMatches.map(a),pendingMatches:o.pendingMatches?.map(a)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let a=n.url.href;return this.origin&&n.url.origin===this.origin&&(a=a.replace(this.origin,"")||"/"),a},this.resolveRedirect=n=>{if(!n.options.href){const a=this.buildLocation(n.options),o=this.getParsedLocationHref(a);n.options.href=a.href,n.headers.set("Location",o)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const a=n?.filter;a!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(l=>!a(l))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=a=>{const o=this.looseRoutesById[a.routeId];if(!o.options.loader)return!0;const l=(a.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:Date.now()-a.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=Nw,this.preloadRoute=async n=>{const a=this.buildLocation(n);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(d=>d.id)),u=new Set([...l,...this.state.cachedMatches.map(d=>d.id)]);oc(()=>{o.forEach(d=>{u.has(d.id)||this.__store.setState(f=>({...f,cachedMatches:[...f.cachedMatches,d]}))})});try{return o=await Y_({router:this,matches:o,location:a,preload:!0,updateMatch:(d,f)=>{l.has(d)?o=o.map(h=>h.id===d?f(h):h):this.updateMatch(d,f)}}),o}catch(d){if(kr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:a});yr(d)||console.error(d);return}},this.matchRoute=(n,a)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(o);if(a?.pending&&this.state.status!=="pending")return!1;const d=(a?.pending===void 0?!this.state.isLoading:a.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,f=C4(l.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!yo(f.params,n.params,{partial:!0})?!1:a?.includeSearch??!0?yo(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??W4,parseSearch:t.parseSearch??K4}),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 a=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:l}=a;let{matchedRoutes:u}=a,d=!1;(o?o.path!=="/"&&l["**"]:bo(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:d=!0);const f=(()=>{if(d){if(this.options.notFoundMode!=="root")for(let p=u.length-1;p>=0;p--){const y=u[p];if(y.children)return y.id}return fr}})(),h=[],g=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return u.forEach((p,y)=>{const _=h[y-1],[S,w,T]=(()=>{const z=_?.search??t.search,ie=_?._strictSearch??void 0;try{const ee=Tg(p.options.validateSearch,{...z})??void 0;return[{...z,...ee},{...ie,...ee},void 0]}catch(ee){let k=ee;if(ee instanceof Vd||(k=new Vd(ee.message,{cause:ee})),n?.throwOnError)throw k;return[z,{},k]}})(),R=p.options.loaderDeps?.({search:S})??"",A=R?JSON.stringify(R):"",{interpolatedPath:C,usedParams:O}=mm({path:p.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),N=p.id+C+A,L=this.getMatch(N),I=this.state.matches.find(z=>z.routeId===p.id),D=L?._strictParams??O;let B;if(!L){const z=p.options.params?.parse??p.options.parseParams;if(z)try{Object.assign(D,z(D))}catch(ie){if(yr(ie)||kr(ie)?B=ie:B=new l3(ie.message,{cause:ie}),n?.throwOnError)throw B}}Object.assign(l,D);const Z=I?"stay":"enter";let Y;if(L)Y={...L,cause:Z,params:I?Dr(I.params,l):l,_strictParams:D,search:Dr(I?I.search:L.search,S),_strictSearch:w};else{const z=p.options.loader||p.options.beforeLoad||p.lazyFn||Iw(p)?"pending":"success";Y={id:N,ssr:this.isServer?void 0:p.options.ssr,index:y,routeId:p.id,params:I?Dr(I.params,l):l,_strictParams:D,pathname:C,updatedAt:Date.now(),search:I?Dr(I.search,S):S,_strictSearch:w,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:B,__routeContext:void 0,_nonReactive:{loadPromise:zs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:Z,loaderDeps:I?Dr(I.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||(Y.globalNotFound=f===p.id),Y.searchError=T;const V=g(_);Y.context={...V,...Y.__routeContext,...Y.__beforeLoadContext},h.push(Y)}),h.forEach((p,y)=>{const _=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const w=h[y-1],T=g(w);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 Vd extends Error{}class l3 extends Error{}function c3(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Tg(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Vd("Async validation not supported");if(n.issues)throw new Vd(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 u3({pathname:e,routesById:t,processedTree:n}){const a={},o=bo(e);let l;const u=M4(o,n,!0);return u&&(l=u.route,Object.assign(a,u.params)),{matchedRoutes:u?.branch||[t[fr]],routeParams:a,foundRoute:l}}function d3({search:e,dest:t,destRoutes:n,_includeValidateSearch:a}){const o=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 g=({search:p,next:y})=>{let _=p;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(_=f.options.preSearchFilters.reduce((w,T)=>T(w),p));const S=y(_);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((w,T)=>T(w),S):S};h.push(g)}if(a&&f.options.validateSearch){const g=({search:p,next:y})=>{const _=y(p);try{return{..._,...Tg(f.options.validateSearch,_)??void 0}}catch{return _}};h.push(g)}return d.concat(h)},[])??[],l=({search:d})=>t.search?t.search===!0?d:Di(t.search,d):{};o.push(l);const u=(d,f)=>{if(d>=o.length)return f;const h=o[d];return h({search:f,next:p=>u(d+1,p)})};return u(0,e)}const f3="Error preloading route! ☝️";class Pw{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const a=this.options,o=!a?.path&&!a?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=fr:this.parentRoute||$a(!1);let l=o?fr:a?.path;l&&l!=="/"&&(l=xw(l));const u=a?.id||l;let d=o?fr:xd([this.parentRoute.id===fr?"":this.parentRoute.id,u]);l===fr&&(l="/"),d!==fr&&(d=xd(["/",d]));const f=d===fr?"/":xd([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 h3 extends Pw{constructor(t){super(t)}}function _v(e){const t=e.errorComponent??Rf;return b.jsx(p3,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:a})=>n?E.createElement(t,{error:n,reset:a}):e.children})}class p3 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 Rf({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(a=>!a),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 m3({children:e,fallback:t=null}){return g3()?b.jsx(H.Fragment,{children:e}):b.jsx(H.Fragment,{children:t})}function g3(){return H.useSyncExternalStore(v3,()=>!0,()=>!1)}function v3(){return()=>{}}var vm={exports:{}},ym={},bm={exports:{}},_m={};var K_;function y3(){if(K_)return _m;K_=1;var e=$i();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,a=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function d(p,y){var _=y(),S=a({inst:{value:_,getSnapshot:y}}),w=S[0].inst,T=S[1];return l(function(){w.value=_,w.getSnapshot=y,f(w)&&T({inst:w})},[p,_,y]),o(function(){return f(w)&&T({inst:w}),p(function(){f(w)&&T({inst:w})})},[p]),u(_),_}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 g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return _m.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,_m}var W_;function kw(){return W_||(W_=1,bm.exports=y3()),bm.exports}var Z_;function b3(){if(Z_)return ym;Z_=1;var e=$i(),t=kw();function n(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var a=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,d=e.useMemo,f=e.useDebugValue;return ym.useSyncExternalStoreWithSelector=function(h,g,p,y,_){var S=l(null);if(S.current===null){var w={hasValue:!1,value:null};S.current=w}else w=S.current;S=d(function(){function R(L){if(!A){if(A=!0,C=L,L=y(L),_!==void 0&&w.hasValue){var I=w.value;if(_(I,L))return O=I}return O=L}if(I=O,a(C,L))return I;var D=y(L);return _!==void 0&&_(I,D)?(C=L,I):(C=L,O=D)}var A=!1,C,O,N=p===void 0?null:p;return[function(){return R(g())},N===null?void 0:function(){return R(N())}]},[g,p,y,_]);var T=o(h,S[0],S[1]);return u(function(){w.hasValue=!0,w.value=T},[T]),f(T),T},ym}var Q_;function _3(){return Q_||(Q_=1,vm.exports=b3()),vm.exports}var jw=_3();const LB=Io(jw);function E3(e,t=a=>a,n={}){const a=n.equal??S3;return jw.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,a)}function S3(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[a,o]of e)if(!t.has(a)||!Object.is(o,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=X_(e);if(n.length!==X_(t).length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Object.is(e[n[a]],t[n[a]]))return!1;return!0}function X_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Em=E.createContext(null);function Uw(){return typeof document>"u"?Em:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Em,Em)}function tr(e){const t=E.useContext(Uw());return e?.warn,t}function er(e){const t=tr({warn:e?.router===void 0}),n=e?.router||t,a=E.useRef(void 0);return E3(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Dr(a.current,e.select(o));return a.current=l,l}return e.select(o)}return o})}const Of=E.createContext(void 0),w3=E.createContext(void 0);function va(e){const t=E.useContext(e.from?w3:Of);return er({select:a=>{const o=a.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if($a(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function Ev(e){return va({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Sv(e){const{select:t,...n}=e;return va({...n,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function wv(e){return va({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 xv(e){return va({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const nc=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Sm(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 x3(e,t,n={},a={}){E.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{t(l)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,a.disabled,e])}function R3(e){const t=E.useRef(null);return E.useImperativeHandle(e,()=>t.current,[]),t}function Oc(e){const t=tr();return E.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function PB(e){const t=tr(),n=Oc(),a=E.useRef(null);return nc(()=>{a.current!==e&&(n(e),a.current=e)},[t,e,n]),null}var Tf=uw();const Bw=Io(Tf);function O3(e,t){const n=tr(),[a,o]=E.useState(!1),l=E.useRef(!1),u=R3(t),{activeProps:d,inactiveProps:f,activeOptions:h,to:g,preload:p,preloadDelay:y,hashScrollIntoView:_,replace:S,startTransition:w,resetScroll:T,viewTransition:R,children:A,target:C,disabled:O,style:N,className:L,onClick:I,onFocus:D,onMouseEnter:B,onMouseLeave:Z,onTouchStart:Y,ignoreBlocker:V,params:z,search:ie,hash:ee,state:k,mask:F,reloadDocument:G,unsafeRelative:ae,from:ve,_fromLocation:P,...Q}=e,te=er({select:W=>W.location.search,structuralSharing:!0}),se=e.from,ge=E.useMemo(()=>({...e,from:se}),[n,te,se,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),_e=E.useMemo(()=>n.buildLocation({...ge}),[n,ge]),ye=E.useMemo(()=>{if(O)return;let W=_e.maskedLocation?_e.maskedLocation.url.href:_e.url.href,de=!1;return n.origin&&(W.startsWith(n.origin)?W=n.history.createHref(W.replace(n.origin,""))||"/":de=!0),{href:W,external:de}},[O,_e.maskedLocation,_e.url,n.origin,n.history]),Se=E.useMemo(()=>{if(ye?.external)return ye.href;try{return new URL(g),g}catch{}},[g,ye]),le=e.reloadDocument||Se?!1:p??n.options.defaultPreload,je=y??n.options.defaultPreloadDelay??0,at=er({select:W=>{if(Se)return!1;if(h?.exact){if(!j4(W.location.pathname,_e.pathname,n.basepath))return!1}else{const de=Bd(W.location.pathname,n.basepath),me=Bd(_e.pathname,n.basepath);if(!(de.startsWith(me)&&(de.length===me.length||de[me.length]==="/")))return!1}return(h?.includeSearch??!0)&&!yo(W.location.search,_e.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?W.location.hash===_e.hash:!0}}),Je=E.useCallback(()=>{n.preloadRoute({...ge}).catch(W=>{console.warn(W),console.warn(f3)})},[n,ge]),Ft=E.useCallback(W=>{W?.isIntersecting&&Je()},[Je]);x3(u,Ft,N3,{disabled:!!O||le!=="viewport"}),E.useEffect(()=>{l.current||!O&&le==="render"&&(Je(),l.current=!0)},[O,Je,le]);const re=W=>{const de=W.currentTarget.getAttribute("target"),me=C!==void 0?C:de;if(!O&&!I3(W)&&!W.defaultPrevented&&(!me||me==="_self")&&W.button===0){W.preventDefault(),Tf.flushSync(()=>{o(!0)});const he=n.subscribe("onResolved",()=>{he(),o(!1)});n.navigate({...ge,replace:S,resetScroll:T,hashScrollIntoView:_,startTransition:w,viewTransition:R,ignoreBlocker:V})}};if(Se)return{...Q,ref:u,href:Se,...A&&{children:A},...C&&{target:C},...O&&{disabled:O},...N&&{style:N},...L&&{className:L},...I&&{onClick:I},...D&&{onFocus:D},...B&&{onMouseEnter:B},...Z&&{onMouseLeave:Z},...Y&&{onTouchStart:Y}};const be=W=>{O||le&&Je()},Le=be,Ye=W=>{if(!(O||!le))if(!je)Je();else{const de=W.target;if(Gl.has(de))return;const me=setTimeout(()=>{Gl.delete(de),Je()},je);Gl.set(de,me)}},At=W=>{if(O||!le||!je)return;const de=W.target,me=Gl.get(de);me&&(clearTimeout(me),Gl.delete(de))},Ue=at?Di(d,{})??T3:wm,et=at?wm:Di(f,{})??wm,j=[L,Ue.className,et.className].filter(Boolean).join(" "),q=(N||Ue.style||et.style)&&{...N,...Ue.style,...et.style};return{...Q,...Ue,...et,href:ye?.href,ref:u,onClick:ql([I,re]),onFocus:ql([D,be]),onMouseEnter:ql([B,Ye]),onMouseLeave:ql([Z,At]),onTouchStart:ql([Y,Le]),disabled:!!O,target:C,...q&&{style:q},...j&&{className:j},...O&&A3,...at&&C3,...a&&M3}}const wm={},T3={className:"active"},A3={role:"link","aria-disabled":!0},C3={"data-status":"active","aria-current":"page"},M3={"data-transitioning":"transitioning"},Gl=new WeakMap,N3={rootMargin:"100px"},ql=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Rv=E.forwardRef((e,t)=>{const{_asChild:n,...a}=e,{type:o,ref:l,...u}=O3(a,t),d=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;return n===void 0&&delete u.disabled,E.createElement(n||"a",{...u,ref:l},d)});function I3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class D3 extends Pw{constructor(t){super(t),this.useMatch=n=>va({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({...n,from:this.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>xv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Sv({...n,from:this.id}),this.useLoaderData=n=>Ev({...n,from:this.id}),this.useNavigate=()=>Oc({from:this.fullPath}),this.Link=H.forwardRef((n,a)=>b.jsx(Rv,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function An(e){return new D3(e)}class L3 extends h3{constructor(t){super(t),this.useMatch=n=>va({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({...n,from:this.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>xv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Sv({...n,from:this.id}),this.useLoaderData=n=>Ev({...n,from:this.id}),this.useNavigate=()=>Oc({from:this.fullPath}),this.Link=H.forwardRef((n,a)=>b.jsx(Rv,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function P3(e){return new L3(e)}function J_(e){return typeof e=="object"?new eE(e,{silent:!0}).createRoute(e):new eE(e,{silent:!0}).createRoute}class eE{constructor(t,n){this.path=t,this.createRoute=a=>{this.silent;const o=An(a);return o.isRoot=!1,o},this.silent=n?.silent}}class tE{constructor(t){this.useMatch=n=>va({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({from:this.options.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>xv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Sv({...n,from:this.options.id}),this.useLoaderData=n=>Ev({...n,from:this.options.id}),this.useNavigate=()=>{const n=tr();return Oc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function nE(e){return typeof e=="object"?new tE(e):t=>new tE({id:e,...t})}function Ln(e,t){let n,a,o,l;const u=()=>(n||(n=e().then(f=>{n=void 0,a=f.default}).catch(f=>{if(o=f,S4(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),l=!0)}})),n),d=function(h){if(l)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)throw u();return E.createElement(a,h)};return d.preload=u,d}function k3(){const e=tr(),t=E.useRef({router:e,mounted:!1}),[n,a]=E.useState(!1),{hasPendingMatches:o,isLoading:l}=er({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(y=>y.status==="pending")}),structuralSharing:!0}),u=Sm(l),d=l||n||o,f=Sm(d),h=l||o,g=Sm(h);return e.startTransition=p=>{a(!0),E.startTransition(()=>{p(),a(!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 bo(e.latestLocation.publicHref)!==bo(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{p()}},[e,e.history]),nc(()=>{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]),nc(()=>{u&&!l&&e.emit({type:"onLoad",..._o(e.state)})},[u,e,l]),nc(()=>{g&&!h&&e.emit({type:"onBeforeRouteMount",..._o(e.state)})},[h,g,e]),nc(()=>{if(f&&!d){const p=_o(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),p.hrefChanged&&G4(e)}},[d,f,e]),null}function j3(e){const t=er({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(_v,{getResetKey:()=>t,onCatch:(n,a)=>{if(yr(n))e.onCatch?.(n,a);else throw n},errorComponent:({error:n})=>{if(yr(n))return e.fallback?.(n);throw n},children:e.children})}function U3(){return b.jsx("p",{children:"Not Found"})}function Ms(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(U3,{})}function B3({children:e}){const t=tr();return t.isServer?b.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function z3(){const e=tr();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||Rg)(e.latestLocation),a=n!==Rg(e.latestLocation)?n:void 0,o={storageKey:zd,shouldScrollRestoration:!0};return a&&(o.key=a),b.jsx(B3,{children:`(${Ow.toString()})(${JSON.stringify(o)})`})}const Fw=E.memo(function({matchId:t}){const n=tr(),a=er({select:R=>{const A=R.matches.find(C=>C.id===t);return $a(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),o=n.routesById[a.routeId],l=o.options.pendingComponent??n.options.defaultPendingComponent,u=l?b.jsx(l,{}):null,d=o.options.errorComponent??n.options.defaultErrorComponent,f=o.options.onCatch??n.options.defaultOnCatch,h=o.isRoot?o.options.notFoundComponent??n.options.notFoundRoute?.options.component:o.options.notFoundComponent,g=a.ssr===!1||a.ssr==="data-only",p=(!o.isRoot||o.options.wrapInSuspense||g)&&(o.options.wrapInSuspense??l??(o.options.errorComponent?.preload||g))?E.Suspense:Ms,y=d?_v:Ms,_=h?j3:Ms,S=er({select:R=>R.loadedAt}),w=er({select:R=>{const A=R.matches.findIndex(C=>C.id===t);return R.matches[A-1]?.routeId}}),T=o.isRoot?o.options.shellComponent??Ms:Ms;return b.jsxs(T,{children:[b.jsx(Of.Provider,{value:t,children:b.jsx(p,{fallback:u,children:b.jsx(y,{getResetKey:()=>S,errorComponent:d||Rf,onCatch:(R,A)=>{if(yr(R))throw R;f?.(R,A)},children:b.jsx(_,{fallback:R=>{if(!h||R.routeId&&R.routeId!==a.routeId||!R.routeId&&!o.isRoot)throw R;return E.createElement(h,R)},children:g||a._displayPending?b.jsx(m3,{fallback:u,children:b.jsx(rE,{matchId:t})}):b.jsx(rE,{matchId:t})})})})}),w===fr&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(F3,{}),b.jsx(z3,{})]}):null]})});function F3(){const e=tr(),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",..._o(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const rE=E.memo(function({matchId:t}){const n=tr(),{match:a,key:o,routeId:l}=er({select:f=>{const h=f.matches.find(S=>S.id===t),g=h.routeId,y=(n.routesById[g].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:g,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:y?JSON.stringify(y):void 0,routeId:g,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),u=n.routesById[l],d=E.useMemo(()=>{const f=u.options.component??n.options.defaultComponent;return f?b.jsx(f,{},o):b.jsx(Vw,{})},[o,u.options.component,n.options.defaultComponent]);if(a._displayPending)throw n.getMatch(a.id)?._nonReactive.displayPendingPromise;if(a._forcePending)throw n.getMatch(a.id)?._nonReactive.minPendingPromise;if(a.status==="pending"){const f=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const h=n.getMatch(a.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const g=zs();h._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),h._nonReactive.minPendingPromise=void 0},f)}}throw n.getMatch(a.id)?._nonReactive.loadPromise}if(a.status==="notFound")return $a(yr(a.error)),zw(n,u,a.error);if(a.status==="redirected")throw $a(kr(a.error)),n.getMatch(a.id)?._nonReactive.loadPromise;if(a.status==="error"){if(n.isServer){const f=(u.options.errorComponent??n.options.defaultErrorComponent)||Rf;return b.jsx(f,{error:a.error,reset:void 0,info:{componentStack:""}})}throw a.error}return d}),Vw=E.memo(function(){const t=tr(),n=E.useContext(Of),a=er({select:h=>h.matches.find(g=>g.id===n)?.routeId}),o=t.routesById[a],l=er({select:h=>{const p=h.matches.find(y=>y.id===n);return $a(p),p.globalNotFound}}),u=er({select:h=>{const g=h.matches,p=g.findIndex(y=>y.id===n);return g[p+1]?.id}}),d=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(l)return zw(t,o,void 0);if(!u)return null;const f=b.jsx(Fw,{matchId:u});return a===fr?b.jsx(E.Suspense,{fallback:d,children:f}):f});function V3(){const e=tr(),n=e.routesById[fr].options.pendingComponent??e.options.defaultPendingComponent,a=n?b.jsx(n,{}):null,o=e.isServer||typeof document<"u"&&e.ssr?Ms:E.Suspense,l=b.jsxs(o,{fallback:a,children:[!e.isServer&&b.jsx(k3,{}),b.jsx(H3,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:l}):l}function H3(){const e=tr(),t=er({select:o=>o.matches[0]?.id}),n=er({select:o=>o.loadedAt}),a=t?b.jsx(Fw,{matchId:t}):null;return b.jsx(Of.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:b.jsx(_v,{getResetKey:()=>n,errorComponent:Rf,onCatch:o=>{o.message||o.toString()},children:a})})}const $3=e=>new G3(e);class G3 extends s3{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=J_,globalThis.createLazyFileRoute=nE):typeof window<"u"&&(window.createFileRoute=J_,window.createLazyFileRoute=nE);function q3({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const a=Uw(),o=b.jsx(a.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:o}):o}function Y3({router:e,...t}){return b.jsx(q3,{router:e,...t,children:b.jsx(V3,{})})}var K3={},aE={};const Od=Object.create(null),Yl=e=>K3||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Od:globalThis),Pr=new Proxy(Od,{get(e,t){return Yl()[t]??Od[t]},has(e,t){return t in Yl()||t in Od},set(e,t,n){const a=Yl(!0);return a[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=Yl(!0);return delete n[t],!0},ownKeys(){const e=Yl(!0);return Object.keys(e)}});function Qt(e,t){return typeof process<"u"&&aE?aE[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const Kl=1,gn=4,ca=8,pr=24,iE={eterm:gn,cons25:gn,console:gn,cygwin:gn,dtterm:gn,gnome:gn,hurd:gn,jfbterm:gn,konsole:gn,kterm:gn,mlterm:gn,mosh:pr,putty:gn,st:gn,"rxvt-unicode-24bit":pr,terminator:pr,"xterm-kitty":pr},W3=new Map(Object.entries({APPVEYOR:ca,BUILDKITE:ca,CIRCLECI:pr,DRONE:ca,GITEA_ACTIONS:pr,GITHUB_ACTIONS:pr,GITLAB_CI:ca,TRAVIS:ca})),Z3=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function Q3(){if(Qt("FORCE_COLOR")!==void 0)switch(Qt("FORCE_COLOR")){case"":case"1":case"true":return gn;case"2":return ca;case"3":return pr;default:return Kl}if(Qt("NODE_DISABLE_COLORS")!==void 0&&Qt("NODE_DISABLE_COLORS")!==""||Qt("NO_COLOR")!==void 0&&Qt("NO_COLOR")!==""||Qt("TERM")==="dumb")return Kl;if(Qt("TMUX"))return pr;if("TF_BUILD"in Pr&&"AGENT_NAME"in Pr)return gn;if("CI"in Pr){for(const{0:e,1:t}of W3)if(e in Pr)return t;return Qt("CI_NAME")==="codeship"?ca:Kl}if("TEAMCITY_VERSION"in Pr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Qt("TEAMCITY_VERSION"))!==null?gn:Kl;switch(Qt("TERM_PROGRAM")){case"iTerm.app":return!Qt("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Qt("TERM_PROGRAM_VERSION"))!==null?ca:pr;case"HyperTerm":case"MacTerm":return pr;case"Apple_Terminal":return ca}if(Qt("COLORTERM")==="truecolor"||Qt("COLORTERM")==="24bit")return pr;if(Qt("TERM")){if(/truecolor/.exec(Qt("TERM"))!==null)return pr;if(/^xterm-256/.exec(Qt("TERM"))!==null)return ca;const e=Qt("TERM").toLowerCase();if(iE[e])return iE[e];if(Z3.some(t=>t.exec(e)!==null))return gn}return Qt("COLORTERM")?gn:Kl}const ua={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"}},Ag=["debug","info","success","warn","error"];function X3(e,t){return Ag.indexOf(t)>=Ag.indexOf(e)}const J3={info:ua.fg.blue,success:ua.fg.green,warn:ua.fg.yellow,error:ua.fg.red,debug:ua.fg.magenta},e5=(e,t,n)=>{const a=new Date().toISOString();return n?`${ua.dim}${a}${ua.reset} ${J3[e]}${e.toUpperCase()}${ua.reset} ${ua.bright}[Better Auth]:${ua.reset} ${t}`:`${a} ${e.toUpperCase()} [Better Auth]: ${t}`},t5=e=>{const t="error",n=Q3()!==1,a=(o,l,u=[])=>{if(!X3(t,o))return;const d=e5(o,l,n);{o==="error"?console.error(d,...u):o==="warn"?console.warn(d,...u):console.log(d,...u);return}};return{...Object.fromEntries(Ag.map(o=>[o,(...[l,...u])=>a(o,l,u)])),get level(){return t}}};t5();var sc=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function n5(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new sc(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function r5(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new sc(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof sc?t:new sc(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function xm(e,t="/api/auth"){if(r5(e),n5(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function a5(e,t,n,a,o){if(e)return xm(e,t);{const l=Pr.BETTER_AUTH_URL||Pr.NEXT_PUBLIC_BETTER_AUTH_URL||Pr.PUBLIC_BETTER_AUTH_URL||Pr.NUXT_PUBLIC_BETTER_AUTH_URL||Pr.NUXT_PUBLIC_AUTH_URL||(Pr.BASE_URL!=="/"?Pr.BASE_URL:void 0);if(l)return xm(l,t)}if(typeof window<"u"&&window.location)return xm(window.location.origin,t)}const i5={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*:/},o5=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,oE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},s5=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function l5(e){return e instanceof Date&&!isNaN(e.getTime())}function c5(e){const t=s5.exec(e);if(!t)return null;const[,n,a,o,l,u,d,f,h,g,p]=t;let y=new Date(Date.UTC(parseInt(n,10),parseInt(a,10)-1,parseInt(o,10),parseInt(l,10),parseInt(u,10),parseInt(d,10),f?parseInt(f.padEnd(3,"0"),10):0));if(h){const _=(parseInt(g,10)*60+parseInt(p,10))*(h==="+"?-1:1);y.setUTCMinutes(y.getUTCMinutes()+_)}return l5(y)?y:null}function u5(e,t={}){const{strict:n=!1,warnings:a=!1,reviver:o,parseDates:l=!0}=t;if(typeof e!="string")return e;const u=e.trim();if(u.length>0&&u[0]==='"'&&u.endsWith('"')&&!u.slice(1,-1).includes('"'))return u.slice(1,-1);const d=u.toLowerCase();if(d.length<=9&&d in oE)return oE[d];if(!o5.test(u)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(i5).some(([f,h])=>{const g=h.test(u);return g&&a&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${f} pattern`),g})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(u,(h,g)=>{if(h==="__proto__"||h==="constructor"&&g&&typeof g=="object"&&"prototype"in g){a&&console.warn(`[better-json] Dropping "${h}" key to prevent prototype pollution`);return}if(l&&typeof g=="string"){const p=c5(g);if(p)return p}return o?o(h,g):g})}catch(f){if(n)throw f;return e}}function d5(e,t={strict:!0}){return u5(e,t)}let $r=[],Ri=0;const nd=4,go=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(a){return n.lc=t.push(a),()=>{for(let l=Ri+nd;l<$r.length;)$r[l]===a?$r.splice(l,nd):l+=nd;let o=t.indexOf(a);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(a,o){let l=!$r.length;for(let u of t)$r.push(u,n.value,a,o);if(l){for(Ri=0;Ri<$r.length;Ri+=nd)$r[Ri]($r[Ri+1],$r[Ri+2],$r[Ri+3]);$r.length=0}},off(){},set(a){let o=n.value;o!==a&&(n.value=a,n.notify(o))},subscribe(a){let o=n.listen(a);return a(n.value),o},value:e};return n},f5=5,rd=6,ad=10;let h5=(e,t,n,a)=>(e.events=e.events||{},e.events[n+ad]||(e.events[n+ad]=a(o=>{e.events[n].reduceRight((l,u)=>(u(l),l),{shared:{},...o})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let o=e.events[n],l=o.indexOf(t);o.splice(l,1),o.length||(delete e.events[n],e.events[n+ad](),delete e.events[n+ad])}),p5=1e3,Hw=(e,t)=>h5(e,a=>{let o=t(a);o&&e.events[rd].push(o)},f5,a=>{let o=e.listen;e.listen=(...u)=>(!e.lc&&!e.active&&(e.active=!0,a()),o(...u));let l=e.off;return e.events[rd]=[],e.off=()=>{l(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let u of e.events[rd])u();e.events[rd]=[]}},p5)},()=>{e.listen=o,e.off=l}});function m5(e,t,n){let a=new Set(t).add(void 0);return e.listen((o,l,u)=>{a.has(u)&&n(o,l,u)})}var g5=Object.defineProperty,v5=Object.defineProperties,y5=Object.getOwnPropertyDescriptors,sE=Object.getOwnPropertySymbols,b5=Object.prototype.hasOwnProperty,_5=Object.prototype.propertyIsEnumerable,lE=(e,t,n)=>t in e?g5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yr=(e,t)=>{for(var n in t||(t={}))b5.call(t,n)&&lE(e,n,t[n]);if(sE)for(var n of sE(t))_5.call(t,n)&&lE(e,n,t[n]);return e},la=(e,t)=>v5(e,y5(t)),E5=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},S5=async(e,t)=>{var n,a,o,l,u,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 g of t?.plugins||[]){if(g.init){const p=await((n=g.init)==null?void 0:n.call(g,e.toString(),t));f=p.options||f,e=p.url}h.onRequest.push((a=g.hooks)==null?void 0:a.onRequest),h.onResponse.push((o=g.hooks)==null?void 0:o.onResponse),h.onSuccess.push((l=g.hooks)==null?void 0:l.onSuccess),h.onError.push((u=g.hooks)==null?void 0:u.onError),h.onRetry.push((d=g.hooks)==null?void 0:d.onRetry)}return{url:e,options:f,hooks:h}},cE=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}},w5=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 x5(e){if(typeof e=="number")return new cE({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new cE(e);case"exponential":return new w5(e);default:throw new Error("Invalid retry strategy")}}var R5=async e=>{const t={},n=async a=>typeof a=="function"?await a():a;if(e?.auth){if(e.auth.type==="Bearer"){const a=await n(e.auth.token);if(!a)return t;t.authorization=`Bearer ${a}`}else if(e.auth.type==="Basic"){const a=n(e.auth.username),o=n(e.auth.password);if(!a||!o)return t;t.authorization=`Basic ${btoa(`${a}:${o}`)}`}else if(e.auth.type==="Custom"){const a=n(e.auth.value);if(!a)return t;t.authorization=`${n(e.auth.prefix)} ${a}`}}return t},O5=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function T5(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const a=t.split(";").shift()||"";return O5.test(a)?"json":n.has(a)||a.startsWith("text/")?"text":"blob"}function A5(e){try{return JSON.parse(e),!0}catch{return!1}}function $w(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 uE(e){try{return JSON.parse(e)}catch{return e}}function dE(e){return typeof e=="function"}function C5(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&dE(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&dE(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function M5(e){const t=new Headers(e?.headers),n=await R5(e);for(const[a,o]of Object.entries(n||{}))t.set(a,o);if(!t.has("content-type")){const a=N5(e?.body);a&&t.set("content-type",a)}return t}function N5(e){return $w(e)?"application/json":null}function I5(e){if(!e?.body)return null;const t=new Headers(e?.headers);if($w(e.body)&&!t.has("content-type")){for(const[n,a]of Object.entries(e?.body))a instanceof Date&&(e.body[n]=a.toISOString());return JSON.stringify(e.body)}return e.body}function D5(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const a=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return qw.includes(a)?a.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function L5(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var P5=class Gw extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,Gw.prototype)}};async function Td(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new P5(n.issues);return n.value}var qw=["get","post","put","patch","delete"],k5=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var a,o,l,u;const d=((o=(a=e.plugins)==null?void 0:a.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:o.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))),(u=d.config)!=null&&u.baseURL&&f.startsWith(d.config.baseURL)&&(f=f.replace(d.config.baseURL,""));const h=d.schema[f];if(h){let g=la(Yr({},n),{method:h.method,output:h.output});return n?.disableValidation||(g=la(Yr({},g),{body:h.input?await Td(h.input,n?.body):n?.body,params:h.params?await Td(h.params,n?.params):n?.params,query:h.query?await Td(h.query,n?.query):n?.query})),{url:t,options:g}}}return{url:t,options:n}}}),j5=e=>{async function t(n,a){const o=la(Yr(Yr({},e),a),{plugins:[...e?.plugins||[],k5(e||{})]});if(e?.catchAllError)try{return await Cg(n,o)}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 Cg(n,o)}return t};function U5(e,t){let{baseURL:n,params:a,query:o}=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];qw.includes(p)&&(e=e.replace(`@${p}/`,"/"))}l.endsWith("/")||(l+="/");let[u,d]=e.replace(l,"").split("?");const f=new URLSearchParams(d);for(const[p,y]of Object.entries(o||{}))y!=null&&f.set(p,String(y));if(a)if(Array.isArray(a)){const p=u.split("/").filter(y=>y.startsWith(":"));for(const[y,_]of p.entries()){const S=a[y];u=u.replace(_,S)}}else for(const[p,y]of Object.entries(a))u=u.replace(`:${p}`,String(y));u=u.split("/").map(encodeURIComponent).join("/"),u.startsWith("/")&&(u=u.slice(1));let h=f.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",l.startsWith("http")?new URL(`${u}${h}`,l):`${l}${u}${h}`}var Cg=async(e,t)=>{var n,a,o,l,u,d,f,h;const{hooks:g,url:p,options:y}=await S5(e,t),_=C5(y),S=new AbortController,w=(n=y.signal)!=null?n:S.signal,T=U5(p,y),R=I5(y),A=await M5(y),C=D5(p,y);let O=la(Yr({},y),{url:T,headers:A,body:R,method:C,signal:w});for(const z of g.onRequest)if(z){const ie=await z(O);ie instanceof Object&&(O=ie)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((a=t?.body)==null?void 0:a.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:N}=L5(y,S);let L=await _(O.url,O);N();const I={response:L,request:O};for(const z of g.onResponse)if(z){const ie=await z(la(Yr({},I),{response:(o=t?.hookOptions)!=null&&o.cloneResponse?L.clone():L}));ie instanceof Response?L=ie:ie instanceof Object&&(L=ie.response)}if(L.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const ie=T5(L),ee={data:"",response:L,request:O};if(ie==="json"||ie==="text"){const k=await L.text(),G=await((l=O.jsonParser)!=null?l:uE)(k);ee.data=G}else ee.data=await L[ie]();O?.output&&O.output&&!O.disableValidation&&(ee.data=await Td(O.output,ee.data));for(const k of g.onSuccess)k&&await k(la(Yr({},ee),{response:(u=t?.hookOptions)!=null&&u.cloneResponse?L.clone():L}));return t?.throw?ee.data:{data:ee.data,error:null}}const D=(d=t?.jsonParser)!=null?d:uE,B=await L.text(),Z=A5(B),Y=Z?await D(B):null,V={response:L,responseText:B,request:O,error:la(Yr({},Y),{status:L.status,statusText:L.statusText})};for(const z of g.onError)z&&await z(la(Yr({},V),{response:(f=t?.hookOptions)!=null&&f.cloneResponse?L.clone():L}));if(t?.retry){const z=x5(t.retry),ie=(h=t.retryAttempt)!=null?h:0;if(await z.shouldAttemptRetry(ie,L)){for(const k of g.onRetry)k&&await k(I);const ee=z.getDelay(ie);return await new Promise(k=>setTimeout(k,ee)),await Cg(e,la(Yr({},t),{retryAttempt:ie+1}))}}if(t?.throw)throw new E5(L.status,L.statusText,Z?Y:B);return{data:null,error:la(Yr({},Y),{status:L.status,statusText:L.statusText})}};const Rm=Symbol.for("better-auth:broadcast-channel"),B5=()=>Math.floor(Date.now()/1e3);var z5=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:B5()}))}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(a=>a(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function Om(e="better-auth.message"){return globalThis[Rm]||(globalThis[Rm]=new z5(e)),globalThis[Rm]}const Tm=Symbol.for("better-auth:focus-manager");var F5=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 fE(){return globalThis[Tm]||(globalThis[Tm]=new F5),globalThis[Tm]}const Am=Symbol.for("better-auth:online-manager");var V5=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 Cm(){return globalThis[Am]||(globalThis[Am]=new V5),globalThis[Am]}const H5=()=>typeof window>"u",Ls=(e,t,n,a)=>{const o=go({data:null,error:null,isPending:!0,isRefetching:!1,refetch:d=>l(d)}),l=async d=>new Promise(f=>{const h=typeof a=="function"?a({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):a;n(t,{...h,query:{...h?.query,...d?.query},async onSuccess(g){o.set({data:g.data,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await h?.onSuccess?.(g)},async onError(g){const{request:p}=g,y=typeof p.retry=="number"?p.retry:p.retry?.attempts,_=p.retryAttempt||0;y&&_<y||(o.set({error:g.error,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await h?.onError?.(g))},async onRequest(g){const p=o.get();o.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await h?.onRequest?.(g)}}).catch(g=>{o.set({error:g,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch})}).finally(()=>{f(void 0)})});e=Array.isArray(e)?e:[e];let u=!1;for(const d of e)d.subscribe(async()=>{H5()||(u?await l():Hw(o,()=>{const f=setTimeout(async()=>{u||(await l(),u=!0)},0);return()=>{o.off(),d.off(),clearTimeout(f)}}))});return o},Es=()=>Math.floor(Date.now()/1e3),$5=5;function G5(e){const{sessionAtom:t,sessionSignal:n,$fetch:a,options:o={}}=e,l=o.sessionOptions?.refetchInterval??0,u=o.sessionOptions?.refetchOnWindowFocus??!0,d=o.sessionOptions?.refetchWhenOffline??!1,f={lastSync:0,lastSessionRequest:0,cachedSession:void 0},h=()=>d||Cm().isOnline,g=A=>{if(!h())return;if(A?.event==="storage"){f.lastSync=Es(),n.set(!n.get());return}const C=t.get();if(A?.event==="poll"){f.lastSessionRequest=Es(),a("/get-session").then(O=>{t.set({...C,data:O.data,error:O.error||null}),f.lastSync=Es(),n.set(!n.get())}).catch(()=>{});return}A?.event==="visibilitychange"&&Es()-f.lastSessionRequest<$5&&C?.data!==null&&C?.data!==void 0||(C?.data===null||C?.data===void 0||A?.event==="visibilitychange")&&(A?.event==="visibilitychange"&&(f.lastSessionRequest=Es()),f.lastSync=Es(),n.set(!n.get()))},p=A=>{Om().post({event:"session",data:{trigger:A},clientId:Math.random().toString(36).substring(7)})},y=()=>{l&&l>0&&(f.pollInterval=setInterval(()=>{t.get()?.data&&g({event:"poll"})},l*1e3))},_=()=>{f.unsubscribeBroadcast=Om().subscribe(()=>{g({event:"storage"})})},S=()=>{u&&(f.unsubscribeFocus=fE().subscribe(()=>{g({event:"visibilitychange"})}))},w=()=>{f.unsubscribeOnline=Cm().subscribe(A=>{A&&g({event:"visibilitychange"})})};return{init:()=>{y(),_(),S(),w(),Om().setup(),fE().setup(),Cm().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:g,broadcastSessionUpdate:p}}const q5={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 Y5(e,t){const n=go(!1),a=Ls(n,"/get-session",e,{method:"GET"});return Hw(a,()=>{const o=G5({sessionAtom:a,sessionSignal:n,$fetch:e,options:t});return o.init(),()=>{o.cleanup()}}),{session:a,$sessionSignal:n}}const K5=(e,t)=>{const n="credentials"in Request.prototype,a=a5(e?.baseURL,e?.basePath)??"/api/auth",o=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:u,onError:d,onRequest:f,onResponse:h,...g}=e?.fetchOptions||{},p=j5({baseURL:a,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?d5(O,{strict:!1}):null},customFetchImpl:fetch,...g,plugins:[l,...g.plugins||[],...e?.disableDefaultFetchPlugins?[]:[q5],...o]}),{$sessionSignal:y,session:_}=Y5(p,e),S=e?.plugins||[];let w={},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 S)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,N)=>{T[O].subscribe(N)},atoms:T};for(const O of S)O.getActions&&Object.assign(w,O.getActions?.(p,C,e));return{get baseURL(){return a},pluginsActions:w,pluginsAtoms:T,pluginPathMethods:R,atomListeners:A,$fetch:p,$store:C}};function W5(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function Z5(e,t,n){const a=t[e],{fetchOptions:o,query:l,...u}=n||{};return a||(o?.method?o.method:u&&Object.keys(u).length>0?"POST":"GET")}function Q5(e,t,n,a,o){function l(u=[]){return new Proxy(function(){},{get(d,f){if(typeof f!="string"||f==="then"||f==="catch"||f==="finally")return;const h=[...u,f];let g=e;for(const p of h)if(g&&typeof g=="object"&&p in g)g=g[p];else{g=void 0;break}return typeof g=="function"||W5(g)?g:l(h)},apply:async(d,f,h)=>{const g="/"+u.map(A=>A.replace(/[A-Z]/g,C=>`-${C.toLowerCase()}`)).join("/"),p=h[0]||{},y=h[1]||{},{query:_,fetchOptions:S,...w}=p,T={...y,...S},R=Z5(g,n,p);return await t(g,{...T,body:R==="GET"?void 0:{...w,...T?.body||{}},query:_||T?.query,method:R,async onSuccess(A){if(await T?.onSuccess?.(A),!o||T.disableSignal)return;const C=o.filter(O=>O.matcher(g));if(C.length)for(const O of C){const N=a[O.signal];if(!N)return;const L=N.get();setTimeout(()=>{N.set(!L)},10)}}})}})}return l()}function X5(e,t={}){let n=E.useRef(e.get());const{keys:a,deps:o=[e,a]}=t;let l=E.useCallback(d=>{const f=h=>{n.current!==h&&(n.current=h,d())};return f(e.value),a?.length?m5(e,a,f):e.listen(f)},o),u=()=>n.current;return E.useSyncExternalStore(l,u,u)}function J5(e){return`use${eM(e)}`}function eM(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Yw(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:a,$fetch:o,$store:l,atomListeners:u}=K5(e);let d={};for(const[f,h]of Object.entries(a))d[J5(f)]=()=>X5(h);return Q5({...n,...d,$fetch:o,$store:l},o,t,a,u)}function tM(e){return{authorize(t,n="AND"){let a=!1;for(const[o,l]of Object.entries(t)){const u=e[o];if(!u)return{success:!1,error:`You are not allowed to access resource: ${o}`};if(Array.isArray(l))a=l.every(d=>u.includes(d));else if(typeof l=="object"){const d=l;d.connector==="OR"?a=d.actions.some(f=>u.includes(f)):a=d.actions.every(f=>u.includes(f))}else throw new sc("Invalid access control request");if(a&&n==="OR")return{success:a};if(!a&&n==="AND")return{success:!1,error:`unauthorized to access resource "${o}"`}}return a?{success:a}:{success:!1,error:"Not authorized"}},statements:e}}function Kw(e){return{newRole(t){return tM(t)},statements:e}}const nM={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},Ww=Kw(nM),Zw=Ww.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),Qw=Ww.newRole({user:[],session:[]}),rM={admin:Zw,user:Qw},aM=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||rM;for(const a of t)if(n[a]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},iM={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Ov=Kw(iM),Xw=Ov.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),Jw=Ov.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ex=Ov.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),oM={admin:Xw,owner:Jw,member:ex},sM=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),a=e.options.creatorRole||"owner",o=n.includes(a),l=e.allowCreatorAllPermissions||!1;if(o&&l)return!0;for(const u of n)if(t[u]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},lM=e=>({id:"two-factor",$InferServerPlugin:{},atomListeners:[{matcher:t=>t.startsWith("/two-factor/"),signal:"$sessionSignal"}],pathMethods:{"/two-factor/disable":"POST","/two-factor/enable":"POST","/two-factor/send-otp":"POST","/two-factor/generate-backup-codes":"POST"},fetchPlugins:[{id:"two-factor",name:"two-factor",hooks:{async onSuccess(t){t.data?.twoFactorRedirect}}}]}),cM=e=>{const t={admin:Zw,user:Qw,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>aM({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},uM=()=>({id:"anonymous",$InferServerPlugin:{},pathMethods:{"/sign-in/anonymous":"POST"},atomListeners:[{matcher:e=>e==="/sign-in/anonymous",signal:"$sessionSignal"}]}),dM=()=>({id:"api-key",$InferServerPlugin:{},pathMethods:{"/api-key/create":"POST","/api-key/delete":"POST","/api-key/delete-all-expired-api-keys":"POST"}}),fM=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),hM=()=>({id:"generic-oauth-client",$InferServerPlugin:{}}),tx=()=>({id:"magic-link",$InferServerPlugin:{}}),pM=()=>({id:"multi-session",$InferServerPlugin:{},atomListeners:[{matcher(e){return e==="/multi-session/set-active"},signal:"$sessionSignal"}]});let co=null;function hE(){return typeof window<"u"&&"IdentityCredential"in window}const mM=e=>({id:"one-tap",fetchPlugins:[{id:"fedcm-signout-handle",name:"FedCM Sign-Out Handler",hooks:{async onResponse(t){t.request.url.toString().includes("/sign-out")&&(e.promptOptions?.fedCM===!1||!hE()||navigator.credentials.preventSilentAccess())}}}],getActions:(t,n)=>({oneTap:async(a,o)=>{if(co&&!co.signal.aborted){console.warn("A Google One Tap request is already in progress. Please wait.");return}if(typeof window>"u"||!window.document){console.warn("Google One Tap is only available in browser environments");return}async function l(p){await t("/one-tap/callback",{method:"POST",body:{idToken:p},...a?.fetchOptions,...o}),(!a?.fetchOptions&&!o||a?.callbackURL)&&(window.location.href=a?.callbackURL??"/")}const{autoSelect:u,cancelOnTapOutside:d,context:f}=a??{},h=f??e.context??"signin",g={fedCM:async()=>{try{const p=await navigator.credentials.get({identity:{context:h,providers:[{configURL:"https://accounts.google.com/gsi/fedcm.json",clientId:e.clientId,nonce:a?.nonce}]},mediation:u?"optional":"required",signal:co?.signal});if(!p?.token){a?.onPromptNotification?.(void 0);return}try{await l(p.token);return}catch(y){throw console.error("Error during FedCM callback:",y),y}}catch(p){if(p?.code&&(p.code===19||p.code===20)){a?.onPromptNotification?.(void 0);return}throw p}},oneTap:()=>new Promise((p,y)=>{let _=!1;const S=e.promptOptions?.baseDelay??1e3,w=e.promptOptions?.maxAttempts??5;window.google?.accounts.id.initialize({client_id:e.clientId,callback:async R=>{_=!0;try{await l(R.credential),p()}catch(A){console.error("Error during One Tap callback:",A),y(A)}},auto_select:u,cancel_on_tap_outside:d,context:h,ux_mode:a?.uxMode||"popup",nonce:a?.nonce,itp_support:!0,...e.additionalOptions});const T=R=>{_||window.google?.accounts.id.prompt(A=>{if(!_){if(A.isDismissedMoment&&A.isDismissedMoment())if(R<w){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else a?.onPromptNotification?.(A);else if(A.isSkippedMoment&&A.isSkippedMoment())if(R<w){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else a?.onPromptNotification?.(A)}})};T(0)})};co&&co?.abort(),co=new AbortController;try{const p=e.promptOptions?.fedCM===!1||!hE()?"oneTap":"fedCM";p==="oneTap"&&await gM(),await g[p]()}catch(p){throw console.error("Error during Google One Tap flow:",p),p}finally{co=null}}}),getAtoms(t){return{}}}),gM=()=>new Promise(e=>{if(window.googleScriptInitialized){e();return}const t=document.createElement("script");t.src="https://accounts.google.com/gsi/client",t.async=!0,t.defer=!0,t.onload=()=>{window.googleScriptInitialized=!0,e()},document.head.appendChild(t)}),vM=e=>sM(e,e.options.roles||oM),nx=e=>{const t=go(!1),n=go(!1),a=go(!1),o=go(!1),l={admin:Xw,member:ex,owner:Jw,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(u,d,f)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:h=>vM({role:h.role,options:{ac:e?.ac,roles:l},permissions:h.permissions??h.permission})}}),getAtoms:u=>{const d=Ls(t,"/organization/list",u,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:a,$activeMemberRoleSignal:o,activeOrganization:Ls([n],"/organization/get-full-organization",u,()=>({method:"GET"})),listOrganizations:d,activeMember:Ls([a],"/organization/get-active-member",u,{method:"GET"}),activeMemberRole:Ls([o],"/organization/get-active-member-role",u,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(u){return u==="/organization/create"||u==="/organization/delete"||u==="/organization/update"},signal:"$listOrg"},{matcher(u){return u.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(u){return u.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(u){return u.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(u){return u.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},yM=()=>({id:"username",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/sign-in/username",signal:"$sessionSignal"}]}),bM=e=>({id:"sso-client",$InferServerPlugin:{}}),_M=Yw({plugins:[nx({}),cM(),bM(),tx()]});function rx(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=rx(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function ax(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rx(e))&&(a&&(a+=" "),a+=t);return a}const EM=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},SM=(e,t)=>({classGroupId:e,validator:t}),ix=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hd="-",pE=[],wM="arbitrary..",xM=e=>{const t=OM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return RM(u);const d=u.split(Hd),f=d[0]===""&&d.length>1?1:0;return ox(d,f,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=a[u],h=n[u];return f?h?EM(h,f):f:h||pE}return n[u]||pE}}},ox=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],l=n.nextPart.get(o);if(l){const h=ox(e,t+1,l);if(h)return h}const u=n.validators;if(u===null)return;const d=t===0?e.join(Hd):e.slice(t).join(Hd),f=u.length;for(let h=0;h<f;h++){const g=u[h];if(g.validator(d))return g.classGroupId}},RM=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?wM+a:void 0})(),OM=e=>{const{theme:t,classGroups:n}=e;return TM(n,t)},TM=(e,t)=>{const n=ix();for(const a in e){const o=e[a];Tv(o,n,a,t)}return n},Tv=(e,t,n,a)=>{const o=e.length;for(let l=0;l<o;l++){const u=e[l];AM(u,t,n,a)}},AM=(e,t,n,a)=>{if(typeof e=="string"){CM(e,t,n);return}if(typeof e=="function"){MM(e,t,n,a);return}NM(e,t,n,a)},CM=(e,t,n)=>{const a=e===""?t:sx(t,e);a.classGroupId=n},MM=(e,t,n,a)=>{if(IM(e)){Tv(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(SM(n,e))},NM=(e,t,n,a)=>{const o=Object.entries(e),l=o.length;for(let u=0;u<l;u++){const[d,f]=o[u];Tv(f,sx(t,d),n,a)}},sx=(e,t)=>{let n=e;const a=t.split(Hd),o=a.length;for(let l=0;l<o;l++){const u=a[l];let d=n.nextPart.get(u);d||(d=ix(),n.nextPart.set(u,d)),n=d}return n},IM=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,DM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(l,u)=>{n[l]=u,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=a[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},Mg="!",mE=":",LM=[],gE=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),PM=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const l=[];let u=0,d=0,f=0,h;const g=o.length;for(let w=0;w<g;w++){const T=o[w];if(u===0&&d===0){if(T===mE){l.push(o.slice(f,w)),f=w+1;continue}if(T==="/"){h=w;continue}}T==="["?u++:T==="]"?u--:T==="("?d++:T===")"&&d--}const p=l.length===0?o:o.slice(f);let y=p,_=!1;p.endsWith(Mg)?(y=p.slice(0,-1),_=!0):p.startsWith(Mg)&&(y=p.slice(1),_=!0);const S=h&&h>f?h-f:void 0;return gE(l,_,y,S)};if(t){const o=t+mE,l=a;a=u=>u.startsWith(o)?l(u.slice(o.length)):gE(LM,!1,u,void 0,!0)}if(n){const o=a;a=l=>n({className:l,parseClassName:o})}return a},kM=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let l=0;l<n.length;l++){const u=n[l],d=u[0]==="[",f=t.has(u);d||f?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(u)):o.push(u)}return o.length>0&&(o.sort(),a.push(...o)),a}},jM=e=>({cache:DM(e.cacheSize),parseClassName:PM(e),sortModifiers:kM(e),...xM(e)}),UM=/\s+/,BM=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:l}=t,u=[],d=e.trim().split(UM);let f="";for(let h=d.length-1;h>=0;h-=1){const g=d[h],{isExternal:p,modifiers:y,hasImportantModifier:_,baseClassName:S,maybePostfixModifierPosition:w}=n(g);if(p){f=g+(f.length>0?" "+f:f);continue}let T=!!w,R=a(T?S.substring(0,w):S);if(!R){if(!T){f=g+(f.length>0?" "+f:f);continue}if(R=a(S),!R){f=g+(f.length>0?" "+f:f);continue}T=!1}const A=y.length===0?"":y.length===1?y[0]:l(y).join(":"),C=_?A+Mg:A,O=C+R;if(u.indexOf(O)>-1)continue;u.push(O);const N=o(R,T);for(let L=0;L<N.length;++L){const I=N[L];u.push(C+I)}f=g+(f.length>0?" "+f:f)}return f},zM=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=lx(n))&&(o&&(o+=" "),o+=a);return o},lx=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=lx(e[a]))&&(n&&(n+=" "),n+=t);return n},FM=(e,...t)=>{let n,a,o,l;const u=f=>{const h=t.reduce((g,p)=>p(g),e());return n=jM(h),a=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const h=a(f);if(h)return h;const g=BM(f,n);return o(f,g),g};return l=u,(...f)=>l(zM(...f))},VM=[],ln=e=>{const t=n=>n[e]||VM;return t.isThemeGetter=!0,t},cx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ux=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HM=/^\d+\/\d+$/,$M=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GM=/\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$/,qM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,YM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ss=e=>HM.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),Oi=e=>!!e&&Number.isInteger(Number(e)),Mm=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),za=e=>$M.test(e),WM=()=>!0,ZM=e=>GM.test(e)&&!qM.test(e),dx=()=>!1,QM=e=>YM.test(e),XM=e=>KM.test(e),JM=e=>!Ae(e)&&!Ce(e),e6=e=>qs(e,px,dx),Ae=e=>cx.test(e),uo=e=>qs(e,mx,ZM),Nm=e=>qs(e,i6,Qe),vE=e=>qs(e,fx,dx),t6=e=>qs(e,hx,XM),id=e=>qs(e,gx,QM),Ce=e=>ux.test(e),Wl=e=>Ys(e,mx),n6=e=>Ys(e,o6),yE=e=>Ys(e,fx),r6=e=>Ys(e,px),a6=e=>Ys(e,hx),od=e=>Ys(e,gx,!0),qs=(e,t,n)=>{const a=cx.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ys=(e,t,n=!1)=>{const a=ux.exec(e);return a?a[1]?t(a[1]):n:!1},fx=e=>e==="position"||e==="percentage",hx=e=>e==="image"||e==="url",px=e=>e==="length"||e==="size"||e==="bg-size",mx=e=>e==="length",i6=e=>e==="number",o6=e=>e==="family-name",gx=e=>e==="shadow",s6=()=>{const e=ln("color"),t=ln("font"),n=ln("text"),a=ln("font-weight"),o=ln("tracking"),l=ln("leading"),u=ln("breakpoint"),d=ln("container"),f=ln("spacing"),h=ln("radius"),g=ln("shadow"),p=ln("inset-shadow"),y=ln("text-shadow"),_=ln("drop-shadow"),S=ln("blur"),w=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"],N=()=>[...O(),Ce,Ae],L=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],D=()=>[Ce,Ae,f],B=()=>[Ss,"full","auto",...D()],Z=()=>[Oi,"none","subgrid",Ce,Ae],Y=()=>["auto",{span:["full",Oi,Ce,Ae]},Oi,Ce,Ae],V=()=>[Oi,"auto",Ce,Ae],z=()=>["auto","min","max","fr",Ce,Ae],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...D()],F=()=>[Ss,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],G=()=>[e,Ce,Ae],ae=()=>[...O(),yE,vE,{position:[Ce,Ae]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",r6,e6,{size:[Ce,Ae]}],Q=()=>[Mm,Wl,uo],te=()=>["","none","full",h,Ce,Ae],se=()=>["",Qe,Wl,uo],ge=()=>["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"],ye=()=>[Qe,Mm,yE,vE],Se=()=>["","none",S,Ce,Ae],le=()=>["none",Qe,Ce,Ae],je=()=>["none",Qe,Ce,Ae],at=()=>[Qe,Ce,Ae],Je=()=>[Ss,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[za],breakpoint:[za],color:[WM],container:[za],"drop-shadow":[za],ease:["in","out","in-out"],font:[JM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[za],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[za],shadow:[za],spacing:["px",Qe],text:[za],"text-shadow":[za],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ss,Ae,Ce,T]}],container:["container"],columns:[{columns:[Qe,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:N()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Oi,"auto",Ce,Ae]}],basis:[{basis:[Ss,"full","auto",d,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,Ss,"auto","initial","none",Ae]}],grow:[{grow:["",Qe,Ce,Ae]}],shrink:[{shrink:["",Qe,Ce,Ae]}],order:[{order:[Oi,"first","last","none",Ce,Ae]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],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:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"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:[u]},...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,Wl,uo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Ce,Nm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mm,Ae]}],"font-family":[{font:[n6,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:[o,Ce,Ae]}],"line-clamp":[{"line-clamp":[Qe,"none",Ce,Nm]}],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:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",Ce,uo]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Qe,"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:ae()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Oi,Ce,Ae],radial:["",Ce,Ae],conic:[Oi,Ce,Ae]},a6,t6]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,Ce,Ae]}],"outline-w":[{outline:["",Qe,Wl,uo]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",g,od,id]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",p,od,id]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Qe,uo]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",y,od,id]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Qe,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":[Qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Ce,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Ae]}],filter:[{filter:["","none",Ce,Ae]}],blur:[{blur:Se()}],brightness:[{brightness:[Qe,Ce,Ae]}],contrast:[{contrast:[Qe,Ce,Ae]}],"drop-shadow":[{"drop-shadow":["","none",_,od,id]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Qe,Ce,Ae]}],"hue-rotate":[{"hue-rotate":[Qe,Ce,Ae]}],invert:[{invert:["",Qe,Ce,Ae]}],saturate:[{saturate:[Qe,Ce,Ae]}],sepia:[{sepia:["",Qe,Ce,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ae]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,Ce,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,Ce,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,Ce,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,Ce,Ae]}],"backdrop-invert":[{"backdrop-invert":["",Qe,Ce,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,Ce,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,Ce,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,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:[Qe,"initial",Ce,Ae]}],ease:[{ease:["linear","initial",R,Ce,Ae]}],delay:[{delay:[Qe,Ce,Ae]}],animate:[{animate:["none",A,Ce,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Ce,Ae]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:je()}],"scale-x":[{"scale-x":je()}],"scale-y":[{"scale-y":je()}],"scale-z":[{"scale-z":je()}],"scale-3d":["scale-3d"],skew:[{skew:at()}],"skew-x":[{"skew-x":at()}],"skew-y":[{"skew-y":at()}],transform:[{transform:[Ce,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ce,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",...G()]}],"stroke-w":[{stroke:[Qe,Wl,uo,Nm]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},l6=FM(s6);var dt;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const l={};for(const u of o)l[u]=u;return l},e.getValidEnumValues=o=>{const l=e.objectKeys(o).filter(d=>typeof o[o[d]]!="number"),u={};for(const d of l)u[d]=o[d];return e.objectValues(u)},e.objectValues=o=>e.objectKeys(o).map(function(l){return o[l]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const l=[];for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&l.push(u);return l},e.find=(o,l)=>{for(const u of o)if(l(u))return u},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function a(o,l=" | "){return o.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}e.joinValues=a,e.jsonStringifyReplacer=(o,l)=>typeof l=="bigint"?l.toString():l})(dt||(dt={}));var bE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(bE||(bE={}));const Oe=dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Mi=e=>{switch(typeof e){case"undefined":return Oe.undefined;case"string":return Oe.string;case"number":return Number.isNaN(e)?Oe.nan:Oe.number;case"boolean":return Oe.boolean;case"function":return Oe.function;case"bigint":return Oe.bigint;case"symbol":return Oe.symbol;case"object":return Array.isArray(e)?Oe.array:e===null?Oe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Oe.promise:typeof Map<"u"&&e instanceof Map?Oe.map:typeof Set<"u"&&e instanceof Set?Oe.set:typeof Date<"u"&&e instanceof Date?Oe.date:Oe.object;default:return Oe.unknown}},Ee=dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ga extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(l){return l.message},a={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(o);else if(u.code==="invalid_return_type")o(u.returnTypeError);else if(u.code==="invalid_arguments")o(u.argumentsError);else if(u.path.length===0)a._errors.push(n(u));else{let d=a,f=0;for(;f<u.path.length;){const h=u.path[f];f===u.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(u))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}};return o(this),a}static assert(t){if(!(t instanceof Ga))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,dt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const o of this.issues)if(o.path.length>0){const l=o.path[0];n[l]=n[l]||[],n[l].push(t(o))}else a.push(t(o));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Ga.create=e=>new Ga(e);const Ng=(e,t)=>{let n;switch(e.code){case Ee.invalid_type:e.received===Oe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ee.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,dt.jsonStringifyReplacer)}`;break;case Ee.unrecognized_keys:n=`Unrecognized key(s) in object: ${dt.joinValues(e.keys,", ")}`;break;case Ee.invalid_union:n="Invalid input";break;case Ee.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${dt.joinValues(e.options)}`;break;case Ee.invalid_enum_value:n=`Invalid enum value. Expected ${dt.joinValues(e.options)}, received '${e.received}'`;break;case Ee.invalid_arguments:n="Invalid function arguments";break;case Ee.invalid_return_type:n="Invalid function return type";break;case Ee.invalid_date:n="Invalid date";break;case Ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:dt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ee.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ee.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ee.custom:n="Invalid input";break;case Ee.invalid_intersection_types:n="Intersection results could not be merged";break;case Ee.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ee.not_finite:n="Number must be finite";break;default:n=t.defaultError,dt.assertNever(e)}return{message:n}};let c6=Ng;function u6(){return c6}const d6=e=>{const{data:t,path:n,errorMaps:a,issueData:o}=e,l=[...n,...o.path||[]],u={...o,path:l};if(o.message!==void 0)return{...o,path:l,message:o.message};let d="";const f=a.filter(h=>!!h).slice().reverse();for(const h of f)d=h(u,{data:t,defaultError:d}).message;return{...o,path:l,message:d}};function xe(e,t){const n=u6(),a=d6({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ng?void 0:Ng].filter(o=>!!o)});e.common.issues.push(a)}class Bn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const o of n){if(o.status==="aborted")return Be;o.status==="dirty"&&t.dirty(),a.push(o.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const o of n){const l=await o.key,u=await o.value;a.push({key:l,value:u})}return Bn.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const o of n){const{key:l,value:u}=o;if(l.status==="aborted"||u.status==="aborted")return Be;l.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||o.alwaysSet)&&(a[l.value]=u.value)}return{status:t.value,value:a}}}const Be=Object.freeze({status:"aborted"}),rc=e=>({status:"dirty",value:e}),Ur=e=>({status:"valid",value:e}),_E=e=>e.status==="aborted",EE=e=>e.status==="dirty",Vs=e=>e.status==="valid",$d=e=>typeof Promise<"u"&&e instanceof Promise;var De;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(De||(De={}));class ya{constructor(t,n,a,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const SE=(e,t)=>{if(Vs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ga(e.common.issues);return this._error=n,this._error}}};function qe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:o}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(u,d)=>{const{message:f}=e;return u.code==="invalid_enum_value"?{message:f??d.defaultError}:typeof d.data>"u"?{message:f??a??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:f??n??d.defaultError}},description:o}}class lt{get description(){return this._def.description}_getType(t){return Mi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Bn,ctx:{common:t.parent.common,data:t.data,parsedType:Mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if($d(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)},o=this._parseSync({data:t,path:a.path,parent:a});return SE(a,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return Vs(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>Vs(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)},o=this._parse({data:t,path:a.path,parent:a}),l=await($d(o)?o:Promise.resolve(o));return SE(a,l)}refine(t,n){const a=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,l)=>{const u=t(o),d=()=>l.addIssue({code:Ee.custom,...a(o)});return typeof Promise<"u"&&u instanceof Promise?u.then(f=>f?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(t,n){return this._refinement((a,o)=>t(a)?!0:(o.addIssue(typeof n=="function"?n(a,o):n),!1))}_refinement(t){return new Fi({schema:this,typeName:ze.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ha.create(this,this._def)}nullable(){return Ao.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ma.create(this)}promise(){return Jd.create(this,this._def)}or(t){return Kd.create([this,t],this._def)}and(t){return Wd.create(this,t,this._def)}transform(t){return new Fi({...qe(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ef({...qe(this._def),innerType:this,defaultValue:n,typeName:ze.ZodDefault})}brand(){return new _x({typeName:ze.ZodBranded,type:this,...qe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new tf({...qe(this._def),innerType:this,catchValue:n,typeName:ze.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Cv.create(this,t)}readonly(){return nf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const f6=/^c[^\s-]{8,}$/i,h6=/^[0-9a-z]+$/,p6=/^[0-9A-HJKMNP-TV-Z]{26}$/i,m6=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,g6=/^[a-z0-9_-]{21}$/i,v6=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,y6=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,b6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Im;const E6=/^(?:(?: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])$/,S6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,w6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,x6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,R6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,O6=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,vx="((\\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])))",T6=new RegExp(`^${vx}$`);function yx(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function A6(e){return new RegExp(`^${yx(e)}$`)}function C6(e){let t=`${vx}T${yx(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function M6(e,t){return!!((t==="v4"||!t)&&E6.test(e)||(t==="v6"||!t)&&w6.test(e))}function N6(e,t){if(!v6.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(a));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function I6(e,t){return!!((t==="v4"||!t)&&S6.test(e)||(t==="v6"||!t)&&x6.test(e))}class ha extends lt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Oe.string){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_type,expected:Oe.string,received:l.parsedType}),Be}const a=new Bn;let o;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="max")t.data.length>l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="length"){const u=t.data.length>l.value,d=t.data.length<l.value;(u||d)&&(o=this._getOrReturnCtx(t,o),u?xe(o,{code:Ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&xe(o,{code:Ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),a.dirty())}else if(l.kind==="email")b6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"email",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="emoji")Im||(Im=new RegExp(_6,"u")),Im.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"emoji",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="uuid")m6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"uuid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="nanoid")g6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"nanoid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid")f6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid2")h6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid2",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="ulid")p6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ulid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),xe(o,{validation:"url",code:Ee.invalid_string,message:l.message}),a.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"regex",code:Ee.invalid_string,message:l.message}),a.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),a.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:{startsWith:l.value},message:l.message}),a.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:{endsWith:l.value},message:l.message}),a.dirty()):l.kind==="datetime"?C6(l).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:"datetime",message:l.message}),a.dirty()):l.kind==="date"?T6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:"date",message:l.message}),a.dirty()):l.kind==="time"?A6(l).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:"time",message:l.message}),a.dirty()):l.kind==="duration"?y6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"duration",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="ip"?M6(t.data,l.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ip",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="jwt"?N6(t.data,l.alg)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"jwt",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="cidr"?I6(t.data,l.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cidr",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="base64"?R6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="base64url"?O6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64url",code:Ee.invalid_string,message:l.message}),a.dirty()):dt.assertNever(l);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(o=>t.test(o),{validation:n,code:Ee.invalid_string,...De.errToObj(a)})}_addCheck(t){return new ha({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...De.errToObj(t)})}url(t){return this._addCheck({kind:"url",...De.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...De.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...De.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...De.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...De.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...De.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...De.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...De.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...De.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...De.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...De.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...De.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...De.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...De.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...De.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...De.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...De.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...De.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...De.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...De.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...De.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...De.errToObj(n)})}nonempty(t){return this.min(1,De.errToObj(t))}trim(){return new ha({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ha({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ha({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ha.create=e=>new ha({checks:[],typeName:ze.ZodString,coerce:e?.coerce??!1,...qe(e)});function D6(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,o=n>a?n:a,l=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return l%u/10**o}class xo extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Oe.number){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_type,expected:Oe.number,received:l.parsedType}),Be}let a;const o=new Bn;for(const l of this._def.checks)l.kind==="int"?dt.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="multipleOf"?D6(t.data,l.value)!==0&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.not_finite,message:l.message}),o.dirty()):dt.assertNever(l);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,De.toString(n))}gt(t,n){return this.setLimit("min",t,!1,De.toString(n))}lte(t,n){return this.setLimit("max",t,!0,De.toString(n))}lt(t,n){return this.setLimit("max",t,!1,De.toString(n))}setLimit(t,n,a,o){return new xo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:De.toString(o)}]})}_addCheck(t){return new xo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:De.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:De.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:De.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:De.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:De.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&dt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}xo.create=e=>new xo({checks:[],typeName:ze.ZodNumber,coerce:e?.coerce||!1,...qe(e)});class Ro extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Oe.bigint)return this._getInvalidInput(t);let a;const o=new Bn;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):dt.assertNever(l);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return xe(n,{code:Ee.invalid_type,expected:Oe.bigint,received:n.parsedType}),Be}gte(t,n){return this.setLimit("min",t,!0,De.toString(n))}gt(t,n){return this.setLimit("min",t,!1,De.toString(n))}lte(t,n){return this.setLimit("max",t,!0,De.toString(n))}lt(t,n){return this.setLimit("max",t,!1,De.toString(n))}setLimit(t,n,a,o){return new Ro({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:De.toString(o)}]})}_addCheck(t){return new Ro({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:De.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ro.create=e=>new Ro({checks:[],typeName:ze.ZodBigInt,coerce:e?.coerce??!1,...qe(e)});class Gd extends lt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Oe.boolean){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.boolean,received:a.parsedType}),Be}return Ur(t.data)}}Gd.create=e=>new Gd({typeName:ze.ZodBoolean,coerce:e?.coerce||!1,...qe(e)});class Hs extends lt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Oe.date){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_type,expected:Oe.date,received:l.parsedType}),Be}if(Number.isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_date}),Be}const a=new Bn;let o;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),a.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),a.dirty()):dt.assertNever(l);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Hs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:De.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:De.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Hs.create=e=>new Hs({checks:[],coerce:e?.coerce||!1,typeName:ze.ZodDate,...qe(e)});class wE extends lt{_parse(t){if(this._getType(t)!==Oe.symbol){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.symbol,received:a.parsedType}),Be}return Ur(t.data)}}wE.create=e=>new wE({typeName:ze.ZodSymbol,...qe(e)});class qd extends lt{_parse(t){if(this._getType(t)!==Oe.undefined){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.undefined,received:a.parsedType}),Be}return Ur(t.data)}}qd.create=e=>new qd({typeName:ze.ZodUndefined,...qe(e)});class Yd extends lt{_parse(t){if(this._getType(t)!==Oe.null){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.null,received:a.parsedType}),Be}return Ur(t.data)}}Yd.create=e=>new Yd({typeName:ze.ZodNull,...qe(e)});class mc extends lt{constructor(){super(...arguments),this._any=!0}_parse(t){return Ur(t.data)}}mc.create=e=>new mc({typeName:ze.ZodAny,...qe(e)});class Ig extends lt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ur(t.data)}}Ig.create=e=>new Ig({typeName:ze.ZodUnknown,...qe(e)});class zi extends lt{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:Ee.invalid_type,expected:Oe.never,received:n.parsedType}),Be}}zi.create=e=>new zi({typeName:ze.ZodNever,...qe(e)});class xE extends lt{_parse(t){if(this._getType(t)!==Oe.undefined){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.void,received:a.parsedType}),Be}return Ur(t.data)}}xE.create=e=>new xE({typeName:ze.ZodVoid,...qe(e)});class ma extends lt{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),o=this._def;if(n.parsedType!==Oe.array)return xe(n,{code:Ee.invalid_type,expected:Oe.array,received:n.parsedType}),Be;if(o.exactLength!==null){const u=n.data.length>o.exactLength.value,d=n.data.length<o.exactLength.value;(u||d)&&(xe(n,{code:u?Ee.too_big:Ee.too_small,minimum:d?o.exactLength.value:void 0,maximum:u?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),a.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(xe(n,{code:Ee.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),a.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(xe(n,{code:Ee.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((u,d)=>o.type._parseAsync(new ya(n,u,n.path,d)))).then(u=>Bn.mergeArray(a,u));const l=[...n.data].map((u,d)=>o.type._parseSync(new ya(n,u,n.path,d)));return Bn.mergeArray(a,l)}get element(){return this._def.type}min(t,n){return new ma({...this._def,minLength:{value:t,message:De.toString(n)}})}max(t,n){return new ma({...this._def,maxLength:{value:t,message:De.toString(n)}})}length(t,n){return new ma({...this._def,exactLength:{value:t,message:De.toString(n)}})}nonempty(t){return this.min(1,t)}}ma.create=(e,t)=>new ma({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...qe(t)});function Ns(e){if(e instanceof en){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=Ha.create(Ns(a))}return new en({...e._def,shape:()=>t})}else return e instanceof ma?new ma({...e._def,type:Ns(e.element)}):e instanceof Ha?Ha.create(Ns(e.unwrap())):e instanceof Ao?Ao.create(Ns(e.unwrap())):e instanceof Oo?Oo.create(e.items.map(t=>Ns(t))):e}class en extends lt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=dt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Oe.object){const h=this._getOrReturnCtx(t);return xe(h,{code:Ee.invalid_type,expected:Oe.object,received:h.parsedType}),Be}const{status:a,ctx:o}=this._processInputParams(t),{shape:l,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof zi&&this._def.unknownKeys==="strip"))for(const h in o.data)u.includes(h)||d.push(h);const f=[];for(const h of u){const g=l[h],p=o.data[h];f.push({key:{status:"valid",value:h},value:g._parse(new ya(o,p,o.path,h)),alwaysSet:h in o.data})}if(this._def.catchall instanceof zi){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of d)f.push({key:{status:"valid",value:g},value:{status:"valid",value:o.data[g]}});else if(h==="strict")d.length>0&&(xe(o,{code:Ee.unrecognized_keys,keys:d}),a.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of d){const p=o.data[g];f.push({key:{status:"valid",value:g},value:h._parse(new ya(o,p,o.path,g)),alwaysSet:g in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of f){const p=await g.key,y=await g.value;h.push({key:p,value:y,alwaysSet:g.alwaysSet})}return h}).then(h=>Bn.mergeObjectSync(a,h)):Bn.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(t){return De.errToObj,new en({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{const o=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:De.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new en({...this._def,unknownKeys:"strip"})}passthrough(){return new en({...this._def,unknownKeys:"passthrough"})}extend(t){return new en({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new en({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ze.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new en({...this._def,catchall:t})}pick(t){const n={};for(const a of dt.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new en({...this._def,shape:()=>n})}omit(t){const n={};for(const a of dt.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new en({...this._def,shape:()=>n})}deepPartial(){return Ns(this)}partial(t){const n={};for(const a of dt.objectKeys(this.shape)){const o=this.shape[a];t&&!t[a]?n[a]=o:n[a]=o.optional()}return new en({...this._def,shape:()=>n})}required(t){const n={};for(const a of dt.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let l=this.shape[a];for(;l instanceof Ha;)l=l._def.innerType;n[a]=l}return new en({...this._def,shape:()=>n})}keyof(){return bx(dt.objectKeys(this.shape))}}en.create=(e,t)=>new en({shape:()=>e,unknownKeys:"strip",catchall:zi.create(),typeName:ze.ZodObject,...qe(t)});en.strictCreate=(e,t)=>new en({shape:()=>e,unknownKeys:"strict",catchall:zi.create(),typeName:ze.ZodObject,...qe(t)});en.lazycreate=(e,t)=>new en({shape:e,unknownKeys:"strip",catchall:zi.create(),typeName:ze.ZodObject,...qe(t)});class Kd extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function o(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const u=l.map(d=>new Ga(d.ctx.common.issues));return xe(n,{code:Ee.invalid_union,unionErrors:u}),Be}if(n.common.async)return Promise.all(a.map(async l=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(o);{let l;const u=[];for(const f of a){const h={...n,common:{...n.common,issues:[]},parent:null},g=f._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!l&&(l={result:g,ctx:h}),h.common.issues.length&&u.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=u.map(f=>new Ga(f));return xe(n,{code:Ee.invalid_union,unionErrors:d}),Be}}get options(){return this._def.options}}Kd.create=(e,t)=>new Kd({options:e,typeName:ze.ZodUnion,...qe(t)});const Va=e=>e instanceof Qd?Va(e.schema):e instanceof Fi?Va(e.innerType()):e instanceof Xd?[e.value]:e instanceof To?e.options:e instanceof Lg?dt.objectValues(e.enum):e instanceof ef?Va(e._def.innerType):e instanceof qd?[void 0]:e instanceof Yd?[null]:e instanceof Ha?[void 0,...Va(e.unwrap())]:e instanceof Ao?[null,...Va(e.unwrap())]:e instanceof _x||e instanceof nf?Va(e.unwrap()):e instanceof tf?Va(e._def.innerType):[];class Av extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Oe.object)return xe(n,{code:Ee.invalid_type,expected:Oe.object,received:n.parsedType}),Be;const a=this.discriminator,o=n.data[a],l=this.optionsMap.get(o);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(xe(n,{code:Ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),Be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,a){const o=new Map;for(const l of n){const u=Va(l.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const d of u){if(o.has(d))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(d)}`);o.set(d,l)}}return new Av({typeName:ze.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...qe(a)})}}function Dg(e,t){const n=Mi(e),a=Mi(t);if(e===t)return{valid:!0,data:e};if(n===Oe.object&&a===Oe.object){const o=dt.objectKeys(t),l=dt.objectKeys(e).filter(d=>o.indexOf(d)!==-1),u={...e,...t};for(const d of l){const f=Dg(e[d],t[d]);if(!f.valid)return{valid:!1};u[d]=f.data}return{valid:!0,data:u}}else if(n===Oe.array&&a===Oe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let l=0;l<e.length;l++){const u=e[l],d=t[l],f=Dg(u,d);if(!f.valid)return{valid:!1};o.push(f.data)}return{valid:!0,data:o}}else return n===Oe.date&&a===Oe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Wd extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=(l,u)=>{if(_E(l)||_E(u))return Be;const d=Dg(l.value,u.value);return d.valid?((EE(l)||EE(u))&&n.dirty(),{status:n.value,value:d.data}):(xe(a,{code:Ee.invalid_intersection_types}),Be)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([l,u])=>o(l,u)):o(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Wd.create=(e,t,n)=>new Wd({left:e,right:t,typeName:ze.ZodIntersection,...qe(n)});class Oo extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.array)return xe(a,{code:Ee.invalid_type,expected:Oe.array,received:a.parsedType}),Be;if(a.data.length<this._def.items.length)return xe(a,{code:Ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&a.data.length>this._def.items.length&&(xe(a,{code:Ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...a.data].map((u,d)=>{const f=this._def.items[d]||this._def.rest;return f?f._parse(new ya(a,u,a.path,d)):null}).filter(u=>!!u);return a.common.async?Promise.all(l).then(u=>Bn.mergeArray(n,u)):Bn.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new Oo({...this._def,rest:t})}}Oo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Oo({items:e,typeName:ze.ZodTuple,rest:null,...qe(t)})};class Zd extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.object)return xe(a,{code:Ee.invalid_type,expected:Oe.object,received:a.parsedType}),Be;const o=[],l=this._def.keyType,u=this._def.valueType;for(const d in a.data)o.push({key:l._parse(new ya(a,d,a.path,d)),value:u._parse(new ya(a,a.data[d],a.path,d)),alwaysSet:d in a.data});return a.common.async?Bn.mergeObjectAsync(n,o):Bn.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,a){return n instanceof lt?new Zd({keyType:t,valueType:n,typeName:ze.ZodRecord,...qe(a)}):new Zd({keyType:ha.create(),valueType:t,typeName:ze.ZodRecord,...qe(n)})}}class RE extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.map)return xe(a,{code:Ee.invalid_type,expected:Oe.map,received:a.parsedType}),Be;const o=this._def.keyType,l=this._def.valueType,u=[...a.data.entries()].map(([d,f],h)=>({key:o._parse(new ya(a,d,a.path,[h,"key"])),value:l._parse(new ya(a,f,a.path,[h,"value"]))}));if(a.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const f of u){const h=await f.key,g=await f.value;if(h.status==="aborted"||g.status==="aborted")return Be;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const f of u){const h=f.key,g=f.value;if(h.status==="aborted"||g.status==="aborted")return Be;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}}}}RE.create=(e,t,n)=>new RE({valueType:t,keyType:e,typeName:ze.ZodMap,...qe(n)});class gc extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.set)return xe(a,{code:Ee.invalid_type,expected:Oe.set,received:a.parsedType}),Be;const o=this._def;o.minSize!==null&&a.data.size<o.minSize.value&&(xe(a,{code:Ee.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&a.data.size>o.maxSize.value&&(xe(a,{code:Ee.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const l=this._def.valueType;function u(f){const h=new Set;for(const g of f){if(g.status==="aborted")return Be;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const d=[...a.data.values()].map((f,h)=>l._parse(new ya(a,f,a.path,h)));return a.common.async?Promise.all(d).then(f=>u(f)):u(d)}min(t,n){return new gc({...this._def,minSize:{value:t,message:De.toString(n)}})}max(t,n){return new gc({...this._def,maxSize:{value:t,message:De.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}gc.create=(e,t)=>new gc({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...qe(t)});class Qd extends lt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Qd.create=(e,t)=>new Qd({getter:e,typeName:ze.ZodLazy,...qe(t)});class Xd extends lt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:Ee.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}Xd.create=(e,t)=>new Xd({value:e,typeName:ze.ZodLiteral,...qe(t)});function bx(e,t){return new To({values:e,typeName:ze.ZodEnum,...qe(t)})}class To extends lt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return xe(n,{expected:dt.joinValues(a),received:n.parsedType,code:Ee.invalid_type}),Be}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return xe(n,{received:n.data,code:Ee.invalid_enum_value,options:a}),Be}return Ur(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return To.create(t,{...this._def,...n})}exclude(t,n=this._def){return To.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}To.create=bx;class Lg extends lt{_parse(t){const n=dt.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==Oe.string&&a.parsedType!==Oe.number){const o=dt.objectValues(n);return xe(a,{expected:dt.joinValues(o),received:a.parsedType,code:Ee.invalid_type}),Be}if(this._cache||(this._cache=new Set(dt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=dt.objectValues(n);return xe(a,{received:a.data,code:Ee.invalid_enum_value,options:o}),Be}return Ur(t.data)}get enum(){return this._def.values}}Lg.create=(e,t)=>new Lg({values:e,typeName:ze.ZodNativeEnum,...qe(t)});class Jd extends lt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Oe.promise&&n.common.async===!1)return xe(n,{code:Ee.invalid_type,expected:Oe.promise,received:n.parsedType}),Be;const a=n.parsedType===Oe.promise?n.data:Promise.resolve(n.data);return Ur(a.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Jd.create=(e,t)=>new Jd({type:e,typeName:ze.ZodPromise,...qe(t)});class Fi extends lt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=this._def.effect||null,l={addIssue:u=>{xe(a,u),u.fatal?n.abort():n.dirty()},get path(){return a.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){const u=o.transform(a.data,l);if(a.common.async)return Promise.resolve(u).then(async d=>{if(n.value==="aborted")return Be;const f=await this._def.schema._parseAsync({data:d,path:a.path,parent:a});return f.status==="aborted"?Be:f.status==="dirty"||n.value==="dirty"?rc(f.value):f});{if(n.value==="aborted")return Be;const d=this._def.schema._parseSync({data:u,path:a.path,parent:a});return d.status==="aborted"?Be:d.status==="dirty"||n.value==="dirty"?rc(d.value):d}}if(o.type==="refinement"){const u=d=>{const f=o.refinement(d,l);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return d.status==="aborted"?Be:(d.status==="dirty"&&n.dirty(),u(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>d.status==="aborted"?Be:(d.status==="dirty"&&n.dirty(),u(d.value).then(()=>({status:n.value,value:d.value}))))}if(o.type==="transform")if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Vs(u))return Be;const d=o.transform(u.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>Vs(u)?Promise.resolve(o.transform(u.value,l)).then(d=>({status:n.value,value:d})):Be);dt.assertNever(o)}}Fi.create=(e,t,n)=>new Fi({schema:e,typeName:ze.ZodEffects,effect:t,...qe(n)});Fi.createWithPreprocess=(e,t,n)=>new Fi({schema:t,effect:{type:"preprocess",transform:e},typeName:ze.ZodEffects,...qe(n)});class Ha extends lt{_parse(t){return this._getType(t)===Oe.undefined?Ur(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ha.create=(e,t)=>new Ha({innerType:e,typeName:ze.ZodOptional,...qe(t)});class Ao extends lt{_parse(t){return this._getType(t)===Oe.null?Ur(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ao.create=(e,t)=>new Ao({innerType:e,typeName:ze.ZodNullable,...qe(t)});class ef extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===Oe.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ef.create=(e,t)=>new ef({innerType:e,typeName:ze.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qe(t)});class tf extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return $d(o)?o.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Ga(a.common.issues)},input:a.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ga(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}tf.create=(e,t)=>new tf({innerType:e,typeName:ze.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qe(t)});class OE extends lt{_parse(t){if(this._getType(t)!==Oe.nan){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.nan,received:a.parsedType}),Be}return{status:"valid",value:t.data}}}OE.create=e=>new OE({typeName:ze.ZodNaN,...qe(e)});class _x extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class Cv extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return l.status==="aborted"?Be:l.status==="dirty"?(n.dirty(),rc(l.value)):this._def.out._parseAsync({data:l.value,path:a.path,parent:a})})();{const o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?Be:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}static create(t,n){return new Cv({in:t,out:n,typeName:ze.ZodPipeline})}}class nf extends lt{_parse(t){const n=this._def.innerType._parse(t),a=o=>(Vs(o)&&(o.value=Object.freeze(o.value)),o);return $d(n)?n.then(o=>a(o)):a(n)}unwrap(){return this._def.innerType}}nf.create=(e,t)=>new nf({innerType:e,typeName:ze.ZodReadonly,...qe(t)});function TE(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function L6(e,t={},n){return e?mc.create().superRefine((a,o)=>{const l=e(a);if(l instanceof Promise)return l.then(u=>{if(!u){const d=TE(t,a),f=d.fatal??n??!0;o.addIssue({code:"custom",...d,fatal:f})}});if(!l){const u=TE(t,a),d=u.fatal??n??!0;o.addIssue({code:"custom",...u,fatal:d})}}):mc.create()}var ze;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ze||(ze={}));const kB=(e,t={message:`Input not instance of ${e.name}`})=>L6(n=>n instanceof e,t),Xe=ha.create,Ex=xo.create;Ro.create;const Mv=Gd.create,jB=Hs.create,UB=qd.create,BB=Yd.create,zB=mc.create,FB=Ig.create,VB=zi.create,AE=ma.create,zn=en.create,HB=Kd.create,$B=Av.create,GB=Wd.create;Oo.create;const qB=Zd.create,Ks=Qd.create,YB=Xd.create,Nv=To.create;Jd.create;const KB=Ha.create;Ao.create;const P6=Fi.createWithPreprocess,Dm={string:(e=>ha.create({...e,coerce:!0})),number:(e=>xo.create({...e,coerce:!0})),boolean:(e=>Gd.create({...e,coerce:!0})),bigint:(e=>Ro.create({...e,coerce:!0})),date:(e=>Hs.create({...e,coerce:!0}))},WB=Be;function pe(...e){return l6(ax(e))}function k6(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function $t({error:e,localization:t,localizeErrors:n=!0}){var a;const o="Request failed";if(!n)return e?.message?e.message:(a=e?.error)!=null&&a.message?e.error.message:o;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const l=e.error.code;if(t?.[l])return t[l]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||o}function Do(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Pg(e,t){for(const n in e)if(e[n]===t)return n}function vc(e,t){let n=Xe().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var j6={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},U6={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},B6={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},z6={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},F6={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},V6={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},H6={...F6,...V6},$6={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},G6={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},q6={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Y6={INVALID_SESSION_TOKEN:"Invalid session token"},K6={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},W6={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},Z6={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},Q6={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},X6={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},J6={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},eN={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},tN={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Please check your email for the verification link.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...z6,...j6,...U6,...B6,...H6,...$6,...G6,...q6,...Y6,...K6,...W6,...Z6,...Q6,...X6,...J6,...eN},nN={CALLBACK:"callback",EMAIL_OTP:"email-otp",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},CE={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},ME={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function rN(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const aN=e=>{switch(e){case"success":return sN;case"info":return cN;case"warning":return lN;case"error":return uN;default:return null}},iN=Array(12).fill(0),oN=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},iN.map((n,a)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),sN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),lN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),uN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),dN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),fN=()=>{const[e,t]=H.useState(document.hidden);return H.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let kg=1;class hN{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...o}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:kg++,u=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:a}),{...f,...t,id:l,dismissible:d,title:a}):f):this.addToast({title:a,...o,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=a!==void 0,u;const d=o.then(async h=>{if(u=["resolve",h],H.isValidElement(h))l=!1,this.create({id:a,type:"default",message:h});else if(mN(h)&&!h.ok){l=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof p=="object"&&!H.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:y,...S})}else if(h instanceof Error){l=!1;const p=typeof n.error=="function"?await n.error(h):n.error,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!H.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:y,...S})}else if(n.success!==void 0){l=!1;const p=typeof n.success=="function"?await n.success(h):n.success,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!H.isValidElement(p)?p:{message:p};this.create({id:a,type:"success",description:y,...S})}}).catch(async h=>{if(u=["reject",h],n.error!==void 0){l=!1;const g=typeof n.error=="function"?await n.error(h):n.error,p=typeof n.description=="function"?await n.description(h):n.description,_=typeof g=="object"&&!H.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:p,..._})}}).finally(()=>{l&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((h,g)=>d.then(()=>u[0]==="reject"?g(u[1]):h(u[1])).catch(g));return typeof a!="string"&&typeof a!="number"?{unwrap:f}:Object.assign(a,{unwrap:f})},this.custom=(t,n)=>{const a=n?.id||kg++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Qn=new hN,pN=(e,t)=>{const n=t?.id||kg++;return Qn.addToast({title:e,...t,id:n}),n},mN=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",gN=pN,vN=()=>Qn.toasts,yN=()=>Qn.getActiveToasts(),NE=Object.assign(gN,{success:Qn.success,info:Qn.info,warning:Qn.warning,error:Qn.error,custom:Qn.custom,message:Qn.message,promise:Qn.promise,dismiss:Qn.dismiss,loading:Qn.loading},{getHistory:vN,getToasts:yN});rN("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function sd(e){return e.label!==void 0}const bN=3,_N="24px",EN="16px",IE=4e3,SN=356,wN=14,xN=45,RN=200;function oa(...e){return e.filter(Boolean).join(" ")}function ON(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const TN=e=>{var t,n,a,o,l,u,d,f,h;const{invert:g,toast:p,unstyled:y,interacting:_,setHeights:S,visibleToasts:w,heights:T,index:R,toasts:A,expanded:C,removeToast:O,defaultRichColors:N,closeButton:L,style:I,cancelButtonStyle:D,actionButtonStyle:B,className:Z="",descriptionClassName:Y="",duration:V,position:z,gap:ie,expandByDefault:ee,classNames:k,icons:F,closeButtonAriaLabel:G="Close toast"}=e,[ae,ve]=H.useState(null),[P,Q]=H.useState(null),[te,se]=H.useState(!1),[ge,_e]=H.useState(!1),[ye,Se]=H.useState(!1),[le,je]=H.useState(!1),[at,Je]=H.useState(!1),[Ft,re]=H.useState(0),[be,Le]=H.useState(0),Ye=H.useRef(p.duration||V||IE),At=H.useRef(null),Ue=H.useRef(null),et=R===0,j=R+1<=w,q=p.type,W=p.dismissible!==!1,de=p.className||"",me=p.descriptionClassName||"",he=H.useMemo(()=>T.findIndex(Ne=>Ne.toastId===p.id)||0,[T,p.id]),Re=H.useMemo(()=>{var Ne;return(Ne=p.closeButton)!=null?Ne:L},[p.closeButton,L]),Fe=H.useMemo(()=>p.duration||V||IE,[p.duration,V]),tt=H.useRef(0),Rt=H.useRef(0),nr=H.useRef(0),Ct=H.useRef(null),[Gt,Mt]=z.split("-"),on=H.useMemo(()=>T.reduce((Ne,We,Ot)=>Ot>=he?Ne:Ne+We.height,0),[T,he]),qt=fN(),ei=p.invert||g,Ea=q==="loading";Rt.current=H.useMemo(()=>he*ie+on,[he,on]),H.useEffect(()=>{Ye.current=Fe},[Fe]),H.useEffect(()=>{se(!0)},[]),H.useEffect(()=>{const Ne=Ue.current;if(Ne){const We=Ne.getBoundingClientRect().height;return Le(We),S(Ot=>[{toastId:p.id,height:We,position:p.position},...Ot]),()=>S(Ot=>Ot.filter(Et=>Et.toastId!==p.id))}},[S,p.id]),H.useLayoutEffect(()=>{if(!te)return;const Ne=Ue.current,We=Ne.style.height;Ne.style.height="auto";const Ot=Ne.getBoundingClientRect().height;Ne.style.height=We,Le(Ot),S(Et=>Et.find(ht=>ht.toastId===p.id)?Et.map(ht=>ht.toastId===p.id?{...ht,height:Ot}:ht):[{toastId:p.id,height:Ot,position:p.position},...Et])},[te,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const Me=H.useCallback(()=>{_e(!0),re(Rt.current),S(Ne=>Ne.filter(We=>We.toastId!==p.id)),setTimeout(()=>{O(p)},RN)},[p,O,S,Rt]);H.useEffect(()=>{if(p.promise&&q==="loading"||p.duration===1/0||p.type==="loading")return;let Ne;return C||_||qt?(()=>{if(nr.current<tt.current){const Et=new Date().getTime()-tt.current;Ye.current=Ye.current-Et}nr.current=new Date().getTime()})():Ye.current!==1/0&&(tt.current=new Date().getTime(),Ne=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Me()},Ye.current)),()=>clearTimeout(Ne)},[C,_,p,q,qt,Me]),H.useEffect(()=>{p.delete&&(Me(),p.onDismiss==null||p.onDismiss.call(p,p))},[Me,p.delete]);function it(){var Ne;if(F?.loading){var We;return H.createElement("div",{className:oa(k?.loader,p==null||(We=p.classNames)==null?void 0:We.loader,"sonner-loader"),"data-visible":q==="loading"},F.loading)}return H.createElement(oN,{className:oa(k?.loader,p==null||(Ne=p.classNames)==null?void 0:Ne.loader),visible:q==="loading"})}const ut=p.icon||F?.[q]||aN(q);var Ke,ft;return H.createElement("li",{tabIndex:0,ref:Ue,className:oa(Z,de,k?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,k?.default,k?.[q],p==null||(n=p.classNames)==null?void 0:n[q]),"data-sonner-toast":"","data-rich-colors":(Ke=p.richColors)!=null?Ke:N,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":te,"data-promise":!!p.promise,"data-swiped":at,"data-removed":ge,"data-visible":j,"data-y-position":Gt,"data-x-position":Mt,"data-index":R,"data-front":et,"data-swiping":ye,"data-dismissible":W,"data-type":q,"data-invert":ei,"data-swipe-out":le,"data-swipe-direction":P,"data-expanded":!!(C||ee&&te),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":A.length-R,"--offset":`${ge?Ft:Rt.current}px`,"--initial-height":ee?"auto":`${be}px`,...I,...p.style},onDragEnd:()=>{Se(!1),ve(null),Ct.current=null},onPointerDown:Ne=>{Ne.button!==2&&(Ea||!W||(At.current=new Date,re(Rt.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(Se(!0),Ct.current={x:Ne.clientX,y:Ne.clientY})))},onPointerUp:()=>{var Ne,We,Ot;if(le||!W)return;Ct.current=null;const Et=Number(((Ne=Ue.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Mn=Number(((We=Ue.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ht=new Date().getTime()-((Ot=At.current)==null?void 0:Ot.getTime()),Nt=ae==="x"?Et:Mn,_r=Math.abs(Nt)/ht;if(Math.abs(Nt)>=xN||_r>.11){re(Rt.current),p.onDismiss==null||p.onDismiss.call(p,p),Q(ae==="x"?Et>0?"right":"left":Mn>0?"down":"up"),Me(),je(!0);return}else{var _n,Fn;(_n=Ue.current)==null||_n.style.setProperty("--swipe-amount-x","0px"),(Fn=Ue.current)==null||Fn.style.setProperty("--swipe-amount-y","0px")}Je(!1),Se(!1),ve(null)},onPointerMove:Ne=>{var We,Ot,Et;if(!Ct.current||!W||((We=window.getSelection())==null?void 0:We.toString().length)>0)return;const ht=Ne.clientY-Ct.current.y,Nt=Ne.clientX-Ct.current.x;var _r;const _n=(_r=e.swipeDirections)!=null?_r:ON(z);!ae&&(Math.abs(Nt)>1||Math.abs(ht)>1)&&ve(Math.abs(Nt)>Math.abs(ht)?"x":"y");let Fn={x:0,y:0};const ko=zr=>1/(1.5+Math.abs(zr)/20);if(ae==="y"){if(_n.includes("top")||_n.includes("bottom"))if(_n.includes("top")&&ht<0||_n.includes("bottom")&&ht>0)Fn.y=ht;else{const zr=ht*ko(ht);Fn.y=Math.abs(zr)<Math.abs(ht)?zr:ht}}else if(ae==="x"&&(_n.includes("left")||_n.includes("right")))if(_n.includes("left")&&Nt<0||_n.includes("right")&&Nt>0)Fn.x=Nt;else{const zr=Nt*ko(Nt);Fn.x=Math.abs(zr)<Math.abs(Nt)?zr:Nt}(Math.abs(Fn.x)>0||Math.abs(Fn.y)>0)&&Je(!0),(Ot=Ue.current)==null||Ot.style.setProperty("--swipe-amount-x",`${Fn.x}px`),(Et=Ue.current)==null||Et.style.setProperty("--swipe-amount-y",`${Fn.y}px`)}},Re&&!p.jsx&&q!=="loading"?H.createElement("button",{"aria-label":G,"data-disabled":Ea,"data-close-button":!0,onClick:Ea||!W?()=>{}:()=>{Me(),p.onDismiss==null||p.onDismiss.call(p,p)},className:oa(k?.closeButton,p==null||(a=p.classNames)==null?void 0:a.closeButton)},(ft=F?.close)!=null?ft:dN):null,(q||p.icon||p.promise)&&p.icon!==null&&(F?.[q]!==null||p.icon)?H.createElement("div",{"data-icon":"",className:oa(k?.icon,p==null||(o=p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||it():null,p.type!=="loading"?ut:null):null,H.createElement("div",{"data-content":"",className:oa(k?.content,p==null||(l=p.classNames)==null?void 0:l.content)},H.createElement("div",{"data-title":"",className:oa(k?.title,p==null||(u=p.classNames)==null?void 0:u.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?H.createElement("div",{"data-description":"",className:oa(Y,me,k?.description,p==null||(d=p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),H.isValidElement(p.cancel)?p.cancel:p.cancel&&sd(p.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||D,onClick:Ne=>{sd(p.cancel)&&W&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ne),Me())},className:oa(k?.cancelButton,p==null||(f=p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,H.isValidElement(p.action)?p.action:p.action&&sd(p.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||B,onClick:Ne=>{sd(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ne),!Ne.defaultPrevented&&Me())},className:oa(k?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function DE(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function AN(e,t){const n={};return[e,t].forEach((a,o)=>{const l=o===1,u=l?"--mobile-offset":"--offset",d=l?EN:_N;function f(h){["top","right","bottom","left"].forEach(g=>{n[`${u}-${g}`]=typeof h=="number"?`${h}px`:h})}typeof a=="number"||typeof a=="string"?f(a):typeof a=="object"?["top","right","bottom","left"].forEach(h=>{a[h]===void 0?n[`${u}-${h}`]=d:n[`${u}-${h}`]=typeof a[h]=="number"?`${a[h]}px`:a[h]}):f(d)}),n}const CN=H.forwardRef(function(t,n){const{id:a,invert:o,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:h,offset:g,mobileOffset:p,theme:y="light",richColors:_,duration:S,style:w,visibleToasts:T=bN,toastOptions:R,dir:A=DE(),gap:C=wN,icons:O,containerAriaLabel:N="Notifications"}=t,[L,I]=H.useState([]),D=H.useMemo(()=>a?L.filter(te=>te.toasterId===a):L.filter(te=>!te.toasterId),[L,a]),B=H.useMemo(()=>Array.from(new Set([l].concat(D.filter(te=>te.position).map(te=>te.position)))),[D,l]),[Z,Y]=H.useState([]),[V,z]=H.useState(!1),[ie,ee]=H.useState(!1),[k,F]=H.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=H.useRef(null),ae=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=H.useRef(null),P=H.useRef(!1),Q=H.useCallback(te=>{I(se=>{var ge;return(ge=se.find(_e=>_e.id===te.id))!=null&&ge.delete||Qn.dismiss(te.id),se.filter(({id:_e})=>_e!==te.id)})},[]);return H.useEffect(()=>Qn.subscribe(te=>{if(te.dismiss){requestAnimationFrame(()=>{I(se=>se.map(ge=>ge.id===te.id?{...ge,delete:!0}:ge))});return}setTimeout(()=>{Bw.flushSync(()=>{I(se=>{const ge=se.findIndex(_e=>_e.id===te.id);return ge!==-1?[...se.slice(0,ge),{...se[ge],...te},...se.slice(ge+1)]:[te,...se]})})})}),[L]),H.useEffect(()=>{if(y!=="system"){F(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const te=window.matchMedia("(prefers-color-scheme: dark)");try{te.addEventListener("change",({matches:se})=>{F(se?"dark":"light")})}catch{te.addListener(({matches:ge})=>{try{F(ge?"dark":"light")}catch(_e){console.error(_e)}})}},[y]),H.useEffect(()=>{L.length<=1&&z(!1)},[L]),H.useEffect(()=>{const te=se=>{var ge;if(u.every(Se=>se[Se]||se.code===Se)){var ye;z(!0),(ye=G.current)==null||ye.focus()}se.code==="Escape"&&(document.activeElement===G.current||(ge=G.current)!=null&&ge.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[u]),H.useEffect(()=>{if(G.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,P.current=!1)}},[G.current]),H.createElement("section",{ref:n,"aria-label":`${N} ${ae}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},B.map((te,se)=>{var ge;const[_e,ye]=te.split("-");return D.length?H.createElement("ol",{key:te,dir:A==="auto"?DE():A,tabIndex:-1,ref:G,className:h,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":_e,"data-x-position":ye,style:{"--front-toast-height":`${((ge=Z[0])==null?void 0:ge.height)||0}px`,"--width":`${SN}px`,"--gap":`${C}px`,...w,...AN(g,p)},onBlur:Se=>{P.current&&!Se.currentTarget.contains(Se.relatedTarget)&&(P.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||P.current||(P.current=!0,ve.current=Se.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{ie||z(!1)},onDragEnd:()=>z(!1),onPointerDown:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||ee(!0)},onPointerUp:()=>ee(!1)},D.filter(Se=>!Se.position&&se===0||Se.position===te).map((Se,le)=>{var je,at;return H.createElement(TN,{key:Se.id,icons:O,index:le,toast:Se,defaultRichColors:_,duration:(je=R?.duration)!=null?je:S,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:o,visibleToasts:T,closeButton:(at=R?.closeButton)!=null?at:f,interacting:ie,position:te,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:Q,toasts:D.filter(Je=>Je.position==Se.position),heights:Z.filter(Je=>Je.position==Se.position),setHeights:Y,expandByDefault:d,gap:C,expanded:V,swipeDirections:t.swipeDirections})})):null}))}),Sx=E.createContext({});function wx(){return E.useContext(Sx)}var Lm,LE;function MN(){if(LE)return Lm;LE=1;var e=function(){};return Lm=e,Lm}var NN=MN();const IN=Io(NN);function DN({async:e,appendTo:t,defer:n,id:a,nonce:o,src:l}){const u=document.createElement("script");e!==void 0&&(u.async=e),n!==void 0&&(u.defer=n),a&&(u.id=a),o&&u.setAttribute("nonce",o),u.src=l,(t==="head"?document.head:document.body).appendChild(u)}var LN=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let lc=null,yc=!1;const rf=new Set,af=new Set,PN=typeof window<"u",ks="___grecaptcha_cfg",xx=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function kN(){if(!PN)return;function e(n){if(yc)n();else{window[ks]||(window[ks]={});const a=window[ks];a.fns||(a.fns=[]),a.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){yc=!0;for(const n of af)n();af.clear()}window[xx]=t}function jN({language:e,onLoadCallbackName:t,render:n,useEnterprise:a=!1,useRecaptchaNet:o=!1}){const l=o?"recaptcha.net":"google.com",u=a?"enterprise.js":"api.js",d=new URLSearchParams({render:n});return t&&d.set("onload",t),e&&d.set("hl",e),`https://www.${l}/recaptcha/${u}?${d.toString()}`}function UN({language:e,render:t,scriptProps:n,useEnterprise:a,useRecaptchaNet:o}){const l={id:"google-recaptcha-v3"},u=jN({language:e,onLoadCallbackName:xx,render:t,useEnterprise:a,useRecaptchaNet:o});if(lc){if(lc!==u)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}lc=u,DN(Object.assign(Object.assign(Object.assign({},l),n),{src:u}))}function BN(e){if(!window[ks])return;const t=window[ks];t.clients&&delete t.clients[e]}function zN(e,t){var{onLoadCallback:n,onLoadCallbackName:a}=t,o=LN(t,["onLoadCallback","onLoadCallbackName"]);if(rf.size===0&&kN(),UN(o),rf.add(e),n&&(yc?n():af.add(n)),a){let l=function(){if(!a)return;const u=window[a];typeof u=="function"&&u()};yc?l():af.add(l)}}function FN(e){var t,n,a;rf.delete(e),rf.size===0&&(window.grecaptcha=void 0,window[ks]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${lc}"]`))===null||n===void 0||n.remove(),(a=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||a===void 0||a.remove(),lc=null,yc=!1)}let PE=!1;function VN({container:e,children:t,language:n,reCaptchaKey:a,scriptProps:o,useEnterprise:l,useRecaptchaNet:u}){var d,f,h,g,p,y,_;const S=E.useId(),[w,T]=E.useState(null),[R,A]=E.useState(null),C=E.useRef(!1);E.useEffect(()=>{function I(){var D;const B=l?(D=window.grecaptcha)===null||D===void 0?void 0:D.enterprise:window.grecaptcha;if(!B)throw new Error("reCAPTCHA not found");if(!B.ready)throw new Error("reCAPTCHA ready callback not found");B.ready(()=>{T(B)})}return zN(S,{language:n,onLoadCallback:I,onLoadCallbackName:o?.onLoadCallbackName,render:e?.element?"explicit":a,scriptProps:{appendTo:o?.appendTo,async:o?.async,defer:o?.defer,id:o?.id,nonce:o?.nonce},useEnterprise:l,useRecaptchaNet:u}),()=>{FN(S),T(null)}},[e?.element,S,n,a,o?.appendTo,o?.async,o?.defer,o?.id,o?.nonce,o?.onLoadCallbackName,l,u]),E.useEffect(()=>{var I,D,B;if(!e?.element||!w?.render)return;const Z={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((I=e.parameters)===null||I===void 0?void 0:I.badge)||"inline",callback:e.parameters.callback,sitekey:a,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},Y=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!Y)throw new Error("reCAPTCHA container element not found");const V=w.render(Y,Z);return!((D=e?.parameters)===null||D===void 0)&&D.hidden&&(PE||(IN(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),PE=!0),(B=Y.querySelector(".grecaptcha-badge"))===null||B===void 0||B.style.setProperty("display","none")),A(V),C.current=!0,()=>{A(null),C.current=!1,BN(V),Y.innerHTML=""}},[e?.element,(d=e?.parameters)===null||d===void 0?void 0:d.badge,(f=e?.parameters)===null||f===void 0?void 0:f.hidden,(h=e?.parameters)===null||h===void 0?void 0:h.callback,(g=e?.parameters)===null||g===void 0?void 0:g.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(y=e?.parameters)===null||y===void 0?void 0:y.tabindex,(_=e?.parameters)===null||_===void 0?void 0:_.theme,w,a]);const O=!!e?.element,N=O?R:a,L=E.useMemo(()=>N!==null&&w?.execute?I=>{if(N===null||!w?.execute)throw new Error("reCAPTCHA has not been loaded");return O&&!C.current?(console.warn("Client ID not mounted"),null):w.execute(N,{action:I})}:void 0,[N,w,O]);return b.jsx(Sx.Provider,{value:{container:e?.element,executeRecaptcha:L,reCaptchaInstance:w},children:t})}var HN=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const a of n)a()}}},Nr=new HN;function $N(){return()=>{}}function Ka(){return E.useSyncExternalStore($N,()=>!0,()=>!1)}function Iv(){const[e,t]=E.useState();return E.useEffect(()=>{const n=()=>{const o=document.documentElement.getAttribute("lang");t(o??void 0)};n();const a=new MutationObserver(o=>{for(const l of o)l.attributeName==="lang"&&n()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{lang:e}}function Dv(){const[e,t]=E.useState("light");return E.useEffect(()=>{const n=()=>{var o;const l=document.documentElement.classList.contains("dark")||((o=document.documentElement.getAttribute("style"))==null?void 0:o.includes("color-scheme: dark"));t(l?"dark":"light")};n();const a=new MutationObserver(o=>{for(const l of o)(l.attributeName==="style"||l.attributeName==="class")&&n()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{theme:e}}function GN({children:e}){const t=Ka(),{captcha:n}=E.useContext(Ze);return n?.provider!=="google-recaptcha-v3"?e:b.jsxs(VN,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&b.jsx("style",{children:`
|
|
10
|
+
`).replace(LA,"")}function kb(r,i){return i=Pb(i),Pb(r)===i}function wt(r,i,s,c,m,v){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Ho(r,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Ho(r,""+c);break;case"className":Fc(r,"class",c);break;case"tabIndex":Fc(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Fc(r,s,c);break;case"style":k0(r,c,v);break;case"data":if(i!=="object"){Fc(r,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){r.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Hc(""+c),r.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="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 v=="function"&&(s==="formAction"?(i!=="input"&&wt(r,i,"name",m.name,m,null),wt(r,i,"formEncType",m.formEncType,m,null),wt(r,i,"formMethod",m.formMethod,m,null),wt(r,i,"formTarget",m.formTarget,m,null)):(wt(r,i,"encType",m.encType,m,null),wt(r,i,"method",m.method,m,null),wt(r,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Hc(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=wa);break;case"onScroll":c!=null&&rt("scroll",r);break;case"onScrollEnd":c!=null&&rt("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}s=Hc(""+c),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":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""+c):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":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":c===!0?r.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,c):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(s,c):r.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(s):r.setAttribute(s,c);break;case"popover":rt("beforetoggle",r),rt("toggle",r),zc(r,"popover",c);break;case"xlinkActuate":Sa(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Sa(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Sa(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Sa(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Sa(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Sa(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Sa(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Sa(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Sa(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":zc(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=lT.get(s)||s,zc(r,s,c))}}function Bp(r,i,s,c,m,v){switch(s){case"style":k0(r,c,v);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"children":typeof c=="string"?Ho(r,c):(typeof c=="number"||typeof c=="bigint")&&Ho(r,""+c);break;case"onScroll":c!=null&&rt("scroll",r);break;case"onScrollEnd":c!=null&&rt("scrollend",r);break;case"onClick":c!=null&&(r.onclick=wa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!T0.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),i=s.slice(2,m?s.length-7:void 0),v=r[Vn]||null,v=v!=null?v[s]:null,typeof v=="function"&&r.removeEventListener(i,v,m),typeof c=="function")){typeof v!="function"&&v!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(i,c,m);break e}s in r?r[s]=c:c===!0?r.setAttribute(s,""):zc(r,s,c)}}}function Rn(r,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",r),rt("load",r);var c=!1,m=!1,v;for(v in s)if(s.hasOwnProperty(v)){var x=s[v];if(x!=null)switch(v){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:wt(r,i,v,x,s,null)}}m&&wt(r,i,"srcSet",s.srcSet,s,null),c&&wt(r,i,"src",s.src,s,null);return;case"input":rt("invalid",r);var M=v=x=m=null,U=null,J=null;for(c in s)if(s.hasOwnProperty(c)){var ce=s[c];if(ce!=null)switch(c){case"name":m=ce;break;case"type":x=ce;break;case"checked":U=ce;break;case"defaultChecked":J=ce;break;case"value":v=ce;break;case"defaultValue":M=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(a(137,i));break;default:wt(r,i,c,ce,s,null)}}I0(r,v,M,U,J,x,m,!1);return;case"select":rt("invalid",r),c=x=v=null;for(m in s)if(s.hasOwnProperty(m)&&(M=s[m],M!=null))switch(m){case"value":v=M;break;case"defaultValue":x=M;break;case"multiple":c=M;default:wt(r,i,m,M,s,null)}i=v,s=x,r.multiple=!!c,i!=null?Vo(r,!!c,i,!1):s!=null&&Vo(r,!!c,s,!0);return;case"textarea":rt("invalid",r),v=m=c=null;for(x in s)if(s.hasOwnProperty(x)&&(M=s[x],M!=null))switch(x){case"value":c=M;break;case"defaultValue":m=M;break;case"children":v=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(a(91));break;default:wt(r,i,x,M,s,null)}L0(r,c,m,v);return;case"option":for(U in s)s.hasOwnProperty(U)&&(c=s[U],c!=null)&&(U==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":wt(r,i,U,c,s,null));return;case"dialog":rt("beforetoggle",r),rt("toggle",r),rt("cancel",r),rt("close",r);break;case"iframe":case"object":rt("load",r);break;case"video":case"audio":for(c=0;c<Il.length;c++)rt(Il[c],r);break;case"image":rt("error",r),rt("load",r);break;case"details":rt("toggle",r);break;case"embed":case"source":case"link":rt("error",r),rt("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)&&(c=s[J],c!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:wt(r,i,J,c,s,null)}return;default:if(Jf(i)){for(ce in s)s.hasOwnProperty(ce)&&(c=s[ce],c!==void 0&&Bp(r,i,ce,c,s,void 0));return}}for(M in s)s.hasOwnProperty(M)&&(c=s[M],c!=null&&wt(r,i,M,c,s,null))}function PA(r,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,v=null,x=null,M=null,U=null,J=null,ce=null;for(oe in s){var fe=s[oe];if(s.hasOwnProperty(oe)&&fe!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":U=fe;default:c.hasOwnProperty(oe)||wt(r,i,oe,null,c,fe)}}for(var ne in c){var oe=c[ne];if(fe=s[ne],c.hasOwnProperty(ne)&&(oe!=null||fe!=null))switch(ne){case"type":v=oe;break;case"name":m=oe;break;case"checked":J=oe;break;case"defaultChecked":ce=oe;break;case"value":x=oe;break;case"defaultValue":M=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,i));break;default:oe!==fe&&wt(r,i,ne,oe,c,fe)}}Qf(r,x,M,U,J,ce,v,m);return;case"select":oe=x=M=ne=null;for(v in s)if(U=s[v],s.hasOwnProperty(v)&&U!=null)switch(v){case"value":break;case"multiple":oe=U;default:c.hasOwnProperty(v)||wt(r,i,v,null,c,U)}for(m in c)if(v=c[m],U=s[m],c.hasOwnProperty(m)&&(v!=null||U!=null))switch(m){case"value":ne=v;break;case"defaultValue":M=v;break;case"multiple":x=v;default:v!==U&&wt(r,i,m,v,c,U)}i=M,s=x,c=oe,ne!=null?Vo(r,!!s,ne,!1):!!c!=!!s&&(i!=null?Vo(r,!!s,i,!0):Vo(r,!!s,s?[]:"",!1));return;case"textarea":oe=ne=null;for(M in s)if(m=s[M],s.hasOwnProperty(M)&&m!=null&&!c.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:wt(r,i,M,null,c,m)}for(x in c)if(m=c[x],v=s[x],c.hasOwnProperty(x)&&(m!=null||v!=null))switch(x){case"value":ne=m;break;case"defaultValue":oe=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==v&&wt(r,i,x,m,c,v)}D0(r,ne,oe);return;case"option":for(var Te in s)ne=s[Te],s.hasOwnProperty(Te)&&ne!=null&&!c.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:wt(r,i,Te,null,c,ne));for(U in c)ne=c[U],oe=s[U],c.hasOwnProperty(U)&&ne!==oe&&(ne!=null||oe!=null)&&(U==="selected"?r.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":wt(r,i,U,ne,c,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 ke in s)ne=s[ke],s.hasOwnProperty(ke)&&ne!=null&&!c.hasOwnProperty(ke)&&wt(r,i,ke,null,c,ne);for(J in c)if(ne=c[J],oe=s[J],c.hasOwnProperty(J)&&ne!==oe&&(ne!=null||oe!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(a(137,i));break;default:wt(r,i,J,ne,c,oe)}return;default:if(Jf(i)){for(var xt in s)ne=s[xt],s.hasOwnProperty(xt)&&ne!==void 0&&!c.hasOwnProperty(xt)&&Bp(r,i,xt,void 0,c,ne);for(ce in c)ne=c[ce],oe=s[ce],!c.hasOwnProperty(ce)||ne===oe||ne===void 0&&oe===void 0||Bp(r,i,ce,ne,c,oe);return}}for(var K in s)ne=s[K],s.hasOwnProperty(K)&&ne!=null&&!c.hasOwnProperty(K)&&wt(r,i,K,null,c,ne);for(fe in c)ne=c[fe],oe=s[fe],!c.hasOwnProperty(fe)||ne===oe||ne==null&&oe==null||wt(r,i,fe,ne,c,oe)}function jb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kA(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],v=m.transferSize,x=m.initiatorType,M=m.duration;if(v&&M&&jb(x)){for(x=0,M=m.responseEnd,c+=1;c<s.length;c++){var U=s[c],J=U.startTime;if(J>M)break;var ce=U.transferSize,fe=U.initiatorType;ce&&jb(fe)&&(U=U.responseEnd,x+=ce*(U<M?1:(M-J)/(U-J)))}if(--c,i+=8*(v+x)/(m.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var zp=null,Fp=null;function Uu(r){return r.nodeType===9?r:r.ownerDocument}function Ub(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 Bb(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function Vp(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Hp=null;function jA(){var r=window.event;return r&&r.type==="popstate"?r===Hp?!1:(Hp=r,!0):(Hp=null,!1)}var zb=typeof setTimeout=="function"?setTimeout:void 0,UA=typeof clearTimeout=="function"?clearTimeout:void 0,Fb=typeof Promise=="function"?Promise:void 0,BA=typeof queueMicrotask=="function"?queueMicrotask:typeof Fb<"u"?function(r){return Fb.resolve(null).then(r).catch(zA)}:zb;function zA(r){setTimeout(function(){throw r})}function bi(r){return r==="head"}function Vb(r,i){var s=i,c=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){r.removeChild(m),_s(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Ll(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Ll(s);for(var v=s.firstChild;v;){var x=v.nextSibling,M=v.nodeName;v[Xs]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=x}}else s==="body"&&Ll(r.ownerDocument.body);s=m}while(s);_s(i)}function Hb(r,i){var s=r;r=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=c}while(s)}function $p(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":$p(s),Wf(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function FA(r,i,s,c){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Xs])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==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(v=r.getAttribute("src"),(v!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var v=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=Cr(r.nextSibling),r===null)break}return null}function VA(r,i,s){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Cr(r.nextSibling),r===null))return null;return r}function $b(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Cr(r.nextSibling),r===null))return null;return r}function Gp(r){return r.data==="$?"||r.data==="$~"}function qp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function HA(r,i){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function Cr(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var Yp=null;function Gb(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(i===0)return Cr(r.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}r=r.nextSibling}return null}function qb(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return r;i--}else s!=="/$"&&s!=="/&"||i++}r=r.previousSibling}return null}function Yb(r,i,s){switch(i=Uu(s),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ll(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Wf(r)}var Mr=new Map,Kb=new Set;function Bu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ba=F.d;F.d={f:$A,r:GA,D:qA,C:YA,L:KA,m:WA,X:QA,S:ZA,M:XA};function $A(){var r=Ba.f(),i=Mu();return r||i}function GA(r){var i=Bo(r);i!==null&&i.tag===5&&i.type==="form"?d1(i):Ba.r(r)}var vs=typeof document>"u"?null:document;function Wb(r,i,s){var c=vs;if(c&&typeof i=="string"&&i){var m=Sr(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Kb.has(m)||(Kb.add(m),r={rel:r,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),Rn(i,"link",r),hn(i),c.head.appendChild(i)))}}function qA(r){Ba.D(r),Wb("dns-prefetch",r,null)}function YA(r,i){Ba.C(r,i),Wb("preconnect",r,i)}function KA(r,i,s){Ba.L(r,i,s);var c=vs;if(c&&r&&i){var m='link[rel="preload"][as="'+Sr(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Sr(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Sr(s.imageSizes)+'"]')):m+='[href="'+Sr(r)+'"]';var v=m;switch(i){case"style":v=ys(r);break;case"script":v=bs(r)}Mr.has(v)||(r=p({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:r,as:i},s),Mr.set(v,r),c.querySelector(m)!==null||i==="style"&&c.querySelector(Pl(v))||i==="script"&&c.querySelector(kl(v))||(i=c.createElement("link"),Rn(i,"link",r),hn(i),c.head.appendChild(i)))}}function WA(r,i){Ba.m(r,i);var s=vs;if(s&&r){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Sr(c)+'"][href="'+Sr(r)+'"]',v=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=bs(r)}if(!Mr.has(v)&&(r=p({rel:"modulepreload",href:r},i),Mr.set(v,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(kl(v)))return}c=s.createElement("link"),Rn(c,"link",r),hn(c),s.head.appendChild(c)}}}function ZA(r,i,s){Ba.S(r,i,s);var c=vs;if(c&&r){var m=zo(c).hoistableStyles,v=ys(r);i=i||"default";var x=m.get(v);if(!x){var M={loading:0,preload:null};if(x=c.querySelector(Pl(v)))M.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":i},s),(s=Mr.get(v))&&Kp(r,s);var U=x=c.createElement("link");hn(U),Rn(U,"link",r),U._p=new Promise(function(J,ce){U.onload=J,U.onerror=ce}),U.addEventListener("load",function(){M.loading|=1}),U.addEventListener("error",function(){M.loading|=2}),M.loading|=4,zu(x,i,c)}x={type:"stylesheet",instance:x,count:1,state:M},m.set(v,x)}}}function QA(r,i){Ba.X(r,i);var s=vs;if(s&&r){var c=zo(s).hoistableScripts,m=bs(r),v=c.get(m);v||(v=s.querySelector(kl(m)),v||(r=p({src:r,async:!0},i),(i=Mr.get(m))&&Wp(r,i),v=s.createElement("script"),hn(v),Rn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function XA(r,i){Ba.M(r,i);var s=vs;if(s&&r){var c=zo(s).hoistableScripts,m=bs(r),v=c.get(m);v||(v=s.querySelector(kl(m)),v||(r=p({src:r,async:!0,type:"module"},i),(i=Mr.get(m))&&Wp(r,i),v=s.createElement("script"),hn(v),Rn(v,"link",r),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(m,v))}}function Zb(r,i,s,c){var m=(m=_e.current)?Bu(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=ys(s.href),s=zo(m).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=ys(s.href);var v=zo(m).hoistableStyles,x=v.get(r);if(x||(m=m.ownerDocument||m,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,x),(v=m.querySelector(Pl(r)))&&!v._p&&(x.instance=v,x.state.loading=5),Mr.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},Mr.set(r,s),v||JA(m,r,s,x.state))),i&&c===null)throw Error(a(528,""));return x}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=bs(s),s=zo(m).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function ys(r){return'href="'+Sr(r)+'"'}function Pl(r){return'link[rel="stylesheet"]['+r+"]"}function Qb(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function JA(r,i,s,c){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=r.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Rn(i,"link",s),hn(i),r.head.appendChild(i))}function bs(r){return'[src="'+Sr(r)+'"]'}function kl(r){return"script[async]"+r}function Xb(r,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=r.querySelector('style[data-href~="'+Sr(s.href)+'"]');if(c)return i.instance=c,hn(c),c;var m=p({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),hn(c),Rn(c,"style",m),zu(c,s.precedence,r),i.instance=c;case"stylesheet":m=ys(s.href);var v=r.querySelector(Pl(m));if(v)return i.state.loading|=4,i.instance=v,hn(v),v;c=Qb(s),(m=Mr.get(m))&&Kp(c,m),v=(r.ownerDocument||r).createElement("link"),hn(v);var x=v;return x._p=new Promise(function(M,U){x.onload=M,x.onerror=U}),Rn(v,"link",c),i.state.loading|=4,zu(v,s.precedence,r),i.instance=v;case"script":return v=bs(s.src),(m=r.querySelector(kl(v)))?(i.instance=m,hn(m),m):(c=s,(m=Mr.get(v))&&(c=p({},s),Wp(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),hn(m),Rn(m,"link",c),r.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,zu(c,s.precedence,r));return i.instance}function zu(r,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,v=m,x=0;x<c.length;x++){var M=c[x];if(M.dataset.precedence===i)v=M;else if(v!==m)break}v?v.parentNode.insertBefore(r,v.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(r,i.firstChild))}function Kp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function Wp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Fu=null;function Jb(r,i,s){if(Fu===null){var c=new Map,m=Fu=new Map;m.set(s,c)}else m=Fu,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(r))return c;for(c.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var v=s[m];if(!(v[Xs]||v[En]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var x=v.getAttribute(i)||"";x=r+x;var M=c.get(x);M?M.push(v):c.set(x,[v])}}return c}function e_(r,i,s){r=r.ownerDocument||r,r.head.insertBefore(s,i==="title"?r.querySelector("head > title"):null)}function eC(r,i,s){if(s===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(r=i.disabled,typeof i.precedence=="string"&&r==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function t_(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function tC(r,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=ys(c.href),v=i.querySelector(Pl(m));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Vu.bind(r),i.then(r,r)),s.state.loading|=4,s.instance=v,hn(v);return}v=i.ownerDocument||i,c=Qb(c),(m=Mr.get(m))&&Kp(c,m),v=v.createElement("link"),hn(v);var x=v;x._p=new Promise(function(M,U){x.onload=M,x.onerror=U}),Rn(v,"link",c),s.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Vu.bind(r),i.addEventListener("load",s),i.addEventListener("error",s))}}var Zp=0;function nC(r,i){return r.stylesheets&&r.count===0&&$u(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&$u(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+i);0<r.imgBytes&&Zp===0&&(Zp=62500*kA());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&$u(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>Zp?50:800)+i);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Vu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$u(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Hu=null;function $u(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Hu=new Map,i.forEach(rC,r),Hu=null,Vu.call(r))}function rC(r,i){if(!(i.state.loading&4)){var s=Hu.get(r);if(s)var c=s.get(null);else{s=new Map,Hu.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<m.length;v++){var x=m[v];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(s.set(x.dataset.precedence,x),c=x)}c&&s.set(null,c)}m=i.instance,x=m.getAttribute("data-precedence"),v=s.get(x)||c,v===c&&s.set(null,m),s.set(x,m),this.count++,c=Vu.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),v?v.parentNode.insertBefore(m,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var jl={$$typeof:C,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function aC(r,i,s,c,m,v,x,M,U){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=Mn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mn(0),this.hiddenUpdates=Mn(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=v,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function n_(r,i,s,c,m,v,x,M,U,J,ce,fe){return r=new aC(r,i,s,x,U,J,ce,fe,M),i=1,v===!0&&(i|=24),v=ar(3,null,null,i),r.current=v,v.stateNode=r,i=Ch(),i.refCount++,r.pooledCache=i,i.refCount++,v.memoizedState={element:c,isDehydrated:s,cache:i},Dh(v),r}function r_(r){return r?(r=Zo,r):Zo}function a_(r,i,s,c,m,v){m=r_(m),c.context===null?c.context=m:c.pendingContext=m,c=li(i),c.payload={element:s},v=v===void 0?null:v,v!==null&&(c.callback=v),s=ci(r,c,i),s!==null&&(Kn(s,r,i),ml(s,r,i))}function i_(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<i?s:i}}function Qp(r,i){i_(r,i),(r=r.alternate)&&i_(r,i)}function o_(r){if(r.tag===13||r.tag===31){var i=Zi(r,67108864);i!==null&&Kn(i,r,67108864),Qp(r,67108864)}}function s_(r){if(r.tag===13||r.tag===31){var i=cr();i=ko(i);var s=Zi(r,i);s!==null&&Kn(s,r,i),Qp(r,i)}}var Gu=!0;function iC(r,i,s,c){var m=k.T;k.T=null;var v=F.p;try{F.p=2,Xp(r,i,s,c)}finally{F.p=v,k.T=m}}function oC(r,i,s,c){var m=k.T;k.T=null;var v=F.p;try{F.p=8,Xp(r,i,s,c)}finally{F.p=v,k.T=m}}function Xp(r,i,s,c){if(Gu){var m=Jp(c);if(m===null)Up(r,i,c,qu,s),c_(r,c);else if(lC(m,r,i,s,c))c.stopPropagation();else if(c_(r,c),i&4&&-1<sC.indexOf(r)){for(;m!==null;){var v=Bo(m);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var x=ft(v.pendingLanes);if(x!==0){var M=v;for(M.pendingLanes|=2,M.entangledLanes|=2;x;){var U=1<<31-qt(x);M.entanglements[1]|=U,x&=~U}ia(v),(gt&6)===0&&(Au=de()+500,Nl(0))}}break;case 31:case 13:M=Zi(v,2),M!==null&&Kn(M,v,2),Mu(),Qp(v,2)}if(v=Jp(c),v===null&&Up(r,i,c,qu,s),v===m)break;m=v}m!==null&&c.stopPropagation()}else Up(r,i,c,null,s)}}function Jp(r){return r=th(r),em(r)}var qu=null;function em(r){if(qu=null,r=Uo(r),r!==null){var i=l(r);if(i===null)r=null;else{var s=i.tag;if(s===13){if(r=u(i),r!==null)return r;r=null}else if(s===31){if(r=d(i),r!==null)return r;r=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return qu=r,null}function l_(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(me()){case he:return 2;case Re:return 8;case Fe:case tt:return 32;case Rt:return 268435456;default:return 32}default:return 32}}var tm=!1,_i=null,Ei=null,Si=null,Ul=new Map,Bl=new Map,wi=[],sC="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 c_(r,i){switch(r){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":Ul.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(i.pointerId)}}function zl(r,i,s,c,m,v){return r===null||r.nativeEvent!==v?(r={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:v,targetContainers:[m]},i!==null&&(i=Bo(i),i!==null&&o_(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function lC(r,i,s,c,m){switch(i){case"focusin":return _i=zl(_i,r,i,s,c,m),!0;case"dragenter":return Ei=zl(Ei,r,i,s,c,m),!0;case"mouseover":return Si=zl(Si,r,i,s,c,m),!0;case"pointerover":var v=m.pointerId;return Ul.set(v,zl(Ul.get(v)||null,r,i,s,c,m)),!0;case"gotpointercapture":return v=m.pointerId,Bl.set(v,zl(Bl.get(v)||null,r,i,s,c,m)),!0}return!1}function u_(r){var i=Uo(r.target);if(i!==null){var s=l(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){r.blockedOn=i,x0(r.priority,function(){s_(s)});return}}else if(i===31){if(i=d(s),i!==null){r.blockedOn=i,x0(r.priority,function(){s_(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Yu(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var s=Jp(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);eh=c,s.target.dispatchEvent(c),eh=null}else return i=Bo(s),i!==null&&o_(i),r.blockedOn=s,!1;i.shift()}return!0}function d_(r,i,s){Yu(r)&&s.delete(i)}function cC(){tm=!1,_i!==null&&Yu(_i)&&(_i=null),Ei!==null&&Yu(Ei)&&(Ei=null),Si!==null&&Yu(Si)&&(Si=null),Ul.forEach(d_),Bl.forEach(d_)}function Ku(r,i){r.blockedOn===i&&(r.blockedOn=null,tm||(tm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,cC)))}var Wu=null;function f_(r){Wu!==r&&(Wu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wu===r&&(Wu=null);for(var i=0;i<r.length;i+=3){var s=r[i],c=r[i+1],m=r[i+2];if(typeof c!="function"){if(em(c||s)===null)continue;break}var v=Bo(s);v!==null&&(r.splice(i,3),i-=3,Jh(v,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function _s(r){function i(U){return Ku(U,r)}_i!==null&&Ku(_i,r),Ei!==null&&Ku(Ei,r),Si!==null&&Ku(Si,r),Ul.forEach(i),Bl.forEach(i);for(var s=0;s<wi.length;s++){var c=wi[s];c.blockedOn===r&&(c.blockedOn=null)}for(;0<wi.length&&(s=wi[0],s.blockedOn===null);)u_(s),s.blockedOn===null&&wi.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],v=s[c+1],x=m[Vn]||null;if(typeof v=="function")x||f_(s);else if(x){var M=null;if(v&&v.hasAttribute("formAction")){if(m=v,x=v[Vn]||null)M=x.formAction;else if(em(m)!==null)continue}else M=x.action;typeof M=="function"?s[c+1]=M:(s.splice(c,3),c-=3),f_(s)}}}function h_(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(x){return m=x})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function nm(r){this._internalRoot=r}Zu.prototype.render=nm.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=cr();a_(s,c,r,i,null,null)},Zu.prototype.unmount=nm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;a_(r.current,2,null,r,null,null),Mu(),i[jo]=null}};function Zu(r){this._internalRoot=r}Zu.prototype.unstable_scheduleHydration=function(r){if(r){var i=Yf();r={blockedOn:null,target:r,priority:i};for(var s=0;s<wi.length&&i!==0&&i<wi[s].priority;s++);wi.splice(s,0,r),s===0&&u_(r)}};var p_=t.version;if(p_!=="19.2.3")throw Error(a(527,p_,"19.2.3"));F.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=h(i),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var uC={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qu.isDisabled&&Qu.supportsFiber)try{Gt=Qu.inject(uC),Mt=Qu}catch{}}return Vl.createRoot=function(r,i){if(!o(r))throw Error(a(299));var s=!1,c="",m=E1,v=S1,x=w1;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(x=i.onRecoverableError)),i=n_(r,1,!1,null,null,s,c,null,m,v,x,h_),r[jo]=i.current,jp(r),new nm(i)},Vl.hydrateRoot=function(r,i,s){if(!o(r))throw Error(a(299));var c=!1,m="",v=E1,x=S1,M=w1,U=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError),s.formState!==void 0&&(U=s.formState)),i=n_(r,1,!0,i,s??null,c,m,U,v,x,M,h_),i.context=r_(null),s=i.current,c=cr(),c=ko(c),m=li(c),m.callback=null,ci(s,m,c),s=c,i.current.lanes=s,ht(i,s),ia(i),r[jo]=i.current,jp(r),new Zu(i)},Vl.version="19.2.3",Vl}var R_;function SC(){if(R_)return am.exports;R_=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(),am.exports=EC(),am.exports}var wC=SC(),E=$i();const H=Io(E),uv=fC({__proto__:null,default:H},[E]);var cm={exports:{}},um={};var O_;function xC(){if(O_)return um;O_=1;var e=$i().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return um.c=function(t){return e.H.useMemoCache(t)},um}var T_;function RC(){return T_||(T_=1,cm.exports=xC()),cm.exports}var Sf=RC(),Rc=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(){}},OC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},TC=class{#e=OC;#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)}},mo=new TC;function AC(e){setTimeout(e,0)}var Eo=typeof window>"u"||"Deno"in globalThis;function Xn(){}function CC(e,t){return typeof e=="function"?e(t):e}function gg(e){return typeof e=="number"&&e>=0&&e!==1/0}function dw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pi(e,t){return typeof e=="function"?e(t):e}function Lr(e,t){return typeof e=="function"?e(t):e}function A_(e,t){const{type:n="all",exact:a,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(a){if(t.queryHash!==dv(u,t.options))return!1}else if(!hc(t.queryKey,u))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||o&&o!==t.state.fetchStatus||l&&!l(t))}function C_(e,t){const{exact:n,status:a,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(fc(t.options.mutationKey)!==fc(l))return!1}else if(!hc(t.options.mutationKey,l))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function dv(e,t){return(t?.queryKeyHashFn||fc)(e)}function fc(e){return JSON.stringify(e,(t,n)=>yg(n)?Object.keys(n).sort().reduce((a,o)=>(a[o]=n[o],a),{}):n)}function hc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>hc(e[n],t[n])):!1}var MC=Object.prototype.hasOwnProperty;function fw(e,t){if(e===t)return e;const n=M_(e)&&M_(t);if(!n&&!(yg(e)&&yg(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),u=l.length,d=n?new Array(u):{};let f=0;for(let h=0;h<u;h++){const g=n?h:l[h],p=e[g],y=t[g];if(p===y){d[g]=p,(n?h<o:MC.call(e,g))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){d[g]=y;continue}const _=fw(p,y);d[g]=_,_===p&&f++}return o===u&&f===o?e:d}function vg(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 M_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yg(e){if(!N_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!N_(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function N_(e){return Object.prototype.toString.call(e)==="[object Object]"}function NC(e){return new Promise(t=>{mo.setTimeout(t,e)})}function bg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?fw(e,t):t}function IC(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function DC(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var fv=Symbol();function hw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===fv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function LC(e,t){return typeof e=="function"?e(...t):!!e}var PC=class extends Rc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Eo&&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"}},hv=new PC;function _g(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function a(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},n.reject=o=>{a({status:"rejected",reason:o}),t(o)},n}var kC=AC;function jC(){let e=[],t=0,n=d=>{d()},a=d=>{d()},o=kC;const l=d=>{t?e.push(d):o(()=>{n(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{a(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{o=d}}}var On=jC(),UC=class extends Rc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Eo&&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}},Dd=new UC;function BC(e){return Math.min(1e3*2**e,3e4)}function pw(e){return(e??"online")==="online"?Dd.isOnline():!0}var Eg=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function mw(e){let t=!1,n=0,a;const o=_g(),l=()=>o.status!=="pending",u=w=>{if(!l()){const T=new Eg(w);y(T),e.onCancel?.(T)}},d=()=>{t=!0},f=()=>{t=!1},h=()=>hv.isFocused()&&(e.networkMode==="always"||Dd.isOnline())&&e.canRun(),g=()=>pw(e.networkMode)&&e.canRun(),p=w=>{l()||(a?.(),o.resolve(w))},y=w=>{l()||(a?.(),o.reject(w))},_=()=>new Promise(w=>{a=T=>{(l()||h())&&w(T)},e.onPause?.()}).then(()=>{a=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let w;const T=n===0?e.initialPromise:void 0;try{w=T??e.fn()}catch(R){w=Promise.reject(R)}Promise.resolve(w).then(p).catch(R=>{if(l())return;const A=e.retry??(Eo?0:3),C=e.retryDelay??BC,O=typeof C=="function"?C(n,R):C,N=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,R);if(t||!N){y(R);return}n++,e.onFail?.(n,R),NC(O).then(()=>h()?void 0:_()).then(()=>{t?y(R):S()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?S():_().then(S),o)}}var gw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gg(this.gcTime)&&(this.#e=mo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Eo?1/0:300*1e3))}clearGcTimeout(){this.#e&&(mo.clearTimeout(this.#e),this.#e=void 0)}},zC=class extends gw{#e;#t;#n;#a;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=D_(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=D_(this.options);t.data!==void 0&&(this.setState(I_(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=bg(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Xn).catch(Xn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Lr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pi(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:!dw(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.#o?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.#i({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,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},o=()=>{const d=hw(this.options,t),h=(()=>{const g={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#o=!1,this.options.persister?this.options.persister(d,h,this):d(h)},u=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return a(d),d})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#i({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=mw({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof Eg&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#i({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.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 Eg){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#i({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#i(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,...vw(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...I_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};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 vw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function D_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var FC=class extends Rc{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#o=_g(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#s;#o;#i;#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),L_(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sg(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sg(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 Lr(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&&!vg(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&P_(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==n||Lr(this.options.enabled,this.#t)!==Lr(t.enabled,this.#t)||Pi(this.options.staleTime,this.#t)!==Pi(t.staleTime,this.#t))&&this.#g();const o=this.#v();a&&(this.#t!==n||Lr(this.options.enabled,this.#t)!==Lr(t.enabled,this.#t)||o!==this.#l)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return HC(this,n)&&(this.#a=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}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.#a))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Xn)),t}#g(){this.#_();const e=Pi(this.options.staleTime,this.#t);if(Eo||this.#a.isStale||!gg(e))return;const n=dw(this.#a.dataUpdatedAt,e)+1;this.#c=mo.setTimeout(()=>{this.#a.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#l=e,!(Eo||Lr(this.options.enabled,this.#t)===!1||!gg(this.#l)||this.#l===0)&&(this.#u=mo.setInterval(()=>{(this.options.refetchIntervalInBackground||hv.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#_(){this.#c&&(mo.clearTimeout(this.#c),this.#c=void 0)}#E(){this.#u&&(mo.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,a=this.options,o=this.#a,l=this.#r,u=this.#s,f=e!==n?e.state:this.#n,{state:h}=e;let g={...h},p=!1,y;if(t._optimisticResults){const D=this.hasListeners(),B=!D&&L_(e,t),Z=D&&P_(e,n,t,a);(B||Z)&&(g={...g,...vw(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:_,errorUpdatedAt:S,status:w}=g;y=g.data;let T=!1;if(t.placeholderData!==void 0&&y===void 0&&w==="pending"){let D;o?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(D=o.data,T=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(w="success",y=bg(o?.data,D,t),p=!0)}if(t.select&&y!==void 0&&!T)if(o&&y===l?.data&&t.select===this.#m)y=this.#f;else try{this.#m=t.select,y=t.select(y),y=bg(o?.data,y,t),this.#f=y,this.#i=null}catch(D){this.#i=D}this.#i&&(_=this.#i,y=this.#f,S=Date.now(),w="error");const R=g.fetchStatus==="fetching",A=w==="pending",C=w==="error",O=A&&R,N=y!==void 0,I={status:w,fetchStatus:g.fetchStatus,isPending:A,isSuccess:w==="success",isError:C,isInitialLoading:O,isLoading:O,data:y,dataUpdatedAt:g.dataUpdatedAt,error:_,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:C&&!N,isPaused:g.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&N,isStale:pv(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Lr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=Y=>{I.status==="error"?Y.reject(I.error):I.data!==void 0&&Y.resolve(I.data)},B=()=>{const Y=this.#o=I.promise=_g();D(Y)},Z=this.#o;switch(Z.status){case"pending":e.queryHash===n.queryHash&&D(Z);break;case"fulfilled":(I.status==="error"||I.data!==Z.value)&&B();break;case"rejected":(I.status!=="error"||I.error!==Z.reason)&&B();break}}return I}updateResult(){const e=this.#a,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),vg(t,e))return;this.#a=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#p.size)return!0;const l=new Set(o??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#a).some(u=>{const d=u;return this.#a[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.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function VC(e,t){return Lr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function L_(e,t){return VC(e,t)||e.state.data!==void 0&&Sg(e,t,t.refetchOnMount)}function Sg(e,t,n){if(Lr(t.enabled,e)!==!1&&Pi(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&pv(e,t)}return!1}function P_(e,t,n,a){return(e!==t||Lr(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pv(e,n)}function pv(e,t){return Lr(t.enabled,e)!==!1&&e.isStaleByTime(Pi(t.staleTime,e))}function HC(e,t){return!vg(e.getCurrentResult(),t)}function k_(e){return{onFetch:(t,n)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let g=!1;const p=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},y=hw(t.options,t.fetchOptions),_=async(S,w,T)=>{if(g)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const A=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:w,direction:T?"backward":"forward",meta:t.options.meta};return p(L),L})(),C=await y(A),{maxPages:O}=t.options,N=T?DC:IC;return{pages:N(S.pages,C,O),pageParams:N(S.pageParams,w,O)}};if(o&&l.length){const S=o==="backward",w=S?yw:wg,T={pages:l,pageParams:u},R=w(a,T);d=await _(T,R,S)}else{const S=e??l.length;do{const w=f===0?u[0]??a.initialPageParam:wg(a,d);if(f>0&&w==null)break;d=await _(d,w),f++}while(f<S)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function wg(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function yw(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function NB(e,t){return t?wg(e,t)!=null:!1}function IB(e,t){return!t||!e.getPreviousPageParam?!1:yw(e,t)!=null}var $C=class extends gw{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||GC(),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.#a?.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.#a=mw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},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 a=this.state.status==="pending",o=!this.#a.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),await this.#n.config.onMutate?.(e,this,n);const u=await this.options.onMutate?.(e,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:o})}const l=await this.#a.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{throw await this.#n.config.onError?.(l,e,this.state.context,this,n),await this.options.onError?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,l,e,this.state.context,n),l}finally{this.#r({type:"error",error: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 GC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qC=class extends Rc{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 a=new $C({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=Xu(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=Xu(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Xu(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Xu(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.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=>C_(t,n))}findAll(e={}){return this.getAll().filter(t=>C_(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(Xn))))}};function Xu(e){return e.options.scope?.id}var YC=class extends Rc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,o=t.queryHash??dv(a,t);let l=this.get(o);return l||(l=new zC({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),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=>A_(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>A_(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()})})}},KC=class{#e;#t;#n;#a;#r;#s;#o;#i;constructor(e={}){this.#e=e.queryCache||new YC,this.#t=e.mutationCache||new qC,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=hv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Dd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=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),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(a.queryHash)?.state.data,u=CC(t,l);if(u!==void 0)return this.#e.build(this,a).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return On.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,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(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=On.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(a).then(Xn).catch(Xn)}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},a=On.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Xn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(a).then(Xn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Pi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xn).catch(Xn)}fetchInfiniteQuery(e){return e.behavior=k_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xn).catch(Xn)}ensureInfiniteQueryData(e){return e.behavior=k_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Dd.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.#a.set(fc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(a=>{hc(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(fc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{hc(e,a.mutationKey)&&Object.assign(n,a.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=dv(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===fv&&(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()}},bw=E.createContext(void 0),WC=e=>{const t=E.useContext(bw);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZC=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(bw.Provider,{value:e,children:t})),_w=E.createContext(!1),QC=()=>E.useContext(_w);_w.Provider;function XC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var JC=E.createContext(XC()),e4=()=>E.useContext(JC),t4=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},n4=e=>{E.useEffect(()=>{e.clearReset()},[e])},r4=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||LC(n,[e.error,a])),a4=(e,t)=>t.state.data===void 0,i4=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>n(a(...o)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},o4=(e,t)=>e.isLoading&&e.isFetching&&!t,s4=(e,t)=>e?.suspense&&t.isPending,j_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function l4(e,t,n){const a=QC(),o=e4(),l=WC(n),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=a?"isRestoring":"optimistic",i4(u),t4(u,o),n4(o);const d=!l.getQueryCache().get(u.queryHash),[f]=E.useState(()=>new t(l,u)),h=f.getOptimisticResult(u),g=!a&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(p=>{const y=g?f.subscribe(On.batchCalls(p)):Xn;return f.updateResult(),y},[f,g]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),E.useEffect(()=>{f.setOptions(u)},[u,f]),s4(u,h))throw j_(u,f,o);if(r4({result:h,errorResetBoundary:o,throwOnError:u.throwOnError,query:l.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw h.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,h),u.experimental_prefetchInRender&&!Eo&&o4(h,a)&&(d?j_(u,f,o):l.getQueryCache().get(u.queryHash)?.promise)?.catch(Xn).finally(()=>{f.updateResult()}),u.notifyOnChangeProps?h:f.trackResult(h)}function c4(e,t){return l4({...e,enabled:!0,suspense:!0,throwOnError:a4,placeholderData:void 0},FC,t)}const u4={authConfig:()=>["authConfig"],threads:e=>["threads",e],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],collectionItem:(e,t,n)=>["collection-item",e,t,n],collectionListPrefix:(e,t)=>["collection-list",e,t],collectionList:(e,t,n)=>["collection-list",e,t,n],collectionListInfinitePrefix:(e,t)=>["collection-list-infinite",e,t],collectionListInfinite:(e,t,n)=>["collection-list-infinite",e,t,n],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e]},Ew=E.createContext(void 0);async function d4(){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 f4(e){const t=Sf.c(4),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:u4.authConfig(),queryFn:d4,staleTime:1/0},t[0]=a):a=t[0];const{data:o}=c4(a);let l;return t[1]!==o||t[2]!==n?(l=b.jsx(Ew.Provider,{value:o,children:n}),t[1]=o,t[2]=n,t[3]=l):l=t[3],l}function DB(){const e=E.useContext(Ew);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const xg=new WeakMap,h4=new WeakMap,Ld={current:[]};let dm=!1,ic=0;const tc=new Set,Ju=new Map;function Sw(e){for(const t of e){if(Ld.current.includes(t))continue;Ld.current.push(t),t.recompute();const n=h4.get(t);if(n)for(const a of n){const o=xg.get(a);o?.length&&Sw(o)}}}function p4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function m4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function ww(e){if(ic>0&&!Ju.has(e)&&Ju.set(e,e.prevState),tc.add(e),!(ic>0)&&!dm)try{for(dm=!0;tc.size>0;){const t=Array.from(tc);tc.clear();for(const n of t){const a=Ju.get(n)??n.prevState;n.prevState=a,p4(n)}for(const n of t){const a=xg.get(n);a&&(Ld.current.push(n),Sw(a))}for(const n of t){const a=xg.get(n);if(a)for(const o of a)m4(o)}}}finally{dm=!1,Ld.current=[],Ju.clear()}}function oc(e){ic++;try{e()}finally{if(ic--,ic===0){const t=tc.values().next().value;t&&ww(t)}}}function g4(e){return typeof e=="function"}class v4{constructor(t,n){this.listeners=new Set,this.subscribe=a=>{var o,l;this.listeners.add(a);const u=(l=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:l.call(o,a,this);return()=>{this.listeners.delete(a),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,a,o;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):g4(t)?this.state=t(this.prevState):this.state=t,(o=(a=this.options)==null?void 0:a.onUpdate)==null||o.call(a),ww(this)}}const ki="__TSR_index",U_="popstate",B_="beforeunload";function y4(e){let t=e.getLocation();const n=new Set,a=u=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},l=async({task:u,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){u();return}const g=e.getBlockers?.()??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&g.length&&p)for(const y of g){const _=Pd(f.path,f.state);if(await y.blockerFn({currentLocation:t,nextLocation:_,action:f.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,d,f)=>{const h=t.state[ki];d=z_(h+1,d),l({task:()=>{e.pushState(u,d),a({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:u,state:d})},replace:(u,d,f)=>{const h=t.state[ki];d=z_(h,d),l({task:()=>{e.replaceState(u,d),a({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:u,state:d})},go:(u,d)=>{l({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:d,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[ki]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,u]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function z_(e,t){t||(t={});const n=mv();return{...t,key:n,__TSR_key:n,[ki]:e}}function b4(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,a=t.history.replaceState;let o=[];const l=()=>o,u=D=>o=D,d=(D=>D),f=(()=>Pd(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=mv();t.history.replaceState({[ki]:0,key:D,__TSR_key:D},"")}let h=f(),g,p=!1,y=!1,_=!1,S=!1;const w=()=>h;let T,R;const A=()=>{T&&(I._ignoreSubscribers=!0,(T.isPush?t.history.pushState:t.history.replaceState)(T.state,"",T.href),I._ignoreSubscribers=!1,T=void 0,R=void 0,g=void 0)},C=(D,B,Z)=>{const Y=d(B);R||(g=h),h=Pd(B,Z),T={href:Y,state:Z,isPush:T?.isPush||D==="push"},R||(R=Promise.resolve().then(()=>A()))},O=D=>{h=f(),I.notify({type:D})},N=async()=>{if(y){y=!1;return}const D=f(),B=D.state[ki]-h.state[ki],Z=B===1,Y=B===-1,V=!Z&&!Y||p;p=!1;const z=V?"GO":Y?"BACK":"FORWARD",ie=V?{type:"GO",index:B}:{type:Y?"BACK":"FORWARD"};if(_)_=!1;else{const ee=l();if(typeof document<"u"&&ee.length){for(const k of ee)if(await k.blockerFn({currentLocation:h,nextLocation:D,action:z})){y=!0,t.history.go(1),I.notify(ie);return}}}h=f(),I.notify(ie)},L=D=>{if(S){S=!1;return}let B=!1;const Z=l();if(typeof document<"u"&&Z.length)for(const Y of Z){const V=Y.enableBeforeUnload??!0;if(V===!0){B=!0;break}if(typeof V=="function"&&V()===!0){B=!0;break}}if(B)return D.preventDefault(),D.returnValue=""},I=y4({getLocation:w,getLength:()=>t.history.length,pushState:(D,B)=>C("push",D,B),replaceState:(D,B)=>C("replace",D,B),back:D=>(D&&(_=!0),S=!0,t.history.back()),forward:D=>{D&&(_=!0),S=!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=a,t.removeEventListener(B_,L,{capture:!0}),t.removeEventListener(U_,N)},onBlocked:()=>{g&&h!==g&&(h=g)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(B_,L,{capture:!0}),t.addEventListener(U_,N),t.history.pushState=function(...D){const B=n.apply(t.history,D);return I._ignoreSubscribers||O("PUSH"),B},t.history.replaceState=function(...D){const B=a.apply(t.history,D);return I._ignoreSubscribers||O("REPLACE"),B},I}function Pd(e,t){const n=e.indexOf("#"),a=e.indexOf("?"),o=mv();return{href:e,pathname:e.substring(0,n>0?a>0?Math.min(n,a):n:a>0?a:e.length),hash:n>-1?e.substring(n):"",search:a>-1?e.slice(a,n===-1?void 0:n):"",state:t||{[ki]:0,key:o,__TSR_key:o}}}function mv(){return(Math.random()+1).toString(36).substring(7)}function kd(e){return e[e.length-1]}function _4(e){return typeof e=="function"}function Di(e,t){return _4(e)?e(t):e}const E4=Object.prototype.hasOwnProperty;function Dr(e,t){if(e===t)return e;const n=t,a=H_(e)&&H_(n);if(!a&&!(jd(e)&&jd(n)))return n;const o=a?e:F_(e);if(!o)return n;const l=a?n:F_(n);if(!l)return n;const u=o.length,d=l.length,f=a?new Array(d):{};let h=0;for(let g=0;g<d;g++){const p=a?g:l[g],y=e[p],_=n[p];if(y===_){f[p]=y,(a?g<u:E4.call(e,p))&&h++;continue}if(y===null||_===null||typeof y!="object"||typeof _!="object"){f[p]=_;continue}const S=Dr(y,_);f[p]=S,S===y&&h++}return u===d&&h===u?e:f}function F_(e){const t=[],n=Object.getOwnPropertyNames(e);for(const o of n){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}const a=Object.getOwnPropertySymbols(e);for(const o of a){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}return t}function jd(e){if(!V_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!V_(n)||!n.hasOwnProperty("isPrototypeOf"))}function V_(e){return Object.prototype.toString.call(e)==="[object Object]"}function H_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yo(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 a=0,o=e.length;a<o;a++)if(!yo(e[a],t[a],n))return!1;return!0}if(jd(e)&&jd(t)){const a=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!yo(e[u],t[u],n))return!1;return!0}let o=0;if(!a)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let l=0;for(const u in t)if((!a||t[u]!==void 0)&&(l++,l>o||!yo(e[u],t[u],n)))return!1;return o===l}return!1}function zs(e){let t,n;const a=new Promise((o,l)=>{t=o,n=l});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",n(o)},a}function S4(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 ji(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function $_(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function G_(e,t){if(!e)return e;const n=/%25|%5C/gi;let a=0,o="",l;for(;(l=n.exec(e))!==null;)o+=$_(e.slice(a,l.index))+l[0],a=n.lastIndex;return o+$_(a?e.slice(a):e)}var w4="Invariant failed";function $a(e,t){if(!e)throw new Error(w4)}function Ud(e){const t=new Map;let n,a;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,a&&(a.next=l,l.prev=a)):(l.next.prev=void 0,n=l.next,l.next=void 0,a&&(l.prev=a,a.next=l)),a=l)};return{get(l){const u=t.get(l);if(u)return o(u),u.value},set(l,u){if(t.size>=e&&n){const f=n;t.delete(f.key),f.next&&(n=f.next,f.next.prev=void 0),f===a&&(a=void 0)}const d=t.get(l);if(d)d.value=u,o(d);else{const f={key:l,value:u,prev:a};a&&(a.next=f),a=f,n||(n=f),t.set(l,f)}},clear(){t.clear(),n=void 0,a=void 0}}}const Fs=0,So=1,wo=2,pc=3,Ds=4,x4=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,R4=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,O4=/^([^{]*)\{\$\}([^}]*)$/;function gv(e,t,n=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,l=e.substring(t,o);if(!l||!l.includes("$"))return n[0]=Fs,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(l==="$"){const h=e.length;return n[0]=wo,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=So,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const u=l.match(O4);if(u){const g=u[1].length;return n[0]=wo,n[1]=t+g,n[2]=t+g+1,n[3]=t+g+2,n[4]=t+g+3,n[5]=e.length,n}const d=l.match(R4);if(d){const h=d[1],g=d[2],p=d[3],y=h.length;return n[0]=pc,n[1]=t+y,n[2]=t+y+3,n[3]=t+y+3+g.length,n[4]=o-p.length,n[5]=o,n}const f=l.match(x4);if(f){const h=f[1],g=f[2],p=f[3],y=h.length;return n[0]=So,n[1]=t+y,n[2]=t+y+2,n[3]=t+y+2+g.length,n[4]=o-p.length,n[5]=o,n}return n[0]=Fs,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function wf(e,t,n,a,o,l,u){u?.(n);let d=a;{const f=n.fullPath??n.from,h=f.length,g=n.options?.caseSensitive??e;for(;d<h;){const y=gv(f,d,t);let _;const S=d,w=y[5];switch(d=w+1,l++,y[0]){case Fs:{const R=f.substring(y[2],y[3]);if(g){const A=o.static?.get(R);if(A)_=A;else{o.static??=new Map;const C=Ps(n.fullPath??n.from);C.parent=o,C.depth=l,_=C,o.static.set(R,C)}}else{const A=R.toLowerCase(),C=o.staticInsensitive?.get(A);if(C)_=C;else{o.staticInsensitive??=new Map;const O=Ps(n.fullPath??n.from);O.parent=o,O.depth=l,_=O,o.staticInsensitive.set(A,O)}}break}case So:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,N=A?C?A:A.toLowerCase():void 0,L=o.dynamic?.find(I=>I.caseSensitive===C&&I.prefix===O&&I.suffix===N);if(L)_=L;else{const I=hm(So,n.fullPath??n.from,C,O,N);_=I,I.depth=l,I.parent=o,o.dynamic??=[],o.dynamic.push(I)}break}case pc:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,N=A?C?A:A.toLowerCase():void 0,L=o.optional?.find(I=>I.caseSensitive===C&&I.prefix===O&&I.suffix===N);if(L)_=L;else{const I=hm(pc,n.fullPath??n.from,C,O,N);_=I,I.parent=o,I.depth=l,o.optional??=[],o.optional.push(I)}break}case wo:{const R=f.substring(S,y[1]),A=f.substring(y[4],w),C=g&&!!(R||A),O=R?C?R:R.toLowerCase():void 0,N=A?C?A:A.toLowerCase():void 0,L=hm(wo,n.fullPath??n.from,C,O,N);_=L,L.parent=o,L.depth=l,o.wildcard??=[],o.wildcard.push(L)}}o=_}const p=(n.path||!n.children)&&!n.isRoot;if(p&&f.endsWith("/")){const y=Ps(n.fullPath??n.from);y.kind=Ds,y.parent=o,l++,y.depth=l,o.index=y,o=y}p&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const f of n.children)wf(e,t,f,d,o,l,u)}function fm(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 po(e){if(e.static)for(const t of e.static.values())po(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())po(t);if(e.dynamic?.length){e.dynamic.sort(fm);for(const t of e.dynamic)po(t)}if(e.optional?.length){e.optional.sort(fm);for(const t of e.optional)po(t)}if(e.wildcard?.length){e.wildcard.sort(fm);for(const t of e.wildcard)po(t)}}function Ps(e){return{kind:Fs,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function hm(e,t,n,a,o){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:a,suffix:o}}function T4(e,t){const n=Ps("/"),a=new Uint16Array(6);for(const o of e)wf(!1,a,o,1,n,0);po(n),t.masksTree=n,t.flatCache=Ud(1e3)}function A4(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const a=vv(e,t.masksTree);return t.flatCache.set(e,a),a}function C4(e,t,n,a,o){e||="/",a||="/";const l=t?`case\0${e}`:e;let u=o.singleCache.get(l);if(!u){u=Ps("/");const d=new Uint16Array(6);wf(t,d,{from:e},1,u,0),o.singleCache.set(l,u)}return vv(a,u,n)}function M4(e,t,n=!1){const a=n?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";const l=vv(e,t.segmentTree,n);return l&&(l.branch=L4(l.route)),t.matchCache.set(a,l),l}function N4(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function I4(e,t=!1,n){const a=Ps(e.fullPath),o=new Uint16Array(6),l={},u={};let d=0;return wf(t,o,e,1,a,0,h=>{if(n?.(h,d),$a(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,d!==0&&h.path){const g=N4(h.fullPath);(!u[g]||h.fullPath.endsWith("/"))&&(u[g]=h)}d++}),po(a),{processedTree:{segmentTree:a,singleCache:Ud(1e3),matchCache:Ud(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function vv(e,t,n=!1){const a=e.split("/"),o=k4(e,a,t,n);if(!o)return null;const l=D4(e,a,o);return"**"in o&&(l["**"]=o["**"]),{route:o.node.route,params:l}}function D4(e,t,n){const a=P4(n.node);let o=null;const l={};for(let u=0,d=0,f=0;d<a.length;u++,d++,f++){const h=a[d],g=t[u],p=f;if(g&&(f+=g.length),h.kind===So){o??=n.node.fullPath.split("/");const y=o[d],_=h.prefix?.length??0;if(y.charCodeAt(_)===123){const w=h.suffix?.length??0,T=y.substring(_+2,y.length-w-1),R=g.substring(_,g.length-w);l[T]=decodeURIComponent(R)}else{const w=y.substring(1);l[w]=decodeURIComponent(g)}}else if(h.kind===pc){if(n.skipped&1<<d){u--;continue}o??=n.node.fullPath.split("/");const y=o[d],_=h.prefix?.length??0,S=h.suffix?.length??0,w=y.substring(_+3,y.length-S-1),T=h.suffix||h.prefix?g.substring(_,g.length-S):g;T&&(l[w]=decodeURIComponent(T))}else if(h.kind===wo){const y=h,_=e.substring(p+(y.prefix?.length??0),e.length-(y.suffix?.length??0)),S=decodeURIComponent(_);l["*"]=S,l._splat=S;break}}return l}function L4(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function P4(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function k4(e,t,n,a){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!kd(t),l=o&&e!=="/",u=t.length-(o?1:0),d=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,h=null,g=null;for(;d.length;){const p=d.pop();let{node:y,index:_,skipped:S,depth:w,statics:T,dynamics:R,optionals:A}=p;a&&y.route&&y.kind!==Ds&&Hl(h,p)&&(h=p);const C=_===u;if(C&&(y.route&&!l&&Hl(g,p)&&(g=p),!y.optional&&!y.wildcard&&!y.index))continue;const O=C?void 0:t[_];let N;if(C&&y.index){const L={node:y.index,index:_,skipped:S,depth:w+1,statics:T,dynamics:R,optionals:A};if(T===u&&!R&&!A&&!S)return L;Hl(g,L)&&(g=L)}if(y.wildcard&&Hl(f,p))for(const L of y.wildcard){const{prefix:I,suffix:D}=L;if(!(I&&(C||!(L.caseSensitive?O:N??=O.toLowerCase()).startsWith(I)))){if(D){if(C)continue;const B=t.slice(_).join("/").slice(-D.length);if((L.caseSensitive?B:B.toLowerCase())!==D)continue}f={node:L,index:u,skipped:S,depth:w,statics:T,dynamics:R,optionals:A};break}}if(y.optional){const L=S|1<<w,I=w+1;for(let D=y.optional.length-1;D>=0;D--){const B=y.optional[D];d.push({node:B,index:_,skipped:L,depth:I,statics:T,dynamics:R,optionals:A})}if(!C)for(let D=y.optional.length-1;D>=0;D--){const B=y.optional[D],{prefix:Z,suffix:Y}=B;if(Z||Y){const V=B.caseSensitive?O:N??=O.toLowerCase();if(Z&&!V.startsWith(Z)||Y&&!V.endsWith(Y))continue}d.push({node:B,index:_+1,skipped:S,depth:I,statics:T,dynamics:R,optionals:A+1})}}if(!C&&y.dynamic&&O)for(let L=y.dynamic.length-1;L>=0;L--){const I=y.dynamic[L],{prefix:D,suffix:B}=I;if(D||B){const Z=I.caseSensitive?O:N??=O.toLowerCase();if(D&&!Z.startsWith(D)||B&&!Z.endsWith(B))continue}d.push({node:I,index:_+1,skipped:S,depth:w+1,statics:T,dynamics:R+1,optionals:A})}if(!C&&y.staticInsensitive){const L=y.staticInsensitive.get(N??=O.toLowerCase());L&&d.push({node:L,index:_+1,skipped:S,depth:w+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:S,depth:w+1,statics:T+1,dynamics:R,optionals:A})}}if(g&&f)return Hl(f,g)?g:f;if(g)return g;if(f)return f;if(a&&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 Hl(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===Ds)>(e.node.kind===Ds)||t.node.kind===Ds==(e.node.kind===Ds)&&t.depth>e.depth))):!0}function xd(e){return yv(e.filter(t=>t!==void 0).join("/"))}function yv(e){return e.replace(/\/{2,}/g,"/")}function xw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function bo(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Rw(e){return bo(xw(e))}function Bd(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function j4(e,t,n){return Bd(e,n)===Bd(t,n)}function U4({base:e,to:t,trailingSlash:n="never",cache:a}){const o=t.startsWith("/"),l=!o&&t===".";let u;if(a){u=o?t:l?e:e+"\0"+t;const p=a.get(u);if(p)return p}let d;if(l)d=e.split("/");else if(o)d=t.split("/");else{for(d=e.split("/");d.length>1&&kd(d)==="";)d.pop();const p=t.split("/");for(let y=0,_=p.length;y<_;y++){const S=p[y];S===""?y?y===_-1&&d.push(S):d=[S]:S===".."?d.pop():S==="."||d.push(S)}}d.length>1&&(kd(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=gv(y,0,f);const _=f[0];if(_===Fs){h+=y;continue}const S=f[5],w=y.substring(0,f[1]),T=y.substring(f[4],S),R=y.substring(f[2],f[3]);_===So?h+=w||T?`${w}{$${R}}${T}`:`$${R}`:_===wo?h+=w||T?`${w}{$}${T}`:"$":h+=`${w}{-$${R}}${T}`}h=yv(h);const g=h||"/";return u&&a&&a.set(u,g),g}function pm(e,t,n){const a=t[e];return typeof a!="string"?a:e==="_splat"?encodeURI(a):B4(a,n)}function mm({path:e,params:t,decodeCharMap:n}){let a=!1;const o={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:a};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:a};const l=e.length;let u=0,d,f="";for(;u<l;){const g=u;d=gv(e,g,d);const p=d[5];if(u=p+1,g===p)continue;const y=d[0];if(y===Fs){f+="/"+e.substring(g,p);continue}if(y===wo){const _=t._splat;o._splat=_,o["*"]=_;const S=e.substring(g,d[1]),w=e.substring(d[4],p);if(!_){a=!0,(S||w)&&(f+="/"+S+w);continue}const T=pm("_splat",t,n);f+="/"+S+T+w;continue}if(y===So){const _=e.substring(d[2],d[3]);!a&&!(_ in t)&&(a=!0),o[_]=t[_];const S=e.substring(g,d[1]),w=e.substring(d[4],p),T=pm(_,t,n)??"undefined";f+="/"+S+T+w;continue}if(y===pc){const _=e.substring(d[2],d[3]),S=t[_];if(S==null)continue;o[_]=S;const w=e.substring(g,d[1]),T=e.substring(d[4],p),R=pm(_,t,n)??"";f+="/"+w+R+T;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:a}}function B4(e,t){let n=encodeURIComponent(e);if(t)for(const[a,o]of t)n=n.replaceAll(a,o);return n}function yr(e){return!!e?.isNotFound}function z4(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const zd="tsr-scroll-restoration-v1_3",F4=(e,t)=>{let n;return(...a)=>{n||(n=setTimeout(()=>{e(...a),n=null},t))}};function V4(){const e=z4();if(!e)return null;const t=e.getItem(zd);let n=t?JSON.parse(t):{};return{state:n,set:a=>(n=Di(a,n)||n,e.setItem(zd,JSON.stringify(n)))}}const ed=V4(),Rg=e=>e.state.__TSR_key||e.href;function H4(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 Fd=!1;function Ow({storageKey:e,key:t,behavior:n,shouldScrollRestoration:a,scrollToTopSelectors:o,location:l}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const d=t||window.history.state?.__TSR_key,f=u[d];Fd=!0;e:{if(a&&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 g={top:0,left:0,behavior:n};if(window.scrollTo(g),o)for(const p of o){if(p==="window")continue;const y=typeof p=="function"?p():document.querySelector(p);y&&y.scrollTo(g)}}Fd=!1}function $4(e,t){if(!ed&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!ed))return;e.isScrollRestorationSetup=!0,Fd=!1;const a=e.options.getScrollRestorationKey||Rg;window.history.scrollRestoration="manual";const o=l=>{if(Fd||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const f=l.target.getAttribute("data-scroll-restoration-id");f?u=`[data-scroll-restoration-id="${f}"]`:u=H4(l.target)}const d=a(e.state.location);ed.set(f=>{const h=f[d]||={},g=h[u]||={};if(u==="window")g.scrollX=window.scrollX||0,g.scrollY=window.scrollY||0;else if(u){const p=document.querySelector(u);p&&(g.scrollX=p.scrollLeft||0,g.scrollY=p.scrollTop||0)}return f})};typeof document<"u"&&document.addEventListener("scroll",F4(o,100),!0),e.subscribe("onRendered",l=>{const u=a(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Ow({storageKey:zd,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&ed.set(d=>(d[u]||={},d)))})}function G4(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 q4(e,t=String){const n=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&n.set(a,t(o))}return n.toString()}function gm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Y4(e){const t=new URLSearchParams(e),n={};for(const[a,o]of t.entries()){const l=n[a];l==null?n[a]=gm(o):Array.isArray(l)?l.push(gm(o)):n[a]=[l,gm(o)]}return n}const K4=Z4(JSON.parse),W4=Q4(JSON.stringify,JSON.parse);function Z4(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Y4(t);for(const a in n){const o=n[a];if(typeof o=="string")try{n[a]=e(o)}catch{}}return n}}function Q4(e,t){const n=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const l=q4(o,a);return l?`?${l}`:""}}const fr="__root__";function X4(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 kr(e){return e instanceof Response&&!!e.options}const Rd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},xf=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),bv=(e,t,n=!0)=>{const a={...e.router.options.context??{}},o=n?t:t-1;for(let l=0;l<=o;l++){const u=e.matches[l];if(!u)continue;const d=e.router.getMatch(u.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},Tw=(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),$a(n.options.notFoundComponent);const a=e.matches.find(o=>o.routeId===n.id);$a(a,"Could not find match for route: "+n.id),e.updateMatch(a.id,o=>({...o,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,Tw(e,t))},Li=(e,t,n)=>{if(!(!kr(n)&&!yr(n))){if(kr(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 a=kr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:a,isFetching:!1,error:n})),yr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw kr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(Tw(e,n),n)}},Aw=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},$l=(e,t,n,a)=>{const{id:o,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=a,e.firstBadMatchIndex??=t,Li(e,e.router.getMatch(o),n);try{u.options.onError?.(n)}catch(d){n=d,Li(e,e.router.getMatch(o),n)}e.updateMatch(o,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}))},J4=(e,t,n,a)=>{const o=e.router.getMatch(t),l=e.matches[n-1]?.id,u=l?e.router.getMatch(l):void 0;if(e.router.isShell()){o.ssr=a.id===fr;return}if(u?.ssr===!1){o.ssr=!1;return}const d=_=>_===!0&&u?.ssr==="data-only"?"data-only":_,f=e.router.options.defaultSsr??!0;if(a.options.ssr===void 0){o.ssr=d(f);return}if(typeof a.options.ssr!="function"){o.ssr=d(a.options.ssr);return}const{search:h,params:g}=o,p={search:td(h,o.searchError),params:td(g,o.paramsError),location:e.location,matches:e.matches.map(_=>({index:_.index,pathname:_.pathname,fullPath:_.fullPath,staticData:_.staticData,id:_.id,routeId:_.routeId,search:td(_.search,_.searchError),params:td(_.params,_.paramsError),ssr:_.ssr}))},y=a.options.ssr(p);if(ji(y))return y.then(_=>{o.ssr=d(_??f)});o.ssr=d(y??f)},Cw=(e,t,n,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!xf(e,t)&&(n.options.loader||n.options.beforeLoad||Iw(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{Rd(e)},o);a._nonReactive.pendingTimeout=u}},e3=(e,t,n)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Cw(e,t,n,a);const o=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Li(e,l,l.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},t3=(e,t,n,a)=>{const o=e.router.getMatch(t),l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=zs(()=>{l?.resolve()});const{paramsError:u,searchError:d}=o;u&&$l(e,n,u,"PARSE_PARAMS"),d&&$l(e,n,d,"VALIDATE_SEARCH"),Cw(e,t,a,o);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})))},_=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,L=>({...L,isFetching:!1}))};if(!a.options.beforeLoad){oc(()=>{y(),_()});return}o._nonReactive.beforeLoadPromise=zs();const S={...bv(e,n,!1),...o.__routeContext},{search:w,params:T,cause:R}=o,A=xf(e,t),C={search:w,abortController:f,params:T,preload:A,context:S,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){oc(()=>{y(),_()});return}(kr(L)||yr(L))&&(y(),$l(e,n,L,"BEFORE_LOAD")),oc(()=>{y(),e.updateMatch(t,I=>({...I,__beforeLoadContext:L})),_()})};let N;try{if(N=a.options.beforeLoad(C),ji(N))return y(),N.catch(L=>{$l(e,n,L,"BEFORE_LOAD")}).then(O)}catch(L){y(),$l(e,n,L,"BEFORE_LOAD")}O(N)},n3=(e,t)=>{const{id:n,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],l=()=>{if(e.router.isServer){const f=J4(e,n,t,o);if(ji(f))return f.then(d)}return d()},u=()=>t3(e,n,t,o),d=()=>{if(Aw(e,n))return;const f=e3(e,n,o);return ji(f)?f.then(u):u()};return l()},r3=(e,t,n)=>{const a=e.router.getMatch(t);if(!a||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([l,u,d])=>{const f=l?.meta,h=l?.links,g=l?.scripts,p=l?.styles;return{meta:f,links:h,headScripts:g,headers:d,scripts:u,styles:p}})},Mw=(e,t,n,a)=>{const o=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:d,cause:f}=e.router.getMatch(t),h=bv(e,n),g=xf(e,t);return{params:l,deps:u,preload:!!g,parentMatchPromise:o,abortController:d,context:h,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:g?"preload":f,route:a,...e.router.options.additionalContext}},q_=async(e,t,n,a)=>{try{const o=e.router.getMatch(t);try{(!e.router.isServer||o.ssr===!0)&&Nw(a);const l=a.options.loader?.(Mw(e,t,n,a)),u=a.options.loader&&ji(l);if((u||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||o._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),a.options.loader){const h=u?await l:l;Li(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,g=>({...g,loaderData:h}))}a._lazyPromise&&await a._lazyPromise;const f=o._nonReactive.minPendingPromise;f&&await f,a._componentsPromise&&await a._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let u=l;const d=o._nonReactive.minPendingPromise;d&&await d,yr(l)&&await a.options.notFoundComponent?.preload?.(),Li(e,e.router.getMatch(t),l);try{a.options.onError?.(l)}catch(f){u=f,Li(e,e.router.getMatch(t),f)}e.updateMatch(t,f=>({...f,error:u,status:"error",isFetching:!1}))}}catch(o){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),Li(e,l,o)}},a3=async(e,t)=>{const{id:n,routeId:a}=e.matches[t];let o=!1,l=!1;const u=e.router.looseRoutesById[a],d=()=>{e.updateMatch(n,g=>({...g,context:bv(e,t)}))};if(Aw(e,n)){if(e.router.isServer)return e.router.getMatch(n)}else{const g=e.router.getMatch(n);if(g._nonReactive.loaderPromise){if(g.status==="success"&&!e.sync&&!g.preload)return g;await g._nonReactive.loaderPromise;const p=e.router.getMatch(n),y=p._nonReactive.error||p.error;y&&Li(e,p,y)}else{const p=Date.now()-g.updatedAt,y=xf(e,n),_=y?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,S=u.options.shouldReload,w=typeof S=="function"?S(Mw(e,n,t,u)):S,T=!!y&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=zs(),T!==R.preload&&e.updateMatch(n,O=>({...O,preload:T}));const{status:A,invalid:C}=R;o=A==="success"&&(C||(w??p>_)),y&&u.options.preload===!1||(o&&!e.sync?(l=!0,(async()=>{try{await q_(e,n,t,u),d();const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){kr(O)&&await e.router.navigate(O.options)}})()):(A!=="success"||o&&e.sync)&&await q_(e,n,t,u))}}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,g=>({...g,isFetching:h,invalid:!1})),e.router.getMatch(n)):f};async function Y_(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&Rd(t);try{for(let d=0;d<t.matches.length;d++){const f=n3(t,d);ji(f)&&await f}const n=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<n;d++)t.matchPromises.push(a3(t,d));const o=(await Promise.allSettled(t.matchPromises)).filter(d=>d.status==="rejected").map(d=>d.reason);let l;for(const d of o){if(kr(d))throw d;!l&&yr(d)&&(l=d)}for(const d of t.matches){const{id:f,routeId:h}=d,g=t.router.looseRoutesById[h];try{const p=r3(t,f,g);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 u=Rd(t);ji(u)&&await u}catch(n){if(yr(n)&&!t.preload){const a=Rd(t);throw ji(a)&&await a,n}if(kr(n))throw n}return t.matches}async function Nw(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...a}=t.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const a of Dw){const o=e.options[a]?.preload;o&&n.push(o())}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 td(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function Iw(e){for(const t of Dw)if(e.options[t]?.preload)return!0;return!1}const Dw=["component","errorComponent","pendingComponent","notFoundComponent"];function i3(e){return{input:({url:t})=>{for(const n of e)t=Lw(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Og(e[n],t);return t}}}function o3(e){const t=Rw(e.basepath),n=`/${t}`,a=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const d=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return d===o?u.pathname="/":d.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=xd(["/",t,u.pathname]),u)}}function Lw(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 Og(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 _o(e){const t=e.resolvedLocation,n=e.location,a=t?.pathname!==n.pathname,o=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:a,hrefChanged:o,hashChanged:l}}class s3{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 a=this.options,o=this.basepath??a?.basepath??"/",l=this.basepath===void 0,u=a?.rewrite;this.options={...a,...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=b4())),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 v4(c3(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(y=>!["redirected"].includes(y.status))}}}),$4(this));let d=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||o!==f||u!==h){this.basepath=f;const y=[];Rw(f)!==""&&y.push(o3({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:i3(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:a,processedTree:o}=I4(this.routeTree,this.options.caseSensitive,(u,d)=>{u.init({originalIndex:d})});this.options.routeMasks&&T4(this.options.routeMasks,o),this.routesById=n,this.routesByPath=a,this.processedTree=o;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,a)=>{const o={eventType:n,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(a=>{a.eventType===n.type&&a.fn(n)})},this.parseLocation=(n,a)=>{const o=({href:f,state:h})=>{const g=new URL(f,this.origin),p=Lw(this.rewrite,g),y=this.options.parseSearch(p.search),_=this.options.stringifySearch(y);p.search=_;const S=p.href.replace(p.origin,""),w=p.pathname,T=new URL(p.href),R=Og(this.rewrite,T),A=R.pathname+R.search+R.hash;return{href:S,publicHref:A,url:p,pathname:G_(w),searchStr:_,search:Dr(a?.search,y),hash:p.hash.split("#").reverse()[0]??"",state:Dr(a?.state,h)}},l=o(n),{__tempLocation:u,__tempKey:d}=l.state;if(u&&(!d||d===this.tempLocationKey)){const f=o(u);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=Ud(1e3),this.resolvePathWithBase=(n,a)=>U4({base:n,to:yv(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,a,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:a},o):this.matchRoutesInternal(n,a),this.getMatchedRoutes=n=>u3({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const a=this.getMatch(n);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),a=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...a]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const a=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutes(u,{_buildLocation:!0}),f=kd(d);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??f.fullPath,g=this.resolvePathWithBase(h,"."),p=f.search,y={...f.params},_=l.to?this.resolvePathWithBase(g,`${l.to}`):this.resolvePathWithBase(g,"."),S=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,Di(l.params,y)),w=mm({path:_,params:S}).interpolatedPath,T=this.matchRoutes(w,void 0,{_buildLocation:!0}).map(Z=>this.looseRoutesById[Z.routeId]);if(Object.keys(S).length>0)for(const Z of T){const Y=Z.options.params?.stringify??Z.options.stringifyParams;Y&&Object.assign(S,Y(S))}const R=n.leaveParams?_:G_(mm({path:_,params:S,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let A=p;if(n._includeValidateSearch&&this.options.search?.strict){const Z={};T.forEach(Y=>{if(Y.options.validateSearch)try{Object.assign(Z,Tg(Y.options.validateSearch,{...Z,...A}))}catch{}}),A=Z}A=d3({search:A,dest:l,destRoutes:T,_includeValidateSearch:n._includeValidateSearch}),A=Dr(p,A);const C=this.options.stringifySearch(A),O=l.hash===!0?u.hash:l.hash?Di(l.hash,u.hash):void 0,N=O?`#${O}`:"";let L=l.state===!0?u.state:l.state?Di(l.state,u.state):{};L=Dr(u.state,L);const I=`${R}${C}${N}`,D=new URL(I,this.origin),B=Og(this.rewrite,D);return{publicHref:B.pathname+B.search+B.hash,href:I,url:B,pathname:R,search:A,searchStr:C,state:L,hash:O??"",unmaskOnReload:l.unmaskOnReload}},o=(l={},u)=>{const d=a(l);let f=u?a(u):void 0;if(!f){const h={};if(this.options.routeMasks){const g=A4(d.pathname,this.processedTree);if(g){Object.assign(h,g.params);const{from:p,params:y,..._}=g.route,S=y===!1||y===null?{}:(y??!0)===!0?h:Object.assign(h,Di(y,h));u={from:n.from,..._,params:S},f=a(u)}}}return f&&(d.maskedLocation=f),d};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:a,...o})=>{const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(g=>{o.state[g]=this.latestLocation.state[g]});const h=yo(o.state,this.latestLocation.state);return f.forEach(g=>{delete o.state[g]}),h},u=bo(this.latestLocation.href)===bo(o.href),d=this.commitLocationPromise;if(this.commitLocationPromise=zs(()=>{d?.resolve()}),u&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,url:g,...p}=o;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[o.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:a,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:u,href:d,...f}={})=>{if(d){const p=this.history.location.state.__TSR_index,y=Pd(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 g=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:n,reloadDocument:a,href:o,publicHref:l,...u})=>{let d=!1;if(o)try{new URL(`${o}`),d=!0}catch{}if(d&&!a&&(a=!0),a){if(!o||!l&&!d){const h=this.buildLocation({to:n,...u});o=o??h.url.href,l=l??h.url.href}const f=!d&&l?l:o;if(!u.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const p of g)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const a=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==a.publicHref||a.url.origin!==this.origin){const o=this.getParsedLocationHref(a);throw X4({href:o})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(a=>({...a,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:a.cachedMatches.filter(o=>!n.some(l=>l.id===o.id))}))},this.load=async n=>{let a,o,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",..._o({resolvedLocation:h,location:f})}),this.emit({type:"onBeforeLoad",..._o({resolvedLocation:h,location:f})}),await Y_({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=[],p=[],y=[];oc(()=>{this.__store.setState(_=>{const S=_.matches,w=_.pendingMatches||_.matches;return g=S.filter(T=>!w.some(R=>R.id===T.id)),p=w.filter(T=>!S.some(R=>R.id===T.id)),y=w.filter(T=>S.some(R=>R.id===T.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...g.filter(T=>T.status!=="error"&&T.status!=="notFound")]}}),this.clearExpiredCache()}),[[g,"onLeave"],[p,"onEnter"],[y,"onStay"]].forEach(([_,S])=>{_.forEach(w=>{this.looseRoutesById[w.routeId].options[S]?.(w)})})})})}})}catch(f){kr(f)?(a=f,this.isServer||this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):yr(f)&&(o=f),this.__store.setState(h=>({...h,statusCode:a?a.status:o?404:h.matches.some(g=>g.status==="error")?500:200,redirect:a}))}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 u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(d=>d.status==="error")&&(u=500),u!==void 0&&this.__store.setState(d=>({...d,statusCode:u}))},this.startViewTransition=n=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,d=typeof a.types=="function"?a.types(_o({resolvedLocation:u,location:l})):a.types;if(d===!1){n();return}o={update:n,types:d}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,a)=>{this.startTransition(()=>{const o=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":"";o&&this.__store.setState(l=>({...l,[o]:l[o]?.map(u=>u.id===n?a(u):u)}))})},this.getMatch=n=>{const a=o=>o.id===n;return this.state.cachedMatches.find(a)??this.state.pendingMatches?.find(a)??this.state.matches.find(a)},this.invalidate=n=>{const a=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.__store.setState(o=>({...o,matches:o.matches.map(a),cachedMatches:o.cachedMatches.map(a),pendingMatches:o.pendingMatches?.map(a)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let a=n.url.href;return this.origin&&n.url.origin===this.origin&&(a=a.replace(this.origin,"")||"/"),a},this.resolveRedirect=n=>{if(!n.options.href){const a=this.buildLocation(n.options),o=this.getParsedLocationHref(a);n.options.href=a.href,n.headers.set("Location",o)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const a=n?.filter;a!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(l=>!a(l))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=a=>{const o=this.looseRoutesById[a.routeId];if(!o.options.loader)return!0;const l=(a.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:Date.now()-a.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=Nw,this.preloadRoute=async n=>{const a=this.buildLocation(n);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(d=>d.id)),u=new Set([...l,...this.state.cachedMatches.map(d=>d.id)]);oc(()=>{o.forEach(d=>{u.has(d.id)||this.__store.setState(f=>({...f,cachedMatches:[...f.cachedMatches,d]}))})});try{return o=await Y_({router:this,matches:o,location:a,preload:!0,updateMatch:(d,f)=>{l.has(d)?o=o.map(h=>h.id===d?f(h):h):this.updateMatch(d,f)}}),o}catch(d){if(kr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:a});yr(d)||console.error(d);return}},this.matchRoute=(n,a)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(o);if(a?.pending&&this.state.status!=="pending")return!1;const d=(a?.pending===void 0?!this.state.isLoading:a.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,f=C4(l.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,d.pathname,this.processedTree);return!f||n.params&&!yo(f.params,n.params,{partial:!0})?!1:a?.includeSearch??!0?yo(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??W4,parseSearch:t.parseSearch??K4}),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 a=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:l}=a;let{matchedRoutes:u}=a,d=!1;(o?o.path!=="/"&&l["**"]:bo(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:d=!0);const f=(()=>{if(d){if(this.options.notFoundMode!=="root")for(let p=u.length-1;p>=0;p--){const y=u[p];if(y.children)return y.id}return fr}})(),h=[],g=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return u.forEach((p,y)=>{const _=h[y-1],[S,w,T]=(()=>{const z=_?.search??t.search,ie=_?._strictSearch??void 0;try{const ee=Tg(p.options.validateSearch,{...z})??void 0;return[{...z,...ee},{...ie,...ee},void 0]}catch(ee){let k=ee;if(ee instanceof Vd||(k=new Vd(ee.message,{cause:ee})),n?.throwOnError)throw k;return[z,{},k]}})(),R=p.options.loaderDeps?.({search:S})??"",A=R?JSON.stringify(R):"",{interpolatedPath:C,usedParams:O}=mm({path:p.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),N=p.id+C+A,L=this.getMatch(N),I=this.state.matches.find(z=>z.routeId===p.id),D=L?._strictParams??O;let B;if(!L){const z=p.options.params?.parse??p.options.parseParams;if(z)try{Object.assign(D,z(D))}catch(ie){if(yr(ie)||kr(ie)?B=ie:B=new l3(ie.message,{cause:ie}),n?.throwOnError)throw B}}Object.assign(l,D);const Z=I?"stay":"enter";let Y;if(L)Y={...L,cause:Z,params:I?Dr(I.params,l):l,_strictParams:D,search:Dr(I?I.search:L.search,S),_strictSearch:w};else{const z=p.options.loader||p.options.beforeLoad||p.lazyFn||Iw(p)?"pending":"success";Y={id:N,ssr:this.isServer?void 0:p.options.ssr,index:y,routeId:p.id,params:I?Dr(I.params,l):l,_strictParams:D,pathname:C,updatedAt:Date.now(),search:I?Dr(I.search,S):S,_strictSearch:w,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:B,__routeContext:void 0,_nonReactive:{loadPromise:zs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:Z,loaderDeps:I?Dr(I.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||(Y.globalNotFound=f===p.id),Y.searchError=T;const V=g(_);Y.context={...V,...Y.__routeContext,...Y.__beforeLoadContext},h.push(Y)}),h.forEach((p,y)=>{const _=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const w=h[y-1],T=g(w);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 Vd extends Error{}class l3 extends Error{}function c3(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Tg(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Vd("Async validation not supported");if(n.issues)throw new Vd(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 u3({pathname:e,routesById:t,processedTree:n}){const a={},o=bo(e);let l;const u=M4(o,n,!0);return u&&(l=u.route,Object.assign(a,u.params)),{matchedRoutes:u?.branch||[t[fr]],routeParams:a,foundRoute:l}}function d3({search:e,dest:t,destRoutes:n,_includeValidateSearch:a}){const o=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 g=({search:p,next:y})=>{let _=p;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(_=f.options.preSearchFilters.reduce((w,T)=>T(w),p));const S=y(_);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((w,T)=>T(w),S):S};h.push(g)}if(a&&f.options.validateSearch){const g=({search:p,next:y})=>{const _=y(p);try{return{..._,...Tg(f.options.validateSearch,_)??void 0}}catch{return _}};h.push(g)}return d.concat(h)},[])??[],l=({search:d})=>t.search?t.search===!0?d:Di(t.search,d):{};o.push(l);const u=(d,f)=>{if(d>=o.length)return f;const h=o[d];return h({search:f,next:p=>u(d+1,p)})};return u(0,e)}const f3="Error preloading route! ☝️";class Pw{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const a=this.options,o=!a?.path&&!a?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=fr:this.parentRoute||$a(!1);let l=o?fr:a?.path;l&&l!=="/"&&(l=xw(l));const u=a?.id||l;let d=o?fr:xd([this.parentRoute.id===fr?"":this.parentRoute.id,u]);l===fr&&(l="/"),d!==fr&&(d=xd(["/",d]));const f=d===fr?"/":xd([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 h3 extends Pw{constructor(t){super(t)}}function _v(e){const t=e.errorComponent??Rf;return b.jsx(p3,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:a})=>n?E.createElement(t,{error:n,reset:a}):e.children})}class p3 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 Rf({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(a=>!a),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 m3({children:e,fallback:t=null}){return g3()?b.jsx(H.Fragment,{children:e}):b.jsx(H.Fragment,{children:t})}function g3(){return H.useSyncExternalStore(v3,()=>!0,()=>!1)}function v3(){return()=>{}}var vm={exports:{}},ym={},bm={exports:{}},_m={};var K_;function y3(){if(K_)return _m;K_=1;var e=$i();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,a=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function d(p,y){var _=y(),S=a({inst:{value:_,getSnapshot:y}}),w=S[0].inst,T=S[1];return l(function(){w.value=_,w.getSnapshot=y,f(w)&&T({inst:w})},[p,_,y]),o(function(){return f(w)&&T({inst:w}),p(function(){f(w)&&T({inst:w})})},[p]),u(_),_}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 g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return _m.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,_m}var W_;function kw(){return W_||(W_=1,bm.exports=y3()),bm.exports}var Z_;function b3(){if(Z_)return ym;Z_=1;var e=$i(),t=kw();function n(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var a=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,d=e.useMemo,f=e.useDebugValue;return ym.useSyncExternalStoreWithSelector=function(h,g,p,y,_){var S=l(null);if(S.current===null){var w={hasValue:!1,value:null};S.current=w}else w=S.current;S=d(function(){function R(L){if(!A){if(A=!0,C=L,L=y(L),_!==void 0&&w.hasValue){var I=w.value;if(_(I,L))return O=I}return O=L}if(I=O,a(C,L))return I;var D=y(L);return _!==void 0&&_(I,D)?(C=L,I):(C=L,O=D)}var A=!1,C,O,N=p===void 0?null:p;return[function(){return R(g())},N===null?void 0:function(){return R(N())}]},[g,p,y,_]);var T=o(h,S[0],S[1]);return u(function(){w.hasValue=!0,w.value=T},[T]),f(T),T},ym}var Q_;function _3(){return Q_||(Q_=1,vm.exports=b3()),vm.exports}var jw=_3();const LB=Io(jw);function E3(e,t=a=>a,n={}){const a=n.equal??S3;return jw.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,a)}function S3(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[a,o]of e)if(!t.has(a)||!Object.is(o,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=X_(e);if(n.length!==X_(t).length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Object.is(e[n[a]],t[n[a]]))return!1;return!0}function X_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Em=E.createContext(null);function Uw(){return typeof document>"u"?Em:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Em,Em)}function tr(e){const t=E.useContext(Uw());return e?.warn,t}function er(e){const t=tr({warn:e?.router===void 0}),n=e?.router||t,a=E.useRef(void 0);return E3(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Dr(a.current,e.select(o));return a.current=l,l}return e.select(o)}return o})}const Of=E.createContext(void 0),w3=E.createContext(void 0);function va(e){const t=E.useContext(e.from?w3:Of);return er({select:a=>{const o=a.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if($a(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function Ev(e){return va({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Sv(e){const{select:t,...n}=e;return va({...n,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function wv(e){return va({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 xv(e){return va({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const nc=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Sm(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 x3(e,t,n={},a={}){E.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{t(l)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,a.disabled,e])}function R3(e){const t=E.useRef(null);return E.useImperativeHandle(e,()=>t.current,[]),t}function Oc(e){const t=tr();return E.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function PB(e){const t=tr(),n=Oc(),a=E.useRef(null);return nc(()=>{a.current!==e&&(n(e),a.current=e)},[t,e,n]),null}var Tf=uw();const Bw=Io(Tf);function O3(e,t){const n=tr(),[a,o]=E.useState(!1),l=E.useRef(!1),u=R3(t),{activeProps:d,inactiveProps:f,activeOptions:h,to:g,preload:p,preloadDelay:y,hashScrollIntoView:_,replace:S,startTransition:w,resetScroll:T,viewTransition:R,children:A,target:C,disabled:O,style:N,className:L,onClick:I,onFocus:D,onMouseEnter:B,onMouseLeave:Z,onTouchStart:Y,ignoreBlocker:V,params:z,search:ie,hash:ee,state:k,mask:F,reloadDocument:G,unsafeRelative:ae,from:ve,_fromLocation:P,...Q}=e,te=er({select:W=>W.location.search,structuralSharing:!0}),se=e.from,ge=E.useMemo(()=>({...e,from:se}),[n,te,se,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),_e=E.useMemo(()=>n.buildLocation({...ge}),[n,ge]),ye=E.useMemo(()=>{if(O)return;let W=_e.maskedLocation?_e.maskedLocation.url.href:_e.url.href,de=!1;return n.origin&&(W.startsWith(n.origin)?W=n.history.createHref(W.replace(n.origin,""))||"/":de=!0),{href:W,external:de}},[O,_e.maskedLocation,_e.url,n.origin,n.history]),Se=E.useMemo(()=>{if(ye?.external)return ye.href;try{return new URL(g),g}catch{}},[g,ye]),le=e.reloadDocument||Se?!1:p??n.options.defaultPreload,je=y??n.options.defaultPreloadDelay??0,at=er({select:W=>{if(Se)return!1;if(h?.exact){if(!j4(W.location.pathname,_e.pathname,n.basepath))return!1}else{const de=Bd(W.location.pathname,n.basepath),me=Bd(_e.pathname,n.basepath);if(!(de.startsWith(me)&&(de.length===me.length||de[me.length]==="/")))return!1}return(h?.includeSearch??!0)&&!yo(W.location.search,_e.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?W.location.hash===_e.hash:!0}}),Je=E.useCallback(()=>{n.preloadRoute({...ge}).catch(W=>{console.warn(W),console.warn(f3)})},[n,ge]),Ft=E.useCallback(W=>{W?.isIntersecting&&Je()},[Je]);x3(u,Ft,N3,{disabled:!!O||le!=="viewport"}),E.useEffect(()=>{l.current||!O&&le==="render"&&(Je(),l.current=!0)},[O,Je,le]);const re=W=>{const de=W.currentTarget.getAttribute("target"),me=C!==void 0?C:de;if(!O&&!I3(W)&&!W.defaultPrevented&&(!me||me==="_self")&&W.button===0){W.preventDefault(),Tf.flushSync(()=>{o(!0)});const he=n.subscribe("onResolved",()=>{he(),o(!1)});n.navigate({...ge,replace:S,resetScroll:T,hashScrollIntoView:_,startTransition:w,viewTransition:R,ignoreBlocker:V})}};if(Se)return{...Q,ref:u,href:Se,...A&&{children:A},...C&&{target:C},...O&&{disabled:O},...N&&{style:N},...L&&{className:L},...I&&{onClick:I},...D&&{onFocus:D},...B&&{onMouseEnter:B},...Z&&{onMouseLeave:Z},...Y&&{onTouchStart:Y}};const be=W=>{O||le&&Je()},Le=be,Ye=W=>{if(!(O||!le))if(!je)Je();else{const de=W.target;if(Gl.has(de))return;const me=setTimeout(()=>{Gl.delete(de),Je()},je);Gl.set(de,me)}},At=W=>{if(O||!le||!je)return;const de=W.target,me=Gl.get(de);me&&(clearTimeout(me),Gl.delete(de))},Ue=at?Di(d,{})??T3:wm,et=at?wm:Di(f,{})??wm,j=[L,Ue.className,et.className].filter(Boolean).join(" "),q=(N||Ue.style||et.style)&&{...N,...Ue.style,...et.style};return{...Q,...Ue,...et,href:ye?.href,ref:u,onClick:ql([I,re]),onFocus:ql([D,be]),onMouseEnter:ql([B,Ye]),onMouseLeave:ql([Z,At]),onTouchStart:ql([Y,Le]),disabled:!!O,target:C,...q&&{style:q},...j&&{className:j},...O&&A3,...at&&C3,...a&&M3}}const wm={},T3={className:"active"},A3={role:"link","aria-disabled":!0},C3={"data-status":"active","aria-current":"page"},M3={"data-transitioning":"transitioning"},Gl=new WeakMap,N3={rootMargin:"100px"},ql=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Rv=E.forwardRef((e,t)=>{const{_asChild:n,...a}=e,{type:o,ref:l,...u}=O3(a,t),d=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;return n===void 0&&delete u.disabled,E.createElement(n||"a",{...u,ref:l},d)});function I3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class D3 extends Pw{constructor(t){super(t),this.useMatch=n=>va({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({...n,from:this.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>xv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Sv({...n,from:this.id}),this.useLoaderData=n=>Ev({...n,from:this.id}),this.useNavigate=()=>Oc({from:this.fullPath}),this.Link=H.forwardRef((n,a)=>b.jsx(Rv,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function An(e){return new D3(e)}class L3 extends h3{constructor(t){super(t),this.useMatch=n=>va({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({...n,from:this.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>xv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Sv({...n,from:this.id}),this.useLoaderData=n=>Ev({...n,from:this.id}),this.useNavigate=()=>Oc({from:this.fullPath}),this.Link=H.forwardRef((n,a)=>b.jsx(Rv,{ref:a,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function P3(e){return new L3(e)}function J_(e){return typeof e=="object"?new eE(e,{silent:!0}).createRoute(e):new eE(e,{silent:!0}).createRoute}class eE{constructor(t,n){this.path=t,this.createRoute=a=>{this.silent;const o=An(a);return o.isRoot=!1,o},this.silent=n?.silent}}class tE{constructor(t){this.useMatch=n=>va({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>va({from:this.options.id,select:a=>n?.select?n.select(a.context):a.context}),this.useSearch=n=>xv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>wv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Sv({...n,from:this.options.id}),this.useLoaderData=n=>Ev({...n,from:this.options.id}),this.useNavigate=()=>{const n=tr();return Oc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function nE(e){return typeof e=="object"?new tE(e):t=>new tE({id:e,...t})}function Ln(e,t){let n,a,o,l;const u=()=>(n||(n=e().then(f=>{n=void 0,a=f.default}).catch(f=>{if(o=f,S4(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),l=!0)}})),n),d=function(h){if(l)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)throw u();return E.createElement(a,h)};return d.preload=u,d}function k3(){const e=tr(),t=E.useRef({router:e,mounted:!1}),[n,a]=E.useState(!1),{hasPendingMatches:o,isLoading:l}=er({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(y=>y.status==="pending")}),structuralSharing:!0}),u=Sm(l),d=l||n||o,f=Sm(d),h=l||o,g=Sm(h);return e.startTransition=p=>{a(!0),E.startTransition(()=>{p(),a(!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 bo(e.latestLocation.publicHref)!==bo(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{p()}},[e,e.history]),nc(()=>{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]),nc(()=>{u&&!l&&e.emit({type:"onLoad",..._o(e.state)})},[u,e,l]),nc(()=>{g&&!h&&e.emit({type:"onBeforeRouteMount",..._o(e.state)})},[h,g,e]),nc(()=>{if(f&&!d){const p=_o(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),p.hrefChanged&&G4(e)}},[d,f,e]),null}function j3(e){const t=er({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(_v,{getResetKey:()=>t,onCatch:(n,a)=>{if(yr(n))e.onCatch?.(n,a);else throw n},errorComponent:({error:n})=>{if(yr(n))return e.fallback?.(n);throw n},children:e.children})}function U3(){return b.jsx("p",{children:"Not Found"})}function Ms(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(U3,{})}function B3({children:e}){const t=tr();return t.isServer?b.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function z3(){const e=tr();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||Rg)(e.latestLocation),a=n!==Rg(e.latestLocation)?n:void 0,o={storageKey:zd,shouldScrollRestoration:!0};return a&&(o.key=a),b.jsx(B3,{children:`(${Ow.toString()})(${JSON.stringify(o)})`})}const Fw=E.memo(function({matchId:t}){const n=tr(),a=er({select:R=>{const A=R.matches.find(C=>C.id===t);return $a(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),o=n.routesById[a.routeId],l=o.options.pendingComponent??n.options.defaultPendingComponent,u=l?b.jsx(l,{}):null,d=o.options.errorComponent??n.options.defaultErrorComponent,f=o.options.onCatch??n.options.defaultOnCatch,h=o.isRoot?o.options.notFoundComponent??n.options.notFoundRoute?.options.component:o.options.notFoundComponent,g=a.ssr===!1||a.ssr==="data-only",p=(!o.isRoot||o.options.wrapInSuspense||g)&&(o.options.wrapInSuspense??l??(o.options.errorComponent?.preload||g))?E.Suspense:Ms,y=d?_v:Ms,_=h?j3:Ms,S=er({select:R=>R.loadedAt}),w=er({select:R=>{const A=R.matches.findIndex(C=>C.id===t);return R.matches[A-1]?.routeId}}),T=o.isRoot?o.options.shellComponent??Ms:Ms;return b.jsxs(T,{children:[b.jsx(Of.Provider,{value:t,children:b.jsx(p,{fallback:u,children:b.jsx(y,{getResetKey:()=>S,errorComponent:d||Rf,onCatch:(R,A)=>{if(yr(R))throw R;f?.(R,A)},children:b.jsx(_,{fallback:R=>{if(!h||R.routeId&&R.routeId!==a.routeId||!R.routeId&&!o.isRoot)throw R;return E.createElement(h,R)},children:g||a._displayPending?b.jsx(m3,{fallback:u,children:b.jsx(rE,{matchId:t})}):b.jsx(rE,{matchId:t})})})})}),w===fr&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(F3,{}),b.jsx(z3,{})]}):null]})});function F3(){const e=tr(),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",..._o(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const rE=E.memo(function({matchId:t}){const n=tr(),{match:a,key:o,routeId:l}=er({select:f=>{const h=f.matches.find(S=>S.id===t),g=h.routeId,y=(n.routesById[g].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:g,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:y?JSON.stringify(y):void 0,routeId:g,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),u=n.routesById[l],d=E.useMemo(()=>{const f=u.options.component??n.options.defaultComponent;return f?b.jsx(f,{},o):b.jsx(Vw,{})},[o,u.options.component,n.options.defaultComponent]);if(a._displayPending)throw n.getMatch(a.id)?._nonReactive.displayPendingPromise;if(a._forcePending)throw n.getMatch(a.id)?._nonReactive.minPendingPromise;if(a.status==="pending"){const f=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const h=n.getMatch(a.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const g=zs();h._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),h._nonReactive.minPendingPromise=void 0},f)}}throw n.getMatch(a.id)?._nonReactive.loadPromise}if(a.status==="notFound")return $a(yr(a.error)),zw(n,u,a.error);if(a.status==="redirected")throw $a(kr(a.error)),n.getMatch(a.id)?._nonReactive.loadPromise;if(a.status==="error"){if(n.isServer){const f=(u.options.errorComponent??n.options.defaultErrorComponent)||Rf;return b.jsx(f,{error:a.error,reset:void 0,info:{componentStack:""}})}throw a.error}return d}),Vw=E.memo(function(){const t=tr(),n=E.useContext(Of),a=er({select:h=>h.matches.find(g=>g.id===n)?.routeId}),o=t.routesById[a],l=er({select:h=>{const p=h.matches.find(y=>y.id===n);return $a(p),p.globalNotFound}}),u=er({select:h=>{const g=h.matches,p=g.findIndex(y=>y.id===n);return g[p+1]?.id}}),d=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(l)return zw(t,o,void 0);if(!u)return null;const f=b.jsx(Fw,{matchId:u});return a===fr?b.jsx(E.Suspense,{fallback:d,children:f}):f});function V3(){const e=tr(),n=e.routesById[fr].options.pendingComponent??e.options.defaultPendingComponent,a=n?b.jsx(n,{}):null,o=e.isServer||typeof document<"u"&&e.ssr?Ms:E.Suspense,l=b.jsxs(o,{fallback:a,children:[!e.isServer&&b.jsx(k3,{}),b.jsx(H3,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:l}):l}function H3(){const e=tr(),t=er({select:o=>o.matches[0]?.id}),n=er({select:o=>o.loadedAt}),a=t?b.jsx(Fw,{matchId:t}):null;return b.jsx(Of.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:b.jsx(_v,{getResetKey:()=>n,errorComponent:Rf,onCatch:o=>{o.message||o.toString()},children:a})})}const $3=e=>new G3(e);class G3 extends s3{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=J_,globalThis.createLazyFileRoute=nE):typeof window<"u"&&(window.createFileRoute=J_,window.createLazyFileRoute=nE);function q3({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const a=Uw(),o=b.jsx(a.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:o}):o}function Y3({router:e,...t}){return b.jsx(q3,{router:e,...t,children:b.jsx(V3,{})})}var K3={},aE={};const Od=Object.create(null),Yl=e=>K3||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Od:globalThis),Pr=new Proxy(Od,{get(e,t){return Yl()[t]??Od[t]},has(e,t){return t in Yl()||t in Od},set(e,t,n){const a=Yl(!0);return a[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=Yl(!0);return delete n[t],!0},ownKeys(){const e=Yl(!0);return Object.keys(e)}});function Qt(e,t){return typeof process<"u"&&aE?aE[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const Kl=1,gn=4,ca=8,pr=24,iE={eterm:gn,cons25:gn,console:gn,cygwin:gn,dtterm:gn,gnome:gn,hurd:gn,jfbterm:gn,konsole:gn,kterm:gn,mlterm:gn,mosh:pr,putty:gn,st:gn,"rxvt-unicode-24bit":pr,terminator:pr,"xterm-kitty":pr},W3=new Map(Object.entries({APPVEYOR:ca,BUILDKITE:ca,CIRCLECI:pr,DRONE:ca,GITEA_ACTIONS:pr,GITHUB_ACTIONS:pr,GITLAB_CI:ca,TRAVIS:ca})),Z3=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function Q3(){if(Qt("FORCE_COLOR")!==void 0)switch(Qt("FORCE_COLOR")){case"":case"1":case"true":return gn;case"2":return ca;case"3":return pr;default:return Kl}if(Qt("NODE_DISABLE_COLORS")!==void 0&&Qt("NODE_DISABLE_COLORS")!==""||Qt("NO_COLOR")!==void 0&&Qt("NO_COLOR")!==""||Qt("TERM")==="dumb")return Kl;if(Qt("TMUX"))return pr;if("TF_BUILD"in Pr&&"AGENT_NAME"in Pr)return gn;if("CI"in Pr){for(const{0:e,1:t}of W3)if(e in Pr)return t;return Qt("CI_NAME")==="codeship"?ca:Kl}if("TEAMCITY_VERSION"in Pr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Qt("TEAMCITY_VERSION"))!==null?gn:Kl;switch(Qt("TERM_PROGRAM")){case"iTerm.app":return!Qt("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Qt("TERM_PROGRAM_VERSION"))!==null?ca:pr;case"HyperTerm":case"MacTerm":return pr;case"Apple_Terminal":return ca}if(Qt("COLORTERM")==="truecolor"||Qt("COLORTERM")==="24bit")return pr;if(Qt("TERM")){if(/truecolor/.exec(Qt("TERM"))!==null)return pr;if(/^xterm-256/.exec(Qt("TERM"))!==null)return ca;const e=Qt("TERM").toLowerCase();if(iE[e])return iE[e];if(Z3.some(t=>t.exec(e)!==null))return gn}return Qt("COLORTERM")?gn:Kl}const ua={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"}},Ag=["debug","info","success","warn","error"];function X3(e,t){return Ag.indexOf(t)>=Ag.indexOf(e)}const J3={info:ua.fg.blue,success:ua.fg.green,warn:ua.fg.yellow,error:ua.fg.red,debug:ua.fg.magenta},e5=(e,t,n)=>{const a=new Date().toISOString();return n?`${ua.dim}${a}${ua.reset} ${J3[e]}${e.toUpperCase()}${ua.reset} ${ua.bright}[Better Auth]:${ua.reset} ${t}`:`${a} ${e.toUpperCase()} [Better Auth]: ${t}`},t5=e=>{const t="error",n=Q3()!==1,a=(o,l,u=[])=>{if(!X3(t,o))return;const d=e5(o,l,n);{o==="error"?console.error(d,...u):o==="warn"?console.warn(d,...u):console.log(d,...u);return}};return{...Object.fromEntries(Ag.map(o=>[o,(...[l,...u])=>a(o,l,u)])),get level(){return t}}};t5();var sc=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function n5(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new sc(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function r5(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new sc(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof sc?t:new sc(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function xm(e,t="/api/auth"){if(r5(e),n5(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function a5(e,t,n,a,o){if(e)return xm(e,t);{const l=Pr.BETTER_AUTH_URL||Pr.NEXT_PUBLIC_BETTER_AUTH_URL||Pr.PUBLIC_BETTER_AUTH_URL||Pr.NUXT_PUBLIC_BETTER_AUTH_URL||Pr.NUXT_PUBLIC_AUTH_URL||(Pr.BASE_URL!=="/"?Pr.BASE_URL:void 0);if(l)return xm(l,t)}if(typeof window<"u"&&window.location)return xm(window.location.origin,t)}const i5={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*:/},o5=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,oE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},s5=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function l5(e){return e instanceof Date&&!isNaN(e.getTime())}function c5(e){const t=s5.exec(e);if(!t)return null;const[,n,a,o,l,u,d,f,h,g,p]=t;let y=new Date(Date.UTC(parseInt(n,10),parseInt(a,10)-1,parseInt(o,10),parseInt(l,10),parseInt(u,10),parseInt(d,10),f?parseInt(f.padEnd(3,"0"),10):0));if(h){const _=(parseInt(g,10)*60+parseInt(p,10))*(h==="+"?-1:1);y.setUTCMinutes(y.getUTCMinutes()+_)}return l5(y)?y:null}function u5(e,t={}){const{strict:n=!1,warnings:a=!1,reviver:o,parseDates:l=!0}=t;if(typeof e!="string")return e;const u=e.trim();if(u.length>0&&u[0]==='"'&&u.endsWith('"')&&!u.slice(1,-1).includes('"'))return u.slice(1,-1);const d=u.toLowerCase();if(d.length<=9&&d in oE)return oE[d];if(!o5.test(u)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(i5).some(([f,h])=>{const g=h.test(u);return g&&a&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${f} pattern`),g})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(u,(h,g)=>{if(h==="__proto__"||h==="constructor"&&g&&typeof g=="object"&&"prototype"in g){a&&console.warn(`[better-json] Dropping "${h}" key to prevent prototype pollution`);return}if(l&&typeof g=="string"){const p=c5(g);if(p)return p}return o?o(h,g):g})}catch(f){if(n)throw f;return e}}function d5(e,t={strict:!0}){return u5(e,t)}let $r=[],Ri=0;const nd=4,go=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(a){return n.lc=t.push(a),()=>{for(let l=Ri+nd;l<$r.length;)$r[l]===a?$r.splice(l,nd):l+=nd;let o=t.indexOf(a);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(a,o){let l=!$r.length;for(let u of t)$r.push(u,n.value,a,o);if(l){for(Ri=0;Ri<$r.length;Ri+=nd)$r[Ri]($r[Ri+1],$r[Ri+2],$r[Ri+3]);$r.length=0}},off(){},set(a){let o=n.value;o!==a&&(n.value=a,n.notify(o))},subscribe(a){let o=n.listen(a);return a(n.value),o},value:e};return n},f5=5,rd=6,ad=10;let h5=(e,t,n,a)=>(e.events=e.events||{},e.events[n+ad]||(e.events[n+ad]=a(o=>{e.events[n].reduceRight((l,u)=>(u(l),l),{shared:{},...o})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let o=e.events[n],l=o.indexOf(t);o.splice(l,1),o.length||(delete e.events[n],e.events[n+ad](),delete e.events[n+ad])}),p5=1e3,Hw=(e,t)=>h5(e,a=>{let o=t(a);o&&e.events[rd].push(o)},f5,a=>{let o=e.listen;e.listen=(...u)=>(!e.lc&&!e.active&&(e.active=!0,a()),o(...u));let l=e.off;return e.events[rd]=[],e.off=()=>{l(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let u of e.events[rd])u();e.events[rd]=[]}},p5)},()=>{e.listen=o,e.off=l}});function m5(e,t,n){let a=new Set(t).add(void 0);return e.listen((o,l,u)=>{a.has(u)&&n(o,l,u)})}var g5=Object.defineProperty,v5=Object.defineProperties,y5=Object.getOwnPropertyDescriptors,sE=Object.getOwnPropertySymbols,b5=Object.prototype.hasOwnProperty,_5=Object.prototype.propertyIsEnumerable,lE=(e,t,n)=>t in e?g5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yr=(e,t)=>{for(var n in t||(t={}))b5.call(t,n)&&lE(e,n,t[n]);if(sE)for(var n of sE(t))_5.call(t,n)&&lE(e,n,t[n]);return e},la=(e,t)=>v5(e,y5(t)),E5=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},S5=async(e,t)=>{var n,a,o,l,u,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 g of t?.plugins||[]){if(g.init){const p=await((n=g.init)==null?void 0:n.call(g,e.toString(),t));f=p.options||f,e=p.url}h.onRequest.push((a=g.hooks)==null?void 0:a.onRequest),h.onResponse.push((o=g.hooks)==null?void 0:o.onResponse),h.onSuccess.push((l=g.hooks)==null?void 0:l.onSuccess),h.onError.push((u=g.hooks)==null?void 0:u.onError),h.onRetry.push((d=g.hooks)==null?void 0:d.onRetry)}return{url:e,options:f,hooks:h}},cE=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}},w5=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 x5(e){if(typeof e=="number")return new cE({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new cE(e);case"exponential":return new w5(e);default:throw new Error("Invalid retry strategy")}}var R5=async e=>{const t={},n=async a=>typeof a=="function"?await a():a;if(e?.auth){if(e.auth.type==="Bearer"){const a=await n(e.auth.token);if(!a)return t;t.authorization=`Bearer ${a}`}else if(e.auth.type==="Basic"){const a=n(e.auth.username),o=n(e.auth.password);if(!a||!o)return t;t.authorization=`Basic ${btoa(`${a}:${o}`)}`}else if(e.auth.type==="Custom"){const a=n(e.auth.value);if(!a)return t;t.authorization=`${n(e.auth.prefix)} ${a}`}}return t},O5=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function T5(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const a=t.split(";").shift()||"";return O5.test(a)?"json":n.has(a)||a.startsWith("text/")?"text":"blob"}function A5(e){try{return JSON.parse(e),!0}catch{return!1}}function $w(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 uE(e){try{return JSON.parse(e)}catch{return e}}function dE(e){return typeof e=="function"}function C5(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&dE(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&dE(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function M5(e){const t=new Headers(e?.headers),n=await R5(e);for(const[a,o]of Object.entries(n||{}))t.set(a,o);if(!t.has("content-type")){const a=N5(e?.body);a&&t.set("content-type",a)}return t}function N5(e){return $w(e)?"application/json":null}function I5(e){if(!e?.body)return null;const t=new Headers(e?.headers);if($w(e.body)&&!t.has("content-type")){for(const[n,a]of Object.entries(e?.body))a instanceof Date&&(e.body[n]=a.toISOString());return JSON.stringify(e.body)}return e.body}function D5(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const a=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return qw.includes(a)?a.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function L5(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var P5=class Gw extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,Gw.prototype)}};async function Td(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new P5(n.issues);return n.value}var qw=["get","post","put","patch","delete"],k5=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var a,o,l,u;const d=((o=(a=e.plugins)==null?void 0:a.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:o.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))),(u=d.config)!=null&&u.baseURL&&f.startsWith(d.config.baseURL)&&(f=f.replace(d.config.baseURL,""));const h=d.schema[f];if(h){let g=la(Yr({},n),{method:h.method,output:h.output});return n?.disableValidation||(g=la(Yr({},g),{body:h.input?await Td(h.input,n?.body):n?.body,params:h.params?await Td(h.params,n?.params):n?.params,query:h.query?await Td(h.query,n?.query):n?.query})),{url:t,options:g}}}return{url:t,options:n}}}),j5=e=>{async function t(n,a){const o=la(Yr(Yr({},e),a),{plugins:[...e?.plugins||[],k5(e||{})]});if(e?.catchAllError)try{return await Cg(n,o)}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 Cg(n,o)}return t};function U5(e,t){let{baseURL:n,params:a,query:o}=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];qw.includes(p)&&(e=e.replace(`@${p}/`,"/"))}l.endsWith("/")||(l+="/");let[u,d]=e.replace(l,"").split("?");const f=new URLSearchParams(d);for(const[p,y]of Object.entries(o||{}))y!=null&&f.set(p,String(y));if(a)if(Array.isArray(a)){const p=u.split("/").filter(y=>y.startsWith(":"));for(const[y,_]of p.entries()){const S=a[y];u=u.replace(_,S)}}else for(const[p,y]of Object.entries(a))u=u.replace(`:${p}`,String(y));u=u.split("/").map(encodeURIComponent).join("/"),u.startsWith("/")&&(u=u.slice(1));let h=f.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",l.startsWith("http")?new URL(`${u}${h}`,l):`${l}${u}${h}`}var Cg=async(e,t)=>{var n,a,o,l,u,d,f,h;const{hooks:g,url:p,options:y}=await S5(e,t),_=C5(y),S=new AbortController,w=(n=y.signal)!=null?n:S.signal,T=U5(p,y),R=I5(y),A=await M5(y),C=D5(p,y);let O=la(Yr({},y),{url:T,headers:A,body:R,method:C,signal:w});for(const z of g.onRequest)if(z){const ie=await z(O);ie instanceof Object&&(O=ie)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((a=t?.body)==null?void 0:a.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:N}=L5(y,S);let L=await _(O.url,O);N();const I={response:L,request:O};for(const z of g.onResponse)if(z){const ie=await z(la(Yr({},I),{response:(o=t?.hookOptions)!=null&&o.cloneResponse?L.clone():L}));ie instanceof Response?L=ie:ie instanceof Object&&(L=ie.response)}if(L.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const ie=T5(L),ee={data:"",response:L,request:O};if(ie==="json"||ie==="text"){const k=await L.text(),G=await((l=O.jsonParser)!=null?l:uE)(k);ee.data=G}else ee.data=await L[ie]();O?.output&&O.output&&!O.disableValidation&&(ee.data=await Td(O.output,ee.data));for(const k of g.onSuccess)k&&await k(la(Yr({},ee),{response:(u=t?.hookOptions)!=null&&u.cloneResponse?L.clone():L}));return t?.throw?ee.data:{data:ee.data,error:null}}const D=(d=t?.jsonParser)!=null?d:uE,B=await L.text(),Z=A5(B),Y=Z?await D(B):null,V={response:L,responseText:B,request:O,error:la(Yr({},Y),{status:L.status,statusText:L.statusText})};for(const z of g.onError)z&&await z(la(Yr({},V),{response:(f=t?.hookOptions)!=null&&f.cloneResponse?L.clone():L}));if(t?.retry){const z=x5(t.retry),ie=(h=t.retryAttempt)!=null?h:0;if(await z.shouldAttemptRetry(ie,L)){for(const k of g.onRetry)k&&await k(I);const ee=z.getDelay(ie);return await new Promise(k=>setTimeout(k,ee)),await Cg(e,la(Yr({},t),{retryAttempt:ie+1}))}}if(t?.throw)throw new E5(L.status,L.statusText,Z?Y:B);return{data:null,error:la(Yr({},Y),{status:L.status,statusText:L.statusText})}};const Rm=Symbol.for("better-auth:broadcast-channel"),B5=()=>Math.floor(Date.now()/1e3);var z5=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:B5()}))}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(a=>a(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function Om(e="better-auth.message"){return globalThis[Rm]||(globalThis[Rm]=new z5(e)),globalThis[Rm]}const Tm=Symbol.for("better-auth:focus-manager");var F5=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 fE(){return globalThis[Tm]||(globalThis[Tm]=new F5),globalThis[Tm]}const Am=Symbol.for("better-auth:online-manager");var V5=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 Cm(){return globalThis[Am]||(globalThis[Am]=new V5),globalThis[Am]}const H5=()=>typeof window>"u",Ls=(e,t,n,a)=>{const o=go({data:null,error:null,isPending:!0,isRefetching:!1,refetch:d=>l(d)}),l=async d=>new Promise(f=>{const h=typeof a=="function"?a({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):a;n(t,{...h,query:{...h?.query,...d?.query},async onSuccess(g){o.set({data:g.data,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await h?.onSuccess?.(g)},async onError(g){const{request:p}=g,y=typeof p.retry=="number"?p.retry:p.retry?.attempts,_=p.retryAttempt||0;y&&_<y||(o.set({error:g.error,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await h?.onError?.(g))},async onRequest(g){const p=o.get();o.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await h?.onRequest?.(g)}}).catch(g=>{o.set({error:g,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch})}).finally(()=>{f(void 0)})});e=Array.isArray(e)?e:[e];let u=!1;for(const d of e)d.subscribe(async()=>{H5()||(u?await l():Hw(o,()=>{const f=setTimeout(async()=>{u||(await l(),u=!0)},0);return()=>{o.off(),d.off(),clearTimeout(f)}}))});return o},Es=()=>Math.floor(Date.now()/1e3),$5=5;function G5(e){const{sessionAtom:t,sessionSignal:n,$fetch:a,options:o={}}=e,l=o.sessionOptions?.refetchInterval??0,u=o.sessionOptions?.refetchOnWindowFocus??!0,d=o.sessionOptions?.refetchWhenOffline??!1,f={lastSync:0,lastSessionRequest:0,cachedSession:void 0},h=()=>d||Cm().isOnline,g=A=>{if(!h())return;if(A?.event==="storage"){f.lastSync=Es(),n.set(!n.get());return}const C=t.get();if(A?.event==="poll"){f.lastSessionRequest=Es(),a("/get-session").then(O=>{t.set({...C,data:O.data,error:O.error||null}),f.lastSync=Es(),n.set(!n.get())}).catch(()=>{});return}A?.event==="visibilitychange"&&Es()-f.lastSessionRequest<$5&&C?.data!==null&&C?.data!==void 0||(C?.data===null||C?.data===void 0||A?.event==="visibilitychange")&&(A?.event==="visibilitychange"&&(f.lastSessionRequest=Es()),f.lastSync=Es(),n.set(!n.get()))},p=A=>{Om().post({event:"session",data:{trigger:A},clientId:Math.random().toString(36).substring(7)})},y=()=>{l&&l>0&&(f.pollInterval=setInterval(()=>{t.get()?.data&&g({event:"poll"})},l*1e3))},_=()=>{f.unsubscribeBroadcast=Om().subscribe(()=>{g({event:"storage"})})},S=()=>{u&&(f.unsubscribeFocus=fE().subscribe(()=>{g({event:"visibilitychange"})}))},w=()=>{f.unsubscribeOnline=Cm().subscribe(A=>{A&&g({event:"visibilitychange"})})};return{init:()=>{y(),_(),S(),w(),Om().setup(),fE().setup(),Cm().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:g,broadcastSessionUpdate:p}}const q5={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 Y5(e,t){const n=go(!1),a=Ls(n,"/get-session",e,{method:"GET"});return Hw(a,()=>{const o=G5({sessionAtom:a,sessionSignal:n,$fetch:e,options:t});return o.init(),()=>{o.cleanup()}}),{session:a,$sessionSignal:n}}const K5=(e,t)=>{const n="credentials"in Request.prototype,a=a5(e?.baseURL,e?.basePath)??"/api/auth",o=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:u,onError:d,onRequest:f,onResponse:h,...g}=e?.fetchOptions||{},p=j5({baseURL:a,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?d5(O,{strict:!1}):null},customFetchImpl:fetch,...g,plugins:[l,...g.plugins||[],...e?.disableDefaultFetchPlugins?[]:[q5],...o]}),{$sessionSignal:y,session:_}=Y5(p,e),S=e?.plugins||[];let w={},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 S)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,N)=>{T[O].subscribe(N)},atoms:T};for(const O of S)O.getActions&&Object.assign(w,O.getActions?.(p,C,e));return{get baseURL(){return a},pluginsActions:w,pluginsAtoms:T,pluginPathMethods:R,atomListeners:A,$fetch:p,$store:C}};function W5(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function Z5(e,t,n){const a=t[e],{fetchOptions:o,query:l,...u}=n||{};return a||(o?.method?o.method:u&&Object.keys(u).length>0?"POST":"GET")}function Q5(e,t,n,a,o){function l(u=[]){return new Proxy(function(){},{get(d,f){if(typeof f!="string"||f==="then"||f==="catch"||f==="finally")return;const h=[...u,f];let g=e;for(const p of h)if(g&&typeof g=="object"&&p in g)g=g[p];else{g=void 0;break}return typeof g=="function"||W5(g)?g:l(h)},apply:async(d,f,h)=>{const g="/"+u.map(A=>A.replace(/[A-Z]/g,C=>`-${C.toLowerCase()}`)).join("/"),p=h[0]||{},y=h[1]||{},{query:_,fetchOptions:S,...w}=p,T={...y,...S},R=Z5(g,n,p);return await t(g,{...T,body:R==="GET"?void 0:{...w,...T?.body||{}},query:_||T?.query,method:R,async onSuccess(A){if(await T?.onSuccess?.(A),!o||T.disableSignal)return;const C=o.filter(O=>O.matcher(g));if(C.length)for(const O of C){const N=a[O.signal];if(!N)return;const L=N.get();setTimeout(()=>{N.set(!L)},10)}}})}})}return l()}function X5(e,t={}){let n=E.useRef(e.get());const{keys:a,deps:o=[e,a]}=t;let l=E.useCallback(d=>{const f=h=>{n.current!==h&&(n.current=h,d())};return f(e.value),a?.length?m5(e,a,f):e.listen(f)},o),u=()=>n.current;return E.useSyncExternalStore(l,u,u)}function J5(e){return`use${eM(e)}`}function eM(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Yw(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:a,$fetch:o,$store:l,atomListeners:u}=K5(e);let d={};for(const[f,h]of Object.entries(a))d[J5(f)]=()=>X5(h);return Q5({...n,...d,$fetch:o,$store:l},o,t,a,u)}function tM(e){return{authorize(t,n="AND"){let a=!1;for(const[o,l]of Object.entries(t)){const u=e[o];if(!u)return{success:!1,error:`You are not allowed to access resource: ${o}`};if(Array.isArray(l))a=l.every(d=>u.includes(d));else if(typeof l=="object"){const d=l;d.connector==="OR"?a=d.actions.some(f=>u.includes(f)):a=d.actions.every(f=>u.includes(f))}else throw new sc("Invalid access control request");if(a&&n==="OR")return{success:a};if(!a&&n==="AND")return{success:!1,error:`unauthorized to access resource "${o}"`}}return a?{success:a}:{success:!1,error:"Not authorized"}},statements:e}}function Kw(e){return{newRole(t){return tM(t)},statements:e}}const nM={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},Ww=Kw(nM),Zw=Ww.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),Qw=Ww.newRole({user:[],session:[]}),rM={admin:Zw,user:Qw},aM=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||rM;for(const a of t)if(n[a]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},iM={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Ov=Kw(iM),Xw=Ov.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),Jw=Ov.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),ex=Ov.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),oM={admin:Xw,owner:Jw,member:ex},sM=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),a=e.options.creatorRole||"owner",o=n.includes(a),l=e.allowCreatorAllPermissions||!1;if(o&&l)return!0;for(const u of n)if(t[u]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},lM=e=>({id:"two-factor",$InferServerPlugin:{},atomListeners:[{matcher:t=>t.startsWith("/two-factor/"),signal:"$sessionSignal"}],pathMethods:{"/two-factor/disable":"POST","/two-factor/enable":"POST","/two-factor/send-otp":"POST","/two-factor/generate-backup-codes":"POST"},fetchPlugins:[{id:"two-factor",name:"two-factor",hooks:{async onSuccess(t){t.data?.twoFactorRedirect}}}]}),cM=e=>{const t={admin:Zw,user:Qw,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>aM({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},uM=()=>({id:"anonymous",$InferServerPlugin:{},pathMethods:{"/sign-in/anonymous":"POST"},atomListeners:[{matcher:e=>e==="/sign-in/anonymous",signal:"$sessionSignal"}]}),dM=()=>({id:"api-key",$InferServerPlugin:{},pathMethods:{"/api-key/create":"POST","/api-key/delete":"POST","/api-key/delete-all-expired-api-keys":"POST"}}),fM=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),hM=()=>({id:"generic-oauth-client",$InferServerPlugin:{}}),tx=()=>({id:"magic-link",$InferServerPlugin:{}}),pM=()=>({id:"multi-session",$InferServerPlugin:{},atomListeners:[{matcher(e){return e==="/multi-session/set-active"},signal:"$sessionSignal"}]});let co=null;function hE(){return typeof window<"u"&&"IdentityCredential"in window}const mM=e=>({id:"one-tap",fetchPlugins:[{id:"fedcm-signout-handle",name:"FedCM Sign-Out Handler",hooks:{async onResponse(t){t.request.url.toString().includes("/sign-out")&&(e.promptOptions?.fedCM===!1||!hE()||navigator.credentials.preventSilentAccess())}}}],getActions:(t,n)=>({oneTap:async(a,o)=>{if(co&&!co.signal.aborted){console.warn("A Google One Tap request is already in progress. Please wait.");return}if(typeof window>"u"||!window.document){console.warn("Google One Tap is only available in browser environments");return}async function l(p){await t("/one-tap/callback",{method:"POST",body:{idToken:p},...a?.fetchOptions,...o}),(!a?.fetchOptions&&!o||a?.callbackURL)&&(window.location.href=a?.callbackURL??"/")}const{autoSelect:u,cancelOnTapOutside:d,context:f}=a??{},h=f??e.context??"signin",g={fedCM:async()=>{try{const p=await navigator.credentials.get({identity:{context:h,providers:[{configURL:"https://accounts.google.com/gsi/fedcm.json",clientId:e.clientId,nonce:a?.nonce}]},mediation:u?"optional":"required",signal:co?.signal});if(!p?.token){a?.onPromptNotification?.(void 0);return}try{await l(p.token);return}catch(y){throw console.error("Error during FedCM callback:",y),y}}catch(p){if(p?.code&&(p.code===19||p.code===20)){a?.onPromptNotification?.(void 0);return}throw p}},oneTap:()=>new Promise((p,y)=>{let _=!1;const S=e.promptOptions?.baseDelay??1e3,w=e.promptOptions?.maxAttempts??5;window.google?.accounts.id.initialize({client_id:e.clientId,callback:async R=>{_=!0;try{await l(R.credential),p()}catch(A){console.error("Error during One Tap callback:",A),y(A)}},auto_select:u,cancel_on_tap_outside:d,context:h,ux_mode:a?.uxMode||"popup",nonce:a?.nonce,itp_support:!0,...e.additionalOptions});const T=R=>{_||window.google?.accounts.id.prompt(A=>{if(!_){if(A.isDismissedMoment&&A.isDismissedMoment())if(R<w){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else a?.onPromptNotification?.(A);else if(A.isSkippedMoment&&A.isSkippedMoment())if(R<w){const C=Math.pow(2,R)*S;setTimeout(()=>T(R+1),C)}else a?.onPromptNotification?.(A)}})};T(0)})};co&&co?.abort(),co=new AbortController;try{const p=e.promptOptions?.fedCM===!1||!hE()?"oneTap":"fedCM";p==="oneTap"&&await gM(),await g[p]()}catch(p){throw console.error("Error during Google One Tap flow:",p),p}finally{co=null}}}),getAtoms(t){return{}}}),gM=()=>new Promise(e=>{if(window.googleScriptInitialized){e();return}const t=document.createElement("script");t.src="https://accounts.google.com/gsi/client",t.async=!0,t.defer=!0,t.onload=()=>{window.googleScriptInitialized=!0,e()},document.head.appendChild(t)}),vM=e=>sM(e,e.options.roles||oM),nx=e=>{const t=go(!1),n=go(!1),a=go(!1),o=go(!1),l={admin:Xw,member:ex,owner:Jw,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(u,d,f)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:h=>vM({role:h.role,options:{ac:e?.ac,roles:l},permissions:h.permissions??h.permission})}}),getAtoms:u=>{const d=Ls(t,"/organization/list",u,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:a,$activeMemberRoleSignal:o,activeOrganization:Ls([n],"/organization/get-full-organization",u,()=>({method:"GET"})),listOrganizations:d,activeMember:Ls([a],"/organization/get-active-member",u,{method:"GET"}),activeMemberRole:Ls([o],"/organization/get-active-member-role",u,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(u){return u==="/organization/create"||u==="/organization/delete"||u==="/organization/update"},signal:"$listOrg"},{matcher(u){return u.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(u){return u.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(u){return u.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(u){return u.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},yM=()=>({id:"username",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/sign-in/username",signal:"$sessionSignal"}]}),bM=e=>({id:"sso-client",$InferServerPlugin:{}}),_M=Yw({plugins:[nx({}),cM(),bM(),tx()]});function rx(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=rx(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function ax(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rx(e))&&(a&&(a+=" "),a+=t);return a}const EM=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},SM=(e,t)=>({classGroupId:e,validator:t}),ix=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hd="-",pE=[],wM="arbitrary..",xM=e=>{const t=OM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return RM(u);const d=u.split(Hd),f=d[0]===""&&d.length>1?1:0;return ox(d,f,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=a[u],h=n[u];return f?h?EM(h,f):f:h||pE}return n[u]||pE}}},ox=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],l=n.nextPart.get(o);if(l){const h=ox(e,t+1,l);if(h)return h}const u=n.validators;if(u===null)return;const d=t===0?e.join(Hd):e.slice(t).join(Hd),f=u.length;for(let h=0;h<f;h++){const g=u[h];if(g.validator(d))return g.classGroupId}},RM=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?wM+a:void 0})(),OM=e=>{const{theme:t,classGroups:n}=e;return TM(n,t)},TM=(e,t)=>{const n=ix();for(const a in e){const o=e[a];Tv(o,n,a,t)}return n},Tv=(e,t,n,a)=>{const o=e.length;for(let l=0;l<o;l++){const u=e[l];AM(u,t,n,a)}},AM=(e,t,n,a)=>{if(typeof e=="string"){CM(e,t,n);return}if(typeof e=="function"){MM(e,t,n,a);return}NM(e,t,n,a)},CM=(e,t,n)=>{const a=e===""?t:sx(t,e);a.classGroupId=n},MM=(e,t,n,a)=>{if(IM(e)){Tv(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(SM(n,e))},NM=(e,t,n,a)=>{const o=Object.entries(e),l=o.length;for(let u=0;u<l;u++){const[d,f]=o[u];Tv(f,sx(t,d),n,a)}},sx=(e,t)=>{let n=e;const a=t.split(Hd),o=a.length;for(let l=0;l<o;l++){const u=a[l];let d=n.nextPart.get(u);d||(d=ix(),n.nextPart.set(u,d)),n=d}return n},IM=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,DM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(l,u)=>{n[l]=u,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=a[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},Mg="!",mE=":",LM=[],gE=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),PM=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const l=[];let u=0,d=0,f=0,h;const g=o.length;for(let w=0;w<g;w++){const T=o[w];if(u===0&&d===0){if(T===mE){l.push(o.slice(f,w)),f=w+1;continue}if(T==="/"){h=w;continue}}T==="["?u++:T==="]"?u--:T==="("?d++:T===")"&&d--}const p=l.length===0?o:o.slice(f);let y=p,_=!1;p.endsWith(Mg)?(y=p.slice(0,-1),_=!0):p.startsWith(Mg)&&(y=p.slice(1),_=!0);const S=h&&h>f?h-f:void 0;return gE(l,_,y,S)};if(t){const o=t+mE,l=a;a=u=>u.startsWith(o)?l(u.slice(o.length)):gE(LM,!1,u,void 0,!0)}if(n){const o=a;a=l=>n({className:l,parseClassName:o})}return a},kM=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let l=0;l<n.length;l++){const u=n[l],d=u[0]==="[",f=t.has(u);d||f?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(u)):o.push(u)}return o.length>0&&(o.sort(),a.push(...o)),a}},jM=e=>({cache:DM(e.cacheSize),parseClassName:PM(e),sortModifiers:kM(e),...xM(e)}),UM=/\s+/,BM=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:l}=t,u=[],d=e.trim().split(UM);let f="";for(let h=d.length-1;h>=0;h-=1){const g=d[h],{isExternal:p,modifiers:y,hasImportantModifier:_,baseClassName:S,maybePostfixModifierPosition:w}=n(g);if(p){f=g+(f.length>0?" "+f:f);continue}let T=!!w,R=a(T?S.substring(0,w):S);if(!R){if(!T){f=g+(f.length>0?" "+f:f);continue}if(R=a(S),!R){f=g+(f.length>0?" "+f:f);continue}T=!1}const A=y.length===0?"":y.length===1?y[0]:l(y).join(":"),C=_?A+Mg:A,O=C+R;if(u.indexOf(O)>-1)continue;u.push(O);const N=o(R,T);for(let L=0;L<N.length;++L){const I=N[L];u.push(C+I)}f=g+(f.length>0?" "+f:f)}return f},zM=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=lx(n))&&(o&&(o+=" "),o+=a);return o},lx=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=lx(e[a]))&&(n&&(n+=" "),n+=t);return n},FM=(e,...t)=>{let n,a,o,l;const u=f=>{const h=t.reduce((g,p)=>p(g),e());return n=jM(h),a=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const h=a(f);if(h)return h;const g=BM(f,n);return o(f,g),g};return l=u,(...f)=>l(zM(...f))},VM=[],ln=e=>{const t=n=>n[e]||VM;return t.isThemeGetter=!0,t},cx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ux=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HM=/^\d+\/\d+$/,$M=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GM=/\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$/,qM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,YM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ss=e=>HM.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),Oi=e=>!!e&&Number.isInteger(Number(e)),Mm=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),za=e=>$M.test(e),WM=()=>!0,ZM=e=>GM.test(e)&&!qM.test(e),dx=()=>!1,QM=e=>YM.test(e),XM=e=>KM.test(e),JM=e=>!Ae(e)&&!Ce(e),e6=e=>qs(e,px,dx),Ae=e=>cx.test(e),uo=e=>qs(e,mx,ZM),Nm=e=>qs(e,i6,Qe),vE=e=>qs(e,fx,dx),t6=e=>qs(e,hx,XM),id=e=>qs(e,gx,QM),Ce=e=>ux.test(e),Wl=e=>Ys(e,mx),n6=e=>Ys(e,o6),yE=e=>Ys(e,fx),r6=e=>Ys(e,px),a6=e=>Ys(e,hx),od=e=>Ys(e,gx,!0),qs=(e,t,n)=>{const a=cx.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ys=(e,t,n=!1)=>{const a=ux.exec(e);return a?a[1]?t(a[1]):n:!1},fx=e=>e==="position"||e==="percentage",hx=e=>e==="image"||e==="url",px=e=>e==="length"||e==="size"||e==="bg-size",mx=e=>e==="length",i6=e=>e==="number",o6=e=>e==="family-name",gx=e=>e==="shadow",s6=()=>{const e=ln("color"),t=ln("font"),n=ln("text"),a=ln("font-weight"),o=ln("tracking"),l=ln("leading"),u=ln("breakpoint"),d=ln("container"),f=ln("spacing"),h=ln("radius"),g=ln("shadow"),p=ln("inset-shadow"),y=ln("text-shadow"),_=ln("drop-shadow"),S=ln("blur"),w=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"],N=()=>[...O(),Ce,Ae],L=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],D=()=>[Ce,Ae,f],B=()=>[Ss,"full","auto",...D()],Z=()=>[Oi,"none","subgrid",Ce,Ae],Y=()=>["auto",{span:["full",Oi,Ce,Ae]},Oi,Ce,Ae],V=()=>[Oi,"auto",Ce,Ae],z=()=>["auto","min","max","fr",Ce,Ae],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...D()],F=()=>[Ss,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],G=()=>[e,Ce,Ae],ae=()=>[...O(),yE,vE,{position:[Ce,Ae]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",r6,e6,{size:[Ce,Ae]}],Q=()=>[Mm,Wl,uo],te=()=>["","none","full",h,Ce,Ae],se=()=>["",Qe,Wl,uo],ge=()=>["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"],ye=()=>[Qe,Mm,yE,vE],Se=()=>["","none",S,Ce,Ae],le=()=>["none",Qe,Ce,Ae],je=()=>["none",Qe,Ce,Ae],at=()=>[Qe,Ce,Ae],Je=()=>[Ss,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[za],breakpoint:[za],color:[WM],container:[za],"drop-shadow":[za],ease:["in","out","in-out"],font:[JM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[za],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[za],shadow:[za],spacing:["px",Qe],text:[za],"text-shadow":[za],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ss,Ae,Ce,T]}],container:["container"],columns:[{columns:[Qe,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:N()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Oi,"auto",Ce,Ae]}],basis:[{basis:[Ss,"full","auto",d,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,Ss,"auto","initial","none",Ae]}],grow:[{grow:["",Qe,Ce,Ae]}],shrink:[{shrink:["",Qe,Ce,Ae]}],order:[{order:[Oi,"first","last","none",Ce,Ae]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],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:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"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:[u]},...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,Wl,uo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Ce,Nm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mm,Ae]}],"font-family":[{font:[n6,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:[o,Ce,Ae]}],"line-clamp":[{"line-clamp":[Qe,"none",Ce,Nm]}],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:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",Ce,uo]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Qe,"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:ae()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Oi,Ce,Ae],radial:["",Ce,Ae],conic:[Oi,Ce,Ae]},a6,t6]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,Ce,Ae]}],"outline-w":[{outline:["",Qe,Wl,uo]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",g,od,id]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",p,od,id]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Qe,uo]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",y,od,id]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Qe,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":[Qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Ce,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Ae]}],filter:[{filter:["","none",Ce,Ae]}],blur:[{blur:Se()}],brightness:[{brightness:[Qe,Ce,Ae]}],contrast:[{contrast:[Qe,Ce,Ae]}],"drop-shadow":[{"drop-shadow":["","none",_,od,id]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Qe,Ce,Ae]}],"hue-rotate":[{"hue-rotate":[Qe,Ce,Ae]}],invert:[{invert:["",Qe,Ce,Ae]}],saturate:[{saturate:[Qe,Ce,Ae]}],sepia:[{sepia:["",Qe,Ce,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ae]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,Ce,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,Ce,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,Ce,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,Ce,Ae]}],"backdrop-invert":[{"backdrop-invert":["",Qe,Ce,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,Ce,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,Ce,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,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:[Qe,"initial",Ce,Ae]}],ease:[{ease:["linear","initial",R,Ce,Ae]}],delay:[{delay:[Qe,Ce,Ae]}],animate:[{animate:["none",A,Ce,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Ce,Ae]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:je()}],"scale-x":[{"scale-x":je()}],"scale-y":[{"scale-y":je()}],"scale-z":[{"scale-z":je()}],"scale-3d":["scale-3d"],skew:[{skew:at()}],"skew-x":[{"skew-x":at()}],"skew-y":[{"skew-y":at()}],transform:[{transform:[Ce,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ce,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",...G()]}],"stroke-w":[{stroke:[Qe,Wl,uo,Nm]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},l6=FM(s6);var dt;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const l={};for(const u of o)l[u]=u;return l},e.getValidEnumValues=o=>{const l=e.objectKeys(o).filter(d=>typeof o[o[d]]!="number"),u={};for(const d of l)u[d]=o[d];return e.objectValues(u)},e.objectValues=o=>e.objectKeys(o).map(function(l){return o[l]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const l=[];for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&l.push(u);return l},e.find=(o,l)=>{for(const u of o)if(l(u))return u},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function a(o,l=" | "){return o.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}e.joinValues=a,e.jsonStringifyReplacer=(o,l)=>typeof l=="bigint"?l.toString():l})(dt||(dt={}));var bE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(bE||(bE={}));const Oe=dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Mi=e=>{switch(typeof e){case"undefined":return Oe.undefined;case"string":return Oe.string;case"number":return Number.isNaN(e)?Oe.nan:Oe.number;case"boolean":return Oe.boolean;case"function":return Oe.function;case"bigint":return Oe.bigint;case"symbol":return Oe.symbol;case"object":return Array.isArray(e)?Oe.array:e===null?Oe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Oe.promise:typeof Map<"u"&&e instanceof Map?Oe.map:typeof Set<"u"&&e instanceof Set?Oe.set:typeof Date<"u"&&e instanceof Date?Oe.date:Oe.object;default:return Oe.unknown}},Ee=dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ga extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(l){return l.message},a={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(o);else if(u.code==="invalid_return_type")o(u.returnTypeError);else if(u.code==="invalid_arguments")o(u.argumentsError);else if(u.path.length===0)a._errors.push(n(u));else{let d=a,f=0;for(;f<u.path.length;){const h=u.path[f];f===u.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(u))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}};return o(this),a}static assert(t){if(!(t instanceof Ga))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,dt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const o of this.issues)if(o.path.length>0){const l=o.path[0];n[l]=n[l]||[],n[l].push(t(o))}else a.push(t(o));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Ga.create=e=>new Ga(e);const Ng=(e,t)=>{let n;switch(e.code){case Ee.invalid_type:e.received===Oe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ee.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,dt.jsonStringifyReplacer)}`;break;case Ee.unrecognized_keys:n=`Unrecognized key(s) in object: ${dt.joinValues(e.keys,", ")}`;break;case Ee.invalid_union:n="Invalid input";break;case Ee.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${dt.joinValues(e.options)}`;break;case Ee.invalid_enum_value:n=`Invalid enum value. Expected ${dt.joinValues(e.options)}, received '${e.received}'`;break;case Ee.invalid_arguments:n="Invalid function arguments";break;case Ee.invalid_return_type:n="Invalid function return type";break;case Ee.invalid_date:n="Invalid date";break;case Ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:dt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ee.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ee.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ee.custom:n="Invalid input";break;case Ee.invalid_intersection_types:n="Intersection results could not be merged";break;case Ee.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ee.not_finite:n="Number must be finite";break;default:n=t.defaultError,dt.assertNever(e)}return{message:n}};let c6=Ng;function u6(){return c6}const d6=e=>{const{data:t,path:n,errorMaps:a,issueData:o}=e,l=[...n,...o.path||[]],u={...o,path:l};if(o.message!==void 0)return{...o,path:l,message:o.message};let d="";const f=a.filter(h=>!!h).slice().reverse();for(const h of f)d=h(u,{data:t,defaultError:d}).message;return{...o,path:l,message:d}};function xe(e,t){const n=u6(),a=d6({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ng?void 0:Ng].filter(o=>!!o)});e.common.issues.push(a)}class Bn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const o of n){if(o.status==="aborted")return Be;o.status==="dirty"&&t.dirty(),a.push(o.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const o of n){const l=await o.key,u=await o.value;a.push({key:l,value:u})}return Bn.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const o of n){const{key:l,value:u}=o;if(l.status==="aborted"||u.status==="aborted")return Be;l.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||o.alwaysSet)&&(a[l.value]=u.value)}return{status:t.value,value:a}}}const Be=Object.freeze({status:"aborted"}),rc=e=>({status:"dirty",value:e}),Ur=e=>({status:"valid",value:e}),_E=e=>e.status==="aborted",EE=e=>e.status==="dirty",Vs=e=>e.status==="valid",$d=e=>typeof Promise<"u"&&e instanceof Promise;var De;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(De||(De={}));class ya{constructor(t,n,a,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const SE=(e,t)=>{if(Vs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ga(e.common.issues);return this._error=n,this._error}}};function qe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:o}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(u,d)=>{const{message:f}=e;return u.code==="invalid_enum_value"?{message:f??d.defaultError}:typeof d.data>"u"?{message:f??a??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:f??n??d.defaultError}},description:o}}class lt{get description(){return this._def.description}_getType(t){return Mi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Bn,ctx:{common:t.parent.common,data:t.data,parsedType:Mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if($d(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)},o=this._parseSync({data:t,path:a.path,parent:a});return SE(a,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return Vs(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>Vs(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)},o=this._parse({data:t,path:a.path,parent:a}),l=await($d(o)?o:Promise.resolve(o));return SE(a,l)}refine(t,n){const a=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,l)=>{const u=t(o),d=()=>l.addIssue({code:Ee.custom,...a(o)});return typeof Promise<"u"&&u instanceof Promise?u.then(f=>f?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(t,n){return this._refinement((a,o)=>t(a)?!0:(o.addIssue(typeof n=="function"?n(a,o):n),!1))}_refinement(t){return new Fi({schema:this,typeName:ze.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ha.create(this,this._def)}nullable(){return Ao.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ma.create(this)}promise(){return Jd.create(this,this._def)}or(t){return Kd.create([this,t],this._def)}and(t){return Wd.create(this,t,this._def)}transform(t){return new Fi({...qe(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ef({...qe(this._def),innerType:this,defaultValue:n,typeName:ze.ZodDefault})}brand(){return new _x({typeName:ze.ZodBranded,type:this,...qe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new tf({...qe(this._def),innerType:this,catchValue:n,typeName:ze.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Cv.create(this,t)}readonly(){return nf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const f6=/^c[^\s-]{8,}$/i,h6=/^[0-9a-z]+$/,p6=/^[0-9A-HJKMNP-TV-Z]{26}$/i,m6=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,g6=/^[a-z0-9_-]{21}$/i,v6=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,y6=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,b6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Im;const E6=/^(?:(?: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])$/,S6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,w6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,x6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,R6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,O6=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,vx="((\\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])))",T6=new RegExp(`^${vx}$`);function yx(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function A6(e){return new RegExp(`^${yx(e)}$`)}function C6(e){let t=`${vx}T${yx(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function M6(e,t){return!!((t==="v4"||!t)&&E6.test(e)||(t==="v6"||!t)&&w6.test(e))}function N6(e,t){if(!v6.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(a));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function I6(e,t){return!!((t==="v4"||!t)&&S6.test(e)||(t==="v6"||!t)&&x6.test(e))}class ha extends lt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Oe.string){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_type,expected:Oe.string,received:l.parsedType}),Be}const a=new Bn;let o;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="max")t.data.length>l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="length"){const u=t.data.length>l.value,d=t.data.length<l.value;(u||d)&&(o=this._getOrReturnCtx(t,o),u?xe(o,{code:Ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&xe(o,{code:Ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),a.dirty())}else if(l.kind==="email")b6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"email",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="emoji")Im||(Im=new RegExp(_6,"u")),Im.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"emoji",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="uuid")m6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"uuid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="nanoid")g6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"nanoid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid")f6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid2")h6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid2",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="ulid")p6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ulid",code:Ee.invalid_string,message:l.message}),a.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),xe(o,{validation:"url",code:Ee.invalid_string,message:l.message}),a.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"regex",code:Ee.invalid_string,message:l.message}),a.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),a.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:{startsWith:l.value},message:l.message}),a.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:{endsWith:l.value},message:l.message}),a.dirty()):l.kind==="datetime"?C6(l).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:"datetime",message:l.message}),a.dirty()):l.kind==="date"?T6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:"date",message:l.message}),a.dirty()):l.kind==="time"?A6(l).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.invalid_string,validation:"time",message:l.message}),a.dirty()):l.kind==="duration"?y6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"duration",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="ip"?M6(t.data,l.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ip",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="jwt"?N6(t.data,l.alg)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"jwt",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="cidr"?I6(t.data,l.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cidr",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="base64"?R6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64",code:Ee.invalid_string,message:l.message}),a.dirty()):l.kind==="base64url"?O6.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64url",code:Ee.invalid_string,message:l.message}),a.dirty()):dt.assertNever(l);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(o=>t.test(o),{validation:n,code:Ee.invalid_string,...De.errToObj(a)})}_addCheck(t){return new ha({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...De.errToObj(t)})}url(t){return this._addCheck({kind:"url",...De.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...De.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...De.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...De.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...De.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...De.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...De.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...De.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...De.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...De.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...De.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...De.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...De.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...De.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...De.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...De.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...De.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...De.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...De.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...De.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...De.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...De.errToObj(n)})}nonempty(t){return this.min(1,De.errToObj(t))}trim(){return new ha({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ha({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ha({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ha.create=e=>new ha({checks:[],typeName:ze.ZodString,coerce:e?.coerce??!1,...qe(e)});function D6(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,o=n>a?n:a,l=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return l%u/10**o}class xo extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Oe.number){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_type,expected:Oe.number,received:l.parsedType}),Be}let a;const o=new Bn;for(const l of this._def.checks)l.kind==="int"?dt.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="multipleOf"?D6(t.data,l.value)!==0&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.not_finite,message:l.message}),o.dirty()):dt.assertNever(l);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,De.toString(n))}gt(t,n){return this.setLimit("min",t,!1,De.toString(n))}lte(t,n){return this.setLimit("max",t,!0,De.toString(n))}lt(t,n){return this.setLimit("max",t,!1,De.toString(n))}setLimit(t,n,a,o){return new xo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:De.toString(o)}]})}_addCheck(t){return new xo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:De.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:De.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:De.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:De.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:De.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&dt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}xo.create=e=>new xo({checks:[],typeName:ze.ZodNumber,coerce:e?.coerce||!1,...qe(e)});class Ro extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Oe.bigint)return this._getInvalidInput(t);let a;const o=new Bn;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),xe(a,{code:Ee.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):dt.assertNever(l);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return xe(n,{code:Ee.invalid_type,expected:Oe.bigint,received:n.parsedType}),Be}gte(t,n){return this.setLimit("min",t,!0,De.toString(n))}gt(t,n){return this.setLimit("min",t,!1,De.toString(n))}lte(t,n){return this.setLimit("max",t,!0,De.toString(n))}lt(t,n){return this.setLimit("max",t,!1,De.toString(n))}setLimit(t,n,a,o){return new Ro({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:De.toString(o)}]})}_addCheck(t){return new Ro({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:De.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ro.create=e=>new Ro({checks:[],typeName:ze.ZodBigInt,coerce:e?.coerce??!1,...qe(e)});class Gd extends lt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Oe.boolean){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.boolean,received:a.parsedType}),Be}return Ur(t.data)}}Gd.create=e=>new Gd({typeName:ze.ZodBoolean,coerce:e?.coerce||!1,...qe(e)});class Hs extends lt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Oe.date){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_type,expected:Oe.date,received:l.parsedType}),Be}if(Number.isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return xe(l,{code:Ee.invalid_date}),Be}const a=new Bn;let o;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),a.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:Ee.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),a.dirty()):dt.assertNever(l);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Hs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:De.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:De.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Hs.create=e=>new Hs({checks:[],coerce:e?.coerce||!1,typeName:ze.ZodDate,...qe(e)});class wE extends lt{_parse(t){if(this._getType(t)!==Oe.symbol){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.symbol,received:a.parsedType}),Be}return Ur(t.data)}}wE.create=e=>new wE({typeName:ze.ZodSymbol,...qe(e)});class qd extends lt{_parse(t){if(this._getType(t)!==Oe.undefined){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.undefined,received:a.parsedType}),Be}return Ur(t.data)}}qd.create=e=>new qd({typeName:ze.ZodUndefined,...qe(e)});class Yd extends lt{_parse(t){if(this._getType(t)!==Oe.null){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.null,received:a.parsedType}),Be}return Ur(t.data)}}Yd.create=e=>new Yd({typeName:ze.ZodNull,...qe(e)});class mc extends lt{constructor(){super(...arguments),this._any=!0}_parse(t){return Ur(t.data)}}mc.create=e=>new mc({typeName:ze.ZodAny,...qe(e)});class Ig extends lt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ur(t.data)}}Ig.create=e=>new Ig({typeName:ze.ZodUnknown,...qe(e)});class zi extends lt{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:Ee.invalid_type,expected:Oe.never,received:n.parsedType}),Be}}zi.create=e=>new zi({typeName:ze.ZodNever,...qe(e)});class xE extends lt{_parse(t){if(this._getType(t)!==Oe.undefined){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.void,received:a.parsedType}),Be}return Ur(t.data)}}xE.create=e=>new xE({typeName:ze.ZodVoid,...qe(e)});class ma extends lt{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),o=this._def;if(n.parsedType!==Oe.array)return xe(n,{code:Ee.invalid_type,expected:Oe.array,received:n.parsedType}),Be;if(o.exactLength!==null){const u=n.data.length>o.exactLength.value,d=n.data.length<o.exactLength.value;(u||d)&&(xe(n,{code:u?Ee.too_big:Ee.too_small,minimum:d?o.exactLength.value:void 0,maximum:u?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),a.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(xe(n,{code:Ee.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),a.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(xe(n,{code:Ee.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((u,d)=>o.type._parseAsync(new ya(n,u,n.path,d)))).then(u=>Bn.mergeArray(a,u));const l=[...n.data].map((u,d)=>o.type._parseSync(new ya(n,u,n.path,d)));return Bn.mergeArray(a,l)}get element(){return this._def.type}min(t,n){return new ma({...this._def,minLength:{value:t,message:De.toString(n)}})}max(t,n){return new ma({...this._def,maxLength:{value:t,message:De.toString(n)}})}length(t,n){return new ma({...this._def,exactLength:{value:t,message:De.toString(n)}})}nonempty(t){return this.min(1,t)}}ma.create=(e,t)=>new ma({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...qe(t)});function Ns(e){if(e instanceof en){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=Ha.create(Ns(a))}return new en({...e._def,shape:()=>t})}else return e instanceof ma?new ma({...e._def,type:Ns(e.element)}):e instanceof Ha?Ha.create(Ns(e.unwrap())):e instanceof Ao?Ao.create(Ns(e.unwrap())):e instanceof Oo?Oo.create(e.items.map(t=>Ns(t))):e}class en extends lt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=dt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Oe.object){const h=this._getOrReturnCtx(t);return xe(h,{code:Ee.invalid_type,expected:Oe.object,received:h.parsedType}),Be}const{status:a,ctx:o}=this._processInputParams(t),{shape:l,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof zi&&this._def.unknownKeys==="strip"))for(const h in o.data)u.includes(h)||d.push(h);const f=[];for(const h of u){const g=l[h],p=o.data[h];f.push({key:{status:"valid",value:h},value:g._parse(new ya(o,p,o.path,h)),alwaysSet:h in o.data})}if(this._def.catchall instanceof zi){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of d)f.push({key:{status:"valid",value:g},value:{status:"valid",value:o.data[g]}});else if(h==="strict")d.length>0&&(xe(o,{code:Ee.unrecognized_keys,keys:d}),a.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of d){const p=o.data[g];f.push({key:{status:"valid",value:g},value:h._parse(new ya(o,p,o.path,g)),alwaysSet:g in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of f){const p=await g.key,y=await g.value;h.push({key:p,value:y,alwaysSet:g.alwaysSet})}return h}).then(h=>Bn.mergeObjectSync(a,h)):Bn.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(t){return De.errToObj,new en({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{const o=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:De.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new en({...this._def,unknownKeys:"strip"})}passthrough(){return new en({...this._def,unknownKeys:"passthrough"})}extend(t){return new en({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new en({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ze.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new en({...this._def,catchall:t})}pick(t){const n={};for(const a of dt.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new en({...this._def,shape:()=>n})}omit(t){const n={};for(const a of dt.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new en({...this._def,shape:()=>n})}deepPartial(){return Ns(this)}partial(t){const n={};for(const a of dt.objectKeys(this.shape)){const o=this.shape[a];t&&!t[a]?n[a]=o:n[a]=o.optional()}return new en({...this._def,shape:()=>n})}required(t){const n={};for(const a of dt.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let l=this.shape[a];for(;l instanceof Ha;)l=l._def.innerType;n[a]=l}return new en({...this._def,shape:()=>n})}keyof(){return bx(dt.objectKeys(this.shape))}}en.create=(e,t)=>new en({shape:()=>e,unknownKeys:"strip",catchall:zi.create(),typeName:ze.ZodObject,...qe(t)});en.strictCreate=(e,t)=>new en({shape:()=>e,unknownKeys:"strict",catchall:zi.create(),typeName:ze.ZodObject,...qe(t)});en.lazycreate=(e,t)=>new en({shape:e,unknownKeys:"strip",catchall:zi.create(),typeName:ze.ZodObject,...qe(t)});class Kd extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function o(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const u=l.map(d=>new Ga(d.ctx.common.issues));return xe(n,{code:Ee.invalid_union,unionErrors:u}),Be}if(n.common.async)return Promise.all(a.map(async l=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(o);{let l;const u=[];for(const f of a){const h={...n,common:{...n.common,issues:[]},parent:null},g=f._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!l&&(l={result:g,ctx:h}),h.common.issues.length&&u.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=u.map(f=>new Ga(f));return xe(n,{code:Ee.invalid_union,unionErrors:d}),Be}}get options(){return this._def.options}}Kd.create=(e,t)=>new Kd({options:e,typeName:ze.ZodUnion,...qe(t)});const Va=e=>e instanceof Qd?Va(e.schema):e instanceof Fi?Va(e.innerType()):e instanceof Xd?[e.value]:e instanceof To?e.options:e instanceof Lg?dt.objectValues(e.enum):e instanceof ef?Va(e._def.innerType):e instanceof qd?[void 0]:e instanceof Yd?[null]:e instanceof Ha?[void 0,...Va(e.unwrap())]:e instanceof Ao?[null,...Va(e.unwrap())]:e instanceof _x||e instanceof nf?Va(e.unwrap()):e instanceof tf?Va(e._def.innerType):[];class Av extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Oe.object)return xe(n,{code:Ee.invalid_type,expected:Oe.object,received:n.parsedType}),Be;const a=this.discriminator,o=n.data[a],l=this.optionsMap.get(o);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(xe(n,{code:Ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),Be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,a){const o=new Map;for(const l of n){const u=Va(l.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const d of u){if(o.has(d))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(d)}`);o.set(d,l)}}return new Av({typeName:ze.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...qe(a)})}}function Dg(e,t){const n=Mi(e),a=Mi(t);if(e===t)return{valid:!0,data:e};if(n===Oe.object&&a===Oe.object){const o=dt.objectKeys(t),l=dt.objectKeys(e).filter(d=>o.indexOf(d)!==-1),u={...e,...t};for(const d of l){const f=Dg(e[d],t[d]);if(!f.valid)return{valid:!1};u[d]=f.data}return{valid:!0,data:u}}else if(n===Oe.array&&a===Oe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let l=0;l<e.length;l++){const u=e[l],d=t[l],f=Dg(u,d);if(!f.valid)return{valid:!1};o.push(f.data)}return{valid:!0,data:o}}else return n===Oe.date&&a===Oe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Wd extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=(l,u)=>{if(_E(l)||_E(u))return Be;const d=Dg(l.value,u.value);return d.valid?((EE(l)||EE(u))&&n.dirty(),{status:n.value,value:d.data}):(xe(a,{code:Ee.invalid_intersection_types}),Be)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([l,u])=>o(l,u)):o(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Wd.create=(e,t,n)=>new Wd({left:e,right:t,typeName:ze.ZodIntersection,...qe(n)});class Oo extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.array)return xe(a,{code:Ee.invalid_type,expected:Oe.array,received:a.parsedType}),Be;if(a.data.length<this._def.items.length)return xe(a,{code:Ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&a.data.length>this._def.items.length&&(xe(a,{code:Ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...a.data].map((u,d)=>{const f=this._def.items[d]||this._def.rest;return f?f._parse(new ya(a,u,a.path,d)):null}).filter(u=>!!u);return a.common.async?Promise.all(l).then(u=>Bn.mergeArray(n,u)):Bn.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new Oo({...this._def,rest:t})}}Oo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Oo({items:e,typeName:ze.ZodTuple,rest:null,...qe(t)})};class Zd extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.object)return xe(a,{code:Ee.invalid_type,expected:Oe.object,received:a.parsedType}),Be;const o=[],l=this._def.keyType,u=this._def.valueType;for(const d in a.data)o.push({key:l._parse(new ya(a,d,a.path,d)),value:u._parse(new ya(a,a.data[d],a.path,d)),alwaysSet:d in a.data});return a.common.async?Bn.mergeObjectAsync(n,o):Bn.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,a){return n instanceof lt?new Zd({keyType:t,valueType:n,typeName:ze.ZodRecord,...qe(a)}):new Zd({keyType:ha.create(),valueType:t,typeName:ze.ZodRecord,...qe(n)})}}class RE extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.map)return xe(a,{code:Ee.invalid_type,expected:Oe.map,received:a.parsedType}),Be;const o=this._def.keyType,l=this._def.valueType,u=[...a.data.entries()].map(([d,f],h)=>({key:o._parse(new ya(a,d,a.path,[h,"key"])),value:l._parse(new ya(a,f,a.path,[h,"value"]))}));if(a.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const f of u){const h=await f.key,g=await f.value;if(h.status==="aborted"||g.status==="aborted")return Be;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const f of u){const h=f.key,g=f.value;if(h.status==="aborted"||g.status==="aborted")return Be;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(h.value,g.value)}return{status:n.value,value:d}}}}RE.create=(e,t,n)=>new RE({valueType:t,keyType:e,typeName:ze.ZodMap,...qe(n)});class gc extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Oe.set)return xe(a,{code:Ee.invalid_type,expected:Oe.set,received:a.parsedType}),Be;const o=this._def;o.minSize!==null&&a.data.size<o.minSize.value&&(xe(a,{code:Ee.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&a.data.size>o.maxSize.value&&(xe(a,{code:Ee.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const l=this._def.valueType;function u(f){const h=new Set;for(const g of f){if(g.status==="aborted")return Be;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const d=[...a.data.values()].map((f,h)=>l._parse(new ya(a,f,a.path,h)));return a.common.async?Promise.all(d).then(f=>u(f)):u(d)}min(t,n){return new gc({...this._def,minSize:{value:t,message:De.toString(n)}})}max(t,n){return new gc({...this._def,maxSize:{value:t,message:De.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}gc.create=(e,t)=>new gc({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...qe(t)});class Qd extends lt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Qd.create=(e,t)=>new Qd({getter:e,typeName:ze.ZodLazy,...qe(t)});class Xd extends lt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:Ee.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}Xd.create=(e,t)=>new Xd({value:e,typeName:ze.ZodLiteral,...qe(t)});function bx(e,t){return new To({values:e,typeName:ze.ZodEnum,...qe(t)})}class To extends lt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return xe(n,{expected:dt.joinValues(a),received:n.parsedType,code:Ee.invalid_type}),Be}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return xe(n,{received:n.data,code:Ee.invalid_enum_value,options:a}),Be}return Ur(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return To.create(t,{...this._def,...n})}exclude(t,n=this._def){return To.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}To.create=bx;class Lg extends lt{_parse(t){const n=dt.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==Oe.string&&a.parsedType!==Oe.number){const o=dt.objectValues(n);return xe(a,{expected:dt.joinValues(o),received:a.parsedType,code:Ee.invalid_type}),Be}if(this._cache||(this._cache=new Set(dt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=dt.objectValues(n);return xe(a,{received:a.data,code:Ee.invalid_enum_value,options:o}),Be}return Ur(t.data)}get enum(){return this._def.values}}Lg.create=(e,t)=>new Lg({values:e,typeName:ze.ZodNativeEnum,...qe(t)});class Jd extends lt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Oe.promise&&n.common.async===!1)return xe(n,{code:Ee.invalid_type,expected:Oe.promise,received:n.parsedType}),Be;const a=n.parsedType===Oe.promise?n.data:Promise.resolve(n.data);return Ur(a.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Jd.create=(e,t)=>new Jd({type:e,typeName:ze.ZodPromise,...qe(t)});class Fi extends lt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=this._def.effect||null,l={addIssue:u=>{xe(a,u),u.fatal?n.abort():n.dirty()},get path(){return a.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){const u=o.transform(a.data,l);if(a.common.async)return Promise.resolve(u).then(async d=>{if(n.value==="aborted")return Be;const f=await this._def.schema._parseAsync({data:d,path:a.path,parent:a});return f.status==="aborted"?Be:f.status==="dirty"||n.value==="dirty"?rc(f.value):f});{if(n.value==="aborted")return Be;const d=this._def.schema._parseSync({data:u,path:a.path,parent:a});return d.status==="aborted"?Be:d.status==="dirty"||n.value==="dirty"?rc(d.value):d}}if(o.type==="refinement"){const u=d=>{const f=o.refinement(d,l);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return d.status==="aborted"?Be:(d.status==="dirty"&&n.dirty(),u(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>d.status==="aborted"?Be:(d.status==="dirty"&&n.dirty(),u(d.value).then(()=>({status:n.value,value:d.value}))))}if(o.type==="transform")if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Vs(u))return Be;const d=o.transform(u.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>Vs(u)?Promise.resolve(o.transform(u.value,l)).then(d=>({status:n.value,value:d})):Be);dt.assertNever(o)}}Fi.create=(e,t,n)=>new Fi({schema:e,typeName:ze.ZodEffects,effect:t,...qe(n)});Fi.createWithPreprocess=(e,t,n)=>new Fi({schema:t,effect:{type:"preprocess",transform:e},typeName:ze.ZodEffects,...qe(n)});class Ha extends lt{_parse(t){return this._getType(t)===Oe.undefined?Ur(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ha.create=(e,t)=>new Ha({innerType:e,typeName:ze.ZodOptional,...qe(t)});class Ao extends lt{_parse(t){return this._getType(t)===Oe.null?Ur(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ao.create=(e,t)=>new Ao({innerType:e,typeName:ze.ZodNullable,...qe(t)});class ef extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===Oe.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ef.create=(e,t)=>new ef({innerType:e,typeName:ze.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qe(t)});class tf extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return $d(o)?o.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Ga(a.common.issues)},input:a.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ga(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}tf.create=(e,t)=>new tf({innerType:e,typeName:ze.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qe(t)});class OE extends lt{_parse(t){if(this._getType(t)!==Oe.nan){const a=this._getOrReturnCtx(t);return xe(a,{code:Ee.invalid_type,expected:Oe.nan,received:a.parsedType}),Be}return{status:"valid",value:t.data}}}OE.create=e=>new OE({typeName:ze.ZodNaN,...qe(e)});class _x extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class Cv extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return l.status==="aborted"?Be:l.status==="dirty"?(n.dirty(),rc(l.value)):this._def.out._parseAsync({data:l.value,path:a.path,parent:a})})();{const o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?Be:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}static create(t,n){return new Cv({in:t,out:n,typeName:ze.ZodPipeline})}}class nf extends lt{_parse(t){const n=this._def.innerType._parse(t),a=o=>(Vs(o)&&(o.value=Object.freeze(o.value)),o);return $d(n)?n.then(o=>a(o)):a(n)}unwrap(){return this._def.innerType}}nf.create=(e,t)=>new nf({innerType:e,typeName:ze.ZodReadonly,...qe(t)});function TE(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function L6(e,t={},n){return e?mc.create().superRefine((a,o)=>{const l=e(a);if(l instanceof Promise)return l.then(u=>{if(!u){const d=TE(t,a),f=d.fatal??n??!0;o.addIssue({code:"custom",...d,fatal:f})}});if(!l){const u=TE(t,a),d=u.fatal??n??!0;o.addIssue({code:"custom",...u,fatal:d})}}):mc.create()}var ze;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ze||(ze={}));const kB=(e,t={message:`Input not instance of ${e.name}`})=>L6(n=>n instanceof e,t),Xe=ha.create,Ex=xo.create;Ro.create;const Mv=Gd.create,jB=Hs.create,UB=qd.create,BB=Yd.create,zB=mc.create,FB=Ig.create,VB=zi.create,AE=ma.create,zn=en.create,HB=Kd.create,$B=Av.create,GB=Wd.create;Oo.create;const qB=Zd.create,Ks=Qd.create,YB=Xd.create,Nv=To.create;Jd.create;const KB=Ha.create;Ao.create;const P6=Fi.createWithPreprocess,Dm={string:(e=>ha.create({...e,coerce:!0})),number:(e=>xo.create({...e,coerce:!0})),boolean:(e=>Gd.create({...e,coerce:!0})),bigint:(e=>Ro.create({...e,coerce:!0})),date:(e=>Hs.create({...e,coerce:!0}))},WB=Be;function pe(...e){return l6(ax(e))}function k6(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function $t({error:e,localization:t,localizeErrors:n=!0}){var a;const o="Request failed";if(!n)return e?.message?e.message:(a=e?.error)!=null&&a.message?e.error.message:o;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const l=e.error.code;if(t?.[l])return t[l]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||o}function Do(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Pg(e,t){for(const n in e)if(e[n]===t)return n}function vc(e,t){let n=Xe().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var j6={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},U6={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},B6={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},z6={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},F6={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},V6={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},H6={...F6,...V6},$6={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},G6={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},q6={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Y6={INVALID_SESSION_TOKEN:"Invalid session token"},K6={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},W6={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},Z6={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},Q6={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},X6={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},J6={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},eN={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},tN={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Please check your email for the verification link.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...z6,...j6,...U6,...B6,...H6,...$6,...G6,...q6,...Y6,...K6,...W6,...Z6,...Q6,...X6,...J6,...eN},nN={CALLBACK:"callback",EMAIL_OTP:"email-otp",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},CE={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},ME={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function rN(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const aN=e=>{switch(e){case"success":return sN;case"info":return cN;case"warning":return lN;case"error":return uN;default:return null}},iN=Array(12).fill(0),oN=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},iN.map((n,a)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),sN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),lN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),uN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),dN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),fN=()=>{const[e,t]=H.useState(document.hidden);return H.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let kg=1;class hN{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...o}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:kg++,u=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:a}),{...f,...t,id:l,dismissible:d,title:a}):f):this.addToast({title:a,...o,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=a!==void 0,u;const d=o.then(async h=>{if(u=["resolve",h],H.isValidElement(h))l=!1,this.create({id:a,type:"default",message:h});else if(mN(h)&&!h.ok){l=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof p=="object"&&!H.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:y,...S})}else if(h instanceof Error){l=!1;const p=typeof n.error=="function"?await n.error(h):n.error,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!H.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:y,...S})}else if(n.success!==void 0){l=!1;const p=typeof n.success=="function"?await n.success(h):n.success,y=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!H.isValidElement(p)?p:{message:p};this.create({id:a,type:"success",description:y,...S})}}).catch(async h=>{if(u=["reject",h],n.error!==void 0){l=!1;const g=typeof n.error=="function"?await n.error(h):n.error,p=typeof n.description=="function"?await n.description(h):n.description,_=typeof g=="object"&&!H.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:p,..._})}}).finally(()=>{l&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((h,g)=>d.then(()=>u[0]==="reject"?g(u[1]):h(u[1])).catch(g));return typeof a!="string"&&typeof a!="number"?{unwrap:f}:Object.assign(a,{unwrap:f})},this.custom=(t,n)=>{const a=n?.id||kg++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Qn=new hN,pN=(e,t)=>{const n=t?.id||kg++;return Qn.addToast({title:e,...t,id:n}),n},mN=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",gN=pN,vN=()=>Qn.toasts,yN=()=>Qn.getActiveToasts(),NE=Object.assign(gN,{success:Qn.success,info:Qn.info,warning:Qn.warning,error:Qn.error,custom:Qn.custom,message:Qn.message,promise:Qn.promise,dismiss:Qn.dismiss,loading:Qn.loading},{getHistory:vN,getToasts:yN});rN("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function sd(e){return e.label!==void 0}const bN=3,_N="24px",EN="16px",IE=4e3,SN=356,wN=14,xN=45,RN=200;function oa(...e){return e.filter(Boolean).join(" ")}function ON(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const TN=e=>{var t,n,a,o,l,u,d,f,h;const{invert:g,toast:p,unstyled:y,interacting:_,setHeights:S,visibleToasts:w,heights:T,index:R,toasts:A,expanded:C,removeToast:O,defaultRichColors:N,closeButton:L,style:I,cancelButtonStyle:D,actionButtonStyle:B,className:Z="",descriptionClassName:Y="",duration:V,position:z,gap:ie,expandByDefault:ee,classNames:k,icons:F,closeButtonAriaLabel:G="Close toast"}=e,[ae,ve]=H.useState(null),[P,Q]=H.useState(null),[te,se]=H.useState(!1),[ge,_e]=H.useState(!1),[ye,Se]=H.useState(!1),[le,je]=H.useState(!1),[at,Je]=H.useState(!1),[Ft,re]=H.useState(0),[be,Le]=H.useState(0),Ye=H.useRef(p.duration||V||IE),At=H.useRef(null),Ue=H.useRef(null),et=R===0,j=R+1<=w,q=p.type,W=p.dismissible!==!1,de=p.className||"",me=p.descriptionClassName||"",he=H.useMemo(()=>T.findIndex(Ne=>Ne.toastId===p.id)||0,[T,p.id]),Re=H.useMemo(()=>{var Ne;return(Ne=p.closeButton)!=null?Ne:L},[p.closeButton,L]),Fe=H.useMemo(()=>p.duration||V||IE,[p.duration,V]),tt=H.useRef(0),Rt=H.useRef(0),nr=H.useRef(0),Ct=H.useRef(null),[Gt,Mt]=z.split("-"),on=H.useMemo(()=>T.reduce((Ne,We,Ot)=>Ot>=he?Ne:Ne+We.height,0),[T,he]),qt=fN(),ei=p.invert||g,Ea=q==="loading";Rt.current=H.useMemo(()=>he*ie+on,[he,on]),H.useEffect(()=>{Ye.current=Fe},[Fe]),H.useEffect(()=>{se(!0)},[]),H.useEffect(()=>{const Ne=Ue.current;if(Ne){const We=Ne.getBoundingClientRect().height;return Le(We),S(Ot=>[{toastId:p.id,height:We,position:p.position},...Ot]),()=>S(Ot=>Ot.filter(Et=>Et.toastId!==p.id))}},[S,p.id]),H.useLayoutEffect(()=>{if(!te)return;const Ne=Ue.current,We=Ne.style.height;Ne.style.height="auto";const Ot=Ne.getBoundingClientRect().height;Ne.style.height=We,Le(Ot),S(Et=>Et.find(ht=>ht.toastId===p.id)?Et.map(ht=>ht.toastId===p.id?{...ht,height:Ot}:ht):[{toastId:p.id,height:Ot,position:p.position},...Et])},[te,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const Me=H.useCallback(()=>{_e(!0),re(Rt.current),S(Ne=>Ne.filter(We=>We.toastId!==p.id)),setTimeout(()=>{O(p)},RN)},[p,O,S,Rt]);H.useEffect(()=>{if(p.promise&&q==="loading"||p.duration===1/0||p.type==="loading")return;let Ne;return C||_||qt?(()=>{if(nr.current<tt.current){const Et=new Date().getTime()-tt.current;Ye.current=Ye.current-Et}nr.current=new Date().getTime()})():Ye.current!==1/0&&(tt.current=new Date().getTime(),Ne=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Me()},Ye.current)),()=>clearTimeout(Ne)},[C,_,p,q,qt,Me]),H.useEffect(()=>{p.delete&&(Me(),p.onDismiss==null||p.onDismiss.call(p,p))},[Me,p.delete]);function it(){var Ne;if(F?.loading){var We;return H.createElement("div",{className:oa(k?.loader,p==null||(We=p.classNames)==null?void 0:We.loader,"sonner-loader"),"data-visible":q==="loading"},F.loading)}return H.createElement(oN,{className:oa(k?.loader,p==null||(Ne=p.classNames)==null?void 0:Ne.loader),visible:q==="loading"})}const ut=p.icon||F?.[q]||aN(q);var Ke,ft;return H.createElement("li",{tabIndex:0,ref:Ue,className:oa(Z,de,k?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,k?.default,k?.[q],p==null||(n=p.classNames)==null?void 0:n[q]),"data-sonner-toast":"","data-rich-colors":(Ke=p.richColors)!=null?Ke:N,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":te,"data-promise":!!p.promise,"data-swiped":at,"data-removed":ge,"data-visible":j,"data-y-position":Gt,"data-x-position":Mt,"data-index":R,"data-front":et,"data-swiping":ye,"data-dismissible":W,"data-type":q,"data-invert":ei,"data-swipe-out":le,"data-swipe-direction":P,"data-expanded":!!(C||ee&&te),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":A.length-R,"--offset":`${ge?Ft:Rt.current}px`,"--initial-height":ee?"auto":`${be}px`,...I,...p.style},onDragEnd:()=>{Se(!1),ve(null),Ct.current=null},onPointerDown:Ne=>{Ne.button!==2&&(Ea||!W||(At.current=new Date,re(Rt.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(Se(!0),Ct.current={x:Ne.clientX,y:Ne.clientY})))},onPointerUp:()=>{var Ne,We,Ot;if(le||!W)return;Ct.current=null;const Et=Number(((Ne=Ue.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Mn=Number(((We=Ue.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ht=new Date().getTime()-((Ot=At.current)==null?void 0:Ot.getTime()),Nt=ae==="x"?Et:Mn,_r=Math.abs(Nt)/ht;if(Math.abs(Nt)>=xN||_r>.11){re(Rt.current),p.onDismiss==null||p.onDismiss.call(p,p),Q(ae==="x"?Et>0?"right":"left":Mn>0?"down":"up"),Me(),je(!0);return}else{var _n,Fn;(_n=Ue.current)==null||_n.style.setProperty("--swipe-amount-x","0px"),(Fn=Ue.current)==null||Fn.style.setProperty("--swipe-amount-y","0px")}Je(!1),Se(!1),ve(null)},onPointerMove:Ne=>{var We,Ot,Et;if(!Ct.current||!W||((We=window.getSelection())==null?void 0:We.toString().length)>0)return;const ht=Ne.clientY-Ct.current.y,Nt=Ne.clientX-Ct.current.x;var _r;const _n=(_r=e.swipeDirections)!=null?_r:ON(z);!ae&&(Math.abs(Nt)>1||Math.abs(ht)>1)&&ve(Math.abs(Nt)>Math.abs(ht)?"x":"y");let Fn={x:0,y:0};const ko=zr=>1/(1.5+Math.abs(zr)/20);if(ae==="y"){if(_n.includes("top")||_n.includes("bottom"))if(_n.includes("top")&&ht<0||_n.includes("bottom")&&ht>0)Fn.y=ht;else{const zr=ht*ko(ht);Fn.y=Math.abs(zr)<Math.abs(ht)?zr:ht}}else if(ae==="x"&&(_n.includes("left")||_n.includes("right")))if(_n.includes("left")&&Nt<0||_n.includes("right")&&Nt>0)Fn.x=Nt;else{const zr=Nt*ko(Nt);Fn.x=Math.abs(zr)<Math.abs(Nt)?zr:Nt}(Math.abs(Fn.x)>0||Math.abs(Fn.y)>0)&&Je(!0),(Ot=Ue.current)==null||Ot.style.setProperty("--swipe-amount-x",`${Fn.x}px`),(Et=Ue.current)==null||Et.style.setProperty("--swipe-amount-y",`${Fn.y}px`)}},Re&&!p.jsx&&q!=="loading"?H.createElement("button",{"aria-label":G,"data-disabled":Ea,"data-close-button":!0,onClick:Ea||!W?()=>{}:()=>{Me(),p.onDismiss==null||p.onDismiss.call(p,p)},className:oa(k?.closeButton,p==null||(a=p.classNames)==null?void 0:a.closeButton)},(ft=F?.close)!=null?ft:dN):null,(q||p.icon||p.promise)&&p.icon!==null&&(F?.[q]!==null||p.icon)?H.createElement("div",{"data-icon":"",className:oa(k?.icon,p==null||(o=p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||it():null,p.type!=="loading"?ut:null):null,H.createElement("div",{"data-content":"",className:oa(k?.content,p==null||(l=p.classNames)==null?void 0:l.content)},H.createElement("div",{"data-title":"",className:oa(k?.title,p==null||(u=p.classNames)==null?void 0:u.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?H.createElement("div",{"data-description":"",className:oa(Y,me,k?.description,p==null||(d=p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),H.isValidElement(p.cancel)?p.cancel:p.cancel&&sd(p.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||D,onClick:Ne=>{sd(p.cancel)&&W&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ne),Me())},className:oa(k?.cancelButton,p==null||(f=p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,H.isValidElement(p.action)?p.action:p.action&&sd(p.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||B,onClick:Ne=>{sd(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ne),!Ne.defaultPrevented&&Me())},className:oa(k?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function DE(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function AN(e,t){const n={};return[e,t].forEach((a,o)=>{const l=o===1,u=l?"--mobile-offset":"--offset",d=l?EN:_N;function f(h){["top","right","bottom","left"].forEach(g=>{n[`${u}-${g}`]=typeof h=="number"?`${h}px`:h})}typeof a=="number"||typeof a=="string"?f(a):typeof a=="object"?["top","right","bottom","left"].forEach(h=>{a[h]===void 0?n[`${u}-${h}`]=d:n[`${u}-${h}`]=typeof a[h]=="number"?`${a[h]}px`:a[h]}):f(d)}),n}const CN=H.forwardRef(function(t,n){const{id:a,invert:o,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:h,offset:g,mobileOffset:p,theme:y="light",richColors:_,duration:S,style:w,visibleToasts:T=bN,toastOptions:R,dir:A=DE(),gap:C=wN,icons:O,containerAriaLabel:N="Notifications"}=t,[L,I]=H.useState([]),D=H.useMemo(()=>a?L.filter(te=>te.toasterId===a):L.filter(te=>!te.toasterId),[L,a]),B=H.useMemo(()=>Array.from(new Set([l].concat(D.filter(te=>te.position).map(te=>te.position)))),[D,l]),[Z,Y]=H.useState([]),[V,z]=H.useState(!1),[ie,ee]=H.useState(!1),[k,F]=H.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=H.useRef(null),ae=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=H.useRef(null),P=H.useRef(!1),Q=H.useCallback(te=>{I(se=>{var ge;return(ge=se.find(_e=>_e.id===te.id))!=null&&ge.delete||Qn.dismiss(te.id),se.filter(({id:_e})=>_e!==te.id)})},[]);return H.useEffect(()=>Qn.subscribe(te=>{if(te.dismiss){requestAnimationFrame(()=>{I(se=>se.map(ge=>ge.id===te.id?{...ge,delete:!0}:ge))});return}setTimeout(()=>{Bw.flushSync(()=>{I(se=>{const ge=se.findIndex(_e=>_e.id===te.id);return ge!==-1?[...se.slice(0,ge),{...se[ge],...te},...se.slice(ge+1)]:[te,...se]})})})}),[L]),H.useEffect(()=>{if(y!=="system"){F(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const te=window.matchMedia("(prefers-color-scheme: dark)");try{te.addEventListener("change",({matches:se})=>{F(se?"dark":"light")})}catch{te.addListener(({matches:ge})=>{try{F(ge?"dark":"light")}catch(_e){console.error(_e)}})}},[y]),H.useEffect(()=>{L.length<=1&&z(!1)},[L]),H.useEffect(()=>{const te=se=>{var ge;if(u.every(Se=>se[Se]||se.code===Se)){var ye;z(!0),(ye=G.current)==null||ye.focus()}se.code==="Escape"&&(document.activeElement===G.current||(ge=G.current)!=null&&ge.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[u]),H.useEffect(()=>{if(G.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,P.current=!1)}},[G.current]),H.createElement("section",{ref:n,"aria-label":`${N} ${ae}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},B.map((te,se)=>{var ge;const[_e,ye]=te.split("-");return D.length?H.createElement("ol",{key:te,dir:A==="auto"?DE():A,tabIndex:-1,ref:G,className:h,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":_e,"data-x-position":ye,style:{"--front-toast-height":`${((ge=Z[0])==null?void 0:ge.height)||0}px`,"--width":`${SN}px`,"--gap":`${C}px`,...w,...AN(g,p)},onBlur:Se=>{P.current&&!Se.currentTarget.contains(Se.relatedTarget)&&(P.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||P.current||(P.current=!0,ve.current=Se.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{ie||z(!1)},onDragEnd:()=>z(!1),onPointerDown:Se=>{Se.target instanceof HTMLElement&&Se.target.dataset.dismissible==="false"||ee(!0)},onPointerUp:()=>ee(!1)},D.filter(Se=>!Se.position&&se===0||Se.position===te).map((Se,le)=>{var je,at;return H.createElement(TN,{key:Se.id,icons:O,index:le,toast:Se,defaultRichColors:_,duration:(je=R?.duration)!=null?je:S,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:o,visibleToasts:T,closeButton:(at=R?.closeButton)!=null?at:f,interacting:ie,position:te,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:Q,toasts:D.filter(Je=>Je.position==Se.position),heights:Z.filter(Je=>Je.position==Se.position),setHeights:Y,expandByDefault:d,gap:C,expanded:V,swipeDirections:t.swipeDirections})})):null}))}),Sx=E.createContext({});function wx(){return E.useContext(Sx)}var Lm,LE;function MN(){if(LE)return Lm;LE=1;var e=function(){};return Lm=e,Lm}var NN=MN();const IN=Io(NN);function DN({async:e,appendTo:t,defer:n,id:a,nonce:o,src:l}){const u=document.createElement("script");e!==void 0&&(u.async=e),n!==void 0&&(u.defer=n),a&&(u.id=a),o&&u.setAttribute("nonce",o),u.src=l,(t==="head"?document.head:document.body).appendChild(u)}var LN=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let lc=null,yc=!1;const rf=new Set,af=new Set,PN=typeof window<"u",ks="___grecaptcha_cfg",xx=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function kN(){if(!PN)return;function e(n){if(yc)n();else{window[ks]||(window[ks]={});const a=window[ks];a.fns||(a.fns=[]),a.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){yc=!0;for(const n of af)n();af.clear()}window[xx]=t}function jN({language:e,onLoadCallbackName:t,render:n,useEnterprise:a=!1,useRecaptchaNet:o=!1}){const l=o?"recaptcha.net":"google.com",u=a?"enterprise.js":"api.js",d=new URLSearchParams({render:n});return t&&d.set("onload",t),e&&d.set("hl",e),`https://www.${l}/recaptcha/${u}?${d.toString()}`}function UN({language:e,render:t,scriptProps:n,useEnterprise:a,useRecaptchaNet:o}){const l={id:"google-recaptcha-v3"},u=jN({language:e,onLoadCallbackName:xx,render:t,useEnterprise:a,useRecaptchaNet:o});if(lc){if(lc!==u)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}lc=u,DN(Object.assign(Object.assign(Object.assign({},l),n),{src:u}))}function BN(e){if(!window[ks])return;const t=window[ks];t.clients&&delete t.clients[e]}function zN(e,t){var{onLoadCallback:n,onLoadCallbackName:a}=t,o=LN(t,["onLoadCallback","onLoadCallbackName"]);if(rf.size===0&&kN(),UN(o),rf.add(e),n&&(yc?n():af.add(n)),a){let l=function(){if(!a)return;const u=window[a];typeof u=="function"&&u()};yc?l():af.add(l)}}function FN(e){var t,n,a;rf.delete(e),rf.size===0&&(window.grecaptcha=void 0,window[ks]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${lc}"]`))===null||n===void 0||n.remove(),(a=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||a===void 0||a.remove(),lc=null,yc=!1)}let PE=!1;function VN({container:e,children:t,language:n,reCaptchaKey:a,scriptProps:o,useEnterprise:l,useRecaptchaNet:u}){var d,f,h,g,p,y,_;const S=E.useId(),[w,T]=E.useState(null),[R,A]=E.useState(null),C=E.useRef(!1);E.useEffect(()=>{function I(){var D;const B=l?(D=window.grecaptcha)===null||D===void 0?void 0:D.enterprise:window.grecaptcha;if(!B)throw new Error("reCAPTCHA not found");if(!B.ready)throw new Error("reCAPTCHA ready callback not found");B.ready(()=>{T(B)})}return zN(S,{language:n,onLoadCallback:I,onLoadCallbackName:o?.onLoadCallbackName,render:e?.element?"explicit":a,scriptProps:{appendTo:o?.appendTo,async:o?.async,defer:o?.defer,id:o?.id,nonce:o?.nonce},useEnterprise:l,useRecaptchaNet:u}),()=>{FN(S),T(null)}},[e?.element,S,n,a,o?.appendTo,o?.async,o?.defer,o?.id,o?.nonce,o?.onLoadCallbackName,l,u]),E.useEffect(()=>{var I,D,B;if(!e?.element||!w?.render)return;const Z={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((I=e.parameters)===null||I===void 0?void 0:I.badge)||"inline",callback:e.parameters.callback,sitekey:a,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},Y=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!Y)throw new Error("reCAPTCHA container element not found");const V=w.render(Y,Z);return!((D=e?.parameters)===null||D===void 0)&&D.hidden&&(PE||(IN(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),PE=!0),(B=Y.querySelector(".grecaptcha-badge"))===null||B===void 0||B.style.setProperty("display","none")),A(V),C.current=!0,()=>{A(null),C.current=!1,BN(V),Y.innerHTML=""}},[e?.element,(d=e?.parameters)===null||d===void 0?void 0:d.badge,(f=e?.parameters)===null||f===void 0?void 0:f.hidden,(h=e?.parameters)===null||h===void 0?void 0:h.callback,(g=e?.parameters)===null||g===void 0?void 0:g.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(y=e?.parameters)===null||y===void 0?void 0:y.tabindex,(_=e?.parameters)===null||_===void 0?void 0:_.theme,w,a]);const O=!!e?.element,N=O?R:a,L=E.useMemo(()=>N!==null&&w?.execute?I=>{if(N===null||!w?.execute)throw new Error("reCAPTCHA has not been loaded");return O&&!C.current?(console.warn("Client ID not mounted"),null):w.execute(N,{action:I})}:void 0,[N,w,O]);return b.jsx(Sx.Provider,{value:{container:e?.element,executeRecaptcha:L,reCaptchaInstance:w},children:t})}var HN=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const a of n)a()}}},Nr=new HN;function $N(){return()=>{}}function Ka(){return E.useSyncExternalStore($N,()=>!0,()=>!1)}function Iv(){const[e,t]=E.useState();return E.useEffect(()=>{const n=()=>{const o=document.documentElement.getAttribute("lang");t(o??void 0)};n();const a=new MutationObserver(o=>{for(const l of o)l.attributeName==="lang"&&n()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{lang:e}}function Dv(){const[e,t]=E.useState("light");return E.useEffect(()=>{const n=()=>{var o;const l=document.documentElement.classList.contains("dark")||((o=document.documentElement.getAttribute("style"))==null?void 0:o.includes("color-scheme: dark"));t(l?"dark":"light")};n();const a=new MutationObserver(o=>{for(const l of o)(l.attributeName==="style"||l.attributeName==="class")&&n()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{theme:e}}function GN({children:e}){const t=Ka(),{captcha:n}=E.useContext(Ze);return n?.provider!=="google-recaptcha-v3"?e:b.jsxs(VN,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&b.jsx("style",{children:`
|
|
11
11
|
.grecaptcha-badge {
|
|
12
12
|
visibility: hidden;
|
|
13
13
|
border-radius: var(--radius) !important;
|
|
@@ -115,4 +115,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
115
115
|
.dark .grecaptcha-badge {
|
|
116
116
|
border-color: var(--input) !important;
|
|
117
117
|
}
|
|
118
|
-
`}),b.jsx(A9,{ref:e,sitekey:t.siteKey,theme:n,hl:a,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:pe(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${a}-${t.provider}`)]}):null}var HU=["/sign-up/email","/sign-in/email","/forget-password"];function Uc({ref:e,localization:t,action:n}){const{captcha:a}=E.useContext(Ze);if(!a||n&&!(a.endpoints||HU).includes(n))return null;const{theme:o}=Dv(),l=a.provider==="google-recaptcha-v2-checkbox"||a.provider==="google-recaptcha-v2-invisible",u=a.provider==="google-recaptcha-v3"||a.provider==="google-recaptcha-v2-invisible",d=a.provider==="cloudflare-turnstile",f=a.provider==="hcaptcha",h=a.provider==="captchafox";return b.jsxs(b.Fragment,{children:[l&&b.jsx(VU,{ref:e}),u&&b.jsx(FU,{localization:t}),d&&b.jsx(TO,{className:"mx-auto",ref:e,siteKey:a.siteKey,options:{theme:o,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(t9,{ref:e,sitekey:a.siteKey,theme:o})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(vO,{ref:e,sitekey:a.siteKey,theme:o})})]})}function ZO({className:e,containerClassName:t,...n}){return b.jsx(IO,{"data-slot":"input-otp",containerClassName:pe("flex items-center gap-2 has-disabled:opacity-50",t),className:pe("disabled:cursor-not-allowed",e),...n})}function Cs({className:e,...t}){return b.jsx("div",{"data-slot":"input-otp-group",className:pe("flex items-center",e),...t})}function mn({index:e,className:t,...n}){const a=E.useContext(NO),{char:o,hasFakeCaret:l,isActive:u}=a?.slots[e]??{};return b.jsxs("div",{"data-slot":"input-otp-slot","data-active":u,className:pe("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:[o,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 mg({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(xI,{})})}function QO({otpSeparators:e=0}){return e===0?b.jsxs(Cs,{children:[b.jsx(mn,{index:0}),b.jsx(mn,{index:1}),b.jsx(mn,{index:2}),b.jsx(mn,{index:3}),b.jsx(mn,{index:4}),b.jsx(mn,{index:5})]}):e===1?b.jsxs(b.Fragment,{children:[b.jsxs(Cs,{children:[b.jsx(mn,{index:0}),b.jsx(mn,{index:1}),b.jsx(mn,{index:2})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(mn,{index:3}),b.jsx(mn,{index:4}),b.jsx(mn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(Cs,{children:[b.jsx(mn,{index:0}),b.jsx(mn,{index:1})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(mn,{index:2}),b.jsx(mn,{index:3})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(mn,{index:4}),b.jsx(mn,{index:5})]})]})}function ow(e){const[t,n]=E.useState();return t?b.jsx(GU,{...e,email:t}):b.jsx($U,{...e,setEmail:n})}function $U({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o,setEmail:l}){const u=Ka(),{captchaRef:d,getCaptchaHeaders:f}=jc({localization:a}),{authClient:h,localization:g,toast:p,localizeErrors:y}=E.useContext(Ze);a={...g,...a};const _=zn({email:Xe().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),S=Wa({resolver:Za(_),defaultValues:{email:""}});n=n||S.formState.isSubmitting,E.useEffect(()=>{o?.(S.formState.isSubmitting)},[S.formState.isSubmitting,o]);async function w({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:a.EMAIL_OTP_VERIFICATION_SENT}),l(T)}catch(A){p({variant:"error",message:$t({error:A,localization:a,localizeErrors:y})})}}return b.jsx(Xa,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(w),noValidate:u,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:S.control,name:"email",render:({field:T})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...T})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Uc,{ref:d,localization:a,action:"/email-otp/send-verification-otp"}),b.jsx(Lt,{type:"submit",disabled:n,className:pe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.EMAIL_OTP_SEND_ACTION})]})})}function GU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u,email:d}){const{authClient:f,localization:h,toast:g,localizeErrors:p}=E.useContext(Ze);a={...h,...a};const{onSuccess:y,isPending:_}=Ja({redirectTo:l}),S=zn({code:Xe().min(1,{message:`${a.EMAIL_OTP} ${a.IS_REQUIRED}`}).min(6,{message:`${a.EMAIL_OTP} ${a.IS_INVALID}`})}),w=Wa({resolver:Za(S),defaultValues:{code:""}});n=n||w.formState.isSubmitting||_,E.useEffect(()=>{u?.(w.formState.isSubmitting||_)},[w.formState.isSubmitting,_,u]);async function T({code:R}){try{await f.signIn.emailOtp({email:d,otp:R,fetchOptions:{throw:!0}}),await y()}catch(A){g({variant:"error",message:$t({error:A,localization:a,localizeErrors:p})}),w.reset()}}return b.jsx(Xa,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(T),className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:w.control,name:"code",render:({field:R})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.EMAIL_OTP}),b.jsx(dn,{children:b.jsx(ZO,{...R,maxLength:6,onChange:A=>{R.onChange(A),A.length===6&&w.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(QO,{otpSeparators:o})})}),b.jsx(bn,{className:t?.error})]})}),b.jsx("div",{className:"grid gap-4",children:b.jsxs(Lt,{type:"submit",disabled:n,className:pe(t?.button,t?.primaryButton),children:[n&&b.jsx(Tn,{className:"animate-spin"}),a.EMAIL_OTP_VERIFY_ACTION]})})]})})}function qU({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o}){const l=Ka(),{captchaRef:u,getCaptchaHeaders:d,resetCaptcha:f}=jc({localization:a}),{authClient:h,basePath:g,baseURL:p,localization:y,navigate:_,toast:S,viewPaths:w,localizeErrors:T}=E.useContext(Ze);a={...y,...a};const R=zn({email:Xe().email({message:`${a.EMAIL} ${a.IS_INVALID}`}).min(1,{message:`${a.EMAIL} ${a.IS_REQUIRED}`})}),A=Wa({resolver:Za(R),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{o?.(A.formState.isSubmitting)},[A.formState.isSubmitting,o]);async function C({email:O}){try{const N={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:O,redirectTo:`${p}${g}/${w.RESET_PASSWORD}`,fetchOptions:N}),S({variant:"success",message:a.FORGOT_PASSWORD_EMAIL}),_(`${g}/${w.SIGN_IN}${window.location.search}`)}catch(N){S({variant:"error",message:$t({error:N,localization:a,localizeErrors:T})}),f()}}return b.jsx(Xa,{...A,children:b.jsxs("form",{onSubmit:A.handleSubmit(C),noValidate:l,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:A.control,name:"email",render:({field:O})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...O})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Uc,{ref:u,localization:a,action:"/forget-password"}),b.jsx(Lt,{type:"submit",disabled:n,className:pe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.FORGOT_PASSWORD_ACTION})]})})}function sw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u}){const d=Ka(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:o}),{authClient:p,basePath:y,baseURL:_,persistClient:S,localization:w,redirectTo:T,viewPaths:R,toast:A,localizeErrors:C}=E.useContext(Ze);o={...w,...o};const O=E.useCallback(()=>l||Do("redirectTo")||T,[l,T]),N=E.useCallback(()=>`${_}${n||(S?`${y}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,S,y,R,_,O]),L=zn({email:Xe().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),I=Wa({resolver:Za(L),defaultValues:{email:""}});a=a||I.formState.isSubmitting,E.useEffect(()=>{u?.(I.formState.isSubmitting)},[I.formState.isSubmitting,u]);async function D({email:B}){try{const Z={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:B,callbackURL:N(),fetchOptions:Z}),A({variant:"success",message:o.MAGIC_LINK_EMAIL}),I.reset()}catch(Z){A({variant:"error",message:$t({error:Z,localization:o,localizeErrors:C})}),g()}}return b.jsx(Xa,{...I,children:b.jsxs("form",{onSubmit:I.handleSubmit(D),noValidate:d,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:I.control,name:"email",render:({field:B})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...B})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Uc,{ref:f,localization:o,action:"/sign-in/magic-link"}),b.jsx(Lt,{type:"submit",disabled:a,className:pe("w-full",t?.button,t?.primaryButton),children:a?b.jsx(Tn,{className:"animate-spin"}):o.MAGIC_LINK_ACTION})]})})}function YU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l}){const{authClient:u,localization:d,toast:f,localizeErrors:h}=E.useContext(Ze);a={...d,...a};const{onSuccess:g,isPending:p}=Ja({redirectTo:o}),y=zn({code:Xe().min(1,{message:a.BACKUP_CODE_REQUIRED})}),_=Wa({resolver:Za(y),defaultValues:{code:""}});n=n||_.formState.isSubmitting||p,E.useEffect(()=>{l?.(_.formState.isSubmitting||p)},[_.formState.isSubmitting,p,l]);async function S({code:w}){try{await u.twoFactor.verifyBackupCode({code:w,fetchOptions:{throw:!0}}),await g()}catch(T){f({variant:"error",message:$t({error:T,localization:a,localizeErrors:h})}),_.reset()}}return b.jsx(Xa,{..._,children:b.jsxs("form",{onSubmit:_.handleSubmit(S),className:pe("grid gap-6",e,t?.base),children:[b.jsx(tn,{control:_.control,name:"code",render:({field:w})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.BACKUP_CODE}),b.jsx(dn,{children:b.jsx(Zr,{placeholder:a.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...w})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Lt,{type:"submit",disabled:n,className:pe(t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.RECOVER_ACCOUNT_ACTION})]})})}function KU({className:e,classNames:t,localization:n,passwordValidation:a}){const o=E.useRef(!1),{authClient:l,basePath:u,credentials:d,localization:f,viewPaths:h,navigate:g,toast:p,localizeErrors:y}=E.useContext(Ze),_=d?.confirmPassword,S=d?.passwordValidation;n={...f,...n},a={...S,...a};const w=zn({newPassword:vc(a,{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:_?vc(a,{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}):Xe().optional()}).refine(C=>!_||C.newPassword===C.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),T=Wa({resolver:Za(w),defaultValues:{newPassword:"",confirmPassword:""}}),R=T.formState.isSubmitting;E.useEffect(()=>{if(o.current)return;o.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(g(`${u}/${h.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[u,g,p,h,n]);async function A({newPassword:C}){try{const N=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:N,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),g(`${u}/${h.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:$t({error:O,localization:n,localizeErrors:y})}),T.reset()}}return b.jsx(Xa,{...T,children:b.jsxs("form",{onSubmit:T.handleSubmit(A),className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:T.control,name:"newPassword",render:({field:C})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:n.NEW_PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(bn,{className:t?.error})]})}),_&&b.jsx(tn,{control:T.control,name:"confirmPassword",render:({field:C})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:n.CONFIRM_PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Lt,{type:"submit",disabled:R,className:pe("w-full",t?.button,t?.primaryButton),children:R?b.jsx(Tn,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function WU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l,passwordValidation:u}){const d=Ka(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:a}),{authClient:p,basePath:y,credentials:_,localization:S,viewPaths:w,navigate:T,toast:R,Link:A,localizeErrors:C}=E.useContext(Ze),O=_?.rememberMe,N=_?.username,L=_?.passwordValidation;a={...S,...a},u={...L,...u};const{onSuccess:I,isPending:D}=Ja({redirectTo:o}),B=zn({email:N?Xe().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):Xe().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:vc(u,a),rememberMe:Mv().optional()}),Z=Wa({resolver:Za(B),defaultValues:{email:"",password:"",rememberMe:!O}});n=n||Z.formState.isSubmitting||D,E.useEffect(()=>{l?.(Z.formState.isSubmitting||D)},[Z.formState.isSubmitting,D,l]);async function Y({email:V,password:z,rememberMe:ie}){try{let ee={};if(N&&!k6(V)){const k={throw:!0,headers:await h("/sign-in/username")};ee=await p.signIn.username({username:V,password:z,rememberMe:ie,fetchOptions:k})}else{const k={throw:!0,headers:await h("/sign-in/email")};ee=await p.signIn.email({email:V,password:z,rememberMe:ie,fetchOptions:k})}ee.twoFactorRedirect?T(`${y}/${w.TWO_FACTOR}${window.location.search}`):await I()}catch(ee){Z.resetField("password"),g(),R({variant:"error",message:$t({error:ee,localization:a,localizeErrors:C})})}}return b.jsx(Xa,{...Z,children:b.jsxs("form",{onSubmit:Z.handleSubmit(Y),noValidate:d,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:Z.control,name:"email",render:({field:V})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:N?a.USERNAME:a.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:N?"username":"email",className:t?.input,type:N?"text":"email",placeholder:N?a.SIGN_IN_USERNAME_PLACEHOLDER:a.EMAIL_PLACEHOLDER,disabled:n,...V})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:Z.control,name:"password",render:({field:V})=>b.jsxs(nn,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(rn,{className:t?.label,children:a.PASSWORD}),_?.forgotPassword&&b.jsx(A,{className:pe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${w.FORGOT_PASSWORD}${d?window.location.search:""}`,children:a.FORGOT_PASSWORD_LINK})]}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"current-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:n,...V})}),b.jsx(bn,{className:t?.error})]})}),O&&b.jsx(tn,{control:Z.control,name:"rememberMe",render:({field:V})=>b.jsxs(nn,{className:"flex",children:[b.jsx(dn,{children:b.jsx(w0,{checked:V.value,onCheckedChange:V.onChange,disabled:n})}),b.jsx(rn,{children:a.REMEMBER_ME})]})}),b.jsx(Uc,{ref:f,localization:a,action:"/sign-in/email"}),b.jsx(Lt,{type:"submit",disabled:n,className:pe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.SIGN_IN_ACTION})]})})}function ZU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u,passwordValidation:d}){const f=Ka(),{captchaRef:h,getCaptchaHeaders:g,resetCaptcha:p}=jc({localization:o}),{additionalFields:y,authClient:_,basePath:S,baseURL:w,credentials:T,localization:R,nameRequired:A,persistClient:C,redirectTo:O,signUp:N,viewPaths:L,navigate:I,toast:D,avatar:B,localizeErrors:Z}=E.useContext(Ze),Y=T?.confirmPassword,V=T?.username,z=T?.usernameRequired??!0,ie=T?.passwordValidation,ee=N?.fields;o={...R,...o},d={...ie,...d};const k=E.useRef(null),[F,G]=E.useState(null),[ae,ve]=E.useState(!1),P=E.useCallback(()=>l||Do("redirectTo")||O,[l,O]),Q=E.useCallback(()=>`${w}${n||(C?`${S}/${L.CALLBACK}?redirectTo=${encodeURIComponent(P())}`:P())}`,[n,C,S,L,w,P]),{onSuccess:te,isPending:se}=Ja({redirectTo:l}),ge={email:Xe().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:vc(d,o),name:ee?.includes("name")&&A?Xe().min(1,{message:`${o.NAME} ${o.IS_REQUIRED}`}):Xe().optional(),image:Xe().optional(),username:V&&z?Xe().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):Xe().optional(),confirmPassword:Y?vc(d,{PASSWORD_REQUIRED:o.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:o.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:o.PASSWORD_TOO_LONG,INVALID_PASSWORD:o.INVALID_PASSWORD}):Xe().optional()},_e={};if(ee)for(const re of ee){if(re==="name"||re==="image")continue;const be=y?.[re];if(!be)continue;let Le;be.type==="number"?Le=be.required?P6(Ye=>Ye?Number(Ye):void 0,Ex({message:`${be.label} ${o.IS_INVALID}`})):Dm.number({message:`${be.label} ${o.IS_INVALID}`}).optional():be.type==="boolean"?Le=be.required?Dm.boolean({message:`${be.label} ${o.IS_INVALID}`}).refine(Ye=>Ye===!0,{message:`${be.label} ${o.IS_REQUIRED}`}):Dm.boolean({message:`${be.label} ${o.IS_INVALID}`}).optional():Le=be.required?Xe().min(1,`${be.label} ${o.IS_REQUIRED}`):Xe().optional(),_e[re]=Le}const ye=zn(ge).extend(_e).refine(re=>Y?re.password===re.confirmPassword:!0,{message:o.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Se={email:"",password:"",...Y&&{confirmPassword:""},...ee?.includes("name")?{name:""}:{},...V?{username:""}:{},...ee?.includes("image")&&B?{image:""}:{}};if(ee)for(const re of ee){if(re==="name"||re==="image")continue;const be=y?.[re];be&&(Se[re]=be.type==="boolean"?!1:"")}const le=Wa({resolver:Za(ye),defaultValues:Se});a=a||le.formState.isSubmitting||se,E.useEffect(()=>{u?.(le.formState.isSubmitting||se)},[le.formState.isSubmitting,se,u]);const je=async re=>{if(B){ve(!0);try{const be=await sU(re,crypto.randomUUID(),B.size,B.extension);let Le;B.upload?Le=await B.upload(be):Le=await cU(be),Le?(G(Le),le.setValue("image",Le)):(G(null),le.setValue("image",""))}catch(be){console.error(be),D({variant:"error",message:$t({error:be,localization:o,localizeErrors:Z})})}ve(!1)}},at=()=>{G(null),le.setValue("image","")},Je=()=>{var re;return(re=k.current)==null?void 0:re.click()};async function Ft({email:re,password:be,name:Le,username:Ye,confirmPassword:At,image:Ue,...et}){try{for(const[de,me]of Object.entries(et)){const he=y?.[de];if(he?.validate&&typeof me=="string"&&!await he.validate(me)){le.setError(de,{message:`${he.label} ${o.IS_INVALID}`});return}}const j={throw:!0,headers:await g("/sign-up/email")},q={};Ye!==void 0&&(!z&&(Ye===null||Ye===""||typeof Ye=="string"&&Ye.trim()==="")||(q.username=Ye)),Ue!==void 0&&(q.image=Ue);const W=await _.signUp.email({email:re,password:be,name:Le||"",...q,...et,callbackURL:Q(),fetchOptions:j});"token"in W&&W.token?await te():(I(`${S}/${L.SIGN_IN}${window.location.search}`),D({variant:"success",message:o.SIGN_UP_EMAIL}))}catch(j){D({variant:"error",message:$t({error:j,localization:o,localizeErrors:Z})}),le.resetField("password"),le.resetField("confirmPassword"),p()}}return b.jsx(Xa,{...le,children:b.jsxs("form",{onSubmit:le.handleSubmit(Ft),noValidate:f,className:pe("grid w-full gap-6",e,t?.base),children:[ee?.includes("image")&&B&&b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:k,accept:"image/*",disabled:ae,hidden:!0,type:"file",onChange:re=>{var be;const Le=(be=re.target.files)==null?void 0:be.item(0);Le&&je(Le),re.target.value=""}}),b.jsx(tn,{control:le.control,name:"image",render:()=>b.jsxs(nn,{children:[b.jsx(rn,{children:o.AVATAR}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs(UO,{children:[b.jsx(BO,{asChild:!0,children:b.jsx(Lt,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx(KO,{isPending:ae,className:"size-16",user:F?{name:le.watch("name"),email:le.watch("email"),image:F}:null,localization:o})})}),b.jsxs(zO,{align:"start",onCloseAutoFocus:re=>re.preventDefault(),children:[b.jsxs(Ef,{onClick:Je,disabled:ae,children:[b.jsx(dI,{}),o.UPLOAD_AVATAR]}),F&&b.jsxs(Ef,{onClick:at,disabled:ae,variant:"destructive",children:[b.jsx(CI,{}),o.DELETE_AVATAR]})]})]}),b.jsxs(Lt,{type:"button",variant:"outline",onClick:Je,disabled:ae,children:[ae&&b.jsx(Tn,{className:"animate-spin"}),o.UPLOAD]})]}),b.jsx(bn,{})]})})]}),ee?.includes("name")&&b.jsx(tn,{control:le.control,name:"name",render:({field:re})=>b.jsxs(nn,{children:[b.jsxs(rn,{className:t?.label,children:[o.NAME,!A&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:"name",className:t?.input,placeholder:o.NAME_PLACEHOLDER,disabled:a,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),V&&b.jsx(tn,{control:le.control,name:"username",render:({field:re})=>b.jsxs(nn,{children:[b.jsxs(rn,{className:t?.label,children:[o.USERNAME,!z&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:"username",className:t?.input,placeholder:o.USERNAME_PLACEHOLDER,disabled:a,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:le.control,name:"email",render:({field:re})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:"email",className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:le.control,name:"password",render:({field:re})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),Y&&b.jsx(tn,{control:le.control,name:"confirmPassword",render:({field:re})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.CONFIRM_PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.CONFIRM_PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),ee?.filter(re=>re!=="name"&&re!=="image").map(re=>{const be=y?.[re];return be?be.type==="boolean"?b.jsx(tn,{control:le.control,name:re,render:({field:Le})=>b.jsxs(nn,{className:"flex",children:[b.jsx(dn,{children:b.jsx(w0,{checked:Le.value,onCheckedChange:Le.onChange,disabled:a})}),b.jsx(rn,{className:t?.label,children:be.label}),b.jsx(bn,{className:t?.error})]})},re):b.jsx(tn,{control:le.control,name:re,render:({field:Le})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:be.label}),b.jsx(dn,{children:be.type==="number"?b.jsx(Zr,{className:t?.input,type:"number",placeholder:be.placeholder||(typeof be.label=="string"?be.label:""),disabled:a,...Le,value:Le.value}):be.multiline?b.jsx(pU,{className:t?.input,placeholder:be.placeholder||(typeof be.label=="string"?be.label:""),disabled:a,...Le,value:Le.value}):b.jsx(Zr,{className:t?.input,type:"text",placeholder:be.placeholder||(typeof be.label=="string"?be.label:""),disabled:a,...Le,value:Le.value})}),b.jsx(bn,{className:t?.error})]})},re):(console.error(`Additional field ${re} not found`),null)}),b.jsx(Uc,{ref:h,localization:o,action:"/sign-up/email"}),b.jsx(Lt,{type:"submit",disabled:a,className:pe("w-full",t?.button,t?.primaryButton),children:a?b.jsx(Tn,{className:"animate-spin"}):o.SIGN_UP_ACTION})]})})}function QU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u}){var d;const f=Ka(),h=f?Do("totpURI"):null,g=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:S,twoFactor:w,viewPaths:T,toast:R,Link:A,localizeErrors:C}=E.useContext(Ze);a={...S,...a};const{onSuccess:O,isPending:N}=Ja({redirectTo:l}),{data:L}=_(),I=(d=L?.user)==null?void 0:d.twoFactorEnabled,[D,B]=E.useState(w?.length===1?w[0]:null),[Z,Y]=E.useState(!1),[V,z]=E.useState(0),ie=zn({code:Xe().min(1,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_REQUIRED}`}).min(6,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_INVALID}`}),trustDevice:Mv().optional()}),ee=Wa({resolver:Za(ie),defaultValues:{code:""}});n=n||ee.formState.isSubmitting||N,E.useEffect(()=>{u?.(ee.formState.isSubmitting||N)},[ee.formState.isSubmitting,N,u]),E.useEffect(()=>{D==="otp"&&V<=0&&!g.current&&(g.current=!0,k())},[D]),E.useEffect(()=>{if(V<=0)return;const G=setTimeout(()=>{z(ae=>ae-1)},1e3);return()=>clearTimeout(G)},[V]);const k=async()=>{if(!(Z||V>0)){try{Y(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),z(60)}catch(G){R({variant:"error",message:$t({error:G,localization:a,localizeErrors:C})}),G.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}g.current=!1,Y(!1)}};async function F({code:G,trustDevice:ae}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:G,trustDevice:ae,fetchOptions:{throw:!0}}),await O(),L&&!I&&R({variant:"success",message:a?.TWO_FACTOR_ENABLED})}catch(ve){R({variant:"error",message:$t({error:ve,localization:a,localizeErrors:C})}),ee.reset()}}return b.jsx(Xa,{...ee,children:b.jsxs("form",{onSubmit:ee.handleSubmit(F),className:pe("grid w-full gap-6",e,t?.base),children:[w?.includes("totp")&&h&&D==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx(FO,{className:t?.label,children:a.TWO_FACTOR_TOTP_LABEL}),b.jsx(Z9,{className:pe("border shadow-xs",t?.qrCode),value:h})]}),D!==null&&b.jsxs(b.Fragment,{children:[b.jsx(tn,{control:ee.control,name:"code",render:({field:G})=>b.jsxs(nn,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(rn,{className:t?.label,children:a.ONE_TIME_PASSWORD}),b.jsx(A,{className:pe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${T.RECOVER_ACCOUNT}${f?window.location.search:""}`,children:a.FORGOT_AUTHENTICATOR})]}),b.jsx(dn,{children:b.jsx(ZO,{...G,maxLength:6,onChange:ae=>{G.onChange(ae),ae.length===6&&ee.handleSubmit(F)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(QO,{otpSeparators:o})})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:ee.control,name:"trustDevice",render:({field:G})=>b.jsxs(nn,{className:"flex",children:[b.jsx(dn,{children:b.jsx(w0,{checked:G.value,onCheckedChange:G.onChange,disabled:n,className:t?.checkbox})}),b.jsx(rn,{className:t?.label,children:a.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[D!==null&&b.jsxs(Lt,{type:"submit",disabled:n,className:pe(t?.button,t?.primaryButton),children:[n&&b.jsx(Tn,{className:"animate-spin"}),a.TWO_FACTOR_ACTION]}),D==="otp"&&w?.includes("otp")&&b.jsxs(Lt,{type:"button",variant:"outline",onClick:k,disabled:V>0||Z||n,className:pe(t?.button,t?.outlineButton),children:[Z?b.jsx(Tn,{className:"animate-spin"}):b.jsx(jE,{className:t?.icon}),a.RESEND_CODE,V>0&&` (${V})`]}),D!=="otp"&&w?.includes("otp")&&b.jsxs(Lt,{type:"button",variant:"secondary",className:pe(t?.button,t?.secondaryButton),onClick:()=>B("otp"),disabled:n,children:[b.jsx(jE,{className:t?.icon}),a.SEND_VERIFICATION_CODE]}),D!=="totp"&&w?.includes("totp")&&b.jsxs(Lt,{type:"button",variant:"secondary",className:pe(t?.button,t?.secondaryButton),onClick:()=>B("totp"),disabled:n,children:[b.jsx(OI,{className:t?.icon}),a.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function XO({redirectTo:e}){const t=E.useRef(!1),{authClient:n,basePath:a,viewPaths:o}=E.useContext(Ze),{onSuccess:l}=Ja({redirectTo:e||`${a}/${o.SIGN_IN}`});return E.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(l))},[n,l]),b.jsx(Tn,{className:"animate-spin"})}function XU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,pathname:l,redirectTo:u,view:d,otpSeparators:f=0,setIsSubmitting:h}){const{basePath:g,credentials:p,localization:y,magicLink:_,emailOTP:S,signUp:w,twoFactor:T,viewPaths:R,replace:A}=E.useContext(Ze),C=!!w;if(o={...y,...o},E.useEffect(()=>{l&&!Pg(R,l)&&(console.error(`Invalid auth view: ${l}`),A(`${g}/${R.SIGN_IN}${window.location.search}`))},[l,R,g,A]),d=d||Pg(R,l)||"SIGN_IN",E.useEffect(()=>{let O=!1;d==="MAGIC_LINK"&&(!_||!p&&!S)&&(O=!0),d==="EMAIL_OTP"&&(!S||!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(`${g}/${R.SIGN_IN}${window.location.search}`)},[g,d,R,p,A,S,C,_,T]),d==="SIGN_OUT")return b.jsx(XO,{redirectTo:u});if(d==="CALLBACK")return b.jsx(WO,{redirectTo:u});if(d==="SIGN_IN")return p?b.jsx(WU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):_?b.jsx(sw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):S?b.jsx(ow,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(QU,{className:e,classNames:t,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(YU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(sw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(ow,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(qU,{className:e,classNames:t,localization:o,isSubmitting:a,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(KU,{className:e,classNames:t,localization:o});if(d==="SIGN_UP")return C&&b.jsx(ZU,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h})}function JU({className:e,classNames:t,localization:n}){const{localization:a,redirectTo:o,replace:l,toast:u}=E.useContext(Ze),d=E.useMemo(()=>({...a,...n}),[a,n]),{data:f}=tU(),[h,g]=E.useState(null);return E.useEffect(()=>{const p=Do("invitationId");if(!p){u({variant:"error",message:d.INVITATION_NOT_FOUND}),l(o);return}g(p)},[d.INVITATION_NOT_FOUND,u,l,o]),!f||!h?b.jsx(JO,{className:e,classNames:t}):b.jsx(eB,{className:e,classNames:t,localization:d,invitationId:h})}function eB({className:e,classNames:t,localization:n,invitationId:a}){var o;const{authClient:l,hooks:{useInvitation:u},localization:d,organization:f,redirectTo:h,replace:g,toast:p,localizeErrors:y}=E.useContext(Ze),_=E.useMemo(()=>({...d,...n}),[d,n]),[S,w]=E.useState(!1),[T,R]=E.useState(!1),A=S||T,{data:C,isPending:O}=u({query:{id:a}}),N=E.useCallback(()=>Do("redirectTo")||h,[h]);E.useEffect(()=>{if(!(O||!a)){if(!C){p({variant:"error",message:_.INVITATION_NOT_FOUND}),g(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}),g(h))}},[C,O,a,_,p,g,h]);const L=async()=>{R(!0);try{await l.organization.acceptInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),g(N())}catch(Y){p({variant:"error",message:$t({error:Y,localization:_,localizeErrors:y})}),R(!1)}},I=async()=>{w(!0);try{await l.organization.rejectInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),g(h)}catch(Y){p({variant:"error",message:$t({error:Y,localization:_,localizeErrors:y})}),w(!1)}},Z=((o=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find(Y=>Y.role===C?.role))==null?void 0:o.label)||C?.role;return C?b.jsxs(No,{className:pe("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:pe("justify-items-center text-center",t?.header),children:[b.jsx(E0,{className:pe("text-lg md:text-xl",t?.title),children:_.ACCEPT_INVITATION}),b.jsx(Gf,{className:pe("text-xs md:text-sm",t?.description),children:_.ACCEPT_INVITATION_DESCRIPTION})]}),b.jsxs(qf,{className:pe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(No,{className:pe("flex-row items-center p-4"),children:[b.jsx(YO,{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:Z})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsxs(Lt,{variant:"outline",className:pe(t?.button,t?.outlineButton),onClick:I,disabled:A,children:[S?b.jsx(Tn,{className:"animate-spin"}):b.jsx(Ax,{}),_.REJECT]}),b.jsxs(Lt,{className:pe(t?.button,t?.primaryButton),onClick:L,disabled:A,children:[T?b.jsx(Tn,{className:"animate-spin"}):b.jsx(Lv,{}),_.ACCEPT]})]})]})]}):b.jsx(JO,{className:e,classNames:t})}var JO=({className:e,classNames:t,localization:n})=>b.jsxs(No,{className:pe("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:pe("justify-items-center",t?.header),children:[b.jsx(vr,{className:pe("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),b.jsx(vr,{className:pe("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),b.jsxs(qf,{className:pe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(No,{className:pe("flex-row items-center p-4"),children:[b.jsx(YO,{isPending:!0,localization:n}),b.jsx(vr,{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(vr,{className:"h-9 w-full"}),b.jsx(vr,{className:"h-9 w-full"})]})]})]});function lw({className:e,orientation:t="horizontal",decorative:n=!0,...a}){return b.jsx(eU,{"data-slot":"separator",decorative:n,orientation:t,className:pe("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),...a})}function tB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g}=E.useContext(Ze);return b.jsxs(Lt,{className:pe("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="EMAIL_OTP"?f.SIGN_IN:f.EMAIL_OTP}${window.location.search}`),children:[a==="EMAIL_OTP"?b.jsx(Ox,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Tx,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function nB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g,credentials:p}=E.useContext(Ze);return b.jsxs(Lt,{className:pe("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="MAGIC_LINK"||!p?f.SIGN_IN:f.MAGIC_LINK}${window.location.search}`),children:[a==="MAGIC_LINK"?b.jsx(Ox,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Tx,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function rB({localization:e,redirectTo:t}){const{authClient:n,localization:a,toast:o,localizeErrors:l}=E.useContext(Ze),u=E.useRef(!1);e=E.useMemo(()=>({...a,...e}),[a,e]);const{onSuccess:d}=Ja({redirectTo:t});return E.useEffect(()=>{if(!u.current){u.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:d}})}catch(f){o({variant:"error",message:$t({error:f,localization:e,localizeErrors:l})})}}},[n,e,l,d,o]),null}function aB({classNames:e,isSubmitting:t,localization:n,redirectTo:a,setIsSubmitting:o}){var l,u;const{authClient:d,localization:f,toast:h,localizeErrors:g}=E.useContext(Ze);n={...f,...n};const{onSuccess:p}=Ja({redirectTo:a}),y=async()=>{o?.(!0);try{const _=await d.signIn.passkey({fetchOptions:{throw:!0}});_?.error?(h({variant:"error",message:$t({error:_.error,localization:n,localizeErrors:g})}),o?.(!1)):p()}catch(_){h({variant:"error",message:$t({error:_,localization:n,localizeErrors:g})}),o?.(!1)}};return b.jsxs(Lt,{className:pe("w-full",(l=e?.form)==null?void 0:l.button,(u=e?.form)==null?void 0:u.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:y,children:[b.jsx(bI,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function cw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,other:l,provider:u,redirectTo:d,socialLayout:f,setIsSubmitting:h}){var g,p,y,_;const{authClient:S,basePath:w,baseURL:T,persistClient:R,redirectTo:A,viewPaths:C,social:O,genericOAuth:N,toast:L,localizeErrors:I}=E.useContext(Ze),D=E.useCallback(()=>d||Do("redirectTo")||A,[d,A]),B=E.useCallback(()=>`${T}${n||(R?`${w}/${C.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,w,C,T,D]),Z=async()=>{h(!0);try{if(l){const Y={providerId:u.provider,callbackURL:B(),fetchOptions:{throw:!0}};N?.signIn?(await N.signIn(Y),setTimeout(()=>{h(!1)},1e4)):await S.signIn.oauth2(Y)}else{const Y={provider:u.provider,callbackURL:B(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(Y),setTimeout(()=>{h(!1)},1e4)):await S.signIn.social(Y)}}catch(Y){L({variant:"error",message:$t({error:Y,localization:o,localizeErrors:I})}),h(!1)}};return b.jsxs(Lt,{className:pe(f==="vertical"?"w-full":"grow",e,(g=t?.form)==null?void 0:g.button,(p=t?.form)==null?void 0:p.outlineButton,(y=t?.form)==null?void 0:y.providerButton),disabled:a,variant:"outline",onClick:Z,children:[u.icon&&b.jsx(u.icon,{className:(_=t?.form)==null?void 0:_.icon}),f==="grid"&&u.name,f==="vertical"&&`${o.SIGN_IN_WITH} ${u.name}`]})}function Dz({className:e,classNames:t,callbackURL:n,cardHeader:a,cardFooter:o,localization:l,path:u,pathname:d,redirectTo:f,socialLayout:h="auto",view:g,otpSeparators:p=0}){var y,_,S,w,T,R;const A=Ka(),{basePath:C,credentials:O,localization:N,magicLink:L,emailOTP:I,oneTap:D,passkey:B,signUp:Z,social:Y,genericOAuth:V,viewPaths:z,Link:ie}=E.useContext(Ze);l={...N,...l};let ee=h;ee==="auto"&&(ee=O&&Y?.providers&&Y.providers.length>2?"horizontal":"vertical");const k=u??d?.split("/").pop(),F=g||Pg(z,k)||"SIGN_IN",[G,ae]=E.useState(!1);if(E.useEffect(()=>{const P=()=>ae(!1);return window.addEventListener("pagehide",P),()=>{ae(!1),window.removeEventListener("pagehide",P)}},[]),F==="CALLBACK")return b.jsx(WO,{redirectTo:f});if(F==="SIGN_OUT")return b.jsx(XO,{redirectTo:f});if(F==="ACCEPT_INVITATION")return b.jsx(JU,{className:e,classNames:t});const ve=!O&&!L&&!I?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${F}_DESCRIPTION`];return b.jsxs(No,{className:pe("w-full max-w-sm",e,t?.base),children:[b.jsx($f,{className:t?.header,children:a||b.jsxs(b.Fragment,{children:[b.jsx(E0,{className:pe("text-lg md:text-xl",t?.title),children:l[F]}),ve&&b.jsx(Gf,{className:pe("text-xs md:text-sm",t?.description),children:ve})]})}),b.jsxs(qf,{className:pe("grid gap-6",t?.content),children:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(F)&&b.jsx(rB,{localization:l,redirectTo:f}),(O||L||I)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(XU,{classNames:t?.form,callbackURL:n,isSubmitting:G,localization:l,otpSeparators:p,view:F,redirectTo:f,setIsSubmitting:ae}),L&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||I&&F==="EMAIL_OTP")&&b.jsx(nB,{classNames:t,localization:l,view:F,isSubmitting:G}),I&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||L&&["SIGN_IN","MAGIC_LINK"].includes(F))&&b.jsx(tB,{classNames:t,localization:l,view:F,isSubmitting:G})]}),F!=="RESET_PASSWORD"&&(((y=Y?.providers)==null?void 0:y.length)||((_=V?.providers)==null?void 0:_.length)||F==="SIGN_IN"&&B)&&b.jsxs(b.Fragment,{children:[(O||L||I)&&b.jsxs("div",{className:pe("flex items-center gap-2",t?.continueWith),children:[b.jsx(lw,{className:pe("!w-auto grow",t?.separator)}),b.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:l.OR_CONTINUE_WITH}),b.jsx(lw,{className:pe("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((S=Y?.providers)==null?void 0:S.length)||((w=V?.providers)==null?void 0:w.length))&&b.jsxs("div",{className:pe("flex w-full items-center justify-between gap-4",ee==="horizontal"&&"flex-wrap",ee==="vertical"&&"flex-col",ee==="grid"&&"grid grid-cols-2"),children:[(T=Y?.providers)==null?void 0:T.map(P=>{const Q=UU.find(te=>te.provider===P);return Q?b.jsx(cw,{classNames:t,callbackURL:n,isSubmitting:G,localization:l,provider:Q,redirectTo:f,setIsSubmitting:ae,socialLayout:ee},P):null}),(R=V?.providers)==null?void 0:R.map(P=>b.jsx(cw,{classNames:t,callbackURL:n,isSubmitting:G,localization:l,provider:P,redirectTo:f,setIsSubmitting:ae,socialLayout:ee,other:!0},P.provider))]}),B&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(F)&&b.jsx(aB,{classNames:t,isSubmitting:G,localization:l,redirectTo:f,setIsSubmitting:ae})]})]})]}),o&&b.jsx(cv,{className:t?.footer,children:o}),O&&Z&&b.jsxs(cv,{className:pe("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(oI,{className:"size-3"}),F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"||F==="SIGN_UP"?b.jsx(ie,{className:pe("text-foreground underline",t?.footerLink),href:`${C}/${z[F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${A?window.location.search:""}`,children:b.jsx(Lt,{variant:"link",size:"sm",className:pe("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(Lt,{variant:"link",size:"sm",className:pe("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:l.GO_BACK})]})]})}function Lz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{isPending:n}=t();return n?e:null}function Pz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{data:n}=t();return n?e:null}function kz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{data:n,isPending:a}=t();return!n&&!a?e:null}function iB(e){const t=Sf.c(8),{children:n}=e,a=Oc();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={basePath:"/",pathMode:"slug"},t[0]=o):o=t[0];let l,u;t[1]!==a?(l=f=>a({to:f}),u=f=>a({to:f,replace:!0}),t[1]=a,t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;return t[4]!==n||t[5]!==l||t[6]!==u?(d=b.jsx(JN,{authClient:_M,organization:o,navigate:l,replace:u,Link:oB,children:n}),t[4]=n,t[5]=l,t[6]=u,t[7]=d):d=t[7],d}function oB(e){const{href:t,className:n,children:a,...o}=e;return b.jsx(Rv,{to:t,className:n,...o,children:a})}const sB=new KC;function lB(e){const t=Sf.c(3),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=b.jsx(CN,{}),t[0]=a):a=t[0];let o;return t[1]!==n?(o=b.jsxs(ZC,{client:sB,children:[a,b.jsx(f4,{children:b.jsx(iB,{children:n})})]}),t[1]=n,t[2]=o):o=t[2],o}const cB=function(){return null};function uB(){const e=Sf.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 Bc=P3({component:()=>b.jsxs(lB,{children:[b.jsx(E.Suspense,{fallback:b.jsx(uB,{}),children:b.jsx(Vw,{})}),b.jsx(cB,{})]})}),dB=An({getParentRoute:()=>Bc,path:"/login",component:Ln(()=>Dn(()=>import("./login-BNugdJth.js"),__vite__mapDeps([0,1,2,3]))),validateSearch:Ks(()=>zn({next:Xe().optional(),client_id:Xe().optional(),redirect_uri:Xe().optional(),response_type:Xe().optional(),state:Xe().optional(),scope:Xe().optional(),code_challenge:Xe().optional(),code_challenge_method:Xe().optional()}))}),fB=An({getParentRoute:()=>Bc,path:"/auth/$pathname",component:Ln(()=>Dn(()=>import("./auth-catchall-CAFc22YR.js"),[]))}),Br=An({getParentRoute:()=>Bc,id:"shell",component:Ln(()=>Dn(()=>import("./shell-layout-BAThlowD.js"),__vite__mapDeps([4,5,2,6,7,8,1,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,3,25,26,27,28])))}),hB=An({getParentRoute:()=>Br,path:"/",component:Ln(()=>Dn(()=>import("./home-CkLLsx37.js"),__vite__mapDeps([29,18,2,27,7,1,3,22,23,24,25])))}),pB=An({getParentRoute:()=>Br,path:"/$org",component:Ln(()=>Dn(()=>import("./page-DkuwHgHg.js"),__vite__mapDeps([30,6,2,7,8,1,31,32,28,33,19,34,9,35,36,37,38])))}),mB=An({getParentRoute:()=>Br,path:"/$org/members",component:Ln(()=>Dn(()=>import("./members-z4wBZKYX.js"),__vite__mapDeps([39,31,32,1,2,28,8,7,33,40,3,41,42,6,43,14,44,45,13,27,37,23,20,46,5,19,24,16,18])))}),gB=An({getParentRoute:()=>Br,path:"/$org/mcps",component:Ln(()=>Dn(()=>import("./connections-B0k_3lJ6.js"),__vite__mapDeps([47,48,31,32,1,2,28,8,7,33,40,3,41,17,18,6,5,19,49,15,23,37,20,24,14,16,50]))),validateSearch:Ks(()=>zn({action:Nv(["create"]).optional()}))}),vB=An({getParentRoute:()=>Br,path:"/$org/settings",component:Ln(()=>Dn(()=>import("./settings-Cp1KZJA2.js"),__vite__mapDeps([51,31,32,1,2,28,8,7,33,24,3,52])))}),yB=An({getParentRoute:()=>Br,path:"/$org/monitoring",component:Ln(()=>Dn(()=>import("./monitoring-BoRkHos-.js"),__vite__mapDeps([53,6,2,7,8,1,31,32,28,33,40,3,5,19,35,36,37,9,44,34,43,14,54,26]))),validateSearch:Ks(()=>zn({from:Xe().default("now-24h"),to:Xe().default("now"),connectionId:AE(Xe()).optional().default([]),gatewayId:AE(Xe()).optional().default([]),tool:Xe().default(""),status:Nv(["all","success","errors"]).default("all"),search:Xe().default(""),page:Ex().optional(),streaming:Mv().default(!0)}))}),eT=An({getParentRoute:()=>Br,path:"/$org/store",component:Ln(()=>Dn(()=>import("./store-CSHMTNbU.js"),__vite__mapDeps([55,45,31,32,1,2,28,8,7,6,56,40,3,18,57,58,14,17,5,10,11,12,13])))}),bB=An({getParentRoute:()=>eT,path:"/$appName",component:Ln(()=>Dn(()=>import("./store-app-detail-DrtrpMu_.js"),__vite__mapDeps([59,7,2,1,6,8,28,5,60,13,57,32,40,3,41,18,61,37,62,10,11,34,63,64,50,56,58]))),validateSearch:Ks(()=>zn({registryId:Xe().optional(),serverName:Xe().optional(),itemId:Xe().optional()}))}),_B=An({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId",component:Ln(()=>Dn(()=>import("./connection-detail-CIXniRq_.js"),__vite__mapDeps([65,5,2,19,1,6,7,8,10,11,66,67,21,34,61,24,3,14,9,68,64,57,50,36,54,48,60,13,32,28,40,41,18,37,62,49,15,23]))),validateSearch:Ks(()=>zn({tab:Xe().optional()}))}),EB=An({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:Ln(()=>Dn(()=>import("./collection-detail-CFgy96Yw.js"),__vite__mapDeps([69,6,2,7,8,1,42,43,14,40,3,37,25,16,66,67,11,21,5,19,10,34,61,24,9,68,64,57,50,36,54,48,52,63,13,70])))}),SB=An({getParentRoute:()=>Br,path:"/$org/gateways",component:Ln(()=>Dn(()=>import("./gateways-BG4qNJPZ.js"),__vite__mapDeps([71,31,32,1,2,28,8,7,33,40,3,41,17,18,6,5,19,9,49,15,23,37]))),validateSearch:Ks(()=>zn({action:Nv(["create"]).optional()}))}),wB=An({getParentRoute:()=>Br,path:"/$org/gateways/$gatewayId",component:Ln(()=>Dn(()=>import("./gateway-detail-ht9jY5Da.js"),__vite__mapDeps([72,5,2,19,1,6,7,8,42,43,14,40,3,9,46,24,56,61,68])))}),xB=An({getParentRoute:()=>Bc,path:"/oauth/callback",component:Ln(()=>Dn(()=>import("./oauth-callback-z3iCI-Fn.js"),__vite__mapDeps([73,18,2,7,67,11,70])))}),RB=eT.addChildren([bB]),OB=Br.addChildren([hB,pB,mB,gB,SB,wB,yB,RB,vB,_B,EB]),TB=Bc.addChildren([OB,dB,fB,xB]),AB=$3({routeTree:TB}),CB=document.getElementById("root");wC.createRoot(CB).render(b.jsx(E.StrictMode,{children:b.jsx(Y3,{router:AB})}));export{Vx as $,Dz as A,vz as B,oz as C,XB as D,ZB as E,rz as F,iz as G,Yx as H,yz as I,bz as J,fD as K,gD as L,pD as M,PB as N,uz as O,dz as P,lz as Q,cz as R,uB as S,fz as T,hz as U,$x as V,Ws as W,Io as X,Nz as Y,ze as Z,vD as _,_M as a,yP as a$,Xr as a0,WC as a1,u4 as a2,c4 as a3,Dn as a4,Oc as a5,NE as a6,eU as a7,GL as a8,ZL as a9,OR as aA,CP as aB,LB as aC,ax as aD,AE as aE,qB as aF,Mv as aG,ik as aH,ok as aI,ak as aJ,qL as aK,Ax as aL,fn as aM,Qa as aN,Qr as aO,FR as aP,ZR as aQ,Ui as aR,gP as aS,qv as aT,lR as aU,Yv as aV,bc as aW,Jx as aX,Gv as aY,$v as aZ,vP as a_,Rz as aa,WL as ab,YL as ac,Oz as ad,KL as ae,oD as af,Fx as ag,Ze as ah,bU as ai,Iz as aj,Lz as ak,Pz as al,kz as am,uv as an,Vw as ao,zn as ap,Xe as aq,Za as ar,Wa as as,Cc as at,jt as au,Ge as av,H as aw,Lo as ax,XR as ay,MP as az,xv as b,Tz as b$,MB as b0,jw as b1,Tf as b2,$i as b3,$a as b4,FC as b5,k_ as b6,IB as b7,NB as b8,l4 as b9,RR as bA,Nv as bB,FB as bC,Pc as bD,Ac as bE,YB as bF,BB as bG,zB as bH,HB as bI,Ex as bJ,VB as bK,GB as bL,Ks as bM,jB as bN,UB as bO,kB as bP,wz as bQ,xz as bR,Sz as bS,V7 as bT,H7 as bU,$7 as bV,G7 as bW,q7 as bX,Az as bY,Cz as bZ,Mz as b_,a4 as ba,er as bb,oI as bc,tr as bd,Cn as be,Rc as bf,On as bg,vg as bh,fw as bi,QC as bj,e4 as bk,i4 as bl,t4 as bm,n4 as bn,Xn as bo,s4 as bp,j_ as bq,o4 as br,r4 as bs,Rv as bt,l6 as bu,K2 as bv,Z2 as bw,W7 as bx,Ek as by,BR as bz,Sf as c,PI as c0,UI as c1,Cf as c2,zv as c3,fc as c4,GC as c5,LC as c6,Tn as c7,KB as c8,$B as c9,Ee as ca,WB as cb,wv as d,az as e,JB as f,gz as g,sz as h,ez as i,b as j,dD as k,Nf as l,Mf as m,QB as n,lD as o,mz as p,nz as q,E as r,uD as s,tS as t,DB as u,tz as v,Hx as w,_z as x,Ez as y,pz as z};
|
|
118
|
+
`}),b.jsx(A9,{ref:e,sitekey:t.siteKey,theme:n,hl:a,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:pe(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${a}-${t.provider}`)]}):null}var HU=["/sign-up/email","/sign-in/email","/forget-password"];function Uc({ref:e,localization:t,action:n}){const{captcha:a}=E.useContext(Ze);if(!a||n&&!(a.endpoints||HU).includes(n))return null;const{theme:o}=Dv(),l=a.provider==="google-recaptcha-v2-checkbox"||a.provider==="google-recaptcha-v2-invisible",u=a.provider==="google-recaptcha-v3"||a.provider==="google-recaptcha-v2-invisible",d=a.provider==="cloudflare-turnstile",f=a.provider==="hcaptcha",h=a.provider==="captchafox";return b.jsxs(b.Fragment,{children:[l&&b.jsx(VU,{ref:e}),u&&b.jsx(FU,{localization:t}),d&&b.jsx(TO,{className:"mx-auto",ref:e,siteKey:a.siteKey,options:{theme:o,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(t9,{ref:e,sitekey:a.siteKey,theme:o})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(vO,{ref:e,sitekey:a.siteKey,theme:o})})]})}function ZO({className:e,containerClassName:t,...n}){return b.jsx(IO,{"data-slot":"input-otp",containerClassName:pe("flex items-center gap-2 has-disabled:opacity-50",t),className:pe("disabled:cursor-not-allowed",e),...n})}function Cs({className:e,...t}){return b.jsx("div",{"data-slot":"input-otp-group",className:pe("flex items-center",e),...t})}function mn({index:e,className:t,...n}){const a=E.useContext(NO),{char:o,hasFakeCaret:l,isActive:u}=a?.slots[e]??{};return b.jsxs("div",{"data-slot":"input-otp-slot","data-active":u,className:pe("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:[o,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 mg({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(xI,{})})}function QO({otpSeparators:e=0}){return e===0?b.jsxs(Cs,{children:[b.jsx(mn,{index:0}),b.jsx(mn,{index:1}),b.jsx(mn,{index:2}),b.jsx(mn,{index:3}),b.jsx(mn,{index:4}),b.jsx(mn,{index:5})]}):e===1?b.jsxs(b.Fragment,{children:[b.jsxs(Cs,{children:[b.jsx(mn,{index:0}),b.jsx(mn,{index:1}),b.jsx(mn,{index:2})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(mn,{index:3}),b.jsx(mn,{index:4}),b.jsx(mn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(Cs,{children:[b.jsx(mn,{index:0}),b.jsx(mn,{index:1})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(mn,{index:2}),b.jsx(mn,{index:3})]}),b.jsx(mg,{}),b.jsxs(Cs,{children:[b.jsx(mn,{index:4}),b.jsx(mn,{index:5})]})]})}function ow(e){const[t,n]=E.useState();return t?b.jsx(GU,{...e,email:t}):b.jsx($U,{...e,setEmail:n})}function $U({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o,setEmail:l}){const u=Ka(),{captchaRef:d,getCaptchaHeaders:f}=jc({localization:a}),{authClient:h,localization:g,toast:p,localizeErrors:y}=E.useContext(Ze);a={...g,...a};const _=zn({email:Xe().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),S=Wa({resolver:Za(_),defaultValues:{email:""}});n=n||S.formState.isSubmitting,E.useEffect(()=>{o?.(S.formState.isSubmitting)},[S.formState.isSubmitting,o]);async function w({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:a.EMAIL_OTP_VERIFICATION_SENT}),l(T)}catch(A){p({variant:"error",message:$t({error:A,localization:a,localizeErrors:y})})}}return b.jsx(Xa,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(w),noValidate:u,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:S.control,name:"email",render:({field:T})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...T})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Uc,{ref:d,localization:a,action:"/email-otp/send-verification-otp"}),b.jsx(Lt,{type:"submit",disabled:n,className:pe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.EMAIL_OTP_SEND_ACTION})]})})}function GU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u,email:d}){const{authClient:f,localization:h,toast:g,localizeErrors:p}=E.useContext(Ze);a={...h,...a};const{onSuccess:y,isPending:_}=Ja({redirectTo:l}),S=zn({code:Xe().min(1,{message:`${a.EMAIL_OTP} ${a.IS_REQUIRED}`}).min(6,{message:`${a.EMAIL_OTP} ${a.IS_INVALID}`})}),w=Wa({resolver:Za(S),defaultValues:{code:""}});n=n||w.formState.isSubmitting||_,E.useEffect(()=>{u?.(w.formState.isSubmitting||_)},[w.formState.isSubmitting,_,u]);async function T({code:R}){try{await f.signIn.emailOtp({email:d,otp:R,fetchOptions:{throw:!0}}),await y()}catch(A){g({variant:"error",message:$t({error:A,localization:a,localizeErrors:p})}),w.reset()}}return b.jsx(Xa,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(T),className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:w.control,name:"code",render:({field:R})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.EMAIL_OTP}),b.jsx(dn,{children:b.jsx(ZO,{...R,maxLength:6,onChange:A=>{R.onChange(A),A.length===6&&w.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(QO,{otpSeparators:o})})}),b.jsx(bn,{className:t?.error})]})}),b.jsx("div",{className:"grid gap-4",children:b.jsxs(Lt,{type:"submit",disabled:n,className:pe(t?.button,t?.primaryButton),children:[n&&b.jsx(Tn,{className:"animate-spin"}),a.EMAIL_OTP_VERIFY_ACTION]})})]})})}function qU({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o}){const l=Ka(),{captchaRef:u,getCaptchaHeaders:d,resetCaptcha:f}=jc({localization:a}),{authClient:h,basePath:g,baseURL:p,localization:y,navigate:_,toast:S,viewPaths:w,localizeErrors:T}=E.useContext(Ze);a={...y,...a};const R=zn({email:Xe().email({message:`${a.EMAIL} ${a.IS_INVALID}`}).min(1,{message:`${a.EMAIL} ${a.IS_REQUIRED}`})}),A=Wa({resolver:Za(R),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{o?.(A.formState.isSubmitting)},[A.formState.isSubmitting,o]);async function C({email:O}){try{const N={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:O,redirectTo:`${p}${g}/${w.RESET_PASSWORD}`,fetchOptions:N}),S({variant:"success",message:a.FORGOT_PASSWORD_EMAIL}),_(`${g}/${w.SIGN_IN}${window.location.search}`)}catch(N){S({variant:"error",message:$t({error:N,localization:a,localizeErrors:T})}),f()}}return b.jsx(Xa,{...A,children:b.jsxs("form",{onSubmit:A.handleSubmit(C),noValidate:l,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:A.control,name:"email",render:({field:O})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...O})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Uc,{ref:u,localization:a,action:"/forget-password"}),b.jsx(Lt,{type:"submit",disabled:n,className:pe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.FORGOT_PASSWORD_ACTION})]})})}function sw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u}){const d=Ka(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:o}),{authClient:p,basePath:y,baseURL:_,persistClient:S,localization:w,redirectTo:T,viewPaths:R,toast:A,localizeErrors:C}=E.useContext(Ze);o={...w,...o};const O=E.useCallback(()=>l||Do("redirectTo")||T,[l,T]),N=E.useCallback(()=>`${_}${n||(S?`${y}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,S,y,R,_,O]),L=zn({email:Xe().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),I=Wa({resolver:Za(L),defaultValues:{email:""}});a=a||I.formState.isSubmitting,E.useEffect(()=>{u?.(I.formState.isSubmitting)},[I.formState.isSubmitting,u]);async function D({email:B}){try{const Z={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:B,callbackURL:N(),fetchOptions:Z}),A({variant:"success",message:o.MAGIC_LINK_EMAIL}),I.reset()}catch(Z){A({variant:"error",message:$t({error:Z,localization:o,localizeErrors:C})}),g()}}return b.jsx(Xa,{...I,children:b.jsxs("form",{onSubmit:I.handleSubmit(D),noValidate:d,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:I.control,name:"email",render:({field:B})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...B})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Uc,{ref:f,localization:o,action:"/sign-in/magic-link"}),b.jsx(Lt,{type:"submit",disabled:a,className:pe("w-full",t?.button,t?.primaryButton),children:a?b.jsx(Tn,{className:"animate-spin"}):o.MAGIC_LINK_ACTION})]})})}function YU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l}){const{authClient:u,localization:d,toast:f,localizeErrors:h}=E.useContext(Ze);a={...d,...a};const{onSuccess:g,isPending:p}=Ja({redirectTo:o}),y=zn({code:Xe().min(1,{message:a.BACKUP_CODE_REQUIRED})}),_=Wa({resolver:Za(y),defaultValues:{code:""}});n=n||_.formState.isSubmitting||p,E.useEffect(()=>{l?.(_.formState.isSubmitting||p)},[_.formState.isSubmitting,p,l]);async function S({code:w}){try{await u.twoFactor.verifyBackupCode({code:w,fetchOptions:{throw:!0}}),await g()}catch(T){f({variant:"error",message:$t({error:T,localization:a,localizeErrors:h})}),_.reset()}}return b.jsx(Xa,{..._,children:b.jsxs("form",{onSubmit:_.handleSubmit(S),className:pe("grid gap-6",e,t?.base),children:[b.jsx(tn,{control:_.control,name:"code",render:({field:w})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:a.BACKUP_CODE}),b.jsx(dn,{children:b.jsx(Zr,{placeholder:a.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...w})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Lt,{type:"submit",disabled:n,className:pe(t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.RECOVER_ACCOUNT_ACTION})]})})}function KU({className:e,classNames:t,localization:n,passwordValidation:a}){const o=E.useRef(!1),{authClient:l,basePath:u,credentials:d,localization:f,viewPaths:h,navigate:g,toast:p,localizeErrors:y}=E.useContext(Ze),_=d?.confirmPassword,S=d?.passwordValidation;n={...f,...n},a={...S,...a};const w=zn({newPassword:vc(a,{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:_?vc(a,{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}):Xe().optional()}).refine(C=>!_||C.newPassword===C.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),T=Wa({resolver:Za(w),defaultValues:{newPassword:"",confirmPassword:""}}),R=T.formState.isSubmitting;E.useEffect(()=>{if(o.current)return;o.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(g(`${u}/${h.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[u,g,p,h,n]);async function A({newPassword:C}){try{const N=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:N,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),g(`${u}/${h.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:$t({error:O,localization:n,localizeErrors:y})}),T.reset()}}return b.jsx(Xa,{...T,children:b.jsxs("form",{onSubmit:T.handleSubmit(A),className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:T.control,name:"newPassword",render:({field:C})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:n.NEW_PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(bn,{className:t?.error})]})}),_&&b.jsx(tn,{control:T.control,name:"confirmPassword",render:({field:C})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:n.CONFIRM_PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(Lt,{type:"submit",disabled:R,className:pe("w-full",t?.button,t?.primaryButton),children:R?b.jsx(Tn,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function WU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l,passwordValidation:u}){const d=Ka(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:a}),{authClient:p,basePath:y,credentials:_,localization:S,viewPaths:w,navigate:T,toast:R,Link:A,localizeErrors:C}=E.useContext(Ze),O=_?.rememberMe,N=_?.username,L=_?.passwordValidation;a={...S,...a},u={...L,...u};const{onSuccess:I,isPending:D}=Ja({redirectTo:o}),B=zn({email:N?Xe().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):Xe().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:vc(u,a),rememberMe:Mv().optional()}),Z=Wa({resolver:Za(B),defaultValues:{email:"",password:"",rememberMe:!O}});n=n||Z.formState.isSubmitting||D,E.useEffect(()=>{l?.(Z.formState.isSubmitting||D)},[Z.formState.isSubmitting,D,l]);async function Y({email:V,password:z,rememberMe:ie}){try{let ee={};if(N&&!k6(V)){const k={throw:!0,headers:await h("/sign-in/username")};ee=await p.signIn.username({username:V,password:z,rememberMe:ie,fetchOptions:k})}else{const k={throw:!0,headers:await h("/sign-in/email")};ee=await p.signIn.email({email:V,password:z,rememberMe:ie,fetchOptions:k})}ee.twoFactorRedirect?T(`${y}/${w.TWO_FACTOR}${window.location.search}`):await I()}catch(ee){Z.resetField("password"),g(),R({variant:"error",message:$t({error:ee,localization:a,localizeErrors:C})})}}return b.jsx(Xa,{...Z,children:b.jsxs("form",{onSubmit:Z.handleSubmit(Y),noValidate:d,className:pe("grid w-full gap-6",e,t?.base),children:[b.jsx(tn,{control:Z.control,name:"email",render:({field:V})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:N?a.USERNAME:a.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:N?"username":"email",className:t?.input,type:N?"text":"email",placeholder:N?a.SIGN_IN_USERNAME_PLACEHOLDER:a.EMAIL_PLACEHOLDER,disabled:n,...V})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:Z.control,name:"password",render:({field:V})=>b.jsxs(nn,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(rn,{className:t?.label,children:a.PASSWORD}),_?.forgotPassword&&b.jsx(A,{className:pe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${w.FORGOT_PASSWORD}${d?window.location.search:""}`,children:a.FORGOT_PASSWORD_LINK})]}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"current-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:n,...V})}),b.jsx(bn,{className:t?.error})]})}),O&&b.jsx(tn,{control:Z.control,name:"rememberMe",render:({field:V})=>b.jsxs(nn,{className:"flex",children:[b.jsx(dn,{children:b.jsx(w0,{checked:V.value,onCheckedChange:V.onChange,disabled:n})}),b.jsx(rn,{children:a.REMEMBER_ME})]})}),b.jsx(Uc,{ref:f,localization:a,action:"/sign-in/email"}),b.jsx(Lt,{type:"submit",disabled:n,className:pe("w-full",t?.button,t?.primaryButton),children:n?b.jsx(Tn,{className:"animate-spin"}):a.SIGN_IN_ACTION})]})})}function ZU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u,passwordValidation:d}){const f=Ka(),{captchaRef:h,getCaptchaHeaders:g,resetCaptcha:p}=jc({localization:o}),{additionalFields:y,authClient:_,basePath:S,baseURL:w,credentials:T,localization:R,nameRequired:A,persistClient:C,redirectTo:O,signUp:N,viewPaths:L,navigate:I,toast:D,avatar:B,localizeErrors:Z}=E.useContext(Ze),Y=T?.confirmPassword,V=T?.username,z=T?.usernameRequired??!0,ie=T?.passwordValidation,ee=N?.fields;o={...R,...o},d={...ie,...d};const k=E.useRef(null),[F,G]=E.useState(null),[ae,ve]=E.useState(!1),P=E.useCallback(()=>l||Do("redirectTo")||O,[l,O]),Q=E.useCallback(()=>`${w}${n||(C?`${S}/${L.CALLBACK}?redirectTo=${encodeURIComponent(P())}`:P())}`,[n,C,S,L,w,P]),{onSuccess:te,isPending:se}=Ja({redirectTo:l}),ge={email:Xe().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:vc(d,o),name:ee?.includes("name")&&A?Xe().min(1,{message:`${o.NAME} ${o.IS_REQUIRED}`}):Xe().optional(),image:Xe().optional(),username:V&&z?Xe().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):Xe().optional(),confirmPassword:Y?vc(d,{PASSWORD_REQUIRED:o.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:o.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:o.PASSWORD_TOO_LONG,INVALID_PASSWORD:o.INVALID_PASSWORD}):Xe().optional()},_e={};if(ee)for(const re of ee){if(re==="name"||re==="image")continue;const be=y?.[re];if(!be)continue;let Le;be.type==="number"?Le=be.required?P6(Ye=>Ye?Number(Ye):void 0,Ex({message:`${be.label} ${o.IS_INVALID}`})):Dm.number({message:`${be.label} ${o.IS_INVALID}`}).optional():be.type==="boolean"?Le=be.required?Dm.boolean({message:`${be.label} ${o.IS_INVALID}`}).refine(Ye=>Ye===!0,{message:`${be.label} ${o.IS_REQUIRED}`}):Dm.boolean({message:`${be.label} ${o.IS_INVALID}`}).optional():Le=be.required?Xe().min(1,`${be.label} ${o.IS_REQUIRED}`):Xe().optional(),_e[re]=Le}const ye=zn(ge).extend(_e).refine(re=>Y?re.password===re.confirmPassword:!0,{message:o.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Se={email:"",password:"",...Y&&{confirmPassword:""},...ee?.includes("name")?{name:""}:{},...V?{username:""}:{},...ee?.includes("image")&&B?{image:""}:{}};if(ee)for(const re of ee){if(re==="name"||re==="image")continue;const be=y?.[re];be&&(Se[re]=be.type==="boolean"?!1:"")}const le=Wa({resolver:Za(ye),defaultValues:Se});a=a||le.formState.isSubmitting||se,E.useEffect(()=>{u?.(le.formState.isSubmitting||se)},[le.formState.isSubmitting,se,u]);const je=async re=>{if(B){ve(!0);try{const be=await sU(re,crypto.randomUUID(),B.size,B.extension);let Le;B.upload?Le=await B.upload(be):Le=await cU(be),Le?(G(Le),le.setValue("image",Le)):(G(null),le.setValue("image",""))}catch(be){console.error(be),D({variant:"error",message:$t({error:be,localization:o,localizeErrors:Z})})}ve(!1)}},at=()=>{G(null),le.setValue("image","")},Je=()=>{var re;return(re=k.current)==null?void 0:re.click()};async function Ft({email:re,password:be,name:Le,username:Ye,confirmPassword:At,image:Ue,...et}){try{for(const[de,me]of Object.entries(et)){const he=y?.[de];if(he?.validate&&typeof me=="string"&&!await he.validate(me)){le.setError(de,{message:`${he.label} ${o.IS_INVALID}`});return}}const j={throw:!0,headers:await g("/sign-up/email")},q={};Ye!==void 0&&(!z&&(Ye===null||Ye===""||typeof Ye=="string"&&Ye.trim()==="")||(q.username=Ye)),Ue!==void 0&&(q.image=Ue);const W=await _.signUp.email({email:re,password:be,name:Le||"",...q,...et,callbackURL:Q(),fetchOptions:j});"token"in W&&W.token?await te():(I(`${S}/${L.SIGN_IN}${window.location.search}`),D({variant:"success",message:o.SIGN_UP_EMAIL}))}catch(j){D({variant:"error",message:$t({error:j,localization:o,localizeErrors:Z})}),le.resetField("password"),le.resetField("confirmPassword"),p()}}return b.jsx(Xa,{...le,children:b.jsxs("form",{onSubmit:le.handleSubmit(Ft),noValidate:f,className:pe("grid w-full gap-6",e,t?.base),children:[ee?.includes("image")&&B&&b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:k,accept:"image/*",disabled:ae,hidden:!0,type:"file",onChange:re=>{var be;const Le=(be=re.target.files)==null?void 0:be.item(0);Le&&je(Le),re.target.value=""}}),b.jsx(tn,{control:le.control,name:"image",render:()=>b.jsxs(nn,{children:[b.jsx(rn,{children:o.AVATAR}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs(UO,{children:[b.jsx(BO,{asChild:!0,children:b.jsx(Lt,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx(KO,{isPending:ae,className:"size-16",user:F?{name:le.watch("name"),email:le.watch("email"),image:F}:null,localization:o})})}),b.jsxs(zO,{align:"start",onCloseAutoFocus:re=>re.preventDefault(),children:[b.jsxs(Ef,{onClick:Je,disabled:ae,children:[b.jsx(dI,{}),o.UPLOAD_AVATAR]}),F&&b.jsxs(Ef,{onClick:at,disabled:ae,variant:"destructive",children:[b.jsx(CI,{}),o.DELETE_AVATAR]})]})]}),b.jsxs(Lt,{type:"button",variant:"outline",onClick:Je,disabled:ae,children:[ae&&b.jsx(Tn,{className:"animate-spin"}),o.UPLOAD]})]}),b.jsx(bn,{})]})})]}),ee?.includes("name")&&b.jsx(tn,{control:le.control,name:"name",render:({field:re})=>b.jsxs(nn,{children:[b.jsxs(rn,{className:t?.label,children:[o.NAME,!A&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:"name",className:t?.input,placeholder:o.NAME_PLACEHOLDER,disabled:a,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),V&&b.jsx(tn,{control:le.control,name:"username",render:({field:re})=>b.jsxs(nn,{children:[b.jsxs(rn,{className:t?.label,children:[o.USERNAME,!z&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:"username",className:t?.input,placeholder:o.USERNAME_PLACEHOLDER,disabled:a,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:le.control,name:"email",render:({field:re})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.EMAIL}),b.jsx(dn,{children:b.jsx(Zr,{autoComplete:"email",className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:le.control,name:"password",render:({field:re})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),Y&&b.jsx(tn,{control:le.control,name:"confirmPassword",render:({field:re})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:o.CONFIRM_PASSWORD}),b.jsx(dn,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.CONFIRM_PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...re,value:re.value})}),b.jsx(bn,{className:t?.error})]})}),ee?.filter(re=>re!=="name"&&re!=="image").map(re=>{const be=y?.[re];return be?be.type==="boolean"?b.jsx(tn,{control:le.control,name:re,render:({field:Le})=>b.jsxs(nn,{className:"flex",children:[b.jsx(dn,{children:b.jsx(w0,{checked:Le.value,onCheckedChange:Le.onChange,disabled:a})}),b.jsx(rn,{className:t?.label,children:be.label}),b.jsx(bn,{className:t?.error})]})},re):b.jsx(tn,{control:le.control,name:re,render:({field:Le})=>b.jsxs(nn,{children:[b.jsx(rn,{className:t?.label,children:be.label}),b.jsx(dn,{children:be.type==="number"?b.jsx(Zr,{className:t?.input,type:"number",placeholder:be.placeholder||(typeof be.label=="string"?be.label:""),disabled:a,...Le,value:Le.value}):be.multiline?b.jsx(pU,{className:t?.input,placeholder:be.placeholder||(typeof be.label=="string"?be.label:""),disabled:a,...Le,value:Le.value}):b.jsx(Zr,{className:t?.input,type:"text",placeholder:be.placeholder||(typeof be.label=="string"?be.label:""),disabled:a,...Le,value:Le.value})}),b.jsx(bn,{className:t?.error})]})},re):(console.error(`Additional field ${re} not found`),null)}),b.jsx(Uc,{ref:h,localization:o,action:"/sign-up/email"}),b.jsx(Lt,{type:"submit",disabled:a,className:pe("w-full",t?.button,t?.primaryButton),children:a?b.jsx(Tn,{className:"animate-spin"}):o.SIGN_UP_ACTION})]})})}function QU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u}){var d;const f=Ka(),h=f?Do("totpURI"):null,g=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:S,twoFactor:w,viewPaths:T,toast:R,Link:A,localizeErrors:C}=E.useContext(Ze);a={...S,...a};const{onSuccess:O,isPending:N}=Ja({redirectTo:l}),{data:L}=_(),I=(d=L?.user)==null?void 0:d.twoFactorEnabled,[D,B]=E.useState(w?.length===1?w[0]:null),[Z,Y]=E.useState(!1),[V,z]=E.useState(0),ie=zn({code:Xe().min(1,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_REQUIRED}`}).min(6,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_INVALID}`}),trustDevice:Mv().optional()}),ee=Wa({resolver:Za(ie),defaultValues:{code:""}});n=n||ee.formState.isSubmitting||N,E.useEffect(()=>{u?.(ee.formState.isSubmitting||N)},[ee.formState.isSubmitting,N,u]),E.useEffect(()=>{D==="otp"&&V<=0&&!g.current&&(g.current=!0,k())},[D]),E.useEffect(()=>{if(V<=0)return;const G=setTimeout(()=>{z(ae=>ae-1)},1e3);return()=>clearTimeout(G)},[V]);const k=async()=>{if(!(Z||V>0)){try{Y(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),z(60)}catch(G){R({variant:"error",message:$t({error:G,localization:a,localizeErrors:C})}),G.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}g.current=!1,Y(!1)}};async function F({code:G,trustDevice:ae}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:G,trustDevice:ae,fetchOptions:{throw:!0}}),await O(),L&&!I&&R({variant:"success",message:a?.TWO_FACTOR_ENABLED})}catch(ve){R({variant:"error",message:$t({error:ve,localization:a,localizeErrors:C})}),ee.reset()}}return b.jsx(Xa,{...ee,children:b.jsxs("form",{onSubmit:ee.handleSubmit(F),className:pe("grid w-full gap-6",e,t?.base),children:[w?.includes("totp")&&h&&D==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx(FO,{className:t?.label,children:a.TWO_FACTOR_TOTP_LABEL}),b.jsx(Z9,{className:pe("border shadow-xs",t?.qrCode),value:h})]}),D!==null&&b.jsxs(b.Fragment,{children:[b.jsx(tn,{control:ee.control,name:"code",render:({field:G})=>b.jsxs(nn,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(rn,{className:t?.label,children:a.ONE_TIME_PASSWORD}),b.jsx(A,{className:pe("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${T.RECOVER_ACCOUNT}${f?window.location.search:""}`,children:a.FORGOT_AUTHENTICATOR})]}),b.jsx(dn,{children:b.jsx(ZO,{...G,maxLength:6,onChange:ae=>{G.onChange(ae),ae.length===6&&ee.handleSubmit(F)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(QO,{otpSeparators:o})})}),b.jsx(bn,{className:t?.error})]})}),b.jsx(tn,{control:ee.control,name:"trustDevice",render:({field:G})=>b.jsxs(nn,{className:"flex",children:[b.jsx(dn,{children:b.jsx(w0,{checked:G.value,onCheckedChange:G.onChange,disabled:n,className:t?.checkbox})}),b.jsx(rn,{className:t?.label,children:a.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[D!==null&&b.jsxs(Lt,{type:"submit",disabled:n,className:pe(t?.button,t?.primaryButton),children:[n&&b.jsx(Tn,{className:"animate-spin"}),a.TWO_FACTOR_ACTION]}),D==="otp"&&w?.includes("otp")&&b.jsxs(Lt,{type:"button",variant:"outline",onClick:k,disabled:V>0||Z||n,className:pe(t?.button,t?.outlineButton),children:[Z?b.jsx(Tn,{className:"animate-spin"}):b.jsx(jE,{className:t?.icon}),a.RESEND_CODE,V>0&&` (${V})`]}),D!=="otp"&&w?.includes("otp")&&b.jsxs(Lt,{type:"button",variant:"secondary",className:pe(t?.button,t?.secondaryButton),onClick:()=>B("otp"),disabled:n,children:[b.jsx(jE,{className:t?.icon}),a.SEND_VERIFICATION_CODE]}),D!=="totp"&&w?.includes("totp")&&b.jsxs(Lt,{type:"button",variant:"secondary",className:pe(t?.button,t?.secondaryButton),onClick:()=>B("totp"),disabled:n,children:[b.jsx(OI,{className:t?.icon}),a.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function XO({redirectTo:e}){const t=E.useRef(!1),{authClient:n,basePath:a,viewPaths:o}=E.useContext(Ze),{onSuccess:l}=Ja({redirectTo:e||`${a}/${o.SIGN_IN}`});return E.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(l))},[n,l]),b.jsx(Tn,{className:"animate-spin"})}function XU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,pathname:l,redirectTo:u,view:d,otpSeparators:f=0,setIsSubmitting:h}){const{basePath:g,credentials:p,localization:y,magicLink:_,emailOTP:S,signUp:w,twoFactor:T,viewPaths:R,replace:A}=E.useContext(Ze),C=!!w;if(o={...y,...o},E.useEffect(()=>{l&&!Pg(R,l)&&(console.error(`Invalid auth view: ${l}`),A(`${g}/${R.SIGN_IN}${window.location.search}`))},[l,R,g,A]),d=d||Pg(R,l)||"SIGN_IN",E.useEffect(()=>{let O=!1;d==="MAGIC_LINK"&&(!_||!p&&!S)&&(O=!0),d==="EMAIL_OTP"&&(!S||!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(`${g}/${R.SIGN_IN}${window.location.search}`)},[g,d,R,p,A,S,C,_,T]),d==="SIGN_OUT")return b.jsx(XO,{redirectTo:u});if(d==="CALLBACK")return b.jsx(WO,{redirectTo:u});if(d==="SIGN_IN")return p?b.jsx(WU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):_?b.jsx(sw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):S?b.jsx(ow,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(QU,{className:e,classNames:t,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(YU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(sw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(ow,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(qU,{className:e,classNames:t,localization:o,isSubmitting:a,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(KU,{className:e,classNames:t,localization:o});if(d==="SIGN_UP")return C&&b.jsx(ZU,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h})}function JU({className:e,classNames:t,localization:n}){const{localization:a,redirectTo:o,replace:l,toast:u}=E.useContext(Ze),d=E.useMemo(()=>({...a,...n}),[a,n]),{data:f}=tU(),[h,g]=E.useState(null);return E.useEffect(()=>{const p=Do("invitationId");if(!p){u({variant:"error",message:d.INVITATION_NOT_FOUND}),l(o);return}g(p)},[d.INVITATION_NOT_FOUND,u,l,o]),!f||!h?b.jsx(JO,{className:e,classNames:t}):b.jsx(eB,{className:e,classNames:t,localization:d,invitationId:h})}function eB({className:e,classNames:t,localization:n,invitationId:a}){var o;const{authClient:l,hooks:{useInvitation:u},localization:d,organization:f,redirectTo:h,replace:g,toast:p,localizeErrors:y}=E.useContext(Ze),_=E.useMemo(()=>({...d,...n}),[d,n]),[S,w]=E.useState(!1),[T,R]=E.useState(!1),A=S||T,{data:C,isPending:O}=u({query:{id:a}}),N=E.useCallback(()=>Do("redirectTo")||h,[h]);E.useEffect(()=>{if(!(O||!a)){if(!C){p({variant:"error",message:_.INVITATION_NOT_FOUND}),g(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}),g(h))}},[C,O,a,_,p,g,h]);const L=async()=>{R(!0);try{await l.organization.acceptInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),g(N())}catch(Y){p({variant:"error",message:$t({error:Y,localization:_,localizeErrors:y})}),R(!1)}},I=async()=>{w(!0);try{await l.organization.rejectInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),g(h)}catch(Y){p({variant:"error",message:$t({error:Y,localization:_,localizeErrors:y})}),w(!1)}},Z=((o=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find(Y=>Y.role===C?.role))==null?void 0:o.label)||C?.role;return C?b.jsxs(No,{className:pe("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:pe("justify-items-center text-center",t?.header),children:[b.jsx(E0,{className:pe("text-lg md:text-xl",t?.title),children:_.ACCEPT_INVITATION}),b.jsx(Gf,{className:pe("text-xs md:text-sm",t?.description),children:_.ACCEPT_INVITATION_DESCRIPTION})]}),b.jsxs(qf,{className:pe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(No,{className:pe("flex-row items-center p-4"),children:[b.jsx(YO,{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:Z})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsxs(Lt,{variant:"outline",className:pe(t?.button,t?.outlineButton),onClick:I,disabled:A,children:[S?b.jsx(Tn,{className:"animate-spin"}):b.jsx(Ax,{}),_.REJECT]}),b.jsxs(Lt,{className:pe(t?.button,t?.primaryButton),onClick:L,disabled:A,children:[T?b.jsx(Tn,{className:"animate-spin"}):b.jsx(Lv,{}),_.ACCEPT]})]})]})]}):b.jsx(JO,{className:e,classNames:t})}var JO=({className:e,classNames:t,localization:n})=>b.jsxs(No,{className:pe("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:pe("justify-items-center",t?.header),children:[b.jsx(vr,{className:pe("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),b.jsx(vr,{className:pe("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),b.jsxs(qf,{className:pe("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(No,{className:pe("flex-row items-center p-4"),children:[b.jsx(YO,{isPending:!0,localization:n}),b.jsx(vr,{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(vr,{className:"h-9 w-full"}),b.jsx(vr,{className:"h-9 w-full"})]})]})]});function lw({className:e,orientation:t="horizontal",decorative:n=!0,...a}){return b.jsx(eU,{"data-slot":"separator",decorative:n,orientation:t,className:pe("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),...a})}function tB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g}=E.useContext(Ze);return b.jsxs(Lt,{className:pe("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="EMAIL_OTP"?f.SIGN_IN:f.EMAIL_OTP}${window.location.search}`),children:[a==="EMAIL_OTP"?b.jsx(Ox,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Tx,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function nB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g,credentials:p}=E.useContext(Ze);return b.jsxs(Lt,{className:pe("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="MAGIC_LINK"||!p?f.SIGN_IN:f.MAGIC_LINK}${window.location.search}`),children:[a==="MAGIC_LINK"?b.jsx(Ox,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Tx,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function rB({localization:e,redirectTo:t}){const{authClient:n,localization:a,toast:o,localizeErrors:l}=E.useContext(Ze),u=E.useRef(!1);e=E.useMemo(()=>({...a,...e}),[a,e]);const{onSuccess:d}=Ja({redirectTo:t});return E.useEffect(()=>{if(!u.current){u.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:d}})}catch(f){o({variant:"error",message:$t({error:f,localization:e,localizeErrors:l})})}}},[n,e,l,d,o]),null}function aB({classNames:e,isSubmitting:t,localization:n,redirectTo:a,setIsSubmitting:o}){var l,u;const{authClient:d,localization:f,toast:h,localizeErrors:g}=E.useContext(Ze);n={...f,...n};const{onSuccess:p}=Ja({redirectTo:a}),y=async()=>{o?.(!0);try{const _=await d.signIn.passkey({fetchOptions:{throw:!0}});_?.error?(h({variant:"error",message:$t({error:_.error,localization:n,localizeErrors:g})}),o?.(!1)):p()}catch(_){h({variant:"error",message:$t({error:_,localization:n,localizeErrors:g})}),o?.(!1)}};return b.jsxs(Lt,{className:pe("w-full",(l=e?.form)==null?void 0:l.button,(u=e?.form)==null?void 0:u.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:y,children:[b.jsx(bI,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function cw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,other:l,provider:u,redirectTo:d,socialLayout:f,setIsSubmitting:h}){var g,p,y,_;const{authClient:S,basePath:w,baseURL:T,persistClient:R,redirectTo:A,viewPaths:C,social:O,genericOAuth:N,toast:L,localizeErrors:I}=E.useContext(Ze),D=E.useCallback(()=>d||Do("redirectTo")||A,[d,A]),B=E.useCallback(()=>`${T}${n||(R?`${w}/${C.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,w,C,T,D]),Z=async()=>{h(!0);try{if(l){const Y={providerId:u.provider,callbackURL:B(),fetchOptions:{throw:!0}};N?.signIn?(await N.signIn(Y),setTimeout(()=>{h(!1)},1e4)):await S.signIn.oauth2(Y)}else{const Y={provider:u.provider,callbackURL:B(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(Y),setTimeout(()=>{h(!1)},1e4)):await S.signIn.social(Y)}}catch(Y){L({variant:"error",message:$t({error:Y,localization:o,localizeErrors:I})}),h(!1)}};return b.jsxs(Lt,{className:pe(f==="vertical"?"w-full":"grow",e,(g=t?.form)==null?void 0:g.button,(p=t?.form)==null?void 0:p.outlineButton,(y=t?.form)==null?void 0:y.providerButton),disabled:a,variant:"outline",onClick:Z,children:[u.icon&&b.jsx(u.icon,{className:(_=t?.form)==null?void 0:_.icon}),f==="grid"&&u.name,f==="vertical"&&`${o.SIGN_IN_WITH} ${u.name}`]})}function Dz({className:e,classNames:t,callbackURL:n,cardHeader:a,cardFooter:o,localization:l,path:u,pathname:d,redirectTo:f,socialLayout:h="auto",view:g,otpSeparators:p=0}){var y,_,S,w,T,R;const A=Ka(),{basePath:C,credentials:O,localization:N,magicLink:L,emailOTP:I,oneTap:D,passkey:B,signUp:Z,social:Y,genericOAuth:V,viewPaths:z,Link:ie}=E.useContext(Ze);l={...N,...l};let ee=h;ee==="auto"&&(ee=O&&Y?.providers&&Y.providers.length>2?"horizontal":"vertical");const k=u??d?.split("/").pop(),F=g||Pg(z,k)||"SIGN_IN",[G,ae]=E.useState(!1);if(E.useEffect(()=>{const P=()=>ae(!1);return window.addEventListener("pagehide",P),()=>{ae(!1),window.removeEventListener("pagehide",P)}},[]),F==="CALLBACK")return b.jsx(WO,{redirectTo:f});if(F==="SIGN_OUT")return b.jsx(XO,{redirectTo:f});if(F==="ACCEPT_INVITATION")return b.jsx(JU,{className:e,classNames:t});const ve=!O&&!L&&!I?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${F}_DESCRIPTION`];return b.jsxs(No,{className:pe("w-full max-w-sm",e,t?.base),children:[b.jsx($f,{className:t?.header,children:a||b.jsxs(b.Fragment,{children:[b.jsx(E0,{className:pe("text-lg md:text-xl",t?.title),children:l[F]}),ve&&b.jsx(Gf,{className:pe("text-xs md:text-sm",t?.description),children:ve})]})}),b.jsxs(qf,{className:pe("grid gap-6",t?.content),children:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(F)&&b.jsx(rB,{localization:l,redirectTo:f}),(O||L||I)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(XU,{classNames:t?.form,callbackURL:n,isSubmitting:G,localization:l,otpSeparators:p,view:F,redirectTo:f,setIsSubmitting:ae}),L&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||I&&F==="EMAIL_OTP")&&b.jsx(nB,{classNames:t,localization:l,view:F,isSubmitting:G}),I&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(F)||L&&["SIGN_IN","MAGIC_LINK"].includes(F))&&b.jsx(tB,{classNames:t,localization:l,view:F,isSubmitting:G})]}),F!=="RESET_PASSWORD"&&(((y=Y?.providers)==null?void 0:y.length)||((_=V?.providers)==null?void 0:_.length)||F==="SIGN_IN"&&B)&&b.jsxs(b.Fragment,{children:[(O||L||I)&&b.jsxs("div",{className:pe("flex items-center gap-2",t?.continueWith),children:[b.jsx(lw,{className:pe("!w-auto grow",t?.separator)}),b.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:l.OR_CONTINUE_WITH}),b.jsx(lw,{className:pe("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((S=Y?.providers)==null?void 0:S.length)||((w=V?.providers)==null?void 0:w.length))&&b.jsxs("div",{className:pe("flex w-full items-center justify-between gap-4",ee==="horizontal"&&"flex-wrap",ee==="vertical"&&"flex-col",ee==="grid"&&"grid grid-cols-2"),children:[(T=Y?.providers)==null?void 0:T.map(P=>{const Q=UU.find(te=>te.provider===P);return Q?b.jsx(cw,{classNames:t,callbackURL:n,isSubmitting:G,localization:l,provider:Q,redirectTo:f,setIsSubmitting:ae,socialLayout:ee},P):null}),(R=V?.providers)==null?void 0:R.map(P=>b.jsx(cw,{classNames:t,callbackURL:n,isSubmitting:G,localization:l,provider:P,redirectTo:f,setIsSubmitting:ae,socialLayout:ee,other:!0},P.provider))]}),B&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(F)&&b.jsx(aB,{classNames:t,isSubmitting:G,localization:l,redirectTo:f,setIsSubmitting:ae})]})]})]}),o&&b.jsx(cv,{className:t?.footer,children:o}),O&&Z&&b.jsxs(cv,{className:pe("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(oI,{className:"size-3"}),F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"||F==="SIGN_UP"?b.jsx(ie,{className:pe("text-foreground underline",t?.footerLink),href:`${C}/${z[F==="SIGN_IN"||F==="MAGIC_LINK"||F==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${A?window.location.search:""}`,children:b.jsx(Lt,{variant:"link",size:"sm",className:pe("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(Lt,{variant:"link",size:"sm",className:pe("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:l.GO_BACK})]})]})}function Lz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{isPending:n}=t();return n?e:null}function Pz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{data:n}=t();return n?e:null}function kz({children:e}){const{hooks:{useSession:t}}=E.useContext(Ze),{data:n,isPending:a}=t();return!n&&!a?e:null}function iB(e){const t=Sf.c(8),{children:n}=e,a=Oc();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={basePath:"/",pathMode:"slug"},t[0]=o):o=t[0];let l,u;t[1]!==a?(l=f=>a({to:f}),u=f=>a({to:f,replace:!0}),t[1]=a,t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;return t[4]!==n||t[5]!==l||t[6]!==u?(d=b.jsx(JN,{authClient:_M,organization:o,navigate:l,replace:u,Link:oB,children:n}),t[4]=n,t[5]=l,t[6]=u,t[7]=d):d=t[7],d}function oB(e){const{href:t,className:n,children:a,...o}=e;return b.jsx(Rv,{to:t,className:n,...o,children:a})}const sB=new KC;function lB(e){const t=Sf.c(3),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=b.jsx(CN,{}),t[0]=a):a=t[0];let o;return t[1]!==n?(o=b.jsxs(ZC,{client:sB,children:[a,b.jsx(f4,{children:b.jsx(iB,{children:n})})]}),t[1]=n,t[2]=o):o=t[2],o}const cB=function(){return null};function uB(){const e=Sf.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 Bc=P3({component:()=>b.jsxs(lB,{children:[b.jsx(E.Suspense,{fallback:b.jsx(uB,{}),children:b.jsx(Vw,{})}),b.jsx(cB,{})]})}),dB=An({getParentRoute:()=>Bc,path:"/login",component:Ln(()=>Dn(()=>import("./login-DBR5FdH6.js"),__vite__mapDeps([0,1,2,3]))),validateSearch:Ks(()=>zn({next:Xe().optional(),client_id:Xe().optional(),redirect_uri:Xe().optional(),response_type:Xe().optional(),state:Xe().optional(),scope:Xe().optional(),code_challenge:Xe().optional(),code_challenge_method:Xe().optional()}))}),fB=An({getParentRoute:()=>Bc,path:"/auth/$pathname",component:Ln(()=>Dn(()=>import("./auth-catchall-BRoDHrkX.js"),[]))}),Br=An({getParentRoute:()=>Bc,id:"shell",component:Ln(()=>Dn(()=>import("./shell-layout-DwQEFltw.js"),__vite__mapDeps([4,5,2,6,7,8,1,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,3,25,26,27,28])))}),hB=An({getParentRoute:()=>Br,path:"/",component:Ln(()=>Dn(()=>import("./home-BwRicK_C.js"),__vite__mapDeps([29,18,2,27,7,1,3,22,23,24,25])))}),pB=An({getParentRoute:()=>Br,path:"/$org",component:Ln(()=>Dn(()=>import("./page-D0nieAd7.js"),__vite__mapDeps([30,6,2,7,8,1,31,32,28,33,19,34,9,35,36,37,38])))}),mB=An({getParentRoute:()=>Br,path:"/$org/members",component:Ln(()=>Dn(()=>import("./members-Bhg2_ZSs.js"),__vite__mapDeps([39,31,32,1,2,28,8,7,33,40,3,41,42,6,43,14,44,45,13,27,37,23,20,46,5,19,24,16,18])))}),gB=An({getParentRoute:()=>Br,path:"/$org/mcps",component:Ln(()=>Dn(()=>import("./connections-Bfcj96aB.js"),__vite__mapDeps([47,48,31,32,1,2,28,8,7,33,40,3,41,17,18,6,5,19,49,15,23,37,20,24,14,16,50]))),validateSearch:Ks(()=>zn({action:Nv(["create"]).optional()}))}),vB=An({getParentRoute:()=>Br,path:"/$org/settings",component:Ln(()=>Dn(()=>import("./settings-BENyycRE.js"),__vite__mapDeps([51,31,32,1,2,28,8,7,33,24,3,52])))}),yB=An({getParentRoute:()=>Br,path:"/$org/monitoring",component:Ln(()=>Dn(()=>import("./monitoring-DAnTyFbi.js"),__vite__mapDeps([53,6,2,7,8,1,31,32,28,33,40,3,5,19,35,36,37,9,44,34,43,14,54,26]))),validateSearch:Ks(()=>zn({from:Xe().default("now-24h"),to:Xe().default("now"),connectionId:AE(Xe()).optional().default([]),gatewayId:AE(Xe()).optional().default([]),tool:Xe().default(""),status:Nv(["all","success","errors"]).default("all"),search:Xe().default(""),page:Ex().optional(),streaming:Mv().default(!0)}))}),eT=An({getParentRoute:()=>Br,path:"/$org/store",component:Ln(()=>Dn(()=>import("./store-CdN9wtZc.js"),__vite__mapDeps([55,45,31,32,1,2,28,8,7,6,56,40,3,18,57,58,14,17,5,10,11,12,13])))}),bB=An({getParentRoute:()=>eT,path:"/$appName",component:Ln(()=>Dn(()=>import("./store-app-detail-AyYeHK1f.js"),__vite__mapDeps([59,7,2,1,6,8,28,5,60,13,57,32,40,3,41,18,61,37,62,10,11,34,63,64,50,56,58]))),validateSearch:Ks(()=>zn({registryId:Xe().optional(),serverName:Xe().optional(),itemId:Xe().optional()}))}),_B=An({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId",component:Ln(()=>Dn(()=>import("./connection-detail-DlM4urTK.js"),__vite__mapDeps([65,5,2,19,1,6,7,8,10,11,66,67,21,34,61,24,3,14,9,68,64,57,50,36,54,48,60,13,32,28,40,41,18,37,62,49,15,23]))),validateSearch:Ks(()=>zn({tab:Xe().optional()}))}),EB=An({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:Ln(()=>Dn(()=>import("./collection-detail-CHNCFwGn.js"),__vite__mapDeps([69,6,2,7,8,1,42,43,14,40,3,37,25,16,66,67,11,21,5,19,10,34,61,24,9,68,64,57,50,36,54,48,52,63,13,70])))}),SB=An({getParentRoute:()=>Br,path:"/$org/gateways",component:Ln(()=>Dn(()=>import("./gateways-BYaK85gs.js"),__vite__mapDeps([71,31,32,1,2,28,8,7,33,40,3,41,17,18,6,5,19,9,49,15,23,37]))),validateSearch:Ks(()=>zn({action:Nv(["create"]).optional()}))}),wB=An({getParentRoute:()=>Br,path:"/$org/gateways/$gatewayId",component:Ln(()=>Dn(()=>import("./gateway-detail-rUxOHblZ.js"),__vite__mapDeps([72,5,2,19,1,6,7,8,42,43,14,40,3,9,46,24,56,61,68])))}),xB=An({getParentRoute:()=>Bc,path:"/oauth/callback",component:Ln(()=>Dn(()=>import("./oauth-callback-K0vVKfJt.js"),__vite__mapDeps([73,18,2,7,67,11,70])))}),RB=eT.addChildren([bB]),OB=Br.addChildren([hB,pB,mB,gB,SB,wB,yB,RB,vB,_B,EB]),TB=Bc.addChildren([OB,dB,fB,xB]),AB=$3({routeTree:TB}),CB=document.getElementById("root");wC.createRoot(CB).render(b.jsx(E.StrictMode,{children:b.jsx(Y3,{router:AB})}));export{Vx as $,Dz as A,vz as B,oz as C,XB as D,ZB as E,rz as F,iz as G,Yx as H,yz as I,bz as J,fD as K,gD as L,pD as M,PB as N,uz as O,dz as P,lz as Q,cz as R,uB as S,fz as T,hz as U,$x as V,Ws as W,Io as X,Nz as Y,ze as Z,vD as _,_M as a,yP as a$,Xr as a0,WC as a1,u4 as a2,c4 as a3,Dn as a4,Oc as a5,NE as a6,eU as a7,GL as a8,ZL as a9,OR as aA,CP as aB,LB as aC,ax as aD,AE as aE,qB as aF,Mv as aG,ik as aH,ok as aI,ak as aJ,qL as aK,Ax as aL,fn as aM,Qa as aN,Qr as aO,FR as aP,ZR as aQ,Ui as aR,gP as aS,qv as aT,lR as aU,Yv as aV,bc as aW,Jx as aX,Gv as aY,$v as aZ,vP as a_,Rz as aa,WL as ab,YL as ac,Oz as ad,KL as ae,oD as af,Fx as ag,Ze as ah,bU as ai,Iz as aj,Lz as ak,Pz as al,kz as am,uv as an,Vw as ao,zn as ap,Xe as aq,Za as ar,Wa as as,Cc as at,jt as au,Ge as av,H as aw,Lo as ax,XR as ay,MP as az,xv as b,Tz as b$,MB as b0,jw as b1,Tf as b2,$i as b3,$a as b4,FC as b5,k_ as b6,IB as b7,NB as b8,l4 as b9,RR as bA,Nv as bB,FB as bC,Pc as bD,Ac as bE,YB as bF,BB as bG,zB as bH,HB as bI,Ex as bJ,VB as bK,GB as bL,Ks as bM,jB as bN,UB as bO,kB as bP,wz as bQ,xz as bR,Sz as bS,V7 as bT,H7 as bU,$7 as bV,G7 as bW,q7 as bX,Az as bY,Cz as bZ,Mz as b_,a4 as ba,er as bb,oI as bc,tr as bd,Cn as be,Rc as bf,On as bg,vg as bh,fw as bi,QC as bj,e4 as bk,i4 as bl,t4 as bm,n4 as bn,Xn as bo,s4 as bp,j_ as bq,o4 as br,r4 as bs,Rv as bt,l6 as bu,K2 as bv,Z2 as bw,W7 as bx,Ek as by,BR as bz,Sf as c,PI as c0,UI as c1,Cf as c2,zv as c3,fc as c4,GC as c5,LC as c6,Tn as c7,KB as c8,$B as c9,Ee as ca,WB as cb,wv as d,az as e,JB as f,gz as g,sz as h,ez as i,b as j,dD as k,Nf as l,Mf as m,QB as n,lD as o,mz as p,nz as q,E as r,uD as s,tS as t,DB as u,tz as v,Hx as w,_z as x,Ez as y,pz as z};
|