function uv(e,n){for(var a=0;as[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function a(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=a(o);fetch(o.href,l)}})();function Pg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pu={exports:{}},vi={},Ru={exports:{}},et={};/** * @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 op;function dv(){if(op)return et;op=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.iterator;function b(T){return T===null||typeof T!="object"?null:(T=g&&T[g]||T["@@iterator"],typeof T=="function"?T:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,N={};function j(T,A,te){this.props=T,this.context=A,this.refs=N,this.updater=te||S}j.prototype.isReactComponent={},j.prototype.setState=function(T,A){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,A,"setState")},j.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function L(){}L.prototype=j.prototype;function R(T,A,te){this.props=T,this.context=A,this.refs=N,this.updater=te||S}var D=R.prototype=new L;D.constructor=R,C(D,j.prototype),D.isPureReactComponent=!0;var H=Array.isArray,K=Object.prototype.hasOwnProperty,re={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function w(T,A,te){var ie,oe={},ae=null,ue=null;if(A!=null)for(ie in A.ref!==void 0&&(ue=A.ref),A.key!==void 0&&(ae=""+A.key),A)K.call(A,ie)&&!O.hasOwnProperty(ie)&&(oe[ie]=A[ie]);var xe=arguments.length-2;if(xe===1)oe.children=te;else if(1>>1,A=_[T];if(0>>1;To(oe,J))aeo(ue,oe)?(_[T]=ue,_[ae]=J,T=ae):(_[T]=oe,_[ie]=J,T=ie);else if(aeo(ue,J))_[T]=ue,_[ae]=J,T=ae;else break e}}return X}function o(_,X){var J=_.sortIndex-X.sortIndex;return J!==0?J:_.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var p=[],m=[],y=1,g=null,b=3,S=!1,C=!1,N=!1,j=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,R=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(_){for(var X=a(m);X!==null;){if(X.callback===null)s(m);else if(X.startTime<=_)s(m),X.sortIndex=X.expirationTime,n(p,X);else break;X=a(m)}}function H(_){if(N=!1,D(_),!C)if(a(p)!==null)C=!0,G(K);else{var X=a(m);X!==null&&B(H,X.startTime-_)}}function K(_,X){C=!1,N&&(N=!1,L(w),w=-1),S=!0;var J=b;try{for(D(X),g=a(p);g!==null&&(!(g.expirationTime>X)||_&&!U());){var T=g.callback;if(typeof T=="function"){g.callback=null,b=g.priorityLevel;var A=T(g.expirationTime<=X);X=e.unstable_now(),typeof A=="function"?g.callback=A:g===a(p)&&s(p),D(X)}else s(p);g=a(p)}if(g!==null)var te=!0;else{var ie=a(m);ie!==null&&B(H,ie.startTime-X),te=!1}return te}finally{g=null,b=J,S=!1}}var re=!1,O=null,w=-1,M=5,E=-1;function U(){return!(e.unstable_now()-E_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return a(p)},e.unstable_next=function(_){switch(b){case 1:case 2:case 3:var X=3;break;default:X=b}var J=b;b=X;try{return _()}finally{b=J}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,X){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var J=b;b=_;try{return X()}finally{b=J}},e.unstable_scheduleCallback=function(_,X,J){var T=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0T?(_.sortIndex=J,n(m,_),a(p)===null&&_===a(m)&&(N?(L(w),w=-1):N=!0,B(H,J-T))):(_.sortIndex=A,n(p,_),C||S||(C=!0,G(K))),_},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(_){var X=b;return function(){var J=b;b=X;try{return _.apply(this,arguments)}finally{b=J}}}})(_u)),_u}var fp;function mv(){return fp||(fp=1,Iu.exports=pv()),Iu.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 hp;function gv(){if(hp)return Pn;hp=1;var e=zl(),n=mv();function a(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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]*$/,y={},g={};function b(t){return p.call(g,t)?!0:p.call(y,t)?!1:m.test(t)?g[t]=!0:(y[t]=!0,!1)}function S(t,r,i,c){if(i!==null&&i.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return c?!1:i!==null?!i.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function C(t,r,i,c){if(r===null||typeof r>"u"||S(t,r,i,c))return!0;if(c)return!1;if(i!==null)switch(i.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function N(t,r,i,c,h,x,k){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=i,this.propertyName=t,this.type=r,this.sanitizeURL=x,this.removeEmptyString=k}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){j[t]=new N(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];j[r]=new N(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){j[t]=new N(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){j[t]=new N(t,2,!1,t,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(t){j[t]=new N(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){j[t]=new N(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){j[t]=new N(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){j[t]=new N(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){j[t]=new N(t,5,!1,t.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function R(t){return t[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(t){var r=t.replace(L,R);j[r]=new N(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(L,R);j[r]=new N(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(L,R);j[r]=new N(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){j[t]=new N(t,1,!1,t.toLowerCase(),null,!1,!1)}),j.xlinkHref=new N("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){j[t]=new N(t,1,!1,t.toLowerCase(),null,!0,!0)});function D(t,r,i,c){var h=j.hasOwnProperty(r)?j[r]:null;(h!==null?h.type!==0:c||!(2P||h[k]!==x[P]){var z=` `+h[k].replace(" at new "," at ");return t.displayName&&z.includes("")&&(z=z.replace("",t.displayName)),z}while(1<=k&&0<=P);break}}}finally{te=!1,Error.prepareStackTrace=i}return(t=t?t.displayName||t.name:"")?A(t):""}function oe(t){switch(t.tag){case 5:return A(t.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return t=ie(t.type,!1),t;case 11:return t=ie(t.type.render,!1),t;case 1:return t=ie(t.type,!0),t;default:return""}}function ae(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case O:return"Fragment";case re:return"Portal";case M:return"Profiler";case w:return"StrictMode";case I:return"Suspense";case W:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case U:return(t.displayName||"Context")+".Consumer";case E:return(t._context.displayName||"Context")+".Provider";case Y:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Q:return r=t.displayName||null,r!==null?r:ae(t.type)||"Memo";case G:r=t._payload,t=t._init;try{return ae(t(r))}catch{}}return null}function ue(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ae(r);case 8:return r===w?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function xe(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ve(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Ve(t){var r=ve(t)?"checked":"value",i=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var h=i.get,x=i.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(k){c=""+k,x.call(this,k)}}),Object.defineProperty(t,r,{enumerable:i.enumerable}),{getValue:function(){return c},setValue:function(k){c=""+k},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Ce(t){t._valueTracker||(t._valueTracker=Ve(t))}function Ue(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),c="";return t&&(c=ve(t)?t.checked?"true":"false":t.value),t=c,t!==i?(r.setValue(t),!0):!1}function Oe(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function dt(t,r){var i=r.checked;return J({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??t._wrapperState.initialChecked})}function xt(t,r){var i=r.defaultValue==null?"":r.defaultValue,c=r.checked!=null?r.checked:r.defaultChecked;i=xe(r.value!=null?r.value:i),t._wrapperState={initialChecked:c,initialValue:i,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function vt(t,r){r=r.checked,r!=null&&D(t,"checked",r,!1)}function ke(t,r){vt(t,r);var i=xe(r.value),c=r.type;if(i!=null)c==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+i):t.value!==""+i&&(t.value=""+i);else if(c==="submit"||c==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?we(t,r.type,i):r.hasOwnProperty("defaultValue")&&we(t,r.type,xe(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function Re(t,r,i){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var c=r.type;if(!(c!=="submit"&&c!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,i||r===t.value||(t.value=r),t.defaultValue=r}i=t.name,i!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,i!==""&&(t.name=i)}function we(t,r,i){(r!=="number"||Oe(t.ownerDocument)!==t)&&(i==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+i&&(t.defaultValue=""+i))}var me=Array.isArray;function Ie(t,r,i,c){if(t=t.options,r){r={};for(var h=0;h"+r.valueOf().toString()+"",r=Qt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function qe(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var Sn={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},ft=["Webkit","ms","Moz","O"];Object.keys(Sn).forEach(function(t){ft.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),Sn[r]=Sn[t]})});function Mn(t,r,i){return r==null||typeof r=="boolean"||r===""?"":i||typeof r!="number"||r===0||Sn.hasOwnProperty(t)&&Sn[t]?(""+r).trim():r+"px"}function Te(t,r){t=t.style;for(var i in r)if(r.hasOwnProperty(i)){var c=i.indexOf("--")===0,h=Mn(i,r[i],c);i==="float"&&(i="cssFloat"),c?t.setProperty(i,h):t[i]=h}}var Ze=J({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 ot(t,r){if(r){if(Ze[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(a(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(a(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(a(61))}if(r.style!=null&&typeof r.style!="object")throw Error(a(62))}}function it(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){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 Zt=null;function gt(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var yr=null,sn=null,Vn=null;function Dr(t){if(t=ai(t)){if(typeof yr!="function")throw Error(a(280));var r=t.stateNode;r&&(r=mo(r),yr(t.stateNode,t.type,r))}}function Ye(t){sn?Vn?Vn.push(t):Vn=[t]:sn=t}function Et(){if(sn){var t=sn,r=Vn;if(Vn=sn=null,Dr(t),r)for(t=0;t>>=0,t===0?32:31-(Ja(t)/st|0)|0}var yn=64,kn=4194304;function Yr(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Gr(t,r){var i=t.pendingLanes;if(i===0)return 0;var c=0,h=t.suspendedLanes,x=t.pingedLanes,k=i&268435455;if(k!==0){var P=k&~h;P!==0?c=Yr(P):(x&=k,x!==0&&(c=Yr(x)))}else k=i&~h,k!==0?c=Yr(k):x!==0&&(c=Yr(x));if(c===0)return 0;if(r!==0&&r!==c&&(r&h)===0&&(h=c&-c,x=r&-r,h>=x||h===16&&(x&4194240)!==0))return r;if((c&4)!==0&&(c|=i&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=c;0i;i++)r.push(t);return r}function Vs(t,r,i){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-ln(r),t[r]=i}function Mx(t,r){var i=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var c=t.eventTimes;for(t=t.expirationTimes;0=Xs),eh=" ",th=!1;function nh(t,r){switch(t){case"keyup":return s2.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var es=!1;function o2(t,r){switch(t){case"compositionend":return rh(r);case"keypress":return r.which!==32?null:(th=!0,eh);case"textInput":return t=r.data,t===eh&&th?null:t;default:return null}}function l2(t,r){if(es)return t==="compositionend"||!cc&&nh(t,r)?(t=Gf(),ro=rc=Zr=null,es=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:i,offset:r-t};t=c}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=uh(i)}}function fh(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?fh(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function hh(){for(var t=window,r=Oe();r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=Oe(t.document)}return r}function fc(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function y2(t){var r=hh(),i=t.focusedElem,c=t.selectionRange;if(r!==i&&i&&i.ownerDocument&&fh(i.ownerDocument.documentElement,i)){if(c!==null&&fc(i)){if(r=c.start,t=c.end,t===void 0&&(t=r),"selectionStart"in i)i.selectionStart=r,i.selectionEnd=Math.min(t,i.value.length);else if(t=(r=i.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var h=i.textContent.length,x=Math.min(c.start,h);c=c.end===void 0?x:Math.min(c.end,h),!t.extend&&x>c&&(h=c,c=x,x=h),h=dh(i,x);var k=dh(i,c);h&&k&&(t.rangeCount!==1||t.anchorNode!==h.node||t.anchorOffset!==h.offset||t.focusNode!==k.node||t.focusOffset!==k.offset)&&(r=r.createRange(),r.setStart(h.node,h.offset),t.removeAllRanges(),x>c?(t.addRange(r),t.extend(k.node,k.offset)):(r.setEnd(k.node,k.offset),t.addRange(r)))}}for(r=[],t=i;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i=document.documentMode,ts=null,hc=null,Zs=null,pc=!1;function ph(t,r,i){var c=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;pc||ts==null||ts!==Oe(c)||(c=ts,"selectionStart"in c&&fc(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Zs&&Qs(Zs,c)||(Zs=c,c=fo(hc,"onSelect"),0is||(t.current=Nc[is],Nc[is]=null,is--)}function wt(t,r){is++,Nc[is]=t.current,t.current=r}var ra={},un=na(ra),jn=na(!1),Na=ra;function os(t,r){var i=t.type.contextTypes;if(!i)return ra;var c=t.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===r)return c.__reactInternalMemoizedMaskedChildContext;var h={},x;for(x in i)h[x]=r[x];return c&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=h),h}function Cn(t){return t=t.childContextTypes,t!=null}function go(){Ct(jn),Ct(un)}function Ph(t,r,i){if(un.current!==ra)throw Error(a(168));wt(un,r),wt(jn,i)}function Rh(t,r,i){var c=t.stateNode;if(r=r.childContextTypes,typeof c.getChildContext!="function")return i;c=c.getChildContext();for(var h in c)if(!(h in r))throw Error(a(108,ue(t)||"Unknown",h));return J({},i,c)}function yo(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ra,Na=un.current,wt(un,t),wt(jn,jn.current),!0}function Mh(t,r,i){var c=t.stateNode;if(!c)throw Error(a(169));i?(t=Rh(t,r,Na),c.__reactInternalMemoizedMergedChildContext=t,Ct(jn),Ct(un),wt(un,t)):Ct(jn),wt(jn,i)}var Or=null,xo=!1,Ec=!1;function Ih(t){Or===null?Or=[t]:Or.push(t)}function P2(t){xo=!0,Ih(t)}function aa(){if(!Ec&&Or!==null){Ec=!0;var t=0,r=mt;try{var i=Or;for(mt=1;t>=k,h-=k,zr=1<<32-ln(r)+h|i<We?(qt=Be,Be=null):qt=Be.sibling;var ct=de(Z,Be,ee[We],pe);if(ct===null){Be===null&&(Be=qt);break}t&&Be&&ct.alternate===null&&r(Z,Be),$=x(ct,$,We),ze===null?Me=ct:ze.sibling=ct,ze=ct,Be=qt}if(We===ee.length)return i(Z,Be),Tt&&Ta(Z,We),Me;if(Be===null){for(;WeWe?(qt=Be,Be=null):qt=Be.sibling;var ha=de(Z,Be,ct.value,pe);if(ha===null){Be===null&&(Be=qt);break}t&&Be&&ha.alternate===null&&r(Z,Be),$=x(ha,$,We),ze===null?Me=ha:ze.sibling=ha,ze=ha,Be=qt}if(ct.done)return i(Z,Be),Tt&&Ta(Z,We),Me;if(Be===null){for(;!ct.done;We++,ct=ee.next())ct=he(Z,ct.value,pe),ct!==null&&($=x(ct,$,We),ze===null?Me=ct:ze.sibling=ct,ze=ct);return Tt&&Ta(Z,We),Me}for(Be=c(Z,Be);!ct.done;We++,ct=ee.next())ct=Se(Be,Z,We,ct.value,pe),ct!==null&&(t&&ct.alternate!==null&&Be.delete(ct.key===null?We:ct.key),$=x(ct,$,We),ze===null?Me=ct:ze.sibling=ct,ze=ct);return t&&Be.forEach(function(cv){return r(Z,cv)}),Tt&&Ta(Z,We),Me}function zt(Z,$,ee,pe){if(typeof ee=="object"&&ee!==null&&ee.type===O&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case K:e:{for(var Me=ee.key,ze=$;ze!==null;){if(ze.key===Me){if(Me=ee.type,Me===O){if(ze.tag===7){i(Z,ze.sibling),$=h(ze,ee.props.children),$.return=Z,Z=$;break e}}else if(ze.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===G&&Oh(Me)===ze.type){i(Z,ze.sibling),$=h(ze,ee.props),$.ref=si(Z,ze,ee),$.return=Z,Z=$;break e}i(Z,ze);break}else r(Z,ze);ze=ze.sibling}ee.type===O?($=La(ee.props.children,Z.mode,pe,ee.key),$.return=Z,Z=$):(pe=Ko(ee.type,ee.key,ee.props,null,Z.mode,pe),pe.ref=si(Z,$,ee),pe.return=Z,Z=pe)}return k(Z);case re:e:{for(ze=ee.key;$!==null;){if($.key===ze)if($.tag===4&&$.stateNode.containerInfo===ee.containerInfo&&$.stateNode.implementation===ee.implementation){i(Z,$.sibling),$=h($,ee.children||[]),$.return=Z,Z=$;break e}else{i(Z,$);break}else r(Z,$);$=$.sibling}$=ju(ee,Z.mode,pe),$.return=Z,Z=$}return k(Z);case G:return ze=ee._init,zt(Z,$,ze(ee._payload),pe)}if(me(ee))return Ne(Z,$,ee,pe);if(X(ee))return Pe(Z,$,ee,pe);So(Z,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"?(ee=""+ee,$!==null&&$.tag===6?(i(Z,$.sibling),$=h($,ee),$.return=Z,Z=$):(i(Z,$),$=ku(ee,Z.mode,pe),$.return=Z,Z=$),k(Z)):i(Z,$)}return zt}var ds=zh(!0),Bh=zh(!1),ko=na(null),jo=null,fs=null,_c=null;function Dc(){_c=fs=jo=null}function Fc(t){var r=ko.current;Ct(ko),t._currentValue=r}function Lc(t,r,i){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===i)break;t=t.return}}function hs(t,r){jo=t,_c=fs=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(Nn=!0),t.firstContext=null)}function Hn(t){var r=t._currentValue;if(_c!==t)if(t={context:t,memoizedValue:r,next:null},fs===null){if(jo===null)throw Error(a(308));fs=t,jo.dependencies={lanes:0,firstContext:t}}else fs=fs.next=t;return r}var Pa=null;function Ac(t){Pa===null?Pa=[t]:Pa.push(t)}function Vh(t,r,i,c){var h=r.interleaved;return h===null?(i.next=i,Ac(r)):(i.next=h.next,h.next=i),r.interleaved=i,Vr(t,c)}function Vr(t,r){t.lanes|=r;var i=t.alternate;for(i!==null&&(i.lanes|=r),i=t,t=t.return;t!==null;)t.childLanes|=r,i=t.alternate,i!==null&&(i.childLanes|=r),i=t,t=t.return;return i.tag===3?i.stateNode:null}var sa=!1;function Oc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uh(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ur(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function ia(t,r,i){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(lt&2)!==0){var h=c.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),c.pending=r,Vr(t,i)}return h=c.interleaved,h===null?(r.next=r,Ac(c)):(r.next=h.next,h.next=r),c.interleaved=r,Vr(t,i)}function Co(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194240)!==0)){var c=r.lanes;c&=t.pendingLanes,i|=c,r.lanes=i,Ql(t,i)}}function $h(t,r){var i=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,i===c)){var h=null,x=null;if(i=i.firstBaseUpdate,i!==null){do{var k={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};x===null?h=x=k:x=x.next=k,i=i.next}while(i!==null);x===null?h=x=r:x=x.next=r}else h=x=r;i={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:x,shared:c.shared,effects:c.effects},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}function No(t,r,i,c){var h=t.updateQueue;sa=!1;var x=h.firstBaseUpdate,k=h.lastBaseUpdate,P=h.shared.pending;if(P!==null){h.shared.pending=null;var z=P,ne=z.next;z.next=null,k===null?x=ne:k.next=ne,k=z;var fe=t.alternate;fe!==null&&(fe=fe.updateQueue,P=fe.lastBaseUpdate,P!==k&&(P===null?fe.firstBaseUpdate=ne:P.next=ne,fe.lastBaseUpdate=z))}if(x!==null){var he=h.baseState;k=0,fe=ne=z=null,P=x;do{var de=P.lane,Se=P.eventTime;if((c&de)===de){fe!==null&&(fe=fe.next={eventTime:Se,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var Ne=t,Pe=P;switch(de=r,Se=i,Pe.tag){case 1:if(Ne=Pe.payload,typeof Ne=="function"){he=Ne.call(Se,he,de);break e}he=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Pe.payload,de=typeof Ne=="function"?Ne.call(Se,he,de):Ne,de==null)break e;he=J({},he,de);break e;case 2:sa=!0}}P.callback!==null&&P.lane!==0&&(t.flags|=64,de=h.effects,de===null?h.effects=[P]:de.push(P))}else Se={eventTime:Se,lane:de,tag:P.tag,payload:P.payload,callback:P.callback,next:null},fe===null?(ne=fe=Se,z=he):fe=fe.next=Se,k|=de;if(P=P.next,P===null){if(P=h.shared.pending,P===null)break;de=P,P=de.next,de.next=null,h.lastBaseUpdate=de,h.shared.pending=null}}while(!0);if(fe===null&&(z=he),h.baseState=z,h.firstBaseUpdate=ne,h.lastBaseUpdate=fe,r=h.shared.interleaved,r!==null){h=r;do k|=h.lane,h=h.next;while(h!==r)}else x===null&&(h.shared.lanes=0);Ia|=k,t.lanes=k,t.memoizedState=he}}function Hh(t,r,i){if(t=r.effects,r.effects=null,t!==null)for(r=0;ri?i:4,t(!0);var c=$c.transition;$c.transition={};try{t(!1),r()}finally{mt=i,$c.transition=c}}function c0(){return Wn().memoizedState}function _2(t,r,i){var c=ua(t);if(i={lane:c,action:i,hasEagerState:!1,eagerState:null,next:null},u0(t))d0(r,i);else if(i=Vh(t,r,i,c),i!==null){var h=vn();cr(i,t,c,h),f0(i,r,c)}}function D2(t,r,i){var c=ua(t),h={lane:c,action:i,hasEagerState:!1,eagerState:null,next:null};if(u0(t))d0(r,h);else{var x=t.alternate;if(t.lanes===0&&(x===null||x.lanes===0)&&(x=r.lastRenderedReducer,x!==null))try{var k=r.lastRenderedState,P=x(k,i);if(h.hasEagerState=!0,h.eagerState=P,ar(P,k)){var z=r.interleaved;z===null?(h.next=h,Ac(r)):(h.next=z.next,z.next=h),r.interleaved=h;return}}catch{}finally{}i=Vh(t,r,h,c),i!==null&&(h=vn(),cr(i,t,c,h),f0(i,r,c))}}function u0(t){var r=t.alternate;return t===Mt||r!==null&&r===Mt}function d0(t,r){ci=Po=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function f0(t,r,i){if((i&4194240)!==0){var c=r.lanes;c&=t.pendingLanes,i|=c,r.lanes=i,Ql(t,i)}}var Io={readContext:Hn,useCallback:dn,useContext:dn,useEffect:dn,useImperativeHandle:dn,useInsertionEffect:dn,useLayoutEffect:dn,useMemo:dn,useReducer:dn,useRef:dn,useState:dn,useDebugValue:dn,useDeferredValue:dn,useTransition:dn,useMutableSource:dn,useSyncExternalStore:dn,useId:dn,unstable_isNewReconciler:!1},F2={readContext:Hn,useCallback:function(t,r){return Sr().memoizedState=[t,r===void 0?null:r],t},useContext:Hn,useEffect:t0,useImperativeHandle:function(t,r,i){return i=i!=null?i.concat([t]):null,Ro(4194308,4,a0.bind(null,r,t),i)},useLayoutEffect:function(t,r){return Ro(4194308,4,t,r)},useInsertionEffect:function(t,r){return Ro(4,2,t,r)},useMemo:function(t,r){var i=Sr();return r=r===void 0?null:r,t=t(),i.memoizedState=[t,r],t},useReducer:function(t,r,i){var c=Sr();return r=i!==void 0?i(r):r,c.memoizedState=c.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},c.queue=t,t=t.dispatch=_2.bind(null,Mt,t),[c.memoizedState,t]},useRef:function(t){var r=Sr();return t={current:t},r.memoizedState=t},useState:Zh,useDebugValue:Jc,useDeferredValue:function(t){return Sr().memoizedState=t},useTransition:function(){var t=Zh(!1),r=t[0];return t=I2.bind(null,t[1]),Sr().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,i){var c=Mt,h=Sr();if(Tt){if(i===void 0)throw Error(a(407));i=i()}else{if(i=r(),Jt===null)throw Error(a(349));(Ma&30)!==0||Gh(c,r,i)}h.memoizedState=i;var x={value:i,getSnapshot:r};return h.queue=x,t0(Jh.bind(null,c,x,t),[t]),c.flags|=2048,fi(9,Xh.bind(null,c,x,i,r),void 0,null),i},useId:function(){var t=Sr(),r=Jt.identifierPrefix;if(Tt){var i=Br,c=zr;i=(c&~(1<<32-ln(c)-1)).toString(32)+i,r=":"+r+"R"+i,i=ui++,0<\/script>",t=t.removeChild(t.firstChild)):typeof c.is=="string"?t=k.createElement(i,{is:c.is}):(t=k.createElement(i),i==="select"&&(k=t,c.multiple?k.multiple=!0:c.size&&(k.size=c.size))):t=k.createElementNS(t,i),t[br]=r,t[ri]=c,I0(t,r,!1,!1),r.stateNode=t;e:{switch(k=it(i,c),i){case"dialog":jt("cancel",t),jt("close",t),h=c;break;case"iframe":case"object":case"embed":jt("load",t),h=c;break;case"video":case"audio":for(h=0;hxs&&(r.flags|=128,c=!0,hi(x,!1),r.lanes=4194304)}else{if(!c)if(t=Eo(k),t!==null){if(r.flags|=128,c=!0,i=t.updateQueue,i!==null&&(r.updateQueue=i,r.flags|=4),hi(x,!0),x.tail===null&&x.tailMode==="hidden"&&!k.alternate&&!Tt)return fn(r),null}else 2*at()-x.renderingStartTime>xs&&i!==1073741824&&(r.flags|=128,c=!0,hi(x,!1),r.lanes=4194304);x.isBackwards?(k.sibling=r.child,r.child=k):(i=x.last,i!==null?i.sibling=k:r.child=k,x.last=k)}return x.tail!==null?(r=x.tail,x.rendering=r,x.tail=r.sibling,x.renderingStartTime=at(),r.sibling=null,i=Rt.current,wt(Rt,c?i&1|2:i&1),r):(fn(r),null);case 22:case 23:return bu(),c=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==c&&(r.flags|=8192),c&&(r.mode&1)!==0?(An&1073741824)!==0&&(fn(r),r.subtreeFlags&6&&(r.flags|=8192)):fn(r),null;case 24:return null;case 25:return null}throw Error(a(156,r.tag))}function $2(t,r){switch(Pc(r),r.tag){case 1:return Cn(r.type)&&go(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return ps(),Ct(jn),Ct(un),Uc(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return Bc(r),null;case 13:if(Ct(Rt),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(a(340));us()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Ct(Rt),null;case 4:return ps(),null;case 10:return Fc(r.type._context),null;case 22:case 23:return bu(),null;case 24:return null;default:return null}}var Lo=!1,hn=!1,H2=typeof WeakSet=="function"?WeakSet:Set,je=null;function gs(t,r){var i=t.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(c){It(t,r,c)}else i.current=null}function lu(t,r,i){try{i()}catch(c){It(t,r,c)}}var F0=!1;function W2(t,r){if(bc=to,t=hh(),fc(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var c=i.getSelection&&i.getSelection();if(c&&c.rangeCount!==0){i=c.anchorNode;var h=c.anchorOffset,x=c.focusNode;c=c.focusOffset;try{i.nodeType,x.nodeType}catch{i=null;break e}var k=0,P=-1,z=-1,ne=0,fe=0,he=t,de=null;t:for(;;){for(var Se;he!==i||h!==0&&he.nodeType!==3||(P=k+h),he!==x||c!==0&&he.nodeType!==3||(z=k+c),he.nodeType===3&&(k+=he.nodeValue.length),(Se=he.firstChild)!==null;)de=he,he=Se;for(;;){if(he===t)break t;if(de===i&&++ne===h&&(P=k),de===x&&++fe===c&&(z=k),(Se=he.nextSibling)!==null)break;he=de,de=he.parentNode}he=Se}i=P===-1||z===-1?null:{start:P,end:z}}else i=null}i=i||{start:0,end:0}}else i=null;for(wc={focusedElem:t,selectionRange:i},to=!1,je=r;je!==null;)if(r=je,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,je=t;else for(;je!==null;){r=je;try{var Ne=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Pe=Ne.memoizedProps,zt=Ne.memoizedState,Z=r.stateNode,$=Z.getSnapshotBeforeUpdate(r.elementType===r.type?Pe:ir(r.type,Pe),zt);Z.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var ee=r.stateNode.containerInfo;ee.nodeType===1?ee.textContent="":ee.nodeType===9&&ee.documentElement&&ee.removeChild(ee.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(pe){It(r,r.return,pe)}if(t=r.sibling,t!==null){t.return=r.return,je=t;break}je=r.return}return Ne=F0,F0=!1,Ne}function pi(t,r,i){var c=r.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&t)===t){var x=h.destroy;h.destroy=void 0,x!==void 0&&lu(r,i,x)}h=h.next}while(h!==c)}}function Ao(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var c=i.create;i.destroy=c()}i=i.next}while(i!==r)}}function cu(t){var r=t.ref;if(r!==null){var i=t.stateNode;switch(t.tag){case 5:t=i;break;default:t=i}typeof r=="function"?r(t):r.current=t}}function L0(t){var r=t.alternate;r!==null&&(t.alternate=null,L0(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[br],delete r[ri],delete r[Cc],delete r[E2],delete r[T2])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function A0(t){return t.tag===5||t.tag===3||t.tag===4}function O0(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||A0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function uu(t,r,i){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?i.nodeType===8?i.parentNode.insertBefore(t,r):i.insertBefore(t,r):(i.nodeType===8?(r=i.parentNode,r.insertBefore(t,i)):(r=i,r.appendChild(t)),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=po));else if(c!==4&&(t=t.child,t!==null))for(uu(t,r,i),t=t.sibling;t!==null;)uu(t,r,i),t=t.sibling}function du(t,r,i){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?i.insertBefore(t,r):i.appendChild(t);else if(c!==4&&(t=t.child,t!==null))for(du(t,r,i),t=t.sibling;t!==null;)du(t,r,i),t=t.sibling}var en=null,or=!1;function oa(t,r,i){for(i=i.child;i!==null;)z0(t,r,i),i=i.sibling}function z0(t,r,i){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(Kr,i)}catch{}switch(i.tag){case 5:hn||gs(i,r);case 6:var c=en,h=or;en=null,oa(t,r,i),en=c,or=h,en!==null&&(or?(t=en,i=i.stateNode,t.nodeType===8?t.parentNode.removeChild(i):t.removeChild(i)):en.removeChild(i.stateNode));break;case 18:en!==null&&(or?(t=en,i=i.stateNode,t.nodeType===8?jc(t.parentNode,i):t.nodeType===1&&jc(t,i),Ks(t)):jc(en,i.stateNode));break;case 4:c=en,h=or,en=i.stateNode.containerInfo,or=!0,oa(t,r,i),en=c,or=h;break;case 0:case 11:case 14:case 15:if(!hn&&(c=i.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var x=h,k=x.destroy;x=x.tag,k!==void 0&&((x&2)!==0||(x&4)!==0)&&lu(i,r,k),h=h.next}while(h!==c)}oa(t,r,i);break;case 1:if(!hn&&(gs(i,r),c=i.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=i.memoizedProps,c.state=i.memoizedState,c.componentWillUnmount()}catch(P){It(i,r,P)}oa(t,r,i);break;case 21:oa(t,r,i);break;case 22:i.mode&1?(hn=(c=hn)||i.memoizedState!==null,oa(t,r,i),hn=c):oa(t,r,i);break;default:oa(t,r,i)}}function B0(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var i=t.stateNode;i===null&&(i=t.stateNode=new H2),r.forEach(function(c){var h=ev.bind(null,t,c);i.has(c)||(i.add(c),c.then(h,h))})}}function lr(t,r){var i=r.deletions;if(i!==null)for(var c=0;ch&&(h=k),c&=~x}if(c=h,c=at()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*Y2(c/1960))-c,10t?16:t,ca===null)var c=!1;else{if(t=ca,ca=null,Uo=0,(lt&6)!==0)throw Error(a(331));var h=lt;for(lt|=4,je=t.current;je!==null;){var x=je,k=x.child;if((je.flags&16)!==0){var P=x.deletions;if(P!==null){for(var z=0;zat()-pu?Da(t,0):hu|=i),Tn(t,r)}function Z0(t,r){r===0&&((t.mode&1)===0?r=1:(r=kn,kn<<=1,(kn&130023424)===0&&(kn=4194304)));var i=vn();t=Vr(t,r),t!==null&&(Vs(t,r,i),Tn(t,i))}function Z2(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),Z0(t,i)}function ev(t,r){var i=0;switch(t.tag){case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(i=h.retryLane);break;case 19:c=t.stateNode;break;default:throw Error(a(314))}c!==null&&c.delete(r),Z0(t,i)}var ep;ep=function(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps||jn.current)Nn=!0;else{if((t.lanes&i)===0&&(r.flags&128)===0)return Nn=!1,V2(t,r,i);Nn=(t.flags&131072)!==0}else Nn=!1,Tt&&(r.flags&1048576)!==0&&_h(r,bo,r.index);switch(r.lanes=0,r.tag){case 2:var c=r.type;Fo(t,r),t=r.pendingProps;var h=os(r,un.current);hs(r,i),h=Wc(null,r,c,t,h,i);var x=Kc();return r.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Cn(c)?(x=!0,yo(r)):x=!1,r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Oc(r),h.updater=_o,r.stateNode=h,h._reactInternals=r,Qc(r,c,t,i),r=nu(null,r,c,!0,x,i)):(r.tag=0,Tt&&x&&Tc(r),xn(null,r,h,i),r=r.child),r;case 16:c=r.elementType;e:{switch(Fo(t,r),t=r.pendingProps,h=c._init,c=h(c._payload),r.type=c,h=r.tag=nv(c),t=ir(c,t),h){case 0:r=tu(null,r,c,t,i);break e;case 1:r=N0(null,r,c,t,i);break e;case 11:r=w0(null,r,c,t,i);break e;case 14:r=S0(null,r,c,ir(c.type,t),i);break e}throw Error(a(306,c,""))}return r;case 0:return c=r.type,h=r.pendingProps,h=r.elementType===c?h:ir(c,h),tu(t,r,c,h,i);case 1:return c=r.type,h=r.pendingProps,h=r.elementType===c?h:ir(c,h),N0(t,r,c,h,i);case 3:e:{if(E0(r),t===null)throw Error(a(387));c=r.pendingProps,x=r.memoizedState,h=x.element,Uh(t,r),No(r,c,null,i);var k=r.memoizedState;if(c=k.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},r.updateQueue.baseState=x,r.memoizedState=x,r.flags&256){h=ms(Error(a(423)),r),r=T0(t,r,c,i,h);break e}else if(c!==h){h=ms(Error(a(424)),r),r=T0(t,r,c,i,h);break e}else for(Ln=ta(r.stateNode.containerInfo.firstChild),Fn=r,Tt=!0,sr=null,i=Bh(r,null,c,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(us(),c===h){r=$r(t,r,i);break e}xn(t,r,c,i)}r=r.child}return r;case 5:return Wh(r),t===null&&Mc(r),c=r.type,h=r.pendingProps,x=t!==null?t.memoizedProps:null,k=h.children,Sc(c,h)?k=null:x!==null&&Sc(c,x)&&(r.flags|=32),C0(t,r),xn(t,r,k,i),r.child;case 6:return t===null&&Mc(r),null;case 13:return P0(t,r,i);case 4:return zc(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=ds(r,null,c,i):xn(t,r,c,i),r.child;case 11:return c=r.type,h=r.pendingProps,h=r.elementType===c?h:ir(c,h),w0(t,r,c,h,i);case 7:return xn(t,r,r.pendingProps,i),r.child;case 8:return xn(t,r,r.pendingProps.children,i),r.child;case 12:return xn(t,r,r.pendingProps.children,i),r.child;case 10:e:{if(c=r.type._context,h=r.pendingProps,x=r.memoizedProps,k=h.value,wt(ko,c._currentValue),c._currentValue=k,x!==null)if(ar(x.value,k)){if(x.children===h.children&&!jn.current){r=$r(t,r,i);break e}}else for(x=r.child,x!==null&&(x.return=r);x!==null;){var P=x.dependencies;if(P!==null){k=x.child;for(var z=P.firstContext;z!==null;){if(z.context===c){if(x.tag===1){z=Ur(-1,i&-i),z.tag=2;var ne=x.updateQueue;if(ne!==null){ne=ne.shared;var fe=ne.pending;fe===null?z.next=z:(z.next=fe.next,fe.next=z),ne.pending=z}}x.lanes|=i,z=x.alternate,z!==null&&(z.lanes|=i),Lc(x.return,i,r),P.lanes|=i;break}z=z.next}}else if(x.tag===10)k=x.type===r.type?null:x.child;else if(x.tag===18){if(k=x.return,k===null)throw Error(a(341));k.lanes|=i,P=k.alternate,P!==null&&(P.lanes|=i),Lc(k,i,r),k=x.sibling}else k=x.child;if(k!==null)k.return=x;else for(k=x;k!==null;){if(k===r){k=null;break}if(x=k.sibling,x!==null){x.return=k.return,k=x;break}k=k.return}x=k}xn(t,r,h.children,i),r=r.child}return r;case 9:return h=r.type,c=r.pendingProps.children,hs(r,i),h=Hn(h),c=c(h),r.flags|=1,xn(t,r,c,i),r.child;case 14:return c=r.type,h=ir(c,r.pendingProps),h=ir(c.type,h),S0(t,r,c,h,i);case 15:return k0(t,r,r.type,r.pendingProps,i);case 17:return c=r.type,h=r.pendingProps,h=r.elementType===c?h:ir(c,h),Fo(t,r),r.tag=1,Cn(c)?(t=!0,yo(r)):t=!1,hs(r,i),p0(r,c,h),Qc(r,c,h,i),nu(null,r,c,!0,t,i);case 19:return M0(t,r,i);case 22:return j0(t,r,i)}throw Error(a(156,r.tag))};function tp(t,r){return ut(t,r)}function tv(t,r,i,c){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yn(t,r,i,c){return new tv(t,r,i,c)}function Su(t){return t=t.prototype,!(!t||!t.isReactComponent)}function nv(t){if(typeof t=="function")return Su(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Y)return 11;if(t===Q)return 14}return 2}function fa(t,r){var i=t.alternate;return i===null?(i=Yn(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&14680064,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i}function Ko(t,r,i,c,h,x){var k=2;if(c=t,typeof t=="function")Su(t)&&(k=1);else if(typeof t=="string")k=5;else e:switch(t){case O:return La(i.children,h,x,r);case w:k=8,h|=8;break;case M:return t=Yn(12,i,r,h|2),t.elementType=M,t.lanes=x,t;case I:return t=Yn(13,i,r,h),t.elementType=I,t.lanes=x,t;case W:return t=Yn(19,i,r,h),t.elementType=W,t.lanes=x,t;case B:return Yo(i,h,x,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case E:k=10;break e;case U:k=9;break e;case Y:k=11;break e;case Q:k=14;break e;case G:k=16,c=null;break e}throw Error(a(130,t==null?t:typeof t,""))}return r=Yn(k,i,r,h),r.elementType=t,r.type=c,r.lanes=x,r}function La(t,r,i,c){return t=Yn(7,t,c,r),t.lanes=i,t}function Yo(t,r,i,c){return t=Yn(22,t,c,r),t.elementType=B,t.lanes=i,t.stateNode={isHidden:!1},t}function ku(t,r,i){return t=Yn(6,t,null,r),t.lanes=i,t}function ju(t,r,i){return r=Yn(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function rv(t,r,i,c,h){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ql(0),this.expirationTimes=ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ql(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function Cu(t,r,i,c,h,x,k,P,z){return t=new rv(t,r,i,P,z),r===1?(r=1,x===!0&&(r|=8)):r=0,x=Yn(3,null,null,r),t.current=x,x.stateNode=t,x.memoizedState={element:c,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oc(x),t}function av(t,r,i){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Mu.exports=gv(),Mu.exports}var mp;function yv(){if(mp)return el;mp=1;var e=Rg();return el.createRoot=e.createRoot,el.hydrateRoot=e.hydrateRoot,el}var xv=yv(),v=zl();const ge=Pg(v),vv=uv({__proto__:null,default:ge},[v]);/** * react-router v7.15.1 * * 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 Mg=e=>{throw TypeError(e)},Ig=(e,n,a)=>n.has(e)||Mg("Cannot "+a),Gn=(e,n,a)=>(Ig(e,n,"read from private field"),a?a.call(e):n.get(e)),Ci=(e,n,a)=>n.has(e)?Mg("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,a),jr=(e,n,a,s)=>(Ig(e,n,"write to private field"),n.set(e,a),a),gp="popstate";function yp(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function bv(e={}){function n(s,o){var m;let l=(m=o.state)==null?void 0:m.masked,{pathname:u,search:f,hash:p}=l||s.location;return _i("",{pathname:u,search:f,hash:p},o.state&&o.state.usr||null,o.state&&o.state.key||"default",l?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function a(s,o){return typeof o=="string"?o:Mr(o)}return Sv(n,a,null,e)}function Je(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Dt(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function wv(){return Math.random().toString(36).substring(2,10)}function xp(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function _i(e,n,a=null,s,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?_r(n):n,state:a,key:n&&n.key||s||wv(),mask:o}}function Mr({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function _r(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let s=e.indexOf("?");s>=0&&(n.search=e.substring(s),e=e.substring(0,s)),e&&(n.pathname=e)}return n}function Sv(e,n,a,s={}){let{window:o=document.defaultView,v5Compat:l=!1}=s,u=o.history,f="POP",p=null,m=y();m==null&&(m=0,u.replaceState({...u.state,idx:m},""));function y(){return(u.state||{idx:null}).idx}function g(){f="POP";let j=y(),L=j==null?null:j-m;m=j,p&&p({action:f,location:N.location,delta:L})}function b(j,L){f="PUSH";let R=yp(j)?j:_i(N.location,j,L);m=y()+1;let D=xp(R,m),H=N.createHref(R.mask||R);try{u.pushState(D,"",H)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;o.location.assign(H)}l&&p&&p({action:f,location:N.location,delta:1})}function S(j,L){f="REPLACE";let R=yp(j)?j:_i(N.location,j,L);m=y();let D=xp(R,m),H=N.createHref(R.mask||R);u.replaceState(D,"",H),l&&p&&p({action:f,location:N.location,delta:0})}function C(j){return _g(j)}let N={get action(){return f},get location(){return e(o,u)},listen(j){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(gp,g),p=j,()=>{o.removeEventListener(gp,g),p=null}},createHref(j){return n(o,j)},createURL:C,encodeLocation(j){let L=C(j);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:b,replace:S,go(j){return u.go(j)}};return N}function _g(e,n=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Je(a,"No window.location.(origin|href) available to create URL");let s=typeof e=="string"?e:Mr(e);return s=s.replace(/ $/,"%20"),!n&&s.startsWith("//")&&(s=a+s),new URL(s,a)}var Ni,vp=class{constructor(e){if(Ci(this,Ni,new Map),e)for(let[n,a]of e)this.set(n,a)}get(e){if(Gn(this,Ni).has(e))return Gn(this,Ni).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,n){Gn(this,Ni).set(e,n)}};Ni=new WeakMap;var kv=new Set(["lazy","caseSensitive","path","id","index","children"]);function jv(e){return kv.has(e)}var Cv=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Nv(e){return Cv.has(e)}function Ev(e){return e.index===!0}function Di(e,n,a=[],s={},o=!1){return e.map((l,u)=>{let f=[...a,String(u)],p=typeof l.id=="string"?l.id:f.join("-");if(Je(l.index!==!0||!l.children,"Cannot specify children on an index route"),Je(o||!s[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),Ev(l)){let m={...l,id:p};return s[p]=bp(m,n(m)),m}else{let m={...l,id:p,children:void 0};return s[p]=bp(m,n(m)),l.children&&(m.children=Di(l.children,n,f,s,o)),m}})}function bp(e,n){return Object.assign(e,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...e.lazy,...n.lazy}}:{}})}function Dg(e,n,a="/"){return dr(e,n,a,!1)}function dr(e,n,a,s,o){let l=typeof n=="string"?_r(n):n,u=er(l.pathname||"/",a);if(u==null)return null;let f=o??hl(e),p=null,m=zv(u);for(let y=0;p==null&&y{let y={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(s)&&p)return;Je(y.relativePath.startsWith(s),`Absolute route path "${y.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(s.length)}let g=Qn([s,y.relativePath]),b=a.concat(y);u.children&&u.children.length>0&&(Je(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Lg(u.children,n,b,g,p)),!(u.path==null&&!u.index)&&n.push({path:g,score:Fv(g,u.index),routesMeta:b})};return e.forEach((u,f)=>{var p;if(u.path===""||!((p=u.path)!=null&&p.includes("?")))l(u,f);else for(let m of Ag(u.path))l(u,f,!0,m)}),n}function Ag(e){let n=e.split("/");if(n.length===0)return[];let[a,...s]=n,o=a.endsWith("?"),l=a.replace(/\?$/,"");if(s.length===0)return o?[l,""]:[l];let u=Ag(s.join("/")),f=[];return f.push(...u.map(p=>p===""?l:[l,p].join("/"))),o&&f.push(...u),f.map(p=>e.startsWith("/")&&p===""?"/":p)}function Tv(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:Lv(n.routesMeta.map(s=>s.childrenIndex),a.routesMeta.map(s=>s.childrenIndex)))}var Pv=/^:[\w-]+$/,Rv=3,Mv=2,Iv=1,_v=10,Dv=-2,wp=e=>e==="*";function Fv(e,n){let a=e.split("/"),s=a.length;return a.some(wp)&&(s+=Dv),n&&(s+=Mv),a.filter(o=>!wp(o)).reduce((o,l)=>o+(Pv.test(l)?Rv:l===""?Iv:_v),s)}function Lv(e,n){return e.length===n.length&&e.slice(0,-1).every((s,o)=>s===n[o])?e[e.length-1]-n[n.length-1]:0}function Av(e,n,a=!1){let{routesMeta:s}=e,o={},l="/",u=[];for(let f=0;f{if(y==="*"){let C=f[b]||"";u=l.slice(0,l.length-C.length).replace(/(.)\/+$/,"$1")}const S=f[b];return g&&!S?m[y]=void 0:m[y]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:u,pattern:e}}function Ov(e,n=!1,a=!0){Dt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,p,m,y)=>{if(s.push({paramName:f,isOptional:p!=null}),p){let g=y.charAt(m+u.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),s]}function zv(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Dt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function er(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,s=e.charAt(a);return s&&s!=="/"?null:e.slice(a)||"/"}function Bv({basename:e,pathname:n}){return n==="/"?e:Qn([e,n])}var Og=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vd=e=>Og.test(e);function Vv(e,n="/"){let{pathname:a,search:s="",hash:o=""}=typeof e=="string"?_r(e):e,l;return a?(a=Ud(a),a.startsWith("/")?l=Sp(a.substring(1),"/"):l=Sp(a,n)):l=n,{pathname:l,search:$v(s),hash:Hv(o)}}function Sp(e,n){let a=El(n).split("/");return e.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function Du(e,n,a,s){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(s)}]. 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 zg(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function Bl(e){let n=zg(e);return n.map((a,s)=>s===n.length-1?a.pathname:a.pathnameBase)}function Bi(e,n,a,s=!1){let o;typeof e=="string"?o=_r(e):(o={...e},Je(!o.pathname||!o.pathname.includes("?"),Du("?","pathname","search",o)),Je(!o.pathname||!o.pathname.includes("#"),Du("#","pathname","hash",o)),Je(!o.search||!o.search.includes("#"),Du("#","search","hash",o)));let l=e===""||o.pathname==="",u=l?"/":o.pathname,f;if(u==null)f=a;else{let g=n.length-1;if(!s&&u.startsWith("..")){let b=u.split("/");for(;b[0]==="..";)b.shift(),g-=1;o.pathname=b.join("/")}f=g>=0?n[g]:"/"}let p=Vv(o,f),m=u&&u!=="/"&&u.endsWith("/"),y=(l||u===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(m||y)&&(p.pathname+="/"),p}var Ud=e=>e.replace(/\/\/+/g,"/"),Qn=e=>Ud(e.join("/")),El=e=>e.replace(/\/+$/,""),Uv=e=>El(e).replace(/^\/*/,"/"),$v=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Hv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Vi=class{constructor(e,n,a,s=!1){this.status=e,this.statusText=n||"",this.internal=s,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function Fi(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ui(e){let n=e.map(a=>a.route.path).filter(Boolean);return Qn(n)||"/"}var Bg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vg(e,n){let a=e;if(typeof a!="string"||!Og.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let s=a,o=!1;if(Bg)try{let l=new URL(window.location.href),u=a.startsWith("//")?new URL(l.protocol+a):new URL(a),f=er(u.pathname,n);u.origin===l.origin&&f!=null?a=f+u.search+u.hash:o=!0}catch{Dt(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:o,to:a}}var va=Symbol("Uninstrumented");function Wv(e,n){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:n.id,index:n.index,path:n.path,instrument(l){let u=Object.keys(a);for(let f of u)l[f]&&a[f].push(l[f])}}));let s={};if(typeof n.lazy=="function"&&a.lazy.length>0){let o=js(a.lazy,n.lazy,()=>{});o&&(s.lazy=o)}if(typeof n.lazy=="object"){let o=n.lazy;["middleware","loader","action"].forEach(l=>{let u=o[l],f=a[`lazy.${l}`];if(typeof u=="function"&&f.length>0){let p=js(f,u,()=>{});p&&(s.lazy=Object.assign(s.lazy||{},{[l]:p}))}})}return["loader","action"].forEach(o=>{let l=n[o];if(typeof l=="function"&&a[o].length>0){let u=l[va]??l,f=js(a[o],u,(...p)=>kp(p[0]));f&&(o==="loader"&&u.hydrate===!0&&(f.hydrate=!0),f[va]=u,s[o]=f)}}),n.middleware&&n.middleware.length>0&&a.middleware.length>0&&(s.middleware=n.middleware.map(o=>{let l=o[va]??o,u=js(a.middleware,l,(...f)=>kp(f[0]));return u?(u[va]=l,u):o})),s}function Kv(e,n){let a={navigate:[],fetch:[]};if(n.forEach(s=>s({instrument(o){let l=Object.keys(o);for(let u of l)o[u]&&a[u].push(o[u])}})),a.navigate.length>0){let s=e.navigate[va]??e.navigate,o=js(a.navigate,s,(...l)=>{let[u,f]=l;return{to:typeof u=="number"||typeof u=="string"?u:u?Mr(u):".",...jp(e,f??{})}});o&&(o[va]=s,e.navigate=o)}if(a.fetch.length>0){let s=e.fetch[va]??e.fetch,o=js(a.fetch,s,(...l)=>{let[u,,f,p]=l;return{href:f??".",fetcherKey:u,...jp(e,p??{})}});o&&(o[va]=s,e.fetch=o)}return e}function js(e,n,a){return e.length===0?null:async(...s)=>{let o=await Ug(e,a(...s),()=>n(...s),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function Ug(e,n,a,s){let o=e[s],l;if(o){let u,f=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=Ug(e,n,a,s-1),l=await u,Je(l,"Expected a result"),l.type==="error"&&l.value instanceof Error?{status:"error",error:l.value}:{status:"success",error:void 0});try{await o(f,n)}catch(p){console.error("An instrumentation function threw an error:",p)}u||await f(),await u}else try{l={type:"success",value:await a()}}catch(u){l={type:"error",value:u}}return l||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function kp(e){let{request:n,context:a,params:s,pattern:o}=e;return{request:Yv(n),params:{...s},pattern:o,context:Gv(a)}}function jp(e,n){return{currentUrl:Mr(e.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function Yv(e){return{method:e.method,url:e.url,headers:{get:(...n)=>e.headers.get(...n)}}}function Gv(e){if(Jv(e)){let n={...e};return Object.freeze(n),n}else return{get:n=>e.get(n)}}var Xv=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jv(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===Xv}var $g=["POST","PUT","PATCH","DELETE"],qv=new Set($g),Qv=["GET",...$g],Zv=new Set(Qv),Hg=new Set([301,302,303,307,308]),eb=new Set([307,308]),Fu={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tb={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},nb=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Wg="remix-router-transitions",Kg=Symbol("ResetLoaderData"),za,bs,pa,ws,rb=class{constructor(e){Ci(this,za),Ci(this,bs),Ci(this,pa),Ci(this,ws),jr(this,za,e),jr(this,bs,hl(e))}get stableRoutes(){return Gn(this,za)}get activeRoutes(){return Gn(this,pa)??Gn(this,za)}get branches(){return Gn(this,ws)??Gn(this,bs)}get hasHMRRoutes(){return Gn(this,pa)!=null}setRoutes(e){jr(this,za,e),jr(this,bs,hl(e))}setHmrRoutes(e){jr(this,pa,e),jr(this,ws,hl(e))}commitHmrRoutes(){Gn(this,pa)&&(jr(this,za,Gn(this,pa)),jr(this,bs,Gn(this,ws)),jr(this,pa,void 0),jr(this,ws,void 0))}};za=new WeakMap;bs=new WeakMap;pa=new WeakMap;ws=new WeakMap;function ab(e){const n=e.window?e.window:typeof window<"u"?window:void 0,a=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";Je(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=e.hydrationRouteProperties||[],o=e.mapRouteProperties||nb,l=o;if(e.instrumentations){let F=e.instrumentations;l=V=>({...o(V),...Wv(F.map(q=>q.route).filter(Boolean),V)})}let u={},f=new rb(Di(e.routes,l,void 0,u)),p=e.basename||"/";p.startsWith("/")||(p=`/${p}`);let m=e.dataStrategy||cb,y={...e.future},g=null,b=new Set,S=null,C=null,N=null,j=null,L=e.hydrationData!=null,R=dr(f.activeRoutes,e.history.location,p,!1,f.branches),D=!1,H=null,K,re;if(R==null&&!e.patchRoutesOnNavigation){let F=Xn(404,{pathname:e.history.location.pathname}),{matches:V,route:q}=tl(f.activeRoutes);K=!0,re=!K,R=V,H={[q.id]:F}}else if(R&&!e.hydrationData&&In(R,f.activeRoutes,e.history.location.pathname).active&&(R=null),R)if(R.some(F=>F.route.lazy))K=!1,re=!K;else if(!R.some(F=>$d(F.route)))K=!0,re=!K;else{let F=e.hydrationData?e.hydrationData.loaderData:null,V=e.hydrationData?e.hydrationData.errors:null,q=R;if(V){let le=R.findIndex(ce=>V[ce.route.id]!==void 0);q=q.slice(0,le+1)}re=!1,K=!0,q.forEach(le=>{let ce=Yg(le.route,F,V);re=re||ce.renderFallback,K=K&&!ce.shouldLoad})}else{K=!1,re=!K,R=[];let F=In(null,f.activeRoutes,e.history.location.pathname);F.active&&F.matches&&(D=!0,R=F.matches)}let O,w={historyAction:e.history.action,location:e.history.location,matches:R,initialized:K,renderFallback:re,navigation:Fu,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||H,fetchers:new Map,blockers:new Map},M="POP",E=null,U=!1,Y,I=!1,W=new Map,Q=null,G=!1,B=!1,_=new Set,X=new Map,J=0,T=-1,A=new Map,te=new Set,ie=new Map,oe=new Map,ae=new Set,ue=new Map,xe,ve=null;function Ve(){if(g=e.history.listen(({action:F,location:V,delta:q})=>{if(xe){xe(),xe=void 0;return}Dt(ue.size===0||q!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let le=Vn({currentLocation:w.location,nextLocation:V,historyAction:F});if(le&&q!=null){let ce=new Promise(_e=>{xe=_e});e.history.go(q*-1),sn(le,{state:"blocked",location:V,proceed(){sn(le,{state:"proceeding",proceed:void 0,reset:void 0,location:V}),ce.then(()=>e.history.go(q))},reset(){let _e=new Map(w.blockers);_e.set(le,bi),Oe({blockers:_e})}}),E==null||E.resolve(),E=null;return}return ke(F,V)}),a){Eb(n,W);let F=()=>Tb(n,W);n.addEventListener("pagehide",F),Q=()=>n.removeEventListener("pagehide",F)}return w.initialized||ke("POP",w.location,{initialHydration:!0}),O}function Ce(){g&&g(),Q&&Q(),b.clear(),Y&&Y.abort(),w.fetchers.forEach((F,V)=>Mn(w.fetchers,V)),w.blockers.forEach((F,V)=>yr(V))}function Ue(F){if(b.add(F),S){let{newErrors:V}=S;S=null,F(w,{deletedFetchers:[],newErrors:V,viewTransitionOpts:void 0,flushSync:!1})}return()=>b.delete(F)}function Oe(F,V={}){F.matches&&(F.matches=F.matches.map(ce=>{let _e=u[ce.route.id],De=ce.route;return De.element!==_e.element||De.errorElement!==_e.errorElement||De.hydrateFallbackElement!==_e.hydrateFallbackElement?{...ce,route:_e}:ce})),w={...w,...F};let q=[],le=[];w.fetchers.forEach((ce,_e)=>{ce.state==="idle"&&(ae.has(_e)?q.push(_e):le.push(_e))}),ae.forEach(ce=>{!w.fetchers.has(ce)&&!X.has(ce)&&q.push(ce)}),b.size===0&&(S={newErrors:F.errors??null}),[...b].forEach(ce=>ce(w,{deletedFetchers:q,newErrors:F.errors??null,viewTransitionOpts:V.viewTransitionOpts,flushSync:V.flushSync===!0})),q.forEach(ce=>Mn(w.fetchers,ce)),le.forEach(ce=>w.fetchers.delete(ce))}function dt(F,V,{flushSync:q}={}){var $e,Xe;let le=w.actionData!=null&&w.navigation.formMethod!=null&&pn(w.navigation.formMethod)&&w.navigation.state==="loading"&&(($e=F.state)==null?void 0:$e._isRedirect)!==!0,ce;V.actionData?Object.keys(V.actionData).length>0?ce=V.actionData:ce=null:le?ce=w.actionData:ce=null;let _e=V.loaderData?Fp(w.loaderData,V.loaderData,V.matches||[],V.errors):w.loaderData,De=w.blockers;De.size>0&&(De=new Map(De),De.forEach((Le,tt)=>De.set(tt,bi)));let Ke=G?!1:Ut(F,V.matches||w.matches),ye=U===!0||w.navigation.formMethod!=null&&pn(w.navigation.formMethod)&&((Xe=F.state)==null?void 0:Xe._isRedirect)!==!0;f.commitHmrRoutes(),G||M==="POP"||(M==="PUSH"?e.history.push(F,F.state):M==="REPLACE"&&e.history.replace(F,F.state));let Fe;if(M==="POP"){let Le=W.get(w.location.pathname);Le&&Le.has(F.pathname)?Fe={currentLocation:w.location,nextLocation:F}:W.has(F.pathname)&&(Fe={currentLocation:F,nextLocation:w.location})}else if(I){let Le=W.get(w.location.pathname);Le?Le.add(F.pathname):(Le=new Set([F.pathname]),W.set(w.location.pathname,Le)),Fe={currentLocation:w.location,nextLocation:F}}Oe({...V,actionData:ce,loaderData:_e,historyAction:M,location:F,initialized:!0,renderFallback:!1,navigation:Fu,revalidation:"idle",restoreScrollPosition:Ke,preventScrollReset:ye,blockers:De},{viewTransitionOpts:Fe,flushSync:q===!0}),M="POP",U=!1,I=!1,G=!1,B=!1,E==null||E.resolve(),E=null,ve==null||ve.resolve(),ve=null}async function xt(F,V){if(E==null||E.resolve(),E=null,typeof F=="number"){E||(E=zp());let ut=E.promise;return e.history.go(F),ut}let q=fd(w.location,w.matches,p,F,V==null?void 0:V.fromRouteId,V==null?void 0:V.relative),{path:le,submission:ce,error:_e}=Cp(!1,q,V),De;V!=null&&V.mask&&(De={pathname:"",search:"",hash:"",...typeof V.mask=="string"?_r(V.mask):{...w.location.mask,...V.mask}});let Ke=w.location,ye=_i(Ke,le,V&&V.state,void 0,De);ye={...ye,...e.history.encodeLocation(ye)};let Fe=V&&V.replace!=null?V.replace:void 0,$e="PUSH";Fe===!0?$e="REPLACE":Fe===!1||ce!=null&&pn(ce.formMethod)&&ce.formAction===w.location.pathname+w.location.search&&($e="REPLACE");let Xe=V&&"preventScrollReset"in V?V.preventScrollReset===!0:void 0,Le=(V&&V.flushSync)===!0,tt=Vn({currentLocation:Ke,nextLocation:ye,historyAction:$e});if(tt){sn(tt,{state:"blocked",location:ye,proceed(){sn(tt,{state:"proceeding",proceed:void 0,reset:void 0,location:ye}),xt(F,V)},reset(){let ut=new Map(w.blockers);ut.set(tt,bi),Oe({blockers:ut})}});return}await ke($e,ye,{submission:ce,pendingError:_e,preventScrollReset:Xe,replace:V&&V.replace,enableViewTransition:V&&V.viewTransition,flushSync:Le,callSiteDefaultShouldRevalidate:V&&V.defaultShouldRevalidate})}function vt(){ve||(ve=zp()),Qt(),Oe({revalidation:"loading"});let F=ve.promise;return w.navigation.state==="submitting"?F:w.navigation.state==="idle"?(ke(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),F):(ke(M||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:I===!0}),F)}async function ke(F,V,q){Y&&Y.abort(),Y=null,M=F,G=(q&&q.startUninterruptedRevalidation)===!0,Lt(w.location,w.matches),U=(q&&q.preventScrollReset)===!0,I=(q&&q.enableViewTransition)===!0;let le=f.activeRoutes,ce=q!=null&&q.initialHydration&&w.matches&&w.matches.length>0&&!D?w.matches:dr(le,V,p,!1,f.branches),_e=(q&&q.flushSync)===!0;if(ce&&w.initialized&&!B&&yb(w.location,V)&&!(q&&q.submission&&pn(q.submission.formMethod))){dt(V,{matches:ce},{flushSync:_e});return}let De=In(ce,le,V.pathname);if(De.active&&De.matches&&(ce=De.matches),!ce){let{error:kt,notFoundMatches:pt,route:at}=Dr(V.pathname);dt(V,{matches:pt,loaderData:{},errors:{[at.id]:kt}},{flushSync:_e});return}let Ke=q&&q.overrideNavigation?{...q.overrideNavigation,matches:ce,historyAction:F}:void 0;Y=new AbortController;let ye=Ss(e.history,V,Y.signal,q&&q.submission),Fe=e.getContext?await e.getContext():new vp,$e;if(q&&q.pendingError)$e=[ya(ce).route.id,{type:"error",error:q.pendingError}];else if(q&&q.submission&&pn(q.submission.formMethod)){let kt=await Re(ye,V,q.submission,ce,F,Fe,De.active,q&&q.initialHydration===!0,{replace:q.replace,flushSync:_e});if(kt.shortCircuited)return;if(kt.pendingActionResult){let[pt,at]=kt.pendingActionResult;if(On(at)&&Fi(at.error)&&at.error.status===404){Y=null,dt(V,{matches:kt.matches,loaderData:{},errors:{[pt]:at.error}});return}}ce=kt.matches||ce,$e=kt.pendingActionResult,Ke=Lu(V,ce,F,q.submission),_e=!1,De.active=!1,ye=Ss(e.history,ye.url,ye.signal)}let{shortCircuited:Xe,matches:Le,loaderData:tt,errors:ut,workingFetchers:Ot}=await we(ye,V,ce,F,Fe,De.active,Ke,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,_e,$e,q&&q.callSiteDefaultShouldRevalidate);Xe||(Y=null,dt(V,{matches:Le||ce,...Lp($e),loaderData:tt,errors:ut,...Ot?{fetchers:Ot}:{}}))}async function Re(F,V,q,le,ce,_e,De,Ke,ye={}){Qt();let Fe=Cb(V,le,ce,q);if(Oe({navigation:Fe},{flushSync:ye.flushSync===!0}),De){let Le=await St(le,V.pathname,F.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){if(Le.partialMatches.length===0){let{matches:ut,route:Ot}=tl(f.activeRoutes);return{matches:ut,pendingActionResult:[Ot.id,{type:"error",error:Le.error}]}}let tt=ya(Le.partialMatches).route.id;return{matches:Le.partialMatches,pendingActionResult:[tt,{type:"error",error:Le.error}]}}else if(Le.matches)le=Le.matches;else{let{notFoundMatches:tt,error:ut,route:Ot}=Dr(V.pathname);return{matches:tt,pendingActionResult:[Ot.id,{type:"error",error:ut}]}}}let $e,Xe=pl(le,V);if(!Xe.route.action&&!Xe.route.lazy)$e={type:"error",error:Xn(405,{method:F.method,pathname:V.pathname,routeId:Xe.route.id})};else{let Le=Ps(l,u,F,V,le,Xe,Ke?[]:s,_e),tt=await rt(F,V,Le,_e,null);if($e=tt[Xe.route.id],!$e){for(let ut of le)if(tt[ut.route.id]){$e=tt[ut.route.id];break}}if(F.signal.aborted)return{shortCircuited:!0}}if(Va($e)){let Le;return ye&&ye.replace!=null?Le=ye.replace:Le=Ip($e.response.headers.get("Location"),new URL(F.url),p,e.history)===w.location.pathname+w.location.search,await Ge(F,$e,!0,{submission:q,replace:Le}),{shortCircuited:!0}}if(On($e)){let Le=ya(le,Xe.route.id);return(ye&&ye.replace)!==!0&&(M="PUSH"),{matches:le,pendingActionResult:[Le.route.id,$e,Xe.route.id]}}return{matches:le,pendingActionResult:[Xe.route.id,$e]}}async function we(F,V,q,le,ce,_e,De,Ke,ye,Fe,$e,Xe,Le,tt){let ut=De||Lu(V,q,le,Ke),Ot=Ke||ye||Op(ut),kt=!G&&!$e;if(_e){if(kt){let cn=me(Le);Oe({navigation:ut,...cn!==void 0?{actionData:cn}:{}},{flushSync:Xe})}let st=await St(q,V.pathname,F.signal);if(st.type==="aborted")return{shortCircuited:!0};if(st.type==="error"){if(st.partialMatches.length===0){let{matches:yn,route:kn}=tl(f.activeRoutes);return{matches:yn,loaderData:{},errors:{[kn.id]:st.error}}}let cn=ya(st.partialMatches).route.id;return{matches:st.partialMatches,loaderData:{},errors:{[cn]:st.error}}}else if(st.matches)q=st.matches;else{let{error:cn,notFoundMatches:yn,route:kn}=Dr(V.pathname);return{matches:yn,loaderData:{},errors:{[kn.id]:cn}}}}let pt=f.activeRoutes,{dsMatches:at,revalidatingFetchers:on}=Np(F,ce,l,u,e.history,w,q,Ot,V,$e?[]:s,$e===!0,B,_,ae,ie,te,pt,p,e.patchRoutesOnNavigation!=null,f.branches,Le,tt);if(T=++J,!e.dataStrategy&&!at.some(st=>st.shouldLoad)&&!at.some(st=>st.route.middleware&&st.route.middleware.length>0)&&on.length===0){let st=new Map(w.fetchers),cn=it(st);return dt(V,{matches:q,loaderData:{},errors:Le&&On(Le[1])?{[Le[0]]:Le[1].error}:null,...Lp(Le),...cn?{fetchers:st}:{}},{flushSync:Xe}),{shortCircuited:!0}}if(kt){let st={};if(!_e){st.navigation=ut;let cn=me(Le);cn!==void 0&&(st.actionData=cn)}on.length>0&&(st.fetchers=Ie(on)),Oe(st,{flushSync:Xe})}on.forEach(st=>{Ze(st.key),st.controller&&X.set(st.key,st.controller)});let Fr=()=>on.forEach(st=>Ze(st.key));Y&&Y.signal.addEventListener("abort",Fr);let{loaderResults:nr,fetcherResults:rr}=await ht(at,on,F,V,ce);if(F.signal.aborted)return{shortCircuited:!0};Y&&Y.signal.removeEventListener("abort",Fr),on.forEach(st=>X.delete(st.key));let vr=nl(nr);if(vr)return await Ge(F,vr.result,!0,{replace:Fe}),{shortCircuited:!0};if(vr=nl(rr),vr)return te.add(vr.key),await Ge(F,vr.result,!0,{replace:Fe}),{shortCircuited:!0};let _n=new Map(w.fetchers),{loaderData:Kr,errors:Ht}=Dp(w,q,nr,Le,on,rr,_n);$e&&w.errors&&(Ht={...w.errors,...Ht});let Xa=it(_n),ln=Zt(T,_n),Ja=Xa||ln||on.length>0;return{matches:q,loaderData:Kr,errors:Ht,...Ja?{workingFetchers:_n}:{}}}function me(F){if(F&&!On(F[1]))return{[F[0]]:F[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function Ie(F){let V=new Map(w.fetchers);return F.forEach(q=>{let le=V.get(q.key),ce=wi(void 0,le?le.data:void 0);V.set(q.key,ce)}),V}async function be(F,V,q,le){Ze(F);let ce=(le&&le.flushSync)===!0,_e=f.activeRoutes,De=fd(w.location,w.matches,p,q,V,le==null?void 0:le.relative),Ke=dr(_e,De,p,!1,f.branches),ye=In(Ke,_e,De);if(ye.active&&ye.matches&&(Ke=ye.matches),!Ke){qe(F,V,Xn(404,{pathname:De}),{flushSync:ce});return}let{path:Fe,submission:$e,error:Xe}=Cp(!0,De,le);if(Xe){qe(F,V,Xe,{flushSync:ce});return}let Le=e.getContext?await e.getContext():new vp,tt=(le&&le.preventScrollReset)===!0;if($e&&pn($e.formMethod)){await Ae(F,V,Fe,Ke,Le,ye.active,ce,tt,$e,le&&le.defaultShouldRevalidate);return}ie.set(F,{routeId:V,path:Fe}),await Qe(F,V,Fe,Ke,Le,ye.active,ce,tt,$e)}async function Ae(F,V,q,le,ce,_e,De,Ke,ye,Fe){Qt(),ie.delete(F);let $e=w.fetchers.get(F);Pt(F,Nb(ye,$e),{flushSync:De});let Xe=new AbortController,Le=Ss(e.history,q,Xe.signal,ye);if(_e){let bt=await St(le,new URL(Le.url).pathname,Le.signal,F);if(bt.type==="aborted")return;if(bt.type==="error"){qe(F,V,bt.error,{flushSync:De});return}else if(bt.matches)le=bt.matches;else{qe(F,V,Xn(404,{pathname:q}),{flushSync:De});return}}let tt=pl(le,q);if(!tt.route.action&&!tt.route.lazy){let bt=Xn(405,{method:ye.formMethod,pathname:q,routeId:V});qe(F,V,bt,{flushSync:De});return}X.set(F,Xe);let ut=J,Ot=Ps(l,u,Le,q,le,tt,s,ce),kt=await rt(Le,q,Ot,ce,F),pt=kt[tt.route.id];if(!pt){for(let bt of Ot)if(kt[bt.route.id]){pt=kt[bt.route.id];break}}if(Le.signal.aborted){X.get(F)===Xe&&X.delete(F);return}if(ae.has(F)){if(Va(pt)||On(pt)){Pt(F,Nr(void 0));return}}else{if(Va(pt))if(X.delete(F),T>ut){Pt(F,Nr(void 0));return}else return te.add(F),Pt(F,wi(ye)),Ge(Le,pt,!1,{fetcherSubmission:ye,preventScrollReset:Ke});if(On(pt)){qe(F,V,pt.error);return}}let at=w.navigation.location||w.location,on=Ss(e.history,at,Xe.signal),Fr=f.activeRoutes,nr=w.navigation.state!=="idle"?dr(Fr,w.navigation.location,p,!1,f.branches):w.matches;Je(nr,"Didn't find any matches after fetcher action");let rr=++J;A.set(F,rr);let{dsMatches:vr,revalidatingFetchers:_n}=Np(on,ce,l,u,e.history,w,nr,ye,at,s,!1,B,_,ae,ie,te,Fr,p,e.patchRoutesOnNavigation!=null,f.branches,[tt.route.id,pt],Fe),Kr=wi(ye,pt.data),Ht=new Map(w.fetchers);Ht.set(F,Kr),_n.filter(bt=>bt.key!==F).forEach(bt=>{let Lr=bt.key,qa=Ht.get(Lr),Qi=wi(void 0,qa?qa.data:void 0);Ht.set(Lr,Qi),Ze(Lr),bt.controller&&X.set(Lr,bt.controller)}),Oe({fetchers:Ht});let Xa=()=>_n.forEach(bt=>Ze(bt.key));Xe.signal.addEventListener("abort",Xa);let{loaderResults:ln,fetcherResults:Ja}=await ht(vr,_n,on,at,ce);if(Xe.signal.aborted)return;Xe.signal.removeEventListener("abort",Xa),A.delete(F),X.delete(F),_n.forEach(bt=>X.delete(bt.key));let st=w.fetchers.has(F),cn=bt=>{if(!st)return bt;let Lr=new Map(bt.fetchers);return Lr.set(F,Nr(pt.data)),{...bt,fetchers:Lr}},yn=nl(ln);if(yn)return w=cn(w),Ge(on,yn.result,!1,{preventScrollReset:Ke});if(yn=nl(Ja),yn)return te.add(yn.key),w=cn(w),Ge(on,yn.result,!1,{preventScrollReset:Ke});let kn=new Map(w.fetchers);st&&kn.set(F,Nr(pt.data));let{loaderData:Yr,errors:Gr}=Dp(w,nr,ln,void 0,_n,Ja,kn);Zt(rr,kn),w.navigation.state==="loading"&&rr>T?(Je(M,"Expected pending action"),Y&&Y.abort(),dt(w.navigation.location,{matches:nr,loaderData:Yr,errors:Gr,fetchers:kn})):(Oe({errors:Gr,loaderData:Fp(w.loaderData,Yr,nr,Gr),fetchers:kn}),B=!1)}async function Qe(F,V,q,le,ce,_e,De,Ke,ye){let Fe=w.fetchers.get(F);Pt(F,wi(ye,Fe?Fe.data:void 0),{flushSync:De});let $e=new AbortController,Xe=Ss(e.history,q,$e.signal);if(_e){let pt=await St(le,new URL(Xe.url).pathname,Xe.signal,F);if(pt.type==="aborted")return;if(pt.type==="error"){qe(F,V,pt.error,{flushSync:De});return}else if(pt.matches)le=pt.matches;else{qe(F,V,Xn(404,{pathname:q}),{flushSync:De});return}}let Le=pl(le,q);X.set(F,$e);let tt=J,ut=Ps(l,u,Xe,q,le,Le,s,ce),Ot=await rt(Xe,q,ut,ce,F),kt=Ot[Le.route.id];if(!kt){for(let pt of le)if(Ot[pt.route.id]){kt=Ot[pt.route.id];break}}if(X.get(F)===$e&&X.delete(F),!Xe.signal.aborted){if(ae.has(F)){Pt(F,Nr(void 0));return}if(Va(kt))if(T>tt){Pt(F,Nr(void 0));return}else{te.add(F),await Ge(Xe,kt,!1,{preventScrollReset:Ke});return}if(On(kt)){qe(F,V,kt.error);return}Pt(F,Nr(kt.data))}}async function Ge(F,V,q,{submission:le,fetcherSubmission:ce,preventScrollReset:_e,replace:De}={}){q||(E==null||E.resolve(),E=null),V.response.headers.has("X-Remix-Revalidate")&&(B=!0);let Ke=V.response.headers.get("Location");Je(Ke,"Expected a Location header on the redirect Response"),Ke=Ip(Ke,new URL(F.url),p,e.history);let ye=_i(w.location,Ke,{_isRedirect:!0});if(a){let ut=!1;if(V.response.headers.has("X-Remix-Reload-Document"))ut=!0;else if(Vd(Ke)){const Ot=_g(Ke,!0);ut=Ot.origin!==n.location.origin||er(Ot.pathname,p)==null}if(ut){De?n.location.replace(Ke):n.location.assign(Ke);return}}Y=null;let Fe=De===!0||V.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:$e,formAction:Xe,formEncType:Le}=w.navigation;!le&&!ce&&$e&&Xe&&Le&&(le=Op(w.navigation));let tt=le||ce;if(eb.has(V.response.status)&&tt&&pn(tt.formMethod))await ke(Fe,ye,{submission:{...tt,formAction:Ke},preventScrollReset:_e||U,enableViewTransition:q?I:void 0});else{let ut=Lu(ye,[],Fe,le);await ke(Fe,ye,{overrideNavigation:ut,fetcherSubmission:ce,preventScrollReset:_e||U,enableViewTransition:q?I:void 0})}}async function rt(F,V,q,le,ce){var Ke;let _e,De={};try{_e=await db(m,F,V,q,ce,le,!1)}catch(ye){return q.filter(Fe=>Fe.shouldLoad).forEach(Fe=>{De[Fe.route.id]={type:"error",error:ye}}),De}if(F.signal.aborted)return De;if(!pn(F.method))for(let ye of q){if(((Ke=_e[ye.route.id])==null?void 0:Ke.type)==="error")break;!_e.hasOwnProperty(ye.route.id)&&!w.loaderData.hasOwnProperty(ye.route.id)&&(!w.errors||!w.errors.hasOwnProperty(ye.route.id))&&ye.shouldCallHandler()&&(_e[ye.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ye.route.id}`)})}for(let[ye,Fe]of Object.entries(_e))if(wb(Fe)){let $e=Fe.result;De[ye]={type:"redirect",response:mb($e,F,ye,q,p)}}else De[ye]=await pb(Fe);return De}async function ht(F,V,q,le,ce){let _e=rt(q,le,F,ce,null),De=Promise.all(V.map(async Fe=>{if(Fe.matches&&Fe.match&&Fe.request&&Fe.controller){let Xe=(await rt(Fe.request,Fe.path,Fe.matches,ce,Fe.key))[Fe.match.route.id];return{[Fe.key]:Xe}}else return Promise.resolve({[Fe.key]:{type:"error",error:Xn(404,{pathname:Fe.path})}})})),Ke=await _e,ye=(await De).reduce((Fe,$e)=>Object.assign(Fe,$e),{});return{loaderResults:Ke,fetcherResults:ye}}function Qt(){B=!0,ie.forEach((F,V)=>{X.has(V)&&_.add(V),Ze(V)})}function Pt(F,V,q={}){let le=new Map(w.fetchers);le.set(F,V),Oe({fetchers:le},{flushSync:(q&&q.flushSync)===!0})}function qe(F,V,q,le={}){let ce=ya(w.matches,V),_e=new Map(w.fetchers);Mn(_e,F),Oe({errors:{[ce.route.id]:q},fetchers:_e},{flushSync:(le&&le.flushSync)===!0})}function Sn(F){return oe.set(F,(oe.get(F)||0)+1),ae.has(F)&&ae.delete(F),w.fetchers.get(F)||tb}function ft(F,V){Ze(F,V==null?void 0:V.reason),Pt(F,Nr(null))}function Mn(F,V){let q=w.fetchers.get(V);X.has(V)&&!(q&&q.state==="loading"&&A.has(V))&&Ze(V),ie.delete(V),A.delete(V),te.delete(V),ae.delete(V),_.delete(V),F.delete(V)}function Te(F){let V=(oe.get(F)||0)-1;V<=0?(oe.delete(F),ae.add(F)):oe.set(F,V),Oe({fetchers:new Map(w.fetchers)})}function Ze(F,V){let q=X.get(F);q&&(q.abort(V),X.delete(F))}function ot(F,V){for(let q of F){let le=V.get(q);Je(le,`Expected fetcher: ${q}`);let ce=Nr(le.data);V.set(q,ce)}}function it(F){let V=[],q=!1;for(let le of te){let ce=F.get(le);Je(ce,`Expected fetcher: ${le}`),ce.state==="loading"&&(te.delete(le),V.push(le),q=!0)}return ot(V,F),q}function Zt(F,V){let q=[];for(let[le,ce]of A)if(ce0}function gt(F,V){let q=w.blockers.get(F)||bi;return ue.get(F)!==V&&ue.set(F,V),q}function yr(F){w.blockers.delete(F),ue.delete(F)}function sn(F,V){let q=w.blockers.get(F)||bi;Je(q.state==="unblocked"&&V.state==="blocked"||q.state==="blocked"&&V.state==="blocked"||q.state==="blocked"&&V.state==="proceeding"||q.state==="blocked"&&V.state==="unblocked"||q.state==="proceeding"&&V.state==="unblocked",`Invalid blocker state transition: ${q.state} -> ${V.state}`);let le=new Map(w.blockers);le.set(F,V),Oe({blockers:le})}function Vn({currentLocation:F,nextLocation:V,historyAction:q}){if(ue.size===0)return;ue.size>1&&Dt(!1,"A router only supports one blocker at a time");let le=Array.from(ue.entries()),[ce,_e]=le[le.length-1],De=w.blockers.get(ce);if(!(De&&De.state==="proceeding")&&_e({currentLocation:F,nextLocation:V,historyAction:q}))return ce}function Dr(F){let V=Xn(404,{pathname:F}),q=f.activeRoutes,{matches:le,route:ce}=tl(q);return{notFoundMatches:le,route:ce,error:V}}function Ye(F,V,q){if(C=F,j=V,N=q||null,!L&&w.navigation===Fu){L=!0;let le=Ut(w.location,w.matches);le!=null&&Oe({restoreScrollPosition:le})}return()=>{C=null,j=null,N=null}}function Et(F,V){return N&&N(F,V.map(le=>Fg(le,w.loaderData)))||F.key}function Lt(F,V){if(C&&j){let q=Et(F,V);C[q]=j()}}function Ut(F,V){if(C){let q=Et(F,V),le=C[q];if(typeof le=="number")return le}return null}function In(F,V,q){if(e.patchRoutesOnNavigation){let le=f.branches;if(F){if(Object.keys(F[0].params).length>0)return{active:!0,matches:dr(V,q,p,!0,le)}}else return{active:!0,matches:dr(V,q,p,!0,le)||[]}}return{active:!1,matches:null}}async function St(F,V,q,le){if(!e.patchRoutesOnNavigation)return{type:"success",matches:F};let ce=F;for(;;){let _e=u;try{await e.patchRoutesOnNavigation({signal:q,path:V,matches:ce,fetcherKey:le,patch:(Fe,$e)=>{q.aborted||Ep(Fe,$e,f,_e,l,!1)}})}catch(Fe){return{type:"error",error:Fe,partialMatches:ce}}if(q.aborted)return{type:"aborted"};let De=f.branches,Ke=dr(f.activeRoutes,V,p,!1,De),ye=null;if(Ke){if(Object.keys(Ke[0].params).length===0)return{type:"success",matches:Ke};if(ye=dr(f.activeRoutes,V,p,!0,De),!(ye&&ce.lengthq.route.id===V[le].route.id)}function xr(F){u={},f.setHmrRoutes(Di(F,l,void 0,u))}function $t(F,V,q=!1){Ep(F,V,f,u,l,q),f.hasHMRRoutes||Oe({})}return O={get basename(){return p},get future(){return y},get state(){return w},get routes(){return f.stableRoutes},get branches(){return f.branches},get manifest(){return u},get window(){return n},initialize:Ve,subscribe:Ue,enableScrollRestoration:Ye,navigate:xt,fetch:be,revalidate:vt,createHref:F=>e.history.createHref(F),encodeLocation:F=>e.history.encodeLocation(F),getFetcher:Sn,resetFetcher:ft,deleteFetcher:Te,dispose:Ce,getBlocker:gt,deleteBlocker:yr,patchRoutes:$t,_internalFetchControllers:X,_internalSetRoutes:xr,_internalSetStateDoNotUseOrYouWillBreakYourApp(F){Oe(F)}},e.instrumentations&&(O=Kv(O,e.instrumentations.map(F=>F.router).filter(Boolean))),O}function sb(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function fd(e,n,a,s,o,l){let u,f;if(o){u=[];for(let m of n)if(u.push(m),m.route.id===o){f=m;break}}else u=n,f=n[n.length-1];let p=Bi(s||".",Bl(u),er(e.pathname,a)||e.pathname,l==="path");if(s==null&&(p.search=e.search,p.hash=e.hash),(s==null||s===""||s===".")&&f){let m=Wd(p.search);if(f.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&m){let y=new URLSearchParams(p.search),g=y.getAll("index");y.delete("index"),g.filter(S=>S).forEach(S=>y.append("index",S));let b=y.toString();p.search=b?`?${b}`:""}}return a!=="/"&&(p.pathname=Bv({basename:a,pathname:p.pathname})),Mr(p)}function Cp(e,n,a){if(!a||!sb(a))return{path:n};if(a.formMethod&&!jb(a.formMethod))return{path:n,error:Xn(405,{method:a.formMethod})};let s=()=>({path:n,error:Xn(400,{type:"invalid-body"})}),l=(a.formMethod||"get").toUpperCase(),u=e1(n);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!pn(l))return s();let g=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((b,[S,C])=>`${b}${S}=${C} `,""):String(a.body);return{path:n,submission:{formMethod:l,formAction:u,formEncType:a.formEncType,formData:void 0,json:void 0,text:g}}}else if(a.formEncType==="application/json"){if(!pn(l))return s();try{let g=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:n,submission:{formMethod:l,formAction:u,formEncType:a.formEncType,formData:void 0,json:g,text:void 0}}}catch{return s()}}}Je(typeof FormData=="function","FormData is not available in this environment");let f,p;if(a.formData)f=pd(a.formData),p=a.formData;else if(a.body instanceof FormData)f=pd(a.body),p=a.body;else if(a.body instanceof URLSearchParams)f=a.body,p=_p(f);else if(a.body==null)f=new URLSearchParams,p=new FormData;else try{f=new URLSearchParams(a.body),p=_p(f)}catch{return s()}let m={formMethod:l,formAction:u,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(pn(m.formMethod))return{path:n,submission:m};let y=_r(n);return e&&y.search&&Wd(y.search)&&f.append("index",""),y.search=`?${f}`,{path:Mr(y),submission:m}}function Np(e,n,a,s,o,l,u,f,p,m,y,g,b,S,C,N,j,L,R,D,H,K){var G;let re=H?On(H[1])?H[1].error:H[1].data:void 0,O=o.createURL(l.location),w=o.createURL(p),M;if(y&&l.errors){let B=Object.keys(l.errors)[0];M=u.findIndex(_=>_.route.id===B)}else if(H&&On(H[1])){let B=H[0];M=u.findIndex(_=>_.route.id===B)-1}let E=H?H[1].statusCode:void 0,U=E&&E>=400,Y={currentUrl:O,currentParams:((G=l.matches[0])==null?void 0:G.params)||{},nextUrl:w,nextParams:u[0].params,...f,actionResult:re,actionStatus:E},I=Ui(u),W=u.map((B,_)=>{let{route:X}=B,J=null;if(M!=null&&_>M)J=!1;else if(X.lazy)J=!0;else if(!$d(X))J=!1;else if(y){let{shouldLoad:ie}=Yg(X,l.loaderData,l.errors);J=ie}else ib(l.loaderData,l.matches[_],B)&&(J=!0);if(J!==null)return hd(a,s,e,p,I,B,m,n,J);let T=!1;typeof K=="boolean"?T=K:U?T=!1:(g||O.pathname+O.search===w.pathname+w.search||O.search!==w.search||ob(l.matches[_],B))&&(T=!0);let A={...Y,defaultShouldRevalidate:T},te=Ti(B,A);return hd(a,s,e,p,I,B,m,n,te,A,K)}),Q=[];return C.forEach((B,_)=>{if(y||!u.some(ae=>ae.route.id===B.routeId)||S.has(_))return;let X=l.fetchers.get(_),J=X&&X.state!=="idle"&&X.data===void 0,T=dr(j,B.path,L??"/",!1,D);if(!T){if(R&&J)return;Q.push({key:_,routeId:B.routeId,path:B.path,matches:null,match:null,request:null,controller:null});return}if(N.has(_))return;let A=pl(T,B.path),te=new AbortController,ie=Ss(o,B.path,te.signal),oe=null;if(b.has(_))b.delete(_),oe=Ps(a,s,ie,B.path,T,A,m,n);else if(J)g&&(oe=Ps(a,s,ie,B.path,T,A,m,n));else{let ae;typeof K=="boolean"?ae=K:U?ae=!1:ae=g;let ue={...Y,defaultShouldRevalidate:ae};Ti(A,ue)&&(oe=Ps(a,s,ie,B.path,T,A,m,n,ue))}oe&&Q.push({key:_,routeId:B.routeId,path:B.path,matches:oe,match:A,request:ie,controller:te})}),{dsMatches:W,revalidatingFetchers:Q}}function $d(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Yg(e,n,a){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!$d(e))return{shouldLoad:!1,renderFallback:!1};let s=n!=null&&e.id in n,o=a!=null&&a[e.id]!==void 0;if(!s&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!s};let l=!s&&!o;return{shouldLoad:l,renderFallback:l}}function ib(e,n,a){let s=!n||a.route.id!==n.route.id,o=!e.hasOwnProperty(a.route.id);return s||o}function ob(e,n){let a=e.route.path;return e.pathname!==n.pathname||a!=null&&a.endsWith("*")&&e.params["*"]!==n.params["*"]}function Ti(e,n){if(e.route.shouldRevalidate){let a=e.route.shouldRevalidate(n);if(typeof a=="boolean")return a}return n.defaultShouldRevalidate}function Ep(e,n,a,s,o,l){let u;if(e){let m=s[e];Je(m,`No route found to patch children into: routeId = ${e}`),m.children||(m.children=[]),u=m.children}else u=a.activeRoutes;let f=[],p=[];if(n.forEach(m=>{let y=u.find(g=>Gg(m,g));y?p.push({existingRoute:y,newRoute:m}):f.push(m)}),f.length>0){let m=Di(f,o,[e||"_","patch",String((u==null?void 0:u.length)||"0")],s);u.push(...m)}if(l&&p.length>0)for(let m=0;m{var l;return(l=n.children)==null?void 0:l.some(u=>Gg(s,u))}))??!1:!1}var Tp=new WeakMap,Xg=({key:e,route:n,manifest:a,mapRouteProperties:s})=>{let o=a[n.id];if(Je(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let l=o.lazy[e];if(!l)return;let u=Tp.get(o);u||(u={},Tp.set(o,u));let f=u[e];if(f)return f;let p=(async()=>{let m=jv(e),g=o[e]!==void 0&&e!=="hasErrorBoundary";if(m)Dt(!m,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(g)Dt(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let b=await l();b!=null&&(Object.assign(o,{[e]:b}),Object.assign(o,s(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(b=>b===void 0)&&(o.lazy=void 0))})();return u[e]=p,p},Pp=new WeakMap;function lb(e,n,a,s,o){let l=a[e.id];if(Je(l,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let y=Pp.get(l);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let g=(async()=>{Je(typeof e.lazy=="function","No lazy route function found");let b=await e.lazy(),S={};for(let C in b){let N=b[C];if(N===void 0)continue;let j=Nv(C),R=l[C]!==void 0&&C!=="hasErrorBoundary";j?Dt(!j,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):R?Dt(!R,`Route "${l.id}" has a static property "${C}" defined but its lazy function is also returning a value for this property. The lazy route property "${C}" will be ignored.`):S[C]=N}Object.assign(l,S),Object.assign(l,{...s(l),lazy:void 0})})();return Pp.set(l,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let u=Object.keys(e.lazy),f=[],p;for(let y of u){if(o&&o.includes(y))continue;let g=Xg({key:y,route:e,manifest:a,mapRouteProperties:s});g&&(f.push(g),y===n&&(p=g))}let m=f.length>0?Promise.all(f).then(()=>{}):void 0;return m==null||m.catch(()=>{}),p==null||p.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function Rp(e){let n=e.matches.filter(o=>o.shouldLoad),a={};return(await Promise.all(n.map(o=>o.resolve()))).forEach((o,l)=>{a[n[l].route.id]=o}),a}async function cb(e){return e.matches.some(n=>n.route.middleware)?Jg(e,()=>Rp(e)):Rp(e)}function Jg(e,n){return ub(e,n,s=>{if(kb(s))throw s;return s},vb,a);function a(s,o,l){if(l)return Promise.resolve(Object.assign(l.value,{[o]:{type:"error",result:s}}));{let{matches:u}=e,f=Math.min(Math.max(u.findIndex(m=>m.route.id===o),0),Math.max(u.findIndex(m=>m.shouldCallHandler()),0)),p=ya(u,u[f].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:s}})}}}async function ub(e,n,a,s,o){let{matches:l,...u}=e,f=l.flatMap(m=>m.route.middleware?m.route.middleware.map(y=>[m.route.id,y]):[]);return await qg(u,f,n,a,s,o)}async function qg(e,n,a,s,o,l,u=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let p=n[u];if(!p)return await a();let[m,y]=p,g,b=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await qg(e,n,a,s,o,l,u+1)},g.value}catch(S){return g={value:await l(S,m,g)},g.value}};try{let S=await y(e,b),C=S!=null?s(S):void 0;return o(C)?C:g?C??g.value:(g={value:await b()},g.value)}catch(S){return await l(S,m,g)}}function Qg(e,n,a,s,o){let l=Xg({key:"middleware",route:s.route,manifest:n,mapRouteProperties:e}),u=lb(s.route,pn(a.method)?"action":"loader",n,e,o);return{middleware:l,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function hd(e,n,a,s,o,l,u,f,p,m=null,y){let g=!1,b=Qg(e,n,a,l,u);return{...l,_lazyPromises:b,shouldLoad:p,shouldRevalidateArgs:m,shouldCallHandler(S){return g=!0,m?typeof y=="boolean"?Ti(l,{...m,defaultShouldRevalidate:y}):typeof S=="boolean"?Ti(l,{...m,defaultShouldRevalidate:S}):Ti(l,m):p},resolve(S){let{lazy:C,loader:N,middleware:j}=l.route,L=g||p||S&&!pn(a.method)&&(C||N),R=j&&j.length>0&&!N&&!C;return L&&(pn(a.method)||!R)?fb({request:a,path:s,pattern:o,match:l,lazyHandlerPromise:b==null?void 0:b.handler,lazyRoutePromise:b==null?void 0:b.route,handlerOverride:S,scopedContext:f}):Promise.resolve({type:"data",result:void 0})}}}function Ps(e,n,a,s,o,l,u,f,p=null){return o.map(m=>m.route.id!==l.route.id?{...m,shouldLoad:!1,shouldRevalidateArgs:p,shouldCallHandler:()=>!1,_lazyPromises:Qg(e,n,a,m,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:hd(e,n,a,s,Ui(o),m,u,f,!0,p))}async function db(e,n,a,s,o,l,u){s.some(y=>{var g;return(g=y._lazyPromises)==null?void 0:g.middleware})&&await Promise.all(s.map(y=>{var g;return(g=y._lazyPromises)==null?void 0:g.middleware}));let f={request:n,url:Zg(n,a),pattern:Ui(s),params:s[0].params,context:l,matches:s},m=await e({...f,fetcherKey:o,runClientMiddleware:y=>{let g=f;return Jg(g,()=>y({...g,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(s.flatMap(y=>{var g,b;return[(g=y._lazyPromises)==null?void 0:g.handler,(b=y._lazyPromises)==null?void 0:b.route]}))}catch{}return m}async function fb({request:e,path:n,pattern:a,match:s,lazyHandlerPromise:o,lazyRoutePromise:l,handlerOverride:u,scopedContext:f}){let p,m,y=pn(e.method),g=y?"action":"loader",b=S=>{let C,N=new Promise((R,D)=>C=D);m=()=>C(),e.signal.addEventListener("abort",m);let j=R=>typeof S!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${g}" [routeId: ${s.route.id}]`)):S({request:e,url:Zg(e,n),pattern:a,params:s.params,context:f},...R!==void 0?[R]:[]),L=(async()=>{try{return{type:"data",result:await(u?u(D=>j(D)):j())}}catch(R){return{type:"error",result:R}}})();return Promise.race([L,N])};try{let S=y?s.route.action:s.route.loader;if(o||l)if(S){let C,[N]=await Promise.all([b(S).catch(j=>{C=j}),o,l]);if(C!==void 0)throw C;p=N}else{await o;let C=y?s.route.action:s.route.loader;if(C)[p]=await Promise.all([b(C),l]);else if(g==="action"){let N=new URL(e.url),j=N.pathname+N.search;throw Xn(405,{method:e.method,pathname:j,routeId:s.route.id})}else return{type:"data",result:void 0}}else if(S)p=await b(S);else{let C=new URL(e.url),N=C.pathname+C.search;throw Xn(404,{pathname:N})}}catch(S){return{type:"error",result:S}}finally{m&&e.signal.removeEventListener("abort",m)}return p}async function hb(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}async function pb(e){var s,o,l,u,f;let{result:n,type:a}=e;if(Hd(n)){let p;try{p=await hb(n)}catch(m){return{type:"error",error:m}}return a==="error"?{type:"error",error:new Vi(n.status,n.statusText,p),statusCode:n.status,headers:n.headers}:{type:"data",data:p,statusCode:n.status,headers:n.headers}}return a==="error"?Ap(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:(s=n.init)==null?void 0:s.status,headers:(o=n.init)!=null&&o.headers?new Headers(n.init.headers):void 0}:{type:"error",error:xb(n),statusCode:Fi(n)?n.status:void 0,headers:(l=n.init)!=null&&l.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:Fi(n)?n.status:void 0}:Ap(n)?{type:"data",data:n.data,statusCode:(u=n.init)==null?void 0:u.status,headers:(f=n.init)!=null&&f.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function mb(e,n,a,s,o){let l=e.headers.get("Location");if(Je(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!Vd(l)){let u=s.slice(0,s.findIndex(f=>f.route.id===a)+1);l=fd(new URL(n.url),u,o,l),e.headers.set("Location",l)}return e}var Mp=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Ip(e,n,a,s){if(Vd(e)){let o=e,l=o.startsWith("//")?new URL(n.protocol+o):new URL(o);if(Mp.includes(l.protocol))throw new Error("Invalid redirect location");let u=er(l.pathname,a)!=null;if(l.origin===n.origin&&u)return Ud(l.pathname)+l.search+l.hash}try{let o=s.createURL(e);if(Mp.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ss(e,n,a,s){let o=e.createURL(e1(n)).toString(),l={signal:a};if(s&&pn(s.formMethod)){let{formMethod:u,formEncType:f}=s;l.method=u.toUpperCase(),f==="application/json"?(l.headers=new Headers({"Content-Type":f}),l.body=JSON.stringify(s.json)):f==="text/plain"?l.body=s.text:f==="application/x-www-form-urlencoded"&&s.formData?l.body=pd(s.formData):l.body=s.formData}return new Request(o,l)}function Zg(e,n){let a=new URL(e.url),s=typeof n=="string"?_r(n):n;if(a.pathname=s.pathname||"/",s.search){let o=new URLSearchParams(s.search),l=o.getAll("index");o.delete("index");for(let u of l.filter(Boolean))o.append("index",u);a.search=o.size?`?${o.toString()}`:""}else a.search="";return a.hash=s.hash||"",a}function pd(e){let n=new URLSearchParams;for(let[a,s]of e.entries())n.append(a,typeof s=="string"?s:s.name);return n}function _p(e){let n=new FormData;for(let[a,s]of e.entries())n.append(a,s);return n}function gb(e,n,a,s=!1,o=!1){let l={},u=null,f,p=!1,m={},y=a&&On(a[1])?a[1].error:void 0;return e.forEach(g=>{if(!(g.route.id in n))return;let b=g.route.id,S=n[b];if(Je(!Va(S),"Cannot handle redirect results in processLoaderData"),On(S)){let C=S.error;if(y!==void 0&&(C=y,y=void 0),u=u||{},o)u[b]=C;else{let N=ya(e,b);u[N.route.id]==null&&(u[N.route.id]=C)}s||(l[b]=Kg),p||(p=!0,f=Fi(S.error)?S.error.status:500),S.headers&&(m[b]=S.headers)}else l[b]=S.data,S.statusCode&&S.statusCode!==200&&!p&&(f=S.statusCode),S.headers&&(m[b]=S.headers)}),y!==void 0&&a&&(u={[a[0]]:y},a[2]&&(l[a[2]]=void 0)),{loaderData:l,errors:u,statusCode:f||200,loaderHeaders:m}}function Dp(e,n,a,s,o,l,u){let{loaderData:f,errors:p}=gb(n,a,s);return o.filter(m=>!m.matches||m.matches.some(y=>y.shouldLoad)).forEach(m=>{let{key:y,match:g,controller:b}=m;if(b&&b.signal.aborted)return;let S=l[y];if(Je(S,"Did not find corresponding fetcher result"),On(S)){let C=ya(e.matches,g==null?void 0:g.route.id);p&&p[C.route.id]||(p={...p,[C.route.id]:S.error}),u.delete(y)}else if(Va(S))Je(!1,"Unhandled fetcher revalidation redirect");else{let C=Nr(S.data);u.set(y,C)}}),{loaderData:f,errors:p}}function Fp(e,n,a,s){let o=Object.entries(n).filter(([,l])=>l!==Kg).reduce((l,[u,f])=>(l[u]=f,l),{});for(let l of a){let u=l.route.id;if(!n.hasOwnProperty(u)&&e.hasOwnProperty(u)&&l.route.loader&&(o[u]=e[u]),s&&s.hasOwnProperty(u))break}return o}function Lp(e){return e?On(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ya(e,n){return(n?e.slice(0,e.findIndex(s=>s.route.id===n)+1):[...e]).reverse().find(s=>s.route.hasErrorBoundary===!0)||e[0]}function tl(e){let n=e.length===1?e[0]:e.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Xn(e,{pathname:n,routeId:a,method:s,type:o,message:l}={}){let u="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(u="Bad Request",s&&n&&a?f=`You made a ${s} request to "${n}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:o==="invalid-body"&&(f="Unable to encode submission body")):e===403?(u="Forbidden",f=`Route "${a}" does not match URL "${n}"`):e===404?(u="Not Found",f=`No route matches URL "${n}"`):e===405&&(u="Method Not Allowed",s&&n&&a?f=`You made a ${s.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:s&&(f=`Invalid request method "${s.toUpperCase()}"`)),new Vi(e||500,u,new Error(f),!0)}function nl(e){let n=Object.entries(e);for(let a=n.length-1;a>=0;a--){let[s,o]=n[a];if(Va(o))return{key:s,result:o}}}function e1(e){let n=typeof e=="string"?_r(e):e;return Mr({...n,hash:""})}function yb(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function xb(e){var n,a;return new Vi(((n=e.init)==null?void 0:n.status)??500,((a=e.init)==null?void 0:a.statusText)??"Internal Server Error",e.data)}function vb(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([n,a])=>typeof n=="string"&&bb(a))}function bb(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function wb(e){return Hd(e.result)&&Hg.has(e.result.status)}function On(e){return e.type==="error"}function Va(e){return(e&&e.type)==="redirect"}function Ap(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Hd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Sb(e){return Hg.has(e)}function kb(e){return Hd(e)&&Sb(e.status)&&e.headers.has("Location")}function jb(e){return Zv.has(e.toUpperCase())}function pn(e){return qv.has(e.toUpperCase())}function Wd(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function pl(e,n){let a=typeof n=="string"?_r(n).search:n.search;if(e[e.length-1].route.index&&Wd(a||""))return e[e.length-1];let s=zg(e);return s[s.length-1]}function Op(e){let{formMethod:n,formAction:a,formEncType:s,text:o,formData:l,json:u}=e;if(!(!n||!a||!s)){if(o!=null)return{formMethod:n,formAction:a,formEncType:s,formData:void 0,json:void 0,text:o};if(l!=null)return{formMethod:n,formAction:a,formEncType:s,formData:l,json:void 0,text:void 0};if(u!==void 0)return{formMethod:n,formAction:a,formEncType:s,formData:void 0,json:u,text:void 0}}}function Lu(e,n,a,s){return s?{state:"loading",location:e,matches:n,historyAction:a,formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text}:{state:"loading",location:e,matches:n,historyAction:a,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Cb(e,n,a,s){return{state:"submitting",location:e,matches:n,historyAction:a,formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text}}function wi(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function Nb(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function Nr(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Eb(e,n){try{let a=e.sessionStorage.getItem(Wg);if(a){let s=JSON.parse(a);for(let[o,l]of Object.entries(s||{}))l&&Array.isArray(l)&&n.set(o,new Set(l||[]))}}catch{}}function Tb(e,n){if(n.size>0){let a={};for(let[s,o]of n)a[s]=[...o];try{e.sessionStorage.setItem(Wg,JSON.stringify(a))}catch(s){Dt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function zp(){let e,n,a=new Promise((s,o)=>{e=async l=>{s(l);try{await a}catch{}},n=async l=>{o(l);try{await a}catch{}}});return{promise:a,resolve:e,reject:n}}var Ka=v.createContext(null);Ka.displayName="DataRouter";var $i=v.createContext(null);$i.displayName="DataRouterState";var t1=v.createContext(!1);function n1(){return v.useContext(t1)}var Kd=v.createContext({isTransitioning:!1});Kd.displayName="ViewTransition";var r1=v.createContext(new Map);r1.displayName="Fetchers";var Pb=v.createContext(null);Pb.displayName="Await";var Bn=v.createContext(null);Bn.displayName="Navigation";var Vl=v.createContext(null);Vl.displayName="Location";var tr=v.createContext({outlet:null,matches:[],isDataRoute:!1});tr.displayName="Route";var Yd=v.createContext(null);Yd.displayName="RouteError";var a1="REACT_ROUTER_ERROR",Rb="REDIRECT",Mb="ROUTE_ERROR_RESPONSE";function Ib(e){if(e.startsWith(`${a1}:${Rb}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function _b(e){if(e.startsWith(`${a1}:${Mb}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new Vi(n.status,n.statusText,n.data)}catch{}}function Db(e,{relative:n}={}){Je(Ls(),"useHref() may be used only in the context of a component.");let{basename:a,navigator:s}=v.useContext(Bn),{hash:o,pathname:l,search:u}=Hi(e,{relative:n}),f=l;return a!=="/"&&(f=l==="/"?a:Qn([a,l])),s.createHref({pathname:f,search:u,hash:o})}function Ls(){return v.useContext(Vl)!=null}function Gt(){return Je(Ls(),"useLocation() may be used only in the context of a component."),v.useContext(Vl).location}var s1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function i1(e){v.useContext(Bn).static||v.useLayoutEffect(e)}function an(){let{isDataRoute:e}=v.useContext(tr);return e?Xb():Fb()}function Fb(){Je(Ls(),"useNavigate() may be used only in the context of a component.");let e=v.useContext(Ka),{basename:n,navigator:a}=v.useContext(Bn),{matches:s}=v.useContext(tr),{pathname:o}=Gt(),l=JSON.stringify(Bl(s)),u=v.useRef(!1);return i1(()=>{u.current=!0}),v.useCallback((p,m={})=>{if(Dt(u.current,s1),!u.current)return;if(typeof p=="number"){a.go(p);return}let y=Bi(p,JSON.parse(l),o,m.relative==="path");e==null&&n!=="/"&&(y.pathname=y.pathname==="/"?n:Qn([n,y.pathname])),(m.replace?a.replace:a.push)(y,m.state,m)},[n,a,l,o,e])}var Lb=v.createContext(null);function Ab(e){let n=v.useContext(tr).outlet;return v.useMemo(()=>n&&v.createElement(Lb.Provider,{value:e},n),[n,e])}function Ul(){let{matches:e}=v.useContext(tr),n=e[e.length-1];return(n==null?void 0:n.params)??{}}function Hi(e,{relative:n}={}){let{matches:a}=v.useContext(tr),{pathname:s}=Gt(),o=JSON.stringify(Bl(a));return v.useMemo(()=>Bi(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function Ob(e,n,a){Je(Ls(),"useRoutes() may be used only in the context of a component.");let{navigator:s}=v.useContext(Bn),{matches:o}=v.useContext(tr),l=o[o.length-1],u=l?l.params:{},f=l?l.pathname:"/",p=l?l.pathnameBase:"/",m=l&&l.route;{let j=m&&m.path||"";c1(f,!m||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${f}" (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 y=Gt(),g;g=y;let b=g.pathname||"/",S=b;if(p!=="/"){let j=p.replace(/^\//,"").split("/");S="/"+b.replace(/^\//,"").split("/").slice(j.length).join("/")}let C=a&&a.state.matches.length?a.state.matches.map(j=>Object.assign(j,{route:a.manifest[j.route.id]||j.route})):Dg(e,{pathname:S});return Dt(m||C!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Dt(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.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.`),$b(C&&C.map(j=>Object.assign({},j,{params:Object.assign({},u,j.params),pathname:Qn([p,s.encodeLocation?s.encodeLocation(j.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?p:Qn([p,s.encodeLocation?s.encodeLocation(j.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),o,a)}function zb(){let e=Gb(),n=Fi(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},l={padding:"2px 4px",backgroundColor:s},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:l},"ErrorBoundary")," or"," ",v.createElement("code",{style:l},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),a?v.createElement("pre",{style:o},a):null,u)}var Bb=v.createElement(zb,null),o1=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=_b(e.digest);a&&(e=a)}let n=e!==void 0?v.createElement(tr.Provider,{value:this.props.routeContext},v.createElement(Yd.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(Vb,{error:e},n):n}};o1.contextType=t1;var Au=new WeakMap;function Vb({children:e,error:n}){let{basename:a}=v.useContext(Bn);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let s=Ib(n.digest);if(s){let o=Au.get(n);if(o)throw o;let l=Vg(s.location,a);if(Bg&&!Au.get(n))if(l.isExternal||s.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:s.replace}));throw Au.set(n,u),u}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function Ub({routeContext:e,match:n,children:a}){let s=v.useContext(Ka);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(tr.Provider,{value:e},a)}function $b(e,n=[],a){let s=a==null?void 0:a.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(n.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let o=e,l=s==null?void 0:s.errors;if(l!=null){let y=o.findIndex(g=>g.route.id&&(l==null?void 0:l[g.route.id])!==void 0);Je(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let u=!1,f=-1;if(a&&s){u=s.renderFallback;for(let y=0;y=0?o=o.slice(0,f+1):o=[o[0]];break}}}}let p=a==null?void 0:a.onError,m=s&&p?(y,g)=>{var b,S;p(y,{location:s.location,params:((S=(b=s.matches)==null?void 0:b[0])==null?void 0:S.params)??{},pattern:Ui(s.matches),errorInfo:g})}:void 0;return o.reduceRight((y,g,b)=>{let S,C=!1,N=null,j=null;s&&(S=l&&g.route.id?l[g.route.id]:void 0,N=g.route.errorElement||Bb,u&&(f<0&&b===0?(c1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,j=null):f===b&&(C=!0,j=g.route.hydrateFallbackElement||null)));let L=n.concat(o.slice(0,b+1)),R=()=>{let D;return S?D=N:C?D=j:g.route.Component?D=v.createElement(g.route.Component,null):g.route.element?D=g.route.element:D=y,v.createElement(Ub,{match:g,routeContext:{outlet:y,matches:L,isDataRoute:s!=null},children:D})};return s&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?v.createElement(o1,{location:s.location,revalidation:s.revalidation,component:N,error:S,children:R(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:m}):R()},null)}function Gd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hb(e){let n=v.useContext(Ka);return Je(n,Gd(e)),n}function l1(e){let n=v.useContext($i);return Je(n,Gd(e)),n}function Wb(e){let n=v.useContext(tr);return Je(n,Gd(e)),n}function Xd(e){let n=Wb(e),a=n.matches[n.matches.length-1];return Je(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function Kb(){return Xd("useRouteId")}function Yb(){let{matches:e,loaderData:n}=l1("useMatches");return v.useMemo(()=>e.map(a=>Fg(a,n)),[e,n])}function Gb(){var s;let e=v.useContext(Yd),n=l1("useRouteError"),a=Xd("useRouteError");return e!==void 0?e:(s=n.errors)==null?void 0:s[a]}function Xb(){let{router:e}=Hb("useNavigate"),n=Xd("useNavigate"),a=v.useRef(!1);return i1(()=>{a.current=!0}),v.useCallback(async(o,l={})=>{Dt(a.current,s1),a.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:n,...l}))},[e,n])}var Bp={};function c1(e,n,a){!n&&!Bp[e]&&(Bp[e]=!0,Dt(!1,a))}var Vp={};function Up(e,n){!e&&!Vp[n]&&(Vp[n]=!0,console.warn(n))}var Jb="useOptimistic",$p=vv[Jb],qb=()=>{};function Qb(e){return $p?$p(e):[e,qb]}function Zb(e){let n={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Dt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:v.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Dt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Dt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),n}var ew=["HydrateFallback","hydrateFallbackElement"],tw=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",e(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",n(a))}})}};function nw({router:e,flushSync:n,onError:a,useTransitions:s}){s=n1()||s;let[l,u]=v.useState(e.state),[f,p]=Qb(l),[m,y]=v.useState(),[g,b]=v.useState({isTransitioning:!1}),[S,C]=v.useState(),[N,j]=v.useState(),[L,R]=v.useState(),D=v.useRef(new Map),H=v.useCallback((w,{deletedFetchers:M,newErrors:E,flushSync:U,viewTransitionOpts:Y})=>{E&&a&&Object.values(E).forEach(W=>{var Q;return a(W,{location:w.location,params:((Q=w.matches[0])==null?void 0:Q.params)??{},pattern:Ui(w.matches)})}),w.fetchers.forEach((W,Q)=>{W.data!==void 0&&D.current.set(Q,W.data)}),M.forEach(W=>D.current.delete(W)),Up(U===!1||n!=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 I=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Up(Y==null||I,"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."),!Y||!I){n&&U?n(()=>u(w)):s===!1?u(w):v.startTransition(()=>{s===!0&&p(W=>Hp(W,w)),u(w)});return}if(n&&U){n(()=>{N&&(S==null||S.resolve(),N.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})});let W=e.window.document.startViewTransition(()=>{n(()=>u(w))});W.finished.finally(()=>{n(()=>{C(void 0),j(void 0),y(void 0),b({isTransitioning:!1})})}),n(()=>j(W));return}N?(S==null||S.resolve(),N.skipTransition(),R({state:w,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})):(y(w),b({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}))},[e.window,n,N,S,s,p,a]);v.useLayoutEffect(()=>e.subscribe(H),[e,H]),v.useEffect(()=>{g.isTransitioning&&!g.flushSync&&C(new tw)},[g]),v.useEffect(()=>{if(S&&m&&e.window){let w=m,M=S.promise,E=e.window.document.startViewTransition(async()=>{s===!1?u(w):v.startTransition(()=>{s===!0&&p(U=>Hp(U,w)),u(w)}),await M});E.finished.finally(()=>{C(void 0),j(void 0),y(void 0),b({isTransitioning:!1})}),j(E)}},[m,S,e.window,s,p]),v.useEffect(()=>{S&&m&&f.location.key===m.location.key&&S.resolve()},[S,N,f.location,m]),v.useEffect(()=>{!g.isTransitioning&&L&&(y(L.state),b({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}),R(void 0))},[g.isTransitioning,L]);let K=v.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:w=>e.navigate(w),push:(w,M,E)=>e.navigate(w,{state:M,preventScrollReset:E==null?void 0:E.preventScrollReset}),replace:(w,M,E)=>e.navigate(w,{replace:!0,state:M,preventScrollReset:E==null?void 0:E.preventScrollReset})}),[e]),re=e.basename||"/",O=v.useMemo(()=>({router:e,navigator:K,static:!1,basename:re,onError:a}),[e,K,re,a]);return v.createElement(v.Fragment,null,v.createElement(Ka.Provider,{value:O},v.createElement($i.Provider,{value:f},v.createElement(r1.Provider,{value:D.current},v.createElement(Kd.Provider,{value:g},v.createElement(sw,{basename:re,location:f.location,navigationType:f.historyAction,navigator:K,useTransitions:s},v.createElement(rw,{routes:e.routes,manifest:e.manifest,future:e.future,state:f,isStatic:!1,onError:a})))))),null)}function Hp(e,n){return{...e,navigation:n.navigation.state!=="idle"?n.navigation:e.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:e.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:e.actionData,fetchers:n.fetchers}}var rw=v.memo(aw);function aw({routes:e,manifest:n,future:a,state:s,isStatic:o,onError:l}){return Ob(e,void 0,{manifest:n,state:s,isStatic:o,onError:l})}function u1({to:e,replace:n,state:a,relative:s}){Je(Ls()," may be used only in the context of a component.");let{static:o}=v.useContext(Bn);Dt(!o," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:l}=v.useContext(tr),{pathname:u}=Gt(),f=an(),p=Bi(e,Bl(l),u,s==="path"),m=JSON.stringify(p);return v.useEffect(()=>{f(JSON.parse(m),{replace:n,state:a,relative:s})},[f,m,s,n,a]),null}function sw({basename:e="/",children:n=null,location:a,navigationType:s="POP",navigator:o,static:l=!1,useTransitions:u}){Je(!Ls(),"You cannot render a inside another . You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),p=v.useMemo(()=>({basename:f,navigator:o,static:l,useTransitions:u,future:{}}),[f,o,l,u]);typeof a=="string"&&(a=_r(a));let{pathname:m="/",search:y="",hash:g="",state:b=null,key:S="default",mask:C}=a,N=v.useMemo(()=>{let j=er(m,f);return j==null?null:{location:{pathname:j,search:y,hash:g,state:b,key:S,mask:C},navigationType:s}},[f,m,y,g,b,S,s,C]);return Dt(N!=null,` is not able to match the URL "${m}${y}${g}" because it does not start with the basename, so the won't render anything.`),N==null?null:v.createElement(Bn.Provider,{value:p},v.createElement(Vl.Provider,{children:n,value:N}))}var ml="get",gl="application/x-www-form-urlencoded";function $l(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function iw(e){return $l(e)&&e.tagName.toLowerCase()==="button"}function ow(e){return $l(e)&&e.tagName.toLowerCase()==="form"}function lw(e){return $l(e)&&e.tagName.toLowerCase()==="input"}function cw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function uw(e,n){return e.button===0&&(!n||n==="_self")&&!cw(e)}function md(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,a)=>{let s=e[a];return n.concat(Array.isArray(s)?s.map(o=>[a,o]):[[a,s]])},[]))}function dw(e,n){let a=md(e);return n&&n.forEach((s,o)=>{a.has(o)||n.getAll(o).forEach(l=>{a.append(o,l)})}),a}var rl=null;function fw(){if(rl===null)try{new FormData(document.createElement("form"),0),rl=!1}catch{rl=!0}return rl}var hw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ou(e){return e!=null&&!hw.has(e)?(Dt(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${gl}"`),null):e}function pw(e,n){let a,s,o,l,u;if(ow(e)){let f=e.getAttribute("action");s=f?er(f,n):null,a=e.getAttribute("method")||ml,o=Ou(e.getAttribute("enctype"))||gl,l=new FormData(e)}else if(iw(e)||lw(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a