diff --git a/assets/index-HIvhbFdc.js b/assets/index-HIvhbFdc.js new file mode 100644 index 0000000..b869f9c --- /dev/null +++ b/assets/index-HIvhbFdc.js @@ -0,0 +1,68 @@ +var Mm=Object.defineProperty;var Om=(e,t,n)=>t in e?Mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kr=(e,t,n)=>(Om(e,typeof t!="symbol"?t+"":t,n),n),Ca=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var v=(e,t,n)=>(Ca(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},M=(e,t,n,r)=>(Ca(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Hi=(e,t,n,r)=>({set _(l){M(e,t,l,n)},get _(){return v(e,t,r)}}),W=(e,t,n)=>(Ca(e,t,"access private method"),n);function Pf(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function Rf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _f={exports:{}},Zo={},Tf={exports:{}},q={};/** + * @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 ji=Symbol.for("react.element"),Fm=Symbol.for("react.portal"),Im=Symbol.for("react.fragment"),Um=Symbol.for("react.strict_mode"),zm=Symbol.for("react.profiler"),Am=Symbol.for("react.provider"),Bm=Symbol.for("react.context"),$m=Symbol.for("react.forward_ref"),Vm=Symbol.for("react.suspense"),Qm=Symbol.for("react.memo"),Hm=Symbol.for("react.lazy"),Mc=Symbol.iterator;function Wm(e){return e===null||typeof e!="object"?null:(e=Mc&&e[Mc]||e["@@iterator"],typeof e=="function"?e:null)}var Lf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Nf=Object.assign,Df={};function yl(e,t,n){this.props=e,this.context=t,this.refs=Df,this.updater=n||Lf}yl.prototype.isReactComponent={};yl.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")};yl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jf(){}jf.prototype=yl.prototype;function yu(e,t,n){this.props=e,this.context=t,this.refs=Df,this.updater=n||Lf}var gu=yu.prototype=new jf;gu.constructor=yu;Nf(gu,yl.prototype);gu.isPureReactComponent=!0;var Oc=Array.isArray,Mf=Object.prototype.hasOwnProperty,wu={current:null},Of={key:!0,ref:!0,__self:!0,__source:!0};function Ff(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)Mf.call(t,r)&&!Of.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1>>1,le=F[b];if(0>>1;bl(xt,H))Bel(ln,xt)?(F[b]=ln,F[Be]=H,b=Be):(F[b]=xt,F[De]=H,b=De);else if(Bel(ln,H))F[b]=ln,F[Be]=H,b=Be;else break e}}return V}function l(F,V){var H=F.sortIndex-V.sortIndex;return H!==0?H:F.id-V.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 s=[],u=[],c=1,p=null,h=3,g=!1,x=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(F){for(var V=n(u);V!==null;){if(V.callback===null)r(u);else if(V.startTime<=F)r(u),V.sortIndex=V.expirationTime,t(s,V);else break;V=n(u)}}function k(F){if(S=!1,m(F),!x)if(n(s)!==null)x=!0,rn(N);else{var V=n(u);V!==null&&se(k,V.startTime-F)}}function N(F,V){x=!1,S&&(S=!1,d(L),L=-1),g=!0;var H=h;try{for(m(V),p=n(s);p!==null&&(!(p.expirationTime>V)||F&&!Z());){var b=p.callback;if(typeof b=="function"){p.callback=null,h=p.priorityLevel;var le=b(p.expirationTime<=V);V=e.unstable_now(),typeof le=="function"?p.callback=le:p===n(s)&&r(s),m(V)}else r(s);p=n(s)}if(p!==null)var Nt=!0;else{var De=n(u);De!==null&&se(k,De.startTime-V),Nt=!1}return Nt}finally{p=null,h=H,g=!1}}var y=!1,R=null,L=-1,O=5,B=-1;function Z(){return!(e.unstable_now()-BF||125b?(F.sortIndex=H,t(u,F),n(s)===null&&F===n(u)&&(S?(d(L),L=-1):S=!0,se(k,H-b))):(F.sortIndex=le,t(s,F),x||g||(x=!0,rn(N))),F},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(F){var V=h;return function(){var H=h;h=V;try{return F.apply(this,arguments)}finally{h=H}}}})(Af);zf.exports=Af;var lv=zf.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 Bf=P,lt=lv;function D(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"),os=Object.prototype.hasOwnProperty,iv=/^[: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]*$/,Ic={},Uc={};function ov(e){return os.call(Uc,e)?!0:os.call(Ic,e)?!1:iv.test(e)?Uc[e]=!0:(Ic[e]=!0,!1)}function av(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 sv(e,t,n,r){if(t===null||typeof t>"u"||av(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 We(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 Fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Fe[e]=new We(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Fe[t]=new We(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Fe[e]=new We(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Fe[e]=new We(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){Fe[e]=new We(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Fe[e]=new We(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Fe[e]=new We(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Fe[e]=new We(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Fe[e]=new We(e,5,!1,e.toLowerCase(),null,!1,!1)});var Su=/[\-:]([a-z])/g;function Eu(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(Su,Eu);Fe[t]=new We(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(Su,Eu);Fe[t]=new We(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(Su,Eu);Fe[t]=new We(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Fe[e]=new We(e,1,!1,e.toLowerCase(),null,!1,!1)});Fe.xlinkHref=new We("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Fe[e]=new We(e,1,!1,e.toLowerCase(),null,!0,!0)});function Cu(e,t,n,r){var l=Fe.hasOwnProperty(t)?Fe[t]:null;(l!==null?l.type!==0:r||!(2a||l[o]!==i[a]){var s=` +`+l[o].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=o&&0<=a);break}}}finally{Ra=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zl(e):""}function uv(e){switch(e.tag){case 5:return zl(e.type);case 16:return zl("Lazy");case 13:return zl("Suspense");case 19:return zl("SuspenseList");case 0:case 2:case 15:return e=_a(e.type,!1),e;case 11:return e=_a(e.type.render,!1),e;case 1:return e=_a(e.type,!0),e;default:return""}}function cs(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 _r:return"Fragment";case Rr:return"Portal";case as:return"Profiler";case ku:return"StrictMode";case ss:return"Suspense";case us:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qf:return(e.displayName||"Context")+".Consumer";case Vf:return(e._context.displayName||"Context")+".Provider";case Pu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ru:return t=e.displayName||null,t!==null?t:cs(e.type)||"Memo";case fn:t=e._payload,e=e._init;try{return cs(e(t))}catch{}}return null}function cv(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 cs(t);case 8:return t===ku?"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 In(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dv(e){var t=Wf(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 Gi(e){e._valueTracker||(e._valueTracker=dv(e))}function Kf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Wf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Co(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 ds(e,t){var n=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ac(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=In(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 Gf(e,t){t=t.checked,t!=null&&Cu(e,"checked",t,!1)}function fs(e,t){Gf(e,t);var n=In(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")?hs(e,t.type,n):t.hasOwnProperty("defaultValue")&&hs(e,t.type,In(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bc(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 hs(e,t,n){(t!=="number"||Co(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Al=Array.isArray;function Br(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Yi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ei(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ql={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},fv=["Webkit","ms","Moz","O"];Object.keys(Ql).forEach(function(e){fv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ql[t]=Ql[e]})});function Jf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ql.hasOwnProperty(e)&&Ql[e]?(""+t).trim():t+"px"}function Zf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Jf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var hv=he({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 vs(e,t){if(t){if(hv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function ys(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 gs=null;function _u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ws=null,$r=null,Vr=null;function Qc(e){if(e=Fi(e)){if(typeof ws!="function")throw Error(D(280));var t=e.stateNode;t&&(t=ra(t),ws(e.stateNode,e.type,t))}}function bf(e){$r?Vr?Vr.push(e):Vr=[e]:$r=e}function eh(){if($r){var e=$r,t=Vr;if(Vr=$r=null,Qc(e),t)for(e=0;e>>=0,e===0?32:31-(kv(e)/Pv|0)|0}var qi=64,Xi=4194304;function Bl(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 _o(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=Bl(a):(i&=o,i!==0&&(r=Bl(i)))}else o=n&~l,o!==0?r=Bl(o):i!==0&&(r=Bl(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 Mi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_t(t),e[t]=n}function Lv(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=Wl),Zc=" ",bc=!1;function xh(e,t){switch(e){case"keyup":return ry.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tr=!1;function iy(e,t){switch(e){case"compositionend":return Sh(t);case"keypress":return t.which!==32?null:(bc=!0,Zc);case"textInput":return e=t.data,e===Zc&&bc?null:e;default:return null}}function oy(e,t){if(Tr)return e==="compositionend"||!Fu&&xh(e,t)?(e=gh(),fo=ju=kn=null,Tr=!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=rd(n)}}function Ph(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ph(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rh(){for(var e=window,t=Co();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Co(e.document)}return t}function Iu(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 my(e){var t=Rh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ph(n.ownerDocument.documentElement,n)){if(r!==null&&Iu(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=ld(n,i);var o=ld(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,Lr=null,Ps=null,Gl=null,Rs=!1;function id(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rs||Lr==null||Lr!==Co(r)||(r=Lr,"selectionStart"in r&&Iu(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}),Gl&&oi(Gl,r)||(Gl=r,r=No(Ps,"onSelect"),0jr||(e.current=js[jr],js[jr]=null,jr--)}function re(e,t){jr++,js[jr]=e.current,e.current=t}var Un={},Ae=$n(Un),qe=$n(!1),cr=Un;function ul(e,t){var n=e.type.contextTypes;if(!n)return Un;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 Xe(e){return e=e.childContextTypes,e!=null}function jo(){ae(qe),ae(Ae)}function fd(e,t,n){if(Ae.current!==Un)throw Error(D(168));re(Ae,t),re(qe,n)}function Fh(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(D(108,cv(e)||"Unknown",l));return he({},n,r)}function Mo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Un,cr=Ae.current,re(Ae,e),re(qe,qe.current),!0}function hd(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=Fh(e,t,cr),r.__reactInternalMemoizedMergedChildContext=e,ae(qe),ae(Ae),re(Ae,e)):ae(qe),re(qe,n)}var Qt=null,la=!1,$a=!1;function Ih(e){Qt===null?Qt=[e]:Qt.push(e)}function _y(e){la=!0,Ih(e)}function Vn(){if(!$a&&Qt!==null){$a=!0;var e=0,t=ee;try{var n=Qt;for(ee=1;e>=o,l-=o,Kt=1<<32-_t(t)+l|n<L?(O=R,R=null):O=R.sibling;var B=h(d,R,m[L],k);if(B===null){R===null&&(R=O);break}e&&R&&B.alternate===null&&t(d,R),f=i(B,f,L),y===null?N=B:y.sibling=B,y=B,R=O}if(L===m.length)return n(d,R),ce&&Gn(d,L),N;if(R===null){for(;LL?(O=R,R=null):O=R.sibling;var Z=h(d,R,B.value,k);if(Z===null){R===null&&(R=O);break}e&&R&&Z.alternate===null&&t(d,R),f=i(Z,f,L),y===null?N=Z:y.sibling=Z,y=Z,R=O}if(B.done)return n(d,R),ce&&Gn(d,L),N;if(R===null){for(;!B.done;L++,B=m.next())B=p(d,B.value,k),B!==null&&(f=i(B,f,L),y===null?N=B:y.sibling=B,y=B);return ce&&Gn(d,L),N}for(R=r(d,R);!B.done;L++,B=m.next())B=g(R,d,L,B.value,k),B!==null&&(e&&B.alternate!==null&&R.delete(B.key===null?L:B.key),f=i(B,f,L),y===null?N=B:y.sibling=B,y=B);return e&&R.forEach(function(Se){return t(d,Se)}),ce&&Gn(d,L),N}function E(d,f,m,k){if(typeof m=="object"&&m!==null&&m.type===_r&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Ki:e:{for(var N=m.key,y=f;y!==null;){if(y.key===N){if(N=m.type,N===_r){if(y.tag===7){n(d,y.sibling),f=l(y,m.props.children),f.return=d,d=f;break e}}else if(y.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===fn&&xd(N)===y.type){n(d,y.sibling),f=l(y,m.props),f.ref=Nl(d,y,m),f.return=d,d=f;break e}n(d,y);break}else t(d,y);y=y.sibling}m.type===_r?(f=ur(m.props.children,d.mode,k,m.key),f.return=d,d=f):(k=xo(m.type,m.key,m.props,null,d.mode,k),k.ref=Nl(d,f,m),k.return=d,d=k)}return o(d);case Rr:e:{for(y=m.key;f!==null;){if(f.key===y)if(f.tag===4&&f.stateNode.containerInfo===m.containerInfo&&f.stateNode.implementation===m.implementation){n(d,f.sibling),f=l(f,m.children||[]),f.return=d,d=f;break e}else{n(d,f);break}else t(d,f);f=f.sibling}f=qa(m,d.mode,k),f.return=d,d=f}return o(d);case fn:return y=m._init,E(d,f,y(m._payload),k)}if(Al(m))return x(d,f,m,k);if(Pl(m))return S(d,f,m,k);ro(d,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,f!==null&&f.tag===6?(n(d,f.sibling),f=l(f,m),f.return=d,d=f):(n(d,f),f=Ya(m,d.mode,k),f.return=d,d=f),o(d)):n(d,f)}return E}var dl=Hh(!0),Wh=Hh(!1),Ii={},Bt=$n(Ii),ci=$n(Ii),di=$n(Ii);function Jn(e){if(e===Ii)throw Error(D(174));return e}function Wu(e,t){switch(re(di,t),re(ci,e),re(Bt,Ii),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ms(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ms(t,e)}ae(Bt),re(Bt,t)}function fl(){ae(Bt),ae(ci),ae(di)}function Kh(e){Jn(di.current);var t=Jn(Bt.current),n=ms(t,e.type);t!==n&&(re(ci,e),re(Bt,n))}function Ku(e){ci.current===e&&(ae(Bt),ae(ci))}var de=$n(0);function Ao(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Va=[];function Gu(){for(var e=0;en?n:4,e(!0);var r=Qa.transition;Qa.transition={};try{e(!1),t()}finally{ee=n,Qa.transition=r}}function sp(){return wt().memoizedState}function Dy(e,t,n){var r=jn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},up(e))cp(t,n);else if(n=Bh(e,t,n,r),n!==null){var l=Qe();Tt(n,e,r,l),dp(n,t,r)}}function jy(e,t,n){var r=jn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(up(e))cp(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,Lt(a,o)){var s=t.interleaved;s===null?(l.next=l,Qu(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=Bh(e,t,l,r),n!==null&&(l=Qe(),Tt(n,e,r,l),dp(n,t,r))}}function up(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function cp(e,t){Yl=Bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lu(e,n)}}var $o={readContext:gt,useCallback:Ie,useContext:Ie,useEffect:Ie,useImperativeHandle:Ie,useInsertionEffect:Ie,useLayoutEffect:Ie,useMemo:Ie,useReducer:Ie,useRef:Ie,useState:Ie,useDebugValue:Ie,useDeferredValue:Ie,useTransition:Ie,useMutableSource:Ie,useSyncExternalStore:Ie,useId:Ie,unstable_isNewReconciler:!1},My={readContext:gt,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Ed,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vo(4194308,4,rp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vo(4194308,4,e,t)},useInsertionEffect:function(e,t){return vo(4,2,e,t)},useMemo:function(e,t){var n=Mt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Mt();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=Dy.bind(null,fe,e),[r.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:Sd,useDebugValue:Zu,useDeferredValue:function(e){return Mt().memoizedState=e},useTransition:function(){var e=Sd(!1),t=e[0];return e=Ny.bind(null,e[1]),Mt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,l=Mt();if(ce){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),Ne===null)throw Error(D(349));fr&30||qh(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Ed(Jh.bind(null,r,i,e),[e]),r.flags|=2048,pi(9,Xh.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Mt(),t=Ne.identifierPrefix;if(ce){var n=Gt,r=Kt;n=(r&~(1<<32-_t(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=fi++,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[zt]=t,e[ui]=r,xp(e,t,!1,!1),t.stateNode=e;e:{switch(o=ys(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;l<$l.length;l++)ie($l[l],e);l=r;break;case"source":ie("error",e),l=r;break;case"img":case"image":case"link":ie("error",e),ie("load",e),l=r;break;case"details":ie("toggle",e),l=r;break;case"input":Ac(e,r),l=ds(e,r),ie("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=he({},r,{value:void 0}),ie("invalid",e);break;case"textarea":$c(e,r),l=ps(e,r),ie("invalid",e);break;default:l=r}vs(n,l),a=l;for(i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="style"?Zf(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&Xf(e,s)):i==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&ei(e,s):typeof s=="number"&&ei(e,""+s):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(bl.hasOwnProperty(i)?s!=null&&i==="onScroll"&&ie("scroll",e):s!=null&&Cu(e,i,s,o))}switch(n){case"input":Gi(e),Bc(e,r,!1);break;case"textarea":Gi(e),Vc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+In(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Br(e,!!r.multiple,i,!1):r.defaultValue!=null&&Br(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Do)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ue(t),null;case 6:if(e&&t.stateNode!=null)Ep(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=Jn(di.current),Jn(Bt.current),no(t)){if(r=t.stateNode,n=t.memoizedProps,r[zt]=t,(i=r.nodeValue!==n)&&(e=rt,e!==null))switch(e.tag){case 3:to(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&to(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[zt]=t,t.stateNode=r}return Ue(t),null;case 13:if(ae(de),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ce&&nt!==null&&t.mode&1&&!(t.flags&128))Ah(),cl(),t.flags|=98560,i=!1;else if(i=no(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(D(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(D(317));i[zt]=t}else cl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ue(t),i=!1}else Rt!==null&&(Js(Rt),Rt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||de.current&1?Pe===0&&(Pe=3):ic())),t.updateQueue!==null&&(t.flags|=4),Ue(t),null);case 4:return fl(),Qs(e,t),e===null&&ai(t.stateNode.containerInfo),Ue(t),null;case 10:return Vu(t.type._context),Ue(t),null;case 17:return Xe(t.type)&&jo(),Ue(t),null;case 19:if(ae(de),i=t.memoizedState,i===null)return Ue(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Dl(i,!1);else{if(Pe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ao(e),o!==null){for(t.flags|=128,Dl(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return re(de,de.current&1|2),t.child}e=e.sibling}i.tail!==null&&ge()>pl&&(t.flags|=128,r=!0,Dl(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ao(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Dl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ce)return Ue(t),null}else 2*ge()-i.renderingStartTime>pl&&n!==1073741824&&(t.flags|=128,r=!0,Dl(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=ge(),t.sibling=null,n=de.current,re(de,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return lc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?tt&1073741824&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function $y(e,t){switch(zu(t),t.tag){case 1:return Xe(t.type)&&jo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fl(),ae(qe),ae(Ae),Gu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ku(t),null;case 13:if(ae(de),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(de),null;case 4:return fl(),null;case 10:return Vu(t.type._context),null;case 22:case 23:return lc(),null;case 24:return null;default:return null}}var io=!1,ze=!1,Vy=typeof WeakSet=="function"?WeakSet:Set,I=null;function Ir(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){me(e,t,r)}else n.current=null}function Hs(e,t,n){try{n()}catch(r){me(e,t,r)}}var Dd=!1;function Qy(e,t){if(_s=To,e=Rh(),Iu(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,s=-1,u=0,c=0,p=e,h=null;t:for(;;){for(var g;p!==n||l!==0&&p.nodeType!==3||(a=o+l),p!==i||r!==0&&p.nodeType!==3||(s=o+r),p.nodeType===3&&(o+=p.nodeValue.length),(g=p.firstChild)!==null;)h=p,p=g;for(;;){if(p===e)break t;if(h===n&&++u===l&&(a=o),h===i&&++c===r&&(s=o),(g=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=g}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ts={focusedElem:e,selectionRange:n},To=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var S=x.memoizedProps,E=x.memoizedState,d=t.stateNode,f=d.getSnapshotBeforeUpdate(t.elementType===t.type?S:Et(t.type,S),E);d.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(k){me(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return x=Dd,Dd=!1,x}function ql(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&&Hs(t,n,i)}l=l.next}while(l!==r)}}function aa(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 Ws(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 Cp(e){var t=e.alternate;t!==null&&(e.alternate=null,Cp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[zt],delete t[ui],delete t[Ds],delete t[Py],delete t[Ry])),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 kp(e){return e.tag===5||e.tag===3||e.tag===4}function jd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kp(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 Ks(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=Do));else if(r!==4&&(e=e.child,e!==null))for(Ks(e,t,n),e=e.sibling;e!==null;)Ks(e,t,n),e=e.sibling}function Gs(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(Gs(e,t,n),e=e.sibling;e!==null;)Gs(e,t,n),e=e.sibling}var Me=null,kt=!1;function un(e,t,n){for(n=n.child;n!==null;)Pp(e,t,n),n=n.sibling}function Pp(e,t,n){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(bo,n)}catch{}switch(n.tag){case 5:ze||Ir(n,t);case 6:var r=Me,l=kt;Me=null,un(e,t,n),Me=r,kt=l,Me!==null&&(kt?(e=Me,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Me.removeChild(n.stateNode));break;case 18:Me!==null&&(kt?(e=Me,n=n.stateNode,e.nodeType===8?Ba(e.parentNode,n):e.nodeType===1&&Ba(e,n),li(e)):Ba(Me,n.stateNode));break;case 4:r=Me,l=kt,Me=n.stateNode.containerInfo,kt=!0,un(e,t,n),Me=r,kt=l;break;case 0:case 11:case 14:case 15:if(!ze&&(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)&&Hs(n,t,o),l=l.next}while(l!==r)}un(e,t,n);break;case 1:if(!ze&&(Ir(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){me(n,t,a)}un(e,t,n);break;case 21:un(e,t,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,un(e,t,n),ze=r):un(e,t,n);break;default:un(e,t,n)}}function Md(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Vy),t.forEach(function(r){var l=Zy.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=ge()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wy(r/1960))-r,10e?16:e,Pn===null)var r=!1;else{if(e=Pn,Pn=null,Ho=0,J&6)throw Error(D(331));var l=J;for(J|=4,I=e.current;I!==null;){var i=I,o=i.child;if(I.flags&16){var a=i.deletions;if(a!==null){for(var s=0;sge()-nc?sr(e,0):tc|=n),Je(e,t)}function Mp(e,t){t===0&&(e.mode&1?(t=Xi,Xi<<=1,!(Xi&130023424)&&(Xi=4194304)):t=1);var n=Qe();e=bt(e,t),e!==null&&(Mi(e,t,n),Je(e,n))}function Jy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Mp(e,n)}function Zy(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(D(314))}r!==null&&r.delete(t),Mp(e,n)}var Op;Op=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ye=!1,Ay(e,t,n);Ye=!!(e.flags&131072)}else Ye=!1,ce&&t.flags&1048576&&Uh(t,Fo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yo(e,t),e=t.pendingProps;var l=ul(t,Ae.current);Hr(t,n),l=qu(null,t,r,e,l,n);var i=Xu();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,Xe(r)?(i=!0,Mo(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Hu(t),l.updater=ia,t.stateNode=l,l._reactInternals=t,Us(t,r,e,n),t=Bs(null,t,r,!0,i,n)):(t.tag=0,ce&&i&&Uu(t),Ve(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yo(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=eg(r),e=Et(r,e),l){case 0:t=As(null,t,r,e,n);break e;case 1:t=Td(null,t,r,e,n);break e;case 11:t=Rd(null,t,r,e,n);break e;case 14:t=_d(null,t,r,Et(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Et(r,l),As(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Et(r,l),Td(e,t,r,l,n);case 3:e:{if(yp(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,l=i.element,$h(e,t),zo(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=hl(Error(D(423)),t),t=Ld(e,t,r,n,l);break e}else if(r!==l){l=hl(Error(D(424)),t),t=Ld(e,t,r,n,l);break e}else for(nt=Ln(t.stateNode.containerInfo.firstChild),rt=t,ce=!0,Rt=null,n=Wh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(cl(),r===l){t=en(e,t,n);break e}Ve(e,t,r,n)}t=t.child}return t;case 5:return Kh(t),e===null&&Os(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,Ls(r,l)?o=null:i!==null&&Ls(r,i)&&(t.flags|=32),vp(e,t),Ve(e,t,o,n),t.child;case 6:return e===null&&Os(t),null;case 13:return gp(e,t,n);case 4:return Wu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=dl(t,null,r,n):Ve(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Et(r,l),Rd(e,t,r,l,n);case 7:return Ve(e,t,t.pendingProps,n),t.child;case 8:return Ve(e,t,t.pendingProps.children,n),t.child;case 12:return Ve(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,re(Io,r._currentValue),r._currentValue=o,i!==null)if(Lt(i.value,o)){if(i.children===l.children&&!qe.current){t=en(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 s=a.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=qt(-1,n&-n),s.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Fs(i.return,n,t),a.lanes|=n;break}s=s.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(D(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Fs(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}Ve(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Hr(t,n),l=gt(l),r=r(l),t.flags|=1,Ve(e,t,r,n),t.child;case 14:return r=t.type,l=Et(r,t.pendingProps),l=Et(r.type,l),_d(e,t,r,l,n);case 15:return pp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Et(r,l),yo(e,t),t.tag=1,Xe(r)?(e=!0,Mo(t)):e=!1,Hr(t,n),Qh(t,r,l),Us(t,r,l,n),Bs(null,t,r,!0,e,n);case 19:return wp(e,t,n);case 22:return mp(e,t,n)}throw Error(D(156,t.tag))};function Fp(e,t){return ah(e,t)}function by(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 vt(e,t,n,r){return new by(e,t,n,r)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eg(e){if(typeof e=="function")return oc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pu)return 11;if(e===Ru)return 14}return 2}function Mn(e,t){var n=e.alternate;return n===null?(n=vt(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 xo(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")oc(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case _r:return ur(n.children,l,i,t);case ku:o=8,l|=8;break;case as:return e=vt(12,n,t,l|2),e.elementType=as,e.lanes=i,e;case ss:return e=vt(13,n,t,l),e.elementType=ss,e.lanes=i,e;case us:return e=vt(19,n,t,l),e.elementType=us,e.lanes=i,e;case Hf:return ua(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Vf:o=10;break e;case Qf:o=9;break e;case Pu:o=11;break e;case Ru:o=14;break e;case fn:o=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=vt(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function ur(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function ua(e,t,n,r){return e=vt(22,e,r,t),e.elementType=Hf,e.lanes=n,e.stateNode={isHidden:!1},e}function Ya(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function qa(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tg(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=La(0),this.expirationTimes=La(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=La(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function ac(e,t,n,r,l,i,o,a,s){return e=new tg(e,t,n,a,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=vt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hu(i),e}function ng(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ap)}catch(e){console.error(e)}}Ap(),Uf.exports=it;var dc=Uf.exports;const Bp=Rf(dc),ag=Pf({__proto__:null,default:Bp},[dc]);var $d=dc;is.createRoot=$d.createRoot,is.hydrateRoot=$d.hydrateRoot;var xl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ml=typeof window>"u"||"Deno"in window;function ft(){}function sg(e,t){return typeof e=="function"?e(t):e}function Zs(e){return typeof e=="number"&&e>=0&&e!==1/0}function $p(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vd(e,t){const{type:n="all",exact:r,fetchStatus:l,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==fc(o,t.options))return!1}else if(!vi(t.queryKey,o))return!1}if(n!=="all"){const s=t.isActive();if(n==="active"&&!s||n==="inactive"&&s)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof l<"u"&&l!==t.state.fetchStatus||i&&!i(t))}function Qd(e,t){const{exact:n,status:r,predicate:l,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(mr(t.options.mutationKey)!==mr(i))return!1}else if(!vi(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||l&&!l(t))}function fc(e,t){return((t==null?void 0:t.queryKeyHashFn)||mr)(e)}function mr(e){return JSON.stringify(e,(t,n)=>bs(n)?Object.keys(n).sort().reduce((r,l)=>(r[l]=n[l],r),{}):n)}function vi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!vi(e[n],t[n])):!1}function Vp(e,t){if(e===t)return e;const n=Hd(e)&&Hd(t);if(n||bs(e)&&bs(t)){const r=n?e.length:Object.keys(e).length,l=n?t:Object.keys(t),i=l.length,o=n?[]:{};let a=0;for(let s=0;s"u")return!0;const n=t.prototype;return!(!Wd(n)||!n.hasOwnProperty("isPrototypeOf"))}function Wd(e){return Object.prototype.toString.call(e)==="[object Object]"}function ug(e){return new Promise(t=>{setTimeout(t,e)})}function eu(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Vp(e,t):t}function cg(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function dg(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var er,vn,Kr,mf,fg=(mf=class extends xl{constructor(){super();U(this,er,void 0);U(this,vn,void 0);U(this,Kr,void 0);M(this,Kr,t=>{if(!ml&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){v(this,vn)||this.setEventListener(v(this,Kr))}onUnsubscribe(){var t;this.hasListeners()||((t=v(this,vn))==null||t.call(this),M(this,vn,void 0))}setEventListener(t){var n;M(this,Kr,t),(n=v(this,vn))==null||n.call(this),M(this,vn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){v(this,er)!==t&&(M(this,er,t),this.onFocus())}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){var t;return typeof v(this,er)=="boolean"?v(this,er):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},er=new WeakMap,vn=new WeakMap,Kr=new WeakMap,mf),Yo=new fg,Gr,yn,Yr,vf,hg=(vf=class extends xl{constructor(){super();U(this,Gr,!0);U(this,yn,void 0);U(this,Yr,void 0);M(this,Yr,t=>{if(!ml&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){v(this,yn)||this.setEventListener(v(this,Yr))}onUnsubscribe(){var t;this.hasListeners()||((t=v(this,yn))==null||t.call(this),M(this,yn,void 0))}setEventListener(t){var n;M(this,Yr,t),(n=v(this,yn))==null||n.call(this),M(this,yn,t(this.setOnline.bind(this)))}setOnline(t){v(this,Gr)!==t&&(M(this,Gr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return v(this,Gr)}},Gr=new WeakMap,yn=new WeakMap,Yr=new WeakMap,vf),qo=new hg;function pg(e){return Math.min(1e3*2**e,3e4)}function pa(e){return(e??"online")==="online"?qo.isOnline():!0}var Qp=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xa(e){return e instanceof Qp}function Hp(e){let t=!1,n=0,r=!1,l,i,o;const a=new Promise((E,d)=>{i=E,o=d}),s=E=>{var d;r||(g(new Qp(E)),(d=e.abort)==null||d.call(e))},u=()=>{t=!0},c=()=>{t=!1},p=()=>!Yo.isFocused()||e.networkMode!=="always"&&!qo.isOnline(),h=E=>{var d;r||(r=!0,(d=e.onSuccess)==null||d.call(e,E),l==null||l(),i(E))},g=E=>{var d;r||(r=!0,(d=e.onError)==null||d.call(e,E),l==null||l(),o(E))},x=()=>new Promise(E=>{var d;l=f=>{const m=r||!p();return m&&E(f),m},(d=e.onPause)==null||d.call(e)}).then(()=>{var E;l=void 0,r||(E=e.onContinue)==null||E.call(e)}),S=()=>{if(r)return;let E;try{E=e.fn()}catch(d){E=Promise.reject(d)}Promise.resolve(E).then(h).catch(d=>{var y;if(r)return;const f=e.retry??(ml?0:3),m=e.retryDelay??pg,k=typeof m=="function"?m(n,d):m,N=f===!0||typeof f=="number"&&n{if(p())return x()}).then(()=>{t?g(d):S()})})};return pa(e.networkMode)?S():x().then(S),{promise:a,cancel:s,continue:()=>(l==null?void 0:l())?a:Promise.resolve(),cancelRetry:u,continueRetry:c}}function mg(){let e=[],t=0,n=h=>{h()},r=h=>{h()},l=h=>setTimeout(h,0);const i=h=>{l=h},o=h=>{let g;t++;try{g=h()}finally{t--,t||u()}return g},a=h=>{t?e.push(h):l(()=>{n(h)})},s=h=>(...g)=>{a(()=>{h(...g)})},u=()=>{const h=e;e=[],h.length&&l(()=>{r(()=>{h.forEach(g=>{n(g)})})})};return{batch:o,batchCalls:s,schedule:a,setNotifyFunction:h=>{n=h},setBatchNotifyFunction:h=>{r=h},setScheduler:i}}var ke=mg(),tr,yf,Wp=(yf=class{constructor(){U(this,tr,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zs(this.gcTime)&&M(this,tr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ml?1/0:5*60*1e3))}clearGcTimeout(){v(this,tr)&&(clearTimeout(v(this,tr)),M(this,tr,void 0))}},tr=new WeakMap,yf),qr,Xr,ut,gn,ct,Te,wi,nr,Jr,So,Ct,$t,gf,vg=(gf=class extends Wp{constructor(t){super();U(this,Jr);U(this,Ct);U(this,qr,void 0);U(this,Xr,void 0);U(this,ut,void 0);U(this,gn,void 0);U(this,ct,void 0);U(this,Te,void 0);U(this,wi,void 0);U(this,nr,void 0);M(this,nr,!1),M(this,wi,t.defaultOptions),W(this,Jr,So).call(this,t.options),M(this,Te,[]),M(this,ut,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,M(this,qr,t.state||yg(this.options)),this.state=v(this,qr),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!v(this,Te).length&&this.state.fetchStatus==="idle"&&v(this,ut).remove(this)}setData(t,n){const r=eu(this.state.data,t,this.options);return W(this,Ct,$t).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){W(this,Ct,$t).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r;const n=v(this,gn);return(r=v(this,ct))==null||r.cancel(t),n?n.then(ft).catch(ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(v(this,qr))}isActive(){return v(this,Te).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||v(this,Te).some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!$p(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=v(this,Te).find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=v(this,ct))==null||n.continue()}onOnline(){var n;const t=v(this,Te).find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=v(this,ct))==null||n.continue()}addObserver(t){v(this,Te).includes(t)||(v(this,Te).push(t),this.clearGcTimeout(),v(this,ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){v(this,Te).includes(t)&&(M(this,Te,v(this,Te).filter(n=>n!==t)),v(this,Te).length||(v(this,ct)&&(v(this,nr)?v(this,ct).cancel({revert:!0}):v(this,ct).cancelRetry()),this.scheduleGc()),v(this,ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return v(this,Te).length}invalidate(){this.state.isInvalidated||W(this,Ct,$t).call(this,{type:"invalidate"})}fetch(t,n){var u,c,p,h;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(v(this,gn))return(u=v(this,ct))==null||u.continueRetry(),v(this,gn)}if(t&&W(this,Jr,So).call(this,t),!this.options.queryFn){const g=v(this,Te).find(x=>x.options.queryFn);g&&W(this,Jr,So).call(this,g.options)}const r=new AbortController,l={queryKey:this.queryKey,meta:this.meta},i=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(M(this,nr,!0),r.signal)})};i(l);const o=()=>this.options.queryFn?(M(this,nr,!1),this.options.persister?this.options.persister(this.options.queryFn,l,this):this.options.queryFn(l)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(a),(c=this.options.behavior)==null||c.onFetch(a,this),M(this,Xr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=a.fetchOptions)==null?void 0:p.meta))&&W(this,Ct,$t).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const s=g=>{var x,S,E,d;Xa(g)&&g.silent||W(this,Ct,$t).call(this,{type:"error",error:g}),Xa(g)||((S=(x=v(this,ut).config).onError)==null||S.call(x,g,this),(d=(E=v(this,ut).config).onSettled)==null||d.call(E,this.state.data,g,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return M(this,ct,Hp({fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var x,S,E,d;if(typeof g>"u"){s(new Error(`${this.queryHash} data is undefined`));return}this.setData(g),(S=(x=v(this,ut).config).onSuccess)==null||S.call(x,g,this),(d=(E=v(this,ut).config).onSettled)==null||d.call(E,g,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:s,onFail:(g,x)=>{W(this,Ct,$t).call(this,{type:"failed",failureCount:g,error:x})},onPause:()=>{W(this,Ct,$t).call(this,{type:"pause"})},onContinue:()=>{W(this,Ct,$t).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode})),M(this,gn,v(this,ct).promise),v(this,gn)}},qr=new WeakMap,Xr=new WeakMap,ut=new WeakMap,gn=new WeakMap,ct=new WeakMap,Te=new WeakMap,wi=new WeakMap,nr=new WeakMap,Jr=new WeakSet,So=function(t){this.options={...v(this,wi),...t},this.updateGcTime(this.options.gcTime)},Ct=new WeakSet,$t=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:t.meta??null,fetchStatus:pa(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const l=t.error;return Xa(l)&&l.revert&&v(this,Xr)?{...v(this,Xr),fetchStatus:"idle"}:{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ke.batch(()=>{v(this,Te).forEach(r=>{r.onQueryUpdate()}),v(this,ut).notify({query:this,type:"updated",action:t})})},gf);function yg(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ot,wf,gg=(wf=class extends xl{constructor(t={}){super();U(this,Ot,void 0);this.config=t,M(this,Ot,new Map)}build(t,n,r){const l=n.queryKey,i=n.queryHash??fc(l,n);let o=this.get(i);return o||(o=new vg({cache:this,queryKey:l,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(l)}),this.add(o)),o}add(t){v(this,Ot).has(t.queryHash)||(v(this,Ot).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=v(this,Ot).get(t.queryHash);n&&(t.destroy(),n===t&&v(this,Ot).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return v(this,Ot).get(t)}getAll(){return[...v(this,Ot).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Vd(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Vd(t,r)):n}notify(t){ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ot=new WeakMap,wf),Ft,xi,be,Zr,It,cn,xf,wg=(xf=class extends Wp{constructor(t){super();U(this,It);U(this,Ft,void 0);U(this,xi,void 0);U(this,be,void 0);U(this,Zr,void 0);this.mutationId=t.mutationId,M(this,xi,t.defaultOptions),M(this,be,t.mutationCache),M(this,Ft,[]),this.state=t.state||Kp(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...v(this,xi),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){v(this,Ft).includes(t)||(v(this,Ft).push(t),this.clearGcTimeout(),v(this,be).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){M(this,Ft,v(this,Ft).filter(n=>n!==t)),this.scheduleGc(),v(this,be).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){v(this,Ft).length||(this.state.status==="pending"?this.scheduleGc():v(this,be).remove(this))}continue(){var t;return((t=v(this,Zr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,i,o,a,s,u,c,p,h,g,x,S,E,d,f,m,k,N,y,R;const n=()=>(M(this,Zr,Hp({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(L,O)=>{W(this,It,cn).call(this,{type:"failed",failureCount:L,error:O})},onPause:()=>{W(this,It,cn).call(this,{type:"pause"})},onContinue:()=>{W(this,It,cn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),v(this,Zr).promise),r=this.state.status==="pending";try{if(!r){W(this,It,cn).call(this,{type:"pending",variables:t}),await((i=(l=v(this,be).config).onMutate)==null?void 0:i.call(l,t,this));const O=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));O!==this.state.context&&W(this,It,cn).call(this,{type:"pending",context:O,variables:t})}const L=await n();return await((u=(s=v(this,be).config).onSuccess)==null?void 0:u.call(s,L,t,this.state.context,this)),await((p=(c=this.options).onSuccess)==null?void 0:p.call(c,L,t,this.state.context)),await((g=(h=v(this,be).config).onSettled)==null?void 0:g.call(h,L,null,this.state.variables,this.state.context,this)),await((S=(x=this.options).onSettled)==null?void 0:S.call(x,L,null,t,this.state.context)),W(this,It,cn).call(this,{type:"success",data:L}),L}catch(L){try{throw await((d=(E=v(this,be).config).onError)==null?void 0:d.call(E,L,t,this.state.context,this)),await((m=(f=this.options).onError)==null?void 0:m.call(f,L,t,this.state.context)),await((N=(k=v(this,be).config).onSettled)==null?void 0:N.call(k,void 0,L,this.state.variables,this.state.context,this)),await((R=(y=this.options).onSettled)==null?void 0:R.call(y,void 0,L,t,this.state.context)),L}finally{W(this,It,cn).call(this,{type:"error",error:L})}}}},Ft=new WeakMap,xi=new WeakMap,be=new WeakMap,Zr=new WeakMap,It=new WeakSet,cn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!pa(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ke.batch(()=>{v(this,Ft).forEach(r=>{r.onMutationUpdate(t)}),v(this,be).notify({mutation:this,type:"updated",action:t})})},xf);function Kp(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var dt,Si,rr,Sf,xg=(Sf=class extends xl{constructor(t={}){super();U(this,dt,void 0);U(this,Si,void 0);U(this,rr,void 0);this.config=t,M(this,dt,[]),M(this,Si,0)}build(t,n,r){const l=new wg({mutationCache:this,mutationId:++Hi(this,Si)._,options:t.defaultMutationOptions(n),state:r});return this.add(l),l}add(t){v(this,dt).push(t),this.notify({type:"added",mutation:t})}remove(t){M(this,dt,v(this,dt).filter(n=>n!==t)),this.notify({type:"removed",mutation:t})}clear(){ke.batch(()=>{v(this,dt).forEach(t=>{this.remove(t)})})}getAll(){return v(this,dt)}find(t){const n={exact:!0,...t};return v(this,dt).find(r=>Qd(n,r))}findAll(t={}){return v(this,dt).filter(n=>Qd(t,n))}notify(t){ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){return M(this,rr,(v(this,rr)??Promise.resolve()).then(()=>{const t=v(this,dt).filter(n=>n.state.isPaused);return ke.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(ft)),Promise.resolve()))}).then(()=>{M(this,rr,void 0)})),v(this,rr)}},dt=new WeakMap,Si=new WeakMap,rr=new WeakMap,Sf);function Sg(e){return{onFetch:(t,n)=>{const r=async()=>{var x,S,E,d,f;const l=t.options,i=(E=(S=(x=t.fetchOptions)==null?void 0:x.meta)==null?void 0:S.fetchMore)==null?void 0:E.direction,o=((d=t.state.data)==null?void 0:d.pages)||[],a=((f=t.state.data)==null?void 0:f.pageParams)||[],s={pages:[],pageParams:[]};let u=!1;const c=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},p=t.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`))),h=async(m,k,N)=>{if(u)return Promise.reject();if(k==null&&m.pages.length)return Promise.resolve(m);const y={queryKey:t.queryKey,pageParam:k,direction:N?"backward":"forward",meta:t.options.meta};c(y);const R=await p(y),{maxPages:L}=t.options,O=N?dg:cg;return{pages:O(m.pages,R,L),pageParams:O(m.pageParams,k,L)}};let g;if(i&&o.length){const m=i==="backward",k=m?Eg:Kd,N={pages:o,pageParams:a},y=k(l,N);g=await h(N,y,m)}else{g=await h(s,a[0]??l.initialPageParam);const m=e??o.length;for(let k=1;k{var l,i;return(i=(l=t.options).persister)==null?void 0:i.call(l,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function Kd(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function Eg(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}var Ee,wn,xn,br,el,Sn,tl,nl,Ef,Cg=(Ef=class{constructor(e={}){U(this,Ee,void 0);U(this,wn,void 0);U(this,xn,void 0);U(this,br,void 0);U(this,el,void 0);U(this,Sn,void 0);U(this,tl,void 0);U(this,nl,void 0);M(this,Ee,e.queryCache||new gg),M(this,wn,e.mutationCache||new xg),M(this,xn,e.defaultOptions||{}),M(this,br,new Map),M(this,el,new Map),M(this,Sn,0)}mount(){Hi(this,Sn)._++,v(this,Sn)===1&&(M(this,tl,Yo.subscribe(()=>{Yo.isFocused()&&(this.resumePausedMutations(),v(this,Ee).onFocus())})),M(this,nl,qo.subscribe(()=>{qo.isOnline()&&(this.resumePausedMutations(),v(this,Ee).onOnline())})))}unmount(){var e,t;Hi(this,Sn)._--,v(this,Sn)===0&&((e=v(this,tl))==null||e.call(this),M(this,tl,void 0),(t=v(this,nl))==null||t.call(this),M(this,nl,void 0))}isFetching(e){return v(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return v(this,wn).findAll({...e,status:"pending"}).length}getQueryData(e){var t;return(t=v(this,Ee).find({queryKey:e}))==null?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);return t!==void 0?Promise.resolve(t):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=v(this,Ee).find({queryKey:e}),l=r==null?void 0:r.state.data,i=sg(t,l);if(typeof i>"u")return;const o=this.defaultQueryOptions({queryKey:e});return v(this,Ee).build(this,o).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return ke.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var t;return(t=v(this,Ee).find({queryKey:e}))==null?void 0:t.state}removeQueries(e){const t=v(this,Ee);ke.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=v(this,Ee),r={type:"active",...e};return ke.batch(()=>(n.findAll(e).forEach(l=>{l.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=ke.batch(()=>v(this,Ee).findAll(e).map(l=>l.cancel(n)));return Promise.all(r).then(ft).catch(ft)}invalidateQueries(e={},t={}){return ke.batch(()=>{if(v(this,Ee).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=ke.batch(()=>v(this,Ee).findAll(e).filter(l=>!l.isDisabled()).map(l=>{let i=l.fetch(void 0,n);return n.throwOnError||(i=i.catch(ft)),l.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(ft)}fetchQuery(e){const t=this.defaultQueryOptions(e);typeof t.retry>"u"&&(t.retry=!1);const n=v(this,Ee).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ft).catch(ft)}fetchInfiniteQuery(e){return e.behavior=Sg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ft).catch(ft)}resumePausedMutations(){return v(this,wn).resumePausedMutations()}getQueryCache(){return v(this,Ee)}getMutationCache(){return v(this,wn)}getDefaultOptions(){return v(this,xn)}setDefaultOptions(e){M(this,xn,e)}setQueryDefaults(e,t){v(this,br).set(mr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...v(this,br).values()];let n={};return t.forEach(r=>{vi(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){v(this,el).set(mr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...v(this,el).values()];let n={};return t.forEach(r=>{vi(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...v(this,xn).queries,...(e==null?void 0:e.queryKey)&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fc(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.throwOnError>"u"&&(t.throwOnError=!!t.suspense),typeof t.networkMode>"u"&&t.persister&&(t.networkMode="offlineFirst"),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...v(this,xn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){v(this,Ee).clear(),v(this,wn).clear()}},Ee=new WeakMap,wn=new WeakMap,xn=new WeakMap,br=new WeakMap,el=new WeakMap,Sn=new WeakMap,tl=new WeakMap,nl=new WeakMap,Ef),Ke,oe,Ei,$e,lr,rl,Ut,Ci,ll,il,ir,or,En,ol,ar,Vl,ki,tu,Pi,nu,Ri,ru,_i,lu,Ti,iu,Li,ou,Ni,au,Jo,Gp,Cf,kg=(Cf=class extends xl{constructor(t,n){super();U(this,ar);U(this,ki);U(this,Pi);U(this,Ri);U(this,_i);U(this,Ti);U(this,Li);U(this,Ni);U(this,Jo);U(this,Ke,void 0);U(this,oe,void 0);U(this,Ei,void 0);U(this,$e,void 0);U(this,lr,void 0);U(this,rl,void 0);U(this,Ut,void 0);U(this,Ci,void 0);U(this,ll,void 0);U(this,il,void 0);U(this,ir,void 0);U(this,or,void 0);U(this,En,void 0);U(this,ol,new Set);this.options=n,M(this,Ke,t),M(this,Ut,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(v(this,oe).addObserver(this),Gd(v(this,oe),this.options)?W(this,ar,Vl).call(this):this.updateResult(),W(this,_i,lu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return su(v(this,oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return su(v(this,oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,W(this,Ti,iu).call(this),W(this,Li,ou).call(this),v(this,oe).removeObserver(this)}setOptions(t,n){const r=this.options,l=v(this,oe);if(this.options=v(this,Ke).defaultQueryOptions(t),Go(r,this.options)||v(this,Ke).getQueryCache().notify({type:"observerOptionsUpdated",query:v(this,oe),observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),W(this,Ni,au).call(this);const i=this.hasListeners();i&&Yd(v(this,oe),l,this.options,r)&&W(this,ar,Vl).call(this),this.updateResult(n),i&&(v(this,oe)!==l||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&W(this,ki,tu).call(this);const o=W(this,Pi,nu).call(this);i&&(v(this,oe)!==l||this.options.enabled!==r.enabled||o!==v(this,En))&&W(this,Ri,ru).call(this,o)}getOptimisticResult(t){const n=v(this,Ke).getQueryCache().build(v(this,Ke),t),r=this.createResult(n,t);return Rg(this,r)&&(M(this,$e,r),M(this,rl,this.options),M(this,lr,v(this,oe).state)),r}getCurrentResult(){return v(this,$e)}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(v(this,ol).add(r),t[r])})}),n}getCurrentQuery(){return v(this,oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=v(this,Ke).defaultQueryOptions(t),r=v(this,Ke).getQueryCache().build(v(this,Ke),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return W(this,ar,Vl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),v(this,$e)))}createResult(t,n){var y;const r=v(this,oe),l=this.options,i=v(this,$e),o=v(this,lr),a=v(this,rl),u=t!==r?t.state:v(this,Ei),{state:c}=t;let{error:p,errorUpdatedAt:h,fetchStatus:g,status:x}=c,S=!1,E;if(n._optimisticResults){const R=this.hasListeners(),L=!R&&Gd(t,n),O=R&&Yd(t,r,n,l);(L||O)&&(g=pa(t.options.networkMode)?"fetching":"paused",c.dataUpdatedAt||(x="pending")),n._optimisticResults==="isRestoring"&&(g="idle")}if(n.select&&typeof c.data<"u")if(i&&c.data===(o==null?void 0:o.data)&&n.select===v(this,Ci))E=v(this,ll);else try{M(this,Ci,n.select),E=n.select(c.data),E=eu(i==null?void 0:i.data,E,n),M(this,ll,E),M(this,Ut,null)}catch(R){M(this,Ut,R)}else E=c.data;if(typeof n.placeholderData<"u"&&typeof E>"u"&&x==="pending"){let R;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))R=i.data;else if(R=typeof n.placeholderData=="function"?n.placeholderData((y=v(this,il))==null?void 0:y.state.data,v(this,il)):n.placeholderData,n.select&&typeof R<"u")try{R=n.select(R),M(this,Ut,null)}catch(L){M(this,Ut,L)}typeof R<"u"&&(x="success",E=eu(i==null?void 0:i.data,R,n),S=!0)}v(this,Ut)&&(p=v(this,Ut),E=v(this,ll),h=Date.now(),x="error");const d=g==="fetching",f=x==="pending",m=x==="error",k=f&&d;return{status:x,fetchStatus:g,isPending:f,isSuccess:x==="success",isError:m,isInitialLoading:k,isLoading:k,data:E,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:h,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:d,isRefetching:d&&!f,isLoadingError:m&&c.dataUpdatedAt===0,isPaused:g==="paused",isPlaceholderData:S,isRefetchError:m&&c.dataUpdatedAt!==0,isStale:hc(t,n),refetch:this.refetch}}updateResult(t){const n=v(this,$e),r=this.createResult(v(this,oe),this.options);if(M(this,lr,v(this,oe).state),M(this,rl,this.options),v(this,lr).data!==void 0&&M(this,il,v(this,oe)),Go(r,n))return;M(this,$e,r);const l={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!v(this,ol).size)return!0;const s=new Set(a??v(this,ol));return this.options.throwOnError&&s.add("error"),Object.keys(v(this,$e)).some(u=>{const c=u;return v(this,$e)[c]!==n[c]&&s.has(c)})};(t==null?void 0:t.listeners)!==!1&&i()&&(l.listeners=!0),W(this,Jo,Gp).call(this,{...l,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&W(this,_i,lu).call(this)}},Ke=new WeakMap,oe=new WeakMap,Ei=new WeakMap,$e=new WeakMap,lr=new WeakMap,rl=new WeakMap,Ut=new WeakMap,Ci=new WeakMap,ll=new WeakMap,il=new WeakMap,ir=new WeakMap,or=new WeakMap,En=new WeakMap,ol=new WeakMap,ar=new WeakSet,Vl=function(t){W(this,Ni,au).call(this);let n=v(this,oe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ft)),n},ki=new WeakSet,tu=function(){if(W(this,Ti,iu).call(this),ml||v(this,$e).isStale||!Zs(this.options.staleTime))return;const n=$p(v(this,$e).dataUpdatedAt,this.options.staleTime)+1;M(this,ir,setTimeout(()=>{v(this,$e).isStale||this.updateResult()},n))},Pi=new WeakSet,nu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(v(this,oe)):this.options.refetchInterval)??!1},Ri=new WeakSet,ru=function(t){W(this,Li,ou).call(this),M(this,En,t),!(ml||this.options.enabled===!1||!Zs(v(this,En))||v(this,En)===0)&&M(this,or,setInterval(()=>{(this.options.refetchIntervalInBackground||Yo.isFocused())&&W(this,ar,Vl).call(this)},v(this,En)))},_i=new WeakSet,lu=function(){W(this,ki,tu).call(this),W(this,Ri,ru).call(this,W(this,Pi,nu).call(this))},Ti=new WeakSet,iu=function(){v(this,ir)&&(clearTimeout(v(this,ir)),M(this,ir,void 0))},Li=new WeakSet,ou=function(){v(this,or)&&(clearInterval(v(this,or)),M(this,or,void 0))},Ni=new WeakSet,au=function(){const t=v(this,Ke).getQueryCache().build(v(this,Ke),this.options);if(t===v(this,oe))return;const n=v(this,oe);M(this,oe,t),M(this,Ei,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Jo=new WeakSet,Gp=function(t){ke.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(v(this,$e))}),v(this,Ke).getQueryCache().notify({query:v(this,oe),type:"observerResultsUpdated"})})},Cf);function Pg(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Gd(e,t){return Pg(e,t)||e.state.dataUpdatedAt>0&&su(e,t,t.refetchOnMount)}function su(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&hc(e,t)}return!1}function Yd(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&hc(e,n)}function hc(e,t){return e.isStaleByTime(t.staleTime)}function Rg(e,t){return!Go(e.getCurrentResult(),t)}var Cn,Ht,et,Wt,al,Eo,Di,uu,kf,_g=(kf=class extends xl{constructor(n,r){super();U(this,al);U(this,Di);U(this,Cn,void 0);U(this,Ht,void 0);U(this,et,void 0);U(this,Wt,void 0);M(this,Ht,void 0),M(this,Cn,n),this.setOptions(r),this.bindMethods(),W(this,al,Eo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var l;const r=this.options;this.options=v(this,Cn).defaultMutationOptions(n),Go(r,this.options)||v(this,Cn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:v(this,et),observer:this}),(l=v(this,et))==null||l.setOptions(this.options),r!=null&&r.mutationKey&&this.options.mutationKey&&mr(r.mutationKey)!==mr(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var n;this.hasListeners()||(n=v(this,et))==null||n.removeObserver(this)}onMutationUpdate(n){W(this,al,Eo).call(this),W(this,Di,uu).call(this,n)}getCurrentResult(){return v(this,Ht)}reset(){var n;(n=v(this,et))==null||n.removeObserver(this),M(this,et,void 0),W(this,al,Eo).call(this),W(this,Di,uu).call(this)}mutate(n,r){var l;return M(this,Wt,r),(l=v(this,et))==null||l.removeObserver(this),M(this,et,v(this,Cn).getMutationCache().build(v(this,Cn),this.options)),v(this,et).addObserver(this),v(this,et).execute(n)}},Cn=new WeakMap,Ht=new WeakMap,et=new WeakMap,Wt=new WeakMap,al=new WeakSet,Eo=function(){var r;const n=((r=v(this,et))==null?void 0:r.state)??Kp();M(this,Ht,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Di=new WeakSet,uu=function(n){ke.batch(()=>{var r,l,i,o,a,s,u,c;if(v(this,Wt)&&this.hasListeners()){const p=v(this,Ht).variables,h=v(this,Ht).context;(n==null?void 0:n.type)==="success"?((l=(r=v(this,Wt)).onSuccess)==null||l.call(r,n.data,p,h),(o=(i=v(this,Wt)).onSettled)==null||o.call(i,n.data,null,p,h)):(n==null?void 0:n.type)==="error"&&((s=(a=v(this,Wt)).onError)==null||s.call(a,n.error,p,h),(c=(u=v(this,Wt)).onSettled)==null||c.call(u,void 0,n.error,p,h))}this.listeners.forEach(p=>{p(v(this,Ht))})})},kf),Yp=P.createContext(void 0),qp=e=>{const t=P.useContext(Yp);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Tg=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),P.createElement(Yp.Provider,{value:e},t)),Xp=P.createContext(!1),Lg=()=>P.useContext(Xp);Xp.Provider;function Ng(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Dg=P.createContext(Ng()),jg=()=>P.useContext(Dg);function Jp(e,t){return typeof e=="function"?e(...t):!!e}var Mg=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},Og=e=>{P.useEffect(()=>{e.clearReset()},[e])},Fg=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Jp(n,[e.error,r]),Ig=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Ug=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,zg=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ag(e,t,n){const r=qp(n),l=Lg(),i=jg(),o=r.defaultQueryOptions(e);o._optimisticResults=l?"isRestoring":"optimistic",Ig(o),Mg(o,i),Og(i);const[a]=P.useState(()=>new t(r,o)),s=a.getOptimisticResult(o);if(P.useSyncExternalStore(P.useCallback(u=>{const c=l?()=>{}:a.subscribe(ke.batchCalls(u));return a.updateResult(),c},[a,l]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),P.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),Ug(o,s))throw zg(o,a,i);if(Fg({result:s,errorResetBoundary:i,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw s.error;return o.notifyOnChangeProps?s:a.trackResult(s)}function Bg(e,t){return Ag(e,kg,t)}function Zp(e,t){const n=qp(t),[r]=P.useState(()=>new _g(n,e));P.useEffect(()=>{r.setOptions(e)},[r,e]);const l=P.useSyncExternalStore(P.useCallback(o=>r.subscribe(ke.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=P.useCallback((o,a)=>{r.mutate(o,a).catch($g)},[r]);if(l.error&&Jp(r.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:i,mutateAsync:l.mutate}}function $g(){}const pc=P.createContext({isActive:!1,displayModal:()=>{},removeModal:()=>{}}),Vg=({children:e})=>{const[t,n]=P.useState(!1),i={isActive:t,displayModal:()=>{n(!0)},removeModal:()=>{n(!1)}};return T.jsx(pc.Provider,{value:i,children:e})},mc=new Cg,Qg=({children:e})=>T.jsx(Tg,{client:mc,children:T.jsx(Vg,{children:e})});/** + * @remix-run/router v1.14.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function vr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Wg(){return Math.random().toString(36).substr(2,8)}function Xd(e,t){return{usr:e.state,key:e.key,idx:t}}function yi(e,t,n,r){return n===void 0&&(n=null),ve({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?nn(t):t,{state:n,key:t&&t.key||r||Wg()})}function yr(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 nn(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 Kg(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,o=l.history,a=ye.Pop,s=null,u=c();u==null&&(u=0,o.replaceState(ve({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function p(){a=ye.Pop;let E=c(),d=E==null?null:E-u;u=E,s&&s({action:a,location:S.location,delta:d})}function h(E,d){a=ye.Push;let f=yi(S.location,E,d);n&&n(f,E),u=c()+1;let m=Xd(f,u),k=S.createHref(f);try{o.pushState(m,"",k)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;l.location.assign(k)}i&&s&&s({action:a,location:S.location,delta:1})}function g(E,d){a=ye.Replace;let f=yi(S.location,E,d);n&&n(f,E),u=c();let m=Xd(f,u),k=S.createHref(f);o.replaceState(m,"",k),i&&s&&s({action:a,location:S.location,delta:0})}function x(E){let d=l.location.origin!=="null"?l.location.origin:l.location.href,f=typeof E=="string"?E:yr(E);return G(d,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,d)}let S={get action(){return a},get location(){return e(l,o)},listen(E){if(s)throw new Error("A history only accepts one active listener");return l.addEventListener(qd,p),s=E,()=>{l.removeEventListener(qd,p),s=null}},createHref(E){return t(l,E)},createURL:x,encodeLocation(E){let d=x(E);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:h,replace:g,go(E){return o.go(E)}};return S}var pe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(pe||(pe={}));const Gg=new Set(["lazy","caseSensitive","path","id","index","children"]);function Yg(e){return e.index===!0}function cu(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,i)=>{let o=[...n,i],a=typeof l.id=="string"?l.id:o.join("-");if(G(l.index!==!0||!l.children,"Cannot specify children on an index route"),G(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),Yg(l)){let s=ve({},l,t(l),{id:a});return r[a]=s,s}else{let s=ve({},l,t(l),{id:a,children:void 0});return r[a]=s,l.children&&(s.children=cu(l.children,t,o,r)),s}})}function zr(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?nn(t):t,l=zn(r.pathname||"/",n);if(l==null)return null;let i=bp(e);Xg(i);let o=null;for(let a=0;o==null&&a{let s={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};s.relativePath.startsWith("/")&&(G(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let u=Xt([r,s.relativePath]),c=n.concat(s);i.children&&i.children.length>0&&(G(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),bp(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:r0(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))l(i,o);else for(let s of em(i.path))l(i,o,s)}),t}function em(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=em(r.join("/")),a=[];return a.push(...o.map(s=>s===""?i:[i,s].join("/"))),l&&a.push(...o),a.map(s=>e.startsWith("/")&&s===""?"/":s)}function Xg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:l0(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Jg=/^:\w+$/,Zg=3,bg=2,e0=1,t0=10,n0=-2,Jd=e=>e==="*";function r0(e,t){let n=e.split("/"),r=n.length;return n.some(Jd)&&(r+=n0),t&&(r+=bg),n.filter(l=>!Jd(l)).reduce((l,i)=>l+(Jg.test(i)?Zg:i===""?e0:t0),r)}function l0(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 i0(e,t){let{routesMeta:n}=e,r={},l="/",i=[];for(let o=0;o{let{paramName:h,isOptional:g}=c;if(h==="*"){let S=a[p]||"";o=i.slice(0,i.length-S.length).replace(/(.)\/+$/,"$1")}const x=a[p];return g&&!x?u[h]=void 0:u[h]=s0(x||"",h),u},{}),pathname:i,pathnameBase:o,pattern:e}}function o0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),vr(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,s)=>(r.push({paramName:a,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function a0(e){try{return decodeURI(e)}catch(t){return vr(!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 s0(e,t){try{return decodeURIComponent(e)}catch(n){return vr(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function zn(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)||"/"}function u0(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?nn(e):e;return{pathname:n?n.startsWith("/")?n:c0(n,t):t,search:f0(r),hash:h0(l)}}function c0(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 Ja(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 tm(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vc(e,t){let n=tm(e);return t?n.map((r,l)=>l===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function yc(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=nn(e):(l=ve({},e),G(!l.pathname||!l.pathname.includes("?"),Ja("?","pathname","search",l)),G(!l.pathname||!l.pathname.includes("#"),Ja("#","pathname","hash",l)),G(!l.search||!l.search.includes("#"),Ja("#","search","hash",l)));let i=e===""||l.pathname==="",o=i?"/":l.pathname,a;if(o==null)a=n;else{let p=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),p-=1;l.pathname=h.join("/")}a=p>=0?t[p]:"/"}let s=u0(l,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}const Xt=e=>e.join("/").replace(/\/\/+/g,"/"),d0=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),f0=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,h0=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class gc{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 nm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const rm=["post","put","patch","delete"],p0=new Set(rm),m0=["get",...rm],v0=new Set(m0),y0=new Set([301,302,303,307,308]),g0=new Set([307,308]),Za={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},w0={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ml={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},lm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,x0=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),im="remix-router-transitions";function S0(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;G(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 w=e.detectErrorBoundary;l=C=>({hasErrorBoundary:w(C)})}else l=x0;let i={},o=cu(e.routes,l,void 0,i),a,s=e.basename||"/",u=ve({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),c=null,p=new Set,h=null,g=null,x=null,S=e.hydrationData!=null,E=zr(o,e.history.location,s),d=null;if(E==null){let w=ht(404,{pathname:e.history.location.pathname}),{matches:C,route:_}=of(o);E=C,d={[_.id]:w}}let f,m=E.some(w=>w.route.lazy),k=E.some(w=>w.route.loader);if(m)f=!1;else if(!k)f=!0;else if(u.v7_partialHydration){let w=e.hydrationData?e.hydrationData.loaderData:null,C=e.hydrationData?e.hydrationData.errors:null;f=E.every(_=>_.route.loader&&_.route.loader.hydrate!==!0&&(w&&w[_.route.id]!==void 0||C&&C[_.route.id]!==void 0))}else f=e.hydrationData!=null;let N,y={historyAction:e.history.action,location:e.history.location,matches:E,initialized:f,navigation:Za,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||d,fetchers:new Map,blockers:new Map},R=ye.Pop,L=!1,O,B=!1,Z=new Map,Se=null,we=!1,at=!1,xr=[],rn=[],se=new Map,F=0,V=-1,H=new Map,b=new Set,le=new Map,Nt=new Map,De=new Set,xt=new Map,Be=new Map,ln=!1;function gm(){if(c=e.history.listen(w=>{let{action:C,location:_,delta:j}=w;if(ln){ln=!1;return}vr(Be.size===0||j!=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 z=Nc({currentLocation:y.location,nextLocation:_,historyAction:C});if(z&&j!=null){ln=!0,e.history.go(j*-1),$i(z,{state:"blocked",location:_,proceed(){$i(z,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),e.history.go(j)},reset(){let Y=new Map(y.blockers);Y.set(z,Ml),Ze({blockers:Y})}});return}return Wn(C,_)}),n){j0(t,Z);let w=()=>M0(t,Z);t.addEventListener("pagehide",w),Se=()=>t.removeEventListener("pagehide",w)}return y.initialized||Wn(ye.Pop,y.location,{initialHydration:!0}),N}function wm(){c&&c(),Se&&Se(),p.clear(),O&&O.abort(),y.fetchers.forEach((w,C)=>Bi(C)),y.blockers.forEach((w,C)=>Lc(C))}function xm(w){return p.add(w),()=>p.delete(w)}function Ze(w,C){C===void 0&&(C={}),y=ve({},y,w);let _=[],j=[];u.v7_fetcherPersist&&y.fetchers.forEach((z,Y)=>{z.state==="idle"&&(De.has(Y)?j.push(Y):_.push(Y))}),[...p].forEach(z=>z(y,{deletedFetchers:j,unstable_viewTransitionOpts:C.viewTransitionOpts,unstable_flushSync:C.flushSync===!0})),u.v7_fetcherPersist&&(_.forEach(z=>y.fetchers.delete(z)),j.forEach(z=>Bi(z)))}function El(w,C,_){var j,z;let{flushSync:Y}=_===void 0?{}:_,Q=y.actionData!=null&&y.navigation.formMethod!=null&&Pt(y.navigation.formMethod)&&y.navigation.state==="loading"&&((j=w.state)==null?void 0:j._isRedirect)!==!0,$;C.actionData?Object.keys(C.actionData).length>0?$=C.actionData:$=null:Q?$=y.actionData:$=null;let A=C.loaderData?lf(y.loaderData,C.loaderData,C.matches||[],C.errors):y.loaderData,X=y.blockers;X.size>0&&(X=new Map(X),X.forEach((ne,je)=>X.set(je,Ml)));let Re=L===!0||y.navigation.formMethod!=null&&Pt(y.navigation.formMethod)&&((z=w.state)==null?void 0:z._isRedirect)!==!0;a&&(o=a,a=void 0),we||R===ye.Pop||(R===ye.Push?e.history.push(w,w.state):R===ye.Replace&&e.history.replace(w,w.state));let K;if(R===ye.Pop){let ne=Z.get(y.location.pathname);ne&&ne.has(w.pathname)?K={currentLocation:y.location,nextLocation:w}:Z.has(w.pathname)&&(K={currentLocation:w,nextLocation:y.location})}else if(B){let ne=Z.get(y.location.pathname);ne?ne.add(w.pathname):(ne=new Set([w.pathname]),Z.set(y.location.pathname,ne)),K={currentLocation:y.location,nextLocation:w}}Ze(ve({},C,{actionData:$,loaderData:A,historyAction:R,location:w,initialized:!0,navigation:Za,revalidation:"idle",restoreScrollPosition:jc(w,C.matches||y.matches),preventScrollReset:Re,blockers:X}),{viewTransitionOpts:K,flushSync:Y===!0}),R=ye.Pop,L=!1,B=!1,we=!1,at=!1,xr=[],rn=[]}async function Cc(w,C){if(typeof w=="number"){e.history.go(w);return}let _=fu(y.location,y.matches,s,u.v7_prependBasename,w,u.v7_relativeSplatPath,C==null?void 0:C.fromRouteId,C==null?void 0:C.relative),{path:j,submission:z,error:Y}=Zd(u.v7_normalizeFormMethod,!1,_,C),Q=y.location,$=yi(y.location,j,C&&C.state);$=ve({},$,e.history.encodeLocation($));let A=C&&C.replace!=null?C.replace:void 0,X=ye.Push;A===!0?X=ye.Replace:A===!1||z!=null&&Pt(z.formMethod)&&z.formAction===y.location.pathname+y.location.search&&(X=ye.Replace);let Re=C&&"preventScrollReset"in C?C.preventScrollReset===!0:void 0,K=(C&&C.unstable_flushSync)===!0,ne=Nc({currentLocation:Q,nextLocation:$,historyAction:X});if(ne){$i(ne,{state:"blocked",location:$,proceed(){$i(ne,{state:"proceeding",proceed:void 0,reset:void 0,location:$}),Cc(w,C)},reset(){let je=new Map(y.blockers);je.set(ne,Ml),Ze({blockers:je})}});return}return await Wn(X,$,{submission:z,pendingError:Y,preventScrollReset:Re,replace:C&&C.replace,enableViewTransition:C&&C.unstable_viewTransition,flushSync:K})}function Sm(){if(ya(),Ze({revalidation:"loading"}),y.navigation.state!=="submitting"){if(y.navigation.state==="idle"){Wn(y.historyAction,y.location,{startUninterruptedRevalidation:!0});return}Wn(R||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation})}}async function Wn(w,C,_){O&&O.abort(),O=null,R=w,we=(_&&_.startUninterruptedRevalidation)===!0,Nm(y.location,y.matches),L=(_&&_.preventScrollReset)===!0,B=(_&&_.enableViewTransition)===!0;let j=a||o,z=_&&_.overrideNavigation,Y=zr(j,C,s),Q=(_&&_.flushSync)===!0;if(!Y){let je=ht(404,{pathname:C.pathname}),{matches:st,route:_e}=of(j);ga(),El(C,{matches:st,loaderData:{},errors:{[_e.id]:je}},{flushSync:Q});return}if(y.initialized&&!at&&R0(y.location,C)&&!(_&&_.submission&&Pt(_.submission.formMethod))){El(C,{matches:Y},{flushSync:Q});return}O=new AbortController;let $=Fl(e.history,C,O.signal,_&&_.submission),A,X;if(_&&_.pendingError)X={[Zl(Y).route.id]:_.pendingError};else if(_&&_.submission&&Pt(_.submission.formMethod)){let je=await Em($,C,_.submission,Y,{replace:_.replace,flushSync:Q});if(je.shortCircuited)return;A=je.pendingActionData,X=je.pendingActionError,z=ba(C,_.submission),Q=!1,$=new Request($.url,{signal:$.signal})}let{shortCircuited:Re,loaderData:K,errors:ne}=await Cm($,C,Y,z,_&&_.submission,_&&_.fetcherSubmission,_&&_.replace,_&&_.initialHydration===!0,Q,A,X);Re||(O=null,El(C,ve({matches:Y},A?{actionData:A}:{},{loaderData:K,errors:ne})))}async function Em(w,C,_,j,z){z===void 0&&(z={}),ya();let Y=N0(C,_);Ze({navigation:Y},{flushSync:z.flushSync===!0});let Q,$=pu(j,C);if(!$.route.action&&!$.route.lazy)Q={type:pe.error,error:ht(405,{method:w.method,pathname:C.pathname,routeId:$.route.id})};else if(Q=await Ol("action",w,$,j,i,l,s,u.v7_relativeSplatPath),w.signal.aborted)return{shortCircuited:!0};if(bn(Q)){let A;return z&&z.replace!=null?A=z.replace:A=Q.location===y.location.pathname+y.location.search,await Cl(y,Q,{submission:_,replace:A}),{shortCircuited:!0}}if(Ar(Q)){let A=Zl(j,$.route.id);return(z&&z.replace)!==!0&&(R=ye.Push),{pendingActionData:{},pendingActionError:{[A.route.id]:Q.error}}}if(Zn(Q))throw ht(400,{type:"defer-action"});return{pendingActionData:{[$.route.id]:Q.data}}}async function Cm(w,C,_,j,z,Y,Q,$,A,X,Re){let K=j||ba(C,z),ne=z||Y||uf(K),je=a||o,[st,_e]=bd(e.history,y,_,ne,C,u.v7_partialHydration&&$===!0,at,xr,rn,De,le,b,je,s,X,Re);if(ga(te=>!(_&&_.some(ue=>ue.route.id===te))||st&&st.some(ue=>ue.route.id===te)),V=++F,st.length===0&&_e.length===0){let te=_c();return El(C,ve({matches:_,loaderData:{},errors:Re||null},X?{actionData:X}:{},te?{fetchers:new Map(y.fetchers)}:{}),{flushSync:A}),{shortCircuited:!0}}if(!we&&(!u.v7_partialHydration||!$)){_e.forEach(ue=>{let Dt=y.fetchers.get(ue.key),Qi=Il(void 0,Dt?Dt.data:void 0);y.fetchers.set(ue.key,Qi)});let te=X||y.actionData;Ze(ve({navigation:K},te?Object.keys(te).length===0?{actionData:null}:{actionData:te}:{},_e.length>0?{fetchers:new Map(y.fetchers)}:{}),{flushSync:A})}_e.forEach(te=>{se.has(te.key)&&an(te.key),te.controller&&se.set(te.key,te.controller)});let Sr=()=>_e.forEach(te=>an(te.key));O&&O.signal.addEventListener("abort",Sr);let{results:wa,loaderResults:Er,fetcherResults:sn}=await kc(y.matches,_,st,_e,w);if(w.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",Sr),_e.forEach(te=>se.delete(te.key));let Kn=af(wa);if(Kn){if(Kn.idx>=st.length){let te=_e[Kn.idx-st.length].key;b.add(te)}return await Cl(y,Kn.result,{replace:Q}),{shortCircuited:!0}}let{loaderData:xa,errors:Sa}=rf(y,_,st,Er,Re,_e,sn,xt);xt.forEach((te,ue)=>{te.subscribe(Dt=>{(Dt||te.done)&&xt.delete(ue)})});let Ea=_c(),Cr=Tc(V),Vi=Ea||Cr||_e.length>0;return ve({loaderData:xa,errors:Sa},Vi?{fetchers:new Map(y.fetchers)}:{})}function km(w,C,_,j){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.");se.has(w)&&an(w);let z=(j&&j.unstable_flushSync)===!0,Y=a||o,Q=fu(y.location,y.matches,s,u.v7_prependBasename,_,u.v7_relativeSplatPath,C,j==null?void 0:j.relative),$=zr(Y,Q,s);if(!$){kl(w,C,ht(404,{pathname:Q}),{flushSync:z});return}let{path:A,submission:X,error:Re}=Zd(u.v7_normalizeFormMethod,!0,Q,j);if(Re){kl(w,C,Re,{flushSync:z});return}let K=pu($,A);if(L=(j&&j.preventScrollReset)===!0,X&&Pt(X.formMethod)){Pm(w,C,A,K,$,z,X);return}le.set(w,{routeId:C,path:A}),Rm(w,C,A,K,$,z,X)}async function Pm(w,C,_,j,z,Y,Q){if(ya(),le.delete(w),!j.route.action&&!j.route.lazy){let ue=ht(405,{method:Q.formMethod,pathname:_,routeId:C});kl(w,C,ue,{flushSync:Y});return}let $=y.fetchers.get(w);on(w,D0(Q,$),{flushSync:Y});let A=new AbortController,X=Fl(e.history,_,A.signal,Q);se.set(w,A);let Re=F,K=await Ol("action",X,j,z,i,l,s,u.v7_relativeSplatPath);if(X.signal.aborted){se.get(w)===A&&se.delete(w);return}if(u.v7_fetcherPersist&&De.has(w)){if(bn(K)||Ar(K)){on(w,dn(void 0));return}}else{if(bn(K))if(se.delete(w),V>Re){on(w,dn(void 0));return}else return b.add(w),on(w,Il(Q)),Cl(y,K,{fetcherSubmission:Q});if(Ar(K)){kl(w,C,K.error);return}}if(Zn(K))throw ht(400,{type:"defer-action"});let ne=y.navigation.location||y.location,je=Fl(e.history,ne,A.signal),st=a||o,_e=y.navigation.state!=="idle"?zr(st,y.navigation.location,s):y.matches;G(_e,"Didn't find any matches after fetcher action");let Sr=++F;H.set(w,Sr);let wa=Il(Q,K.data);y.fetchers.set(w,wa);let[Er,sn]=bd(e.history,y,_e,Q,ne,!1,at,xr,rn,De,le,b,st,s,{[j.route.id]:K.data},void 0);sn.filter(ue=>ue.key!==w).forEach(ue=>{let Dt=ue.key,Qi=y.fetchers.get(Dt),jm=Il(void 0,Qi?Qi.data:void 0);y.fetchers.set(Dt,jm),se.has(Dt)&&an(Dt),ue.controller&&se.set(Dt,ue.controller)}),Ze({fetchers:new Map(y.fetchers)});let Kn=()=>sn.forEach(ue=>an(ue.key));A.signal.addEventListener("abort",Kn);let{results:xa,loaderResults:Sa,fetcherResults:Ea}=await kc(y.matches,_e,Er,sn,je);if(A.signal.aborted)return;A.signal.removeEventListener("abort",Kn),H.delete(w),se.delete(w),sn.forEach(ue=>se.delete(ue.key));let Cr=af(xa);if(Cr){if(Cr.idx>=Er.length){let ue=sn[Cr.idx-Er.length].key;b.add(ue)}return Cl(y,Cr.result)}let{loaderData:Vi,errors:te}=rf(y,y.matches,Er,Sa,void 0,sn,Ea,xt);if(y.fetchers.has(w)){let ue=dn(K.data);y.fetchers.set(w,ue)}Tc(Sr),y.navigation.state==="loading"&&Sr>V?(G(R,"Expected pending action"),O&&O.abort(),El(y.navigation.location,{matches:_e,loaderData:Vi,errors:te,fetchers:new Map(y.fetchers)})):(Ze({errors:te,loaderData:lf(y.loaderData,Vi,_e,te),fetchers:new Map(y.fetchers)}),at=!1)}async function Rm(w,C,_,j,z,Y,Q){let $=y.fetchers.get(w);on(w,Il(Q,$?$.data:void 0),{flushSync:Y});let A=new AbortController,X=Fl(e.history,_,A.signal);se.set(w,A);let Re=F,K=await Ol("loader",X,j,z,i,l,s,u.v7_relativeSplatPath);if(Zn(K)&&(K=await sm(K,X.signal,!0)||K),se.get(w)===A&&se.delete(w),!X.signal.aborted){if(De.has(w)){on(w,dn(void 0));return}if(bn(K))if(V>Re){on(w,dn(void 0));return}else{b.add(w),await Cl(y,K);return}if(Ar(K)){kl(w,C,K.error);return}G(!Zn(K),"Unhandled fetcher deferred data"),on(w,dn(K.data))}}async function Cl(w,C,_){let{submission:j,fetcherSubmission:z,replace:Y}=_===void 0?{}:_;C.revalidate&&(at=!0);let Q=yi(w.location,C.location,{_isRedirect:!0});if(G(Q,"Expected a location on the redirect navigation"),n){let ne=!1;if(C.reloadDocument)ne=!0;else if(lm.test(C.location)){const je=e.history.createURL(C.location);ne=je.origin!==t.location.origin||zn(je.pathname,s)==null}if(ne){Y?t.location.replace(C.location):t.location.assign(C.location);return}}O=null;let $=Y===!0?ye.Replace:ye.Push,{formMethod:A,formAction:X,formEncType:Re}=w.navigation;!j&&!z&&A&&X&&Re&&(j=uf(w.navigation));let K=j||z;if(g0.has(C.status)&&K&&Pt(K.formMethod))await Wn($,Q,{submission:ve({},K,{formAction:C.location}),preventScrollReset:L});else{let ne=ba(Q,j);await Wn($,Q,{overrideNavigation:ne,fetcherSubmission:z,preventScrollReset:L})}}async function kc(w,C,_,j,z){let Y=await Promise.all([..._.map(A=>Ol("loader",z,A,C,i,l,s,u.v7_relativeSplatPath)),...j.map(A=>A.matches&&A.match&&A.controller?Ol("loader",Fl(e.history,A.path,A.controller.signal),A.match,A.matches,i,l,s,u.v7_relativeSplatPath):{type:pe.error,error:ht(404,{pathname:A.path})})]),Q=Y.slice(0,_.length),$=Y.slice(_.length);return await Promise.all([sf(w,_,Q,Q.map(()=>z.signal),!1,y.loaderData),sf(w,j.map(A=>A.match),$,j.map(A=>A.controller?A.controller.signal:null),!0)]),{results:Y,loaderResults:Q,fetcherResults:$}}function ya(){at=!0,xr.push(...ga()),le.forEach((w,C)=>{se.has(C)&&(rn.push(C),an(C))})}function on(w,C,_){_===void 0&&(_={}),y.fetchers.set(w,C),Ze({fetchers:new Map(y.fetchers)},{flushSync:(_&&_.flushSync)===!0})}function kl(w,C,_,j){j===void 0&&(j={});let z=Zl(y.matches,C);Bi(w),Ze({errors:{[z.route.id]:_},fetchers:new Map(y.fetchers)},{flushSync:(j&&j.flushSync)===!0})}function Pc(w){return u.v7_fetcherPersist&&(Nt.set(w,(Nt.get(w)||0)+1),De.has(w)&&De.delete(w)),y.fetchers.get(w)||w0}function Bi(w){let C=y.fetchers.get(w);se.has(w)&&!(C&&C.state==="loading"&&H.has(w))&&an(w),le.delete(w),H.delete(w),b.delete(w),De.delete(w),y.fetchers.delete(w)}function _m(w){if(u.v7_fetcherPersist){let C=(Nt.get(w)||0)-1;C<=0?(Nt.delete(w),De.add(w)):Nt.set(w,C)}else Bi(w);Ze({fetchers:new Map(y.fetchers)})}function an(w){let C=se.get(w);G(C,"Expected fetch controller: "+w),C.abort(),se.delete(w)}function Rc(w){for(let C of w){let _=Pc(C),j=dn(_.data);y.fetchers.set(C,j)}}function _c(){let w=[],C=!1;for(let _ of b){let j=y.fetchers.get(_);G(j,"Expected fetcher: "+_),j.state==="loading"&&(b.delete(_),w.push(_),C=!0)}return Rc(w),C}function Tc(w){let C=[];for(let[_,j]of H)if(j0}function Tm(w,C){let _=y.blockers.get(w)||Ml;return Be.get(w)!==C&&Be.set(w,C),_}function Lc(w){y.blockers.delete(w),Be.delete(w)}function $i(w,C){let _=y.blockers.get(w)||Ml;G(_.state==="unblocked"&&C.state==="blocked"||_.state==="blocked"&&C.state==="blocked"||_.state==="blocked"&&C.state==="proceeding"||_.state==="blocked"&&C.state==="unblocked"||_.state==="proceeding"&&C.state==="unblocked","Invalid blocker state transition: "+_.state+" -> "+C.state);let j=new Map(y.blockers);j.set(w,C),Ze({blockers:j})}function Nc(w){let{currentLocation:C,nextLocation:_,historyAction:j}=w;if(Be.size===0)return;Be.size>1&&vr(!1,"A router only supports one blocker at a time");let z=Array.from(Be.entries()),[Y,Q]=z[z.length-1],$=y.blockers.get(Y);if(!($&&$.state==="proceeding")&&Q({currentLocation:C,nextLocation:_,historyAction:j}))return Y}function ga(w){let C=[];return xt.forEach((_,j)=>{(!w||w(j))&&(_.cancel(),C.push(j),xt.delete(j))}),C}function Lm(w,C,_){if(h=w,x=C,g=_||null,!S&&y.navigation===Za){S=!0;let j=jc(y.location,y.matches);j!=null&&Ze({restoreScrollPosition:j})}return()=>{h=null,x=null,g=null}}function Dc(w,C){return g&&g(w,C.map(j=>qg(j,y.loaderData)))||w.key}function Nm(w,C){if(h&&x){let _=Dc(w,C);h[_]=x()}}function jc(w,C){if(h){let _=Dc(w,C),j=h[_];if(typeof j=="number")return j}return null}function Dm(w){i={},a=cu(w,l,void 0,i)}return N={get basename(){return s},get future(){return u},get state(){return y},get routes(){return o},get window(){return t},initialize:gm,subscribe:xm,enableScrollRestoration:Lm,navigate:Cc,fetch:km,revalidate:Sm,createHref:w=>e.history.createHref(w),encodeLocation:w=>e.history.encodeLocation(w),getFetcher:Pc,deleteFetcher:_m,dispose:wm,getBlocker:Tm,deleteBlocker:Lc,_internalFetchControllers:se,_internalActiveDeferreds:xt,_internalSetRoutes:Dm},N}function E0(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function fu(e,t,n,r,l,i,o,a){let s,u;if(o){s=[];for(let p of t)if(s.push(p),p.route.id===o){u=p;break}}else s=t,u=t[t.length-1];let c=yc(l||".",vc(s,i),zn(e.pathname,n)||e.pathname,a==="path");return l==null&&(c.search=e.search,c.hash=e.hash),(l==null||l===""||l===".")&&u&&u.route.index&&!wc(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:Xt([n,c.pathname])),yr(c)}function Zd(e,t,n,r){if(!r||!E0(r))return{path:n};if(r.formMethod&&!L0(r.formMethod))return{path:n,error:ht(405,{method:r.formMethod})};let l=()=>({path:n,error:ht(400,{type:"invalid-body"})}),i=r.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),a=am(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Pt(o))return l();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,x)=>{let[S,E]=x;return""+g+S+"="+E+` +`},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Pt(o))return l();try{let h=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:h,text:void 0}}}catch{return l()}}}G(typeof FormData=="function","FormData is not available in this environment");let s,u;if(r.formData)s=hu(r.formData),u=r.formData;else if(r.body instanceof FormData)s=hu(r.body),u=r.body;else if(r.body instanceof URLSearchParams)s=r.body,u=nf(s);else if(r.body==null)s=new URLSearchParams,u=new FormData;else try{s=new URLSearchParams(r.body),u=nf(s)}catch{return l()}let c={formMethod:o,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Pt(c.formMethod))return{path:n,submission:c};let p=nn(n);return t&&p.search&&wc(p.search)&&s.append("index",""),p.search="?"+s,{path:yr(p),submission:c}}function C0(e,t){let n=e;if(t){let r=e.findIndex(l=>l.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function bd(e,t,n,r,l,i,o,a,s,u,c,p,h,g,x,S){let E=S?Object.values(S)[0]:x?Object.values(x)[0]:void 0,d=e.createURL(t.location),f=e.createURL(l),m=S?Object.keys(S)[0]:void 0,N=C0(n,m).filter((R,L)=>{let{route:O}=R;if(O.lazy)return!0;if(O.loader==null)return!1;if(i)return O.loader.hydrate?!0:t.loaderData[O.id]===void 0&&(!t.errors||t.errors[O.id]===void 0);if(k0(t.loaderData,t.matches[L],R)||a.some(Se=>Se===R.route.id))return!0;let B=t.matches[L],Z=R;return ef(R,ve({currentUrl:d,currentParams:B.params,nextUrl:f,nextParams:Z.params},r,{actionResult:E,defaultShouldRevalidate:o||d.pathname+d.search===f.pathname+f.search||d.search!==f.search||om(B,Z)}))}),y=[];return c.forEach((R,L)=>{if(i||!n.some(we=>we.route.id===R.routeId)||u.has(L))return;let O=zr(h,R.path,g);if(!O){y.push({key:L,routeId:R.routeId,path:R.path,matches:null,match:null,controller:null});return}let B=t.fetchers.get(L),Z=pu(O,R.path),Se=!1;p.has(L)?Se=!1:s.includes(L)?Se=!0:B&&B.state!=="idle"&&B.data===void 0?Se=o:Se=ef(Z,ve({currentUrl:d,currentParams:t.matches[t.matches.length-1].params,nextUrl:f,nextParams:n[n.length-1].params},r,{actionResult:E,defaultShouldRevalidate:o})),Se&&y.push({key:L,routeId:R.routeId,path:R.path,matches:O,match:Z,controller:new AbortController})}),[N,y]}function k0(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function om(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ef(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function tf(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];G(l,"No route found in manifest");let i={};for(let o in r){let s=l[o]!==void 0&&o!=="hasErrorBoundary";vr(!s,'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.')),!s&&!Gg.has(o)&&(i[o]=r[o])}Object.assign(l,i),Object.assign(l,ve({},t(l),{lazy:void 0}))}async function Ol(e,t,n,r,l,i,o,a,s){s===void 0&&(s={});let u,c,p,h=S=>{let E,d=new Promise((f,m)=>E=m);return p=()=>E(),t.signal.addEventListener("abort",p),Promise.race([S({request:t,params:n.params,context:s.requestContext}),d])};try{let S=n.route[e];if(n.route.lazy)if(S){let E,d=await Promise.all([h(S).catch(f=>{E=f}),tf(n.route,i,l)]);if(E)throw E;c=d[0]}else if(await tf(n.route,i,l),S=n.route[e],S)c=await h(S);else if(e==="action"){let E=new URL(t.url),d=E.pathname+E.search;throw ht(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:pe.data,data:void 0};else if(S)c=await h(S);else{let E=new URL(t.url),d=E.pathname+E.search;throw ht(404,{pathname:d})}G(c!==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){u=pe.error,c=S}finally{p&&t.signal.removeEventListener("abort",p)}if(T0(c)){let S=c.status;if(y0.has(S)){let d=c.headers.get("Location");if(G(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!lm.test(d))d=fu(new URL(t.url),r.slice(0,r.indexOf(n)+1),o,!0,d,a);else if(!s.isStaticRequest){let f=new URL(t.url),m=d.startsWith("//")?new URL(f.protocol+d):new URL(d),k=zn(m.pathname,o)!=null;m.origin===f.origin&&k&&(d=m.pathname+m.search+m.hash)}if(s.isStaticRequest)throw c.headers.set("Location",d),c;return{type:pe.redirect,status:S,location:d,revalidate:c.headers.get("X-Remix-Revalidate")!==null,reloadDocument:c.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:u===pe.error?pe.error:pe.data,response:c};let E;try{let d=c.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?E=await c.json():E=await c.text()}catch(d){return{type:pe.error,error:d}}return u===pe.error?{type:u,error:new gc(S,c.statusText,E),headers:c.headers}:{type:pe.data,data:E,statusCode:c.status,headers:c.headers}}if(u===pe.error)return{type:u,error:c};if(_0(c)){var g,x;return{type:pe.deferred,deferredData:c,statusCode:(g=c.init)==null?void 0:g.status,headers:((x=c.init)==null?void 0:x.headers)&&new Headers(c.init.headers)}}return{type:pe.data,data:c}}function Fl(e,t,n,r){let l=e.createURL(am(t)).toString(),i={signal:n};if(r&&Pt(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=hu(r.formData):i.body=r.formData}return new Request(l,i)}function hu(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function nf(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function P0(e,t,n,r,l){let i={},o=null,a,s=!1,u={};return n.forEach((c,p)=>{let h=t[p].route.id;if(G(!bn(c),"Cannot handle redirect results in processLoaderData"),Ar(c)){let g=Zl(e,h),x=c.error;r&&(x=Object.values(r)[0],r=void 0),o=o||{},o[g.route.id]==null&&(o[g.route.id]=x),i[h]=void 0,s||(s=!0,a=nm(c.error)?c.error.status:500),c.headers&&(u[h]=c.headers)}else Zn(c)?(l.set(h,c.deferredData),i[h]=c.deferredData.data):i[h]=c.data,c.statusCode!=null&&c.statusCode!==200&&!s&&(a=c.statusCode),c.headers&&(u[h]=c.headers)}),r&&(o=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:o,statusCode:a||200,loaderHeaders:u}}function rf(e,t,n,r,l,i,o,a){let{loaderData:s,errors:u}=P0(t,n,r,l,a);for(let c=0;cr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function of(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 ht(e,t){let{pathname:n,routeId:r,method:l,type:i}=t===void 0?{}:t,o="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(o="Bad Request",l&&n&&r?a="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"?a="defer() is not supported in actions":i==="invalid-body"&&(a="Unable to encode submission body")):e===403?(o="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(o="Not Found",a='No route matches URL "'+n+'"'):e===405&&(o="Method Not Allowed",l&&n&&r?a="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&&(a='Invalid request method "'+l.toUpperCase()+'"')),new gc(e||500,o,new Error(a),!0)}function af(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(bn(n))return{result:n,idx:t}}}function am(e){let t=typeof e=="string"?nn(e):e;return yr(ve({},t,{hash:""}))}function R0(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Zn(e){return e.type===pe.deferred}function Ar(e){return e.type===pe.error}function bn(e){return(e&&e.type)===pe.redirect}function _0(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 T0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function L0(e){return v0.has(e.toLowerCase())}function Pt(e){return p0.has(e.toLowerCase())}async function sf(e,t,n,r,l,i){for(let o=0;op.route.id===s.route.id),c=u!=null&&!om(u,s)&&(i&&i[s.route.id])!==void 0;if(Zn(a)&&(l||c)){let p=r[o];G(p,"Expected an AbortSignal for revalidating fetcher deferred result"),await sm(a,p,l).then(h=>{h&&(n[o]=h||n[o])})}}}async function sm(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:pe.data,data:e.deferredData.unwrappedData}}catch(l){return{type:pe.error,error:l}}return{type:pe.data,data:e.deferredData.data}}}function wc(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function pu(e,t){let n=typeof t=="string"?nn(t).search:t.search;if(e[e.length-1].route.index&&wc(n||""))return e[e.length-1];let r=tm(e);return r[r.length-1]}function uf(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 ba(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 N0(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 Il(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 D0(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 dn(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 j0(e,t){try{let n=e.sessionStorage.getItem(im);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 M0(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(im,JSON.stringify(n))}catch(r){vr(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * React Router v6.21.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function gi(){return gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),P.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let p=yc(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Xt([t,p.pathname])),(c.replace?r.replace:r.push)(p,c.state,c)},[t,r,o,i,e])}const U0=P.createContext(null);function z0(e){let t=P.useContext(Hn).outlet;return t&&P.createElement(U0.Provider,{value:e},t)}function va(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=P.useContext(Qn),{matches:l}=P.useContext(Hn),{pathname:i}=Ai(),o=JSON.stringify(vc(l,r.v7_relativeSplatPath));return P.useMemo(()=>yc(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function A0(e,t,n,r){zi()||G(!1);let{navigator:l}=P.useContext(Qn),{matches:i}=P.useContext(Hn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let u=Ai(),c;if(t){var p;let E=typeof t=="string"?nn(t):t;s==="/"||(p=E.pathname)!=null&&p.startsWith(s)||G(!1),c=E}else c=u;let h=c.pathname||"/",g=s==="/"?h:h.slice(s.length)||"/",x=zr(e,{pathname:g}),S=H0(x&&x.map(E=>Object.assign({},E,{params:Object.assign({},a,E.params),pathname:Xt([s,l.encodeLocation?l.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?s:Xt([s,l.encodeLocation?l.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),i,n,r);return t&&S?P.createElement(ma.Provider,{value:{location:gi({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ye.Pop}},S):S}function B0(){let e=Y0(),t=nm(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)"},i=null;return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),n?P.createElement("pre",{style:l},n):null,i)}const $0=P.createElement(B0,null);class V0 extends P.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?P.createElement(Hn.Provider,{value:this.props.routeContext},P.createElement(um.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Q0(e){let{routeContext:t,match:n,children:r}=e,l=P.useContext(Ui);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),P.createElement(Hn.Provider,{value:t},r)}function H0(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((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,a=(l=n)==null?void 0:l.errors;if(a!=null){let c=o.findIndex(p=>p.route.id&&(a==null?void 0:a[p.route.id]));c>=0||G(!1),o=o.slice(0,Math.min(o.length,c+1))}let s=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,p,h)=>{let g,x=!1,S=null,E=null;n&&(g=a&&p.route.id?a[p.route.id]:void 0,S=p.route.errorElement||$0,s&&(u<0&&h===0?(X0("route-fallback",!1),x=!0,E=null):u===h&&(x=!0,E=p.route.hydrateFallbackElement||null)));let d=t.concat(o.slice(0,h+1)),f=()=>{let m;return g?m=S:x?m=E:p.route.Component?m=P.createElement(p.route.Component,null):p.route.element?m=p.route.element:m=c,P.createElement(Q0,{match:p,routeContext:{outlet:c,matches:d,isDataRoute:n!=null},children:m})};return n&&(p.route.ErrorBoundary||p.route.errorElement||h===0)?P.createElement(V0,{location:n.location,revalidation:n.revalidation,component:S,error:g,children:f(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):f()},null)}var dm=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(dm||{}),Xo=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}(Xo||{});function W0(e){let t=P.useContext(Ui);return t||G(!1),t}function K0(e){let t=P.useContext(xc);return t||G(!1),t}function G0(e){let t=P.useContext(Hn);return t||G(!1),t}function fm(e){let t=G0(),n=t.matches[t.matches.length-1];return n.route.id||G(!1),n.route.id}function Y0(){var e;let t=P.useContext(um),n=K0(Xo.UseRouteError),r=fm(Xo.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function q0(){let{router:e}=W0(dm.UseNavigateStable),t=fm(Xo.UseNavigateStable),n=P.useRef(!1);return cm(()=>{n.current=!0}),P.useCallback(function(l,i){i===void 0&&(i={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,gi({fromRouteId:t},i)))},[e,t])}const cf={};function X0(e,t,n){!t&&!cf[e]&&(cf[e]=!0)}function J0(e){return z0(e.context)}function Z0(e){let{basename:t="/",children:n=null,location:r,navigationType:l=ye.Pop,navigator:i,static:o=!1,future:a}=e;zi()&&G(!1);let s=t.replace(/^\/*/,"/"),u=P.useMemo(()=>({basename:s,navigator:i,static:o,future:gi({v7_relativeSplatPath:!1},a)}),[s,a,i,o]);typeof r=="string"&&(r=nn(r));let{pathname:c="/",search:p="",hash:h="",state:g=null,key:x="default"}=r,S=P.useMemo(()=>{let E=zn(c,s);return E==null?null:{location:{pathname:E,search:p,hash:h,state:g,key:x},navigationType:l}},[s,c,p,h,g,x,l]);return S==null?null:P.createElement(Qn.Provider,{value:u},P.createElement(ma.Provider,{children:n,value:S}))}new Promise(()=>{});function b0(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:P.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:P.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:P.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.21.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function e1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function t1(e,t){return e.button===0&&(!t||t==="_self")&&!e1(e)}const n1=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],r1=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];function l1(e,t){return S0({basename:t==null?void 0:t.basename,future:vl({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Hg({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||i1(),routes:e,mapRouteProperties:b0,window:t==null?void 0:t.window}).initialize()}function i1(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=vl({},t,{errors:o1(t.errors)})),t}function o1(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 gc(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 pm=P.createContext({isTransitioning:!1}),a1=P.createContext(new Map),s1="startTransition",df=Jm[s1],u1="flushSync",ff=ag[u1];function c1(e){df?df(e):e()}function Ul(e){ff?ff(e):e()}class d1{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 f1(e){let{fallbackElement:t,router:n,future:r}=e,[l,i]=P.useState(n.state),[o,a]=P.useState(),[s,u]=P.useState({isTransitioning:!1}),[c,p]=P.useState(),[h,g]=P.useState(),[x,S]=P.useState(),E=P.useRef(new Map),{v7_startTransition:d}=r||{},f=P.useCallback(R=>{d?c1(R):R()},[d]),m=P.useCallback((R,L)=>{let{deletedFetchers:O,unstable_flushSync:B,unstable_viewTransitionOpts:Z}=L;O.forEach(we=>E.current.delete(we)),R.fetchers.forEach((we,at)=>{we.data!==void 0&&E.current.set(at,we.data)});let Se=n.window==null||typeof n.window.document.startViewTransition!="function";if(!Z||Se){B?Ul(()=>i(R)):f(()=>i(R));return}if(B){Ul(()=>{h&&(c&&c.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})});let we=n.window.document.startViewTransition(()=>{Ul(()=>i(R))});we.finished.finally(()=>{Ul(()=>{p(void 0),g(void 0),a(void 0),u({isTransitioning:!1})})}),Ul(()=>g(we));return}h?(c&&c.resolve(),h.skipTransition(),S({state:R,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})):(a(R),u({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}))},[n.window,h,c,E,f]);P.useLayoutEffect(()=>n.subscribe(m),[n,m]),P.useEffect(()=>{s.isTransitioning&&!s.flushSync&&p(new d1)},[s]),P.useEffect(()=>{if(c&&o&&n.window){let R=o,L=c.promise,O=n.window.document.startViewTransition(async()=>{f(()=>i(R)),await L});O.finished.finally(()=>{p(void 0),g(void 0),a(void 0),u({isTransitioning:!1})}),g(O)}},[f,o,c,n.window]),P.useEffect(()=>{c&&o&&l.location.key===o.location.key&&c.resolve()},[c,h,l.location,o]),P.useEffect(()=>{!s.isTransitioning&&x&&(a(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),S(void 0))},[s.isTransitioning,x]),P.useEffect(()=>{},[]);let k=P.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,L,O)=>n.navigate(R,{state:L,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(R,L,O)=>n.navigate(R,{replace:!0,state:L,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),N=n.basename||"/",y=P.useMemo(()=>({router:n,navigator:k,static:!1,basename:N}),[n,k,N]);return P.createElement(P.Fragment,null,P.createElement(Ui.Provider,{value:y},P.createElement(xc.Provider,{value:l},P.createElement(a1.Provider,{value:E.current},P.createElement(pm.Provider,{value:s},P.createElement(Z0,{basename:N,location:l.location,navigationType:l.historyAction,navigator:k,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},l.initialized||n.future.v7_partialHydration?P.createElement(h1,{routes:n.routes,future:n.future,state:l}):t))))),null)}function h1(e){let{routes:t,future:n,state:r}=e;return A0(t,void 0,r,n)}const p1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",m1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mu=P.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:o,state:a,target:s,to:u,preventScrollReset:c,unstable_viewTransition:p}=t,h=hm(t,n1),{basename:g}=P.useContext(Qn),x,S=!1;if(typeof u=="string"&&m1.test(u)&&(x=u,p1))try{let m=new URL(window.location.href),k=u.startsWith("//")?new URL(m.protocol+u):new URL(u),N=zn(k.pathname,g);k.origin===m.origin&&N!=null?u=N+k.search+k.hash:S=!0}catch{}let E=O0(u,{relative:l}),d=y1(u,{replace:o,state:a,target:s,preventScrollReset:c,relative:l,unstable_viewTransition:p});function f(m){r&&r(m),m.defaultPrevented||d(m)}return P.createElement("a",vl({},h,{href:x||E,onClick:S||i?r:f,ref:n,target:s}))}),es=P.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:o=!1,style:a,to:s,unstable_viewTransition:u,children:c}=t,p=hm(t,r1),h=va(s,{relative:p.relative}),g=Ai(),x=P.useContext(xc),{navigator:S}=P.useContext(Qn),E=x!=null&&g1(h)&&u===!0,d=S.encodeLocation?S.encodeLocation(h).pathname:h.pathname,f=g.pathname,m=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;l||(f=f.toLowerCase(),m=m?m.toLowerCase():null,d=d.toLowerCase());const k=d!=="/"&&d.endsWith("/")?d.length-1:d.length;let N=f===d||!o&&f.startsWith(d)&&f.charAt(k)==="/",y=m!=null&&(m===d||!o&&m.startsWith(d)&&m.charAt(d.length)==="/"),R={isActive:N,isPending:y,isTransitioning:E},L=N?r:void 0,O;typeof i=="function"?O=i(R):O=[i,N?"active":null,y?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let B=typeof a=="function"?a(R):a;return P.createElement(mu,vl({},p,{"aria-current":L,className:O,ref:n,style:B,to:s,unstable_viewTransition:u}),typeof c=="function"?c(R):c)});var vu;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vu||(vu={}));var hf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(hf||(hf={}));function v1(e){let t=P.useContext(Ui);return t||G(!1),t}function y1(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,s=F0(),u=Ai(),c=va(e,{relative:o});return P.useCallback(p=>{if(t1(p,n)){p.preventDefault();let h=r!==void 0?r:yr(u)===yr(c);s(e,{replace:h,state:l,preventScrollReset:i,relative:o,unstable_viewTransition:a})}},[u,s,c,r,l,n,e,i,o,a])}function g1(e,t){t===void 0&&(t={});let n=P.useContext(pm);n==null&&G(!1);let{basename:r}=v1(vu.useViewTransitionState),l=va(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=zn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=zn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return du(l.pathname,o)!=null||du(l.pathname,i)!=null}const Yt="/expenses-react-app/",Sc="https://react-expenses-30273-default-rtdb.europe-west1.firebasedatabase.app",mm=({children:e})=>T.jsx("div",{className:"px-6 sm:px-12 lg:px-20",children:e}),w1=()=>T.jsxs("ul",{className:"flex items-center gap-8",children:[T.jsx("li",{children:T.jsx(es,{to:Yt,className:({isActive:e})=>e?"relative after:absolute after:content-[''] after:left-0 after:right-0 after:-bottom-1.5 after:w-full after:h-0.5 after:bg-light no-underline text-light":"text-light no-underline",end:!0,children:"Home"})}),T.jsx("li",{children:T.jsx(es,{to:`${Yt}login`,className:({isActive:e})=>e?"relative after:absolute after:content-[''] after:left-0 after:right-0 after:-bottom-1.5 after:w-full after:h-0.5 after:bg-light no-underline text-light":"text-light no-underline",children:"Log In"})}),T.jsx("li",{children:T.jsx(es,{to:`${Yt}register`,className:({isActive:e})=>e?"relative after:absolute after:content-[''] after:left-0 after:right-0 after:-bottom-1.5 after:w-full after:h-0.5 after:bg-light no-underline text-light":"text-light no-underline",children:"Sign Up"})})]}),x1="/expenses-react-app/assets/logo-HTwwoxjU.png",S1=()=>T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("img",{className:"w-12 h-12",src:x1,alt:"Expenses React App Logo"}),T.jsx("span",{className:"block font-medium text-light",children:"Expense Tracker"})]}),E1=()=>T.jsx("header",{className:"py-4 bg-primary",children:T.jsx(mm,{children:T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx(S1,{}),T.jsx("nav",{children:T.jsx(w1,{})})]})})}),C1=()=>T.jsxs(T.Fragment,{children:[T.jsx(E1,{}),T.jsx("main",{className:"py-12",children:T.jsx(mm,{children:T.jsx(J0,{})})})]});class Ec extends Error{constructor(n,r){super(n);kr(this,"statusCode");this.statusCode=r}}const k1=async({signal:e})=>{const t=await fetch(`${Sc}/expenses.json`,{method:"GET",signal:e});if(!t.ok){const r=await t.json();throw new Ec(r||"Failed to fetch expenses!",t.status)}return await t.json()},P1=async e=>{const t=await fetch(`${Sc}/expenses.json`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e.title,amount:e.amount,date:e.date.toISOString().split("T")[0]})});if(!t.ok){const r=await t.json();throw new Ec(r||"Failed to add expense!",t.status)}return await t.json()},R1=async({id:e})=>{const t=await fetch(`${Sc}/expenses/${e}.json`,{method:"DELETE"});if(!t.ok){const r=await t.json();throw new Ec(r||"Failed to delete expense!",t.status)}return await t.json()};class _1{constructor(t,n,r,l){kr(this,"id");kr(this,"title");kr(this,"amount");kr(this,"date");this.id=t,this.title=n,this.amount=r,this.date=l}}const Sl=({className:e,tagName:t,children:n})=>{const r=t||"div";return T.jsx(r,{className:e?`overflow-hidden rounded-md shadow-card ${e}`:"overflow-hidden rounded-md shadow-card",children:n})},T1=({selected:e,onSelectedItem:t})=>{const n=r=>{t(r.target.value)};return T.jsx("div",{className:"px-4 text-light",children:T.jsxs("div",{className:"my-5 flex items-center justify-between",children:[T.jsx("label",{className:"font-bold",children:"Filter by year"}),T.jsxs("select",{className:"py-2 px-6 font-bold rounded-md text-dark",value:e,onChange:n,children:[T.jsx("option",{value:"none",children:"All"}),T.jsx("option",{value:"2023",children:"2023"}),T.jsx("option",{value:"2022",children:"2022"}),T.jsx("option",{value:"2021",children:"2021"}),T.jsx("option",{value:"2020",children:"2020"}),T.jsx("option",{value:"2019",children:"2019"})]})]})})},An=({className:e,children:t,id:n,type:r,disabled:l,onClick:i})=>T.jsx("button",{id:n,className:e?`py-3.5 px-7 md:py-4 md:px-8 w-fit rounded-xl text-light bg-accent hover:bg-accent-light active:bg-accent-light disabled:bg-opacity-80 transition-all ${e}`:"py-3.5 px-7 md:py-4 md:px-8 w-fit rounded-xl text-light bg-accent hover:bg-accent-light active:bg-accent-light disabled:bg-opacity-80 transition-all",type:r||"button",disabled:l,onClick:i,children:t}),ts={CANCEL:"cancel-btn",ACTION:"action-btn"},L1=({title:e,text:t,onConfirm:n})=>{const r=P.useContext(pc),l=i=>{(i.target.classList.contains("modal")||i.target.id===ts.CANCEL)&&r.removeModal()};return T.jsx("div",{className:r.isActive?"modal fixed z-[5] top-0 left-0 w-full h-full flex items-center justify-center opacity-100 visible bg-dark bg-opacity-60 transition-all":"fixed -z-[1] top-0 left-0 w-full h-full flex items-center justify-center opacity-0 invisible bg-dark bg-opacity-60 transition-all",onClick:l,children:T.jsxs(Sl,{className:"p-8 flex flex-col text-dark bg-light",children:[T.jsx("h2",{className:"mb-5 text-xl font-semibold text-center",children:e}),T.jsx("p",{className:"mb-8",children:t}),T.jsxs("div",{className:"flex justify-center gap-4",children:[T.jsx(An,{id:ts.CANCEL,type:"button",onClick:l,children:"Close"}),T.jsx(An,{id:ts.ACTION,className:"bg-danger hover:bg-[#ce0000]",type:"button",onClick:n,children:"Delete"})]})]})})},N1=({date:e})=>{const t=e.toLocaleString("en-US",{month:"long"}),n=e.toLocaleString("en-US",{day:"2-digit"}),r=e.getFullYear();return T.jsxs("div",{className:"w-20 h-20 flex flex-col items-center justify-center rounded-xl text-light bg-primary",children:[T.jsx("span",{className:"text-xs md:text-sm font-semibold",children:t}),T.jsx("span",{className:"text-xl md:text-2xl font-bold",children:r}),T.jsx("span",{className:"text-xs md:text-sm",children:n})]})},D1="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='white'%20class='bi%20bi-trash3'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M6.5%201h3a.5.5%200%200%201%20.5.5v1H6v-1a.5.5%200%200%201%20.5-.5ZM11%202.5v-1A1.5%201.5%200%200%200%209.5%200h-3A1.5%201.5%200%200%200%205%201.5v1H2.506a.58.58%200%200%200-.01%200H1.5a.5.5%200%200%200%200%201h.538l.853%2010.66A2%202%200%200%200%204.885%2016h6.23a2%202%200%200%200%201.994-1.84l.853-10.66h.538a.5.5%200%200%200%200-1h-.995a.59.59%200%200%200-.01%200H11Zm1.958%201-.846%2010.58a1%201%200%200%201-.997.92h-6.23a1%201%200%200%201-.997-.92L3.042%203.5h9.916Zm-7.487%201a.5.5%200%200%201%20.528.47l.5%208.5a.5.5%200%200%201-.998.06L5%205.03a.5.5%200%200%201%20.47-.53Zm5.058%200a.5.5%200%200%201%20.47.53l-.5%208.5a.5.5%200%201%201-.998-.06l.5-8.5a.5.5%200%200%201%20.528-.47ZM8%204.5a.5.5%200%200%201%20.5.5v8.5a.5.5%200%200%201-1%200V5a.5.5%200%200%201%20.5-.5Z'/%3e%3c/svg%3e",j1=({data:e,onDelete:t})=>{const{id:n,title:r,amount:l,date:i}=e,o=()=>{t(n,r)};return T.jsxs(Sl,{className:"p-3 my-4 flex items-center justify-between bg-secondary",tagName:"li",children:[T.jsx(N1,{date:i}),T.jsxs("div",{className:"flex-[1] flex flex-col-reverse items-end md:flex-row md:items-center justify-start gap-3",children:[T.jsx("h2",{className:"flex-[1] md:mx-4 md:text-xl text-right md:text-left text-light",children:r}),T.jsxs("span",{className:"p-2 md:py-2 md:px-6 md:text-xl rounded-xl text-light bg-accent",children:["$",l]})]}),T.jsx(An,{className:"!p-3 ml-3 bg-dark hover:shadow-card focus:scale-95 transition-all",type:"button",onClick:o,children:T.jsx("img",{className:"w-4 h-4 md:w-5 md:h-5",src:D1,alt:"Delete"})})]})},M1=({expenses:e,isLoading:t,error:n})=>{const r=P.useContext(pc),[l,i]=P.useState({expenseId:"",expenseTitle:""}),{mutate:o}=Zp({mutationFn:R1,onSuccess:()=>{mc.invalidateQueries({queryKey:["expenses"]})}}),a=`Are you sure you want to delete expense "${l.expenseTitle}"?`,s="Delete expense",u=(g,x)=>{r.displayModal(),i({expenseId:g,expenseTitle:x})},c=async()=>{const g=l.expenseId;o({id:g}),r.removeModal()};let p=T.jsx("h2",{className:"mt-8 md:text-xl font-bold text-center text-light",children:"Found no expenses."});e.length>0&&(p=T.jsx("ul",{className:"list-none",children:e.map(g=>T.jsx(j1,{data:g,onDelete:u},g.id))}));let h=p;return t&&(h=T.jsx("h2",{className:"mt-8 md:text-xl font-bold text-center text-light",children:"Loading expenses..."})),n&&(h=T.jsx("h2",{className:"mt-8 md:text-xl font-bold text-center text-light",children:n})),T.jsxs(T.Fragment,{children:[Bp.createPortal(T.jsx(L1,{title:s,text:a,onConfirm:c}),document.getElementById("modal-root")),h]})},O1=({data:e,total:t})=>{const{label:n,value:r}=e;let l="0%";return t>0&&(l=`${Math.round(r/t*100)}%`),T.jsxs("div",{className:"h-24 sm:h-28 flex flex-col items-center gap-1",children:[T.jsx("div",{className:"overflow-hidden h-full w-5 flex flex-col justify-end rounded-xl border border-secondary bg-[#c3b4f3]",children:T.jsx("div",{className:"w-full bg-[#4826b9] transition-all",style:{height:l}})}),T.jsx("div",{className:"text-sm font-semibold text-center text-dark",children:n})]})},F1="_chart_n7zub_1",I1={chart:F1},U1=({data:e})=>{const n=e.map(r=>r.value).reduce((r,l)=>r+l,0);return T.jsx(Sl,{className:`p-5 flex flex-wrap gap-y-4 bg-[#f8dfff] ${I1.chart}`,children:e.map(r=>T.jsx(O1,{data:r,total:n},r.label))})},ns=[{label:"Jan",value:0},{label:"Feb",value:0},{label:"Mar",value:0},{label:"Apr",value:0},{label:"May",value:0},{label:"Jun",value:0},{label:"Jul",value:0},{label:"Aug",value:0},{label:"Sep",value:0},{label:"Oct",value:0},{label:"Nov",value:0},{label:"Dec",value:0}],z1=({expenses:e})=>{for(const t of ns)t.value=0;for(const t of e){const n=t.date.getMonth();ns[n].value+=t.amount}return T.jsx(U1,{data:ns})},A1=({data:e,isLoading:t,error:n})=>{const[r,l]=P.useState(""),i=a=>{l(a)};let o=e;return r&&(o=e.filter(a=>a.date.getFullYear().toString()===r)),T.jsxs(Sl,{className:"p-6 mt-8 mx-auto max-w-[50rem] bg-primary",children:[T.jsx(T1,{selected:r,onSelectedItem:i}),T.jsx(z1,{expenses:o}),T.jsx(M1,{expenses:o,isLoading:t,error:n})]})},vm={value:"",isValid:null},B1=(e,t)=>{switch(t.type){case"USER_INPUT":return{value:t.value,isValid:t.validate(t.value)};case"INPUT_BLUR":return{value:e.value,isValid:t.validate(e.value)};case"CLEAR_INPUT":return vm;default:return{value:"",isValid:!1}}},On=e=>{const[t,n]=P.useReducer(B1,vm),r=o=>{n({type:"USER_INPUT",value:o.target.value,validate:e})},l=()=>{n({type:"INPUT_BLUR",validate:e})},i=()=>{n({type:"CLEAR_INPUT"})};return{value:t.value,isValid:t.isValid,handleChange:r,handleBlur:l,handleClear:i}},Fn=({label:e,id:t,className:n,type:r,min:l,max:i,step:o,value:a,hasError:s,onChange:u,onBlur:c})=>{let p;return s?p=n?`p-2 w-full h-10 text-dark rounded-md outline outline-2 outline-danger ${n}`:"p-2 w-full h-10 text-dark rounded-md outline outline-2 outline-danger":p=n?`p-2 w-full h-10 text-dark rounded-md ${n}`:"p-2 w-full h-10 text-dark rounded-md",T.jsxs("div",{children:[T.jsx("label",{className:"mb-2 block text-sm sm:text-base font-bold text-dark",htmlFor:t,children:e}),T.jsx("input",{id:t,className:p,type:r,min:l,max:i,step:o,value:a,onChange:u,onBlur:c})]})},$1={"new-expense-controls":"_new-expense-controls_170ne_1"},rs=e=>e.trim().length!==0,V1=({isLoading:e,onSubmit:t,onCancel:n})=>{const{value:r,isValid:l,handleChange:i,handleBlur:o,handleClear:a}=On(rs),{value:s,isValid:u,handleChange:c,handleBlur:p,handleClear:h}=On(rs),{value:g,isValid:x,handleChange:S,handleBlur:E,handleClear:d}=On(rs),[f,m]=P.useState(!1);P.useEffect(()=>{const y=setTimeout(()=>{m(l&&u&&x)},250);return()=>{clearTimeout(y)}},[l,u,x]);const k=()=>{a(),h(),d()},N=y=>{if(y.preventDefault(),f){const R={title:r,amount:+s,date:new Date(g)};t(R),k()}else l?u?E():p():o()};return T.jsxs("form",{onSubmit:N,children:[T.jsxs("div",{className:`mb-6 flex flex-wrap justify-stretch md:justify-center gap-6 text-left ${$1["new-expense-controls"]}`,children:[T.jsx(Fn,{label:"Title",id:"title",type:"text",value:r,hasError:l!==null&&!l,onChange:i,onBlur:o}),T.jsx(Fn,{label:"Amount",id:"amount",type:"number",min:"0.01",step:"0.01",value:s,hasError:u!==null&&!u,onChange:c,onBlur:p}),T.jsx(Fn,{label:"Date",id:"date",type:"date",min:"2019-01-01",max:"2023-12-31",value:g,hasError:x!==null&&!x,onChange:S,onBlur:E})]}),T.jsxs("div",{className:"flex flex-wrap justify-center md:justify-end gap-4",children:[T.jsx(An,{type:"button",onClick:n,children:"Close"}),T.jsx(An,{type:"submit",children:e?"Sending...":"Add Expense"})]})]})},Q1=()=>{const[e,t]=P.useState(!1),{mutate:n,isPending:r}=Zp({mutationFn:P1,onSuccess:()=>{mc.invalidateQueries({queryKey:["expenses"]})}}),l=async a=>{n(a),t(!1)},i=()=>{t(!0)},o=()=>{t(!1)};return T.jsx(Sl,{className:"p-4 mx-auto max-w-[50rem] text-center bg-background",children:e?T.jsx(V1,{isLoading:r,onSubmit:l,onCancel:o}):T.jsx(An,{type:"button",onClick:i,children:"Add New Expense"})})},H1=e=>{const t=[];for(const n in e)t.push(new _1(n,e[n].title,e[n].amount,new Date(e[n].date)));return t},W1=()=>{const[e,t]=P.useState([]),{data:n,isPending:r,error:l}=Bg({queryKey:["expenses"],queryFn:({signal:i})=>k1({signal:i})});return P.useEffect(()=>{const i=H1(n);t(i)},[n]),T.jsxs(T.Fragment,{children:[T.jsx(Q1,{}),T.jsx(A1,{data:e,isLoading:r,error:l==null?void 0:l.message})]})},ym=({children:e,formType:t,onSubmit:n})=>{let r;return t==="login"?r=T.jsxs("p",{className:"mt-5 mb-1 text-center text-primary",children:["Don't have an account yet?"," ",T.jsx(mu,{className:"ml-1 text-accent",to:`${Yt}register`,children:"Sign Up"})]}):r=T.jsxs("p",{className:"mt-5 mb-1 text-center text-primary",children:["Already have an account?"," ",T.jsx(mu,{className:"ml-1 text-accent",to:`${Yt}login`,children:"Sign In"})]}),T.jsxs(Sl,{className:"p-6 mx-auto max-w-[25rem] bg-background",children:[T.jsx("form",{className:"flex flex-col gap-4",onSubmit:n,children:e}),r]})},ls=e=>e.trim().length!==0,K1=()=>{const{value:e,isValid:t,handleChange:n,handleBlur:r,handleClear:l}=On(ls),{value:i,isValid:o,handleChange:a,handleBlur:s,handleClear:u}=On(ls),{value:c,isValid:p,handleChange:h,handleBlur:g,handleClear:x}=On(ls),[S,E]=P.useState(!1);P.useEffect(()=>{const m=setTimeout(()=>{E(t&&o&&p)},250);return()=>{clearTimeout(m)}},[t,o,p]);const d=()=>{l(),u(),x()},f=m=>{m.preventDefault(),S?(console.log({email:e,username:i,password:c}),d()):t?o?g():s():r()};return T.jsxs(ym,{formType:"register",onSubmit:f,children:[T.jsx(Fn,{label:"Email",id:"email",type:"email",value:e,hasError:t!==null&&!t,onChange:n,onBlur:r}),T.jsx(Fn,{label:"Username",id:"username",type:"text",value:i,hasError:o!==null&&!o,onChange:a,onBlur:s}),T.jsx(Fn,{label:"Password",id:"password",type:"password",value:c,hasError:p!==null&&!p,onChange:h,onBlur:g}),T.jsx(An,{className:"mt-2 mx-auto",type:"submit",children:"Sign Up"})]})},G1=()=>T.jsx(K1,{}),pf=e=>e.trim().length!==0,Y1=()=>{const{value:e,isValid:t,handleChange:n,handleBlur:r,handleClear:l}=On(pf),{value:i,isValid:o,handleChange:a,handleBlur:s,handleClear:u}=On(pf),[c,p]=P.useState(!1);P.useEffect(()=>{const x=setTimeout(()=>{p(t&&o)},250);return()=>{clearTimeout(x)}},[t,o]);const h=()=>{l(),u()},g=x=>{x.preventDefault(),c?(console.log({email:"test",username:e,password:i}),h()):r()};return T.jsxs(ym,{formType:"login",onSubmit:g,children:[T.jsx(Fn,{label:"Username",id:"username",type:"text",value:e,hasError:t!==null&&!t,onChange:n,onBlur:r}),T.jsx(Fn,{label:"Password",id:"password",type:"password",value:i,hasError:o!==null&&!o,onChange:a,onBlur:s}),T.jsx(An,{className:"mt-2 mx-auto",type:"submit",children:"Sign In"})]})},q1=()=>T.jsx(Y1,{}),X1=l1([{path:Yt,element:T.jsx(C1,{}),children:[{path:Yt,element:T.jsx(W1,{})},{path:`${Yt}register`,element:T.jsx(G1,{})},{path:`${Yt}login`,element:T.jsx(q1,{})}]}]),J1=()=>T.jsx(f1,{router:X1}),Z1=is.createRoot(document.getElementById("page-root"));Z1.render(T.jsx(Qg,{children:T.jsx(J1,{})})); diff --git a/assets/index-HiftRNyy.js b/assets/index-HiftRNyy.js deleted file mode 100644 index 5a44097..0000000 --- a/assets/index-HiftRNyy.js +++ /dev/null @@ -1,68 +0,0 @@ -var pp=Object.defineProperty;var hp=(e,t,n)=>t in e?pp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yr=(e,t,n)=>(hp(e,typeof t!="symbol"?t+"":t,n),n);function mc(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function vc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gc={exports:{}},Co={},yc={exports:{}},Q={};/** - * @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 dl=Symbol.for("react.element"),mp=Symbol.for("react.portal"),vp=Symbol.for("react.fragment"),gp=Symbol.for("react.strict_mode"),yp=Symbol.for("react.profiler"),wp=Symbol.for("react.provider"),xp=Symbol.for("react.context"),Sp=Symbol.for("react.forward_ref"),Ep=Symbol.for("react.suspense"),kp=Symbol.for("react.memo"),Cp=Symbol.for("react.lazy"),Bu=Symbol.iterator;function Pp(e){return e===null||typeof e!="object"?null:(e=Bu&&e[Bu]||e["@@iterator"],typeof e=="function"?e:null)}var wc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xc=Object.assign,Sc={};function dr(e,t,n){this.props=e,this.context=t,this.refs=Sc,this.updater=n||wc}dr.prototype.isReactComponent={};dr.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")};dr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ec(){}Ec.prototype=dr.prototype;function Ra(e,t,n){this.props=e,this.context=t,this.refs=Sc,this.updater=n||wc}var Na=Ra.prototype=new Ec;Na.constructor=Ra;xc(Na,dr.prototype);Na.isPureReactComponent=!0;var Vu=Array.isArray,kc=Object.prototype.hasOwnProperty,La={current:null},Cc={key:!0,ref:!0,__self:!0,__source:!0};function Pc(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)kc.call(t,r)&&!Cc.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1>>1,ee=D[G];if(0>>1;Gl(lt,V))Del(zt,lt)?(D[G]=zt,D[De]=V,G=De):(D[G]=lt,D[ke]=V,G=ke);else if(Del(zt,V))D[G]=zt,D[De]=V,G=De;else break e}}return A}function l(D,A){var V=D.sortIndex-A.sortIndex;return V!==0?V:D.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var u=[],s=[],c=1,p=null,m=3,S=!1,w=!1,x=!1,_=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(D){for(var A=n(s);A!==null;){if(A.callback===null)r(s);else if(A.startTime<=D)r(s),A.sortIndex=A.expirationTime,t(u,A);else break;A=n(s)}}function E(D){if(x=!1,h(D),!w)if(n(u)!==null)w=!0,Mt(L);else{var A=n(s);A!==null&&re(E,A.startTime-D)}}function L(D,A){w=!1,x&&(x=!1,f(T),T=-1),S=!0;var V=m;try{for(h(A),p=n(u);p!==null&&(!(p.expirationTime>A)||D&&!X());){var G=p.callback;if(typeof G=="function"){p.callback=null,m=p.priorityLevel;var ee=G(p.expirationTime<=A);A=e.unstable_now(),typeof ee=="function"?p.callback=ee:p===n(u)&&r(u),h(A)}else r(u);p=n(u)}if(p!==null)var pt=!0;else{var ke=n(s);ke!==null&&re(E,ke.startTime-A),pt=!1}return pt}finally{p=null,m=V,S=!1}}var v=!1,R=null,T=-1,z=5,F=-1;function X(){return!(e.unstable_now()-FD||125G?(D.sortIndex=V,t(s,D),n(u)===null&&D===n(s)&&(x?(f(T),T=-1):x=!0,re(E,V-G))):(D.sortIndex=ee,t(u,D),w||S||(w=!0,Mt(L))),D},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(D){var A=m;return function(){var V=m;m=A;try{return D.apply(this,arguments)}finally{m=V}}}})(Lc);Nc.exports=Lc;var Up=Nc.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 Tc=P,Ke=Up;function N(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"),Ni=Object.prototype.hasOwnProperty,Ap=/^[: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]*$/,Hu={},Wu={};function Bp(e){return Ni.call(Wu,e)?!0:Ni.call(Hu,e)?!1:Ap.test(e)?Wu[e]=!0:(Hu[e]=!0,!1)}function Vp(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 $p(e,t,n,r){if(t===null||typeof t>"u"||Vp(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 Oe(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Re[e]=new Oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Re[t]=new Oe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Re[e]=new Oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Re[e]=new Oe(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){Re[e]=new Oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Re[e]=new Oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Re[e]=new Oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Re[e]=new Oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Re[e]=new Oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var ja=/[\-:]([a-z])/g;function Da(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(ja,Da);Re[t]=new Oe(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(ja,Da);Re[t]=new Oe(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(ja,Da);Re[t]=new Oe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Re[e]=new Oe(e,1,!1,e.toLowerCase(),null,!1,!1)});Re.xlinkHref=new Oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Re[e]=new Oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ma(e,t,n,r){var l=Re.hasOwnProperty(t)?Re[t]:null;(l!==null?l.type!==0:r||!(2a||l[i]!==o[a]){var u=` -`+l[i].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{Jo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Dr(e):""}function Hp(e){switch(e.tag){case 5:return Dr(e.type);case 16:return Dr("Lazy");case 13:return Dr("Suspense");case 19:return Dr("SuspenseList");case 0:case 2:case 15:return e=Zo(e.type,!1),e;case 11:return e=Zo(e.type.render,!1),e;case 1:return e=Zo(e.type,!0),e;default:return""}}function Di(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 Un:return"Fragment";case Fn:return"Portal";case Li:return"Profiler";case za:return"StrictMode";case Ti:return"Suspense";case ji:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Mc:return(e.displayName||"Context")+".Consumer";case Dc:return(e._context.displayName||"Context")+".Provider";case Ia:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Oa:return t=e.displayName||null,t!==null?t:Di(e.type)||"Memo";case Bt:t=e._payload,e=e._init;try{return Di(e(t))}catch{}}return null}function Wp(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 Di(t);case 8:return t===za?"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 nn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ic(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qp(e){var t=Ic(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pl(e){e._valueTracker||(e._valueTracker=Qp(e))}function Oc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ic(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ql(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 Mi(e,t){var n=t.checked;return ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ku(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nn(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 Fc(e,t){t=t.checked,t!=null&&Ma(e,"checked",t,!1)}function zi(e,t){Fc(e,t);var n=nn(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")?Ii(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ii(e,t.type,nn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yu(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 Ii(e,t,n){(t!=="number"||ql(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mr=Array.isArray;function Zn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=_l.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Yr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Or={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},Kp=["Webkit","ms","Moz","O"];Object.keys(Or).forEach(function(e){Kp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Or[t]=Or[e]})});function Vc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Or.hasOwnProperty(e)&&Or[e]?(""+t).trim():t+"px"}function $c(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Vc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Yp=ue({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 Ui(e,t){if(t){if(Yp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function Ai(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 Bi=null;function Fa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vi=null,qn=null,bn=null;function Ju(e){if(e=hl(e)){if(typeof Vi!="function")throw Error(N(280));var t=e.stateNode;t&&(t=Lo(t),Vi(e.stateNode,e.type,t))}}function Hc(e){qn?bn?bn.push(e):bn=[e]:qn=e}function Wc(){if(qn){var e=qn,t=bn;if(bn=qn=null,Ju(e),t)for(e=0;e>>=0,e===0?32:31-(lh(e)/oh|0)|0}var Rl=64,Nl=4194304;function zr(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 no(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=zr(a):(o&=i,o!==0&&(r=zr(o)))}else i=n&~l,i!==0?r=zr(i):o!==0&&(r=zr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function fl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=n}function sh(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=Ur),os=" ",is=!1;function cd(e,t){switch(e){case"keyup":return Fh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var An=!1;function Ah(e,t){switch(e){case"compositionend":return dd(t);case"keypress":return t.which!==32?null:(is=!0,os);case"textInput":return e=t.data,e===os&&is?null:e;default:return null}}function Bh(e,t){if(An)return e==="compositionend"||!Qa&&cd(e,t)?(e=ud(),Hl=$a=Wt=null,An=!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=cs(n)}}function md(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?md(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vd(){for(var e=window,t=ql();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ql(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 Gh(e){var t=vd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&md(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,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=ds(n,o);var i=ds(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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,Bn=null,Yi=null,Br=null,Xi=!1;function fs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xi||Bn==null||Bn!==ql(r)||(r=Bn,"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}),Br&&br(Br,r)||(Br=r,r=oo(Yi,"onSelect"),0Hn||(e.current=ea[Hn],ea[Hn]=null,Hn--)}function b(e,t){Hn++,ea[Hn]=e.current,e.current=t}var rn={},je=un(rn),Ae=un(!1),kn=rn;function lr(e,t){var n=e.type.contextTypes;if(!n)return rn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Be(e){return e=e.childContextTypes,e!=null}function ao(){ne(Ae),ne(je)}function ws(e,t,n){if(je.current!==rn)throw Error(N(168));b(je,t),b(Ae,n)}function Pd(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(N(108,Wp(e)||"Unknown",l));return ue({},n,r)}function uo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rn,kn=je.current,b(je,e),b(Ae,Ae.current),!0}function xs(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=Pd(e,t,kn),r.__reactInternalMemoizedMergedChildContext=e,ne(Ae),ne(je),b(je,e)):ne(Ae),b(Ae,n)}var St=null,To=!1,di=!1;function _d(e){St===null?St=[e]:St.push(e)}function am(e){To=!0,_d(e)}function sn(){if(!di&&St!==null){di=!0;var e=0,t=J;try{var n=St;for(J=1;e>=i,l-=i,Et=1<<32-ct(t)+l|n<T?(z=R,R=null):z=R.sibling;var F=m(f,R,h[T],E);if(F===null){R===null&&(R=z);break}e&&R&&F.alternate===null&&t(f,R),d=o(F,d,T),v===null?L=F:v.sibling=F,v=F,R=z}if(T===h.length)return n(f,R),oe&&hn(f,T),L;if(R===null){for(;TT?(z=R,R=null):z=R.sibling;var X=m(f,R,F.value,E);if(X===null){R===null&&(R=z);break}e&&R&&X.alternate===null&&t(f,R),d=o(X,d,T),v===null?L=X:v.sibling=X,v=X,R=z}if(F.done)return n(f,R),oe&&hn(f,T),L;if(R===null){for(;!F.done;T++,F=h.next())F=p(f,F.value,E),F!==null&&(d=o(F,d,T),v===null?L=F:v.sibling=F,v=F);return oe&&hn(f,T),L}for(R=r(f,R);!F.done;T++,F=h.next())F=S(R,f,T,F.value,E),F!==null&&(e&&F.alternate!==null&&R.delete(F.key===null?T:F.key),d=o(F,d,T),v===null?L=F:v.sibling=F,v=F);return e&&R.forEach(function(ve){return t(f,ve)}),oe&&hn(f,T),L}function _(f,d,h,E){if(typeof h=="object"&&h!==null&&h.type===Un&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Cl:e:{for(var L=h.key,v=d;v!==null;){if(v.key===L){if(L=h.type,L===Un){if(v.tag===7){n(f,v.sibling),d=l(v,h.props.children),d.return=f,f=d;break e}}else if(v.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===Bt&&Rs(L)===v.type){n(f,v.sibling),d=l(v,h.props),d.ref=Cr(f,v,h),d.return=f,f=d;break e}n(f,v);break}else t(f,v);v=v.sibling}h.type===Un?(d=En(h.props.children,f.mode,E,h.key),d.return=f,f=d):(E=Zl(h.type,h.key,h.props,null,f.mode,E),E.ref=Cr(f,d,h),E.return=f,f=E)}return i(f);case Fn:e:{for(v=h.key;d!==null;){if(d.key===v)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(f,d.sibling),d=l(d,h.children||[]),d.return=f,f=d;break e}else{n(f,d);break}else t(f,d);d=d.sibling}d=wi(h,f.mode,E),d.return=f,f=d}return i(f);case Bt:return v=h._init,_(f,d,v(h._payload),E)}if(Mr(h))return w(f,d,h,E);if(wr(h))return x(f,d,h,E);Il(f,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(f,d.sibling),d=l(d,h),d.return=f,f=d):(n(f,d),d=yi(h,f.mode,E),d.return=f,f=d),i(f)):n(f,d)}return _}var ir=zd(!0),Id=zd(!1),ml={},wt=un(ml),rl=un(ml),ll=un(ml);function yn(e){if(e===ml)throw Error(N(174));return e}function tu(e,t){switch(b(ll,t),b(rl,e),b(wt,ml),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fi(t,e)}ne(wt),b(wt,t)}function ar(){ne(wt),ne(rl),ne(ll)}function Od(e){yn(ll.current);var t=yn(wt.current),n=Fi(t,e.type);t!==n&&(b(rl,e),b(wt,n))}function nu(e){rl.current===e&&(ne(wt),ne(rl))}var ie=un(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fi=[];function ru(){for(var e=0;en?n:4,e(!0);var r=pi.transition;pi.transition={};try{e(!1),t()}finally{J=n,pi.transition=r}}function qd(){return rt().memoizedState}function dm(e,t,n){var r=qt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bd(e))ef(t,n);else if(n=Td(e,t,n,r),n!==null){var l=ze();dt(n,e,r,l),tf(n,t,r)}}function fm(e,t,n){var r=qt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bd(e))ef(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,ft(a,i)){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=Td(e,t,l,r),n!==null&&(l=ze(),dt(n,e,r,l),tf(n,t,r))}}function bd(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function ef(e,t){Vr=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Aa(e,n)}}var go={readContext:nt,useCallback:Ne,useContext:Ne,useEffect:Ne,useImperativeHandle:Ne,useInsertionEffect:Ne,useLayoutEffect:Ne,useMemo:Ne,useReducer:Ne,useRef:Ne,useState:Ne,useDebugValue:Ne,useDeferredValue:Ne,useTransition:Ne,useMutableSource:Ne,useSyncExternalStore:Ne,useId:Ne,unstable_isNewReconciler:!1},pm={readContext:nt,useCallback:function(e,t){return vt().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:Ls,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yl(4194308,4,Yd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yl(4,2,e,t)},useMemo:function(e,t){var n=vt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vt();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=dm.bind(null,ae,e),[r.memoizedState,e]},useRef:function(e){var t=vt();return e={current:e},t.memoizedState=e},useState:Ns,useDebugValue:uu,useDeferredValue:function(e){return vt().memoizedState=e},useTransition:function(){var e=Ns(!1),t=e[0];return e=cm.bind(null,e[1]),vt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ae,l=vt();if(oe){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),Ee===null)throw Error(N(349));Pn&30||Ad(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Ls(Vd.bind(null,r,o,e),[e]),r.flags|=2048,al(9,Bd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=vt(),t=Ee.identifierPrefix;if(oe){var n=kt,r=Et;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ol++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[gt]=t,e[nl]=r,df(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ai(n,r),n){case"dialog":te("cancel",e),te("close",e),l=r;break;case"iframe":case"object":case"embed":te("load",e),l=r;break;case"video":case"audio":for(l=0;lsr&&(t.flags|=128,r=!0,Pr(o,!1),t.lanes=4194304)}else{if(!r)if(e=mo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Pr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!oe)return Le(t),null}else 2*pe()-o.renderingStartTime>sr&&n!==1073741824&&(t.flags|=128,r=!0,Pr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=pe(),t.sibling=null,n=ie.current,b(ie,r?n&1|2:n&1),t):(Le(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?He&1073741824&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function Sm(e,t){switch(Xa(t),t.tag){case 1:return Be(t.type)&&ao(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ar(),ne(Ae),ne(je),ru(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nu(t),null;case 13:if(ne(ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));or()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ie),null;case 4:return ar(),null;case 10:return qa(t.type._context),null;case 22:case 23:return hu(),null;case 24:return null;default:return null}}var Fl=!1,Te=!1,Em=typeof WeakSet=="function"?WeakSet:Set,M=null;function Yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ce(e,t,r)}else n.current=null}function fa(e,t,n){try{n()}catch(r){ce(e,t,r)}}var Us=!1;function km(e,t){if(Gi=ro,e=vd(),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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,u=-1,s=0,c=0,p=e,m=null;t:for(;;){for(var S;p!==n||l!==0&&p.nodeType!==3||(a=i+l),p!==o||r!==0&&p.nodeType!==3||(u=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(S=p.firstChild)!==null;)m=p,p=S;for(;;){if(p===e)break t;if(m===n&&++s===l&&(a=i),m===o&&++c===r&&(u=i),(S=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=S}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ji={focusedElem:e,selectionRange:n},ro=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var x=w.memoizedProps,_=w.memoizedState,f=t.stateNode,d=f.getSnapshotBeforeUpdate(t.elementType===t.type?x:it(t.type,x),_);f.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(E){ce(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return w=Us,Us=!1,w}function $r(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&fa(t,n,o)}l=l.next}while(l!==r)}}function Mo(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 pa(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 hf(e){var t=e.alternate;t!==null&&(e.alternate=null,hf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gt],delete t[nl],delete t[bi],delete t[om],delete t[im])),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 mf(e){return e.tag===5||e.tag===3||e.tag===4}function As(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mf(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 ha(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=io));else if(r!==4&&(e=e.child,e!==null))for(ha(e,t,n),e=e.sibling;e!==null;)ha(e,t,n),e=e.sibling}function ma(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(ma(e,t,n),e=e.sibling;e!==null;)ma(e,t,n),e=e.sibling}var Pe=null,at=!1;function Ut(e,t,n){for(n=n.child;n!==null;)vf(e,t,n),n=n.sibling}function vf(e,t,n){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(Po,n)}catch{}switch(n.tag){case 5:Te||Yn(n,t);case 6:var r=Pe,l=at;Pe=null,Ut(e,t,n),Pe=r,at=l,Pe!==null&&(at?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(at?(e=Pe,n=n.stateNode,e.nodeType===8?ci(e.parentNode,n):e.nodeType===1&&ci(e,n),Zr(e)):ci(Pe,n.stateNode));break;case 4:r=Pe,l=at,Pe=n.stateNode.containerInfo,at=!0,Ut(e,t,n),Pe=r,at=l;break;case 0:case 11:case 14:case 15:if(!Te&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&fa(n,t,i),l=l.next}while(l!==r)}Ut(e,t,n);break;case 1:if(!Te&&(Yn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ce(n,t,a)}Ut(e,t,n);break;case 21:Ut(e,t,n);break;case 22:n.mode&1?(Te=(r=Te)||n.memoizedState!==null,Ut(e,t,n),Te=r):Ut(e,t,n);break;default:Ut(e,t,n)}}function Bs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Em),t.forEach(function(r){var l=Dm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ot(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=pe()-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,Qt===null)var r=!1;else{if(e=Qt,Qt=null,xo=0,Y&6)throw Error(N(331));var l=Y;for(Y|=4,M=e.current;M!==null;){var o=M,i=o.child;if(M.flags&16){var a=o.deletions;if(a!==null){for(var u=0;upe()-fu?Sn(e,0):du|=n),Ve(e,t)}function Cf(e,t){t===0&&(e.mode&1?(t=Nl,Nl<<=1,!(Nl&130023424)&&(Nl=4194304)):t=1);var n=ze();e=Lt(e,t),e!==null&&(fl(e,t,n),Ve(e,n))}function jm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Cf(e,n)}function Dm(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(N(314))}r!==null&&r.delete(t),Cf(e,n)}var Pf;Pf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)Ue=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ue=!1,wm(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,oe&&t.flags&1048576&&Rd(t,co,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Xl(e,t),e=t.pendingProps;var l=lr(t,je.current);tr(t,n),l=ou(null,t,r,e,l,n);var o=iu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Be(r)?(o=!0,uo(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,eu(t),l.updater=jo,t.stateNode=l,l._reactInternals=t,oa(t,r,e,n),t=ua(null,t,r,!0,o,n)):(t.tag=0,oe&&o&&Ya(t),Me(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Xl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=zm(r),e=it(r,e),l){case 0:t=aa(null,t,r,e,n);break e;case 1:t=Is(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,it(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:it(r,l),aa(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:it(r,l),Is(e,t,r,l,n);case 3:e:{if(uf(t),e===null)throw Error(N(387));r=t.pendingProps,o=t.memoizedState,l=o.element,jd(e,t),ho(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=ur(Error(N(423)),t),t=Os(e,t,r,n,l);break e}else if(r!==l){l=ur(Error(N(424)),t),t=Os(e,t,r,n,l);break e}else for(We=Gt(t.stateNode.containerInfo.firstChild),Qe=t,oe=!0,st=null,n=Id(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(or(),r===l){t=Tt(e,t,n);break e}Me(e,t,r,n)}t=t.child}return t;case 5:return Od(t),e===null&&na(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Zi(r,l)?i=null:o!==null&&Zi(r,o)&&(t.flags|=32),af(e,t),Me(e,t,i,n),t.child;case 6:return e===null&&na(t),null;case 13:return sf(e,t,n);case 4:return tu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ir(t,null,r,n):Me(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:it(r,l),Ms(e,t,r,l,n);case 7:return Me(e,t,t.pendingProps,n),t.child;case 8:return Me(e,t,t.pendingProps.children,n),t.child;case 12:return Me(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,b(fo,r._currentValue),r._currentValue=i,o!==null)if(ft(o.value,i)){if(o.children===l.children&&!Ae.current){t=Tt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Pt(-1,n&-n),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var c=s.pending;c===null?u.next=u:(u.next=c.next,c.next=u),s.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),ra(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(N(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),ra(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Me(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,tr(t,n),l=nt(l),r=r(l),t.flags|=1,Me(e,t,r,n),t.child;case 14:return r=t.type,l=it(r,t.pendingProps),l=it(r.type,l),zs(e,t,r,l,n);case 15:return lf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:it(r,l),Xl(e,t),t.tag=1,Be(r)?(e=!0,uo(t)):e=!1,tr(t,n),Md(t,r,l),oa(t,r,l,n),ua(null,t,r,!0,e,n);case 19:return cf(e,t,n);case 22:return of(e,t,n)}throw Error(N(156,t.tag))};function _f(e,t){return Zc(e,t)}function Mm(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 et(e,t,n,r){return new Mm(e,t,n,r)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zm(e){if(typeof e=="function")return vu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ia)return 11;if(e===Oa)return 14}return 2}function bt(e,t){var n=e.alternate;return n===null?(n=et(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 Zl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")vu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Un:return En(n.children,l,o,t);case za:i=8,l|=8;break;case Li:return e=et(12,n,t,l|2),e.elementType=Li,e.lanes=o,e;case Ti:return e=et(13,n,t,l),e.elementType=Ti,e.lanes=o,e;case ji:return e=et(19,n,t,l),e.elementType=ji,e.lanes=o,e;case zc:return Io(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Dc:i=10;break e;case Mc:i=9;break e;case Ia:i=11;break e;case Oa:i=14;break e;case Bt:i=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=et(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function En(e,t,n,r){return e=et(7,e,r,t),e.lanes=n,e}function Io(e,t,n,r){return e=et(22,e,r,t),e.elementType=zc,e.lanes=n,e.stateNode={isHidden:!1},e}function yi(e,t,n){return e=et(6,e,null,t),e.lanes=n,e}function wi(e,t,n){return t=et(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Im(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=bo(0),this.expirationTimes=bo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function gu(e,t,n,r,l,o,i,a,u){return e=new Im(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=et(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},eu(o),e}function Om(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tf)}catch(e){console.error(e)}}Tf(),Rc.exports=Ye;var Su=Rc.exports;const jf=vc(Su),Vm=mc({__proto__:null,default:jf},[Su]);var Xs=Su;Ri.createRoot=Xs.createRoot,Ri.hydrateRoot=Xs.hydrateRoot;const Eu=P.createContext({isActive:!1,displayModal:()=>{},removeModal:()=>{}}),$m=({children:e})=>{const[t,n]=P.useState(!1),o={isActive:t,displayModal:()=>{n(!0)},removeModal:()=>{n(!1)}};return C.jsx(Eu.Provider,{value:o,children:e})};/** - * @remix-run/router v1.14.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Nn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Wm(){return Math.random().toString(36).substr(2,8)}function Js(e,t){return{usr:e.state,key:e.key,idx:t}}function sl(e,t,n,r){return n===void 0&&(n=null),de({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Dt(t):t,{state:n,key:t&&t.key||r||Wm()})}function Ln(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 Dt(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 Qm(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,a=fe.Pop,u=null,s=c();s==null&&(s=0,i.replaceState(de({},i.state,{idx:s}),""));function c(){return(i.state||{idx:null}).idx}function p(){a=fe.Pop;let _=c(),f=_==null?null:_-s;s=_,u&&u({action:a,location:x.location,delta:f})}function m(_,f){a=fe.Push;let d=sl(x.location,_,f);n&&n(d,_),s=c()+1;let h=Js(d,s),E=x.createHref(d);try{i.pushState(h,"",E)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;l.location.assign(E)}o&&u&&u({action:a,location:x.location,delta:1})}function S(_,f){a=fe.Replace;let d=sl(x.location,_,f);n&&n(d,_),s=c();let h=Js(d,s),E=x.createHref(d);i.replaceState(h,"",E),o&&u&&u({action:a,location:x.location,delta:0})}function w(_){let f=l.location.origin!=="null"?l.location.origin:l.location.href,d=typeof _=="string"?_:Ln(_);return H(f,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,f)}let x={get action(){return a},get location(){return e(l,i)},listen(_){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Gs,p),u=_,()=>{l.removeEventListener(Gs,p),u=null}},createHref(_){return t(l,_)},createURL:w,encodeLocation(_){let f=w(_);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:m,replace:S,go(_){return i.go(_)}};return x}var se;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(se||(se={}));const Km=new Set(["lazy","caseSensitive","path","id","index","children"]);function Ym(e){return e.index===!0}function xa(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,o],a=typeof l.id=="string"?l.id:i.join("-");if(H(l.index!==!0||!l.children,"Cannot specify children on an index route"),H(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),Ym(l)){let u=de({},l,t(l),{id:a});return r[a]=u,u}else{let u=de({},l,t(l),{id:a,children:void 0});return r[a]=u,l.children&&(u.children=xa(l.children,t,i,r)),u}})}function Gn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Dt(t):t,l=ln(r.pathname||"/",n);if(l==null)return null;let o=Df(e);Gm(o);let i=null;for(let a=0;i==null&&a{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(H(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=_t([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(H(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),Df(o.children,t,c,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:nv(s,o.index),routesMeta:c})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))l(o,i);else for(let u of Mf(o.path))l(o,i,u)}),t}function Mf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=Mf(r.join("/")),a=[];return a.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&a.push(...i),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function Gm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:rv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Jm=/^:\w+$/,Zm=3,qm=2,bm=1,ev=10,tv=-2,Zs=e=>e==="*";function nv(e,t){let n=e.split("/"),r=n.length;return n.some(Zs)&&(r+=tv),t&&(r+=qm),n.filter(l=>!Zs(l)).reduce((l,o)=>l+(Jm.test(o)?Zm:o===""?bm:ev),r)}function rv(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 lv(e,t){let{routesMeta:n}=e,r={},l="/",o=[];for(let i=0;i{let{paramName:m,isOptional:S}=c;if(m==="*"){let x=a[p]||"";i=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const w=a[p];return S&&!w?s[m]=void 0:s[m]=av(w||"",m),s},{}),pathname:o,pathnameBase:i,pattern:e}}function ov(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Nn(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,(i,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 iv(e){try{return decodeURI(e)}catch(t){return Nn(!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 av(e,t){try{return decodeURIComponent(e)}catch(n){return Nn(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function ln(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)||"/"}function uv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Dt(e):e;return{pathname:n?n.startsWith("/")?n:sv(n,t):t,search:dv(r),hash:fv(l)}}function sv(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 xi(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 zf(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ku(e,t){let n=zf(e);return t?n.map((r,l)=>l===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Cu(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Dt(e):(l=de({},e),H(!l.pathname||!l.pathname.includes("?"),xi("?","pathname","search",l)),H(!l.pathname||!l.pathname.includes("#"),xi("#","pathname","hash",l)),H(!l.search||!l.search.includes("#"),xi("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,a;if(i==null)a=n;else{let p=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),p-=1;l.pathname=m.join("/")}a=p>=0?t[p]:"/"}let u=uv(l,a),s=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||c)&&(u.pathname+="/"),u}const _t=e=>e.join("/").replace(/\/\/+/g,"/"),cv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),dv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Pu{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 If(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Of=["post","put","patch","delete"],pv=new Set(Of),hv=["get",...Of],mv=new Set(hv),vv=new Set([301,302,303,307,308]),gv=new Set([307,308]),Si={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yv={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Rr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ff=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wv=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Uf="remix-router-transitions";function xv(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;H(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 g=e.detectErrorBoundary;l=y=>({hasErrorBoundary:g(y)})}else l=wv;let o={},i=xa(e.routes,l,void 0,o),a,u=e.basename||"/",s=de({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),c=null,p=new Set,m=null,S=null,w=null,x=e.hydrationData!=null,_=Gn(i,e.history.location,u),f=null;if(_==null){let g=Ze(404,{pathname:e.history.location.pathname}),{matches:y,route:k}=oc(i);_=y,f={[k.id]:g}}let d,h=_.some(g=>g.route.lazy),E=_.some(g=>g.route.loader);if(h)d=!1;else if(!E)d=!0;else if(s.v7_partialHydration){let g=e.hydrationData?e.hydrationData.loaderData:null,y=e.hydrationData?e.hydrationData.errors:null;d=_.every(k=>k.route.loader&&k.route.loader.hydrate!==!0&&(g&&g[k.route.id]!==void 0||y&&y[k.route.id]!==void 0))}else d=e.hydrationData!=null;let L,v={historyAction:e.history.action,location:e.history.location,matches:_,initialized:d,navigation:Si,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||f,fetchers:new Map,blockers:new Map},R=fe.Pop,T=!1,z,F=!1,X=new Map,ve=null,he=!1,Ge=!1,Dn=[],Mt=[],re=new Map,D=0,A=-1,V=new Map,G=new Set,ee=new Map,pt=new Map,ke=new Set,lt=new Map,De=new Map,zt=!1;function qf(){if(c=e.history.listen(g=>{let{action:y,location:k,delta:j}=g;if(zt){zt=!1;return}Nn(De.size===0||j!=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 I=Fu({currentLocation:v.location,nextLocation:k,historyAction:y});if(I&&j!=null){zt=!0,e.history.go(j*-1),xl(I,{state:"blocked",location:k,proceed(){xl(I,{state:"proceeding",proceed:void 0,reset:void 0,location:k}),e.history.go(j)},reset(){let W=new Map(v.blockers);W.set(I,Rr),$e({blockers:W})}});return}return fn(y,k)}),n){jv(t,X);let g=()=>Dv(t,X);t.addEventListener("pagehide",g),ve=()=>t.removeEventListener("pagehide",g)}return v.initialized||fn(fe.Pop,v.location,{initialHydration:!0}),L}function bf(){c&&c(),ve&&ve(),p.clear(),z&&z.abort(),v.fetchers.forEach((g,y)=>wl(y)),v.blockers.forEach((g,y)=>Ou(y))}function ep(g){return p.add(g),()=>p.delete(g)}function $e(g,y){y===void 0&&(y={}),v=de({},v,g);let k=[],j=[];s.v7_fetcherPersist&&v.fetchers.forEach((I,W)=>{I.state==="idle"&&(ke.has(W)?j.push(W):k.push(W))}),[...p].forEach(I=>I(v,{deletedFetchers:j,unstable_viewTransitionOpts:y.viewTransitionOpts,unstable_flushSync:y.flushSync===!0})),s.v7_fetcherPersist&&(k.forEach(I=>v.fetchers.delete(I)),j.forEach(I=>wl(I)))}function mr(g,y,k){var j,I;let{flushSync:W}=k===void 0?{}:k,B=v.actionData!=null&&v.navigation.formMethod!=null&&ut(v.navigation.formMethod)&&v.navigation.state==="loading"&&((j=g.state)==null?void 0:j._isRedirect)!==!0,U;y.actionData?Object.keys(y.actionData).length>0?U=y.actionData:U=null:B?U=v.actionData:U=null;let O=y.loaderData?lc(v.loaderData,y.loaderData,y.matches||[],y.errors):v.loaderData,K=v.blockers;K.size>0&&(K=new Map(K),K.forEach((q,Ce)=>K.set(Ce,Rr)));let we=T===!0||v.navigation.formMethod!=null&&ut(v.navigation.formMethod)&&((I=g.state)==null?void 0:I._isRedirect)!==!0;a&&(i=a,a=void 0),he||R===fe.Pop||(R===fe.Push?e.history.push(g,g.state):R===fe.Replace&&e.history.replace(g,g.state));let $;if(R===fe.Pop){let q=X.get(v.location.pathname);q&&q.has(g.pathname)?$={currentLocation:v.location,nextLocation:g}:X.has(g.pathname)&&($={currentLocation:g,nextLocation:v.location})}else if(F){let q=X.get(v.location.pathname);q?q.add(g.pathname):(q=new Set([g.pathname]),X.set(v.location.pathname,q)),$={currentLocation:v.location,nextLocation:g}}$e(de({},y,{actionData:U,loaderData:O,historyAction:R,location:g,initialized:!0,navigation:Si,revalidation:"idle",restoreScrollPosition:Au(g,y.matches||v.matches),preventScrollReset:we,blockers:K}),{viewTransitionOpts:$,flushSync:W===!0}),R=fe.Pop,T=!1,F=!1,he=!1,Ge=!1,Dn=[],Mt=[]}async function Tu(g,y){if(typeof g=="number"){e.history.go(g);return}let k=Ea(v.location,v.matches,u,s.v7_prependBasename,g,s.v7_relativeSplatPath,y==null?void 0:y.fromRouteId,y==null?void 0:y.relative),{path:j,submission:I,error:W}=qs(s.v7_normalizeFormMethod,!1,k,y),B=v.location,U=sl(v.location,j,y&&y.state);U=de({},U,e.history.encodeLocation(U));let O=y&&y.replace!=null?y.replace:void 0,K=fe.Push;O===!0?K=fe.Replace:O===!1||I!=null&&ut(I.formMethod)&&I.formAction===v.location.pathname+v.location.search&&(K=fe.Replace);let we=y&&"preventScrollReset"in y?y.preventScrollReset===!0:void 0,$=(y&&y.unstable_flushSync)===!0,q=Fu({currentLocation:B,nextLocation:U,historyAction:K});if(q){xl(q,{state:"blocked",location:U,proceed(){xl(q,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),Tu(g,y)},reset(){let Ce=new Map(v.blockers);Ce.set(q,Rr),$e({blockers:Ce})}});return}return await fn(K,U,{submission:I,pendingError:W,preventScrollReset:we,replace:y&&y.replace,enableViewTransition:y&&y.unstable_viewTransition,flushSync:$})}function tp(){if($o(),$e({revalidation:"loading"}),v.navigation.state!=="submitting"){if(v.navigation.state==="idle"){fn(v.historyAction,v.location,{startUninterruptedRevalidation:!0});return}fn(R||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation})}}async function fn(g,y,k){z&&z.abort(),z=null,R=g,he=(k&&k.startUninterruptedRevalidation)===!0,cp(v.location,v.matches),T=(k&&k.preventScrollReset)===!0,F=(k&&k.enableViewTransition)===!0;let j=a||i,I=k&&k.overrideNavigation,W=Gn(j,y,u),B=(k&&k.flushSync)===!0;if(!W){let Ce=Ze(404,{pathname:y.pathname}),{matches:Je,route:xe}=oc(j);Ho(),mr(y,{matches:Je,loaderData:{},errors:{[xe.id]:Ce}},{flushSync:B});return}if(v.initialized&&!Ge&&Pv(v.location,y)&&!(k&&k.submission&&ut(k.submission.formMethod))){mr(y,{matches:W},{flushSync:B});return}z=new AbortController;let U=Lr(e.history,y,z.signal,k&&k.submission),O,K;if(k&&k.pendingError)K={[Qr(W).route.id]:k.pendingError};else if(k&&k.submission&&ut(k.submission.formMethod)){let Ce=await np(U,y,k.submission,W,{replace:k.replace,flushSync:B});if(Ce.shortCircuited)return;O=Ce.pendingActionData,K=Ce.pendingActionError,I=Ei(y,k.submission),B=!1,U=new Request(U.url,{signal:U.signal})}let{shortCircuited:we,loaderData:$,errors:q}=await rp(U,y,W,I,k&&k.submission,k&&k.fetcherSubmission,k&&k.replace,k&&k.initialHydration===!0,B,O,K);we||(z=null,mr(y,de({matches:W},O?{actionData:O}:{},{loaderData:$,errors:q})))}async function np(g,y,k,j,I){I===void 0&&(I={}),$o();let W=Lv(y,k);$e({navigation:W},{flushSync:I.flushSync===!0});let B,U=Ca(j,y);if(!U.route.action&&!U.route.lazy)B={type:se.error,error:Ze(405,{method:g.method,pathname:y.pathname,routeId:U.route.id})};else if(B=await Nr("action",g,U,j,o,l,u,s.v7_relativeSplatPath),g.signal.aborted)return{shortCircuited:!0};if(xn(B)){let O;return I&&I.replace!=null?O=I.replace:O=B.location===v.location.pathname+v.location.search,await vr(v,B,{submission:k,replace:O}),{shortCircuited:!0}}if(Jn(B)){let O=Qr(j,U.route.id);return(I&&I.replace)!==!0&&(R=fe.Push),{pendingActionData:{},pendingActionError:{[O.route.id]:B.error}}}if(wn(B))throw Ze(400,{type:"defer-action"});return{pendingActionData:{[U.route.id]:B.data}}}async function rp(g,y,k,j,I,W,B,U,O,K,we){let $=j||Ei(y,I),q=I||W||uc($),Ce=a||i,[Je,xe]=bs(e.history,v,k,q,y,s.v7_partialHydration&&U===!0,Ge,Dn,Mt,ke,ee,G,Ce,u,K,we);if(Ho(Z=>!(k&&k.some(le=>le.route.id===Z))||Je&&Je.some(le=>le.route.id===Z)),A=++D,Je.length===0&&xe.length===0){let Z=zu();return mr(y,de({matches:k,loaderData:{},errors:we||null},K?{actionData:K}:{},Z?{fetchers:new Map(v.fetchers)}:{}),{flushSync:O}),{shortCircuited:!0}}if(!he&&(!s.v7_partialHydration||!U)){xe.forEach(le=>{let ht=v.fetchers.get(le.key),El=Tr(void 0,ht?ht.data:void 0);v.fetchers.set(le.key,El)});let Z=K||v.actionData;$e(de({navigation:$},Z?Object.keys(Z).length===0?{actionData:null}:{actionData:Z}:{},xe.length>0?{fetchers:new Map(v.fetchers)}:{}),{flushSync:O})}xe.forEach(Z=>{re.has(Z.key)&&Ot(Z.key),Z.controller&&re.set(Z.key,Z.controller)});let Mn=()=>xe.forEach(Z=>Ot(Z.key));z&&z.signal.addEventListener("abort",Mn);let{results:Wo,loaderResults:zn,fetcherResults:Ft}=await ju(v.matches,k,Je,xe,g);if(g.signal.aborted)return{shortCircuited:!0};z&&z.signal.removeEventListener("abort",Mn),xe.forEach(Z=>re.delete(Z.key));let pn=ic(Wo);if(pn){if(pn.idx>=Je.length){let Z=xe[pn.idx-Je.length].key;G.add(Z)}return await vr(v,pn.result,{replace:B}),{shortCircuited:!0}}let{loaderData:Qo,errors:Ko}=rc(v,k,Je,zn,we,xe,Ft,lt);lt.forEach((Z,le)=>{Z.subscribe(ht=>{(ht||Z.done)&<.delete(le)})});let Yo=zu(),In=Iu(A),Sl=Yo||In||xe.length>0;return de({loaderData:Qo,errors:Ko},Sl?{fetchers:new Map(v.fetchers)}:{})}function lp(g,y,k,j){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.");re.has(g)&&Ot(g);let I=(j&&j.unstable_flushSync)===!0,W=a||i,B=Ea(v.location,v.matches,u,s.v7_prependBasename,k,s.v7_relativeSplatPath,y,j==null?void 0:j.relative),U=Gn(W,B,u);if(!U){gr(g,y,Ze(404,{pathname:B}),{flushSync:I});return}let{path:O,submission:K,error:we}=qs(s.v7_normalizeFormMethod,!0,B,j);if(we){gr(g,y,we,{flushSync:I});return}let $=Ca(U,O);if(T=(j&&j.preventScrollReset)===!0,K&&ut(K.formMethod)){op(g,y,O,$,U,I,K);return}ee.set(g,{routeId:y,path:O}),ip(g,y,O,$,U,I,K)}async function op(g,y,k,j,I,W,B){if($o(),ee.delete(g),!j.route.action&&!j.route.lazy){let le=Ze(405,{method:B.formMethod,pathname:k,routeId:y});gr(g,y,le,{flushSync:W});return}let U=v.fetchers.get(g);It(g,Tv(B,U),{flushSync:W});let O=new AbortController,K=Lr(e.history,k,O.signal,B);re.set(g,O);let we=D,$=await Nr("action",K,j,I,o,l,u,s.v7_relativeSplatPath);if(K.signal.aborted){re.get(g)===O&&re.delete(g);return}if(s.v7_fetcherPersist&&ke.has(g)){if(xn($)||Jn($)){It(g,At(void 0));return}}else{if(xn($))if(re.delete(g),A>we){It(g,At(void 0));return}else return G.add(g),It(g,Tr(B)),vr(v,$,{fetcherSubmission:B});if(Jn($)){gr(g,y,$.error);return}}if(wn($))throw Ze(400,{type:"defer-action"});let q=v.navigation.location||v.location,Ce=Lr(e.history,q,O.signal),Je=a||i,xe=v.navigation.state!=="idle"?Gn(Je,v.navigation.location,u):v.matches;H(xe,"Didn't find any matches after fetcher action");let Mn=++D;V.set(g,Mn);let Wo=Tr(B,$.data);v.fetchers.set(g,Wo);let[zn,Ft]=bs(e.history,v,xe,B,q,!1,Ge,Dn,Mt,ke,ee,G,Je,u,{[j.route.id]:$.data},void 0);Ft.filter(le=>le.key!==g).forEach(le=>{let ht=le.key,El=v.fetchers.get(ht),fp=Tr(void 0,El?El.data:void 0);v.fetchers.set(ht,fp),re.has(ht)&&Ot(ht),le.controller&&re.set(ht,le.controller)}),$e({fetchers:new Map(v.fetchers)});let pn=()=>Ft.forEach(le=>Ot(le.key));O.signal.addEventListener("abort",pn);let{results:Qo,loaderResults:Ko,fetcherResults:Yo}=await ju(v.matches,xe,zn,Ft,Ce);if(O.signal.aborted)return;O.signal.removeEventListener("abort",pn),V.delete(g),re.delete(g),Ft.forEach(le=>re.delete(le.key));let In=ic(Qo);if(In){if(In.idx>=zn.length){let le=Ft[In.idx-zn.length].key;G.add(le)}return vr(v,In.result)}let{loaderData:Sl,errors:Z}=rc(v,v.matches,zn,Ko,void 0,Ft,Yo,lt);if(v.fetchers.has(g)){let le=At($.data);v.fetchers.set(g,le)}Iu(Mn),v.navigation.state==="loading"&&Mn>A?(H(R,"Expected pending action"),z&&z.abort(),mr(v.navigation.location,{matches:xe,loaderData:Sl,errors:Z,fetchers:new Map(v.fetchers)})):($e({errors:Z,loaderData:lc(v.loaderData,Sl,xe,Z),fetchers:new Map(v.fetchers)}),Ge=!1)}async function ip(g,y,k,j,I,W,B){let U=v.fetchers.get(g);It(g,Tr(B,U?U.data:void 0),{flushSync:W});let O=new AbortController,K=Lr(e.history,k,O.signal);re.set(g,O);let we=D,$=await Nr("loader",K,j,I,o,l,u,s.v7_relativeSplatPath);if(wn($)&&($=await Vf($,K.signal,!0)||$),re.get(g)===O&&re.delete(g),!K.signal.aborted){if(ke.has(g)){It(g,At(void 0));return}if(xn($))if(A>we){It(g,At(void 0));return}else{G.add(g),await vr(v,$);return}if(Jn($)){gr(g,y,$.error);return}H(!wn($),"Unhandled fetcher deferred data"),It(g,At($.data))}}async function vr(g,y,k){let{submission:j,fetcherSubmission:I,replace:W}=k===void 0?{}:k;y.revalidate&&(Ge=!0);let B=sl(g.location,y.location,{_isRedirect:!0});if(H(B,"Expected a location on the redirect navigation"),n){let q=!1;if(y.reloadDocument)q=!0;else if(Ff.test(y.location)){const Ce=e.history.createURL(y.location);q=Ce.origin!==t.location.origin||ln(Ce.pathname,u)==null}if(q){W?t.location.replace(y.location):t.location.assign(y.location);return}}z=null;let U=W===!0?fe.Replace:fe.Push,{formMethod:O,formAction:K,formEncType:we}=g.navigation;!j&&!I&&O&&K&&we&&(j=uc(g.navigation));let $=j||I;if(gv.has(y.status)&&$&&ut($.formMethod))await fn(U,B,{submission:de({},$,{formAction:y.location}),preventScrollReset:T});else{let q=Ei(B,j);await fn(U,B,{overrideNavigation:q,fetcherSubmission:I,preventScrollReset:T})}}async function ju(g,y,k,j,I){let W=await Promise.all([...k.map(O=>Nr("loader",I,O,y,o,l,u,s.v7_relativeSplatPath)),...j.map(O=>O.matches&&O.match&&O.controller?Nr("loader",Lr(e.history,O.path,O.controller.signal),O.match,O.matches,o,l,u,s.v7_relativeSplatPath):{type:se.error,error:Ze(404,{pathname:O.path})})]),B=W.slice(0,k.length),U=W.slice(k.length);return await Promise.all([ac(g,k,B,B.map(()=>I.signal),!1,v.loaderData),ac(g,j.map(O=>O.match),U,j.map(O=>O.controller?O.controller.signal:null),!0)]),{results:W,loaderResults:B,fetcherResults:U}}function $o(){Ge=!0,Dn.push(...Ho()),ee.forEach((g,y)=>{re.has(y)&&(Mt.push(y),Ot(y))})}function It(g,y,k){k===void 0&&(k={}),v.fetchers.set(g,y),$e({fetchers:new Map(v.fetchers)},{flushSync:(k&&k.flushSync)===!0})}function gr(g,y,k,j){j===void 0&&(j={});let I=Qr(v.matches,y);wl(g),$e({errors:{[I.route.id]:k},fetchers:new Map(v.fetchers)},{flushSync:(j&&j.flushSync)===!0})}function Du(g){return s.v7_fetcherPersist&&(pt.set(g,(pt.get(g)||0)+1),ke.has(g)&&ke.delete(g)),v.fetchers.get(g)||yv}function wl(g){let y=v.fetchers.get(g);re.has(g)&&!(y&&y.state==="loading"&&V.has(g))&&Ot(g),ee.delete(g),V.delete(g),G.delete(g),ke.delete(g),v.fetchers.delete(g)}function ap(g){if(s.v7_fetcherPersist){let y=(pt.get(g)||0)-1;y<=0?(pt.delete(g),ke.add(g)):pt.set(g,y)}else wl(g);$e({fetchers:new Map(v.fetchers)})}function Ot(g){let y=re.get(g);H(y,"Expected fetch controller: "+g),y.abort(),re.delete(g)}function Mu(g){for(let y of g){let k=Du(y),j=At(k.data);v.fetchers.set(y,j)}}function zu(){let g=[],y=!1;for(let k of G){let j=v.fetchers.get(k);H(j,"Expected fetcher: "+k),j.state==="loading"&&(G.delete(k),g.push(k),y=!0)}return Mu(g),y}function Iu(g){let y=[];for(let[k,j]of V)if(j0}function up(g,y){let k=v.blockers.get(g)||Rr;return De.get(g)!==y&&De.set(g,y),k}function Ou(g){v.blockers.delete(g),De.delete(g)}function xl(g,y){let k=v.blockers.get(g)||Rr;H(k.state==="unblocked"&&y.state==="blocked"||k.state==="blocked"&&y.state==="blocked"||k.state==="blocked"&&y.state==="proceeding"||k.state==="blocked"&&y.state==="unblocked"||k.state==="proceeding"&&y.state==="unblocked","Invalid blocker state transition: "+k.state+" -> "+y.state);let j=new Map(v.blockers);j.set(g,y),$e({blockers:j})}function Fu(g){let{currentLocation:y,nextLocation:k,historyAction:j}=g;if(De.size===0)return;De.size>1&&Nn(!1,"A router only supports one blocker at a time");let I=Array.from(De.entries()),[W,B]=I[I.length-1],U=v.blockers.get(W);if(!(U&&U.state==="proceeding")&&B({currentLocation:y,nextLocation:k,historyAction:j}))return W}function Ho(g){let y=[];return lt.forEach((k,j)=>{(!g||g(j))&&(k.cancel(),y.push(j),lt.delete(j))}),y}function sp(g,y,k){if(m=g,w=y,S=k||null,!x&&v.navigation===Si){x=!0;let j=Au(v.location,v.matches);j!=null&&$e({restoreScrollPosition:j})}return()=>{m=null,w=null,S=null}}function Uu(g,y){return S&&S(g,y.map(j=>Xm(j,v.loaderData)))||g.key}function cp(g,y){if(m&&w){let k=Uu(g,y);m[k]=w()}}function Au(g,y){if(m){let k=Uu(g,y),j=m[k];if(typeof j=="number")return j}return null}function dp(g){o={},a=xa(g,l,void 0,o)}return L={get basename(){return u},get future(){return s},get state(){return v},get routes(){return i},get window(){return t},initialize:qf,subscribe:ep,enableScrollRestoration:sp,navigate:Tu,fetch:lp,revalidate:tp,createHref:g=>e.history.createHref(g),encodeLocation:g=>e.history.encodeLocation(g),getFetcher:Du,deleteFetcher:ap,dispose:bf,getBlocker:up,deleteBlocker:Ou,_internalFetchControllers:re,_internalActiveDeferreds:lt,_internalSetRoutes:dp},L}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,o,i,a){let u,s;if(i){u=[];for(let p of t)if(u.push(p),p.route.id===i){s=p;break}}else u=t,s=t[t.length-1];let c=Cu(l||".",ku(u,o),ln(e.pathname,n)||e.pathname,a==="path");return l==null&&(c.search=e.search,c.hash=e.hash),(l==null||l===""||l===".")&&s&&s.route.index&&!_u(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:_t([n,c.pathname])),Ln(c)}function qs(e,t,n,r){if(!r||!Sv(r))return{path:n};if(r.formMethod&&!Nv(r.formMethod))return{path:n,error:Ze(405,{method:r.formMethod})};let l=()=>({path:n,error:Ze(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=Bf(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ut(i))return l();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((S,w)=>{let[x,_]=w;return""+S+x+"="+_+` -`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!ut(i))return l();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return l()}}}H(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=ka(r.formData),s=r.formData;else if(r.body instanceof FormData)u=ka(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=nc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=nc(u)}catch{return l()}let c={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ut(c.formMethod))return{path:n,submission:c};let p=Dt(n);return t&&p.search&&_u(p.search)&&u.append("index",""),p.search="?"+u,{path:Ln(p),submission:c}}function Ev(e,t){let n=e;if(t){let r=e.findIndex(l=>l.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function bs(e,t,n,r,l,o,i,a,u,s,c,p,m,S,w,x){let _=x?Object.values(x)[0]:w?Object.values(w)[0]:void 0,f=e.createURL(t.location),d=e.createURL(l),h=x?Object.keys(x)[0]:void 0,L=Ev(n,h).filter((R,T)=>{let{route:z}=R;if(z.lazy)return!0;if(z.loader==null)return!1;if(o)return z.loader.hydrate?!0:t.loaderData[z.id]===void 0&&(!t.errors||t.errors[z.id]===void 0);if(kv(t.loaderData,t.matches[T],R)||a.some(ve=>ve===R.route.id))return!0;let F=t.matches[T],X=R;return ec(R,de({currentUrl:f,currentParams:F.params,nextUrl:d,nextParams:X.params},r,{actionResult:_,defaultShouldRevalidate:i||f.pathname+f.search===d.pathname+d.search||f.search!==d.search||Af(F,X)}))}),v=[];return c.forEach((R,T)=>{if(o||!n.some(he=>he.route.id===R.routeId)||s.has(T))return;let z=Gn(m,R.path,S);if(!z){v.push({key:T,routeId:R.routeId,path:R.path,matches:null,match:null,controller:null});return}let F=t.fetchers.get(T),X=Ca(z,R.path),ve=!1;p.has(T)?ve=!1:u.includes(T)?ve=!0:F&&F.state!=="idle"&&F.data===void 0?ve=i:ve=ec(X,de({currentUrl:f,currentParams:t.matches[t.matches.length-1].params,nextUrl:d,nextParams:n[n.length-1].params},r,{actionResult:_,defaultShouldRevalidate:i})),ve&&v.push({key:T,routeId:R.routeId,path:R.path,matches:z,match:X,controller:new AbortController})}),[L,v]}function kv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Af(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}async function tc(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];H(l,"No route found in manifest");let o={};for(let i in r){let u=l[i]!==void 0&&i!=="hasErrorBoundary";Nn(!u,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!u&&!Km.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,de({},t(l),{lazy:void 0}))}async function Nr(e,t,n,r,l,o,i,a,u){u===void 0&&(u={});let s,c,p,m=x=>{let _,f=new Promise((d,h)=>_=h);return p=()=>_(),t.signal.addEventListener("abort",p),Promise.race([x({request:t,params:n.params,context:u.requestContext}),f])};try{let x=n.route[e];if(n.route.lazy)if(x){let _,f=await Promise.all([m(x).catch(d=>{_=d}),tc(n.route,o,l)]);if(_)throw _;c=f[0]}else if(await tc(n.route,o,l),x=n.route[e],x)c=await m(x);else if(e==="action"){let _=new URL(t.url),f=_.pathname+_.search;throw Ze(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:se.data,data:void 0};else if(x)c=await m(x);else{let _=new URL(t.url),f=_.pathname+_.search;throw Ze(404,{pathname:f})}H(c!==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(x){s=se.error,c=x}finally{p&&t.signal.removeEventListener("abort",p)}if(Rv(c)){let x=c.status;if(vv.has(x)){let f=c.headers.get("Location");if(H(f,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ff.test(f))f=Ea(new URL(t.url),r.slice(0,r.indexOf(n)+1),i,!0,f,a);else if(!u.isStaticRequest){let d=new URL(t.url),h=f.startsWith("//")?new URL(d.protocol+f):new URL(f),E=ln(h.pathname,i)!=null;h.origin===d.origin&&E&&(f=h.pathname+h.search+h.hash)}if(u.isStaticRequest)throw c.headers.set("Location",f),c;return{type:se.redirect,status:x,location:f,revalidate:c.headers.get("X-Remix-Revalidate")!==null,reloadDocument:c.headers.get("X-Remix-Reload-Document")!==null}}if(u.isRouteRequest)throw{type:s===se.error?se.error:se.data,response:c};let _;try{let f=c.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?_=await c.json():_=await c.text()}catch(f){return{type:se.error,error:f}}return s===se.error?{type:s,error:new Pu(x,c.statusText,_),headers:c.headers}:{type:se.data,data:_,statusCode:c.status,headers:c.headers}}if(s===se.error)return{type:s,error:c};if(_v(c)){var S,w;return{type:se.deferred,deferredData:c,statusCode:(S=c.init)==null?void 0:S.status,headers:((w=c.init)==null?void 0:w.headers)&&new Headers(c.init.headers)}}return{type:se.data,data:c}}function Lr(e,t,n,r){let l=e.createURL(Bf(t)).toString(),o={signal:n};if(r&&ut(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=ka(r.formData):o.body=r.formData}return new Request(l,o)}function ka(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function nc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Cv(e,t,n,r,l){let o={},i=null,a,u=!1,s={};return n.forEach((c,p)=>{let m=t[p].route.id;if(H(!xn(c),"Cannot handle redirect results in processLoaderData"),Jn(c)){let S=Qr(e,m),w=c.error;r&&(w=Object.values(r)[0],r=void 0),i=i||{},i[S.route.id]==null&&(i[S.route.id]=w),o[m]=void 0,u||(u=!0,a=If(c.error)?c.error.status:500),c.headers&&(s[m]=c.headers)}else wn(c)?(l.set(m,c.deferredData),o[m]=c.deferredData.data):o[m]=c.data,c.statusCode!=null&&c.statusCode!==200&&!u&&(a=c.statusCode),c.headers&&(s[m]=c.headers)}),r&&(i=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:s}}function rc(e,t,n,r,l,o,i,a){let{loaderData:u,errors:s}=Cv(t,n,r,l,a);for(let c=0;cr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function oc(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 Ze(e,t){let{pathname:n,routeId:r,method:l,type:o}=t===void 0?{}:t,i="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(i="Bad Request",l&&n&&r?a="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.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):e===403?(i="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",a='No route matches URL "'+n+'"'):e===405&&(i="Method Not Allowed",l&&n&&r?a="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&&(a='Invalid request method "'+l.toUpperCase()+'"')),new Pu(e||500,i,new Error(a),!0)}function ic(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(xn(n))return{result:n,idx:t}}}function Bf(e){let t=typeof e=="string"?Dt(e):e;return Ln(de({},t,{hash:""}))}function Pv(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function wn(e){return e.type===se.deferred}function Jn(e){return e.type===se.error}function xn(e){return(e&&e.type)===se.redirect}function _v(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 Rv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Nv(e){return mv.has(e.toLowerCase())}function ut(e){return pv.has(e.toLowerCase())}async function ac(e,t,n,r,l,o){for(let i=0;ip.route.id===u.route.id),c=s!=null&&!Af(s,u)&&(o&&o[u.route.id])!==void 0;if(wn(a)&&(l||c)){let p=r[i];H(p,"Expected an AbortSignal for revalidating fetcher deferred result"),await Vf(a,p,l).then(m=>{m&&(n[i]=m||n[i])})}}}async function Vf(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:se.data,data:e.deferredData.unwrappedData}}catch(l){return{type:se.error,error:l}}return{type:se.data,data:e.deferredData.data}}}function _u(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ca(e,t){let n=typeof t=="string"?Dt(t).search:t.search;if(e[e.length-1].route.index&&_u(n||""))return e[e.length-1];let r=zf(e);return r[r.length-1]}function uc(e){let{formMethod:t,formAction:n,formEncType:r,text:l,formData:o,json:i}=e;if(!(!t||!n||!r)){if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Ei(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 Lv(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 Tr(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 Tv(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 At(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 jv(e,t){try{let n=e.sessionStorage.getItem(Uf);if(n){let r=JSON.parse(n);for(let[l,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(l,new Set(o||[]))}}catch{}}function Dv(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(Uf,JSON.stringify(n))}catch(r){Nn(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** - * React Router v6.21.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),P.useCallback(function(s,c){if(c===void 0&&(c={}),!a.current)return;if(typeof s=="number"){r.go(s);return}let p=Cu(s,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:_t([t,p.pathname])),(c.replace?r.replace:r.push)(p,c.state,c)},[t,r,i,o,e])}const Ov=P.createContext(null);function Fv(e){let t=P.useContext(dn).outlet;return t&&P.createElement(Ov.Provider,{value:e},t)}function Vo(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=P.useContext(cn),{matches:l}=P.useContext(dn),{pathname:o}=yl(),i=JSON.stringify(ku(l,r.v7_relativeSplatPath));return P.useMemo(()=>Cu(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function Uv(e,t,n,r){gl()||H(!1);let{navigator:l}=P.useContext(cn),{matches:o}=P.useContext(dn),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let s=yl(),c;if(t){var p;let _=typeof t=="string"?Dt(t):t;u==="/"||(p=_.pathname)!=null&&p.startsWith(u)||H(!1),c=_}else c=s;let m=c.pathname||"/",S=u==="/"?m:m.slice(u.length)||"/",w=Gn(e,{pathname:S}),x=Hv(w&&w.map(_=>Object.assign({},_,{params:Object.assign({},a,_.params),pathname:_t([u,l.encodeLocation?l.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?u:_t([u,l.encodeLocation?l.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),o,n,r);return t&&x?P.createElement(Bo.Provider,{value:{location:cl({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:fe.Pop}},x):x}function Av(){let e=Yv(),t=If(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)"},o=null;return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),n?P.createElement("pre",{style:l},n):null,o)}const Bv=P.createElement(Av,null);class Vv extends P.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?P.createElement(dn.Provider,{value:this.props.routeContext},P.createElement($f.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $v(e){let{routeContext:t,match:n,children:r}=e,l=P.useContext(vl);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),P.createElement(dn.Provider,{value:t},r)}function Hv(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(l=n)==null?void 0:l.errors;if(a!=null){let c=i.findIndex(p=>p.route.id&&(a==null?void 0:a[p.route.id]));c>=0||H(!1),i=i.slice(0,Math.min(i.length,c+1))}let u=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((c,p,m)=>{let S,w=!1,x=null,_=null;n&&(S=a&&p.route.id?a[p.route.id]:void 0,x=p.route.errorElement||Bv,u&&(s<0&&m===0?(Gv("route-fallback",!1),w=!0,_=null):s===m&&(w=!0,_=p.route.hydrateFallbackElement||null)));let f=t.concat(i.slice(0,m+1)),d=()=>{let h;return S?h=x:w?h=_:p.route.Component?h=P.createElement(p.route.Component,null):p.route.element?h=p.route.element:h=c,P.createElement($v,{match:p,routeContext:{outlet:c,matches:f,isDataRoute:n!=null},children:h})};return n&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?P.createElement(Vv,{location:n.location,revalidation:n.revalidation,component:x,error:S,children:d(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):d()},null)}var Wf=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Wf||{}),ko=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}(ko||{});function Wv(e){let t=P.useContext(vl);return t||H(!1),t}function Qv(e){let t=P.useContext(Ru);return t||H(!1),t}function Kv(e){let t=P.useContext(dn);return t||H(!1),t}function Qf(e){let t=Kv(),n=t.matches[t.matches.length-1];return n.route.id||H(!1),n.route.id}function Yv(){var e;let t=P.useContext($f),n=Qv(ko.UseRouteError),r=Qf(ko.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Xv(){let{router:e}=Wv(Wf.UseNavigateStable),t=Qf(ko.UseNavigateStable),n=P.useRef(!1);return Hf(()=>{n.current=!0}),P.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,cl({fromRouteId:t},o)))},[e,t])}const sc={};function Gv(e,t,n){!t&&!sc[e]&&(sc[e]=!0)}function Jv(e){return Fv(e.context)}function Zv(e){let{basename:t="/",children:n=null,location:r,navigationType:l=fe.Pop,navigator:o,static:i=!1,future:a}=e;gl()&&H(!1);let u=t.replace(/^\/*/,"/"),s=P.useMemo(()=>({basename:u,navigator:o,static:i,future:cl({v7_relativeSplatPath:!1},a)}),[u,a,o,i]);typeof r=="string"&&(r=Dt(r));let{pathname:c="/",search:p="",hash:m="",state:S=null,key:w="default"}=r,x=P.useMemo(()=>{let _=ln(c,u);return _==null?null:{location:{pathname:_,search:p,hash:m,state:S,key:w},navigationType:l}},[u,c,p,m,S,w,l]);return x==null?null:P.createElement(cn.Provider,{value:s},P.createElement(Bo.Provider,{children:n,value:x}))}new Promise(()=>{});function qv(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:P.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:P.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:P.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** - * React Router DOM v6.21.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function cr(){return cr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function bv(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function e0(e,t){return e.button===0&&(!t||t==="_self")&&!bv(e)}const t0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],n0=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];function r0(e,t){return xv({basename:t==null?void 0:t.basename,future:cr({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Hm({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||l0(),routes:e,mapRouteProperties:qv,window:t==null?void 0:t.window}).initialize()}function l0(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=cr({},t,{errors:o0(t.errors)})),t}function o0(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 Pu(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let o=window[l.__subType];if(typeof o=="function")try{let i=new o(l.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(l.message);o.stack="",n[r]=o}}else n[r]=l;return n}const Yf=P.createContext({isTransitioning:!1}),i0=P.createContext(new Map),a0="startTransition",cc=jp[a0],u0="flushSync",dc=Vm[u0];function s0(e){cc?cc(e):e()}function jr(e){dc?dc(e):e()}class c0{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 d0(e){let{fallbackElement:t,router:n,future:r}=e,[l,o]=P.useState(n.state),[i,a]=P.useState(),[u,s]=P.useState({isTransitioning:!1}),[c,p]=P.useState(),[m,S]=P.useState(),[w,x]=P.useState(),_=P.useRef(new Map),{v7_startTransition:f}=r||{},d=P.useCallback(R=>{f?s0(R):R()},[f]),h=P.useCallback((R,T)=>{let{deletedFetchers:z,unstable_flushSync:F,unstable_viewTransitionOpts:X}=T;z.forEach(he=>_.current.delete(he)),R.fetchers.forEach((he,Ge)=>{he.data!==void 0&&_.current.set(Ge,he.data)});let ve=n.window==null||typeof n.window.document.startViewTransition!="function";if(!X||ve){F?jr(()=>o(R)):d(()=>o(R));return}if(F){jr(()=>{m&&(c&&c.resolve(),m.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let he=n.window.document.startViewTransition(()=>{jr(()=>o(R))});he.finished.finally(()=>{jr(()=>{p(void 0),S(void 0),a(void 0),s({isTransitioning:!1})})}),jr(()=>S(he));return}m?(c&&c.resolve(),m.skipTransition(),x({state:R,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(a(R),s({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[n.window,m,c,_,d]);P.useLayoutEffect(()=>n.subscribe(h),[n,h]),P.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new c0)},[u]),P.useEffect(()=>{if(c&&i&&n.window){let R=i,T=c.promise,z=n.window.document.startViewTransition(async()=>{d(()=>o(R)),await T});z.finished.finally(()=>{p(void 0),S(void 0),a(void 0),s({isTransitioning:!1})}),S(z)}},[d,i,c,n.window]),P.useEffect(()=>{c&&i&&l.location.key===i.location.key&&c.resolve()},[c,m,l.location,i]),P.useEffect(()=>{!u.isTransitioning&&w&&(a(w.state),s({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),x(void 0))},[u.isTransitioning,w]),P.useEffect(()=>{},[]);let E=P.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,T,z)=>n.navigate(R,{state:T,preventScrollReset:z==null?void 0:z.preventScrollReset}),replace:(R,T,z)=>n.navigate(R,{replace:!0,state:T,preventScrollReset:z==null?void 0:z.preventScrollReset})}),[n]),L=n.basename||"/",v=P.useMemo(()=>({router:n,navigator:E,static:!1,basename:L}),[n,E,L]);return P.createElement(P.Fragment,null,P.createElement(vl.Provider,{value:v},P.createElement(Ru.Provider,{value:l},P.createElement(i0.Provider,{value:_.current},P.createElement(Yf.Provider,{value:u},P.createElement(Zv,{basename:L,location:l.location,navigationType:l.historyAction,navigator:E,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},l.initialized||n.future.v7_partialHydration?P.createElement(f0,{routes:n.routes,future:n.future,state:l}):t))))),null)}function f0(e){let{routes:t,future:n,state:r}=e;return Uv(t,void 0,r,n)}const p0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",h0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pa=P.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:a,target:u,to:s,preventScrollReset:c,unstable_viewTransition:p}=t,m=Kf(t,t0),{basename:S}=P.useContext(cn),w,x=!1;if(typeof s=="string"&&h0.test(s)&&(w=s,p0))try{let h=new URL(window.location.href),E=s.startsWith("//")?new URL(h.protocol+s):new URL(s),L=ln(E.pathname,S);E.origin===h.origin&&L!=null?s=L+E.search+E.hash:x=!0}catch{}let _=Mv(s,{relative:l}),f=v0(s,{replace:i,state:a,target:u,preventScrollReset:c,relative:l,unstable_viewTransition:p});function d(h){r&&r(h),h.defaultPrevented||f(h)}return P.createElement("a",cr({},m,{href:w||_,onClick:x||o?r:d,ref:n,target:u}))}),ki=P.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:o="",end:i=!1,style:a,to:u,unstable_viewTransition:s,children:c}=t,p=Kf(t,n0),m=Vo(u,{relative:p.relative}),S=yl(),w=P.useContext(Ru),{navigator:x}=P.useContext(cn),_=w!=null&&g0(m)&&s===!0,f=x.encodeLocation?x.encodeLocation(m).pathname:m.pathname,d=S.pathname,h=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;l||(d=d.toLowerCase(),h=h?h.toLowerCase():null,f=f.toLowerCase());const E=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let L=d===f||!i&&d.startsWith(f)&&d.charAt(E)==="/",v=h!=null&&(h===f||!i&&h.startsWith(f)&&h.charAt(f.length)==="/"),R={isActive:L,isPending:v,isTransitioning:_},T=L?r:void 0,z;typeof o=="function"?z=o(R):z=[o,L?"active":null,v?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let F=typeof a=="function"?a(R):a;return P.createElement(Pa,cr({},p,{"aria-current":T,className:z,ref:n,style:F,to:u,unstable_viewTransition:s}),typeof c=="function"?c(R):c)});var _a;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(_a||(_a={}));var fc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fc||(fc={}));function m0(e){let t=P.useContext(vl);return t||H(!1),t}function v0(e,t){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,u=zv(),s=yl(),c=Vo(e,{relative:i});return P.useCallback(p=>{if(e0(p,n)){p.preventDefault();let m=r!==void 0?r:Ln(s)===Ln(c);u(e,{replace:m,state:l,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[s,u,c,r,l,n,e,o,i,a])}function g0(e,t){t===void 0&&(t={});let n=P.useContext(Yf);n==null&&H(!1);let{basename:r}=m0(_a.useViewTransitionState),l=Vo(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=ln(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=ln(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Sa(l.pathname,i)!=null||Sa(l.pathname,o)!=null}const Ct="/expenses-react-app/",Nu="https://react-expenses-30273-default-rtdb.europe-west1.firebasedatabase.app",pc=[{label:"Jan",value:0},{label:"Feb",value:0},{label:"Mar",value:0},{label:"Apr",value:0},{label:"May",value:0},{label:"Jun",value:0},{label:"Jul",value:0},{label:"Aug",value:0},{label:"Sep",value:0},{label:"Oct",value:0},{label:"Nov",value:0},{label:"Dec",value:0}],Xf=({children:e})=>C.jsx("div",{className:"px-6 sm:px-12 lg:px-20",children:e}),y0=()=>C.jsxs("ul",{className:"flex items-center gap-8",children:[C.jsx("li",{children:C.jsx(ki,{to:Ct,className:({isActive:e})=>e?"relative after:absolute after:content-[''] after:left-0 after:right-0 after:-bottom-1.5 after:w-full after:h-0.5 after:bg-light no-underline text-light":"text-light no-underline",end:!0,children:"Home"})}),C.jsx("li",{children:C.jsx(ki,{to:`${Ct}login`,className:({isActive:e})=>e?"relative after:absolute after:content-[''] after:left-0 after:right-0 after:-bottom-1.5 after:w-full after:h-0.5 after:bg-light no-underline text-light":"text-light no-underline",children:"Log In"})}),C.jsx("li",{children:C.jsx(ki,{to:`${Ct}register`,className:({isActive:e})=>e?"relative after:absolute after:content-[''] after:left-0 after:right-0 after:-bottom-1.5 after:w-full after:h-0.5 after:bg-light no-underline text-light":"text-light no-underline",children:"Sign Up"})})]}),w0="/expenses-react-app/assets/logo-HTwwoxjU.png",x0=()=>C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx("img",{className:"w-12 h-12",src:w0,alt:"Expenses React App Logo"}),C.jsx("span",{className:"block font-medium text-light",children:"Expense Tracker"})]}),S0=()=>C.jsx("header",{className:"py-4 bg-primary",children:C.jsx(Xf,{children:C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx(x0,{}),C.jsx("nav",{children:C.jsx(y0,{})})]})})}),E0=()=>C.jsxs(C.Fragment,{children:[C.jsx(S0,{}),C.jsx("main",{className:"py-12",children:C.jsx(Xf,{children:C.jsx(Jv,{})})})]}),Lu=()=>{const[e,t]=P.useState(!1),[n,r]=P.useState(null),l=P.useCallback(async(o,i)=>{t(!0),r(null);try{const a=await fetch(o.url,{method:o.method?o.method:"GET",headers:o.headers?o.headers:{},body:o.body?JSON.stringify(o.body):null});if(!a.ok)throw new Error("Request failed!");const u=await a.json();i(u)}catch(a){r(a.message||"Oops... Something went wrong!")}t(!1)},[]);return{isLoading:e,error:n,sendRequest:l}};class Gf{constructor(t,n,r,l){yr(this,"id");yr(this,"title");yr(this,"amount");yr(this,"date");this.id=t,this.title=n,this.amount=r,this.date=l}}const hr=({className:e,tagName:t,children:n})=>{const r=t||"div";return C.jsx(r,{className:e?`overflow-hidden rounded-md shadow-card ${e}`:"overflow-hidden rounded-md shadow-card",children:n})},k0=({selected:e,onSelectedItem:t})=>{const n=r=>{t(r.target.value)};return C.jsx("div",{className:"px-4 text-light",children:C.jsxs("div",{className:"my-5 flex items-center justify-between",children:[C.jsx("label",{className:"font-bold",children:"Filter by year"}),C.jsxs("select",{className:"py-2 px-6 font-bold rounded-md text-dark",value:e,onChange:n,children:[C.jsx("option",{value:"none",children:"All"}),C.jsx("option",{value:"2023",children:"2023"}),C.jsx("option",{value:"2022",children:"2022"}),C.jsx("option",{value:"2021",children:"2021"}),C.jsx("option",{value:"2020",children:"2020"}),C.jsx("option",{value:"2019",children:"2019"})]})]})})},on=({className:e,children:t,id:n,type:r,disabled:l,onClick:o})=>C.jsx("button",{id:n,className:e?`py-3.5 px-7 md:py-4 md:px-8 w-fit rounded-xl text-light bg-accent hover:bg-accent-light active:bg-accent-light disabled:bg-opacity-80 transition-all ${e}`:"py-3.5 px-7 md:py-4 md:px-8 w-fit rounded-xl text-light bg-accent hover:bg-accent-light active:bg-accent-light disabled:bg-opacity-80 transition-all",type:r||"button",disabled:l,onClick:o,children:t}),Ci={CANCEL:"cancel-btn",ACTION:"action-btn"},C0=({title:e,text:t,onConfirm:n})=>{const r=P.useContext(Eu),l=o=>{(o.target.classList.contains("modal")||o.target.id===Ci.CANCEL)&&r.removeModal()};return C.jsx("div",{className:r.isActive?"modal fixed z-[5] top-0 left-0 w-full h-full flex items-center justify-center opacity-100 visible bg-dark bg-opacity-60 transition-all":"fixed -z-[1] top-0 left-0 w-full h-full flex items-center justify-center opacity-0 invisible bg-dark bg-opacity-60 transition-all",onClick:l,children:C.jsxs(hr,{className:"p-8 flex flex-col text-dark bg-light",children:[C.jsx("h2",{className:"mb-5 text-xl font-semibold text-center",children:e}),C.jsx("p",{className:"mb-8",children:t}),C.jsxs("div",{className:"flex justify-center gap-4",children:[C.jsx(on,{id:Ci.CANCEL,type:"button",onClick:l,children:"Close"}),C.jsx(on,{id:Ci.ACTION,className:"bg-danger hover:bg-[#ce0000]",type:"button",onClick:n,children:"Delete"})]})]})})},P0=({date:e})=>{const t=e.toLocaleString("en-US",{month:"long"}),n=e.toLocaleString("en-US",{day:"2-digit"}),r=e.getFullYear();return C.jsxs("div",{className:"w-20 h-20 flex flex-col items-center justify-center rounded-xl text-light bg-primary",children:[C.jsx("span",{className:"text-xs md:text-sm font-semibold",children:t}),C.jsx("span",{className:"text-xl md:text-2xl font-bold",children:r}),C.jsx("span",{className:"text-xs md:text-sm",children:n})]})},_0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='white'%20class='bi%20bi-trash3'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M6.5%201h3a.5.5%200%200%201%20.5.5v1H6v-1a.5.5%200%200%201%20.5-.5ZM11%202.5v-1A1.5%201.5%200%200%200%209.5%200h-3A1.5%201.5%200%200%200%205%201.5v1H2.506a.58.58%200%200%200-.01%200H1.5a.5.5%200%200%200%200%201h.538l.853%2010.66A2%202%200%200%200%204.885%2016h6.23a2%202%200%200%200%201.994-1.84l.853-10.66h.538a.5.5%200%200%200%200-1h-.995a.59.59%200%200%200-.01%200H11Zm1.958%201-.846%2010.58a1%201%200%200%201-.997.92h-6.23a1%201%200%200%201-.997-.92L3.042%203.5h9.916Zm-7.487%201a.5.5%200%200%201%20.528.47l.5%208.5a.5.5%200%200%201-.998.06L5%205.03a.5.5%200%200%201%20.47-.53Zm5.058%200a.5.5%200%200%201%20.47.53l-.5%208.5a.5.5%200%201%201-.998-.06l.5-8.5a.5.5%200%200%201%20.528-.47ZM8%204.5a.5.5%200%200%201%20.5.5v8.5a.5.5%200%200%201-1%200V5a.5.5%200%200%201%20.5-.5Z'/%3e%3c/svg%3e",R0=({data:e,onDelete:t})=>{const{id:n,title:r,amount:l,date:o}=e,i=()=>{t(n,r)};return C.jsxs(hr,{className:"p-3 my-4 flex items-center justify-between bg-secondary",tagName:"li",children:[C.jsx(P0,{date:o}),C.jsxs("div",{className:"flex-[1] flex flex-col-reverse items-end md:flex-row md:items-center justify-start gap-3",children:[C.jsx("h2",{className:"flex-[1] md:mx-4 md:text-xl text-right md:text-left text-light",children:r}),C.jsxs("span",{className:"p-2 md:py-2 md:px-6 md:text-xl rounded-xl text-light bg-accent",children:["$",l]})]}),C.jsx(on,{className:"!p-3 ml-3 bg-dark hover:shadow-card focus:scale-95 transition-all",type:"button",onClick:i,children:C.jsx("img",{className:"w-4 h-4 md:w-5 md:h-5",src:_0,alt:"Delete"})})]})},N0=({expenses:e,isLoading:t,error:n,onDeleteItem:r})=>{const l=P.useContext(Eu),[o,i]=P.useState({expenseId:"",expenseTitle:""}),{sendRequest:a}=Lu(),u=`Are you sure you want to delete expense "${o.expenseTitle}"?`,s="Delete expense",c=(x,_)=>{l.displayModal(),i({expenseId:x,expenseTitle:_})},p=x=>{l.removeModal(),r(x)},m=async()=>{a({url:`${Nu}/expenses/${o.expenseId}.json`,method:"DELETE",headers:{"Content-Type":"application/json"}},p.bind(null,o.expenseId))};let S=C.jsx("h2",{className:"mt-8 md:text-xl font-bold text-center text-light",children:"Found no expenses."});e.length>0&&(S=C.jsx("ul",{className:"list-none",children:e.map(x=>C.jsx(R0,{data:x,onDelete:c},x.id))}));let w=S;return t&&(w=C.jsx("h2",{className:"mt-8 md:text-xl font-bold text-center text-light",children:"Loading expenses..."})),n&&(w=C.jsx("h2",{className:"mt-8 md:text-xl font-bold text-center text-light",children:n})),C.jsxs(C.Fragment,{children:[jf.createPortal(C.jsx(C0,{title:s,text:u,onConfirm:m}),document.getElementById("modal-root")),w]})},L0=({data:e,total:t})=>{const{label:n,value:r}=e;let l="0%";return t>0&&(l=Math.round(r/t*100)+"%"),C.jsxs("div",{className:"h-24 sm:h-28 flex flex-col items-center gap-1",children:[C.jsx("div",{className:"overflow-hidden h-full w-5 flex flex-col justify-end rounded-xl border border-secondary bg-[#c3b4f3]",children:C.jsx("div",{className:"w-full bg-[#4826b9] transition-all",style:{height:l}})}),C.jsx("div",{className:"text-sm font-semibold text-center text-dark",children:n})]})},T0="_chart_n7zub_1",j0={chart:T0},D0=({data:e})=>{const n=e.map(r=>r.value).reduce((r,l)=>r+l,0);return C.jsx(hr,{className:`p-5 flex flex-wrap gap-y-4 bg-[#f8dfff] ${j0.chart}`,children:e.map(r=>C.jsx(L0,{data:r,total:n},r.label))})},M0=({expenses:e})=>{for(const t of e){const n=t.date.getMonth();pc[n].value+=t.amount}return C.jsx(D0,{data:pc})},z0=({data:e,isLoading:t,error:n,onDeleteItem:r})=>{const[l,o]=P.useState(""),i=u=>{o(u)};let a;return l?a=e.filter(u=>u.date.getFullYear().toString()===l):a=e,C.jsxs(hr,{className:"p-6 mt-8 mx-auto max-w-[50rem] bg-primary",children:[C.jsx(k0,{selected:l,onSelectedItem:i}),C.jsx(M0,{expenses:a}),C.jsx(N0,{expenses:a,isLoading:t,error:n,onDeleteItem:r})]})},Jf={value:"",isValid:null},I0=(e,t)=>{switch(t.type){case"USER_INPUT":return{value:t.value,isValid:t.validate(t.value)};case"INPUT_BLUR":return{value:e.value,isValid:t.validate(e.value)};case"CLEAR_INPUT":return Jf;default:return{value:"",isValid:!1}}},en=e=>{const[t,n]=P.useReducer(I0,Jf),r=i=>{n({type:"USER_INPUT",value:i.target.value,validate:e})},l=()=>{n({type:"INPUT_BLUR",validate:e})},o=()=>{n({type:"CLEAR_INPUT"})};return{value:t.value,isValid:t.isValid,handleChange:r,handleBlur:l,handleClear:o}},tn=({label:e,id:t,className:n,type:r,min:l,max:o,step:i,value:a,hasError:u,onChange:s,onBlur:c})=>{let p;return u?p=n?`p-2 w-full h-10 text-dark rounded-md outline outline-2 outline-danger ${n}`:"p-2 w-full h-10 text-dark rounded-md outline outline-2 outline-danger":p=n?`p-2 w-full h-10 text-dark rounded-md ${n}`:"p-2 w-full h-10 text-dark rounded-md",C.jsxs("div",{children:[C.jsx("label",{className:"mb-2 block text-sm sm:text-base font-bold text-dark",htmlFor:t,children:e}),C.jsx("input",{id:t,className:p,type:r,min:l,max:o,step:i,value:a,onChange:s,onBlur:c})]})},O0={"new-expense-controls":"_new-expense-controls_170ne_1"},Pi=e=>e.trim().length!==0,F0=({isLoading:e,onSubmit:t,onCancel:n})=>{const{value:r,isValid:l,handleChange:o,handleBlur:i,handleClear:a}=en(Pi),{value:u,isValid:s,handleChange:c,handleBlur:p,handleClear:m}=en(Pi),{value:S,isValid:w,handleChange:x,handleBlur:_,handleClear:f}=en(Pi),[d,h]=P.useState(!1);P.useEffect(()=>{const v=setTimeout(()=>{h(l&&s&&w)},250);return()=>{clearTimeout(v)}},[l,s,w]);const E=()=>{a(),m(),f()},L=v=>{if(v.preventDefault(),d){const R={title:r,amount:+u,date:new Date(S)};t(R),E()}else l?s?_():p():i()};return C.jsxs("form",{onSubmit:L,children:[C.jsxs("div",{className:`mb-6 flex flex-wrap justify-stretch md:justify-center gap-6 text-left ${O0["new-expense-controls"]}`,children:[C.jsx(tn,{label:"Title",id:"title",type:"text",value:r,hasError:l!==null&&!l,onChange:o,onBlur:i}),C.jsx(tn,{label:"Amount",id:"amount",type:"number",min:"0.01",step:"0.01",value:u,hasError:s!==null&&!s,onChange:c,onBlur:p}),C.jsx(tn,{label:"Date",id:"date",type:"date",min:"2019-01-01",max:"2023-12-31",value:S,hasError:w!==null&&!w,onChange:x,onBlur:_})]}),C.jsxs("div",{className:"flex flex-wrap justify-center md:justify-end gap-4",children:[C.jsx(on,{type:"button",onClick:n,children:"Close"}),C.jsx(on,{type:"submit",children:e?"Sending...":"Add Expense"})]})]})},U0=({onAddExpense:e})=>{const[t,n]=P.useState(!1),{isLoading:r,sendRequest:l}=Lu(),o=(s,c)=>{const p=c.name,m=new Gf(p,s.title,s.amount,s.date);e(m),n(!1)},i=async s=>{l({url:`${Nu}/expenses.json`,method:"POST",headers:{"Content-Type":"application/json"},body:{title:s.title,amount:s.amount,date:s.date.toISOString().split("T")[0]}},o.bind(null,s))},a=()=>{n(!0)},u=()=>{n(!1)};return C.jsx(hr,{className:"p-4 mx-auto max-w-[50rem] text-center bg-background",children:t?C.jsx(F0,{isLoading:r,onSubmit:i,onCancel:u}):C.jsx(on,{type:"button",onClick:a,children:"Add New Expense"})})},A0=()=>{const[e,t]=P.useState([]),{isLoading:n,error:r,sendRequest:l}=Lu();P.useEffect(()=>{const a=u=>{const s=[];for(const c in u)s.push(new Gf(c,u[c].title,u[c].amount,new Date(u[c].date)));t(s)};l({url:`${Nu}/expenses.json`},a)},[l]);const o=a=>{t(u=>[a,...u])},i=a=>{t(u=>u.filter(s=>s.id!==a))};return C.jsxs(C.Fragment,{children:[C.jsx(U0,{onAddExpense:o}),C.jsx(z0,{data:e,isLoading:n,error:r,onDeleteItem:i})]})},Zf=({children:e,formType:t,onSubmit:n})=>{let r;return t==="login"?r=C.jsxs("p",{className:"mt-5 mb-1 text-center text-primary",children:["Don't have an account yet?"," ",C.jsx(Pa,{className:"ml-1 text-accent",to:`${Ct}register`,children:"Sign Up"})]}):r=C.jsxs("p",{className:"mt-5 mb-1 text-center text-primary",children:["Already have an account?"," ",C.jsx(Pa,{className:"ml-1 text-accent",to:`${Ct}login`,children:"Sign In"})]}),C.jsxs(hr,{className:"p-6 mx-auto max-w-[25rem] bg-background",children:[C.jsx("form",{className:"flex flex-col gap-4",onSubmit:n,children:e}),r]})},_i=e=>e.trim().length!==0,B0=()=>{const{value:e,isValid:t,handleChange:n,handleBlur:r,handleClear:l}=en(_i),{value:o,isValid:i,handleChange:a,handleBlur:u,handleClear:s}=en(_i),{value:c,isValid:p,handleChange:m,handleBlur:S,handleClear:w}=en(_i),[x,_]=P.useState(!1);P.useEffect(()=>{const h=setTimeout(()=>{_(t&&i&&p)},250);return()=>{clearTimeout(h)}},[t,i,p]);const f=()=>{l(),s(),w()},d=h=>{h.preventDefault(),x?(console.log({email:e,username:o,password:c}),f()):t?i?S():u():r()};return C.jsxs(Zf,{formType:"register",onSubmit:d,children:[C.jsx(tn,{label:"Email",id:"email",type:"email",value:e,hasError:t!==null&&!t,onChange:n,onBlur:r}),C.jsx(tn,{label:"Username",id:"username",type:"text",value:o,hasError:i!==null&&!i,onChange:a,onBlur:u}),C.jsx(tn,{label:"Password",id:"password",type:"password",value:c,hasError:p!==null&&!p,onChange:m,onBlur:S}),C.jsx(on,{className:"mt-2 mx-auto",type:"submit",children:"Sign Up"})]})},V0=()=>C.jsx(B0,{}),hc=e=>e.trim().length!==0,$0=()=>{const{value:e,isValid:t,handleChange:n,handleBlur:r,handleClear:l}=en(hc),{value:o,isValid:i,handleChange:a,handleBlur:u,handleClear:s}=en(hc),[c,p]=P.useState(!1);P.useEffect(()=>{const w=setTimeout(()=>{p(t&&i)},250);return()=>{clearTimeout(w)}},[t,i]);const m=()=>{l(),s()},S=w=>{w.preventDefault(),c?(console.log({email:"test",username:e,password:o}),m()):r()};return C.jsxs(Zf,{formType:"login",onSubmit:S,children:[C.jsx(tn,{label:"Username",id:"username",type:"text",value:e,hasError:t!==null&&!t,onChange:n,onBlur:r}),C.jsx(tn,{label:"Password",id:"password",type:"password",value:o,hasError:i!==null&&!i,onChange:a,onBlur:u}),C.jsx(on,{className:"mt-2 mx-auto",type:"submit",children:"Sign In"})]})},H0=()=>C.jsx($0,{}),W0=r0([{path:Ct,element:C.jsx(E0,{}),children:[{path:Ct,element:C.jsx(A0,{})},{path:`${Ct}register`,element:C.jsx(V0,{})},{path:`${Ct}login`,element:C.jsx(H0,{})}]}]),Q0=()=>C.jsx(d0,{router:W0}),K0=Ri.createRoot(document.getElementById("page-root"));K0.render(C.jsx($m,{children:C.jsx(Q0,{})})); diff --git a/index.html b/index.html index 28e1858..8d972f2 100644 --- a/index.html +++ b/index.html @@ -1,22 +1,22 @@ - - - - - - - - - - - Expenses React App - + + + + + + + + + + + Expenses React App + - - -
- - - + + +
+ + +