function hc(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function mc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vc={exports:{}},K={};/** * @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 pl=Symbol.for("react.element"),up=Symbol.for("react.portal"),sp=Symbol.for("react.fragment"),cp=Symbol.for("react.strict_mode"),fp=Symbol.for("react.profiler"),dp=Symbol.for("react.provider"),pp=Symbol.for("react.context"),hp=Symbol.for("react.forward_ref"),mp=Symbol.for("react.suspense"),vp=Symbol.for("react.memo"),yp=Symbol.for("react.lazy"),Au=Symbol.iterator;function gp(e){return e===null||typeof e!="object"?null:(e=Au&&e[Au]||e["@@iterator"],typeof e=="function"?e:null)}var yc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gc=Object.assign,wc={};function hr(e,t,n){this.props=e,this.context=t,this.refs=wc,this.updater=n||yc}hr.prototype.isReactComponent={};hr.prototype.setState=function(e,t){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,t,"setState")};hr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sc(){}Sc.prototype=hr.prototype;function _a(e,t,n){this.props=e,this.context=t,this.refs=wc,this.updater=n||yc}var La=_a.prototype=new Sc;La.constructor=_a;gc(La,hr.prototype);La.isPureReactComponent=!0;var Bu=Array.isArray,Ec=Object.prototype.hasOwnProperty,Ta={current:null},kc={key:!0,ref:!0,__self:!0,__source:!0};function xc(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Ec.call(t,r)&&!kc.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1>>1,te=N[ee];if(0>>1;eel(ze,H))Oel(et,ze)?(N[ee]=et,N[Oe]=H,ee=Oe):(N[ee]=ze,N[Ke]=H,ee=Ke);else if(Oel(et,H))N[ee]=et,N[Oe]=H,ee=Oe;else break e}}return $}function l(N,$){var H=N.sortIndex-$.sortIndex;return H!==0?H:N.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var u=[],s=[],d=1,f=null,p=3,w=!1,E=!1,k=!1,L=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(N){for(var $=n(s);$!==null;){if($.callback===null)r(s);else if($.startTime<=N)r(s),$.sortIndex=$.expirationTime,t(u,$);else break;$=n(s)}}function x(N){if(k=!1,v(N),!E)if(n(u)!==null)E=!0,Bt(T);else{var $=n(s);$!==null&&$t(x,$.startTime-N)}}function T(N,$){E=!1,k&&(k=!1,m(P),P=-1),w=!0;var H=p;try{for(v($),f=n(u);f!==null&&(!(f.expirationTime>$)||N&&!Z());){var ee=f.callback;if(typeof ee=="function"){f.callback=null,p=f.priorityLevel;var te=ee(f.expirationTime<=$);$=e.unstable_now(),typeof te=="function"?f.callback=te:f===n(u)&&r(u),v($)}else r(u);f=n(u)}if(f!==null)var ut=!0;else{var Ke=n(s);Ke!==null&&$t(x,Ke.startTime-$),ut=!1}return ut}finally{f=null,p=H,w=!1}}var z=!1,y=null,P=-1,B=5,D=-1;function Z(){return!(e.unstable_now()-DN||125ee?(N.sortIndex=H,t(s,N),n(u)===null&&N===n(s)&&(k?(m(P),P=-1):k=!0,$t(x,H-ee))):(N.sortIndex=te,t(u,N),E||w||(E=!0,Bt(T))),N},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(N){var $=p;return function(){var H=p;p=$;try{return N.apply(this,arguments)}finally{p=H}}}})(_c);Rc.exports=_c;var Pp=Rc.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 Rp=C,Ze=Pp;function _(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"),To=Object.prototype.hasOwnProperty,_p=/^[: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]*$/,Vu={},Hu={};function Lp(e){return To.call(Hu,e)?!0:To.call(Vu,e)?!1:_p.test(e)?Hu[e]=!0:(Vu[e]=!0,!1)}function Tp(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 Np(e,t,n,r){if(t===null||typeof t>"u"||Tp(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 Ae(e,t,n,r,l,i,o){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=i,this.removeEmptyString=o}var Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Le[e]=new Ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Le[t]=new Ae(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Le[e]=new Ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Le[e]=new Ae(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){Le[e]=new Ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Le[e]=new Ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Le[e]=new Ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Le[e]=new Ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Le[e]=new Ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var Da=/[\-:]([a-z])/g;function Ma(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(Da,Ma);Le[t]=new Ae(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(Da,Ma);Le[t]=new Ae(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(Da,Ma);Le[t]=new Ae(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Le[e]=new Ae(e,1,!1,e.toLowerCase(),null,!1,!1)});Le.xlinkHref=new Ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Le[e]=new Ae(e,1,!1,e.toLowerCase(),null,!0,!0)});function za(e,t,n,r){var l=Le.hasOwnProperty(t)?Le[t]:null;(l!==null?l.type!==0:r||!(2a||l[o]!==i[a]){var u=` `+l[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{to=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zr(e):""}function Dp(e){switch(e.tag){case 5:return zr(e.type);case 16:return zr("Lazy");case 13:return zr("Suspense");case 19:return zr("SuspenseList");case 0:case 2:case 15:return e=no(e.type,!1),e;case 11:return e=no(e.type.render,!1),e;case 1:return e=no(e.type,!0),e;default:return""}}function zo(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 Hn:return"Fragment";case Vn:return"Portal";case No:return"Profiler";case Oa:return"StrictMode";case Do:return"Suspense";case Mo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Nc:return(e.displayName||"Context")+".Consumer";case Tc:return(e._context.displayName||"Context")+".Provider";case Fa:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ua:return t=e.displayName||null,t!==null?t:zo(e.type)||"Memo";case Kt:t=e._payload,e=e._init;try{return zo(e(t))}catch{}}return null}function Mp(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 zo(t);case 8:return t===Oa?"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 un(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zp(e){var t=Mc(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,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ll(e){e._valueTracker||(e._valueTracker=zp(e))}function zc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Mc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ri(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 Oo(e,t){var n=t.checked;return fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Qu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=un(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 Oc(e,t){t=t.checked,t!=null&&za(e,"checked",t,!1)}function Fo(e,t){Oc(e,t);var n=un(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")?Uo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Uo(e,t.type,un(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ku(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 Uo(e,t,n){(t!=="number"||ri(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Or=Array.isArray;function er(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Tl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var jr={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},Op=["Webkit","ms","Moz","O"];Object.keys(jr).forEach(function(e){Op.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jr[t]=jr[e]})});function jc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||jr.hasOwnProperty(e)&&jr[e]?(""+t).trim():t+"px"}function Ac(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=jc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Fp=fe({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 Ao(e,t){if(t){if(Fp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Bo(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 $o=null;function Ia(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vo=null,tr=null,nr=null;function Gu(e){if(e=vl(e)){if(typeof Vo!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Oi(t),Vo(e.stateNode,e.type,t))}}function Bc(e){tr?nr?nr.push(e):nr=[e]:tr=e}function $c(){if(tr){var e=tr,t=nr;if(nr=tr=null,Gu(e),t)for(e=0;e>>=0,e===0?32:31-(Kp(e)/Yp|0)|0}var Nl=64,Dl=4194304;function Fr(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 ai(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~l;a!==0?r=Fr(a):(i&=o,i!==0&&(r=Fr(i)))}else o=n&~l,o!==0?r=Fr(o):i!==0&&(r=Fr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&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 hl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function Zp(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=Br),ls=" ",is=!1;function uf(e,t){switch(e){case"keyup":return Ph.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wn=!1;function _h(e,t){switch(e){case"compositionend":return sf(t);case"keypress":return t.which!==32?null:(is=!0,ls);case"textInput":return e=t.data,e===ls&&is?null:e;default:return null}}function Lh(e,t){if(Wn)return e==="compositionend"||!Qa&&uf(e,t)?(e=of(),Yl=Va=Jt=null,Wn=!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=ss(n)}}function pf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hf(){for(var e=window,t=ri();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ri(e.document)}return t}function Ka(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 Ih(e){var t=hf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pf(n.ownerDocument.documentElement,n)){if(r!==null&&Ka(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,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=cs(n,i);var o=cs(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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,Qn=null,Xo=null,Vr=null,Go=!1;function fs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Go||Qn==null||Qn!==ri(r)||(r=Qn,"selectionStart"in r&&Ka(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}),Vr&&el(Vr,r)||(Vr=r,r=ci(Xo,"onSelect"),0Xn||(e.current=ta[Xn],ta[Xn]=null,Xn--)}function le(e,t){Xn++,ta[Xn]=e.current,e.current=t}var sn={},Me=fn(sn),He=fn(!1),Rn=sn;function ar(e,t){var n=e.type.contextTypes;if(!n)return sn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function We(e){return e=e.childContextTypes,e!=null}function di(){oe(He),oe(Me)}function gs(e,t,n){if(Me.current!==sn)throw Error(_(168));le(Me,t),le(He,n)}function xf(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(_(108,Mp(e)||"Unknown",l));return fe({},n,r)}function pi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sn,Rn=Me.current,le(Me,e),le(He,He.current),!0}function ws(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=xf(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,oe(He),oe(Me),le(Me,e)):oe(He),le(He,n)}var _t=null,Fi=!1,yo=!1;function Cf(e){_t===null?_t=[e]:_t.push(e)}function Gh(e){Fi=!0,Cf(e)}function dn(){if(!yo&&_t!==null){yo=!0;var e=0,t=b;try{var n=_t;for(b=1;e>=o,l-=o,Lt=1<<32-ht(t)+l|n<P?(B=y,y=null):B=y.sibling;var D=p(m,y,v[P],x);if(D===null){y===null&&(y=B);break}e&&y&&D.alternate===null&&t(m,y),c=i(D,c,P),z===null?T=D:z.sibling=D,z=D,y=B}if(P===v.length)return n(m,y),ue&&vn(m,P),T;if(y===null){for(;PP?(B=y,y=null):B=y.sibling;var Z=p(m,y,D.value,x);if(Z===null){y===null&&(y=B);break}e&&y&&Z.alternate===null&&t(m,y),c=i(Z,c,P),z===null?T=Z:z.sibling=Z,z=Z,y=B}if(D.done)return n(m,y),ue&&vn(m,P),T;if(y===null){for(;!D.done;P++,D=v.next())D=f(m,D.value,x),D!==null&&(c=i(D,c,P),z===null?T=D:z.sibling=D,z=D);return ue&&vn(m,P),T}for(y=r(m,y);!D.done;P++,D=v.next())D=w(y,m,P,D.value,x),D!==null&&(e&&D.alternate!==null&&y.delete(D.key===null?P:D.key),c=i(D,c,P),z===null?T=D:z.sibling=D,z=D);return e&&y.forEach(function(ne){return t(m,ne)}),ue&&vn(m,P),T}function L(m,c,v,x){if(typeof v=="object"&&v!==null&&v.type===Hn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case _l:e:{for(var T=v.key,z=c;z!==null;){if(z.key===T){if(T=v.type,T===Hn){if(z.tag===7){n(m,z.sibling),c=l(z,v.props.children),c.return=m,m=c;break e}}else if(z.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Kt&&ks(T)===z.type){n(m,z.sibling),c=l(z,v.props),c.ref=_r(m,z,v),c.return=m,m=c;break e}n(m,z);break}else t(m,z);z=z.sibling}v.type===Hn?(c=Pn(v.props.children,m.mode,x,v.key),c.return=m,m=c):(x=ti(v.type,v.key,v.props,null,m.mode,x),x.ref=_r(m,c,v),x.return=m,m=x)}return o(m);case Vn:e:{for(z=v.key;c!==null;){if(c.key===z)if(c.tag===4&&c.stateNode.containerInfo===v.containerInfo&&c.stateNode.implementation===v.implementation){n(m,c.sibling),c=l(c,v.children||[]),c.return=m,m=c;break e}else{n(m,c);break}else t(m,c);c=c.sibling}c=Po(v,m.mode,x),c.return=m,m=c}return o(m);case Kt:return z=v._init,L(m,c,z(v._payload),x)}if(Or(v))return E(m,c,v,x);if(kr(v))return k(m,c,v,x);jl(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,c!==null&&c.tag===6?(n(m,c.sibling),c=l(c,v),c.return=m,m=c):(n(m,c),c=Co(v,m.mode,x),c.return=m,m=c),o(m)):n(m,c)}return L}var sr=Lf(!0),Tf=Lf(!1),vi=fn(null),yi=null,Zn=null,Ja=null;function Za(){Ja=Zn=yi=null}function qa(e){var t=vi.current;oe(vi),e._currentValue=t}function la(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 lr(e,t){yi=e,Ja=Zn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ve=!0),e.firstContext=null)}function it(e){var t=e._currentValue;if(Ja!==e)if(e={context:e,memoizedValue:t,next:null},Zn===null){if(yi===null)throw Error(_(308));Zn=e,yi.dependencies={lanes:0,firstContext:e}}else Zn=Zn.next=e;return t}var En=null;function ba(e){En===null?En=[e]:En.push(e)}function Nf(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,ba(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ot(e,r)}function Ot(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 Yt=!1;function eu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Df(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 Nt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function rn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,X&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ot(e,n)}return l=r.interleaved,l===null?(t.next=t,ba(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ot(e,n)}function Gl(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,Aa(e,n)}}function xs(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,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 gi(e,t,n,r){var l=e.updateQueue;Yt=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var u=a,s=u.next;u.next=null,o===null?i=s:o.next=s,o=u;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=s:a.next=s,d.lastBaseUpdate=u))}if(i!==null){var f=l.baseState;o=0,d=s=u=null,a=i;do{var p=a.lane,w=a.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:w,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var E=e,k=a;switch(p=t,w=n,k.tag){case 1:if(E=k.payload,typeof E=="function"){f=E.call(w,f,p);break e}f=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=k.payload,p=typeof E=="function"?E.call(w,f,p):E,p==null)break e;f=fe({},f,p);break e;case 2:Yt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[a]:p.push(a))}else w={eventTime:w,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(s=d=w,u=f):d=d.next=w,o|=p;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;p=a,a=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(d===null&&(u=f),l.baseState=u,l.firstBaseUpdate=s,l.lastBaseUpdate=d,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);Tn|=o,e.lanes=o,e.memoizedState=f}}function Cs(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=wo.transition;wo.transition={};try{e(!1),t()}finally{b=n,wo.transition=r}}function Xf(){return ot().memoizedState}function bh(e,t,n){var r=on(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Gf(e))Jf(t,n);else if(n=Nf(e,t,n,r),n!==null){var l=Ie();mt(n,e,r,l),Zf(n,t,r)}}function em(e,t,n){var r=on(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Gf(e))Jf(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(l.hasEagerState=!0,l.eagerState=a,vt(a,o)){var u=t.interleaved;u===null?(l.next=l,ba(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Nf(e,t,l,r),n!==null&&(l=Ie(),mt(n,e,r,l),Zf(n,t,r))}}function Gf(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function Jf(e,t){Hr=Si=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Aa(e,n)}}var Ei={readContext:it,useCallback:Te,useContext:Te,useEffect:Te,useImperativeHandle:Te,useInsertionEffect:Te,useLayoutEffect:Te,useMemo:Te,useReducer:Te,useRef:Te,useState:Te,useDebugValue:Te,useDeferredValue:Te,useTransition:Te,useMutableSource:Te,useSyncExternalStore:Te,useId:Te,unstable_isNewReconciler:!1},tm={readContext:it,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:it,useEffect:Rs,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zl(4194308,4,Hf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zl(4,2,e,t)},useMemo:function(e,t){var n=wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wt();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=bh.bind(null,ce,e),[r.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:Ps,useDebugValue:uu,useDeferredValue:function(e){return wt().memoizedState=e},useTransition:function(){var e=Ps(!1),t=e[0];return e=qh.bind(null,e[1]),wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ce,l=wt();if(ue){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),xe===null)throw Error(_(349));Ln&30||Ff(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Rs(If.bind(null,r,i,e),[e]),r.flags|=2048,ul(9,Uf.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=wt(),t=xe.identifierPrefix;if(ue){var n=Tt,r=Lt;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ol++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[St]=t,e[rl]=r,ad(e,t,!1,!1),t.stateNode=e;e:{switch(o=Bo(n,r),n){case"dialog":ie("cancel",e),ie("close",e),l=r;break;case"iframe":case"object":case"embed":ie("load",e),l=r;break;case"video":case"audio":for(l=0;ldr&&(t.flags|=128,r=!0,Lr(i,!1),t.lanes=4194304)}else{if(!r)if(e=wi(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Lr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ue)return Ne(t),null}else 2*ve()-i.renderingStartTime>dr&&n!==1073741824&&(t.flags|=128,r=!0,Lr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ve(),t.sibling=null,n=se.current,le(se,r?n&1|2:n&1),t):(Ne(t),null);case 22:case 23:return hu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ye&1073741824&&(Ne(t),t.subtreeFlags&6&&(t.flags|=8192)):Ne(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function sm(e,t){switch(Xa(t),t.tag){case 1:return We(t.type)&&di(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return cr(),oe(He),oe(Me),ru(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nu(t),null;case 13:if(oe(se),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));ur()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(se),null;case 4:return cr(),null;case 10:return qa(t.type._context),null;case 22:case 23:return hu(),null;case 24:return null;default:return null}}var Bl=!1,De=!1,cm=typeof WeakSet=="function"?WeakSet:Set,O=null;function qn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){he(e,t,r)}else n.current=null}function pa(e,t,n){try{n()}catch(r){he(e,t,r)}}var Is=!1;function fm(e,t){if(Jo=ui,e=hf(),Ka(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,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,u=-1,s=0,d=0,f=e,p=null;t:for(;;){for(var w;f!==n||l!==0&&f.nodeType!==3||(a=o+l),f!==i||r!==0&&f.nodeType!==3||(u=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(w=f.firstChild)!==null;)p=f,f=w;for(;;){if(f===e)break t;if(p===n&&++s===l&&(a=o),p===i&&++d===r&&(u=o),(w=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=w}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zo={focusedElem:e,selectionRange:n},ui=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var k=E.memoizedProps,L=E.memoizedState,m=t.stateNode,c=m.getSnapshotBeforeUpdate(t.elementType===t.type?k:ct(t.type,k),L);m.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(x){he(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return E=Is,Is=!1,E}function Wr(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 i=l.destroy;l.destroy=void 0,i!==void 0&&pa(t,n,i)}l=l.next}while(l!==r)}}function ji(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 ha(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 cd(e){var t=e.alternate;t!==null&&(e.alternate=null,cd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[rl],delete t[ea],delete t[Yh],delete t[Xh])),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 fd(e){return e.tag===5||e.tag===3||e.tag===4}function js(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fd(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 ma(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=fi));else if(r!==4&&(e=e.child,e!==null))for(ma(e,t,n),e=e.sibling;e!==null;)ma(e,t,n),e=e.sibling}function va(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(va(e,t,n),e=e.sibling;e!==null;)va(e,t,n),e=e.sibling}var Re=null,ft=!1;function Wt(e,t,n){for(n=n.child;n!==null;)dd(e,t,n),n=n.sibling}function dd(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(Ni,n)}catch{}switch(n.tag){case 5:De||qn(n,t);case 6:var r=Re,l=ft;Re=null,Wt(e,t,n),Re=r,ft=l,Re!==null&&(ft?(e=Re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Re.removeChild(n.stateNode));break;case 18:Re!==null&&(ft?(e=Re,n=n.stateNode,e.nodeType===8?vo(e.parentNode,n):e.nodeType===1&&vo(e,n),qr(e)):vo(Re,n.stateNode));break;case 4:r=Re,l=ft,Re=n.stateNode.containerInfo,ft=!0,Wt(e,t,n),Re=r,ft=l;break;case 0:case 11:case 14:case 15:if(!De&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&pa(n,t,o),l=l.next}while(l!==r)}Wt(e,t,n);break;case 1:if(!De&&(qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){he(n,t,a)}Wt(e,t,n);break;case 21:Wt(e,t,n);break;case 22:n.mode&1?(De=(r=De)||n.memoizedState!==null,Wt(e,t,n),De=r):Wt(e,t,n);break;default:Wt(e,t,n)}}function As(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cm),t.forEach(function(r){var l=Sm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function st(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*pm(r/1960))-r,10e?16:e,Zt===null)var r=!1;else{if(e=Zt,Zt=null,Ci=0,X&6)throw Error(_(331));var l=X;for(X|=4,O=e.current;O!==null;){var i=O,o=i.child;if(O.flags&16){var a=i.deletions;if(a!==null){for(var u=0;uve()-du?Cn(e,0):fu|=n),Qe(e,t)}function Sd(e,t){t===0&&(e.mode&1?(t=Dl,Dl<<=1,!(Dl&130023424)&&(Dl=4194304)):t=1);var n=Ie();e=Ot(e,t),e!==null&&(hl(e,t,n),Qe(e,n))}function wm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sd(e,n)}function Sm(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(_(314))}r!==null&&r.delete(t),Sd(e,n)}var Ed;Ed=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||He.current)Ve=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ve=!1,am(e,t,n);Ve=!!(e.flags&131072)}else Ve=!1,ue&&t.flags&1048576&&Pf(t,mi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ql(e,t),e=t.pendingProps;var l=ar(t,Me.current);lr(t,n),l=iu(null,t,r,e,l,n);var i=ou();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,We(r)?(i=!0,pi(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,eu(t),l.updater=Ii,t.stateNode=l,l._reactInternals=t,oa(t,r,e,n),t=sa(null,t,r,!0,i,n)):(t.tag=0,ue&&i&&Ya(t),Ue(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ql(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=km(r),e=ct(r,e),l){case 0:t=ua(null,t,r,e,n);break e;case 1:t=Os(null,t,r,e,n);break e;case 11:t=Ms(null,t,r,e,n);break e;case 14:t=zs(null,t,r,ct(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ct(r,l),ua(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ct(r,l),Os(e,t,r,l,n);case 3:e:{if(ld(t),e===null)throw Error(_(387));r=t.pendingProps,i=t.memoizedState,l=i.element,Df(e,t),gi(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=fr(Error(_(423)),t),t=Fs(e,t,r,n,l);break e}else if(r!==l){l=fr(Error(_(424)),t),t=Fs(e,t,r,n,l);break e}else for(Ge=nn(t.stateNode.containerInfo.firstChild),Je=t,ue=!0,pt=null,n=Tf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ur(),r===l){t=Ft(e,t,n);break e}Ue(e,t,r,n)}t=t.child}return t;case 5:return Mf(t),e===null&&ra(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,qo(r,l)?o=null:i!==null&&qo(r,i)&&(t.flags|=32),rd(e,t),Ue(e,t,o,n),t.child;case 6:return e===null&&ra(t),null;case 13:return id(e,t,n);case 4:return tu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=sr(t,null,r,n):Ue(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ct(r,l),Ms(e,t,r,l,n);case 7:return Ue(e,t,t.pendingProps,n),t.child;case 8:return Ue(e,t,t.pendingProps.children,n),t.child;case 12:return Ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,le(vi,r._currentValue),r._currentValue=o,i!==null)if(vt(i.value,o)){if(i.children===l.children&&!He.current){t=Ft(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=Nt(-1,n&-n),u.tag=2;var s=i.updateQueue;if(s!==null){s=s.shared;var d=s.pending;d===null?u.next=u:(u.next=d.next,d.next=u),s.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),la(i.return,n,t),a.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(_(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),la(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ue(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,lr(t,n),l=it(l),r=r(l),t.flags|=1,Ue(e,t,r,n),t.child;case 14:return r=t.type,l=ct(r,t.pendingProps),l=ct(r.type,l),zs(e,t,r,l,n);case 15:return td(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ct(r,l),ql(e,t),t.tag=1,We(r)?(e=!0,pi(t)):e=!1,lr(t,n),qf(t,r,l),oa(t,r,l,n),sa(null,t,r,!0,e,n);case 19:return od(e,t,n);case 22:return nd(e,t,n)}throw Error(_(156,t.tag))};function kd(e,t){return Xc(e,t)}function Em(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 rt(e,t,n,r){return new Em(e,t,n,r)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function km(e){if(typeof e=="function")return vu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fa)return 11;if(e===Ua)return 14}return 2}function an(e,t){var n=e.alternate;return n===null?(n=rt(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 ti(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")vu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Hn:return Pn(n.children,l,i,t);case Oa:o=8,l|=8;break;case No:return e=rt(12,n,t,l|2),e.elementType=No,e.lanes=i,e;case Do:return e=rt(13,n,t,l),e.elementType=Do,e.lanes=i,e;case Mo:return e=rt(19,n,t,l),e.elementType=Mo,e.lanes=i,e;case Dc:return Bi(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Tc:o=10;break e;case Nc:o=9;break e;case Fa:o=11;break e;case Ua:o=14;break e;case Kt:o=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=rt(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Pn(e,t,n,r){return e=rt(7,e,r,t),e.lanes=n,e}function Bi(e,t,n,r){return e=rt(22,e,r,t),e.elementType=Dc,e.lanes=n,e.stateNode={isHidden:!1},e}function Co(e,t,n){return e=rt(6,e,null,t),e.lanes=n,e}function Po(e,t,n){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xm(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=lo(0),this.expirationTimes=lo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function yu(e,t,n,r,l,i,o,a,u){return e=new xm(e,t,n,a,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=rt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},eu(i),e}function Cm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rd)}catch(e){console.error(e)}}Rd(),Pc.exports=qe;var _d=Pc.exports;const Tm=mc(_d),Nm=hc({__proto__:null,default:Tm},[_d]);/** * @remix-run/router v1.23.3 * * 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 */function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Dn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Mm(){return Math.random().toString(36).substr(2,8)}function Xs(e,t){return{usr:e.state,key:e.key,idx:t}}function cl(e,t,n,r){return n===void 0&&(n=null),ae({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?jt(t):t,{state:n,key:t&&t.key||r||Mm()})}function Mn(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function jt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zm(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,o=l.history,a=me.Pop,u=null,s=d();s==null&&(s=0,o.replaceState(ae({},o.state,{idx:s}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=me.Pop;let L=d(),m=L==null?null:L-s;s=L,u&&u({action:a,location:k.location,delta:m})}function p(L,m){a=me.Push;let c=cl(k.location,L,m);s=d()+1;let v=Xs(c,s),x=k.createHref(c);try{o.pushState(v,"",x)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;l.location.assign(x)}i&&u&&u({action:a,location:k.location,delta:1})}function w(L,m){a=me.Replace;let c=cl(k.location,L,m);s=d();let v=Xs(c,s),x=k.createHref(c);o.replaceState(v,"",x),i&&u&&u({action:a,location:k.location,delta:0})}function E(L){let m=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof L=="string"?L:Mn(L);return c=c.replace(/ $/,"%20"),W(m,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,m)}let k={get action(){return a},get location(){return e(l,o)},listen(L){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Ys,f),u=L,()=>{l.removeEventListener(Ys,f),u=null}},createHref(L){return t(l,L)},createURL:E,encodeLocation(L){let m=E(L);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:w,go(L){return o.go(L)}};return k}var q;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(q||(q={}));const Om=new Set(["lazy","caseSensitive","path","id","index","children"]);function Fm(e){return e.index===!0}function _i(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,i)=>{let o=[...n,String(i)],a=typeof l.id=="string"?l.id:o.join("-");if(W(l.index!==!0||!l.children,"Cannot specify children on an index route"),W(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),Fm(l)){let u=ae({},l,t(l),{id:a});return r[a]=u,u}else{let u=ae({},l,t(l),{id:a,children:void 0});return r[a]=u,l.children&&(u.children=_i(l.children,t,o,r)),u}})}function gn(e,t,n){return n===void 0&&(n="/"),ni(e,t,n,!1)}function ni(e,t,n,r){let l=typeof t=="string"?jt(t):t,i=Ut(l.pathname||"/",n);if(i==null)return null;let o=Ld(e);Im(o);let a=null,u=Xm(i);for(let s=0;a==null&&s{let u={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};u.relativePath.startsWith("/")&&(W(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let s=Dt([r,u.relativePath]),d=n.concat(u);i.children&&i.children.length>0&&(W(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),Ld(i.children,t,d,s)),!(i.path==null&&!i.index)&&t.push({path:s,score:Wm(s,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))l(i,o);else for(let u of Td(i.path))l(i,o,u)}),t}function Td(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return l?[i,""]:[i];let o=Td(r.join("/")),a=[];return a.push(...o.map(u=>u===""?i:[i,u].join("/"))),l&&a.push(...o),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function Im(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Qm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const jm=/^:[\w-]+$/,Am=3,Bm=2,$m=1,Vm=10,Hm=-2,Gs=e=>e==="*";function Wm(e,t){let n=e.split("/"),r=n.length;return n.some(Gs)&&(r+=Hm),t&&(r+=Bm),n.filter(l=>!Gs(l)).reduce((l,i)=>l+(jm.test(i)?Am:i===""?$m:Vm),r)}function Qm(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function Km(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,l={},i="/",o=[];for(let a=0;a{let{paramName:p,isOptional:w}=d;if(p==="*"){let k=a[f]||"";o=i.slice(0,i.length-k.length).replace(/(.)\/+$/,"$1")}const E=a[f];return w&&!E?s[p]=void 0:s[p]=(E||"").replace(/%2F/g,"/"),s},{}),pathname:i,pathnameBase:o,pattern:e}}function Ym(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Dn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,u)=>(r.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function Xm(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Dn(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ut(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Gm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jm=e=>Gm.test(e);function Zm(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?jt(e):e,i;if(n)if(Jm(n))i=n;else{if(n.includes("//")){let o=n;n=Eu(n),Dn(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Js(n.substring(1),"/"):i=Js(n,t)}else i=t;return{pathname:i,search:bm(r),hash:ev(l)}}function Js(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Ro(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Nd(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Qi(e,t){let n=Nd(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ki(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=jt(e):(l=ae({},e),W(!l.pathname||!l.pathname.includes("?"),Ro("?","pathname","search",l)),W(!l.pathname||!l.pathname.includes("#"),Ro("#","pathname","hash",l)),W(!l.search||!l.search.includes("#"),Ro("#","search","hash",l)));let i=e===""||l.pathname==="",o=i?"/":l.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;l.pathname=p.join("/")}a=f>=0?t[f]:"/"}let u=Zm(l,a),s=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||d)&&(u.pathname+="/"),u}const Eu=e=>e.replace(/\/\/+/g,"/"),Dt=e=>Eu(e.join("/")),qm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bm=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ev=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Ti{constructor(t,n,r,l){l===void 0&&(l=!1),this.status=t,this.statusText=n||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function fl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Dd=["post","put","patch","delete"],tv=new Set(Dd),nv=["get",...Dd],rv=new Set(nv),lv=new Set([301,302,303,307,308]),iv=new Set([307,308]),_o={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ov={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Nr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ku=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,av=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Md="remix-router-transitions";function uv(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;W(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let h=e.detectErrorBoundary;l=g=>({hasErrorBoundary:h(g)})}else l=av;let i={},o=_i(e.routes,l,void 0,i),a,u=e.basename||"/",s=e.dataStrategy||dv,d=e.patchRoutesOnNavigation,f=ae({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),p=null,w=new Set,E=null,k=null,L=null,m=e.hydrationData!=null,c=gn(o,e.history.location,u),v=!1,x=null;if(c==null&&!d){let h=Be(404,{pathname:e.history.location.pathname}),{matches:g,route:S}=ac(o);c=g,x={[S.id]:h}}c&&!e.hydrationData&&kl(c,o,e.history.location.pathname).active&&(c=null);let T;if(c)if(c.some(h=>h.route.lazy))T=!1;else if(!c.some(h=>h.route.loader))T=!0;else if(f.v7_partialHydration){let h=e.hydrationData?e.hydrationData.loaderData:null,g=e.hydrationData?e.hydrationData.errors:null;if(g){let S=c.findIndex(R=>g[R.route.id]!==void 0);T=c.slice(0,S+1).every(R=>!ka(R.route,h,g))}else T=c.every(S=>!ka(S.route,h,g))}else T=e.hydrationData!=null;else if(T=!1,c=[],f.v7_partialHydration){let h=kl(null,o,e.history.location.pathname);h.active&&h.matches&&(v=!0,c=h.matches)}let z,y={historyAction:e.history.action,location:e.history.location,matches:c,initialized:T,navigation:_o,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||x,fetchers:new Map,blockers:new Map},P=me.Pop,B=!1,D,Z=!1,ne=new Map,we=null,Ce=!1,at=!1,Bt=[],$t=new Set,N=new Map,$=0,H=-1,ee=new Map,te=new Set,ut=new Map,Ke=new Map,ze=new Set,Oe=new Map,et=new Map,wl;function Qd(){if(p=e.history.listen(h=>{let{action:g,location:S,delta:R}=h;if(wl){wl(),wl=void 0;return}Dn(et.size===0||R!=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 M=Fu({currentLocation:y.location,nextLocation:S,historyAction:g});if(M&&R!=null){let A=new Promise(V=>{wl=V});e.history.go(R*-1),El(M,{state:"blocked",location:S,proceed(){El(M,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),A.then(()=>e.history.go(R))},reset(){let V=new Map(y.blockers);V.set(M,Nr),Fe({blockers:V})}});return}return pn(g,S)}),n){Rv(t,ne);let h=()=>_v(t,ne);t.addEventListener("pagehide",h),we=()=>t.removeEventListener("pagehide",h)}return y.initialized||pn(me.Pop,y.location,{initialHydration:!0}),z}function Kd(){p&&p(),we&&we(),w.clear(),D&&D.abort(),y.fetchers.forEach((h,g)=>Sl(g)),y.blockers.forEach((h,g)=>Ou(g))}function Yd(h){return w.add(h),()=>w.delete(h)}function Fe(h,g){g===void 0&&(g={}),y=ae({},y,h);let S=[],R=[];f.v7_fetcherPersist&&y.fetchers.forEach((M,A)=>{M.state==="idle"&&(ze.has(A)?R.push(A):S.push(A))}),ze.forEach(M=>{!y.fetchers.has(M)&&!N.has(M)&&R.push(M)}),[...w].forEach(M=>M(y,{deletedFetchers:R,viewTransitionOpts:g.viewTransitionOpts,flushSync:g.flushSync===!0})),f.v7_fetcherPersist?(S.forEach(M=>y.fetchers.delete(M)),R.forEach(M=>Sl(M))):R.forEach(M=>ze.delete(M))}function Un(h,g,S){var R,M;let{flushSync:A}=S===void 0?{}:S,V=y.actionData!=null&&y.navigation.formMethod!=null&&dt(y.navigation.formMethod)&&y.navigation.state==="loading"&&((R=h.state)==null?void 0:R._isRedirect)!==!0,U;g.actionData?Object.keys(g.actionData).length>0?U=g.actionData:U=null:V?U=y.actionData:U=null;let I=g.loaderData?ic(y.loaderData,g.loaderData,g.matches||[],g.errors):y.loaderData,F=y.blockers;F.size>0&&(F=new Map(F),F.forEach((Y,Pe)=>F.set(Pe,Nr)));let j=B===!0||y.navigation.formMethod!=null&&dt(y.navigation.formMethod)&&((M=h.state)==null?void 0:M._isRedirect)!==!0;a&&(o=a,a=void 0),Ce||P===me.Pop||(P===me.Push?e.history.push(h,h.state):P===me.Replace&&e.history.replace(h,h.state));let Q;if(P===me.Pop){let Y=ne.get(y.location.pathname);Y&&Y.has(h.pathname)?Q={currentLocation:y.location,nextLocation:h}:ne.has(h.pathname)&&(Q={currentLocation:h,nextLocation:y.location})}else if(Z){let Y=ne.get(y.location.pathname);Y?Y.add(h.pathname):(Y=new Set([h.pathname]),ne.set(y.location.pathname,Y)),Q={currentLocation:y.location,nextLocation:h}}Fe(ae({},g,{actionData:U,loaderData:I,historyAction:P,location:h,initialized:!0,navigation:_o,revalidation:"idle",restoreScrollPosition:Iu(h,g.matches||y.matches),preventScrollReset:j,blockers:F}),{viewTransitionOpts:Q,flushSync:A===!0}),P=me.Pop,B=!1,Z=!1,Ce=!1,at=!1,Bt=[]}async function _u(h,g){if(typeof h=="number"){e.history.go(h);return}let S=Ea(y.location,y.matches,u,f.v7_prependBasename,h,f.v7_relativeSplatPath,g?.fromRouteId,g?.relative),{path:R,submission:M,error:A}=Zs(f.v7_normalizeFormMethod,!1,S,g),V=y.location,U=cl(y.location,R,g&&g.state);U=ae({},U,e.history.encodeLocation(U));let I=g&&g.replace!=null?g.replace:void 0,F=me.Push;I===!0?F=me.Replace:I===!1||M!=null&&dt(M.formMethod)&&M.formAction===y.location.pathname+y.location.search&&(F=me.Replace);let j=g&&"preventScrollReset"in g?g.preventScrollReset===!0:void 0,Q=(g&&g.flushSync)===!0,Y=Fu({currentLocation:V,nextLocation:U,historyAction:F});if(Y){El(Y,{state:"blocked",location:U,proceed(){El(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),_u(h,g)},reset(){let Pe=new Map(y.blockers);Pe.set(Y,Nr),Fe({blockers:Pe})}});return}return await pn(F,U,{submission:M,pendingError:A,preventScrollReset:j,replace:g&&g.replace,enableViewTransition:g&&g.viewTransition,flushSync:Q})}function Xd(){if(Gi(),Fe({revalidation:"loading"}),y.navigation.state!=="submitting"){if(y.navigation.state==="idle"){pn(y.historyAction,y.location,{startUninterruptedRevalidation:!0});return}pn(P||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation,enableViewTransition:Z===!0})}}async function pn(h,g,S){D&&D.abort(),D=null,P=h,Ce=(S&&S.startUninterruptedRevalidation)===!0,lp(y.location,y.matches),B=(S&&S.preventScrollReset)===!0,Z=(S&&S.enableViewTransition)===!0;let R=a||o,M=S&&S.overrideNavigation,A=S!=null&&S.initialHydration&&y.matches&&y.matches.length>0&&!v?y.matches:gn(R,g,u),V=(S&&S.flushSync)===!0;if(A&&y.initialized&&!at&&gv(y.location,g)&&!(S&&S.submission&&dt(S.submission.formMethod))){Un(g,{matches:A},{flushSync:V});return}let U=kl(A,R,g.pathname);if(U.active&&U.matches&&(A=U.matches),!A){let{error:re,notFoundMatches:J,route:de}=Ji(g.pathname);Un(g,{matches:J,loaderData:{},errors:{[de.id]:re}},{flushSync:V});return}D=new AbortController;let I=$n(e.history,g,D.signal,S&&S.submission),F;if(S&&S.pendingError)F=[wn(A).route.id,{type:q.error,error:S.pendingError}];else if(S&&S.submission&&dt(S.submission.formMethod)){let re=await Gd(I,g,S.submission,A,U.active,{replace:S.replace,flushSync:V});if(re.shortCircuited)return;if(re.pendingActionResult){let[J,de]=re.pendingActionResult;if(Xe(de)&&fl(de.error)&&de.error.status===404){D=null,Un(g,{matches:re.matches,loaderData:{},errors:{[J]:de.error}});return}}A=re.matches||A,F=re.pendingActionResult,M=Lo(g,S.submission),V=!1,U.active=!1,I=$n(e.history,I.url,I.signal)}let{shortCircuited:j,matches:Q,loaderData:Y,errors:Pe}=await Jd(I,g,A,U.active,M,S&&S.submission,S&&S.fetcherSubmission,S&&S.replace,S&&S.initialHydration===!0,V,F);j||(D=null,Un(g,ae({matches:Q||A},oc(F),{loaderData:Y,errors:Pe})))}async function Gd(h,g,S,R,M,A){A===void 0&&(A={}),Gi();let V=Cv(g,S);if(Fe({navigation:V},{flushSync:A.flushSync===!0}),M){let F=await xl(R,g.pathname,h.signal);if(F.type==="aborted")return{shortCircuited:!0};if(F.type==="error"){let j=wn(F.partialMatches).route.id;return{matches:F.partialMatches,pendingActionResult:[j,{type:q.error,error:F.error}]}}else if(F.matches)R=F.matches;else{let{notFoundMatches:j,error:Q,route:Y}=Ji(g.pathname);return{matches:j,pendingActionResult:[Y.id,{type:q.error,error:Q}]}}}let U,I=Ir(R,g);if(!I.route.action&&!I.route.lazy)U={type:q.error,error:Be(405,{method:h.method,pathname:g.pathname,routeId:I.route.id})};else if(U=(await gr("action",y,h,[I],R,null))[I.route.id],h.signal.aborted)return{shortCircuited:!0};if(xn(U)){let F;return A&&A.replace!=null?F=A.replace:F=nc(U.response.headers.get("Location"),new URL(h.url),u,e.history)===y.location.pathname+y.location.search,await hn(h,U,!0,{submission:S,replace:F}),{shortCircuited:!0}}if(qt(U))throw Be(400,{type:"defer-action"});if(Xe(U)){let F=wn(R,I.route.id);return(A&&A.replace)!==!0&&(P=me.Push),{matches:R,pendingActionResult:[F.route.id,U]}}return{matches:R,pendingActionResult:[I.route.id,U]}}async function Jd(h,g,S,R,M,A,V,U,I,F,j){let Q=M||Lo(g,A),Y=A||V||sc(Q),Pe=!Ce&&(!f.v7_partialHydration||!I);if(R){if(Pe){let pe=Lu(j);Fe(ae({navigation:Q},pe!==void 0?{actionData:pe}:{}),{flushSync:F})}let G=await xl(S,g.pathname,h.signal);if(G.type==="aborted")return{shortCircuited:!0};if(G.type==="error"){let pe=wn(G.partialMatches).route.id;return{matches:G.partialMatches,loaderData:{},errors:{[pe]:G.error}}}else if(G.matches)S=G.matches;else{let{error:pe,notFoundMatches:jn,route:Er}=Ji(g.pathname);return{matches:jn,loaderData:{},errors:{[Er.id]:pe}}}}let re=a||o,[J,de]=bs(e.history,y,S,Y,g,f.v7_partialHydration&&I===!0,f.v7_skipActionErrorRevalidation,at,Bt,$t,ze,ut,te,re,u,j);if(Zi(G=>!(S&&S.some(pe=>pe.route.id===G))||J&&J.some(pe=>pe.route.id===G)),H=++$,J.length===0&&de.length===0){let G=Mu();return Un(g,ae({matches:S,loaderData:{},errors:j&&Xe(j[1])?{[j[0]]:j[1].error}:null},oc(j),G?{fetchers:new Map(y.fetchers)}:{}),{flushSync:F}),{shortCircuited:!0}}if(Pe){let G={};if(!R){G.navigation=Q;let pe=Lu(j);pe!==void 0&&(G.actionData=pe)}de.length>0&&(G.fetchers=Zd(de)),Fe(G,{flushSync:F})}de.forEach(G=>{Ht(G.key),G.controller&&N.set(G.key,G.controller)});let In=()=>de.forEach(G=>Ht(G.key));D&&D.signal.addEventListener("abort",In);let{loaderResults:wr,fetcherResults:Pt}=await Tu(y,S,J,de,h);if(h.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener("abort",In),de.forEach(G=>N.delete(G.key));let yt=Hl(wr);if(yt)return await hn(h,yt.result,!0,{replace:U}),{shortCircuited:!0};if(yt=Hl(Pt),yt)return te.add(yt.key),await hn(h,yt.result,!0,{replace:U}),{shortCircuited:!0};let{loaderData:qi,errors:Sr}=lc(y,S,wr,j,de,Pt,Oe);Oe.forEach((G,pe)=>{G.subscribe(jn=>{(jn||G.done)&&Oe.delete(pe)})}),f.v7_partialHydration&&I&&y.errors&&(Sr=ae({},y.errors,Sr));let mn=Mu(),Cl=zu(H),Pl=mn||Cl||de.length>0;return ae({matches:S,loaderData:qi,errors:Sr},Pl?{fetchers:new Map(y.fetchers)}:{})}function Lu(h){if(h&&!Xe(h[1]))return{[h[0]]:h[1].data};if(y.actionData)return Object.keys(y.actionData).length===0?null:y.actionData}function Zd(h){return h.forEach(g=>{let S=y.fetchers.get(g.key),R=Dr(void 0,S?S.data:void 0);y.fetchers.set(g.key,R)}),new Map(y.fetchers)}function qd(h,g,S,R){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Ht(h);let M=(R&&R.flushSync)===!0,A=a||o,V=Ea(y.location,y.matches,u,f.v7_prependBasename,S,f.v7_relativeSplatPath,g,R?.relative),U=gn(A,V,u),I=kl(U,A,V);if(I.active&&I.matches&&(U=I.matches),!U){Ct(h,g,Be(404,{pathname:V}),{flushSync:M});return}let{path:F,submission:j,error:Q}=Zs(f.v7_normalizeFormMethod,!0,V,R);if(Q){Ct(h,g,Q,{flushSync:M});return}let Y=Ir(U,F),Pe=(R&&R.preventScrollReset)===!0;if(j&&dt(j.formMethod)){bd(h,g,F,Y,U,I.active,M,Pe,j);return}ut.set(h,{routeId:g,path:F}),ep(h,g,F,Y,U,I.active,M,Pe,j)}async function bd(h,g,S,R,M,A,V,U,I){Gi(),ut.delete(h);function F(ye){if(!ye.route.action&&!ye.route.lazy){let An=Be(405,{method:I.formMethod,pathname:S,routeId:g});return Ct(h,g,An,{flushSync:V}),!0}return!1}if(!A&&F(R))return;let j=y.fetchers.get(h);Vt(h,Pv(I,j),{flushSync:V});let Q=new AbortController,Y=$n(e.history,S,Q.signal,I);if(A){let ye=await xl(M,new URL(Y.url).pathname,Y.signal,h);if(ye.type==="aborted")return;if(ye.type==="error"){Ct(h,g,ye.error,{flushSync:V});return}else if(ye.matches){if(M=ye.matches,R=Ir(M,S),F(R))return}else{Ct(h,g,Be(404,{pathname:S}),{flushSync:V});return}}N.set(h,Q);let Pe=$,J=(await gr("action",y,Y,[R],M,h))[R.route.id];if(Y.signal.aborted){N.get(h)===Q&&N.delete(h);return}if(f.v7_fetcherPersist&&ze.has(h)){if(xn(J)||Xe(J)){Vt(h,Qt(void 0));return}}else{if(xn(J))if(N.delete(h),H>Pe){Vt(h,Qt(void 0));return}else return te.add(h),Vt(h,Dr(I)),hn(Y,J,!1,{fetcherSubmission:I,preventScrollReset:U});if(Xe(J)){Ct(h,g,J.error);return}}if(qt(J))throw Be(400,{type:"defer-action"});let de=y.navigation.location||y.location,In=$n(e.history,de,Q.signal),wr=a||o,Pt=y.navigation.state!=="idle"?gn(wr,y.navigation.location,u):y.matches;W(Pt,"Didn't find any matches after fetcher action");let yt=++$;ee.set(h,yt);let qi=Dr(I,J.data);y.fetchers.set(h,qi);let[Sr,mn]=bs(e.history,y,Pt,I,de,!1,f.v7_skipActionErrorRevalidation,at,Bt,$t,ze,ut,te,wr,u,[R.route.id,J]);mn.filter(ye=>ye.key!==h).forEach(ye=>{let An=ye.key,ju=y.fetchers.get(An),ap=Dr(void 0,ju?ju.data:void 0);y.fetchers.set(An,ap),Ht(An),ye.controller&&N.set(An,ye.controller)}),Fe({fetchers:new Map(y.fetchers)});let Cl=()=>mn.forEach(ye=>Ht(ye.key));Q.signal.addEventListener("abort",Cl);let{loaderResults:Pl,fetcherResults:G}=await Tu(y,Pt,Sr,mn,In);if(Q.signal.aborted)return;Q.signal.removeEventListener("abort",Cl),ee.delete(h),N.delete(h),mn.forEach(ye=>N.delete(ye.key));let pe=Hl(Pl);if(pe)return hn(In,pe.result,!1,{preventScrollReset:U});if(pe=Hl(G),pe)return te.add(pe.key),hn(In,pe.result,!1,{preventScrollReset:U});let{loaderData:jn,errors:Er}=lc(y,Pt,Pl,void 0,mn,G,Oe);if(y.fetchers.has(h)){let ye=Qt(J.data);y.fetchers.set(h,ye)}zu(yt),y.navigation.state==="loading"&&yt>H?(W(P,"Expected pending action"),D&&D.abort(),Un(y.navigation.location,{matches:Pt,loaderData:jn,errors:Er,fetchers:new Map(y.fetchers)})):(Fe({errors:Er,loaderData:ic(y.loaderData,jn,Pt,Er),fetchers:new Map(y.fetchers)}),at=!1)}async function ep(h,g,S,R,M,A,V,U,I){let F=y.fetchers.get(h);Vt(h,Dr(I,F?F.data:void 0),{flushSync:V});let j=new AbortController,Q=$n(e.history,S,j.signal);if(A){let J=await xl(M,new URL(Q.url).pathname,Q.signal,h);if(J.type==="aborted")return;if(J.type==="error"){Ct(h,g,J.error,{flushSync:V});return}else if(J.matches)M=J.matches,R=Ir(M,S);else{Ct(h,g,Be(404,{pathname:S}),{flushSync:V});return}}N.set(h,j);let Y=$,re=(await gr("loader",y,Q,[R],M,h))[R.route.id];if(qt(re)&&(re=await xu(re,Q.signal,!0)||re),N.get(h)===j&&N.delete(h),!Q.signal.aborted){if(ze.has(h)){Vt(h,Qt(void 0));return}if(xn(re))if(H>Y){Vt(h,Qt(void 0));return}else{te.add(h),await hn(Q,re,!1,{preventScrollReset:U});return}if(Xe(re)){Ct(h,g,re.error);return}W(!qt(re),"Unhandled fetcher deferred data"),Vt(h,Qt(re.data))}}async function hn(h,g,S,R){let{submission:M,fetcherSubmission:A,preventScrollReset:V,replace:U}=R===void 0?{}:R;g.response.headers.has("X-Remix-Revalidate")&&(at=!0);let I=g.response.headers.get("Location");W(I,"Expected a Location header on the redirect Response"),I=nc(I,new URL(h.url),u,e.history);let F=cl(y.location,I,{_isRedirect:!0});if(n){let J=!1;if(g.response.headers.has("X-Remix-Reload-Document"))J=!0;else if(ku.test(I)){const de=e.history.createURL(I);J=de.origin!==t.location.origin||Ut(de.pathname,u)==null}if(J){U?t.location.replace(I):t.location.assign(I);return}}D=null;let j=U===!0||g.response.headers.has("X-Remix-Replace")?me.Replace:me.Push,{formMethod:Q,formAction:Y,formEncType:Pe}=y.navigation;!M&&!A&&Q&&Y&&Pe&&(M=sc(y.navigation));let re=M||A;if(iv.has(g.response.status)&&re&&dt(re.formMethod))await pn(j,F,{submission:ae({},re,{formAction:I}),preventScrollReset:V||B,enableViewTransition:S?Z:void 0});else{let J=Lo(F,M);await pn(j,F,{overrideNavigation:J,fetcherSubmission:A,preventScrollReset:V||B,enableViewTransition:S?Z:void 0})}}async function gr(h,g,S,R,M,A){let V,U={};try{V=await pv(s,h,g,S,R,M,A,i,l)}catch(I){return R.forEach(F=>{U[F.route.id]={type:q.error,error:I}}),U}for(let[I,F]of Object.entries(V))if(wv(F)){let j=F.result;U[I]={type:q.redirect,response:vv(j,S,I,M,u,f.v7_relativeSplatPath)}}else U[I]=await mv(F);return U}async function Tu(h,g,S,R,M){let A=h.matches,V=gr("loader",h,M,S,g,null),U=Promise.all(R.map(async j=>{if(j.matches&&j.match&&j.controller){let Y=(await gr("loader",h,$n(e.history,j.path,j.controller.signal),[j.match],j.matches,j.key))[j.match.route.id];return{[j.key]:Y}}else return Promise.resolve({[j.key]:{type:q.error,error:Be(404,{pathname:j.path})}})})),I=await V,F=(await U).reduce((j,Q)=>Object.assign(j,Q),{});return await Promise.all([kv(g,I,M.signal,A,h.loaderData),xv(g,F,R)]),{loaderResults:I,fetcherResults:F}}function Gi(){at=!0,Bt.push(...Zi()),ut.forEach((h,g)=>{N.has(g)&&$t.add(g),Ht(g)})}function Vt(h,g,S){S===void 0&&(S={}),y.fetchers.set(h,g),Fe({fetchers:new Map(y.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function Ct(h,g,S,R){R===void 0&&(R={});let M=wn(y.matches,g);Sl(h),Fe({errors:{[M.route.id]:S},fetchers:new Map(y.fetchers)},{flushSync:(R&&R.flushSync)===!0})}function Nu(h){return Ke.set(h,(Ke.get(h)||0)+1),ze.has(h)&&ze.delete(h),y.fetchers.get(h)||ov}function Sl(h){let g=y.fetchers.get(h);N.has(h)&&!(g&&g.state==="loading"&&ee.has(h))&&Ht(h),ut.delete(h),ee.delete(h),te.delete(h),f.v7_fetcherPersist&&ze.delete(h),$t.delete(h),y.fetchers.delete(h)}function tp(h){let g=(Ke.get(h)||0)-1;g<=0?(Ke.delete(h),ze.add(h),f.v7_fetcherPersist||Sl(h)):Ke.set(h,g),Fe({fetchers:new Map(y.fetchers)})}function Ht(h){let g=N.get(h);g&&(g.abort(),N.delete(h))}function Du(h){for(let g of h){let S=Nu(g),R=Qt(S.data);y.fetchers.set(g,R)}}function Mu(){let h=[],g=!1;for(let S of te){let R=y.fetchers.get(S);W(R,"Expected fetcher: "+S),R.state==="loading"&&(te.delete(S),h.push(S),g=!0)}return Du(h),g}function zu(h){let g=[];for(let[S,R]of ee)if(R0}function np(h,g){let S=y.blockers.get(h)||Nr;return et.get(h)!==g&&et.set(h,g),S}function Ou(h){y.blockers.delete(h),et.delete(h)}function El(h,g){let S=y.blockers.get(h)||Nr;W(S.state==="unblocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="proceeding"||S.state==="blocked"&&g.state==="unblocked"||S.state==="proceeding"&&g.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+g.state);let R=new Map(y.blockers);R.set(h,g),Fe({blockers:R})}function Fu(h){let{currentLocation:g,nextLocation:S,historyAction:R}=h;if(et.size===0)return;et.size>1&&Dn(!1,"A router only supports one blocker at a time");let M=Array.from(et.entries()),[A,V]=M[M.length-1],U=y.blockers.get(A);if(!(U&&U.state==="proceeding")&&V({currentLocation:g,nextLocation:S,historyAction:R}))return A}function Ji(h){let g=Be(404,{pathname:h}),S=a||o,{matches:R,route:M}=ac(S);return Zi(),{notFoundMatches:R,route:M,error:g}}function Zi(h){let g=[];return Oe.forEach((S,R)=>{(!h||h(R))&&(S.cancel(),g.push(R),Oe.delete(R))}),g}function rp(h,g,S){if(E=h,L=g,k=S||null,!m&&y.navigation===_o){m=!0;let R=Iu(y.location,y.matches);R!=null&&Fe({restoreScrollPosition:R})}return()=>{E=null,L=null,k=null}}function Uu(h,g){return k&&k(h,g.map(R=>Um(R,y.loaderData)))||h.key}function lp(h,g){if(E&&L){let S=Uu(h,g);E[S]=L()}}function Iu(h,g){if(E){let S=Uu(h,g),R=E[S];if(typeof R=="number")return R}return null}function kl(h,g,S){if(d)if(h){if(Object.keys(h[0].params).length>0)return{active:!0,matches:ni(g,S,u,!0)}}else return{active:!0,matches:ni(g,S,u,!0)||[]};return{active:!1,matches:null}}async function xl(h,g,S,R){if(!d)return{type:"success",matches:h};let M=h;for(;;){let A=a==null,V=a||o,U=i;try{await d({signal:S,path:g,matches:M,fetcherKey:R,patch:(j,Q)=>{S.aborted||tc(j,Q,V,U,l)}})}catch(j){return{type:"error",error:j,partialMatches:M}}finally{A&&!S.aborted&&(o=[...o])}if(S.aborted)return{type:"aborted"};let I=gn(V,g,u);if(I)return{type:"success",matches:I};let F=ni(V,g,u,!0);if(!F||M.length===F.length&&M.every((j,Q)=>j.route.id===F[Q].route.id))return{type:"success",matches:null};M=F}}function ip(h){i={},a=_i(h,l,void 0,i)}function op(h,g){let S=a==null;tc(h,g,a||o,i,l),S&&(o=[...o],Fe({}))}return z={get basename(){return u},get future(){return f},get state(){return y},get routes(){return o},get window(){return t},initialize:Qd,subscribe:Yd,enableScrollRestoration:rp,navigate:_u,fetch:qd,revalidate:Xd,createHref:h=>e.history.createHref(h),encodeLocation:h=>e.history.encodeLocation(h),getFetcher:Nu,deleteFetcher:tp,dispose:Kd,getBlocker:np,deleteBlocker:Ou,patchRoutes:op,_internalFetchControllers:N,_internalActiveDeferreds:Oe,_internalSetRoutes:ip},z}function sv(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ea(e,t,n,r,l,i,o,a){let u,s;if(o){u=[];for(let f of t)if(u.push(f),f.route.id===o){s=f;break}}else u=t,s=t[t.length-1];let d=Ki(l||".",Qi(u,i),Ut(e.pathname,n)||e.pathname,a==="path");if(l==null&&(d.search=e.search,d.hash=e.hash),(l==null||l===""||l===".")&&s){let f=Cu(d.search);if(s.route.index&&!f)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&f){let p=new URLSearchParams(d.search),w=p.getAll("index");p.delete("index"),w.filter(k=>k).forEach(k=>p.append("index",k));let E=p.toString();d.search=E?"?"+E:""}}return r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Dt([n,d.pathname])),Mn(d)}function Zs(e,t,n,r){if(!r||!sv(r))return{path:n};if(r.formMethod&&!Ev(r.formMethod))return{path:n,error:Be(405,{method:r.formMethod})};let l=()=>({path:n,error:Be(400,{type:"invalid-body"})}),i=r.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),a=Fd(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!dt(o))return l();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((w,E)=>{let[k,L]=E;return""+w+k+"="+L+` `},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!dt(o))return l();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return l()}}}W(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=xa(r.formData),s=r.formData;else if(r.body instanceof FormData)u=xa(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=rc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=rc(u)}catch{return l()}let d={formMethod:o,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(dt(d.formMethod))return{path:n,submission:d};let f=jt(n);return t&&f.search&&Cu(f.search)&&u.append("index",""),f.search="?"+u,{path:Mn(f),submission:d}}function qs(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(l=>l.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function bs(e,t,n,r,l,i,o,a,u,s,d,f,p,w,E,k){let L=k?Xe(k[1])?k[1].error:k[1].data:void 0,m=e.createURL(t.location),c=e.createURL(l),v=n;i&&t.errors?v=qs(n,Object.keys(t.errors)[0],!0):k&&Xe(k[1])&&(v=qs(n,k[0]));let x=k?k[1].statusCode:void 0,T=o&&x&&x>=400,z=v.filter((P,B)=>{let{route:D}=P;if(D.lazy)return!0;if(D.loader==null)return!1;if(i)return ka(D,t.loaderData,t.errors);if(cv(t.loaderData,t.matches[B],P)||u.some(we=>we===P.route.id))return!0;let Z=t.matches[B],ne=P;return ec(P,ae({currentUrl:m,currentParams:Z.params,nextUrl:c,nextParams:ne.params},r,{actionResult:L,actionStatus:x,defaultShouldRevalidate:T?!1:a||m.pathname+m.search===c.pathname+c.search||m.search!==c.search||zd(Z,ne)}))}),y=[];return f.forEach((P,B)=>{if(i||!n.some(Ce=>Ce.route.id===P.routeId)||d.has(B))return;let D=gn(w,P.path,E);if(!D){y.push({key:B,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let Z=t.fetchers.get(B),ne=Ir(D,P.path),we=!1;p.has(B)?we=!1:s.has(B)?(s.delete(B),we=!0):Z&&Z.state!=="idle"&&Z.data===void 0?we=a:we=ec(ne,ae({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:c,nextParams:n[n.length-1].params},r,{actionResult:L,actionStatus:x,defaultShouldRevalidate:T?!1:a})),we&&y.push({key:B,routeId:P.routeId,path:P.path,matches:D,match:ne,controller:new AbortController})}),[z,y]}function ka(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,l=n!=null&&n[e.id]!==void 0;return!r&&l?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!l}function cv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function zd(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ec(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function tc(e,t,n,r,l){var i;let o;if(e){let s=r[e];W(s,"No route found to patch children into: routeId = "+e),s.children||(s.children=[]),o=s.children}else o=n;let a=t.filter(s=>!o.some(d=>Od(s,d))),u=_i(a,l,[e||"_","patch",String(((i=o)==null?void 0:i.length)||"0")],r);o.push(...u)}function Od(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var l;return(l=t.children)==null?void 0:l.some(i=>Od(n,i))}):!1}async function fv(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];W(l,"No route found in manifest");let i={};for(let o in r){let u=l[o]!==void 0&&o!=="hasErrorBoundary";Dn(!u,'Route "'+l.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!u&&!Om.has(o)&&(i[o]=r[o])}Object.assign(l,i),Object.assign(l,ae({},t(l),{lazy:void 0}))}async function dv(e){let{matches:t}=e,n=t.filter(l=>l.shouldLoad);return(await Promise.all(n.map(l=>l.resolve()))).reduce((l,i,o)=>Object.assign(l,{[n[o].route.id]:i}),{})}async function pv(e,t,n,r,l,i,o,a,u,s){let d=i.map(w=>w.route.lazy?fv(w.route,u,a):void 0),f=i.map((w,E)=>{let k=d[E],L=l.some(c=>c.route.id===w.route.id);return ae({},w,{shouldLoad:L,resolve:async c=>(c&&r.method==="GET"&&(w.route.lazy||w.route.loader)&&(L=!0),L?hv(t,r,w,k,c,s):Promise.resolve({type:q.data,result:void 0}))})}),p=await e({matches:f,request:r,params:i[0].params,fetcherKey:o,context:s});try{await Promise.all(d)}catch{}return p}async function hv(e,t,n,r,l,i){let o,a,u=s=>{let d,f=new Promise((E,k)=>d=k);a=()=>d(),t.signal.addEventListener("abort",a);let p=E=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):s({request:t,params:n.params,context:i},...E!==void 0?[E]:[]),w=(async()=>{try{return{type:"data",result:await(l?l(k=>p(k)):p())}}catch(E){return{type:"error",result:E}}})();return Promise.race([w,f])};try{let s=n.route[e];if(r)if(s){let d,[f]=await Promise.all([u(s).catch(p=>{d=p}),r]);if(d!==void 0)throw d;o=f}else if(await r,s=n.route[e],s)o=await u(s);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw Be(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:q.data,result:void 0};else if(s)o=await u(s);else{let d=new URL(t.url),f=d.pathname+d.search;throw Be(404,{pathname:f})}W(o.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(s){return{type:q.error,result:s}}finally{a&&t.signal.removeEventListener("abort",a)}return o}async function mv(e){let{result:t,type:n}=e;if(Ud(t)){let f;try{let p=t.headers.get("Content-Type");p&&/\bapplication\/json\b/.test(p)?t.body==null?f=null:f=await t.json():f=await t.text()}catch(p){return{type:q.error,error:p}}return n===q.error?{type:q.error,error:new Ti(t.status,t.statusText,f),statusCode:t.status,headers:t.headers}:{type:q.data,data:f,statusCode:t.status,headers:t.headers}}if(n===q.error){if(uc(t)){var r,l;if(t.data instanceof Error){var i,o;return{type:q.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}}return{type:q.error,error:new Ti(((r=t.init)==null?void 0:r.status)||500,void 0,t.data),statusCode:fl(t)?t.status:void 0,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}}return{type:q.error,error:t,statusCode:fl(t)?t.status:void 0}}if(Sv(t)){var a,u;return{type:q.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((u=t.init)==null?void 0:u.headers)&&new Headers(t.init.headers)}}if(uc(t)){var s,d;return{type:q.data,data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(d=t.init)!=null&&d.headers?new Headers(t.init.headers):void 0}}return{type:q.data,data:t}}function vv(e,t,n,r,l,i){let o=e.headers.get("Location");if(W(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!ku.test(o)){let a=r.slice(0,r.findIndex(u=>u.route.id===n)+1);o=Ea(new URL(t.url),a,l,!0,o,i),e.headers.set("Location",o)}return e}function nc(e,t,n,r){let l=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(ku.test(e)){let i=e,o=i.startsWith("//")?new URL(t.protocol+i):new URL(i);if(l.includes(o.protocol))throw new Error("Invalid redirect location");let a=Ut(o.pathname,n)!=null;if(o.origin===t.origin&&a)return Eu(o.pathname)+o.search+o.hash}try{let i=r.createURL(e);if(l.includes(i.protocol))throw new Error("Invalid redirect location")}catch{}return e}function $n(e,t,n,r){let l=e.createURL(Fd(t)).toString(),i={signal:n};if(r&&dt(r.formMethod)){let{formMethod:o,formEncType:a}=r;i.method=o.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(r.json)):a==="text/plain"?i.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?i.body=xa(r.formData):i.body=r.formData}return new Request(l,i)}function xa(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function rc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function yv(e,t,n,r,l){let i={},o=null,a,u=!1,s={},d=n&&Xe(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let p=f.route.id,w=t[p];if(W(!xn(w),"Cannot handle redirect results in processLoaderData"),Xe(w)){let E=w.error;d!==void 0&&(E=d,d=void 0),o=o||{};{let k=wn(e,p);o[k.route.id]==null&&(o[k.route.id]=E)}i[p]=void 0,u||(u=!0,a=fl(w.error)?w.error.status:500),w.headers&&(s[p]=w.headers)}else qt(w)?(r.set(p,w.deferredData),i[p]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!u&&(a=w.statusCode),w.headers&&(s[p]=w.headers)):(i[p]=w.data,w.statusCode&&w.statusCode!==200&&!u&&(a=w.statusCode),w.headers&&(s[p]=w.headers))}),d!==void 0&&n&&(o={[n[0]]:d},i[n[0]]=void 0),{loaderData:i,errors:o,statusCode:a||200,loaderHeaders:s}}function lc(e,t,n,r,l,i,o){let{loaderData:a,errors:u}=yv(t,n,r,o);return l.forEach(s=>{let{key:d,match:f,controller:p}=s,w=i[d];if(W(w,"Did not find corresponding fetcher result"),!(p&&p.signal.aborted))if(Xe(w)){let E=wn(e.matches,f?.route.id);u&&u[E.route.id]||(u=ae({},u,{[E.route.id]:w.error})),e.fetchers.delete(d)}else if(xn(w))W(!1,"Unhandled fetcher revalidation redirect");else if(qt(w))W(!1,"Unhandled fetcher deferred data");else{let E=Qt(w.data);e.fetchers.set(d,E)}}),{loaderData:a,errors:u}}function ic(e,t,n,r){let l=ae({},t);for(let i of n){let o=i.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(l[o]=t[o]):e[o]!==void 0&&i.route.loader&&(l[o]=e[o]),r&&r.hasOwnProperty(o))break}return l}function oc(e){return e?Xe(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function wn(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function ac(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Be(e,t){let{pathname:n,routeId:r,method:l,type:i,message:o}=t===void 0?{}:t,a="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(a="Bad Request",l&&n&&r?u="You made a "+l+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?u="defer() is not supported in actions":i==="invalid-body"&&(u="Unable to encode submission body")):e===403?(a="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",u='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",l&&n&&r?u="You made a "+l.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":l&&(u='Invalid request method "'+l.toUpperCase()+'"')),new Ti(e||500,a,new Error(u),!0)}function Hl(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,l]=t[n];if(xn(l))return{key:r,result:l}}}function Fd(e){let t=typeof e=="string"?jt(e):e;return Mn(ae({},t,{hash:""}))}function gv(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function wv(e){return Ud(e.result)&&lv.has(e.result.status)}function qt(e){return e.type===q.deferred}function Xe(e){return e.type===q.error}function xn(e){return(e&&e.type)===q.redirect}function uc(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Sv(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Ud(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ev(e){return rv.has(e.toLowerCase())}function dt(e){return tv.has(e.toLowerCase())}async function kv(e,t,n,r,l){let i=Object.entries(t);for(let o=0;op?.route.id===a);if(!s)continue;let d=r.find(p=>p.route.id===s.route.id),f=d!=null&&!zd(d,s)&&(l&&l[s.route.id])!==void 0;qt(u)&&f&&await xu(u,n,!1).then(p=>{p&&(t[a]=p)})}}async function xv(e,t,n){for(let r=0;rs?.route.id===i)&&qt(a)&&(W(o,"Expected an AbortController for revalidating fetcher deferred result"),await xu(a,o.signal,!0).then(s=>{s&&(t[l]=s)}))}}async function xu(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:q.data,data:e.deferredData.unwrappedData}}catch(l){return{type:q.error,error:l}}return{type:q.data,data:e.deferredData.data}}}function Cu(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ir(e,t){let n=typeof t=="string"?jt(t).search:t.search;if(e[e.length-1].route.index&&Cu(n||""))return e[e.length-1];let r=Nd(e);return r[r.length-1]}function sc(e){let{formMethod:t,formAction:n,formEncType:r,text:l,formData:i,json:o}=e;if(!(!t||!n||!r)){if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:l};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Lo(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Cv(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Dr(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Pv(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Qt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Rv(e,t){try{let n=e.sessionStorage.getItem(Md);if(n){let r=JSON.parse(n);for(let[l,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(l,new Set(i||[]))}}catch{}}function _v(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(Md,JSON.stringify(n))}catch(r){Dn(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.30.4 * * 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 */function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),C.useCallback(function(s,d){if(d===void 0&&(d={}),!a.current)return;if(typeof s=="number"){r.go(s);return}let f=Ki(s,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Dt([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,i,e])}const Nv=C.createContext(null);function Dv(e){let t=C.useContext(xt).outlet;return t&&C.createElement(Nv.Provider,{value:e},t)}function my(){let{matches:e}=C.useContext(xt),t=e[e.length-1];return t?t.params:{}}function Xi(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(At),{matches:l}=C.useContext(xt),{pathname:i}=Fn(),o=JSON.stringify(Qi(l,r.v7_relativeSplatPath));return C.useMemo(()=>Ki(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Mv(e,t){return Ad(e,t)}function Ad(e,t,n,r){yr()||W(!1);let{navigator:l}=C.useContext(At),{matches:i}=C.useContext(xt),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let s=Fn(),d;if(t){var f;let L=typeof t=="string"?jt(t):t;u==="/"||(f=L.pathname)!=null&&f.startsWith(u)||W(!1),d=L}else d=s;let p=d.pathname||"/",w=p;if(u!=="/"){let L=u.replace(/^\//,"").split("/");w="/"+p.replace(/^\//,"").split("/").slice(L.length).join("/")}let E=gn(e,{pathname:w}),k=Iv(E&&E.map(L=>Object.assign({},L,{params:Object.assign({},a,L.params),pathname:Dt([u,l.encodeLocation?l.encodeLocation(L.pathname).pathname:L.pathname]),pathnameBase:L.pathnameBase==="/"?u:Dt([u,l.encodeLocation?l.encodeLocation(L.pathnameBase).pathname:L.pathnameBase])})),i,n,r);return t&&k?C.createElement(Yi.Provider,{value:{location:dl({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:me.Pop}},k):k}function zv(){let e=$v(),t=fl(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:l},n):null,null)}const Ov=C.createElement(zv,null);class Fv extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?C.createElement(xt.Provider,{value:this.props.routeContext},C.createElement(Id.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Uv(e){let{routeContext:t,match:n,children:r}=e,l=C.useContext(gl);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(xt.Provider,{value:t},r)}function Iv(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(l=n)==null?void 0:l.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&a?.[f.route.id]!==void 0);d>=0||W(!1),o=o.slice(0,Math.min(o.length,d+1))}let u=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,s+1):o=[o[0]];break}}}return o.reduceRight((d,f,p)=>{let w,E=!1,k=null,L=null;n&&(w=a&&f.route.id?a[f.route.id]:void 0,k=f.route.errorElement||Ov,u&&(s<0&&p===0?(Hv("route-fallback"),E=!0,L=null):s===p&&(E=!0,L=f.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,p+1)),c=()=>{let v;return w?v=k:E?v=L:f.route.Component?v=C.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,C.createElement(Uv,{match:f,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?C.createElement(Fv,{location:n.location,revalidation:n.revalidation,component:k,error:w,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()},null)}var Bd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Bd||{}),$d=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}($d||{});function jv(e){let t=C.useContext(gl);return t||W(!1),t}function Av(e){let t=C.useContext(Pu);return t||W(!1),t}function Bv(e){let t=C.useContext(xt);return t||W(!1),t}function Vd(e){let t=Bv(),n=t.matches[t.matches.length-1];return n.route.id||W(!1),n.route.id}function $v(){var e;let t=C.useContext(Id),n=Av($d.UseRouteError),r=Vd();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Vv(){let{router:e}=jv(Bd.UseNavigateStable),t=Vd(),n=C.useRef(!1);return jd(()=>{n.current=!0}),C.useCallback(function(l,i){i===void 0&&(i={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,dl({fromRouteId:t},i)))},[e,t])}const cc={};function Hv(e,t,n){cc[e]||(cc[e]=!0)}function Wv(e,t){e?.v7_startTransition,e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function vy(e){let{to:t,replace:n,state:r,relative:l}=e;yr()||W(!1);let{future:i,static:o}=C.useContext(At),{matches:a}=C.useContext(xt),{pathname:u}=Fn(),s=Ru(),d=Ki(t,Qi(a,i.v7_relativeSplatPath),u,l==="path"),f=JSON.stringify(d);return C.useEffect(()=>s(JSON.parse(f),{replace:n,state:r,relative:l}),[s,f,l,n,r]),null}function yy(e){return Dv(e.context)}function Qv(e){W(!1)}function Kv(e){let{basename:t="/",children:n=null,location:r,navigationType:l=me.Pop,navigator:i,static:o=!1,future:a}=e;yr()&&W(!1);let u=t.replace(/^\/*/,"/"),s=C.useMemo(()=>({basename:u,navigator:i,static:o,future:dl({v7_relativeSplatPath:!1},a)}),[u,a,i,o]);typeof r=="string"&&(r=jt(r));let{pathname:d="/",search:f="",hash:p="",state:w=null,key:E="default"}=r,k=C.useMemo(()=>{let L=Ut(d,u);return L==null?null:{location:{pathname:L,search:f,hash:p,state:w,key:E},navigationType:l}},[u,d,f,p,w,E,l]);return k==null?null:C.createElement(At.Provider,{value:s},C.createElement(Yi.Provider,{children:n,value:k}))}function gy(e){let{children:t,location:n}=e;return Mv(Ca(t),n)}new Promise(()=>{});function Ca(e,t){t===void 0&&(t=[]);let n=[];return C.Children.forEach(e,(r,l)=>{if(!C.isValidElement(r))return;let i=[...t,l];if(r.type===C.Fragment){n.push.apply(n,Ca(r.props.children,i));return}r.type!==Qv&&W(!1),!r.props.index||!r.props.children||W(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ca(r.props.children,i)),n.push(o)}),n}function Yv(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.30.4 * * 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 */function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function Jv(e,t){let n=Pa(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(i=>{n.append(l,i)})}),n}const Zv=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],qv=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],bv="6";try{window.__reactRouterVersion=bv}catch{}function wy(e,t){return uv({basename:void 0,future:pr({},void 0,{v7_prependBasename:!0}),history:Dm({window:void 0}),hydrationData:ey(),routes:e,mapRouteProperties:Yv,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function ey(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=pr({},t,{errors:ty(t.errors)})),t}function ty(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,l]of t)if(l&&l.__type==="RouteErrorResponse")n[r]=new Ti(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let i=window[l.__subType];if(typeof i=="function")try{let o=new i(l.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let i=new Error(l.message);i.stack="",n[r]=i}}else n[r]=l;return n}const Wd=C.createContext({isTransitioning:!1}),ny=C.createContext(new Map),ry="startTransition",fc=Cp[ry],ly="flushSync",dc=Nm[ly];function iy(e){fc?fc(e):e()}function Mr(e){dc?dc(e):e()}class oy{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Sy(e){let{fallbackElement:t,router:n,future:r}=e,[l,i]=C.useState(n.state),[o,a]=C.useState(),[u,s]=C.useState({isTransitioning:!1}),[d,f]=C.useState(),[p,w]=C.useState(),[E,k]=C.useState(),L=C.useRef(new Map),{v7_startTransition:m}=r||{},c=C.useCallback(P=>{m?iy(P):P()},[m]),v=C.useCallback((P,B)=>{let{deletedFetchers:D,flushSync:Z,viewTransitionOpts:ne}=B;P.fetchers.forEach((Ce,at)=>{Ce.data!==void 0&&L.current.set(at,Ce.data)}),D.forEach(Ce=>L.current.delete(Ce));let we=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!ne||we){Z?Mr(()=>i(P)):c(()=>i(P));return}if(Z){Mr(()=>{p&&(d&&d.resolve(),p.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation})});let Ce=n.window.document.startViewTransition(()=>{Mr(()=>i(P))});Ce.finished.finally(()=>{Mr(()=>{f(void 0),w(void 0),a(void 0),s({isTransitioning:!1})})}),Mr(()=>w(Ce));return}p?(d&&d.resolve(),p.skipTransition(),k({state:P,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation})):(a(P),s({isTransitioning:!0,flushSync:!1,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation}))},[n.window,p,d,L,c]);C.useLayoutEffect(()=>n.subscribe(v),[n,v]),C.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new oy)},[u]),C.useEffect(()=>{if(d&&o&&n.window){let P=o,B=d.promise,D=n.window.document.startViewTransition(async()=>{c(()=>i(P)),await B});D.finished.finally(()=>{f(void 0),w(void 0),a(void 0),s({isTransitioning:!1})}),w(D)}},[c,o,d,n.window]),C.useEffect(()=>{d&&o&&l.location.key===o.location.key&&d.resolve()},[d,p,l.location,o]),C.useEffect(()=>{!u.isTransitioning&&E&&(a(E.state),s({isTransitioning:!0,flushSync:!1,currentLocation:E.currentLocation,nextLocation:E.nextLocation}),k(void 0))},[u.isTransitioning,E]),C.useEffect(()=>{},[]);let x=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:P=>n.navigate(P),push:(P,B,D)=>n.navigate(P,{state:B,preventScrollReset:D?.preventScrollReset}),replace:(P,B,D)=>n.navigate(P,{replace:!0,state:B,preventScrollReset:D?.preventScrollReset})}),[n]),T=n.basename||"/",z=C.useMemo(()=>({router:n,navigator:x,static:!1,basename:T}),[n,x,T]),y=C.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return C.useEffect(()=>Wv(r,n.future),[r,n.future]),C.createElement(C.Fragment,null,C.createElement(gl.Provider,{value:z},C.createElement(Pu.Provider,{value:l},C.createElement(ny.Provider,{value:L.current},C.createElement(Wd.Provider,{value:u},C.createElement(Kv,{basename:T,location:l.location,navigationType:l.historyAction,navigator:x,future:y},l.initialized||n.future.v7_partialHydration?C.createElement(ay,{routes:n.routes,future:n.future,state:l}):t))))),null)}const ay=C.memo(uy);function uy(e){let{routes:t,future:n,state:r}=e;return Ad(t,void 0,r,n)}const sy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fy=C.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:o,state:a,target:u,to:s,preventScrollReset:d,viewTransition:f}=t,p=Hd(t,Zv),{basename:w}=C.useContext(At),E,k=!1;if(typeof s=="string"&&cy.test(s)&&(E=s,sy))try{let v=new URL(window.location.href),x=s.startsWith("//")?new URL(v.protocol+s):new URL(s),T=Ut(x.pathname,w);x.origin===v.origin&&T!=null?s=T+x.search+x.hash:k=!0}catch{}let L=Lv(s,{relative:l}),m=py(s,{replace:o,state:a,target:u,preventScrollReset:d,relative:l,viewTransition:f});function c(v){r&&r(v),v.defaultPrevented||m(v)}return C.createElement("a",pr({},p,{href:E||L,onClick:k||i?r:c,ref:n,target:u}))}),Ey=C.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:o=!1,style:a,to:u,viewTransition:s,children:d}=t,f=Hd(t,qv),p=Xi(u,{relative:f.relative}),w=Fn(),E=C.useContext(Pu),{navigator:k,basename:L}=C.useContext(At),m=E!=null&&hy(p)&&s===!0,c=k.encodeLocation?k.encodeLocation(p).pathname:p.pathname,v=w.pathname,x=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;l||(v=v.toLowerCase(),x=x?x.toLowerCase():null,c=c.toLowerCase()),x&&L&&(x=Ut(x,L)||x);const T=c!=="/"&&c.endsWith("/")?c.length-1:c.length;let z=v===c||!o&&v.startsWith(c)&&v.charAt(T)==="/",y=x!=null&&(x===c||!o&&x.startsWith(c)&&x.charAt(c.length)==="/"),P={isActive:z,isPending:y,isTransitioning:m},B=z?r:void 0,D;typeof i=="function"?D=i(P):D=[i,z?"active":null,y?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let Z=typeof a=="function"?a(P):a;return C.createElement(fy,pr({},f,{"aria-current":B,className:D,ref:n,style:Z,to:u,viewTransition:s}),typeof d=="function"?d(P):d)});var Ra;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ra||(Ra={}));var pc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(pc||(pc={}));function dy(e){let t=C.useContext(gl);return t||W(!1),t}function py(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,u=Ru(),s=Fn(),d=Xi(e,{relative:o});return C.useCallback(f=>{if(Gv(f,n)){f.preventDefault();let p=r!==void 0?r:Mn(s)===Mn(d);u(e,{replace:p,state:l,preventScrollReset:i,relative:o,viewTransition:a})}},[s,u,d,r,l,n,e,i,o,a])}function ky(e){let t=C.useRef(Pa(e)),n=C.useRef(!1),r=Fn(),l=C.useMemo(()=>Jv(r.search,n.current?null:t.current),[r.search]),i=Ru(),o=C.useCallback((a,u)=>{const s=Pa(typeof a=="function"?a(l):a);n.current=!0,i("?"+s,u)},[i,l]);return[l,o]}function hy(e,t){t===void 0&&(t={});let n=C.useContext(Wd);n==null&&W(!1);let{basename:r}=dy(Ra.useViewTransitionState),l=Xi(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Ut(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ut(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Li(l.pathname,o)!=null||Li(l.pathname,i)!=null}export{fy as L,Ey as N,yy as O,xp as R,_d as a,Cp as b,Fn as c,vy as d,ky as e,my as f,gy as g,Qv as h,wy as i,Sy as j,C as r,Ru as u,Tm as v};