function Kv(n,o){for(var a=0;ai[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))i(u);new MutationObserver(u=>{for(const c of u)if(c.type==="childList")for(const m of c.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function a(u){const c={};return u.integrity&&(c.integrity=u.integrity),u.referrerPolicy&&(c.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?c.credentials="include":u.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(u){if(u.ep)return;u.ep=!0;const c=a(u);fetch(u.href,c)}})();function mh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var vu={exports:{}},Da={},yu={exports:{}},$e={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Xf;function Qv(){if(Xf)return $e;Xf=1;var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),m=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),g=Symbol.iterator;function E(S){return S===null||typeof S!="object"?null:(S=g&&S[g]||S["@@iterator"],typeof S=="function"?S:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,j={};function _(S,B,Y){this.props=S,this.context=B,this.refs=j,this.updater=Y||N}_.prototype.isReactComponent={},_.prototype.setState=function(S,B){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,B,"setState")},_.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function L(){}L.prototype=_.prototype;function O(S,B,Y){this.props=S,this.context=B,this.refs=j,this.updater=Y||N}var D=O.prototype=new L;D.constructor=O,z(D,_.prototype),D.isPureReactComponent=!0;var G=Array.isArray,Q=Object.prototype.hasOwnProperty,ie={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function H(S,B,Y){var re,de={},le=null,be=null;if(B!=null)for(re in B.ref!==void 0&&(be=B.ref),B.key!==void 0&&(le=""+B.key),B)Q.call(B,re)&&!M.hasOwnProperty(re)&&(de[re]=B[re]);var _e=arguments.length-2;if(_e===1)de.children=Y;else if(1<_e){for(var Oe=Array(_e),Ye=0;Ye<_e;Ye++)Oe[Ye]=arguments[Ye+2];de.children=Oe}if(S&&S.defaultProps)for(re in _e=S.defaultProps,_e)de[re]===void 0&&(de[re]=_e[re]);return{$$typeof:n,type:S,key:le,ref:be,props:de,_owner:ie.current}}function ae(S,B){return{$$typeof:n,type:S.type,key:B,ref:S.ref,props:S.props,_owner:S._owner}}function Ee(S){return typeof S=="object"&&S!==null&&S.$$typeof===n}function Ne(S){var B={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(Y){return B[Y]})}var Pe=/\/+/g;function Fe(S,B){return typeof S=="object"&&S!==null&&S.key!=null?Ne(""+S.key):B.toString(36)}function De(S,B,Y,re,de){var le=typeof S;(le==="undefined"||le==="boolean")&&(S=null);var be=!1;if(S===null)be=!0;else switch(le){case"string":case"number":be=!0;break;case"object":switch(S.$$typeof){case n:case o:be=!0}}if(be)return be=S,de=de(be),S=re===""?"."+Fe(be,0):re,G(de)?(Y="",S!=null&&(Y=S.replace(Pe,"$&/")+"/"),De(de,B,Y,"",function(Ye){return Ye})):de!=null&&(Ee(de)&&(de=ae(de,Y+(!de.key||be&&be.key===de.key?"":(""+de.key).replace(Pe,"$&/")+"/")+S)),B.push(de)),1;if(be=0,re=re===""?".":re+":",G(S))for(var _e=0;_e>>1,B=A[S];if(0>>1;Su(de,X))leu(be,de)?(A[S]=be,A[le]=X,S=le):(A[S]=de,A[re]=X,S=re);else if(leu(be,X))A[S]=be,A[le]=X,S=le;else break e}}return ne}function u(A,ne){var X=A.sortIndex-ne.sortIndex;return X!==0?X:A.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var m=Date,h=m.now();n.unstable_now=function(){return m.now()-h}}var p=[],v=[],w=1,g=null,E=3,N=!1,z=!1,j=!1,_=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(A){for(var ne=a(v);ne!==null;){if(ne.callback===null)i(v);else if(ne.startTime<=A)i(v),ne.sortIndex=ne.expirationTime,o(p,ne);else break;ne=a(v)}}function G(A){if(j=!1,D(A),!z)if(a(p)!==null)z=!0,V(Q);else{var ne=a(v);ne!==null&&ue(G,ne.startTime-A)}}function Q(A,ne){z=!1,j&&(j=!1,L(H),H=-1),N=!0;var X=E;try{for(D(ne),g=a(p);g!==null&&(!(g.expirationTime>ne)||A&&!Ne());){var S=g.callback;if(typeof S=="function"){g.callback=null,E=g.priorityLevel;var B=S(g.expirationTime<=ne);ne=n.unstable_now(),typeof B=="function"?g.callback=B:g===a(p)&&i(p),D(ne)}else i(p);g=a(p)}if(g!==null)var Y=!0;else{var re=a(v);re!==null&&ue(G,re.startTime-ne),Y=!1}return Y}finally{g=null,E=X,N=!1}}var ie=!1,M=null,H=-1,ae=5,Ee=-1;function Ne(){return!(n.unstable_now()-EeA||125S?(A.sortIndex=X,o(v,A),a(p)===null&&A===a(v)&&(j?(L(H),H=-1):j=!0,ue(G,X-S))):(A.sortIndex=B,o(p,A),z||N||(z=!0,V(Q))),A},n.unstable_shouldYield=Ne,n.unstable_wrapCallback=function(A){var ne=E;return function(){var X=E;E=ne;try{return A.apply(this,arguments)}finally{E=X}}}})(bu)),bu}var nm;function Zv(){return nm||(nm=1,wu.exports=Xv()),wu.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var rm;function Jv(){if(rm)return ln;rm=1;var n=oc(),o=Zv();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,v=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w={},g={};function E(e){return p.call(g,e)?!0:p.call(w,e)?!1:v.test(e)?g[e]=!0:(w[e]=!0,!1)}function N(e,t,r,l){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function z(e,t,r,l){if(t===null||typeof t>"u"||N(e,t,r,l))return!0;if(l)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function j(e,t,r,l,s,d,y){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=y}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_[e]=new j(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_[t]=new j(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){_[e]=new j(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_[e]=new j(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){_[e]=new j(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){_[e]=new j(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){_[e]=new j(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){_[e]=new j(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){_[e]=new j(e,5,!1,e.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function O(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(L,O);_[t]=new j(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(L,O);_[t]=new j(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(L,O);_[t]=new j(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){_[e]=new j(e,1,!1,e.toLowerCase(),null,!1,!1)}),_.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){_[e]=new j(e,1,!1,e.toLowerCase(),null,!0,!0)});function D(e,t,r,l){var s=_.hasOwnProperty(t)?_[t]:null;(s!==null?s.type!==0:l||!(2k||s[y]!==d[k]){var R=` `+s[y].replace(" at new "," at ");return e.displayName&&R.includes("")&&(R=R.replace("",e.displayName)),R}while(1<=y&&0<=k);break}}}finally{Y=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?B(e):""}function de(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=re(e.type,!1),e;case 11:return e=re(e.type.render,!1),e;case 1:return e=re(e.type,!0),e;default:return""}}function le(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case ie:return"Portal";case ae:return"Profiler";case H:return"StrictMode";case Fe:return"Suspense";case De:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ne:return(e.displayName||"Context")+".Consumer";case Ee:return(e._context.displayName||"Context")+".Provider";case Pe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Re:return t=e.displayName||null,t!==null?t:le(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}function be(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return le(t);case 8:return t===H?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _e(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Oe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ye(e){var t=Oe(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(y){l=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ht(e){e._valueTracker||(e._valueTracker=Ye(e))}function Qe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),l="";return e&&(l=Oe(e)?e.checked?"true":"false":e.value),e=l,e!==r?(t.setValue(e),!0):!1}function Pt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Wt(e,t){var r=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Hn(e,t){var r=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;r=_e(t.value!=null?t.value:r),e._wrapperState={initialChecked:l,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Et(e,t){t=t.checked,t!=null&&D(e,"checked",t,!1)}function Xt(e,t){Et(e,t);var r=_e(t.value),l=t.type;if(r!=null)l==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ct(e,t.type,r):t.hasOwnProperty("defaultValue")&&ct(e,t.type,_e(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ln(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ct(e,t,r){(t!=="number"||Pt(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var vn=Array.isArray;function Tt(e,t,r,l){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=gt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Lt(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var wn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jt=["Webkit","ms","Moz","O"];Object.keys(wn).forEach(function(e){Jt.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wn[t]=wn[e]})});function xr(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||wn.hasOwnProperty(e)&&wn[e]?(""+t).trim():t+"px"}function Ot(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var l=r.indexOf("--")===0,s=xr(r,t[r],l);r==="float"&&(r="cssFloat"),l?e.setProperty(r,s):e[r]=s}}var nr=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zn(e,t){if(t){if(nr[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function Wn(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Dn=null;function St(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bn=null,cn=null,Gt=null;function rr(e){if(e=wa(e)){if(typeof bn!="function")throw Error(a(280));var t=e.stateNode;t&&(t=bl(t),bn(e.stateNode,e.type,t))}}function Te(e){cn?Gt?Gt.push(e):Gt=[e]:cn=e}function ot(){if(cn){var e=cn,t=Gt;if(Gt=cn=null,rr(e),t)for(e=0;e>>=0,e===0?32:31-(br(e)/ar|0)|0}var lr=64,eo=4194304;function to(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function al(e,t){var r=e.pendingLanes;if(r===0)return 0;var l=0,s=e.suspendedLanes,d=e.pingedLanes,y=r&268435455;if(y!==0){var k=y&~s;k!==0?l=to(k):(d&=y,d!==0&&(l=to(d)))}else y=r&~s,y!==0?l=to(y):d!==0&&(l=to(d));if(l===0)return 0;if(t!==0&&t!==l&&(t&s)===0&&(s=l&-l,d=t&-t,s>=d||s===16&&(d&4194240)!==0))return t;if((l&4)!==0&&(l|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0r;r++)t.push(e);return t}function ra(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tt(t),e[t]=r}function hg(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=da),Hc=" ",Wc=!1;function Vc(e,t){switch(e){case"keyup":return Bg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Eo=!1;function Wg(e,t){switch(e){case"compositionend":return Gc(t);case"keypress":return t.which!==32?null:(Wc=!0,Hc);case"textInput":return e=t.data,e===Hc&&Wc?null:e;default:return null}}function Vg(e,t){if(Eo)return e==="compositionend"||!Xi&&Vc(e,t)?(e=Oc(),cl=Vi=Cr=null,Eo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Jc(r)}}function td(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?td(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nd(){for(var e=window,t=Pt();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Pt(e.document)}return t}function es(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ev(e){var t=nd(),r=e.focusedElem,l=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&td(r.ownerDocument.documentElement,r)){if(l!==null&&es(r)){if(t=l.start,e=l.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,d=Math.min(l.start,s);l=l.end===void 0?d:Math.min(l.end,s),!e.extend&&d>l&&(s=l,l=d,d=s),s=ed(r,d);var y=ed(r,l);s&&y&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),d>l?(e.addRange(t),e.extend(y.node,y.offset)):(t.setEnd(y.node,y.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,No=null,ts=null,pa=null,ns=!1;function rd(e,t,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ns||No==null||No!==Pt(l)||(l=No,"selectionStart"in l&&es(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),pa&&ha(pa,l)||(pa=l,l=yl(ts,"onSelect"),0_o||(e.current=hs[_o],hs[_o]=null,_o--)}function rt(e,t){_o++,hs[_o]=e.current,e.current=t}var Pr={},At=_r(Pr),tn=_r(!1),ro=Pr;function Po(e,t){var r=e.type.contextTypes;if(!r)return Pr;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var s={},d;for(d in r)s[d]=t[d];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function nn(e){return e=e.childContextTypes,e!=null}function kl(){it(tn),it(At)}function yd(e,t,r){if(At.current!==Pr)throw Error(a(168));rt(At,t),rt(tn,r)}function xd(e,t,r){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return r;l=l.getChildContext();for(var s in l)if(!(s in t))throw Error(a(108,be(e)||"Unknown",s));return X({},r,l)}function El(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Pr,ro=At.current,rt(At,e),rt(tn,tn.current),!0}function wd(e,t,r){var l=e.stateNode;if(!l)throw Error(a(169));r?(e=xd(e,t,ro),l.__reactInternalMemoizedMergedChildContext=e,it(tn),it(At),rt(At,e)):it(tn),rt(tn,r)}var sr=null,Nl=!1,ps=!1;function bd(e){sr===null?sr=[e]:sr.push(e)}function fv(e){Nl=!0,bd(e)}function Tr(){if(!ps&&sr!==null){ps=!0;var e=0,t=et;try{var r=sr;for(et=1;e>=y,s-=y,ur=1<<32-tt(t)+s|r<Le?(_t=je,je=null):_t=je.sibling;var Ke=K(I,je,F[Le],ee);if(Ke===null){je===null&&(je=_t);break}e&&je&&Ke.alternate===null&&t(I,je),P=d(Ke,P,Le),Ce===null?we=Ke:Ce.sibling=Ke,Ce=Ke,je=_t}if(Le===F.length)return r(I,je),ut&&ao(I,Le),we;if(je===null){for(;LeLe?(_t=je,je=null):_t=je.sibling;var $r=K(I,je,Ke.value,ee);if($r===null){je===null&&(je=_t);break}e&&je&&$r.alternate===null&&t(I,je),P=d($r,P,Le),Ce===null?we=$r:Ce.sibling=$r,Ce=$r,je=_t}if(Ke.done)return r(I,je),ut&&ao(I,Le),we;if(je===null){for(;!Ke.done;Le++,Ke=F.next())Ke=Z(I,Ke.value,ee),Ke!==null&&(P=d(Ke,P,Le),Ce===null?we=Ke:Ce.sibling=Ke,Ce=Ke);return ut&&ao(I,Le),we}for(je=l(I,je);!Ke.done;Le++,Ke=F.next())Ke=se(je,I,Le,Ke.value,ee),Ke!==null&&(e&&Ke.alternate!==null&&je.delete(Ke.key===null?Le:Ke.key),P=d(Ke,P,Le),Ce===null?we=Ke:Ce.sibling=Ke,Ce=Ke);return e&&je.forEach(function(Gv){return t(I,Gv)}),ut&&ao(I,Le),we}function pt(I,P,F,ee){if(typeof F=="object"&&F!==null&&F.type===M&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case Q:e:{for(var we=F.key,Ce=P;Ce!==null;){if(Ce.key===we){if(we=F.type,we===M){if(Ce.tag===7){r(I,Ce.sibling),P=s(Ce,F.props.children),P.return=I,I=P;break e}}else if(Ce.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===V&&jd(we)===Ce.type){r(I,Ce.sibling),P=s(Ce,F.props),P.ref=ba(I,Ce,F),P.return=I,I=P;break e}r(I,Ce);break}else t(I,Ce);Ce=Ce.sibling}F.type===M?(P=ho(F.props.children,I.mode,ee,F.key),P.return=I,I=P):(ee=Zl(F.type,F.key,F.props,null,I.mode,ee),ee.ref=ba(I,P,F),ee.return=I,I=ee)}return y(I);case ie:e:{for(Ce=F.key;P!==null;){if(P.key===Ce)if(P.tag===4&&P.stateNode.containerInfo===F.containerInfo&&P.stateNode.implementation===F.implementation){r(I,P.sibling),P=s(P,F.children||[]),P.return=I,I=P;break e}else{r(I,P);break}else t(I,P);P=P.sibling}P=fu(F,I.mode,ee),P.return=I,I=P}return y(I);case V:return Ce=F._init,pt(I,P,Ce(F._payload),ee)}if(vn(F))return pe(I,P,F,ee);if(ne(F))return xe(I,P,F,ee);Rl(I,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,P!==null&&P.tag===6?(r(I,P.sibling),P=s(P,F),P.return=I,I=P):(r(I,P),P=du(F,I.mode,ee),P.return=I,I=P),y(I)):r(I,P)}return pt}var zo=Rd(!0),_d=Rd(!1),_l=_r(null),Pl=null,Do=null,bs=null;function ks(){bs=Do=Pl=null}function Es(e){var t=_l.current;it(_l),e._currentValue=t}function Ns(e,t,r){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===r)break;e=e.return}}function Io(e,t){Pl=e,bs=Do=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(rn=!0),e.firstContext=null)}function Sn(e){var t=e._currentValue;if(bs!==e)if(e={context:e,memoizedValue:t,next:null},Do===null){if(Pl===null)throw Error(a(308));Do=e,Pl.dependencies={lanes:0,firstContext:e}}else Do=Do.next=e;return t}var lo=null;function Ss(e){lo===null?lo=[e]:lo.push(e)}function Pd(e,t,r,l){var s=t.interleaved;return s===null?(r.next=r,Ss(t)):(r.next=s.next,s.next=r),t.interleaved=r,dr(e,l)}function dr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Lr=!1;function Cs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Td(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mr(e,t,r){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ge&2)!==0){var s=l.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),l.pending=t,dr(e,r)}return s=l.interleaved,s===null?(t.next=t,Ss(l)):(t.next=s.next,s.next=t),l.interleaved=t,dr(e,r)}function Tl(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,$i(e,r)}}function Ld(e,t){var r=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,r===l)){var s=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var y={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};d===null?s=d=y:d=d.next=y,r=r.next}while(r!==null);d===null?s=d=t:d=d.next=t}else s=d=t;r={baseState:l.baseState,firstBaseUpdate:s,lastBaseUpdate:d,shared:l.shared,effects:l.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ll(e,t,r,l){var s=e.updateQueue;Lr=!1;var d=s.firstBaseUpdate,y=s.lastBaseUpdate,k=s.shared.pending;if(k!==null){s.shared.pending=null;var R=k,U=R.next;R.next=null,y===null?d=U:y.next=U,y=R;var q=e.alternate;q!==null&&(q=q.updateQueue,k=q.lastBaseUpdate,k!==y&&(k===null?q.firstBaseUpdate=U:k.next=U,q.lastBaseUpdate=R))}if(d!==null){var Z=s.baseState;y=0,q=U=R=null,k=d;do{var K=k.lane,se=k.eventTime;if((l&K)===K){q!==null&&(q=q.next={eventTime:se,lane:0,tag:k.tag,payload:k.payload,callback:k.callback,next:null});e:{var pe=e,xe=k;switch(K=t,se=r,xe.tag){case 1:if(pe=xe.payload,typeof pe=="function"){Z=pe.call(se,Z,K);break e}Z=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=xe.payload,K=typeof pe=="function"?pe.call(se,Z,K):pe,K==null)break e;Z=X({},Z,K);break e;case 2:Lr=!0}}k.callback!==null&&k.lane!==0&&(e.flags|=64,K=s.effects,K===null?s.effects=[k]:K.push(k))}else se={eventTime:se,lane:K,tag:k.tag,payload:k.payload,callback:k.callback,next:null},q===null?(U=q=se,R=Z):q=q.next=se,y|=K;if(k=k.next,k===null){if(k=s.shared.pending,k===null)break;K=k,k=K.next,K.next=null,s.lastBaseUpdate=K,s.shared.pending=null}}while(!0);if(q===null&&(R=Z),s.baseState=R,s.firstBaseUpdate=U,s.lastBaseUpdate=q,t=s.shared.interleaved,t!==null){s=t;do y|=s.lane,s=s.next;while(s!==t)}else d===null&&(s.shared.lanes=0);uo|=y,e.lanes=y,e.memoizedState=Z}}function Md(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var l=Ts.transition;Ts.transition={};try{e(!1),t()}finally{et=r,Ts.transition=l}}function Zd(){return Cn().memoizedState}function gv(e,t,r){var l=Or(e);if(r={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null},Jd(e))ef(t,r);else if(r=Pd(e,t,r,l),r!==null){var s=Yt();Un(r,e,l,s),tf(r,t,l)}}function vv(e,t,r){var l=Or(e),s={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null};if(Jd(e))ef(t,s);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,k=d(y,r);if(s.hasEagerState=!0,s.eagerState=k,In(k,y)){var R=t.interleaved;R===null?(s.next=s,Ss(t)):(s.next=R.next,R.next=s),t.interleaved=s;return}}catch{}finally{}r=Pd(e,t,s,l),r!==null&&(s=Yt(),Un(r,e,l,s),tf(r,t,l))}}function Jd(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function ef(e,t){Sa=Dl=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function tf(e,t,r){if((r&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,$i(e,r)}}var Al={readContext:Sn,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useInsertionEffect:Ft,useLayoutEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useMutableSource:Ft,useSyncExternalStore:Ft,useId:Ft,unstable_isNewReconciler:!1},yv={readContext:Sn,useCallback:function(e,t){return Qn().memoizedState=[e,t===void 0?null:t],e},useContext:Sn,useEffect:Wd,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Il(4194308,4,Kd.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Il(4194308,4,e,t)},useInsertionEffect:function(e,t){return Il(4,2,e,t)},useMemo:function(e,t){var r=Qn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var l=Qn();return t=r!==void 0?r(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=gv.bind(null,ft,e),[l.memoizedState,e]},useRef:function(e){var t=Qn();return e={current:e},t.memoizedState=e},useState:Bd,useDebugValue:As,useDeferredValue:function(e){return Qn().memoizedState=e},useTransition:function(){var e=Bd(!1),t=e[0];return e=pv.bind(null,e[1]),Qn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var l=ft,s=Qn();if(ut){if(r===void 0)throw Error(a(407));r=r()}else{if(r=t(),Rt===null)throw Error(a(349));(so&30)!==0||Od(l,t,r)}s.memoizedState=r;var d={value:r,getSnapshot:t};return s.queue=d,Wd(Fd.bind(null,l,d,e),[e]),l.flags|=2048,Ra(9,Ad.bind(null,l,d,r,t),void 0,null),r},useId:function(){var e=Qn(),t=Rt.identifierPrefix;if(ut){var r=cr,l=ur;r=(l&~(1<<32-tt(l)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ca++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=y.createElement(r,{is:l.is}):(e=y.createElement(r),r==="select"&&(y=e,l.multiple?y.multiple=!0:l.size&&(y.size=l.size))):e=y.createElementNS(e,r),e[Gn]=t,e[xa]=l,kf(e,t,!1,!1),t.stateNode=e;e:{switch(y=Wn(r,l),r){case"dialog":lt("cancel",e),lt("close",e),s=l;break;case"iframe":case"object":case"embed":lt("load",e),s=l;break;case"video":case"audio":for(s=0;sUo&&(t.flags|=128,l=!0,_a(d,!1),t.lanes=4194304)}else{if(!l)if(e=Ml(y),e!==null){if(t.flags|=128,l=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),_a(d,!0),d.tail===null&&d.tailMode==="hidden"&&!y.alternate&&!ut)return $t(t),null}else 2*Je()-d.renderingStartTime>Uo&&r!==1073741824&&(t.flags|=128,l=!0,_a(d,!1),t.lanes=4194304);d.isBackwards?(y.sibling=t.child,t.child=y):(r=d.last,r!==null?r.sibling=y:t.child=y,d.last=y)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=Je(),t.sibling=null,r=dt.current,rt(dt,l?r&1|2:r&1),t):($t(t),null);case 22:case 23:return su(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(pn&1073741824)!==0&&($t(t),t.subtreeFlags&6&&(t.flags|=8192)):$t(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function Cv(e,t){switch(vs(t),t.tag){case 1:return nn(t.type)&&kl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oo(),it(tn),it(At),Ps(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Rs(t),null;case 13:if(it(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Mo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return it(dt),null;case 4:return Oo(),null;case 10:return Es(t.type._context),null;case 22:case 23:return su(),null;case 24:return null;default:return null}}var Bl=!1,Ut=!1,jv=typeof WeakSet=="function"?WeakSet:Set,fe=null;function Fo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(l){mt(e,t,l)}else r.current=null}function qs(e,t,r){try{r()}catch(l){mt(e,t,l)}}var Sf=!1;function Rv(e,t){if(ss=sl,e=nd(),es(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var l=r.getSelection&&r.getSelection();if(l&&l.rangeCount!==0){r=l.anchorNode;var s=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var y=0,k=-1,R=-1,U=0,q=0,Z=e,K=null;t:for(;;){for(var se;Z!==r||s!==0&&Z.nodeType!==3||(k=y+s),Z!==d||l!==0&&Z.nodeType!==3||(R=y+l),Z.nodeType===3&&(y+=Z.nodeValue.length),(se=Z.firstChild)!==null;)K=Z,Z=se;for(;;){if(Z===e)break t;if(K===r&&++U===s&&(k=y),K===d&&++q===l&&(R=y),(se=Z.nextSibling)!==null)break;Z=K,K=Z.parentNode}Z=se}r=k===-1||R===-1?null:{start:k,end:R}}else r=null}r=r||{start:0,end:0}}else r=null;for(us={focusedElem:e,selectionRange:r},sl=!1,fe=t;fe!==null;)if(t=fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,fe=e;else for(;fe!==null;){t=fe;try{var pe=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var xe=pe.memoizedProps,pt=pe.memoizedState,I=t.stateNode,P=I.getSnapshotBeforeUpdate(t.elementType===t.type?xe:An(t.type,xe),pt);I.__reactInternalSnapshotBeforeUpdate=P}break;case 3:var F=t.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(ee){mt(t,t.return,ee)}if(e=t.sibling,e!==null){e.return=t.return,fe=e;break}fe=t.return}return pe=Sf,Sf=!1,pe}function Pa(e,t,r){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var s=l=l.next;do{if((s.tag&e)===e){var d=s.destroy;s.destroy=void 0,d!==void 0&&qs(t,r,d)}s=s.next}while(s!==l)}}function Hl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var l=r.create;r.destroy=l()}r=r.next}while(r!==t)}}function Xs(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Cf(e){var t=e.alternate;t!==null&&(e.alternate=null,Cf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Gn],delete t[xa],delete t[ms],delete t[cv],delete t[dv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jf(e){return e.tag===5||e.tag===3||e.tag===4}function Rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zs(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=wl));else if(l!==4&&(e=e.child,e!==null))for(Zs(e,t,r),e=e.sibling;e!==null;)Zs(e,t,r),e=e.sibling}function Js(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Js(e,t,r),e=e.sibling;e!==null;)Js(e,t,r),e=e.sibling}var Mt=null,Fn=!1;function zr(e,t,r){for(r=r.child;r!==null;)_f(e,t,r),r=r.sibling}function _f(e,t,r){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(or,r)}catch{}switch(r.tag){case 5:Ut||Fo(r,t);case 6:var l=Mt,s=Fn;Mt=null,zr(e,t,r),Mt=l,Fn=s,Mt!==null&&(Fn?(e=Mt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Mt.removeChild(r.stateNode));break;case 18:Mt!==null&&(Fn?(e=Mt,r=r.stateNode,e.nodeType===8?fs(e.parentNode,r):e.nodeType===1&&fs(e,r),sa(e)):fs(Mt,r.stateNode));break;case 4:l=Mt,s=Fn,Mt=r.stateNode.containerInfo,Fn=!0,zr(e,t,r),Mt=l,Fn=s;break;case 0:case 11:case 14:case 15:if(!Ut&&(l=r.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){s=l=l.next;do{var d=s,y=d.destroy;d=d.tag,y!==void 0&&((d&2)!==0||(d&4)!==0)&&qs(r,t,y),s=s.next}while(s!==l)}zr(e,t,r);break;case 1:if(!Ut&&(Fo(r,t),l=r.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=r.memoizedProps,l.state=r.memoizedState,l.componentWillUnmount()}catch(k){mt(r,t,k)}zr(e,t,r);break;case 21:zr(e,t,r);break;case 22:r.mode&1?(Ut=(l=Ut)||r.memoizedState!==null,zr(e,t,r),Ut=l):zr(e,t,r);break;default:zr(e,t,r)}}function Pf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new jv),t.forEach(function(l){var s=Ov.bind(null,e,l);r.has(l)||(r.add(l),l.then(s,s))})}}function $n(e,t){var r=t.deletions;if(r!==null)for(var l=0;ls&&(s=y),l&=~d}if(l=s,l=Je()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Pv(l/1960))-l,10e?16:e,Ir===null)var l=!1;else{if(e=Ir,Ir=null,Ql=0,(Ge&6)!==0)throw Error(a(331));var s=Ge;for(Ge|=4,fe=e.current;fe!==null;){var d=fe,y=d.child;if((fe.flags&16)!==0){var k=d.deletions;if(k!==null){for(var R=0;RJe()-nu?fo(e,0):tu|=r),an(e,t)}function Hf(e,t){t===0&&((e.mode&1)===0?t=1:(t=eo,eo<<=1,(eo&130023424)===0&&(eo=4194304)));var r=Yt();e=dr(e,t),e!==null&&(ra(e,t,r),an(e,r))}function Iv(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Hf(e,r)}function Ov(e,t){var r=0;switch(e.tag){case 13:var l=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(a(314))}l!==null&&l.delete(t),Hf(e,r)}var Wf;Wf=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||tn.current)rn=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return rn=!1,Nv(e,t,r);rn=(e.flags&131072)!==0}else rn=!1,ut&&(t.flags&1048576)!==0&&kd(t,Cl,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;Ul(e,t),e=t.pendingProps;var s=Po(t,At.current);Io(t,r),s=Ms(null,t,l,e,s,r);var d=zs();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,nn(l)?(d=!0,El(t)):d=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Cs(t),s.updater=Fl,t.stateNode=s,s._reactInternals=t,$s(t,l,e,r),t=Ws(null,t,l,!0,d,r)):(t.tag=0,ut&&d&&gs(t),Qt(null,t,s,r),t=t.child),t;case 16:l=t.elementType;e:{switch(Ul(e,t),e=t.pendingProps,s=l._init,l=s(l._payload),t.type=l,s=t.tag=Fv(l),e=An(l,e),s){case 0:t=Hs(null,t,l,e,r);break e;case 1:t=gf(null,t,l,e,r);break e;case 11:t=df(null,t,l,e,r);break e;case 14:t=ff(null,t,l,An(l.type,e),r);break e}throw Error(a(306,l,""))}return t;case 0:return l=t.type,s=t.pendingProps,s=t.elementType===l?s:An(l,s),Hs(e,t,l,s,r);case 1:return l=t.type,s=t.pendingProps,s=t.elementType===l?s:An(l,s),gf(e,t,l,s,r);case 3:e:{if(vf(t),e===null)throw Error(a(387));l=t.pendingProps,d=t.memoizedState,s=d.element,Td(e,t),Ll(t,l,null,r);var y=t.memoizedState;if(l=y.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){s=Ao(Error(a(423)),t),t=yf(e,t,l,r,s);break e}else if(l!==s){s=Ao(Error(a(424)),t),t=yf(e,t,l,r,s);break e}else for(hn=Rr(t.stateNode.containerInfo.firstChild),mn=t,ut=!0,On=null,r=_d(t,null,l,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Mo(),l===s){t=mr(e,t,r);break e}Qt(e,t,l,r)}t=t.child}return t;case 5:return zd(t),e===null&&xs(t),l=t.type,s=t.pendingProps,d=e!==null?e.memoizedProps:null,y=s.children,cs(l,s)?y=null:d!==null&&cs(l,d)&&(t.flags|=32),pf(e,t),Qt(e,t,y,r),t.child;case 6:return e===null&&xs(t),null;case 13:return xf(e,t,r);case 4:return js(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=zo(t,null,l,r):Qt(e,t,l,r),t.child;case 11:return l=t.type,s=t.pendingProps,s=t.elementType===l?s:An(l,s),df(e,t,l,s,r);case 7:return Qt(e,t,t.pendingProps,r),t.child;case 8:return Qt(e,t,t.pendingProps.children,r),t.child;case 12:return Qt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(l=t.type._context,s=t.pendingProps,d=t.memoizedProps,y=s.value,rt(_l,l._currentValue),l._currentValue=y,d!==null)if(In(d.value,y)){if(d.children===s.children&&!tn.current){t=mr(e,t,r);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var k=d.dependencies;if(k!==null){y=d.child;for(var R=k.firstContext;R!==null;){if(R.context===l){if(d.tag===1){R=fr(-1,r&-r),R.tag=2;var U=d.updateQueue;if(U!==null){U=U.shared;var q=U.pending;q===null?R.next=R:(R.next=q.next,q.next=R),U.pending=R}}d.lanes|=r,R=d.alternate,R!==null&&(R.lanes|=r),Ns(d.return,r,t),k.lanes|=r;break}R=R.next}}else if(d.tag===10)y=d.type===t.type?null:d.child;else if(d.tag===18){if(y=d.return,y===null)throw Error(a(341));y.lanes|=r,k=y.alternate,k!==null&&(k.lanes|=r),Ns(y,r,t),y=d.sibling}else y=d.child;if(y!==null)y.return=d;else for(y=d;y!==null;){if(y===t){y=null;break}if(d=y.sibling,d!==null){d.return=y.return,y=d;break}y=y.return}d=y}Qt(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,l=t.pendingProps.children,Io(t,r),s=Sn(s),l=l(s),t.flags|=1,Qt(e,t,l,r),t.child;case 14:return l=t.type,s=An(l,t.pendingProps),s=An(l.type,s),ff(e,t,l,s,r);case 15:return mf(e,t,t.type,t.pendingProps,r);case 17:return l=t.type,s=t.pendingProps,s=t.elementType===l?s:An(l,s),Ul(e,t),t.tag=1,nn(l)?(e=!0,El(t)):e=!1,Io(t,r),rf(t,l,s),$s(t,l,s,r),Ws(null,t,l,!0,e,r);case 19:return bf(e,t,r);case 22:return hf(e,t,r)}throw Error(a(156,t.tag))};function Vf(e,t){return ht(e,t)}function Av(e,t,r,l){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rn(e,t,r,l){return new Av(e,t,r,l)}function cu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fv(e){if(typeof e=="function")return cu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pe)return 11;if(e===Re)return 14}return 2}function Fr(e,t){var r=e.alternate;return r===null?(r=Rn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Zl(e,t,r,l,s,d){var y=2;if(l=e,typeof e=="function")cu(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case M:return ho(r.children,s,d,t);case H:y=8,s|=8;break;case ae:return e=Rn(12,r,t,s|2),e.elementType=ae,e.lanes=d,e;case Fe:return e=Rn(13,r,t,s),e.elementType=Fe,e.lanes=d,e;case De:return e=Rn(19,r,t,s),e.elementType=De,e.lanes=d,e;case ue:return Jl(r,s,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ee:y=10;break e;case Ne:y=9;break e;case Pe:y=11;break e;case Re:y=14;break e;case V:y=16,l=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=Rn(y,r,t,s),t.elementType=e,t.type=l,t.lanes=d,t}function ho(e,t,r,l){return e=Rn(7,e,l,t),e.lanes=r,e}function Jl(e,t,r,l){return e=Rn(22,e,l,t),e.elementType=ue,e.lanes=r,e.stateNode={isHidden:!1},e}function du(e,t,r){return e=Rn(6,e,null,t),e.lanes=r,e}function fu(e,t,r){return t=Rn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $v(e,t,r,l,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fi(0),this.expirationTimes=Fi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fi(0),this.identifierPrefix=l,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function mu(e,t,r,l,s,d,y,k,R){return e=new $v(e,t,r,k,R),t===1?(t=1,d===!0&&(t|=8)):t=0,d=Rn(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:l,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cs(d),e}function Uv(e,t,r){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),xu.exports=Jv(),xu.exports}var am;function e0(){if(am)return li;am=1;var n=hh();return li.createRoot=n.createRoot,li.hydrateRoot=n.hydrateRoot,li}var t0=e0(),x=oc();const te=mh(x),ph=Kv({__proto__:null,default:te},[x]);/** * react-router v7.13.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */var gh=n=>{throw TypeError(n)},n0=(n,o,a)=>o.has(n)||gh("Cannot "+a),ku=(n,o,a)=>(n0(n,o,"read from private field"),a?a.call(n):o.get(n)),r0=(n,o,a)=>o.has(n)?gh("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(n):o.set(n,a),lm="popstate";function o0(n={}){function o(i,u){let{pathname:c,search:m,hash:h}=i.location;return Ga("",{pathname:c,search:m,hash:h},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function a(i,u){return typeof u=="string"?u:Jn(u)}return l0(o,a,null,n)}function Ue(n,o){if(n===!1||n===null||typeof n>"u")throw new Error(o)}function xt(n,o){if(!n){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function a0(){return Math.random().toString(36).substring(2,10)}function im(n,o){return{usr:n.state,key:n.key,idx:o}}function Ga(n,o,a=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof o=="string"?Qr(o):o,state:a,key:o&&o.key||i||a0()}}function Jn({pathname:n="/",search:o="",hash:a=""}){return o&&o!=="?"&&(n+=o.charAt(0)==="?"?o:"?"+o),a&&a!=="#"&&(n+=a.charAt(0)==="#"?a:"#"+a),n}function Qr(n){let o={};if(n){let a=n.indexOf("#");a>=0&&(o.hash=n.substring(a),n=n.substring(0,a));let i=n.indexOf("?");i>=0&&(o.search=n.substring(i),n=n.substring(0,i)),n&&(o.pathname=n)}return o}function l0(n,o,a,i={}){let{window:u=document.defaultView,v5Compat:c=!1}=i,m=u.history,h="POP",p=null,v=w();v==null&&(v=0,m.replaceState({...m.state,idx:v},""));function w(){return(m.state||{idx:null}).idx}function g(){h="POP";let _=w(),L=_==null?null:_-v;v=_,p&&p({action:h,location:j.location,delta:L})}function E(_,L){h="PUSH";let O=Ga(j.location,_,L);v=w()+1;let D=im(O,v),G=j.createHref(O);try{m.pushState(D,"",G)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;u.location.assign(G)}c&&p&&p({action:h,location:j.location,delta:1})}function N(_,L){h="REPLACE";let O=Ga(j.location,_,L);v=w();let D=im(O,v),G=j.createHref(O);m.replaceState(D,"",G),c&&p&&p({action:h,location:j.location,delta:0})}function z(_){return vh(_)}let j={get action(){return h},get location(){return n(u,m)},listen(_){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(lm,g),p=_,()=>{u.removeEventListener(lm,g),p=null}},createHref(_){return o(u,_)},createURL:z,encodeLocation(_){let L=z(_);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:E,replace:N,go(_){return m.go(_)}};return j}function vh(n,o=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Ue(a,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:Jn(n);return i=i.replace(/ $/,"%20"),!o&&i.startsWith("//")&&(i=a+i),new URL(i,a)}var $a,sm=class{constructor(n){if(r0(this,$a,new Map),n)for(let[o,a]of n)this.set(o,a)}get(n){if(ku(this,$a).has(n))return ku(this,$a).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,o){ku(this,$a).set(n,o)}};$a=new WeakMap;var i0=new Set(["lazy","caseSensitive","path","id","index","children"]);function s0(n){return i0.has(n)}var u0=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function c0(n){return u0.has(n)}function d0(n){return n.index===!0}function Ka(n,o,a=[],i={},u=!1){return n.map((c,m)=>{let h=[...a,String(m)],p=typeof c.id=="string"?c.id:h.join("-");if(Ue(c.index!==!0||!c.children,"Cannot specify children on an index route"),Ue(u||!i[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),d0(c)){let v={...c,id:p};return i[p]=um(v,o(v)),v}else{let v={...c,id:p,children:void 0};return i[p]=um(v,o(v)),c.children&&(v.children=Ka(c.children,o,h,i,u)),v}})}function um(n,o){return Object.assign(n,{...o,...typeof o.lazy=="object"&&o.lazy!=null?{lazy:{...n.lazy,...o.lazy}}:{}})}function Wr(n,o,a="/"){return Ua(n,o,a,!1)}function Ua(n,o,a,i){let u=typeof o=="string"?Qr(o):o,c=Pn(u.pathname||"/",a);if(c==null)return null;let m=yh(n);m0(m);let h=null;for(let p=0;h==null&&p{let w={relativePath:v===void 0?m.path||"":v,caseSensitive:m.caseSensitive===!0,childrenIndex:h,route:m};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(i)&&p)return;Ue(w.relativePath.startsWith(i),`Absolute route path "${w.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(i.length)}let g=Zn([i,w.relativePath]),E=a.concat(w);m.children&&m.children.length>0&&(Ue(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),yh(m.children,o,E,g,p)),!(m.path==null&&!m.index)&&o.push({path:g,score:w0(g,m.index),routesMeta:E})};return n.forEach((m,h)=>{var p;if(m.path===""||!((p=m.path)!=null&&p.includes("?")))c(m,h);else for(let v of xh(m.path))c(m,h,!0,v)}),o}function xh(n){let o=n.split("/");if(o.length===0)return[];let[a,...i]=o,u=a.endsWith("?"),c=a.replace(/\?$/,"");if(i.length===0)return u?[c,""]:[c];let m=xh(i.join("/")),h=[];return h.push(...m.map(p=>p===""?c:[c,p].join("/"))),u&&h.push(...m),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function m0(n){n.sort((o,a)=>o.score!==a.score?a.score-o.score:b0(o.routesMeta.map(i=>i.childrenIndex),a.routesMeta.map(i=>i.childrenIndex)))}var h0=/^:[\w-]+$/,p0=3,g0=2,v0=1,y0=10,x0=-2,cm=n=>n==="*";function w0(n,o){let a=n.split("/"),i=a.length;return a.some(cm)&&(i+=x0),o&&(i+=g0),a.filter(u=>!cm(u)).reduce((u,c)=>u+(h0.test(c)?p0:c===""?v0:y0),i)}function b0(n,o){return n.length===o.length&&n.slice(0,-1).every((i,u)=>i===o[u])?n[n.length-1]-o[o.length-1]:0}function k0(n,o,a=!1){let{routesMeta:i}=n,u={},c="/",m=[];for(let h=0;h{if(w==="*"){let z=h[E]||"";m=c.slice(0,c.length-z.length).replace(/(.)\/+$/,"$1")}const N=h[E];return g&&!N?v[w]=void 0:v[w]=(N||"").replace(/%2F/g,"/"),v},{}),pathname:c,pathnameBase:m,pattern:n}}function E0(n,o=!1,a=!0){xt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,h,p)=>(i.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(i.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,o?void 0:"i"),i]}function N0(n){try{return n.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return xt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),n}}function Pn(n,o){if(o==="/")return n;if(!n.toLowerCase().startsWith(o.toLowerCase()))return null;let a=o.endsWith("/")?o.length-1:o.length,i=n.charAt(a);return i&&i!=="/"?null:n.slice(a)||"/"}function S0({basename:n,pathname:o}){return o==="/"?n:Zn([n,o])}var wh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ac=n=>wh.test(n);function C0(n,o="/"){let{pathname:a,search:i="",hash:u=""}=typeof n=="string"?Qr(n):n,c;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?c=dm(a.substring(1),"/"):c=dm(a,o)):c=o,{pathname:c,search:R0(i),hash:_0(u)}}function dm(n,o){let a=o.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?a.length>1&&a.pop():u!=="."&&a.push(u)}),a.length>1?a.join("/"):"/"}function Eu(n,o,a,i){return`Cannot include a '${n}' character in a manually specified \`to.${o}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function bh(n){return n.filter((o,a)=>a===0||o.route.path&&o.route.path.length>0)}function lc(n){let o=bh(n);return o.map((a,i)=>i===o.length-1?a.pathname:a.pathnameBase)}function ic(n,o,a,i=!1){let u;typeof n=="string"?u=Qr(n):(u={...n},Ue(!u.pathname||!u.pathname.includes("?"),Eu("?","pathname","search",u)),Ue(!u.pathname||!u.pathname.includes("#"),Eu("#","pathname","hash",u)),Ue(!u.search||!u.search.includes("#"),Eu("#","search","hash",u)));let c=n===""||u.pathname==="",m=c?"/":u.pathname,h;if(m==null)h=a;else{let g=o.length-1;if(!i&&m.startsWith("..")){let E=m.split("/");for(;E[0]==="..";)E.shift(),g-=1;u.pathname=E.join("/")}h=g>=0?o[g]:"/"}let p=C0(u,h),v=m&&m!=="/"&&m.endsWith("/"),w=(c||m===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(v||w)&&(p.pathname+="/"),p}var Zn=n=>n.join("/").replace(/\/\/+/g,"/"),j0=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),R0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,_0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Za=class{constructor(n,o,a,i=!1){this.status=n,this.statusText=o||"",this.internal=i,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function Qa(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Ja(n){return n.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var kh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Eh(n,o){let a=n;if(typeof a!="string"||!wh.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let i=a,u=!1;if(kh)try{let c=new URL(window.location.href),m=a.startsWith("//")?new URL(c.protocol+a):new URL(a),h=Pn(m.pathname,o);m.origin===c.origin&&h!=null?a=h+m.search+m.hash:u=!0}catch{xt(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:u,to:a}}var Gr=Symbol("Uninstrumented");function P0(n,o){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(u=>u({id:o.id,index:o.index,path:o.path,instrument(c){let m=Object.keys(a);for(let h of m)c[h]&&a[h].push(c[h])}}));let i={};if(typeof o.lazy=="function"&&a.lazy.length>0){let u=Xo(a.lazy,o.lazy,()=>{});u&&(i.lazy=u)}if(typeof o.lazy=="object"){let u=o.lazy;["middleware","loader","action"].forEach(c=>{let m=u[c],h=a[`lazy.${c}`];if(typeof m=="function"&&h.length>0){let p=Xo(h,m,()=>{});p&&(i.lazy=Object.assign(i.lazy||{},{[c]:p}))}})}return["loader","action"].forEach(u=>{let c=o[u];if(typeof c=="function"&&a[u].length>0){let m=c[Gr]??c,h=Xo(a[u],m,(...p)=>fm(p[0]));h&&(u==="loader"&&m.hydrate===!0&&(h.hydrate=!0),h[Gr]=m,i[u]=h)}}),o.middleware&&o.middleware.length>0&&a.middleware.length>0&&(i.middleware=o.middleware.map(u=>{let c=u[Gr]??u,m=Xo(a.middleware,c,(...h)=>fm(h[0]));return m?(m[Gr]=c,m):u})),i}function T0(n,o){let a={navigate:[],fetch:[]};if(o.forEach(i=>i({instrument(u){let c=Object.keys(u);for(let m of c)u[m]&&a[m].push(u[m])}})),a.navigate.length>0){let i=n.navigate[Gr]??n.navigate,u=Xo(a.navigate,i,(...c)=>{let[m,h]=c;return{to:typeof m=="number"||typeof m=="string"?m:m?Jn(m):".",...mm(n,h??{})}});u&&(u[Gr]=i,n.navigate=u)}if(a.fetch.length>0){let i=n.fetch[Gr]??n.fetch,u=Xo(a.fetch,i,(...c)=>{let[m,,h,p]=c;return{href:h??".",fetcherKey:m,...mm(n,p??{})}});u&&(u[Gr]=i,n.fetch=u)}return n}function Xo(n,o,a){return n.length===0?null:async(...i)=>{let u=await Nh(n,a(...i),()=>o(...i),n.length-1);if(u.type==="error")throw u.value;return u.value}}async function Nh(n,o,a,i){let u=n[i],c;if(u){let m,h=async()=>(m?console.error("You cannot call instrumented handlers more than once"):m=Nh(n,o,a,i-1),c=await m,Ue(c,"Expected a result"),c.type==="error"&&c.value instanceof Error?{status:"error",error:c.value}:{status:"success",error:void 0});try{await u(h,o)}catch(p){console.error("An instrumentation function threw an error:",p)}m||await h(),await m}else try{c={type:"success",value:await a()}}catch(m){c={type:"error",value:m}}return c||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function fm(n){let{request:o,context:a,params:i,unstable_pattern:u}=n;return{request:L0(o),params:{...i},unstable_pattern:u,context:M0(a)}}function mm(n,o){return{currentUrl:Jn(n.state.location),..."formMethod"in o?{formMethod:o.formMethod}:{},..."formEncType"in o?{formEncType:o.formEncType}:{},..."formData"in o?{formData:o.formData}:{},..."body"in o?{body:o.body}:{}}}function L0(n){return{method:n.method,url:n.url,headers:{get:(...o)=>n.headers.get(...o)}}}function M0(n){if(D0(n)){let o={...n};return Object.freeze(o),o}else return{get:o=>n.get(o)}}var z0=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function D0(n){if(n===null||typeof n!="object")return!1;const o=Object.getPrototypeOf(n);return o===Object.prototype||o===null||Object.getOwnPropertyNames(o).sort().join("\0")===z0}var Sh=["POST","PUT","PATCH","DELETE"],I0=new Set(Sh),O0=["GET",...Sh],A0=new Set(O0),Ch=new Set([301,302,303,307,308]),F0=new Set([307,308]),Nu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$0={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ia={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},U0=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),jh="remix-router-transitions",Rh=Symbol("ResetLoaderData");function B0(n){const o=n.window?n.window:typeof window<"u"?window:void 0,a=typeof o<"u"&&typeof o.document<"u"&&typeof o.document.createElement<"u";Ue(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=n.hydrationRouteProperties||[],u=n.mapRouteProperties||U0,c=u;if(n.unstable_instrumentations){let b=n.unstable_instrumentations;c=C=>({...u(C),...P0(b.map(T=>T.route).filter(Boolean),C)})}let m={},h=Ka(n.routes,c,void 0,m),p,v=n.basename||"/";v.startsWith("/")||(v=`/${v}`);let w=n.dataStrategy||K0,g={...n.future},E=null,N=new Set,z=null,j=null,_=null,L=n.hydrationData!=null,O=Wr(h,n.history.location,v),D=!1,G=null,Q;if(O==null&&!n.patchRoutesOnNavigation){let b=_n(404,{pathname:n.history.location.pathname}),{matches:C,route:T}=ii(h);Q=!0,O=C,G={[T.id]:b}}else if(O&&!n.hydrationData&&Ie(O,h,n.history.location.pathname).active&&(O=null),O)if(O.some(b=>b.route.lazy))Q=!1;else if(!O.some(b=>sc(b.route)))Q=!0;else{let b=n.hydrationData?n.hydrationData.loaderData:null,C=n.hydrationData?n.hydrationData.errors:null;if(C){let T=O.findIndex(W=>C[W.route.id]!==void 0);Q=O.slice(0,T+1).every(W=>!Vu(W.route,b,C))}else Q=O.every(T=>!Vu(T.route,b,C))}else{Q=!1,O=[];let b=Ie(null,h,n.history.location.pathname);b.active&&b.matches&&(D=!0,O=b.matches)}let ie,M={historyAction:n.history.action,location:n.history.location,matches:O,initialized:Q,navigation:Nu,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||G,fetchers:new Map,blockers:new Map},H="POP",ae=null,Ee=!1,Ne,Pe=!1,Fe=new Map,De=null,Re=!1,V=!1,ue=new Set,A=new Map,ne=0,X=-1,S=new Map,B=new Set,Y=new Map,re=new Map,de=new Set,le=new Map,be,_e=null;function Oe(){if(E=n.history.listen(({action:b,location:C,delta:T})=>{if(be){be(),be=void 0;return}xt(le.size===0||T!=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 W=cn({currentLocation:M.location,nextLocation:C,historyAction:b});if(W&&T!=null){let J=new Promise(me=>{be=me});n.history.go(T*-1),bn(W,{state:"blocked",location:C,proceed(){bn(W,{state:"proceeding",proceed:void 0,reset:void 0,location:C}),J.then(()=>n.history.go(T))},reset(){let me=new Map(M.blockers);me.set(W,Ia),Qe({blockers:me})}}),ae==null||ae.resolve(),ae=null;return}return Et(b,C)}),a){dy(o,Fe);let b=()=>fy(o,Fe);o.addEventListener("pagehide",b),De=()=>o.removeEventListener("pagehide",b)}return M.initialized||Et("POP",M.location,{initialHydration:!0}),ie}function Ye(){E&&E(),De&&De(),N.clear(),Ne&&Ne.abort(),M.fetchers.forEach((b,C)=>Jt(C)),M.blockers.forEach((b,C)=>St(C))}function Ht(b){return N.add(b),()=>N.delete(b)}function Qe(b,C={}){b.matches&&(b.matches=b.matches.map(J=>{let me=m[J.route.id],Se=J.route;return Se.element!==me.element||Se.errorElement!==me.errorElement||Se.hydrateFallbackElement!==me.hydrateFallbackElement?{...J,route:me}:J})),M={...M,...b};let T=[],W=[];M.fetchers.forEach((J,me)=>{J.state==="idle"&&(de.has(me)?T.push(me):W.push(me))}),de.forEach(J=>{!M.fetchers.has(J)&&!A.has(J)&&T.push(J)}),[...N].forEach(J=>J(M,{deletedFetchers:T,newErrors:b.errors??null,viewTransitionOpts:C.viewTransitionOpts,flushSync:C.flushSync===!0})),T.forEach(J=>Jt(J)),W.forEach(J=>M.fetchers.delete(J))}function Pt(b,C,{flushSync:T}={}){var Me,ke;let W=M.actionData!=null&&M.navigation.formMethod!=null&&Bt(M.navigation.formMethod)&&M.navigation.state==="loading"&&((Me=b.state)==null?void 0:Me._isRedirect)!==!0,J;C.actionData?Object.keys(C.actionData).length>0?J=C.actionData:J=null:W?J=M.actionData:J=null;let me=C.loaderData?Em(M.loaderData,C.loaderData,C.matches||[],C.errors):M.loaderData,Se=M.blockers;Se.size>0&&(Se=new Map(Se),Se.forEach((ze,Be)=>Se.set(Be,Ia)));let ce=Re?!1:Xe(b,C.matches||M.matches),he=Ee===!0||M.navigation.formMethod!=null&&Bt(M.navigation.formMethod)&&((ke=b.state)==null?void 0:ke._isRedirect)!==!0;p&&(h=p,p=void 0),Re||H==="POP"||(H==="PUSH"?n.history.push(b,b.state):H==="REPLACE"&&n.history.replace(b,b.state));let ye;if(H==="POP"){let ze=Fe.get(M.location.pathname);ze&&ze.has(b.pathname)?ye={currentLocation:M.location,nextLocation:b}:Fe.has(b.pathname)&&(ye={currentLocation:b,nextLocation:M.location})}else if(Pe){let ze=Fe.get(M.location.pathname);ze?ze.add(b.pathname):(ze=new Set([b.pathname]),Fe.set(M.location.pathname,ze)),ye={currentLocation:M.location,nextLocation:b}}Qe({...C,actionData:J,loaderData:me,historyAction:H,location:b,initialized:!0,navigation:Nu,revalidation:"idle",restoreScrollPosition:ce,preventScrollReset:he,blockers:Se},{viewTransitionOpts:ye,flushSync:T===!0}),H="POP",Ee=!1,Pe=!1,Re=!1,V=!1,ae==null||ae.resolve(),ae=null,_e==null||_e.resolve(),_e=null}async function Wt(b,C){if(ae==null||ae.resolve(),ae=null,typeof b=="number"){ae||(ae=jm());let Be=ae.promise;return n.history.go(b),Be}let T=Wu(M.location,M.matches,v,b,C==null?void 0:C.fromRouteId,C==null?void 0:C.relative),{path:W,submission:J,error:me}=hm(!1,T,C),Se=M.location,ce=Ga(M.location,W,C&&C.state);ce={...ce,...n.history.encodeLocation(ce)};let he=C&&C.replace!=null?C.replace:void 0,ye="PUSH";he===!0?ye="REPLACE":he===!1||J!=null&&Bt(J.formMethod)&&J.formAction===M.location.pathname+M.location.search&&(ye="REPLACE");let Me=C&&"preventScrollReset"in C?C.preventScrollReset===!0:void 0,ke=(C&&C.flushSync)===!0,ze=cn({currentLocation:Se,nextLocation:ce,historyAction:ye});if(ze){bn(ze,{state:"blocked",location:ce,proceed(){bn(ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ce}),Wt(b,C)},reset(){let Be=new Map(M.blockers);Be.set(ze,Ia),Qe({blockers:Be})}});return}await Et(ye,ce,{submission:J,pendingError:me,preventScrollReset:Me,replace:C&&C.replace,enableViewTransition:C&&C.viewTransition,flushSync:ke,callSiteDefaultShouldRevalidate:C&&C.unstable_defaultShouldRevalidate})}function Hn(){_e||(_e=jm()),Mn(),Qe({revalidation:"loading"});let b=_e.promise;return M.navigation.state==="submitting"?b:M.navigation.state==="idle"?(Et(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),b):(Et(H||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:Pe===!0}),b)}async function Et(b,C,T){Ne&&Ne.abort(),Ne=null,H=b,Re=(T&&T.startUninterruptedRevalidation)===!0,ot(M.location,M.matches),Ee=(T&&T.preventScrollReset)===!0,Pe=(T&&T.enableViewTransition)===!0;let W=p||h,J=T&&T.overrideNavigation,me=T!=null&&T.initialHydration&&M.matches&&M.matches.length>0&&!D?M.matches:Wr(W,C,v),Se=(T&&T.flushSync)===!0;if(me&&M.initialized&&!V&&ty(M.location,C)&&!(T&&T.submission&&Bt(T.submission.formMethod))){Pt(C,{matches:me},{flushSync:Se});return}let ce=Ie(me,W,C.pathname);if(ce.active&&ce.matches&&(me=ce.matches),!me){let{error:ht,notFoundMatches:Ct,route:qe}=Gt(C.pathname);Pt(C,{matches:Ct,loaderData:{},errors:{[qe.id]:ht}},{flushSync:Se});return}Ne=new AbortController;let he=qo(n.history,C,Ne.signal,T&&T.submission),ye=n.getContext?await n.getContext():new sm,Me;if(T&&T.pendingError)Me=[Vr(me).route.id,{type:"error",error:T.pendingError}];else if(T&&T.submission&&Bt(T.submission.formMethod)){let ht=await Xt(he,C,T.submission,me,ye,ce.active,T&&T.initialHydration===!0,{replace:T.replace,flushSync:Se});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[Ct,qe]=ht.pendingActionResult;if(gn(qe)&&Qa(qe.error)&&qe.error.status===404){Ne=null,Pt(C,{matches:ht.matches,loaderData:{},errors:{[Ct]:qe.error}});return}}me=ht.matches||me,Me=ht.pendingActionResult,J=Su(C,T.submission),Se=!1,ce.active=!1,he=qo(n.history,he.url,he.signal)}let{shortCircuited:ke,matches:ze,loaderData:Be,errors:vt}=await Ln(he,C,me,ye,ce.active,J,T&&T.submission,T&&T.fetcherSubmission,T&&T.replace,T&&T.initialHydration===!0,Se,Me,T&&T.callSiteDefaultShouldRevalidate);ke||(Ne=null,Pt(C,{matches:ze||me,...Nm(Me),loaderData:Be,errors:vt}))}async function Xt(b,C,T,W,J,me,Se,ce={}){Mn();let he=uy(C,T);if(Qe({navigation:he},{flushSync:ce.flushSync===!0}),me){let ke=await at(W,C.pathname,b.signal);if(ke.type==="aborted")return{shortCircuited:!0};if(ke.type==="error"){if(ke.partialMatches.length===0){let{matches:Be,route:vt}=ii(h);return{matches:Be,pendingActionResult:[vt.id,{type:"error",error:ke.error}]}}let ze=Vr(ke.partialMatches).route.id;return{matches:ke.partialMatches,pendingActionResult:[ze,{type:"error",error:ke.error}]}}else if(ke.matches)W=ke.matches;else{let{notFoundMatches:ze,error:Be,route:vt}=Gt(C.pathname);return{matches:ze,pendingActionResult:[vt.id,{type:"error",error:Be}]}}}let ye,Me=xi(W,C);if(!Me.route.action&&!Me.route.lazy)ye={type:"error",error:_n(405,{method:b.method,pathname:C.pathname,routeId:Me.route.id})};else{let ke=Jo(c,m,b,W,Me,Se?[]:i,J),ze=await yn(b,ke,J,null);if(ye=ze[Me.route.id],!ye){for(let Be of W)if(ze[Be.route.id]){ye=ze[Be.route.id];break}}if(b.signal.aborted)return{shortCircuited:!0}}if(go(ye)){let ke;return ce&&ce.replace!=null?ke=ce.replace:ke=wm(ye.response.headers.get("Location"),new URL(b.url),v,n.history)===M.location.pathname+M.location.search,await Zt(b,ye,!0,{submission:T,replace:ke}),{shortCircuited:!0}}if(gn(ye)){let ke=Vr(W,Me.route.id);return(ce&&ce.replace)!==!0&&(H="PUSH"),{matches:W,pendingActionResult:[ke.route.id,ye,Me.route.id]}}return{matches:W,pendingActionResult:[Me.route.id,ye]}}async function Ln(b,C,T,W,J,me,Se,ce,he,ye,Me,ke,ze){let Be=me||Su(C,Se),vt=Se||ce||Cm(Be),ht=!Re&&!ye;if(J){if(ht){let tt=ct(ke);Qe({navigation:Be,...tt!==void 0?{actionData:tt}:{}},{flushSync:Me})}let He=await at(T,C.pathname,b.signal);if(He.type==="aborted")return{shortCircuited:!0};if(He.type==="error"){if(He.partialMatches.length===0){let{matches:br,route:ar}=ii(h);return{matches:br,loaderData:{},errors:{[ar.id]:He.error}}}let tt=Vr(He.partialMatches).route.id;return{matches:He.partialMatches,loaderData:{},errors:{[tt]:He.error}}}else if(He.matches)T=He.matches;else{let{error:tt,notFoundMatches:br,route:ar}=Gt(C.pathname);return{matches:br,loaderData:{},errors:{[ar.id]:tt}}}}let Ct=p||h,{dsMatches:qe,revalidatingFetchers:en}=pm(b,W,c,m,n.history,M,T,vt,C,ye?[]:i,ye===!0,V,ue,de,Y,B,Ct,v,n.patchRoutesOnNavigation!=null,ke,ze);if(X=++ne,!n.dataStrategy&&!qe.some(He=>He.shouldLoad)&&!qe.some(He=>He.route.middleware&&He.route.middleware.length>0)&&en.length===0){let He=zn();return Pt(C,{matches:T,loaderData:{},errors:ke&&gn(ke[1])?{[ke[0]]:ke[1].error}:null,...Nm(ke),...He?{fetchers:new Map(M.fetchers)}:{}},{flushSync:Me}),{shortCircuited:!0}}if(ht){let He={};if(!J){He.navigation=Be;let tt=ct(ke);tt!==void 0&&(He.actionData=tt)}en.length>0&&(He.fetchers=vn(en)),Qe(He,{flushSync:Me})}en.forEach(He=>{Ot(He.key),He.controller&&A.set(He.key,He.controller)});let Je=()=>en.forEach(He=>Ot(He.key));Ne&&Ne.signal.addEventListener("abort",Je);let{loaderResults:Zr,fetcherResults:kn}=await xn(qe,en,b,W);if(b.signal.aborted)return{shortCircuited:!0};Ne&&Ne.signal.removeEventListener("abort",Je),en.forEach(He=>A.delete(He.key));let dn=si(Zr);if(dn)return await Zt(b,dn.result,!0,{replace:he}),{shortCircuited:!0};if(dn=si(kn),dn)return B.add(dn.key),await Zt(b,dn.result,!0,{replace:he}),{shortCircuited:!0};let{loaderData:wr,errors:Jr}=km(M,T,Zr,ke,en,kn);ye&&M.errors&&(Jr={...M.errors,...Jr});let Vn=zn(),or=Wn(X),Kt=Vn||or||en.length>0;return{matches:T,loaderData:wr,errors:Jr,...Kt?{fetchers:new Map(M.fetchers)}:{}}}function ct(b){if(b&&!gn(b[1]))return{[b[0]]:b[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function vn(b){return b.forEach(C=>{let T=M.fetchers.get(C.key),W=Oa(void 0,T?T.data:void 0);M.fetchers.set(C.key,W)}),new Map(M.fetchers)}async function Tt(b,C,T,W){Ot(b);let J=(W&&W.flushSync)===!0,me=p||h,Se=Wu(M.location,M.matches,v,T,C,W==null?void 0:W.relative),ce=Wr(me,Se,v),he=Ie(ce,me,Se);if(he.active&&he.matches&&(ce=he.matches),!ce){Nt(b,C,_n(404,{pathname:Se}),{flushSync:J});return}let{path:ye,submission:Me,error:ke}=hm(!0,Se,W);if(ke){Nt(b,C,ke,{flushSync:J});return}let ze=n.getContext?await n.getContext():new sm,Be=(W&&W.preventScrollReset)===!0;if(Me&&Bt(Me.formMethod)){await nt(b,C,ye,ce,ze,he.active,J,Be,Me,W&&W.unstable_defaultShouldRevalidate);return}Y.set(b,{routeId:C,path:ye}),await Vt(b,C,ye,ce,ze,he.active,J,Be,Me)}async function nt(b,C,T,W,J,me,Se,ce,he,ye){Mn(),Y.delete(b);let Me=M.fetchers.get(b);gt(b,cy(he,Me),{flushSync:Se});let ke=new AbortController,ze=qo(n.history,T,ke.signal,he);if(me){let st=await at(W,new URL(ze.url).pathname,ze.signal,b);if(st.type==="aborted")return;if(st.type==="error"){Nt(b,C,st.error,{flushSync:Se});return}else if(st.matches)W=st.matches;else{Nt(b,C,_n(404,{pathname:T}),{flushSync:Se});return}}let Be=xi(W,T);if(!Be.route.action&&!Be.route.lazy){let st=_n(405,{method:he.formMethod,pathname:T,routeId:C});Nt(b,C,st,{flushSync:Se});return}A.set(b,ke);let vt=ne,ht=Jo(c,m,ze,W,Be,i,J),Ct=await yn(ze,ht,J,b),qe=Ct[Be.route.id];if(!qe){for(let st of ht)if(Ct[st.route.id]){qe=Ct[st.route.id];break}}if(ze.signal.aborted){A.get(b)===ke&&A.delete(b);return}if(de.has(b)){if(go(qe)||gn(qe)){gt(b,gr(void 0));return}}else{if(go(qe))if(A.delete(b),X>vt){gt(b,gr(void 0));return}else return B.add(b),gt(b,Oa(he)),Zt(ze,qe,!1,{fetcherSubmission:he,preventScrollReset:ce});if(gn(qe)){Nt(b,C,qe.error);return}}let en=M.navigation.location||M.location,Je=qo(n.history,en,ke.signal),Zr=p||h,kn=M.navigation.state!=="idle"?Wr(Zr,M.navigation.location,v):M.matches;Ue(kn,"Didn't find any matches after fetcher action");let dn=++ne;S.set(b,dn);let wr=Oa(he,qe.data);M.fetchers.set(b,wr);let{dsMatches:Jr,revalidatingFetchers:Vn}=pm(Je,J,c,m,n.history,M,kn,he,en,i,!1,V,ue,de,Y,B,Zr,v,n.patchRoutesOnNavigation!=null,[Be.route.id,qe],ye);Vn.filter(st=>st.key!==b).forEach(st=>{let lr=st.key,eo=M.fetchers.get(lr),to=Oa(void 0,eo?eo.data:void 0);M.fetchers.set(lr,to),Ot(lr),st.controller&&A.set(lr,st.controller)}),Qe({fetchers:new Map(M.fetchers)});let or=()=>Vn.forEach(st=>Ot(st.key));ke.signal.addEventListener("abort",or);let{loaderResults:Kt,fetcherResults:He}=await xn(Jr,Vn,Je,J);if(ke.signal.aborted)return;if(ke.signal.removeEventListener("abort",or),S.delete(b),A.delete(b),Vn.forEach(st=>A.delete(st.key)),M.fetchers.has(b)){let st=gr(qe.data);M.fetchers.set(b,st)}let tt=si(Kt);if(tt)return Zt(Je,tt.result,!1,{preventScrollReset:ce});if(tt=si(He),tt)return B.add(tt.key),Zt(Je,tt.result,!1,{preventScrollReset:ce});let{loaderData:br,errors:ar}=km(M,kn,Kt,void 0,Vn,He);Wn(dn),M.navigation.state==="loading"&&dn>X?(Ue(H,"Expected pending action"),Ne&&Ne.abort(),Pt(M.navigation.location,{matches:kn,loaderData:br,errors:ar,fetchers:new Map(M.fetchers)})):(Qe({errors:ar,loaderData:Em(M.loaderData,br,kn,ar),fetchers:new Map(M.fetchers)}),V=!1)}async function Vt(b,C,T,W,J,me,Se,ce,he){let ye=M.fetchers.get(b);gt(b,Oa(he,ye?ye.data:void 0),{flushSync:Se});let Me=new AbortController,ke=qo(n.history,T,Me.signal);if(me){let qe=await at(W,new URL(ke.url).pathname,ke.signal,b);if(qe.type==="aborted")return;if(qe.type==="error"){Nt(b,C,qe.error,{flushSync:Se});return}else if(qe.matches)W=qe.matches;else{Nt(b,C,_n(404,{pathname:T}),{flushSync:Se});return}}let ze=xi(W,T);A.set(b,Me);let Be=ne,vt=Jo(c,m,ke,W,ze,i,J),Ct=(await yn(ke,vt,J,b))[ze.route.id];if(A.get(b)===Me&&A.delete(b),!ke.signal.aborted){if(de.has(b)){gt(b,gr(void 0));return}if(go(Ct))if(X>Be){gt(b,gr(void 0));return}else{B.add(b),await Zt(ke,Ct,!1,{preventScrollReset:ce});return}if(gn(Ct)){Nt(b,C,Ct.error);return}gt(b,gr(Ct.data))}}async function Zt(b,C,T,{submission:W,fetcherSubmission:J,preventScrollReset:me,replace:Se}={}){T||(ae==null||ae.resolve(),ae=null),C.response.headers.has("X-Remix-Revalidate")&&(V=!0);let ce=C.response.headers.get("Location");Ue(ce,"Expected a Location header on the redirect Response"),ce=wm(ce,new URL(b.url),v,n.history);let he=Ga(M.location,ce,{_isRedirect:!0});if(a){let vt=!1;if(C.response.headers.has("X-Remix-Reload-Document"))vt=!0;else if(ac(ce)){const ht=vh(ce,!0);vt=ht.origin!==o.location.origin||Pn(ht.pathname,v)==null}if(vt){Se?o.location.replace(ce):o.location.assign(ce);return}}Ne=null;let ye=Se===!0||C.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Me,formAction:ke,formEncType:ze}=M.navigation;!W&&!J&&Me&&ke&&ze&&(W=Cm(M.navigation));let Be=W||J;if(F0.has(C.response.status)&&Be&&Bt(Be.formMethod))await Et(ye,he,{submission:{...Be,formAction:ce},preventScrollReset:me||Ee,enableViewTransition:T?Pe:void 0});else{let vt=Su(he,W);await Et(ye,he,{overrideNavigation:vt,fetcherSubmission:J,preventScrollReset:me||Ee,enableViewTransition:T?Pe:void 0})}}async function yn(b,C,T,W){var Se;let J,me={};try{J=await Y0(w,b,C,W,T,!1)}catch(ce){return C.filter(he=>he.shouldLoad).forEach(he=>{me[he.route.id]={type:"error",error:ce}}),me}if(b.signal.aborted)return me;if(!Bt(b.method))for(let ce of C){if(((Se=J[ce.route.id])==null?void 0:Se.type)==="error")break;!J.hasOwnProperty(ce.route.id)&&!M.loaderData.hasOwnProperty(ce.route.id)&&(!M.errors||!M.errors.hasOwnProperty(ce.route.id))&&ce.shouldCallHandler()&&(J[ce.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ce.route.id}`)})}for(let[ce,he]of Object.entries(J))if(ay(he)){let ye=he.result;me[ce]={type:"redirect",response:J0(ye,b,ce,C,v)}}else me[ce]=await Z0(he);return me}async function xn(b,C,T,W){let J=yn(T,b,W,null),me=Promise.all(C.map(async he=>{if(he.matches&&he.match&&he.request&&he.controller){let Me=(await yn(he.request,he.matches,W,he.key))[he.match.route.id];return{[he.key]:Me}}else return Promise.resolve({[he.key]:{type:"error",error:_n(404,{pathname:he.path})}})})),Se=await J,ce=(await me).reduce((he,ye)=>Object.assign(he,ye),{});return{loaderResults:Se,fetcherResults:ce}}function Mn(){V=!0,Y.forEach((b,C)=>{A.has(C)&&ue.add(C),Ot(C)})}function gt(b,C,T={}){M.fetchers.set(b,C),Qe({fetchers:new Map(M.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function Nt(b,C,T,W={}){let J=Vr(M.matches,C);Jt(b),Qe({errors:{[J.route.id]:T},fetchers:new Map(M.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function Lt(b){return re.set(b,(re.get(b)||0)+1),de.has(b)&&de.delete(b),M.fetchers.get(b)||$0}function wn(b,C){Ot(b,C==null?void 0:C.reason),gt(b,gr(null))}function Jt(b){let C=M.fetchers.get(b);A.has(b)&&!(C&&C.state==="loading"&&S.has(b))&&Ot(b),Y.delete(b),S.delete(b),B.delete(b),de.delete(b),ue.delete(b),M.fetchers.delete(b)}function xr(b){let C=(re.get(b)||0)-1;C<=0?(re.delete(b),de.add(b)):re.set(b,C),Qe({fetchers:new Map(M.fetchers)})}function Ot(b,C){let T=A.get(b);T&&(T.abort(C),A.delete(b))}function nr(b){for(let C of b){let T=Lt(C),W=gr(T.data);M.fetchers.set(C,W)}}function zn(){let b=[],C=!1;for(let T of B){let W=M.fetchers.get(T);Ue(W,`Expected fetcher: ${T}`),W.state==="loading"&&(B.delete(T),b.push(T),C=!0)}return nr(b),C}function Wn(b){let C=[];for(let[T,W]of S)if(W0}function Dn(b,C){let T=M.blockers.get(b)||Ia;return le.get(b)!==C&&le.set(b,C),T}function St(b){M.blockers.delete(b),le.delete(b)}function bn(b,C){let T=M.blockers.get(b)||Ia;Ue(T.state==="unblocked"&&C.state==="blocked"||T.state==="blocked"&&C.state==="blocked"||T.state==="blocked"&&C.state==="proceeding"||T.state==="blocked"&&C.state==="unblocked"||T.state==="proceeding"&&C.state==="unblocked",`Invalid blocker state transition: ${T.state} -> ${C.state}`);let W=new Map(M.blockers);W.set(b,C),Qe({blockers:W})}function cn({currentLocation:b,nextLocation:C,historyAction:T}){if(le.size===0)return;le.size>1&&xt(!1,"A router only supports one blocker at a time");let W=Array.from(le.entries()),[J,me]=W[W.length-1],Se=M.blockers.get(J);if(!(Se&&Se.state==="proceeding")&&me({currentLocation:b,nextLocation:C,historyAction:T}))return J}function Gt(b){let C=_n(404,{pathname:b}),T=p||h,{matches:W,route:J}=ii(T);return{notFoundMatches:W,route:J,error:C}}function rr(b,C,T){if(z=b,_=C,j=T||null,!L&&M.navigation===Nu){L=!0;let W=Xe(M.location,M.matches);W!=null&&Qe({restoreScrollPosition:W})}return()=>{z=null,_=null,j=null}}function Te(b,C){return j&&j(b,C.map(W=>f0(W,M.loaderData)))||b.key}function ot(b,C){if(z&&_){let T=Te(b,C);z[T]=_()}}function Xe(b,C){if(z){let T=Te(b,C),W=z[T];if(typeof W=="number")return W}return null}function Ie(b,C,T){if(n.patchRoutesOnNavigation)if(b){if(Object.keys(b[0].params).length>0)return{active:!0,matches:Ua(C,T,v,!0)}}else return{active:!0,matches:Ua(C,T,v,!0)||[]};return{active:!1,matches:null}}async function at(b,C,T,W){if(!n.patchRoutesOnNavigation)return{type:"success",matches:b};let J=b;for(;;){let me=p==null,Se=p||h,ce=m;try{await n.patchRoutesOnNavigation({signal:T,path:C,matches:J,fetcherKey:W,patch:(Me,ke)=>{T.aborted||gm(Me,ke,Se,ce,c,!1)}})}catch(Me){return{type:"error",error:Me,partialMatches:J}}finally{me&&!T.aborted&&(h=[...h])}if(T.aborted)return{type:"aborted"};let he=Wr(Se,C,v),ye=null;if(he){if(Object.keys(he[0].params).length===0)return{type:"success",matches:he};if(ye=Ua(Se,C,v,!0),!(ye&&J.lengthT.route.id===C[W].route.id)}function $(b){m={},p=Ka(b,c,void 0,m)}function oe(b,C,T=!1){let W=p==null;gm(b,C,p||h,m,c,T),W&&(h=[...h],Qe({}))}return ie={get basename(){return v},get future(){return g},get state(){return M},get routes(){return h},get window(){return o},initialize:Oe,subscribe:Ht,enableScrollRestoration:rr,navigate:Wt,fetch:Tt,revalidate:Hn,createHref:b=>n.history.createHref(b),encodeLocation:b=>n.history.encodeLocation(b),getFetcher:Lt,resetFetcher:wn,deleteFetcher:xr,dispose:Ye,getBlocker:Dn,deleteBlocker:St,patchRoutes:oe,_internalFetchControllers:A,_internalSetRoutes:$,_internalSetStateDoNotUseOrYouWillBreakYourApp(b){Qe(b)}},n.unstable_instrumentations&&(ie=T0(ie,n.unstable_instrumentations.map(b=>b.router).filter(Boolean))),ie}function H0(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Wu(n,o,a,i,u,c){let m,h;if(u){m=[];for(let v of o)if(m.push(v),v.route.id===u){h=v;break}}else m=o,h=o[o.length-1];let p=ic(i||".",lc(m),Pn(n.pathname,a)||n.pathname,c==="path");if(i==null&&(p.search=n.search,p.hash=n.hash),(i==null||i===""||i===".")&&h){let v=cc(p.search);if(h.route.index&&!v)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&v){let w=new URLSearchParams(p.search),g=w.getAll("index");w.delete("index"),g.filter(N=>N).forEach(N=>w.append("index",N));let E=w.toString();p.search=E?`?${E}`:""}}return a!=="/"&&(p.pathname=S0({basename:a,pathname:p.pathname})),Jn(p)}function hm(n,o,a){if(!a||!H0(a))return{path:o};if(a.formMethod&&!sy(a.formMethod))return{path:o,error:_n(405,{method:a.formMethod})};let i=()=>({path:o,error:_n(400,{type:"invalid-body"})}),c=(a.formMethod||"get").toUpperCase(),m=zh(o);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Bt(c))return i();let g=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((E,[N,z])=>`${E}${N}=${z} `,""):String(a.body);return{path:o,submission:{formMethod:c,formAction:m,formEncType:a.formEncType,formData:void 0,json:void 0,text:g}}}else if(a.formEncType==="application/json"){if(!Bt(c))return i();try{let g=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:o,submission:{formMethod:c,formAction:m,formEncType:a.formEncType,formData:void 0,json:g,text:void 0}}}catch{return i()}}}Ue(typeof FormData=="function","FormData is not available in this environment");let h,p;if(a.formData)h=Ku(a.formData),p=a.formData;else if(a.body instanceof FormData)h=Ku(a.body),p=a.body;else if(a.body instanceof URLSearchParams)h=a.body,p=bm(h);else if(a.body==null)h=new URLSearchParams,p=new FormData;else try{h=new URLSearchParams(a.body),p=bm(h)}catch{return i()}let v={formMethod:c,formAction:m,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Bt(v.formMethod))return{path:o,submission:v};let w=Qr(o);return n&&w.search&&cc(w.search)&&h.append("index",""),w.search=`?${h}`,{path:Jn(w),submission:v}}function pm(n,o,a,i,u,c,m,h,p,v,w,g,E,N,z,j,_,L,O,D,G){var Re;let Q=D?gn(D[1])?D[1].error:D[1].data:void 0,ie=u.createURL(c.location),M=u.createURL(p),H;if(w&&c.errors){let V=Object.keys(c.errors)[0];H=m.findIndex(ue=>ue.route.id===V)}else if(D&&gn(D[1])){let V=D[0];H=m.findIndex(ue=>ue.route.id===V)-1}let ae=D?D[1].statusCode:void 0,Ee=ae&&ae>=400,Ne={currentUrl:ie,currentParams:((Re=c.matches[0])==null?void 0:Re.params)||{},nextUrl:M,nextParams:m[0].params,...h,actionResult:Q,actionStatus:ae},Pe=Ja(m),Fe=m.map((V,ue)=>{let{route:A}=V,ne=null;if(H!=null&&ue>H?ne=!1:A.lazy?ne=!0:sc(A)?w?ne=Vu(A,c.loaderData,c.errors):W0(c.loaderData,c.matches[ue],V)&&(ne=!0):ne=!1,ne!==null)return Gu(a,i,n,Pe,V,v,o,ne);let X=!1;typeof G=="boolean"?X=G:Ee?X=!1:(g||ie.pathname+ie.search===M.pathname+M.search||ie.search!==M.search||V0(c.matches[ue],V))&&(X=!0);let S={...Ne,defaultShouldRevalidate:X},B=Ba(V,S);return Gu(a,i,n,Pe,V,v,o,B,S,G)}),De=[];return z.forEach((V,ue)=>{if(w||!m.some(de=>de.route.id===V.routeId)||N.has(ue))return;let A=c.fetchers.get(ue),ne=A&&A.state!=="idle"&&A.data===void 0,X=Wr(_,V.path,L);if(!X){if(O&&ne)return;De.push({key:ue,routeId:V.routeId,path:V.path,matches:null,match:null,request:null,controller:null});return}if(j.has(ue))return;let S=xi(X,V.path),B=new AbortController,Y=qo(u,V.path,B.signal),re=null;if(E.has(ue))E.delete(ue),re=Jo(a,i,Y,X,S,v,o);else if(ne)g&&(re=Jo(a,i,Y,X,S,v,o));else{let de;typeof G=="boolean"?de=G:Ee?de=!1:de=g;let le={...Ne,defaultShouldRevalidate:de};Ba(S,le)&&(re=Jo(a,i,Y,X,S,v,o,le))}re&&De.push({key:ue,routeId:V.routeId,path:V.path,matches:re,match:S,request:Y,controller:B})}),{dsMatches:Fe,revalidatingFetchers:De}}function sc(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function Vu(n,o,a){if(n.lazy)return!0;if(!sc(n))return!1;let i=o!=null&&n.id in o,u=a!=null&&a[n.id]!==void 0;return!i&&u?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!i&&!u}function W0(n,o,a){let i=!o||a.route.id!==o.route.id,u=!n.hasOwnProperty(a.route.id);return i||u}function V0(n,o){let a=n.route.path;return n.pathname!==o.pathname||a!=null&&a.endsWith("*")&&n.params["*"]!==o.params["*"]}function Ba(n,o){if(n.route.shouldRevalidate){let a=n.route.shouldRevalidate(o);if(typeof a=="boolean")return a}return o.defaultShouldRevalidate}function gm(n,o,a,i,u,c){let m;if(n){let v=i[n];Ue(v,`No route found to patch children into: routeId = ${n}`),v.children||(v.children=[]),m=v.children}else m=a;let h=[],p=[];if(o.forEach(v=>{let w=m.find(g=>_h(v,g));w?p.push({existingRoute:w,newRoute:v}):h.push(v)}),h.length>0){let v=Ka(h,u,[n||"_","patch",String((m==null?void 0:m.length)||"0")],i);m.push(...v)}if(c&&p.length>0)for(let v=0;v{var u;return(u=o.children)==null?void 0:u.some(c=>_h(a,c))}):!1}var vm=new WeakMap,Ph=({key:n,route:o,manifest:a,mapRouteProperties:i})=>{let u=a[o.id];if(Ue(u,"No route found in manifest"),!u.lazy||typeof u.lazy!="object")return;let c=u.lazy[n];if(!c)return;let m=vm.get(u);m||(m={},vm.set(u,m));let h=m[n];if(h)return h;let p=(async()=>{let v=s0(n),g=u[n]!==void 0&&n!=="hasErrorBoundary";if(v)xt(!v,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),m[n]=Promise.resolve();else if(g)xt(!1,`Route "${u.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let E=await c();E!=null&&(Object.assign(u,{[n]:E}),Object.assign(u,i(u)))}typeof u.lazy=="object"&&(u.lazy[n]=void 0,Object.values(u.lazy).every(E=>E===void 0)&&(u.lazy=void 0))})();return m[n]=p,p},ym=new WeakMap;function G0(n,o,a,i,u){let c=a[n.id];if(Ue(c,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let w=ym.get(c);if(w)return{lazyRoutePromise:w,lazyHandlerPromise:w};let g=(async()=>{Ue(typeof n.lazy=="function","No lazy route function found");let E=await n.lazy(),N={};for(let z in E){let j=E[z];if(j===void 0)continue;let _=c0(z),O=c[z]!==void 0&&z!=="hasErrorBoundary";_?xt(!_,"Route property "+z+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?xt(!O,`Route "${c.id}" has a static property "${z}" defined but its lazy function is also returning a value for this property. The lazy route property "${z}" will be ignored.`):N[z]=j}Object.assign(c,N),Object.assign(c,{...i(c),lazy:void 0})})();return ym.set(c,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let m=Object.keys(n.lazy),h=[],p;for(let w of m){if(u&&u.includes(w))continue;let g=Ph({key:w,route:n,manifest:a,mapRouteProperties:i});g&&(h.push(g),w===o&&(p=g))}let v=h.length>0?Promise.all(h).then(()=>{}):void 0;return v==null||v.catch(()=>{}),p==null||p.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:p}}async function xm(n){let o=n.matches.filter(u=>u.shouldLoad),a={};return(await Promise.all(o.map(u=>u.resolve()))).forEach((u,c)=>{a[o[c].route.id]=u}),a}async function K0(n){return n.matches.some(o=>o.route.middleware)?Th(n,()=>xm(n)):xm(n)}function Th(n,o){return Q0(n,o,i=>{if(iy(i))throw i;return i},ry,a);function a(i,u,c){if(c)return Promise.resolve(Object.assign(c.value,{[u]:{type:"error",result:i}}));{let{matches:m}=n,h=Math.min(Math.max(m.findIndex(v=>v.route.id===u),0),Math.max(m.findIndex(v=>v.shouldCallHandler()),0)),p=Vr(m,m[h].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:i}})}}}async function Q0(n,o,a,i,u){let{matches:c,request:m,params:h,context:p,unstable_pattern:v}=n,w=c.flatMap(E=>E.route.middleware?E.route.middleware.map(N=>[E.route.id,N]):[]);return await Lh({request:m,params:h,context:p,unstable_pattern:v},w,o,a,i,u)}async function Lh(n,o,a,i,u,c,m=0){let{request:h}=n;if(h.signal.aborted)throw h.signal.reason??new Error(`Request aborted: ${h.method} ${h.url}`);let p=o[m];if(!p)return await a();let[v,w]=p,g,E=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await Lh(n,o,a,i,u,c,m+1)},g.value}catch(N){return g={value:await c(N,v,g)},g.value}};try{let N=await w(n,E),z=N!=null?i(N):void 0;return u(z)?z:g?z??g.value:(g={value:await E()},g.value)}catch(N){return await c(N,v,g)}}function Mh(n,o,a,i,u){let c=Ph({key:"middleware",route:i.route,manifest:o,mapRouteProperties:n}),m=G0(i.route,Bt(a.method)?"action":"loader",o,n,u);return{middleware:c,route:m.lazyRoutePromise,handler:m.lazyHandlerPromise}}function Gu(n,o,a,i,u,c,m,h,p=null,v){let w=!1,g=Mh(n,o,a,u,c);return{...u,_lazyPromises:g,shouldLoad:h,shouldRevalidateArgs:p,shouldCallHandler(E){return w=!0,p?typeof v=="boolean"?Ba(u,{...p,defaultShouldRevalidate:v}):typeof E=="boolean"?Ba(u,{...p,defaultShouldRevalidate:E}):Ba(u,p):h},resolve(E){let{lazy:N,loader:z,middleware:j}=u.route,_=w||h||E&&!Bt(a.method)&&(N||z),L=j&&j.length>0&&!z&&!N;return _&&(Bt(a.method)||!L)?q0({request:a,unstable_pattern:i,match:u,lazyHandlerPromise:g==null?void 0:g.handler,lazyRoutePromise:g==null?void 0:g.route,handlerOverride:E,scopedContext:m}):Promise.resolve({type:"data",result:void 0})}}}function Jo(n,o,a,i,u,c,m,h=null){return i.map(p=>p.route.id!==u.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:h,shouldCallHandler:()=>!1,_lazyPromises:Mh(n,o,a,p,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Gu(n,o,a,Ja(i),p,c,m,!0,h))}async function Y0(n,o,a,i,u,c){a.some(v=>{var w;return(w=v._lazyPromises)==null?void 0:w.middleware})&&await Promise.all(a.map(v=>{var w;return(w=v._lazyPromises)==null?void 0:w.middleware}));let m={request:o,unstable_pattern:Ja(a),params:a[0].params,context:u,matches:a},p=await n({...m,fetcherKey:i,runClientMiddleware:v=>{let w=m;return Th(w,()=>v({...w,fetcherKey:i,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(v=>{var w,g;return[(w=v._lazyPromises)==null?void 0:w.handler,(g=v._lazyPromises)==null?void 0:g.route]}))}catch{}return p}async function q0({request:n,unstable_pattern:o,match:a,lazyHandlerPromise:i,lazyRoutePromise:u,handlerOverride:c,scopedContext:m}){let h,p,v=Bt(n.method),w=v?"action":"loader",g=E=>{let N,z=new Promise((L,O)=>N=O);p=()=>N(),n.signal.addEventListener("abort",p);let j=L=>typeof E!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${w}" [routeId: ${a.route.id}]`)):E({request:n,unstable_pattern:o,params:a.params,context:m},...L!==void 0?[L]:[]),_=(async()=>{try{return{type:"data",result:await(c?c(O=>j(O)):j())}}catch(L){return{type:"error",result:L}}})();return Promise.race([_,z])};try{let E=v?a.route.action:a.route.loader;if(i||u)if(E){let N,[z]=await Promise.all([g(E).catch(j=>{N=j}),i,u]);if(N!==void 0)throw N;h=z}else{await i;let N=v?a.route.action:a.route.loader;if(N)[h]=await Promise.all([g(N),u]);else if(w==="action"){let z=new URL(n.url),j=z.pathname+z.search;throw _n(405,{method:n.method,pathname:j,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(E)h=await g(E);else{let N=new URL(n.url),z=N.pathname+N.search;throw _n(404,{pathname:z})}}catch(E){return{type:"error",result:E}}finally{p&&n.signal.removeEventListener("abort",p)}return h}async function X0(n){let o=n.headers.get("Content-Type");return o&&/\bapplication\/json\b/.test(o)?n.body==null?null:n.json():n.text()}async function Z0(n){var i,u,c,m,h;let{result:o,type:a}=n;if(uc(o)){let p;try{p=await X0(o)}catch(v){return{type:"error",error:v}}return a==="error"?{type:"error",error:new Za(o.status,o.statusText,p),statusCode:o.status,headers:o.headers}:{type:"data",data:p,statusCode:o.status,headers:o.headers}}return a==="error"?Sm(o)?o.data instanceof Error?{type:"error",error:o.data,statusCode:(i=o.init)==null?void 0:i.status,headers:(u=o.init)!=null&&u.headers?new Headers(o.init.headers):void 0}:{type:"error",error:ny(o),statusCode:Qa(o)?o.status:void 0,headers:(c=o.init)!=null&&c.headers?new Headers(o.init.headers):void 0}:{type:"error",error:o,statusCode:Qa(o)?o.status:void 0}:Sm(o)?{type:"data",data:o.data,statusCode:(m=o.init)==null?void 0:m.status,headers:(h=o.init)!=null&&h.headers?new Headers(o.init.headers):void 0}:{type:"data",data:o}}function J0(n,o,a,i,u){let c=n.headers.get("Location");if(Ue(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!ac(c)){let m=i.slice(0,i.findIndex(h=>h.route.id===a)+1);c=Wu(new URL(o.url),m,u,c),n.headers.set("Location",c)}return n}function wm(n,o,a,i){let u=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(ac(n)){let c=n,m=c.startsWith("//")?new URL(o.protocol+c):new URL(c);if(u.includes(m.protocol))throw new Error("Invalid redirect location");let h=Pn(m.pathname,a)!=null;if(m.origin===o.origin&&h)return m.pathname+m.search+m.hash}try{let c=i.createURL(n);if(u.includes(c.protocol))throw new Error("Invalid redirect location")}catch{}return n}function qo(n,o,a,i){let u=n.createURL(zh(o)).toString(),c={signal:a};if(i&&Bt(i.formMethod)){let{formMethod:m,formEncType:h}=i;c.method=m.toUpperCase(),h==="application/json"?(c.headers=new Headers({"Content-Type":h}),c.body=JSON.stringify(i.json)):h==="text/plain"?c.body=i.text:h==="application/x-www-form-urlencoded"&&i.formData?c.body=Ku(i.formData):c.body=i.formData}return new Request(u,c)}function Ku(n){let o=new URLSearchParams;for(let[a,i]of n.entries())o.append(a,typeof i=="string"?i:i.name);return o}function bm(n){let o=new FormData;for(let[a,i]of n.entries())o.append(a,i);return o}function ey(n,o,a,i=!1,u=!1){let c={},m=null,h,p=!1,v={},w=a&&gn(a[1])?a[1].error:void 0;return n.forEach(g=>{if(!(g.route.id in o))return;let E=g.route.id,N=o[E];if(Ue(!go(N),"Cannot handle redirect results in processLoaderData"),gn(N)){let z=N.error;if(w!==void 0&&(z=w,w=void 0),m=m||{},u)m[E]=z;else{let j=Vr(n,E);m[j.route.id]==null&&(m[j.route.id]=z)}i||(c[E]=Rh),p||(p=!0,h=Qa(N.error)?N.error.status:500),N.headers&&(v[E]=N.headers)}else c[E]=N.data,N.statusCode&&N.statusCode!==200&&!p&&(h=N.statusCode),N.headers&&(v[E]=N.headers)}),w!==void 0&&a&&(m={[a[0]]:w},a[2]&&(c[a[2]]=void 0)),{loaderData:c,errors:m,statusCode:h||200,loaderHeaders:v}}function km(n,o,a,i,u,c){let{loaderData:m,errors:h}=ey(o,a,i);return u.filter(p=>!p.matches||p.matches.some(v=>v.shouldLoad)).forEach(p=>{let{key:v,match:w,controller:g}=p;if(g&&g.signal.aborted)return;let E=c[v];if(Ue(E,"Did not find corresponding fetcher result"),gn(E)){let N=Vr(n.matches,w==null?void 0:w.route.id);h&&h[N.route.id]||(h={...h,[N.route.id]:E.error}),n.fetchers.delete(v)}else if(go(E))Ue(!1,"Unhandled fetcher revalidation redirect");else{let N=gr(E.data);n.fetchers.set(v,N)}}),{loaderData:m,errors:h}}function Em(n,o,a,i){let u=Object.entries(o).filter(([,c])=>c!==Rh).reduce((c,[m,h])=>(c[m]=h,c),{});for(let c of a){let m=c.route.id;if(!o.hasOwnProperty(m)&&n.hasOwnProperty(m)&&c.route.loader&&(u[m]=n[m]),i&&i.hasOwnProperty(m))break}return u}function Nm(n){return n?gn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Vr(n,o){return(o?n.slice(0,n.findIndex(i=>i.route.id===o)+1):[...n]).reverse().find(i=>i.route.hasErrorBoundary===!0)||n[0]}function ii(n){let o=n.length===1?n[0]:n.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:o}],route:o}}function _n(n,{pathname:o,routeId:a,method:i,type:u,message:c}={}){let m="Unknown Server Error",h="Unknown @remix-run/router error";return n===400?(m="Bad Request",i&&o&&a?h=`You made a ${i} request to "${o}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:u==="invalid-body"&&(h="Unable to encode submission body")):n===403?(m="Forbidden",h=`Route "${a}" does not match URL "${o}"`):n===404?(m="Not Found",h=`No route matches URL "${o}"`):n===405&&(m="Method Not Allowed",i&&o&&a?h=`You made a ${i.toUpperCase()} request to "${o}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:i&&(h=`Invalid request method "${i.toUpperCase()}"`)),new Za(n||500,m,new Error(h),!0)}function si(n){let o=Object.entries(n);for(let a=o.length-1;a>=0;a--){let[i,u]=o[a];if(go(u))return{key:i,result:u}}}function zh(n){let o=typeof n=="string"?Qr(n):n;return Jn({...o,hash:""})}function ty(n,o){return n.pathname!==o.pathname||n.search!==o.search?!1:n.hash===""?o.hash!=="":n.hash===o.hash?!0:o.hash!==""}function ny(n){var o,a;return new Za(((o=n.init)==null?void 0:o.status)??500,((a=n.init)==null?void 0:a.statusText)??"Internal Server Error",n.data)}function ry(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([o,a])=>typeof o=="string"&&oy(a))}function oy(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function ay(n){return uc(n.result)&&Ch.has(n.result.status)}function gn(n){return n.type==="error"}function go(n){return(n&&n.type)==="redirect"}function Sm(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function uc(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function ly(n){return Ch.has(n)}function iy(n){return uc(n)&&ly(n.status)&&n.headers.has("Location")}function sy(n){return A0.has(n.toUpperCase())}function Bt(n){return I0.has(n.toUpperCase())}function cc(n){return new URLSearchParams(n).getAll("index").some(o=>o==="")}function xi(n,o){let a=typeof o=="string"?Qr(o).search:o.search;if(n[n.length-1].route.index&&cc(a||""))return n[n.length-1];let i=bh(n);return i[i.length-1]}function Cm(n){let{formMethod:o,formAction:a,formEncType:i,text:u,formData:c,json:m}=n;if(!(!o||!a||!i)){if(u!=null)return{formMethod:o,formAction:a,formEncType:i,formData:void 0,json:void 0,text:u};if(c!=null)return{formMethod:o,formAction:a,formEncType:i,formData:c,json:void 0,text:void 0};if(m!==void 0)return{formMethod:o,formAction:a,formEncType:i,formData:void 0,json:m,text:void 0}}}function Su(n,o){return o?{state:"loading",location:n,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function uy(n,o){return{state:"submitting",location:n,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}}function Oa(n,o){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:o}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:o}}function cy(n,o){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:o?o.data:void 0}}function gr(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function dy(n,o){try{let a=n.sessionStorage.getItem(jh);if(a){let i=JSON.parse(a);for(let[u,c]of Object.entries(i||{}))c&&Array.isArray(c)&&o.set(u,new Set(c||[]))}}catch{}}function fy(n,o){if(o.size>0){let a={};for(let[i,u]of o)a[i]=[...u];try{n.sessionStorage.setItem(jh,JSON.stringify(a))}catch(i){xt(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function jm(){let n,o,a=new Promise((i,u)=>{n=async c=>{i(c);try{await a}catch{}},o=async c=>{u(c);try{await a}catch{}}});return{promise:a,resolve:n,reject:o}}var xo=x.createContext(null);xo.displayName="DataRouter";var el=x.createContext(null);el.displayName="DataRouterState";var Dh=x.createContext(!1);function my(){return x.useContext(Dh)}var dc=x.createContext({isTransitioning:!1});dc.displayName="ViewTransition";var Ih=x.createContext(new Map);Ih.displayName="Fetchers";var hy=x.createContext(null);hy.displayName="Await";var Tn=x.createContext(null);Tn.displayName="Navigation";var Li=x.createContext(null);Li.displayName="Location";var tr=x.createContext({outlet:null,matches:[],isDataRoute:!1});tr.displayName="Route";var fc=x.createContext(null);fc.displayName="RouteError";var Oh="REACT_ROUTER_ERROR",py="REDIRECT",gy="ROUTE_ERROR_RESPONSE";function vy(n){if(n.startsWith(`${Oh}:${py}:{`))try{let o=JSON.parse(n.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function yy(n){if(n.startsWith(`${Oh}:${gy}:{`))try{let o=JSON.parse(n.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new Za(o.status,o.statusText,o.data)}catch{}}function xy(n,{relative:o}={}){Ue(tl(),"useHref() may be used only in the context of a component.");let{basename:a,navigator:i}=x.useContext(Tn),{hash:u,pathname:c,search:m}=nl(n,{relative:o}),h=c;return a!=="/"&&(h=c==="/"?a:Zn([a,c])),i.createHref({pathname:h,search:m,hash:u})}function tl(){return x.useContext(Li)!=null}function Yr(){return Ue(tl(),"useLocation() may be used only in the context of a component."),x.useContext(Li).location}var Ah="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Fh(n){x.useContext(Tn).static||x.useLayoutEffect(n)}function wy(){let{isDataRoute:n}=x.useContext(tr);return n?Dy():by()}function by(){Ue(tl(),"useNavigate() may be used only in the context of a component.");let n=x.useContext(xo),{basename:o,navigator:a}=x.useContext(Tn),{matches:i}=x.useContext(tr),{pathname:u}=Yr(),c=JSON.stringify(lc(i)),m=x.useRef(!1);return Fh(()=>{m.current=!0}),x.useCallback((p,v={})=>{if(xt(m.current,Ah),!m.current)return;if(typeof p=="number"){a.go(p);return}let w=ic(p,JSON.parse(c),u,v.relative==="path");n==null&&o!=="/"&&(w.pathname=w.pathname==="/"?o:Zn([o,w.pathname])),(v.replace?a.replace:a.push)(w,v.state,v)},[o,a,c,u,n])}var ky=x.createContext(null);function Ey(n){let o=x.useContext(tr).outlet;return x.useMemo(()=>o&&x.createElement(ky.Provider,{value:n},o),[o,n])}function nl(n,{relative:o}={}){let{matches:a}=x.useContext(tr),{pathname:i}=Yr(),u=JSON.stringify(lc(a));return x.useMemo(()=>ic(n,JSON.parse(u),i,o==="path"),[n,u,i,o])}function Ny(n,o,a,i,u){Ue(tl(),"useRoutes() may be used only in the context of a component.");let{navigator:c}=x.useContext(Tn),{matches:m}=x.useContext(tr),h=m[m.length-1],p=h?h.params:{},v=h?h.pathname:"/",w=h?h.pathnameBase:"/",g=h&&h.route;{let O=g&&g.path||"";Uh(v,!g||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${v}" (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 E=Yr(),N;N=E;let z=N.pathname||"/",j=z;if(w!=="/"){let O=w.replace(/^\//,"").split("/");j="/"+z.replace(/^\//,"").split("/").slice(O.length).join("/")}let _=Wr(n,{pathname:j});return xt(g||_!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),xt(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.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.`),_y(_&&_.map(O=>Object.assign({},O,{params:Object.assign({},p,O.params),pathname:Zn([w,c.encodeLocation?c.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?w:Zn([w,c.encodeLocation?c.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),m,a,i,u)}function Sy(){let n=zy(),o=Qa(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),a=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:i},c={padding:"2px 4px",backgroundColor:i},m=null;return console.error("Error handled by React Router default ErrorBoundary:",n),m=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:c},"ErrorBoundary")," or"," ",x.createElement("code",{style:c},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},o),a?x.createElement("pre",{style:u},a):null,m)}var Cy=x.createElement(Sy,null),$h=class extends x.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,o){return o.location!==n.location||o.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:o.error,location:o.location,revalidation:n.revalidation||o.revalidation}}componentDidCatch(n,o){this.props.onError?this.props.onError(n,o):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const a=yy(n.digest);a&&(n=a)}let o=n!==void 0?x.createElement(tr.Provider,{value:this.props.routeContext},x.createElement(fc.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?x.createElement(jy,{error:n},o):o}};$h.contextType=Dh;var Cu=new WeakMap;function jy({children:n,error:o}){let{basename:a}=x.useContext(Tn);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let i=vy(o.digest);if(i){let u=Cu.get(o);if(u)throw u;let c=Eh(i.location,a);if(kh&&!Cu.get(o))if(c.isExternal||i.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:i.replace}));throw Cu.set(o,m),m}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return n}function Ry({routeContext:n,match:o,children:a}){let i=x.useContext(xo);return i&&i.static&&i.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=o.route.id),x.createElement(tr.Provider,{value:n},a)}function _y(n,o=[],a=null,i=null,u=null){if(n==null){if(!a)return null;if(a.errors)n=a.matches;else if(o.length===0&&!a.initialized&&a.matches.length>0)n=a.matches;else return null}let c=n,m=a==null?void 0:a.errors;if(m!=null){let w=c.findIndex(g=>g.route.id&&(m==null?void 0:m[g.route.id])!==void 0);Ue(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),c=c.slice(0,Math.min(c.length,w+1))}let h=!1,p=-1;if(a)for(let w=0;w=0?c=c.slice(0,p+1):c=[c[0]];break}}}let v=a&&i?(w,g)=>{var E,N;i(w,{location:a.location,params:((N=(E=a.matches)==null?void 0:E[0])==null?void 0:N.params)??{},unstable_pattern:Ja(a.matches),errorInfo:g})}:void 0;return c.reduceRight((w,g,E)=>{let N,z=!1,j=null,_=null;a&&(N=m&&g.route.id?m[g.route.id]:void 0,j=g.route.errorElement||Cy,h&&(p<0&&E===0?(Uh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,_=null):p===E&&(z=!0,_=g.route.hydrateFallbackElement||null)));let L=o.concat(c.slice(0,E+1)),O=()=>{let D;return N?D=j:z?D=_:g.route.Component?D=x.createElement(g.route.Component,null):g.route.element?D=g.route.element:D=w,x.createElement(Ry,{match:g,routeContext:{outlet:w,matches:L,isDataRoute:a!=null},children:D})};return a&&(g.route.ErrorBoundary||g.route.errorElement||E===0)?x.createElement($h,{location:a.location,revalidation:a.revalidation,component:j,error:N,children:O(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:v}):O()},null)}function mc(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Py(n){let o=x.useContext(xo);return Ue(o,mc(n)),o}function Ty(n){let o=x.useContext(el);return Ue(o,mc(n)),o}function Ly(n){let o=x.useContext(tr);return Ue(o,mc(n)),o}function hc(n){let o=Ly(n),a=o.matches[o.matches.length-1];return Ue(a.route.id,`${n} can only be used on routes that contain a unique "id"`),a.route.id}function My(){return hc("useRouteId")}function zy(){var i;let n=x.useContext(fc),o=Ty("useRouteError"),a=hc("useRouteError");return n!==void 0?n:(i=o.errors)==null?void 0:i[a]}function Dy(){let{router:n}=Py("useNavigate"),o=hc("useNavigate"),a=x.useRef(!1);return Fh(()=>{a.current=!0}),x.useCallback(async(u,c={})=>{xt(a.current,Ah),a.current&&(typeof u=="number"?await n.navigate(u):await n.navigate(u,{fromRouteId:o,...c}))},[n,o])}var Rm={};function Uh(n,o,a){!o&&!Rm[n]&&(Rm[n]=!0,xt(!1,a))}var _m={};function Pm(n,o){!n&&!_m[o]&&(_m[o]=!0,console.warn(o))}var Iy="useOptimistic",Tm=ph[Iy],Oy=()=>{};function Ay(n){return Tm?Tm(n):[n,Oy]}function Fy(n){let o={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&xt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(o,{element:x.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&xt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(o,{hydrateFallbackElement:x.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&xt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(o,{errorElement:x.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),o}var $y=["HydrateFallback","hydrateFallbackElement"],Uy=class{constructor(){this.status="pending",this.promise=new Promise((n,o)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",n(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",o(a))}})}};function By({router:n,flushSync:o,onError:a,unstable_useTransitions:i}){i=my()||i;let[c,m]=x.useState(n.state),[h,p]=Ay(c),[v,w]=x.useState(),[g,E]=x.useState({isTransitioning:!1}),[N,z]=x.useState(),[j,_]=x.useState(),[L,O]=x.useState(),D=x.useRef(new Map),G=x.useCallback((H,{deletedFetchers:ae,newErrors:Ee,flushSync:Ne,viewTransitionOpts:Pe})=>{Ee&&a&&Object.values(Ee).forEach(De=>{var Re;return a(De,{location:H.location,params:((Re=H.matches[0])==null?void 0:Re.params)??{},unstable_pattern:Ja(H.matches)})}),H.fetchers.forEach((De,Re)=>{De.data!==void 0&&D.current.set(Re,De.data)}),ae.forEach(De=>D.current.delete(De)),Pm(Ne===!1||o!=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 Fe=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Pm(Pe==null||Fe,"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."),!Pe||!Fe){o&&Ne?o(()=>m(H)):i===!1?m(H):x.startTransition(()=>{i===!0&&p(De=>Lm(De,H)),m(H)});return}if(o&&Ne){o(()=>{j&&(N==null||N.resolve(),j.skipTransition()),E({isTransitioning:!0,flushSync:!0,currentLocation:Pe.currentLocation,nextLocation:Pe.nextLocation})});let De=n.window.document.startViewTransition(()=>{o(()=>m(H))});De.finished.finally(()=>{o(()=>{z(void 0),_(void 0),w(void 0),E({isTransitioning:!1})})}),o(()=>_(De));return}j?(N==null||N.resolve(),j.skipTransition(),O({state:H,currentLocation:Pe.currentLocation,nextLocation:Pe.nextLocation})):(w(H),E({isTransitioning:!0,flushSync:!1,currentLocation:Pe.currentLocation,nextLocation:Pe.nextLocation}))},[n.window,o,j,N,i,p,a]);x.useLayoutEffect(()=>n.subscribe(G),[n,G]),x.useEffect(()=>{g.isTransitioning&&!g.flushSync&&z(new Uy)},[g]),x.useEffect(()=>{if(N&&v&&n.window){let H=v,ae=N.promise,Ee=n.window.document.startViewTransition(async()=>{i===!1?m(H):x.startTransition(()=>{i===!0&&p(Ne=>Lm(Ne,H)),m(H)}),await ae});Ee.finished.finally(()=>{z(void 0),_(void 0),w(void 0),E({isTransitioning:!1})}),_(Ee)}},[v,N,n.window,i,p]),x.useEffect(()=>{N&&v&&h.location.key===v.location.key&&N.resolve()},[N,j,h.location,v]),x.useEffect(()=>{!g.isTransitioning&&L&&(w(L.state),E({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}),O(void 0))},[g.isTransitioning,L]);let Q=x.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:H=>n.navigate(H),push:(H,ae,Ee)=>n.navigate(H,{state:ae,preventScrollReset:Ee==null?void 0:Ee.preventScrollReset}),replace:(H,ae,Ee)=>n.navigate(H,{replace:!0,state:ae,preventScrollReset:Ee==null?void 0:Ee.preventScrollReset})}),[n]),ie=n.basename||"/",M=x.useMemo(()=>({router:n,navigator:Q,static:!1,basename:ie,onError:a}),[n,Q,ie,a]);return x.createElement(x.Fragment,null,x.createElement(xo.Provider,{value:M},x.createElement(el.Provider,{value:h},x.createElement(Ih.Provider,{value:D.current},x.createElement(dc.Provider,{value:g},x.createElement(Gy,{basename:ie,location:h.location,navigationType:h.historyAction,navigator:Q,unstable_useTransitions:i},x.createElement(Hy,{routes:n.routes,future:n.future,state:h,onError:a})))))),null)}function Lm(n,o){return{...n,navigation:o.navigation.state!=="idle"?o.navigation:n.navigation,revalidation:o.revalidation!=="idle"?o.revalidation:n.revalidation,actionData:o.navigation.state!=="submitting"?o.actionData:n.actionData,fetchers:o.fetchers}}var Hy=x.memo(Wy);function Wy({routes:n,future:o,state:a,onError:i}){return Ny(n,void 0,a,i,o)}function Vy(n){return Ey(n.context)}function Gy({basename:n="/",children:o=null,location:a,navigationType:i="POP",navigator:u,static:c=!1,unstable_useTransitions:m}){Ue(!tl(),"You cannot render a inside another . You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),p=x.useMemo(()=>({basename:h,navigator:u,static:c,unstable_useTransitions:m,future:{}}),[h,u,c,m]);typeof a=="string"&&(a=Qr(a));let{pathname:v="/",search:w="",hash:g="",state:E=null,key:N="default"}=a,z=x.useMemo(()=>{let j=Pn(v,h);return j==null?null:{location:{pathname:j,search:w,hash:g,state:E,key:N},navigationType:i}},[h,v,w,g,E,N,i]);return xt(z!=null,` is not able to match the URL "${v}${w}${g}" because it does not start with the basename, so the won't render anything.`),z==null?null:x.createElement(Tn.Provider,{value:p},x.createElement(Li.Provider,{children:o,value:z}))}var wi="get",bi="application/x-www-form-urlencoded";function Mi(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Ky(n){return Mi(n)&&n.tagName.toLowerCase()==="button"}function Qy(n){return Mi(n)&&n.tagName.toLowerCase()==="form"}function Yy(n){return Mi(n)&&n.tagName.toLowerCase()==="input"}function qy(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Xy(n,o){return n.button===0&&(!o||o==="_self")&&!qy(n)}var ui=null;function Zy(){if(ui===null)try{new FormData(document.createElement("form"),0),ui=!1}catch{ui=!0}return ui}var Jy=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ju(n){return n!=null&&!Jy.has(n)?(xt(!1,`"${n}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${bi}"`),null):n}function ex(n,o){let a,i,u,c,m;if(Qy(n)){let h=n.getAttribute("action");i=h?Pn(h,o):null,a=n.getAttribute("method")||wi,u=ju(n.getAttribute("enctype"))||bi,c=new FormData(n)}else if(Ky(n)||Yy(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a