const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/analysis-BO3IE-J4.js","assets/tslib.es6-BaFViOhq.js","assets/index-CO5DzGxy.js","assets/index-CeRfFUxJ.js","assets/Table-B11dzOaz.js","assets/index-DmtjhyJb.js","assets/index-C9m5qSM4.js","assets/index-S1dQ7QE3.js","assets/monitor-D14Jvfho.js","assets/workplace-vTGxhfQ1.js","assets/index-CFsVFAkS.js","assets/icon-selector-Bry1jSXk.js","assets/index-duCmqVUU.js","assets/index-BZjcF0yn.js","assets/index-D3yl9SWR.js","assets/progress-C__thZ4V.js","assets/image-uploader-BPDdWUpW.js","assets/user-selector-Bf4m-hi5.js","assets/xin-form-CcQ8xq2p.js","assets/xin-table-SsTJg5qL.js","assets/index-rMui37zI.js","assets/index-CkiGQ3z2.js","assets/index-Bc7ikhKh.js","assets/403-D_RpddD3.js","assets/index-CwBuiwuD.js","assets/404-nJtFVjOX.js","assets/500-bhOU7TY_.js","assets/first-CE-aqGGa.js","assets/second-BzkscI87.js","assets/third-rWpa1lfh.js","assets/base-layout-DQ91AFp0.js","assets/index-VkcAtM9X.js","assets/descriptions-7UvHFHcf.js","assets/Timeline-BM8lZv8J.js","assets/fix-header-Chn14uO2.js","assets/fail-BHtOA_db.js","assets/info-6rLhG2_3.js","assets/success-CVvPs_8f.js","assets/warning-DK6ICCsI.js","assets/dept-DXcViZXZ.js","assets/useAuth-BOs-nzG0.js","assets/index-BPV0ygaW.js","assets/index-CUwz3zP2.js","assets/item-Du51lIrU.js","assets/file-B4x3U0bn.js","assets/info-CTM73LVB.js","assets/mail-CyS6Gfyv.js","assets/role-BeZ3fBY0.js","assets/rule-C6i2u_mD.js","assets/setting-CV7SVDYb.js","assets/storage-hWfzGhh2.js","assets/user-DaIHvCk0.js","assets/profile-D0iHbJ6r.js"])))=>i.map(i=>d[i]); function yW(t,e){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();var Qf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function z7(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dm={exports:{}},Z8={};var WP;function wW(){if(WP)return Z8;WP=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var d in s)d!=="key"&&(l[d]=s[d])}else l=s;return s=l.ref,{$$typeof:t,type:r,key:c,ref:s!==void 0?s:null,props:l}}return Z8.Fragment=e,Z8.jsx=n,Z8.jsxs=n,Z8}var GP;function OW(){return GP||(GP=1,dm.exports=wW()),dm.exports}var pe=OW(),fm={exports:{}},J8={},hm={exports:{}},mm={};var XP;function xW(){return XP||(XP=1,(function(t){function e(N,U){var K=N.length;N.push(U);e:for(;0>>1,te=N[Z];if(0>>1;Zs(J,K))ses(ie,J)?(N[Z]=ie,N[se]=K,Z=se):(N[Z]=J,N[W]=K,Z=W);else if(ses(ie,K))N[Z]=ie,N[se]=K,Z=se;else break e}}return U}function s(N,U){var K=N.sortIndex-U.sortIndex;return K!==0?K:N.id-U.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var m=[],h=[],v=1,b=null,y=3,O=!1,w=!1,S=!1,C=!1,z=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function H(N){for(var U=n(h);U!==null;){if(U.callback===null)r(h);else if(U.startTime<=N)r(h),U.sortIndex=U.expirationTime,e(m,U);else break;U=n(h)}}function j(N){if(S=!1,H(N),!w)if(n(m)!==null)w=!0,_||(_=!0,X());else{var U=n(h);U!==null&&q(j,U.startTime-N)}}var _=!1,P=-1,L=5,V=-1;function D(){return C?!0:!(t.unstable_now()-VN&&D());){var Z=b.callback;if(typeof Z=="function"){b.callback=null,y=b.priorityLevel;var te=Z(b.expirationTime<=N);if(N=t.unstable_now(),typeof te=="function"){b.callback=te,H(N),U=!0;break t}b===n(m)&&r(m),H(N)}else r(m);b=n(m)}if(b!==null)U=!0;else{var B=n(h);B!==null&&q(j,B.startTime-N),U=!1}}break e}finally{b=null,y=K,O=!1}U=void 0}}finally{U?X():_=!1}}}var X;if(typeof T=="function")X=function(){T(F)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,Y=Q.port2;Q.port1.onmessage=F,X=function(){Y.postMessage(null)}}else X=function(){z(F,0)};function q(N,U){P=z(function(){N(t.unstable_now())},U)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(N){N.callback=null},t.unstable_forceFrameRate=function(N){0>N||125Z?(N.sortIndex=K,e(h,N),n(m)===null&&N===n(h)&&(S?(M(P),P=-1):S=!0,q(j,K-Z))):(N.sortIndex=te,e(m,N),w||O||(w=!0,_||(_=!0,X()))),N},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(N){var U=y;return function(){var K=y;y=U;try{return N.apply(this,arguments)}finally{y=K}}}})(mm)),mm}var KP;function SW(){return KP||(KP=1,hm.exports=xW()),hm.exports}var gm={exports:{}},dn={};var YP;function $W(){if(YP)return dn;YP=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),y=Symbol.iterator;function O(B){return B===null||typeof B!="object"?null:(B=y&&B[y]||B["@@iterator"],typeof B=="function"?B:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function z(B,W,J){this.props=B,this.context=W,this.refs=C,this.updater=J||w}z.prototype.isReactComponent={},z.prototype.setState=function(B,W){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,W,"setState")},z.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function M(){}M.prototype=z.prototype;function T(B,W,J){this.props=B,this.context=W,this.refs=C,this.updater=J||w}var H=T.prototype=new M;H.constructor=T,S(H,z.prototype),H.isPureReactComponent=!0;var j=Array.isArray;function _(){}var P={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function V(B,W,J){var se=J.ref;return{$$typeof:t,type:B,key:W,ref:se!==void 0?se:null,props:J}}function D(B,W){return V(B.type,W,B.props)}function F(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function X(B){var W={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(J){return W[J]})}var Q=/\/+/g;function Y(B,W){return typeof B=="object"&&B!==null&&B.key!=null?X(""+B.key):W.toString(36)}function q(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(_,_):(B.status="pending",B.then(function(W){B.status==="pending"&&(B.status="fulfilled",B.value=W)},function(W){B.status==="pending"&&(B.status="rejected",B.reason=W)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function N(B,W,J,se,ie){var le=typeof B;(le==="undefined"||le==="boolean")&&(B=null);var ce=!1;if(B===null)ce=!0;else switch(le){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(B.$$typeof){case t:case e:ce=!0;break;case v:return ce=B._init,N(ce(B._payload),W,J,se,ie)}}if(ce)return ie=ie(B),ce=se===""?"."+Y(B,0):se,j(ie)?(J="",ce!=null&&(J=ce.replace(Q,"$&/")+"/"),N(ie,W,J,"",function(fe){return fe})):ie!=null&&(F(ie)&&(ie=D(ie,J+(ie.key==null||B&&B.key===ie.key?"":(""+ie.key).replace(Q,"$&/")+"/")+ce)),W.push(ie)),1;ce=0;var he=se===""?".":se+":";if(j(B))for(var Oe=0;Oe"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),pm.exports=CW(),pm.exports}var kP;function zW(){if(kP)return J8;kP=1;var t=SW(),e=WH(),n=RB();function r(o){var i="https://react.dev/errors/"+o;if(1te||(o.current=Z[te],Z[te]=null,te--)}function J(o,i){te++,Z[te]=o.current,o.current=i}var se=B(null),ie=B(null),le=B(null),ce=B(null);function he(o,i){switch(J(le,i),J(ie,o),J(se,null),i.nodeType){case 9:case 11:o=(o=i.documentElement)&&(o=o.namespaceURI)?k1(o):0;break;default:if(o=i.tagName,i=i.namespaceURI)i=k1(i),o=_a(i,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}W(se),J(se,o)}function Oe(){W(se),W(ie),W(le)}function fe(o){o.memoizedState!==null&&J(ce,o);var i=se.current,u=_a(i,o.type);i!==u&&(J(ie,o),J(se,u))}function ye(o){ie.current===o&&(W(se),W(ie)),ce.current===o&&(W(ce),Rc._currentValue=K)}var ve,xe;function Re(o){if(ve===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);ve=i&&i[1]||"",xe=-1)":-1x||me[g]!==He[x]){var We=` `+me[g].replace(" at new "," at ");return o.displayName&&We.includes("")&&(We=We.replace("",o.displayName)),We}while(1<=g&&0<=x);break}}}finally{$e=!1,Error.prepareStackTrace=u}return(u=o?o.displayName||o.name:"")?Re(u):""}function Me(o,i){switch(o.tag){case 26:case 27:case 5:return Re(o.type);case 16:return Re("Lazy");case 13:return o.child!==i&&i!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return _e(o.type,!1);case 11:return _e(o.type.render,!1);case 1:return _e(o.type,!0);case 31:return Re("Activity");default:return""}}function Pe(o){try{var i="",u=null;do i+=Me(o,u),u=o,o=o.return;while(o);return i}catch(g){return` Error generating stack: `+g.message+` `+g.stack}}var Ae=Object.prototype.hasOwnProperty,ht=t.unstable_scheduleCallback,Ve=t.unstable_cancelCallback,Ze=t.unstable_shouldYield,st=t.unstable_requestPaint,mt=t.unstable_now,Ot=t.unstable_getCurrentPriorityLevel,zt=t.unstable_ImmediatePriority,pt=t.unstable_UserBlockingPriority,ct=t.unstable_NormalPriority,yt=t.unstable_LowPriority,ut=t.unstable_IdlePriority,tt=t.log,dt=t.unstable_setDisableYieldValue,ft=null,nt=null;function Ye(o){if(typeof tt=="function"&&dt(o),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(ft,o)}catch{}}var Pt=Math.clz32?Math.clz32:vn,en=Math.log,It=Math.LN2;function vn(o){return o>>>=0,o===0?32:31-(en(o)/It|0)|0}var Ft=256,Ct=262144,$t=4194304;function Vt(o){var i=o&42;if(i!==0)return i;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Jt(o,i,u){var g=o.pendingLanes;if(g===0)return 0;var x=0,R=o.suspendedLanes,A=o.pingedLanes;o=o.warmLanes;var k=g&134217727;return k!==0?(g=k&~R,g!==0?x=Vt(g):(A&=k,A!==0?x=Vt(A):u||(u=k&~o,u!==0&&(x=Vt(u))))):(k=g&~R,k!==0?x=Vt(k):A!==0?x=Vt(A):u||(u=g&~o,u!==0&&(x=Vt(u)))),x===0?0:i!==0&&i!==x&&(i&R)===0&&(R=x&-x,u=i&-i,R>=u||R===32&&(u&4194048)!==0)?i:x}function lt(o,i){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&i)===0}function gt(o,i){switch(o){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 vt(){var o=$t;return $t<<=1,($t&62914560)===0&&($t=4194304),o}function rt(o){for(var i=[],u=0;31>u;u++)i.push(o);return i}function Ne(o,i){o.pendingLanes|=i,i!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Ge(o,i,u,g,x,R){var A=o.pendingLanes;o.pendingLanes=u,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=u,o.entangledLanes&=u,o.errorRecoveryDisabledLanes&=u,o.shellSuspendCounter=0;var k=o.entanglements,me=o.expirationTimes,He=o.hiddenUpdates;for(u=A&~u;0"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var Mt=/[\n"\\]/g;function nn(o){return o.replace(Mt,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Es(o,i,u,g,x,R,A,k){o.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?o.type=A:o.removeAttribute("type"),i!=null?A==="number"?(i===0&&o.value===""||o.value!=i)&&(o.value=""+or(i)):o.value!==""+or(i)&&(o.value=""+or(i)):A!=="submit"&&A!=="reset"||o.removeAttribute("value"),i!=null?Ll(o,A,or(i)):u!=null?Ll(o,A,or(u)):g!=null&&o.removeAttribute("value"),x==null&&R!=null&&(o.defaultChecked=!!R),x!=null&&(o.checked=x&&typeof x!="function"&&typeof x!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?o.name=""+or(k):o.removeAttribute("name")}function Pl(o,i,u,g,x,R,A,k){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(o.type=R),i!=null||u!=null){if(!(R!=="submit"&&R!=="reset"||i!=null)){Ho(o);return}u=u!=null?""+or(u):"",i=i!=null?""+or(i):u,k||i===o.value||(o.value=i),o.defaultValue=i}g=g??x,g=typeof g!="function"&&typeof g!="symbol"&&!!g,o.checked=k?o.checked:!!g,o.defaultChecked=!!g,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(o.name=A),Ho(o)}function Ll(o,i,u){i==="number"&&Wi(o.ownerDocument)===o||o.defaultValue===""+u||(o.defaultValue=""+u)}function ss(o,i,u,g){if(o=o.options,i){i={};for(var x=0;x"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c0=!1;if(Ts)try{var Zc={};Object.defineProperty(Zc,"passive",{get:function(){c0=!0}}),window.addEventListener("test",Zc,Zc),window.removeEventListener("test",Zc,Zc)}catch{c0=!1}var li=null,u0=null,Zn=null;function nr(){if(Zn)return Zn;var o,i=u0,u=i.length,g,x="value"in li?li.value:li.textContent,R=x.length;for(o=0;o=Yi),nd=" ",n2=!1;function r2(o,i){switch(o){case"keyup":return td.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rd(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Qi=!1;function Wa(o,i){switch(o){case"compositionend":return rd(i);case"keypress":return i.which!==32?null:(n2=!0,nd);case"textInput":return o=i.data,o===nd&&n2?null:o;default:return null}}function g0(o,i){if(Qi)return o==="compositionend"||!t2&&r2(o,i)?(o=nr(),Zn=u0=li=null,Qi=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:u,offset:i-o};o=g}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=od(u)}}function id(o,i){return o&&i?o===i?!0:o&&o.nodeType===3?!1:i&&i.nodeType===3?id(o,i.parentNode):"contains"in o?o.contains(i):o.compareDocumentPosition?!!(o.compareDocumentPosition(i)&16):!1:!1}function ld(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var i=Wi(o.document);i instanceof o.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)o=i.contentWindow;else break;i=Wi(o.document)}return i}function O0(o){var i=o&&o.nodeName&&o.nodeName.toLowerCase();return i&&(i==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||i==="textarea"||o.contentEditable==="true")}var Nl=Ts&&"documentMode"in document&&11>=document.documentMode,Se=null,qe=null,Ie=null,jt=!1;function rn(o,i,u){var g=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;jt||Se==null||Se!==Wi(g)||(g=Se,"selectionStart"in g&&O0(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Ie&&Fl(Ie,g)||(Ie=g,g=Y1(qe,"onSelect"),0>=A,x-=A,ls=1<<32-Pt(i)+x|u<fn?(zn=_t,_t=null):zn=_t.sibling;var Bn=je(ze,_t,Te[fn],Ke);if(Bn===null){_t===null&&(_t=zn);break}o&&_t&&Bn.alternate===null&&i(ze,_t),we=R(Bn,we,fn),Vn===null?At=Bn:Vn.sibling=Bn,Vn=Bn,_t=zn}if(fn===Te.length)return u(ze,_t),Tn&&Ka(ze,fn),At;if(_t===null){for(;fnfn?(zn=_t,_t=null):zn=_t.sibling;var Vi=je(ze,_t,Bn.value,Ke);if(Vi===null){_t===null&&(_t=zn);break}o&&_t&&Vi.alternate===null&&i(ze,_t),we=R(Vi,we,fn),Vn===null?At=Vi:Vn.sibling=Vi,Vn=Vi,_t=zn}if(Bn.done)return u(ze,_t),Tn&&Ka(ze,fn),At;if(_t===null){for(;!Bn.done;fn++,Bn=Te.next())Bn=Qe(ze,Bn.value,Ke),Bn!==null&&(we=R(Bn,we,fn),Vn===null?At=Bn:Vn.sibling=Bn,Vn=Bn);return Tn&&Ka(ze,fn),At}for(_t=g(_t);!Bn.done;fn++,Bn=Te.next())Bn=Fe(_t,ze,fn,Bn.value,Ke),Bn!==null&&(o&&Bn.alternate!==null&&_t.delete(Bn.key===null?fn:Bn.key),we=R(Bn,we,fn),Vn===null?At=Bn:Vn.sibling=Bn,Vn=Bn);return o&&_t.forEach(function(um){return i(ze,um)}),Tn&&Ka(ze,fn),At}function er(ze,we,Te,Ke){if(typeof Te=="object"&&Te!==null&&Te.type===S&&Te.key===null&&(Te=Te.props.children),typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case O:e:{for(var At=Te.key;we!==null;){if(we.key===At){if(At=Te.type,At===S){if(we.tag===7){u(ze,we.sibling),Ke=x(we,Te.props.children),Ke.return=ze,ze=Ke;break e}}else if(we.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===L&&Vo(At)===we.type){u(ze,we.sibling),Ke=x(we,Te.props),Bo(Ke,Te),Ke.return=ze,ze=Ke;break e}u(ze,we);break}else i(ze,we);we=we.sibling}Te.type===S?(Ke=el(Te.props.children,ze.mode,Ke,Te.key),Ke.return=ze,ze=Ke):(Ke=h2(Te.type,Te.key,Te.props,null,ze.mode,Ke),Bo(Ke,Te),Ke.return=ze,ze=Ke)}return A(ze);case w:e:{for(At=Te.key;we!==null;){if(we.key===At)if(we.tag===4&&we.stateNode.containerInfo===Te.containerInfo&&we.stateNode.implementation===Te.implementation){u(ze,we.sibling),Ke=x(we,Te.children||[]),Ke.return=ze,ze=Ke;break e}else{u(ze,we);break}else i(ze,we);we=we.sibling}Ke=i1(Te,ze.mode,Ke),Ke.return=ze,ze=Ke}return A(ze);case L:return Te=Vo(Te),er(ze,we,Te,Ke)}if(q(Te))return Lt(ze,we,Te,Ke);if(X(Te)){if(At=X(Te),typeof At!="function")throw Error(r(150));return Te=At.call(Te),Xt(ze,we,Te,Ke)}if(typeof Te.then=="function")return er(ze,we,tc(Te),Ke);if(Te.$$typeof===T)return er(ze,we,bo(ze,Te),Ke);va(ze,Te)}return typeof Te=="string"&&Te!==""||typeof Te=="number"||typeof Te=="bigint"?(Te=""+Te,we!==null&&we.tag===6?(u(ze,we.sibling),Ke=x(we,Te),Ke.return=ze,ze=Ke):(u(ze,we),Ke=Wl(Te,ze.mode,Ke),Ke.return=ze,ze=Ke),A(ze)):u(ze,we)}return function(ze,we,Te,Ke){try{Ya=0;var At=er(ze,we,Te,Ke);return ec=null,At}catch(_t){if(_t===kl||_t===d1)throw _t;var Vn=na(29,_t,null,ze.mode);return Vn.lanes=Ke,Vn.return=ze,Vn}}}var vi=yd(!0),E0=yd(!1),wo=!1;function us(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function w2(o,i){o=o.updateQueue,i.updateQueue===o&&(i.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function bi(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Ao(o,i,u){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(Nn&2)!==0){var x=g.pending;return x===null?i.next=i:(i.next=x.next,x.next=i),g.pending=i,i=o1(o),x0(o,null,u),i}return ki(o,g,i,u),o1(o)}function f1(o,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194048)!==0)){var g=i.lanes;g&=o.pendingLanes,u|=g,i.lanes=u,at(o,u)}}function O2(o,i){var u=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,u===g)){var x=null,R=null;if(u=u.firstBaseUpdate,u!==null){do{var A={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};R===null?x=R=A:R=R.next=A,u=u.next}while(u!==null);R===null?x=R=i:R=R.next=i}else x=R=i;u={baseState:g.baseState,firstBaseUpdate:x,lastBaseUpdate:R,shared:g.shared,callbacks:g.callbacks},o.updateQueue=u;return}o=u.lastBaseUpdate,o===null?u.firstBaseUpdate=i:o.next=i,u.lastBaseUpdate=i}var Ur=!1;function sl(){if(Ur){var o=Jl;if(o!==null)throw o}}function nc(o,i,u,g){Ur=!1;var x=o.updateQueue;wo=!1;var R=x.firstBaseUpdate,A=x.lastBaseUpdate,k=x.shared.pending;if(k!==null){x.shared.pending=null;var me=k,He=me.next;me.next=null,A===null?R=He:A.next=He,A=me;var We=o.alternate;We!==null&&(We=We.updateQueue,k=We.lastBaseUpdate,k!==A&&(k===null?We.firstBaseUpdate=He:k.next=He,We.lastBaseUpdate=me))}if(R!==null){var Qe=x.baseState;A=0,We=He=me=null,k=R;do{var je=k.lane&-536870913,Fe=je!==k.lane;if(Fe?(Cn&je)===je:(g&je)===je){je!==0&&je===Zl&&(Ur=!0),We!==null&&(We=We.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Lt=o,Xt=k;je=i;var er=u;switch(Xt.tag){case 1:if(Lt=Xt.payload,typeof Lt=="function"){Qe=Lt.call(er,Qe,je);break e}Qe=Lt;break e;case 3:Lt.flags=Lt.flags&-65537|128;case 0:if(Lt=Xt.payload,je=typeof Lt=="function"?Lt.call(er,Qe,je):Lt,je==null)break e;Qe=b({},Qe,je);break e;case 2:wo=!0}}je=k.callback,je!==null&&(o.flags|=64,Fe&&(o.flags|=8192),Fe=x.callbacks,Fe===null?x.callbacks=[je]:Fe.push(je))}else Fe={lane:je,tag:k.tag,payload:k.payload,callback:k.callback,next:null},We===null?(He=We=Fe,me=Qe):We=We.next=Fe,A|=je;if(k=k.next,k===null){if(k=x.shared.pending,k===null)break;Fe=k,k=Fe.next,Fe.next=null,x.lastBaseUpdate=Fe,x.shared.pending=null}}while(!0);We===null&&(me=Qe),x.baseState=me,x.firstBaseUpdate=He,x.lastBaseUpdate=We,R===null&&(x.shared.lanes=0),zi|=A,o.lanes=A,o.memoizedState=Qe}}function Fo(o,i){if(typeof o!="function")throw Error(r(191,o));o.call(i)}function x2(o,i){var u=o.callbacks;if(u!==null)for(o.callbacks=null,o=0;oR?R:8;var A=N.T,k={};N.T=k,dc(o,!1,i,u);try{var me=x(),He=N.S;if(He!==null&&He(k,me),me!==null&&typeof me=="object"&&typeof me.then=="function"){var We=Ch(me,g);uc(o,i,We,no(o))}else uc(o,i,g,no(o))}catch(Qe){uc(o,i,{then:function(){},status:"rejected",reason:Qe},no())}finally{U.p=R,A!==null&&k.types!==null&&(A.types=k.types),N.T=A}}function P2(){}function Oi(o,i,u,g){if(o.tag!==5)throw Error(r(476));var x=W0(o).queue;Td(o,x,i,K,u===null?P2:function(){return G0(o),u(g)})}function W0(o){var i=o.memoizedState;if(i!==null)return i;i={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:K},next:null};var u={};return i.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:u},next:null},o.memoizedState=i,o=o.alternate,o!==null&&(o.memoizedState=i),i}function G0(o){var i=W0(o);i.next===null&&(i=o.alternate.memoizedState),uc(o,i.next.queue,{},no())}function X0(){return ra(Rc)}function K0(){return Tr().memoizedState}function ll(){return Tr().memoizedState}function O1(o){for(var i=o.return;i!==null;){switch(i.tag){case 24:case 3:var u=no();o=bi(u);var g=Ao(i,o,u);g!==null&&(La(g,i,u),f1(g,i,u)),i={cache:_o()},o.payload=i;return}i=i.return}}function Mh(o,i,u){var g=no();u={lane:g,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},x1(o)?S1(i,u):(u=f2(o,i,u,g),u!==null&&(La(u,o,g),L2(u,i,g)))}function Y0(o,i,u){var g=no();uc(o,i,u,g)}function uc(o,i,u,g){var x={lane:g,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(x1(o))S1(i,x);else{var R=o.alternate;if(o.lanes===0&&(R===null||R.lanes===0)&&(R=i.lastRenderedReducer,R!==null))try{var A=i.lastRenderedState,k=R(A,u);if(x.hasEagerState=!0,x.eagerState=k,wr(k,A))return ki(o,i,x,0),ar===null&&Io(),!1}catch{}if(u=f2(o,i,x,g),u!==null)return La(u,o,g),L2(u,i,g),!0}return!1}function dc(o,i,u,g){if(g={lane:2,revertLane:ro(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},x1(o)){if(i)throw Error(r(479))}else i=f2(o,u,g,2),i!==null&&La(i,o,2)}function x1(o){var i=o.alternate;return o===cn||i!==null&&i===cn}function S1(o,i){rc=g1=!0;var u=o.pending;u===null?i.next=i:(i.next=u.next,u.next=i),o.pending=i}function L2(o,i,u){if((u&4194048)!==0){var g=i.lanes;g&=o.pendingLanes,u|=g,i.lanes=u,at(o,u)}}var xi={readContext:ra,use:ic,useCallback:gr,useContext:gr,useEffect:gr,useImperativeHandle:gr,useLayoutEffect:gr,useInsertionEffect:gr,useMemo:gr,useReducer:gr,useRef:gr,useState:gr,useDebugValue:gr,useDeferredValue:gr,useTransition:gr,useSyncExternalStore:gr,useId:gr,useHostTransitionStatus:gr,useFormState:gr,useActionState:gr,useOptimistic:gr,useMemoCache:gr,useCacheRefresh:gr};xi.useEffectEvent=gr;var Hd={readContext:ra,use:ic,useCallback:function(o,i){return da().memoizedState=[o,i===void 0?null:i],o},useContext:ra,useEffect:N0,useImperativeHandle:function(o,i,u){u=u!=null?u.concat([o]):null,Do(4194308,4,U0.bind(null,i,o),u)},useLayoutEffect:function(o,i){return Do(4194308,4,o,i)},useInsertionEffect:function(o,i){Do(4,2,o,i)},useMemo:function(o,i){var u=da();i=i===void 0?null:i;var g=o();if(il){Ye(!0);try{o()}finally{Ye(!1)}}return u.memoizedState=[g,i],g},useReducer:function(o,i,u){var g=da();if(u!==void 0){var x=u(i);if(il){Ye(!0);try{u(i)}finally{Ye(!1)}}}else x=i;return g.memoizedState=g.baseState=x,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:x},g.queue=o,o=o.dispatch=Mh.bind(null,cn,o),[g.memoizedState,o]},useRef:function(o){var i=da();return o={current:o},i.memoizedState=o},useState:function(o){o=cc(o);var i=o.queue,u=Y0.bind(null,cn,i);return i.dispatch=u,[o.memoizedState,u]},useDebugValue:j2,useDeferredValue:function(o,i){var u=da();return So(u,o,i)},useTransition:function(){var o=cc(!1);return o=Td.bind(null,cn,o.queue,!0,!1),da().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,i,u){var g=cn,x=da();if(Tn){if(u===void 0)throw Error(r(407));u=u()}else{if(u=i(),ar===null)throw Error(r(349));(Cn&127)!==0||I0(g,i,u)}x.memoizedState=u;var R={value:u,getSnapshot:i};return x.queue=R,N0(xd.bind(null,g,R,o),[o]),g.flags|=2048,ka(9,{destroy:void 0},Od.bind(null,g,R,u,i),null),u},useId:function(){var o=da(),i=ar.identifierPrefix;if(Tn){var u=po,g=ls;u=(g&~(1<<32-Pt(g)-1)).toString(32)+u,i="_"+i+"R_"+u,u=$2++,0<\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof g.is=="string"?A.createElement("select",{is:g.is}):A.createElement("select"),g.multiple?R.multiple=!0:g.size&&(R.size=g.size);break;default:R=typeof g.is=="string"?A.createElement(x,{is:g.is}):A.createElement(x)}}R[et]=i,R[xt]=g;e:for(A=i.child;A!==null;){if(A.tag===5||A.tag===6)R.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===i)break e;for(;A.sibling===null;){if(A.return===null||A.return===i)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}i.stateNode=R;e:switch(sa(R,x,g),x){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Fs(i)}}return rr(i),o8(i,i.type,o===null?null:o.memoizedProps,i.pendingProps,u),null;case 6:if(o&&i.stateNode!=null)o.memoizedProps!==g&&Fs(i);else{if(typeof g!="string"&&i.stateNode===null)throw Error(r(166));if(o=le.current,nl(i)){if(o=i.stateNode,u=i.memoizedProps,g=null,x=Lr,x!==null)switch(x.tag){case 27:case 5:g=x.memoizedProps}o[et]=i,o=!!(o.nodeValue===u||g!==null&&g.suppressHydrationWarning===!0||Of(o.nodeValue,u)),o||hi(i,!0)}else o=J1(o).createTextNode(g),o[et]=i,i.stateNode=o}return rr(i),null;case 31:if(u=i.memoizedState,o===null||o.memoizedState!==null){if(g=nl(i),u!==null){if(o===null){if(!g)throw Error(r(318));if(o=i.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[et]=i}else ee(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;rr(i),o=!1}else u=mi(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=u),o=!0;if(!o)return i.flags&256?(Ea(i),i):(Ea(i),null);if((i.flags&128)!==0)throw Error(r(558))}return rr(i),null;case 13:if(g=i.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(x=nl(i),g!==null&&g.dehydrated!==null){if(o===null){if(!x)throw Error(r(318));if(x=i.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[et]=i}else ee(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;rr(i),x=!1}else x=mi(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=x),x=!0;if(!x)return i.flags&256?(Ea(i),i):(Ea(i),null)}return Ea(i),(i.flags&128)!==0?(i.lanes=u,i):(u=g!==null,o=o!==null&&o.memoizedState!==null,u&&(g=i.child,x=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(x=g.alternate.memoizedState.cachePool.pool),R=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(R=g.memoizedState.cachePool.pool),R!==x&&(g.flags|=2048)),u!==o&&u&&(i.child.flags|=8192),P1(i,i.updateQueue),rr(i),null);case 4:return Oe(),o===null&&L8(i.stateNode.containerInfo),rr(i),null;case 10:return _s(i.type),rr(i),null;case 19:if(W(Mr),g=i.memoizedState,g===null)return rr(i),null;if(x=(i.flags&128)!==0,R=g.rendering,R===null)if(x)L1(g,!1);else{if(xr!==0||o!==null&&(o.flags&128)!==0)for(o=i.child;o!==null;){if(R=S2(o),R!==null){for(i.flags|=128,L1(g,!1),o=R.updateQueue,i.updateQueue=o,P1(i,o),i.subtreeFlags=0,o=u,u=i.child;u!==null;)fd(u,o),u=u.sibling;return J(Mr,Mr.current&1|2),Tn&&Ka(i,g.treeForkCount),i.child}o=o.sibling}g.tail!==null&&mt()>dl&&(i.flags|=128,x=!0,L1(g,!1),i.lanes=4194304)}else{if(!x)if(o=S2(R),o!==null){if(i.flags|=128,x=!0,o=o.updateQueue,i.updateQueue=o,P1(i,o),L1(g,!0),g.tail===null&&g.tailMode==="hidden"&&!R.alternate&&!Tn)return rr(i),null}else 2*mt()-g.renderingStartTime>dl&&u!==536870912&&(i.flags|=128,x=!0,L1(g,!1),i.lanes=4194304);g.isBackwards?(R.sibling=i.child,i.child=R):(o=g.last,o!==null?o.sibling=R:i.child=R,g.last=R)}return g.tail!==null?(o=g.tail,g.rendering=o,g.tail=o.sibling,g.renderingStartTime=mt(),o.sibling=null,u=Mr.current,J(Mr,x?u&1|2:u&1),Tn&&Ka(i,g.treeForkCount),o):(rr(i),null);case 22:case 23:return Ea(i),h1(),g=i.memoizedState!==null,o!==null?o.memoizedState!==null!==g&&(i.flags|=8192):g&&(i.flags|=8192),g?(u&536870912)!==0&&(i.flags&128)===0&&(rr(i),i.subtreeFlags&6&&(i.flags|=8192)):rr(i),u=i.updateQueue,u!==null&&P1(i,u.retryQueue),u=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),g=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(g=i.memoizedState.cachePool.pool),g!==u&&(i.flags|=2048),o!==null&&W(ol),null;case 24:return u=null,o!==null&&(u=o.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),_s(Ir),rr(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function I1(o,i){switch(tl(i),i.tag){case 1:return o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 3:return _s(Ir),Oe(),o=i.flags,(o&65536)!==0&&(o&128)===0?(i.flags=o&-65537|128,i):null;case 26:case 27:case 5:return ye(i),null;case 31:if(i.memoizedState!==null){if(Ea(i),i.alternate===null)throw Error(r(340));ee()}return o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 13:if(Ea(i),o=i.memoizedState,o!==null&&o.dehydrated!==null){if(i.alternate===null)throw Error(r(340));ee()}return o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 19:return W(Mr),null;case 4:return Oe(),null;case 10:return _s(i.type),null;case 22:case 23:return Ea(i),h1(),o!==null&&W(ol),o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 24:return _s(Ir),null;case 25:return null;default:return null}}function q2(o,i){switch(tl(i),i.tag){case 3:_s(Ir),Oe();break;case 26:case 27:case 5:ye(i);break;case 4:Oe();break;case 31:i.memoizedState!==null&&Ea(i);break;case 13:Ea(i);break;case 19:W(Mr);break;case 10:_s(i.type);break;case 22:case 23:Ea(i),h1(),o!==null&&W(ol);break;case 24:_s(Ir)}}function hc(o,i){try{var u=i.updateQueue,g=u!==null?u.lastEffect:null;if(g!==null){var x=g.next;u=x;do{if((u.tag&o)===o){g=void 0;var R=u.create,A=u.inst;g=R(),A.destroy=g}u=u.next}while(u!==x)}}catch(k){Yn(i,i.return,k)}}function Ns(o,i,u){try{var g=i.updateQueue,x=g!==null?g.lastEffect:null;if(x!==null){var R=x.next;g=R;do{if((g.tag&o)===o){var A=g.inst,k=A.destroy;if(k!==void 0){A.destroy=void 0,x=i;var me=u,He=k;try{He()}catch(We){Yn(x,me,We)}}}g=g.next}while(g!==R)}}catch(We){Yn(i,i.return,We)}}function _1(o){var i=o.updateQueue;if(i!==null){var u=o.stateNode;try{x2(i,u)}catch(g){Yn(o,o.return,g)}}}function i8(o,i,u){u.props=ya(o.type,o.memoizedProps),u.state=o.memoizedState;try{u.componentWillUnmount()}catch(g){Yn(o,i,g)}}function Ta(o,i){try{var u=o.ref;if(u!==null){switch(o.tag){case 26:case 27:case 5:var g=o.stateNode;break;case 30:g=o.stateNode;break;default:g=o.stateNode}typeof u=="function"?o.refCleanup=u(g):u.current=g}}catch(x){Yn(o,i,x)}}function ha(o,i){var u=o.ref,g=o.refCleanup;if(u!==null)if(typeof g=="function")try{g()}catch(x){Yn(o,i,x)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){Yn(o,i,x)}else u.current=null}function Fd(o){var i=o.type,u=o.memoizedProps,g=o.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":u.autoFocus&&g.focus();break e;case"img":u.src?g.src=u.src:u.srcSet&&(g.srcset=u.srcSet)}}catch(x){Yn(o,o.return,x)}}function W2(o,i,u){try{var g=o.stateNode;qh(g,o.type,u,i),g[xt]=i}catch(x){Yn(o,o.return,x)}}function Nd(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&Yt(o.type)||o.tag===4}function l8(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Nd(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&Yt(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function c8(o,i,u){var g=o.tag;if(g===5||g===6)o=o.stateNode,i?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(o,i):(i=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,i.appendChild(o),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=Ms));else if(g!==4&&(g===27&&Yt(o.type)&&(u=o.stateNode,i=null),o=o.child,o!==null))for(c8(o,i,u),o=o.sibling;o!==null;)c8(o,i,u),o=o.sibling}function G2(o,i,u){var g=o.tag;if(g===5||g===6)o=o.stateNode,i?u.insertBefore(o,i):u.appendChild(o);else if(g!==4&&(g===27&&Yt(o.type)&&(u=o.stateNode),o=o.child,o!==null))for(G2(o,i,u),o=o.sibling;o!==null;)G2(o,i,u),o=o.sibling}function Dd(o){var i=o.stateNode,u=o.memoizedProps;try{for(var g=o.type,x=i.attributes;x.length;)i.removeAttributeNode(x[0]);sa(i,g,u),i[et]=o,i[xt]=u}catch(R){Yn(o,o.return,R)}}var Ds=!1,_r=!1,u8=!1,Ud=typeof WeakSet=="function"?WeakSet:Set,Qr=null;function jh(o,i){if(o=o.containerInfo,Z1=h3,o=ld(o),O0(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{u=(u=o.ownerDocument)&&u.defaultView||window;var g=u.getSelection&&u.getSelection();if(g&&g.rangeCount!==0){u=g.anchorNode;var x=g.anchorOffset,R=g.focusNode;g=g.focusOffset;try{u.nodeType,R.nodeType}catch{u=null;break e}var A=0,k=-1,me=-1,He=0,We=0,Qe=o,je=null;t:for(;;){for(var Fe;Qe!==u||x!==0&&Qe.nodeType!==3||(k=A+x),Qe!==R||g!==0&&Qe.nodeType!==3||(me=A+g),Qe.nodeType===3&&(A+=Qe.nodeValue.length),(Fe=Qe.firstChild)!==null;)je=Qe,Qe=Fe;for(;;){if(Qe===o)break t;if(je===u&&++He===x&&(k=A),je===R&&++We===g&&(me=A),(Fe=Qe.nextSibling)!==null)break;Qe=je,je=Qe.parentNode}Qe=Fe}u=k===-1||me===-1?null:{start:k,end:me}}else u=null}u=u||{start:0,end:0}}else u=null;for(B8={focusedElem:o,selectionRange:u},h3=!1,Qr=i;Qr!==null;)if(i=Qr,o=i.child,(i.subtreeFlags&1028)!==0&&o!==null)o.return=i,Qr=o;else for(;Qr!==null;){switch(i=Qr,R=i.alternate,o=i.flags,i.tag){case 0:if((o&4)!==0&&(o=i.updateQueue,o=o!==null?o.events:null,o!==null))for(u=0;u title"))),sa(R,g,u),R[et]=o,$n(R),g=R;break e;case"link":var A=Lf("link","href",x).get(g+(u.href||""));if(A){for(var k=0;ker&&(A=er,er=Xt,Xt=A);var ze=sd(k,Xt),we=sd(k,er);if(ze&&we&&(Fe.rangeCount!==1||Fe.anchorNode!==ze.node||Fe.anchorOffset!==ze.offset||Fe.focusNode!==we.node||Fe.focusOffset!==we.offset)){var Te=Qe.createRange();Te.setStart(ze.node,ze.offset),Fe.removeAllRanges(),Xt>er?(Fe.addRange(Te),Fe.extend(we.node,we.offset)):(Te.setEnd(we.node,we.offset),Fe.addRange(Te))}}}}for(Qe=[],Fe=k;Fe=Fe.parentNode;)Fe.nodeType===1&&Qe.push({element:Fe,left:Fe.scrollLeft,top:Fe.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;ku?32:u,N.T=null,u=w8,w8=null;var R=Ei,A=Ws;if(qr=0,vc=Ei=null,Ws=0,(Nn&6)!==0)throw Error(r(331));var k=Nn;if(Nn|=4,Zd(R.current),Kd(R,R.current,A,u),Nn=k,X1(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(ft,R)}catch{}return!0}finally{U.p=x,N.T=g,z8(o,i)}}function E8(o,i,u){i=Xa(u,i),i=k0(o.stateNode,i,2),o=Ao(o,i,2),o!==null&&(Ne(o,2),gs(o))}function Yn(o,i,u){if(o.tag===3)E8(o,o,u);else for(;i!==null;){if(i.tag===3){E8(i,o,u);break}else if(i.tag===1){var g=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Ri===null||!Ri.has(g))){o=Xa(u,o),u=fs(2),g=Ao(i,u,2),g!==null&&(V2(u,g,i,o),Ne(g,2),gs(g));break}}i=i.return}}function M8(o,i,u){var g=o.pingCache;if(g===null){g=o.pingCache=new Ih;var x=new Set;g.set(i,x)}else x=g.get(i),x===void 0&&(x=new Set,g.set(i,x));x.has(u)||(p8=!0,x.add(u),o=Ah.bind(null,o,i,u),i.then(o,o))}function Ah(o,i,u){var g=o.pingCache;g!==null&&g.delete(i),o.pingedLanes|=o.suspendedLanes&u,o.warmLanes&=~u,ar===o&&(Cn&u)===u&&(xr===4||xr===3&&(Cn&62914560)===Cn&&300>mt()-N1?(Nn&2)===0&&bc(o,0):v8|=u,pc===Cn&&(pc=0)),gs(o)}function G1(o,i){i===0&&(i=vt()),o=is(o,i),o!==null&&(Ne(o,i),gs(o))}function e3(o){var i=o.memoizedState,u=0;i!==null&&(u=i.retryLane),G1(o,u)}function Fh(o,i){var u=0;switch(o.tag){case 31:case 13:var g=o.stateNode,x=o.memoizedState;x!==null&&(u=x.retryLane);break;case 19:g=o.stateNode;break;case 22:g=o.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(i),G1(o,u)}function Nh(o,i){return ht(o,i)}var wc=null,fl=null,T8=!1,t3=!1,H8=!1,Mi=0;function gs(o){o!==fl&&o.next===null&&(fl===null?wc=fl=o:fl=fl.next=o),t3=!0,T8||(T8=!0,Uh())}function X1(o,i){if(!H8&&t3){H8=!0;do for(var u=!1,g=wc;g!==null;){if(o!==0){var x=g.pendingLanes;if(x===0)var R=0;else{var A=g.suspendedLanes,k=g.pingedLanes;R=(1<<31-Pt(42|o)+1)-1,R&=x&~(A&~k),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(u=!0,gf(g,R))}else R=Cn,R=Jt(g,g===ar?R:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(R&3)===0||lt(g,R)||(u=!0,gf(g,R));g=g.next}while(u);H8=!1}}function Dh(){ff()}function ff(){t3=T8=!1;var o=0;Mi!==0&&Wh()&&(o=Mi);for(var i=mt(),u=null,g=wc;g!==null;){var x=g.next,R=hf(g,i);R===0?(g.next=null,u===null?wc=x:u.next=x,x===null&&(fl=u)):(u=g,(o!==0||(R&3)!==0)&&(t3=!0)),g=x}qr!==0&&qr!==5||X1(o),Mi!==0&&(Mi=0)}function hf(o,i){for(var u=o.suspendedLanes,g=o.pingedLanes,x=o.expirationTimes,R=o.pendingLanes&-62914561;0k)break;var We=me.transferSize,Qe=me.initiatorType;We&&V8(Qe)&&(me=me.responseEnd,A+=We*(me"u"?null:document;function Tf(o,i,u){var g=ji;if(g&&typeof i=="string"&&i){var x=nn(i);x='link[rel="'+o+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),Mf.has(x)||(Mf.add(x),o={rel:o,crossOrigin:u,href:i},g.querySelector(x)===null&&(i=g.createElement("link"),sa(i,"link",o),$n(i),g.head.appendChild(i)))}}function D8(o){Ks.D(o),Tf("dns-prefetch",o,null)}function Zh(o,i){Ks.C(o,i),Tf("preconnect",o,i)}function Jh(o,i,u){Ks.L(o,i,u);var g=ji;if(g&&o&&i){var x='link[rel="preload"][as="'+nn(i)+'"]';i==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+nn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+nn(u.imageSizes)+'"]')):x+='[href="'+nn(o)+'"]';var R=x;switch(i){case"style":R=xc(o);break;case"script":R=$c(o)}Co.has(R)||(o=b({rel:"preload",href:i==="image"&&u&&u.imageSrcSet?void 0:o,as:i},u),Co.set(R,o),g.querySelector(x)!==null||i==="style"&&g.querySelector(Sc(R))||i==="script"&&g.querySelector(Cc(R))||(i=g.createElement("link"),sa(i,"link",o),$n(i),g.head.appendChild(i)))}}function kh(o,i){Ks.m(o,i);var u=ji;if(u&&o){var g=i&&typeof i.as=="string"?i.as:"script",x='link[rel="modulepreload"][as="'+nn(g)+'"][href="'+nn(o)+'"]',R=x;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=$c(o)}if(!Co.has(R)&&(o=b({rel:"modulepreload",href:o},i),Co.set(R,o),u.querySelector(x)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Cc(R)))return}g=u.createElement("link"),sa(g,"link",o),$n(g),u.head.appendChild(g)}}}function Zr(o,i,u){Ks.S(o,i,u);var g=ji;if(g&&o){var x=Mn(g).hoistableStyles,R=xc(o);i=i||"default";var A=x.get(R);if(!A){var k={loading:0,preload:null};if(A=g.querySelector(Sc(R)))k.loading=5;else{o=b({rel:"stylesheet",href:o,"data-precedence":i},u),(u=Co.get(R))&&U8(o,u);var me=A=g.createElement("link");$n(me),sa(me,"link",o),me._p=new Promise(function(He,We){me.onload=He,me.onerror=We}),me.addEventListener("load",function(){k.loading|=1}),me.addEventListener("error",function(){k.loading|=2}),k.loading|=4,l3(A,i,g)}A={type:"stylesheet",instance:A,count:1,state:k},x.set(R,A)}}}function Va(o,i){Ks.X(o,i);var u=ji;if(u&&o){var g=Mn(u).hoistableScripts,x=$c(o),R=g.get(x);R||(R=u.querySelector(Cc(x)),R||(o=b({src:o,async:!0},i),(i=Co.get(x))&&c3(o,i),R=u.createElement("script"),$n(R),sa(R,"link",o),u.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},g.set(x,R))}}function em(o,i){Ks.M(o,i);var u=ji;if(u&&o){var g=Mn(u).hoistableScripts,x=$c(o),R=g.get(x);R||(R=u.querySelector(Cc(x)),R||(o=b({src:o,async:!0,type:"module"},i),(i=Co.get(x))&&c3(o,i),R=u.createElement("script"),$n(R),sa(R,"link",o),u.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},g.set(x,R))}}function Hf(o,i,u,g){var x=(x=le.current)?i3(x):null;if(!x)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(i=xc(u.href),u=Mn(x).hoistableStyles,g=u.get(i),g||(g={type:"style",instance:null,count:0,state:null},u.set(i,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){o=xc(u.href);var R=Mn(x).hoistableStyles,A=R.get(o);if(A||(x=x.ownerDocument||x,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(o,A),(R=x.querySelector(Sc(o)))&&!R._p&&(A.instance=R,A.state.loading=5),Co.has(o)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Co.set(o,u),R||tm(x,o,u,A.state))),i&&g===null)throw Error(r(528,""));return A}if(i&&g!==null)throw Error(r(529,""));return null;case"script":return i=u.async,u=u.src,typeof u=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=$c(u),u=Mn(x).hoistableScripts,g=u.get(i),g||(g={type:"script",instance:null,count:0,state:null},u.set(i,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function xc(o){return'href="'+nn(o)+'"'}function Sc(o){return'link[rel="stylesheet"]['+o+"]"}function jf(o){return b({},o,{"data-precedence":o.precedence,precedence:null})}function tm(o,i,u,g){o.querySelector('link[rel="preload"][as="style"]['+i+"]")?g.loading=1:(i=o.createElement("link"),g.preload=i,i.addEventListener("load",function(){return g.loading|=1}),i.addEventListener("error",function(){return g.loading|=2}),sa(i,"link",u),$n(i),o.head.appendChild(i))}function $c(o){return'[src="'+nn(o)+'"]'}function Cc(o){return"script[async]"+o}function Pf(o,i,u){if(i.count++,i.instance===null)switch(i.type){case"style":var g=o.querySelector('style[data-href~="'+nn(u.href)+'"]');if(g)return i.instance=g,$n(g),g;var x=b({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return g=(o.ownerDocument||o).createElement("style"),$n(g),sa(g,"style",x),l3(g,u.precedence,o),i.instance=g;case"stylesheet":x=xc(u.href);var R=o.querySelector(Sc(x));if(R)return i.state.loading|=4,i.instance=R,$n(R),R;g=jf(u),(x=Co.get(x))&&U8(g,x),R=(o.ownerDocument||o).createElement("link"),$n(R);var A=R;return A._p=new Promise(function(k,me){A.onload=k,A.onerror=me}),sa(R,"link",g),i.state.loading|=4,l3(R,u.precedence,o),i.instance=R;case"script":return R=$c(u.src),(x=o.querySelector(Cc(R)))?(i.instance=x,$n(x),x):(g=u,(x=Co.get(R))&&(g=b({},u),c3(g,x)),o=o.ownerDocument||o,x=o.createElement("script"),$n(x),sa(x,"link",g),o.head.appendChild(x),i.instance=x);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(g=i.instance,i.state.loading|=4,l3(g,u.precedence,o));return i.instance}function l3(o,i,u){for(var g=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=g.length?g[g.length-1]:null,R=x,A=0;A title"):null)}function nm(o,i,u){if(u===1||i.itemProp!=null)return!1;switch(o){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"?(o=i.disabled,typeof i.precedence=="string"&&o==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 _f(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function zc(o,i,u,g){if(u.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var x=xc(g.href),R=i.querySelector(Sc(x));if(R){i=R._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(o.count++,o=u3.bind(o),i.then(o,o)),u.state.loading|=4,u.instance=R,$n(R);return}R=i.ownerDocument||i,g=jf(g),(x=Co.get(x))&&U8(g,x),R=R.createElement("link"),$n(R);var A=R;A._p=new Promise(function(k,me){A.onload=k,A.onerror=me}),sa(R,"link",g),u.instance=R}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(u,i),(i=u.state.preload)&&(u.state.loading&3)===0&&(o.count++,u=u3.bind(o),i.addEventListener("load",u),i.addEventListener("error",u))}}var q8=0;function rm(o,i){return o.stylesheets&&o.count===0&&f3(o,o.stylesheets),0q8?50:800)+i);return o.unsuspend=u,function(){o.unsuspend=null,clearTimeout(g),clearTimeout(x)}}:null}function u3(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)f3(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var d3=null;function f3(o,i){o.stylesheets=null,o.unsuspend!==null&&(o.count++,d3=new Map,i.forEach(Vf,o),d3=null,u3.call(o))}function Vf(o,i){if(!(i.state.loading&4)){var u=d3.get(o);if(u)var g=u.get(null);else{u=new Map,d3.set(o,u);for(var x=o.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),fm.exports=zW(),fm.exports}var EB=RW();const EW=z7(EB),MW="modulepreload",TW=function(t){return"/"+t},tL={},An=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let m=function(h){return Promise.all(h.map(v=>Promise.resolve(v).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");s=m(n.map(h=>{if(h=TW(h),h in tL)return;tL[h]=!0;const v=h.endsWith(".css"),b=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${b}`))return;const y=document.createElement("link");if(y.rel=v?"stylesheet":MW,v||(y.as="script"),y.crossOrigin="",y.href=h,d&&y.setAttribute("nonce",d),document.head.appendChild(y),v)return new Promise((O,w)=>{y.addEventListener("load",O),y.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return s.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return e().catch(l)})};var a=WH();const ae=z7(a),MB=yW({__proto__:null,default:ae},[a]);var TB=t=>{throw TypeError(t)},HW=(t,e,n)=>e.has(t)||TB("Cannot "+n),vm=(t,e,n)=>(HW(t,e,"read from private field"),n?n.call(t):e.get(t)),jW=(t,e,n)=>e.has(t)?TB("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),nL="popstate";function rL(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function PW(t={}){function e(r,s){let l=s.state?.masked,{pathname:c,search:d,hash:m}=l||r.location;return I6("",{pathname:c,search:d,hash:m},s.state&&s.state.usr||null,s.state&&s.state.key||"default",l?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,s){return typeof s=="string"?s:Ni(s)}return IW(e,n,null,t)}function xn(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Ar(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function LW(){return Math.random().toString(36).substring(2,10)}function aL(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function I6(t,e,n=null,r,s){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Rl(e):e,state:n,key:e&&e.key||r||LW(),unstable_mask:s}}function Ni({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Rl(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function IW(t,e,n,r={}){let{window:s=document.defaultView,v5Compat:l=!1}=r,c=s.history,d="POP",m=null,h=v();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function v(){return(c.state||{idx:null}).idx}function b(){d="POP";let C=v(),z=C==null?null:C-h;h=C,m&&m({action:d,location:S.location,delta:z})}function y(C,z){d="PUSH";let M=rL(C)?C:I6(S.location,C,z);h=v()+1;let T=aL(M,h),H=S.createHref(M.unstable_mask||M);try{c.pushState(T,"",H)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(H)}l&&m&&m({action:d,location:S.location,delta:1})}function O(C,z){d="REPLACE";let M=rL(C)?C:I6(S.location,C,z);h=v();let T=aL(M,h),H=S.createHref(M.unstable_mask||M);c.replaceState(T,"",H),l&&m&&m({action:d,location:S.location,delta:0})}function w(C){return HB(C)}let S={get action(){return d},get location(){return t(s,c)},listen(C){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(nL,b),m=C,()=>{s.removeEventListener(nL,b),m=null}},createHref(C){return e(s,C)},createURL:w,encodeLocation(C){let z=w(C);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:y,replace:O,go(C){return c.go(C)}};return S}function HB(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),xn(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:Ni(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var f6,oL=class{constructor(t){if(jW(this,f6,new Map),t)for(let[e,n]of t)this.set(e,n)}get(t){if(vm(this,f6).has(t))return vm(this,f6).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,e){vm(this,f6).set(t,e)}};f6=new WeakMap;var _W=new Set(["lazy","caseSensitive","path","id","index","children"]);function VW(t){return _W.has(t)}var BW=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function AW(t){return BW.has(t)}function FW(t){return t.index===!0}function _6(t,e,n=[],r={},s=!1){return t.map((l,c)=>{let d=[...n,String(c)],m=typeof l.id=="string"?l.id:d.join("-");if(xn(l.index!==!0||!l.children,"Cannot specify children on an index route"),xn(s||!r[m],`Found a route id collision on id "${m}". Route id's must be globally unique within Data Router usages`),FW(l)){let h={...l,id:m};return r[m]=sL(h,e(h)),h}else{let h={...l,id:m,children:void 0};return r[m]=sL(h,e(h)),l.children&&(h.children=_6(l.children,e,d,r,s)),h}})}function sL(t,e){return Object.assign(t,{...e,...typeof e.lazy=="object"&&e.lazy!=null?{lazy:{...t.lazy,...e.lazy}}:{}})}function Lc(t,e,n="/"){return h6(t,e,n,!1)}function h6(t,e,n,r){let s=typeof e=="string"?Rl(e):e,l=Os(s.pathname||"/",n);if(l==null)return null;let c=jB(t);DW(c);let d=null;for(let m=0;d==null&&m{let v={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(r)&&m)return;xn(v.relativePath.startsWith(r),`Absolute route path "${v.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(r.length)}let b=ks([r,v.relativePath]),y=n.concat(v);c.children&&c.children.length>0&&(xn(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),jB(c.children,e,y,b,m)),!(c.path==null&&!c.index)&&e.push({path:b,score:YW(b,c.index),routesMeta:y})};return t.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))l(c,d);else for(let m of PB(c.path))l(c,d,!0,m)}),e}function PB(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return s?[l,""]:[l];let c=PB(r.join("/")),d=[];return d.push(...c.map(m=>m===""?l:[l,m].join("/"))),s&&d.push(...c),d.map(m=>t.startsWith("/")&&m===""?"/":m)}function DW(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:QW(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var UW=/^:[\w-]+$/,qW=3,WW=2,GW=1,XW=10,KW=-2,iL=t=>t==="*";function YW(t,e){let n=t.split("/"),r=n.length;return n.some(iL)&&(r+=KW),e&&(r+=WW),n.filter(s=>!iL(s)).reduce((s,l)=>s+(UW.test(l)?qW:l===""?GW:XW),r)}function QW(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function ZW(t,e,n=!1){let{routesMeta:r}=t,s={},l="/",c=[];for(let d=0;d{if(v==="*"){let w=d[y]||"";c=l.slice(0,l.length-w.length).replace(/(.)\/+$/,"$1")}const O=d[y];return b&&!O?h[v]=void 0:h[v]=(O||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:c,pattern:t}}function JW(t,e=!1,n=!0){Ar(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,m,h,v)=>{if(r.push({paramName:d,isOptional:m!=null}),m){let b=v.charAt(h+c.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function kW(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ar(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Os(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function eG({basename:t,pathname:e}){return e==="/"?t:ks([t,e])}var LB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,GH=t=>LB.test(t);function tG(t,e="/"){let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?Rl(t):t,l;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?l=lL(n.substring(1),"/"):l=lL(n,e)):l=e,{pathname:l,search:rG(r),hash:aG(s)}}function lL(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function bm(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function IB(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function R7(t){let e=IB(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function su(t,e,n,r=!1){let s;typeof t=="string"?s=Rl(t):(s={...t},xn(!s.pathname||!s.pathname.includes("?"),bm("?","pathname","search",s)),xn(!s.pathname||!s.pathname.includes("#"),bm("#","pathname","hash",s)),xn(!s.search||!s.search.includes("#"),bm("#","search","hash",s)));let l=t===""||s.pathname==="",c=l?"/":s.pathname,d;if(c==null)d=n;else{let b=e.length-1;if(!r&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),b-=1;s.pathname=y.join("/")}d=b>=0?e[b]:"/"}let m=tG(s,d),h=c&&c!=="/"&&c.endsWith("/"),v=(l||c===".")&&n.endsWith("/");return!m.pathname.endsWith("/")&&(h||v)&&(m.pathname+="/"),m}var ks=t=>t.join("/").replace(/\/\/+/g,"/"),nG=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),rG=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,aG=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,iu=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function V6(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function lu(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var _B=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function VB(t,e){let n=t;if(typeof n!="string"||!LB.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(_B)try{let l=new URL(window.location.href),c=n.startsWith("//")?new URL(l.protocol+n):new URL(n),d=Os(c.pathname,e);c.origin===l.origin&&d!=null?n=d+c.search+c.hash:s=!0}catch{Ar(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}var Vc=Symbol("Uninstrumented");function oG(t,e){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(s=>s({id:e.id,index:e.index,path:e.path,instrument(l){let c=Object.keys(n);for(let d of c)l[d]&&n[d].push(l[d])}}));let r={};if(typeof e.lazy=="function"&&n.lazy.length>0){let s=j3(n.lazy,e.lazy,()=>{});s&&(r.lazy=s)}if(typeof e.lazy=="object"){let s=e.lazy;["middleware","loader","action"].forEach(l=>{let c=s[l],d=n[`lazy.${l}`];if(typeof c=="function"&&d.length>0){let m=j3(d,c,()=>{});m&&(r.lazy=Object.assign(r.lazy||{},{[l]:m}))}})}return["loader","action"].forEach(s=>{let l=e[s];if(typeof l=="function"&&n[s].length>0){let c=l[Vc]??l,d=j3(n[s],c,(...m)=>cL(m[0]));d&&(s==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[Vc]=c,r[s]=d)}}),e.middleware&&e.middleware.length>0&&n.middleware.length>0&&(r.middleware=e.middleware.map(s=>{let l=s[Vc]??s,c=j3(n.middleware,l,(...d)=>cL(d[0]));return c?(c[Vc]=l,c):s})),r}function sG(t,e){let n={navigate:[],fetch:[]};if(e.forEach(r=>r({instrument(s){let l=Object.keys(s);for(let c of l)s[c]&&n[c].push(s[c])}})),n.navigate.length>0){let r=t.navigate[Vc]??t.navigate,s=j3(n.navigate,r,(...l)=>{let[c,d]=l;return{to:typeof c=="number"||typeof c=="string"?c:c?Ni(c):".",...uL(t,d??{})}});s&&(s[Vc]=r,t.navigate=s)}if(n.fetch.length>0){let r=t.fetch[Vc]??t.fetch,s=j3(n.fetch,r,(...l)=>{let[c,,d,m]=l;return{href:d??".",fetcherKey:c,...uL(t,m??{})}});s&&(s[Vc]=r,t.fetch=s)}return t}function j3(t,e,n){return t.length===0?null:async(...r)=>{let s=await BB(t,n(...r),()=>e(...r),t.length-1);if(s.type==="error")throw s.value;return s.value}}async function BB(t,e,n,r){let s=t[r],l;if(s){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=BB(t,e,n,r-1),l=await c,xn(l,"Expected a result"),l.type==="error"&&l.value instanceof Error?{status:"error",error:l.value}:{status:"success",error:void 0});try{await s(d,e)}catch(m){console.error("An instrumentation function threw an error:",m)}c||await d(),await c}else try{l={type:"success",value:await n()}}catch(c){l={type:"error",value:c}}return l||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function cL(t){let{request:e,context:n,params:r,unstable_pattern:s}=t;return{request:iG(e),params:{...r},unstable_pattern:s,context:lG(n)}}function uL(t,e){return{currentUrl:Ni(t.state.location),..."formMethod"in e?{formMethod:e.formMethod}:{},..."formEncType"in e?{formEncType:e.formEncType}:{},..."formData"in e?{formData:e.formData}:{},..."body"in e?{body:e.body}:{}}}function iG(t){return{method:t.method,url:t.url,headers:{get:(...e)=>t.headers.get(...e)}}}function lG(t){if(uG(t)){let e={...t};return Object.freeze(e),e}else return{get:e=>t.get(e)}}var cG=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function uG(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null||Object.getOwnPropertyNames(e).sort().join("\0")===cG}var AB=["POST","PUT","PATCH","DELETE"],dG=new Set(AB),fG=["GET",...AB],hG=new Set(fG),FB=new Set([301,302,303,307,308]),mG=new Set([307,308]),ym={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},gG={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},k8={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},pG=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),NB="remix-router-transitions",DB=Symbol("ResetLoaderData");function vG(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u";xn(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],s=t.mapRouteProperties||pG,l=s;if(t.unstable_instrumentations){let re=t.unstable_instrumentations;l=ue=>({...s(ue),...oG(re.map(ge=>ge.route).filter(Boolean),ue)})}let c={},d=_6(t.routes,l,void 0,c),m,h=t.basename||"/";h.startsWith("/")||(h=`/${h}`);let v=t.dataStrategy||xG,b={...t.future},y=null,O=new Set,w=null,S=null,C=null,z=t.hydrationData!=null,M=Lc(d,t.history.location,h),T=!1,H=null,j,_;if(M==null&&!t.patchRoutesOnNavigation){let re=ws(404,{pathname:t.history.location.pathname}),{matches:ue,route:ge}=Zf(d);j=!0,_=!j,M=ue,H={[ge.id]:re}}else if(M&&!t.hydrationData&&rt(M,d,t.history.location.pathname).active&&(M=null),M)if(M.some(re=>re.route.lazy))j=!1,_=!j;else if(!M.some(re=>XH(re.route)))j=!0,_=!j;else{let re=t.hydrationData?t.hydrationData.loaderData:null,ue=t.hydrationData?t.hydrationData.errors:null,ge=M;if(ue){let Le=M.findIndex(De=>ue[De.route.id]!==void 0);ge=ge.slice(0,Le+1)}_=!1,j=ge.every(Le=>{let De=UB(Le.route,re,ue);return _=_||De.renderFallback,!De.shouldLoad})}else{j=!1,_=!j,M=[];let re=rt(null,d,t.history.location.pathname);re.active&&re.matches&&(T=!0,M=re.matches)}let P,L={historyAction:t.history.action,location:t.history.location,matches:M,initialized:j,renderFallback:_,navigation:ym,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||H,fetchers:new Map,blockers:new Map},V="POP",D=null,F=!1,X,Q=!1,Y=new Map,q=null,N=!1,U=!1,K=new Set,Z=new Map,te=0,B=-1,W=new Map,J=new Set,se=new Map,ie=new Map,le=new Set,ce=new Map,he,Oe=null;function fe(){if(y=t.history.listen(({action:re,location:ue,delta:ge})=>{if(he){he(),he=void 0;return}Ar(ce.size===0||ge!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Le=$t({currentLocation:L.location,nextLocation:ue,historyAction:re});if(Le&&ge!=null){let De=new Promise(it=>{he=it});t.history.go(ge*-1),Ct(Le,{state:"blocked",location:ue,proceed(){Ct(Le,{state:"proceeding",proceed:void 0,reset:void 0,location:ue}),De.then(()=>t.history.go(ge))},reset(){let it=new Map(L.blockers);it.set(Le,k8),xe({blockers:it})}}),D?.resolve(),D=null;return}return Me(re,ue)}),n){FG(e,Y);let re=()=>NG(e,Y);e.addEventListener("pagehide",re),q=()=>e.removeEventListener("pagehide",re)}return L.initialized||Me("POP",L.location,{initialHydration:!0}),P}function ye(){y&&y(),q&&q(),O.clear(),X&&X.abort(),L.fetchers.forEach((re,ue)=>ft(ue)),L.blockers.forEach((re,ue)=>Ft(ue))}function ve(re){return O.add(re),()=>O.delete(re)}function xe(re,ue={}){re.matches&&(re.matches=re.matches.map(De=>{let it=c[De.route.id],et=De.route;return et.element!==it.element||et.errorElement!==it.errorElement||et.hydrateFallbackElement!==it.hydrateFallbackElement?{...De,route:it}:De})),L={...L,...re};let ge=[],Le=[];L.fetchers.forEach((De,it)=>{De.state==="idle"&&(le.has(it)?ge.push(it):Le.push(it))}),le.forEach(De=>{!L.fetchers.has(De)&&!Z.has(De)&&ge.push(De)}),[...O].forEach(De=>De(L,{deletedFetchers:ge,newErrors:re.errors??null,viewTransitionOpts:ue.viewTransitionOpts,flushSync:ue.flushSync===!0})),ge.forEach(De=>ft(De)),Le.forEach(De=>L.fetchers.delete(De))}function Re(re,ue,{flushSync:ge}={}){let Le=L.actionData!=null&&L.navigation.formMethod!=null&&Aa(L.navigation.formMethod)&&L.navigation.state==="loading"&&re.state?._isRedirect!==!0,De;ue.actionData?Object.keys(ue.actionData).length>0?De=ue.actionData:De=null:Le?De=L.actionData:De=null;let it=ue.loaderData?wL(L.loaderData,ue.loaderData,ue.matches||[],ue.errors):L.loaderData,et=L.blockers;et.size>0&&(et=new Map(et),et.forEach((bt,Ue)=>et.set(Ue,k8)));let xt=N?!1:vt(re,ue.matches||L.matches),wt=F===!0||L.navigation.formMethod!=null&&Aa(L.navigation.formMethod)&&re.state?._isRedirect!==!0;m&&(d=m,m=void 0),N||V==="POP"||(V==="PUSH"?t.history.push(re,re.state):V==="REPLACE"&&t.history.replace(re,re.state));let Xe;if(V==="POP"){let bt=Y.get(L.location.pathname);bt&&bt.has(re.pathname)?Xe={currentLocation:L.location,nextLocation:re}:Y.has(re.pathname)&&(Xe={currentLocation:re,nextLocation:L.location})}else if(Q){let bt=Y.get(L.location.pathname);bt?bt.add(re.pathname):(bt=new Set([re.pathname]),Y.set(L.location.pathname,bt)),Xe={currentLocation:L.location,nextLocation:re}}xe({...ue,actionData:De,loaderData:it,historyAction:V,location:re,initialized:!0,renderFallback:!1,navigation:ym,revalidation:"idle",restoreScrollPosition:xt,preventScrollReset:wt,blockers:et},{viewTransitionOpts:Xe,flushSync:ge===!0}),V="POP",F=!1,Q=!1,N=!1,U=!1,D?.resolve(),D=null,Oe?.resolve(),Oe=null}async function $e(re,ue){if(D?.resolve(),D=null,typeof re=="number"){D||(D=$L());let Nt=D.promise;return t.history.go(re),Nt}let ge=Rg(L.location,L.matches,h,re,ue?.fromRouteId,ue?.relative),{path:Le,submission:De,error:it}=dL(!1,ge,ue),et;ue?.unstable_mask&&(et={pathname:"",search:"",hash:"",...typeof ue.unstable_mask=="string"?Rl(ue.unstable_mask):{...L.location.unstable_mask,...ue.unstable_mask}});let xt=L.location,wt=I6(xt,Le,ue&&ue.state,void 0,et);wt={...wt,...t.history.encodeLocation(wt)};let Xe=ue&&ue.replace!=null?ue.replace:void 0,bt="PUSH";Xe===!0?bt="REPLACE":Xe===!1||De!=null&&Aa(De.formMethod)&&De.formAction===L.location.pathname+L.location.search&&(bt="REPLACE");let Ue=ue&&"preventScrollReset"in ue?ue.preventScrollReset===!0:void 0,St=(ue&&ue.flushSync)===!0,Ht=$t({currentLocation:xt,nextLocation:wt,historyAction:bt});if(Ht){Ct(Ht,{state:"blocked",location:wt,proceed(){Ct(Ht,{state:"proceeding",proceed:void 0,reset:void 0,location:wt}),$e(re,ue)},reset(){let Nt=new Map(L.blockers);Nt.set(Ht,k8),xe({blockers:Nt})}});return}await Me(bt,wt,{submission:De,pendingError:it,preventScrollReset:Ue,replace:ue&&ue.replace,enableViewTransition:ue&&ue.viewTransition,flushSync:St,callSiteDefaultShouldRevalidate:ue&&ue.unstable_defaultShouldRevalidate})}function _e(){Oe||(Oe=$L()),ct(),xe({revalidation:"loading"});let re=Oe.promise;return L.navigation.state==="submitting"?re:L.navigation.state==="idle"?(Me(L.historyAction,L.location,{startUninterruptedRevalidation:!0}),re):(Me(V||L.historyAction,L.navigation.location,{overrideNavigation:L.navigation,enableViewTransition:Q===!0}),re)}async function Me(re,ue,ge){X&&X.abort(),X=null,V=re,N=(ge&&ge.startUninterruptedRevalidation)===!0,gt(L.location,L.matches),F=(ge&&ge.preventScrollReset)===!0,Q=(ge&&ge.enableViewTransition)===!0;let Le=m||d,De=ge&&ge.overrideNavigation,it=ge?.initialHydration&&L.matches&&L.matches.length>0&&!T?L.matches:Lc(Le,ue,h),et=(ge&&ge.flushSync)===!0;if(it&&L.initialized&&!U&&TG(L.location,ue)&&!(ge&&ge.submission&&Aa(ge.submission.formMethod))){Re(ue,{matches:it},{flushSync:et});return}let xt=rt(it,Le,ue.pathname);if(xt.active&&xt.matches&&(it=xt.matches),!it){let{error:Kt,notFoundMatches:kt,route:Gt}=Vt(ue.pathname);Re(ue,{matches:kt,loaderData:{},errors:{[Gt.id]:Kt}},{flushSync:et});return}X=new AbortController;let wt=H3(t.history,ue,X.signal,ge&&ge.submission),Xe=t.getContext?await t.getContext():new oL,bt;if(ge&&ge.pendingError)bt=[Ic(it).route.id,{type:"error",error:ge.pendingError}];else if(ge&&ge.submission&&Aa(ge.submission.formMethod)){let Kt=await Pe(wt,ue,ge.submission,it,Xe,xt.active,ge&&ge.initialHydration===!0,{replace:ge.replace,flushSync:et});if(Kt.shortCircuited)return;if(Kt.pendingActionResult){let[kt,Gt]=Kt.pendingActionResult;if(ko(Gt)&&V6(Gt.error)&&Gt.error.status===404){X=null,Re(ue,{matches:Kt.matches,loaderData:{},errors:{[kt]:Gt.error}});return}}it=Kt.matches||it,bt=Kt.pendingActionResult,De=wm(ue,ge.submission),et=!1,xt.active=!1,wt=H3(t.history,wt.url,wt.signal)}let{shortCircuited:Ue,matches:St,loaderData:Ht,errors:Nt}=await Ae(wt,ue,it,Xe,xt.active,De,ge&&ge.submission,ge&&ge.fetcherSubmission,ge&&ge.replace,ge&&ge.initialHydration===!0,et,bt,ge&&ge.callSiteDefaultShouldRevalidate);Ue||(X=null,Re(ue,{matches:St||it,...OL(bt),loaderData:Ht,errors:Nt}))}async function Pe(re,ue,ge,Le,De,it,et,xt={}){ct();let wt=BG(ue,ge);if(xe({navigation:wt},{flushSync:xt.flushSync===!0}),it){let Ue=await Ne(Le,ue.pathname,re.signal);if(Ue.type==="aborted")return{shortCircuited:!0};if(Ue.type==="error"){if(Ue.partialMatches.length===0){let{matches:Ht,route:Nt}=Zf(d);return{matches:Ht,pendingActionResult:[Nt.id,{type:"error",error:Ue.error}]}}let St=Ic(Ue.partialMatches).route.id;return{matches:Ue.partialMatches,pendingActionResult:[St,{type:"error",error:Ue.error}]}}else if(Ue.matches)Le=Ue.matches;else{let{notFoundMatches:St,error:Ht,route:Nt}=Vt(ue.pathname);return{matches:St,pendingActionResult:[Nt.id,{type:"error",error:Ht}]}}}let Xe,bt=w5(Le,ue);if(!bt.route.action&&!bt.route.lazy)Xe={type:"error",error:ws(405,{method:re.method,pathname:ue.pathname,routeId:bt.route.id})};else{let Ue=V3(l,c,re,Le,bt,et?[]:r,De),St=await zt(re,Ue,De,null);if(Xe=St[bt.route.id],!Xe){for(let Ht of Le)if(St[Ht.route.id]){Xe=St[Ht.route.id];break}}if(re.signal.aborted)return{shortCircuited:!0}}if(g4(Xe)){let Ue;return xt&&xt.replace!=null?Ue=xt.replace:Ue=vL(Xe.response.headers.get("Location"),new URL(re.url),h,t.history)===L.location.pathname+L.location.search,await Ot(re,Xe,!0,{submission:ge,replace:Ue}),{shortCircuited:!0}}if(ko(Xe)){let Ue=Ic(Le,bt.route.id);return(xt&&xt.replace)!==!0&&(V="PUSH"),{matches:Le,pendingActionResult:[Ue.route.id,Xe,bt.route.id]}}return{matches:Le,pendingActionResult:[bt.route.id,Xe]}}async function Ae(re,ue,ge,Le,De,it,et,xt,wt,Xe,bt,Ue,St){let Ht=it||wm(ue,et),Nt=et||xt||SL(Ht),Kt=!N&&!Xe;if(De){if(Kt){let Dn=ht(Ue);xe({navigation:Ht,...Dn!==void 0?{actionData:Dn}:{}},{flushSync:bt})}let on=await Ne(ge,ue.pathname,re.signal);if(on.type==="aborted")return{shortCircuited:!0};if(on.type==="error"){if(on.partialMatches.length===0){let{matches:$r,route:or}=Zf(d);return{matches:$r,loaderData:{},errors:{[or.id]:on.error}}}let Dn=Ic(on.partialMatches).route.id;return{matches:on.partialMatches,loaderData:{},errors:{[Dn]:on.error}}}else if(on.matches)ge=on.matches;else{let{error:Dn,notFoundMatches:$r,route:or}=Vt(ue.pathname);return{matches:$r,loaderData:{},errors:{[or.id]:Dn}}}}let kt=m||d,{dsMatches:Gt,revalidatingFetchers:Mn}=fL(re,Le,l,c,t.history,L,ge,Nt,ue,Xe?[]:r,Xe===!0,U,K,le,se,J,kt,h,t.patchRoutesOnNavigation!=null,Ue,St);if(B=++te,!t.dataStrategy&&!Gt.some(on=>on.shouldLoad)&&!Gt.some(on=>on.route.middleware&&on.route.middleware.length>0)&&Mn.length===0){let on=en();return Re(ue,{matches:ge,loaderData:{},errors:Ue&&ko(Ue[1])?{[Ue[0]]:Ue[1].error}:null,...OL(Ue),...on?{fetchers:new Map(L.fetchers)}:{}},{flushSync:bt}),{shortCircuited:!0}}if(Kt){let on={};if(!De){on.navigation=Ht;let Dn=ht(Ue);Dn!==void 0&&(on.actionData=Dn)}Mn.length>0&&(on.fetchers=Ve(Mn)),xe(on,{flushSync:bt})}Mn.forEach(on=>{Ye(on.key),on.controller&&Z.set(on.key,on.controller)});let $n=()=>Mn.forEach(on=>Ye(on.key));X&&X.signal.addEventListener("abort",$n);let{loaderResults:Kr,fetcherResults:Yr}=await pt(Gt,Mn,re,Le);if(re.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",$n),Mn.forEach(on=>Z.delete(on.key));let bn=Jf(Kr);if(bn)return await Ot(re,bn.result,!0,{replace:wt}),{shortCircuited:!0};if(bn=Jf(Yr),bn)return J.add(bn.key),await Ot(re,bn.result,!0,{replace:wt}),{shortCircuited:!0};let{loaderData:Nr,errors:co}=yL(L,ge,Kr,Ue,Mn,Yr);Xe&&L.errors&&(co={...L.errors,...co});let Dt=en(),br=It(B),yr=Dt||br||Mn.length>0;return{matches:ge,loaderData:Nr,errors:co,...yr?{fetchers:new Map(L.fetchers)}:{}}}function ht(re){if(re&&!ko(re[1]))return{[re[0]]:re[1].data};if(L.actionData)return Object.keys(L.actionData).length===0?null:L.actionData}function Ve(re){return re.forEach(ue=>{let ge=L.fetchers.get(ue.key),Le=e6(void 0,ge?ge.data:void 0);L.fetchers.set(ue.key,Le)}),new Map(L.fetchers)}async function Ze(re,ue,ge,Le){Ye(re);let De=(Le&&Le.flushSync)===!0,it=m||d,et=Rg(L.location,L.matches,h,ge,ue,Le?.relative),xt=Lc(it,et,h),wt=rt(xt,it,et);if(wt.active&&wt.matches&&(xt=wt.matches),!xt){ut(re,ue,ws(404,{pathname:et}),{flushSync:De});return}let{path:Xe,submission:bt,error:Ue}=dL(!0,et,Le);if(Ue){ut(re,ue,Ue,{flushSync:De});return}let St=t.getContext?await t.getContext():new oL,Ht=(Le&&Le.preventScrollReset)===!0;if(bt&&Aa(bt.formMethod)){await st(re,ue,Xe,xt,St,wt.active,De,Ht,bt,Le&&Le.unstable_defaultShouldRevalidate);return}se.set(re,{routeId:ue,path:Xe}),await mt(re,ue,Xe,xt,St,wt.active,De,Ht,bt)}async function st(re,ue,ge,Le,De,it,et,xt,wt,Xe){ct(),se.delete(re);let bt=L.fetchers.get(re);yt(re,AG(wt,bt),{flushSync:et});let Ue=new AbortController,St=H3(t.history,ge,Ue.signal,wt);if(it){let _n=await Ne(Le,new URL(St.url).pathname,St.signal,re);if(_n.type==="aborted")return;if(_n.type==="error"){ut(re,ue,_n.error,{flushSync:et});return}else if(_n.matches)Le=_n.matches;else{ut(re,ue,ws(404,{pathname:ge}),{flushSync:et});return}}let Ht=w5(Le,ge);if(!Ht.route.action&&!Ht.route.lazy){let _n=ws(405,{method:wt.formMethod,pathname:ge,routeId:ue});ut(re,ue,_n,{flushSync:et});return}Z.set(re,Ue);let Nt=te,Kt=V3(l,c,St,Le,Ht,r,De),kt=await zt(St,Kt,De,re),Gt=kt[Ht.route.id];if(!Gt){for(let _n of Kt)if(kt[_n.route.id]){Gt=kt[_n.route.id];break}}if(St.signal.aborted){Z.get(re)===Ue&&Z.delete(re);return}if(le.has(re)){if(g4(Gt)||ko(Gt)){yt(re,pl(void 0));return}}else{if(g4(Gt))if(Z.delete(re),B>Nt){yt(re,pl(void 0));return}else return J.add(re),yt(re,e6(wt)),Ot(St,Gt,!1,{fetcherSubmission:wt,preventScrollReset:xt});if(ko(Gt)){ut(re,ue,Gt.error);return}}let Mn=L.navigation.location||L.location,$n=H3(t.history,Mn,Ue.signal),Kr=m||d,Yr=L.navigation.state!=="idle"?Lc(Kr,L.navigation.location,h):L.matches;xn(Yr,"Didn't find any matches after fetcher action");let bn=++te;W.set(re,bn);let Nr=e6(wt,Gt.data);L.fetchers.set(re,Nr);let{dsMatches:co,revalidatingFetchers:Dt}=fL($n,De,l,c,t.history,L,Yr,wt,Mn,r,!1,U,K,le,se,J,Kr,h,t.patchRoutesOnNavigation!=null,[Ht.route.id,Gt],Xe);Dt.filter(_n=>_n.key!==re).forEach(_n=>{let Rs=_n.key,Ho=L.fetchers.get(Rs),jo=e6(void 0,Ho?Ho.data:void 0);L.fetchers.set(Rs,jo),Ye(Rs),_n.controller&&Z.set(Rs,_n.controller)}),xe({fetchers:new Map(L.fetchers)});let br=()=>Dt.forEach(_n=>Ye(_n.key));Ue.signal.addEventListener("abort",br);let{loaderResults:yr,fetcherResults:on}=await pt(co,Dt,$n,De);if(Ue.signal.aborted)return;if(Ue.signal.removeEventListener("abort",br),W.delete(re),Z.delete(re),Dt.forEach(_n=>Z.delete(_n.key)),L.fetchers.has(re)){let _n=pl(Gt.data);L.fetchers.set(re,_n)}let Dn=Jf(yr);if(Dn)return Ot($n,Dn.result,!1,{preventScrollReset:xt});if(Dn=Jf(on),Dn)return J.add(Dn.key),Ot($n,Dn.result,!1,{preventScrollReset:xt});let{loaderData:$r,errors:or}=yL(L,Yr,yr,void 0,Dt,on);It(bn),L.navigation.state==="loading"&&bn>B?(xn(V,"Expected pending action"),X&&X.abort(),Re(L.navigation.location,{matches:Yr,loaderData:$r,errors:or,fetchers:new Map(L.fetchers)})):(xe({errors:or,loaderData:wL(L.loaderData,$r,Yr,or),fetchers:new Map(L.fetchers)}),U=!1)}async function mt(re,ue,ge,Le,De,it,et,xt,wt){let Xe=L.fetchers.get(re);yt(re,e6(wt,Xe?Xe.data:void 0),{flushSync:et});let bt=new AbortController,Ue=H3(t.history,ge,bt.signal);if(it){let Gt=await Ne(Le,new URL(Ue.url).pathname,Ue.signal,re);if(Gt.type==="aborted")return;if(Gt.type==="error"){ut(re,ue,Gt.error,{flushSync:et});return}else if(Gt.matches)Le=Gt.matches;else{ut(re,ue,ws(404,{pathname:ge}),{flushSync:et});return}}let St=w5(Le,ge);Z.set(re,bt);let Ht=te,Nt=V3(l,c,Ue,Le,St,r,De),kt=(await zt(Ue,Nt,De,re))[St.route.id];if(Z.get(re)===bt&&Z.delete(re),!Ue.signal.aborted){if(le.has(re)){yt(re,pl(void 0));return}if(g4(kt))if(B>Ht){yt(re,pl(void 0));return}else{J.add(re),await Ot(Ue,kt,!1,{preventScrollReset:xt});return}if(ko(kt)){ut(re,ue,kt.error);return}yt(re,pl(kt.data))}}async function Ot(re,ue,ge,{submission:Le,fetcherSubmission:De,preventScrollReset:it,replace:et}={}){ge||(D?.resolve(),D=null),ue.response.headers.has("X-Remix-Revalidate")&&(U=!0);let xt=ue.response.headers.get("Location");xn(xt,"Expected a Location header on the redirect Response"),xt=vL(xt,new URL(re.url),h,t.history);let wt=I6(L.location,xt,{_isRedirect:!0});if(n){let Nt=!1;if(ue.response.headers.has("X-Remix-Reload-Document"))Nt=!0;else if(GH(xt)){const Kt=HB(xt,!0);Nt=Kt.origin!==e.location.origin||Os(Kt.pathname,h)==null}if(Nt){et?e.location.replace(xt):e.location.assign(xt);return}}X=null;let Xe=et===!0||ue.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:bt,formAction:Ue,formEncType:St}=L.navigation;!Le&&!De&&bt&&Ue&&St&&(Le=SL(L.navigation));let Ht=Le||De;if(mG.has(ue.response.status)&&Ht&&Aa(Ht.formMethod))await Me(Xe,wt,{submission:{...Ht,formAction:xt},preventScrollReset:it||F,enableViewTransition:ge?Q:void 0});else{let Nt=wm(wt,Le);await Me(Xe,wt,{overrideNavigation:Nt,fetcherSubmission:De,preventScrollReset:it||F,enableViewTransition:ge?Q:void 0})}}async function zt(re,ue,ge,Le){let De,it={};try{De=await $G(v,re,ue,Le,ge,!1)}catch(et){return ue.filter(xt=>xt.shouldLoad).forEach(xt=>{it[xt.route.id]={type:"error",error:et}}),it}if(re.signal.aborted)return it;if(!Aa(re.method))for(let et of ue){if(De[et.route.id]?.type==="error")break;!De.hasOwnProperty(et.route.id)&&!L.loaderData.hasOwnProperty(et.route.id)&&(!L.errors||!L.errors.hasOwnProperty(et.route.id))&&et.shouldCallHandler()&&(De[et.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${et.route.id}`)})}for(let[et,xt]of Object.entries(De))if(LG(xt)){let wt=xt.result;it[et]={type:"redirect",response:EG(wt,re,et,ue,h)}}else it[et]=await RG(xt);return it}async function pt(re,ue,ge,Le){let De=zt(ge,re,Le,null),it=Promise.all(ue.map(async wt=>{if(wt.matches&&wt.match&&wt.request&&wt.controller){let bt=(await zt(wt.request,wt.matches,Le,wt.key))[wt.match.route.id];return{[wt.key]:bt}}else return Promise.resolve({[wt.key]:{type:"error",error:ws(404,{pathname:wt.path})}})})),et=await De,xt=(await it).reduce((wt,Xe)=>Object.assign(wt,Xe),{});return{loaderResults:et,fetcherResults:xt}}function ct(){U=!0,se.forEach((re,ue)=>{Z.has(ue)&&K.add(ue),Ye(ue)})}function yt(re,ue,ge={}){L.fetchers.set(re,ue),xe({fetchers:new Map(L.fetchers)},{flushSync:(ge&&ge.flushSync)===!0})}function ut(re,ue,ge,Le={}){let De=Ic(L.matches,ue);ft(re),xe({errors:{[De.route.id]:ge},fetchers:new Map(L.fetchers)},{flushSync:(Le&&Le.flushSync)===!0})}function tt(re){return ie.set(re,(ie.get(re)||0)+1),le.has(re)&&le.delete(re),L.fetchers.get(re)||gG}function dt(re,ue){Ye(re,ue?.reason),yt(re,pl(null))}function ft(re){let ue=L.fetchers.get(re);Z.has(re)&&!(ue&&ue.state==="loading"&&W.has(re))&&Ye(re),se.delete(re),W.delete(re),J.delete(re),le.delete(re),K.delete(re),L.fetchers.delete(re)}function nt(re){let ue=(ie.get(re)||0)-1;ue<=0?(ie.delete(re),le.add(re)):ie.set(re,ue),xe({fetchers:new Map(L.fetchers)})}function Ye(re,ue){let ge=Z.get(re);ge&&(ge.abort(ue),Z.delete(re))}function Pt(re){for(let ue of re){let ge=tt(ue),Le=pl(ge.data);L.fetchers.set(ue,Le)}}function en(){let re=[],ue=!1;for(let ge of J){let Le=L.fetchers.get(ge);xn(Le,`Expected fetcher: ${ge}`),Le.state==="loading"&&(J.delete(ge),re.push(ge),ue=!0)}return Pt(re),ue}function It(re){let ue=[];for(let[ge,Le]of W)if(Le0}function vn(re,ue){let ge=L.blockers.get(re)||k8;return ce.get(re)!==ue&&ce.set(re,ue),ge}function Ft(re){L.blockers.delete(re),ce.delete(re)}function Ct(re,ue){let ge=L.blockers.get(re)||k8;xn(ge.state==="unblocked"&&ue.state==="blocked"||ge.state==="blocked"&&ue.state==="blocked"||ge.state==="blocked"&&ue.state==="proceeding"||ge.state==="blocked"&&ue.state==="unblocked"||ge.state==="proceeding"&&ue.state==="unblocked",`Invalid blocker state transition: ${ge.state} -> ${ue.state}`);let Le=new Map(L.blockers);Le.set(re,ue),xe({blockers:Le})}function $t({currentLocation:re,nextLocation:ue,historyAction:ge}){if(ce.size===0)return;ce.size>1&&Ar(!1,"A router only supports one blocker at a time");let Le=Array.from(ce.entries()),[De,it]=Le[Le.length-1],et=L.blockers.get(De);if(!(et&&et.state==="proceeding")&&it({currentLocation:re,nextLocation:ue,historyAction:ge}))return De}function Vt(re){let ue=ws(404,{pathname:re}),ge=m||d,{matches:Le,route:De}=Zf(ge);return{notFoundMatches:Le,route:De,error:ue}}function Jt(re,ue,ge){if(w=re,C=ue,S=ge||null,!z&&L.navigation===ym){z=!0;let Le=vt(L.location,L.matches);Le!=null&&xe({restoreScrollPosition:Le})}return()=>{w=null,C=null,S=null}}function lt(re,ue){return S&&S(re,ue.map(Le=>NW(Le,L.loaderData)))||re.key}function gt(re,ue){if(w&&C){let ge=lt(re,ue);w[ge]=C()}}function vt(re,ue){if(w){let ge=lt(re,ue),Le=w[ge];if(typeof Le=="number")return Le}return null}function rt(re,ue,ge){if(t.patchRoutesOnNavigation)if(re){if(Object.keys(re[0].params).length>0)return{active:!0,matches:h6(ue,ge,h,!0)}}else return{active:!0,matches:h6(ue,ge,h,!0)||[]};return{active:!1,matches:null}}async function Ne(re,ue,ge,Le){if(!t.patchRoutesOnNavigation)return{type:"success",matches:re};let De=re;for(;;){let it=m==null,et=m||d,xt=c;try{await t.patchRoutesOnNavigation({signal:ge,path:ue,matches:De,fetcherKey:Le,patch:(bt,Ue)=>{ge.aborted||hL(bt,Ue,et,xt,l,!1)}})}catch(bt){return{type:"error",error:bt,partialMatches:De}}finally{it&&!ge.aborted&&(d=[...d])}if(ge.aborted)return{type:"aborted"};let wt=Lc(et,ue,h),Xe=null;if(wt){if(Object.keys(wt[0].params).length===0)return{type:"success",matches:wt};if(Xe=h6(et,ue,h,!0),!(Xe&&De.lengthge.route.id===ue[Le].route.id)}function Rt(re){c={},m=_6(re,l,void 0,c)}function at(re,ue,ge=!1){let Le=m==null;hL(re,ue,m||d,c,l,ge),Le&&(d=[...d],xe({}))}return P={get basename(){return h},get future(){return b},get state(){return L},get routes(){return d},get window(){return e},initialize:fe,subscribe:ve,enableScrollRestoration:Jt,navigate:$e,fetch:Ze,revalidate:_e,createHref:re=>t.history.createHref(re),encodeLocation:re=>t.history.encodeLocation(re),getFetcher:tt,resetFetcher:dt,deleteFetcher:nt,dispose:ye,getBlocker:vn,deleteBlocker:Ft,patchRoutes:at,_internalFetchControllers:Z,_internalSetRoutes:Rt,_internalSetStateDoNotUseOrYouWillBreakYourApp(re){xe(re)}},t.unstable_instrumentations&&(P=sG(P,t.unstable_instrumentations.map(re=>re.router).filter(Boolean))),P}function bG(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Rg(t,e,n,r,s,l){let c,d;if(s){c=[];for(let h of e)if(c.push(h),h.route.id===s){d=h;break}}else c=e,d=e[e.length-1];let m=su(r||".",R7(c),Os(t.pathname,n)||t.pathname,l==="path");if(r==null&&(m.search=t.search,m.hash=t.hash),(r==null||r===""||r===".")&&d){let h=YH(m.search);if(d.route.index&&!h)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&h){let v=new URLSearchParams(m.search),b=v.getAll("index");v.delete("index"),b.filter(O=>O).forEach(O=>v.append("index",O));let y=v.toString();m.search=y?`?${y}`:""}}return n!=="/"&&(m.pathname=eG({basename:n,pathname:m.pathname})),Ni(m)}function dL(t,e,n){if(!n||!bG(n))return{path:e};if(n.formMethod&&!VG(n.formMethod))return{path:e,error:ws(405,{method:n.formMethod})};let r=()=>({path:e,error:ws(400,{type:"invalid-body"})}),l=(n.formMethod||"get").toUpperCase(),c=YB(e);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Aa(l))return r();let b=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((y,[O,w])=>`${y}${O}=${w} `,""):String(n.body);return{path:e,submission:{formMethod:l,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:b}}}else if(n.formEncType==="application/json"){if(!Aa(l))return r();try{let b=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:e,submission:{formMethod:l,formAction:c,formEncType:n.formEncType,formData:void 0,json:b,text:void 0}}}catch{return r()}}}xn(typeof FormData=="function","FormData is not available in this environment");let d,m;if(n.formData)d=Mg(n.formData),m=n.formData;else if(n.body instanceof FormData)d=Mg(n.body),m=n.body;else if(n.body instanceof URLSearchParams)d=n.body,m=bL(d);else if(n.body==null)d=new URLSearchParams,m=new FormData;else try{d=new URLSearchParams(n.body),m=bL(d)}catch{return r()}let h={formMethod:l,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(Aa(h.formMethod))return{path:e,submission:h};let v=Rl(e);return t&&v.search&&YH(v.search)&&d.append("index",""),v.search=`?${d}`,{path:Ni(v),submission:h}}function fL(t,e,n,r,s,l,c,d,m,h,v,b,y,O,w,S,C,z,M,T,H){let j=T?ko(T[1])?T[1].error:T[1].data:void 0,_=s.createURL(l.location),P=s.createURL(m),L;if(v&&l.errors){let q=Object.keys(l.errors)[0];L=c.findIndex(N=>N.route.id===q)}else if(T&&ko(T[1])){let q=T[0];L=c.findIndex(N=>N.route.id===q)-1}let V=T?T[1].statusCode:void 0,D=V&&V>=400,F={currentUrl:_,currentParams:l.matches[0]?.params||{},nextUrl:P,nextParams:c[0].params,...d,actionResult:j,actionStatus:V},X=lu(c),Q=c.map((q,N)=>{let{route:U}=q,K=null;if(L!=null&&N>L)K=!1;else if(U.lazy)K=!0;else if(!XH(U))K=!1;else if(v){let{shouldLoad:W}=UB(U,l.loaderData,l.errors);K=W}else yG(l.loaderData,l.matches[N],q)&&(K=!0);if(K!==null)return Eg(n,r,t,X,q,h,e,K);let Z=!1;typeof H=="boolean"?Z=H:D?Z=!1:(b||_.pathname+_.search===P.pathname+P.search||_.search!==P.search||wG(l.matches[N],q))&&(Z=!0);let te={...F,defaultShouldRevalidate:Z},B=O6(q,te);return Eg(n,r,t,X,q,h,e,B,te,H)}),Y=[];return w.forEach((q,N)=>{if(v||!c.some(se=>se.route.id===q.routeId)||O.has(N))return;let U=l.fetchers.get(N),K=U&&U.state!=="idle"&&U.data===void 0,Z=Lc(C,q.path,z);if(!Z){if(M&&K)return;Y.push({key:N,routeId:q.routeId,path:q.path,matches:null,match:null,request:null,controller:null});return}if(S.has(N))return;let te=w5(Z,q.path),B=new AbortController,W=H3(s,q.path,B.signal),J=null;if(y.has(N))y.delete(N),J=V3(n,r,W,Z,te,h,e);else if(K)b&&(J=V3(n,r,W,Z,te,h,e));else{let se;typeof H=="boolean"?se=H:D?se=!1:se=b;let ie={...F,defaultShouldRevalidate:se};O6(te,ie)&&(J=V3(n,r,W,Z,te,h,e,ie))}J&&Y.push({key:N,routeId:q.routeId,path:q.path,matches:J,match:te,request:W,controller:B})}),{dsMatches:Q,revalidatingFetchers:Y}}function XH(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function UB(t,e,n){if(t.lazy)return{shouldLoad:!0,renderFallback:!0};if(!XH(t))return{shouldLoad:!1,renderFallback:!1};let r=e!=null&&t.id in e,s=n!=null&&n[t.id]!==void 0;if(!r&&s)return{shouldLoad:!1,renderFallback:!1};if(typeof t.loader=="function"&&t.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let l=!r&&!s;return{shouldLoad:l,renderFallback:l}}function yG(t,e,n){let r=!e||n.route.id!==e.route.id,s=!t.hasOwnProperty(n.route.id);return r||s}function wG(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function O6(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function hL(t,e,n,r,s,l){let c;if(t){let h=r[t];xn(h,`No route found to patch children into: routeId = ${t}`),h.children||(h.children=[]),c=h.children}else c=n;let d=[],m=[];if(e.forEach(h=>{let v=c.find(b=>qB(h,b));v?m.push({existingRoute:v,newRoute:h}):d.push(h)}),d.length>0){let h=_6(d,s,[t||"_","patch",String(c?.length||"0")],r);c.push(...h)}if(l&&m.length>0)for(let h=0;he.children?.some(s=>qB(n,s)))??!1:!1}var mL=new WeakMap,WB=({key:t,route:e,manifest:n,mapRouteProperties:r})=>{let s=n[e.id];if(xn(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let l=s.lazy[t];if(!l)return;let c=mL.get(s);c||(c={},mL.set(s,c));let d=c[t];if(d)return d;let m=(async()=>{let h=VW(t),b=s[t]!==void 0&&t!=="hasErrorBoundary";if(h)Ar(!h,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),c[t]=Promise.resolve();else if(b)Ar(!1,`Route "${s.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let y=await l();y!=null&&(Object.assign(s,{[t]:y}),Object.assign(s,r(s)))}typeof s.lazy=="object"&&(s.lazy[t]=void 0,Object.values(s.lazy).every(y=>y===void 0)&&(s.lazy=void 0))})();return c[t]=m,m},gL=new WeakMap;function OG(t,e,n,r,s){let l=n[t.id];if(xn(l,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let v=gL.get(l);if(v)return{lazyRoutePromise:v,lazyHandlerPromise:v};let b=(async()=>{xn(typeof t.lazy=="function","No lazy route function found");let y=await t.lazy(),O={};for(let w in y){let S=y[w];if(S===void 0)continue;let C=AW(w),M=l[w]!==void 0&&w!=="hasErrorBoundary";C?Ar(!C,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):M?Ar(!M,`Route "${l.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):O[w]=S}Object.assign(l,O),Object.assign(l,{...r(l),lazy:void 0})})();return gL.set(l,b),b.catch(()=>{}),{lazyRoutePromise:b,lazyHandlerPromise:b}}let c=Object.keys(t.lazy),d=[],m;for(let v of c){if(s&&s.includes(v))continue;let b=WB({key:v,route:t,manifest:n,mapRouteProperties:r});b&&(d.push(b),v===e&&(m=b))}let h=d.length>0?Promise.all(d).then(()=>{}):void 0;return h?.catch(()=>{}),m?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:m}}async function pL(t){let e=t.matches.filter(s=>s.shouldLoad),n={};return(await Promise.all(e.map(s=>s.resolve()))).forEach((s,l)=>{n[e[l].route.id]=s}),n}async function xG(t){return t.matches.some(e=>e.route.middleware)?GB(t,()=>pL(t)):pL(t)}function GB(t,e){return SG(t,e,r=>{if(_G(r))throw r;return r},jG,n);function n(r,s,l){if(l)return Promise.resolve(Object.assign(l.value,{[s]:{type:"error",result:r}}));{let{matches:c}=t,d=Math.min(Math.max(c.findIndex(h=>h.route.id===s),0),Math.max(c.findIndex(h=>h.shouldCallHandler()),0)),m=Ic(c,c[d].route.id).route.id;return Promise.resolve({[m]:{type:"error",result:r}})}}}async function SG(t,e,n,r,s){let{matches:l,request:c,params:d,context:m,unstable_pattern:h}=t,v=l.flatMap(y=>y.route.middleware?y.route.middleware.map(O=>[y.route.id,O]):[]);return await XB({request:c,params:d,context:m,unstable_pattern:h},v,e,n,r,s)}async function XB(t,e,n,r,s,l,c=0){let{request:d}=t;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let m=e[c];if(!m)return await n();let[h,v]=m,b,y=async()=>{if(b)throw new Error("You may only call `next()` once per middleware");try{return b={value:await XB(t,e,n,r,s,l,c+1)},b.value}catch(O){return b={value:await l(O,h,b)},b.value}};try{let O=await v(t,y),w=O!=null?r(O):void 0;return s(w)?w:b?w??b.value:(b={value:await y()},b.value)}catch(O){return await l(O,h,b)}}function KB(t,e,n,r,s){let l=WB({key:"middleware",route:r.route,manifest:e,mapRouteProperties:t}),c=OG(r.route,Aa(n.method)?"action":"loader",e,t,s);return{middleware:l,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function Eg(t,e,n,r,s,l,c,d,m=null,h){let v=!1,b=KB(t,e,n,s,l);return{...s,_lazyPromises:b,shouldLoad:d,shouldRevalidateArgs:m,shouldCallHandler(y){return v=!0,m?typeof h=="boolean"?O6(s,{...m,defaultShouldRevalidate:h}):typeof y=="boolean"?O6(s,{...m,defaultShouldRevalidate:y}):O6(s,m):d},resolve(y){let{lazy:O,loader:w,middleware:S}=s.route,C=v||d||y&&!Aa(n.method)&&(O||w),z=S&&S.length>0&&!w&&!O;return C&&(Aa(n.method)||!z)?CG({request:n,unstable_pattern:r,match:s,lazyHandlerPromise:b?.handler,lazyRoutePromise:b?.route,handlerOverride:y,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function V3(t,e,n,r,s,l,c,d=null){return r.map(m=>m.route.id!==s.route.id?{...m,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:KB(t,e,n,m,l),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Eg(t,e,n,lu(r),m,l,c,!0,d))}async function $G(t,e,n,r,s,l){n.some(h=>h._lazyPromises?.middleware)&&await Promise.all(n.map(h=>h._lazyPromises?.middleware));let c={request:e,unstable_pattern:lu(n),params:n[0].params,context:s,matches:n},m=await t({...c,fetcherKey:r,runClientMiddleware:h=>{let v=c;return GB(v,()=>h({...v,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return m}async function CG({request:t,unstable_pattern:e,match:n,lazyHandlerPromise:r,lazyRoutePromise:s,handlerOverride:l,scopedContext:c}){let d,m,h=Aa(t.method),v=h?"action":"loader",b=y=>{let O,w=new Promise((z,M)=>O=M);m=()=>O(),t.signal.addEventListener("abort",m);let S=z=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${v}" [routeId: ${n.route.id}]`)):y({request:t,unstable_pattern:e,params:n.params,context:c},...z!==void 0?[z]:[]),C=(async()=>{try{return{type:"data",result:await(l?l(M=>S(M)):S())}}catch(z){return{type:"error",result:z}}})();return Promise.race([C,w])};try{let y=h?n.route.action:n.route.loader;if(r||s)if(y){let O,[w]=await Promise.all([b(y).catch(S=>{O=S}),r,s]);if(O!==void 0)throw O;d=w}else{await r;let O=h?n.route.action:n.route.loader;if(O)[d]=await Promise.all([b(O),s]);else if(v==="action"){let w=new URL(t.url),S=w.pathname+w.search;throw ws(405,{method:t.method,pathname:S,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(y)d=await b(y);else{let O=new URL(t.url),w=O.pathname+O.search;throw ws(404,{pathname:w})}}catch(y){return{type:"error",result:y}}finally{m&&t.signal.removeEventListener("abort",m)}return d}async function zG(t){let e=t.headers.get("Content-Type");return e&&/\bapplication\/json\b/.test(e)?t.body==null?null:t.json():t.text()}async function RG(t){let{result:e,type:n}=t;if(KH(e)){let r;try{r=await zG(e)}catch(s){return{type:"error",error:s}}return n==="error"?{type:"error",error:new iu(e.status,e.statusText,r),statusCode:e.status,headers:e.headers}:{type:"data",data:r,statusCode:e.status,headers:e.headers}}return n==="error"?xL(e)?e.data instanceof Error?{type:"error",error:e.data,statusCode:e.init?.status,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"error",error:HG(e),statusCode:V6(e)?e.status:void 0,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"error",error:e,statusCode:V6(e)?e.status:void 0}:xL(e)?{type:"data",data:e.data,statusCode:e.init?.status,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"data",data:e}}function EG(t,e,n,r,s){let l=t.headers.get("Location");if(xn(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!GH(l)){let c=r.slice(0,r.findIndex(d=>d.route.id===n)+1);l=Rg(new URL(e.url),c,s,l),t.headers.set("Location",l)}return t}function vL(t,e,n,r){let s=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(GH(t)){let l=t,c=l.startsWith("//")?new URL(e.protocol+l):new URL(l);if(s.includes(c.protocol))throw new Error("Invalid redirect location");let d=Os(c.pathname,n)!=null;if(c.origin===e.origin&&d)return c.pathname+c.search+c.hash}try{let l=r.createURL(t);if(s.includes(l.protocol))throw new Error("Invalid redirect location")}catch{}return t}function H3(t,e,n,r){let s=t.createURL(YB(e)).toString(),l={signal:n};if(r&&Aa(r.formMethod)){let{formMethod:c,formEncType:d}=r;l.method=c.toUpperCase(),d==="application/json"?(l.headers=new Headers({"Content-Type":d}),l.body=JSON.stringify(r.json)):d==="text/plain"?l.body=r.text:d==="application/x-www-form-urlencoded"&&r.formData?l.body=Mg(r.formData):l.body=r.formData}return new Request(s,l)}function Mg(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function bL(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function MG(t,e,n,r=!1,s=!1){let l={},c=null,d,m=!1,h={},v=n&&ko(n[1])?n[1].error:void 0;return t.forEach(b=>{if(!(b.route.id in e))return;let y=b.route.id,O=e[y];if(xn(!g4(O),"Cannot handle redirect results in processLoaderData"),ko(O)){let w=O.error;if(v!==void 0&&(w=v,v=void 0),c=c||{},s)c[y]=w;else{let S=Ic(t,y);c[S.route.id]==null&&(c[S.route.id]=w)}r||(l[y]=DB),m||(m=!0,d=V6(O.error)?O.error.status:500),O.headers&&(h[y]=O.headers)}else l[y]=O.data,O.statusCode&&O.statusCode!==200&&!m&&(d=O.statusCode),O.headers&&(h[y]=O.headers)}),v!==void 0&&n&&(c={[n[0]]:v},n[2]&&(l[n[2]]=void 0)),{loaderData:l,errors:c,statusCode:d||200,loaderHeaders:h}}function yL(t,e,n,r,s,l){let{loaderData:c,errors:d}=MG(e,n,r);return s.filter(m=>!m.matches||m.matches.some(h=>h.shouldLoad)).forEach(m=>{let{key:h,match:v,controller:b}=m;if(b&&b.signal.aborted)return;let y=l[h];if(xn(y,"Did not find corresponding fetcher result"),ko(y)){let O=Ic(t.matches,v?.route.id);d&&d[O.route.id]||(d={...d,[O.route.id]:y.error}),t.fetchers.delete(h)}else if(g4(y))xn(!1,"Unhandled fetcher revalidation redirect");else{let O=pl(y.data);t.fetchers.set(h,O)}}),{loaderData:c,errors:d}}function wL(t,e,n,r){let s=Object.entries(e).filter(([,l])=>l!==DB).reduce((l,[c,d])=>(l[c]=d,l),{});for(let l of n){let c=l.route.id;if(!e.hasOwnProperty(c)&&t.hasOwnProperty(c)&&l.route.loader&&(s[c]=t[c]),r&&r.hasOwnProperty(c))break}return s}function OL(t){return t?ko(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function Ic(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function Zf(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function ws(t,{pathname:e,routeId:n,method:r,type:s,message:l}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return t===400?(c="Bad Request",r&&e&&n?d=`You made a ${r} request to "${e}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:s==="invalid-body"&&(d="Unable to encode submission body")):t===403?(c="Forbidden",d=`Route "${n}" does not match URL "${e}"`):t===404?(c="Not Found",d=`No route matches URL "${e}"`):t===405&&(c="Method Not Allowed",r&&e&&n?d=`You made a ${r.toUpperCase()} request to "${e}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(d=`Invalid request method "${r.toUpperCase()}"`)),new iu(t||500,c,new Error(d),!0)}function Jf(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[r,s]=e[n];if(g4(s))return{key:r,result:s}}}function YB(t){let e=typeof t=="string"?Rl(t):t;return Ni({...e,hash:""})}function TG(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function HG(t){return new iu(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function jG(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([e,n])=>typeof e=="string"&&PG(n))}function PG(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function LG(t){return KH(t.result)&&FB.has(t.result.status)}function ko(t){return t.type==="error"}function g4(t){return(t&&t.type)==="redirect"}function xL(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function KH(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function IG(t){return FB.has(t)}function _G(t){return KH(t)&&IG(t.status)&&t.headers.has("Location")}function VG(t){return hG.has(t.toUpperCase())}function Aa(t){return dG.has(t.toUpperCase())}function YH(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function w5(t,e){let n=typeof e=="string"?Rl(e).search:e.search;if(t[t.length-1].route.index&&YH(n||""))return t[t.length-1];let r=IB(t);return r[r.length-1]}function SL(t){let{formMethod:e,formAction:n,formEncType:r,text:s,formData:l,json:c}=t;if(!(!e||!n||!r)){if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(l!=null)return{formMethod:e,formAction:n,formEncType:r,formData:l,json:void 0,text:void 0};if(c!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:c,text:void 0}}}function wm(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function BG(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function e6(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function AG(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function pl(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function FG(t,e){try{let n=t.sessionStorage.getItem(NB);if(n){let r=JSON.parse(n);for(let[s,l]of Object.entries(r||{}))l&&Array.isArray(l)&&e.set(s,new Set(l||[]))}}catch{}}function NG(t,e){if(e.size>0){let n={};for(let[r,s]of e)n[r]=[...s];try{t.sessionStorage.setItem(NB,JSON.stringify(n))}catch(r){Ar(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function $L(){let t,e,n=new Promise((r,s)=>{t=async l=>{r(l);try{await n}catch{}},e=async l=>{s(l);try{await n}catch{}}});return{promise:n,resolve:t,reject:e}}var I4=a.createContext(null);I4.displayName="DataRouter";var cu=a.createContext(null);cu.displayName="DataRouterState";var QB=a.createContext(!1);function DG(){return a.useContext(QB)}var QH=a.createContext({isTransitioning:!1});QH.displayName="ViewTransition";var ZB=a.createContext(new Map);ZB.displayName="Fetchers";var UG=a.createContext(null);UG.displayName="Await";var as=a.createContext(null);as.displayName="Navigation";var E7=a.createContext(null);E7.displayName="Location";var ai=a.createContext({outlet:null,matches:[],isDataRoute:!1});ai.displayName="Route";var ZH=a.createContext(null);ZH.displayName="RouteError";var JB="REACT_ROUTER_ERROR",qG="REDIRECT",WG="ROUTE_ERROR_RESPONSE";function GG(t){if(t.startsWith(`${JB}:${qG}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function XG(t){if(t.startsWith(`${JB}:${WG}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new iu(e.status,e.statusText,e.data)}catch{}}function KG(t,{relative:e}={}){xn(Y3(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=a.useContext(as),{hash:s,pathname:l,search:c}=uu(t,{relative:e}),d=l;return n!=="/"&&(d=l==="/"?n:ks([n,l])),r.createHref({pathname:d,search:c,hash:s})}function Y3(){return a.useContext(E7)!=null}function os(){return xn(Y3(),"useLocation() may be used only in the context of a component."),a.useContext(E7).location}var kB="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function eA(t){a.useContext(as).static||a.useLayoutEffect(t)}function Gc(){let{isDataRoute:t}=a.useContext(ai);return t?cX():YG()}function YG(){xn(Y3(),"useNavigate() may be used only in the context of a component.");let t=a.useContext(I4),{basename:e,navigator:n}=a.useContext(as),{matches:r}=a.useContext(ai),{pathname:s}=os(),l=JSON.stringify(R7(r)),c=a.useRef(!1);return eA(()=>{c.current=!0}),a.useCallback((m,h={})=>{if(Ar(c.current,kB),!c.current)return;if(typeof m=="number"){n.go(m);return}let v=su(m,JSON.parse(l),s,h.relative==="path");t==null&&e!=="/"&&(v.pathname=v.pathname==="/"?e:ks([e,v.pathname])),(h.replace?n.replace:n.push)(v,h.state,h)},[e,n,l,s,t])}var QG=a.createContext(null);function ZG(t){let e=a.useContext(ai).outlet;return a.useMemo(()=>e&&a.createElement(QG.Provider,{value:t},e),[e,t])}function uu(t,{relative:e}={}){let{matches:n}=a.useContext(ai),{pathname:r}=os(),s=JSON.stringify(R7(n));return a.useMemo(()=>su(t,JSON.parse(s),r,e==="path"),[t,s,r,e])}function JG(t,e,n){xn(Y3(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=a.useContext(as),{matches:s}=a.useContext(ai),l=s[s.length-1],c=l?l.params:{},d=l?l.pathname:"/",m=l?l.pathnameBase:"/",h=l&&l.route;{let C=h&&h.path||"";nA(d,!h||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${d}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let v=os(),b;b=v;let y=b.pathname||"/",O=y;if(m!=="/"){let C=m.replace(/^\//,"").split("/");O="/"+y.replace(/^\//,"").split("/").slice(C.length).join("/")}let w=Lc(t,{pathname:O});return Ar(h||w!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Ar(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),rX(w&&w.map(C=>Object.assign({},C,{params:Object.assign({},c,C.params),pathname:ks([m,r.encodeLocation?r.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?m:ks([m,r.encodeLocation?r.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),s,n)}function kG(){let t=lX(),e=V6(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",t),c=a.createElement(a.Fragment,null,a.createElement("p",null,"💿 Hey developer 👋"),a.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",a.createElement("code",{style:l},"ErrorBoundary")," or"," ",a.createElement("code",{style:l},"errorElement")," prop on your route.")),a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},e),n?a.createElement("pre",{style:s},n):null,c)}var eX=a.createElement(kG,null),tA=class extends a.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=XG(t.digest);n&&(t=n)}let e=t!==void 0?a.createElement(ai.Provider,{value:this.props.routeContext},a.createElement(ZH.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?a.createElement(tX,{error:t},e):e}};tA.contextType=QB;var Om=new WeakMap;function tX({children:t,error:e}){let{basename:n}=a.useContext(as);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=GG(e.digest);if(r){let s=Om.get(e);if(s)throw s;let l=VB(r.location,n);if(_B&&!Om.get(e))if(l.isExternal||r.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:r.replace}));throw Om.set(e,c),c}return a.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return t}function nX({routeContext:t,match:e,children:n}){let r=a.useContext(I4);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),a.createElement(ai.Provider,{value:t},n)}function rX(t,e=[],n){let r=n?.state;if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let s=t,l=r?.errors;if(l!=null){let v=s.findIndex(b=>b.route.id&&l?.[b.route.id]!==void 0);xn(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,v+1))}let c=!1,d=-1;if(n&&r){c=r.renderFallback;for(let v=0;v=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let m=n?.onError,h=r&&m?(v,b)=>{m(v,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:lu(r.matches),errorInfo:b})}:void 0;return s.reduceRight((v,b,y)=>{let O,w=!1,S=null,C=null;r&&(O=l&&b.route.id?l[b.route.id]:void 0,S=b.route.errorElement||eX,c&&(d<0&&y===0?(nA("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,C=null):d===y&&(w=!0,C=b.route.hydrateFallbackElement||null)));let z=e.concat(s.slice(0,y+1)),M=()=>{let T;return O?T=S:w?T=C:b.route.Component?T=a.createElement(b.route.Component,null):b.route.element?T=b.route.element:T=v,a.createElement(nX,{match:b,routeContext:{outlet:v,matches:z,isDataRoute:r!=null},children:T})};return r&&(b.route.ErrorBoundary||b.route.errorElement||y===0)?a.createElement(tA,{location:r.location,revalidation:r.revalidation,component:S,error:O,children:M(),routeContext:{outlet:null,matches:z,isDataRoute:!0},onError:h}):M()},null)}function JH(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function aX(t){let e=a.useContext(I4);return xn(e,JH(t)),e}function oX(t){let e=a.useContext(cu);return xn(e,JH(t)),e}function sX(t){let e=a.useContext(ai);return xn(e,JH(t)),e}function kH(t){let e=sX(t),n=e.matches[e.matches.length-1];return xn(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function iX(){return kH("useRouteId")}function lX(){let t=a.useContext(ZH),e=oX("useRouteError"),n=kH("useRouteError");return t!==void 0?t:e.errors?.[n]}function cX(){let{router:t}=aX("useNavigate"),e=kH("useNavigate"),n=a.useRef(!1);return eA(()=>{n.current=!0}),a.useCallback(async(s,l={})=>{Ar(n.current,kB),n.current&&(typeof s=="number"?await t.navigate(s):await t.navigate(s,{fromRouteId:e,...l}))},[t,e])}var CL={};function nA(t,e,n){!e&&!CL[t]&&(CL[t]=!0,Ar(!1,n))}var zL={};function RL(t,e){!t&&!zL[e]&&(zL[e]=!0,console.warn(e))}var uX="useOptimistic",EL=MB[uX],dX=()=>{};function fX(t){return EL?EL(t):[t,dX]}function hX(t){let e={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Ar(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:a.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Ar(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:a.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Ar(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:a.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),e}var mX=["HydrateFallback","hydrateFallbackElement"],gX=class{constructor(){this.status="pending",this.promise=new Promise((t,e)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",e(n))}})}};function pX({router:t,flushSync:e,onError:n,unstable_useTransitions:r}){r=DG()||r;let[l,c]=a.useState(t.state),[d,m]=fX(l),[h,v]=a.useState(),[b,y]=a.useState({isTransitioning:!1}),[O,w]=a.useState(),[S,C]=a.useState(),[z,M]=a.useState(),T=a.useRef(new Map),H=a.useCallback((L,{deletedFetchers:V,newErrors:D,flushSync:F,viewTransitionOpts:X})=>{D&&n&&Object.values(D).forEach(Y=>n(Y,{location:L.location,params:L.matches[0]?.params??{},unstable_pattern:lu(L.matches)})),L.fetchers.forEach((Y,q)=>{Y.data!==void 0&&T.current.set(q,Y.data)}),V.forEach(Y=>T.current.delete(Y)),RL(F===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Q=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(RL(X==null||Q,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!X||!Q){e&&F?e(()=>c(L)):r===!1?c(L):a.startTransition(()=>{r===!0&&m(Y=>ML(Y,L)),c(L)});return}if(e&&F){e(()=>{S&&(O?.resolve(),S.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let Y=t.window.document.startViewTransition(()=>{e(()=>c(L))});Y.finished.finally(()=>{e(()=>{w(void 0),C(void 0),v(void 0),y({isTransitioning:!1})})}),e(()=>C(Y));return}S?(O?.resolve(),S.skipTransition(),M({state:L,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(v(L),y({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[t.window,e,S,O,r,m,n]);a.useLayoutEffect(()=>t.subscribe(H),[t,H]),a.useEffect(()=>{b.isTransitioning&&!b.flushSync&&w(new gX)},[b]),a.useEffect(()=>{if(O&&h&&t.window){let L=h,V=O.promise,D=t.window.document.startViewTransition(async()=>{r===!1?c(L):a.startTransition(()=>{r===!0&&m(F=>ML(F,L)),c(L)}),await V});D.finished.finally(()=>{w(void 0),C(void 0),v(void 0),y({isTransitioning:!1})}),C(D)}},[h,O,t.window,r,m]),a.useEffect(()=>{O&&h&&d.location.key===h.location.key&&O.resolve()},[O,S,d.location,h]),a.useEffect(()=>{!b.isTransitioning&&z&&(v(z.state),y({isTransitioning:!0,flushSync:!1,currentLocation:z.currentLocation,nextLocation:z.nextLocation}),M(void 0))},[b.isTransitioning,z]);let j=a.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:L=>t.navigate(L),push:(L,V,D)=>t.navigate(L,{state:V,preventScrollReset:D?.preventScrollReset}),replace:(L,V,D)=>t.navigate(L,{replace:!0,state:V,preventScrollReset:D?.preventScrollReset})}),[t]),_=t.basename||"/",P=a.useMemo(()=>({router:t,navigator:j,static:!1,basename:_,onError:n}),[t,j,_,n]);return a.createElement(a.Fragment,null,a.createElement(I4.Provider,{value:P},a.createElement(cu.Provider,{value:d},a.createElement(ZB.Provider,{value:T.current},a.createElement(QH.Provider,{value:b},a.createElement(OX,{basename:_,location:d.location,navigationType:d.historyAction,navigator:j,unstable_useTransitions:r},a.createElement(vX,{routes:t.routes,future:t.future,state:d,isStatic:!1,onError:n})))))),null)}function ML(t,e){return{...t,navigation:e.navigation.state!=="idle"?e.navigation:t.navigation,revalidation:e.revalidation!=="idle"?e.revalidation:t.revalidation,actionData:e.navigation.state!=="submitting"?e.actionData:t.actionData,fetchers:e.fetchers}}var vX=a.memo(bX);function bX({routes:t,future:e,state:n,isStatic:r,onError:s}){return JG(t,void 0,{state:n,isStatic:r,onError:s})}function yX({to:t,replace:e,state:n,relative:r}){xn(Y3()," may be used only in the context of a component.");let{static:s}=a.useContext(as);Ar(!s," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:l}=a.useContext(ai),{pathname:c}=os(),d=Gc(),m=su(t,R7(l),c,r==="path"),h=JSON.stringify(m);return a.useEffect(()=>{d(JSON.parse(h),{replace:e,state:n,relative:r})},[d,h,r,e,n]),null}function wX(t){return ZG(t.context)}function OX({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:s,static:l=!1,unstable_useTransitions:c}){xn(!Y3(),"You cannot render a inside another . You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),m=a.useMemo(()=>({basename:d,navigator:s,static:l,unstable_useTransitions:c,future:{}}),[d,s,l,c]);typeof n=="string"&&(n=Rl(n));let{pathname:h="/",search:v="",hash:b="",state:y=null,key:O="default",unstable_mask:w}=n,S=a.useMemo(()=>{let C=Os(h,d);return C==null?null:{location:{pathname:C,search:v,hash:b,state:y,key:O,unstable_mask:w},navigationType:r}},[d,h,v,b,y,O,r,w]);return Ar(S!=null,` is not able to match the URL "${h}${v}${b}" because it does not start with the basename, so the won't render anything.`),S==null?null:a.createElement(as.Provider,{value:m},a.createElement(E7.Provider,{children:e,value:S}))}var O5="get",x5="application/x-www-form-urlencoded";function M7(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function xX(t){return M7(t)&&t.tagName.toLowerCase()==="button"}function SX(t){return M7(t)&&t.tagName.toLowerCase()==="form"}function $X(t){return M7(t)&&t.tagName.toLowerCase()==="input"}function CX(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function zX(t,e){return t.button===0&&(!e||e==="_self")&&!CX(t)}function Tg(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function RX(t,e){let n=Tg(t);return e&&e.forEach((r,s)=>{n.has(s)||e.getAll(s).forEach(l=>{n.append(s,l)})}),n}var kf=null;function EX(){if(kf===null)try{new FormData(document.createElement("form"),0),kf=!1}catch{kf=!0}return kf}var MX=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xm(t){return t!=null&&!MX.has(t)?(Ar(!1,`"${t}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${x5}"`),null):t}function TX(t,e){let n,r,s,l,c;if(SX(t)){let d=t.getAttribute("action");r=d?Os(d,e):null,n=t.getAttribute("method")||O5,s=xm(t.getAttribute("enctype"))||x5,l=new FormData(t)}else if(xX(t)||$X(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a