diff --git a/cli.py b/cli.py index eff85dbe5b5e2..687c293423449 100644 --- a/cli.py +++ b/cli.py @@ -3774,9 +3774,18 @@ def new_session(self, silent=False): except (Exception, KeyboardInterrupt): pass self._notify_session_boundary("on_session_finalize") + # Commit OpenViking session so memories become searchable + try: + self.agent.shutdown_memory_provider(self.conversation_history) + except Exception: + pass elif self.agent: # First session or empty history — still finalize the old session self._notify_session_boundary("on_session_finalize") + try: + self.agent.shutdown_memory_provider() + except Exception: + pass old_session_id = self.session_id if self._session_db and old_session_id: diff --git a/gateway/run.py b/gateway/run.py index 07acc30c62837..8607dbce5fc52 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -28,6 +28,8 @@ from datetime import datetime from typing import Dict, Optional, Any, List +import httpx + # --------------------------------------------------------------------------- # SSL certificate auto-detection for NixOS and other non-standard systems. # Must run BEFORE any HTTP library (discord, aiohttp, etc.) is imported. @@ -1247,6 +1249,9 @@ async def start(self) -> bool: # Start background session expiry watcher for proactive memory flushing asyncio.create_task(self._session_expiry_watcher()) + + # Start background idle commit watcher for early memory searchability + asyncio.create_task(self._idle_commit_watcher()) # Start background reconnection watcher for platforms that failed at startup if self._failed_platforms: @@ -1364,6 +1369,82 @@ async def _session_expiry_watcher(self, interval: int = 300): break await asyncio.sleep(1) + async def _idle_commit_watcher(self, interval: int = 60, idle_seconds: int = 120): + """Background task that commits idle sessions for early memory searchability. + + Runs every `interval` seconds (default 60s). For each session that has been + idle for `idle_seconds` (default 120s = 2 min), commits the OpenViking session + so memories become searchable before the full session expiry timeout. + + This allows users to search recent conversations without waiting for the + full 2-hour session timeout. + """ + await asyncio.sleep(30) # initial delay — let the gateway fully start + + # Get OpenViking endpoint from config (supports remote deployments) + _endpoint = os.environ.get("OPENVIKING_ENDPOINT", "http://127.0.0.1:1933") + _api_key = os.environ.get('OPENVIKING_API_KEY', '') + + while self._running: + try: + self.session_store._ensure_loaded() + now = datetime.now() + _committed_count = 0 + + # Collect sessions to commit (avoid modifying dict during iteration) + _to_commit = [] + for key, entry in list(self.session_store._entries.items()): + # Skip if already committed or flushed + if entry.memory_committed or entry.memory_flushed: + continue + + # Check if session has been idle long enough + idle_time = (now - entry.updated_at).total_seconds() + if idle_time >= idle_seconds: + _to_commit.append((entry, idle_time)) + + if _to_commit: + # Use async httpx client for non-blocking HTTP requests + _headers = {} + if _api_key: + _headers['Authorization'] = f'Bearer {_api_key}' + + async with httpx.AsyncClient(timeout=10.0) as client: + for entry, idle_time in _to_commit: + try: + _resp = await client.post( + f"{_endpoint}/api/v1/sessions/{entry.session_id}/commit", + headers=_headers, + ) + if _resp.status_code == 200: + _committed_count += 1 + with self.session_store._lock: + entry.memory_committed = True + self.session_store._save() + logger.info( + "Idle commit: session %s committed after %.0fs idle", + entry.session_id, idle_time, + ) + else: + logger.debug( + "Idle commit failed for session %s: HTTP %d", + entry.session_id, _resp.status_code, + ) + except Exception as e: + logger.debug("Idle commit failed for session %s: %s", entry.session_id, e) + + if _committed_count: + logger.info("Idle commit watcher: %d session(s) committed", _committed_count) + + except Exception as e: + logger.debug("Idle commit watcher error: %s", e) + + # Sleep in small increments so we can stop quickly + for _ in range(interval): + if not self._running: + break + await asyncio.sleep(1) + async def _platform_reconnect_watcher(self) -> None: """Background task that periodically retries connecting failed platforms. diff --git a/gateway/session.py b/gateway/session.py index 2b32c188951a4..dad4566ae07dd 100644 --- a/gateway/session.py +++ b/gateway/session.py @@ -369,6 +369,11 @@ class SessionEntry: # set was lost on restart, causing redundant re-flushes). memory_flushed: bool = False + # Set by the idle commit watcher when the session has been idle long + # enough to trigger an early memory commit (for searchability). + # Reset to False when a new message arrives. + memory_committed: bool = False + def to_dict(self) -> Dict[str, Any]: result = { "session_key": self.session_key, @@ -387,6 +392,7 @@ def to_dict(self) -> Dict[str, Any]: "estimated_cost_usd": self.estimated_cost_usd, "cost_status": self.cost_status, "memory_flushed": self.memory_flushed, + "memory_committed": self.memory_committed, } if self.origin: result["origin"] = self.origin.to_dict() @@ -423,6 +429,7 @@ def from_dict(cls, data: Dict[str, Any]) -> "SessionEntry": estimated_cost_usd=data.get("estimated_cost_usd", 0.0), cost_status=data.get("cost_status", "unknown"), memory_flushed=data.get("memory_flushed", False), + memory_committed=data.get("memory_committed", False), ) @@ -769,6 +776,9 @@ def update_session( entry.updated_at = _now() if last_prompt_tokens is not None: entry.last_prompt_tokens = last_prompt_tokens + # Reset memory_committed flag - user has new activity + if entry.memory_committed: + entry.memory_committed = False self._save() def reset_session(self, session_key: str) -> Optional[SessionEntry]: diff --git a/hermes_cli/web_dist/assets/filler-bg0-Dc7xVfma.jpg b/hermes_cli/web_dist/assets/filler-bg0-Dc7xVfma.jpg new file mode 100644 index 0000000000000..490969417318d Binary files /dev/null and b/hermes_cli/web_dist/assets/filler-bg0-Dc7xVfma.jpg differ diff --git a/hermes_cli/web_dist/assets/index-5Ztth3H1.js b/hermes_cli/web_dist/assets/index-5Ztth3H1.js new file mode 100644 index 0000000000000..53ea501425123 --- /dev/null +++ b/hermes_cli/web_dist/assets/index-5Ztth3H1.js @@ -0,0 +1,14 @@ +(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const h of m.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function u(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function o(f){if(f.ep)return;f.ep=!0;const m=u(f);fetch(f.href,m)}})();function Zx(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Qo={exports:{}},xs={};var qh;function Jx(){if(qh)return xs;qh=1;var n=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function u(o,f,m){var h=null;if(m!==void 0&&(h=""+m),f.key!==void 0&&(h=""+f.key),"key"in f){m={};for(var v in f)v!=="key"&&(m[v]=f[v])}else m=f;return f=m.ref,{$$typeof:n,type:o,key:h,ref:f!==void 0?f:null,props:m}}return xs.Fragment=c,xs.jsx=u,xs.jsxs=u,xs}var Gh;function $x(){return Gh||(Gh=1,Qo.exports=Jx()),Qo.exports}var i=$x(),Zo={exports:{}},ys={},Jo={exports:{}},$o={};var Yh;function Kx(){return Yh||(Yh=1,(function(n){function c(L,F){var ce=L.length;L.push(F);e:for(;0>>1,W=L[Ee];if(0>>1;Ee<_;){var X=2*(Ee+1)-1,Y=L[X],K=X+1,P=L[K];if(0>f(Y,ce))Kf(P,Y)?(L[Ee]=P,L[K]=ce,Ee=K):(L[Ee]=Y,L[X]=ce,Ee=X);else if(Kf(P,ce))L[Ee]=P,L[K]=ce,Ee=K;else break e}}return F}function f(L,F){var ce=L.sortIndex-F.sortIndex;return ce!==0?ce:L.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;n.unstable_now=function(){return m.now()}}else{var h=Date,v=h.now();n.unstable_now=function(){return h.now()-v}}var g=[],x=[],S=1,b=null,E=3,Z=!1,J=!1,H=!1,j=!1,U=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function I(L){for(var F=u(x);F!==null;){if(F.callback===null)o(x);else if(F.startTime<=L)o(x),F.sortIndex=F.expirationTime,c(g,F);else break;F=u(x)}}function $(L){if(H=!1,I(L),!J)if(u(g)!==null)J=!0,G||(G=!0,fe());else{var F=u(x);F!==null&&ye($,F.startTime-L)}}var G=!1,B=-1,D=5,k=-1;function ue(){return j?!0:!(n.unstable_now()-kL&&ue());){var Ee=b.callback;if(typeof Ee=="function"){b.callback=null,E=b.priorityLevel;var W=Ee(b.expirationTime<=L);if(L=n.unstable_now(),typeof W=="function"){b.callback=W,I(L),F=!0;break t}b===u(g)&&o(g),I(L)}else o(g);b=u(g)}if(b!==null)F=!0;else{var _=u(x);_!==null&&ye($,_.startTime-L),F=!1}}break e}finally{b=null,E=ce,Z=!1}F=void 0}}finally{F?fe():G=!1}}}var fe;if(typeof T=="function")fe=function(){T(ie)};else if(typeof MessageChannel<"u"){var Xe=new MessageChannel,Qe=Xe.port2;Xe.port1.onmessage=ie,fe=function(){Qe.postMessage(null)}}else fe=function(){U(ie,0)};function ye(L,F){B=U(function(){L(n.unstable_now())},F)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125Ee?(L.sortIndex=ce,c(x,L),u(g)===null&&L===u(x)&&(H?(R(B),B=-1):H=!0,ye($,ce-Ee))):(L.sortIndex=W,c(g,L),J||Z||(J=!0,G||(G=!0,fe()))),L},n.unstable_shouldYield=ue,n.unstable_wrapCallback=function(L){var F=E;return function(){var ce=E;E=F;try{return L.apply(this,arguments)}finally{E=ce}}}})($o)),$o}var Vh;function Fx(){return Vh||(Vh=1,Jo.exports=Kx()),Jo.exports}var Ko={exports:{}},de={};var Xh;function Wx(){if(Xh)return de;Xh=1;var n=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),E=Symbol.iterator;function Z(_){return _===null||typeof _!="object"?null:(_=E&&_[E]||_["@@iterator"],typeof _=="function"?_:null)}var J={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,j={};function U(_,X,Y){this.props=_,this.context=X,this.refs=j,this.updater=Y||J}U.prototype.isReactComponent={},U.prototype.setState=function(_,X){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,X,"setState")},U.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function R(){}R.prototype=U.prototype;function T(_,X,Y){this.props=_,this.context=X,this.refs=j,this.updater=Y||J}var I=T.prototype=new R;I.constructor=T,H(I,U.prototype),I.isPureReactComponent=!0;var $=Array.isArray;function G(){}var B={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function k(_,X,Y){var K=Y.ref;return{$$typeof:n,type:_,key:X,ref:K!==void 0?K:null,props:Y}}function ue(_,X){return k(_.type,X,_.props)}function ie(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function fe(_){var X={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(Y){return X[Y]})}var Xe=/\/+/g;function Qe(_,X){return typeof _=="object"&&_!==null&&_.key!=null?fe(""+_.key):X.toString(36)}function ye(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(G,G):(_.status="pending",_.then(function(X){_.status==="pending"&&(_.status="fulfilled",_.value=X)},function(X){_.status==="pending"&&(_.status="rejected",_.reason=X)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function L(_,X,Y,K,P){var te=typeof _;(te==="undefined"||te==="boolean")&&(_=null);var pe=!1;if(_===null)pe=!0;else switch(te){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(_.$$typeof){case n:case c:pe=!0;break;case S:return pe=_._init,L(pe(_._payload),X,Y,K,P)}}if(pe)return P=P(_),pe=K===""?"."+Qe(_,0):K,$(P)?(Y="",pe!=null&&(Y=pe.replace(Xe,"$&/")+"/"),L(P,X,Y,"",function(xt){return xt})):P!=null&&(ie(P)&&(P=ue(P,Y+(P.key==null||_&&_.key===P.key?"":(""+P.key).replace(Xe,"$&/")+"/")+pe)),X.push(P)),1;pe=0;var Fe=K===""?".":K+":";if($(_))for(var me=0;me<_.length;me++)K=_[me],te=Fe+Qe(K,me),pe+=L(K,X,Y,te,P);else if(me=Z(_),typeof me=="function")for(_=me.call(_),me=0;!(K=_.next()).done;)K=K.value,te=Fe+Qe(K,me++),pe+=L(K,X,Y,te,P);else if(te==="object"){if(typeof _.then=="function")return L(ye(_),X,Y,K,P);throw X=String(_),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return pe}function F(_,X,Y){if(_==null)return _;var K=[],P=0;return L(_,K,"","",function(te){return X.call(Y,te,P++)}),K}function ce(_){if(_._status===-1){var X=_._result;X=X(),X.then(function(Y){(_._status===0||_._status===-1)&&(_._status=1,_._result=Y)},function(Y){(_._status===0||_._status===-1)&&(_._status=2,_._result=Y)}),_._status===-1&&(_._status=0,_._result=X)}if(_._status===1)return _._result.default;throw _._result}var Ee=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},W={map:F,forEach:function(_,X,Y){F(_,function(){X.apply(this,arguments)},Y)},count:function(_){var X=0;return F(_,function(){X++}),X},toArray:function(_){return F(_,function(X){return X})||[]},only:function(_){if(!ie(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return de.Activity=b,de.Children=W,de.Component=U,de.Fragment=u,de.Profiler=f,de.PureComponent=T,de.StrictMode=o,de.Suspense=g,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,de.__COMPILER_RUNTIME={__proto__:null,c:function(_){return B.H.useMemoCache(_)}},de.cache=function(_){return function(){return _.apply(null,arguments)}},de.cacheSignal=function(){return null},de.cloneElement=function(_,X,Y){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var K=H({},_.props),P=_.key;if(X!=null)for(te in X.key!==void 0&&(P=""+X.key),X)!D.call(X,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&X.ref===void 0||(K[te]=X[te]);var te=arguments.length-2;if(te===1)K.children=Y;else if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(c){console.error(c)}}return n(),Fo.exports=Ix(),Fo.exports}var $h;function Px(){if($h)return ys;$h=1;var n=Fx(),c=xu(),u=vp();function o(e){var t="https://react.dev/errors/"+e;if(1W||(e.current=Ee[W],Ee[W]=null,W--)}function Y(e,t){W++,Ee[W]=e.current,e.current=t}var K=_(null),P=_(null),te=_(null),pe=_(null);function Fe(e,t){switch(Y(te,t),Y(P,e),Y(K,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?oh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=oh(t),e=uh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}X(K),Y(K,e)}function me(){X(K),X(P),X(te)}function xt(e){e.memoizedState!==null&&Y(pe,e);var t=K.current,a=uh(t,e.type);t!==a&&(Y(P,e),Y(K,a))}function yt(e){P.current===e&&(X(K),X(P)),pe.current===e&&(X(pe),ms._currentValue=ce)}var aa,za;function vt(e){if(aa===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);aa=t&&t[1]||"",za=-1)":-1s||N[l]!==M[s]){var q=` +`+N[l].replace(" at new "," at ");return e.displayName&&q.includes("")&&(q=q.replace("",e.displayName)),q}while(1<=l&&0<=s);break}}}finally{Cr=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?vt(a):""}function jg(e,t){switch(e.tag){case 26:case 27:case 5:return vt(e.type);case 16:return vt("Lazy");case 13:return e.child!==t&&t!==null?vt("Suspense Fallback"):vt("Suspense");case 19:return vt("SuspenseList");case 0:case 15:return Tr(e.type,!1);case 11:return Tr(e.type.render,!1);case 1:return Tr(e.type,!0);case 31:return vt("Activity");default:return""}}function Bu(e){try{var t="",a=null;do t+=jg(e,a),a=e,e=e.return;while(e);return t}catch(l){return` +Error generating stack: `+l.message+` +`+l.stack}}var Ar=Object.prototype.hasOwnProperty,Mr=n.unstable_scheduleCallback,zr=n.unstable_cancelCallback,wg=n.unstable_shouldYield,_g=n.unstable_requestPaint,Ct=n.unstable_now,Eg=n.unstable_getCurrentPriorityLevel,qu=n.unstable_ImmediatePriority,Gu=n.unstable_UserBlockingPriority,Ds=n.unstable_NormalPriority,Cg=n.unstable_LowPriority,Yu=n.unstable_IdlePriority,Tg=n.log,Ag=n.unstable_setDisableYieldValue,_n=null,Tt=null;function Ra(e){if(typeof Tg=="function"&&Ag(e),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(_n,e)}catch{}}var At=Math.clz32?Math.clz32:Rg,Mg=Math.log,zg=Math.LN2;function Rg(e){return e>>>=0,e===0?32:31-(Mg(e)/zg|0)|0}var Ls=256,Us=262144,Hs=4194304;function cl(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Bs(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var s=0,r=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var p=l&134217727;return p!==0?(l=p&~r,l!==0?s=cl(l):(d&=p,d!==0?s=cl(d):a||(a=p&~e,a!==0&&(s=cl(a))))):(p=l&~r,p!==0?s=cl(p):d!==0?s=cl(d):a||(a=l&~e,a!==0&&(s=cl(a)))),s===0?0:t!==0&&t!==s&&(t&r)===0&&(r=s&-s,a=t&-t,r>=a||r===32&&(a&4194048)!==0)?t:s}function En(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function kg(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vu(){var e=Hs;return Hs<<=1,(Hs&62914560)===0&&(Hs=4194304),e}function Rr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Cn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Og(e,t,a,l,s,r){var d=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var p=e.entanglements,N=e.expirationTimes,M=e.hiddenUpdates;for(a=d&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var qg=/[\n"\\]/g;function Bt(e){return e.replace(qg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Hr(e,t,a,l,s,r,d,p){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ht(t)):e.value!==""+Ht(t)&&(e.value=""+Ht(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Br(e,d,Ht(t)):a!=null?Br(e,d,Ht(a)):l!=null&&e.removeAttribute("value"),s==null&&r!=null&&(e.defaultChecked=!!r),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Ht(p):e.removeAttribute("name")}function af(e,t,a,l,s,r,d,p){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||a!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){Ur(e);return}a=a!=null?""+Ht(a):"",t=t!=null?""+Ht(t):a,p||t===e.value||(e.value=t),e.defaultValue=t}l=l??s,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=p?e.checked:!!l,e.defaultChecked=!!l,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Ur(e)}function Br(e,t,a){t==="number"&&Ys(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Hl(e,t,a,l){if(e=e.options,t){t={};for(var s=0;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xr=!1;if(ma)try{var zn={};Object.defineProperty(zn,"passive",{get:function(){Xr=!0}}),window.addEventListener("test",zn,zn),window.removeEventListener("test",zn,zn)}catch{Xr=!1}var Oa=null,Qr=null,Xs=null;function uf(){if(Xs)return Xs;var e,t=Qr,a=t.length,l,s="value"in Oa?Oa.value:Oa.textContent,r=s.length;for(e=0;e=On),gf=" ",xf=!1;function yf(e,t){switch(e){case"keyup":return h0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yl=!1;function g0(e,t){switch(e){case"compositionend":return vf(t);case"keypress":return t.which!==32?null:(xf=!0,gf);case"textInput":return e=t.data,e===gf&&xf?null:e;default:return null}}function x0(e,t){if(Yl)return e==="compositionend"||!Fr&&yf(e,t)?(e=uf(),Xs=Qr=Oa=null,Yl=!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:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Cf(a)}}function Af(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Af(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ys(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Ys(e.document)}return t}function Pr(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")}var _0=ma&&"documentMode"in document&&11>=document.documentMode,Vl=null,ec=null,Hn=null,tc=!1;function zf(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;tc||Vl==null||Vl!==Ys(l)||(l=Vl,"selectionStart"in l&&Pr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Hn&&Un(Hn,l)||(Hn=l,l=Ui(ec,"onSelect"),0>=d,s-=d,la=1<<32-At(t)+s|a<ge?(we=se,se=null):we=se.sibling;var Ae=z(C,se,A[ge],V);if(Ae===null){se===null&&(se=we);break}e&&se&&Ae.alternate===null&&t(C,se),w=r(Ae,w,ge),Te===null?re=Ae:Te.sibling=Ae,Te=Ae,se=we}if(ge===A.length)return a(C,se),_e&&pa(C,ge),re;if(se===null){for(;gege?(we=se,se=null):we=se.sibling;var al=z(C,se,Ae.value,V);if(al===null){se===null&&(se=we);break}e&&se&&al.alternate===null&&t(C,se),w=r(al,w,ge),Te===null?re=al:Te.sibling=al,Te=al,se=we}if(Ae.done)return a(C,se),_e&&pa(C,ge),re;if(se===null){for(;!Ae.done;ge++,Ae=A.next())Ae=Q(C,Ae.value,V),Ae!==null&&(w=r(Ae,w,ge),Te===null?re=Ae:Te.sibling=Ae,Te=Ae);return _e&&pa(C,ge),re}for(se=l(se);!Ae.done;ge++,Ae=A.next())Ae=O(se,C,ge,Ae.value,V),Ae!==null&&(e&&Ae.alternate!==null&&se.delete(Ae.key===null?ge:Ae.key),w=r(Ae,w,ge),Te===null?re=Ae:Te.sibling=Ae,Te=Ae);return e&&se.forEach(function(Qx){return t(C,Qx)}),_e&&pa(C,ge),re}function Le(C,w,A,V){if(typeof A=="object"&&A!==null&&A.type===H&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case Z:e:{for(var re=A.key;w!==null;){if(w.key===re){if(re=A.type,re===H){if(w.tag===7){a(C,w.sibling),V=s(w,A.props.children),V.return=C,C=V;break e}}else if(w.elementType===re||typeof re=="object"&&re!==null&&re.$$typeof===D&&vl(re)===w.type){a(C,w.sibling),V=s(w,A.props),Xn(V,A),V.return=C,C=V;break e}a(C,w);break}else t(C,w);w=w.sibling}A.type===H?(V=hl(A.props.children,C.mode,V,A.key),V.return=C,C=V):(V=ei(A.type,A.key,A.props,null,C.mode,V),Xn(V,A),V.return=C,C=V)}return d(C);case J:e:{for(re=A.key;w!==null;){if(w.key===re)if(w.tag===4&&w.stateNode.containerInfo===A.containerInfo&&w.stateNode.implementation===A.implementation){a(C,w.sibling),V=s(w,A.children||[]),V.return=C,C=V;break e}else{a(C,w);break}else t(C,w);w=w.sibling}V=cc(A,C.mode,V),V.return=C,C=V}return d(C);case D:return A=vl(A),Le(C,w,A,V)}if(ye(A))return ae(C,w,A,V);if(fe(A)){if(re=fe(A),typeof re!="function")throw Error(o(150));return A=re.call(A),oe(C,w,A,V)}if(typeof A.then=="function")return Le(C,w,ri(A),V);if(A.$$typeof===T)return Le(C,w,li(C,A),V);ci(C,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,w!==null&&w.tag===6?(a(C,w.sibling),V=s(w,A),V.return=C,C=V):(a(C,w),V=rc(A,C.mode,V),V.return=C,C=V),d(C)):a(C,w)}return function(C,w,A,V){try{Vn=0;var re=Le(C,w,A,V);return en=null,re}catch(se){if(se===Pl||se===si)throw se;var Te=zt(29,se,null,C.mode);return Te.lanes=V,Te.return=C,Te}}}var Sl=ed(!0),td=ed(!1),Ba=!1;function bc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Me&2)!==0){var s=l.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),l.pending=t,t=Ps(e),Hf(e,null,a),t}return Is(e,l,t,a),Ps(e)}function Qn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Qu(e,a)}}function Nc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var s=null,r=null;if(a=a.firstBaseUpdate,a!==null){do{var d={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};r===null?s=r=d:r=r.next=d,a=a.next}while(a!==null);r===null?s=r=t:r=r.next=t}else s=r=t;a={baseState:l.baseState,firstBaseUpdate:s,lastBaseUpdate:r,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var jc=!1;function Zn(){if(jc){var e=Il;if(e!==null)throw e}}function Jn(e,t,a,l){jc=!1;var s=e.updateQueue;Ba=!1;var r=s.firstBaseUpdate,d=s.lastBaseUpdate,p=s.shared.pending;if(p!==null){s.shared.pending=null;var N=p,M=N.next;N.next=null,d===null?r=M:d.next=M,d=N;var q=e.alternate;q!==null&&(q=q.updateQueue,p=q.lastBaseUpdate,p!==d&&(p===null?q.firstBaseUpdate=M:p.next=M,q.lastBaseUpdate=N))}if(r!==null){var Q=s.baseState;d=0,q=M=N=null,p=r;do{var z=p.lane&-536870913,O=z!==p.lane;if(O?(je&z)===z:(l&z)===z){z!==0&&z===Wl&&(jc=!0),q!==null&&(q=q.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ae=e,oe=p;z=t;var Le=a;switch(oe.tag){case 1:if(ae=oe.payload,typeof ae=="function"){Q=ae.call(Le,Q,z);break e}Q=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=oe.payload,z=typeof ae=="function"?ae.call(Le,Q,z):ae,z==null)break e;Q=b({},Q,z);break e;case 2:Ba=!0}}z=p.callback,z!==null&&(e.flags|=64,O&&(e.flags|=8192),O=s.callbacks,O===null?s.callbacks=[z]:O.push(z))}else O={lane:z,tag:p.tag,payload:p.payload,callback:p.callback,next:null},q===null?(M=q=O,N=Q):q=q.next=O,d|=z;if(p=p.next,p===null){if(p=s.shared.pending,p===null)break;O=p,p=O.next,O.next=null,s.lastBaseUpdate=O,s.shared.pending=null}}while(!0);q===null&&(N=Q),s.baseState=N,s.firstBaseUpdate=M,s.lastBaseUpdate=q,r===null&&(s.shared.lanes=0),Za|=d,e.lanes=d,e.memoizedState=Q}}function ad(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function ld(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;er?r:8;var d=L.T,p={};L.T=p,Yc(e,!1,t,a);try{var N=s(),M=L.S;if(M!==null&&M(p,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var q=O0(N,l);Fn(e,t,q,Lt(e))}else Fn(e,t,l,Lt(e))}catch(Q){Fn(e,t,{then:function(){},status:"rejected",reason:Q},Lt())}finally{F.p=r,d!==null&&p.types!==null&&(d.types=p.types),L.T=d}}function q0(){}function qc(e,t,a,l){if(e.tag!==5)throw Error(o(476));var s=Dd(e).queue;Od(e,s,t,ce,a===null?q0:function(){return Ld(e),a(l)})}function Dd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:ce},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ld(e){var t=Dd(e);t.next===null&&(t=e.alternate.memoizedState),Fn(e,t.next.queue,{},Lt())}function Gc(){return ft(ms)}function Ud(){return Ie().memoizedState}function Hd(){return Ie().memoizedState}function G0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Lt();e=qa(a);var l=Ga(t,e,a);l!==null&&(Et(l,t,a),Qn(l,t,a)),t={cache:gc()},e.payload=t;return}t=t.return}}function Y0(e,t,a){var l=Lt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},yi(e)?qd(t,a):(a=sc(e,t,a,l),a!==null&&(Et(a,e,l),Gd(a,t,l)))}function Bd(e,t,a){var l=Lt();Fn(e,t,a,l)}function Fn(e,t,a,l){var s={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(yi(e))qd(t,s);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var d=t.lastRenderedState,p=r(d,a);if(s.hasEagerState=!0,s.eagerState=p,Mt(p,d))return Is(e,t,s,0),Ue===null&&Ws(),!1}catch{}if(a=sc(e,t,s,l),a!==null)return Et(a,e,l),Gd(a,t,l),!0}return!1}function Yc(e,t,a,l){if(l={lane:2,revertLane:So(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},yi(e)){if(t)throw Error(o(479))}else t=sc(e,a,l,2),t!==null&&Et(t,e,2)}function yi(e){var t=e.alternate;return e===he||t!==null&&t===he}function qd(e,t){an=fi=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Gd(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Qu(e,a)}}var Wn={readContext:ft,use:hi,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};Wn.useEffectEvent=$e;var Yd={readContext:ft,use:hi,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:_d,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,gi(4194308,4,Ad.bind(null,t,e),a)},useLayoutEffect:function(e,t){return gi(4194308,4,e,t)},useInsertionEffect:function(e,t){gi(4,2,e,t)},useMemo:function(e,t){var a=gt();t=t===void 0?null:t;var l=e();if(Nl){Ra(!0);try{e()}finally{Ra(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=gt();if(a!==void 0){var s=a(t);if(Nl){Ra(!0);try{a(t)}finally{Ra(!1)}}}else s=t;return l.memoizedState=l.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},l.queue=e,e=e.dispatch=Y0.bind(null,he,e),[l.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:function(e){e=Dc(e);var t=e.queue,a=Bd.bind(null,he,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Hc,useDeferredValue:function(e,t){var a=gt();return Bc(a,e,t)},useTransition:function(){var e=Dc(!1);return e=Od.bind(null,he,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=he,s=gt();if(_e){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Ue===null)throw Error(o(349));(je&127)!==0||od(l,t,a)}s.memoizedState=a;var r={value:a,getSnapshot:t};return s.queue=r,_d(fd.bind(null,l,r,e),[e]),l.flags|=2048,nn(9,{destroy:void 0},ud.bind(null,l,r,a,t),null),a},useId:function(){var e=gt(),t=Ue.identifierPrefix;if(_e){var a=na,l=la;a=(l&~(1<<32-At(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=di++,0<\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof l.is=="string"?d.createElement("select",{is:l.is}):d.createElement("select"),l.multiple?r.multiple=!0:l.size&&(r.size=l.size);break;default:r=typeof l.is=="string"?d.createElement(s,{is:l.is}):d.createElement(s)}}r[ot]=t,r[bt]=l;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)r.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=r;e:switch(mt(r,s,l),s){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Sa(t)}}return qe(t),ao(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Sa(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=te.current,Kl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,s=ut,s!==null)switch(s.tag){case 27:case 5:l=s.memoizedProps}e[ot]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||rh(e.nodeValue,a)),e||Ua(t,!0)}else e=Hi(e).createTextNode(l),e[ot]=t,t.stateNode=e}return qe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Kl(t),a!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[ot]=t}else pl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else a=dc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(kt(t),t):(kt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return qe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Kl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!s)throw Error(o(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));s[ot]=t}else pl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),s=!1}else s=dc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(kt(t),t):(kt(t),null)}return kt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,s=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(s=l.alternate.memoizedState.cachePool.pool),r=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(r=l.memoizedState.cachePool.pool),r!==s&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ji(t,t.updateQueue),qe(t),null);case 4:return me(),e===null&&_o(t.stateNode.containerInfo),qe(t),null;case 10:return xa(t.type),qe(t),null;case 19:if(X(We),l=t.memoizedState,l===null)return qe(t),null;if(s=(t.flags&128)!==0,r=l.rendering,r===null)if(s)Pn(l,!1);else{if(Ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=ui(e),r!==null){for(t.flags|=128,Pn(l,!1),e=r.updateQueue,t.updateQueue=e,ji(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Bf(a,e),a=a.sibling;return Y(We,We.current&1|2),_e&&pa(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ct()>Ti&&(t.flags|=128,s=!0,Pn(l,!1),t.lanes=4194304)}else{if(!s)if(e=ui(r),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,ji(t,e),Pn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!r.alternate&&!_e)return qe(t),null}else 2*Ct()-l.renderingStartTime>Ti&&a!==536870912&&(t.flags|=128,s=!0,Pn(l,!1),t.lanes=4194304);l.isBackwards?(r.sibling=t.child,t.child=r):(e=l.last,e!==null?e.sibling=r:t.child=r,l.last=r)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ct(),e.sibling=null,a=We.current,Y(We,s?a&1|2:a&1),_e&&pa(t,l.treeForkCount),e):(qe(t),null);case 22:case 23:return kt(t),_c(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),a=t.updateQueue,a!==null&&ji(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&X(yl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),xa(Pe),qe(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function J0(e,t){switch(uc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(Pe),me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return yt(t),null;case 31:if(t.memoizedState!==null){if(kt(t),t.alternate===null)throw Error(o(340));pl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));pl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(We),null;case 4:return me(),null;case 10:return xa(t.type),null;case 22:case 23:return kt(t),_c(),e!==null&&X(yl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(Pe),null;case 25:return null;default:return null}}function dm(e,t){switch(uc(t),t.tag){case 3:xa(Pe),me();break;case 26:case 27:case 5:yt(t);break;case 4:me();break;case 31:t.memoizedState!==null&&kt(t);break;case 13:kt(t);break;case 19:X(We);break;case 10:xa(t.type);break;case 22:case 23:kt(t),_c(),e!==null&&X(yl);break;case 24:xa(Pe)}}function es(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var s=l.next;a=s;do{if((a.tag&e)===e){l=void 0;var r=a.create,d=a.inst;l=r(),d.destroy=l}a=a.next}while(a!==s)}}catch(p){Re(t,t.return,p)}}function Xa(e,t,a){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var r=s.next;l=r;do{if((l.tag&e)===e){var d=l.inst,p=d.destroy;if(p!==void 0){d.destroy=void 0,s=t;var N=a,M=p;try{M()}catch(q){Re(s,N,q)}}}l=l.next}while(l!==r)}}catch(q){Re(t,t.return,q)}}function mm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ld(t,a)}catch(l){Re(e,e.return,l)}}}function hm(e,t,a){a.props=jl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Re(e,t,l)}}function ts(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(s){Re(e,t,s)}}function sa(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(s){Re(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){Re(e,t,s)}else a.current=null}function pm(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(s){Re(e,e.return,s)}}function lo(e,t,a){try{var l=e.stateNode;px(l,e.type,a,t),l[bt]=t}catch(s){Re(e,e.return,s)}}function gm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wa(e.type)||e.tag===4}function no(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gm(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.tag===27&&Wa(e.type)||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 so(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=da));else if(l!==4&&(l===27&&Wa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(so(e,t,a),e=e.sibling;e!==null;)so(e,t,a),e=e.sibling}function wi(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Wa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(wi(e,t,a),e=e.sibling;e!==null;)wi(e,t,a),e=e.sibling}function xm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);mt(t,l,a),t[ot]=e,t[bt]=a}catch(r){Re(e,e.return,r)}}var Na=!1,at=!1,io=!1,ym=typeof WeakSet=="function"?WeakSet:Set,ct=null;function $0(e,t){if(e=e.containerInfo,To=Qi,e=Mf(e),Pr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var s=l.anchorOffset,r=l.focusNode;l=l.focusOffset;try{a.nodeType,r.nodeType}catch{a=null;break e}var d=0,p=-1,N=-1,M=0,q=0,Q=e,z=null;t:for(;;){for(var O;Q!==a||s!==0&&Q.nodeType!==3||(p=d+s),Q!==r||l!==0&&Q.nodeType!==3||(N=d+l),Q.nodeType===3&&(d+=Q.nodeValue.length),(O=Q.firstChild)!==null;)z=Q,Q=O;for(;;){if(Q===e)break t;if(z===a&&++M===s&&(p=d),z===r&&++q===l&&(N=d),(O=Q.nextSibling)!==null)break;Q=z,z=Q.parentNode}Q=O}a=p===-1||N===-1?null:{start:p,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ao={focusedElem:e,selectionRange:a},Qi=!1,ct=t;ct!==null;)if(t=ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ct=e;else for(;ct!==null;){switch(t=ct,r=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),mt(r,l,a),r[ot]=e,rt(r),l=r;break e;case"link":var d=wh("link","href",s).get(l+(a.href||""));if(d){for(var p=0;pLe&&(d=Le,Le=oe,oe=d);var C=Tf(p,oe),w=Tf(p,Le);if(C&&w&&(O.rangeCount!==1||O.anchorNode!==C.node||O.anchorOffset!==C.offset||O.focusNode!==w.node||O.focusOffset!==w.offset)){var A=Q.createRange();A.setStart(C.node,C.offset),O.removeAllRanges(),oe>Le?(O.addRange(A),O.extend(w.node,w.offset)):(A.setEnd(w.node,w.offset),O.addRange(A))}}}}for(Q=[],O=p;O=O.parentNode;)O.nodeType===1&&Q.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;pa?32:a,L.T=null,a=ho,ho=null;var r=$a,d=Ca;if(nt=0,un=$a=null,Ca=0,(Me&6)!==0)throw Error(o(331));var p=Me;if(Me|=4,Am(r.current),Em(r,r.current,d,a),Me=p,rs(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(_n,r)}catch{}return!0}finally{F.p=s,L.T=l,Jm(e,t)}}function Km(e,t,a){t=Gt(a,t),t=Zc(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(Cn(e,2),ia(e))}function Re(e,t,a){if(e.tag===3)Km(e,e,a);else for(;t!==null;){if(t.tag===3){Km(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ja===null||!Ja.has(l))){e=Gt(a,e),a=Fd(2),l=Ga(t,a,2),l!==null&&(Wd(a,l,t,e),Cn(l,2),ia(l));break}}t=t.return}}function yo(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new W0;var s=new Set;l.set(t,s)}else s=l.get(t),s===void 0&&(s=new Set,l.set(t,s));s.has(a)||(oo=!0,s.add(a),e=ax.bind(null,e,t,a),t.then(e,e))}function ax(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ue===e&&(je&a)===a&&(Ke===4||Ke===3&&(je&62914560)===je&&300>Ct()-Ci?(Me&2)===0&&fn(e,0):uo|=a,on===je&&(on=0)),ia(e)}function Fm(e,t){t===0&&(t=Vu()),e=ml(e,t),e!==null&&(Cn(e,t),ia(e))}function lx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Fm(e,a)}function nx(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),Fm(e,a)}function sx(e,t){return Mr(e,t)}var Oi=null,mn=null,vo=!1,Di=!1,bo=!1,Fa=0;function ia(e){e!==mn&&e.next===null&&(mn===null?Oi=mn=e:mn=mn.next=e),Di=!0,vo||(vo=!0,rx())}function rs(e,t){if(!bo&&Di){bo=!0;do for(var a=!1,l=Oi;l!==null;){if(e!==0){var s=l.pendingLanes;if(s===0)var r=0;else{var d=l.suspendedLanes,p=l.pingedLanes;r=(1<<31-At(42|e)+1)-1,r&=s&~(d&~p),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(a=!0,eh(l,r))}else r=je,r=Bs(l,l===Ue?r:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(r&3)===0||En(l,r)||(a=!0,eh(l,r));l=l.next}while(a);bo=!1}}function ix(){Wm()}function Wm(){Di=vo=!1;var e=0;Fa!==0&&xx()&&(e=Fa);for(var t=Ct(),a=null,l=Oi;l!==null;){var s=l.next,r=Im(l,t);r===0?(l.next=null,a===null?Oi=s:a.next=s,s===null&&(mn=a)):(a=l,(e!==0||(r&3)!==0)&&(Di=!0)),l=s}nt!==0&&nt!==5||rs(e),Fa!==0&&(Fa=0)}function Im(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,s=e.expirationTimes,r=e.pendingLanes&-62914561;0p)break;var q=N.transferSize,Q=N.initiatorType;q&&ch(Q)&&(N=N.responseEnd,d+=q*(N"u"?null:document;function bh(e,t,a){var l=hn;if(l&&typeof t=="string"&&t){var s=Bt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),vh.has(s)||(vh.add(s),e={rel:e,crossOrigin:a,href:t},l.querySelector(s)===null&&(t=l.createElement("link"),mt(t,"link",e),rt(t),l.head.appendChild(t)))}}function Ex(e){Ta.D(e),bh("dns-prefetch",e,null)}function Cx(e,t){Ta.C(e,t),bh("preconnect",e,t)}function Tx(e,t,a){Ta.L(e,t,a);var l=hn;if(l&&e&&t){var s='link[rel="preload"][as="'+Bt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Bt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Bt(a.imageSizes)+'"]')):s+='[href="'+Bt(e)+'"]';var r=s;switch(t){case"style":r=pn(e);break;case"script":r=gn(e)}Jt.has(r)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Jt.set(r,e),l.querySelector(s)!==null||t==="style"&&l.querySelector(fs(r))||t==="script"&&l.querySelector(ds(r))||(t=l.createElement("link"),mt(t,"link",e),rt(t),l.head.appendChild(t)))}}function Ax(e,t){Ta.m(e,t);var a=hn;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Bt(l)+'"][href="'+Bt(e)+'"]',r=s;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=gn(e)}if(!Jt.has(r)&&(e=b({rel:"modulepreload",href:e},t),Jt.set(r,e),a.querySelector(s)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ds(r)))return}l=a.createElement("link"),mt(l,"link",e),rt(l),a.head.appendChild(l)}}}function Mx(e,t,a){Ta.S(e,t,a);var l=hn;if(l&&e){var s=Ll(l).hoistableStyles,r=pn(e);t=t||"default";var d=s.get(r);if(!d){var p={loading:0,preload:null};if(d=l.querySelector(fs(r)))p.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Jt.get(r))&&Lo(e,a);var N=d=l.createElement("link");rt(N),mt(N,"link",e),N._p=new Promise(function(M,q){N.onload=M,N.onerror=q}),N.addEventListener("load",function(){p.loading|=1}),N.addEventListener("error",function(){p.loading|=2}),p.loading|=4,qi(d,t,l)}d={type:"stylesheet",instance:d,count:1,state:p},s.set(r,d)}}}function zx(e,t){Ta.X(e,t);var a=hn;if(a&&e){var l=Ll(a).hoistableScripts,s=gn(e),r=l.get(s);r||(r=a.querySelector(ds(s)),r||(e=b({src:e,async:!0},t),(t=Jt.get(s))&&Uo(e,t),r=a.createElement("script"),rt(r),mt(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(s,r))}}function Rx(e,t){Ta.M(e,t);var a=hn;if(a&&e){var l=Ll(a).hoistableScripts,s=gn(e),r=l.get(s);r||(r=a.querySelector(ds(s)),r||(e=b({src:e,async:!0,type:"module"},t),(t=Jt.get(s))&&Uo(e,t),r=a.createElement("script"),rt(r),mt(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(s,r))}}function Sh(e,t,a,l){var s=(s=te.current)?Bi(s):null;if(!s)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=pn(a.href),a=Ll(s).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=pn(a.href);var r=Ll(s).hoistableStyles,d=r.get(e);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,d),(r=s.querySelector(fs(e)))&&!r._p&&(d.instance=r,d.state.loading=5),Jt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Jt.set(e,a),r||kx(s,e,a,d.state))),t&&l===null)throw Error(o(528,""));return d}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=gn(a),a=Ll(s).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function pn(e){return'href="'+Bt(e)+'"'}function fs(e){return'link[rel="stylesheet"]['+e+"]"}function Nh(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function kx(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),mt(t,"link",a),rt(t),e.head.appendChild(t))}function gn(e){return'[src="'+Bt(e)+'"]'}function ds(e){return"script[async]"+e}function jh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Bt(a.href)+'"]');if(l)return t.instance=l,rt(l),l;var s=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),rt(l),mt(l,"style",s),qi(l,a.precedence,e),t.instance=l;case"stylesheet":s=pn(a.href);var r=e.querySelector(fs(s));if(r)return t.state.loading|=4,t.instance=r,rt(r),r;l=Nh(a),(s=Jt.get(s))&&Lo(l,s),r=(e.ownerDocument||e).createElement("link"),rt(r);var d=r;return d._p=new Promise(function(p,N){d.onload=p,d.onerror=N}),mt(r,"link",l),t.state.loading|=4,qi(r,a.precedence,e),t.instance=r;case"script":return r=gn(a.src),(s=e.querySelector(ds(r)))?(t.instance=s,rt(s),s):(l=a,(s=Jt.get(r))&&(l=b({},a),Uo(l,s)),e=e.ownerDocument||e,s=e.createElement("script"),rt(s),mt(s,"link",l),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,qi(l,a.precedence,e));return t.instance}function qi(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=l.length?l[l.length-1]:null,r=s,d=0;d title"):null)}function Ox(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Eh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Dx(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=pn(l.href),r=t.querySelector(fs(s));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Yi.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=r,rt(r);return}r=t.ownerDocument||t,l=Nh(l),(s=Jt.get(s))&&Lo(l,s),r=r.createElement("link"),rt(r);var d=r;d._p=new Promise(function(p,N){d.onload=p,d.onerror=N}),mt(r,"link",l),a.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Yi.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Ho=0;function Lx(e,t){return e.stylesheets&&e.count===0&&Xi(e,e.stylesheets),0Ho?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(s)}}:null}function Yi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Vi=null;function Xi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vi=new Map,t.forEach(Ux,e),Vi=null,Yi.call(e))}function Ux(e,t){if(!(t.state.loading&4)){var a=Vi.get(e);if(a)var l=a.get(null);else{a=new Map,Vi.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(c){console.error(c)}}return n(),Zo.exports=Px(),Zo.exports}var t1=e1(),y=xu();const a1=Zx(y);var Fh="popstate";function Wh(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function l1(n={}){function c(o,f){let m=f.state?.masked,{pathname:h,search:v,hash:g}=m||o.location;return uu("",{pathname:h,search:v,hash:g},f.state&&f.state.usr||null,f.state&&f.state.key||"default",m?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function u(o,f){return typeof f=="string"?f:ws(f)}return s1(c,u,null,n)}function Je(n,c){if(n===!1||n===null||typeof n>"u")throw new Error(c)}function ta(n,c){if(!n){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function n1(){return Math.random().toString(36).substring(2,10)}function Ih(n,c){return{usr:n.state,key:n.key,idx:c,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function uu(n,c,u=null,o,f){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof c=="string"?Sn(c):c,state:u,key:c&&c.key||o||n1(),unstable_mask:f}}function ws({pathname:n="/",search:c="",hash:u=""}){return c&&c!=="?"&&(n+=c.charAt(0)==="?"?c:"?"+c),u&&u!=="#"&&(n+=u.charAt(0)==="#"?u:"#"+u),n}function Sn(n){let c={};if(n){let u=n.indexOf("#");u>=0&&(c.hash=n.substring(u),n=n.substring(0,u));let o=n.indexOf("?");o>=0&&(c.search=n.substring(o),n=n.substring(0,o)),n&&(c.pathname=n)}return c}function s1(n,c,u,o={}){let{window:f=document.defaultView,v5Compat:m=!1}=o,h=f.history,v="POP",g=null,x=S();x==null&&(x=0,h.replaceState({...h.state,idx:x},""));function S(){return(h.state||{idx:null}).idx}function b(){v="POP";let j=S(),U=j==null?null:j-x;x=j,g&&g({action:v,location:H.location,delta:U})}function E(j,U){v="PUSH";let R=Wh(j)?j:uu(H.location,j,U);x=S()+1;let T=Ih(R,x),I=H.createHref(R.unstable_mask||R);try{h.pushState(T,"",I)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;f.location.assign(I)}m&&g&&g({action:v,location:H.location,delta:1})}function Z(j,U){v="REPLACE";let R=Wh(j)?j:uu(H.location,j,U);x=S();let T=Ih(R,x),I=H.createHref(R.unstable_mask||R);h.replaceState(T,"",I),m&&g&&g({action:v,location:H.location,delta:0})}function J(j){return i1(j)}let H={get action(){return v},get location(){return n(f,h)},listen(j){if(g)throw new Error("A history only accepts one active listener");return f.addEventListener(Fh,b),g=j,()=>{f.removeEventListener(Fh,b),g=null}},createHref(j){return c(f,j)},createURL:J,encodeLocation(j){let U=J(j);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:E,replace:Z,go(j){return h.go(j)}};return H}function i1(n,c=!1){let u="http://localhost";typeof window<"u"&&(u=window.location.origin!=="null"?window.location.origin:window.location.href),Je(u,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:ws(n);return o=o.replace(/ $/,"%20"),!c&&o.startsWith("//")&&(o=u+o),new URL(o,u)}function bp(n,c,u="/"){return r1(n,c,u,!1)}function r1(n,c,u,o){let f=typeof c=="string"?Sn(c):c,m=Ma(f.pathname||"/",u);if(m==null)return null;let h=Sp(n);c1(h);let v=null;for(let g=0;v==null&&g{let S={relativePath:x===void 0?h.path||"":x,caseSensitive:h.caseSensitive===!0,childrenIndex:v,route:h};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(o)&&g)return;Je(S.relativePath.startsWith(o),`Absolute route path "${S.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(o.length)}let b=ea([o,S.relativePath]),E=u.concat(S);h.children&&h.children.length>0&&(Je(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),Sp(h.children,c,E,b,g)),!(h.path==null&&!h.index)&&c.push({path:b,score:p1(b,h.index),routesMeta:E})};return n.forEach((h,v)=>{if(h.path===""||!h.path?.includes("?"))m(h,v);else for(let g of Np(h.path))m(h,v,!0,g)}),c}function Np(n){let c=n.split("/");if(c.length===0)return[];let[u,...o]=c,f=u.endsWith("?"),m=u.replace(/\?$/,"");if(o.length===0)return f?[m,""]:[m];let h=Np(o.join("/")),v=[];return v.push(...h.map(g=>g===""?m:[m,g].join("/"))),f&&v.push(...h),v.map(g=>n.startsWith("/")&&g===""?"/":g)}function c1(n){n.sort((c,u)=>c.score!==u.score?u.score-c.score:g1(c.routesMeta.map(o=>o.childrenIndex),u.routesMeta.map(o=>o.childrenIndex)))}var o1=/^:[\w-]+$/,u1=3,f1=2,d1=1,m1=10,h1=-2,Ph=n=>n==="*";function p1(n,c){let u=n.split("/"),o=u.length;return u.some(Ph)&&(o+=h1),c&&(o+=f1),u.filter(f=>!Ph(f)).reduce((f,m)=>f+(o1.test(m)?u1:m===""?d1:m1),o)}function g1(n,c){return n.length===c.length&&n.slice(0,-1).every((o,f)=>o===c[f])?n[n.length-1]-c[c.length-1]:0}function x1(n,c,u=!1){let{routesMeta:o}=n,f={},m="/",h=[];for(let v=0;v{if(S==="*"){let J=v[E]||"";h=m.slice(0,m.length-J.length).replace(/(.)\/+$/,"$1")}const Z=v[E];return b&&!Z?x[S]=void 0:x[S]=(Z||"").replace(/%2F/g,"/"),x},{}),pathname:m,pathnameBase:h,pattern:n}}function y1(n,c=!1,u=!0){ta(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],f="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,v,g,x,S)=>{if(o.push({paramName:v,isOptional:g!=null}),g){let b=S.charAt(x+h.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),f+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?f+="\\/*$":n!==""&&n!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,c?void 0:"i"),o]}function v1(n){try{return n.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return ta(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),n}}function Ma(n,c){if(c==="/")return n;if(!n.toLowerCase().startsWith(c.toLowerCase()))return null;let u=c.endsWith("/")?c.length-1:c.length,o=n.charAt(u);return o&&o!=="/"?null:n.slice(u)||"/"}var b1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function S1(n,c="/"){let{pathname:u,search:o="",hash:f=""}=typeof n=="string"?Sn(n):n,m;return u?(u=jp(u),u.startsWith("/")?m=ep(u.substring(1),"/"):m=ep(u,c)):m=c,{pathname:m,search:w1(o),hash:_1(f)}}function ep(n,c){let u=dr(c).split("/");return n.split("/").forEach(f=>{f===".."?u.length>1&&u.pop():f!=="."&&u.push(f)}),u.length>1?u.join("/"):"/"}function Wo(n,c,u,o){return`Cannot include a '${n}' character in a manually specified \`to.${c}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${u}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function N1(n){return n.filter((c,u)=>u===0||c.route.path&&c.route.path.length>0)}function yu(n){let c=N1(n);return c.map((u,o)=>o===c.length-1?u.pathname:u.pathnameBase)}function xr(n,c,u,o=!1){let f;typeof n=="string"?f=Sn(n):(f={...n},Je(!f.pathname||!f.pathname.includes("?"),Wo("?","pathname","search",f)),Je(!f.pathname||!f.pathname.includes("#"),Wo("#","pathname","hash",f)),Je(!f.search||!f.search.includes("#"),Wo("#","search","hash",f)));let m=n===""||f.pathname==="",h=m?"/":f.pathname,v;if(h==null)v=u;else{let b=c.length-1;if(!o&&h.startsWith("..")){let E=h.split("/");for(;E[0]==="..";)E.shift(),b-=1;f.pathname=E.join("/")}v=b>=0?c[b]:"/"}let g=S1(f,v),x=h&&h!=="/"&&h.endsWith("/"),S=(m||h===".")&&u.endsWith("/");return!g.pathname.endsWith("/")&&(x||S)&&(g.pathname+="/"),g}var jp=n=>n.replace(/\/\/+/g,"/"),ea=n=>jp(n.join("/")),dr=n=>n.replace(/\/+$/,""),j1=n=>dr(n).replace(/^\/*/,"/"),w1=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,_1=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,E1=class{constructor(n,c,u,o=!1){this.status=n,this.statusText=c||"",this.internal=o,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function C1(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function T1(n){let c=n.map(u=>u.route.path).filter(Boolean);return ea(c)||"/"}var wp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _p(n,c){let u=n;if(typeof u!="string"||!b1.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let o=u,f=!1;if(wp)try{let m=new URL(window.location.href),h=u.startsWith("//")?new URL(m.protocol+u):new URL(u),v=Ma(h.pathname,c);h.origin===m.origin&&v!=null?u=v+h.search+h.hash:f=!0}catch{ta(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ep=["POST","PUT","PATCH","DELETE"];new Set(Ep);var A1=["GET",...Ep];new Set(A1);var Nn=y.createContext(null);Nn.displayName="DataRouter";var yr=y.createContext(null);yr.displayName="DataRouterState";var Cp=y.createContext(!1);function M1(){return y.useContext(Cp)}var Tp=y.createContext({isTransitioning:!1});Tp.displayName="ViewTransition";var z1=y.createContext(new Map);z1.displayName="Fetchers";var R1=y.createContext(null);R1.displayName="Await";var Ut=y.createContext(null);Ut.displayName="Navigation";var Ts=y.createContext(null);Ts.displayName="Location";var oa=y.createContext({outlet:null,matches:[],isDataRoute:!1});oa.displayName="Route";var vu=y.createContext(null);vu.displayName="RouteError";var Ap="REACT_ROUTER_ERROR",k1="REDIRECT",O1="ROUTE_ERROR_RESPONSE";function D1(n){if(n.startsWith(`${Ap}:${k1}:{`))try{let c=JSON.parse(n.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function L1(n){if(n.startsWith(`${Ap}:${O1}:{`))try{let c=JSON.parse(n.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new E1(c.status,c.statusText,c.data)}catch{}}function U1(n,{relative:c}={}){Je(jn(),"useHref() may be used only in the context of a component.");let{basename:u,navigator:o}=y.useContext(Ut),{hash:f,pathname:m,search:h}=As(n,{relative:c}),v=m;return u!=="/"&&(v=m==="/"?u:ea([u,m])),o.createHref({pathname:v,search:h,hash:f})}function jn(){return y.useContext(Ts)!=null}function ua(){return Je(jn(),"useLocation() may be used only in the context of a component."),y.useContext(Ts).location}var Mp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function zp(n){y.useContext(Ut).static||y.useLayoutEffect(n)}function Rp(){let{isDataRoute:n}=y.useContext(oa);return n?F1():H1()}function H1(){Je(jn(),"useNavigate() may be used only in the context of a component.");let n=y.useContext(Nn),{basename:c,navigator:u}=y.useContext(Ut),{matches:o}=y.useContext(oa),{pathname:f}=ua(),m=JSON.stringify(yu(o)),h=y.useRef(!1);return zp(()=>{h.current=!0}),y.useCallback((g,x={})=>{if(ta(h.current,Mp),!h.current)return;if(typeof g=="number"){u.go(g);return}let S=xr(g,JSON.parse(m),f,x.relative==="path");n==null&&c!=="/"&&(S.pathname=S.pathname==="/"?c:ea([c,S.pathname])),(x.replace?u.replace:u.push)(S,x.state,x)},[c,u,m,f,n])}y.createContext(null);function As(n,{relative:c}={}){let{matches:u}=y.useContext(oa),{pathname:o}=ua(),f=JSON.stringify(yu(u));return y.useMemo(()=>xr(n,JSON.parse(f),o,c==="path"),[n,f,o,c])}function B1(n,c){return kp(n,c)}function kp(n,c,u){Je(jn(),"useRoutes() may be used only in the context of a component.");let{navigator:o}=y.useContext(Ut),{matches:f}=y.useContext(oa),m=f[f.length-1],h=m?m.params:{},v=m?m.pathname:"/",g=m?m.pathnameBase:"/",x=m&&m.route;{let j=x&&x.path||"";Dp(v,!x||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${v}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let S=ua(),b;if(c){let j=typeof c=="string"?Sn(c):c;Je(g==="/"||j.pathname?.startsWith(g),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${j.pathname}" was given in the \`location\` prop.`),b=j}else b=S;let E=b.pathname||"/",Z=E;if(g!=="/"){let j=g.replace(/^\//,"").split("/");Z="/"+E.replace(/^\//,"").split("/").slice(j.length).join("/")}let J=bp(n,{pathname:Z});ta(x||J!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),ta(J==null||J[J.length-1].route.element!==void 0||J[J.length-1].route.Component!==void 0||J[J.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let H=X1(J&&J.map(j=>Object.assign({},j,{params:Object.assign({},h,j.params),pathname:ea([g,o.encodeLocation?o.encodeLocation(j.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?g:ea([g,o.encodeLocation?o.encodeLocation(j.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),f,u);return c&&H?y.createElement(Ts.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},H):H}function q1(){let n=K1(),c=C1(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),u=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:o},m={padding:"2px 4px",backgroundColor:o},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:m},"ErrorBoundary")," or"," ",y.createElement("code",{style:m},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},c),u?y.createElement("pre",{style:f},u):null,h)}var G1=y.createElement(q1,null),Op=class extends y.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,c){return c.location!==n.location||c.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:c.error,location:c.location,revalidation:n.revalidation||c.revalidation}}componentDidCatch(n,c){this.props.onError?this.props.onError(n,c):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const u=L1(n.digest);u&&(n=u)}let c=n!==void 0?y.createElement(oa.Provider,{value:this.props.routeContext},y.createElement(vu.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?y.createElement(Y1,{error:n},c):c}};Op.contextType=Cp;var Io=new WeakMap;function Y1({children:n,error:c}){let{basename:u}=y.useContext(Ut);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let o=D1(c.digest);if(o){let f=Io.get(c);if(f)throw f;let m=_p(o.location,u);if(wp&&!Io.get(c))if(m.isExternal||o.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:o.replace}));throw Io.set(c,h),h}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return n}function V1({routeContext:n,match:c,children:u}){let o=y.useContext(Nn);return o&&o.static&&o.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=c.route.id),y.createElement(oa.Provider,{value:n},u)}function X1(n,c=[],u){let o=u?.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(c.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let f=n,m=o?.errors;if(m!=null){let S=f.findIndex(b=>b.route.id&&m?.[b.route.id]!==void 0);Je(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let h=!1,v=-1;if(u&&o){h=o.renderFallback;for(let S=0;S=0?f=f.slice(0,v+1):f=[f[0]];break}}}}let g=u?.onError,x=o&&g?(S,b)=>{g(S,{location:o.location,params:o.matches?.[0]?.params??{},unstable_pattern:T1(o.matches),errorInfo:b})}:void 0;return f.reduceRight((S,b,E)=>{let Z,J=!1,H=null,j=null;o&&(Z=m&&b.route.id?m[b.route.id]:void 0,H=b.route.errorElement||G1,h&&(v<0&&E===0?(Dp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),J=!0,j=null):v===E&&(J=!0,j=b.route.hydrateFallbackElement||null)));let U=c.concat(f.slice(0,E+1)),R=()=>{let T;return Z?T=H:J?T=j:b.route.Component?T=y.createElement(b.route.Component,null):b.route.element?T=b.route.element:T=S,y.createElement(V1,{match:b,routeContext:{outlet:S,matches:U,isDataRoute:o!=null},children:T})};return o&&(b.route.ErrorBoundary||b.route.errorElement||E===0)?y.createElement(Op,{location:o.location,revalidation:o.revalidation,component:H,error:Z,children:R(),routeContext:{outlet:null,matches:U,isDataRoute:!0},onError:x}):R()},null)}function bu(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Q1(n){let c=y.useContext(Nn);return Je(c,bu(n)),c}function Z1(n){let c=y.useContext(yr);return Je(c,bu(n)),c}function J1(n){let c=y.useContext(oa);return Je(c,bu(n)),c}function Su(n){let c=J1(n),u=c.matches[c.matches.length-1];return Je(u.route.id,`${n} can only be used on routes that contain a unique "id"`),u.route.id}function $1(){return Su("useRouteId")}function K1(){let n=y.useContext(vu),c=Z1("useRouteError"),u=Su("useRouteError");return n!==void 0?n:c.errors?.[u]}function F1(){let{router:n}=Q1("useNavigate"),c=Su("useNavigate"),u=y.useRef(!1);return zp(()=>{u.current=!0}),y.useCallback(async(f,m={})=>{ta(u.current,Mp),u.current&&(typeof f=="number"?await n.navigate(f):await n.navigate(f,{fromRouteId:c,...m}))},[n,c])}var tp={};function Dp(n,c,u){!c&&!tp[n]&&(tp[n]=!0,ta(!1,u))}y.memo(W1);function W1({routes:n,future:c,state:u,isStatic:o,onError:f}){return kp(n,void 0,{state:u,isStatic:o,onError:f})}function I1({to:n,replace:c,state:u,relative:o}){Je(jn()," may be used only in the context of a component.");let{static:f}=y.useContext(Ut);ta(!f," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:m}=y.useContext(oa),{pathname:h}=ua(),v=Rp(),g=xr(n,yu(m),h,o==="path"),x=JSON.stringify(g);return y.useEffect(()=>{v(JSON.parse(x),{replace:c,state:u,relative:o})},[v,x,o,c,u]),null}function Pt(n){Je(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function P1({basename:n="/",children:c=null,location:u,navigationType:o="POP",navigator:f,static:m=!1,unstable_useTransitions:h}){Je(!jn(),"You cannot render a inside another . You should never have more than one in your app.");let v=n.replace(/^\/*/,"/"),g=y.useMemo(()=>({basename:v,navigator:f,static:m,unstable_useTransitions:h,future:{}}),[v,f,m,h]);typeof u=="string"&&(u=Sn(u));let{pathname:x="/",search:S="",hash:b="",state:E=null,key:Z="default",unstable_mask:J}=u,H=y.useMemo(()=>{let j=Ma(x,v);return j==null?null:{location:{pathname:j,search:S,hash:b,state:E,key:Z,unstable_mask:J},navigationType:o}},[v,x,S,b,E,Z,o,J]);return ta(H!=null,` is not able to match the URL "${x}${S}${b}" because it does not start with the basename, so the won't render anything.`),H==null?null:y.createElement(Ut.Provider,{value:g},y.createElement(Ts.Provider,{children:c,value:H}))}function ey({children:n,location:c}){return B1(fu(n),c)}function fu(n,c=[]){let u=[];return y.Children.forEach(n,(o,f)=>{if(!y.isValidElement(o))return;let m=[...c,f];if(o.type===y.Fragment){u.push.apply(u,fu(o.props.children,m));return}Je(o.type===Pt,`[${typeof o.type=="string"?o.type:o.type.name}] is not a component. All component children of must be a or `),Je(!o.props.index||!o.props.children,"An index route cannot have child routes.");let h={id:o.props.id||m.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(h.children=fu(o.props.children,m)),u.push(h)}),u}var cr="get",or="application/x-www-form-urlencoded";function vr(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function ty(n){return vr(n)&&n.tagName.toLowerCase()==="button"}function ay(n){return vr(n)&&n.tagName.toLowerCase()==="form"}function ly(n){return vr(n)&&n.tagName.toLowerCase()==="input"}function ny(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function sy(n,c){return n.button===0&&(!c||c==="_self")&&!ny(n)}var Ii=null;function iy(){if(Ii===null)try{new FormData(document.createElement("form"),0),Ii=!1}catch{Ii=!0}return Ii}var ry=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Po(n){return n!=null&&!ry.has(n)?(ta(!1,`"${n}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${or}"`),null):n}function cy(n,c){let u,o,f,m,h;if(ay(n)){let v=n.getAttribute("action");o=v?Ma(v,c):null,u=n.getAttribute("method")||cr,f=Po(n.getAttribute("enctype"))||or,m=new FormData(n)}else if(ty(n)||ly(n)&&(n.type==="submit"||n.type==="image")){let v=n.form;if(v==null)throw new Error('Cannot submit a