function cp(i,u){for(var a=0;ac[f]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var gm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oc(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Bu={exports:{}},ge={};/** * @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 zf;function dp(){if(zf)return ge;zf=1;var i=Symbol.for("react.element"),u=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),y=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),z=Symbol.iterator;function T(E){return E===null||typeof E!="object"?null:(E=z&&E[z]||E["@@iterator"],typeof E=="function"?E:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,H={};function O(E,F,ae){this.props=E,this.context=F,this.refs=H,this.updater=ae||N}O.prototype.isReactComponent={},O.prototype.setState=function(E,F){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,F,"setState")},O.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function j(){}j.prototype=O.prototype;function V(E,F,ae){this.props=E,this.context=F,this.refs=H,this.updater=ae||N}var b=V.prototype=new j;b.constructor=V,M(b,O.prototype),b.isPureReactComponent=!0;var le=Array.isArray,se=Object.prototype.hasOwnProperty,C={current:null},fe={key:!0,ref:!0,__self:!0,__source:!0};function me(E,F,ae){var pe,we={},ye=null,Ne=null;if(F!=null)for(pe in F.ref!==void 0&&(Ne=F.ref),F.key!==void 0&&(ye=""+F.key),F)se.call(F,pe)&&!fe.hasOwnProperty(pe)&&(we[pe]=F[pe]);var Pe=arguments.length-2;if(Pe===1)we.children=ae;else if(1>>1,F=W[E];if(0>>1;Ef(we,K))yef(Ne,we)?(W[E]=Ne,W[ye]=K,E=ye):(W[E]=we,W[pe]=K,E=pe);else if(yef(Ne,K))W[E]=Ne,W[ye]=K,E=ye;else break e}}return re}function f(W,re){var K=W.sortIndex-re.sortIndex;return K!==0?K:W.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;i.unstable_now=function(){return d.now()}}else{var y=Date,v=y.now();i.unstable_now=function(){return y.now()-v}}var g=[],S=[],D=1,z=null,T=3,N=!1,M=!1,H=!1,O=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(W){for(var re=a(S);re!==null;){if(re.callback===null)c(S);else if(re.startTime<=W)c(S),re.sortIndex=re.expirationTime,u(g,re);else break;re=a(S)}}function le(W){if(H=!1,b(W),!M)if(a(g)!==null)M=!0,Ee(se);else{var re=a(S);re!==null&&Me(le,re.startTime-W)}}function se(W,re){M=!1,H&&(H=!1,j(me),me=-1),N=!0;var K=T;try{for(b(re),z=a(g);z!==null&&(!(z.expirationTime>re)||W&&!Be());){var E=z.callback;if(typeof E=="function"){z.callback=null,T=z.priorityLevel;var F=E(z.expirationTime<=re);re=i.unstable_now(),typeof F=="function"?z.callback=F:z===a(g)&&c(g),b(re)}else c(g);z=a(g)}if(z!==null)var ae=!0;else{var pe=a(S);pe!==null&&Me(le,pe.startTime-re),ae=!1}return ae}finally{z=null,T=K,N=!1}}var C=!1,fe=null,me=-1,ce=5,Ce=-1;function Be(){return!(i.unstable_now()-CeW||125E?(W.sortIndex=K,u(S,W),a(g)===null&&W===a(S)&&(H?(j(me),me=-1):H=!0,Me(le,K-E))):(W.sortIndex=F,u(g,W),M||N||(M=!0,Ee(se))),W},i.unstable_shouldYield=Be,i.unstable_wrapCallback=function(W){var re=T;return function(){var K=T;T=re;try{return W.apply(this,arguments)}finally{T=K}}}}(Qu)),Qu}var If;function mp(){return If||(If=1,Wu.exports=hp()),Wu.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Uf;function yp(){if(Uf)return Et;Uf=1;var i=uc(),u=mp();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,S=/^[: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]*$/,D={},z={};function T(e){return g.call(z,e)?!0:g.call(D,e)?!1:S.test(e)?z[e]=!0:(D[e]=!0,!1)}function N(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function M(e,t,n,r){if(t===null||typeof t>"u"||N(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function H(e,t,n,r,l,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var O={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){O[e]=new H(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];O[t]=new H(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){O[e]=new H(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){O[e]=new H(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){O[e]=new H(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){O[e]=new H(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){O[e]=new H(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){O[e]=new H(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){O[e]=new H(e,5,!1,e.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function V(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(j,V);O[t]=new H(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(j,V);O[t]=new H(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(j,V);O[t]=new H(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){O[e]=new H(e,1,!1,e.toLowerCase(),null,!1,!1)}),O.xlinkHref=new H("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){O[e]=new H(e,1,!1,e.toLowerCase(),null,!0,!0)});function b(e,t,n,r){var l=O.hasOwnProperty(t)?O[t]:null;(l!==null?l.type!==0:r||!(2p||l[s]!==o[p]){var h=` `+l[s].replace(" at new "," at ");return e.displayName&&h.includes("")&&(h=h.replace("",e.displayName)),h}while(1<=s&&0<=p);break}}}finally{ae=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function we(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=pe(e.type,!1),e;case 11:return e=pe(e.type.render,!1),e;case 1:return e=pe(e.type,!0),e;default:return""}}function ye(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fe:return"Fragment";case C:return"Portal";case ce:return"Profiler";case me:return"StrictMode";case be:return"Suspense";case Je:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Be:return(e.displayName||"Context")+".Consumer";case Ce:return(e._context.displayName||"Context")+".Provider";case ut:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dt:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case Ee:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}function Ne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(t);case 8:return t===me?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ze(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Re(e){var t=ze(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jt(e){e._valueTracker||(e._valueTracker=Re(e))}function Wr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ze(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function pr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $t(e,t){var n=t.checked;return K({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Hl(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Pe(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Bl(e,t){t=t.checked,t!=null&&b(e,"checked",t,!1)}function hr(e,t){Bl(e,t);var n=Pe(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Qr(e,t.type,n):t.hasOwnProperty("defaultValue")&&Qr(e,t.type,Pe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vl(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Qr(e,t,n){(t!=="number"||pr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wn=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Qn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Kn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mt={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},Wl=["Webkit","ms","Moz","O"];Object.keys(mt).forEach(function(e){Wl.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mt[t]=mt[e]})});function Yr(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mt.hasOwnProperty(e)&&mt[e]?(""+t).trim():t+"px"}function Xr(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Yr(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var uo=K({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 vr(e,t){if(t){if(uo[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function yn(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gr=null;function Yn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gr=null,rn=null,vn=null;function Jr(e){if(e=yl(e)){if(typeof Gr!="function")throw Error(a(280));var t=e.stateNode;t&&(t=di(t),Gr(e.stateNode,e.type,t))}}function Xn(e){rn?vn?vn.push(e):vn=[e]:rn=e}function Gn(){if(rn){var e=rn,t=vn;if(vn=rn=null,Jr(e),t)for(e=0;e>>=0,e===0?32:31-(Lc(e)/_c|0)|0}var Xl=64,Gl=4194304;function qr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Jl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var p=s&~l;p!==0?r=qr(p):(o&=s,o!==0&&(r=qr(o)))}else s=n&~l,s!==0?r=qr(s):o!==0&&(r=qr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function br(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ct(t),e[t]=n}function Mc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ul),Pa=" ",Ra=!1;function La(e,t){switch(e){case"keyup":return od.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _a(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xr=!1;function ad(e,t){switch(e){case"compositionend":return _a(t);case"keypress":return t.which!==32?null:(Ra=!0,Pa);case"textInput":return e=t.data,e===Pa&&Ra?null:e;default:return null}}function sd(e,t){if(xr)return e==="compositionend"||!ko&&La(e,t)?(e=wa(),ti=yo=Pn=null,xr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Oa(n)}}function Ua(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ua(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ja(){for(var e=window,t=pr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pr(e.document)}return t}function Po(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gd(e){var t=ja(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ua(n.ownerDocument.documentElement,n)){if(r!==null&&Po(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Ia(n,o);var s=Ia(n,r);l&&s&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Cr=null,Ro=null,cl=null,Lo=!1;function $a(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lo||Cr==null||Cr!==pr(r)||(r=Cr,"selectionStart"in r&&Po(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),cl&&fl(cl,r)||(cl=r,r=si(Ro,"onSelect"),0Tr||(e.current=$o[Tr],$o[Tr]=null,Tr--)}function Ie(e,t){Tr++,$o[Tr]=e.current,e.current=t}var Tn={},at=_n(Tn),yt=_n(!1),qn=Tn;function Nr(e,t){var n=e.type.contextTypes;if(!n)return Tn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function vt(e){return e=e.childContextTypes,e!=null}function pi(){Ae(yt),Ae(at)}function es(e,t,n){if(at.current!==Tn)throw Error(a(168));Ie(at,t),Ie(yt,n)}function ts(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(a(108,Ne(e)||"Unknown",l));return K({},n,r)}function hi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Tn,qn=at.current,Ie(at,e),Ie(yt,yt.current),!0}function ns(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=ts(e,t,qn),r.__reactInternalMemoizedMergedChildContext=e,Ae(yt),Ae(at),Ie(at,e)):Ae(yt),Ie(yt,n)}var un=null,mi=!1,Ao=!1;function rs(e){un===null?un=[e]:un.push(e)}function Nd(e){mi=!0,rs(e)}function Nn(){if(!Ao&&un!==null){Ao=!0;var e=0,t=Te;try{var n=un;for(Te=1;e>=s,l-=s,an=1<<32-Ct(t)+l|n<de?(nt=oe,oe=null):nt=oe.sibling;var xe=I(x,oe,P[de],B);if(xe===null){oe===null&&(oe=nt);break}e&&oe&&xe.alternate===null&&t(x,oe),w=o(xe,w,de),ie===null?te=xe:ie.sibling=xe,ie=xe,oe=nt}if(de===P.length)return n(x,oe),He&&er(x,de),te;if(oe===null){for(;dede?(nt=oe,oe=null):nt=oe.sibling;var $n=I(x,oe,xe.value,B);if($n===null){oe===null&&(oe=nt);break}e&&oe&&$n.alternate===null&&t(x,oe),w=o($n,w,de),ie===null?te=$n:ie.sibling=$n,ie=$n,oe=nt}if(xe.done)return n(x,oe),He&&er(x,de),te;if(oe===null){for(;!xe.done;de++,xe=P.next())xe=A(x,xe.value,B),xe!==null&&(w=o(xe,w,de),ie===null?te=xe:ie.sibling=xe,ie=xe);return He&&er(x,de),te}for(oe=r(x,oe);!xe.done;de++,xe=P.next())xe=X(oe,x,de,xe.value,B),xe!==null&&(e&&xe.alternate!==null&&oe.delete(xe.key===null?de:xe.key),w=o(xe,w,de),ie===null?te=xe:ie.sibling=xe,ie=xe);return e&&oe.forEach(function(fp){return t(x,fp)}),He&&er(x,de),te}function Xe(x,w,P,B){if(typeof P=="object"&&P!==null&&P.type===fe&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case se:e:{for(var te=P.key,ie=w;ie!==null;){if(ie.key===te){if(te=P.type,te===fe){if(ie.tag===7){n(x,ie.sibling),w=l(ie,P.props.children),w.return=x,x=w;break e}}else if(ie.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===Ee&&ss(te)===ie.type){n(x,ie.sibling),w=l(ie,P.props),w.ref=vl(x,ie,P),w.return=x,x=w;break e}n(x,ie);break}else t(x,ie);ie=ie.sibling}P.type===fe?(w=ar(P.props.children,x.mode,B,P.key),w.return=x,x=w):(B=Vi(P.type,P.key,P.props,null,x.mode,B),B.ref=vl(x,w,P),B.return=x,x=B)}return s(x);case C:e:{for(ie=P.key;w!==null;){if(w.key===ie)if(w.tag===4&&w.stateNode.containerInfo===P.containerInfo&&w.stateNode.implementation===P.implementation){n(x,w.sibling),w=l(w,P.children||[]),w.return=x,x=w;break e}else{n(x,w);break}else t(x,w);w=w.sibling}w=Uu(P,x.mode,B),w.return=x,x=w}return s(x);case Ee:return ie=P._init,Xe(x,w,ie(P._payload),B)}if(Wn(P))return Z(x,w,P,B);if(re(P))return ee(x,w,P,B);wi(x,P)}return typeof P=="string"&&P!==""||typeof P=="number"?(P=""+P,w!==null&&w.tag===6?(n(x,w.sibling),w=l(w,P),w.return=x,x=w):(n(x,w),w=Iu(P,x.mode,B),w.return=x,x=w),s(x)):n(x,w)}return Xe}var Fr=fs(!0),cs=fs(!1),Si=_n(null),Ei=null,Or=null,Ko=null;function Yo(){Ko=Or=Ei=null}function Xo(e){var t=Si.current;Ae(Si),e._currentValue=t}function Go(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ir(e,t){Ei=e,Ko=Or=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gt=!0),e.firstContext=null)}function zt(e){var t=e._currentValue;if(Ko!==e)if(e={context:e,memoizedValue:t,next:null},Or===null){if(Ei===null)throw Error(a(308));Or=e,Ei.dependencies={lanes:0,firstContext:e}}else Or=Or.next=e;return t}var tr=null;function Jo(e){tr===null?tr=[e]:tr.push(e)}function ds(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Jo(t)):(n.next=l.next,l.next=n),t.interleaved=n,fn(e,r)}function fn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Dn=!1;function Zo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ps(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function cn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ke&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,fn(e,n)}return l=r.interleaved,l===null?(t.next=t,Jo(r)):(t.next=l.next,l.next=t),r.interleaved=t,fn(e,n)}function ki(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,fo(e,n)}}function hs(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function xi(e,t,n,r){var l=e.updateQueue;Dn=!1;var o=l.firstBaseUpdate,s=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var h=p,R=h.next;h.next=null,s===null?o=R:s.next=R,s=h;var U=e.alternate;U!==null&&(U=U.updateQueue,p=U.lastBaseUpdate,p!==s&&(p===null?U.firstBaseUpdate=R:p.next=R,U.lastBaseUpdate=h))}if(o!==null){var A=l.baseState;s=0,U=R=h=null,p=o;do{var I=p.lane,X=p.eventTime;if((r&I)===I){U!==null&&(U=U.next={eventTime:X,lane:0,tag:p.tag,payload:p.payload,callback:p.callback,next:null});e:{var Z=e,ee=p;switch(I=t,X=n,ee.tag){case 1:if(Z=ee.payload,typeof Z=="function"){A=Z.call(X,A,I);break e}A=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=ee.payload,I=typeof Z=="function"?Z.call(X,A,I):Z,I==null)break e;A=K({},A,I);break e;case 2:Dn=!0}}p.callback!==null&&p.lane!==0&&(e.flags|=64,I=l.effects,I===null?l.effects=[p]:I.push(p))}else X={eventTime:X,lane:I,tag:p.tag,payload:p.payload,callback:p.callback,next:null},U===null?(R=U=X,h=A):U=U.next=X,s|=I;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;I=p,p=I.next,I.next=null,l.lastBaseUpdate=I,l.shared.pending=null}}while(!0);if(U===null&&(h=A),l.baseState=h,l.firstBaseUpdate=R,l.lastBaseUpdate=U,t=l.shared.interleaved,t!==null){l=t;do s|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);lr|=s,e.lanes=s,e.memoizedState=A}}function ms(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=nu.transition;nu.transition={};try{e(!1),t()}finally{Te=n,nu.transition=r}}function Fs(){return Ft().memoizedState}function Fd(e,t,n){var r=In(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Os(e))Is(t,n);else if(n=ds(e,t,n,r),n!==null){var l=ht();Yt(n,e,r,l),Us(n,t,r)}}function Od(e,t,n){var r=In(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Os(e))Is(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,p=o(s,n);if(l.hasEagerState=!0,l.eagerState=p,Bt(p,s)){var h=t.interleaved;h===null?(l.next=l,Jo(t)):(l.next=h.next,h.next=l),t.interleaved=l;return}}catch{}finally{}n=ds(e,t,l,r),n!==null&&(l=ht(),Yt(n,e,r,l),Us(n,t,r))}}function Os(e){var t=e.alternate;return e===We||t!==null&&t===We}function Is(e,t){El=Ri=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,fo(e,n)}}var Ti={readContext:zt,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useInsertionEffect:st,useLayoutEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useMutableSource:st,useSyncExternalStore:st,useId:st,unstable_isNewReconciler:!1},Id={readContext:zt,useCallback:function(e,t){return bt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Rs,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Li(4194308,4,Ts.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Li(4194308,4,e,t)},useInsertionEffect:function(e,t){return Li(4,2,e,t)},useMemo:function(e,t){var n=bt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Fd.bind(null,We,e),[r.memoizedState,e]},useRef:function(e){var t=bt();return e={current:e},t.memoizedState=e},useState:Cs,useDebugValue:su,useDeferredValue:function(e){return bt().memoizedState=e},useTransition:function(){var e=Cs(!1),t=e[0];return e=zd.bind(null,e[1]),bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=We,l=bt();if(He){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),tt===null)throw Error(a(349));rr&30||ws(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Rs(Es.bind(null,r,o,e),[e]),r.flags|=2048,Cl(9,Ss.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=bt(),t=tt.identifierPrefix;if(He){var n=sn,r=an;n=(r&~(1<<32-Ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=kl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Zt]=t,e[ml]=r,rf(e,t,!1,!1),t.stateNode=e;e:{switch(s=yn(n,r),n){case"dialog":$e("cancel",e),$e("close",e),l=r;break;case"iframe":case"object":case"embed":$e("load",e),l=r;break;case"video":case"audio":for(l=0;lHr&&(t.flags|=128,r=!0,Pl(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ci(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Pl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!He)return ft(t),null}else 2*Le()-o.renderingStartTime>Hr&&n!==1073741824&&(t.flags|=128,r=!0,Pl(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Le(),t.sibling=null,n=Ve.current,Ie(Ve,r?n&1|2:n&1),t):(ft(t),null);case 22:case 23:return zu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_t&1073741824&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function Wd(e,t){switch(Bo(t),t.tag){case 1:return vt(t.type)&&pi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ur(),Ae(yt),Ae(at),tu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bo(t),null;case 13:if(Ae(Ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(Ve),null;case 4:return Ur(),null;case 10:return Xo(t.type._context),null;case 22:case 23:return zu(),null;case 24:return null;default:return null}}var zi=!1,ct=!1,Qd=typeof WeakSet=="function"?WeakSet:Set,J=null;function $r(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function Eu(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var uf=!1;function Kd(e,t){if(zo=bl,e=ja(),Po(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,p=-1,h=-1,R=0,U=0,A=e,I=null;t:for(;;){for(var X;A!==n||l!==0&&A.nodeType!==3||(p=s+l),A!==o||r!==0&&A.nodeType!==3||(h=s+r),A.nodeType===3&&(s+=A.nodeValue.length),(X=A.firstChild)!==null;)I=A,A=X;for(;;){if(A===e)break t;if(I===n&&++R===l&&(p=s),I===o&&++U===r&&(h=s),(X=A.nextSibling)!==null)break;A=I,I=A.parentNode}A=X}n=p===-1||h===-1?null:{start:p,end:h}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fo={focusedElem:e,selectionRange:n},bl=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var Z=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Z!==null){var ee=Z.memoizedProps,Xe=Z.memoizedState,x=t.stateNode,w=x.getSnapshotBeforeUpdate(t.elementType===t.type?ee:Wt(t.type,ee),Xe);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var P=t.stateNode.containerInfo;P.nodeType===1?P.textContent="":P.nodeType===9&&P.documentElement&&P.removeChild(P.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(B){Qe(t,t.return,B)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return Z=uf,uf=!1,Z}function Rl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Eu(t,n,o)}l=l.next}while(l!==r)}}function Fi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ku(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function af(e){var t=e.alternate;t!==null&&(e.alternate=null,af(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zt],delete t[ml],delete t[jo],delete t[_d],delete t[Td])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sf(e){return e.tag===5||e.tag===3||e.tag===4}function ff(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ci));else if(r!==4&&(e=e.child,e!==null))for(xu(e,t,n),e=e.sibling;e!==null;)xu(e,t,n),e=e.sibling}function Cu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Cu(e,t,n),e=e.sibling;e!==null;)Cu(e,t,n),e=e.sibling}var lt=null,Qt=!1;function zn(e,t,n){for(n=n.child;n!==null;)cf(e,t,n),n=n.sibling}function cf(e,t,n){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(je,n)}catch{}switch(n.tag){case 5:ct||$r(n,t);case 6:var r=lt,l=Qt;lt=null,zn(e,t,n),lt=r,Qt=l,lt!==null&&(Qt?(e=lt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):lt.removeChild(n.stateNode));break;case 18:lt!==null&&(Qt?(e=lt,n=n.stateNode,e.nodeType===8?Uo(e.parentNode,n):e.nodeType===1&&Uo(e,n),ll(e)):Uo(lt,n.stateNode));break;case 4:r=lt,l=Qt,lt=n.stateNode.containerInfo,Qt=!0,zn(e,t,n),lt=r,Qt=l;break;case 0:case 11:case 14:case 15:if(!ct&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Eu(n,t,s),l=l.next}while(l!==r)}zn(e,t,n);break;case 1:if(!ct&&($r(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(p){Qe(n,t,p)}zn(e,t,n);break;case 21:zn(e,t,n);break;case 22:n.mode&1?(ct=(r=ct)||n.memoizedState!==null,zn(e,t,n),ct=r):zn(e,t,n);break;default:zn(e,t,n)}}function df(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Qd),t.forEach(function(r){var l=tp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Kt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=s),r&=~o}if(r=l,r=Le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xd(r/1960))-r,10e?16:e,On===null)var r=!1;else{if(e=On,On=null,$i=0,ke&6)throw Error(a(331));var l=ke;for(ke|=4,J=e.current;J!==null;){var o=J,s=o.child;if(J.flags&16){var p=o.deletions;if(p!==null){for(var h=0;hLe()-Lu?or(e,0):Ru|=n),St(e,t)}function Pf(e,t){t===0&&(e.mode&1?(t=Gl,Gl<<=1,!(Gl&130023424)&&(Gl=4194304)):t=1);var n=ht();e=fn(e,t),e!==null&&(br(e,t,n),St(e,n))}function ep(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Pf(e,n)}function tp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}r!==null&&r.delete(t),Pf(e,n)}var Rf;Rf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yt.current)gt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gt=!1,Bd(e,t,n);gt=!!(e.flags&131072)}else gt=!1,He&&t.flags&1048576&&ls(t,vi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Mi(e,t),e=t.pendingProps;var l=Nr(t,at.current);Ir(t,n),l=lu(null,t,r,e,l,n);var o=iu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vt(r)?(o=!0,hi(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Zo(t),l.updater=Ni,t.stateNode=l,l._reactInternals=t,cu(t,r,e,n),t=mu(null,t,r,!0,o,n)):(t.tag=0,He&&o&&Ho(t),pt(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Mi(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=rp(r),e=Wt(r,e),l){case 0:t=hu(null,t,r,e,n);break e;case 1:t=Zs(null,t,r,e,n);break e;case 11:t=Ks(null,t,r,e,n);break e;case 14:t=Ys(null,t,r,Wt(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Wt(r,l),hu(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Wt(r,l),Zs(e,t,r,l,n);case 3:e:{if(qs(t),e===null)throw Error(a(387));r=t.pendingProps,o=t.memoizedState,l=o.element,ps(e,t),xi(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=jr(Error(a(423)),t),t=bs(e,t,r,n,l);break e}else if(r!==l){l=jr(Error(a(424)),t),t=bs(e,t,r,n,l);break e}else for(Lt=Ln(t.stateNode.containerInfo.firstChild),Rt=t,He=!0,Vt=null,n=cs(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zr(),r===l){t=dn(e,t,n);break e}pt(e,t,r,n)}t=t.child}return t;case 5:return ys(t),e===null&&Wo(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,s=l.children,Oo(r,l)?s=null:o!==null&&Oo(r,o)&&(t.flags|=32),Js(e,t),pt(e,t,s,n),t.child;case 6:return e===null&&Wo(t),null;case 13:return ef(e,t,n);case 4:return qo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fr(t,null,r,n):pt(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Wt(r,l),Ks(e,t,r,l,n);case 7:return pt(e,t,t.pendingProps,n),t.child;case 8:return pt(e,t,t.pendingProps.children,n),t.child;case 12:return pt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,s=l.value,Ie(Si,r._currentValue),r._currentValue=s,o!==null)if(Bt(o.value,s)){if(o.children===l.children&&!yt.current){t=dn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var p=o.dependencies;if(p!==null){s=o.child;for(var h=p.firstContext;h!==null;){if(h.context===r){if(o.tag===1){h=cn(-1,n&-n),h.tag=2;var R=o.updateQueue;if(R!==null){R=R.shared;var U=R.pending;U===null?h.next=h:(h.next=U.next,U.next=h),R.pending=h}}o.lanes|=n,h=o.alternate,h!==null&&(h.lanes|=n),Go(o.return,n,t),p.lanes|=n;break}h=h.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(a(341));s.lanes|=n,p=s.alternate,p!==null&&(p.lanes|=n),Go(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}pt(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Ir(t,n),l=zt(l),r=r(l),t.flags|=1,pt(e,t,r,n),t.child;case 14:return r=t.type,l=Wt(r,t.pendingProps),l=Wt(r.type,l),Ys(e,t,r,l,n);case 15:return Xs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Wt(r,l),Mi(e,t),t.tag=1,vt(r)?(e=!0,hi(t)):e=!1,Ir(t,n),$s(t,r,l),cu(t,r,l,n),mu(null,t,r,!0,e,n);case 19:return nf(e,t,n);case 22:return Gs(e,t,n)}throw Error(a(156,t.tag))};function Lf(e,t){return Nt(e,t)}function np(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,n,r){return new np(e,t,n,r)}function Ou(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rp(e){if(typeof e=="function")return Ou(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ut)return 11;if(e===dt)return 14}return 2}function jn(e,t){var n=e.alternate;return n===null?(n=It(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vi(e,t,n,r,l,o){var s=2;if(r=e,typeof e=="function")Ou(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case fe:return ar(n.children,l,o,t);case me:s=8,l|=8;break;case ce:return e=It(12,n,t,l|2),e.elementType=ce,e.lanes=o,e;case be:return e=It(13,n,t,l),e.elementType=be,e.lanes=o,e;case Je:return e=It(19,n,t,l),e.elementType=Je,e.lanes=o,e;case Me:return Wi(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ce:s=10;break e;case Be:s=9;break e;case ut:s=11;break e;case dt:s=14;break e;case Ee:s=16,r=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=It(s,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function ar(e,t,n,r){return e=It(7,e,r,t),e.lanes=n,e}function Wi(e,t,n,r){return e=It(22,e,r,t),e.elementType=Me,e.lanes=n,e.stateNode={isHidden:!1},e}function Iu(e,t,n){return e=It(6,e,null,t),e.lanes=n,e}function Uu(e,t,n){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=so(0),this.expirationTimes=so(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=so(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function ju(e,t,n,r,l,o,s,p,h){return e=new lp(e,t,n,p,h),t===1?(t=1,o===!0&&(t|=8)):t=0,o=It(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zo(o),e}function ip(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(u){console.error(u)}}return i(),Vu.exports=yp(),Vu.exports}var Dl={},$f;function gp(){if($f)return Dl;$f=1,Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.parse=y,Dl.serialize=S;const i=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,u=/^[\u0021-\u003A\u003C-\u007E]*$/,a=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,c=/^[\u0020-\u003A\u003D-\u007E]*$/,f=Object.prototype.toString,d=(()=>{const T=function(){};return T.prototype=Object.create(null),T})();function y(T,N){const M=new d,H=T.length;if(H<2)return M;const O=(N==null?void 0:N.decode)||D;let j=0;do{const V=T.indexOf("=",j);if(V===-1)break;const b=T.indexOf(";",j),le=b===-1?H:b;if(V>le){j=T.lastIndexOf(";",V-1)+1;continue}const se=v(T,j,V),C=g(T,V,se),fe=T.slice(se,C);if(M[fe]===void 0){let me=v(T,V+1,le),ce=g(T,le,me);const Ce=O(T.slice(me,ce));M[fe]=Ce}j=le+1}while(jM;){const H=T.charCodeAt(--N);if(H!==32&&H!==9)return N+1}return M}function S(T,N,M){const H=(M==null?void 0:M.encode)||encodeURIComponent;if(!i.test(T))throw new TypeError(`argument name is invalid: ${T}`);const O=H(N);if(!u.test(O))throw new TypeError(`argument val is invalid: ${N}`);let j=T+"="+O;if(!M)return j;if(M.maxAge!==void 0){if(!Number.isInteger(M.maxAge))throw new TypeError(`option maxAge is invalid: ${M.maxAge}`);j+="; Max-Age="+M.maxAge}if(M.domain){if(!a.test(M.domain))throw new TypeError(`option domain is invalid: ${M.domain}`);j+="; Domain="+M.domain}if(M.path){if(!c.test(M.path))throw new TypeError(`option path is invalid: ${M.path}`);j+="; Path="+M.path}if(M.expires){if(!z(M.expires)||!Number.isFinite(M.expires.valueOf()))throw new TypeError(`option expires is invalid: ${M.expires}`);j+="; Expires="+M.expires.toUTCString()}if(M.httpOnly&&(j+="; HttpOnly"),M.secure&&(j+="; Secure"),M.partitioned&&(j+="; Partitioned"),M.priority)switch(typeof M.priority=="string"?M.priority.toLowerCase():void 0){case"low":j+="; Priority=Low";break;case"medium":j+="; Priority=Medium";break;case"high":j+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${M.priority}`)}if(M.sameSite)switch(typeof M.sameSite=="string"?M.sameSite.toLowerCase():M.sameSite){case!0:case"strict":j+="; SameSite=Strict";break;case"lax":j+="; SameSite=Lax";break;case"none":j+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${M.sameSite}`)}return j}function D(T){if(T.indexOf("%")===-1)return T;try{return decodeURIComponent(T)}catch{return T}}function z(T){return f.call(T)==="[object Date]"}return Dl}gp();/** * react-router v7.1.5 * * 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 Af="popstate";function wp(i={}){function u(c,f){let{pathname:d,search:y,hash:v}=c.location;return Il("",{pathname:d,search:y,hash:v},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function a(c,f){return typeof f=="string"?f:Bn(f)}return Ep(u,a,null,i)}function Se(i,u){if(i===!1||i===null||typeof i>"u")throw new Error(u)}function ot(i,u){if(!i){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Sp(){return Math.random().toString(36).substring(2,10)}function Hf(i,u){return{usr:i.state,key:i.key,idx:u}}function Il(i,u,a=null,c){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof u=="string"?Vn(u):u,state:a,key:u&&u.key||c||Sp()}}function Bn({pathname:i="/",search:u="",hash:a=""}){return u&&u!=="?"&&(i+=u.charAt(0)==="?"?u:"?"+u),a&&a!=="#"&&(i+=a.charAt(0)==="#"?a:"#"+a),i}function Vn(i){let u={};if(i){let a=i.indexOf("#");a>=0&&(u.hash=i.substring(a),i=i.substring(0,a));let c=i.indexOf("?");c>=0&&(u.search=i.substring(c),i=i.substring(0,c)),i&&(u.pathname=i)}return u}function Ep(i,u,a,c={}){let{window:f=document.defaultView,v5Compat:d=!1}=c,y=f.history,v="POP",g=null,S=D();S==null&&(S=0,y.replaceState({...y.state,idx:S},""));function D(){return(y.state||{idx:null}).idx}function z(){v="POP";let O=D(),j=O==null?null:O-S;S=O,g&&g({action:v,location:H.location,delta:j})}function T(O,j){v="PUSH";let V=Il(H.location,O,j);S=D()+1;let b=Hf(V,S),le=H.createHref(V);try{y.pushState(b,"",le)}catch(se){if(se instanceof DOMException&&se.name==="DataCloneError")throw se;f.location.assign(le)}d&&g&&g({action:v,location:H.location,delta:1})}function N(O,j){v="REPLACE";let V=Il(H.location,O,j);S=D();let b=Hf(V,S),le=H.createHref(V);y.replaceState(b,"",le),d&&g&&g({action:v,location:H.location,delta:0})}function M(O){let j=f.location.origin!=="null"?f.location.origin:f.location.href,V=typeof O=="string"?O:Bn(O);return V=V.replace(/ $/,"%20"),Se(j,`No window.location.(origin|href) available to create URL for href: ${V}`),new URL(V,j)}let H={get action(){return v},get location(){return i(f,y)},listen(O){if(g)throw new Error("A history only accepts one active listener");return f.addEventListener(Af,z),g=O,()=>{f.removeEventListener(Af,z),g=null}},createHref(O){return u(f,O)},createURL:M,encodeLocation(O){let j=M(O);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:T,replace:N,go(O){return y.go(O)}};return H}var kp=new Set(["lazy","caseSensitive","path","id","index","children"]);function xp(i){return i.index===!0}function no(i,u,a=[],c={}){return i.map((f,d)=>{let y=[...a,String(d)],v=typeof f.id=="string"?f.id:y.join("-");if(Se(f.index!==!0||!f.children,"Cannot specify children on an index route"),Se(!c[v],`Found a route id collision on id "${v}". Route id's must be globally unique within Data Router usages`),xp(f)){let g={...f,...u(f),id:v};return c[v]=g,g}else{let g={...f,...u(f),id:v,children:void 0};return c[v]=g,f.children&&(g.children=no(f.children,u,y,c)),g}})}function Hn(i,u,a="/"){return bi(i,u,a,!1)}function bi(i,u,a,c){let f=typeof u=="string"?Vn(u):u,d=Gt(f.pathname||"/",a);if(d==null)return null;let y=ac(i);Pp(y);let v=null;for(let g=0;v==null&&g{let g={relativePath:v===void 0?d.path||"":v,caseSensitive:d.caseSensitive===!0,childrenIndex:y,route:d};g.relativePath.startsWith("/")&&(Se(g.relativePath.startsWith(c),`Absolute route path "${g.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(c.length));let S=tn([c,g.relativePath]),D=a.concat(g);d.children&&d.children.length>0&&(Se(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),ac(d.children,u,D,S)),!(d.path==null&&!d.index)&&u.push({path:S,score:Mp(S,d.index),routesMeta:D})};return i.forEach((d,y)=>{var v;if(d.path===""||!((v=d.path)!=null&&v.includes("?")))f(d,y);else for(let g of sc(d.path))f(d,y,g)}),u}function sc(i){let u=i.split("/");if(u.length===0)return[];let[a,...c]=u,f=a.endsWith("?"),d=a.replace(/\?$/,"");if(c.length===0)return f?[d,""]:[d];let y=sc(c.join("/")),v=[];return v.push(...y.map(g=>g===""?d:[d,g].join("/"))),f&&v.push(...y),v.map(g=>i.startsWith("/")&&g===""?"/":g)}function Pp(i){i.sort((u,a)=>u.score!==a.score?a.score-u.score:zp(u.routesMeta.map(c=>c.childrenIndex),a.routesMeta.map(c=>c.childrenIndex)))}var Rp=/^:[\w-]+$/,Lp=3,_p=2,Tp=1,Np=10,Dp=-2,Bf=i=>i==="*";function Mp(i,u){let a=i.split("/"),c=a.length;return a.some(Bf)&&(c+=Dp),u&&(c+=_p),a.filter(f=>!Bf(f)).reduce((f,d)=>f+(Rp.test(d)?Lp:d===""?Tp:Np),c)}function zp(i,u){return i.length===u.length&&i.slice(0,-1).every((c,f)=>c===u[f])?i[i.length-1]-u[u.length-1]:0}function Fp(i,u,a=!1){let{routesMeta:c}=i,f={},d="/",y=[];for(let v=0;v{if(D==="*"){let M=v[T]||"";y=d.slice(0,d.length-M.length).replace(/(.)\/+$/,"$1")}const N=v[T];return z&&!N?S[D]=void 0:S[D]=(N||"").replace(/%2F/g,"/"),S},{}),pathname:d,pathnameBase:y,pattern:i}}function Op(i,u=!1,a=!0){ot(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let c=[],f="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(y,v,g)=>(c.push({paramName:v,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return i.endsWith("*")?(c.push({paramName:"*"}),f+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?f+="\\/*$":i!==""&&i!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,u?void 0:"i"),c]}function Ip(i){try{return i.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return ot(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),i}}function Gt(i,u){if(u==="/")return i;if(!i.toLowerCase().startsWith(u.toLowerCase()))return null;let a=u.endsWith("/")?u.length-1:u.length,c=i.charAt(a);return c&&c!=="/"?null:i.slice(a)||"/"}function Up(i,u="/"){let{pathname:a,search:c="",hash:f=""}=typeof i=="string"?Vn(i):i;return{pathname:a?a.startsWith("/")?a:jp(a,u):u,search:Ap(c),hash:Hp(f)}}function jp(i,u){let a=u.replace(/\/+$/,"").split("/");return i.split("/").forEach(f=>{f===".."?a.length>1&&a.pop():f!=="."&&a.push(f)}),a.length>1?a.join("/"):"/"}function Ku(i,u,a,c){return`Cannot include a '${i}' character in a manually specified \`to.${u}\` field [${JSON.stringify(c)}]. 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 fc(i){return i.filter((u,a)=>a===0||u.route.path&&u.route.path.length>0)}function bu(i){let u=fc(i);return u.map((a,c)=>c===u.length-1?a.pathname:a.pathnameBase)}function ea(i,u,a,c=!1){let f;typeof i=="string"?f=Vn(i):(f={...i},Se(!f.pathname||!f.pathname.includes("?"),Ku("?","pathname","search",f)),Se(!f.pathname||!f.pathname.includes("#"),Ku("#","pathname","hash",f)),Se(!f.search||!f.search.includes("#"),Ku("#","search","hash",f)));let d=i===""||f.pathname==="",y=d?"/":f.pathname,v;if(y==null)v=a;else{let z=u.length-1;if(!c&&y.startsWith("..")){let T=y.split("/");for(;T[0]==="..";)T.shift(),z-=1;f.pathname=T.join("/")}v=z>=0?u[z]:"/"}let g=Up(f,v),S=y&&y!=="/"&&y.endsWith("/"),D=(d||y===".")&&a.endsWith("/");return!g.pathname.endsWith("/")&&(S||D)&&(g.pathname+="/"),g}var tn=i=>i.join("/").replace(/\/\/+/g,"/"),$p=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),Ap=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Hp=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,lo=class{constructor(i,u,a,c=!1){this.status=i,this.statusText=u||"",this.internal=c,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function Ul(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}var cc=["POST","PUT","PATCH","DELETE"],Bp=new Set(cc),Vp=["GET",...cc],Wp=new Set(Vp),Qp=new Set([301,302,303,307,308]),Kp=new Set([307,308]),Yu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Yp={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ml={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xp=i=>({hasErrorBoundary:!!i.hasErrorBoundary}),dc="remix-router-transitions",pc=Symbol("ResetLoaderData");function Gp(i){const u=i.window?i.window:typeof window<"u"?window:void 0,a=typeof u<"u"&&typeof u.document<"u"&&typeof u.document.createElement<"u";Se(i.routes.length>0,"You must provide a non-empty routes array to createRouter");let c=i.mapRouteProperties||Xp,f={},d=no(i.routes,c,void 0,f),y,v=i.basename||"/",g=i.dataStrategy||eh,S=i.patchRoutesOnNavigation,D={...i.future},z=null,T=new Set,N=null,M=null,H=null,O=i.hydrationData!=null,j=Hn(d,i.history.location,v),V=!1,b=null;if(j==null&&!S){let m=Ut(404,{pathname:i.history.location.pathname}),{matches:k,route:L}=bf(d);j=k,b={[L.id]:m}}j&&!i.hydrationData&&Xn(j,d,i.history.location.pathname).active&&(j=null);let le;if(j)if(j.some(m=>m.route.lazy))le=!1;else if(!j.some(m=>m.route.loader))le=!0;else{let m=i.hydrationData?i.hydrationData.loaderData:null,k=i.hydrationData?i.hydrationData.errors:null;if(k){let L=j.findIndex($=>k[$.route.id]!==void 0);le=j.slice(0,L+1).every($=>!Zu($.route,m,k))}else le=j.every(L=>!Zu(L.route,m,k))}else{le=!1,j=[];let m=Xn(null,d,i.history.location.pathname);m.active&&m.matches&&(V=!0,j=m.matches)}let se,C={historyAction:i.history.action,location:i.history.location,matches:j,initialized:le,navigation:Yu,restoreScrollPosition:i.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:i.hydrationData&&i.hydrationData.loaderData||{},actionData:i.hydrationData&&i.hydrationData.actionData||null,errors:i.hydrationData&&i.hydrationData.errors||b,fetchers:new Map,blockers:new Map},fe="POP",me=!1,ce,Ce=!1,Be=new Map,ut=null,be=!1,Je=!1,dt=new Set,Ee=new Map,Me=0,W=-1,re=new Map,K=new Set,E=new Map,F=new Map,ae=new Set,pe=new Map,we,ye=null;function Ne(){if(z=i.history.listen(({action:m,location:k,delta:L})=>{if(we){we(),we=void 0;return}ot(pe.size===0||L!=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 $=gr({currentLocation:C.location,nextLocation:k,historyAction:m});if($&&L!=null){let Y=new Promise(ne=>{we=ne});i.history.go(L*-1),yn($,{state:"blocked",location:k,proceed(){yn($,{state:"proceeding",proceed:void 0,reset:void 0,location:k}),Y.then(()=>i.history.go(L))},reset(){let ne=new Map(C.blockers);ne.set($,Ml),Re({blockers:ne})}});return}return $t(m,k)}),a){ch(u,Be);let m=()=>dh(u,Be);u.addEventListener("pagehide",m),ut=()=>u.removeEventListener("pagehide",m)}return C.initialized||$t("POP",C.location,{initialHydration:!0}),se}function Pe(){z&&z(),ut&&ut(),T.clear(),ce&&ce.abort(),C.fetchers.forEach((m,k)=>yr(k)),C.blockers.forEach((m,k)=>vr(k))}function ze(m){return T.add(m),()=>T.delete(m)}function Re(m,k={}){C={...C,...m};let L=[],$=[];C.fetchers.forEach((Y,ne)=>{Y.state==="idle"&&(ae.has(ne)?L.push(ne):$.push(ne))}),ae.forEach(Y=>{!C.fetchers.has(Y)&&!Ee.has(Y)&&L.push(Y)}),[...T].forEach(Y=>Y(C,{deletedFetchers:L,viewTransitionOpts:k.viewTransitionOpts,flushSync:k.flushSync===!0})),L.forEach(Y=>yr(Y)),$.forEach(Y=>C.fetchers.delete(Y))}function jt(m,k,{flushSync:L}={}){var Q,he;let $=C.actionData!=null&&C.navigation.formMethod!=null&&Xt(C.navigation.formMethod)&&C.navigation.state==="loading"&&((Q=m.state)==null?void 0:Q._isRedirect)!==!0,Y;k.actionData?Object.keys(k.actionData).length>0?Y=k.actionData:Y=null:$?Y=C.actionData:Y=null;let ne=k.loaderData?Zf(C.loaderData,k.loaderData,k.matches||[],k.errors):C.loaderData,ue=C.blockers;ue.size>0&&(ue=new Map(ue),ue.forEach((ve,Fe)=>ue.set(Fe,Ml)));let G=me===!0||C.navigation.formMethod!=null&&Xt(C.navigation.formMethod)&&((he=m.state)==null?void 0:he._isRedirect)!==!0;y&&(d=y,y=void 0),be||fe==="POP"||(fe==="PUSH"?i.history.push(m,m.state):fe==="REPLACE"&&i.history.replace(m,m.state));let q;if(fe==="POP"){let ve=Be.get(C.location.pathname);ve&&ve.has(m.pathname)?q={currentLocation:C.location,nextLocation:m}:Be.has(m.pathname)&&(q={currentLocation:m,nextLocation:C.location})}else if(Ce){let ve=Be.get(C.location.pathname);ve?ve.add(m.pathname):(ve=new Set([m.pathname]),Be.set(C.location.pathname,ve)),q={currentLocation:C.location,nextLocation:m}}Re({...k,actionData:Y,loaderData:ne,historyAction:fe,location:m,initialized:!0,navigation:Yu,revalidation:"idle",restoreScrollPosition:Jr(m,k.matches||C.matches),preventScrollReset:G,blockers:ue},{viewTransitionOpts:q,flushSync:L===!0}),fe="POP",me=!1,Ce=!1,be=!1,Je=!1,ye==null||ye.resolve(),ye=null}async function Wr(m,k){if(typeof m=="number"){i.history.go(m);return}let L=Ju(C.location,C.matches,v,m,k==null?void 0:k.fromRouteId,k==null?void 0:k.relative),{path:$,submission:Y,error:ne}=Vf(!1,L,k),ue=C.location,G=Il(C.location,$,k&&k.state);G={...G,...i.history.encodeLocation(G)};let q=k&&k.replace!=null?k.replace:void 0,Q="PUSH";q===!0?Q="REPLACE":q===!1||Y!=null&&Xt(Y.formMethod)&&Y.formAction===C.location.pathname+C.location.search&&(Q="REPLACE");let he=k&&"preventScrollReset"in k?k.preventScrollReset===!0:void 0,ve=(k&&k.flushSync)===!0,Fe=gr({currentLocation:ue,nextLocation:G,historyAction:Q});if(Fe){yn(Fe,{state:"blocked",location:G,proceed(){yn(Fe,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),Wr(m,k)},reset(){let Ue=new Map(C.blockers);Ue.set(Fe,Ml),Re({blockers:Ue})}});return}await $t(Q,G,{submission:Y,pendingError:ne,preventScrollReset:he,replace:k&&k.replace,enableViewTransition:k&&k.viewTransition,flushSync:ve})}function pr(){ye||(ye=ph()),mr(),Re({revalidation:"loading"});let m=ye.promise;return C.navigation.state==="submitting"?m:C.navigation.state==="idle"?($t(C.historyAction,C.location,{startUninterruptedRevalidation:!0}),m):($t(fe||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:Ce===!0}),m)}async function $t(m,k,L){ce&&ce.abort(),ce=null,fe=m,be=(L&&L.startUninterruptedRevalidation)===!0,vn(C.location,C.matches),me=(L&&L.preventScrollReset)===!0,Ce=(L&&L.enableViewTransition)===!0;let $=y||d,Y=L&&L.overrideNavigation,ne=L!=null&&L.initialHydration&&C.matches&&C.matches.length>0&&!V?C.matches:Hn($,k,v),ue=(L&&L.flushSync)===!0;if(ne&&C.initialized&&!Je&&oh(C.location,k)&&!(L&&L.submission&&Xt(L.submission.formMethod))){jt(k,{matches:ne},{flushSync:ue});return}let G=Xn(ne,$,k.pathname);if(G.active&&G.matches&&(ne=G.matches),!ne){let{error:Oe,notFoundMatches:De,route:Ke}=Yn(k.pathname);jt(k,{matches:De,loaderData:{},errors:{[Ke.id]:Oe}},{flushSync:ue});return}ce=new AbortController;let q=Vr(i.history,k,ce.signal,L&&L.submission),Q;if(L&&L.pendingError)Q=[sr(ne).route.id,{type:"error",error:L.pendingError}];else if(L&&L.submission&&Xt(L.submission.formMethod)){let Oe=await Hl(q,k,L.submission,ne,G.active,{replace:L.replace,flushSync:ue});if(Oe.shortCircuited)return;if(Oe.pendingActionResult){let[De,Ke]=Oe.pendingActionResult;if(Tt(Ke)&&Ul(Ke.error)&&Ke.error.status===404){ce=null,jt(k,{matches:Oe.matches,loaderData:{},errors:{[De]:Ke.error}});return}}ne=Oe.matches||ne,Q=Oe.pendingActionResult,Y=Xu(k,L.submission),ue=!1,G.active=!1,q=Vr(i.history,q.url,q.signal)}let{shortCircuited:he,matches:ve,loaderData:Fe,errors:Ue}=await Bl(q,k,ne,G.active,Y,L&&L.submission,L&&L.fetcherSubmission,L&&L.replace,L&&L.initialHydration===!0,ue,Q);he||(ce=null,jt(k,{matches:ve||ne,...qf(Q),loaderData:Fe,errors:Ue}))}async function Hl(m,k,L,$,Y,ne={}){mr();let ue=sh(k,L);if(Re({navigation:ue},{flushSync:ne.flushSync===!0}),Y){let Q=await Gn($,k.pathname,m.signal);if(Q.type==="aborted")return{shortCircuited:!0};if(Q.type==="error"){let he=sr(Q.partialMatches).route.id;return{matches:Q.partialMatches,pendingActionResult:[he,{type:"error",error:Q.error}]}}else if(Q.matches)$=Q.matches;else{let{notFoundMatches:he,error:ve,route:Fe}=Yn(k.pathname);return{matches:he,pendingActionResult:[Fe.id,{type:"error",error:ve}]}}}let G,q=Ol($,k);if(!q.route.action&&!q.route.lazy)G={type:"error",error:Ut(405,{method:m.method,pathname:k.pathname,routeId:q.route.id})};else if(G=(await mn("action",C,m,[q],$,null))[q.route.id],m.signal.aborted)return{shortCircuited:!0};if(fr(G)){let Q;return ne&&ne.replace!=null?Q=ne.replace:Q=Xf(G.response.headers.get("Location"),new URL(m.url),v)===C.location.pathname+C.location.search,await At(m,G,!0,{submission:L,replace:Q}),{shortCircuited:!0}}if(Tt(G)){let Q=sr($,q.route.id);return(ne&&ne.replace)!==!0&&(fe="PUSH"),{matches:$,pendingActionResult:[Q.route.id,G]}}return{matches:$,pendingActionResult:[q.route.id,G]}}async function Bl(m,k,L,$,Y,ne,ue,G,q,Q,he){let ve=Y||Xu(k,ne),Fe=ne||ue||tc(ve),Ue=!be&&!q;if($){if(Ue){let Ye=hr(he);Re({navigation:ve,...Ye!==void 0?{actionData:Ye}:{}},{flushSync:Q})}let _e=await Gn(L,k.pathname,m.signal);if(_e.type==="aborted")return{shortCircuited:!0};if(_e.type==="error"){let Ye=sr(_e.partialMatches).route.id;return{matches:_e.partialMatches,loaderData:{},errors:{[Ye]:_e.error}}}else if(_e.matches)L=_e.matches;else{let{error:Ye,notFoundMatches:Sr,route:Sn}=Yn(k.pathname);return{matches:Sr,loaderData:{},errors:{[Sn.id]:Ye}}}}let Oe=y||d,[De,Ke]=Qf(i.history,C,L,Fe,k,q===!0,Je,dt,ae,E,K,Oe,v,he);if(W=++Me,De.length===0&&Ke.length===0){let _e=Yr();return jt(k,{matches:L,loaderData:{},errors:he&&Tt(he[1])?{[he[0]]:he[1].error}:null,...qf(he),..._e?{fetchers:new Map(C.fetchers)}:{}},{flushSync:Q}),{shortCircuited:!0}}if(Ue){let _e={};if(!$){_e.navigation=ve;let Ye=hr(he);Ye!==void 0&&(_e.actionData=Ye)}Ke.length>0&&(_e.fetchers=Vl(Ke)),Re(_e,{flushSync:Q})}Ke.forEach(_e=>{mt(_e.key),_e.controller&&Ee.set(_e.key,_e.controller)});let ln=()=>Ke.forEach(_e=>mt(_e.key));ce&&ce.signal.addEventListener("abort",ln);let{loaderResults:gn,fetcherResults:Nt}=await Kr(C,L,De,Ke,m);if(m.signal.aborted)return{shortCircuited:!0};ce&&ce.signal.removeEventListener("abort",ln),Ke.forEach(_e=>Ee.delete(_e.key));let xt=Zi(gn);if(xt)return await At(m,xt.result,!0,{replace:G}),{shortCircuited:!0};if(xt=Zi(Nt),xt)return K.add(xt.key),await At(m,xt.result,!0,{replace:G}),{shortCircuited:!0};let{loaderData:Zr,errors:Jn}=Jf(C,L,gn,he,Ke,Nt);q&&C.errors&&(Jn={...C.errors,...Jn});let Le=Yr(),wr=Xr(W),wn=Le||wr||Ke.length>0;return{matches:L,loaderData:Zr,errors:Jn,...wn?{fetchers:new Map(C.fetchers)}:{}}}function hr(m){if(m&&!Tt(m[1]))return{[m[0]]:m[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function Vl(m){return m.forEach(k=>{let L=C.fetchers.get(k.key),$=zl(void 0,L?L.data:void 0);C.fetchers.set(k.key,$)}),new Map(C.fetchers)}async function Qr(m,k,L,$){mt(m);let Y=($&&$.flushSync)===!0,ne=y||d,ue=Ju(C.location,C.matches,v,L,k,$==null?void 0:$.relative),G=Hn(ne,ue,v),q=Xn(G,ne,ue);if(q.active&&q.matches&&(G=q.matches),!G){kt(m,k,Ut(404,{pathname:ue}),{flushSync:Y});return}let{path:Q,submission:he,error:ve}=Vf(!0,ue,$);if(ve){kt(m,k,ve,{flushSync:Y});return}let Fe=Ol(G,Q),Ue=($&&$.preventScrollReset)===!0;if(he&&Xt(he.formMethod)){await Wn(m,k,Q,Fe,G,q.active,Y,Ue,he);return}E.set(m,{routeId:k,path:Q}),await hn(m,k,Q,Fe,G,q.active,Y,Ue,he)}async function Wn(m,k,L,$,Y,ne,ue,G,q){mr(),E.delete(m);function Q(je){if(!je.route.action&&!je.route.lazy){let rt=Ut(405,{method:q.formMethod,pathname:L,routeId:k});return kt(m,k,rt,{flushSync:ue}),!0}return!1}if(!ne&&Q($))return;let he=C.fetchers.get(m);Ht(m,fh(q,he),{flushSync:ue});let ve=new AbortController,Fe=Vr(i.history,L,ve.signal,q);if(ne){let je=await Gn(Y,L,Fe.signal);if(je.type==="aborted")return;if(je.type==="error"){kt(m,k,je.error,{flushSync:ue});return}else if(je.matches){if(Y=je.matches,$=Ol(Y,L),Q($))return}else{kt(m,k,Ut(404,{pathname:L}),{flushSync:ue});return}}Ee.set(m,ve);let Ue=Me,De=(await mn("action",C,Fe,[$],Y,m))[$.route.id];if(Fe.signal.aborted){Ee.get(m)===ve&&Ee.delete(m);return}if(ae.has(m)){if(fr(De)||Tt(De)){Ht(m,An(void 0));return}}else{if(fr(De))if(Ee.delete(m),W>Ue){Ht(m,An(void 0));return}else return K.add(m),Ht(m,zl(q)),At(Fe,De,!1,{fetcherSubmission:q,preventScrollReset:G});if(Tt(De)){kt(m,k,De.error);return}}let Ke=C.navigation.location||C.location,ln=Vr(i.history,Ke,ve.signal),gn=y||d,Nt=C.navigation.state!=="idle"?Hn(gn,C.navigation.location,v):C.matches;Se(Nt,"Didn't find any matches after fetcher action");let xt=++Me;re.set(m,xt);let Zr=zl(q,De.data);C.fetchers.set(m,Zr);let[Jn,Le]=Qf(i.history,C,Nt,q,Ke,!1,Je,dt,ae,E,K,gn,v,[$.route.id,De]);Le.filter(je=>je.key!==m).forEach(je=>{let rt=je.key,Yl=C.fetchers.get(rt),Ct=zl(void 0,Yl?Yl.data:void 0);C.fetchers.set(rt,Ct),mt(rt),je.controller&&Ee.set(rt,je.controller)}),Re({fetchers:new Map(C.fetchers)});let wr=()=>Le.forEach(je=>mt(je.key));ve.signal.addEventListener("abort",wr);let{loaderResults:wn,fetcherResults:_e}=await Kr(C,Nt,Jn,Le,ln);if(ve.signal.aborted)return;ve.signal.removeEventListener("abort",wr),re.delete(m),Ee.delete(m),Le.forEach(je=>Ee.delete(je.key));let Ye=Zi(wn);if(Ye)return At(ln,Ye.result,!1,{preventScrollReset:G});if(Ye=Zi(_e),Ye)return K.add(Ye.key),At(ln,Ye.result,!1,{preventScrollReset:G});let{loaderData:Sr,errors:Sn}=Jf(C,Nt,wn,void 0,Le,_e);if(C.fetchers.has(m)){let je=An(De.data);C.fetchers.set(m,je)}Xr(xt),C.navigation.state==="loading"&&xt>W?(Se(fe,"Expected pending action"),ce&&ce.abort(),jt(C.navigation.location,{matches:Nt,loaderData:Sr,errors:Sn,fetchers:new Map(C.fetchers)})):(Re({errors:Sn,loaderData:Zf(C.loaderData,Sr,Nt,Sn),fetchers:new Map(C.fetchers)}),Je=!1)}async function hn(m,k,L,$,Y,ne,ue,G,q){let Q=C.fetchers.get(m);Ht(m,zl(q,Q?Q.data:void 0),{flushSync:ue});let he=new AbortController,ve=Vr(i.history,L,he.signal);if(ne){let De=await Gn(Y,L,ve.signal);if(De.type==="aborted")return;if(De.type==="error"){kt(m,k,De.error,{flushSync:ue});return}else if(De.matches)Y=De.matches,$=Ol(Y,L);else{kt(m,k,Ut(404,{pathname:L}),{flushSync:ue});return}}Ee.set(m,he);let Fe=Me,Oe=(await mn("loader",C,ve,[$],Y,m))[$.route.id];if(Ee.get(m)===he&&Ee.delete(m),!ve.signal.aborted){if(ae.has(m)){Ht(m,An(void 0));return}if(fr(Oe))if(W>Fe){Ht(m,An(void 0));return}else{K.add(m),await At(ve,Oe,!1,{preventScrollReset:G});return}if(Tt(Oe)){kt(m,k,Oe.error);return}Ht(m,An(Oe.data))}}async function At(m,k,L,{submission:$,fetcherSubmission:Y,preventScrollReset:ne,replace:ue}={}){k.response.headers.has("X-Remix-Revalidate")&&(Je=!0);let G=k.response.headers.get("Location");Se(G,"Expected a Location header on the redirect Response"),G=Xf(G,new URL(m.url),v);let q=Il(C.location,G,{_isRedirect:!0});if(a){let Oe=!1;if(k.response.headers.has("X-Remix-Reload-Document"))Oe=!0;else if(ta.test(G)){const De=i.history.createURL(G);Oe=De.origin!==u.location.origin||Gt(De.pathname,v)==null}if(Oe){ue?u.location.replace(G):u.location.assign(G);return}}ce=null;let Q=ue===!0||k.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:he,formAction:ve,formEncType:Fe}=C.navigation;!$&&!Y&&he&&ve&&Fe&&($=tc(C.navigation));let Ue=$||Y;if(Kp.has(k.response.status)&&Ue&&Xt(Ue.formMethod))await $t(Q,q,{submission:{...Ue,formAction:G},preventScrollReset:ne||me,enableViewTransition:L?Ce:void 0});else{let Oe=Xu(q,$);await $t(Q,q,{overrideNavigation:Oe,fetcherSubmission:Y,preventScrollReset:ne||me,enableViewTransition:L?Ce:void 0})}}async function mn(m,k,L,$,Y,ne){let ue,G={};try{ue=await th(g,m,k,L,$,Y,ne,f,c)}catch(q){return $.forEach(Q=>{G[Q.route.id]={type:"error",error:q}}),G}for(let[q,Q]of Object.entries(ue))if(uh(Q)){let he=Q.result;G[q]={type:"redirect",response:lh(he,L,q,Y,v)}}else G[q]=await rh(Q);return G}async function Kr(m,k,L,$,Y){let ne=mn("loader",m,Y,L,k,null),ue=Promise.all($.map(async Q=>{if(Q.matches&&Q.match&&Q.controller){let ve=(await mn("loader",m,Vr(i.history,Q.path,Q.controller.signal),[Q.match],Q.matches,Q.key))[Q.match.route.id];return{[Q.key]:ve}}else return Promise.resolve({[Q.key]:{type:"error",error:Ut(404,{pathname:Q.path})}})})),G=await ne,q=(await ue).reduce((Q,he)=>Object.assign(Q,he),{});return{loaderResults:G,fetcherResults:q}}function mr(){Je=!0,E.forEach((m,k)=>{Ee.has(k)&&dt.add(k),mt(k)})}function Ht(m,k,L={}){C.fetchers.set(m,k),Re({fetchers:new Map(C.fetchers)},{flushSync:(L&&L.flushSync)===!0})}function kt(m,k,L,$={}){let Y=sr(C.matches,k);yr(m),Re({errors:{[Y.route.id]:L},fetchers:new Map(C.fetchers)},{flushSync:($&&$.flushSync)===!0})}function Qn(m){return F.set(m,(F.get(m)||0)+1),ae.has(m)&&ae.delete(m),C.fetchers.get(m)||Yp}function yr(m){let k=C.fetchers.get(m);Ee.has(m)&&!(k&&k.state==="loading"&&re.has(m))&&mt(m),E.delete(m),re.delete(m),K.delete(m),ae.delete(m),dt.delete(m),C.fetchers.delete(m)}function Kn(m){let k=(F.get(m)||0)-1;k<=0?(F.delete(m),ae.add(m)):F.set(m,k),Re({fetchers:new Map(C.fetchers)})}function mt(m){let k=Ee.get(m);k&&(k.abort(),Ee.delete(m))}function Wl(m){for(let k of m){let L=Qn(k),$=An(L.data);C.fetchers.set(k,$)}}function Yr(){let m=[],k=!1;for(let L of K){let $=C.fetchers.get(L);Se($,`Expected fetcher: ${L}`),$.state==="loading"&&(K.delete(L),m.push(L),k=!0)}return Wl(m),k}function Xr(m){let k=[];for(let[L,$]of re)if($0}function uo(m,k){let L=C.blockers.get(m)||Ml;return pe.get(m)!==k&&pe.set(m,k),L}function vr(m){C.blockers.delete(m),pe.delete(m)}function yn(m,k){let L=C.blockers.get(m)||Ml;Se(L.state==="unblocked"&&k.state==="blocked"||L.state==="blocked"&&k.state==="blocked"||L.state==="blocked"&&k.state==="proceeding"||L.state==="blocked"&&k.state==="unblocked"||L.state==="proceeding"&&k.state==="unblocked",`Invalid blocker state transition: ${L.state} -> ${k.state}`);let $=new Map(C.blockers);$.set(m,k),Re({blockers:$})}function gr({currentLocation:m,nextLocation:k,historyAction:L}){if(pe.size===0)return;pe.size>1&&ot(!1,"A router only supports one blocker at a time");let $=Array.from(pe.entries()),[Y,ne]=$[$.length-1],ue=C.blockers.get(Y);if(!(ue&&ue.state==="proceeding")&&ne({currentLocation:m,nextLocation:k,historyAction:L}))return Y}function Yn(m){let k=Ut(404,{pathname:m}),L=y||d,{matches:$,route:Y}=bf(L);return{notFoundMatches:$,route:Y,error:k}}function Gr(m,k,L){if(N=m,H=k,M=L||null,!O&&C.navigation===Yu){O=!0;let $=Jr(C.location,C.matches);$!=null&&Re({restoreScrollPosition:$})}return()=>{N=null,H=null,M=null}}function rn(m,k){return M&&M(m,k.map($=>Cp($,C.loaderData)))||m.key}function vn(m,k){if(N&&H){let L=rn(m,k);N[L]=H()}}function Jr(m,k){if(N){let L=rn(m,k),$=N[L];if(typeof $=="number")return $}return null}function Xn(m,k,L){if(S)if(m){if(Object.keys(m[0].params).length>0)return{active:!0,matches:bi(k,L,v,!0)}}else return{active:!0,matches:bi(k,L,v,!0)||[]};return{active:!1,matches:null}}async function Gn(m,k,L){if(!S)return{type:"success",matches:m};let $=m;for(;;){let Y=y==null,ne=y||d,ue=f;try{await S({path:k,matches:$,patch:(Q,he)=>{L.aborted||Yf(Q,he,ne,ue,c)}})}catch(Q){return{type:"error",error:Q,partialMatches:$}}finally{Y&&!L.aborted&&(d=[...d])}if(L.aborted)return{type:"aborted"};let G=Hn(ne,k,v);if(G)return{type:"success",matches:G};let q=bi(ne,k,v,!0);if(!q||$.length===q.length&&$.every((Q,he)=>Q.route.id===q[he].route.id))return{type:"success",matches:null};$=q}}function Ql(m){f={},y=no(m,c,void 0,f)}function Kl(m,k){let L=y==null;Yf(m,k,y||d,f,c),L&&(d=[...d],Re({}))}return se={get basename(){return v},get future(){return D},get state(){return C},get routes(){return d},get window(){return u},initialize:Ne,subscribe:ze,enableScrollRestoration:Gr,navigate:Wr,fetch:Qr,revalidate:pr,createHref:m=>i.history.createHref(m),encodeLocation:m=>i.history.encodeLocation(m),getFetcher:Qn,deleteFetcher:Kn,dispose:Pe,getBlocker:uo,deleteBlocker:vr,patchRoutes:Kl,_internalFetchControllers:Ee,_internalSetRoutes:Ql},se}function Jp(i){return i!=null&&("formData"in i&&i.formData!=null||"body"in i&&i.body!==void 0)}function Ju(i,u,a,c,f,d){let y,v;if(f){y=[];for(let S of u)if(y.push(S),S.route.id===f){v=S;break}}else y=u,v=u[u.length-1];let g=ea(c||".",bu(y),Gt(i.pathname,a)||i.pathname,d==="path");if(c==null&&(g.search=i.search,g.hash=i.hash),(c==null||c===""||c===".")&&v){let S=na(g.search);if(v.route.index&&!S)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!v.route.index&&S){let D=new URLSearchParams(g.search),z=D.getAll("index");D.delete("index"),z.filter(N=>N).forEach(N=>D.append("index",N));let T=D.toString();g.search=T?`?${T}`:""}}return a!=="/"&&(g.pathname=g.pathname==="/"?a:tn([a,g.pathname])),Bn(g)}function Vf(i,u,a){if(!a||!Jp(a))return{path:u};if(a.formMethod&&!ah(a.formMethod))return{path:u,error:Ut(405,{method:a.formMethod})};let c=()=>({path:u,error:Ut(400,{type:"invalid-body"})}),d=(a.formMethod||"get").toUpperCase(),y=mc(u);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Xt(d))return c();let z=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((T,[N,M])=>`${T}${N}=${M} `,""):String(a.body);return{path:u,submission:{formMethod:d,formAction:y,formEncType:a.formEncType,formData:void 0,json:void 0,text:z}}}else if(a.formEncType==="application/json"){if(!Xt(d))return c();try{let z=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:u,submission:{formMethod:d,formAction:y,formEncType:a.formEncType,formData:void 0,json:z,text:void 0}}}catch{return c()}}}Se(typeof FormData=="function","FormData is not available in this environment");let v,g;if(a.formData)v=qu(a.formData),g=a.formData;else if(a.body instanceof FormData)v=qu(a.body),g=a.body;else if(a.body instanceof URLSearchParams)v=a.body,g=Gf(v);else if(a.body==null)v=new URLSearchParams,g=new FormData;else try{v=new URLSearchParams(a.body),g=Gf(v)}catch{return c()}let S={formMethod:d,formAction:y,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Xt(S.formMethod))return{path:u,submission:S};let D=Vn(u);return i&&D.search&&na(D.search)&&v.append("index",""),D.search=`?${v}`,{path:Bn(D),submission:S}}function Wf(i,u,a=!1){let c=i.findIndex(f=>f.route.id===u);return c>=0?i.slice(0,a?c+1:c):i}function Qf(i,u,a,c,f,d,y,v,g,S,D,z,T,N){let M=N?Tt(N[1])?N[1].error:N[1].data:void 0,H=i.createURL(u.location),O=i.createURL(f),j=a;d&&u.errors?j=Wf(a,Object.keys(u.errors)[0],!0):N&&Tt(N[1])&&(j=Wf(a,N[0]));let V=N?N[1].statusCode:void 0,b=V&&V>=400,le=j.filter((C,fe)=>{let{route:me}=C;if(me.lazy)return!0;if(me.loader==null)return!1;if(d)return Zu(me,u.loaderData,u.errors);if(Zp(u.loaderData,u.matches[fe],C))return!0;let ce=u.matches[fe],Ce=C;return Kf(C,{currentUrl:H,currentParams:ce.params,nextUrl:O,nextParams:Ce.params,...c,actionResult:M,actionStatus:V,defaultShouldRevalidate:b?!1:y||H.pathname+H.search===O.pathname+O.search||H.search!==O.search||qp(ce,Ce)})}),se=[];return S.forEach((C,fe)=>{if(d||!a.some(ut=>ut.route.id===C.routeId)||g.has(fe))return;let me=Hn(z,C.path,T);if(!me){se.push({key:fe,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let ce=u.fetchers.get(fe),Ce=Ol(me,C.path),Be=!1;D.has(fe)?Be=!1:v.has(fe)?(v.delete(fe),Be=!0):ce&&ce.state!=="idle"&&ce.data===void 0?Be=y:Be=Kf(Ce,{currentUrl:H,currentParams:u.matches[u.matches.length-1].params,nextUrl:O,nextParams:a[a.length-1].params,...c,actionResult:M,actionStatus:V,defaultShouldRevalidate:b?!1:y}),Be&&se.push({key:fe,routeId:C.routeId,path:C.path,matches:me,match:Ce,controller:new AbortController})}),[le,se]}function Zu(i,u,a){if(i.lazy)return!0;if(!i.loader)return!1;let c=u!=null&&u[i.id]!==void 0,f=a!=null&&a[i.id]!==void 0;return!c&&f?!1:typeof i.loader=="function"&&i.loader.hydrate===!0?!0:!c&&!f}function Zp(i,u,a){let c=!u||a.route.id!==u.route.id,f=!i.hasOwnProperty(a.route.id);return c||f}function qp(i,u){let a=i.route.path;return i.pathname!==u.pathname||a!=null&&a.endsWith("*")&&i.params["*"]!==u.params["*"]}function Kf(i,u){if(i.route.shouldRevalidate){let a=i.route.shouldRevalidate(u);if(typeof a=="boolean")return a}return u.defaultShouldRevalidate}function Yf(i,u,a,c,f){let d;if(i){let g=c[i];Se(g,`No route found to patch children into: routeId = ${i}`),g.children||(g.children=[]),d=g.children}else d=a;let y=u.filter(g=>!d.some(S=>hc(g,S))),v=no(y,f,[i||"_","patch",String((d==null?void 0:d.length)||"0")],c);d.push(...v)}function hc(i,u){return"id"in i&&"id"in u&&i.id===u.id?!0:i.index===u.index&&i.path===u.path&&i.caseSensitive===u.caseSensitive?(!i.children||i.children.length===0)&&(!u.children||u.children.length===0)?!0:i.children.every((a,c)=>{var f;return(f=u.children)==null?void 0:f.some(d=>hc(a,d))}):!1}async function bp(i,u,a){if(!i.lazy)return;let c=await i.lazy();if(!i.lazy)return;let f=a[i.id];Se(f,"No route found in manifest");let d={};for(let y in c){let g=f[y]!==void 0&&y!=="hasErrorBoundary";ot(!g,`Route "${f.id}" has a static property "${y}" defined but its lazy function is also returning a value for this property. The lazy route property "${y}" will be ignored.`),!g&&!kp.has(y)&&(d[y]=c[y])}Object.assign(f,d),Object.assign(f,{...u(f),lazy:void 0})}async function eh({matches:i}){let u=i.filter(c=>c.shouldLoad);return(await Promise.all(u.map(c=>c.resolve()))).reduce((c,f,d)=>Object.assign(c,{[u[d].route.id]:f}),{})}async function th(i,u,a,c,f,d,y,v,g,S){let D=d.map(N=>N.route.lazy?bp(N.route,g,v):void 0),z=d.map((N,M)=>{let H=D[M],O=f.some(V=>V.route.id===N.route.id);return{...N,shouldLoad:O,resolve:async V=>(V&&c.method==="GET"&&(N.route.lazy||N.route.loader)&&(O=!0),O?nh(u,c,N,H,V,S):Promise.resolve({type:"data",result:void 0}))}}),T=await i({matches:z,request:c,params:d[0].params,fetcherKey:y,context:S});try{await Promise.all(D)}catch{}return T}async function nh(i,u,a,c,f,d){let y,v,g=S=>{let D,z=new Promise((M,H)=>D=H);v=()=>D(),u.signal.addEventListener("abort",v);let T=M=>typeof S!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${i}" [routeId: ${a.route.id}]`)):S({request:u,params:a.params,context:d},...M!==void 0?[M]:[]),N=(async()=>{try{return{type:"data",result:await(f?f(H=>T(H)):T())}}catch(M){return{type:"error",result:M}}})();return Promise.race([N,z])};try{let S=a.route[i];if(c)if(S){let D,[z]=await Promise.all([g(S).catch(T=>{D=T}),c]);if(D!==void 0)throw D;y=z}else if(await c,S=a.route[i],S)y=await g(S);else if(i==="action"){let D=new URL(u.url),z=D.pathname+D.search;throw Ut(405,{method:u.method,pathname:z,routeId:a.route.id})}else return{type:"data",result:void 0};else if(S)y=await g(S);else{let D=new URL(u.url),z=D.pathname+D.search;throw Ut(404,{pathname:z})}}catch(S){return{type:"error",result:S}}finally{v&&u.signal.removeEventListener("abort",v)}return y}async function rh(i){var c,f,d,y,v,g;let{result:u,type:a}=i;if(yc(u)){let S;try{let D=u.headers.get("Content-Type");D&&/\bapplication\/json\b/.test(D)?u.body==null?S=null:S=await u.json():S=await u.text()}catch(D){return{type:"error",error:D}}return a==="error"?{type:"error",error:new lo(u.status,u.statusText,S),statusCode:u.status,headers:u.headers}:{type:"data",data:S,statusCode:u.status,headers:u.headers}}return a==="error"?ec(u)?u.data instanceof Error?{type:"error",error:u.data,statusCode:(c=u.init)==null?void 0:c.status,headers:(f=u.init)!=null&&f.headers?new Headers(u.init.headers):void 0}:{type:"error",error:new lo(((d=u.init)==null?void 0:d.status)||500,void 0,u.data),statusCode:Ul(u)?u.status:void 0,headers:(y=u.init)!=null&&y.headers?new Headers(u.init.headers):void 0}:{type:"error",error:u,statusCode:Ul(u)?u.status:void 0}:ec(u)?{type:"data",data:u.data,statusCode:(v=u.init)==null?void 0:v.status,headers:(g=u.init)!=null&&g.headers?new Headers(u.init.headers):void 0}:{type:"data",data:u}}function lh(i,u,a,c,f){let d=i.headers.get("Location");if(Se(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!ta.test(d)){let y=c.slice(0,c.findIndex(v=>v.route.id===a)+1);d=Ju(new URL(u.url),y,f,d),i.headers.set("Location",d)}return i}function Xf(i,u,a){if(ta.test(i)){let c=i,f=c.startsWith("//")?new URL(u.protocol+c):new URL(c),d=Gt(f.pathname,a)!=null;if(f.origin===u.origin&&d)return f.pathname+f.search+f.hash}return i}function Vr(i,u,a,c){let f=i.createURL(mc(u)).toString(),d={signal:a};if(c&&Xt(c.formMethod)){let{formMethod:y,formEncType:v}=c;d.method=y.toUpperCase(),v==="application/json"?(d.headers=new Headers({"Content-Type":v}),d.body=JSON.stringify(c.json)):v==="text/plain"?d.body=c.text:v==="application/x-www-form-urlencoded"&&c.formData?d.body=qu(c.formData):d.body=c.formData}return new Request(f,d)}function qu(i){let u=new URLSearchParams;for(let[a,c]of i.entries())u.append(a,typeof c=="string"?c:c.name);return u}function Gf(i){let u=new FormData;for(let[a,c]of i.entries())u.append(a,c);return u}function ih(i,u,a,c=!1,f=!1){let d={},y=null,v,g=!1,S={},D=a&&Tt(a[1])?a[1].error:void 0;return i.forEach(z=>{if(!(z.route.id in u))return;let T=z.route.id,N=u[T];if(Se(!fr(N),"Cannot handle redirect results in processLoaderData"),Tt(N)){let M=N.error;if(D!==void 0&&(M=D,D=void 0),y=y||{},f)y[T]=M;else{let H=sr(i,T);y[H.route.id]==null&&(y[H.route.id]=M)}c||(d[T]=pc),g||(g=!0,v=Ul(N.error)?N.error.status:500),N.headers&&(S[T]=N.headers)}else d[T]=N.data,N.statusCode&&N.statusCode!==200&&!g&&(v=N.statusCode),N.headers&&(S[T]=N.headers)}),D!==void 0&&a&&(y={[a[0]]:D},d[a[0]]=void 0),{loaderData:d,errors:y,statusCode:v||200,loaderHeaders:S}}function Jf(i,u,a,c,f,d){let{loaderData:y,errors:v}=ih(u,a,c);return f.forEach(g=>{let{key:S,match:D,controller:z}=g,T=d[S];if(Se(T,"Did not find corresponding fetcher result"),!(z&&z.signal.aborted))if(Tt(T)){let N=sr(i.matches,D==null?void 0:D.route.id);v&&v[N.route.id]||(v={...v,[N.route.id]:T.error}),i.fetchers.delete(S)}else if(fr(T))Se(!1,"Unhandled fetcher revalidation redirect");else{let N=An(T.data);i.fetchers.set(S,N)}}),{loaderData:y,errors:v}}function Zf(i,u,a,c){let f=Object.entries(u).filter(([,d])=>d!==pc).reduce((d,[y,v])=>(d[y]=v,d),{});for(let d of a){let y=d.route.id;if(!u.hasOwnProperty(y)&&i.hasOwnProperty(y)&&d.route.loader&&(f[y]=i[y]),c&&c.hasOwnProperty(y))break}return f}function qf(i){return i?Tt(i[1])?{actionData:{}}:{actionData:{[i[0]]:i[1].data}}:{}}function sr(i,u){return(u?i.slice(0,i.findIndex(c=>c.route.id===u)+1):[...i]).reverse().find(c=>c.route.hasErrorBoundary===!0)||i[0]}function bf(i){let u=i.length===1?i[0]:i.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:u}],route:u}}function Ut(i,{pathname:u,routeId:a,method:c,type:f,message:d}={}){let y="Unknown Server Error",v="Unknown @remix-run/router error";return i===400?(y="Bad Request",c&&u&&a?v=`You made a ${c} request to "${u}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:f==="invalid-body"&&(v="Unable to encode submission body")):i===403?(y="Forbidden",v=`Route "${a}" does not match URL "${u}"`):i===404?(y="Not Found",v=`No route matches URL "${u}"`):i===405&&(y="Method Not Allowed",c&&u&&a?v=`You made a ${c.toUpperCase()} request to "${u}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:c&&(v=`Invalid request method "${c.toUpperCase()}"`)),new lo(i||500,y,new Error(v),!0)}function Zi(i){let u=Object.entries(i);for(let a=u.length-1;a>=0;a--){let[c,f]=u[a];if(fr(f))return{key:c,result:f}}}function mc(i){let u=typeof i=="string"?Vn(i):i;return Bn({...u,hash:""})}function oh(i,u){return i.pathname!==u.pathname||i.search!==u.search?!1:i.hash===""?u.hash!=="":i.hash===u.hash?!0:u.hash!==""}function uh(i){return yc(i.result)&&Qp.has(i.result.status)}function Tt(i){return i.type==="error"}function fr(i){return(i&&i.type)==="redirect"}function ec(i){return typeof i=="object"&&i!=null&&"type"in i&&"data"in i&&"init"in i&&i.type==="DataWithResponseInit"}function yc(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.headers=="object"&&typeof i.body<"u"}function ah(i){return Wp.has(i.toUpperCase())}function Xt(i){return Bp.has(i.toUpperCase())}function na(i){return new URLSearchParams(i).getAll("index").some(u=>u==="")}function Ol(i,u){let a=typeof u=="string"?Vn(u).search:u.search;if(i[i.length-1].route.index&&na(a||""))return i[i.length-1];let c=fc(i);return c[c.length-1]}function tc(i){let{formMethod:u,formAction:a,formEncType:c,text:f,formData:d,json:y}=i;if(!(!u||!a||!c)){if(f!=null)return{formMethod:u,formAction:a,formEncType:c,formData:void 0,json:void 0,text:f};if(d!=null)return{formMethod:u,formAction:a,formEncType:c,formData:d,json:void 0,text:void 0};if(y!==void 0)return{formMethod:u,formAction:a,formEncType:c,formData:void 0,json:y,text:void 0}}}function Xu(i,u){return u?{state:"loading",location:i,formMethod:u.formMethod,formAction:u.formAction,formEncType:u.formEncType,formData:u.formData,json:u.json,text:u.text}:{state:"loading",location:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function sh(i,u){return{state:"submitting",location:i,formMethod:u.formMethod,formAction:u.formAction,formEncType:u.formEncType,formData:u.formData,json:u.json,text:u.text}}function zl(i,u){return i?{state:"loading",formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text,data:u}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:u}}function fh(i,u){return{state:"submitting",formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text,data:u?u.data:void 0}}function An(i){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function ch(i,u){try{let a=i.sessionStorage.getItem(dc);if(a){let c=JSON.parse(a);for(let[f,d]of Object.entries(c||{}))d&&Array.isArray(d)&&u.set(f,new Set(d||[]))}}catch{}}function dh(i,u){if(u.size>0){let a={};for(let[c,f]of u)a[c]=[...f];try{i.sessionStorage.setItem(dc,JSON.stringify(a))}catch(c){ot(!1,`Failed to save applied view transitions in sessionStorage (${c}).`)}}}function ph(){let i,u,a=new Promise((c,f)=>{i=async d=>{c(d);try{await a}catch{}},u=async d=>{f(d);try{await a}catch{}}});return{promise:a,resolve:i,reject:u}}var cr=_.createContext(null);cr.displayName="DataRouter";var jl=_.createContext(null);jl.displayName="DataRouterState";var ra=_.createContext({isTransitioning:!1});ra.displayName="ViewTransition";var vc=_.createContext(new Map);vc.displayName="Fetchers";var hh=_.createContext(null);hh.displayName="Await";var nn=_.createContext(null);nn.displayName="Navigation";var io=_.createContext(null);io.displayName="Location";var Jt=_.createContext({outlet:null,matches:[],isDataRoute:!1});Jt.displayName="Route";var la=_.createContext(null);la.displayName="RouteError";function mh(i,{relative:u}={}){Se($l(),"useHref() may be used only in the context of a component.");let{basename:a,navigator:c}=_.useContext(nn),{hash:f,pathname:d,search:y}=Al(i,{relative:u}),v=d;return a!=="/"&&(v=d==="/"?a:tn([a,d])),c.createHref({pathname:v,search:y,hash:f})}function $l(){return _.useContext(io)!=null}function dr(){return Se($l(),"useLocation() may be used only in the context of a component."),_.useContext(io).location}var gc="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wc(i){_.useContext(nn).static||_.useLayoutEffect(i)}function yh(){let{isDataRoute:i}=_.useContext(Jt);return i?Dh():vh()}function vh(){Se($l(),"useNavigate() may be used only in the context of a component.");let i=_.useContext(cr),{basename:u,navigator:a}=_.useContext(nn),{matches:c}=_.useContext(Jt),{pathname:f}=dr(),d=JSON.stringify(bu(c)),y=_.useRef(!1);return wc(()=>{y.current=!0}),_.useCallback((g,S={})=>{if(ot(y.current,gc),!y.current)return;if(typeof g=="number"){a.go(g);return}let D=ea(g,JSON.parse(d),f,S.relative==="path");i==null&&u!=="/"&&(D.pathname=D.pathname==="/"?u:tn([u,D.pathname])),(S.replace?a.replace:a.push)(D,S.state,S)},[u,a,d,f,i])}var gh=_.createContext(null);function wh(i){let u=_.useContext(Jt).outlet;return u&&_.createElement(gh.Provider,{value:i},u)}function Sm(){let{matches:i}=_.useContext(Jt),u=i[i.length-1];return u?u.params:{}}function Al(i,{relative:u}={}){let{matches:a}=_.useContext(Jt),{pathname:c}=dr(),f=JSON.stringify(bu(a));return _.useMemo(()=>ea(i,JSON.parse(f),c,u==="path"),[i,f,c,u])}function Sh(i,u,a,c){Se($l(),"useRoutes() may be used only in the context of a component.");let{navigator:f,static:d}=_.useContext(nn),{matches:y}=_.useContext(Jt),v=y[y.length-1],g=v?v.params:{},S=v?v.pathname:"/",D=v?v.pathnameBase:"/",z=v&&v.route;{let V=z&&z.path||"";Sc(S,!z||V.endsWith("*")||V.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${S}" (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 T=dr(),N;N=T;let M=N.pathname||"/",H=M;if(D!=="/"){let V=D.replace(/^\//,"").split("/");H="/"+M.replace(/^\//,"").split("/").slice(V.length).join("/")}let O=!d&&a&&a.matches&&a.matches.length>0?a.matches:Hn(i,{pathname:H});return ot(z||O!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),ot(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),Ph(O&&O.map(V=>Object.assign({},V,{params:Object.assign({},g,V.params),pathname:tn([D,f.encodeLocation?f.encodeLocation(V.pathname).pathname:V.pathname]),pathnameBase:V.pathnameBase==="/"?D:tn([D,f.encodeLocation?f.encodeLocation(V.pathnameBase).pathname:V.pathnameBase])})),y,a,c)}function Eh(){let i=Nh(),u=Ul(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),a=i instanceof Error?i.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},d={padding:"2px 4px",backgroundColor:c},y=null;return console.error("Error handled by React Router default ErrorBoundary:",i),y=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:d},"ErrorBoundary")," or"," ",_.createElement("code",{style:d},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},u),a?_.createElement("pre",{style:f},a):null,y)}var kh=_.createElement(Eh,null),xh=class extends _.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,u){return u.location!==i.location||u.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:u.error,location:u.location,revalidation:i.revalidation||u.revalidation}}componentDidCatch(i,u){console.error("React Router caught the following error during render",i,u)}render(){return this.state.error!==void 0?_.createElement(Jt.Provider,{value:this.props.routeContext},_.createElement(la.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Ch({routeContext:i,match:u,children:a}){let c=_.useContext(cr);return c&&c.static&&c.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=u.route.id),_.createElement(Jt.Provider,{value:i},a)}function Ph(i,u=[],a=null,c=null){if(i==null){if(!a)return null;if(a.errors)i=a.matches;else if(u.length===0&&!a.initialized&&a.matches.length>0)i=a.matches;else return null}let f=i,d=a==null?void 0:a.errors;if(d!=null){let g=f.findIndex(S=>S.route.id&&(d==null?void 0:d[S.route.id])!==void 0);Se(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,g+1))}let y=!1,v=-1;if(a)for(let g=0;g=0?f=f.slice(0,v+1):f=[f[0]];break}}}return f.reduceRight((g,S,D)=>{let z,T=!1,N=null,M=null;a&&(z=d&&S.route.id?d[S.route.id]:void 0,N=S.route.errorElement||kh,y&&(v<0&&D===0?(Sc("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,M=null):v===D&&(T=!0,M=S.route.hydrateFallbackElement||null)));let H=u.concat(f.slice(0,D+1)),O=()=>{let j;return z?j=N:T?j=M:S.route.Component?j=_.createElement(S.route.Component,null):S.route.element?j=S.route.element:j=g,_.createElement(Ch,{match:S,routeContext:{outlet:g,matches:H,isDataRoute:a!=null},children:j})};return a&&(S.route.ErrorBoundary||S.route.errorElement||D===0)?_.createElement(xh,{location:a.location,revalidation:a.revalidation,component:N,error:z,children:O(),routeContext:{outlet:null,matches:H,isDataRoute:!0}}):O()},null)}function ia(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rh(i){let u=_.useContext(cr);return Se(u,ia(i)),u}function Lh(i){let u=_.useContext(jl);return Se(u,ia(i)),u}function _h(i){let u=_.useContext(Jt);return Se(u,ia(i)),u}function oa(i){let u=_h(i),a=u.matches[u.matches.length-1];return Se(a.route.id,`${i} can only be used on routes that contain a unique "id"`),a.route.id}function Th(){return oa("useRouteId")}function Nh(){var c;let i=_.useContext(la),u=Lh("useRouteError"),a=oa("useRouteError");return i!==void 0?i:(c=u.errors)==null?void 0:c[a]}function Dh(){let{router:i}=Rh("useNavigate"),u=oa("useNavigate"),a=_.useRef(!1);return wc(()=>{a.current=!0}),_.useCallback(async(f,d={})=>{ot(a.current,gc),a.current&&(typeof f=="number"?i.navigate(f):await i.navigate(f,{fromRouteId:u,...d}))},[i,u])}var nc={};function Sc(i,u,a){!u&&!nc[i]&&(nc[i]=!0,ot(!1,a))}var rc={};function lc(i,u){!i&&!rc[u]&&(rc[u]=!0,console.warn(u))}function Mh(i){let u={hasErrorBoundary:i.hasErrorBoundary||i.ErrorBoundary!=null||i.errorElement!=null};return i.Component&&(i.element&&ot(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(u,{element:_.createElement(i.Component),Component:void 0})),i.HydrateFallback&&(i.hydrateFallbackElement&&ot(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(u,{hydrateFallbackElement:_.createElement(i.HydrateFallback),HydrateFallback:void 0})),i.ErrorBoundary&&(i.errorElement&&ot(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(u,{errorElement:_.createElement(i.ErrorBoundary),ErrorBoundary:void 0})),u}var zh=class{constructor(){this.status="pending",this.promise=new Promise((i,u)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",i(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",u(a))}})}};function Fh({router:i,flushSync:u}){let[a,c]=_.useState(i.state),[f,d]=_.useState(),[y,v]=_.useState({isTransitioning:!1}),[g,S]=_.useState(),[D,z]=_.useState(),[T,N]=_.useState(),M=_.useRef(new Map),H=_.useCallback((b,{deletedFetchers:le,flushSync:se,viewTransitionOpts:C})=>{b.fetchers.forEach((me,ce)=>{me.data!==void 0&&M.current.set(ce,me.data)}),le.forEach(me=>M.current.delete(me)),lc(se===!1||u!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let fe=i.window!=null&&i.window.document!=null&&typeof i.window.document.startViewTransition=="function";if(lc(C==null||fe,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!C||!fe){u&&se?u(()=>c(b)):_.startTransition(()=>c(b));return}if(u&&se){u(()=>{D&&(g&&g.resolve(),D.skipTransition()),v({isTransitioning:!0,flushSync:!0,currentLocation:C.currentLocation,nextLocation:C.nextLocation})});let me=i.window.document.startViewTransition(()=>{u(()=>c(b))});me.finished.finally(()=>{u(()=>{S(void 0),z(void 0),d(void 0),v({isTransitioning:!1})})}),u(()=>z(me));return}D?(g&&g.resolve(),D.skipTransition(),N({state:b,currentLocation:C.currentLocation,nextLocation:C.nextLocation})):(d(b),v({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}))},[i.window,u,D,g]);_.useLayoutEffect(()=>i.subscribe(H),[i,H]),_.useEffect(()=>{y.isTransitioning&&!y.flushSync&&S(new zh)},[y]),_.useEffect(()=>{if(g&&f&&i.window){let b=f,le=g.promise,se=i.window.document.startViewTransition(async()=>{_.startTransition(()=>c(b)),await le});se.finished.finally(()=>{S(void 0),z(void 0),d(void 0),v({isTransitioning:!1})}),z(se)}},[f,g,i.window]),_.useEffect(()=>{g&&f&&a.location.key===f.location.key&&g.resolve()},[g,D,a.location,f]),_.useEffect(()=>{!y.isTransitioning&&T&&(d(T.state),v({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}),N(void 0))},[y.isTransitioning,T]);let O=_.useMemo(()=>({createHref:i.createHref,encodeLocation:i.encodeLocation,go:b=>i.navigate(b),push:(b,le,se)=>i.navigate(b,{state:le,preventScrollReset:se==null?void 0:se.preventScrollReset}),replace:(b,le,se)=>i.navigate(b,{replace:!0,state:le,preventScrollReset:se==null?void 0:se.preventScrollReset})}),[i]),j=i.basename||"/",V=_.useMemo(()=>({router:i,navigator:O,static:!1,basename:j}),[i,O,j]);return _.createElement(_.Fragment,null,_.createElement(cr.Provider,{value:V},_.createElement(jl.Provider,{value:a},_.createElement(vc.Provider,{value:M.current},_.createElement(ra.Provider,{value:y},_.createElement(Uh,{basename:j,location:a.location,navigationType:a.historyAction,navigator:O},_.createElement(Oh,{routes:i.routes,future:i.future,state:a})))))),null)}var Oh=_.memo(Ih);function Ih({routes:i,future:u,state:a}){return Sh(i,void 0,a,u)}function Em(i){return wh(i.context)}function Uh({basename:i="/",children:u=null,location:a,navigationType:c="POP",navigator:f,static:d=!1}){Se(!$l(),"You cannot render a inside another . You should never have more than one in your app.");let y=i.replace(/^\/*/,"/"),v=_.useMemo(()=>({basename:y,navigator:f,static:d,future:{}}),[y,f,d]);typeof a=="string"&&(a=Vn(a));let{pathname:g="/",search:S="",hash:D="",state:z=null,key:T="default"}=a,N=_.useMemo(()=>{let M=Gt(g,y);return M==null?null:{location:{pathname:M,search:S,hash:D,state:z,key:T},navigationType:c}},[y,g,S,D,z,T,c]);return ot(N!=null,` is not able to match the URL "${g}${S}${D}" because it does not start with the basename, so the won't render anything.`),N==null?null:_.createElement(nn.Provider,{value:v},_.createElement(io.Provider,{children:u,value:N}))}var eo="get",to="application/x-www-form-urlencoded";function oo(i){return i!=null&&typeof i.tagName=="string"}function jh(i){return oo(i)&&i.tagName.toLowerCase()==="button"}function $h(i){return oo(i)&&i.tagName.toLowerCase()==="form"}function Ah(i){return oo(i)&&i.tagName.toLowerCase()==="input"}function Hh(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function Bh(i,u){return i.button===0&&(!u||u==="_self")&&!Hh(i)}var qi=null;function Vh(){if(qi===null)try{new FormData(document.createElement("form"),0),qi=!1}catch{qi=!0}return qi}var Wh=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gu(i){return i!=null&&!Wh.has(i)?(ot(!1,`"${i}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${to}"`),null):i}function Qh(i,u){let a,c,f,d,y;if($h(i)){let v=i.getAttribute("action");c=v?Gt(v,u):null,a=i.getAttribute("method")||eo,f=Gu(i.getAttribute("enctype"))||to,d=new FormData(i)}else if(jh(i)||Ah(i)&&(i.type==="submit"||i.type==="image")){let v=i.form;if(v==null)throw new Error('Cannot submit a